summaryrefslogtreecommitdiff
path: root/Build/source/libs/ncurses
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-16 00:09:26 +0000
committerKarl Berry <karl@freefriends.org>2006-01-16 00:09:26 +0000
commit6c0eafbb1395d426a72a74538e0b2a95e8344ca6 (patch)
tree2a5f80b80fc76086a2602b812c2a182d00f961b7 /Build/source/libs/ncurses
parent70f7efeb5c9965a63a4143ad1c1f473585dc364c (diff)
libs 1
git-svn-id: svn://tug.org/texlive/trunk@1483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/ncurses')
-rw-r--r--Build/source/libs/ncurses/ANNOUNCE493
-rw-r--r--Build/source/libs/ncurses/INSTALL1245
-rw-r--r--Build/source/libs/ncurses/MANIFEST997
-rw-r--r--Build/source/libs/ncurses/Makefile.in97
-rw-r--r--Build/source/libs/ncurses/Makefile.os2234
-rw-r--r--Build/source/libs/ncurses/NEWS6894
-rw-r--r--Build/source/libs/ncurses/README183
-rw-r--r--Build/source/libs/ncurses/README.emx45
-rw-r--r--Build/source/libs/ncurses/TO-DO173
-rw-r--r--Build/source/libs/ncurses/aclocal.m44022
-rw-r--r--Build/source/libs/ncurses/announce.html.in569
-rwxr-xr-xBuild/source/libs/ncurses/config.guess1465
-rwxr-xr-xBuild/source/libs/ncurses/config.sub1579
-rwxr-xr-xBuild/source/libs/ncurses/configure14017
-rw-r--r--Build/source/libs/ncurses/configure.in1341
-rw-r--r--Build/source/libs/ncurses/convert_configure.pl90
-rw-r--r--Build/source/libs/ncurses/dist.mk138
-rw-r--r--Build/source/libs/ncurses/include/Caps1264
-rw-r--r--Build/source/libs/ncurses/include/Caps.aix41255
-rw-r--r--Build/source/libs/ncurses/include/Caps.hpux111278
-rw-r--r--Build/source/libs/ncurses/include/Caps.keys1354
-rw-r--r--Build/source/libs/ncurses/include/Caps.osf1r51274
-rw-r--r--Build/source/libs/ncurses/include/Caps.uwin1090
-rwxr-xr-xBuild/source/libs/ncurses/include/MKhashsize.sh14
-rwxr-xr-xBuild/source/libs/ncurses/include/MKkey_defs.sh182
-rwxr-xr-xBuild/source/libs/ncurses/include/MKncurses_def.sh80
-rwxr-xr-xBuild/source/libs/ncurses/include/MKparametrized.sh35
-rw-r--r--Build/source/libs/ncurses/include/MKterm.h.awk.in311
-rw-r--r--Build/source/libs/ncurses/include/Makefile.in130
-rw-r--r--Build/source/libs/ncurses/include/capdefaults.c84
-rw-r--r--Build/source/libs/ncurses/include/curses.h.in1026
-rw-r--r--Build/source/libs/ncurses/include/curses.tail137
-rw-r--r--Build/source/libs/ncurses/include/curses.wide239
-rwxr-xr-xBuild/source/libs/ncurses/include/edit_cfg.sh67
-rw-r--r--Build/source/libs/ncurses/include/headers35
-rw-r--r--Build/source/libs/ncurses/include/nc_alloc.h91
-rw-r--r--Build/source/libs/ncurses/include/nc_panel.h66
-rw-r--r--Build/source/libs/ncurses/include/ncurses_cfg.hin62
-rw-r--r--Build/source/libs/ncurses/include/ncurses_defs180
-rw-r--r--Build/source/libs/ncurses/include/ncurses_dll.h52
-rw-r--r--Build/source/libs/ncurses/include/term_entry.h165
-rw-r--r--Build/source/libs/ncurses/include/termcap.h.in75
-rw-r--r--Build/source/libs/ncurses/include/tic.h311
-rw-r--r--Build/source/libs/ncurses/include/unctrl.h.in63
-rwxr-xr-xBuild/source/libs/ncurses/install-sh251
-rwxr-xr-xBuild/source/libs/ncurses/man/MKterminfo.sh110
-rw-r--r--Build/source/libs/ncurses/man/Makefile.in79
-rw-r--r--Build/source/libs/ncurses/man/captoinfo.1m189
-rw-r--r--Build/source/libs/ncurses/man/clear.148
-rw-r--r--Build/source/libs/ncurses/man/curs_add_wch.3x134
-rw-r--r--Build/source/libs/ncurses/man/curs_add_wchstr.3x97
-rw-r--r--Build/source/libs/ncurses/man/curs_addch.3x173
-rw-r--r--Build/source/libs/ncurses/man/curs_addchstr.3x82
-rw-r--r--Build/source/libs/ncurses/man/curs_addstr.3x87
-rw-r--r--Build/source/libs/ncurses/man/curs_addwstr.3x92
-rw-r--r--Build/source/libs/ncurses/man/curs_attr.3x232
-rw-r--r--Build/source/libs/ncurses/man/curs_beep.3x63
-rw-r--r--Build/source/libs/ncurses/man/curs_bkgd.3x98
-rw-r--r--Build/source/libs/ncurses/man/curs_bkgrnd.3x106
-rw-r--r--Build/source/libs/ncurses/man/curs_border.3x138
-rw-r--r--Build/source/libs/ncurses/man/curs_border_set.3x201
-rw-r--r--Build/source/libs/ncurses/man/curs_clear.3x94
-rw-r--r--Build/source/libs/ncurses/man/curs_color.3x216
-rw-r--r--Build/source/libs/ncurses/man/curs_delch.3x70
-rw-r--r--Build/source/libs/ncurses/man/curs_deleteln.3x87
-rw-r--r--Build/source/libs/ncurses/man/curs_extend.3x84
-rw-r--r--Build/source/libs/ncurses/man/curs_get_wch.3x161
-rw-r--r--Build/source/libs/ncurses/man/curs_get_wstr.3x167
-rw-r--r--Build/source/libs/ncurses/man/curs_getcchar.3x144
-rw-r--r--Build/source/libs/ncurses/man/curs_getch.3x307
-rw-r--r--Build/source/libs/ncurses/man/curs_getstr.3x107
-rw-r--r--Build/source/libs/ncurses/man/curs_getyx.3x89
-rw-r--r--Build/source/libs/ncurses/man/curs_in_wch.3x68
-rw-r--r--Build/source/libs/ncurses/man/curs_in_wchstr.3x117
-rw-r--r--Build/source/libs/ncurses/man/curs_inch.3x73
-rw-r--r--Build/source/libs/ncurses/man/curs_inchstr.3x88
-rw-r--r--Build/source/libs/ncurses/man/curs_initscr.3x124
-rw-r--r--Build/source/libs/ncurses/man/curs_inopts.3x214
-rw-r--r--Build/source/libs/ncurses/man/curs_ins_wch.3x65
-rw-r--r--Build/source/libs/ncurses/man/curs_ins_wstr.3x104
-rw-r--r--Build/source/libs/ncurses/man/curs_insch.3x70
-rw-r--r--Build/source/libs/ncurses/man/curs_insstr.3x99
-rw-r--r--Build/source/libs/ncurses/man/curs_instr.3x89
-rw-r--r--Build/source/libs/ncurses/man/curs_inwstr.3x94
-rw-r--r--Build/source/libs/ncurses/man/curs_kernel.3x159
-rw-r--r--Build/source/libs/ncurses/man/curs_mouse.3x254
-rw-r--r--Build/source/libs/ncurses/man/curs_move.3x63
-rw-r--r--Build/source/libs/ncurses/man/curs_outopts.3x193
-rw-r--r--Build/source/libs/ncurses/man/curs_overlay.3x76
-rw-r--r--Build/source/libs/ncurses/man/curs_pad.3x133
-rw-r--r--Build/source/libs/ncurses/man/curs_print.3x74
-rw-r--r--Build/source/libs/ncurses/man/curs_printw.3x84
-rw-r--r--Build/source/libs/ncurses/man/curs_refresh.3x126
-rw-r--r--Build/source/libs/ncurses/man/curs_scanw.3x97
-rw-r--r--Build/source/libs/ncurses/man/curs_scr_dump.3x94
-rw-r--r--Build/source/libs/ncurses/man/curs_scroll.3x84
-rw-r--r--Build/source/libs/ncurses/man/curs_slk.3x149
-rw-r--r--Build/source/libs/ncurses/man/curs_termattrs.3x134
-rw-r--r--Build/source/libs/ncurses/man/curs_termcap.3x164
-rw-r--r--Build/source/libs/ncurses/man/curs_terminfo.3x294
-rw-r--r--Build/source/libs/ncurses/man/curs_touch.3x96
-rw-r--r--Build/source/libs/ncurses/man/curs_trace.3x149
-rw-r--r--Build/source/libs/ncurses/man/curs_util.3x146
-rw-r--r--Build/source/libs/ncurses/man/curs_window.3x159
-rw-r--r--Build/source/libs/ncurses/man/default_colors.3x125
-rw-r--r--Build/source/libs/ncurses/man/define_key.3x65
-rw-r--r--Build/source/libs/ncurses/man/form.3x200
-rw-r--r--Build/source/libs/ncurses/man/form_cursor.3x74
-rw-r--r--Build/source/libs/ncurses/man/form_data.3x63
-rw-r--r--Build/source/libs/ncurses/man/form_driver.3x272
-rw-r--r--Build/source/libs/ncurses/man/form_field.3x97
-rw-r--r--Build/source/libs/ncurses/man/form_field_attributes.3x91
-rw-r--r--Build/source/libs/ncurses/man/form_field_buffer.3x105
-rw-r--r--Build/source/libs/ncurses/man/form_field_info.3x84
-rw-r--r--Build/source/libs/ncurses/man/form_field_just.3x78
-rw-r--r--Build/source/libs/ncurses/man/form_field_new.3x96
-rw-r--r--Build/source/libs/ncurses/man/form_field_opts.3x120
-rw-r--r--Build/source/libs/ncurses/man/form_field_userptr.3x73
-rw-r--r--Build/source/libs/ncurses/man/form_field_validation.3x144
-rw-r--r--Build/source/libs/ncurses/man/form_fieldtype.3x135
-rw-r--r--Build/source/libs/ncurses/man/form_hook.3x100
-rw-r--r--Build/source/libs/ncurses/man/form_new.3x79
-rw-r--r--Build/source/libs/ncurses/man/form_new_page.3x77
-rw-r--r--Build/source/libs/ncurses/man/form_opts.3x90
-rw-r--r--Build/source/libs/ncurses/man/form_page.3x95
-rw-r--r--Build/source/libs/ncurses/man/form_post.3x90
-rw-r--r--Build/source/libs/ncurses/man/form_requestname.3x69
-rw-r--r--Build/source/libs/ncurses/man/form_userptr.3x73
-rw-r--r--Build/source/libs/ncurses/man/form_win.3x95
-rw-r--r--Build/source/libs/ncurses/man/infocmp.1m424
-rw-r--r--Build/source/libs/ncurses/man/infotocap.1m74
-rw-r--r--Build/source/libs/ncurses/man/key_defined.3x60
-rw-r--r--Build/source/libs/ncurses/man/keybound.3x64
-rw-r--r--Build/source/libs/ncurses/man/keyok.3x63
-rwxr-xr-xBuild/source/libs/ncurses/man/make_sed.sh83
-rw-r--r--Build/source/libs/ncurses/man/man_db.renames139
-rw-r--r--Build/source/libs/ncurses/man/manlinks.sed101
-rw-r--r--Build/source/libs/ncurses/man/menu.3x190
-rw-r--r--Build/source/libs/ncurses/man/menu_attributes.3x100
-rw-r--r--Build/source/libs/ncurses/man/menu_cursor.3x73
-rw-r--r--Build/source/libs/ncurses/man/menu_driver.3x170
-rw-r--r--Build/source/libs/ncurses/man/menu_format.3x84
-rw-r--r--Build/source/libs/ncurses/man/menu_hook.3x101
-rw-r--r--Build/source/libs/ncurses/man/menu_items.3x91
-rw-r--r--Build/source/libs/ncurses/man/menu_mark.3x84
-rw-r--r--Build/source/libs/ncurses/man/menu_new.3x79
-rw-r--r--Build/source/libs/ncurses/man/menu_opts.3x104
-rw-r--r--Build/source/libs/ncurses/man/menu_pattern.3x82
-rw-r--r--Build/source/libs/ncurses/man/menu_post.3x91
-rw-r--r--Build/source/libs/ncurses/man/menu_requestname.3x69
-rw-r--r--Build/source/libs/ncurses/man/menu_spacing.3x84
-rw-r--r--Build/source/libs/ncurses/man/menu_userptr.3x73
-rw-r--r--Build/source/libs/ncurses/man/menu_win.3x95
-rw-r--r--Build/source/libs/ncurses/man/mitem_current.3x101
-rw-r--r--Build/source/libs/ncurses/man/mitem_name.3x64
-rw-r--r--Build/source/libs/ncurses/man/mitem_new.3x83
-rw-r--r--Build/source/libs/ncurses/man/mitem_opts.3x84
-rw-r--r--Build/source/libs/ncurses/man/mitem_userptr.3x72
-rw-r--r--Build/source/libs/ncurses/man/mitem_value.3x76
-rw-r--r--Build/source/libs/ncurses/man/mitem_visible.3x59
-rw-r--r--Build/source/libs/ncurses/man/ncurses.3x919
-rw-r--r--Build/source/libs/ncurses/man/panel.3x182
-rw-r--r--Build/source/libs/ncurses/man/resizeterm.3x92
-rw-r--r--Build/source/libs/ncurses/man/term.5208
-rw-r--r--Build/source/libs/ncurses/man/term.7204
-rw-r--r--Build/source/libs/ncurses/man/terminfo.head105
-rw-r--r--Build/source/libs/ncurses/man/terminfo.tail1666
-rw-r--r--Build/source/libs/ncurses/man/tic.1m313
-rw-r--r--Build/source/libs/ncurses/man/toe.1m81
-rw-r--r--Build/source/libs/ncurses/man/tput.1288
-rw-r--r--Build/source/libs/ncurses/man/tset.1254
-rw-r--r--Build/source/libs/ncurses/man/wresize.3x64
-rw-r--r--Build/source/libs/ncurses/mk-0th.awk101
-rw-r--r--Build/source/libs/ncurses/mk-1st.awk373
-rw-r--r--Build/source/libs/ncurses/mk-2nd.awk128
-rwxr-xr-xBuild/source/libs/ncurses/mkinstalldirs38
-rw-r--r--Build/source/libs/ncurses/ncurses.ac105
-rw-r--r--Build/source/libs/ncurses/ncurses/Makefile.in288
-rw-r--r--Build/source/libs/ncurses/ncurses/README2
-rw-r--r--Build/source/libs/ncurses/ncurses/README.IZ65
-rw-r--r--Build/source/libs/ncurses/ncurses/SigAction.h113
-rw-r--r--Build/source/libs/ncurses/ncurses/base/MKkeyname.awk90
-rwxr-xr-xBuild/source/libs/ncurses/ncurses/base/MKlib_gen.sh401
-rw-r--r--Build/source/libs/ncurses/ncurses/base/MKunctrl.awk72
-rw-r--r--Build/source/libs/ncurses/ncurses/base/README7
-rw-r--r--Build/source/libs/ncurses/ncurses/base/define_key.c63
-rw-r--r--Build/source/libs/ncurses/ncurses/base/key_defined.c76
-rw-r--r--Build/source/libs/ncurses/ncurses/base/keybound.c47
-rw-r--r--Build/source/libs/ncurses/ncurses/base/keyok.c73
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_addch.c413
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_addstr.c209
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_beep.c73
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_bkgd.c138
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_box.c126
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_chgat.c62
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_clear.c56
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_clearok.c55
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_clrbot.c76
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_clreol.c91
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_color.c535
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_colorset.c59
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_delch.c69
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_delwin.c78
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_dft_fgbg.c71
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_echo.c61
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_endwin.c60
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_erase.c73
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_flash.c73
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_freeall.c129
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_getch.c575
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_getstr.c215
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_hline.c80
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_immedok.c54
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_inchstr.c64
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_initscr.c97
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_insch.c137
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_insdel.c63
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_insnstr.c68
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_instr.c73
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_isendwin.c51
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_leaveok.c55
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_mouse.c1296
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_move.c61
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_mvwin.c108
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_newterm.c211
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_newwin.c303
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_nl.c79
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_overlay.c184
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_pad.c313
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_printw.c139
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_redrawln.c75
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_refresh.c187
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_restart.c92
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_scanw.c106
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_screen.c205
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_scroll.c130
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_scrollok.c55
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_scrreg.c60
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_set_term.c497
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slk.c215
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkatr_set.c55
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkatrof.c53
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkatron.c53
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkatrset.c53
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkattr.c52
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkclear.c61
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkcolor.c52
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkinit.c51
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slklab.c51
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkrefr.c120
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slkset.c95
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_slktouch.c53
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_touch.c91
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_ungetch.c79
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_vline.c79
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_wattroff.c56
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_wattron.c56
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_winch.c54
-rw-r--r--Build/source/libs/ncurses/ncurses/base/lib_window.c248
-rw-r--r--Build/source/libs/ncurses/ncurses/base/memmove.c69
-rw-r--r--Build/source/libs/ncurses/ncurses/base/nc_panel.c41
-rw-r--r--Build/source/libs/ncurses/ncurses/base/resizeterm.c330
-rw-r--r--Build/source/libs/ncurses/ncurses/base/safe_sprintf.c262
-rw-r--r--Build/source/libs/ncurses/ncurses/base/sigaction.c99
-rw-r--r--Build/source/libs/ncurses/ncurses/base/tries.c141
-rw-r--r--Build/source/libs/ncurses/ncurses/base/version.c42
-rw-r--r--Build/source/libs/ncurses/ncurses/base/vsscanf.c356
-rw-r--r--Build/source/libs/ncurses/ncurses/base/wresize.c239
-rw-r--r--Build/source/libs/ncurses/ncurses/curses.priv.h1131
-rw-r--r--Build/source/libs/ncurses/ncurses/fifo_defs.h59
-rw-r--r--Build/source/libs/ncurses/ncurses/llib-lncurses3080
-rw-r--r--Build/source/libs/ncurses/ncurses/llib-lncursesw3844
-rw-r--r--Build/source/libs/ncurses/ncurses/modules219
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/MKcaptab.awk71
-rwxr-xr-xBuild/source/libs/ncurses/ncurses/tinfo/MKfallback.sh102
-rwxr-xr-xBuild/source/libs/ncurses/ncurses/tinfo/MKkeys_list.sh62
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/MKnames.awk98
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/README8
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/access.c132
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/add_tries.c125
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/alloc_entry.c266
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/alloc_ttype.c491
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/captoinfo.c838
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/comp_error.c146
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/comp_expand.c184
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/comp_hash.c331
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/comp_parse.c500
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/comp_scan.c863
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/doalloc.c75
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/free_ttype.c106
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/getenv_num.c56
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/home_terminfo.c67
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/init_keytry.c80
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_acs.c175
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_baudrate.c222
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_cur_term.c76
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_data.c91
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_has_cap.c65
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_kernel.c154
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_longname.c57
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_napms.c75
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_options.c267
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_print.c92
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_raw.c296
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_setup.c548
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_termcap.c381
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_termname.c44
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_tgoto.c203
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_ti.c103
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_tparm.c791
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_tputs.c257
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/lib_ttyflags.c178
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/make_keys.c140
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/name_match.c107
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/parse_entry.c986
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/read_entry.c517
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/read_termcap.c1168
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/setbuf.c150
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/strings.c142
-rw-r--r--Build/source/libs/ncurses/ncurses/tinfo/write_entry.c591
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/README5
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/lib_trace.c197
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/lib_traceatr.c310
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/lib_tracebits.c248
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/lib_tracechr.c72
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/lib_tracedmp.c146
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/lib_tracemse.c92
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/trace_buf.c109
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/trace_tries.c76
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/trace_xnames.c75
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/varargs.c182
-rw-r--r--Build/source/libs/ncurses/ncurses/trace/visbuf.c290
-rwxr-xr-xBuild/source/libs/ncurses/ncurses/tty/MKexpanded.sh99
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/hardscroll.c325
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/hashmap.c538
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/lib_mvcur.c1236
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/lib_tstp.c399
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/lib_twait.c447
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/lib_vidattr.c310
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/tty_display.h140
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/tty_input.h61
-rw-r--r--Build/source/libs/ncurses/ncurses/tty/tty_update.c1896
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/charable.c80
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_add_wch.c109
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_box_set.c113
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_cchar.c127
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_erasewchar.c77
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_get_wch.c117
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_get_wstr.c231
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_hline_set.c79
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_in_wch.c61
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_in_wchnstr.c68
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_ins_wch.c130
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_inwstr.c100
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_pecho_wchar.c57
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_slk_wset.c149
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_unget_wch.c80
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_vid_attr.c94
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_vline_set.c78
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_wacs.c114
-rw-r--r--Build/source/libs/ncurses/ncurses/widechar/lib_wunctrl.c56
-rwxr-xr-xBuild/source/libs/ncurses/tar-copy.sh77
-rw-r--r--Build/source/libs/ncurses/withenable.ac15
363 files changed, 105687 insertions, 0 deletions
diff --git a/Build/source/libs/ncurses/ANNOUNCE b/Build/source/libs/ncurses/ANNOUNCE
new file mode 100644
index 00000000000..513234e33ca
--- /dev/null
+++ b/Build/source/libs/ncurses/ANNOUNCE
@@ -0,0 +1,493 @@
+
+ Announcing ncurses 5.4
+
+ The ncurses (new curses) library is a free software emulation of
+ curses in System V Release 4.0, and more. It uses terminfo format,
+ 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 has been in use for
+ some time with OpenBSD as the system curses library, and on FreeBSD
+ and NetBSD as an external package. 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/gnu/ncurses/ .
+ It is also available at [2]ftp://invisible-island.net/ncurses/ .
+
+ Release Notes
+
+ This release is designed to be upward compatible from ncurses 5.0 and
+ 5.3; very few applications will require recompilation, depending on
+ the platform. These are the highlights from the change-log since
+ ncurses 5.3 release.
+
+ Interface changes:
+ * add the remaining functions for X/Open curses wide-character
+ support.
+ + pecho_wchar()
+ + slk_wset()
+ These are only available if the library is configured using the
+ --enable-widec option.
+ * write getyx() and related 2-return macros in terms of getcury(),
+ getcurx(), etc.
+ * simplify ifdef for bool declaration in curses.h
+ * modify ifdef's in curses.h that disabled use of __attribute__()
+ for g++, since recent versions implement the cases which ncurses
+ uses.
+ * add key_defined() function, to tell which keycode a string is
+ bound to.
+
+ New features and improvements:
+ * library
+ + implement logic in lib_mouse.c to handle position reports
+ which are generated when XFree86 xterm is initialized with
+ private modes 1002 or 1003. These are returned to the
+ application as the REPORT_MOUSE_POSITION mask, which was not
+ implemented.
+ + modify soft-key initialization to use A_REVERSE if A_STANDOUT
+ would not be shown when colors are used, i.e., if ncv#1 is
+ set in the terminfo as is done in "screen".
+ + add configure option for FreeBSD sysmouse, --with-sysmouse,
+ and implement library support for that.
+ * programs:
+ + tack:
+ o allow it to run from fallback terminfo data.
+ o reset colors after each color test, correct a place
+ where exit_standout_mode was used instead of
+ exit_attribute_mode.
+ o improve bce test by making it set colors other than
+ black on white.
+ + tic:
+ o handle a case where an entry has no description, and
+ capabilities begin on the same line as the entry name.
+ o allow a terminfo entry with a leading 2-character name.
+ o improved warnings when suppressing items to fit in
+ termcap's 1023-byte limit.
+ o add check for multiple "tc=" clauses in a termcap.
+ o correct logic for resolving "use=" clauses allow infocmp
+ and tic to show cancelled capabilities.
+ o check for incomplete line-drawing character mapping.
+ o check for missing/empty/illegal terminfo name.
+ + tput:
+ o modify tput to use the same parameter analysis as
+ tparm() does, to provide for user-defined strings, e.g.,
+ for xterm title, a corresponding capability might be
+ title=\E]2;%p1%s^G,
+ + tset:
+ o use the system's default values for CKILL and other
+ default control characters.
+ o correct interchanged defaults for kill and interrupt
+ characters, which caused it to report unnecessarily.
+
+ Major bug fixes:
+ * prevent recursion in wgetch() via wgetnstr() if the connection
+ cannot be switched between cooked/raw modes because it is not a
+ TTY.
+ * correct a case in _nc_remove_string(), used by define_key(), to
+ avoid infinite loop if the given string happens to be a substring
+ of other strings which are assigned to keys.
+ * modify logic of acsc to use the original character if no mapping
+ is defined, rather than a null.
+ * several improvements for handling multi-cell display of wide
+ characters.
+ + modify setcchar() to allow converting control characters to
+ complex characters.
+ + correct handling of multibyte characters in waddch_literal()
+ which force wrapping because they are started too late on the
+ line.
+ + modify setcchar() to allow for wchar_t input strings that
+ have more than one spacing character.
+ * other fixes for wide-character support:
+ + rewrote lib_acs.c to allow PutAttrChar() to decide how to
+ render alternate-characters, i.e., to work with Linux console
+ and UTF-8 locale.
+ + implement a workaround so that line-drawing works with
+ screen's crippled UTF-8 support (tested with 3.9.13). This
+ only works with the wide-character support (--enable-widec);
+ the normal library will simply suppress line-drawing when
+ running in a UTF-8 locale in screen.
+ + corrections to lib_get_wstr.c:
+ o null-terminate buffer passed to setcchar(), which
+ occasionally failed.
+ o map special characters such as erase- and
+ kill-characters into key-codes so those will work as
+ expected even if they are not mentioned in the terminfo.
+ * modify setupterm() to check if the terminfo and terminal-modes
+ have already been read. This ensures that it does not reinvoke
+ def_prog_mode() when an application calls more than one function,
+ such as tgetent() and initscr().
+ * fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL,
+ REQ_DEL_CHAR, REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure
+ the cursor was at the editing position before making
+ modifications.
+ * correct keybound(), which reported definitions in the wrong table,
+ i.e., the list of definitions which are disabled by keyok().
+ * fixes related to safe_sprintf.c:
+ + correct an allocation size in safe_sprintf.c for the "*"
+ format code.
+ + correct safe_sprintf.c to not return a null pointer if the
+ format happens to be an empty string.
+ + make return value from _nc_printf_string() consistent.
+ Before, depending on whether --enable-safe-sprintf was used,
+ it might not be cached for reallocating.
+ * other low-level improvements to the optimization code include:
+ + if the output is a socket or other non-tty device, use 1
+ millisecond for the cost in mvcur; previously it was 9
+ milliseconds because the baudrate was not known.
+ + modify lib_getch.c to avoid recursion via wgetnstr() when the
+ input is not a tty and consequently mode-changes do not work.
+ + fix several places in tack/pad.c which tested and used the
+ parameter- and parameterless strings inconsistently.
+ + change several tputs() calls in scrolling code to use putp(),
+ to enable padding which may be needed for some terminals.
+ + improve mvcur() by checking if it is safe to move when video
+ attributes are set (msgr), and if not, reset/restore
+ attributes within that function rather than doing it
+ separately in the GoTo() function in tty_update.c.
+ + use tputs() rather than putp() in a few cases in tty_update.c
+ since the corresponding delays are proportional to the number
+ of lines affected: repeat_char, clr_eos,
+ change_scroll_region.
+ * correct line/column reference in adjust_window(), needed to make
+ special windows such as curscr track properly when resizing.
+ * fix a potential recursion between napms() and _nc_timed_wait()
+ * rewrote lib_insch.c, combining it with lib_insstr.c so both handle
+ tab and other control characters consistently.
+ * do not try to open gpm mouse driver if standard output is not a
+ tty; the gpm library does not make this check.
+
+ Portability:
+ * configure script:
+ + new options:
+
+ --with-abi-version option.
+ addresses platforms where packagers have diverged
+ from ncurses ABI numbering.
+
+ --with-manpage-format=catonly
+ addresses behavior of BSDI, allow install of
+ man+cat files on NetBSD, whose behavior has
+ diverged by requiring both to be present.
+
+ --with-manpage-aliases
+ extends "--with-manpage-aliases" to provide the
+ option of generating ".so" files rather than
+ symbolic links for manpage aliases.
+
+ --with-rel-version
+ workaround to force libtool on Darwin generate the
+ "same" library names as with the "--with-shared"
+ option. The Darwin ld program does not work well
+ with a zero as the minor-version value.
+
+ --with-trace
+ simplifies defining TRACE to incorporate trace() in
+ libraries.
+
+ + fixes/improvements for cross-compiling:
+ o allow BUILD_CC and related configure script variables to
+ be overridden from the environment.
+ o use AC_CHECK_TOOL to get proper values for AR and LD for
+ cross compiling.
+ o use $cross_compiling variable in configure script rather
+ than comparing $host_alias and $target alias, since
+ "host" is traditionally misused in autoconf to refer to
+ the target platform.
+ o modify run_tic.in to avoid using wrong shared libraries
+ when cross-compiling.
+ + fixes for Mac OS X:
+ o fix a redefinition of $RANLIB in the configure script
+ when libtool is used.
+ o modify MKlib_gen.sh to avoid passing "#" tokens through
+ the C preprocessor. This works around Mac OS X's
+ preprocessor, which insists on adding a blank on each
+ side of the token.
+ + workarounds for broken tools:
+ o add configure check for wchar_t and wint_t types, rather
+ than rely on preprocessor definitions. Also work around
+ for gcc fixinclude bug which creates a shadow copy of
+ curses.h if it sees these symbols apparently typedef'd.
+ o modify configure script to omit -Winline for gcc 3.3,
+ since that feature is broken.
+ o several script fixes to work around the ironically named
+ POSIXLY_CORRECT feature of GNU sed 4.0.
+ o modify configure script to avoid using "head -1", which
+ does not work if POSIXLY_CORRECT (sic) is set.
+ o update configure script to reflect fix for
+ AC_PROG_GCC_TRADITIONAL, which is broken in autoconf
+ 2.5x for Mac OS X 10.2.3.
+ o repair check for missing C++ compiler, which is broken
+ in autoconf 2.5x by hardcoding it to g++.
+ + corrected ifdef's relating to configure check for wchar_t,
+ etc.
+ + remove configure script check to allow -Wconversion for older
+ versions of gcc
+ + modify configure script to accommodate libtool 1.5, as well
+ as add an parameter to the "--with-libtool" option which can
+ specify the pathname of libtool.
+ + change several sed scripts to avoid using "\+" since it is
+ not a BRE (basic regular expression). One instance caused
+ terminfo.5 to be misformatted on FreeBSD.
+ + use '%' as sed substitute delimiter in run_tic script to
+ avoid problems with pathname delimiters such as ':' and '@'.
+ + add -D_XOPEN_SOURCE=500 if needed when configuring with
+ "--enable-widec", to get mbstate_t declaration on HPUX 11.11.
+ * library:
+ + adjust include-options in CF_ETIP_DEFINES to avoid missing
+ ncurses_dll.h, fixing special definitions that may be needed
+ for etip.h.
+ + modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use
+ a ".so" suffix.
+ + improve ifdef's to guard against redefinition of wchar_t and
+ wint_t in curses.h.
+ + remove an #undef for KEY_EVENT from curses.tail used in the
+ experimental NCURSES_WGETCH_EVENTS feature. The #undef
+ confuses Debian dpkg's build script.
+
+ Features of Ncurses
+
+ The ncurses package is fully compatible with SVr4 (System V Release 4)
+ curses:
+ * All 257 of the SVr4 calls have been implemented (and are
+ documented).
+ * Full support for SVr4 curses features including keyboard mapping,
+ color, forms-drawing with ACS characters, and automatic
+ recognition of keypad and function keys.
+ * An emulation of the SVr4 panels library, supporting a stack of
+ windows with backing store, is included.
+ * An emulation of the SVr4 menus library, supporting a uniform but
+ flexible interface for menu programming, is included.
+ * An emulation of the SVr4 form library, supporting data collection
+ through on-screen forms, is included.
+ * Binary terminfo entries generated by the ncurses tic(1)
+ implementation are bit-for-bit-compatible with the entry format
+ SVr4 curses uses.
+ * 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
+ level features, but not all EXTENDED features). Most
+ EXTENDED-level features not directly concerned with wide-character
+ support are implemented, including many function calls not
+ supported under SVr4 curses (but portability of all calls is
+ documented so you can use the SVr4 subset only).
+ * Unlike SVr3 curses, ncurses can write to the rightmost-bottommost
+ corner of the screen if your terminal has an insert-character
+ capability.
+ * Ada95 and C++ bindings.
+ * Support for mouse event reporting with X Window xterm and OS/2
+ console windows.
+ * Extended mouse support via Alessandro Rubini's gpm package.
+ * The function wresize() allows you to resize windows, preserving
+ their data.
+ * The function use_default_colors() allows you to use the terminal's
+ default colors for the default color pair, achieving the effect of
+ transparent colors.
+ * The functions keyok() and define_key() allow you to better control
+ the use of function keys, e.g., disabling the ncurses KEY_MOUSE,
+ or by defining more than one control sequence to map to a given
+ key code.
+ * Support for 16-color terminals, such as aixterm and XFree86 xterm.
+ * Better cursor-movement optimization. The package now features a
+ cursor-local-movement computation more efficient than either BSD's
+ or System V's.
+ * Super hardware scrolling support. The screen-update code
+ incorporates a novel, simple, and cheap algorithm that enables it
+ to make optimal use of hardware scrolling, line-insertion, and
+ line-deletion for screen-line movements. This algorithm is more
+ powerful than the 4.4BSD curses quickch() routine.
+ * Real support for terminals with the magic-cookie glitch. The
+ screen-update code will refrain from drawing a highlight if the
+ magic- cookie unattributed spaces required just before the
+ beginning and after the end would step on a non-space character.
+ It will automatically shift highlight boundaries when doing so
+ would make it possible to draw the highlight without changing the
+ visual appearance of the screen.
+ * It is possible to generate the library with a list of pre-loaded
+ fallback entries linked to it so that it can serve those terminal
+ types even when no terminfo tree or termcap file is accessible
+ (this may be useful for support of screen-oriented programs that
+ must run in single-user mode).
+ * The tic(1)/captoinfo utility provided with ncurses has the ability
+ to translate many termcaps from the XENIX, IBM and AT&T extension
+ sets.
+ * A BSD-like tset(1) utility is provided.
+ * The ncurses library and utilities will automatically read terminfo
+ entries from $HOME/.terminfo if it exists, and compile to that
+ directory if it exists and the user has no write access to the
+ system directory. This feature makes it easier for users to have
+ personal terminfo entries without giving up access to the system
+ terminfo directory.
+ * You may specify a path of directories to search for compiled
+ descriptions with the environment variable TERMINFO_DIRS (this
+ generalizes the feature provided by TERMINFO under stock System
+ V.)
+ * In terminfo source files, use capabilities may refer not just to
+ other entries in the same source file (as in System V) but also to
+ compiled entries in either the system terminfo directory or the
+ user's $HOME/.terminfo directory.
+ * A script (capconvert) is provided to help BSD users transition
+ from termcap to terminfo. It gathers the information in a TERMCAP
+ environment variable and/or a ~/.termcap local entries file and
+ converts it to an equivalent local terminfo tree under
+ $HOME/.terminfo.
+ * Automatic fallback to the /etc/termcap file can be compiled in
+ when it is not possible to build a terminfo tree. This feature is
+ neither fast nor cheap, you don't want to use it unless you have
+ to, but it's there.
+ * The table-of-entries utility toe makes it easy for users to see
+ exactly what terminal types are available on the system.
+ * The library 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.
+ * 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]http://invisible-island.net/cdk/
+ [4]http://www.vexus.ca/products/CDK/
+
+ ded
+ directory-editor
+ [5]http://invisible-island.net/ded/
+
+ dialog
+ the underlying application used in Slackware's setup, and the
+ basis for similar applications on GNU/Linux.
+ [6]http://invisible-island.net/dialog/
+
+ lynx
+ the character-screen WWW browser
+ [7]http://lynx.isc.org/release/
+
+ Midnight Commander
+ file manager
+ [8]http://www.ibiblio.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/
+
+ pinfo
+ Lynx-like info browser.
+ [12]http://dione.ids.pl/~pborys/software/pinfo/
+
+ tin
+ newsreader, supporting color, MIME [13]http://www.tin.org/
+
+ vh-1.6
+ Volks-Hypertext browser for the Jargon File
+ [14]http://www.debian.org/Packages/unstable/text/vh.html
+
+ as well as some that use ncurses for the terminfo support alone:
+
+ minicom
+ terminal emulator
+ [15]http://www.netsonic.fi/~walker/minicom.html
+
+ vile
+ vi-like-emacs
+ [16]http://invisible-island.net/vile/
+
+ The ncurses distribution includes a selection of test programs
+ (including a few games).
+
+Who's Who and What's What
+
+ Zeyd Ben-Halim started it from a previous package pcurses, written by
+ Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer
+ wrote most of the form and menu libraries. Ongoing work is being done
+ by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the
+ Free Software Foundation, which holds the copyright on ncurses.
+ Contact the current maintainers at [18]bug-ncurses@gnu.org.
+
+ To join the ncurses mailing list, please write email to
+ bug-ncurses-request@gnu.org containing the line:
+ subscribe <name>@<host.domain>
+
+ 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 [19]ftp://invisible-island.net/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 provides a newer version of the terminfo-format
+ terminal description file maintained by [20]Eric Raymond . Unlike the
+ older version, the termcap and terminfo data are provided in the same
+ file.
+
+ You can find lots of information on terminal-related topics not
+ covered in the terminfo file at [21]Richard Shuford's archive .
+
+References
+
+ 1. ftp://ftp.gnu.org/gnu/ncurses/
+ 2. ftp://invisible-island.net/ncurses/
+ 3. http://invisible-island.net/cdk/
+ 4. http://www.vexus.ca/products/CDK/
+ 5. http://invisible-island.net/ded/
+ 6. http://invisible-island.net/dialog/
+ 7. http://lynx.isc.org/release/
+ 8. http://www.ibiblio.org/mc/
+ 9. http://www.mutt.org/
+ 10. http://www.ncftp.com/
+ 11. http://www.bostic.com/vi/
+ 12. http://dione.ids.pl/~pborys/software/pinfo/
+ 13. http://www.tin.org/
+ 14. http://www.debian.org/Packages/unstable/text/vh.html
+ 15. http://www.netsonic.fi/~walker/minicom.html
+ 16. http://invisible-island.net/vile/
+ 17. mailto:dickey@invisible-island.net
+ 18. mailto:bug-ncurses@gnu.org
+ 19. ftp://invisible-island.net/ncurses/
+ 20. http://www.catb.org/~esr/terminfo/
+ 21. http://www.cs.utk.edu/~shuford/terminal_index.html
diff --git a/Build/source/libs/ncurses/INSTALL b/Build/source/libs/ncurses/INSTALL
new file mode 100644
index 00000000000..9a3a39210b3
--- /dev/null
+++ b/Build/source/libs/ncurses/INSTALL
@@ -0,0 +1,1245 @@
+-- $Id: INSTALL,v 1.79 2004/10/09 16:56:33 tom Exp $
+---------------------------------------------------------------------
+ How to install Ncurses/Terminfo on your system
+---------------------------------------------------------------------
+
+ ************************************************************
+ * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
+ ************************************************************
+
+You should be reading the file INSTALL in a directory called ncurses-d.d, where
+d.d is the current version number. There should be several subdirectories,
+including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
+and `test'. See the README file for a roadmap to the package.
+
+If you are a Linux or FreeBSD or NetBSD distribution integrator or packager,
+please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR
+below.
+
+If you are converting from BSD curses and do not have root access, be sure
+to read the BSD CONVERSION NOTES section below.
+
+If you are trying to build applications using gpm with ncurses,
+read the USING NCURSES WITH GPM section below.
+
+If you are running over the Andrew File System see the note below on
+USING NCURSES WITH AFS.
+
+If you are cross-compiling, see the note below on BUILDING NCURSES WITH A
+CROSS-COMPILER.
+
+If you want to build the Ada95 binding, go to the Ada95 directory and
+follow the instructions there. The Ada95 binding is not covered below.
+
+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 to build and install ncurses under UNIX:
+
+ * ANSI C compiler (gcc, for instance)
+ * sh (bash will do)
+ * awk (mawk or gawk will do)
+ * sed
+ * BSD or System V style install (a script is enclosed)
+
+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
+ with it.
+
+ The --prefix option to configure changes the root directory for installing
+ ncurses. The default is normally in subdirectories of /usr/local, except
+ for systems where ncurses is normally installed as a system library, e.g.,
+ Linux, the various BSD systems and Cygwin. Use --prefix=/usr to replace
+ your default curses distribution.
+
+ The package gets installed beneath the --prefix directory as follows:
+
+ In $(prefix)/bin: tic, infocmp, captoinfo, tset,
+ reset, clear, tput, toe
+ In $(prefix)/lib: libncurses*.* libcurses.a
+ In $(prefix)/share/terminfo: compiled terminal descriptions
+ In $(prefix)/include: C header files
+ Under $(prefix)/man: the manual pages
+
+ Note that the configure script attempts to locate previous installation of
+ ncurses, and will set the default prefix according to where it finds the
+ ncurses headers.
+
+ Do not use commands such as
+
+ make install prefix=XXX
+
+ to change the prefix after configuration, since the prefix value is used
+ for some absolute pathnames such as TERMINFO. Instead do this
+
+ make install DESTDIR=XXX
+
+ See also the discussion of --with-install-prefix.
+
+2. Type `./configure' in the top-level directory of the distribution to
+ configure ncurses for your operating system and create the Makefiles.
+ Besides --prefix, various configuration options are available to customize
+ the installation; use `./configure --help' to list the available options.
+
+ If your operating system is not supported, read the PORTABILITY section in
+ the file ncurses/README for information on how to create a configuration
+ file for your system.
+
+ The `configure' script generates makefile rules for one or more object
+ models and their associated libraries:
+
+ libncurses.a (normal)
+
+ libcurses.a (normal, a link to libncurses.a)
+ This gets left out if you configure with --disable-overwrite.
+
+ libncurses.so (shared)
+
+ libncurses_g.a (debug)
+
+ libncurses_p.a (profile)
+
+ libncurses.la (libtool)
+
+ If you configure using the --enable-widec option, a "w" is appended to the
+ library names (e.g., libncursesw.a), and the resulting libraries support
+ wide-characters, e.g., via a UTF-8 locale. The corresponding header files
+ are compatible with the non-wide-character configuration; wide-character
+ features are provided by ifdef's in the header files. The wide-character
+ library interfaces are not binary-compatible with the non-wide-character
+ version. Building and running the wide-character code relies on a fairly
+ recent implementation of libiconv. We have built this configuration on
+ Linux using libiconv, sometimes requiring libutf8.
+
+ 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
+
+ Typing
+
+ ./configure --with-shared
+
+ makes the shared libraries the default, resulting in
+
+ ./configure --with-shared --with-normal --with-debug --enable-overwrite
+
+ If you want only shared libraries, type
+
+ ./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
+ and SunOS with gcc, but more work needs to be done to make shared libraries
+ work on other systems.
+
+ If you have libtool installed, you can type
+
+ ./configure --with-libtool
+
+ to generate the appropriate static and/or shared libraries for your
+ platform using libtool.
+
+ You can make curses and terminfo fall back to an existing file of termcap
+ definitions by configuring with --enable-termcap. If you do this, the
+ library will search /etc/termcap before the terminfo database, and will
+ also interpret the contents of the TERM environment variable. See the
+ section BSD CONVERSION NOTES below.
+
+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 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
+ databases are SVr4-compatible, but most seem to be. Exceptions include
+ DEC's Digital Unix (formerly known as OSF/1).
+
+ If you run the test programs WITHOUT installing terminfo, ncurses may
+ read the termcap file and cache that in $HOME/.terminfo, which will
+ thereafter be used instead of the terminfo database. See the comments
+ on "--enable-getcap-cache", to see why this is a Bad Thing.
+
+ It is possible to configure ncurses to use other terminfo database formats.
+ A few are provided as examples in the include-directory (see --with-caps).
+
+ The ncurses program is designed specifically to test the ncurses library.
+ You can use it to verify that the screen highlights work correctly, that
+ 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 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 manual pages.
+
+ ############################################################################
+ # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing #
+ # terminfo database. If you have any custom or unusual entries SAVE them #
+ # before you install ncurses. I have a file called terminfo.custom for #
+ # this purpose. Don't forget to run tic on the file once you're done. #
+ ############################################################################
+
+ 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 manual page
+ to be sure. You may also install the manual pages after preprocessing
+ with tbl(1) by specifying the configure option --with-manpage-tbl.
+
+ If the system already has a curses library that you need to keep using
+ you'll need to distinguish between it and ncurses. See the discussion of
+ --disable-overwrite. If ncurses is installed outside the standard
+ directories (/usr/include and /usr/lib) then all your users will need to
+ use the -I option to compile programs and -L to link them.
+
+ If you have another curses installed in your system and you accidentally
+ compile using its curses.h you'll end up with a large number of
+ undefined symbols at link time.
+
+ IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
+ and run the `capconvert' script. This script will deduce various things
+ about your environment and use them to build you a private terminfo tree,
+ so you can use ncurses applications.
+
+ If more than one user at your site does this, the space for the duplicate
+ trees is wasted. Try to get your site administrators to install a system-
+ wide terminfo tree instead.
+
+ See the BSD CONVERSION NOTES section below for a few more details.
+
+6. The c++ directory has C++ classes that are built on top of ncurses and
+ panels. You must have c++ (and its libraries) installed before you can
+ compile and run the demo.
+
+ Use --without-cxx-binding to tell configure to not build the C++ bindings
+ and demo.
+
+ If you do not have C++, you must use the --without-cxx option to tell
+ 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++.
+
+
+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-assumed-color
+ With ncurses 5.1, we introduced a new function, assume_default_colors()
+ which allows applications to specify what the default foreground and
+ background color are assumed to be. Most color applications use
+ full-screen color; but a few do not color the background. While the
+ assumed values can be overridden by invoking assume_default_colors(),
+ you may find it useful to set the assumed values to the pre-5.1
+ convention, using this configure option.
+
+ --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. Some, but not all of the
+ programs are useful in this configuration, e.g., reset and tput versus
+ infocmp and tic.
+
+ --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-hashmap
+ Compile without hashmap scrolling-optimization code. This algorithm is
+ the default.
+
+ --disable-home-terminfo
+ The $HOME/.terminfo directory is normally added to ncurses' search
+ list for reading/writing terminfo entries, since that directory is
+ more likely writable than the system terminfo database. Use this
+ option to disable the feature altogether.
+
+ --disable-leaks
+ For testing, compile-in code that frees memory that normally would not
+ be freed, to simplify analysis of memory-leaks.
+
+ --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-root-environ
+ Compile with environment restriction, so certain environment variables
+ are not available when running as root, or via a setuid/setgid
+ application. These are (for example $TERMINFO) those that allow the
+ search path for the terminfo or termcap entry to be customized.
+
+ --disable-scroll-hints
+ Compile without scroll-hints code. This option is ignored when
+ hashmap scrolling is configured, which is the default.
+
+ --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-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, and with some
+ restrictions when linking the corresponding programs. 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 wide-character code. This makes a different version of
+ the libraries (e.g., libncursesw.so), which stores characters as
+ wide-characters,
+
+ 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
+
+ NOTE: the Ada95 binding may be built against either version of the the
+ ncurses library, but you must decide which: the binding installs the
+ same set of files for either version. Currently (2002/6/22) it does
+ not use the extended features from the wide-character code, so it is
+ probably better to not install the binding for that configuration.
+
+ --enable-xmc-glitch
+ Compile-in support experimental xmc (magic cookie) code.
+
+ --with-abi-version=NUM
+ Override the ABI version, which is used in shared library filenames.
+ Normally this is the same as the release version; some ports have
+ special requirements for compatibility.
+
+ --with-ada-compiler=CMD
+ Specify the Ada95 compiler command (default "gnatmake")
+
+ --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-bool=TYPE
+ If --without-cxx is specified, override the type used for the "bool"
+ declared in curses.h (normally the type is automatically chosen to
+ correspond with that in <stdbool.h>, or defaults to platform-specific
+ sizes).
+
+ --with-build-cc=XXX
+ If cross-compiling, specify a host C compiler, which is needed to
+ compile a few utilities which generate source modules for ncurses.
+ If you do not give this option, the configure script checks if the
+ $BUILD_CC variable is set, and otherwise defaults to gcc or cc.
+
+ --with-build-cflags=XXX
+ If cross-compiling, specify the host C compiler-flags. You might need
+ to do this if the target compiler has unusual flags which confuse the
+ host compiler.
+
+ --with-build-cppflags=XXX
+ If cross-compiling, specify the host C preprocessor-flags. You might
+ need to do this if the target compiler has unusual flags which confuse
+ the host compiler.
+
+ --with-build-ldflags=XXX
+ If cross-compiling, specify the host linker-flags. You might need to
+ do this if the target linker has unusual flags which confuse the host
+ compiler.
+
+ --with-build-libs=XXX
+ If cross-compiling, the host libraries. You might need to do this if
+ the target environment requires unusual libraries.
+
+ --with-caps=XXX
+ Specify an alternate terminfo capabilities file, which makes the
+ configure script look for "include/Caps.XXX". A few systems, e.g.,
+ AIX 4.x use the same overall file-format as ncurses for terminfo
+ data, but use different alignments within the tables to support
+ legacy applications. For those systems, you can configure ncurses
+ to use a terminfo database which is compatible with the native
+ applications.
+
+ --with-database=XXX
+ Specify the terminfo source file to install. Usually you will wish
+ to install ncurses' default (misc/terminfo.src). Certain systems
+ have special requirements, e.g, OS/2 EMX has a customized terminfo
+ source file.
+
+ --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-default-terminfo-dir=XXX
+ Specify the default terminfo database directory. This is normally
+ DATADIR/terminfo, e.g., /usr/share/terminfo.
+
+ --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. The
+ makefile variable DESTDIR is set by this option. It is also possible
+ to use
+ make install DESTDIR=XXX
+ since the makefiles pass that variable to subordinate makes.
+
+ NOTE: a few systems build shared libraries with fixed pathnames; this
+ option probably will not work for those configurations.
+
+ --with-libtool[=XXX]
+ Generate libraries with libtool. If this option is selected, then it
+ overrides all other library model specifications. Note that libtool
+ must already be installed, uses makefile rules dependent on GNU make,
+ and does not promise to follow the version numbering convention of
+ other shared libraries on your system. However, if the --with-shared
+ option does not succeed, you may get better results with this option.
+
+ If a parameter value is given, it must be the full pathname of the
+ particular version of libtool, e.g.,
+ /usr/bin/libtool-1.2.3
+
+ --with-manpage-aliases
+ Tell the configure script you wish to create entries in the
+ man-directory for aliases to manpages which list them, e.g., the
+ functions in the panel manpage. This is the default. You can disable
+ it if your man program does this. You can also disable
+ --with-manpage-symlinks to install files containing a ".so" command
+ rather than symbolic links.
+
+ --with-manpage-format=XXX
+ Tell the configure script how you would like to install man-pages. The
+ 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-manpage-tbl
+ Tell the configure script that you with to preprocess the manpages
+ by running them through tbl to generate tables understandable by
+ nroff.
+
+ --with-ospeed=TYPE
+ Override type of ospeed variable, which is part of the termcap
+ compatibility interface. In termcap, this is a 'short', which works
+ for a wide range of baudrates because ospeed is not the actual speed
+ but the encoded value, e.g., B9600 would be a small number such as 13.
+ However the encoding scheme originally allowed for values "only" up to
+ 38400bd. A newer set of definitions past 38400bd is not encoded as
+ compactly, and is not guaranteed to fit into a short (see the function
+ cfgetospeed(), which returns a speed_t for this reason). In practice,
+ applications that required knowledge of the ospeed variable, i.e.,
+ those using termcap, do not use the higher speeds. Your application
+ (or system, in general) may or may not.
+
+ --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-rel-version=NUM
+ Override the release version, which may be used in shared library
+ filenames. This consists of a major and minor version number separated
+ by ".". Normally the major version number is the same as the ABI
+ version; some ports have special requirements for compatibility.
+
+ --with-shared
+ Generate shared-libraries. The names given depend on the system for
+ which you are building, typically using a ".so" suffix, along with
+ 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-sysmouse
+ use FreeBSD sysmouse interface provide mouse support on the console.
+
+ --with-system-type=XXX
+ For testing, override the derived host system-type which is used to
+ decide things such as the linker commands used to build shared
+ 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[=XXX]
+ 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.
+
+ If an option value is given, that overrides the name of the terminfo
+ library. For instance, if the wide-character version is built, the
+ terminfo library would be named libtinfow. But the libtinfow interface
+ is upward compatible from libtinfo, so it would be possible to overlay
+ libtinfo.so with a "wide" version of libtinfow.so by renaming it with
+ this option.
+
+ --with-termpath=XXX
+ Specify a search-list of termcap files which will be compiled into the
+ ncurses library (default: /etc/termcap:/usr/share/misc/termcap)
+
+ --with-trace
+ Configure the trace() function as part of the all models of the ncurses
+ library. Normally it is part of the debug (libncurses_g) library only.
+
+ --without-ada
+ Suppress the configure script's check for Ada95, do not build the
+ Ada95 binding and related demo.
+
+ --without-curses-h
+ Don't install the ncurses header with the name "curses.h". Rather,
+ install as "ncurses.h" and modify the installed headers and manpages
+ accordingly.
+
+ --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".
+
+ --without-xterm-new
+ Tell the configure script to use "xterm-old" for the entry used in
+ the terminfo database. This will work with variations such as
+ X11R5 and X11R6 xterm.
+
+
+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.4 (February 8, 2004)
+ Interface changes:
+
+ + add the remaining functions for X/Open curses wide-character support.
+ These are only available if the library is configured using the
+ --enable-widec option.
+ pecho_wchar()
+ slk_wset()
+
+ + write getyx() and related 2-return macros in terms of getcury(),
+ getcurx(), etc.
+
+ + simplify ifdef for bool declaration in curses.h
+
+ + modify ifdef's in curses.h that disabled use of __attribute__() for
+ g++, since recent versions implement the cases which ncurses uses.
+
+ + change some interfaces to use const:
+ define_key()
+ mvprintw()
+ mvwprintw()
+ printw()
+ vw_printw()
+ winsnstr()
+ wprintw()
+
+ Added extensions:
+ key_defined()
+ Added internal functions:
+ _nc_get_locale()
+ _nc_insert_ch()
+ _nc_is_charable() wide
+ _nc_locale_breaks_acs()
+ _nc_pathlast()
+ _nc_to_char() wide
+ _nc_to_widechar() wide
+ _nc_tparm_analyze()
+ _nc_trace_bufcat() debug
+ _nc_unicode_locale()
+ Removed internal functions:
+ _nc_outstr()
+ _nc_sigaction()
+ Modified internal functions:
+ _nc_remove_string()
+ _nc_retrace_chtype()
+
+ 5.3 (October 12, 2002)
+ Interface changes:
+
+ + change type for bool used in headers to NCURSES_BOOL, which usually
+ is the same as the compiler's definition for 'bool'.
+
+ + add all but two functions for X/Open curses wide-character support.
+ These are only available if the library is configured using the
+ --enable-widec option. Missing functions are
+ pecho_wchar()
+ slk_wset()
+
+ + add environment variable $NCURSES_ASSUMED_COLORS to modify the
+ assume_default_colors() extension.
+
+ Added extensions:
+ is_term_resized()
+ resize_term()
+ Added internal functions:
+ _nc_altcharset_name() debug
+ _nc_reset_colors()
+ _nc_retrace_bool() debug
+ _nc_retrace_unsigned() debug
+ _nc_rootname()
+ _nc_trace_ttymode() debug
+ _nc_varargs() debug
+ _nc_visbufn() debug
+ _nc_wgetch()
+ Removed internal functions:
+ _nc_background()
+ Modified internal functions:
+ _nc_freeall() debug
+
+ 5.2 (October 21, 2000)
+ Interface changes:
+
+ + revert termcap ospeed variable to 'short' (see discussion of the
+ --with-ospeed configure option).
+
+ 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:
+------------------------------
+
+ Configuration and Installation:
+
+ On platforms where ncurses is assumed to be installed in /usr/lib,
+ the configure script uses "/usr" as a default:
+
+ Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
+
+ For other platforms, the default is "/usr/local". See the discussion
+ of the "--disable-overwrite" option.
+
+ The location of the terminfo is set indirectly by the "--datadir"
+ configure option, e.g., /usr/share/terminfo, given a datadir of
+ /usr/share. You may want to override this if you are installing
+ ncurses libraries in nonstandard locations, but wish to share the
+ terminfo database.
+
+ Normally the ncurses library is configured in a pure-terminfo mode;
+ that is, with the --disable-termcap option. This makes the ncurses
+ library smaller and faster. The ncurses library includes a termcap
+ emulation that queries the terminfo database, so even applications that
+ use raw termcap to query terminal characteristics will win (providing
+ you recompile and relink them!).
+
+ If you must configure with termcap fallback enabled, you may also wish
+ to use the --enable-getcap option. This speeds up termcap-based
+ startups, at the expense of not allowing personal termcap entries to
+ reference the terminfo tree. See comments in
+ ncurses/tinfo/read_termcap.c for further details.
+
+ Note that if you have $TERMCAP set, ncurses will use that value
+ to locate termcap data. In particular, running from xterm will
+ set $TERMCAP to the contents of the xterm's termcap entry.
+ If ncurses sees that, it will not examine /etc/termcap.
+
+ Keyboard Mapping:
+
+ The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48
+ reverse-tabulation sequence) rather than ^I. Here are the loadkeys -d
+ mappings that will set this up:
+
+ keycode 15 = Tab Tab
+ alt keycode 15 = Meta_Tab
+ shift keycode 15 = F26
+ string F26 ="\033[Z"
+
+ Naming the Console Terminal
+
+ In various systems there has been a practice of designating the system
+ console driver type as `console'. Please do not do this! It
+ complicates peoples' lives, because it can mean that several different
+ terminfo entries from different operating systems all logically want to
+ be called `console'.
+
+ Please pick a name unique to your console driver and set that up
+ in the /etc/inittab table or local equivalent. Send the entry to the
+ terminfo maintainer (listed in the misc/terminfo file) to be included
+ in the terminfo file, if it's not already there. See the
+ term(7) manual page included with this distribution for more on
+ conventions for choosing type names.
+
+ Here are some recommended primary console names:
+
+ linux -- Linux console driver
+ freebsd -- FreeBSD
+ netbsd -- NetBSD
+ bsdos -- BSD/OS
+
+ If you are responsible for integrating ncurses for one of these
+ distribution, please either use the recommended name or get back
+ 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:
+---------------------
+
+ The terminfo database file included with this distribution assumes you
+ are running a modern xterm based on XFree86 (i.e., xterm-new). The
+ earlier X11R6 entry (xterm-r6) and X11R5 entry (xterm-r5) is provided
+ as well. See the --without-xterm-new configure script option if you
+ are unable to update your system.
+
+
+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
+ pre-fetched fallback entries.
+
+ These entries are checked by setupterm() only when the conventional
+ fetches from the terminfo tree and the termcap fallback (if configured)
+ have been tried and failed. Thus, the presence of a fallback will not
+ shadow modifications to the on-disk entry for the same type, when that
+ entry is accessible.
+
+ By default, there are no entries on the fallback list. After you
+ have built the ncurses suite for the first time, you can change
+ the list (the process needs infocmp(1)). To do so, use the script
+ MKfallback.sh. A configure script option --with-fallbacks does this
+ (it accepts a comma-separated list of the names you wish, and does
+ not require a rebuild).
+
+ If you wanted (say) to have linux, vt100, and xterm fallbacks, you
+ would use the commands
+
+ cd ncurses;
+ MKfallback.sh linux vt100 xterm >fallback.c
+
+ Then just rebuild and reinstall the library as you would normally.
+ You can restore the default empty fallback list with
+
+ MKfallback.sh >fallback.c
+
+ The overhead for an empty fallback list is one trivial stub function.
+ Any non-empty fallback list is const-ed and therefore lives in sharable
+ text space. You can look at the comment trailing each initializer in
+ the generated ncurses/fallback.c file to see the core cost of the
+ 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
+ capability as a request for that much trailing padding in milliseconds.
+ There are old BSD programs that do things like tputs("50").
+
+ (If you are distributing ncurses as a support-library component of
+ 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
+ --enable-termcap.
+
+------------------------------- CUT HERE --------------------------------
+
+If you are installing this application privately (either because you
+have no root access or want to experiment with it before doing a root
+installation), there are a couple of details you need to be aware of.
+They have to do with the ncurses library, which uses terminfo rather
+than termcap for describing terminal characteristics.
+
+Though the ncurses library is terminfo-based, it will interpret your
+TERMCAP variable (if present), any local termcap files you reference
+through it, and the system termcap file. However, in order to avoid
+slowing down your application startup, it will only do this once per
+terminal type!
+
+The first time you load a given terminal type from your termcap
+database, the library initialization code will automatically write it
+in terminfo format to a subdirectory under $HOME/.terminfo. After
+that, the initialization code will find it there and do a (much
+faster) terminfo fetch.
+
+Usually, all this means is that your home directory will silently grow
+an invisible .terminfo subdirectory which will get filled in with
+terminfo descriptions of terminal types as you invoke them. If anyone
+ever installs a global terminfo tree on your system, this will quietly
+stop happening and your $HOME/.terminfo will become redundant.
+
+The objective of all this logic is to make converting from BSD termcap
+as painless as possible without slowing down your application (termcap
+compilation is expensive).
+
+If you don't have a TERMCAP variable or custom personal termcap file,
+you can skip the rest of this dissertation.
+
+If you *do* have a TERMCAP variable and/or a custom personal termcap file
+that defines a terminal type, that definition will stop being visible
+to this application after the first time you run it, because it will
+instead see the terminfo entry that it wrote to $HOME/terminfo the
+first time around.
+
+Subsequently, editing the TERMCAP variable or personal TERMCAP file
+will have no effect unless you explicitly remove the terminfo entry
+under $HOME/terminfo. If you do that, the entry will be recompiled
+from your termcap resources the next time it is invoked.
+
+To avoid these complications, use infocmp(1) and tic(1) to edit the
+terminfo directory directly.
+
+------------------------------- CUT HERE --------------------------------
+
+USING NCURSES WITH AFS:
+ AFS treats each directory as a separate logical filesystem, you
+ can't hard-link across them. The --enable-symlinks option copes
+ with this by making tic use symbolic links.
+
+USING NCURSES WITH GPM:
+ Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
+ 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 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.
+ See the FAQ:
+
+ http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
+
+BUILDING NCURSES WITH A CROSS-COMPILER
+ Ncurses can be built with a cross-compiler. Some parts must be built
+ with the host's compiler since they are used for building programs
+ (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
+ that are compiled into the ncurses library. You should set the
+ BUILD_CC environment variable to your host's compiler, and run the
+ configure script configuring for the cross-compiler.
+
+ Note that all of the generated source-files which are part of ncurses
+ will be made if you use
+
+ make sources
+
+ This would be useful in porting to an environment which has little
+ support for the tools used to generate the sources, e.g., sed, awk and
+ Bourne-shell.
+
+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:
+ subscribe ncurses <your-email-address-here>
+
+ The Hacker's Guide in the doc directory includes some guidelines
+ on how to report bugs in ways that will get them fixed most quickly.
diff --git a/Build/source/libs/ncurses/MANIFEST b/Build/source/libs/ncurses/MANIFEST
new file mode 100644
index 00000000000..1d89d287bbe
--- /dev/null
+++ b/Build/source/libs/ncurses/MANIFEST
@@ -0,0 +1,997 @@
+./ANNOUNCE
+./Ada95/Makefile.in
+./Ada95/README
+./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
+./Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4
+./Ada95/gen/terminal_interface-curses-forms.ads.m4
+./Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4
+./Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4
+./Ada95/gen/terminal_interface-curses-menus.ads.m4
+./Ada95/gen/terminal_interface-curses-mouse.ads.m4
+./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
+./Ada95/gen/terminal_interface-curses-panels.ads.m4
+./Ada95/gen/terminal_interface-curses-trace.ads.m4
+./Ada95/gen/terminal_interface-curses.ads.m4
+./Ada95/samples/Makefile.in
+./Ada95/samples/README
+./Ada95/samples/explain.txt
+./Ada95/samples/ncurses.adb
+./Ada95/samples/ncurses2-acs_and_scroll.adb
+./Ada95/samples/ncurses2-acs_and_scroll.ads
+./Ada95/samples/ncurses2-acs_display.adb
+./Ada95/samples/ncurses2-acs_display.ads
+./Ada95/samples/ncurses2-attr_test.adb
+./Ada95/samples/ncurses2-attr_test.ads
+./Ada95/samples/ncurses2-color_edit.adb
+./Ada95/samples/ncurses2-color_edit.ads
+./Ada95/samples/ncurses2-color_test.adb
+./Ada95/samples/ncurses2-color_test.ads
+./Ada95/samples/ncurses2-demo_forms.adb
+./Ada95/samples/ncurses2-demo_forms.ads
+./Ada95/samples/ncurses2-demo_pad.adb
+./Ada95/samples/ncurses2-demo_pad.ads
+./Ada95/samples/ncurses2-demo_panels.adb
+./Ada95/samples/ncurses2-demo_panels.ads
+./Ada95/samples/ncurses2-flushinp_test.adb
+./Ada95/samples/ncurses2-flushinp_test.ads
+./Ada95/samples/ncurses2-genericputs.adb
+./Ada95/samples/ncurses2-genericputs.ads
+./Ada95/samples/ncurses2-getch.ads
+./Ada95/samples/ncurses2-getch_test.adb
+./Ada95/samples/ncurses2-getch_test.ads
+./Ada95/samples/ncurses2-getopt.adb
+./Ada95/samples/ncurses2-getopt.ads
+./Ada95/samples/ncurses2-m.adb
+./Ada95/samples/ncurses2-m.ads
+./Ada95/samples/ncurses2-menu_test.adb
+./Ada95/samples/ncurses2-menu_test.ads
+./Ada95/samples/ncurses2-overlap_test.adb
+./Ada95/samples/ncurses2-overlap_test.ads
+./Ada95/samples/ncurses2-slk_test.adb
+./Ada95/samples/ncurses2-slk_test.ads
+./Ada95/samples/ncurses2-test_sgr_attributes.adb
+./Ada95/samples/ncurses2-test_sgr_attributes.ads
+./Ada95/samples/ncurses2-trace_set.adb
+./Ada95/samples/ncurses2-trace_set.ads
+./Ada95/samples/ncurses2-util.adb
+./Ada95/samples/ncurses2-util.ads
+./Ada95/samples/ncurses2.ads
+./Ada95/samples/rain.adb
+./Ada95/samples/rain.ads
+./Ada95/samples/sample-curses_demo-attributes.adb
+./Ada95/samples/sample-curses_demo-attributes.ads
+./Ada95/samples/sample-curses_demo-mouse.adb
+./Ada95/samples/sample-curses_demo-mouse.ads
+./Ada95/samples/sample-curses_demo.adb
+./Ada95/samples/sample-curses_demo.ads
+./Ada95/samples/sample-explanation.adb
+./Ada95/samples/sample-explanation.ads
+./Ada95/samples/sample-form_demo-aux.adb
+./Ada95/samples/sample-form_demo-aux.ads
+./Ada95/samples/sample-form_demo-handler.adb
+./Ada95/samples/sample-form_demo-handler.ads
+./Ada95/samples/sample-form_demo.adb
+./Ada95/samples/sample-form_demo.ads
+./Ada95/samples/sample-function_key_setting.adb
+./Ada95/samples/sample-function_key_setting.ads
+./Ada95/samples/sample-header_handler.adb
+./Ada95/samples/sample-header_handler.ads
+./Ada95/samples/sample-helpers.adb
+./Ada95/samples/sample-helpers.ads
+./Ada95/samples/sample-keyboard_handler.adb
+./Ada95/samples/sample-keyboard_handler.ads
+./Ada95/samples/sample-manifest.ads
+./Ada95/samples/sample-menu_demo-aux.adb
+./Ada95/samples/sample-menu_demo-aux.ads
+./Ada95/samples/sample-menu_demo-handler.adb
+./Ada95/samples/sample-menu_demo-handler.ads
+./Ada95/samples/sample-menu_demo.adb
+./Ada95/samples/sample-menu_demo.ads
+./Ada95/samples/sample-my_field_type.adb
+./Ada95/samples/sample-my_field_type.ads
+./Ada95/samples/sample-text_io_demo.adb
+./Ada95/samples/sample-text_io_demo.ads
+./Ada95/samples/sample.adb
+./Ada95/samples/sample.ads
+./Ada95/samples/status.adb
+./Ada95/samples/status.ads
+./Ada95/samples/tour.adb
+./Ada95/samples/tour.ads
+./Ada95/src/Makefile.in
+./Ada95/src/terminal_interface-curses-aux.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-enumeration.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-intfield.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-numeric.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-regexp.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads
+./Ada95/src/terminal_interface-curses-forms-field_types-user.adb
+./Ada95/src/terminal_interface-curses-forms-field_types-user.ads
+./Ada95/src/terminal_interface-curses-forms-field_types.adb
+./Ada95/src/terminal_interface-curses-forms-field_user_data.adb
+./Ada95/src/terminal_interface-curses-forms-form_user_data.adb
+./Ada95/src/terminal_interface-curses-forms.adb
+./Ada95/src/terminal_interface-curses-menus-item_user_data.adb
+./Ada95/src/terminal_interface-curses-menus-menu_user_data.adb
+./Ada95/src/terminal_interface-curses-menus.adb
+./Ada95/src/terminal_interface-curses-mouse.adb
+./Ada95/src/terminal_interface-curses-panels-user_data.adb
+./Ada95/src/terminal_interface-curses-panels.adb
+./Ada95/src/terminal_interface-curses-putwin.adb
+./Ada95/src/terminal_interface-curses-putwin.ads
+./Ada95/src/terminal_interface-curses-termcap.adb
+./Ada95/src/terminal_interface-curses-termcap.ads
+./Ada95/src/terminal_interface-curses-terminfo.adb
+./Ada95/src/terminal_interface-curses-terminfo.ads
+./Ada95/src/terminal_interface-curses-text_io-aux.adb
+./Ada95/src/terminal_interface-curses-text_io-aux.ads
+./Ada95/src/terminal_interface-curses-text_io-complex_io.adb
+./Ada95/src/terminal_interface-curses-text_io-complex_io.ads
+./Ada95/src/terminal_interface-curses-text_io-decimal_io.adb
+./Ada95/src/terminal_interface-curses-text_io-decimal_io.ads
+./Ada95/src/terminal_interface-curses-text_io-enumeration_io.adb
+./Ada95/src/terminal_interface-curses-text_io-enumeration_io.ads
+./Ada95/src/terminal_interface-curses-text_io-fixed_io.adb
+./Ada95/src/terminal_interface-curses-text_io-fixed_io.ads
+./Ada95/src/terminal_interface-curses-text_io-float_io.adb
+./Ada95/src/terminal_interface-curses-text_io-float_io.ads
+./Ada95/src/terminal_interface-curses-text_io-integer_io.adb
+./Ada95/src/terminal_interface-curses-text_io-integer_io.ads
+./Ada95/src/terminal_interface-curses-text_io-modular_io.adb
+./Ada95/src/terminal_interface-curses-text_io-modular_io.ads
+./Ada95/src/terminal_interface-curses-text_io.adb
+./Ada95/src/terminal_interface-curses-text_io.ads
+./Ada95/src/terminal_interface-curses-trace.adb_p
+./Ada95/src/terminal_interface-curses.adb
+./Ada95/src/terminal_interface.ads
+./INSTALL
+./MANIFEST
+./Makefile.in
+./Makefile.os2
+./NEWS
+./README
+./README.emx
+./TO-DO
+./aclocal.m4
+./announce.html.in
+./c++/Makefile.in
+./c++/NEWS
+./c++/PROBLEMS
+./c++/README-first
+./c++/cursesapp.cc
+./c++/cursesapp.h
+./c++/cursesf.cc
+./c++/cursesf.h
+./c++/cursesm.cc
+./c++/cursesm.h
+./c++/cursesmain.cc
+./c++/cursesp.cc
+./c++/cursesp.h
+./c++/cursespad.cc
+./c++/cursesw.cc
+./c++/cursesw.h
+./c++/cursslk.cc
+./c++/cursslk.h
+./c++/demo.cc
+./c++/edit_cfg.sh
+./c++/etip.h.in
+./c++/headers
+./c++/internal.h
+./c++/modules
+./config.guess
+./config.sub
+./configure
+./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-putwin__adb.htm
+./doc/html/ada/terminal_interface-curses-putwin__ads.htm
+./doc/html/ada/terminal_interface-curses-termcap__adb.htm
+./doc/html/ada/terminal_interface-curses-termcap__ads.htm
+./doc/html/ada/terminal_interface-curses-terminfo__adb.htm
+./doc/html/ada/terminal_interface-curses-terminfo__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-trace__adb.htm
+./doc/html/ada/terminal_interface-curses-trace__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_add_wch.3x.html
+./doc/html/man/curs_add_wchstr.3x.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_addwstr.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_bkgrnd.3x.html
+./doc/html/man/curs_border.3x.html
+./doc/html/man/curs_border_set.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_get_wch.3x.html
+./doc/html/man/curs_get_wstr.3x.html
+./doc/html/man/curs_getcchar.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_in_wch.3x.html
+./doc/html/man/curs_in_wchstr.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_ins_wch.3x.html
+./doc/html/man/curs_ins_wstr.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_inwstr.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/default_colors.3x.html
+./doc/html/man/define_key.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/key_defined.3x.html
+./doc/html/man/keybound.3x.html
+./doc/html/man/keyok.3x.html
+./doc/html/man/menu.3x.html
+./doc/html/man/menu_attributes.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
+./form/fld_attr.c
+./form/fld_current.c
+./form/fld_def.c
+./form/fld_dup.c
+./form/fld_ftchoice.c
+./form/fld_ftlink.c
+./form/fld_info.c
+./form/fld_just.c
+./form/fld_link.c
+./form/fld_max.c
+./form/fld_move.c
+./form/fld_newftyp.c
+./form/fld_opts.c
+./form/fld_pad.c
+./form/fld_page.c
+./form/fld_stat.c
+./form/fld_type.c
+./form/fld_user.c
+./form/form.h
+./form/form.priv.h
+./form/frm_cursor.c
+./form/frm_data.c
+./form/frm_def.c
+./form/frm_driver.c
+./form/frm_hook.c
+./form/frm_opts.c
+./form/frm_page.c
+./form/frm_post.c
+./form/frm_req_name.c
+./form/frm_scale.c
+./form/frm_sub.c
+./form/frm_user.c
+./form/frm_win.c
+./form/fty_alnum.c
+./form/fty_alpha.c
+./form/fty_enum.c
+./form/fty_int.c
+./form/fty_ipv4.c
+./form/fty_num.c
+./form/fty_regex.c
+./form/headers
+./form/llib-lform
+./form/llib-lformw
+./form/modules
+./include/Caps
+./include/Caps.aix4
+./include/Caps.hpux11
+./include/Caps.keys
+./include/Caps.osf1r5
+./include/Caps.uwin
+./include/MKhashsize.sh
+./include/MKkey_defs.sh
+./include/MKncurses_def.sh
+./include/MKparametrized.sh
+./include/MKterm.h.awk.in
+./include/Makefile.in
+./include/capdefaults.c
+./include/curses.h.in
+./include/curses.tail
+./include/curses.wide
+./include/edit_cfg.sh
+./include/headers
+./include/nc_alloc.h
+./include/nc_panel.h
+./include/ncurses_cfg.hin
+./include/ncurses_defs
+./include/ncurses_dll.h
+./include/term_entry.h
+./include/termcap.h.in
+./include/tic.h
+./include/unctrl.h.in
+./install-sh
+./man/MKterminfo.sh
+./man/Makefile.in
+./man/captoinfo.1m
+./man/clear.1
+./man/curs_add_wch.3x
+./man/curs_add_wchstr.3x
+./man/curs_addch.3x
+./man/curs_addchstr.3x
+./man/curs_addstr.3x
+./man/curs_addwstr.3x
+./man/curs_attr.3x
+./man/curs_beep.3x
+./man/curs_bkgd.3x
+./man/curs_bkgrnd.3x
+./man/curs_border.3x
+./man/curs_border_set.3x
+./man/curs_clear.3x
+./man/curs_color.3x
+./man/curs_delch.3x
+./man/curs_deleteln.3x
+./man/curs_extend.3x
+./man/curs_get_wch.3x
+./man/curs_get_wstr.3x
+./man/curs_getcchar.3x
+./man/curs_getch.3x
+./man/curs_getstr.3x
+./man/curs_getyx.3x
+./man/curs_in_wch.3x
+./man/curs_in_wchstr.3x
+./man/curs_inch.3x
+./man/curs_inchstr.3x
+./man/curs_initscr.3x
+./man/curs_inopts.3x
+./man/curs_ins_wch.3x
+./man/curs_ins_wstr.3x
+./man/curs_insch.3x
+./man/curs_insstr.3x
+./man/curs_instr.3x
+./man/curs_inwstr.3x
+./man/curs_kernel.3x
+./man/curs_mouse.3x
+./man/curs_move.3x
+./man/curs_outopts.3x
+./man/curs_overlay.3x
+./man/curs_pad.3x
+./man/curs_print.3x
+./man/curs_printw.3x
+./man/curs_refresh.3x
+./man/curs_scanw.3x
+./man/curs_scr_dump.3x
+./man/curs_scroll.3x
+./man/curs_slk.3x
+./man/curs_termattrs.3x
+./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/default_colors.3x
+./man/define_key.3x
+./man/form.3x
+./man/form_cursor.3x
+./man/form_data.3x
+./man/form_driver.3x
+./man/form_field.3x
+./man/form_field_attributes.3x
+./man/form_field_buffer.3x
+./man/form_field_info.3x
+./man/form_field_just.3x
+./man/form_field_new.3x
+./man/form_field_opts.3x
+./man/form_field_userptr.3x
+./man/form_field_validation.3x
+./man/form_fieldtype.3x
+./man/form_hook.3x
+./man/form_new.3x
+./man/form_new_page.3x
+./man/form_opts.3x
+./man/form_page.3x
+./man/form_post.3x
+./man/form_requestname.3x
+./man/form_userptr.3x
+./man/form_win.3x
+./man/infocmp.1m
+./man/infotocap.1m
+./man/key_defined.3x
+./man/keybound.3x
+./man/keyok.3x
+./man/make_sed.sh
+./man/man_db.renames
+./man/manlinks.sed
+./man/menu.3x
+./man/menu_attributes.3x
+./man/menu_cursor.3x
+./man/menu_driver.3x
+./man/menu_format.3x
+./man/menu_hook.3x
+./man/menu_items.3x
+./man/menu_mark.3x
+./man/menu_new.3x
+./man/menu_opts.3x
+./man/menu_pattern.3x
+./man/menu_post.3x
+./man/menu_requestname.3x
+./man/menu_spacing.3x
+./man/menu_userptr.3x
+./man/menu_win.3x
+./man/mitem_current.3x
+./man/mitem_name.3x
+./man/mitem_new.3x
+./man/mitem_opts.3x
+./man/mitem_userptr.3x
+./man/mitem_value.3x
+./man/mitem_visible.3x
+./man/ncurses.3x
+./man/panel.3x
+./man/resizeterm.3x
+./man/term.5
+./man/term.7
+./man/terminfo.head
+./man/terminfo.tail
+./man/tic.1m
+./man/toe.1m
+./man/tput.1
+./man/tset.1
+./man/wresize.3x
+./menu/Makefile.in
+./menu/READ.ME
+./menu/eti.h
+./menu/headers
+./menu/llib-lmenu
+./menu/llib-lmenuw
+./menu/m_attribs.c
+./menu/m_cursor.c
+./menu/m_driver.c
+./menu/m_format.c
+./menu/m_global.c
+./menu/m_hook.c
+./menu/m_item_cur.c
+./menu/m_item_nam.c
+./menu/m_item_new.c
+./menu/m_item_opt.c
+./menu/m_item_top.c
+./menu/m_item_use.c
+./menu/m_item_val.c
+./menu/m_item_vis.c
+./menu/m_items.c
+./menu/m_new.c
+./menu/m_opts.c
+./menu/m_pad.c
+./menu/m_pattern.c
+./menu/m_post.c
+./menu/m_req_name.c
+./menu/m_scale.c
+./menu/m_spacing.c
+./menu/m_sub.c
+./menu/m_userptr.c
+./menu/m_win.c
+./menu/menu.h
+./menu/menu.priv.h
+./menu/mf_common.h
+./menu/modules
+./misc/Makefile.in
+./misc/chkdef.cmd
+./misc/cleantic.cmd
+./misc/cmpdef.cmd
+./misc/csort
+./misc/emx.src
+./misc/form.def
+./misc/form.ref
+./misc/gen_edit.sh
+./misc/jpf-indent
+./misc/makedef.cmd
+./misc/makellib
+./misc/menu.def
+./misc/menu.ref
+./misc/ncu-indent
+./misc/ncurses.def
+./misc/ncurses.ref
+./misc/panel.def
+./misc/panel.ref
+./misc/run_tic.in
+./misc/shlib
+./misc/tabset/std
+./misc/tabset/stdcrt
+./misc/tabset/vt100
+./misc/tabset/vt300
+./misc/tdlint
+./misc/terminfo.src
+./mk-0th.awk
+./mk-1st.awk
+./mk-2nd.awk
+./mkinstalldirs
+./ncurses/Makefile.in
+./ncurses/README
+./ncurses/README.IZ
+./ncurses/SigAction.h
+./ncurses/base/MKkeyname.awk
+./ncurses/base/MKlib_gen.sh
+./ncurses/base/MKunctrl.awk
+./ncurses/base/README
+./ncurses/base/define_key.c
+./ncurses/base/key_defined.c
+./ncurses/base/keybound.c
+./ncurses/base/keyok.c
+./ncurses/base/lib_addch.c
+./ncurses/base/lib_addstr.c
+./ncurses/base/lib_beep.c
+./ncurses/base/lib_bkgd.c
+./ncurses/base/lib_box.c
+./ncurses/base/lib_chgat.c
+./ncurses/base/lib_clear.c
+./ncurses/base/lib_clearok.c
+./ncurses/base/lib_clrbot.c
+./ncurses/base/lib_clreol.c
+./ncurses/base/lib_color.c
+./ncurses/base/lib_colorset.c
+./ncurses/base/lib_delch.c
+./ncurses/base/lib_delwin.c
+./ncurses/base/lib_dft_fgbg.c
+./ncurses/base/lib_echo.c
+./ncurses/base/lib_endwin.c
+./ncurses/base/lib_erase.c
+./ncurses/base/lib_flash.c
+./ncurses/base/lib_freeall.c
+./ncurses/base/lib_getch.c
+./ncurses/base/lib_getstr.c
+./ncurses/base/lib_hline.c
+./ncurses/base/lib_immedok.c
+./ncurses/base/lib_inchstr.c
+./ncurses/base/lib_initscr.c
+./ncurses/base/lib_insch.c
+./ncurses/base/lib_insdel.c
+./ncurses/base/lib_insnstr.c
+./ncurses/base/lib_instr.c
+./ncurses/base/lib_isendwin.c
+./ncurses/base/lib_leaveok.c
+./ncurses/base/lib_mouse.c
+./ncurses/base/lib_move.c
+./ncurses/base/lib_mvwin.c
+./ncurses/base/lib_newterm.c
+./ncurses/base/lib_newwin.c
+./ncurses/base/lib_nl.c
+./ncurses/base/lib_overlay.c
+./ncurses/base/lib_pad.c
+./ncurses/base/lib_printw.c
+./ncurses/base/lib_redrawln.c
+./ncurses/base/lib_refresh.c
+./ncurses/base/lib_restart.c
+./ncurses/base/lib_scanw.c
+./ncurses/base/lib_screen.c
+./ncurses/base/lib_scroll.c
+./ncurses/base/lib_scrollok.c
+./ncurses/base/lib_scrreg.c
+./ncurses/base/lib_set_term.c
+./ncurses/base/lib_slk.c
+./ncurses/base/lib_slkatr_set.c
+./ncurses/base/lib_slkatrof.c
+./ncurses/base/lib_slkatron.c
+./ncurses/base/lib_slkatrset.c
+./ncurses/base/lib_slkattr.c
+./ncurses/base/lib_slkclear.c
+./ncurses/base/lib_slkcolor.c
+./ncurses/base/lib_slkinit.c
+./ncurses/base/lib_slklab.c
+./ncurses/base/lib_slkrefr.c
+./ncurses/base/lib_slkset.c
+./ncurses/base/lib_slktouch.c
+./ncurses/base/lib_touch.c
+./ncurses/base/lib_ungetch.c
+./ncurses/base/lib_vline.c
+./ncurses/base/lib_wattroff.c
+./ncurses/base/lib_wattron.c
+./ncurses/base/lib_winch.c
+./ncurses/base/lib_window.c
+./ncurses/base/memmove.c
+./ncurses/base/nc_panel.c
+./ncurses/base/resizeterm.c
+./ncurses/base/safe_sprintf.c
+./ncurses/base/sigaction.c
+./ncurses/base/tries.c
+./ncurses/base/version.c
+./ncurses/base/vsscanf.c
+./ncurses/base/wresize.c
+./ncurses/curses.priv.h
+./ncurses/fifo_defs.h
+./ncurses/llib-lncurses
+./ncurses/llib-lncursesw
+./ncurses/modules
+./ncurses/tinfo/MKcaptab.awk
+./ncurses/tinfo/MKfallback.sh
+./ncurses/tinfo/MKkeys_list.sh
+./ncurses/tinfo/MKnames.awk
+./ncurses/tinfo/README
+./ncurses/tinfo/access.c
+./ncurses/tinfo/add_tries.c
+./ncurses/tinfo/alloc_entry.c
+./ncurses/tinfo/alloc_ttype.c
+./ncurses/tinfo/captoinfo.c
+./ncurses/tinfo/comp_error.c
+./ncurses/tinfo/comp_expand.c
+./ncurses/tinfo/comp_hash.c
+./ncurses/tinfo/comp_parse.c
+./ncurses/tinfo/comp_scan.c
+./ncurses/tinfo/doalloc.c
+./ncurses/tinfo/free_ttype.c
+./ncurses/tinfo/getenv_num.c
+./ncurses/tinfo/home_terminfo.c
+./ncurses/tinfo/init_keytry.c
+./ncurses/tinfo/lib_acs.c
+./ncurses/tinfo/lib_baudrate.c
+./ncurses/tinfo/lib_cur_term.c
+./ncurses/tinfo/lib_data.c
+./ncurses/tinfo/lib_has_cap.c
+./ncurses/tinfo/lib_kernel.c
+./ncurses/tinfo/lib_longname.c
+./ncurses/tinfo/lib_napms.c
+./ncurses/tinfo/lib_options.c
+./ncurses/tinfo/lib_print.c
+./ncurses/tinfo/lib_raw.c
+./ncurses/tinfo/lib_setup.c
+./ncurses/tinfo/lib_termcap.c
+./ncurses/tinfo/lib_termname.c
+./ncurses/tinfo/lib_tgoto.c
+./ncurses/tinfo/lib_ti.c
+./ncurses/tinfo/lib_tparm.c
+./ncurses/tinfo/lib_tputs.c
+./ncurses/tinfo/lib_ttyflags.c
+./ncurses/tinfo/make_keys.c
+./ncurses/tinfo/name_match.c
+./ncurses/tinfo/parse_entry.c
+./ncurses/tinfo/read_entry.c
+./ncurses/tinfo/read_termcap.c
+./ncurses/tinfo/setbuf.c
+./ncurses/tinfo/strings.c
+./ncurses/tinfo/write_entry.c
+./ncurses/trace/README
+./ncurses/trace/lib_trace.c
+./ncurses/trace/lib_traceatr.c
+./ncurses/trace/lib_tracebits.c
+./ncurses/trace/lib_tracechr.c
+./ncurses/trace/lib_tracedmp.c
+./ncurses/trace/lib_tracemse.c
+./ncurses/trace/trace_buf.c
+./ncurses/trace/trace_tries.c
+./ncurses/trace/trace_xnames.c
+./ncurses/trace/varargs.c
+./ncurses/trace/visbuf.c
+./ncurses/tty/MKexpanded.sh
+./ncurses/tty/hardscroll.c
+./ncurses/tty/hashmap.c
+./ncurses/tty/lib_mvcur.c
+./ncurses/tty/lib_tstp.c
+./ncurses/tty/lib_twait.c
+./ncurses/tty/lib_vidattr.c
+./ncurses/tty/tty_display.h
+./ncurses/tty/tty_input.h
+./ncurses/tty/tty_update.c
+./ncurses/widechar/charable.c
+./ncurses/widechar/lib_add_wch.c
+./ncurses/widechar/lib_box_set.c
+./ncurses/widechar/lib_cchar.c
+./ncurses/widechar/lib_erasewchar.c
+./ncurses/widechar/lib_get_wch.c
+./ncurses/widechar/lib_get_wstr.c
+./ncurses/widechar/lib_hline_set.c
+./ncurses/widechar/lib_in_wch.c
+./ncurses/widechar/lib_in_wchnstr.c
+./ncurses/widechar/lib_ins_wch.c
+./ncurses/widechar/lib_inwstr.c
+./ncurses/widechar/lib_pecho_wchar.c
+./ncurses/widechar/lib_slk_wset.c
+./ncurses/widechar/lib_unget_wch.c
+./ncurses/widechar/lib_vid_attr.c
+./ncurses/widechar/lib_vline_set.c
+./ncurses/widechar/lib_wacs.c
+./ncurses/widechar/lib_wunctrl.c
+./panel/Makefile.in
+./panel/headers
+./panel/llib-lpanel
+./panel/llib-lpanelw
+./panel/modules
+./panel/p_above.c
+./panel/p_below.c
+./panel/p_bottom.c
+./panel/p_delete.c
+./panel/p_hidden.c
+./panel/p_hide.c
+./panel/p_move.c
+./panel/p_new.c
+./panel/p_replace.c
+./panel/p_show.c
+./panel/p_top.c
+./panel/p_update.c
+./panel/p_user.c
+./panel/p_win.c
+./panel/panel.c
+./panel/panel.h
+./panel/panel.priv.h
+./progs/MKtermsort.sh
+./progs/Makefile.in
+./progs/capconvert
+./progs/clear.c
+./progs/clear.sh
+./progs/dump_entry.c
+./progs/dump_entry.h
+./progs/infocmp.c
+./progs/modules
+./progs/progs.priv.h
+./progs/tic.c
+./progs/toe.c
+./progs/tput.c
+./progs/tset.c
+./tack/COPYING
+./tack/HISTORY
+./tack/Makefile.in
+./tack/README
+./tack/ansi.c
+./tack/charset.c
+./tack/color.c
+./tack/control.c
+./tack/crum.c
+./tack/edit.c
+./tack/fun.c
+./tack/init.c
+./tack/menu.c
+./tack/modes.c
+./tack/modules
+./tack/output.c
+./tack/pad.c
+./tack/scan.c
+./tack/sync.c
+./tack/sysdep.c
+./tack/tack.1
+./tack/tack.c
+./tack/tack.h
+./tar-copy.sh
+./test/Makefile.in
+./test/README
+./test/aclocal.m4
+./test/background.c
+./test/blue.c
+./test/bs.6
+./test/bs.c
+./test/cardfile.c
+./test/cardfile.dat
+./test/color_set.c
+./test/configure
+./test/configure.in
+./test/demo_defkey.c
+./test/demo_forms.c
+./test/demo_keyok.c
+./test/demo_menus.c
+./test/demo_panels.c
+./test/ditto.c
+./test/dots.c
+./test/edit_field.c
+./test/edit_field.h
+./test/filter.c
+./test/firework.c
+./test/firstlast.c
+./test/gdc.6
+./test/gdc.c
+./test/hanoi.c
+./test/hashtest.c
+./test/ins_wide.c
+./test/inserts.c
+./test/keynames.c
+./test/knight.c
+./test/linux-color.dat
+./test/listused.sh
+./test/lrtest.c
+./test/modules
+./test/ncurses.c
+./test/ncurses_tst.hin
+./test/newdemo.c
+./test/railroad.c
+./test/rain.c
+./test/tclock.c
+./test/test.priv.h
+./test/testaddch.c
+./test/testcurs.c
+./test/testscanw.c
+./test/tracemunch
+./test/view.c
+./test/worm.c
+./test/xmas.c
+./test/xterm-16color.dat
diff --git a/Build/source/libs/ncurses/Makefile.in b/Build/source/libs/ncurses/Makefile.in
new file mode 100644
index 00000000000..09156279e28
--- /dev/null
+++ b/Build/source/libs/ncurses/Makefile.in
@@ -0,0 +1,97 @@
+# $Id: Makefile.in,v 1.23 2004/07/11 14:22:55 tom Exp $
+##############################################################################
+# Copyright (c) 1998 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+#
+# Master Makefile for ncurses library.
+
+SHELL = /bin/sh
+
+DESTDIR=@DESTDIR@
+CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)"
+
+@SET_MAKE@
+
+NCURSES_MAJOR = @NCURSES_MAJOR@
+NCURSES_MINOR = @NCURSES_MINOR@
+NCURSES_PATCH = @NCURSES_PATCH@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+ticdir = @TERMINFO@
+includedir = @includedir@
+libdir = @libdir@
+mandir = @mandir@
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+DIRS_TO_MAKE = @DIRS_TO_MAKE@
+
+all :: $(DIRS_TO_MAKE)
+
+$(DIRS_TO_MAKE) :
+ mkdir $@
+
+preinstall :
+ @ echo ''
+ @ echo '** Configuration summary for NCURSES $(NCURSES_MAJOR).$(NCURSES_MINOR) $(NCURSES_PATCH):'
+ @ echo ''
+ @ echo ' extended funcs: '`test @NCURSES_EXT_FUNCS@ != 0 && echo yes || echo no`
+ @ echo ' xterm terminfo: '@WHICH_XTERM@
+ @ echo ''
+ @ echo ' bin directory: '$(bindir)
+ @ echo ' lib directory: '$(libdir)
+ @ echo ' include directory: '$(includedir)
+ @ echo ' man directory: '$(mandir)
+@MAKE_TERMINFO@ @ echo ' terminfo directory: '$(ticdir)
+ @ echo ''
+ -@ test "$(includedir)" = "$(prefix)/include" || \
+ echo '** Include-directory is not in a standard location'
+ -@ test ! -f $(includedir)/termcap.h || \
+ fgrep NCURSES_VERSION $(includedir)/termcap.h >/dev/null || \
+ echo '** Will overwrite non-ncurses termcap.h'
+ -@ test ! -f $(includedir)/curses.h || \
+ fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \
+ echo '** Will overwrite non-ncurses curses.h'
+
+install ::
+
+# Put the common rules here so that we can easily construct the list of
+# directories to visit.
+all \
+clean \
+distclean \
+mostlyclean \
+realclean \
+depend \
+sources \
+uninstall ::
diff --git a/Build/source/libs/ncurses/Makefile.os2 b/Build/source/libs/ncurses/Makefile.os2
new file mode 100644
index 00000000000..167ff657e0f
--- /dev/null
+++ b/Build/source/libs/ncurses/Makefile.os2
@@ -0,0 +1,234 @@
+################################################################################
+# Wrapper Makefile for ncurses library under OS/2.
+################################################################################
+# $Id: Makefile.os2,v 1.10 2000/10/09 23:53:57 Ilya.Zakharevich Exp $
+#
+# Author: Juan Jose Garcia Ripoll <worm@arrakis.es>.
+# Webpage: http://www.arrakis.es/~worm/
+################################################################################
+#
+# Notes (from I Zakharevich)
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~
+# I could build the library with the following sequence of commands:
+#
+# touch Makefile
+# make -f Makefile.os2 config
+# make -f Makefile.os2 CC=gcc HOSTCC=gcc CXX=gcc
+#
+# Ignoring the following errors:
+# Invalid configuration `os2'...
+# ... ac_maketemp="make": not found
+# ... syntax error: `done' unexpected
+# No rule to make target `lib/ncurses4.dll'
+#
+# You may need to run
+#
+# rm make.defs
+# make -f Makefile.os2 make.defs
+#
+# if the build of misc/panel.def fails.
+#
+# If you do not have perl, the configuration will fail. Use autoconf to
+# generate the EMX-specific configure script (see README.emx), and run the
+# configure script to generate the makefiles. Then, run
+#
+# make -f Makefile.os2 make.dlls
+#
+# Notes (from J J G Ripoll)
+# ~~~~~~~~~~~~~~~~~~~~~~~~~
+# The `make.defs' rule creates the new '.def' files and outputs a diagnostic
+# about symbols that disappear from one release to the other, as well as
+# checks about the new '.def' consistency. If there were no problems, the
+# maintainer is free to replace the `.ref' files with the newer ones using the
+# `save.defs' rule. So, the only tough work is ensuring that the symbols that
+# disappear are not essential.
+#
+# I first thought about killing '_nc_*' symbols, but it seems that some of
+# them --_nc_panel_hook, _nc_ada*, etc-- are needed outside ncurses.dll.
+# However, the whole size of the export table will not be larger than 1k or
+# so.
+#
+# [installation]
+#
+# The way things are handled in misc/Makefile is not well suited for OS/2,
+# where only emx.src is needed. Thus, I've written a few wrapper rules in
+# Makefile.os2 that handle installation/deinstallation.
+#
+# [distribution]
+#
+# There's also a new rule that configures and builds a sort of binary
+# distribution, much like the one I prepared for 1.9.9e. It's `os2dist'.
+#
+################################################################################
+
+all :: config
+
+# This is for configuring
+
+# What is a useful value for this?
+CONFIG_OPTS = --enable-termcap
+WWWGET = lynx -source
+MV_F = mv -f
+DLL_LN_OPTS = -Zcrtdll -Zdll -Zomf -Zmt
+
+config: config.cache
+
+config.cache: configure.cmd configure
+ -$(MV_F) $@ $@.ref
+ configure.cmd $(CONFIG_OPTS)
+
+configure.cmd: configure convert_configure.pl
+ perl convert_configure.pl configure > $@
+
+convert_configure.pl:
+ $(WWWGET) ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2/$@ > $@
+
+install ::
+ echo ***
+ echo *** Do not use this command. Use install.os2 instead.
+ echo ***
+ exit 2
+
+install.os2 : install.emxdata install.libs install.progs
+
+include ./Makefile
+
+all :: make.dlls
+
+#
+# DLLs and that stuff
+#
+
+LIBRARIES = ncurses form menu panel
+
+DLL_TAG = $(NCURSES_MAJOR)
+LIB_TAG = _s
+
+DLL_ROOTS = $(addsuffix $(DLL_TAG), $(LIBRARIES))
+DLLS = $(addsuffix .dll, $(addprefix ./lib/, $(DLL_ROOTS)))
+
+LIB_ROOTS = $(addsuffix $(LIB_TAG), $(LIBRARIES))
+LIBS = $(addsuffix .lib, $(addprefix ./lib/, $(LIB_ROOTS)))
+
+LIBS_AOUT = $(addsuffix .a, $(addprefix ./lib/, $(LIB_ROOTS)))
+
+DEFS = $(addsuffix .def, $(addprefix ./misc/, $(LIBRARIES)))
+
+DLL_SIGNATURE = NCurses-$(NCURSES_MAJOR)-$(NCURSES_MINOR)-$(NCURSES_PATCH)
+
+./lib/%$(LIB_TAG).lib : ./misc/%.def
+ emximp -o $@ $<
+
+./lib/%$(LIB_TAG).a : ./misc/%.def
+ emximp -o $@ $<
+
+./lib/%$(DLL_TAG).dll : ./lib/%.a
+ emxomf -o ./lib/$*$(DLL_TAG).lib $<
+ if [ "$*" = "ncurses" ]; then \
+ gcc $(LDFLAGS) $(DLL_LN_OPTS) ./lib/$*$(DLL_TAG).lib \
+ ./misc/$*.def -o $@; \
+ else \
+ gcc $(LDFLAGS) $(DLL_LN_OPTS) ./lib/$*$(DLL_TAG).lib \
+ ./lib/ncurses$(LIB_TAG).lib ./misc/$*.def -o $@; \
+ fi
+ -rm -f ./lib/$*$(DLL_TAG).lib
+
+make.dlls : $(DEFS) $(LIBS) $(DLLS) $(LIBS_AOUT)
+
+$(DEFS) : make.defs
+
+LIBDIR = $(DESTDIR)$(libdir)
+$(LIBDIR) :
+ mkdir -p $@
+
+install.libs :: $(LIBS) $(DLLS) $(LIBDIR)
+ @for i in $(DLL_ROOTS); do \
+ echo installing ./lib/$$i.dll as $(LIBDIR)/$$i.dll; \
+ $(INSTALL_DATA) ./lib/$$i.dll $(LIBDIR)/$$i.dll; done
+ @for i in $(LIB_ROOTS); do \
+ echo installing ./lib/$$i.lib as $(LIBDIR)/$$i.lib; \
+ $(INSTALL_DATA) ./lib/$$i.lib $(LIBDIR)/$$i.lib; done
+
+uninstall.libs ::
+ -@for i in $(DLL_ROOTS); do \
+ echo uninstalling $(LIBDIR)/$$i.dll; \
+ rm -f $(LIBDIR)/$$i.dll; done
+ -@for i in $(LIB_ROOTS); do \
+ echo uninstalling $(LIBDIR)/$$i.lib; \
+ rm -f $(LIBDIR)/$$i.lib; done
+
+make.defs :
+ for i in $(LIBRARIES); do \
+ echo LIBRARY $${i}$(DLL_TAG) INITINSTANCE TERMINSTANCE > ./misc/$$i.def; \
+ echo DESCRIPTION \"$(DLL_SIGNATURE), module $$i\" >> ./misc/$$i.def; \
+ echo CODE LOADONCALL >> ./misc/$$i.def; \
+ echo DATA LOADONCALL NONSHARED MULTIPLE >> ./misc/$$i.def; \
+ echo EXPORTS >> ./misc/$$i.def; \
+ echo Creating $$i.def; \
+ (cmd /C ".\\misc\\makedef.cmd ./lib/$$i.a ./misc/$$i.ref >> ./misc/$$i.def" \
+ && cmd /C ".\\misc\\chkdef.cmd ./misc/$$i.def") \
+ || exit 1; \
+ done
+ touch make.defs
+
+save.defs :
+ for i in $(LIBRARIES); do \
+ test -f ./misc/$$i.def && cp ./misc/$$i.def ./misc/$$i.ref; \
+ done
+
+clean \
+os2clean ::
+ -rm -f $(DLLS) $(LIBS)
+
+realclean ::
+ -rm -f $(addprefix ./misc/, $(addsuffix .def, $(LIBRARIES)))
+
+#
+# This is a simplified version of misc/Makefile
+#
+
+TICDIR = $(DESTDIR)$(datadir)/terminfo
+TABSETDIR = $(DESTDIR)$(datadir)/tabset
+
+$(TICDIR) :
+ mkdir -p $@
+
+install \
+install.emxdata :: $(TICDIR)
+ -@rm -fr $(TICDIR)/*
+ echo Building terminfo database, please wait...
+ set TERMINFO=$(TICDIR); ./progs/tic ./misc/emx.src
+ echo Installing the terminfo cleaner and the sources...
+ cp ./misc/emx.src ./misc/cleantic.cmd $(TICDIR)
+ ./misc/cleantic.cmd $(TICDIR)
+
+uninstall \
+uninstall.emxdata ::
+ -cd $(TICDIR) && rm -rf *
+ -cd $(TABSETDIR) && rm -rf *
+
+#
+# This is for preparing binary distributions
+#
+
+OS2NAME=ncurses-$(NCURSES_MAJOR).$(NCURSES_MINOR)-emx
+
+#
+# FIXME: this assumes that we can rerun the configure script, changing only
+# the install-prefix. That means we cannot provide "interesting" options
+# when building.
+#
+os2dist :
+ $(MAKE) -f Makefile.os2 os2clean
+ ./configure --without-debug --with-install-prefix=`pwd|sed -e 's@^.:@@'`/$(OS2NAME)
+ $(MAKE) -f Makefile.os2 $(CF_MFLAGS) install.os2
+ -rm -f $(OS2NAME).zip
+ echo NCurses-$(NCURSES_MAJOR).$(NCURSES_MINOR)-$(NCURSES_PATCH) for emx > $(OS2NAME)/FILE_ID.DIZ
+ echo Binary release. >> $(OS2NAME)/FILE_ID.DIZ
+ zip -r $(OS2NAME).zip ./$(OS2NAME)
+
+clean \
+os2clean ::
+ -rm -rf $(OS2NAME)
+ -rm -f $(OS2NAME).zip
+
diff --git a/Build/source/libs/ncurses/NEWS b/Build/source/libs/ncurses/NEWS
new file mode 100644
index 00000000000..d71c1d693dc
--- /dev/null
+++ b/Build/source/libs/ncurses/NEWS
@@ -0,0 +1,6894 @@
+-- $Id: NEWS,v 1.842 2004/10/16 21:56:58 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.
+
+Changes through 1.9.9e are recorded by Zeyd M. Ben-Halim.
+Changes since 1.9.9e are recorded by Thomas Dickey.
+
+20041016
+ + minor fixes for traces.
+ + add SP->_screen_acs_map[], used to ensure that mapping of missing
+ line-drawing characters is handled properly. For example, ACS_DARROW
+ is absent from xterm-new, and it was coincidentally displayed the
+ same as ACS_BTEE.
+
+20041009
+ + amend 20021221 workaround for broken acs to reset the sgr, rmacs
+ and smacs strings as well. Also modify the check for screen's
+ limitations in that area to allow the multi-character shift-in
+ and shift-out which seem to work.
+ + change GPM initialization, using dl library to load it dynamically
+ at runtime (Debian #110586).
+
+20041002
+ + correct logic for color pair in setcchar() and getcchar() (patch by
+ Marcin 'Qrczak' Kowalczyk).
+ + add t/T commands to ncurses b/B tests to allow a different color to
+ be tested for the attrset part of the test than is used in the
+ background color.
+
+20040925
+ + fix to make setcchar() to work when its wchar_t* parameter is
+ pointing to a string which contains more data than can be converted.
+ + modify wget_wstr() and example in ncurses.c to work if wchar_t and
+ wint_t are different sizes (report by Marcin 'Qrczak' Kowalczyk).
+
+20040918
+ + remove check in wget_wch() added to fix an infinite loop, appears to
+ have been working around a transitory glibc bug, and interferes
+ with normal operation (report by Marcin 'Qrczak' Kowalczyk).
+ + correct wadd_wch() and wecho_wch(), which did not pass the rendition
+ information (report by Marcin 'Qrczak' Kowalczyk).
+ + fix aclocal.m4 so that the wide-character version of ncurses gets
+ compiled as libncursesw.5.dylib, instead of libncurses.5w.dylib
+ (adapted from patch by James J Ramsey).
+ + change configure script for --with-caps option to indicate that it
+ is no longer experimental.
+ + change configure script to reflect the fact that --enable-widec has
+ not been "experimental" since 5.3 (report by Bruno Lustosa).
+
+20040911
+ + add 'B' test to ncurses.c, to exercise some wide-character functions.
+
+20040828
+ + modify infocmp -i option to match 8-bit controls against its table
+ entries, e.g., so it can analyze the xterm-8bit entry.
+ + add morphos terminfo entry, improve amiga-8bit entry (Pavel Fedin).
+ + correct translation of "%%" in terminfo format to termcap, e.g.,
+ using "tic -C" (Redhat Bugzilla #130921).
+ + modified configure script CF_XOPEN_SOURCE macro to ensure that if
+ it defines _POSIX_C_SOURCE, that it defines it to a specific value
+ (comp.os.stratus newsgroup comment).
+
+20040821
+ + fixes to build with Ada95 binding with gnat 3.4 (all warnings are
+ fatal, and gnat does not follow the guidelines for pragmas).
+ However that did find a coding error in Assume_Default_Colors().
+ + modify several terminfo entries to ensure xterm mouse and cursor
+ visibility are reset in rs2 string: hurd, putty, gnome,
+ konsole-base, mlterm, Eterm, screen (Debian #265784, #55637). The
+ xterm entries are left alone - old ones for compatibility, and the
+ new ones do not require this change. -TD
+
+20040814
+ + fake a SIGWINCH in newterm() to accommodate buggy terminal emulators
+ and window managers (Debian #265631).
+ > terminfo updates -TD
+ + remove dch/dch1 from rxvt because they are implemented inconsistently
+ with the common usage of bce/ech
+ + remove khome from vt220 (vt220's have no home key)
+ + add rxvt+pcfkeys
+
+20040807
+ + modify test/ncurses.c 'b' test, adding v/V toggles to cycle through
+ combinations of video attributes so that for instance bold and
+ underline can be tested. This made the legend too crowded, added
+ a help window as well.
+ + modify test/ncurses.c 'b' test to cycle through default colors if
+ the -d option is set.
+ + update putty terminfo entry (Robert de Bath).
+
+20040731
+ + modify test/cardfile.c to allow it to read more data than can be
+ displayed.
+ + correct logic in resizeterm.c which kept it from processing all
+ levels of window hierarchy (reports by Folkert van Heusden,
+ Chris Share).
+
+20040724
+ + modify "tic -cv" to ignore delays when comparing strings. Also
+ modify it to ignore a canceled sgr string, e.g., for terminals which
+ cannot properly combine attributes in one control sequence.
+ + corrections for gnome and konsole entries (Redhat Bugzilla #122815,
+ patch by Hans de Goede)
+ > terminfo updates -TD
+ + make ncsa-m rmacs/smacs consistent with sgr
+ + add sgr, rc/sc and ech to syscons entries
+ + add function-keys to decansi
+ + add sgr to mterm-ansi
+ + add sgr, civis, cnorm to emu
+ + correct/simplify cup in addrinfo
+
+20040717
+ > terminfo updates -TD
+ + add xterm-pc-fkeys
+ + review/update gnome and gnome-rh90 entries (prompted by Redhat
+ Bugzilla #122815).
+ + review/update konsole entries
+ + add sgr, correct sgr0 for kterm and mlterm
+ + correct tsl string in kterm
+
+20040711
+ + add configure option --without-xterm-new
+
+20040710
+ + add check in wget_wch() for printable bytes that are not part of a
+ multibyte character.
+ + modify wadd_wchnstr() to render text using window's background
+ attributes.
+ + improve tic's check to compare sgr and sgr0.
+ + fix c++ directory's .cc.i rule.
+ + modify logic in tgetent() which adjusts the termcap "me" string
+ to work with ISO-2022 string used in xterm-new (cf: 20010908).
+ + modify tic's check for conflicting function keys to omit that if
+ converting termcap to termcap format.
+ + add -U option to tic and infocmp.
+ + add rmam/smam to linux terminfo entry (Trevor Van Bremen)
+ > terminfo updates -TD
+ + minor fixes for emu
+ + add emu-220
+ + change wyse acsc strings to use 'i' map rather than 'I'
+ + fixes for avatar0
+ + fixes for vp3a+
+
+20040703
+ + use tic -x to install terminfo database -TD
+ + add -x to infocmp's usage message.
+ + correct field used for comparing O_ROWMAJOR in set_menu_format()
+ (report/patch by Tony Li).
+ + fix a missing nul check in set_field_buffer() from 20040508 changes.
+ > terminfo updates -TD
+ + make xterm-xf86-v43 derived from xterm-xf86-v40 rather than
+ xterm-basic -TD
+ + align with xterm patch #192's use of xterm-new -TD
+ + update xterm-new and xterm-8bit for cvvis/cnorm strings -TD
+ + make xterm-new the default "xterm" entry -TD
+
+20040626
+ + correct BUILD_CPPFLAGS substitution in ncurses/Makefile.in, to allow
+ cross-compiling from a separate directory tree (report/patch by
+ Dan Engel).
+ + modify is_term_resized() to ensure that window sizes are nonzero,
+ as documented in the manpage (report by Ian Collier).
+ + modify CF_XOPEN_SOURCE configure macro to make Hurd port build
+ (Debian #249214, report/patch by Jeff Bailey).
+ + configure-script mods from xterm, e.g., updates to CF_ADD_CFLAGS
+ + update config.guess, config.sub
+ > terminfo updates -TD
+ + add mlterm
+ + add xterm-xf86-v44
+ + modify xterm-new aka xterm-xfree86 to accommodate luit, which
+ relies on G1 being used via an ISO-2022 escape sequence (report by
+ Juliusz Chroboczek)
+ + add 'hurd' entry
+
+20040619
+ + reconsidered winsnstr(), decided after comparing other
+ implementations that wrapping is an X/Open documentation error.
+ + modify test/inserts.c to test all flavors of insstr().
+
+20040605
+ + add setlocale() calls to a few test programs which may require it:
+ demo_forms.c, filter.c, ins_wide.c, inserts.c
+ + correct a few misspelled function names in ncurses-intro.html (report
+ by Tony Li).
+ + correct internal name of key_defined() manpage, which conflicted with
+ define_key().
+
+20040529
+ + correct size of internal pad used for holding wide-character
+ field_buffer() results.
+ + modify data_ahead() to work with wide-characters.
+
+20040522
+ + improve description of terminfo if-then-else expressions (suggested
+ by Arne Thomassen).
+ + improve test/ncurses.c 'd' test, allow it to use external file for
+ initial palette (added xterm-16color.dat and linux-color.dat), and
+ reset colors to the initial palette when starting/ending the test.
+ + change limit-check in init_color() to allow r/g/b component to
+ reach 1000 (cf: 20020928).
+
+20040516
+ + modify form library to use cchar_t's rather than char's in the
+ wide-character configuration for storing data for field buffers.
+ + correct logic of win_wchnstr(), which did not work for more than
+ one cell.
+
+20040508
+ + replace memset/memcpy usage in form library with for-loops to
+ simplify changing the datatype of FIELD.buf, part of wide-character
+ changes.
+ + fix some inconsistent use of #if/#ifdef (report by Alain Guibert).
+
+20040501
+ + modify menu library to account for actual number of columns used by
+ multibyte character strings, in the wide-character configuration
+ (adapted from patch by Philipp Tomsich).
+ + add "-x" option to infocmp like tic's "-x", for use in "-F"
+ comparisons. This modifies infocmp to only report extended
+ capabilities if the -x option is given, making this more consistent
+ with tic. Some scripts may break, since infocmp previous gave this
+ information without an option.
+ + modify termcap-parsing to retain 2-character aliases at the beginning
+ of an entry if the "-x" option is used in tic.
+
+20040424
+ + minor compiler-warning and test-program fixes.
+
+20040417
+ + modify tic's missing-sgr warning to apply to terminfo only.
+ + free some memory leaks in tic.
+ + remove check in post_menu() that prevented menus from extending
+ beyond the screen (request by Max J. Werner).
+ + remove check in newwin() that prevents allocating windows
+ that extend beyond the screen. Solaris curses does this.
+ + add ifdef in test/color_set.c to allow it to compile with older
+ curses.
+ + add napms() calls to test/dots.c to make it not be a CPU hog.
+
+20040403
+ + modify unctrl() to return null if its parameter does not correspond
+ to an unsigned char.
+ + add some limit-checks to guard isprint(), etc., from being used on
+ values that do not fit into an unsigned char (report by Sami Farin).
+
+20040328
+ + fix a typo in the _nc_get_locale() change.
+
+20040327
+ + modify _nc_get_locale() to use setlocale() to query the program's
+ current locale rather than using getenv(). This fixes a case in tin
+ which relies on legacy treatment of 8-bit characters when the locale
+ is not initialized (reported by Urs Jansen).
+ + add sgr string to screen's and rxvt's terminfo entries -TD.
+ + add a check in tic for terminfo entries having an sgr0 but no sgr
+ string. This confuses Tru64 and HPUX curses when combined with
+ color, e.g., making them leave line-drawing characters in odd places.
+ + correct casts used in ABSENT_BOOLEAN, CANCELLED_BOOLEAN, matches the
+ original definitions used in Debian package to fix PowerPC bug before
+ 20030802 (Debian #237629).
+
+20040320
+ + modify PutAttrChar() and PUTC() macro to improve use of
+ A_ALTCHARSET attribute to prevent line-drawing characters from
+ being lost in situations where the locale would otherwise treat the
+ raw data as nonprintable (Debian #227879).
+
+20040313
+ + fix a redefinition of CTRL() macro in test/view.c for AIX 5.2 (report
+ by Jim Idle).
+ + remove ".PP" after ".SH NAME" in a few manpages; this confuses
+ some apropos script (Debian #237831).
+
+20040306
+ + modify ncurses.c 'r' test so editing commands, like inserted text,
+ set the field background, and the state of insert/overlay editing
+ mode is shown in that test.
+ + change syntax of dummy targets in Ada95 makefiles to work with pmake.
+ + correct logic in test/ncurses.c 'b' for noncolor terminals which
+ did not recognize a quit-command (cf: 20030419).
+
+20040228
+ + modify _nc_insert_ch() to allow for its input to be part of a
+ multibyte string.
+ + split out lib_insnstr.c, to prepare to rewrite it. X/Open states
+ that this function performs wrapping, unlike all of the other
+ insert-functions. Currently it does not wrap.
+ + check for nl_langinfo(CODESET), use it if available (report by
+ Stanislav Ievlev).
+ + split-out CF_BUILD_CC macro, actually did this for lynx first.
+ + fixes for configure script CF_WITH_DBMALLOC and CF_WITH_DMALLOC,
+ which happened to work with bash, but not with Bourne shell (report
+ by Marco d'Itri via tin-dev).
+
+20040221
+ + some changes to adapt the form library to wide characters, incomplete
+ (request by Mike Aubury).
+ + add symbol to curses.h which can be used to suppress include of
+ stdbool.h, e.g.,
+ #define NCURSES_ENABLE_STDBOOL_H 0
+ #include <curses.h>
+ (discussion on XFree86 mailing list).
+
+20040214
+ + modify configure --with-termlib option to accept a value which sets
+ the name of the terminfo library. This would allow a packager to
+ build libtinfow.so renamed to coincide with libtinfo.so (discussion
+ with Stanislav Ievlev).
+ + improve documentation of --with-install-prefix, --prefix and
+ $(DESTDIR) in INSTALL (prompted by discussion with Paul Lew).
+ + add configure check if the compiler can use -c -o options to rename
+ its output file, use that to omit the 'cd' command which was used to
+ ensure object files are created in a separate staging directory
+ (prompted by comments by Johnny Wezel, Martin Mokrejs).
+
+20040208 5.4 release for upload to ftp.gnu.org
+ + update TO-DO.
+
+20040207 pre-release
+ + minor fixes to _nc_tparm_analyze(), i.e., do not count %i as a param,
+ and do not count %d if it follows a %p.
+ + correct an inconsistency between handling of codes in the 128-255
+ range, e.g., as illustrated by test/ncurses.c f/F tests. In POSIX
+ locale, the latter did not show printable results, while the former
+ did.
+ + modify MKlib_gen.sh to compensate for broken C preprocessor on Mac
+ OS X, which alters "%%" to "% % " (report by Robert Simms, fix
+ verified by Scott Corscadden).
+
+20040131 pre-release
+ + modify SCREEN struct to align it between normal/wide curses flavors
+ to simplify future changes to build a single version of libtinfo
+ (patch by Stanislav Ievlev).
+ + document handling of carriage return by addch() in manpage.
+ + document special features of unctrl() in manpage.
+ + documented interface changes in INSTALL.
+ + corrected control-char test in lib_addch.c to account for locale
+ (Debian #230335, cf: 971206).
+ + updated test/configure.in to use AC_EXEEXT and AC_OBJEXT.
+ + fixes to compile Ada95 binding with Debian gnat 3.15p-4 package.
+ + minor configure-script fixes for older ports, e.g., BeOS R4.5.
+
+20040125 pre-release
+ + amend change to PutAttrChar() from 20030614 which computed the number
+ of cells for a possibly multi-cell character. The 20030614 change
+ forced the cell to a blank if the result from wcwidth() was not
+ greater than zero. However, wcwidth() called for parameters in the
+ range 128-255 can give this return value. The logic now simply
+ ensures that the number of cells is greater than zero without
+ modifying the displayed value.
+
+20040124 pre-release
+ + looked good for 5.4 release for upload to ftp.gnu.org (but see above)
+ + modify configure script check for ranlib to use AC_CHECK_TOOL, since
+ that works better for cross-compiling.
+
+20040117 pre-release
+ + modify lib_get_wch.c to prefer mblen/mbtowc over mbrlen/mbrtowc to
+ work around core dump in Solaris 8's locale support, e.g., for
+ zh_CN.GB18030 (report by Saravanan Bellan).
+ + add includes for <stdarg.h> and <stdio.h> in configure script macro
+ to make <wchar.h> check work with Tru64 4.0d.
+ + add terminfo entry for U/Win -TD
+ + add terminfo entries for SFU aka Interix aka OpenNT (Federico
+ Bianchi).
+ + modify tput's error messages to prefix them with the program name
+ (report by Vincent Lefevre, patch by Daniel Jacobowitz, Debian
+ #227586).
+ + correct a place in tack where exit_standout_mode was used instead of
+ exit_attribute_mode (patch by Jochen Voss, Debian #224443).
+ + modify c++/cursesf.h to use const in the Enumeration_Field method.
+ + remove an ambiguous (actually redundant) method from c++/cursesf.h
+ + make $HOME/.terminfo update optional (suggested by Stanislav Ievlev).
+ + improve sed script which extracts libtool's version in the
+ CF_WITH_LIBTOOL macro.
+ + add ifdef'd call to AC_PROG_LIBTOOL to CF_WITH_LIBTOOL macro (to
+ simplify local patch for Albert Chin-A-Young)..
+ + add $(CXXFLAGS) to link command in c++/Makefile.in (adapted from
+ patch by Albert Chin-A-Young)..
+ + fix a missing substitution in configure.in for "$target" needed for
+ HPUX .so/.sl case.
+ + resync CF_XOPEN_SOURCE configure macro with lynx; fixes IRIX64 and
+ NetBSD 1.6 conflicts with _XOPEN_SOURCE.
+ + make check for stdbool.h more specific, to ensure that including it
+ will actually define/declare bool for the configured compiler.
+ + rewrite ifdef's in curses.h relating NCURSES_BOOL and bool. The
+ intention of that is to #define NCURSES_BOOL as bool when the
+ compiler declares bool, and to #define bool as NCURSES_BOOL when it
+ does not (reported by Jim Gifford, Sam Varshavchik, cf: 20031213).
+
+20040110 pre-release
+ + change minor version to 4, i.e., ncurses 5.4
+ + revised/improved terminfo entries for tvi912b, tvi920b (Benjamin C W
+ Sittler).
+ + simplified ncurses/base/version.c by defining the result from the
+ configure script rather than using sprintf (suggested by Stanislav
+ Ievlev).
+ + remove obsolete casts from c++/cursesw.h (reported by Stanislav
+ Ievlev).
+ + modify configure script so that when configuring for termlib, programs
+ such as tic are not linked with the upper-level ncurses library
+ (suggested by Stanislav Ievlev).
+ + move version.c from ncurses/base to ncurses/tinfo to allow linking
+ of tic, etc., using libtinfo (suggested by Stanislav Ievlev).
+
+20040103
+ + adjust -D's to build ncursesw on OpenBSD.
+ + modify CF_PROG_EXT to make OS/2 build with EXEEXT.
+ + add pecho_wchar().
+ + remove <wctype.h> include from lib_slk_wset.c which is not needed (or
+ available) on older platforms.
+
+20031227
+ + add -D's to build ncursew on FreeBSD 5.1.
+ + modify shared library configuration for FreeBSD 4.x/5.x to add the
+ soname information (request by Marc Glisse).
+ + modify _nc_read_tic_entry() to not use MAX_ALIAS, but PATH_MAX only
+ for limiting the length of a filename in the terminfo database.
+ + modify termname() to return the terminal name used by setupterm()
+ rather than $TERM, without truncating to 14 characters as documented
+ by X/Open (report by Stanislav Ievlev, cf: 970719).
+ + re-add definition for _BSD_TYPES, lost in merge (cf: 20031206).
+
+20031220
+ + add configure option --with-manpage-format=catonly to address
+ behavior of BSDI, allow install of man+cat files on NetBSD, whose
+ behavior has diverged by requiring both to be present.
+ + remove leading blanks from comment-lines in manlinks.sed script to
+ work with Tru64 4.0d.
+ + add screen.linux terminfo entry (discussion on mutt-users mailing
+ list).
+
+20031213
+ + add a check for tic to flag missing backslashes for termcap
+ continuation lines. ncurses reads the whole entry, but termcap
+ applications do not.
+ + add configure option "--with-manpage-aliases" extending
+ "--with-manpage-aliases" to provide the option of generating ".so"
+ files rather than symbolic links for manpage aliases.
+ + add bool definition in include/curses.h.in for configurations with no
+ usable C++ compiler (cf: 20030607).
+ + fix pathname of SigAction.h for building with --srcdir (reported by
+ Mike Castle).
+
+20031206
+ + folded ncurses/base/sigaction.c into includes of ncurses/SigAction.h,
+ since that header is used only within ncurses/tty/lib_tstp.c, for
+ non-POSIX systems (discussion with Stanislav Ievlev).
+ + remove obsolete _nc_outstr() function (report by Stanislav Ievlev
+ <inger@altlinux.org>).
+ + add test/background.c and test/color_set.c
+ + modify color_set() function to work with color pair 0 (report by
+ George Andreou <gbandreo@tem.uoc.gr>).
+ + add configure option --with-trace, since defining TRACE seems too
+ awkward for some cases.
+ + remove a call to _nc_free_termtype() from read_termtype(), since the
+ corresponding buffer contents were already zeroed by a memset (cf:
+ 20000101).
+ + improve configure check for _XOPEN_SOURCE and related definitions,
+ adding special cases for Solaris' __EXTENSIONS__ and FreeBSD's
+ __BSD_TYPES (reports by Marc Glisse <marc.glisse@normalesup.org>).
+ + small fixes to compile on Solaris and IRIX64 using cc.
+ + correct typo in check for pre-POSIX sort options in MKkey_defs.sh
+ (cf: 20031101).
+
+20031129
+ + modify _nc_gettime() to avoid a problem with arithmetic on unsigned
+ values (Philippe Blain).
+ + improve the nanosleep() logic in napms() by checking for EINTR and
+ restarting (Philippe Blain).
+ + correct expression for "%D" in lib_tgoto.c (Juha Jarvi
+ <mooz@welho.com>).
+
+20031122
+ + add linux-vt terminfo entry (Andrey V Lukyanov <land@long.yar.ru>).
+ + allow "\|" escape in terminfo; tic should not warn about this.
+ + save the full pathname of the trace-file the first time it is opened,
+ to avoid creating it in different directories if the application
+ opens and closes it while changing its working directory.
+ + modify configure script to provide a non-empty default for
+ $BROKEN_LINKER
+
+20031108
+ + add DJGPP to special case of DOS-style drive letters potentially
+ appearing in TERMCAP environment variable.
+ + fix some spelling in comments (reports by jmc, Jonathon Gray).
+ + update config.guess, config.sub
+
+20031101
+ + fix a memory leak in error-return from setupterm() (report by
+ Stanislav Ievlev <inger@altlinux.org>).
+ + use EXEEXT and OBJEXT consistently in makefiles.
+ + amend fixes for cross-compiling to use separate executable-suffix
+ BUILD_EXEEXT (cf: 20031018).
+ + modify MKkey_defs.sh to check for sort utility that does not
+ recognize key options, e.g., busybox (report by Peter S Mazinger
+ <ps.m@gmx.net>).
+ + fix potential out-of-bounds indexing in _nc_infotocap() (found by
+ David Krause using some of the new malloc debugging features
+ under OpenBSD, patch by Ted Unangst).
+ + modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use a
+ ".so" suffix (patch by Jonathan Ward <Jonathan.Ward@hp.com>).
+
+20031025
+ + update terminfo for xterm-xfree86 -TD
+ + add check for multiple "tc=" clauses in a termcap to tic.
+ + check for missing op/oc in tic.
+ + correct _nc_resolve_uses() and _nc_merge_entry() to allow infocmp and
+ tic to show cancelled capabilities. These functions were ignoring
+ the state of the target entry, which should be untouched if cancelled.
+ + correct comment in tack/output.c (Debian #215806).
+ + add some null-pointer checks to lib_options.c (report by Michael
+ Bienia).
+ + regenerated html documentation.
+ + correction to tar-copy.sh, remove a trap command that resulted in
+ leaving temporary files (cf: 20030510).
+ + remove contact/maintainer addresses for Juergen Pfeifer (his request).
+
+20031018
+ + updated test/configure to reflect changes for libtool (cf: 20030830).
+ + fix several places in tack/pad.c which tested and used the parameter-
+ and parameterless strings inconsistently, i.e., in pad_rin(),
+ pad_il(), pad_indn() and pad_dl() (Debian #215805).
+ + minor fixes for configure script and makefiles to cleanup executables
+ generated when cross-compiling for DJGPP.
+ + modify infocmp to omit check for $TERM for operations that do not
+ require it, e.g., "infocmp -e" used to build fallback list (report by
+ Koblinger Egmont).
+
+20031004
+ + add terminfo entries for DJGPP.
+ + updated note about maintainer in ncurses-intro.html
+
+20030927
+ + update terminfo entries for gnome terminal.
+ + modify tack to reset colors after each color test, correct a place
+ where exit_standout_mode was used instead of exit_attribute_mode.
+ + improve tack's bce test by making it set colors other than black
+ on white.
+ + plug a potential recursion between napms() and _nc_timed_wait()
+ (report by Philippe Blain).
+
+20030920
+ + add --with-rel-version option to allow workaround to allow making
+ libtool on Darwin generate the "same" library names as with the
+ --with-shared option. The Darwin ld program does not work well
+ with a zero as the minor-version value (request by Chris Zubrzycki).
+ + modify CF_MIXEDCASE_FILENAMES macro to work with cross-compiling.
+ + modify tack to allow it to run from fallback terminfo data.
+ > Philippe Blain:
+ + improve PutRange() by adjusting call to EmitRange() and corresponding
+ return-value to not emit unchanged characters on the end of the
+ range.
+ + improve a check for changed-attribute by exiting a loop when the
+ change is found.
+ + improve logic in TransformLine(), eliminating a duplicated comparison
+ in the clr_bol logic.
+
+20030913
+ > Philippe Blain:
+ + in ncurses/tty/lib_mvcur.c,
+ move the label 'nonlocal' just before the second gettimeofday() to
+ be able to compute the diff time when 'goto nonlocal' used.
+ Rename 'msec' to 'microsec' in the debug-message.
+ + in ncurses/tty/lib_mvcur.c,
+ Use _nc_outch() in carriage return/newline movement instead of
+ putchar() which goes to stdout. Move test for xold>0 out of loop.
+ + in ncurses/tinfo/setbuf.c,
+ Set the flag SP->_buffered at the end of operations when all has been
+ successful (typeMalloc can fail).
+ + simplify NC_BUFFERED macro by moving check inside _nc_setbuf().
+
+20030906
+ + modify configure script to avoid using "head -1", which does not
+ work if POSIXLY_CORRECT (sic) is set.
+ + modify run_tic.in to avoid using wrong shared libraries when
+ cross-compiling (Dan Kegel).
+
+20030830
+ + alter configure script help message to make it clearer that
+ --with-build-cc does not specify a cross-compiler (suggested by Dan
+ Kegel <dank@kegel.com>).
+ + modify configure script to accommodate libtool 1.5, as well as add an
+ parameter to the "--with-libtool" option which can specify the
+ pathname of libtool (report by Chris Zubrzycki). We note that
+ libtool 1.5 has more than one bug in its C++ support, so it is not
+ able to install libncurses++, for instance, if $DESTDIR or the option
+ --with-install-prefix is used.
+
+20030823
+ > Philippe Blain:
+ + move assignments to SP->_cursrow, SP->_curscol into online_mvcur().
+ + make baudrate computation in delay_output() consistent with the
+ assumption in _nc_mvcur_init(), i.e., a byte is 9 bits.
+
+20030816
+ + modify logic in waddch_literal() to take into account zh_TW.Big5
+ whose multibyte sequences may contain "printable" characters, e.g.,
+ a "g" in the sequence "\247g" (Debian #204889, cf: 20030621).
+ + improve storage used by _nc_safe_strcpy() by ensuring that the size
+ is reset based on the initialization call, in case it were called
+ after other strcpy/strcat calls (report by Philippe Blain).
+ > Philippe Blain:
+ + remove an unused ifdef for REAL_ATTR & WANT_CHAR
+ + correct a place where _cup_cost was used rather than _cuu_cost
+
+20030809
+ + fix a small memory leak in _nc_free_termtype().
+ + close trace-file if trace() is called with a zero parameter.
+ + free memory allocated for soft-key strings, in delscreen().
+ + fix an allocation size in safe_sprintf.c for the "*" format code.
+ + correct safe_sprintf.c to not return a null pointer if the format
+ happens to be an empty string. This applies to the "configure
+ --enable-safe-sprintf" option (Redhat #101486).
+
+20030802
+ + modify casts used for ABSENT_BOOLEAN and CANCELLED_BOOLEAN (report by
+ Daniel Jacobowitz).
+ > Philippe Blain:
+ + change padding for change_scroll_region to not be proportional to
+ the size of the scroll-region.
+ + correct error-return in _nc_safe_strcat().
+
+20030726
+ + correct limit-checks in _nc_scroll_window() (report and test-case by
+ Thomas Graf <graf@dms.at> cf: 20011020).
+ + re-order configure checks for _XOPEN_SOURCE to avoid conflict with
+ _GNU_SOURCE check.
+
+20030719
+ + use clr_eol in preference to blanks for bce terminals, so select and
+ paste will have fewer trailing blanks, e.g., when using xterm
+ (request by Vincent Lefevre).
+ + correct prototype for wunctrl() in manpage.
+ + add configure --with-abi-version option (discussion with Charles
+ Wilson).
+ > cygwin changes from Charles Wilson:
+ + aclocal.m4: on cygwin, use autodetected prefix for import
+ and static lib, but use "cyg" for DLL.
+ + include/ncurses_dll.h: correct the comments to reflect current
+ status of cygwin/mingw port. Fix compiler warning.
+ + misc/run_tic.in: ensure that tic.exe can find the uninstalled
+ DLL, by adding the lib-directory to the PATH variable.
+ + misc/terminfo.src (nxterm|xterm-color): make xterm-color
+ primary instead of nxterm, to match XFree86's xterm.terminfo
+ usage and to prevent circular links.
+ (rxvt): add additional codes from rxvt.org.
+ (rxvt-color): new alias
+ (rxvt-xpm): new alias
+ (rxvt-cygwin): like rxvt, but with special acsc codes.
+ (rxvt-cygwin-native): ditto. rxvt may be run under XWindows, or
+ with a "native" MSWin GUI. Each takes different acsc codes,
+ which are both different from the "normal" rxvt's acsc.
+ (cygwin): cygwin-in-cmd.exe window. Lots of fixes.
+ (cygwinDBG): ditto.
+ + mk-1st.awk: use "cyg" for the DLL prefix, but "lib" for import
+ and static libs.
+
+20030712
+ + update config.guess, config.sub
+ + add triples for configuring shared libraries with the Debian
+ GNU/FreeBSD packages (patch by Robert Millan <zeratul2@wanadoo.es>).
+
+20030705
+ + modify CF_GCC_WARNINGS so it only applies to gcc, not g++. Some
+ platforms have installed g++ along with the native C compiler, which
+ would not accept gcc warning options.
+ + add -D_XOPEN_SOURCE=500 when configuring with --enable-widec, to
+ get mbstate_t declaration on HPUX 11.11 (report by David Ellement).
+ + add _nc_pathlast() to get rid of casts in _nc_basename() calls.
+ + correct a sign-extension in wadd_wch() and wecho_wchar() from
+ 20030628 (report by Tomohiro KUBOTA).
+ + work around omission of btowc() and wctob() from wide-character
+ support (sic) in NetBSD 1.6 using mbtowc() and wctomb() (report by
+ Gabor Z Papp).
+ + add portability note to curs_get_wstr.3x (Debian #199957).
+
+20030628
+ + rewrite wadd_wch() and wecho_wchar() to call waddch() and wechochar()
+ respectively, to avoid calling waddch_noecho() with wide-character
+ data, since that function assumes its input is 8-bit data.
+ Similarly, modify waddnwstr() to call wadd_wch().
+ + remove logic from waddnstr() which transformed multibyte character
+ strings into wide-characters. Rewrite of waddch_literal() from
+ 20030621 assumes its input is raw multibyte data rather than wide
+ characters (report by Tomohiro KUBOTA).
+
+20030621
+ + write getyx() and related 2-return macros in terms of getcury(),
+ getcurx(), etc.
+ + modify waddch_literal() in case an application passes bytes of a
+ multibyte character directly to waddch(). In this case, waddch()
+ must reassemble the bytes into a wide-character (report by Tomohiro
+ KUBOTA <kubota@debian.org>).
+
+20030614
+ + modify waddch_literal() in case a multibyte value occupies more than
+ two cells.
+ + modify PutAttrChar() to compute the number of character cells that
+ are used in multibyte values. This fixes a problem displaying
+ double-width characters (report/test by Mitsuru Chinen
+ <mchinen@yamato.ibm.com>).
+ + add a null-pointer check for result of keyname() in _tracechar()
+ + modify _tracechar() to work around glibc sprintf bug.
+
+20030607
+ + add a call to setlocale() in cursesmain.cc, making demo display
+ properly in a UTF-8 locale.
+ + add a fallback definition in curses.priv.h for MB_LEN_MAX (prompted
+ by discussion with Gabor Z Papp).
+ + use macros NCURSES_ACS() and NCURSES_WACS() to hide cast needed to
+ appease -Wchar-subscript with g++ 3.3 (Debian #195732).
+ + fix a redefinition of $RANLIB in the configure script when libtool
+ is used, which broke configure on Mac OS X (report by Chris Zubrzycki
+ <beren@mac.com>).
+ + simplify ifdef for bool declaration in curses.h.in (suggested by
+ Albert Chin-A-Young).
+ + remove configure script check to allow -Wconversion for older
+ versions of gcc (suggested by Albert Chin-A-Young).
+
+20030531
+ + regenerated html manpages.
+ + modify ifdef's in curses.h.in that disabled use of __attribute__()
+ for g++, since recent versions implement the cases which ncurses uses
+ (Debian #195230).
+ + modify _nc_get_token() to handle a case where an entry has no
+ description, and capabilities begin on the same line as the entry
+ name.
+ + fix a typo in ncurses_dll.h reported by gcc 3.3.
+ + add an entry for key_defined.3x to man_db.renames.
+
+20030524
+ + modify setcchar() to allow converting control characters to complex
+ characters (report/test by Mitsuru Chinen <mchinen@yamato.ibm.com>).
+ + add tkterm entry -TD
+ + modify parse_entry.c to allow a terminfo entry with a leading
+ 2-character name (report by Don Libes).
+ + corrected acsc in screen.teraterm, which requires a PC-style mapping.
+ + fix trace statements in read_entry.c to use lseek() rather than
+ tell().
+ + fix signed/unsigned warnings from Sun's compiler (gcc should give
+ these warnings, but it is unpredictable).
+ + modify configure script to omit -Winline for gcc 3.3, since that
+ feature is broken.
+ + modify manlinks.sed to add a few functions that were overlooked since
+ they return function pointers: field_init, field_term, form_init,
+ form_term, item_init, item_term, menu_init and menu_term.
+
+20030517
+ + prevent recursion in wgetch() via wgetnstr() if the connection cannot
+ be switched between cooked/raw modes because it is not a TTY (report
+ by Wolfgang Gutjahr <gutw@knapp.com>).
+ + change parameter of define_key() and key_defined() to const (prompted
+ by Debian #192860).
+ + add a check in test/configure for ncurses extensions, since there
+ are some older versions, etc., which would not compile with the
+ current test programs.
+ + corrected demo in test/ncurses.c of wgetn_wstr(), which did not
+ convert wchar_t string to multibyte form before printing it.
+ + corrections to lib_get_wstr.c:
+ + null-terminate buffer passed to setcchar(), which occasionally
+ failed.
+ + map special characters such as erase- and kill-characters into
+ key-codes so those will work as expected even if they are not
+ mentioned in the terminfo.
+ + modify PUTC() and Charable() macros to make wide-character line
+ drawing work for POSIX locale on Linux console (cf: 20021221).
+
+20030510
+ + make typography for program options in manpages consistent (report
+ by Miloslav Trmac <mitr@volny.cz>).
+ + correct dependencies in Ada95/src/Makefile.in, so the builds with
+ "--srcdir" work (report by Warren L Dodge).
+ + correct missing definition of $(CC) in Ada95/gen/Makefile.in
+ (reported by Warren L Dodge <warrend@mdhost.cse.tek.com>).
+ + fix typos and whitespace in manpages (patch by jmc
+ <jmc@prioris.mini.pw.edu.pl>).
+
+20030503
+ + fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, REQ_DEL_CHAR,
+ REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure the cursor was at
+ the editing position before making modifications.
+ + add test/demo_forms and associated test/edit_field.c demos.
+ + modify test/configure.in to use test/modules for the list of objects
+ to compile rather than using the list of programs.
+
+20030419
+ + modify logic of acsc to use the original character if no mapping is
+ defined, noting that Solaris does this.
+ + modify ncurses 'b' test to avoid using the acs_map[] array since
+ 20021231 changes it to no longer contain information from the acsc
+ string.
+ + modify makefile rules in c++, progs, tack and test to ensure that
+ the compiler flags (e.g., $CFLAGS or $CCFLAGS) are used in the link
+ command (report by Jose Luis Rico Botella <informatica@serpis.com>).
+ + modify soft-key initialization to use A_REVERSE if A_STANDOUT would
+ not be shown when colors are used, i.e., if ncv#1 is set in the
+ terminfo as is done in "screen".
+
+20030412
+ + add a test for slk_color(), in ncurses.c
+ + fix some issues reported by valgrind in the slk_set() and slk_wset()
+ code, from recent rewrite.
+ + modify ncurses 'E' test to use show previous label via slk_label(),
+ as in 'e' test.
+ + modify wide-character versions of NewChar(), NewChar2() macros to
+ ensure that the whole struct is initialized.
+
+20030405
+ + modify setupterm() to check if the terminfo and terminal-modes have
+ already been read. This ensures that it does not reinvoke
+ def_prog_mode() when an application calls more than one function,
+ such as tgetent() and initscr() (report by Olaf Buddenhagen).
+
+20030329
+ + add 'E' test to ncurses.c, to exercise slk_wset().
+ + correct handling of carriage-return in wgetn_wstr(), used in demo of
+ slk_wset().
+ + first draft of slk_wset() function.
+
+20030322
+ + improved warnings in tic when suppressing items to fit in termcap's
+ 1023-byte limit.
+ + built a list in test/README showing which externals are being used
+ by either programs in the test-directory or via internal library
+ calls.
+ + adjust include-options in CF_ETIP_DEFINES to avoid missing
+ ncurses_dll.h, fixing special definitions that may be needed for
+ etip.h (reported by Greg Schafer <gschafer@zip.com.au>).
+
+20030315
+ + minor fixes for cardfile.c, to make it write the updated fields to
+ a file when ^W is given.
+ + add/use _nc_trace_bufcat() to eliminate some fixed buffer limits in
+ trace code.
+
+20030308
+ + correct a case in _nc_remove_string(), used by define_key(), to avoid
+ infinite loop if the given string happens to be a substring of other
+ strings which are assigned to keys (report by John McCutchan).
+ + add key_defined() function, to tell which keycode a string is bound
+ to (discussion with John McCutchan <ttb@tentacle.dhs.org>).
+ + correct keybound(), which reported definitions in the wrong table,
+ i.e., the list of definitions which are disabled by keyok().
+ + modify demo_keydef.c to show the details it changes, and to check
+ for errors.
+
+20030301
+ + restructured test/configure script, make it work for libncursesw.
+ + add description of link_fieldtype() to manpage (report by
+ L Dee Holtsclaw <dee@sunbeltsoft.com>).
+
+20030222
+ + corrected ifdef's relating to configure check for wchar_t, etc.
+ + if the output is a socket or other non-tty device, use 1 millisecond
+ for the cost in mvcur; previously it was 9 milliseconds because the
+ baudrate was not known.
+ + in _nc_get_tty_mode(), initialize the TTY buffer on error, since
+ glibc copies uninitialized data in that case, as noted by valgrind.
+ + modify tput to use the same parameter analysis as tparm() does, to
+ provide for user-defined strings, e.g., for xterm title, a
+ corresponding capability might be
+ title=\E]2;%p1%s^G,
+ + modify MKlib_gen.sh to avoid passing "#" tokens through the C
+ preprocessor. This works around Mac OS X's preprocessor, which
+ insists on adding a blank on each side of the token (report/analysis
+ by Kevin Murphy <murphy@genome.chop.edu>).
+
+20030215
+ + add configure check for wchar_t and wint_t types, rather than rely
+ on preprocessor definitions. Also work around for gcc fixinclude
+ bug which creates a shadow copy of curses.h if it sees these symbols
+ apparently typedef'd.
+ + if database is disabled, do not generate run_tic.sh
+ + minor fixes for memory-leak checking when termcap is read.
+
+20030208
+ + add checking in tic for incomplete line-drawing character mapping.
+ + update configure script to reflect fix for AC_PROG_GCC_TRADITIONAL,
+ which is broken in autoconf 2.5x for Mac OS X 10.2.3 (report by
+ Gerben Wierda <Sherlock@rna.nl>).
+ + make return value from _nc_printf_string() consistent. Before,
+ depending on whether --enable-safe-sprintf was used, it might not be
+ cached for reallocating.
+
+20030201
+ + minor fixes for memory-leak checking in lib_tparm.c, hardscroll.c
+ + correct a potentially-uninitialized value if _read_termtype() does
+ not read as much data as expected (report by Wolfgang Rohdewald
+ <wr6@uni.de>).
+ + correct several places where the aclocal.m4 macros relied on cache
+ variable names which were incompatible (as usual) between autoconf
+ 2.13 and 2.5x, causing the test for broken-linker to give incorrect
+ results (reports by Gerben Wierda <Sherlock@rna.nl> and Thomas Esser
+ <te@dbs.uni-hannover.de>).
+ + do not try to open gpm mouse driver if standard output is not a tty;
+ the gpm library does not make this check (from bug report for dialog
+ by David Oliveira <davidoliveira@develop.prozone.ws>).
+
+20030125
+ + modified emx.src to correspond more closely to terminfo.src, added
+ emx-base to the latter -TD
+ + add configure option for FreeBSD sysmouse, --with-sysmouse, and
+ implement support for that in lib_mouse.c, lib_getch.c
+
+20030118
+ + revert 20030105 change to can_clear_with(), does not work for the
+ case where the update is made on cells which are blanks with
+ attributes, e.g., reverse.
+ + improve ifdef's to guard against redefinition of wchar_t and wint_t
+ in curses.h (report by Urs Jansen).
+
+20030111
+ + improve mvcur() by checking if it is safe to move when video
+ attributes are set (msgr), and if not, reset/restore attributes
+ within that function rather than doing it separately in the GoTo()
+ function in tty_update.c (suggested by Philippe Blain).
+ + add a message in run_tic.in to explain more clearly what does not
+ work when attempting to create a symbolic link for /usr/lib/terminfo
+ on OS/2 and other platforms with no symbolic links (report by John
+ Polterak).
+ + change several sed scripts to avoid using "\+" since it is not a BRE
+ (basic regular expression). One instance caused terminfo.5 to be
+ misformatted on FreeBSD (from a FreeBSD bug report by Kazuo Horikawa
+ <horikawa@FreeBSD.org>).
+ + correct misspelled 'wint_t' in curs_get_wch.3x (Michael Elkins).
+
+20030105
+ + improve description of terminfo operators, especially static/dynamic
+ variables (comments by Mark I Manning IV <mark4th@earthlink.net>).
+ + demonstrate use of FIELDTYPE by modifying test/ncurses 'r' test to
+ use the predefined TYPE_ALPHA field-type, and by defining a
+ specialized type for the middle initial/name.
+ + fix MKterminfo.sh, another workaround for POSIXLY_CORRECT misfeature
+ of sed 4.0
+ > Philippe Blain:
+ + optimize can_clear_with() a little by testing first if the parameter
+ is indeed a "blank".
+ + simplify ClrBottom() a little by allowing it to use clr_eos to clear
+ sections as small as one line.
+ + improve ClrToEOL() by checking if clr_eos is available before trying
+ to use it.
+ + use tputs() rather than putp() in a few cases in tty_update.c since
+ the corresponding delays are proportional to the number of lines
+ affected: repeat_char, clr_eos, change_scroll_region.
+
+20021231
+ + rewrite of lib_acs.c conflicts with copying of SCREEN acs_map to/from
+ global acs_map[] array; removed the lines that did the copying.
+
+20021228
+ + change some overlooked tputs() calls in scrolling code to use putp()
+ (report by Philippe Blain).
+ + modify lib_getch.c to avoid recursion via wgetnstr() when the input
+ is not a tty and consequently mode-changes do not work (report by
+ <R.Chamberlin@querix.com>).
+ + rewrote lib_acs.c to allow PutAttrChar() to decide how to render
+ alternate-characters, i.e., to work with Linux console and UTF-8
+ locale.
+ + correct line/column reference in adjust_window(), needed to make
+ special windows such as curscr track properly when resizing (report
+ by Lucas Gonze <lgonze@panix.com>).
+ > Philippe Blain:
+ + correct the value used for blank in ClrBottom() (broken in 20000708).
+ + correct an off-by-one in GoTo() parameter in _nc_scrolln().
+
+20021221
+ + change several tputs() calls in scrolling code to use putp(), to
+ enable padding which may be needed for some terminals (patch by
+ by Philippe Blain).
+ + use '%' as sed substitute delimiter in run_tic script to avoid
+ problems with pathname delimiters such as ':' and '@' (report by John
+ Polterak).
+ + implement a workaround so that line-drawing works with screen's
+ crippled UTF-8 support (tested with 3.9.13). This only works with
+ the wide-character support (--enable-widec); the normal library will
+ simply suppress line-drawing when running in a UTF-8 locale in screen.
+
+20021214
+ + allow BUILD_CC and related configure script variables to be
+ overridden from the environment.
+ + make build-tools variables in ncurses/Makefile.in consistent with
+ the configure script variables (report by Maciej W Rozycki).
+ + modify ncurses/modules to allow
+ configure --disable-leaks --disable-ext-funcs
+ to build (report by Gary Samuelson).
+ + fix a few places in configure.in which lacked quotes (report by
+ Gary Samuelson <gary.samuelson@verizon.com>).
+ + correct handling of multibyte characters in waddch_literal() which
+ force wrapping because they are started too late on the line (report
+ by Sam Varshavchik).
+ + small fix for CF_GNAT_VERSION to ignore the help-message which
+ gnatmake adds to its version-message.
+ > Maciej W Rozycki <macro@ds2.pg.gda.pl>:
+ + use AC_CHECK_TOOL to get proper values for AR and LD for cross
+ compiling.
+ + use $cross_compiling variable in configure script rather than
+ comparing $host_alias and $target alias, since "host" is
+ traditionally misused in autoconf to refer to the target platform.
+ + change configure --help message to use "build" rather than "host"
+ when referring to the --with-build-XXX options.
+
+20021206
+ + modify CF_GNAT_VERSION to print gnatmake's version, and to allow for
+ possible gnat versions such as 3.2 (report by Chris Lingard
+ <chris@stockwith.co.uk>).
+ + modify #define's for CKILL and other default control characters in
+ tset to use the system's default values if they are defined.
+ + correct interchanged defaults for kill and interrupt characters
+ in tset, which caused it to report unnecessarily (Debian #171583).
+ + repair check for missing C++ compiler, which is broken in autoconf
+ 2.5x by hardcoding it to g++ (report by Martin Mokrejs).
+ + update config.guess, config.sub (2002-11-30)
+ + modify configure script to skip --with-shared, etc., when the
+ --with-libtool option is given, since they would be ignored anyway.
+ + fix to allow "configure --with-libtool --with-termlib" to build.
+ + modify configure script to show version number of libtool, to help
+ with bug reports. libtool still gets confused if the installed
+ ncurses libraries are old, since it ignores the -L options at some
+ point (tested with libtool 1.3.3 and 1.4.3).
+ + reorder configure script's updating of $CPPFLAGS and $CFLAGS to
+ prevent -I options in the user's environment from introducing
+ conflicts with the build -I options (may be related to reports by
+ Patrick Ash and George Goffe).
+ + rename test/define_key.c to test/demo_defkey.c, test/keyok.c to
+ test/demo_keyok.c to allow building these with libtool.
+
+20021123
+ + add example program test/define_key.c for define_key().
+ + add example program test/keyok.c for keyok().
+ + add example program test/ins_wide.c for wins_wch() and wins_wstr().
+ + modify wins_wch() and wins_wstr() to interpret tabs by using the
+ winsch() internal function.
+ + modify setcchar() to allow for wchar_t input strings that have
+ more than one spacing character.
+
+20021116
+ + fix a boundary check in lib_insch.c (patch by Philippe Blain).
+ + change type for *printw functions from NCURSES_CONST to const
+ (prompted by comment by Pedro Palhoto Matos <plpm@mega.ist.utl.pt>,
+ but really from a note on X/Open's website stating that either is
+ acceptable, and the latter will be used in a future revision).
+ + add xterm-1002, xterm-1003 terminfo entries to demonstrate changes in
+ lib_mouse.c (20021026) -TD
+ + add screen-bce, screen-s entries from screen 3.9.13 (report by
+ Adam Lazur <zal@debian.org>) -TD
+ + add mterm terminfo entries -TD
+
+20021109
+ + split-out useful fragments in terminfo for vt100 and vt220 numeric
+ keypad, i.e., vt100+keypad, vt100+pfkeys, vt100+fnkeys and
+ vt220+keypad. The last as embedded in various entries had ka3 and
+ kb2 interchanged (report/discussion with Leonard den Ottolander
+ <leonardjo@hetnet.nl>).
+ + add check in tic for keypads consistent with vt100 layout.
+ + improve checks in tic for color capabilities
+
+20021102
+ + check for missing/empty/illegal terminfo name in _nc_read_entry()
+ (report by Martin Mokrejs, where $TERM was set to an empty string).
+ + rewrote lib_insch.c, combining it with lib_insstr.c so both handle
+ tab and other control characters consistently (report by Philippe
+ Blain).
+ + remove an #undef for KEY_EVENT from curses.tail used in the
+ experimental NCURSES_WGETCH_EVENTS feature. The #undef confuses
+ dpkg's build script (Debian #165897).
+ + fix MKlib_gen.sh, working around the ironically named POSIXLY_CORRECT
+ feature of GNU sed 4.0 (reported by Ervin Nemeth <airwin@inf.bme.hu>).
+
+20021026
+ + implement logic in lib_mouse.c to handle position reports which are
+ generated when XFree86 xterm is initialized with private modes 1002
+ or 1003. These are returned to the application as the
+ REPORT_MOUSE_POSITION mask, which was not implemented. Tested both
+ with ncurses 'a' menu (prompted by discussion with Larry Riedel
+ <Larry@Riedel.org>).
+ + modify lib_mouse.c to look for "XM" terminfo string, which allows
+ one to override the escape sequence used to enable/disable mouse
+ mode. In particular this works for XFree86 xterm private modes
+ 1002 and 1003. If "XM" is missing (note that this is an extended
+ name), lib_mouse uses the conventional private mode 1000.
+ + correct NOT_LOCAL() macro in lib_mvcur.c to refer to screen_columns
+ where it used screen_lines (report by Philippe Blain).
+ + correct makefile rules for the case when both --with-libtool and
+ --with-gpm are given (report by Mr E_T <troll@logi.net.au>).
+ + add note to terminfo manpage regarding the differences between
+ setaf/setab and setf/setb capabilities (report by Pavel Roskin).
+
+20021019
+ + remove redundant initialization of TABSIZE in newterm(), since it is
+ already done in setupterm() (report by Philippe Blain).
+ + add test/inserts.c, to test winnstr() and winsch().
+ + replace 'sort' in dist.mk with script that sets locale to POSIX.
+ + update URLs in announce.html.in (patch by Frederic L W Meunier).
+ + remove glibc add-on files, which are no longer needed (report by
+ Frederic L W Meunier).
+
+20021012 5.3 release for upload to ftp.gnu.org
+ + modify ifdef's in etip.h.in to allow the etip.h header to compile
+ with gcc 3.2 (patch by Dimitar Zhekov <jimmy@is-vn.bg>).
+ + add logic to setupterm() to make it like initscr() and newterm(),
+ by checking for $NCURSES_TRACE environment variable and enabling
+ the debug trace in that case.
+ + modify setupterm() to ensure that it initializes the baudrate, for
+ applications such as tput (report by Frank Henigman).
+ + modify definition of bits used for command-line and library debug
+ traces to avoid overlap, using new definition TRACE_SHIFT to relate
+ the two.
+ + document tput's interpretation of parameterized strings according to
+ whether parameters are given, etc. (discussion with Robert De Bath).
+
+20021005 pre-release
+ + correct winnwstr() to account for non-character cells generated when
+ a double-width character is added (report by Michael Bienia
+ <michael@vorlon.ping.de>).
+ + modify _nc_viswbuf2n() to provide better results using wctomb().
+ + correct logic in _nc_varargs() which broke tracing of parameters for
+ formats such as "%.*s".
+ + correct scale factor in linux-c and linux-c-nc terminfo entries
+ (report Floyd Davidson).
+ + change tic -A option to -t, add the same option to infocmp for
+ consistency.
+ + correct "%c" implementation in lib_tparm.c, which did not map a null
+ character to a 128 (cf: 980620) (patch by Frank Henigman
+ <fjhenigman@mud.cgl.uwaterloo.ca>).
+
+20020928 pre-release
+ + modify MKkey_defs.sh to check for POSIX sort -k option, use that if
+ it is found, to accommodate newer utility which dropped the
+ compatibility support for +number options (reported by Andrey A
+ Chernov).
+ + modify linux terminfo entry to use color palette feature from
+ linux-c-nc entry (comments by Tomasz Wasiak and Floyd Davidson).
+ + restore original color definitions in endwin() if init_color() was
+ used, and resume those colors on the next doupdate() or refresh()
+ (report by Tomasz Wasiak <tjwasiak@komputom.com.pl>).
+ + improve debug-traces by modifying MKlib_gen.sh to generate calls
+ to returnBool() and returnAttr().
+ + add/use _nc_visbufn() and _nc_viswbufn() to limit the debug trace
+ of waddnstr() and similar functions to match the parameters as used.
+ + add/use _nc_retrace_bool() and _nc_retrace_unsigned().
+ + correct type used by _nc_retrace_chtype().
+ + add debug traces to some functions in lib_mouse.c
+ + modify lib_addch.c to handle non-spacing characters.
+ + correct parameter of RemAttr() in lib_bkgd.c, which caused the c++
+ demo's boxes to lose the A_ALTCHARSET flag (broken in 20020629).
+ + correct width computed in _tracedump(), which did not account for
+ the attributes (broken in 20010602).
+ + modify test/tracemunch to replace addresses for windows other than
+ curscr, newscr and stdscr with window0, window1, etc.
+
+20020921 pre-release
+ + redid fix for edit_man.sed path.
+ + workaround for Cygwin bug which makes subprocess writes to stdout
+ result in core dump.
+ + documented getbegx(), etc.
+ + minor fixes to configure script to use '%' consistently as a sed
+ delimiter rather than '@'.
+ > Philippe Blain:
+ + add check in lib_overlay.c to ensure that the windows to be merged
+ actually overlap, and in copywin(), limit the area to be touched
+ to the lines given for the destination window.
+
+20020914 pre-release
+ + modified curses.h so that if the wide-character version is installed
+ overwriting /usr/include/curses.h, and if it relied on libutf8.h,
+ then applications that use that header for wide-character support
+ must define HAVE_LIBUTF8_H.
+ + modify putwin(), getwin() and dupwin() to allow them to operate on
+ pads (request by Philippe Blain).
+ + correct attribute-merging in wborder(), broken in 20020216 (report
+ by Tomasz Wasiak <tjwasiak@grubasek.komputom.com.pl>).
+ > Philippe Blain:
+ + corrected pop-counts in tparam_internal() to '!' and '~' cases.
+ + use sizeof(NCURSES_CH_T) in one place that used sizeof(chtype).
+ + remove some unused variables from mvcur test-driver.
+
+20020907 pre-release
+ + change configure script to allow install of widec-character
+ (ncursesw) headers to overwrite normal (ncurses) headers, since the
+ latter is a compatible subset of the former.
+ + fix path of edit_man.sed in configure script, needed to regenerate
+ html manpages on Debian.
+ + fix mismatched enums in vsscanf.c, which caused warning on Solaris.
+ + update README.emx to reflect current patch used for autoconf.
+ + change web- and ftp-site to invisible-island.net
+ > Philippe Blain:
+ + change case for 'P' in tparam_internal() to indicate that it pops
+ a variable from the stack.
+ + correct sense of precision and width in parse_format(), to avoid
+ confusion.
+ + modify lib_tparm.c, absorb really_get_space() into get_space().
+ + modify getwin() and dupwin() to copy the _notimeout, _idlok and
+ _idcok window fields.
+ + better fix for _nc_set_type(), using typeMalloc().
+
+20020901 pre-release
+ + change minor version to 3, i.e., ncurses 5.3
+ + update config.guess, config.sub
+ + retest build with each configure option; minor ifdef fixes.
+ + make keyname() return a null pointer rather than "UNKNOWN STRING" to
+ match XSI.
+ + modify handling of wide line-drawing character functions to use the
+ normal line-drawing characters when not in UTF-8 locale.
+ + add check/fix to comp_parse.c to suppress warning about missing acsc
+ string. This happens in configurations where raw termcap information
+ is processed; tic already does this and other checks.
+ + modify tic's check for ich/ich1 versus rmir/smir to only warn about
+ ich1, to match xterm patch #70 notes.
+ + moved information for ripped-off lines into SCREEN struct to allow
+ use in resizeterm().
+ + add experimental wgetch_events(), ifdef'd with NCURSES_WGETCH_EVENTS
+ (adapted from patch by Ilya Zakharevich - see ncurses/README.IZ).
+ + amend check in kgetch() from 20020824 to look only for function-keys,
+ otherwise escape sequences are not resolved properly.
+ > Philippe Blain:
+ + removed redundant assignment to SP->_checkfd from newterm().
+ + check return-value of setupterm() in restartterm().
+ + use sizeof(NCURSES_CH_T) in a few places that used sizeof(chtype).
+ + prevent dupwin() from duplicating a pad.
+ + prevent putwin() from writing a pad.
+ + use typeRealloc() or typeMalloc() in preference to direct calls on
+ _nc_doalloc().
+
+20020824
+ + add a check in kgetch() for cooked characters in the fifo to avoid
+ calling fifo_push() when a KEY_RESIZE is available (report/analysis
+ by Sam Varshavchik <mrsam@courier-mta.com>).
+ + fix an overlooked case for bugzilla #68199 (Philippe Blain).
+ + ensure clearerr() is called before using ferror() e.g., in
+ lib_screen.c (report by Philippe Blain).
+
+20020817
+ + modify lib_screen.c and lib_newwin.c to maintain the SCREEN-specific
+ pointers for curscr/stdscr/newscr when scr_save() and scr_restore()
+ modify the global curscr/stdscr/newscr variables. Fixes Redhat
+ bugzilla #68199 dated 2002-07-07.
+ + add checks for null pointer in calls to tparm() and tgoto() based on
+ FreeBSD bug report. If ncurses were built with termcap support, and
+ the first call to tgoto() were a zero-length string, the result would
+ be a null pointer, which was not handled properly.
+ + correct a typo in terminfo.head, which gave the octal code for colon
+ rather than comma.
+ + remove the "tic -u" option from 20020810, since it did not account
+ for nested "tc=" clauses, and when that was addressed, was still
+ unsatisfactory.
+
+20020810
+ + add tic -A option to suppress capabilities which are commented out
+ when translating to termcap.
+ + add tic -u option to provide older behavior of "tc=" clauses.
+ + modified tic to expand all but the final "tc=" clause in a termcap
+ entry, to accommodate termcap libraries which do not handle multiple
+ tc clauses.
+ + correct typo in curs_inopts.3x regarding CS8/CS7 usage (report by
+ Philippe Blain).
+ + remove a couple of redundant uses of A_ATTRIBUTES in expressions
+ using AttrOf(), which already incorporates that mask (report by
+ Philippe Blain).
+ + document TABSIZE variable.
+ + add NCURSES_ASSUMED_COLORS environment variable, to allow users to
+ override compiled-in default black-on-white assumption used in
+ assume_default_colors().
+ + correct an off-by-one comparison against max_colors in COLORFGBG
+ logic.
+ + correct a use of uninitialized memory found by valgrind (reported by
+ Olaf Buddenhagen <olafBuddenhagen@web.de>).
+ + modified wresize() to ensure that a failed realloc will not corrupt
+ the window structure, and to make subwindows fit within the resized
+ window (completes Debian #87678, #101699)
+
+20020803
+ + fix an off-by-one in lib_pad.c check for limits of pad (patch by
+ Philippe Blain).
+ + revise logic for BeOS in lib_twait.c altered in 20011013 to restore
+ logic used by lib_getch.c's support for GPM or EMX mouse (report by
+ Philippe Blain)
+ + remove NCURSES_CONST from several prototypes in curses.wide, to make
+ the --enable-const --enable-widec configure options to work together
+ (report by George Goffe <grgoffe@yahoo.com>).
+
+20020727
+ + finish no-leak checking in cardfile.c, using this for testing changes
+ to resizeterm().
+ + simplify _nc_freeall() using delscreen().
+
+20020720
+ + check error-return from _nc_set_tty_mode() in _nc_initscr() and
+ reset_prog_mode() (report/patch by Philippe Blain).
+ + regenerate configure using patch for autoconf 2.52, to address
+ problem with identifying C++ bool type.
+ + correct/improve logic to produce an exit status for errors in tput,
+ which did not exit with an error when told to put a string not in the
+ current terminfo entry (report by David Gomez <david@pleyades.net>).
+ + modify configure script AC_OUTPUT() call to work around defect in
+ autoconf 2.52 which adds an ifdef'd include to the generated
+ configure definitions.
+ + remove fstat() check from scr_init(), which also fixes a missing
+ include for <sys/stat.h> from 20020713 (reported by David Ellement,
+ fix suggested by Philippe Blain).
+ + update curs_scanw.3x manpage to note that XSI curses differs from
+ SVr4 curses: return-values are incompatible.
+ + correct several prototypes in manpages which used const
+ inconsistently with the curses.h file, and removed spurious const's
+ in a few places from curses.h, e.g., for wbkgd() (report by Glenn
+ Maynard <glenn@zewt.org>).
+ + change internal type used by tparm() to long, to work with LP64 model.
+ + modify nc_alloc.h to allow building with g++, for testing.
+
+20020713
+ + add resize-handling to cardfile.c test program.
+ + altered resizeterm() to avoid having it fail when a child window
+ cannot be resized because it would be larger than its parent. (More
+ work must be done on this, but it works well enough to integrate).
+ + improve a limit-check in lib_refresh.c
+ + remove check in lib_screen.c relating dumptime to file's modification
+ times, since that would not necessarily work for remotely mounted
+ filesystems.
+ + modify lrtest to simplify debugging changes to resizeterm, e.g.,
+ t/T commands to enable/disable tracing.
+ + updated status of multibyte support in TO-DO.
+ + update contact info in source-files (patch by Juergen Pfeifer).
+
+20020706
+ + add Caps.hpux11, as an example.
+ + modify version_filter(), used to implement -R option for tic and
+ infocmp, to use computed array offsets based on the Caps.* file which
+ is actually configured, rather than constants which correspond to
+ the Caps file.
+ + reorganized lib_raw.c to avoid updating SP and cur_term state if the
+ functions fail (reported by Philippe Blain).
+ + add -Wundef to gcc warnings, adjust a few ifdef's to accommodate gcc.
+
+20020629
+ + correct parameters to setcchar() in ncurses.c (cf: 20020406).
+ + set locale in most test programs (view.c and ncurses.c were the
+ only ones).
+ + add configure option --with-build-cppflags (report by Maksim A
+ Nikulin <M.A.Nikulin@inp.nsk.su>).
+ + correct a typo in wide-character logic for lib_bkgnd.c (Philippe
+ Blain).
+ + modify lib_wacs.c to not cancel the acsc, smacs, rmacs strings when
+ in UTF-8 locale. Wide-character functions use Unicode values, while
+ narrow-character functions use the terminfo data.
+ + fix a couple of places in Ada95/samples which did not compile with
+ gnat 3.14
+ + modify mkinstalldirs so the DOS-pathname case is locale-independent.
+ + fix locale problem in MKlib_gen.sh by forcing related variables to
+ POSIX (C), using same approach as autoconf (set variables only if
+ they were set before). Update MKterminfo.sh and MKtermsort.sh to
+ match.
+
+20020622
+ + add charset to generated html.
+ + add mvterm entry, adapted from a FreeBSD bug-report by Daniel Rudy
+ <dcrudy@pacbell.net> -TD
+ + add rxvt-16color, ibm+16color entries -TD
+ + modify check in --disable-overwrite option so that it is used by
+ default unless the --prefix/$prefix value is not /usr, in attempt to
+ work around packagers, e.g., for Sun's freeware, who do not read the
+ INSTALL notes.
+
+20020615
+ + modify wgetch() to allow returning ungetch'd KEY_RESIZE as a function
+ key code in get_wch().
+ + extended resize-handling in test/ncurses 'a' menu to the entire
+ stack of windows created with 'w' commands.
+ + improve $COLORFGBG feature by interpreting an out-of-range color
+ value as an SGR 39 or 49, for foreground/background respectively.
+ + correct a typo in configure --enable-colorfgbg option, and move it
+ to the experimental section (cf: 20011208).
+
+20020601
+ + add logic to dump_entry.c to remove function-key definitions that do
+ not fit into the 1023-byte limit for generated termcaps. This makes
+ hds200 fit.
+ + more improvements to tic's warnings, including logic to ignore
+ differences between delay values in sgr strings.
+ + move definition of KEY_RESIZE into MKkeydefs.sh script, to
+ accommodate Caps.osf1r5 which introduced a conflicting definition.
+
+20020525
+ + add simple resize-handling in test/ncurses.c 'a' menu.
+ + fixes in keyname() and _tracechar() to handle negative values.
+ + make tic's warnings about mismatches in sgr strings easier to follow.
+ + correct tic checks for number of parameters in smgbp and smglp.
+ + improve scoansi terminfo entry, and add scoansi-new entry -TD
+ + add pcvt25-color terminfo entry -TD
+ + add kf13-kf48 strings to cons25w terminfo entry (reported by Stephen
+ Hurd <deuce@lordlegacy.org> in newsgroup lucky.freebsd.bugs) -TD
+ + add entrypoint _nc_trace_ttymode(), use this to distinguish the
+ Ottyb and Nttyb members of terminal (aka cur_term), for tracing.
+
+20020523
+ + correct and simplify logic for lib_pad.c change in 20020518 (reported
+ by Mike Castle).
+
+20020518
+ + fix lib_pad.c for case of drawing a double-width character which
+ falls off the left margin of the pad (patch by Kriang Lerdsuwanakij
+ <lerdsuwa@users.sourceforge.net>)
+ + modify configure script to work around broken gcc 3.1 "--version"
+ option, which adds unnecessary trash to the requested information.
+ + adjust ifdef's in case SIGWINCH is not defined, e.g., with DJGPP
+ (reported by Ben Decker <deckerben@freenet.de>).
+
+20020511
+ + implement vid_puts(), vid_attr(), term_attrs() based on the narrow-
+ character versions as well.
+ + implement erasewchar(), killwchar() based on erasechar() and
+ killchar().
+ + modify erasechar() and killchar() to return ERR if the value was
+ VDISABLE.
+ + correct a bug in wresize() in handling subwindows (based on patch by
+ Roger Gammans <rgammans@computer-surgery.co.uk>, report by Scott Beck
+ <scott@gossamer-threads.com>).
+ + improve test/tclock.c by making the second-hand update more often
+ if gettimeofday() is available.
+
+20020429
+ + workaround for Solaris sed with MKlib_gen.sh (reported by Andy
+ Tsouladze <andyt@mypoints.com>).
+
+20020427
+ + correct return-value from getcchar(), making it consistent with
+ Solaris and Tru64.
+ + reorder loops that generate makefile rules for different models vs
+ subsets so configure --with-termlib works again. This was broken by
+ logic added to avoid duplicate rules in changes to accommodate cygwin
+ dll's (reported by George.R.Goffe@seagate.com).
+ + update config.guess, config.sub
+
+20020421
+ + modify ifdef's in write_entry.c to allow use of symbolic links on
+ platforms with no hard links, e.g., BeOS.
+ + modify a few includes to allow compile with BeOS, which has stdbool.h
+ with a conflicting definition for 'bool' versus its OS.h definition.
+ + amend MKlib_gen.sh to work with gawk, which defines 'func' as an
+ alias for 'function'.
+
+20020420
+ + correct form of prototype for ripoffline().
+ + modify MKlib_gen.sh to test that all functions marked as implemented
+ can be linked.
+
+20020413
+ + add manpages: curs_get_wstr.3x, curs_in_wchstr.3x
+ + implement wgetn_wstr().
+ + implement win_wchnstr().
+ + remove redefinition of unget_wch() in lib_gen.c (reported by
+ Jungshik Shin <jshin@jtan.com>).
+
+20020406
+ + modified several of the test programs to allow them to compile with
+ vendor curses implementations (Solaris, AIX).
+
+20020323
+ + modified test/configure to allow configuring against ncursesw.
+ + change WACS_xxx definition to use address, to work like Tru64 curses.
+
+20020317
+ + add 'e' and 'm' toggles to 'a', 'A' tests in ncurses.c to demonstrate
+ effect of echo/noecho and meta modes.
+ + add 'A' test to ncurses.c to demonstrate wget_wch() and related
+ functions.
+ + add manpage: curs_get_wch.3x
+ + implement unget_wch().
+ + implement wget_wch().
+
+20020310
+ + regenerated html manpages.
+ + add manpages: curs_in_wch.3x, curs_ins_wch.3x, curs_ins_wstr.3x
+ + implement wins_wch().
+ + implement win_wch().
+ + implement wins_nwstr(), wins_wstr().
+
+20020309
+ + add manpages: curs_addwstr.3x, curs_winwstr.3x
+ + implement winnwstr(), winwstr().
+
+20020223
+ + add manpages: curs_add_wchstr.3x, curs_bkgrnd.3x
+ + document wunctrl, key_name.
+ + implement key_name().
+ + remove const's in lib_box.c incorrectly leftover after splitting off
+ lib_box_set.c
+ + update llib-lncurses, llib-ncursesw, fix configure script related to
+ these.
+
+20020218
+ + remove quotes on "SYNOPSIS" in man/curs_box_set.3x, which resulted
+ in spurious symlinks on install.
+
+20020216
+ + implement whline_set(), wvline_set(), add manpage curs_border_set.
+ + add subtest 'b' to 'F' and 'f' in ncurses.c to demonstrate use of
+ box() and box_set() functions.
+ + add subtest 'u' to 'F' in ncurses.c, to demonstrate use of addstr()
+ given UTF-8 string equivalents of WACS_xxx symbols.
+ + minor fixes to several manpages based on groff -ww output.
+ + add descriptions of external variables of termcap interface to
+ the manpage (report by Bruce Evans <bde@zeta.org.au>).
+ > patches by Bernhard Rosenkraenzer:
+ + correct configure option --with-bool, which was executed as
+ --with-ospeed.
+ + add quotes for parameters of --with-bool and --with-ospeed configure
+ options.
+ > patch by Sven Verdoolaege (report by Gerhard Haering
+ <haering_linux@gmx.de>):
+ + correct typos in definitions of several wide-character macros:
+ waddwstr, wgetbkgrnd, mvaddwstr, mvwadd_wchnstr, mvwadd_wchnstr,
+ mvwaddwstr.
+ + pass $(CPPFLAGS) to MKlib_gen.sh, thereby fixing a missing definition
+ of _XOPEN_SOURCE_EXTENDED, e.g., on Solaris
+
+20020209
+ + implement wide-acs characters for UTF-8 locales. When in UTF-8
+ locale, ignore narrow version of acs. Add 'F' test to test/ncurses.c
+ to demonstrate.
+ + correct prototype in keybound manpage (noted from a Debian mailing
+ list item).
+
+20020202
+ + add several cases to the wscanw() example in testcurs.c, showing the
+ format.
+ + implement a simple vsscanf() fallback function which uses the %n
+ conversion to help parse the input data (prompted by discussion with
+ Albert Chin-A-Young).
+ + modify mk-1st.awk and test/Makefile.in to add $(LDFLAGS) when making
+ shared libraries, and to use $(CFLAGS) when linking test programs
+ (patch by Albert Chin-A-Young).
+ + add a call to _nc_keypad() in keypad() to accommodate applications
+ such as nvi, which use curses for output but not for input (fixes
+ Debian #131263, cf: 20011215).
+ + add entrypoints to resizeterm.c which provide better control over the
+ process: is_term_resized() and resize_term(). The latter restores
+ the original design of resizeterm() before KEY_RESIZE was added in
+ 970906. Do this to accommodate 20010922 changes to view.c, but allow
+ for programs with their own sigwinch handler, such as lynx (reported
+ by Russell Ruby <russ@math.orst.edu>).
+
+20020127
+ + fix a typo in change to mk-1st.awk, which broke the shared-library
+ makefile rules (reported by Martin Mokrejs).
+
+20020126
+ + update config.guess, config.sub
+ + finish changes needed to build dll's on cygwin.
+ + fix a typo in mvwchat() macro (reported by Cy <yam@homerow.net).
+
+20020119
+ + add case in lib_baudrate.c for B921600 (patch by Andrey A Chernov).
+ + correct missing sed-editing stage in manpage installs which is used
+ to rename manpages, broken in 20010324 fix for Debian #89939 (Debian
+ #78866).
+ + remove -L$(libdir) from linker flags, probably not needed any more
+ since HPUX is handled properly (reported by NIIBE Yutaka
+ <gniibe@m17n.org>).
+ + add configure check for mbstate_t, needed for wide-character
+ configuration. On some platforms we must include <wchar.h> to
+ define this (reported by Daniel Jacobowitz).
+ + incorporate some of the changes needed to build dll's on cygwin.
+
+20020112a
+ + workaround for awk did not work with mawk, adjusted shell script.
+
+20020112
+ + add Caps.osf1r5, as an example.
+ + modify behavior of can_clear_with() so that if an application is
+ running in a non-bce terminals with default colors enabled, it
+ returns true, allowing the user to select/paste text without picking
+ up extraneous trailing blanks (adapted from patch by Daniel
+ Jacobowitz <dmj+@andrew.cmu.edu>).
+ + modify generated curses.h to ifdef-out prototypes for extensions if
+ they are disabled, and to define curses_version() as a string in that
+ case. This is needed to make the programs such as tic build in that
+ configuration.
+ + modified generated headers.sh to remove a gzip'd version of the
+ target file if it exists, in case non-gzip'd manpages are installed
+ into a directory where gzip'd ones exist. In that case, the latter
+ would be found.
+ + corrected a redundant initialization of signal handlers from 20010922
+ changes.
+ + clarified bug-reporting address in terminfo.src (report by John H
+ DuBois III <spcecdt@armory.com>).
+ > several fixes from Robert Joop:
+ + do not use "-v" option of awk in MKkey_defs.sh because it does not
+ work with SunOS nawk.
+ + modify definitions for libutf8 in curses.h to avoid redefinition
+ warnings for mblen
+ + quoted references to compiler in shell command in misc/Makefile, in
+ case it uses multiple tokens.
+
+20011229
+ + restore special case from 20010922 changes to omit SA_RESTART when
+ setting up SIGWINCH handler, which is needed to allow wgetch() to be
+ interrupted by that signal.
+ + update configure macro CF_WITH_PATHLIST, to omit some double quotes
+ not needed with autoconf 2.52
+ + revert configure script to autoconf 2.13 patched with
+ autoconf-2.13-19990117.patch.gz (or later)
+ from
+ ftp://invisible-island.net/autoconf/
+ because autoconf 2.52 macro AC_PROG_AWK does not work on HPUX 11.0
+ (report by David Ellement <ellement@sdd.hp.com>). This also fixes a
+ different problem configuring with Mac OS X (reported by Marc Smith
+ <marc.a.smith@home.com>).
+
+20011222
+ + modify include/edit_cfg.h to eliminate BROKEN_LINKER symbol from
+ term.h
+ + move prototype for _nc_vsscanf() into curses.h.in to omit
+ HAVE_VSSCANF symbol from curses.h, which was dependent upon the
+ ncurses_cfg.h file which is not installed.
+ + use ACS_LEN rather than SIZEOF(acs_map) in trace code of lib_acs.c,
+ to work with broken linker configuration, e.g., cygwin (report by
+ Robert Joop <rj@rainbow.in-berlin.de>).
+ + make napms() call _nc_timed_wait() rather than poll() or select(),
+ to work around broken implementations of these on cygwin.
+
+20011218
+ + drop configure macro CF_WIDEC_SHIFT, since that was rendered obsolete
+ by Sven Verdoolaege's rewrite of wide-character support. This makes
+ libncursesw incompatible again, but makes the header files almost the
+ same as in the narrow-character configuration.
+ + simplify definitions that combine wide/narrow versions of bkgd, etc.,
+ to eliminate differences between the wide/narrow versions of curses.h
+ + correct typo in configure macro CF_FUNC_VSSCANF
+ + correct location of call to _nc_keypad() from 20011215 changes which
+ prevented keypad() from being disabled (reported by Lars Hecking).
+
+20011215
+ + rewrote ncurses 'a' test to exercise wgetch() and keypad() functions
+ better, e.g., by adding a 'w' command to create new windows which
+ may have different keypad() settings.
+ + corrected logic of keypad() by adding internal screen state to track
+ whether the terminal's keypad-mode has been set. Use this in
+ wgetch() to update the keypad-mode according to whether the
+ associated window's keypad-mode has been set with keypad(). This
+ corrects a related problem restoring terminal state after handling
+ SIGTSTP (reported by Mike Castle).
+ + regenerate configure using patch for autoconf 2.52
+ autoconf-2.52-patch.gz
+ at
+ ftp://invisible-island.net/autoconf/
+ + update config.guess, config.sub from
+ http://subversions.gnu.org/cgi-bin/viewcvs/config/config/
+ + minor changes to quoting in configure script to allow it to work
+ with autoconf 2.52
+
+20011208
+ + modify final checks in lib_setup.c for line and col values, making
+ them independent.
+ + modify acs_map[] if configure --broken-linker is specified, to make
+ it use a function rather than an array (prompted by an incorrect
+ implementation in cygwin package).
+ + correct spelling of configure option --enable-colorfgbg, which
+ happened to work if --with-develop was set (noted in cygwin package
+ for ncurses).
+ + modify ifdef for genericerror() to compile with SUNWspro Sun WorkShop
+ 6 update 1 C++ 5.2 (patch by Sullivan N Beck <sbeck@cise.ufl.edu>).
+ + add configure checks to see if ncurses' fallback vsscanf() will
+ compile either of the special cases for FILE structs, and if not,
+ force it to the case which simply returns an error (report by
+ Sullivan N Beck <sbeck@cise.ufl.edu> indicates that Solaris 8 with
+ 64-bits does not allow access to FILE's fields).
+ + modify ifdef's for c++/cursesw.cc to use the fallback vsscanf() in
+ the ncurses library if no better substitute for this can be found
+ in the C++ runtime.
+ + modify the build to name dynamic libraries according to the
+ convention used on OS X and Darwin. Rather than something like
+ libncurses.dylib.5.2, Darwin would name it libncurses. 5.dylib.
+ There are a few additional minor fixes, such as setting the library
+ version and compatibility version numbers (patch by Jason Evans
+ <jevans@apple.com>).
+ + use 'sh' to run mkinstalldirs, to work around problems with buggy
+ versions of 'make' on OS/2 (report by John Polterak <jp@eyup.org>).
+ + correct typo in manpage description of curs_set() (Debian #121548).
+ + replace the configure script existence-check for mkstemp() by one
+ that checks if the function works, needed for older glibc and
+ AmigaOS.
+
+20011201
+ + modify script that generates fallbacks.c to compile a temporary
+ copy of the terminfo source in case the host does not contain all of
+ the entries requested for fallbacks (request by Greg Roelofs).
+ + modify configure script to accommodate systems such as Mac OS X whose
+ <stdbool.h> header defines a 'bool' type inconsistent with ncurses,
+ which normally makes 'bool' consistent with C++. Include <stdbool.h>
+ from curses.h to force consistent usage, define a new type
+ NCURSES_BOOL and related that to the exported 'bool' as either a
+ typedef or definition, according to whether <stdbool.h> is present
+ (based on a bug report for tin 1.5.9 by Aaron Adams <adamsa@mac.com>).
+
+20011124
+ + added/updated terminfo entries for M$ telnet and KDE konsole -TD
+
+20011117
+ + updated/expanded Apple_Terminal and Darwin PowerPC terminfo entries
+ (Benjamin C W Sittler).
+ + add putty terminfo entry -TD
+ + if configuring for wide-curses, define _XOPEN_SOURCE_EXTENDED, since
+ this may not otherwise be defined to make test/view.c compile.
+
+20011110
+ + review/correct several missing/generated items in curses.wide, sorted
+ the lists to make subsequent diff's easier to track.
+
+20011103
+ + add manual pages for add_wch(), echo_wchar(), getcchar(),
+ mvadd_wch(), mvwadd_wch(), setcchar(), wadd_wch() and wecho_wchar().
+ + implement wecho_wchar()
+ + modify _tracedump() to handle wide-characters by mapping them to '?'
+ and control-characters to '.', to make the trace file readable. Also
+ dynamically allocate the buffer used by _tracedump() for formatting
+ the results.
+ + modify T_CALLED/T_RETURN macros to ease balancing call/return lines
+ in a trace by using curly braces.
+ + implement _nc_viscbuf(), for tracing cchar_t arrays.
+ + correct trace-calls in setcchar() and getcchar() functions, which
+ traced the return values but not the entry to each function.
+ + correct usage message in test/view.c, which still mentioned -u flag.
+
+20011027
+ + modify configure script to allow building with termcap only, or with
+ fallbacks only. In this case, we do not build tic and toe.
+ + add configure --with-termpath option, to override default TERMPATH
+ value of /etc/termcap:/usr/share/misc/termcap.
+ + cosmetic change to tack: make menu descriptions agree with menu
+ titles.
+
+20011020
+ + rewrote limit-checks in wscrl() and associated _nc_scroll_window(),
+ to ensure that if the parameter of wscrl() is larger than the size of
+ the scrolling region, then the scrolling region will be cleared
+ (report by Ben Kohlen <bckohlen@yahoo.com>).
+ + add trace/varargs.c, using this to trace parameters in lib_printw.c
+ + implement _tracecchar_t2() and _tracecchar_t().
+ + split-out trace/visbuf.c
+ + correct typo in lib_printw.c changes from 20010922 (report by Mike
+ Castle).
+
+20011013
+ + modify run_tic.sh to check if the build is a cross-compile. In that
+ case, do not use the build's tic to install the terminfo database
+ (report by Rafael Rodriguez Velilla <rrv@tid.es>).
+ + modify mouse click resolution so that mouseinterval(-1) will disable
+ it, e.g., to handle touchscreens via a slow connection (request by
+ Byron Stanoszek <gandalf@winds.org>).
+ + correct mouseinterval() default value shown in curs_mouse.3x
+ + remove conflicting definition of mouse_trafo() (reported by Lars
+ Hecking, using gcc 2.95.3).
+
+20011001
+ + simpler fix for signal_name(), to replace the one overlooked in
+ 20010929 (reported by Larry Virden).
+
+20010929
+ + add -i option to view.c, to test ncurses' check for non-default
+ signal handler for SIGINT, etc.
+ + add cases for shared-libraries on Darwin/OS X (patch by Rob Braun
+ <bbraun@synack.net>).
+ + modify tset to restore original I/O modes if an error is encountered.
+ Also modify to use buffered stderr consistently rather than mixing
+ with write().
+ + change signal_name() function to use if-then-else rather than case
+ statement, since signal-values aren't really integers (reported by
+ Larry Virden).
+ + add limit checks in wredrawln(), fixing a problem where lynx was
+ repainting a pad which was much larger than the screen.
+
+20010922
+ + fix: PutRange() was counting the second part of a wide character as
+ part of a run, resulting in a cursor position that was one too far
+ (patch by Sven Verdoolaege).
+ + modify resizeterm() to not queue a KEY_RESIZE if there was no
+ SIGWINCH, thereby separating the two styles of SIGWINCH handling
+ in test/view.c
+ + simplified lib_tstp.c, modify it to use SA_RESTART flag for SIGWINCH.
+ + eliminate several static buffers in the terminfo compiler, using
+ allocated buffers.
+ + modify MKkeyname.awk so that keyname() does not store its result into
+ a static buffer that is overwritten by the next call.
+ + reorganize the output of infocmp -E and -e options to compile cleanly
+ with gcc -Wwrite-strings warnings.
+ + remove redefinition of chgat/wchgat/mvwchgat from curses.wide
+
+20010915
+ + add label to test/view.c, showing the name of the last key or signal
+ that made the screen repaint, to make it clearer when a sigwinch
+ does this.
+ + use ExitProgram() consistently in the test-programs to make it
+ simpler to test leaks with dmalloc, etc.
+ + move hashtab static data out of hashmap.c into SCREEN struct.
+ + make NO_LEAK code compile with revised WINDOWLIST structs.
+
+20010908
+ + modify tgetent() to check if exit_attribute_mode resets the alternate
+ character set, and if so, attempt to adjust the copy of the termcap
+ "me" string which it will return to eliminate that part. In
+ particular, 'screen' would lose track of line-drawing characters
+ (report by Frederic L W Meunier <0@pervalidus.net>, analysis by
+ Michael Schroeder).
+
+20010901
+ + specify DOCTYPE in html manpages.
+ + add missing macros for several "generated" functions: attr_get(),
+ attr_off(), attr_on(), attr_set(), chgat(), mvchgat(), mvwchgat() and
+ mouse_trafo().
+ + modify view.c to agree with non-experimental status of ncurses'
+ sigwinch handler:
+ + change the sense of the -r option, making it default to ncurses'
+ sigwinch handler.
+ + add a note explaining what functions are unsafe in a signal
+ handler.
+ + add a -c option, to set color display, for testing.
+ + unset $data variable in MKterminfo.sh script, to address potential
+ infinite loop if shell malfunction (report by Samuel Mikes
+ <smikes@cubane.com>, for bash 2.05.0 on a Linux 2.0.36 system).
+ + change kbs in mach terminfo entries to ^? (Marcus Brinkmann
+ <Marcus.Brinkmann@ruhr-uni-bochum.de>).
+ + correct logic for COLORFGBG environment variable: if rxvt is compiled
+ with xpm support, the variable has three fields, making it slightly
+ incompatible with itself. In either case, the background color is
+ the last field.
+
+20010825
+ + move calls to def_shell_mode() and def_prog_mode() before loop with
+ callbacks in lib_set_term.c, since the c++ demo otherwise initialized
+ the tty modes before saving them (patch by John David Anglin
+ <dave@hiauly1.hia.nrc.ca>).
+ + duplicate logic used to initialize trace in newterm(), in initscr()
+ to avoid confusing trace of initscr().
+ + simplify allocation of WINDOW and WINDOWLIST structs by making the
+ first a part of the second rather than storing a pointer. This saves
+ a call to malloc for each window (discussion with Philippe Blain).
+ + remove unused variable 'used_ncv' from lib_vidattr.c (Philippe
+ Blain).
+ + modify c++/Makefile.in to accommodate archive programs that are
+ different for C++ than for C, and add cases for vendor's C++
+ compilers on Solaris and IRIX (report by Albert Chin-A-Young).
+ + correct manpage description of criteria for deciding if the terminal
+ supports xterm mouse controls.
+ + add several configure script options to aid with cross-compiling:
+ --with-build-cc, --with-build-cflags, --with-build-ldflags, and
+ --with-build-libs (request by Greg Roelofs).
+ + change criteria for deciding if configure is cross-compiling from
+ host/build mismatch to host/target mismatch (request by Greg Roelofs
+ <greg.roelofs@philips.com>).
+ + correct logic for infocmp -e and -E options which writes the data for
+ the ext_Names[] array. This is needed if one constructs a fallback
+ table for a terminfo entry which uses extended termcap names, e.g.,
+ AX in a color xterm.
+ + fix undefined NCURSES_PATHSEP when configure --disable-database
+ option is given.
+
+20010811
+ + fix for VALID_BOOLEAN() macro when char is not signed.
+ + modify 'clean' rule for C++ binding to work with Sun compiler, which
+ caches additional information in a subdirectory of the objects.
+ + added llib-ncursesw.
+
+20010804
+ + add Caps.keys example for experimental extended function keys
+ (adapted from a patch by Ilya Zakharevich).
+ + correct parameter types of vidputs() and vidattr() to agree with
+ header files (report by William P Setzer).
+ + fix typos in several man-pages (patch by William P Setzer).
+ + remove unneeded ifdef for __GNUG__ in CF_CPP_VSCAN_FUNC configure
+ macro, which made ncurses C++ binding fail to build with other
+ C++ compilers such as HPUX 11.x (report by Albert Chin-A-Young).
+ + workaround for bug in HPUX 11.x C compiler: add a blank after
+ NCURSES_EXPORT macro in form.h (report by Albert Chin-A-Young)
+ + ignore blank lines in Caps* files in MKkey_defs.sh script (report by
+ Albert Chin-A-Young).
+ + correct definition of key_end in Caps.aix4, which left KEY_END
+ undefined (report by Albert Chin-A-Young).
+ + remove a QNX-specific fallback prototype for vsscanf(), which is
+ obsolete with QNX RTP.
+ + review/fix some of the T() and TR() macro calls, having noticed that
+ there was no data for delwin() in a trace of dialog because there was
+ no returnVoid call for wtimeout(). Also, traces in lib_twait.c are
+ now selected under TRACE_IEVENT rather than TRACE_CALLS.
+
+20010728
+ + add a _nc_access() check before opening files listed via $TERMPATH.
+ + using modified man2html, regenerate some of the html manpages to fix
+ broken HREF's where the link was hyphenated.
+
+20010721
+ + add some limit/pointer checks to -S option of tputs.
+ + updated/expanded Apple_Terminal and Darwin PowerPC terminfo entries
+ (Benjamin C W Sittler).
+ + add a note in curs_termcap.3x regarding a defect in the XSI
+ description of tgetent (based on a discussion with Urs Jansen
+ regarding the HPUX 11.x implementation, whose termcap interface is
+ not compatible with existing termcap programs).
+ + modify manhtml rule in dist.mk to preserve copyright notice on the
+ generated files, as well as to address HTML style issues reported by
+ tidy and weblint. Regenerated/updated corresponding html files.
+ + comment out use of Protected_Character and related rarely used
+ attributes in ncurses Ada95 test/demo to compile with wide-character
+ configuration.
+
+20010714
+ + implement a simple example in C++ demo to test scanw().
+ + corrected stdio function used to implement scanw() in cursesw.cc
+ + correct definition of RemAttr() macro from 20010602 changes, which
+ caused C++ SillyDemo to not show line-drawing characters.
+ + modify C++ binding, adding getKey() which can be overridden by user
+ to substitute functions other than getch() for keyboard processing
+ of forms and menus (patch by Juergen Pfeifer).
+
+20010707
+ + fix some of the trace calls which needed modification to work with
+ new wide-character structures.
+ + modify magic-cookie code in tty_update.c to compile with new
+ wide-character structures (report by <George.R.Goffe@seagate.com>).
+ + ensure that _XOPEN_SOURCE_EXTENDED is defined in curses.priv.h if
+ compiling for wide-character configuration.
+ + make addwnstr() handle non-spacing characters (patch by Sven
+ Verdoolaege).
+
+20010630
+ + add configure check to define _GNU_SOURCE, needed to prop up glibc
+ header files.
+ + split-out include/curses.wide to solve spurious redefinitions caused
+ by defining _GNU_SOURCE, and move includes for <signal.h> before
+ <curses.h> to work around misdefinition of ERR in glibc 2.1.3 header
+ file.
+ + extended ospeed change to NetBSD and OpenBSD -TD
+ + modify logic in lib_baudrate.c for ospeed, for FreeBSD to make it
+ work properly for termcap applications (patch by Andrey A Chernov).
+
+20010623
+ + correct an overlooked CharOf/UChar instance (reports by Eugene Lee
+ <eugene@anime.net>, Sven Verdoolaege).
+ + correct unneeded ifdef for wunctrl() (reported by Sven Verdoolaege)
+
+20010618
+ + change overlooked several CharOf/UChar instances.
+ > several patches from Sven Verdoolaege:
+ + correct a typo in wunctrl(), which made it appear that botwc() was
+ needed (no such function: use btowc()).
+ + reimplement wide-character demo in test/view.c, using new functions.
+ + implement getcchar(), setcchar(), wadd_wchnstr() and related macros.
+ + fix a syntax problem with do/if/while in PUTC macro (curses.priv.h).
+
+20010616
+ + add parentheses in macros for malloc in test.priv.h, fixes an
+ expression in view.c (report by Wolfgang Gutjahr <gutw@knapp.co.at>).
+ + add Caps.uwin, as an example.
+ + change the way curses.h is generated, making the list of function
+ key definitions extracted from the Caps file.
+ + add #undef's before possible redefinition of ERR and OK in curses.h
+ + modify logic in tic, toe, tput and tset which checks for basename of
+ argv[0] to work properly on systems such as OS/2 which have
+ case-independent filenames and/or program suffixes, e.g., ".ext".
+
+20010609
+ + add a configure check, if --enable-widec is specified, for putwc(),
+ which may be in libutf8.
+ + remove some unnecessary text from curs_extend.3x and
+ default_colors.3x which caused man-db to make incorrect symbolic
+ links (Debian bug report #99550).
+ + add configure check if cast for _IO_va_list is needed to compile
+ C++ vscan code (Debian bug report #97945).
+ > several patches from Sven Verdoolaege:
+ + correct code that used non-standard auto-initialization of a struct,
+ which gcc allows (report by Larry Virden).
+ + use putwc() in PUTC() macro.
+ + make addstr() work for the special case where the codeset is
+ non-stateful (eg. UTF-8), as well as stateful codesets.
+
+20010603
+ + correct loop expression in NEXT_CHAR macro for lib_addstr.c changes
+ from 20010602 (report by Mike Castle).
+
+20010602
+ + modify mvcur() to avoid emitting newline characters when nonl() mode
+ is set. Normally this is not a problem since the actual terminal
+ mode is set to suppress nl/crlf translations, however it is useful to
+ allow the caller to manipulate the terminal mode to avoid staircasing
+ effects after spawning a process which writes messages (for lynx
+ 2.8.4) -TD
+ > several patches from Sven Verdoolaege <skimo@kotnet.org>:
+ + remove redundant type-conversion in fifo_push()
+ + correct definition of addwstr() macro in curses.h.in
+ + remove _nc_utf8_outch()
+ + rename most existing uses of CharOf() to UChar(), e.g., where it is
+ used to prevent sign-extension in ctype macros.
+ + change some chtype's to attr_t's where the corresponding variables
+ are used to manipulate attributes.
+ + UpdateAttr() was applied to both attributes (attr_t) and characters
+ (chtype). Modify macro and calls to it to make these distinct.
+ + add CharEq() macro, use in places where wide-character configuration
+ implementation uses a struct for cchar_t.
+ + moved struct ldat into curses.priv.h, to hide implementation details.
+ + change CharOf() macro to use it for masking A_CHARTEXT data from
+ chtype's.
+ + add L() macro to curses.priv.h, for long-character literals.
+ + replace several assignments from struct ldat entries to chtype or
+ char values with combinations of CharOf() and AttrOf() macros.
+ + add/use intermediate ChAttrOf() and ChCharOf() macros where we know
+ we are using chtype data.
+ + add/use lowlevel attribute manipulation macros AddAttr(), RemAttr()
+ and SetAttr().
+ + add/use SetChar() macro, to change a cchar_t based on a character and
+ attributes.
+ + convert most internal use of chtype to NCURSES_CH_T, to simplify use
+ of cchar_t for wide-character configuration. Similarly, use ARG_CH_T
+ where a pointer would be more useful.
+ + add stubs for tracing cchar_t values.
+ + add/use macro ISBLANK()
+ + add/use constructors for cchar_t's: NewChar(), NewChar2().
+ + add/use macros CHREF(), CHDEREF(), AttrOfD(), CharOfD() to facilitate
+ passing cchar_t's by address.
+ + add/use PUTC_DATA, PUTC() macros.
+ + for wide-character configuration, move the window background data to
+ the end of the WINDOW struct so that whether _XOPEN_SOURCE_EXTENDED
+ is defined or not, the offsets in the struct will not change.
+ + modify addch() to work with wide-characters.
+ + mark several wide-character functions as generated in curses.h.in
+ + implement wunctrl(), wadd_wch(), wbkgrndset(), wbkgrnd(),
+ wborder_set() and waddnwstr().
+
+20010526
+ + add experimental --with-caps=XXX option to customize to similar
+ terminfo database formats such as AIX 4.x
+ + add Caps.aix4 as an example.
+ + modify Caps to add columns for the the KEY_xxx symbols.
+ + modify configure --with-widec to suppress overwrite of libcurses.so
+ and curses.h
+ + add checks to toe.c to avoid being confused by files and directories
+ where we would expect the reverse, e.g., source-files in the
+ top-level terminfo levels as is the case for AIX.
+
+20010519
+ + add top-level 'depend' rule for the C sources, assuming that the
+ makedepend program is available. As a side-effect, this makes
+ the generated sources, as in "make sources" (prompted by a report
+ by Mike Castle that "make -j" fails because the resulting parallel
+ processes race to generate ncurses/names.c).
+ + modify configure script so that --disable-overwrite option's action
+ to add a symbolic link for libcurses applies to the static library as
+ well as the shared library when both are configured (report by Felix
+ Natter <f.natter@ndh.net>).
+ + add ELKS terminfo entries (Federico Bianchi
+ <bianchi@www.arte.unipi.it>)
+ + add u6 (CSR) to Eterm (Michael Jennings).
+
+20010512
+ + modify test/ncurses.c to work with xterm-256color, which has fewer
+ color pairs than colors*colors (report by David Ellement
+ <ellement@sdd.hp.com>).
+
+20010505
+ + corrected screen.xterm-xfree86 entry.
+ + update comment in Caps regarding IBM (AIX) function-key definitions.
+
+20010421
+ + modify c++/Makefile.in to link with libncurses++w.a when configured
+ for wide-characters (patch by Sven Verdoolaege).
+ + add check in _nc_trace_buf() to refrain from freeing a null pointer.
+ + improve CF_PROG_INSTALL macro using CF_DIRNAME.
+ + update config.guess, config.sub from autoconf 2.49e (alpha).
+
+20010414
+ + add secondary check in tic.c, similar_sgr() to see if the reason
+ for mismatch was that the individual capabilities used a time-delay
+ while sgr did not. Used this to cleanup mismatches, e.g., in vt100,
+ and remove time-delay from Apple_Terminal entries.
+ + add Apple_Terminal terminfo entries (Benjamin C W Sittler
+ <bsittler@iname.com>).
+ + correct definitions of shifted editing keys for xterm-xfree86 -TD
+ + fix a bug in test/bs.c from 20010407 (patch by Erik Sigra).
+ + prevent relative_move() from doing an overwrite if it detects 8-bit
+ characters when configured for UTF-8 (reported by Sven Verdoolaege
+ <skimo@kotnet.org>).
+
+20010407
+ + add configure checks for strstream.h vscan function, and similar
+ stdio-based function which may be used in C++ binding for gcc 3.0
+ (reports by George Goffe, Lars Hecking, Mike Castle).
+ + rewrite parts of configure.in which used changequote(). That feature
+ is broken in the latest autoconf alphas (e.g., 2.49d).
+ + add a missing pathname for ncurses_dll.h, needed when building in
+ a directory outside the source tree (patch by Sven Verdoolaege
+ <skimo@kotnet.org>).
+ > fix 2 bugs in test/bs.c (patch by Erik Sigra <sigra@home.se>):
+ + no ships were ever placed in the last row or in the last column.
+ This made the game very easy to win, because you never had to waste
+ any shots there, but the computer did.
+ + the squares around a sunken ship that belonged to the player were not
+ displayed as already hit by the computer, like it does for the
+ player.
+
+20010331
+ + add some examples of customizing screen's terminfo:
+ screen.xterm-xfree86, screen.xterm-r6, screen.teraterm -TD
+ + modify screen's terminfo entry to match the khome/kend in screen
+ 3.09.08 (Debian bug report #92215).
+ + correct a memory leak in forms library (report by Stefan Vogtner
+ <stefan@vogtner.de>, patch by Juergen Pfeifer).
+
+20010324
+ + change symbols used to guard against repeated includes to begin
+ consistently with "NCURSES_" rather than a leading underscore. There
+ are other symbols defined in the header files which begin with a
+ leading underscore, but they are part of the legacy interface.
+ + reorder includes in c++ binding so that rcs identifiers can be
+ compiled-in.
+ + add .cc.ii rule to c++ makefile, to get preprocessor output for
+ debugging.
+ + correct configure script handling of @keyword@ substitutions when the
+ --with-manpage-renames option is given (cf: 20000715, fixes Debian
+ bug #89939).
+ + report stack underflow/overflow in tparm() when tic -cv option is
+ given.
+ + remove spurious "%|" operator from xterm-xfree86 terminfo entry,
+ (reported by Adam Costello <amc@cs.berkeley.edu>, Debian bug #89222).
+
+20010310
+ + cleanup of newdemo.c, fixing some ambiguous expressions noted by gcc
+ 2.95.2, and correcting some conflicting color pair initializations.
+ + add missing copyright notice for cursesw.h
+ + review, make minor fixes for use of '::' for referring to C-language
+ interface from C++ binding.
+ + modify configure check for g++ library slightly to accommodate
+ nonstandard version number, e.g., <vendor>-2.7 (report by Ronald Ho
+ <rho@mipos2.intel.com>).
+ + add configure check for c++ <sstream> header, replace hardcoded
+ ifdef.
+ + workaround for pre-release of gcc 3.0 libstdc++, which has dropped
+ vscan from strstreambuf to follow standard, use wrapper for C vscanf
+ instead (report by George Goffe <grgoffe@excite.com> and Matt Taggart
+ <taggart@carmen.fc.hp.com>, fixes Debian .
+
+20010303
+ + modify interface of _nc_get_token() to pass 'silent' parameter to it,
+ to make quieter loading of /etc/termcap (patch by Todd C Miller).
+ + correct a few typos in curs_slk.3x and curs_outopts.3x manpages
+ (patch by Todd C Miller).
+
+20010224
+ + compiler-warning fixes (reported by Nelson Beebe).
+
+20010210
+ + modify screen terminfo entry to use new 3.9.8 feature allowing xterm
+ mouse controls -TD
+
+20010203
+ + broaden patterns used to match OS/2 EMX in configure script to cover
+ variant used in newer config.guess/config.sub
+ + remove changequote() calls from configure script, since this feature
+ is broken in the autoconf 2.49c alpha, maintainers decline to fix.
+ + remove macro callPutChar() from tty_update.c, since this is no longer
+ needed (reported by Philippe Blain).
+ + add a null-pointer check in tic.c to handle the case when the input
+ file is really empty. Modify the next_char() function in comp_scan.c
+ to allow arbitrarily long lines, and incidentally supply a newline to
+ files that do not end in a newline. These changes improve tic's
+ recovery from attempts to read binary files, e.g., its output from
+ the terminfo database (reported by Bernhard Rosenkraenzer).
+
+20010127
+ + revert change to c++/demo.cc from 20001209, which changed definition
+ of main() apparently to accommodate cygwin linker, but broke the demo
+ program.
+ + workaround for broken egcs 2.91.66 which calls member functions
+ (i.e., lines() and colors() of NCursesWindow before calling its
+ constructor. Add calls to initialize() in a few constructors which
+ did not do this already.
+ + use the GNAT preprocessor to make the necessary switch between TRACE
+ and NO_TRACE configurations (patch by Juergen Pfeifer).
+ > patches by Bernhard Rosenkraenzer:
+ + modify kterm terminfo entry to use SCS sequence to support alternate
+ character set (it does not work with SI/SO).
+ + --with-ospeed=something didn't work. configure.in checked for a
+ $enableval where it should check for $withval. Also,
+ ncurses/llib-lncurses still had a hardcoded short.
+
+20010114
+ + correction to my merge of Tom Riddle's patch that broke tic in some
+ conditions (reported by Enoch Wexler <enoch@wexler.co.il>) -TD
+
+20010113
+ + modify view.c to test halfdelay(). Like other tests, this recognizes
+ the 's' and space commands for stopping/starting polled input, shows
+ a freerunning clock in the header. If given a parameter to 's', that
+ makes view.c use halfdelay() with that parameter rather than
+ nodelay().
+ + fix to allow compile with the experimental configure option
+ --disable-hashmap.
+ + modify postprocess_termcap() to avoid overwriting key_backspace,
+ key_left, key_down when processing a non-base entry (report/patch by
+ Tom Riddle).
+ + modify _nc_wrap_entry(), adding option to reallocate the string
+ table, needed in _nc_merge_entry() when merging termcap entries.
+ (adapted from report/patch by Tom Riddle <ftr@oracom.com>).
+ + modify a few configure script macros to keep $CFLAGS used only for
+ compiler options, preprocessor options in $CPPFLAGS.
+
+20001230
+ + correct marker positions in lrtest.c after receiving a sigwinch.
+ + fix ifdef's in ncurses.c to build against pre-5.2 for testing.
+ + fixes to tclock for resizing behavior, redundant computation (report
+ and patch by A M Kuchling <akuchlin@mems-exchange.org>).
+
+20001216
+ + improved scoansi terminfo entry -TD
+ + modify configure script and makefile in Ada95/src to compile a stub
+ for the trace functions when ncurses does not provide those.
+
+20001209
+ + add ncurses_dll.h and related definitions to support generating DLL's
+ with cygwin (adapted from a patch by Charles Wilson
+ <cwilson@ece.gatech.edu>, changed NCURSES_EXPORT macro to make it
+ work with 'indent').
+
+20001202
+ + correct prototypes for some functions in curs_termcap.3x, matching
+ termcap.h, which matches X/Open.
+ > patch by Juergen Pfeifer:
+ + a revised version of the Ada enhancements sent in by "H.
+ Nanosecond", aka Eugene V Melaragno <aldomel@ix.netcom.com>. This
+ patch includes
+ - small fixes to the existing ncurses binding
+ - addition of some more low-level functions to the binding, including
+ termcap and terminfo functions
+ - An Ada implementation of the "ncurses" test application originally
+ written in C.
+
+20001125
+ + modify logic in lib_setup.c to allow either lines or columns value
+ from terminfo to be used if the screen size cannot be determined
+ dynamically rather than requiring both (patch by Ehud Karni
+ <ehud@unix.simonwiesel.co.il>).
+ + add check in lib_tgoto.c's is_termcap() function to reject null or
+ empty strings (reported by Valentin Nechayev <netch@netch.kiev.ua> to
+ freebsd-bugs).
+ + add definition from configure script that denotes the path-separator,
+ which is normally a colon. The path-separator is a semicolon on
+ OS/2 EMX and similar systems which may use a colon within pathnames.
+ + alter logic to set default for --disable-overwrite option to set it
+ to 'yes' if the --prefix/$prefix value is not /usr/local, thereby
+ accommodating the most common cause of problems: gcc's nonstandard
+ search rules. Other locations such as /usr/local/ncurses will
+ default to overwriting (report by Lars Hecking <lhecking@nmrc.ie>).
+
+20001118
+ + modify default for --disable-overwrite configure option to disable
+ if the --prefix or $prefix value is not /usr.
+ + add cygwin to systems for which ncurses is installed by default into
+ /usr rather than /usr/local.
+
+20001111
+ + minor optimization in comp_error.c and lib_termname.c, using
+ strncat() to replace strncpy() (patch by Solar Designer).
+ + add a use_terminfo_vars() check for $HOME/.termcap, and check for
+ geteuid() to use_terminfo_vars() (patch by Solar Designer
+ <solar@false.com>).
+ + improved cygwin terminfo entry, based on patch by
+ <ernie_boyd@yahoo.com>.
+ + modify _nc_write_entry() to allow for the possibility that linking
+ aliases on a filesystem that ignores case would not succeed because
+ the source and destination differ only by case, e.g., NCR260VT300WPP0
+ on cygwin (report by Neil Zanella).
+ + fix a typo in the curs_deleteln.3x man page (patch by Bernhard
+ Rosenkraenzer <bero@redhat.de>).
+
+20001104
+ + add configure option --with-ospeed to assist packagers in transition
+ to 5.3 change to ospeed type.
+ + add/use CharOf() macro to suppress sign-extension of char type on
+ platforms where this is a problem in ctype macros, e.g., Solaris.
+ + change trace output to binary format.
+ + correct a missing quote adjustment in CF_PATH_SYNTAX autoconf
+ macro, for OS/2 EMX configuration.
+ + rearrange a few configure macros, moving preprocessor options to
+ $CPPFLAGS (a now-obsolete version of autoconf did not consistently
+ use $CPPFLAGS in both the compile and preprocessor checks).
+ + add a check in relative_move() to guard against buffer overflow in
+ the overwrite logic.
+
+20001028
+ + add message to configure script showing g++ version.
+ + resync config.guess, config.sub
+ + modify lib_delwin.c, making it return ERR if the window did not exist
+ (suggested by Neil Zanella).
+ + add cases for FreeBSD 3.1 to tdlint and makellib scripts, used this
+ to test/review ncurses library. (Would use lclint, but it doesn't
+ work).
+ + reorganized knight.c to avoid forward references. Correct screen
+ updates when backtracking, especially to the first cell. Add F/B/a
+ commands.
+
+20001021 5.2 release for upload to ftp.gnu.org
+ + update generated html files from manpages.
+ + modify dist.mk to use edit_man.sh to substitute autoconf'd variables
+ in html manpages.
+ + fix an uninitialized pointer in read_termcap.c (report by Todd C
+ Miller, from report/patch by Philip Guenther <guenther@gac.edu>).
+ + correct help-message and array limit in knight.c (patch by Brian
+ Raiter <breadbox@muppetlabs.com>).
+ > patch by Juergen Pfeifer:
+ + fix to avoid warning by GNAT-3.13p about use of inconsistent casing
+ for some identifiers defined in the standard package.
+ + cosmetic change to forms/fty_enum.c
+
+20001014
+ + correct an off-by-one position in test/railroad.c which could cause
+ wrapping at the right margin.
+ + test/repair some issues with libtool configuration. Make
+ --disable-echo force libtool --silent. (Libtool does not work for
+ OS/2 EMX, works partly for SCO - libtool is still very specific to
+ gcc).
+ + change default of --with-manpage-tbl to "no", since for most of the
+ platforms which do have tbl installed, the system "man" program
+ understands how to run tbl automatically.
+ + minor improvement to force_bar() in comp_parse.c (Bernhard
+ Rosenkraenzer <bero@redhat.de>).
+ + modify lib_tparm.c to use get_space() before writing terminating
+ null character, both for consistency as well as to ensure that if
+ save_char() was called immediately before, that the allocated memory
+ is enough (patch by Sergei Ivanov).
+ + add note about termcap ML capability which is duplicated between two
+ different capabilities: smgl and smglr (reported by Sergei Ivanov
+ <svivanov@pdmi.ras.ru>).
+ + correct parameter counts in include/Caps for dclk as well as some
+ printer-specific capabilities: csnm, defc, scs, scsd, smgtp, smglp.
+ > patch by Johnny C Lam <lamj@stat.cmu.edu>:
+ + add support for building with libtool (apparently version 1.3.5,
+ since old versions do not handle -L../lib), using new configure
+ option --with-libtool.
+ + add configure option --with-manpage-tbl, which causes the manpages to
+ be preprocessed by tbl(1) prior to installation,
+ + add configure option --without-curses-h, which causes the
+ installation process to install curses.h as ncurses.h and make
+ appropriate changes to headers and manpages.
+
+20001009
+ + correct order of options/parameters in run_tic.in invocation of tic,
+ which did not work with standard getopt() (reported by Ethan
+ Butterfield <primus@veris.org>).
+ + correct logic for 'reverse' variable in lib_vidattr.c, which was
+ setting it true without checking if newmode had A_REVERSE set, e.g.,
+ using $TERM=ansi on OS/2 EMX (see 20000917).
+ > patch by Todd Miller:
+ + add a few missing use_terminfo_vars() and fixes up _nc_tgetent().
+ Previously, _nc_cgetset() would still get called on cp so the
+ simplest thing is to set cp to NULL if !use_terminfo_vars().
+ + added checks for an empty $HOME environment variable.
+ > patches by Ilya Zakharevich for OS/2 EMX:
+ + modify convert_configure.pl to support INSTALL. Change compiler
+ options in that script to use multithreading, needed for the mouse.
+ + modify OS/2 mouse support, retrying as a 2-button mouse if code fails
+ to set up a 3-button mouse.
+ + improve code for OS/2 mouse support, using _nc_timed_wait() to
+ replace select() call.
+
+20001007
+ + change type of ospeed variable back to short to match its use in
+ legacy applications (reported by Andrey A Chernov).
+ + add case to configure script for --enable-rpath on IRIX (patch by
+ Albert Chin-A-Young).
+ + minor fix to position_check() function, to ensure it gets the whole
+ cursor report before decoding.
+ + add configure option --disable-assumed-color, to allow pre-5.1
+ convention of default colors used for color-pair 0 to be configured
+ (see assume_default_colors()).
+ + rename configure option --enable-hashmap --disable-hashmap, and
+ reorder the configure options, splitting the experimental and
+ development
+ + add configure option --disable-root-environ, which tells ncurses to
+ disregard $TERMINFO and similar environment variables if the current
+ user is root, or running setuid/setgid (based on discussion with
+ several people).
+ + modified misc/run_tic.in to use tic -o, to eliminate dependency on
+ $TERMINFO variable for installs.
+ + add table entry for plab_norm to tput, so it passes in strings
+ for that capability.
+ + modify parse_format() in lib_tparm.c to ignore precision if it is
+ longer than 10000 (report by Jouko Pynnonen).
+ + rewrote limit checks in lib_mvcur.c using new functions
+ _nc_safe_strcat(), etc. Made other related changes to check lengths
+ used for strcat/strcpy (report by Jouko Pynnonen
+ <jouko@solutions.fi>).
+
+20000930
+ + modify several descriptions, including those for setaf, setab, in
+ include/Caps to indicate that the entries are parameterized. This
+ information is used to tell which strings are translated when
+ converting to termcap. Fixes a problem where the generated termcap
+ would contain a spurious "%p1" for the terminfo "%p1%d".
+ + modify ld -rpath options (e.g., Linux, and Solaris) to use an
+ absolute pathname for the build tree's lib directory (prompted by
+ discussion with Albert Chin-A-Young).
+ + modify "make install.man" and "make uninstall.man" to include tack's
+ man-page.
+ + various fixes for install scripts used to support configure --srcdir
+ and --with-install-prefix (reported by Matthew Clarke
+ <Matthew_Clarke@mindlink.bc.ca>).
+ + make configure script checks on variables $GCC and $GXX consistently
+ compare against 'yes' rather than test if they are nonnull, since
+ either may be set to the corresponding name of the C or C++ compiler
+ (report/patch by Albert Chin-A-Young).
+
+20000923
+ + modify rs2 capability in xterm-r6 and similar where cursor
+ save/restore bracketed the sequence for resetting video attributes.
+ The cursor restore would undo that (from a NetBSD bug report by John
+ Hawkinson <jhawk@MIT.EDU>).
+ + using parameter check added to tic, corrected 27 typos in
+ terminfo.src -TD
+ + modify tic to verify that its inputs are really files, in case
+ someone tries to read a directory (or /dev/zero).
+ + add a check for empty buffers returned by fgets() in comp_scan.c
+ next_char() function, in case tic is run on a non-text file (fixes
+ a core dump reported by Aaron Campbell <aaron@cs.dal.ca>).
+ + add to railroad.c some code exercising tgoto(), providing an
+ alternate form of display if the terminal supports cursor addressing.
+ + split-out tgoto() again, this time into new file lib_tgoto.c, and
+ implement a conventional BSD-style tgoto() which is used if the
+ capability string does not contain terminfo-style padding or
+ parameters (requested by Andrey A Chernov).
+ + add check to tic which reports capabilities that do not reference
+ the expected number of parameters.
+ + add error checking to infocmp's -v and -m options to ensure that
+ the option value is indeed a number.
+ + some cleanup of logic in _nc_signal_handler() to verify if SIGWINCH
+ handler is setup. Separated the old/new sigaction data for SIGTSTP
+ from the other signals.
+
+20000917
+ + add S0, E0 extensions to screen's terminfo entry, which is another
+ way to solve the misconfiguration issue -TD
+ + completed special case for tgoto from 20000916
+
+20000916
+ + update xterm terminfo entries to match XFree86 xterm patch #146 -TD
+ + add Matrix Orbital terminfo entries (from Eric Z Ayers
+ <eric@ale.org>).
+ + add special case to lib_tparm.c to allow 'screen' program to use a
+ termcap-style parameter "%." to tgoto() for switching character sets.
+ + use LN_S substitution in run_tic.in, to work on OS/2 EMX which has
+ no symbolic links.
+ + updated notes in README.emx regarding autoconf patches.
+ + replace a lookup table in lib_vidattr.c used to decode no_color_video
+ with a logic expression (suggested by Philippe Blain).
+ + add a/A toggle to ncurses.c 'b' test, which clears/sets alternate
+ character set attribute from the displayed text.
+ + correct inequality in parameter analysis of rewritten lib_tparm.c
+ which had the effect of ignoring p9 in set_attributes (sgr), breaking
+ alternate character set (reported by Piotr Majka <charvel@link.pl>).
+ + correct ifdef'ing for GCC_PRINTF, GCC_SCANF which would not compile
+ with Sun WorkShop compilers since these tokens were empty (cf:
+ 20000902, reported by Albert Chin-A-Young).
+
+20000909
+ + correct an uninitialized parameter to open_tempfile() in tic.c which
+ made "tic -I" give an ambiguous error message about tmpnam.
+ + add special case in lib_vidattr.c to reset underline and standout for
+ devices that have no sgr0 defined (patch by Don Lewis
+ <Don.Lewis@tsc.tdk.com>). Note that this will not work for bold
+ mode, since there is no exit-bold-mode capability.
+ + improved patch for Make_Enum_Type (patch by Juergen Pfeifer).
+ + modify tparm to disallow arithmetic on strings, analyze the varargs
+ list to read strings as strings and numbers as numbers.
+ + modify tparm's internal function spop() to treat a null pointer as
+ an empty string.
+ + modify tput program so it can be renamed or invoked via a link as
+ 'reset' or 'init', producing the same effect as 'tput reset' or 'tput
+ init'.
+ + add private entrypoint _nc_basename(), use to consolidate related
+ code in progs, as well as accommodating OS/2 EMX pathnames.
+ + remove NCURSES_CONST line from edit_cfg.sh to compensate for its
+ removal (except via AC_SUBST) from configure.in, making
+ --enable-const work again (reported by Juergen Pfeifer).
+ + regen'd configure to pick up "hpux*" change from 20000902.
+
+20000902
+ + modify tset.c to check for transformed "reset" program name, if any.
+ + add a check for null pointer in Make_Enum_Type() (reported by Steven
+ W Orr <steveo@world.std.com>).
+ + change functions _nc_parse_entry() and postprocess_termcap() to avoid
+ using strtok(), because it is non-reentrant (reported by Andrey A
+ Chernov <ache@nagual.pp.ru>).
+ + remove "hpux10.*" case from CF_SHARED_OPTS configure script macro.
+ This differed from the "hpux*" case by using reversed symbolic
+ links, which made the 5.1 version not match the configuration of
+ 5.0 shared libraries (reported by Albert Chin-A-Young).
+ + correct a dependency in Ada95/src/Makefile.in which prevented
+ building with configure --srcdir (patch by H Nanosecond
+ <aldomel@ix.netcom.com>).
+ + modify ifdef's in curses.h.in to avoid warning if GCC_PRINTF or
+ GCC_SCANF was not previously defined (reported by Pavel Roskin
+ <proski@gnu.org>).
+ + add MKncurses_def.sh to generate fallback definitions for
+ ncurses_cfg.h, to quiet gcc -Wundef warnings, modified ifdef's in
+ code to consistently use "#if" rather than "#ifdef".
+
+20000826
+ + add QNX qansi entries to terminfo -TD
+ + add os2 entry to misc/emx.src (<jmcoopr@webmail.bmi.net>).
+ + add configure option --with-database to allow specifying a different
+ terminfo source-file to install. On OS/2 EMX, this defaults to
+ misc/emx.src
+ + change misc/run_tic.sh to derive it from misc/run_tic.in, to simplify
+ setting .exe extension on OS/2 EMX.
+ + add .exe extension in Ada95/gen/Makefile.in,
+ Ada95/samples/Makefile.in, for OS/2 EMX (reported by
+ <jmcoopr@webmail.bmi.net>).
+ + add configure check for filesystems (such as OS/2 EMX) which do not
+ distinguish between upper/lowercase filenames, use this to fix tags
+ rules in makefiles.
+ + initialize fds[] array to 0's in _nc_timed_wait(); apparently poll()
+ only sets the revents members of that array when there is activity
+ corresponding to the related file (report by Glenn Cooper
+ <gcooper@qantas.com.au>, using Purify on Solaris 5.6).
+ + change configure script to use AC_CANONICAL_SYSTEM rather than
+ AC_CANONICAL_HOST, which means that configure --target will set
+ a default program-prefix.
+ + add note on cross-compiling to INSTALL (which does not rely on the
+ AC_CANONICAL_* macros).
+
+20000819
+ + add cases for EMX OS/2 to config.guess, config.sub
+ + new version of config.guess, config.sub from lynx 2.8.4dev.7
+ + add definitions via transform.h to allow tic and tput to check for
+ the transformed aliases rather than the original infotocap, etc.
+ + simplify transform-expressions in progs/Makefile.in, make the
+ uninstall rule work for transformed program names.
+ + change symbol used by --install-prefix configure option from
+ INSTALL_PREFIX to DESTDIR (the latter has become common usage
+ although the name is misleading).
+ + modify programs to use curses_version() string to report the version
+ of ncurses with which they are compiled rather than the
+ NCURSES_VERSION string. The function returns the patch level in
+ addition to the major and minor version numbers.
+
+20000812
+ + modify CF_MAN_PAGES configure macro to make transformed program names
+ a parameter to that macro rather than embedding them in the macro.
+ + newer config.guess, config.sub (reference version used in lynx
+ 2.8.4dev.7).
+ + add configure option --with-default-terminfo-dir=DIR to allow
+ specifying the default terminfo database directory (request by Albert
+ Chin-A-Young).
+ + minor updates for terminfo.src from FreeBSD termcap change-history.
+ + correct notes in README and INSTALL regarding documentation files
+ that were moved from misc directory to doc (report by Rich Kulawiec
+ <rsk@gsp.org>).
+ + change most remaining unquoted parameters of 'test' in configure
+ script to use quotes, for instance fixing a problem in the
+ --disable-database option (reported by Christian Mondrup
+ <scancm@biobase.dk>).
+ + minor adjustments to work around some of the incompatibilities/bugs
+ in autoconf 2.29a alpha.
+ + add -I/usr/local/include when --with-ncurses option is used in
+ test/configure script.
+ + correct logic in adjust_cancels(), which did not check both
+ alternatives when reclassifying an extended name between boolean,
+ number and string, causing an infinite loop in tic.
+
+20000730
+ + correct a missing backslash in curses.priv.h
+
+20000729
+ + change handling of non_dest_scroll_region in tty_update.c to clear
+ text after it is shifted in rather than before shifting out. Also
+ correct row computation (reported by Ruediger Kuhlmann
+ <uck4@rz.uni-karlsruhe.de>).
+ + add/use new trace function to display chtype values from winch() and
+ getbkgd().
+ + add trace mask TRACE_ATTRS, alter several existing _tracef calls that
+ trace attribute changes under TRACE_CALLS to use this.
+ + modify MKlib_gen.sh so that functions returning chtype will call
+ returnChar().
+ + add returnChar() trace, for functions returning chtype.
+ + change indent.pro to line up parenthesis.
+
+20000722
+ + fix a heap problem with the c++ binding (report by
+ <alexander_liberson@ninewest.com>, patch by Juergen Pfeifer).
+ + minor adjustment to ClrToEOL() to handle an out-of-bounds parameter.
+ + modify the check for big-core to force a couple of memory accesses,
+ which may work as needed for older/less-capable machines (if not,
+ there's still the explicit configure option).
+ > fixes based on diff's for Amiga and BeOS found at
+ http://www.mathematik.uni-karlsruhe.de/~kuhlmann/cross/ncurses/
+ + alter definition of NCURSES_CONST to make it non-empty.
+ + add amiga-vnc terminfo entry.
+ + redefine 'TEXT' in menu.h for AMIGA, since it is reported to have
+ an (unspecified) symbol conflict.
+ + replaced case-statement in _nc_tracebits() for CSIZE with a table to
+ simplify working around implementations that define random
+ combinations of the related macros to zero.
+ + modify configure test for tcgetattr() to allow for old
+ implementations, e.g., on BeOS, which only defined it as a macro.
+ > patches by Bruno Haible:
+ + when checking LC_ALL/LC_CTYPE/LANG environment variables for UTF-8
+ locale, ignore those which are set to an empty value, as per SUSV2.
+ + encode 0xFFFD in UTF-8 with 3 bytes, not 2.
+ + modify _nc_utf8_outch() to avoid sign-extension when checking for
+ out-of-range value.
+
+20000715
+ + correct manlinks.sed script to avoid using ERE "\+", which is not
+ understood by older versions of sed (patch by Albert Chin-A-Young).
+ + implement configure script options that transform installed program
+ names, e.g., --program-prefix, including the manpage names and cross
+ references (patch by Albert Chin-A-Young <china@thewrittenword.com>).
+ + correct several mismatches between manpage filename and ".TH"
+ directives, renaming dft_fgbg.3x to default_colors.3x and
+ menu_attribs.3x to menu_attributes.3x (report by Todd C Miller).
+ + correct missing includes for <string.h> in several places, including
+ the C++ binding. This is not noted by gcc unless we use the
+ -fno-builtin option (reported by Igor Schein <igor@txc.com>).
+ + modified progs/tset.c and tack/sysdep.c to build with sgttyb
+ interface if neither termio or termios is available. Tested this
+ with FreeBSD 2.1.5 (which does have termios - but the sgttyb does
+ work).
+
+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 <gary@Intrepid.Com>).
+ + 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 <philippe.blain2@freesbee.fr>:
+ + 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 <mej@valinux.com>).
+ + 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 <Thanh.Ma@casi-rusco.com>).
+ + 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 <DAllen24@aol.com>).
+
+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 <akim@epita.fr> to autoconf mailing list).
+ + modify headers.sh to avoid creating temporary files in the build
+ directory when installing headers (reported by Sergei Pokrovsky
+ <pok@nbsp.nsk.su>)
+
+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 <kev@primenet.com> for elf64_ia64
+ Bernd Kuemmerlen <bkuemmer@mevis.de> 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 <at_1@zdnetonebox.com>).
+ + correct typo in curs_getch.3x manpage regarding noecho (reported by
+ David Malone <dwmalone@maths.tcd.ie>).
+ + 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 <bod@compusol.com.au>).
+
+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
+ <uwe@ptc.spbu.ru>).
+ + 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 <sys/time.h> in lib_napms.c to compile on MacOS X DP3
+ (reported by Gerben Wierda <wierda@holmes.nl>).
+ + 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
+ <btrompetter@firemail.de>, 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" <tlkeith@keithconsulting.com>).
+ + 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 <haible@ilog.fr>:
+ + 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 <davidm@hpl.hp.com>).
+ + 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 <ma@suse.de>).
+ + 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 <werner@suse.de> and
+ Ismael Cordeiro <ismael@cordeiro.com>).
+
+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 <sys/poll.h>, 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 <mpakovic@fdn.com>).
+ + update CF_SHARED_OPTS macro for SCO Unixware 7.1 to allow building
+ shared libraries (reported/tested by Thanh <thanhma@mediaone.net>).
+ + 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 <dalgoda@ix.netcom.com>).
+ + 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 <naddy@mips.rhein-neckar.de>).
+ + modify raw() and noraw() to clear/restore IEXTEN flag which affects
+ stty lnext on systems such as FreeBSD (report by Bruce Evans
+ <bde@zeta.org.au>, via Jason Evans <jasone@canonware.com>).
+ + 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
+ <eric@cls.usask.ca>).
+ + 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 <huyle@ugcs.caltech.edu>).
+ + 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
+ <robert@progplus.com>)
+ + 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 <mgeras@ticon.net>)
+
+19991030
+ + modify linux terminfo entry to indicate that dim does not mix with
+ color (reported by Klaus Weide <kweide@enteract.com>).
+ + 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.
+ + add function curses_version(), to return ncurses library version
+ (request by Bob van der Poel).
+ + remove rmam, smam from cygwin terminfo entry.
+ + modify FreeBSD cons25 terminfo entry to add cnorm and cvvis, as well
+ as update ncv to indicate that 'dim' conflicts with colors.
+ + modify configure script to use symbolic links for FreeBSD shared
+ libraries by default.
+ + correct ranf() function in rain and worm programs to ensure it does
+ not return 1.0
+ + hide the cursor in hanoi.c if it is running automatically.
+ + amend lrtest.c to account for optimizations that exploit margin
+ wrapping.
+ + add a simple terminfo demo, dots.c
+ + modify SIGINT/SIGQUIT handler to set a flag used in _nc_outch() to
+ tell it to use write() rather than putc(), since the latter is not
+ safe in a signal handler according to POSIX.
+ + add/use internal macros _nc_flush() and NC_OUTPUT to hide details
+ of output-file pointer in ncurses library.
+ + uncomment CC_SHARED_OPTS (see 971115), since they are needed for SCO
+ OpenServer.
+ + correct CC_SHARED_OPTS for building shared libraries for SCO
+ OpenServer.
+ + remove usleep() from alternatives in napms(), since it may interact
+ with alarm(), causing a process to be interrupted by SIGALRM (with
+ advice from Bela Lubkin).
+ + modify terminal_interface-curses-forms.ads.m4 to build/work with
+ GNAT 3.10 (patch by Juergen Pfeifer).
+ + remove part of CF_GPP_LIBRARY configure-script macro, which did not
+ work with gcc 2.7.2.3
+ + minor fix to test/tclock.c to avoid beeping more than once per second
+ + add 's' and ' ' decoding to test/rain.c
+
+991016 pre-release
+ + corrected BeOS code for lib_twait.c, making nodelay() function work.
+
+991009 pre-release
+ + correct ncurses' value for cursor-column in PutCharLR(), which was
+ off-by-one in one case (patch by Ilya Zakharevich).
+ + fix some minor errors in position_check() debugging code, found while
+ using this to validate the PutCharLR() patch.
+ + modify firework, lrtest, worm examples to be resizable, and to
+ recognize 'q' for quit, 's' for single-step and ' ' for resume.
+ + restore reverted change to terminal_interface-curses-forms.ads.m4,
+ add a note on building with gnat 3.10p to Ada95/TODO.
+ + add a copy of the standalone configure script for the test-directory
+ to simplify testing on SCO and Solaris.
+
+991002 pre-release
+ + minor fixes for _nc_msec_cost(), color_content(), pair_content(),
+ _nc_freewin(), ClrBottom() and onscreen_mvcur() (analysis by Philippe
+ Blain, comments by Alexander Lukyanov).
+ + simplify definition of PANEL and eliminate internal functions
+ _nc_calculate_obscure(), _nc_free_obscure() and _nc_override(),
+ (patch by Juergen Pfeifer, based on analysis by Philippe Blain
+ <bledp@voila.fr>)).
+ + change renaming of dft_fgbg.3x to use_default_colors.3ncurses in
+ man_db.renames, since Debian is not concerned with 14-character
+ filename limitation (from Debian bug report by Josip Rodin
+ <joy@cibalia.gkvk.hr>).
+ + corrected scoansi terminfo entry by testing with scoterm and console.
+ + revert change from 990614 to terminal_interface-curses-forms.ads.m4,
+ since this does not work for gnat 3.10p
+ + modify tclock example to be resizable (if ncurses' sigwinch handler
+ is used), and in color.
+ + use $(CC) rather than 'gcc' in MK_SHARED_LIB symbols, used for Linux
+ shared library rules.
+
+990925 pre-release
+ + add newer NetBSD console terminfo entries
+ + add amiga-8bit terminfo entry (from Henning 'Faroul' Peters
+ <Faroul@beyond.kn-bremen.de>)
+ + remove -lcurses -ltermcap from configure script's check for the gpm
+ library, since they are not really necessary (a properly configured
+ gpm library has no dependency on any curses library), and if the
+ curses library is not installed, this would cause the test to fail.
+ + modify tic's -C option so that terminfo "use=" clauses are translated
+ to "tc=" clauses even when running it as captoinfo.
+ + modify CF_STDCPP_LIBRARY configure macro to perform its check only
+ for GNU C++, since that library conflicts with SGI's libC on IRIX-6.2
+ + modify CF_SHARED_OPTS configure macro to support build on NetBSD with
+ ELF libraries (patch by Bernd Ernesti <bernd@arresum.inka.de>).
+ + correct a problem in libpanel, where the _nc_top_panel variable was
+ not set properly when bottom_panel() is called to hide a panel which
+ is the only one on the stack (report/analysis by Michael Andres
+ <ma@suse.de>, patch by Juergen Pfeifer).
+
+990918 pre-release
+ + add acsc string to HP 70092 terminfo entry (patch by Joerg Wunsch
+ <j@interface-business.de>).
+ + add top-level uninstall.data and uninstall.man makefile rules.
+ + correct logic of CF_LINK_FUNCS configure script, from BeOS changes so
+ that hard-links work on Unix again.
+ + change default value of cf_cv_builtin_bool to 1 as suggested by
+ Jeremy Buhler, making it less likely that a conflicting declaration
+ of bool will be seen when compiling with C++.
+
+990911 pre-release
+ + improved configure checks for builtin.h
+ + minor changes to C++ binding (remove static initializations, and make
+ configure-test for parameter initializations) for features not
+ allowed by vendor's C++ compilers (reported by Martin Mokrejs, this
+ applies to SGI, though I found SCO has the same characteristics).
+ + corrected quoting of ETIP_xxx definitions which support old versions
+ of g++, e.g., those using -lg++
+ + remove 'L' code from safe_sprintf.c, since 'long double' is not
+ widely portable. safe_sprintf.c is experimental, however, and
+ exists mainly as a fallback for systems without snprintf (reported
+ by Martin Mokrejs <mmokrejs@natur.cuni.cz>, for IRIX 6.2)
+ + modify definition of _nc_tinfo_fkeys in broken-linker configuration
+ so that it is not unnecessarily made extern (Jeffrey C Honig).
+
+990904 pre-release
+ + move definition for builtin.h in configure tests to specific check
+ for libg++, since qt uses the same filename incompatibly.
+ + correct logic of lib_termcap.c tgetstr function, which did not copy
+ the result to the buffer parameter. Testing shows Solaris does
+ update this, though of course tgetent's buffer is untouched (from
+ mpc.lists.freebsd.current newsgroup item by Peter Edwards
+ <peter.edwards@ireland.com>).
+ + corrected beterm terminfo entry, which lists some capabilities which
+ are not actually provided by the BeOS Terminal.
+ + add special logic to replace select() calls on BeOS, whose select()
+ function works only for sockets.
+ + correct missing escape in mkterm.h.awk.in, which caused part
+ of the copyright noticed to be omitted (reported by Peter
+ Wemm <peter@netplex.com.au>).
+ > several small changes to make the c++ binding and demo work on OS/2
+ EMX (related to a clean reinstall of EMX):
+ + correct library-prefix for c++ binding; none is needed.
+ + add $x suffix to make_hash and make_keys so 'make distclean' works.
+ + correct missing $x suffix for tack, c++ demo executables.
+ + split CF_CXX_LIBRARY into CF_GPP_LIBRARY (for -lg++) and
+ CF_STDCPP_LIBRARY (for -lstdc++)
+
+990828 pre-release
+ + add cygwin terminfo entry -TD
+ + modify CF_PROG_EXT configure macro to set .exe extension for cygwin.
+ + add configure option --without-cxx-binding, modifying the existing
+ --without-cxx option to check only for the C++ compiler
+ characteristics. Whether or not the C++ binding is needed, the
+ configure script checks for the size/type of bool, to make ncurses
+ match. Otherwise C++ applications cannot use ncurses.
+
+990821 pre-release
+ + updated configure macros CF_MAKEFLAGS, CF_CHECK_ERRNO
+ + minor corrections to beterm terminfo entry.
+ + modify lib_setup.c to reject values of $TERM which have a '/' in
+ them.
+ + add ifdef's to guard against CS5, CS6, CS7, CS8 being zero, as more
+ than one is on BeOS. That would break a switch statement.
+ + add configure macro CF_LINK_FUNCS to detect and work around BeOS's
+ nonfunctional link().
+ + improved configure macros CF_BOOL_DECL and CF_BOOL_SIZE to detect
+ BeOS's bool, which is declared as an unsigned char.
+
+990814 pre-release
+ + add ms-vt100 terminfo entry -TD
+ + minor fixes for misc/emx.src, based on testing with tack.
+ + minor fix for test/ncurses.c, test 'a', in case ncv is not set.
+
+990731 pre-release
+ + minor correction for 'screen' terminfo entry.
+ + clarify description of errret values for setupterm in manpage.
+ + modify tput to allow it to emit capabilities for hardcopy terminals
+ (patch by Goran Uddeborg <goeran@uddeborg.pp.se>).
+ + modify the 'o' (panel) test in ncurses.c to show the panels in color
+ or at least in bold, to test Juergen's change to wrefresh().
+ > patches by Juergen Pfeifer:
+ + Fixes a problem using wbkgdset() with panels. It has actually
+ nothing to with panels but is a problem in the implementation of
+ wrefresh(). Whenever a window changes its background attribute to
+ something different than newscr's background attribute, the whole
+ window is touched to force a copy to newscr. This is an unwanted
+ side-effect of wrefresh() and it is actually not necessary. A
+ changed background attribute affects only further outputs of
+ background it doesn't mean anything to the current content of the
+ window. So there is no need to force a copy. (reported by Frank
+ Heckenbach <frank@g-n-u.de>).
+ + an upward compatible enhancement of the NCursesPad class in the C++
+ binding. It allows one to add a "viewport" window to a pad and then
+ to use panning to view the pad through the viewport window.
+
+990724 pre-release
+ + suppress a call to def_prog_mode() in the SIGTSTP handler if the
+ signal was received while not in curses mode, e.g., endwin() was
+ called in preparation for spawning a shell command (reported by Frank
+ Heckenbach <frank@g-n-u.de>)
+ + corrected/enhanced xterm-r5, xterm+sl, xterm+sl-twm terminfo entries.
+ + change test for xterm mouse capability: it now checks only if the
+ user's $DISPLAY variable is set in conjunction with the kmous
+ capability being present in the terminfo. Before, it checked if any
+ of "xterm", "rxvt" or "kterm" were substrings of the terminal name.
+ However, some emulators which are incompatible with xterm in other
+ ways do support the xterm mouse capability.
+ + reviewed and made minor changes in ncurses to quiet g++ warnings
+ about shadowed or uninitialized variables. g++ incorrectly warns
+ about uninitialized variables because it does not take into account
+ short-circuit expression evaluation.
+ + change ncurses 'b' test to start in color pair 0 and to show in the
+ right margin those attributes which are suppressed by no_color_video,
+ i.e., "(NCV)".
+ + modify ifdef's in curses.h so that __attribute__ is not redefined
+ when compiling with g++, but instead disabled the macros derived for
+ __attribute__ since g++ does not consistently recognize the same
+ keywords as gcc (reported by Stephan K Zitz <zitz@erf.net>).
+ + update dependencies for term.h in ncurses/modules (reported by
+ Ilya Zakharevich).
+
+990710 pre-release
+ + modify the form demo in ncurses.c to illustrate how to manipulate the
+ field appearance, e.g, for highlighting or translating the field
+ contents.
+ + correct logic in write_entry from split-out of home_terminfo in
+ 980919, which prevented update of $HOME/.terminfo (reported by Philip
+ Spencer <pspencer@fields.utoronto.ca>).
+
+990703 pre-release
+ + modify linux terminfo description to make use of kernel 2.2.x mods
+ that support cursor style, e.g., to implement cvvis (patch by Frank
+ Heckenbach <frank@g-n-u.de>)
+ + add special-case in setupterm to retain previously-saved terminal
+ settings in cur_term, which happens when curses and termcap calls are
+ mixed (from report by Bjorn Helgaas <helgaas@dhc.net>).
+ + suppress initialization of key-tries in _nc_keypad() if we are only
+ disabling keypad mode, e.g., in endwin() called when keypad() was
+ not.
+ + modify the Ada95 makefile to ensure that always the Ada files from
+ the development tree are used for building and not the eventually
+ installed ones (patch by Juergen Pfeifer).
+
+990626 pre-release
+ + use TTY definition in tack/sysdep.c rather than struct termios
+ (reported by Philippe De Muyter).
+ + add a fallback for strstr, used in lib_mvcur.c and tack/edit.c,
+ not present on sysV68 (reported by Philippe De Muyter).
+ + correct definition in comp_hash.c to build with configure
+ --with-rcs-ids option.
+
+990619 pre-release
+ + modified ifdef's for sigaction and sigvec to ensure we do not try to
+ handle SIGTSTP if neither is available (from report by Philippe De
+ Muyter).
+ > patch by Philippe De Muyter:
+ + in tic.c, use `unlink' if `remove' is not available.
+ + use only `unsigned' as fallback value for `speed_t'. Some files used
+ `short' instead.
+
+990616 pre-release
+ + fix some compiler warnings in tack.
+ + add a check for predefined bool type in CC, based on report that
+ BeOS predefines a bool type.
+ + correct logic for infocmp -e option (i.e., the configure
+ --with-fallbacks option), which I'd not updated when implementing
+ extended names (cf: 990301). The new implementation adds a -E
+ option to infocmp.
+ > patch by Juergen Pfeifer:
+ + introduce the private type Curses_Bool in the Ada95 binding
+ implementation. This is to clearly represent the use of "bool" also
+ in the binding. It should have no effect on the generated code.
+ + improve the man page for field_buffer() to tell the people, that the
+ whole buffer including leading/trailing spaces is returned. This is
+ a common source of confusion, so it's better to document it clearly.
+
+990614 pre-release
+ > patch by Juergen Pfeifer:
+ + use pragma PreElaborate in several places.
+ + change a few System.Address uses to more specific types.
+ + change interface version-number to 1.0
+ + regenerate Ada95 HTML files.
+
+990612 pre-release
+ + modify lib_endwin.c to avoid calling reset_shell_mode(), return ERR
+ if it appears that curses was never initialized, e.g., by initscr().
+ For instance, this guards against setting the terminal modes to
+ strange values if endwin() is called after setupterm(). In the same
+ context, Solaris curses will dump core.
+ + modify logic that avoids a conflict in lib_vidattr.c between sgr0 and
+ equivalent values in rmso or rmul by ensuring we do not modify the
+ data which would be returned by the terminfo or termcap interfaces
+ (reported by Brad Pepers <brad@linuxcanada.com>, cf: 960706).
+ + add a null-pointer check for SP in lib_vidattr.c to logic that checks
+ for magic cookies.
+ + improve fallback declaration of 'bool' when the --without-cxx option
+ is given, by using a 'char' on i386 and related hosts (from
+ discussion with Alexander Lukyanov).
+
+990605 pre-release
+ + include time.h in lib_napms.c if nanosleep is used (patch by
+ R Lindsay Todd <toddr@rpi.edu>).
+ + add an "#undef bool" to curses.h, in case someone tries to define it,
+ e.g., perl.
+ + add check to tparm to guard against divide by zero (reported by Aaron
+ Campbell <aaron@ug.cs.dal.ca>).
+
+990516 pre-release
+ + minor fix to build tack on CLIX (mismatched const).
+ > patch by Juergen Pfeifer:
+ + change Juergen's old email address with new one in the files where it
+ is referenced. The Ada95 HTML pages are regenerated.
+ + update MANIFEST to list the tack files.
+
+990509 pre-release
+ + minor fixes to make 'tack' build/link on NeXT (reported by Francisco
+ A. Tomei Torres).
+
+990417 pre-release
+ + add 'tack' program (which is GPL'd), updating it to work with the
+ modified TERMTYPE struct and making a fix to support setaf/setab
+ capabilities. Note that the tack program is not part of the
+ ncurses libraries, but an application which can be distributed with
+ ncurses. The configure script will ignore the directory if it is
+ omitted, however.
+ + modify gpm mouse support so that buttons 2 and 3 are used for
+ select/paste only when shift key is pressed, making them available
+ for use by an application (patch by Klaus Weide).
+ + add complete list of function keys to scoansi terminfo entry - TD
+
+990410 pre-release
+ + add a simple test program cardfile.c to illustrate how to read form
+ fields, and showing forms within panels.
+ + change shared-library versioning for the Hurd to be like Linux rather
+ than *BSD (patch by Mark Kettenis <kettenis@wins.uva.nl>).
+ + add linux-lat terminfo entry.
+ + back-out _nc_access check in read_termcap.c (both incorrect and
+ unnecessary, except to guard against a small window where the file's
+ ownership may change).
+
+990403 pre-release
+ + remove conflicting _nc_free_termtype() function from test module
+ lib_freeall.c
+ + use _nc_access check in read_termcap.c for termpaths[] array (noted
+ by Jeremy Buhler, indicating that Alan Cox made a similar patch).
+ > patch by Juergen Pfeifer:
+ + modify menu creation to not inherit status flag from the default menu
+ which says that the associated marker string has been allocated and
+ should be freed (bug reported by Marek Paliwoda"
+ <paliwoda@kki.net.pl>)
+
+990327 pre-release (alpha.gnu.org:/gnu/ncurses-5.0-beta1.tar.gz)
+ + minor fixes to xterm-xfree86 terminfo entry - TD.
+ + split up an expression in configure script check for ldconfig to
+ workaround limitation of BSD/OS sh (reported by Jeff Haas
+ <jmh@mail.msen.com>).
+ + 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
+ accommodate its definition on NeXT (reported by Francisco A. Tomei
+ Torres).
+ + add sigismember() to base/sigaction.c compatibility to link on NeXT
+ (reported by Francisco A. Tomei Torres).
+ + further refinements to inequality in hashmap.c to cover a case with
+ ^U in nvi (patch by Alexander Lukyanov).
+
+990316 pre-release
+ + add fallback definition for getcwd, to link on NeXT.
+ + add a copy of cur_term to tic.c to make it link properly on NeXT
+ (reported by Francisco A. Tomei Torres).
+ + change inequality in hashmap.c which checks the distance traveled by
+ a chunk so that ^D command in nvi (scrolls 1/2 screen) will use
+ scrolling logic (patch by Alexander Lukyanov, reported by Jeffrey
+ C Honig).
+
+990314 pre-release
+ + modify lib_color.c to handle a special case where the curscr
+ attributes have been made obsolete (patch by Alexander Lukyanov).
+ + update BSD/OS console terminfo entries to use klone+sgr and
+ klone+color (patch by Jeffrey C Honig).
+ + update glibc addon configure script for extended capabilities.
+ + correct a couple of warnings in the --enable-const configuration.
+ + make comp_hash build properly with _nc_strdup(), on NeXT (reported by
+ Francisco A. Tomei Torres <francisco.tomei@cwix.com>).
+
+990313 pre-release
+ + correct typos in linux-c initc string - TD
+ + add 'crt' terminfo entry, update xterm-xfree86 entry - TD
+ + remove a spurious argument to tparm() in lib_sklrefr.c (patch by
+ Alexander Lukyanov).
+
+990307 pre-release
+ + back-out change to wgetch because it causes a problem with ^Z
+ handling in lynx (reported by Kim DeVaughn).
+
+990306 pre-release
+ + add -G option to tic and infocmp, to reverse the -g option.
+ + recode functions in name_match.c to avoid use of strncpy, which
+ caused a 4-fold slowdown in tic (cf: 980530).
+ + correct a few warnings about sign-extension in recent changes.
+ > patch by Juergen Pfeifer:
+ + fixes suggested by Jeff Bradbury <jibradbury@lucent.com>:
+ + improved parameter checking in new_fieldtype().
+ + fixed a typo in wgetch() timeout handling.
+ + allow slk_init() to be called per newterm call. The internal SLK
+ state is stored in the SCREEN struct after every newterm() and then
+ reset for the next newterm.
+ + fix the problem that a slk_refresh() refreshes stdscr if the
+ terminal has true SLKs.
+ + update HTML documentation for Ada binding.
+
+990301 pre-release
+ + remove 'bool' casts from definitions of TRUE/FALSE so that statements
+ such as "#if TRUE" work. This was originally done to allow for a C++
+ compiler which would warn of implicit conversions between enum and
+ int, but is not needed for g++ (reported by Kim DeVaughn).
+ + add use_extended_names() function to allow applications to suppress
+ read of the extended capabilities.
+ + add configure option --enable-tcap-names to support logic which
+ allows ncurses' tic to define new (i.e., extended) terminal
+ capabilities. This is activated by the tic -x switch. The infocmp
+ program automatically shows or compares extended capabilities.
+ Note: This changes the Strings and similar arrays in the TERMTYPE
+ struct so that applications which manipulate it must be recompiled.
+ + use macros typeMalloc, typeCalloc and typeRealloc consistently
+ throughout ncurses library.
+ + add _nc_strdup() to doalloc.c.
+ + modify define_key() to allow multiple strings to be bound to the
+ same keycode.
+ + correct logic error in _nc_remove_string, from 990220.
+ > patch by Juergen Pfeifer, for Ada95 binding:
+ + regenerate some of the html documentation
+ + minor cleanup in terminal_interface-curses.adb
+
+990220 pre-release
+ + resolve ambiguity of kend/kll/kslt and khome/kfnd/kich1 strings in
+ xterm and ncsa terminfo entries by removing the unneeded ones. Note
+ that some entries will return kend & khome versus kslt and kfnd, for
+ PC-style keyboards versus strict vt220 compatiblity - TD
+ + add function keybound(), which returns the definition associated with
+ a given keycode.
+ + modify define_key() to undefine the given string when no keycode is
+ given.
+ + modify keyok() so it works properly if there is more than one string
+ defined for a keycode.
+ + add check to tic to warn about terminfo descriptions that contain
+ more than one key assigned to the same string. This is shown only if
+ the verbose (-v) option is given. Moved related logic (tic -v) from
+ comp_parse.c into the tic program.
+ + add/use _nc_trace_tries() to show the function keys that will be
+ recognized.
+ + rename init_acs to _nc_init_acs (request by Alexander Lukyanov).
+ > patch by Juergen Pfeifer, for Ada95 binding:
+ + remove all the *_adabind.c from ncurses, menu and form projects.
+ Those little helper routines have all been implemented in Ada and are
+ no longer required.
+ + The option handling routines in menu and form have been made more
+ save. They now make sure that the unused bits in options are always
+ zero.
+ + modify configuration scripts to
+ + use gnatmake as default compiler name. This is a safer choice than
+ gcc, because some GNAT implementations use other names for the
+ compilerdriver to avoid conflicts.
+ + use new default installation locations for the Ada files according
+ to the proposed GNU Ada filesystem standard (for Linux).
+ + simplify the Makefiles for the Ada binding
+ + rename ada_include directory to src.
+
+990213
+ + enable sigwinch handler by default.
+ + disable logic that allows setbuf to be turned off/on, because some
+ implementations will overrun the buffer after it has been disabled
+ once.
+
+990206
+ + 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.
+ > patch by Juergen Pfeifer, for Ada95 binding:
+ + removed all pragma Preelaborate() stuff, because the just released
+ gnat-3.11p complains on some constructs.
+ + fixed some upper/lower case notations because gnat-3.11p found
+ inconsistent use.
+ + used a new method to generate the HTML documentation of the Ada95
+ binding. This invalidates nearly the whole ./Ada95/html subtree.
+ Nearly all current files in this subtree are removed
+
+990130
+ + cache last result from _nc_baudrate, for performance (suggested by
+ Alexander Lukyanov).
+ + modify ClrUpdate() function to workaround a problem in nvi, which
+ uses redrawwin in SIGTSTP handling. Jeffrey C Honig reported that
+ ncurses repainted the screen with nulls before resuming normal
+ operation (patch by Alexander Lukyanov).
+ + generalize is_xterm() function a little by letting xterm/rxvt/kterm
+ be any substring rather than the prefix.
+ + modify lib_data.c to initialize SP. Some linkers, e.g., IBM's, will
+ not link a module if the only symbols exported from the module are
+ uninitialized ones (patch by Ilya Zakharevich, who says that he has
+ seen messages claiming this behaviour conforms to the standard.)
+ + move call on _nc_signal_handler past _nc_initscr, to avoid a small
+ window where Nttyb hasn't yet been filled (reported by Klaus Weide).
+ + 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 (patch by Klaus Weide).
+ + correct spelling of ACS_ names in curs_border.3x (reported by Bob van
+ der Poel <bvdpoel@kootenay.com>).
+ + correct a couple of typos in the macros supporting the configure
+ --with-shlib-version option.
+
+990123
+ + modify fty_regex.c to compile on HAVE_REGEXPR_H_FUNCS machine (patch
+ by Kimio Ishii <ishii@csl.sony.co.jp>).
+ + rename BSDI console terminfo entries: bsdos to bsdos-pc-nobold, and
+ 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 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
+ intended for compatiblity upgrades on Digital Unix, which used
+ versioned libraries in ncurses 4.2, but no longer does (cf: 980425).
+ + resync configure script against autoconf 2.13 + patches
+ + minor improvements for teraterm terminfo entry based on the program's
+ source distribution.
+
+990116
+ + change default for configure --enable-big-core to assume machines do
+ have enough memory to resolve terminfo.src in-memory.
+ + correct name of ncurses library in TEST_ARGS when configuring with
+ debug library.
+ + minor fixes to compile ncurses library with broken-linker with g++.
+ + add --enable-broken-linker configure option, default to environment
+ variable $BROKEN_LINKER (request by Jeffrey C Honig).
+ + change key_names[] array to static since it is not part of the curses
+ interface (reported by Jeffrey C Honig <jch@bsdi.com>).
+
+990110
+ + add Tera Term terminfo entry - TD
+
+990109
+ + reviewed/corrected macros in curses.h as per XSI document.
+ + provide support for termcap PC variable by copying it from terminfo
+ data and using it as the padding character in tputs (reported by
+ Alexander Lukyanov).
+ + corrected iris-ansi and iris-ansi-ap terminfo entries for kent and
+ kf9-kf12 capabilities, as well as adding kcbt.
+ + document the mouse handling mechanism in menu_driver and make a small
+ change in menu_driver's return codes to provide more consistency
+ (patch by Juergen Pfeifer).
+ + add fallback definition for NCURSES_CONST to termcap.h.in (reported
+ by Uchiyama Yasushi <uch@nop.or.jp>).
+ + move lib_restart.c to ncurses/base, since it uses curses functions
+ directly, and therefore cannot be used in libtinfo.so
+ + rename micro_char_size to micro_col_size, adding #define to retain
+ old name.
+ + add set_a_attributes and set_pglen_inch to terminfo structure, as per
+ XSI and Solaris 2.5.
+ + minor makefile files to build ncurses test_progs
+ + update html files in misc directory to reflect changes since 4.2
+
+990102
+ + disable scroll hints when hashmap is enabled (patch by Alexander
+ Lukyanov).
+ + move logic for tic's verify of -e option versus -I and -C so that the
+ terminfo data is not processed if we cannot handle -e (reported by
+ Steven Schwartz <steves@unitrends.com>.
+ + add test-driver traces to terminfo and termcap functions.
+ + 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. If an application does not
+ set ospeed, the library behaves as before, except that _nc_timed_wait
+ is no longer used, or needed, since ospeed always has a value. But
+ the application can modify ospeed to adjust the output of padding
+ characters (from a bug report for screen 3.7.6 and email from Michael
+ Schroeder <Michael.Schroeder@informatik.uni-erlangen.de>).
+ + removed some unused ifdef's as part of Alexander's restructuring.
+ + 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.
+ + change linux terminfo entry to use ncv#2, since underline does not
+ work with color
+
+981226
+ + miscellaneous corrections for curses.h to match XSI.
+ + change --enable-no-padding configure option to be normally enabled.
+ + add section to ncurses manpage for environment variables.
+ + investigated Debian bug report that pertains to screen 3.7.4/3.7.6
+ changes, found no sign of problems on Linux (or on SunOS, Solaris)
+ running screen built with ncurses.
+ + check if tmp_fp is opened in tic.c before closing it (patch by Pavel
+ Roskin <pavel_roskin@geocities.com>).
+ + correct several font specification typos in man-pages.
+
+981220
+ + correct default value for BUILD_CC (reported by Larry Virden).
+
+981219
+ + modify _nc_set_writedir() to set a flag in _nc_tic_dir() to prevent
+ it from changing the terminfo directory after chdir'ing to it.
+ Otherwise, a relative path in $TERMINFO would confuse tic (from a
+ Debian bug report).
+ + correct/update ncsa terminfo entry (report by Larry Virden).
+ + update xterm-xfree86 terminfo to current (patch 90), smcur/rmcur
+ changes
+ + add Mathew Vernon's mach console entries to terminfo.src
+ + more changes, moving functions, as part of Alexander's restructuring.
+ + modify configure script for GNU/Hurd share-library support, introduce
+ BUILD_CC variable for cross compiling (patch by Uchiyama Yasushi
+ <uch@nop.or.jp>)
+
+981212
+ + add environment variable NCURSES_NO_SETBUF to allow disabling the
+ setbuf feature, for testing purposes.
+ + correct ifdef's for termcap.h versus term.h that suppress redundant
+ declarations of prototypes (reported by H.J.Lu).
+ + modify Makefile.os2 to add linker flags which allow multiple copies
+ of an application to coexist (reported by Ilya Zakharevich).
+ + update Makefile.glibc and associated configure script so that ncurses
+ builds as a glibc add-on with the new directory configuration
+ (reported by H.J.Lu).
+
+981205
+ + modify gen_reps() function in gen.c to work properly on SunOS
+ (sparc), which is a left-to-right architecture.
+ + 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. Now relative_move will not
+ generate a string with a leading digit in that case (overwrite).
+ Also, tputs will only interpret padding if the string begins with a
+ digit; as coded it permitted a string to begin with a decimal point
+ or asterisk (reported by Larry Virden).
+ > patches by Juergen Pfeifer:
+ + fix a typo in m_driver.c mouse handling and improves the error
+ handling.
+ + fix broken mouse handling in the Ada95 binding
+ + make the Ada95 sample application menus work with the new menu mouse
+ support
+ + improve the mouse handling introduced by Ilya; it now handles menus
+ with spacing.
+ + repair a minor bug in the menu_driver code discovered during this
+ rework.
+ + add new function wmouse_trafo() to hide implementation details of
+ _yoffset member of WINDOW struct needed for mouse coordinate
+ transformation.
+
+981128
+ + modify Ada95/gen/gen.c to avoid using return-value of sprintf, since
+ some older implementations (e.g., SunOS 4.x) return the buffer
+ address rather than its length.
+ > patch by Rick Ohnemus:
+ + modify demo.cc to get it to compile with newer versions of egcs.
+ + trim a space that appears at the end of the table preprocessor lines
+ ('\" t). This space prevents some versions of man from displaying
+ the pages - changed to remove all trailing whitespace (TD)
+ + finally, 'make clean' does not remove panel objects.
+ > patches by Ilya Zakharevich:
+ + allow remapping of OS/2 mouse buttons using environment variable
+ MOUSE_BUTTONS_123 with the default value 132.
+ + add mouse support to ncurses menus.
+
+981121
+ + modify misc/makedef.cmd to report old-style .def file symbols, and to
+ generate the .def files sorted by increasing names rather than the
+ reverse.
+ + add misc/*.ref which are J.J.G.Ripoll's dll definition files (renamed
+ from misc/*.old), and updated based on the entrypoint coding he used
+ for an older version of ncurses.
+ + add README.emx, to document how to build on OS/2 EMX.
+ + updates for config.guess, config.sub from Lynx
+ > patches by Ilya Zakharevich:
+ + minor fixes for mouse handling mode:
+ a) Do not initialize mouse if the request is to have no mouse;
+ b) Allow switching of OS/2 VIO mouse on and off.
+ + modify Makefile.os2 to support alternative means of generating
+ configure script, by translating Unix script with Perl.
+ > patches by Juergen Pfeifer:
+ + Updates MANIFEST to reflect changes in source structure
+ + Eliminates a problem introduced with my last patch for the C++
+ binding in the panels code. It removes the update() call done in the
+ panel destructor.
+ + Changes in the Ada95 binding to better support systems where
+ sizeof(chtype)!=sizeof(int) (e.g. DEC Alpha).
+
+981114
+ + modify install-script for manpages to skip over .orig and .rej files
+ (request by Larry Virden).
+ > patches/discussion by Alexander Lukyanov:
+ + move base-library sources into ncurses/base and tty (serial terminal)
+ sources into ncurses/tty, as part of Alexander Lukyanov's proposed
+ changes to ncurses library.
+ + copy _tracemouse() into ncurses.c so that lib_tracemse.c need not
+ be linked into the normal ncurses library.
+ + move macro winch to a function, to hide details of struct ldat
+ > patches by Juergen Pfeifer:
+ + fix a potential compile problem in cursesw.cc
+ + some Ada95 cosmetics
+ + fix a gen.c problem when compiling on 64-Bit machines
+ + fix Ada95/gen/Makefile.in "-L" linker switch
+ + modify Ada95 makefiles to use the INSTALL_PREFIX setting.
+
+981107
+ + ifdef'd out lib_freeall.c when not configured.
+ + rename _tracebits() to _nc_tracebits().
+ + move terminfo-library sources into ncurses/tinfo, and trace-support
+ functions into ncurses/trace as part of Alexander Lukyanov's proposed
+ changes to ncurses library.
+ + modify generated term.h to always specify its own definitions for
+ HAVE_TERMIOS_H, etc., to guard against inclusion by programs with
+ broken configure scripts.
+
+981031
+ + modify terminfo parsing to accept octal and hexadecimal constants,
+ like Solaris.
+ + remove an autoconf 2.10 artifact from the configure script's check
+ for "-g" compiler options. (Though harmless, this confused someone
+ at Debian, who recently issued a patch that results in the opposite
+ effect).
+ + add configure option --with-ada-compiler to accommodate installations
+ that do not use gcc as the driver for GNAT (patch by Juergen
+ Pfeifer).
+
+981017
+ + ensure ./man exists in configure script, needed when configuring
+ with --srcdir option.
+ + modify infocmp "-r" option to remove limit on formatted termcap
+ output, which makes it more like Solaris' version.
+ + modify captoinfo to treat no-argument case more like Solaris'
+ version, which uses the contents of $TERMCAP as the entry to format.
+ + modify mk-2nd.awk to handle subdirectories, e.g., ncurses/tty
+ (patch by Alexander V Lukyanov).
+
+981010
+ + modify --with-terminfo-dirs option so that the default value is the
+ ${datadir} value, unless $TERMINFO_DIRS is already set. This gets
+ 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 C Miller).
+ + rename manpage file curs_scr_dmp.3x to curs_scr_dump.3x, to
+ correspond with contents (reported by Neil Zanella
+ <nzanella@cs.mun.ca>).
+ + remove redundant configure check for C++ which did not work when $CXX
+ was specified with a full pathname (reported by Andreas Jaeger).
+ + corrected bcopy/memmove check; the macro was not standalone.
+
+981003
+ + remove unnecessary portion of OS/2 EMX mouse change from
+ check_pending() (reported by Alexander V Lukyanov).
+
+980926
+ + implement mouse support for OS/2 EMX (adapted from patch against
+ 4.2(?) by Ilya Zakharevich).
+ + add configure-check for bcopy/memmove, for 980919 changes to hashmap.
+ + merge Data General terminfo from Hasufin <hasufin@vidnet.net> - TD
+ + merge AIX 3.2.5 terminfo descriptions for IBM terminals, replaces
+ some older entries - TD
+ + modify tic to compile into %'char' form in preference to %{number},
+ since that is a little more efficient.
+ + minor correction to infocmp to avoid displaying "difference" between
+ two capabilities that are rendered in equivalent forms.
+ + add -g option to tic/infocmp to force character constants to be
+ displayed in quoted form. Otherwise their decimal values are shown.
+ + modify setupterm so that cancelled strings are treated the same as
+ absent strings, cancelled and absent booleans false (does not affect
+ tic, infocmp).
+ + modify tic, infocmp to discard redundant i3, r3 strings when output
+ to termcap format.
+ > 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.
+ + use format string for printing strings.
+ + use len argument correctly in save_text, and pass it to save_number.
+
+980919
+ + make test_progs compile (but hashmap does not function).
+ + correct NC_BUFFERED macro, used in lib_mvcur test-driver, modify
+ associated logic to avoid freeing the SP->_setbuf data.
+ + add modules home_terminfo and getenv_num to libtinfo.
+ + move write_entry to libtinfo, to work with termcap caching.
+ + minor fixes to blue.c to build with atac.
+ + remove softscroll.c module; no longer needed for testing.
+ > patches by Todd C Miller:
+ + use strtol(3) instead of atoi(3) when parsing env variables so we can
+ detect a bogus (non-numeric) value.
+ + check for terminal names > MAX_NAME_SIZE in a few more places when
+ dealing with env variables again.
+ + fix a MAX_NAME_SIZE that should be MAX_NAME_SIZE+1
+ + use sizeof instead of strlen(3) on PRIVATE_INFO since it is a fixed
+ 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:
+ + 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
+ newhash data to SP struct.
+ + invoke del_curterm from delscreen.
+ + modify del_curterm to set cur_term to null if it matches the
+ function's parameter which is deleted.
+ + modify lib_doupdate to prefer parm_ich to the enter_insert_mode and
+ exit_insert_mode combination, adjusting InsCharCost to check
+ enter_insert_mode, exit_insert_mode and insert_padding. Add
+ insert_padding in insert mode after each char. This adds new costs
+ to the SP struct.
+
+980912
+ + modify test-driver in lib_mvcur.s to use _nc_setbuffer, for
+ consistent treatment.
+ + modify ncurses to restore output to unbuffered on endwin, and resume
+ buffering in refresh (see lib_set_term.c and NC_BUFFERED macro).
+ + corrected HTML version numbers (according to the W3C validator, they
+ never were HTML 2.0-compliant, but are acceptable 3.0).
+
+980905
+ + modify MKterminfo.sh to generate terminfo.5 with tables sorted by
+ capability name, as in SVr4.
+ + modified term.h, termcap.h headers to avoid redundant declarations.
+ + change 'u_int' type in tset.c to unsigned, making this compile on
+ Sequent PRX 4.1 (reported by Michael Sterrett <msterret@coat.com>).
+
+980829
+ + corrections to mailing addresses, and moving the magic line that
+ causes the man program to invoke tbl to the first line of each
+ manpage (patch by Rick Ohnemus <rick@ecompcon.com>).
+ + 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.
+ > 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.
+
+980822
+ + document AT&T acs characters in terminfo.5 manpage.
+ + use EMX _scrsize() function if terminfo and environment do not
+ declare the screen size (reported by Ilya Zakharevich
+ <ilya@math.ohio-state.edu>).
+ + remove spurious '\' characters from eterm and osborne terminfo
+ entries (prompted by an old Debian bug report).
+ + correct reversed malloc/realloc calls in _nc_doalloc (reported by
+ Hans-Joachim Widmaier <hjwidmai@foxboro.com>).
+ + correct misplaced parenthesis which caused file-descriptor from
+ opening termcap to be lost, from 980725 changes (reported by Andreas
+ Jaeger).
+
+980815
+ + modify lib_setup.c to eliminate unneeded include of <sys/ioctl.h>
+ when termios is not used (patch by Todd C Miller).
+ + add function _nc_doalloc, to ensure that failed realloc calls do not
+ leak memory (reported by Todd C Miller).
+ + improved ncsa-telnet terminfo entry.
+
+980809
+ + correct missing braces around a trace statement in read_entry.c,
+ from 980808 (reported by Kim DeVaughn <kimdv@best.com> and Liviu
+ Daia).
+
+980808
+ + fix missing include <errno.h> in ditto.c (reported by Bernhard
+ Rosenkraenzer <bero@k5.sucks.eu.org>)
+ + add NCSA telnet terminfo entries from Francesco Potorti
+ <F.Potorti@cnuce.cnr.it>, from Debian bug reports.
+ + make handling of $LINES and $COLUMNS variables more compatible with
+ Solaris by allowing them to individually override the window size
+ as obtained via ioctl.
+
+980801
+ + 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.
+ + add 'ditto.c' to test directory to illustrate use of newterm for
+ initializing multiple screens.
+ + modify _nc_write_entry() to recover from failed attempt to link alias
+ for a terminfo on a filesystem which does not preserve character case
+ (reported by Peter L Jordan <PJordan@chla.usc.edu>).
+
+980725
+ + updated versions of config.guess and config.sub based on automake 1.3
+ + change name-comparisons in lib_termcap to compare no more than 2
+ characters (gleaned from Debian distribution of 1.9.9g-8.8, verified
+ with Solaris curses).
+ + fix typo in curs_insstr.3x (patch by Todd C Miller)
+ + 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 (request by
+ Cristian Gafton <gafton@redhat.com>, responding to Duncan Simpson
+ <dps@io.stargate.co.uk>).
+ + arm100 terminfo entries from Dave Millen <dmill@globalnet.co.uk>).
+ + qnxt2 and minitel terminfo entries from esr's version.
+
+980718
+ + use -R option with ldconfig on FreeBSD because otherwise it resets
+ the search path to /usr/lib (reported by Dan Nelson).
+ + add -soname option when building shared libraries on OpenBSD 2.x
+ (request by QingLong).
+ + add configure options --with-manpage-format and
+ --with-manpage-renames (request by QingLong).
+ + correct conversion of CANCELLED_NUMERIC in write_object(), which was
+ omitting the high-order byte, producing a 254 in the compiled
+ terminfo.
+ + modify return-values of tgetflag, tgetnum, tgetstr, tigetflag,
+ tigetnum and tigetstr to be compatible with Solaris (gleaned from
+ Debian distribution of 1.9.9g-8.8).
+ + modify _nc_syserr_abort to abort only when compiled for debugging,
+ otherwise simply exit with an error.
+
+980711
+ + modify Ada95 'gen' program to use appropriate library suffix (e.g.,
+ "_g" for a debug build).
+ + update Ada95 'make clean' rule to include generics .ali files
+ + add a configure test to ensure that if GNAT is found, that it can
+ compile/link working Ada95 program.
+ + flush output in beep and flash functions, fixing a problem with
+ getstr (patch by Alexander V Lukyanov)
+ + fix egcs 1.0.2 warning for etip.h (patch by Chris Johns).
+ + correct ifdef/brace nesting in lib_sprintf.c (patch by Bernhard
+ Rosenkraenzer <bero@Pool.Informatik.RWTH-Aachen.DE>).
+ + correct typo in wattr_get macro from 980509 fixes (patch by Dan
+ Nelson).
+
+980704
+ + merge changes from current XFree86 xterm terminfo descriptions.
+ + add configure option '--without-ada'.
+ + add a smart-default for termcap 'ac' to terminfo 'acs_chars' which
+ corresponds to vt100.
+ + change translation for termcap 'rs' to terminfo 'rs2', which is
+ the documented equivalent, rather than 'rs1'.
+
+980627
+ + slow 'worm' down a little, for very fast machines.
+ + corrected firstchar/lastchar computation in lib_hline.c
+ + simplify some expressions with CHANGED_CELL, CHANGED_RANGE and
+ CHANGED_TO_EOL macros.
+ + modify init_pair so that if a color-pair is reinitialized, we will
+ repaint the areas of the screen whose color changes, like SVr4 curses
+ (reported by Christian Maurer <maurer@inf.fu-berlin.de>).
+ + modify getsyx/setsyx macros to comply with SVr4 man-page which
+ says that leaveok() affects their behavior (report by Darryl Miles,
+ patch by Alexander V Lukyanov).
+
+980620
+ + review terminfo.5 against Solaris 2.6 curses version, corrected
+ several minor errors/omissions.
+ + implement tparm %l format.
+ + implement tparm printf-style width and precision for %s, %d, %x, %o
+ as per XSI.
+ + implement tparm dynamic variables (reported by Xiaodan Tang).
+
+980613
+ + update man-page for for wattr_set, wattr_get (cf: 980509)
+ + correct limits in hashtest, which would cause nonprinting characters
+ to be written to large screens.
+ + correct configure script, when --without-cxx was specified: the
+ wrong variable was used for cf_cv_type_of_bool. Compilers up to gcc
+ 2.8 tolerated the missing 'int'.
+ + remove the hardcoded name "gcc" for the GNU Ada compiler. The
+ compiler's name might be something like "egcs" (patch by Juergen
+ Pfeifer).
+ + correct curs_addch.3x, which implied that echochar could directly
+ display control characters (patch by Alexander V Lukyanov).
+ + fix typos in ncurses-intro.html (patch by Sidik Isani
+ <isani@cfht.hawaii.edu>)
+
+980606
+ + add configure test for conflicting use of exception in math.h and
+ other headers.
+ + minor optimization to 'hash()' function in hashmap.c, reduces its
+ time by 10%.
+ + correct form of LD_SHARED_OPTS for HP-UX 10.x (patch by Tim Mooney).
+ + fix missing quotes for 'print' in MKunctrl.awk script (reported by
+ Mihai Budiu <mihaib@gs41.sp.cs.cmu.edu>).
+ > patch by Alexander V Lukyanov:
+ + correct problem on Solaris (with poll() function) where getch could
+ hang indefinitely even if timeout(x) was called. This turned out to
+ be because milliseconds was not updated before 'goto retry' in
+ _nc_timed_wait.
+ + simplified the function _nc_timed_wait and fixed another bug, which
+ was the assumption of !GOOD_SELECT && HAVE_GETTIMEOFDAY in *timeleft
+ assignment.
+ + removed the cycle on EINTR, as it seems to be useless.
+
+980530
+ + add makefile-rule for test/keynames
+ + modify run_tic.sh and shlib to ensure that user's .profile does not
+ override the $PATH used to run tic (patch by Tim Mooney).
+ + restore LD_SHARED_OPTS to $(LD_SHARED_FLAGS) when linking programs,
+ needed for HP-UX shared-library path (recommended by Tim Mooney).
+ + remove special case of HP-UX -L options, use +b options to embed
+ $(libdir) in the shared libraries (recommended by Tim Mooney).
+ + add checks for some possible buffer overflows and unchecked
+ malloc/realloc/calloc/strdup return values (patch by Todd C Miller
+ <Todd.Miller@courtesan.com>)
+
+980523
+ + correct maxx/maxy expression for num_columns/num_lines in derwin
+ (patch by Alexander V Lukyanov).
+ + add /usr/share/lib/terminfo and /usr/lib/terminfo as compatibilty
+ fallbacks to _nc_read_entry(), along with --with-terminfo-dirs
+ configure option (suggested by Mike Hopkirk).
+ + modify config.guess to recognize Unixware 2.1 and 7 (patch by Mike
+ Hopkirk <hops@sco.com>).
+ + suppress definition of CC_SHARED_OPTS in LDFLAGS_SHARED in c++
+ Makefile.in, since this conflicts when g++ is used with HP-UX
+ compiler (reported by Tim Mooney).
+ + parenthesize 'strcpy' calls in c++ binding to workaround redefinition
+ in some C++ implementations (reported by several people running
+ egcs with glibc 2.0.93, analysis by Andreas Jaeger.
+
+980516
+ + modify write_entry.c so that it will not attempt to link aliases
+ with embedded '/', but give only a warning.
+ + put -L$(libdir) first when linking programs, except for HP-UX.
+ + modify comp_scan.c to handle SVr4 terminfo description for att477,
+ which contains a colon in the description field.
+ + modify configure script to support SCO osr5.0.5 shared libraries
+ (from comp.unix.sco.programmer newsgroup item by Mike Hopkirk
+ <hops@sco.com>).
+ + eliminate extra GoTo call in lib_doupdate.c (patch by Alexander V.
+ Lukyanov).
+ + minor adjustments of const/NCURSES_CONST from IRIX compile.
+ + add updates based on esr's 980509 version of terminfo.src.
+
+980509
+ + 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.
+ + 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 (request by Daniel Eisenbud <eisenbud@cs.swarthmore.edu>).
+ + modify configure script to embed ABI in shared libraries for HP-UX
+ 10.x (detailed request by Tim Mooney).
+ + add test/example of the 'filter()' function.
+ + add nxterm and xterm-color terminfo description (request by Cristian
+ Gafton <gafton@redhat.com>).
+ + modify rxvt terminfo description to clear alternate screen before
+ switching back to normal screen, for compatibility with applications
+ which use xterm (reported by Manoj Kasichainula <manojk@io.com>).
+ + modify linux terminfo description to reset color palette (reported
+ by Telford Tendys <telford@eng.uts.edu.au>).
+ + 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
+ (reported by Daniel Eisenbud <eisenbud@cs.swarthmore.edu>).
+ + minor performance improvement to wnoutrefresh by moving some
+ comparisons out of inner loop.
+
+980425
+ + modify configure script to substitute NCURSES_CONST in curses.h
+ + updated terminfo entries for xterm-xf86-v40, xterm-16color,
+ xterm-8bit to correspond to XFree86 3.9Ag.
+ + remove restriction that forces ncurses to use setaf/setab if the
+ number of colors is greater than 8. (see 970524 for xterm-16color).
+ + change order of -L options (so that $(libdir) is searched first) when
+ linking tic and other programs, to workaround HP's linker.
+ Otherwise, the -L../lib is embedded when linking against shared
+ libraries and the installed program does not run (reported by Ralf
+ Hildebrandt).
+ + 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).
+
+980418
+ + modify etip.h to avoid conflict with math.h on HP-UX 9.03 with gcc
+ 2.8.1 which redefines 'exception' (reported by Ralf Hildebrandt
+ <R.Hildebrandt@tu-bs.de>).
+ + correct configure tests in CF_SHARED_OPTS which used $CC value to
+ check for gcc, rather than autoconf's $GCC value. This did not
+ work properly if the full pathname of the compiler were given
+ (reported by Michael Yount <yount@csf.Colorado.edu>).
+ + revise check for compiler options to force ANSI mode since repeating
+ an option such as -Aa causes HP's compiler to fail on its own headers
+ (reported by Clint Olsen <olsenc@ichips.intel.com>).
+
+980411
+ + ifdef'd has_key() and mcprint() as extended functions.
+ + modified several prototypes to correspond with 1997 version of
+ X/Open Curses (affects ABI since developers have used attr_get).
+ + remove spurious trailing blanks in glibc addon-scripts (patch by
+ H.J.Lu).
+ + insert a few braces at locations where gcc-2.8.x asks to use them to
+ avoid ambigous else's, use -fpic rather than -fPIC for Linux (patch
+ by Juergen Pfeifer).
+
+980404
+ + split SHLIB_LIST into SHLIB_DIRS/SHLIB_LIST to keep -L options
+ before -l to accommodate Solaris' linker (reported by Larry Virden).
+
+980328
+ + 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 detailed usage-message to infocmp.
+ + correct a typo in att6386 entry (a "%?" which was "?").
+ + add -f option to infocmp and tic, which formats the terminfo
+ if/then/else/endif so that they are readable (with newlines and
+ tabs).
+ + fixes for glibc addon scripts (patch by H.J.Lu).
+
+980321
+ + revise configure macro CF_SPEED_TYPE so that termcap.h has speed_t
+ declared (from Adam J. Richter <adam@yggdrasil.com>)
+ + remove spurious curs_set() call from leaveok() (J.T.Conklin).
+ + corrected handling leaveok() in doupdate() (patch by Alexander V.
+ Lukyanov).
+ + improved version of wredrawln (patch by Alexander V. Lukyanov).
+ + correct c++/Makefile.in so install target do not have embedded ../lib
+ to confuse it (patch by Thomas Graf <graf@essi.fr>).
+ + add warning to preinstall rule which checks if the installer would
+ overwrite a curses.h or termcap.h that is not derived from ncurses.
+ (The recommended configuration for developers who need both is to
+ use --disable-overwrite).
+ + modify preinstall rule in top-level Makefile to avoid implicit
+ use of 'sh', to accommodate Ultrix 4.4 (reported by Joao Palhoto
+ Matos <jmatos@math.ist.utl.pt>, patch by Thomas Esser
+ <te@informatik.uni-hannover.de>)
+ + refine ifdef's for TRACE so that libncurses has fewer dependencies
+ on libtinfo when TRACE is disabled.
+ + modify configure script so that if the --with-termlib option is used
+ to generate a separate terminfo library, we chain it to the ncurses
+ library with a "-l" option (reported by Darryl Miles and Ian T.
+ Zimmerman).
+
+980314
+ + correct limits and window in wredrawln function (reported/analysis by
+ Alexander V. Lukyanov).
+ + correct sed expression in configure script for --with-fallback
+ option (patch by Jesse Thilo).
+ + correct some places in configure script where $enableval was used
+ rather than $withval (patch by Darryl Miles <dlm@g7led.demon.co.uk>).
+ + modify some man-pages so no '.' or '..' falls between TH and SH
+ macros, to accommodate man_db program (reported by Ian T. Zimmerman
+ <itz@rahul.net>).
+ + terminfo.src 10.2.1 from Eric's webpage.
+ > several changes by Juergen Pfeifer:
+ + add copyright notices (and rcs id's) on remaining man-pages.
+ + corrected prototypes for slk_* functions, using chtype rather than
+ attr_t.
+ + implemented the wcolor_set() and slk_color() functions
+ + 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.
+
+980307
+ + use 'stat()' rather than 'access()' in toe.c to check for the
+ existence of $HOME/.terminfo, since it may be a file.
+ + suppress configure CF_CXX_LIBRARY check if we are not using g++
+ 2.7.x, since this is not needed with g++ 2.8 or egcs (patch by
+ Juergen Pfeifer).
+ + turn on hashmap scrolling code by default, intend to remedy defects
+ by 4.3 release.
+ + minor corrections to terminfo.src changelog.
+
+980302 4.2 release for upload to prep.ai.mit.edu
+ + correct Florian's email address in ncurses-intro.html
+ + terminfo.src 10.2.0 from Eric.
+
+980228 pre-release
+ + add linux-koi8r replace linux-koi8, which is not KOI8 (patch by
+ QingLong <qinglong@Bolizm.ihep.su>).
+ + minor documentation fixes (patch by Juergen Pfeifer).
+ + add setlocale() call to ncurses.c (reported by Claes G. Lindblad
+ <claesg@algonet.se>).
+ + correct sign-extension in lib_insstr.c (reported by Sotiris
+ Vassilopoulos <svas@leon.nrcps.ariadne-t.gr>)
+
+980221 pre-release
+ + regenerated some documentation overlooked in 980214 patch
+ (ncurses-intro.doc, curs_outopts.3x.html)
+ + minor ifdef change to C++ binding to work with gcc 2.8.0 (patch by
+ Juergen Pfeifer).
+ + change maintainer's mailing address to florian@gnu.org, change
+ tentative mailing list address to bug-ncurses-request@gnu.org (patch
+ by Florian La Roche).
+ + add definition of $(REL_VERSION) to c++/Makefile.in (reported by Gran
+ Hasse <gh@raditex.se>).
+ + restore version numbers to Ada95 binding, accidentally deleted by
+ copyright patch (patch by Juergen Pfeifer).
+
+980214 pre-release
+ + remove ncurses.lsm from MANIFEST so that it won't be used in FSF
+ distributions, though it is retained in development.
+ + correct scaling of milliseconds to nanoseconds in lib_napms.c (patch
+ by Jeremy Buhler).
+ + update mailing-list information (bug-ncurses@gnu.org).
+ + update announcement for upcoming 4.2 release.
+ + modify -lm test to check for 'sin()' rather than 'floor()'
+ + remove spurious commas from terminfo.src descriptions.
+ + change copyright notices to Free Software Foundation
+
+980207
+ + minor fixes for autoconf macros CF_ERRNO, CF_HELP_MESSAGE and
+ CF_SIZECHANGE
+ + modify Makefile.glibc so that $(objpfx) is defined (H.J.Lu).
+ + ifdef-out true-return from _nc_mouse_inline() which depends on
+ merge of QNX patch (pending 4.2 release).
+ > patch by J.T.Conklin, to split off seldom-used modules in ncurses
+ (reduces size by up to 2.6kb):
+ + move functionality of _nc_usleep into napms, add configuration case
+ for nanosleep().
+ + moved wchgat() from lib_addch.c to lib_chgat.c
+ + moved clearok(), immedok(), leaveok(), and scrollok() from
+ lib_options.c to lib_clearok.c, lib_immedok.c, lib_leaveok.c and
+ lib_scrollok.c.
+ + moved napms() from lib_kernel.c to lib_napms.c
+ + moved echo() and noecho() from lib_raw.c to lib_echo.c
+ + moved nl() and nonl() from lib_raw.c to lib_nl.c
+
+980131
+ + corrected conversion in tclock.c (cf: 971018).
+ + updates to Makefile.glibc and associated Linux configure script
+ (patch by H.J.Lu).
+ + workaround a quoting problem on SunOS with tar-copy.sh
+ + correct init_pair() calls in worm.c to work when use_default_colors()
+ is not available.
+ + include <sys/types.h> in CF_SYS_TIME_SELECT to work with FreeBSD
+ 2.1.5
+ + add ncv capability to FreeBSD console (cons25w), making reverse
+ work with color.
+ + correct sense of configure-test for sys/time.h inclusion with
+ sys/select.h
+ + fixes for Ada95/ada_include/Makefile.in to work with --srcdir option.
+ + remove unused/obsolete test-program rules from progs/Makefile.in
+ (the rules in ncurses/Makefile.in work).
+ + remove shared-library loader flags from test/Makefile.in, etc.
+ + simplify test/configure.in using new version of autoconf to create
+ test/ncurses_cfg.h
+ + suppress suffix rules in test/Makefile.in, provide explicit
+ dependency to work with --srcdir option and less capable 'make'
+ programs.
+ > adapted from patch for QNX by Xiaodan Tang:
+ + initialize %P and %g variables set/used in tparm, and also ensure
+ that empty strings don't return a null result from tparam_internal
+ + add QNX-specific prototype for vsscanf()
+ + move initialization of SP->_keytry from init_keytry() to newterm() to
+ avoid resetting it via a keyok() call by mouse_activate().
+ + reorganized some functions in lib_mouse() to use case-statements.
+ + remove sgr string from qnx terminfo entry since it is reported to
+ turn off attributes inconsistently.
+
+980124
+ + add f/F/b/B commands to ncurses 'b' test to toggle colors, providing
+ test for no_color_video.
+ + adjusted emx.src to use no_color_video, now works with ncurses 'b'
+ and 'k' tests.
+ + implement no_color_video attribute, and as a special case, reverse
+ colors when the reverse attribute cannot be combined with color.
+ + check for empty string in $TERM variable (reported by Brett Michaels
+ <brett@xylan.com>).
+ > from reports by Fred Fish:
+ + add configure-test for isascii
+ + add configure-test for -lm library.
+ + modify CF_BOOL_SIZE to check if C++ bool types are unsigned.
+ > patches by J.J.G.Ripoll
+ + add configure/makefile variables to support .exe extension on
+ OS/2 EMX (requires additional autoconf patches).
+ + explicitly initialize variables in lib_data.c to appease OS/2 linker
+ > patches by Fred Fish <fnf@ninemoons.com>
+ + misc/Makefile.in (install.data): Avoid trying to install the CVS
+ directory.
+ + aclocal.m4 (install.includes): Remove files in the include directory
+ where we are going to install new ones, not the original source
+ files.
+ + misc/terminfo.src: Add entry for "beterm", derived from termcap
+ distributed with BeOS PR2 using captoinfo.
+ + aclocal.m4: Wrap $cf_cv_type_of_bool with quotes (contains space)
+ + aclocal.m4: Assume bool types are unsigned.
+ + progs/infocmp.c: workaround mwcc 32k function data limit
+
+980117
+ + correct initialization of color-pair (from 970524) in xmas.c, which
+ was using only one color-pair for all colors (reported by
+ J.J.G.Ripoll).
+ + add multithread options for objects build on EMX, for compatibility
+ with XFree86.
+ + split up an expression in MKlib_gen.sh to work around a problem on
+ OS/2 EMX, with 'ash' (patch by J.J.G.Ripoll).
+ + change terminfo entries xterm (xterm-xf86-v40), xterm-8bit rs1 to use
+ hard reset.
+ + rename terminfo entry xterm-xf86-v39t to xterm-xf86-v40
+ + remove bold/underline from sun console entries since they're not
+ implemented.
+ + correct _tracef calls in _tracedump(), which did not separate format
+ from parameters.
+ + correct getopt string for tic "-o" option, and add it to man-page
+ synopsis (reported by Darren Hiebert <darren@hmi.com>).
+ + correct typo in panel/Makefile.in, reversed if-statement in scrolling
+ optimization (Alexander V. Lukyanov).
+ + test for 'remove()', use 'unlink() if not found (patch by Philippe De
+ Muyter <phdm@macqel.be>).
+ > patches by Juergen Pfeifer:
+ + Improve a feature of the forms driver. For invisible fields
+ (O_VISIBLE off) only the contents but not the attributes are cleared.
+ We now clear both. (Reported by Javier Kohan
+ <jkohan@adan.fceia.unr.edu.ar>)
+ + The man page form_field_opts.3x makes now clear, that invisible
+ fields are also always inactive.
+ + adjust ifdef's to compile the C++ binding with the just released
+ gcc-2.8.0 c++ and the corresponding new C++ libraries.
+
+980110
+ + correct "?" command in ncurses.c; it was performing non-screen writes
+ while the program was in screen mode. (It "worked" in 1.9.9e because
+ that version sets OPOST and OCRNL incorrectly).
+ + return error from functions in lib_kernel, lib_raw and lib_ti if
+ cur_term is null, or if underlying I/O fails.
+ + amend change to tputs() so that it does not return an error if
+ cur_term is null, since some applications depend on being able to use
+ tputs without initializing the terminal (reported by Christian J.
+ Robinson <infynity@cyberhighway.net>).
+
+980103
+ + add a copy of emx.src from J.J.G.Ripoll's OS/2 EMX version of ncurses
+ 1.9.9e, together with fixes/additions for the "ansi" terminal type.
+ + add tic check for save/restore cursor if change_scroll_region is
+ defined (from O'Reilly book).
+ + modify read_termcap.c to handle EMX-style pathnames (reported by
+ J.J.G.Ripoll).
+ + modify lib_raw.c to use EMX's setmode (from J.J.G.Ripoll, who says
+ EMX's curses does this).
+ + modify _nc_tic_expand() to generate \0 rather than \200.
+ + move/revise 'expand()' from dump_entry.c to ncurses library as
+ _nc_tic_expand(), for use by tack.
+ + decode \a as \007 for terminfo, as per XSI.
+ + correct translation of terminfo "^@", to \200, like \0.
+ + modify next_char() to treat <cr><lf> the same as <newline>, for
+ cross-platform compatibility.
+ + use new version of autoconf (971230) to work around limited
+ environment on CLIX, due to the way autoconf builds --help message.
+ > patch by Juergen Pfeifer:
+ + check that the Ada95 binding runs against the correct version of
+ ncurses.
+ + insert constants about the library version into the main spec-file of
+ the Ada95 binding.
+
+971227
+ + modify open/fopen calls to use binary mode, needed for EMX.
+ + modify configure script to work with autoconf 2.10 mods for OS/2
+ EMX from J.J.G.Ripoll.
+ + generated ncurses_cfg.h with patch (971222) to autoconf 2.12 which
+ bypasses limited sed buffer length.
+ > several changes from Juan Jose Garcia Ripoll <worm@arrakis.es>
+ (J.J.G.Ripoll) to support OS/2 EMX:
+ + add a _scrolling flag to SP, to set when we encounter a terminal
+ that simply cannot scroll.
+ + corrected logic in _nc_add_to_try(), by ensuring that strings with
+ embedded \200 characters are matched.
+ + don't assume the host has 'link()' function, for linking terminfo
+ entries.
+
+971220
+ + if there's no ioctl's to support sigwinch handler, disable it.
+ + add configure option --disable-ext-funcs to remove the extended
+ functions from the build.
+ + add configure option --with-termlib to generate the terminfo
+ functions as a separate library.
+ + add 'sources' rule to facilitate cross-compiling.
+ + review/fix order of mostlyclean/clean/distclean rules.
+ + modify install-rule for headers to first remove old header, in
+ case there was a symbolic link that confuses the install script.
+ + corrected substitution for NCURSES_CONST in term.h (cf: 971108)
+ + add null pointer checks in wnoutrefresh(), overlap() (patch by
+ Xiaodan Tang <xtang@qnx.com>)
+ + correct tputs(), which could dereference a null cur_term if invoked
+ before terminal is initialized (patch by Christopher Seawood
+ <cls@seawood.org>)
+ > patch by Juergen Pfeifer:
+ + makes better use of "pragma Inline" in the Ada95 binding
+ + resynchronizes the generated html manpages
+
+971213
+ + additional fixes for man-pages section-references
+ + add (for debugging) a check for ich/ich1 conflict with smir/rmir
+ to tic, etc.
+ + remove hpa/vpa from rxvt terminal description because they are not
+ implemented correctly, added sgr0.
+ + change ncurses 's' to use raw mode, so ^Q works (reported by Rudolf
+ Leitgeb <leitgeb@leland.stanford.edu>)
+
+971206
+ + modify protection when installing libraries to (normally) not
+ executable. HP-UX shared libraries are an exception.
+ + add configure check for 'tack'.
+ + implement script for renaming section-references in man-page install,
+ for Debian configuration.
+ + add validity-check for SP in trace code in baudrate() (reported by
+ Daniel Weaver).
+ > patch by Alexander V. Lukyanov (fixes to match sol25 curses)
+ + modify 'overlay()' so that copy applies target window background to
+ characters.
+ + correct 'mvwin()' so that it does not clear the previous locations.
+ + correct lib_acs.c so that 8-bit character is not sign expanded in
+ case of wide characters in chtype.
+ + correct control-char test in lib_addch.c for use with wide chars
+ + use attribute in the chtype when adding a control character in
+ lib_addch.c control char was added with current attribute
+
+971129
+ + save/restore errno in _tracef() function
+ + change treatment of initialize_color to use a range of 0..1000
+ (recommended by Daniel Weaver).
+ + set umask in mkinstalldirs, fixing problems reported by users who
+ have set root's umask to 077.
+ + correct bug in tic that caused capabilities to be reprinted at the
+ end of output when they had embedded comments.
+ + rewrote wredrawln to correspond to XSI, and split-out since it is
+ not often used (from report by Alexander V. Lukyanov, 970825)
+ + rewrote Dan Nelson's change to make it portable, as well as to
+ correct logic for handling backslashes.
+ + add code to _nc_tgetent() to make it work more like a real tgetent().
+ It removes all empty fields, and removes all but the first in a group
+ of duplicate caps. The code was pulled from the BSD libtermcap code
+ in termcap.c (patch by Dan Nelson <dnelson@emsphone.com>
+ + don't include --enable-widec in the --with-develop configure option,
+ since it is not binary-compatible with 4.1 (noted by Alexander V.
+ Lukyanov)
+ > patch by Juergen Pfeifer:
+ + further improvements of the usage of elaboration pragmas in the Ada95
+ binding
+ + enhanced Ada95 sample to use the user_data mechanism for panels.
+ + a fix for the configuration script to make gnat-3.10 the required
+ version.
+ + resync of the html version of the manpages
+
+971122
+ > fixes/updates for terminfo.src:
+ + add vt220-js, pilot, rbcomm, datapoint entries from esr's 27-jun-97
+ version.
+ + add hds200 description (Walter Skorski)
+ + add EMX 0.9b descriptions
+ + correct rmso/smso capabilities in wy30-mc and wy50-mc (Daniel Weaver)
+ + rename xhpterm back to hpterm.
+ > patch by Juergen Pfeifer:
+ + Improves the usage of elaboration pragmas for the Ada95 binding.
+ + Adds a translation of the test/rain.c into Ada95 to the samples.
+ This has been contributed to the project by Laurent Pautet
+ (pautet@gnat.com)
+
+971115
+ + increase MAX_NAME_SIZE to 512 to handle extremely long alias list
+ in HP-UX terminfo.
+ + correction & simplification of delay computation in tputs, based on
+ comments from Daniel Weaver.
+ + replace test for SCO with more precise header tests.
+ + add configure test for unsigned literals, use in NCURSES_BITS macro.
+ + comment-out the -PIC, etc., flags from c++, progs and test makefiles
+ since they probably are not needed, and are less efficient (noted by.
+ Ju"rgen Fluk)
+ + add -L$(libdir) to loader options, after -L../lib so that loaders
+ that record this information will tend to do the right thing if
+ the programs are moved around after installing them (suggested by.
+ Ju"rgen Fluk).
+ + add -R option to loader options for programs for Solaris if the
+ --enable-rpath option is specified for the libraries.
+
+971112
+ + correct installed filename for shared libraries on *BSD (reported by
+ Ju"rgen Fluk).
+
+971108
+ + cleanup logic for deciding when tputs() should call delay_output(),
+ based on comments from Daniel Weaver.
+ + modified tputs() to avoid use of float.
+ + correct use of trailpad in tputs(), which used the wrong variable
+ in call to delay_output().
+ + correct inverted expression for null-count in delay_output()
+ (analysis by Daniel Weaver).
+ + apply --enable-rpath option to Solaris (requested by Larry Virden).
+ + correct substitution of EXTRA_CFLAGS for gcc 2.6.3
+ + correct check for error-return by _nc_tgetent(), which returns 0
+ for success.
+ + add configure test for BSD 4.4 cgetent() function, modify
+ read_termcap.c to use the host's version of that if found, using the
+ terminal database on FreeBSD (reported by Peter Wemm).
+ + add u8, u9 strings to sun-il description for Daniel Weaver.
+ + use NCURSES_CONST in panel's user-pointer.
+ + modify edit_cfg.sh and MKterm.h.awk.in to substitute NCURSES_CONST
+ so that will work on NeXT.
+ + use _nc_set_screen() rather than assignments to SP to fix port to
+ NeXT (reported by Francisco A. Tomei Torres).
+
+971101
+ + force mandatory padding in bell and flash_screen, as specified in
+ XSI.
+ + don't allow padding_baud_rate to override mandatory delays (reported
+ by Daniel Weaver).
+ + modify delay_output() to use _nc_timed_wait() if no baudrate has been
+ defined, or if the cur_term pointer is not initialized. XSI treats
+ this as unspecified. (requested by Daniel Weaver).
+ + change getcap-cache ifdef's to eliminate unnecessary chdir/mkdir
+ when that feature is not configured.
+ + remove _nc_err_abort() calls when write_entry.c finds a directory but
+ cannot write to it, e.g., when translating part/all of /etc/termcap
+ (reported by Andreas Jaeger <aj@arthur.rhein-neckar.de>).
+ (this dates back to 951102, in 1.9.7a).
+ + minor ifdef fixes to compile with atac and glibc 2.0.5c
+ + add check for -lgen when configuring regexpr.h
+ + modify Solaris shared-library option "-d y" to "-dy" to workaround
+ incompatibility of gcc 2.7.2 vs vendor's tools.
+
+971026
+ + correct ifdef's for struct winsize vs struct ttysize in lib_setup.c
+ to compile on SCO.
+ + remove dangling backslash in panel/Makefile.in
+ + modify MKkeyname.awk to work with SCO's nawk, which dumps core in the
+ length() function.
+ + correct length of allocation in _nc_add_to_try(), to allow for
+ trailing null.
+ + correct logic in _nc_remove_key(), which was discarding too many
+ nodes (patch by Alexander V. Lukyanov)
+
+971025
+ + add definition for $(REL_VERSION) to test/Makefile.in, so *BSD
+ shared libraries link properly (see 970524).
+ + modify Linux shared-library generation to include library
+ dependencies (e.g., -lncurses and -lgpm) in the forms, menu and
+ panel libraries (suggested by Juergen Pfeifer).
+ + modify configure script to use config.guess and config.sub rather
+ than uname, which is unreliable on some systems.
+ + updated Makefile.glibc, test-built with glibc 2.0.5c
+ + modify keyname() to return values consistent with SVr4 curses (patch
+ by Ju"rgen Fluk).
+ > changes requested by Daniel Weaver:
+ + modify delay_output() so that it uses the same output function as
+ tputs() if called from that function.
+ + move _baudrate from SCREEN to TERMINAL so that low-level use of
+ tputs works when SP is not set.
+ > patch by Juergen Pfeifer:
+ + factor lib_menu and lib_form into smaller modules
+ + clean up the interface between panel and SCREEN
+ + minor changes to the Ada95 mouse support implemenation
+ + minor bugfix in C++ binding to ripoff windows
+ + fix a few Ada95 html documentation pages
+
+971018
+ + split-out lib_ungetch.c, make runtime link to resizeterm() to
+ decouple those modules from lib_restart.c
+ + add xterm-xf86-v39t description to terminfo.src
+ + reset SP->_endwin in lib_tstp.c cleanup() function after calling
+ endwin() to avoid unnecessary repainting if the application has
+ established an atexit function, etc. Encountered this problem in
+ the c++ demo, whose destructors repaint the screen.
+ + combine _nc_get_screensize() and resizeterm() calls as new function
+ _nc_update_screensize().
+ + minor fixes to allow compile with g++ (suggested by Nelson H. F.
+ Beebe).
+ + implement install-rules for Ada95 makefiles.
+ + use screen_lines or MAXLINES as needed where LINES was coded,
+ as well as screen_columns for COLS, in the ncurses library.
+ > patch by Alexander V. Lukyanov:
+ + modify logic for ripped-off lines to handle several SCREENs.
+ > patch by Juergen Pfeifer:
+ + factors lib_slk.c into some smaller modules
+ + factors panel.c into some smaller modules
+ + puts the static information about the current panel stack into the
+ SCREEN structure to allow different panel stacks on different
+ screens.
+ + preliminary fix for an error adjusting LINES to account for
+ ripped-off lines.
+
+971011
+ + move _nc_max_click_interval and other mouse interface items to SCREEN
+ struct so that they are associated with a single terminal, and also
+ save memory when the application does not need a mouse (roughly 3k vs
+ 0.5k on Linux).
+ + modify mouseinterval() so that a negative parameter queries the
+ click-interval without modifying it.
+ + modify ncurses 'i' test to work with ncurses' apparent extension from
+ SVr4, i.e., allows nocbreak+noecho (analysis by Alexander V.
+ Lukyanov).
+ + add configure options --with-ada-includes and --with-ada-objects,
+ to drive Ada95 binding install (not yet implemented).
+ + install C++ binding as -lncurses++ and associated headers with the
+ other ncurses headers.
+ + fix header uninstall if configure --srcdir is used.
+ > minor interface changes (request by Daniel Weaver <danw@znyx.com>,
+ to support 'tack' program):
+ + export functions _nc_trans_string() and _nc_msec_cost().
+ + add variable _nc_nulls_sent, to record the number of padding
+ characters output in delay_output().
+ + move tests for generic_type and hard_copy terminals in setupterm()
+ to the end of that function so that the library will still be
+ initialized, though not generally useful for curses programs.
+ > patches by Alexander V. Lukyanov:
+ + modify ClrBottom() to avoid using clr_eos if there is only one line
+ to erase.
+ + typo in configure --help.
+ > patch by J.T.Conklin (with minor resync against Juergen's changes)
+ + split-out lib_flash.c from lib_beep.c
+ + split-out lib_hline.c and lib_vline.c from lib_box.c
+ + split-out lib_wattron.c, lib_wattroff.c from lib_addch.c
+
+971005
+ > patch by Juergen Pfeifer:
+ + correct source/target of c++/edit_cfg.sh
+
+971004
+ + add color, mouse support to kterm terminfo entry.
+ + modify lib_mouse.c to recognize rxvt, kterm, color_xterm also as
+ providing "xterm"-style mouse.
+ + updated rxvt's terminfo description to correspond to 2.21b, with
+ fixes for the acsc (the box1 capability is incorrect, ech1 does not
+ work).
+ + fix logic in parse_entry.c that discarded acsc when 'synthesizing'
+ an entry from equivalents in XENIX or AIX. This lets ncurses handle
+ the distribution copy of rxvt's terminfo.
+ + modify acsc capability for linux and linux-koi8 terminfo descriptions
+ (from Pavel Roskin <pavel@absolute.spb.su>).
+ + corrected definition in curses.h for ACS_LANTERN, which was 'I'
+ rather than 'i' (see 970802).
+ + updated terminfo.src with reformatted acsc entries, and repaired the
+ trashed entries with spurious '\' characters that this exposed.
+ + add logic to dump_entry.c to reformat acsc entries into canonical
+ form (sorted, unique mapping).
+ + add configure script to generate c++/etip.h
+ + add configure --with-develop option, to enable by default most of the
+ experimental options (requested by Alexander V. Lukyanov).
+ + rename 'deinstall' to 'uninstall', following GNU convention
+ (suggested by Alexander V. Lukyanov).
+ > patches by Alexander V. Lukyanov:
+ + modify tactics 2 and 5 in onscreen_mvcur(), to allow them on the last
+ line of the screen, since carriage return will not cause a newline.
+ + remove clause from PutCharLR() that would try to use
+ eat_newline_glitch since that apparently does not work on some
+ terminals (e.g., M$ telnet).
+ + correct a limit check in scroll_csr_backward()
+ > patches by Juergen Pfeifer:
+ + adds dummy implementations of methods above() and below() to the
+ NCursesPanel class.
+ + fixes missing returncode in NCursesWindow::ripoffline()
+ + fixes missing returncode in TestApplication::run() in demo.cc
+ + We should at least give a comment in etip.h why it is currently a
+ problem to install the C++ binding somewhere
+ + makes the WINDOW* argument of wenclose() a const.
+ + modifies several of the routines in lib_adabind.c to use a const
+ WINDOW* argument.
+
+970927
+ + add 'deinstall' rules.
+ + use explicit assignments in configure --without-progs option to
+ work around autoconf bug which doesn't always set $withval.
+ + check for ldconfig, don't try to run it if not found.
+ + implement simple/unoptimized case in lib_doupdate.c to handle
+ display with magic cookie glitch, tested with ncurses.c program.
+ + correct missing _tracef in getmouse(), to balance the returnCode
+ macro.
+ + simplify show_attr() in ncurses.c using termattrs().
+ > patches by Juergen Pfeifer:
+ + provides missing inlines for mvw[hv]line in cursesw.h of the C++
+ binding
+ + fixes a typo in a comment of frm_driver.c
+ + Enhances Ada95 Makefiles to fulfill the requirement of GNAT-3.10 that
+ generics should be compiled. Proper fixes to the configuration
+ scripts are also provided.
+
+970920
+ + several modifications to the configure script (requested by Ward
+ Horner):
+ + add configure options --without-progs, to suppress the build of the
+ utility programs, e.g., for cross-compiling.
+ + add $(HOSTCCFLAGS) and $(HOSTLDFLAGS) symbols to ncurses
+ Makefile.in, to simplify setup for cross compiling.
+ + add logic in configure script to recognize "--target=vxworks", and
+ generate load/install actions for VxWorks objects.
+ + move typedef for sigaction_t into SigAction.h to work around problem
+ generating lint library.
+ + modify fty_regex.c to reflect renaming of ifdef's for regular
+ expressions.
+ + simplify ifdef in lib_setup.c for TIOCGWINSZ since that symbol may
+ reside in <sys/ioctl.h>.
+ + merge testcurs.c with version from PDCurses 2.3, clarifying some of
+ the more obscure tests, which rely upon color.
+ + use macros getbegyx() and getmaxyx() in newdemo.c and testcurs.c
+ + modify ncurses.c to use getbegyx() and getmaxyx() macros to cover up
+ implementation difference wrt SVr4 curses, allow 's' test to work.
+ + add missing endwin() to testscanw.c program (reported by Fausto
+ Saporito <fausap@itb.it>).
+ + fixes/updates for Makefile.glibc and related files under sysdeps
+ (patch by H.J.Lu).
+ > patches by Juergen Pfeifer:
+ + add checks for null pointers, especially WINDOW's throughout the
+ ncurses library.
+ + solve a problem with wrong calculation of panel overlapping (reported
+ by Ward Horner):
+ + make sure that a panel's window isn't a pad.
+ + do more error checking in module lib_touch.c
+ + missing files for Ada95 binding from the last patch
+ + synch. of generated html pages (RCS-Id's were wrong in html files)
+ + support for Key_Resize in Ada binding
+ + changed documentation style in ./c++/cursesm.h
+ > patches by Alexander V. Lukyanov:
+ + undo attempt to do recursive inlining for PutChar(), noting that it
+ did not improve timing measurably, but inflated the size of
+ lib_doupdate.o
+
+970913
+ + modify rain.c to use color.
+ + correct scroll_csr_backward() to match scroll_csr_forward().
+ + minor adjustment to llib-lncurses, to work with Solaris 2.5.1
+ + minor fixes to sysdeps/unix/sysv/linux/configure to reflect renaming
+ of configure cache variables in 970906.
+ + correct logic involving changes to O_VISIBLE option in
+ Synchronize_Options function in frm_driver.c (Tony Hoffmann
+ <Tony.Hoffmann@hia.nrc.ca>)
+ + add $(HOSTCC) symbol to ncurses Makefile.in, to simplify setup for
+ cross compiling (suggested by Chris Johns).
+ + modify ifdef in lib_setup.c to only include <sys/ioctl.h> if we can
+ use it to support screen-size calculation (reported by Chris Johns).
+ + #undef unctrl to avoid symbol conflict in port to RTEMS (reported by
+ Chris Johns <cjohns@plessey.com.au>)
+ > patches by Juergen Pfeifer:
+ + simplified, made minor corrections to Ada95 binding to form
+ fieldtype.
+ + The C++ binding has been enhanced:
+ + Improve NCursesWindow class: added additional methods to cover
+ more ncurses functionality. Make refresh() and noutrefresh()
+ virtual members to allow different implementation in the
+ NCursesPanel class.
+ + CAUTION: changed order of parameters in vline() and hline() of
+ NCursesWindow class.
+ + Make refresh() in NCursesPanel non-static, it is now a
+ reimplementation of refresh() in the base class. Added
+ noutrefresh() to NCursesPanel.
+ + Added NCursesForm and related classes to support libform
+ functionality.
+ + Moved most of configuration related stuff from cursesw.h to etip.h
+ + Added NCursesApplication class to support easy configuration of
+ menu and forms related attributes as well as ripped of title lines
+ and Soft-Label-Keys for an application.
+ + Support of Auto-Cleanup for a menu's fieldlist.
+ + Change of return type for current_item() and operator[] for menus.
+ + Enhanced demo.
+ + Fixed a bug in form/fld_def.c: take into account that copyarg and
+ freearg for a fieldtype may be NULL, makearg must not be NULL
+ + Fixed a bug in form/fld_type.c: in set_fieldtype_arg() makearg must
+ not be NULL, copyarg and freearg may be NULL.
+ + Fixed a bug in form/frm_def.c: Allow Disconnect_Fields() if it is
+ already disconnected.
+ + Enhance form/frm_driver.c: Allow growth of dynamic fields also on
+ navigation requests.
+ + Fixed a bug in form/fty_enum.c: wrong position of postincrement in
+ case-insensitiva comparision routine.
+ + Enhanced form/lib_adabind.c with function _nc_get_field() to get a
+ forms field by index.
+ + Enhanced menu/m_adabind.c with function _nc_get_item() to get a menus
+ item by index.
+ + Fixed in curses.h.in: make chtype argument for pechochar() constant.
+ Mark wbkgdset() as implemented, remove wbkgdset macro, because it was
+ broken (didn't handle colors correctly).
+ + Enhanced lib_mouse.c: added _nc_has_mouse() function
+ + Added _nc_has_mouse() prototype to curses.priv.h
+ + Modified lib_bkgd.c: hopefully correct implementation of wbkgdset();
+ streamlined implementation of wbkgd()
+ + Modified lib_mvwin.c: Disable move of a pad. Implement (costly)
+ move of subwindows. Fixed update behaviour of movements of regular
+ windows.
+ + Fixed lib_pad.c: make chtype argument of pechochar() const.
+ + Fixed lib_window.c: dupwin() is not(!) in every bit a really clone
+ of the original. Subwindows become regular windows by doing a
+ dupwin().
+ + Improved manpage form_fieldtype.3x
+ > patches by Alexander V. Lukyanov:
+ + simplify the PutChar() handling of exit_am_mode, because we already
+ know that auto_right_margin is true.
+ + add a check in PutChar() for ability to insert to the case of
+ shifting character to LR corner.
+ + in terminal initialization by _nc_screen_resume(), make sure that
+ terminal right margin mode is known.
+ + move logic that invokes touchline(), or does the equivalent, into
+ _nc_scroll_window().
+ + modify scrolling logic use of insert/delete line capability, assuming
+ that they affect the screen contents only within the current
+ scrolling region.
+ + modify rain.c to demonstrate SIGWINCH handler.
+ + remove logic from getch() that would return an ERR if the application
+ called getch() when the cursor was at the lower-right corner of the
+ physical screen, and the terminal does not have insert-character
+ ability.
+ + change view.c so that it breaks out of getch() loop if a KEY_RESIZE
+ is read, and modify logic in getch() so this fix will yield the
+ desired behavior, i.e., the screen is repainted automatically when
+ the terminal window is resized.
+
+970906
+ + add configure option --enable-sigwinch
+ + modify view.c to test KEY_RESIZE logic, with "-r" option.
+ + modify testcurs.c to eliminate misleading display wrt cursor type
+ by testing if the terminal supports cnorm, civis, cvvis.
+ + several fixes for m68k/NeXT 4.0, to bring cur_term, _nc_curr_line and
+ _nc_curr_col variables into linked programs: move these variables,
+ making new modules lib_cur_term and trace_buf (reported by Francisco
+ Alberto Tomei Torres <fatomei@sandburg.unm.edu>).
+ > patches by Alexander V. Lukyanov:
+ + add pseudo-functionkey KEY_RESIZE which is returned by getch() when
+ the SIGWINCH handler has been called since the last call to
+ doupdate().
+ + modify lib_twait.c to hide EINTR only if HIDE_EINTR is defined.
+ + add SIGWINCH handler to ncurses library which is used if there is no
+ application SIGWINCH handler in effect when the screen is
+ initialized.
+ + make linked list of all SCREEN structures.
+ + move curses.h include before definition of SCREEN to use types in
+ that structure.
+ + correction to ensure that wgetstr uses only a newline to force a
+ scroll (970831).
+
+970831
+ + add experimental configure option --enable-safe-sprintf; the normal
+ mode now allocates a buffer as large as the screen for the
+ lib_printw.c functions.
+ + modify wgetch to refresh screen when reading ungetch'd characters,
+ since the application may require this - SVr4 does this.
+ + refine treatment of newline in wgetstr to echo only when this would
+ force the screen to scroll.
+
+970830
+ + remove override in wgetstr() that forces keypad(), since SVr4 does
+ not do this.
+ + correct y-reference for erasure in wgetstr() when a wrap forces a
+ scroll.
+ + correct x-position in waddch() after a wrap forces a scroll.
+ + echo newline in wgetstr(), making testscanw.c scroll properly when
+ scanw is done.
+ + modify vwscanw() to avoid potential buffer overflow.
+ + rewrote lib_printw.c to eliminate fixed-buffer limits.
+ > patches by Alexander V. Lukyanov:
+ + correct an error in handling cooked mode in wgetch(); processing
+ was in the wrong order.
+ + simplified logic in wgetch() that handles backspace, etc., by using
+ wechochar().
+ + correct wechochar() so that it interprets the output character as
+ in waddch().
+ + modify pechochar() to use prefresh() rather than doupdate(), since
+ the latter does not guarantee immediate refresh of the pad.
+ + modify pechochar() so that if called with a non-pad WINDOW, will
+ invoke wechochar() instead.
+ + modify fifo indices to allow fifo to be longer than 127 bytes.
+
+970823
+ + add xterm-8bit to terminfo.src
+ + moved logic for SP->_fifohold inside check_pending() to make it
+ work properly when we add calls to that function.
+ + ensure that bool functions return only TRUE or FALSE, and TRUE/FALSE
+ are assigned to bool values (patch by H.J.Lu).
+ > patches by Alexander V. Lukyanov:
+ + several fixes to getch:
+ 1. Separate cooked and raw keys in fifo
+ 2. Fix the case of ungetch'ed KEY_MOUSE
+ 3. wrap the code for hiding EINTR with ifdef HIDE_EINTR
+ 4. correctly handle input errors (i.e., EINTR) without loss of raw
+ keys
+ 5. recognize ESC KEY_LEFT and similar
+ 6. correctly handle the case of receiption of KEY_MOUSE from gpm
+ + correct off-by-one indexing error in _nc_mouse_parse(), that caused
+ single mouse events (press/release) to be ignored in favor of
+ composed events (click). Improves on a fix from integrating gpm
+ support in 961229.
+ + add another call to check_pending, before scrolling, for
+ line-breakout optimization
+ + improve hashmap.c by
+ 1. fixed loop condition in grow_hunks()
+ 2. not marking lines with offset 0
+ 3. fixed condition of 'too far' criteria, thus one-line hunks are
+ ignored and two lines interchanged won't pass.
+ + rewrote/simplified _nc_scroll_optimize() by separating into two
+ passes, forward/backward, looking for chunks moving only in the given
+ direction.
+ + move logic that emits sgr0 when initializing the screen to
+ _nc_screen_init(), now invoked from newterm.
+ + move cursor-movement cleanup from endwin() into _nc_mvcur_wrap()
+ function and screen cleanup (i.e., color) into _nc_screen_wrap()
+ function.
+ + add new functions _nc_screen_init(), _nc_screen_resume() and
+ _nc_screen_wrap().
+ + rename _nc_mvcur_scrolln() to _nc_scrolln().
+ + add a copy of acs_map[] to the SCREEN structure, where it can be
+ stored/retrieved via set_term().
+ + move variables _nc_idcok, _nc_idlok, _nc_windows into the SCREEN
+ structure.
+
+970816
+ + implement experimental _nc_perform_scroll().
+ + modify newterm (actually _nc_setupscreen()) to emit an sgr0 when
+ initializing the screen, as does SVr4 (reported by Alexander V.
+ Lukyanov).
+ + added test_progs rule to ncurses/Makefile.
+ + modify test/configure.in to check if initscr is already in $LIBS
+ before looking for (n)curses library.
+ + correct version-number in configure script for OSF1 shared-library
+ options (patch by Tim Mooney).
+ + add -DNDEBUG to CPPFLAGS for --enable-assertions (as Juergen
+ originally patched) since the c++ demo files do not necessarily
+ include ncurses_cfg.h
+ + supply default value for --enable-assertions option in configure
+ script (reported by Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>).
+ > patches by Alexander V. Lukyanov:
+ + correct/simplify logic of werase(), wclrtoeol() and wclrbot(). See
+ example firstlast.c
+ + optimize waddch_literal() and waddch_nosync() by factoring out
+ common subexpressions.
+ + correct sense of NDEBUG ifdef for CHECK_POSITION macro.
+ + corrections to render_char(), to make handling of colored blanks
+ match SVr4 curses, as well as to correct a bug that xor'd space
+ against the background character.
+ + replaced hash function with a faster one (timed it)
+ + rewrote the hashmap algorithm to be one-pass, this avoids multiple
+ cost_effective() calls on the same lines.
+ + modified cost_effective() so it is now slightly more precise.
+ > patches by H.J.Lu for glibc integration:
+ + add modules define_key, keyok, name_match, tries
+ + add makefile rules for some of the unit tests in ncurses (mvcur,
+ captoinfo, hardscroll, hashmap).
+ + update Linux configure-script for wide-character definitions.
+
+970809
+ + modify _tracebits() to show the character size (e.g., CS8).
+ + modify tparm() to emit '\200' where the generated string would have a
+ null (reported by From: Ian Dall <Ian.Dall@dsto.defence.gov.au> for
+ terminal type ncr7900).
+ + modify install process so that ldconfig is not invoked if the
+ package is built with an install-prefix.
+ + correct test program for chtype size (reported by Tim Mooney).
+ + add configure option --disable-scroll-hints, using this to ifdef the
+ logic that computes indices for _nc_scroll_optimize().
+ + add module ncurses/softscroll.c, to perform single-stage computation
+ of scroll indices used in _nc_scroll_optimize(). This is faster than
+ the existing scrolling algorithm, but tends to make too-small hunks.
+ + eliminate fixed buffer size in _nc_linedump().
+ + minor fixes to lib_doupdate.c to add tradeoff between clr_eol (el)
+ and clr_bol (el1), refine logic in ClrUpdate() and ClrBottom() (patch
+ by Alexander V. Lukyanov).
+ + add test/testaddch.c, from a pending patch by Alexander V. Lukyanov.
+ + correct processing of "configure --enable-assertions" option (patch
+ by Juergen Pfeifer).
+
+970802
+ + add '-s' (single-step) option too test/hashtest.c, correct an error
+ in loop limit for '-f' (footer option), toggle scrollok() when
+ writing footer to avoid wrap at lower-right corner.
+ + correct behavior of clrtoeol() immediately after wrapping cursor,
+ which was not clearing the line at the cursor position (reported by
+ Liviu Daia <daia@stoilow.imar.ro>).
+ + corrected mapping for ACS_LANTERN, which was 'I' rather than 'i'
+ (reported by Klaus Weide <kweide@tezcat.com>).
+ + many corrections to make progs/capconvert work, as well as make it
+ reasonably portable and integrated with ncurses 4.1 (reported by Dave
+ Furstenau <df@ravine.binary.net>).
+
+970726
+ + add flag SP->_fifohold, corresponding logic to modify the behavior of
+ the line breakout logic so that if the application does not read
+ input, refreshes will not be stopped, but only slowed.
+ + generate slk_attr_off(), slk_attr_on(), slk_attr_set(), vid_attr(),
+ ifdef'd for wide-character support, since ncurses' WA_xxx attribute
+ masks are identical with the A_xxx masks.
+ + modify MKlib_gen.sh to generate ifdef'd functions to support optional
+ configuration of wide-characters.
+ + modify tset to behave more like SVr4's tset, which does not modify
+ the settings of intr, quit or erase unless they are given as command
+ options (reported by Nelson H. F. Beebe <beebe@math.utah.edu>).
+ + modify tset to look in /etc/ttys or /etc/ttytype if the configuration
+ does not have getttynam().
+ + extend baudrate table in tset.c to match baudrate() function.
+ + add table entries for 230400 and 460800 bd to baudrate() function.
+ + improve breakout logic by allowing it before the first line updated,
+ which is what SVr4 curses does (patch by Alexander V. Lukyanov).
+ + correct initialization of vcost in relative_move(), for cursor-down
+ case (patch by Alexander V. Lukyanov).
+ > nits gleaned from Debian distribution of 1.9.9g-3:
+ + install symbolic link for intotocap.
+ + reference libc directly when making shared libraries.
+ + correct renaming of curs_scr_dmp.3x in man_db.renames.
+ + guard tgetflag() and other termcap functions against null cur_term
+ pointer.
+
+970719
+ + corrected initial state of software echo (error in 970405, reported
+ by Alexander V. Lukyanov).
+ + reviewed/added messages to configure script, so that all non-test
+ options should be accompanied by a message.
+ + add configure check for long filenames, using this to determine if
+ it is safe to allow long aliases for terminal descriptions as does
+ SVr4.
+ + add configure options for widec (wide character), hashmap (both
+ experimental).
+ > patch by Alexander V. Lukyanov:
+ + hashmap.c - improved by heuristic, so that scroll test works much
+ better when csr is not available.
+ + hardscroll.c - patched so that it continues to scroll other chunks
+ after failure to scroll one.
+ + lib_doupdate.c - _nc_mvcur_scrolln extended to handle more cases; csr
+ is avoided as it is relative costly. Fixed wrong coordinates in one
+ case and wrong string in TRACE.
+ > patch by Juergen Pfeifer:
+ + modify C++ binding to compile on AIX 4.x with the IBM C-SET++
+ compiler.
+
+970712
+ + remove alternate character set from kterm terminfo entry; it uses the
+ shift-out control for a purpose incompatible with curses, i.e., font
+ switching.
+ + disentangle 'xterm' terminfo entry from some derived entries that
+ should be based on xterm-r6 instead.
+ + add cbt to xterm-xf86-xv32 terminfo entry; I added the emulation for
+ XFree86 3.1.2F, but overlooked its use in terminfo then - T.Dickey.
+ + correct logic in lib_mvcur.c that uses back_tab.
+
+970706
+ + correct change from 970628 to ClrUpdate() in lib_doupdate.c so that
+ contents of curscr are saved in newscr before clearing the screen.
+ This is needed to make repainting work with the present logic of
+ TransformLine().
+ + use napms() rather than sleep() in tset.c to avoid interrupting I/O.
+
+970705
+ + add limit checks to _nc_read_file_entry() to guard against overflow
+ of buffer when reading incompatible terminfo format, e.g, from OSF/1.
+ + correct some loop-variable errors in xmc support in lib_doupdate.c
+ + modify ncurses 'b' test to add gaps, specified by user, to allow
+ investigation of interaction with xmc (magic cookie) code.
+ + correct typo in 970524 mods to xmas.c, had omitted empty parameter
+ list from has_colors(), which gcc ignores, but SVr4 does not
+ (reported by Larry Virden).
+ + correct rmso capability in wy50-mc description.
+ + add configure option "--enable-hard-tabs", renamed TABS_OK ifdef to
+ USE_HARD_TABS.
+ > patch by Juergen Pfeifer:
+ + Add bindings for keyok() and define_key() to the Ada95 packages.
+ + Improve man pages menu_post.3x and menu_format.3x
+ + Fix the HTML pages in the Ada95/html directory to reflect the above
+ changes.
+
+970628
+ + modify change from 970101 to ClrUpdate() in lib_doupdate.c so that
+ pending changes to both curscr and newscr are flushed properly.
+ This fixes a case where the first scrolling operation in nvi would
+ cause the screen to be cleared unnecessarily and repainted before
+ doing the indexing, i.e., by repeatedly pressing 'j' (reported by
+ Juergen Pfeifer).
+ + correct error in trans_string() which added embedded newlines in a
+ terminfo description to the stored strings.
+ + remove spurious newlines from sgr in wyse50 (and several other)
+ terminfo descriptions.
+ + add configure option for experimental xmc (magic cookie) code,
+ "--enable-xmc-glitch". When disabled (the default), attributes that
+ would store a magic cookie are suppressed in vidputs(). The magic
+ cookie code is far from workable at this stage; the configuration
+ option is a stopgap.
+ + move _nc_initscr() from lib_initscr.c to lib_newterm.c
+ + correct path for invoking make_keys (a missing "./").
+
+970621
+ + correct sign-extension problem with "infocmp -e", which corrupted
+ acsc values computed for linux fallback data.
+ + correct dependency on ncurses/names.c (a missing "./").
+ + modify configure script to use '&&' even for cd'ing to existing
+ directories to work around broken shell interpreters.
+ + correct a loop-limit in _nc_hash_map() (patch by Alexander V.
+ Lukyanov).
+
+970615
+ + restore logic in _nc_scroll_optimize() which marks as touched the
+ lines in curscr that are shifted.
+ + add new utility 'make_keys' to compute keys.tries as a table rather
+ than a series of function calls.
+ + correct include-dependency for tic.h used by name_match
+ + removed buffer-allocation for name and description from m_item_new.c,
+ since this might result in incompatibilities with SVr4. Also fixed
+ the corresponding Ada95 binding module (patch by Juergen Pfeifer,
+ from report by Avery Pennarun <apenwarr@foxnet.net>)
+ + removed the mechanism to timestamp the generated Ada95 sources. This
+ resulted always in generating patches for the HTML doc, even when
+ nothing really changed (patch by Juergen Pfeifer).
+ + improve man page mitem_new.3x (patch by Juergen Pfeifer).
+
+970614
+ + remove ech capability from rxvt description because it does not work.
+ + add missing case logic for infocmp -I option (reported by Lorenzo M.
+ Catucci <lorenzo@argon.roma2.infn.it>)
+ + correct old bug in pnoutrefresh() unmasked by fix in 970531; this
+ caused glitches in the ncurses 'p' test since the area outside the
+ pad was not compared when setting up indices for _nc_scroll_optimize.
+ + rewrote tracebits() to workaround misdefinition of TOSTOP on Ultrix
+ 4.4, as well as to eliminate fixed-size buffer (reported by Chris
+ Tanner <tannerc@aecl.ca>)
+ + 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.
+ + correct attribution for progs/progs.priv.h and lib_twait.c
+ + improve line-breakout logic by checking based on changed lines rather
+ than total lines (patch by Alexander V. Lukyanov).
+ + correct loop limits for table-lookup of enumerated value in form
+ (patch by Juergen Pfeifer).
+ + improve threshhold computation for determining when to call ClrToEOL
+ (patch by Alexander V. Lukyanov).
+
+970531
+ + add configure option --disable-database to force the library to
+ use only the fallback data.
+ + add configure option --with-fallbacks, to specify list of fallback
+ terminal descriptions.
+ + add a symbolic link for ncurses.h during install; too many programs
+ still assume there's an ncurses.h
+ + add new terminfo.src entry for xterm-xf86-v33.
+ + restore terminfo.src entry for emu to using setf/setb, since it is
+ not, after all, generating ANSI sequences. Corrected missing comma
+ that caused setf/setb entries to merge.
+ + modify mousemask() to use keyok() to enable/disable KEY_MOUSE, so
+ that applications can disable ncurses' mouse and supply their own
+ handler.
+ + add extensions keyok() and define_key(). These are designed to allow
+ the user's application better control over the use of function keys,
+ e.g., disabling the ncurses KEY_MOUSE. (The define_key idea was from
+ a mailing-list thread started by kjahds@kjahds.com Nov'1995).
+ + restore original behavior in ncurses 'g' test, i.e., explicitly
+ set the keypad mode rather than use the default, since it confuses
+ people.
+ + rewrote the newdemo banner so it's readable (reported by Hugh
+ Daniel).
+ + tidy up exit from hashtest (reported by Hugh Daniel).
+ + restore check for ^Q in ncurses 'g' test broken in 970510 (reported
+ by Hugh Daniel)
+ + correct tput program, checking return-value of setupterm (patch by
+ Florian La Roche).
+ + correct logic in pnoutrefresh() and pechochar() functions (reported
+ by Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>). The computation
+ of 'wide' date to eric's #283 (1.9.9), and the pechochar bug to the
+ original implementation (1.9.6).
+ + correct typo in vt102-w terminfo.src entry (patch by Robert Wuest
+ <rwuest@sire.vt.com>)
+ + move calls of _nc_background() out of various loops, as its return
+ value will be the same for the whole window being operated on (patch
+ by J.T.Conklin).
+ + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
+ SVr4 headers (patch by J.T.Conklin <jtc@NetBSD.ORG>)
+ + modify glibc addon-configure scripts (patch by H.J.Lu).
+ + correct a bug in hashmap.c: the size used for clearing the hashmap
+ table was incorrect, causing stack corruption for large values of
+ LINES, e.g., >MAXLINES/2 (patch by Alexander V. Lukyanov).
+ + eric's terminfo 9.13.23 & 9.13.24 changes: replaced minitel-2 entry,
+ added MGR, ansi-nt (note: the changes described for 9.13.24 have not
+ been applied).
+ > several changes by Juergen Pfeifer:
+ + correct a missing error-return in form_driver.c when wrapping of a
+ field is not possible.
+ + correct logic in form_driver.c for configurations that do not have
+ memccpy() (reported by Sidik Isani <isani@cfht.hawaii.edu>)
+ + change several c++ binding functions to inline.
+ + modify c++ menu binding to inherit from panels, for proper
+ initialization.
+ + correct freeing of menu items in c++ binding.
+ + modify c++ binding to reflect removal of const from user data pointer
+ in forms/menus libraries.
+
+970524
+ + add description of xterm-16color.
+ + modify name of shared-library on *BSD to end with $(REL_VERSION)
+ rather than $(ABI_VERSION) to match actual convention on FreeBSD
+ (cf: 960713).
+ + add OpenBSD to shared-library case, same as NetBSD and FreeBSD
+ (reported by Hugh Daniel <hugh@rat.toad.com>).
+ + corrected include-dependency in menu/Makefile so that "make install"
+ works properly w/o first doing "make".
+ + add fallback definition for isascii, used in infocmp.
+ + modify xmas to use color, and to exit right away when a key is
+ pressed.
+ + modify gdc so that the scrolled digits function as described (there
+ was no time delay between the stages, and the digits overwrote the
+ bounding box without tidying up).
+ + modify lib_color.c to use setaf/setab only for the ANSI color codes
+ 0 through 7. Using 16 colors requires setf/setb.
+ + modify ncurses 'c' test to work with 16 colors, as well as the normal
+ 8 colors.
+ + remove const qualifier from user data pointer in forms and menus
+ libraries (patch by Juergen Pfeifer).
+ + rewrote 'waddchnstr()' to avoid using the _nc_waddch_nosync()
+ function, thereby not interpreting tabs, etc., as per spec (patch by
+ Alexander V. Lukyanov).
+
+970517
+ + suppress check for pre-existing ncurses header if the --prefix
+ option is specified.
+ + add configure options "--with-system-type" and
+ "--with-system-release" to assist in checking the generated
+ makefiles.
+ + add configure option "--enable-rpath" to allow installers to specify
+ that programs linked against shared libraries will have their library
+ path embedded, allowing installs into nonstandard locations.
+ + add flags to OSF1 shared-library options to specify version and
+ symbol file (patch by Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu>)
+ + add missing definition for ABI_VERSION to c++/Makefile.in (reported
+ by Satoshi Adachi <adachi@wisdom.aa.ap.titech.ac.jp>).
+ + modify link flags to accommodate HP-UX linker which embeds absolute
+ pathnames in executables linked against shared libraries (reported by
+ Jason Evans <jasone@mrc.uidaho.edu>, solved by Alan Shutko
+ <ats@hubert.wustl.edu>).
+ + drop unnecessary check for attribute-change in onscreen_mvcur() since
+ mvcur() is the only caller within the library, and that check in turn
+ is exercised only from lib_doupdate.c (patch by Alexander V.
+ Lukyanov).
+ + add 'blank' parameter to _nc_scroll_window() so _nc_mvcur_scrolln()
+ can use the background of stdscr as a parameter to that function
+ (patch by Alexander V. Lukyanov).
+ + moved _nc_mvcur_scrolln() from lib_mvcur.c to lib_doupdate.c, to use
+ the latter's internal functions, as well as to eliminate unnecessary
+ cursor save/restore operations (patch by Alexander V. Lukyanov).
+ + omit parameter of ClrUpdate(), since it is called only for newscr,
+ further optimized/reduced by using ClearScreen() and TransformLine()
+ to get rid of duplicate code (patch by Alexander V. Lukyanov).
+ + modify scrolling algorithm in _nc_scroll_optimize() to reject hunks
+ that are smaller than the distance to be moved (patch by Alexander V.
+ Lukyanov).
+ + correct a place where the panel library was not ifdef'd in ncurses.c
+ (Juergen Pfeifer)
+ + documentation fixes (Juergen Pfeifer)
+
+970515 4.1 release for upload to prep.ai.mit.edu
+ + re-tag changes since 970505 as 4.1 release.
+
+970510
+ + modify ncurses 'g' test to allow mouse input
+ + modify default xterm description to include mouse.
+ + modify configure script to add -Wwrite-strings if gcc warnings are
+ enabled while configuring --enable-const (and fixed related
+ warnings).
+ + add toggle, status display for keypad mode to ncurses 'g' test to
+ verify that keypad and scrollok are not inherited from parent window
+ during a call to newwin.
+ + correction to MKexpanded.sh to make it work when configure --srcdir
+ is used (reported by H.J.Lu).
+ + revise test for bool-type, ensuring that it checks if builtin.h is
+ available before including it, adding test for sizeof(bool) equal
+ to sizeof(short), and warning user if the size cannot be determined
+ (reported by Alexander V. Lukyanov).
+ + add files to support configuration of ncurses as an add-on library
+ for GNU libc (patch by H.J.Lu <hjl@lucon.org>)
+
+970506
+ + correct buffer overrun in lib_traceatr.c
+ + modify change to lib_vidattr.c to avoid redundant orig_pair.
+ + turn on 'echo()' in hanoi.c, since it is initially off.
+ + rename local 'errno' variable in etip.h to avoid conflict with global
+ (H.J.Lu).
+ + modify configure script to cache LD, AR, AR_OPTS (patch by H.J.Lu
+ <hjl@lucon.org>)
+
+970505 4.1 pre-release
+ + regenerate the misc directory html dumps without the link list, which
+ is not useful.
+ + correct dependency in form directory makefile which caused
+ unnecessary recompiles.
+ + correct substitution for ABI_VERSION in test-makefile
+ + modify install rules for shared-library targets to remove the target
+ before installing, since some install programs do not properly handle
+ overwrite of symbolic links.
+ + change order of top-level targets so that 'include' immediate
+ precedes the 'ncurses' directory, reducing the time between new
+ headers and new libraries (requested by Larry Virden).
+ + modify lib_vidattr.c so that colors are turned off only before
+ modifying other attributes, turned on after others. This makes the
+ hanoi.c program display correctly on FreeBSD console.
+ + modify debug code in panel library to print user-data addresses
+ rather than the strings which they (may) point to.
+ + add check to ensure that C++ binding and demo are not built with g++
+ versions below 2.7, since the binding uses templates.
+ + modify c++ binding and demo to build and run with SGI's c++ compiler.
+ (It also compiles with the Sun SparcWorks compiler, but the demo does
+ not link, due to a vtbl problem).
+ + corrections to demo.cc, to fix out-of-scope variables (Juergen
+ Pfeifer).
+
+970503
+ + correct memory leak in _nc_trace_buf().
+ + add configure test for regexpr.h, for Unixware 1.x.
+ + correct missing "./" prefixing names of generated files in ncurses
+ directory.
+ + use single-quotes in configure scripts assignments for MK_SHARED_LIB
+ to workaround shell bug on FreeBSD 2.1.5
+ + remove tabs from intermediate #define's for GCC_PRINTF, GCC_SCANF
+ that caused incorrect result in ncurses_cfg.h
+ + correct initialization in lib_trace.c, which omitted version info.
+ + remove ech, el1 attributes from cons25w description; they appear to
+ malfunction in FreeBSD 2.1.5
+ + correct color attributes in terminfo.src and lib_color.c to match
+ SVr4 behavior by interchanging codes 1,4, 3,6 in the setf/setb
+ capabilities.
+ + use curs_set() rather than checks via tigetstr() for test programs
+ that hide the cursor: firework, rain, worm.
+ + ensure that if the terminal lacks change_scroll_region, parm_index
+ and parm_rindex are used only to scroll the whole screen (patch by
+ Peter Wemm).
+ + correct curs_set() logic, which did not return ERR if the requested
+ attributes did not exist, nor did it assume an unknown initial state
+ for the cursor (patch by Alexander V. Lukyanov).
+ + combine IDcTransformLine and NoIDcTransformLine to new TransformLine
+ function in lib_doupdate.c (patch by Alexander V. Lukyanov).
+ + correct hashmap.c, which did not update index information (patch by
+ Alexander V. Lukyanov).
+ + patch by Juergen Pfeifer for C++ binding and demo (see c++/NEWS)
+ + correct index in lib_instr.c (Juergen Pfeifer).
+ + correct typo in 970426 patch from Tom's cleanup of lib_overlay.c
+ (Juergen Pfeifer).
+
+970426
+ + corrected cost computation in PutRange(), which was using
+ milliseconds compared to characters by adding two new members to the
+ SCREEN struct, _hpa_ch_cost and _cup_ch_cost.
+ + drop ncurses/lib_unctrl.c, add ncurses/MKunctrl.awk to generate a
+ const array of strings (suggested by Alexander V. Lukyanov, though
+ with a perl script 970118).
+ + rewrote ncurses 'b' test to better exercise magic-cookie (xmc), as
+ well as noting the attributes that are not supported by a terminal.
+ + trace the computation of cost values in lib_mvcur.c
+ + modify _nc_visbuf() to use octal rather than hex, corrected sign
+ extension bug in that function that caused buffer overflow.
+ + modify trace in lib_acs.c to use _nc_visbuf().
+ + suppress trace within _traceattr2().
+ + correct logic of _tracechtype2(), which did not account for repeats
+ or redefinition within an acsc string.
+ + modify debug-library version baudrate() to use environment variable
+ $BAUDRATE to override speed computation. This is needed for
+ regression testing.
+ + correct problems shown by "weblint -pedantic".
+ + update mailing-list information (now ncurses@bsdi.com).
+
+970419
+ + Improve form_field_validation.3x manpage to better describe the
+ precision parameter for TYPE_NUMERIC and TYPE_INTEGER. Provide more
+ precise information how the range checking can be avoided. (patch by
+ Juergen Pfeifer, reported by Bryan Henderson)
+ + change type of min/max value of form types TYPE_INTEGER to long to
+ match SVr4 documentation.
+ + set the form window to stdscr in set_form_win() so that form_win()
+ won't return null (patch by Juergen Pfeifer, reported by Bryan
+ Henderson <bryanh@giraffe.netgate.net>).
+
+970412
+ + corrected ifdef'ing of inline (from 970321) for TRACE vs C++.
+ + corrected toggle_attr_off() macro (patch by Andries.Brouwer).
+ + modify treatment of empty token in $MANPATH to /usr/man (reported by
+ <Andries.Brouwer@cwi.nl>)
+ + modify traces that record functions-called so that chtype and attr_t
+ values are expressed symbolically, to simplify reuse of generated
+ test-scripts on SVr4 regression testing.
+ + add new trace functions _traceattr2() and _tracechtype2()
+
+970405
+ + add configure option --enable-const, to support the use of 'const'
+ where XSI should have, but did not, specify. This defines
+ NCURSES_CONST, which is an empty token otherwise, for strict
+ compatibility.
+ + make processing of configure options more verbose by echoing the
+ --enable/--with values.
+ + add configure option --enable-big-core
+ + set initial state of software echo off as per XSI.
+ + check for C++ builtin.h header
+ + correct computation of absolute-path for $INSTALL that dropped "-c"
+ parameter from the expression.
+ + rename config.h to ncurses_cfg.h to avoid naming-conflict when
+ ncurses is integrated into larger systems (from diffs by H.J.Lu for
+ libc).
+ + correct inequality in lib_doupdate.c that caused a single-char to not
+ be updated when the char on the right-margin was not blank, idcok()
+ was true (patch by Alexander V. Lukyanov 970124, also reported by
+ Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> 970329).
+ + modify 'clean' rule in include/Makefile so that files created by
+ configure script are removed in 'distclean' rule instead.
+
+970328
+ + correct array limit in tparam_internal(), add case to interpret "%x"
+ (patch by Andreas Schwab)
+ + rewrote number-parsing in ncurses.c 'd' test; it did not reset the
+ value properly when non-numeric characters were given (reported by
+ Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>)
+
+970321
+ + move definition of __INTERNAL_CAPS_VISIBLE before include for
+ progs.priv.h (patch by David MacKenzie).
+ + add configuration summary, reordered check for default include
+ directory to better accommodate a case where installer is configuring
+ a second copy of ncurses (reported by Klaus Weide
+ <kweide@tezcat.com>)
+ + moved the #define for 'inline' as an empty token from the
+ $(CFLAGS_DEBUG) symbol into config.h, to avoid redefinition warning
+ (reported by Ward Horner).
+ + modify test for bool builtin type to use 'unsigned' rather than
+ 'unknown' when cross-compiling (reported by Ward Horner).
+
+970315
+ + add header dependencies so that "make install.libs" will succeed
+ even if "make all" is not done first.
+ + moved some macros from lib_doupdate.c to curses.priv.h to use in
+ expanded functions with ATAC.
+ + correct implementation of lib_instr.c; both XSI and SVr4 agree that
+ the winnstr functions can return more characters than will fit on one
+ line.
+
+970308
+ + modify script that generates lib_gen.c to support traces of called &
+ return.
+ + add new configure option "--disable-macros", for testing calls within
+ lib_gen.c
+ + corrected logic that screens level-checking of called/return traces.
+
+970301
+ + use new configure macro NC_SUBST to replace AC_PATH_PROG, better
+ addressing request by Ward Horner.
+ + check for cross-compiling before trying to invoke the autoconf
+ AC_FUNC_SETVBUF_REVERSED macro (reported by Ward Horner)
+ + correct/simplify loop in _nc_visbuf(), 970201 changes omitted
+ a pointer-increment.
+ + eliminate obsolete symbol SHARED_ABI from dist.mk (noted by
+ Florian La Roche).
+
+970215
+ + add configure option --enable-expanded, together with code that
+ implements an expanded form of certain complex macros, for testing
+ with ATAC.
+ + disable CHECK_POSITION unless --with-assertions is configured
+ (Alexander Lukyanov pointed out that this is redundant).
+ + use keyname() to show traced chtype values where applicable rather
+ than _tracechar(), which truncates the value to 8-bits.
+ + minor fixes to TRACE_ICALLS, added T_CREATE, TRACE_CCALLS macros.
+ + modify makefiles in progs and test directories to avoid using C
+ preprocessor options on link commands (reported by Ward Horner)
+ + correct ifdef/include-order for nc_alloc.h vs lib_freeall.c (reported
+ by Ward Horner)
+ + modify ifdef's to use configure-defined symbols consistently
+ (reported by Ward Horner)
+ + add/use new makefile symbols AR, AR_OPTS and LD to assist in non-UNIX
+ ports (reported by Ward Horner <whorner@tsi-telsys.com>)
+ + rename struct try to struct tries, to avoid name conflict with C++
+ (reported by Gary Johnson).
+ + modify worm.c to hide cursor while running.
+ + add -Wcast-qual to gcc warnings, fix accordingly.
+ + use PutChar rather than PutAttrChar in ClrToEOL to properly handle
+ wrapping (Alexander Lukyanov).
+ + correct spurious echoing of input in hanoi.c from eric's #291 & #292
+ patches (reported by Vernon C. Hoxie <vern@zebra.alphacdc.com>).
+ + extend IRIX configuration to IRIX64
+ + supply missing install.libs rule needed after restructuring
+ test/Makefile.in
+
+970208
+ + modify "make mostlyclean" to leave automatically-generated source
+ in the ncurses directory, for use in cross-compiles.
+ + autogenerated object-dependencies for test directory
+ + add configure option --with-rcs-ids
+ + modify configuration scripts to generate major/minor/patch versions
+ (suggested by Alexander Lukyanov).
+ + supply missing va_end's in lib_scanw.c
+ + use stream I/O for trace-output, to eliminate fixed-size buffer
+ + add TRACE_ICALLS definition/support to lib_trace.c
+ + modify Ada95 binding to work with GNAT 3.09 (Juergen Pfeifer).
+
+970201
+ + add/modify traces for called/return values to simplify extraction
+ for test scripts.
+ + changed _nc_visbuf to quote its result, and to dynamically allocate
+ the returned buffer.
+ + invoke ldconfig after installing shared library
+ + modify install so that overwrite applies to shared library -lcurses
+ in preference to static library (reported by Zeyd 960928).
+ + correct missing ';' in 961221 mod to overwrite option use of $(LN_S).
+ + fixes to allow "make install" to work without first doing a "make
+ all" (suggested by Larry Virden).
+
+970125
+ + correct order of #ifdef for TABS_OK.
+ + instrumented toe.c to test memory-leaks.
+ + correct memory-deallocation in toe.c (patch by Jesse Thilo).
+ + include <sys/types.h> in configuration test for regex.h (patch by
+ Andreas Schwab)
+ + make infocmp recognize -I option, for SVr4 compatibility (reported by
+ Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>)
+
+970118
+ + add extension 'use_default_colors()', modified test applications that
+ use default background (firework, gdc, hanoi, knight, worm) to
+ demonstrate.
+ + correct some limit checks in lib_doupdate.c exposed while running
+ worm.
+ + use typeCalloc macro for readability.
+ + add/use definition for CONST to accommodate testing with Solaris
+ (SVr4) curses, which doesn't use 'const' in its prototypes.
+ + modify ifdef's in test/hashtest.c and test/view.c to compile with
+ Solaris curses.
+ + modify _tracedump() to pad pad colors & attrs lines to match change
+ in 970101 showing first/last changes.
+ + corrected location of terminating null on dynamically allocated forms
+ fields (patch by Per Foreby).
+
+970111
+ + added headers to make view.c compile on SCO with the resizeterm()
+ code (i.e., struct winsize) - though this compiles, I don't have a
+ suitable test configuration since SIGWINCH doesn't pass my network to
+ that machine - T.Dickey.
+ + update test/configure.in to supply some default substitutions.
+ + modify configure script to add -lncurses after -lgpm to fix problem
+ linking against static libraries.
+ + add a missing noraw() to test/ncurses.c (places noted by Jeremy
+ Buhler)
+ + add a missing wclear() to test/testcurs.c (patch by Jeremy Buhler
+ <jbuhler@cs.washington.edu>)
+ + modify headers to accommodate compilers that don't allow duplicate
+ "#define" lines for NCURSES_VERSION (reported by Larry W. Virden
+ <lvirden@cas.org>)
+ + fix formatting glitch in curs_getch.3x (patch by Jesse Thilo).
+ + modify lib_doupdate to make el, el1 and ed optimization use the
+ can_clear_with macro, and change EmitRange to allow leaving cursor at
+ the middle of interval, rather than always at the end (patch by
+ Alexander Lukyanov originally 960929, resync 970106).
+
+970104
+ + workaround defect in autoconf 2.12 (which terminates configuration
+ if no C++ compiler is found) by adding an option --without-cxx.
+ + modify several man-pages to use tbl, where .nf/.fi was used (reported
+ by Jesse Thilo).
+ + correct font-codes in some man-pages (patch by Jesse Thilo
+ <Jesse.Thilo@pobox.com>)
+ + use configure script's knowledge of existence of g++ library for the
+ c++ Makefile (reported by Paul Jackson).
+ + correct misleading description of --datadir configuration option
+ (reported by Paul Jackson <pj@sam.engr.sgi.com>)
+
+970101
+ + several corrections to _nc_mvcur_scrolln(), prompted by a bug report
+ from Peter Wemm:
+ > the logic for non_dest_scroll_region was interchanged between the
+ forward & reverse scrolling cases.
+ > multiple returns from the function allowed certain conditions to do
+ part of an operation before discovering that it couldn't be
+ completed, returning an error without restoring the cursor.
+ > some returns were ERR, where the function had completed the
+ operation, because the insert/delete line logic was improperly
+ tested (this was probably the case Peter saw).
+ > contrary to comments, some scrolling cases were tested after the
+ insert/delete line method.
+ + modify _tracedump() to show first/last changes.
+ + modify param of ClrUpdate() in lib_doupdate.c to 'newscr', fixes
+ refresh problem (reported by Peter Wemm) that caused nvi to not show
+ result of ":r !ls" until a ^L was typed.
+
+961229 (internal alpha)
+ + correct some of the writable-strings warnings (reported by Gary
+ Johnson <gjohnson@season.com>). Note that most of the remaining ones
+ are part of the XSI specification, and can't be "fixed".
+ + improve include-dependencies in form, menu, panel directories.
+ + correct logic of delay_output(), which would return early if
+ there is data on stdin.
+ + modify interface & logic of _nc_timed_wait() to support 2 file
+ descriptors, needed for GPM.
+ + integrate patch by Andrew Kuchling <amk@magnet.com> for GPM (mouse)
+ support, correcting logic in wgetch() and _nc_mouse_parse() which
+ prevented patch from working properly.
+ + improve performance of panel algorithm (Juergen Pfeifer 961203).
+ + strip RCS id's from generated .html files in Ada95 subtree.
+ + resync with generated .html files (Juergen Pfeifer 961223).
+ + terminfo.src 10.1.0 from Eric.
+
+961224 4.0 release
+ + release as 4.0 to accommodate Linux ld.so.1.8.5
+ + correct syntax/spelling, regenerated .doc files from .html using
+ lynx 2.5
+ + refined forms/menus makefiles (Juergen Pfeifer 961223).
+
+961221 - snapshot
+ + remove logic in read_entry.c that attempts to refine errno by using
+ 'access()' for the directory (from patch by Florian La Roche).
+ + correct configure test/substitution that inhibits generating
+ include-path to /usr/include if gcc is used (reported by Florian La
+ Roche).
+ + modify setupterm() to allocate new TERMINAL for each call, just as
+ solaris' curses does (Alexander Lukyanov 960829).
+ + corrected memory leaks in read_entry.c
+ + add configure options --with-dbmalloc, --with-dmalloc, and
+ --disable-leaks, tested by instrumenting infocmp, ncurses programs.
+ + move #include's for stdlib.h and string.h to *.priv.h to accommodate
+ use of dbmalloc.
+ + modify use of $(LN_S) to follow recommendation in autoconf 2.12,
+ i.e., set current directory before linking.
+ + split-out panel.priv.h, improve dependencies for forms, menus
+ (Juergen Pfeifer 961204).
+ + modify _nc_freewin() to reset globals curscr/newscr/stdscr when
+ freeing the corresponding WINDOW (Purify).
+ + modify delwin() to return ERR if the window to be deleted has
+ subwindows, needed as a side-effect of resizeterm() (Purify). Tested
+ and found that SVr4 curses behaves this way.
+ + implement logic for _nc_freeall(), bringing stub up to date.
+
+961215
+ + modify wbkgd() so that it doesn't set nulls in the rendered text,
+ even if its argument doesn't specify a character (fixes test case by
+ Juergen Pfeifer for bug-report).
+ + set window-attributes in wbkgd(), to simplify comparison against
+ Solaris curses, which does this.
+
+961214 - snapshot
+ + replace most constants in ncurses 'o' test by expressions, making it
+ work with wider range of screen sizes.
+ + add options to ncurses.c to specify 'e' test softkey format, and the
+ number of header/footer lines to rip-off.
+ + add ^R (repaint after resize), ^L (refresh) commands to ncurses 'p'
+ test.
+ + add shell-out (!) command to ncurses 'p' test to allow test of
+ resize between endwin/refresh.
+ + correct line-wrap case in mvcur() by emitting carriage return,
+ overlooked in 960928, but needed due to SVr4 compatibility changes to
+ terminal modes in 960907.
+ + correct logic in wresize that causes new lines to be allocated,
+ broken for the special case of increasing rows only in 960907's fix
+ for subwindows.
+ + modify configure script to generate $(LDFLAGS) with -L and -l options
+ in preference to explicit library filenames. (NOTE: this may
+ require further amending, since I vaguely recall a dynamic loader
+ that did not work properly without the full names, but it should be
+ handled as an exception to the rule, since some linkers do bulk
+ inclusion of libraries when given the full name - T.Dickey).
+ + modify configure script to allow user-supplied $CFLAGS to set the
+ debug-option in all libraries (requested by lots of people).
+ + use return consistently from main(), rather than exit (reported by
+ Florian La Roche).
+ + add --enable-getcap-cache option to configure, normally disabled
+ (requested by Florian La Roche).
+ + make configure test for gettimeofday() and possibly -lbsd more
+ efficient (requested by Florian La Roche florian@knorke.saar.de)
+ + minor adjustments to Ada95 binding (patches by Juergen Pfeifer)
+ + correct attributes after emitting orig_pair in lib_vidattr.c (patch
+ by lav@yars.free.net).
+
+961208
+ + corrected README wrt Ada95 (Juergen Pfeifer)
+
+961207 - snapshot
+ + integrate resizeterm() into doupdate(), so that if screen size
+ changes between endwin/refresh, ncurses will resize windows to fit
+ (this needs additional testing with pads and softkeys).
+ + add, for memory-leak testing, _nc_freeall() entrypoint to free all
+ data used in ncurses library.
+ + initialize _nc_idcok, _nc_idlok statically to resolve discrepancy
+ between initscr() and newwin() initialization (reported by
+ lav@yars.free.net).
+ + test built VERSION=4.0, SHARED_ABI=4 with Linux ld.so.1.8.5
+ (set beta versions to those values -- NOTE that subsequent pre-4.0
+ beta may not be interchangeable).
+ + modify configure script to work with autoconf 2.12
+
+961130 1.9.9g release
+ + add copyright notices to configuration scripts (written by Thomas
+ Dickey).
+
+961127
+ > patch by Juergen Pfeifer (mostly for panel):
+ + cosmetic improvement for a few routines in the ncurses core library
+ to avoid warning messages.
+ + the panel overlap detection was broken
+ + the panel_window() function was not fool-proof.
+ + Some inlining...
+ + Cosmetic changes (also to avoid warning messages when compiling with
+ -DTRACE).
+
+961126
+ > patch by Juergen Pfeifer:
+ + eliminates warning messages for the compile of libform.
+ + inserts Per Foreby's new field type TYPE_IPV4 into libform.
+ + Updates man page and the Ada95 binding to reflect this.
+ + Improves inlining in libmenu and libform.
+
+961120
+ + improve the use of the "const" qualifier in the
+ panel library (Juergen Pfeifer)
+ + change set_panel_userptr() and panel_userptr() to use void*
+ (Juergen Pfeifer)
+
+961119
+ + change ABI to 3.4
+ + package with 961119 version of Ada95 binding (fixes for gnat-3.07).
+ (Juergen Pfeifer)
+ + correct initialization of the stdscr pseudo panel in panel library
+ (Juergen Pfeifer)
+ + use MODULE_ID (rcs keywords) in forms and menus libraries (Juergen
+ Pfeifer).
+ > patch #324 by Eric.
+ + typo in curs_termcap man page (reported by Hendrik Reichel
+ <106065.2344@compuserve.com>)
+ + change default xterm entry to xterm-r6.
+ + add entry for color_xterm
+
+961116 - snapshot
+ + lint found several functions that had only #define implementations
+ (e.g., attr_off), modified curses.h.in to generate them as per XSI
+ Curses requirement that every macro be available as a function.
+ + add check in infocmp.c to guard against string compare of
+ CANCELLED_STRING values.
+ + modify firework.c, rain.c to hide cursor while running.
+ + correct missing va_end in lib_tparm.c
+ + modify hanoi.c to work on non-color terminals, and to use timing
+ delays when in autoplay mode.
+ + correct 'echochar()' to refresh immediately (reported by Adrian
+ Garside 94ajg2@eng.cam.ac.uk)
+ > patch #322 by eric:
+ + reorganize terminfo.src entries for xterm.
+
+961109 - snapshot
+ + corrected error in line-breakout logic (lib_doupdate.c)
+ + modified newdemo to use wgetch(win) rather than getch() to eliminate
+ a spurious clear-screen.
+ + corrected ifdef's for 'poll()' configuration.
+ + added modules to ncurses, form, menu for Ada95 binding (Juergen
+ Pfeifer).
+ + modify set_field_buffer() to allow assignment of string longer than
+ the initial buffer length, and to return the complete string rather
+ than only the initial size (Juergen Pfeifer and Per Foreby
+ <perf@efd.lth.se>).
+
+961102 - snapshot
+ + configure for 'poll()' in preference to 'select()', since older
+ systems are more likely to have a broken 'select()'.
+ + modified render_char() to avoid OR'ing colors.
+ + minor fixes to testcurs.c, newdemo.c test programs: ifdef'd out the
+ resize test, use wbkgd and corrected box() parameters.
+ + make flushinp() test work in ncurses.c by using napms() instead of
+ sleep().
+ + undo Eric's changes to xterm-x11r6 (it no longer matched the X11R6.1
+ distribution, as stated)
+ + terminfo 9.13.18 (resync by Eric)
+ + check for getenv("HOME") returning null (Eric).
+ + change buffer used to decode xterm-mouse commands to unsigned to
+ handle displays wider than 128 chars (Juergen Pfeifer).
+ + correct typo curs_outopts.3x (Juergen Pfeifer).
+ + correct limit-checking in wenclose() (Juergen Pfeifer).
+ + correction to Peter Wemm's newwin change (Thomas Fehr
+ <fehr@suse.de>).
+ + corrections to logic that combines colors and attributes; they must
+ not be OR'd (Juergen Pfeifer, extending from report/patch by Rick
+ Marshall).
+
+961026 - snapshot
+ + reset flags in 'getwin()' that might cause refresh to attempt to
+ manipulate the non-existent parent of a window that is read from a
+ file (lib_screen.c).
+ + restructure _nc_timed_wait() to log more information, and to try to
+ recover from badly-behaved 'select()' calls (still testing this).
+ + move define for GOOD_SELECT into configure script.
+ + corrected extra '\' character inserted before ',' in comp_scan.c
+ + corrected expansion of %-format characters in dump_entry.c; some were
+ rendered as octal constants.
+ + modify dump_entry.c to make terminfo output more readable and like
+ SVr4, by using "\s" for spaces (leading/trailing only), "\," for
+ comma, "\^" and "\:" as well.
+ + corrected some memory leaks in ncurses.c, and a minor logic error
+ in the top-level command-parser.
+ + correction for label format 4 (PC style with info line), a
+ slk_clear(), slk_restore() sequence didn't redraw the info line
+ (Juergen Pfeifer).
+ + modified the slk window (if simulated) to inherit the background and
+ default character attributes from stdscr (Juergen Pfeifer).
+ + corrected limit-check in set_top_row (Juergen Pfeifer).
+
+961019 - snapshot
+ + correct loop-limit in wnoutrefresh(), bug exposed during pipe-testing
+ had '.lastchar' entry one beyond '._maxx'.
+ + modify ncurses test-program to work with data piped to it.
+ + corrected pathname computation in run_tic.sh, removing extra "../"
+ (reported by Tim Mooney).
+ + modified configure script to use previous install's location for
+ curses.h
+ + added NetBSD and FreeBSD to platforms that use --prefix=/usr as
+ a default.
+
+961013
+ + revised xterm terminfo descriptions to reflect the several versions
+ that are available.
+ + corrected a pointer reference in dump_entry.c that didn't test if
+ the pointer was -1.
+
+961005 - snapshot
+ + correct _nc_mvcur_scrolln for terminals w/o scrolling region.
+ + add -x option to hashtest to control whether it allows writes to the
+ lower-right corner.
+ + ifdef'd (NCURSES_TEST) the logic for _nc_optimize_enable to make it
+ simpler to construct tests (for double-check of _nc_hash_map tests).
+ + correct ifdef's for c++ in curses.h
+ + change default xterm type to xterm-x11r6.
+ + correct quoting in configure that made man-pages installed with
+ $datadir instead of actual terminfo path.
+ + correct whitespace in include/Caps, which caused kf11, clr_eol and
+ clr_end to be omitted from terminfo.5
+ + fix memory leaks in delscreen() (adapted from Alexander Lukyanov).
+ + improve appearance of marker in multi-selection menu (Juergen
+ Pfeifer)
+ + fix behaviour for forms with all fields inactive (Juergen
+ Pfeifer)
+ + document 'field_index()' (Juergen Pfeifer)
+ > patch #321 by eric:
+ + add some more XENIX keycap translations to include/Caps.
+ + modify newwin to set initial state of each line to 'touched'
+ (from patch by Peter Wemm <peter@spinner.dialix.com>)
+ + in SET_TTY, replace TCSANOW with TCSADRAIN (Alexander Lukyanov).
+
+960928 - snapshot
+ + ifdef'd out _nc_hash_map (still slower)
+ + add graphic characters to vt52 description.
+ + use PutAttrChar in ClrToEOL to ensure proper background, position.
+ + simplify/correct logic in 'mvcur()' that does wrapping; it was
+ updating the position w/o actually moving the cursor, which broke
+ relative moves.
+ + ensure that 'doupdate()' sets the .oldindex values back to a sane
+ state; this was causing a spurious refresh in ncurses 'r'.
+ + add logic to configure (from vile) to guard against builders who
+ don't remove config.cache & config.status when doing new builds.
+ + corrected logic for 'repeat_char' in EmitRange (from #317), which
+ did not follow the 2-parameter scheme specified in XSI.
+ + corrected logic of wrefresh, wnoutrefresh broken in #319, making
+ clearok work properly (from report by Michael Elkins).
+ + corrected problem with endwin introduced by #314 (removing the
+ scrolling-region reset) that broke ncurses.c tests.
+ + corrected order of args in AC_CHECK_LIB (from report by Ami Fischman
+ <fischman@math.ucla.edu>).
+ + corrected formatting of terminfo.5 tables (Juergen Ehling)
+ > patch 320 by eric:
+ + change ABI to 3.3
+ + emit a carriage-return in 'endwin()' to workaround a kernel bug in
+ BSDI. (requested by Mike Karels <karels@redrock.bsdi.com>)
+ + reverse the default o configure --enable-termcap (consensus).
+ > patch 319 by eric:
+ + modified logic for clearok and related functions (from report by
+ Michael Elkins) - untested
+ > patch 318 by eric:
+ + correction to #317.
+ > patch 317 by eric:
+ + re-add _nc_hash_map
+ + modify EmitRange to maintain position as per original design.
+ + add hashtest.c, program to time the hashmap optimization.
+ > patch 316 by eric:
+ + add logic to deal with magic-cookie (how was this tested?)
+ (lib_doupdate.c).
+ + add ncurses.c driver for magic-cookie, some fixes to ncurses.c
+ > patch 315 by eric:
+ + merged A. Lukyanov's patch to use ech and rep - untested
+ (lib_doupdate.c).
+ + modified handling of interrupted system calls - untested
+ (lib_getch.c, lib_twait.c).
+ + new function _nc_mvcur_resume()
+ + fix return value for 'overlay()', 'overwrite()'
+
+960914 - snapshot
+ + implement subwindow-logic in wresize, minor fixes to ncurses 'g'
+ test.
+ + corrected bracketing of fallback.c (reported/suggested fix by Juergen
+ Ehling <eh@eclipse.aball.de>).
+ + update xterm-color to reflect XFree86 3.1.3G release.
+ + correct broken dtterm description from #314 patch (e.g., spurious
+ newline. The 'pairs' change might work, but no one's tested it
+ either ;-)
+ + clarify the documentation for the builtin form fieldtypes (Juergen
+ Pfeifer)
+ > patch 314 by eric:
+ + Enhancement suggested by A. Lukyanov -- reset scroll region on
+ startup rather than at wrapup time.
+ + Fix suggested by A. Lukyanov, make storage of palette tables
+ and their size counts per-screen for multi-terminal applications.
+ + Improved error reporting for infotocap translation errors.
+ + Update terminfo.src to 9.13.14.
+
+960907 - snapshot
+ + rewrote wgetstr to make it erase control chars and also fix bogus use
+ of _nc_outstr which caused the display to not wrap properly (display
+ problem reported by John M. Flinchbaugh <glynis@netrax.net>)
+ + modify ncurses 'f' test to accommodate terminal responses to C1 codes
+ (and split up this screen to accommodate non-ANSI terminals).
+ + test enter_insert_mode and exit_insert_mode in has_ic().
+ + removed bogus logic in mvcur that assumes nl/nonl set output modes
+ (XSI says they are input modes; SVr4 implements this).
+ + added macros SET_TTY, GET_TTY to term.h
+ + correct getstr() logic that altered terminal modes w/o restoring.
+ + disable ICRNL, etc., during initialization to match SVr4, removing
+ the corresponding logic from raw, cbreak, etc.
+ + disable ONLCR during initialization, to match SVr4 (this is needed
+ for cursor optimization when the cursor-down is a newline).
+ + replaced Eric's imitation of wresize with my original (his didn't
+ work).
+
+960831 - snapshot
+ + memory leaks (Alexander V. Lukyanov).
+ + modified pnoutrefresh() to be more tolerant of too-large screen
+ size (reported by Michael Elkins).
+ + correct handling of terminfo files with no strings (Philippe De
+ Muyter)
+ + correct "tic -s" to take into account -I, -C options.
+ + modify ncurses 'f' test to not print codes 80 through 9F, since they
+ are considered control codes by ANSI terminals.
+
+960824 - snapshot
+ + correct speed variable-type in 'tgetent()' (reported by Peter Wemm)
+ + make "--enable-getcap" configuration-option work (reported by
+ Peter Wemm <peter@spinner.DIALix.COM>)
+
+960820
+ + correct err in 960817 that changed return-value of tigetflag()
+ (reported by Alexander V. Lukyanov).
+ + modify infocmp to use library default search-path for terminfo
+ directory (Alexander V. Lukyanov).
+
+960817 - snapshot
+ + corrected an err in mvcur that broke resizing-behavior.
+ + correct fall-thru behavior of _nc_read_entry(), which was not finding
+ descriptions that existed in directories past the first one searched
+ (reported by Alexander V. Lukyanov)
+ + corrected typo in dtterm description.
+ > patch 313 by eric:
+ + add dtterm description
+ + clarify ncurses 'i' test (drop vscanf subtest)
+
+960810 - snapshot
+ + correct nl()/nonl() to work as per SVr4 & XSI.
+ + minor fixes to ncurses.c (use 'noraw()', mvscanw return-code)
+ + refine configure-test for -g option (Tim Mooney).
+ + correct interaction between O_BLANK and NEW_LINE request in form
+ library (Juergen Pfeifer)
+
+960804
+ + revised fix to tparm; previous fix reversed parameter order.
+ > patch 312 by eric:
+ correct terminfo.src corrupted by #310
+ > patch 311 by eric:
+ + fix idlok() and idcok() and the default of the idlok switch.
+
+960803 - snapshot
+ + corrected tparm to handle capability strings without explicit pop
+ (reported by William P Setzer)
+ + add fallback def for GCC_NORETURN, GCC_UNUSED for termcap users
+ (reported by Tim Mooney).
+ > patch 310 by eric:
+ + documentation and prototyping errors for has_color, immedok and idcok
+ (reported by William P Setzer <wsetzer@pams.ncsu.edu>)
+ + updated qnx terminfo entry (by Michael Hunter)
+
+960730
+ + eliminate quoted includes in ncurses subdirectory, ensure config.h
+ is included first.
+ + newterm initializes terminal settings the same as initscr (reported
+ by Tim Mooney).
+
+960727 - snapshot
+ + call cbreak() in initscr(), as per XSI & SVr4.
+ + turn off hardware echo in initscr() as per XSI & SVr4
+ > patch 309 by eric:
+ + terminfo changes (9.3.10), from BRL
+ + add more checks to terminfo parser.
+ + add more symbols to infocmp.
+
+960720 - snapshot
+ + save previous-attribute in lib_vidattr.c if SP is null (reported by
+ Ju"rgen Fluk <louis@dachau.marco.de>)
+ + corrected calls on _nc_render so that background character is set
+ as per XSI.
+ + corrected wbkgdset macro (XSI allows background character to be
+ null), and tests that use it.
+ + more corrections to terminfo (xterm & rxvt)
+ + undid change to mcprint prototype (cannot use size_t in curses.h
+ because not all systems declare it in the headers that we can safely
+ include therein).
+ + move the ifdefs for errno into curses.priv.h
+ > patch 308 by eric:
+ + terminfo changes (9.3.8)
+ + modified logic of error-reporting in terminfo parser
+
+960713 - snapshot
+ + always check for <sys/bsdtypes.h> since ISC needs it to declare
+ fd_set (Juergen Pfeifer)
+ + install shared-libraries on NetBSD/FreeBSD with ABI-version (reported
+ by several people: Juergen Pfeifer, Mike Long)
+ + add LOCAL_LDFLAGS2 symbol (Juergen Pfeifer)
+ + corrected prototype for delay_output() -- bump ABI to 3.2
+ + terminfo patches #306/307 from Eric.
+ + moved logic that filters out rmul and rmso from setupterm to newterm
+ where it is less likely to interfere with termcap applications.
+
+960707
+ + rollback Eric's #305 change to terminfo.src (it breaks existing
+ applications, e.g., 'less 290').
+ + correct path of edit_man.sh, and fix typo that made all man-pages
+ preformatted.
+ + restore man/menu_requestname.3x omitted in Zeyd's resync (oops).
+ + auto-configure the GCC_PRINTFLIKE/GCC_SCANFLIKE macros (reported by
+ Philippe De Muyter).
+
+960706 - snapshot
+ + make lib_vidattr.c more readable using macros.
+ + filter out rmul, rmso that conflict with sgr0 when reading terminal
+ descriptions.
+ + added sanity-checking of various paired string attributes (Eric).
+ + work around autoconf bug, force $INSTALL to absolute path.
+ (reported by Zeyd).
+ + modify man-page install for BSDI to install preformatted .0 files
+ (reported by David MacKenzie).
+ + add/use gcc __attribute__ for printf and scanf in curses.h
+ + added SGR attributes test-case to ncurses
+ + revised ncurses 't' logic to show trace-disable effect in the menu.
+ + use getopt in ncurses program to process -s and -t options.
+ + make ncurses 'p' legend toggle with '?'
+ + disable scrollok during the ncurses 'p' test; if it is enabled the
+ stdscr will scroll when putting the box-corners in the lower-right
+ of the screen.
+
+960629 - snapshot
+ + check return code of _nc_mvcur_scrolln() in _nc_scroll_optimize() for
+ terminals with no scrolling-support (reported by Nikolay Shadrin
+ <queen@qh.mirea.ac.ru>)
+ + added ^S scrollok-toggle to ncurses 'g' test.
+ + added ^T trace-toggle to ncurses tests.
+ + modified ncurses test program to use ^Q or ESC consistently for
+ terminating tests (rather than ^D), and to use control keys rather
+ than function keys in 'g' test.
+ + corrected misplaced wclrtoeol calls in addch to accommodate wrapping
+ (reported by Philippe De Muyter).
+ + modify lib_doupdate.c to use effective costs to tradeoff between
+ delete-character/insert-character vs normal updating (reported by
+ David MacKenzie).
+ + compute effective costs for screen update operations (e.g., clr_eos,
+ delete_character).
+ + corrected error in knight.c exposed by wrap fixes in 960622; the
+ msgwin needed scrollok set.
+ + corrected last change to IDcTransformLine logic to avoid conflict
+ between PutRange and InsStr
+ + modified run_tic.sh to not use /usr/tmp (reported by David
+ MacKenzie), and further revised it and aclocal.m4 to use $TMPDIR if
+ set.
+ + corrected off-by-one in RoomFor call in read_entry.c
+
+960622 - snapshot
+ + modified logic that wraps cursor in addch to follow the XSI spec,
+ (implemented in SVr4) which states that the cursor position is
+ updated when wrapping. Renamed _NEED_WRAP to _WRAPPED to reflect the
+ actual semantics.
+ + added -s option to tic, to provide better diagnostics in run_tic.sh
+ + improved error-recovery for tabset install.
+ + change ABI to 3.1 (dropped tparam, corrected getbkgd(), added
+ _yoffset to WINDOW).
+ + modified initialization of SP->_ofp so that init_acs() is called with
+ the "right" file pointer (reported by Rick Marshall <rjm@nlc.net.au>
+ + documentation fixes (Juergen Pfeifer).
+ + corrected, using new SCREEN and WINDOW members, the behavior of
+ ncurses if one uses ripoffline() to remove a line from the top of the
+ screen (Juergen Pfeifer).
+ + modified autoconf scripts to prepare for Ada95 (GNAT) binding to
+ ncurses (Juergen Pfeifer).
+ + incorrect buffer-size in _nc_read_entry, reported by Eric Raymond.
+
+960617
+ + corrected two logic errors in read_entry.c, write_entry.c (called by
+ tic, the write/read of terminfo entries used inconsistent rules for
+ locating the entries; the $TERMINFO_DIRS code would find only the
+ first entry in a list).
+ + refined pathname computation in run_tic.sh and shlib.
+ + corrected initialization of $IP in misc/run_tic.sh
+
+960615 - snapshot
+ + ifdef'd out _nc_hash_map() call because it does not improve speed.
+ + display version of gcc if configure script identifies it.
+ + modify configure script to use /usr as Linux's default prefix.
+ + modify run_tic.sh to use shlib script, fixes some problems installing
+ with a shared-library configuration.
+ + adjusted configure script so that it doesn't run tests with the
+ warnings turned on, which makes config.log hard to read.
+ + added 'lint' rule to top-level Makefile.
+ + added configure option '--with-install-prefix' for use by system
+ builders to install into staging locations (from request by
+ charles@comm.polymtl.ca)
+ + corrected autoconfigure for Debian man program; it's not installed
+ as "man_db".
+ + set noecho in 'worm'; it was ifdef'd for debug only
+ + updated test/configure.in for timing-display in ncurses 'p' test
+ + corrected misspelled 'getbkgd()'.
+ + corrected wbkgdset to work like observed syvr4 (sets A_CHARTEXT part
+ to blank if no character given, copies attributes to window's
+ attributes).
+ + modified lib_doupdate.c to use lower-level SP's current_attr state
+ instead of curscr's state, since it is redundant.
+ + correction to IDcTransformLine logic which controls where InsStr is
+ invoked (refined by lav@yars.free.net).
+ > patches 303 by eric
+ + conditionally include Chris Torek's hash function _nc_hash_map().
+ + better fix for nvi refresh-bug (Rick Marshall)
+ + fix for bug in handling of interrupted keystroke waits,
+ (Werner Fleck).
+
+960601 - snapshot
+ + auto-configure man-page compression-format and renames for Debian.
+ + corrected several typos in curses.h.in (i.e., the mvXXXX macros).
+ + re-order curses.priv.h for lint.
+ + added rules for lintlib, lint
+ + corrected ifdef for BROKEN_LINKER in MKnames.awk.in
+ + corrected missing INSTALL_DATA in misc/Makefile.in
+ + flush output when changing cursor-visibility (Rick Marshall)
+ + fix a minor bug in the _nc_ripoff() routine and improve error
+ checking when creating the label window (Juergen Pfeifer).
+ + enhancement to the control over the new PC-style soft key format.
+ allow caller now to select whether or not one wants to have
+ the index-line; see curs_slk.3x for documentation (Juergen Pfeifer).
+ + typos, don't use inline with -g (Philippe De Muyter)
+ + fixes for menus & wattr-, slk-functions (Juergen Pfeifer)
+
+960526 - snapshot
+ + removed --with-ticdir option altogether, maintain compatibility with
+ existing applications via symbolic link in run_tic.sh
+ + patch for termio.h, signal (Philippe De Muyter)
+ + auto-configure gcc warning options rather than infer from version.
+ + auto-configure __attribute__ for different gcc versions.
+ + corrected special use of clearok() in hardscroll.c by resetting flag
+ in wrefresh().
+ + include stdlib.h before defs for EXIT_SUCCESS, for OSF/1.
+ + include sys/types.h in case stdlib.h does not declare size_t.
+ + fixes for makefile (Tim Mooney)
+ + fixes for menus & forms (Juergen.Pfeifer@T-Online.de)
+
+960518 - snapshot
+ + revised ncurses.c panner test, let pad abut all 4 sides of screen.
+ + refined case in lib_doupdate.c for ClrToEOL().
+ + corrected prior change for PutRange (Alexander V. Lukyanov:
+ lav@yars.free.net).
+ + autoconf mods (Tim Mooney: mooney@dogbert.cc.ndsu.NoDak.edu).
+ + locale fix for forms (Philippe De Muyter: phdemuyt@ulb.ac.be)
+ + renamed "--with-datadir" option to "--with-ticdir" to avoid
+ confusion, and made this check for the /usr/lib/terminfo pre-existing
+ directory.
+ > patches 299-301 by eric:
+ + added hashmap.c
+ + mods to tracing, especially for ACS chars.
+ + corrected off-by-one in IDCtransform.
+ + corrected intermittent mouse bug by using return-value from read().
+ + mods to parse_entry.c, for smarter defaults.
+
+960512
+ + use getopt in 'tic'; added -L option and modified -e option to allow
+ list from a file.
+
+960511
+ + don't use fixed buffer-size in tparm().
+ + modified tic to create terminfo directory if it doesn't exist.
+ + added -T options to tic and infocmp (for testing/analysis)
+ + refined the length criteria for termcap and terminfo
+ + optimize lib_doupdate with memcpy, PutRange
+ > patches 297, 298 by eric
+ + implement TERMINFO_DIRS, and -o option of tic
+ + added TRACE_IEVENT
+ + removed boolean version of 'getm'
+ + added lib_print.c (for Rick Marshall)
+ + added has_key()
+ + added 't' to ncurses.c test.
+ + moved delay_output() to lib_tputs.c
+ + removed tparam() (was added in 1.9.9, but conflicts with emacs and
+ is not part of X/Open Curses).
+ + misc cursor & optimization fixes.
+
+960504 - snapshot
+ + modified ncurses 'p' test to allow full-screen range for panner size.
+ + fixes for locale (phdm@labauto1.ulb.ac.be)
+ + don't use fixed buffer-size in fmt_entry().
+ + added usage-message to 'infocmp'.
+ + modified install.includes rules to prepend subdirectory-name to
+ "#include" if needed.
+
+960430
+ + protect wrefresh, wnoutrefresh from invocation with pad argument.
+ + corrected default CCFLAGS in test/Makefile.
+
+960428 - snapshot
+ + implemented logic to support terminals with background color erase
+ (e.g., rxvt and the newer color xterm).
+ + improved screen update logic (off-by-one logic error; use clr_eos if
+ possible)
+
+960426 - snapshot
+ + change ncurses 'a' test to run in raw mode.
+ + make TIOCGWINSZ configure test less stringent, in case user
+ configures via terminal that cannot get screen size.
+ > patches 295, 296 by eric:
+ + new "-e" option of tic.
+ + fix for "infocmp -e".
+ + restore working-directory in read_termcap.c
+ + split lib_kernel.c, lib_setup.c and names.c in order to reduce
+ overhead for programs that use only termcap features.
+
+960418 - snapshot
+ + use autoconf 2.9
+ + fix for AIX 3.2.5 (must define _POSIX_SOURCE to get termios struct
+ definitions via <termios.h>, modified macros in lib_raw.c to avoid
+ K&R-style substitution)
+ > patches 293, 294 by eric:
+ + mods to wgetch() in cooked mode
+ + corrected askuser() logic in tset
+ + correct interaction of endwin() with mouse processing
+ + added trace support for TTY flags
+
+960406
+ + fixes for NeXT, ISC and HPUX auto-configure
+ + autogenerate development header-dependencies (config.h, *.priv.h)
+ + corrected single-column formatting of "use=" (e.g., in tic)
+ + modify tic to read full terminfo-names
+ + corrected divide-by-zero that caused hang (or worse) when redirecting
+ output
+ + modify tic to generate directories only as-needed (and corrected
+ instance of use of data from function that had already returned).
+
+### ncurses-1.9.8a -> 1.9.9e
+
+* fixed broken wsyncup()/wysncdown(), as a result wnoutrefresh() now has
+ copy-changed-lines behavior.
+* added and documented wresize() function.
+* more fixes to LOWER-RIGHT corner handling.
+* changed the line-breakout optimization code to allow some lines to be
+ emitted before the first check.
+* added option for tic to use symbolic instead of hard links (for AFS)
+* fix to restore auto-wrap mode.
+* trace level can be controlled by environment variable.
+* better handling of NULs in terminal descriptions.
+* improved compatibility with observed SVR4 behavior.
+* the refresh behavior of over-lapping windows is now more efficient and
+ behaves like SVR4.
+* use autoconf 2.7, which results in a working setup for SCO 5.0.
+* support for ESCDELAY.
+* small fixes for menu/form code.
+* the test directory has its own configure.
+* fixes to pads when optimizing scrolling.
+* fixed several off-by-one bugs.
+* fixes for termcap->terminfo translation; less restrictions more correct
+ behavior.
+
+### ncurses-1.9.7 -> 1.9.8a
+
+* teach infocmp -i to recognize ECMA highlight sequences
+* infocmp now dumps all SVr4 termcaps (not just the SVr4 ones) on -C
+* support infocmp -RBSD.
+* satisfy XSI Curses requirement that every macro be available as a function.
+* This represents the last big change to the public interface of ncurses. The
+ ABI_VERSION has now been set at 3.0 and should stay there barring any great
+ catastrophies or acts of God.
+* The C++ has been cleaned up in reaction to the changes to satisfy XSI's
+ requirements.
+* libncurses now gets linked to libcurses to help seamless emulation
+ (replacement) of a vendor's curses. --disable-overwrite turns this behavior
+ off.
+
+### ncurses-1.9.6 -> 1.9.7
+
+* corrected return values of setupterm()
+* Fixed some bugs in tput (it does padding now)
+* fixed a bug in tic that made it do the wrong thing on entries with more than
+ one `use' capability.
+* corrected the screen-size calculation at startup time to alter the
+ numeric capabilities as per SVr4, not just LINES and COLS.
+* toe(1) introduced; does what infocmp -T used to.
+* tic(1) can now translate AIX box1 and font[0123] capabilities.
+* tic uses much less core, the dotic.sh kluge can go away now.
+* fix read_entry() and write_entry() to pass through cancelled capabilities OK.
+* Add $HOME/.terminfo as source/target directory for terminfo entries.
+* termcap compilation now automatically dumps an entry to $HOME/.terminfo.
+* added -h option to toe(1).
+* added -R option to tic(1) and infocmp(1).
+* added fallback-entry-list feature.
+* added -i option to infocmp(1).
+* do a better job at detecting if we're on SCO.
+
+### ncurses-1.9.5 -> 1.9.6
+
+* handling of TERMCAP environment variables now works correctly.
+* various changes to shorten termcap translations to less that 1024 chars.
+* tset(1) added
+* mouse support for xterm.
+* most data tables are now const and accordingly live in shareable text space.
+* Obey the XPG4/SVr4 practice that echo() is initally off.
+* tic is much better at translating XENIX and AIX termcap entries now.
+* tic can interpret ko capabilities now.
+* integrated Juergen Pfeifer's forms library.
+* taught write_entry() how not to write more than it needs to; this change
+ reduces the size of the terminfo tree by a full 26%!
+* infocmp -T option added.
+* better warnings about historical tic quirks from tic.
+
+### ncurses 1.9.4 -> 1.9.5
+
+* menus library is now included with documentation.
+* lib_mvcur has been carefully profiled and tuned.
+* Fixed a ^Z-handling bug that was tanking lynx(1).
+* HJ Lu's patches for ELF shared libraries under Linux
+* terminfo.src 9.8.2
+* tweaks for compiling in seperate directories.
+* Thomas Dickey's patches to support NeXT's brain-dead linker
+* Eric Raymond's patches to fix problems with long termcap entries.
+* more support for shared libraries under SunOS and IRIX.
+
+### ncurses 1.9.3 -> 1.9.4
+
+* fixed an undefined-order-of-evaluation bug in lib_acs.c
+* systematically gave non-API public functions and data an _nc_ prefix.
+* integrated Juergen Pfeifer's menu code into the distribution.
+* totally rewrote the knight test game's interface
+
+### ncurses 1.9.2c -> 1.9.3
+
+* fixed the TERMCAP_FILE Support.
+* fixed off-by-one errors in scrolling code
+* added tracemunch to the test tools
+* took steps to cut the running time of make install.data
+
+### ncurses 1.9.2c -> 1.9.2d
+
+* revised 'configure' script to produce libraries for normal, debug,
+ profile and shared object models.
+
+### ncurses 1.9.1 -> 1.9.2
+
+* use 'autoconf' to implement 'configure' script.
+* panels support added
+* tic now checks for excessively long termcap entries when doing translation
+* first cut at eliminating namespace pollution.
+
+### ncurses 1.8.9 -> 1.9
+
+* cleanup gcc warnings for the following: use size_t where 'int' is not
+ appropriate, fixed some shadowed variables, change attr_t to compatible with
+ chtype, use attr_t in some places where it was confused with 'int'.
+* use chtype/attr_t casts as appropriate to ensure portability of masking
+ operations.
+* added-back waddchnstr() to lib_addstr.c (it had been deleted).
+* supplied missing prototypes in curses.h
+* include <termcap.h> in lib_termcap.c to ensure that the prototypes
+ are consistent (they weren't).
+* corrected prototype of tputs in <termcap.h>
+* rewrote varargs parsing in lib_tparm.c (to avoid referencing memory
+ that may be out of bounds on the stack) -- Purify found this.
+* ensure that TRACE is defined in lib_trace.c (to solve prototype
+ warnings from gcc).
+* corrected scrolling-region size in 'mvcur_wrap()'
+* more spelling fixes
+* use 'calloc()' to allocate WINDOW struct in lib_newwin.c (Purify).
+* set default value for SP->_ofp in lib_set_term.c (otherwise SunOS dumps
+ core in init_acs()).
+* include <errno.h> in write_entry.c (most "braindead" includes declare errno
+ in that file).
+
+### ncurses 1.8.8 -> 1.8.9
+
+* compile (mostly) clean with gcc 2.5.8 -Wall -Wstrict-prototypes
+ -Wmissing-prototypes -Wconversion and using __attribute__ to flush out
+ non-portable use of "%x" for pointers, or for chtype data (which is declared
+ as a long).
+* modified doupdate to ensure that typahead was turned on before attempting
+ select-call (otherwise, some implementations hang).
+* added trace mask TRACE_FIFO, use this in lib_getch.c to allow finer
+ resolution of traces.
+* improved bounds checking on several critical functions.
+* the data directory has been replaced by the new master terminfo file.
+* -F file-comparison option added to infocmp.
+* compatibility with XSI Curses is now documented in the man bages.
+* wsyncup/wsyncdown functions are reliable now; subwindow code in general
+ is much less flaky.
+* capabilities ~msgr, tilde_glitch, insert_padding, generic_type, no_pad_char,
+ memory_above, memory_below, and hard_copy are now used properly.
+* cursor-movement optimization has been completely rewritten.
+* vertical-movement optimization now uses hardware scrolling, il, dl.
+
+### ncurses 1.8.7 -> 1.8.8
+* untic no longer exists, infocmp replaces it.
+* tic can understand termcap now, especially if it is called captoinfo.
+* The Linux Standard Console terminfo entry is called linux insead of console.
+ It also uses the kernel's new method of changing charsets.
+* initscr() will EXIT upon error (as the docs say) This wil mostly happen if
+ you try to run on an undefined terminal.
+* I can get things running on AIX but tic can't compile terminfo. I have to
+ compile entries on another machine. Volunteers to hunt this bug are welcome.
+* wbkgd() and wbkgdset() can be used to set a windows background to color.
+ wclear()/werase() DO NOT use the current attribute to clear the screen.
+ This is the way SVR4 curses works. PDCurses 2.1 is broken in this respect,
+ though PDCurses 2.2 has been fixed.
+* cleaned up the test/ directory.
+* test/worm will segfault after quite a while.
+* many spelling corrections courtesy of Thomas E. Dickey
+
+### ncurses 1.8.6 -> 1.8.7
+* cleaned up programs in test/ directory.
+* fixed wbkgdset() macro.
+* modified getstr() to stop it from advancing cursor in noecho mode.
+* modified linux terminfo entry to work with the latest kernel to get
+ the correct alternate character set.
+* also added a linux-mono entry for those running on monochrome screens.
+* changed initscr() so that it behaves like the man page says it does.
+ this fixes the problem with programs in test/ crashing with SIGSEV if
+ a terminal is undefined.
+* modified addch() to avoid using any term.h #define's
+* removed duplicate tgoto() in lib_tparm.c
+* modified dump_entry.c so that infocmp deals correctly with ',' in acsc
+* modified delwin() to correctly handle deleting subwindows.
+* fixed Makefile.dist to stop installing an empty curses.h
+* fixed a couple of out-of-date notes in man pages.
+
+### ncurses 1.8.5 -> 1.8.6
+* Implemented wbkgd(), bkgd(), bkgdset(), and wbkgdset().
+* The handling of attributes has been improved and now does not turn off color
+ if other attributes are turned off.
+* scrolling code is improved. Scrolling in subwindows is still broken.
+* Fixes to several bugs that manifest them on platforms other than Linux.
+* The default to meta now depends on the status of the terminal when ncurses
+ is started.
+* The interface to the tracing facility has changed. Instead of the pair of
+ functions traceon() and traceoff(), there is just one function trace() which
+ takes a trace mask argument. The trace masks, defined in curses.h, are
+ as follows:
+
+ #define TRACE_DISABLE 0x00 /* turn off tracing */
+ #define TRACE_ORDINARY 0x01 /* ordinary trace mode */
+ #define TRACE_CHARPUT 0x02 /* also trace all character outputs */
+ #define TRACE_MAXIMUM 0x0f /* maximum trace level */
+
+ More trace masks may be added, or these may be changed, in future releases.
+* The pad code has been improved and the pad test code in test/ncurses.c has
+ been improved.
+* The prototype ansi entry has been changed to work with a wider variety
+ of emulators.
+* Fix to the prototype ansi entry that enables it to work with PC emulators
+ that treat trailing ";m" in a highlight sequence as ";0m"; this doesn't
+ break operation with any emulators.
+* There are now working infocmp, captoinfo, tput, and tclear utilities.
+* tic can now compile entries in termcap syntax.
+* Core-dump bug in pnoutrefresh fixed.
+* We now recognize and compile all the nonstandard capabilities in Ross
+ Ridge's mytinfo package (rendering it obsolete).
+* General cleanup and documentation improvements.
+* Fixes and additions to the installation-documentation files.
+* Take cursor to normal mode on endwin.
+
+### ncurses 1.8.4 -> 1.8.5
+* serious bugs in updating screen which caused erratic non-display,
+ fixed.
+* fixed initialization for getch() related variable which cause
+ unpredictable results.
+* fixed another doupdate bug which only appeared if you have
+ parm_char.
+* implemented redrawln() and redrawwin().
+* implemented winsnstr() and related functions.
+* cleaned up insertln() and deleteln() and implemented (w)insdeln().
+* changed Makefile.dist so that installation of man pages will
+ take note of the terminfo directory.
+* fixed Configure (removed the mysterious 'X').
+* Eric S. Raymond fixed the script.* files so that they work with
+ stock awk.
+
+#### ncurses 1.8.3 -> 1.8.4 #### ####
+* fixed bug in refreshing the screen after return from shell_mode.
+ There are still problems but they don't manifest themselves on
+ my machine (Linux 0.99.14f).
+* added wgetnstr() and modified things accordingly.
+* fixed the script.src script.test to work with awk not just gawk.
+* Configure can now take an argument of the target system.
+* added test/ncurses.c which replaces several other programs and
+ performs more testing.
+[Thanks to Eric S Raymond for the last 4]
+* more fixes to lib_overlay.c and added test/over.c to illustrate
+ how it works.
+* fixed ungetch() to take int instead of ch.
+* fixes to cure wgetch() if flushinp() is called.
+
+One note I forgot to mention in 1.8.3 is that tracing is off by
+default starting in the version. If you want tracing output, put
+traceon(); in your code and link with -ldcurses.
+
+#### ncurses 1.8.2 -> ncurses 1.8.3 #### ####
+MAJOR CHANGES:
+1) The order of capabilities has been changed in order to achieve
+binary compatibility with SVR4 terminfo database. This has the
+unfortunate effect of breaking application currently linked with
+ncurses. To ensure correct behavior, recompile all such programs.
+Most programs using color or newer capabilities will break, others
+will probably continue to work ok.
+
+2) Pavel Curtis has renounced his copyright to the public domain.
+This means that his original sources (posted to comp.sources.unix,
+volume 1) are now in the public domain. The current sources are
+NOT in the public domain, they are copyrighted by me. I'm
+entertaining ideas on what the new terms ncurses is released under.
+
+3) Eric S. Raymond has supplied a complete set of man pages for
+ncurses in ?roff format. They will eventually replace most of the
+current docs. Both sets are included in this release.
+
+Other changes and notes from 1.8.2 include:
+* SIGSEGV during scrolling no longer occurs.
+* Other problems with scrolling and use of idl have been corrected.
+* lib_getch.c has been re-written and should perform flawlessly.
+ please use test/getch.c and any other programs to test this.
+* ripoffline() is implemented (Thanks to Eric) and slk_ functions
+ changed accordingly.
+* I've added support for terminals that scroll if you write in the
+ bottom-right corner.
+* fixed more bugs in pads code. If anybody has a program that uses
+ pads I'd love a copy.
+* correct handling for terminal with back_color_erase capability
+ (such as Linux console, and most PC terminals)
+* ^Z handling apparently didn't work (I should never trust code
+ sent me to me without extensive testing). It now seems to be
+ fixed. Let me know if you have problems.
+* I've added support for Apollo and NeXT, but it may still be
+ incomplete, especially when dealing with the lack of POSIX
+ features.
+* scrolling should be more efficient on terminals with idl
+ capabilities. Please see src/lib_scroll.c for more notes.
+* The line drawing routines were offset by 1 at both ends. This
+ is now fixed.
+* added a few missing prototypes and macros (e.g. setterm())
+* fixed code in src/lib_overlay.c which used to crash.
+* added a few more programs in test/ The ones from the PDCurses
+ package are useful, especially if you have SVR4 proper. I'm
+ interested in the results you get on such a systems (Eric? ;-).
+ They already exposed certain bugs in ncurses.
+* See src/README for porting notes.
+* The C++ code should really replace ncurses.h instead of working
+ around it. It should avoid name-space clashes with nterm.h (use
+ rows instead of lines, etc.)
+* The C++ should compile ok. I've added explicit rules to the
+ Makefile because no C++ defaults are documented on the suns.
+* The docs say that echo() and nocbreak() are mutually exclusive.
+ At the moment ncurses will switch to cbreak() if the case above
+ occurs. Should it continue to do so? How about echo() and noraw()?
+* PDCurses seem to assume that wclear() will use current attribute
+ when clearing the screen. According to Eric this is not the case
+ with SVR4.
+* I have discovered, to my chagrin, SunOS 4.x (and probably other systems)
+ * doesn't have vsscanf and God knows what else! I've will do a vsscanf().
+* I've also found out that the src/script.* rely on gawk and will not
+ work with stock awk or even with nawk. Any changes are welcome.
+* Linux is more tolerant of NULL dereferences than most systems. This
+ fact was exposed by hanoi.
+* ncurses still seems inefficient in drawing the screen on a serial
+ link between Linux and suns. The padding may be the culprit.
+* There seems to be one lingering problem with doupdate() after shelling
+ out. Despite the fact the it is sending out the correct information
+ to the terminal, nothing takes effect until you press ^L or another
+ refresh takes place. And yes, output does get flushed.
+
+#### ncurses 1.8.1 -> ncurses 1.8.2 #### Nov 28, 1993 ####
+
+* added support for SVR4 and BSDI's BSD/386.
+* major update and fix to scrolling routine.
+* MORE fixes to stuff in lib_getch.c.
+* cleaned-up configuration options and can now generate
+ Config.* files through an awk script.
+* changed setupterm() so it can be called more than once,
+ add added set_curterm(), del_curterm().
+* a few minor cleanups.
+* added more prototypes in curses.h
+
+#### ncurses 1.8 -> ncurses 1.8.1 #### Nov 4, 1993 ####
+
+* added support for NeXTStep 3.0
+* added termcap emulation (not well tested).
+* more complete C++ interface to ncurses.
+* fixed overlay(), overwrite(), and added copywin().
+* a couple of bug fixes.
+* a few code cleanups.
+
+#### ncurses 0.7.2/0.7.3 -> ncurses 1.8 #### Aug 31, 1993 ####
+
+* The annoying message "can't open file." was due to missing
+ terminfo entry for the used terminal. It has now been
+ replaced by a hopefully more helpful message.
+* Problems with running on serial lines are now fixed.
+* Added configuration files for SunOS, Linux, HP/UX, Ultrix,
+ 386bsd/BSDI (if you have others send'em to me)
+* Cleaner Makefile.
+* The documentation in manual.doc is now more uptodate.
+* update optimization and support for hp terminals, and 386bsd
+ console driver(s).
+* mvcur optimization for terminals without cursor addressing
+ (doesn't work on Linux)
+* if cursor moved since last update, getch() will refresh the
+ screen before working.
+* getch() & alarm() can now live together. in 0.7.3 a signal
+ interrupted getch() (bug or feature?) now the getch is
+ restarted.
+* scanw() et all were sick, now fixed.
+* support for 8-bit input (use meta()).
+* added default screen size to all terminfos.
+* added c++ Ncursesw class.
+* several minor bug fixes.
+
+#### ncurses 0.7.2 -> ncurses 0.7.3 #### May 27, 1993 ####
+
+* Config file to cope with different platforms (386BSD, BSDI, Ultrix, SunOS)
+* more fixes to lib_getch.c
+* changes related to Config
+
+#### ncurses 0.7 -> ncurses 0.7.2 #### May 22, 1993 ####
+
+* docs updated slightly (color usage is now documented).
+* yet another fix for getch(), this one fixes problems with ESC being swallowed
+ if another character is typed before the 1 second timeout.
+* Hopefully, addstr() and addch() are 8-bit clean.
+* fixed lib_tparm.c to use stdarg.h (should run on suns now)
+* order of capabilities changed to reflect that specified in SYSV
+ this will allow for binary-compatibility with existing terminfo dbs.
+* added halfdelay()
+* fixed problems with asc_init()
+* added A_PROTECT and A_INVIS
+* cleaned up vidputs()
+* general cleanup of the code
+* more attention to portability to other systems
+* added terminfos for hp70092 (wont work until changes to lib_update.c are
+ made) and 386BSD pcvt drivers.
+
+Thanks to Hellmuth Michaelis for his help.
+optimization code is slated for the next major release, stay tuned!
+
+#### ncurses 0.6/0.61 -> ncurses 0.7 #### April 1, 1993
+Please note that the next release will be called 1.8. If you want to know about
+the rationale drop me a line.
+
+Included are several test programs in test/.
+I've split up the panels library, reversi, tetris, sokoban. They are now
+available separately from netcom.com:pub/zmbenhal/
+
+* color and ACS support is now fully compatible with SYSV at the terminfo
+ level.
+* Capabilities now includes as many SYSV caps I could find.
+* tigetflag,tigetnum,tigetstr functions added.
+* boolnames, boolfnames, boolcodes numnames, numfnames, numcodes,
+ strnames, strfnames, strcodes arrays are now added.
+* keyname() is added.
+* All function keys can be defined in terminfo entries.
+* fixed lin_tparm.c to behave properly.
+* terminfo entries for vt* and xterm are included (improvements are welcome)
+* more automation in handling caps and keys.
+* included fixes from 0.6.1
+* added a few more missing functions.
+* fixed a couple of minor bugs.
+* updated docs JUST a little (still miles behind in documenting the newer
+ features).
+
+#### ncurses 0.6 -> ncurses 0.61 ####
+
+1) Included the missing data/console.
+
+2) allow attributes when drawing boxes.
+
+3) corrected usage of win->_delay value.
+
+4) fixed a bug in lib_getch.c. if it didn't recognize a sequence it would
+ simply return the last character in the sequence. The correct
+ behavior is to return the entire sequence one character at a time.
+
+#### ncurses0.5 -> ncurses0.6 #### March 1, 1993 ####
+* removed _numchngd from struct _win_st and made appropriate changes.
+* rewritten kgetch() to remove problems with interaction between alarm and
+ read(). It caused SIGSEGV every now and then.
+* fixed a bug that miscounted the numbers of columns when updating.
+ (in lib_doupdate.c(ClrUpdate() -- iterate to columns not columns-1)
+* fixed a bug that cause the lower-right corner to be incorrect.
+ (in lib_doupdate.c(putChar() -- check against columns not columns-1)
+* made resize() and cleanup() static to lib_newterm.c
+* added notimeout().
+* added timeout() define in curses.h
+* added more function prototypes and fixed napms.
+* added use_env().
+* moved screen size detection to lib_setup.c.
+* fixed newterm() to confirm to prototype.
+* removed SIGWINCH support as SYSV does not define its semantics.
+* cleaned-up lib_touch.c
+* added waddnstr() and relatives.
+* added slk_* support.
+* fixed a bug in wdeleteln().
+* added PANEL library.
+* modified Makefile for smoother installation.
+* terminfo.h is really term.h
+
+#### ncurses 0.4 -> ncurses 0.5 #### Feb 14, 1993 ####
+* changed _win_st structure to allow support for missing functionality.
+* Addition of terminfo support for all KEY_*.
+* Support for nodelay(), timeout(), notimeout().
+* fixed a bug with the keypad char reading that did not return ESC until
+ another key is pressed.
+* nl mapping no longer occur on output (as should be)
+ fixed bug '\n' no causing a LF.
+* fixed bug that reset terminal colors regardless of whether we use color
+ or not.
+* Better support for ACS (not quite complete).
+* fixed bug in wvline().
+* added curs_set().
+* changed from signal() to sigaction().
+* re-included the contents of important.patch into source.
+
+#### ncurses 0.3 -> ncurses 0.4 #### Feb 3, 1993 ####
+* Addition of more KEY_* definitions.
+* Addition of function prototypes.
+* Addition of several missing functions.
+* No more crashes if screen size is undefined (use SIGWINCH handler).
+* added a handler to cleanup after SIGSEGV (hopefully never needed).
+* changed SRCDIR from /etc/term to /usr/lib/terminfo.
+* renamed compile/dump to tic/untic.
+* New scrolling code.
+* fixed bug that reversed the sense of nl() and nonl().
+
+#### ncurses 0.2 -> ncurses 0.3 #### Jan 20, 1993 ####
+* more support for color and graphics see test/ for examples.
+* fixed various files to allow correct update after shelling out.
+* more fixes for updates.
+* no more core dumps if you don't have a terminfo entry.
+* support for LINES and COLUMNS environment variables.
+* support for SIGWINCH signal.
+* added a handler for SIGINT for clean exits.
+
+#### ncurses 0.1 -> ncurses 0.2 #### Aug 14, 1992 ####
+* support for color.
+* support for PC graphic characters.
+* lib_trace.c updated to use stdarg.h and vprintf routines.
+* added gdc.c (Great Digital Clock) as an example of using color.
+
+#### ncurses -> ncurses 0.1 #### Jul 31, 1992 ####
+* replacing sgtty stuff by termios stuff.
+* ANSIfication of some functions.
+* Disabling cost analysis 'cause it's incorrect.
+* A quick hack for a terminfo entry.
diff --git a/Build/source/libs/ncurses/README b/Build/source/libs/ncurses/README
new file mode 100644
index 00000000000..37cb8d2b5c1
--- /dev/null
+++ b/Build/source/libs/ncurses/README
@@ -0,0 +1,183 @@
+-- $Id: README,v 1.22 2004/08/07 23:42:43 tom Exp $
+-------------------------------------------------------------------------------
+ README file for the ncurses package
+
+See the file ANNOUNCE for a summary of ncurses features and ports.
+See the file INSTALL for instructions on how to build and install ncurses.
+See the file NEWS for a release history and bug-fix notes.
+See the file TO-DO for things that still need doing, including known bugs.
+
+Browse the file misc/ncurses-intro.html for narrative descriptions of how
+to use ncurses and the panel, menu, and form libraries.
+
+Browse the file doc/html/hackguide.html for a tour of the package internals.
+
+ROADMAP AND PACKAGE OVERVIEW:
+
+You should be reading this file in a directory called: ncurses-d.d, where d.d
+is the current version number (see the dist.mk file in this directory for
+that). There should be a number of subdirectories, including `c++', `form',
+`man', `menu', `misc', `ncurses', `panel', `progs', `test', 'tack' and `Ada95'.
+(The 'tack' program may be distributed separately).
+
+A full build/install of this package typically installs several libraries, a
+handful of utilities, and a database hierarchy. Here is an inventory of the
+pieces:
+
+The libraries are:
+
+ libncurses.a (normal)
+ libncurses.so (shared)
+ libncurses_g.a (debug and trace code enabled)
+ libncurses_p.a (profiling enabled)
+
+ libpanel.a (normal)
+ libpanel.so (shared)
+ libpanel_g.a (debug and trace code enabled)
+
+ libmenu.a (normal)
+ libmenu.so (shared)
+ libmenu_g.a (debug enabled)
+
+ libform.a (normal)
+ libform.so (shared)
+ libform_g.a (debug enabled)
+
+If you configure using the --enable-widec option, a "w" is appended to the
+library names (e.g., libncursesw.a), and the resulting libraries support
+wide-characters, e.g., via a UTF-8 locale. The corresponding header files
+are compatible with the non-wide-character configuration; wide-character
+features are provided by ifdef's in the header files. The wide-character
+library interfaces are not binary-compatible with the non-wide-character
+version.
+
+The ncurses libraries implement the curses API. The panel, menu and forms
+libraries implement clones of the SVr4 panel, menu and forms APIs. The source
+code for these lives in the `ncurses', `panel', `menu', and `form' directories
+respectively.
+
+In the `c++' directory, you'll find code that defines an interface to the
+curses, forms, menus and panels library packaged as C++ classes, and a demo program in C++
+to test it. These class definition modules are not installed by the 'make
+install.libs' rule as libncurses++.
+
+In the `Ada95' directory, you'll find code and documentation for an
+Ada95 binding of the curses API, to be used with the GNAT compiler.
+This binding is built by a normal top-level `make' if configure detects
+an usable version of GNAT (3.11 or above). It is not installed automatically.
+See the Ada95 directory for more build and installation instructions and
+for documentation of the binding.
+
+To do its job, the ncurses code needs your terminal type to be set in the
+environment variable TERM (normally set by your OS; under UNIX, getty(1)
+typically does this, but you can override it in your .profile); and, it needs a
+database of terminal descriptions in which to look up your terminal type's
+capabilities.
+
+In older (V7/BSD) versions of curses, the database was a flat text file,
+/etc/termcap; in newer (USG/USL) versions, the database is a hierarchy of
+fast-loading binary description blocks under /usr/lib/terminfo. These binary
+blocks are compiled from an improved editable text representation called
+`terminfo' format (documented in man/terminfo.5). The ncurses library can use
+either /etc/termcap or the compiled binary terminfo blocks, but prefers the
+second form.
+
+In the `misc' directory, there is a text file terminfo.src, in editable
+terminfo format, which can be used to generate the terminfo binaries (that's
+what make install.data does). If the package was built with the
+--enable-termcap option enabled, and the ncurses library cannot find a terminfo
+description for your terminal, it will fall back to the termcap file supplied
+with your system (which the ncurses package installation leaves strictly
+alone).
+
+The utilities are as follows:
+
+ tic -- terminfo source to binary compiler
+ infocmp -- terminfo binary to source decompiler/comparator
+ clear -- emits clear-screen for current terminal
+ tput -- shell-script access to terminal capabilities.
+ toe -- table of entries utility
+ tset -- terminal-initialization utility
+
+The first two (tic and infocmp) are used for manipulating terminfo
+descriptions; the next two (clear and tput) are for use in shell scripts. The
+last (tset) is provided for 4.4BSD compatibility. The source code for all of
+these lives in the `progs' directory.
+
+Detailed documentation for all libraries and utilities can be found in the
+`man' and `doc' directories. An HTML introduction to ncurses, panels, and
+menus programming lives in the `doc/html' directory. Manpages in HTML format
+are under `doc/html/man'.
+
+The `test' directory contains programs that can be used to verify or
+demonstrate the functions of the ncurses libraries. See test/README for
+descriptions of these programs. Notably, the `ncurses' utility is designed to
+help you systematically exercise the library functions.
+
+AUTHORS:
+
+Pavel Curtis:
+ wrote the original ncurses
+
+Zeyd M. Ben-Halim:
+ port of original to Linux and many enhancements.
+
+Thomas Dickey (maintainer for 1.9.9g through 4.1, resuming with FSF's 5.0):
+ configuration scripts, porting, mods to adhere to XSI Curses in the
+ areas of background color, terminal modes. Also memory leak testing,
+ the wresize, default colors and key definition extensions and numerous
+ bug fixes (more than half of those enumerated in NEWS beginning with
+ the internal release 1.8.9).
+
+Florian La Roche (official maintainer for FSF's ncurses 4.2)
+ Beginning with release 4.2, ncurses is distributed under an MIT-style
+ license.
+
+Eric S. Raymond:
+ the man pages, infocmp(1), tput(1), clear(1), captoinfo(1), tset(1),
+ toe(1), most of tic(1), trace levels, the HTML intro, wgetnstr() and
+ many other entry points, the cursor-movement optimization, the
+ scroll-pack optimizer for vertical motions, the mouse interface and
+ xterm mouse support, and the ncurses test program.
+
+Juergen Pfeifer
+ The menu and form libraries, C++ bindings for ncurses, menus, forms and
+ panels, as well as the Ada95 binding. Ongoing support for panel.
+
+CONTRIBUTORS:
+
+Alexander V. Lukyanov
+ for numerous fixes and improvements to the optimization logic.
+
+David MacKenzie
+ for first-class bug-chasing and methodical testing.
+
+Ross Ridge
+ for the code that hacks termcap parameterized strings into terminfo.
+
+Warren Tucker and Gerhard Fuernkranz,
+ for writing and sending the panel library.
+
+Hellmuth Michaelis,
+ for many patches and testing the optimization code.
+
+Eric Newton, Ulrich Drepper, and Anatoly Ivasyuk:
+ the C++ code.
+
+Jonathan Ross,
+ for lessons in using sed.
+
+Keith Bostic (maintainer of 4.4BSD curses)
+ for help, criticism, comments, bug-finding, and being willing to
+ deep-six BSD curses for this one when it grew up.
+
+Richard Stallman,
+ for his commitment to making ncurses free software.
+
+Countless other people have contributed by reporting bugs, sending fixes,
+suggesting improvements, and generally whining about ncurses :-)
+
+BUGS:
+ See the INSTALL file for bug and developer-list addresses.
+ The Hacker's Guide in the doc directory includes some guidelines
+ on how to report bugs in ways that will get them fixed most quickly.
diff --git a/Build/source/libs/ncurses/README.emx b/Build/source/libs/ncurses/README.emx
new file mode 100644
index 00000000000..0605e67bd44
--- /dev/null
+++ b/Build/source/libs/ncurses/README.emx
@@ -0,0 +1,45 @@
+-- $Id: README.emx,v 1.6 2002/09/07 17:03:19 tom Exp $
+-- Author: Thomas Dickey
+-------------------------------------------------------------------------------
+
+You can build ncurses on OS/2 in the EMX environment. But you must build and
+acquire tools. Not all of the tools distributed with EMX work properly, and
+some additional ones are required.
+
+First, the configure script distributed with ncurses will not run as-is in EMX.
+You can generate a new one if you have autoconf built for EMX. You will need
+the EMX development tools, of course. Get these programs to start:
+
+ GNU m4 program (version 1.4)
+ GNU autoconf (version 2.13).
+ GNU patch (version 2.5)
+
+Apply the autoconf patches from
+
+ http://invisible-island.net/autoconf
+ ftp://invisible-island.net/autoconf
+
+These are ordered by date:
+
+ autoconf-2.13-20020210.patch.gz
+ autoconf-2.13-20020210-emx.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,
+using a similar environment (he prefers using the 'ash' shell). Newer versions
+may fix these problems:
+
+ + The pdksh program distributed at Hobbes and Leo (with a 1996 date) is
+ defective. It does not process "here documents" correctly (which
+ renders it useless for running the autoconf script). I built my own
+ copy of pdksh 5.2.13, which does have the bug corrected (documented
+ in the change log for pdksh).
+
+ + I also built from sources (because the distributed binaries did not
+ work) the cmp, diff programs.
+
+ Other required utilities such as ar, cat, chmod, cp, gawk, grep, mv,
+ ls, rm, mkdir, sed, sort and tr worked.
+
+Once you have autoconf patched and installed, run 'autoconf' from the top-level
+directory of ncurses to generate the EMX-specific configure script.
diff --git a/Build/source/libs/ncurses/TO-DO b/Build/source/libs/ncurses/TO-DO
new file mode 100644
index 00000000000..928689723e1
--- /dev/null
+++ b/Build/source/libs/ncurses/TO-DO
@@ -0,0 +1,173 @@
+-- $Id: TO-DO,v 1.44 2004/03/07 02:04:20 tom Exp $
+
+SHORT-TERM TO-DO ITEMS:
+
+Known Problems:
+
+* The form/menu libraries do not use wide-character features.
+
+* libtool does not work with GNAT.
+
+* The screen optimization has been tested only in an ad hoc manner. We should
+ develop a good set of regression tests to cover lib_doupdate.c and
+ lib_mvcur.c.
+
+* Magic cookie support does not work, since the logic does not take into account
+ refresh. Also, the initial optimize does not adjust the current location
+ when a cookie is emitted.
+
+* Scrolling optimization has holes: for example, it forces repaints of the
+ screen between calls to refresh().
+
+* SVr4 uses slightly different rules for determining when softkeys are shown.
+ For example, they are initially displayed (before the ncurses 'e' test
+ activates them), and a touchwin can apparently also force them to be
+ displayed.
+
+* The code departs from perfect 8-bit cleanness in one respect; you cannot
+ specify a character \200 as part of a capability string, because the terminfo
+ library interprets \200 as a request to embed NUL (\000) at that point. This
+ is a legacy terminfo property we can't mess with.
+
+* The window classes defined in the c++ subdirectory need documentation.
+ Some C++ programmer could earn a lot of good karma by doing this...
+
+* The resizeterm() function does not handle ripped-off lines such as that
+ done for the slk_XXX functions.
+
+Portability (or lack thereof):
+
+* Users of older System V UNIXes (but not Solaris, and probably not SVr4)
+ may trip over a known problem with the signal-handling code which causes
+ abrupt termination of ncurses applications following resume from a ^Z
+ suspend (this problem was first seen running lynx). You will not see
+ this problem if you are running Linux or one of the 4.4BSD derivatives
+ like FreeBSD, NetBSD, or BSDI. For details, see the analysis in the
+ header comment of ncurses/tty/lib_tstp.c .
+
+* In theory, vwprintw and vwscanf are supposed to use the older varargs.h
+ interface for handling variadic argument lists. Linux doesn't have
+ varargs.h, it has the newer X/Open-standard stdargs.h equivalent. So
+ these functions use stdargs instead. This is unlikely to be a problem
+ unless you're building ncurses on a System V old enough to only have
+ varargs.h. (Solaris 2.5.1 uses the stdarg.h binding as well).
+
+* If you're using a BSD earlier than 4.4BSD, or a Linux old enough not to
+ have a native vsscanf(3) in its library, vwscanw() will not work. You lose.
+ (It should work on any System V, however). If you want to fix this, add
+ an implementation to ncurses/vsscanf.c.
+
+* The C++ binding fails to build with a few C++ compilers, mainly with
+ configure script problems with vsscanf().
+
+* terminfo.5 does not format with the SunOS (and most other platform's) tbl
+ utility because it relies on a diversion for each table entry. Get the groff
+ package.
+
+Untested features:
+
+* The code for the HP color model using set_color_pair is untested.
+
+* The code for handling soft labels on a terminal type with built-in support
+ for them (num_labels > 0, label_height, label_width, label_format, label_off,
+ label_on, plab_norm, lab_f*) has not been tested. The label_format and
+ lab_f* capabilities aren't presently used.
+
+LONGER-TERM TO-DO ITEMS:
+
+1. Extended COSE conformance
+
+There is an XPG4 standard recently released which describes a superset
+of the SVr4 API. The library is BASE conformant with this standard.
+We would like to make ncurses fully conformant at the EXTENDED level
+supporting internationalization.
+
+2. DOS port
+
+Only 16 of the 55 files in the library depend on the terminfo format.
+It should be possible to further kernelize the package, then rewrite
+a small number of core files to produce a functionally-compatible
+port that would do updates to a memory-mapped screen area. The first
+result of this would be a DOS port.
+
+3. X port
+
+It would be nice if ncurses could recognize when it was running under X and
+maintain its own window. With this feature, all ncurses programs would
+automatically become X programs. The challenge is to handle resize events
+properly.
+
+4. Unused capabilities
+
+The currently unused capabilities fall naturally into several groups:
+
+A. Status-line capabilities:
+
+ Booleans: has_status_line, status_line_esc_ok.
+ Numerics: width_status_line.
+ Strings: dis_status_line, from_status_line, to_status_line.
+
+System V Release 1 curses made no use of these at all. SVr4's use, if
+any, is unknown. From the AT&T termcap file it looks like curses, in general,
+shouldn't use them; terminal variants with status lines have their line count
+decremented by 1, suggesting that curses is supposed to leave the status line
+alone.
+
+B. Printer capabilities:
+
+ Boolean: col_addr_glitch, cr_cancels_micro_mode, has_print_wheel,
+ row_addr_glitch, semi_auto_right_margin, cpi_changes_res,
+ lpi_changes_res.
+ Numeric: buffer_capacity, dot_horz_spacing, dot_vert_spacing,
+ max_micro_address, max_micro_jump, micro_col_size,
+ micro_line_size, number_of_pins, output_res_char,
+ output_res_line, output_res_horz_inch, print_rate,
+ wide_char_size, bit_image_entwining, bit_image_type.
+ String: down_half_line, form_feed, up_half_line, set_left_margin,
+ set_right_margin, clear_margins, change_char_pitch
+ ... set_page_length (all the SVr4 printer caps),
+
+Curses doesn't use these.
+
+C. Printer-control capabilities:
+
+ Boolean: prtr_silent.
+ Strings: print_screen, prtr_on, prtr_off, prtr_non.
+
+Curses doesn't use these.
+
+D. Dialer strings:
+
+ Strings: hangup, dial_phone, quick_dial, tone, pulse, flash_hook,
+ fixed_pause, wait_tone.
+
+Curses doesn't use these.
+
+E. Window and virtual-terminal capabilities:
+
+ Numerics: maximum_windows, virtual_terminal.
+ Strings: req_for_input, create_window, goto_window, set_window.
+
+These seem to be fossils from some AT&T experiments on character-based
+window systems that never escaped the lab. The virtual_terminal cap had
+something to do with building terminal emulations into tty line disciplines.
+
+F. Unused VDT capabilities:
+
+ Booleans: erase_overstrike, has_meta_key, insert_null_glitch,
+ move_insert, dest_tabs_magic_smso, transparent_underline,
+ needs_xon_xoff, hard_cursor.
+ Numerics: lines_of_memory, buttons.
+ Strings: pkey_key, pkey_local, pkey_xmit, underline_char,
+ enter_xon_mode, exit_xon_mode, xon_character, xoff_character,
+ display_clock, remove_clock, user[0-5], display_pc_char,
+ enter_scancode_mode, exit_scancode_mode, pc_term_options,
+ scancode_escape, alt_scancode_esc.
+
+These are the potentially important ones for ncurses. Notes:
+
+ i) ncurses doesn't need move_insert; it never uses cup/hpa/vpa while
+ insert_mode is on.
+
+ ii) We probably don't care about dest_tabs_magic_smso; only
+ Telerays used it and they're all long obsolete.
diff --git a/Build/source/libs/ncurses/aclocal.m4 b/Build/source/libs/ncurses/aclocal.m4
new file mode 100644
index 00000000000..b91475c74ee
--- /dev/null
+++ b/Build/source/libs/ncurses/aclocal.m4
@@ -0,0 +1,4022 @@
+dnl***************************************************************************
+dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+dnl *
+dnl Permission is hereby granted, free of charge, to any person obtaining a *
+dnl copy of this software and associated documentation files (the *
+dnl "Software"), to deal in the Software without restriction, including *
+dnl without limitation the rights to use, copy, modify, merge, publish, *
+dnl distribute, distribute with modifications, sublicense, and/or sell *
+dnl copies of the Software, and to permit persons to whom the Software is *
+dnl furnished to do so, subject to the following conditions: *
+dnl *
+dnl The above copyright notice and this permission notice shall be included *
+dnl in all copies or substantial portions of the Software. *
+dnl *
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+dnl *
+dnl Except as contained in this notice, the name(s) of the above copyright *
+dnl holders shall not be used in advertising or otherwise to promote the *
+dnl sale, use or other dealings in this Software without prior written *
+dnl authorization. *
+dnl***************************************************************************
+dnl
+dnl Author: Thomas E. Dickey 1995-2004
+dnl
+dnl $Id: aclocal.m4,v 1.344 2004/10/09 16:45:50 tom Exp $
+dnl Macros used in NCURSES auto-configuration script.
+dnl
+dnl See http://invisible-island.net/autoconf/ for additional information.
+dnl
+dnl ---------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
+dnl AM_LANGINFO_CODESET version: 3 updated: 2002/10/27 23:21:42
+dnl -------------------
+dnl Inserted as requested by gettext 0.10.40
+dnl File from /usr/share/aclocal
+dnl codeset.m4
+dnl ====================
+dnl serial AM1
+dnl
+dnl From Bruno Haible.
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADA_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15
+dnl -------------------
+dnl Construct the list of include-options for the C programs in the Ada95
+dnl binding.
+AC_DEFUN([CF_ADA_INCLUDE_DIRS],
+[
+ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
+if test "$srcdir" != "."; then
+ ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
+fi
+if test "$GCC" != yes; then
+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test $prefix != /usr ; then
+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
+ fi
+ else
+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
+ fi
+fi
+AC_SUBST(ACPPFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30
+dnl -------------
+dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
+dnl The second parameter if given makes this macro verbose.
+dnl
+dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
+dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
+dnl confused by the quotes (which require backslashes to keep them usable).
+AC_DEFUN([CF_ADD_CFLAGS],
+[
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $1
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+ ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+ ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
+ CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+ ifelse($2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+AC_SUBST(EXTRA_CPPFLAGS)
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
+dnl ----------------
+dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
+dnl in the sharutils 4.2 distribution.
+AC_DEFUN([CF_ANSI_CC_CHECK],
+[
+AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[
+cf_cv_ansi_cc=no
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX -Aa -D_HPUX_SOURCE
+# SVR4 -Xc
+# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
+for cf_arg in "-DCC_HAS_PROTOS" \
+ "" \
+ -qlanglvl=ansi \
+ -std1 \
+ -Ae \
+ "-Aa -D_HPUX_SOURCE" \
+ -Xc
+do
+ CF_ADD_CFLAGS($cf_arg)
+ AC_TRY_COMPILE(
+[
+#ifndef CC_HAS_PROTOS
+#if !defined(__STDC__) || (__STDC__ != 1)
+choke me
+#endif
+#endif
+],[
+ int test (int i, double x);
+ struct s1 {int (*f) (int a);};
+ struct s2 {int (*f) (double a);};],
+ [cf_cv_ansi_cc="$cf_arg"; break])
+done
+CFLAGS="$cf_save_CFLAGS"
+CPPFLAGS="$cf_save_CPPFLAGS"
+])
+
+if test "$cf_cv_ansi_cc" != "no"; then
+if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+ CF_ADD_CFLAGS($cf_cv_ansi_cc)
+else
+ AC_DEFINE(CC_HAS_PROTOS)
+fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ANSI_CC_REQD version: 3 updated: 1997/09/06 13:40:44
+dnl ---------------
+dnl For programs that must use an ANSI compiler, obtain compiler options that
+dnl will make it recognize prototypes. We'll do preprocessor checks in other
+dnl macros, since tools such as unproto can fake prototypes, but only part of
+dnl the preprocessor.
+AC_DEFUN([CF_ANSI_CC_REQD],
+[AC_REQUIRE([CF_ANSI_CC_CHECK])
+if test "$cf_cv_ansi_cc" = "no"; then
+ AC_ERROR(
+[Your compiler does not appear to recognize prototypes.
+You have the following choices:
+ a. adjust your compiler options
+ b. get an up-to-date compiler
+ c. use a wrapper such as unproto])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18
+dnl ------------
+dnl Test if 'bool' is a builtin type in the configured C++ compiler. Some
+dnl older compilers (e.g., gcc 2.5.8) don't support 'bool' directly; gcc
+dnl 2.6.3 does, in anticipation of the ANSI C++ standard.
+dnl
+dnl Treat the configuration-variable specially here, since we're directly
+dnl substituting its value (i.e., 1/0).
+dnl
+dnl $1 is the shell variable to store the result in, if not $cv_cv_builtin_bool
+AC_DEFUN([CF_BOOL_DECL],
+[
+AC_MSG_CHECKING(if we should include stdbool.h)
+
+AC_CACHE_VAL(cf_cv_header_stdbool_h,[
+ AC_TRY_COMPILE([],[bool foo = false],
+ [cf_cv_header_stdbool_h=0],
+ [AC_TRY_COMPILE([
+#ifndef __BEOS__
+#include <stdbool.h>
+#endif
+],[bool foo = false],
+ [cf_cv_header_stdbool_h=1],
+ [cf_cv_header_stdbool_h=0])])])
+
+if test "$cf_cv_header_stdbool_h" = 1
+then AC_MSG_RESULT(yes)
+else AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING([for builtin bool type])
+
+AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[
+ AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+],[bool x = false],
+ [ifelse($1,,cf_cv_builtin_bool,[$1])=1],
+ [ifelse($1,,cf_cv_builtin_bool,[$1])=0])
+ ])
+
+if test "$ifelse($1,,cf_cv_builtin_bool,[$1])" = 1
+then AC_MSG_RESULT(yes)
+else AC_MSG_RESULT(no)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_BOOL_SIZE version: 10 updated: 2002/02/23 20:38:31
+dnl ------------
+dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type).
+dnl Don't bother looking for bool.h, since it's been deprecated.
+dnl
+dnl If the current compiler is C rather than C++, we get the bool definition
+dnl from <stdbool.h>.
+AC_DEFUN([CF_BOOL_SIZE],
+[
+AC_MSG_CHECKING([for size of bool])
+AC_CACHE_VAL(cf_cv_type_of_bool,[
+ rm -f cf_test.out
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined(__cplusplus)
+
+#ifdef HAVE_GXX_BUILTIN_H
+#include <g++/builtin.h>
+#elif HAVE_GPP_BUILTIN_H
+#include <gpp/builtin.h>
+#elif HAVE_BUILTIN_H
+#include <builtin.h>
+#endif
+
+#else
+
+#if $cf_cv_header_stdbool_h
+#include <stdbool.h>
+#endif
+
+#endif
+
+main()
+{
+ FILE *fp = fopen("cf_test.out", "w");
+ if (fp != 0) {
+ bool x = true;
+ if ((bool)(-x) >= 0)
+ fputs("unsigned ", fp);
+ if (sizeof(x) == sizeof(int)) fputs("int", fp);
+ else if (sizeof(x) == sizeof(char)) fputs("char", fp);
+ else if (sizeof(x) == sizeof(short))fputs("short",fp);
+ else if (sizeof(x) == sizeof(long)) fputs("long", fp);
+ fclose(fp);
+ }
+ exit(0);
+}
+ ],
+ [cf_cv_type_of_bool=`cat cf_test.out`
+ if test -z "$cf_cv_type_of_bool"; then
+ cf_cv_type_of_bool=unknown
+ fi],
+ [cf_cv_type_of_bool=unknown],
+ [cf_cv_type_of_bool=unknown])
+ ])
+ rm -f cf_test.out
+AC_MSG_RESULT($cf_cv_type_of_bool)
+if test "$cf_cv_type_of_bool" = unknown ; then
+ case .$NCURSES_BOOL in #(vi
+ .auto|.) NCURSES_BOOL=unsigned;;
+ esac
+ AC_MSG_WARN(Assuming $NCURSES_BOOL for type of bool)
+ cf_cv_type_of_bool=$NCURSES_BOOL
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_BUILD_CC version: 3 updated: 2004/02/17 20:55:59
+dnl -----------
+dnl If we're cross-compiling, allow the user to override the tools and their
+dnl options. The configure script is oriented toward identifying the host
+dnl compiler, etc., but we need a build compiler to generate parts of the
+dnl source.
+dnl
+dnl $1 = default for $CPPFLAGS
+dnl $2 = default for $LIBS
+AC_DEFUN([CF_BUILD_CC],[
+AC_REQUIRE([CF_PROG_EXT])
+if test "$cross_compiling" = yes ; then
+ # defaults that we might want to override
+ : ${BUILD_CC=`echo '$(CC)'`}
+ : ${BUILD_CPP=`echo '$(CC) -E'`}
+ : ${BUILD_CFLAGS=}
+ : ${BUILD_CPPFLAGS=`echo 'ifelse([$1],,,[$1])'`}
+ : ${BUILD_LDFLAGS=}
+ : ${BUILD_LIBS=`echo 'ifelse([$2],,,[$2])'`}
+ : ${BUILD_EXEEXT=`echo '$x'`}
+ : ${BUILD_OBJEXT=`echo 'o'`}
+ AC_ARG_WITH(build-cc,
+ [ --with-build-cc=XXX the build C compiler ($BUILD_CC)],
+ [BUILD_CC="$withval"],
+ [AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)])
+ AC_ARG_WITH(build-cpp,
+ [ --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)],
+ [BUILD_CPP="$withval"],
+ [BUILD_CPP='$(CC) -E'])
+ AC_ARG_WITH(build-cflags,
+ [ --with-build-cflags=XXX the build C compiler-flags],
+ [BUILD_CFLAGS="$withval"])
+ AC_ARG_WITH(build-cppflags,
+ [ --with-build-cppflags=XXX the build C preprocessor-flags],
+ [BUILD_CPPFLAGS="$withval"])
+ AC_ARG_WITH(build-ldflags,
+ [ --with-build-ldflags=XXX the build linker-flags],
+ [BUILD_LDFLAGS="$withval"])
+ AC_ARG_WITH(build-libs,
+ [ --with-build-libs=XXX the build libraries],
+ [BUILD_LIBS="$withval"])
+ # this assumes we're on Unix.
+ BUILD_EXEEXT=
+ BUILD_OBJEXT=o
+else
+ : ${BUILD_CC=`echo '$(CC)'`}
+ : ${BUILD_CPP=`echo '$(CPP)'`}
+ : ${BUILD_CFLAGS=`echo '$(CFLAGS)'`}
+ : ${BUILD_CPPFLAGS=`echo '$(CPPFLAGS)'`}
+ : ${BUILD_LDFLAGS=`echo '$(LDFLAGS)'`}
+ : ${BUILD_LIBS=`echo '$(LIBS)'`}
+ : ${BUILD_EXEEXT=`echo '$x'`}
+ : ${BUILD_OBJEXT=`echo 'o'`}
+fi
+
+AC_SUBST(BUILD_CC)
+AC_SUBST(BUILD_CPP)
+AC_SUBST(BUILD_CFLAGS)
+AC_SUBST(BUILD_CPPFLAGS)
+AC_SUBST(BUILD_LDFLAGS)
+AC_SUBST(BUILD_LIBS)
+AC_SUBST(BUILD_EXEEXT)
+AC_SUBST(BUILD_OBJEXT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CFG_DEFAULTS version: 6 updated: 2003/07/12 15:15:19
+dnl ---------------
+dnl Determine the default configuration into which we'll install ncurses. This
+dnl can be overridden by the user's command-line options. There's two items to
+dnl look for:
+dnl 1. the prefix (e.g., /usr)
+dnl 2. the header files (e.g., /usr/include/ncurses)
+dnl We'll look for a previous installation of ncurses and use the same defaults.
+dnl
+dnl We don't use AC_PREFIX_DEFAULT, because it gets evaluated too soon, and
+dnl we don't use AC_PREFIX_PROGRAM, because we cannot distinguish ncurses's
+dnl programs from a vendor's.
+AC_DEFUN([CF_CFG_DEFAULTS],
+[
+AC_MSG_CHECKING(for prefix)
+if test "x$prefix" = "xNONE" ; then
+ case "$cf_cv_system_name" in
+ # non-vendor systems don't have a conflict
+ openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
+ prefix=/usr
+ ;;
+ *) prefix=$ac_default_prefix
+ ;;
+ esac
+fi
+AC_MSG_RESULT($prefix)
+
+if test "x$prefix" = "xNONE" ; then
+AC_MSG_CHECKING(for default include-directory)
+test -n "$verbose" && echo 1>&AC_FD_MSG
+for cf_symbol in \
+ $includedir \
+ $includedir/ncurses \
+ $prefix/include \
+ $prefix/include/ncurses \
+ /usr/local/include \
+ /usr/local/include/ncurses \
+ /usr/include \
+ /usr/include/ncurses
+do
+ cf_dir=`eval echo $cf_symbol`
+ if test -f $cf_dir/curses.h ; then
+ if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
+ includedir="$cf_symbol"
+ test -n "$verbose" && echo $ac_n " found " 1>&AC_FD_MSG
+ break
+ fi
+ fi
+ test -n "$verbose" && echo " tested $cf_dir" 1>&AC_FD_MSG
+done
+AC_MSG_RESULT($includedir)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CGETENT version: 3 updated: 2000/08/12 23:18:52
+dnl ----------
+dnl Check if the terminal-capability database functions are available. If not,
+dnl ncurses has a much-reduced version.
+AC_DEFUN([CF_CGETENT],[
+AC_MSG_CHECKING(for terminal-capability database functions)
+AC_CACHE_VAL(cf_cv_cgetent,[
+AC_TRY_LINK([
+#include <stdlib.h>],[
+ char temp[128];
+ char *buf = temp;
+ char *db_array = temp;
+ cgetent(&buf, /* int *, */ &db_array, "vt100");
+ cgetcap(buf, "tc", '=');
+ cgetmatch(buf, "tc");
+ ],
+ [cf_cv_cgetent=yes],
+ [cf_cv_cgetent=no])
+])
+AC_MSG_RESULT($cf_cv_cgetent)
+test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_CACHE version: 10 updated: 2004/05/23 13:03:31
+dnl --------------
+dnl Check if we're accidentally using a cache from a different machine.
+dnl Derive the system name, as a check for reusing the autoconf cache.
+dnl
+dnl If we've packaged config.guess and config.sub, run that (since it does a
+dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
+dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
+dnl which is useful in cross-compiles.
+dnl
+dnl Note: we would use $ac_config_sub, but that is one of the places where
+dnl autoconf 2.5x broke compatibility with autoconf 2.13
+AC_DEFUN([CF_CHECK_CACHE],
+[
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
+ ifelse([$1],,[AC_CANONICAL_HOST],[$1])
+ system_name="$host_os"
+else
+ system_name="`(uname -s -r) 2>/dev/null`"
+ if test -z "$system_name" ; then
+ system_name="`(hostname) 2>/dev/null`"
+ fi
+fi
+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
+AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+ AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
+ AC_ERROR("Please remove config.cache and try again.")
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_ERRNO version: 9 updated: 2001/12/30 18:03:23
+dnl --------------
+dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g.,
+dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it
+dnl ourselves.
+dnl
+dnl $1 = the name to check
+AC_DEFUN([CF_CHECK_ERRNO],
+[
+AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[
+ AC_TRY_COMPILE([
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/types.h>
+#include <errno.h> ],
+ [long x = (long) $1],
+ [cf_cv_dcl_$1=yes],
+ [cf_cv_dcl_$1=no])
+])
+
+if test "$cf_cv_dcl_$1" = no ; then
+ CF_UPPER(cf_result,decl_$1)
+ AC_DEFINE_UNQUOTED($cf_result)
+fi
+
+# It's possible (for near-UNIX clones) that the data doesn't exist
+CF_CHECK_EXTERN_DATA($1,int)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_EXTERN_DATA version: 3 updated: 2001/12/30 18:03:23
+dnl --------------------
+dnl Check for existence of external data in the current set of libraries. If
+dnl we can modify it, it's real enough.
+dnl $1 = the name to check
+dnl $2 = its type
+AC_DEFUN([CF_CHECK_EXTERN_DATA],
+[
+AC_CACHE_CHECK(if external $1 exists, cf_cv_have_$1,[
+ AC_TRY_LINK([
+#undef $1
+extern $2 $1;
+],
+ [$1 = 2],
+ [cf_cv_have_$1=yes],
+ [cf_cv_have_$1=no])
+])
+
+if test "$cf_cv_have_$1" = yes ; then
+ CF_UPPER(cf_result,have_$1)
+ AC_DEFINE_UNQUOTED($cf_result)
+fi
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18
+dnl -----------------
+dnl Check if the C++ compiler accepts duplicate parameter initialization. This
+dnl is a late feature for the standard and is not in some recent compilers
+dnl (1999/9/11).
+AC_DEFUN([CF_CPP_PARAM_INIT],
+[
+if test -n "$CXX"; then
+AC_CACHE_CHECK(if $CXX accepts parameter initialization,cf_cv_cpp_param_init,[
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_RUN([
+class TEST {
+private:
+ int value;
+public:
+ TEST(int x = 1);
+ ~TEST();
+};
+
+TEST::TEST(int x = 1) // some compilers do not like second initializer
+{
+ value = x;
+}
+void main() { }
+],
+ [cf_cv_cpp_param_init=yes],
+ [cf_cv_cpp_param_init=no],
+ [cf_cv_cpp_param_init=unknown])
+ AC_LANG_RESTORE
+])
+fi
+test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CPP_VSCAN_FUNC version: 5 updated: 2001/12/02 01:39:28
+dnl -----------------
+dnl Check if the g++ compiler supports vscan function (not a standard feature).
+AC_DEFUN([CF_CPP_VSCAN_FUNC],
+[
+if test -n "$CXX"; then
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_CHECK_HEADERS(strstream.h)
+
+AC_CACHE_CHECK(if $CXX supports vscan function,cf_cv_cpp_vscan_func,[
+ for cf_vscan_func in strstream strstream_cast stdio
+ do
+ case $cf_vscan_func in #(vi
+ stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
+ strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
+ strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
+ esac
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <stdarg.h>
+#define $cf_vscan_defs 1
+#if defined(USE_STDIO_VSCAN)
+#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
+#include <strstream.h>
+#endif
+
+int scanw(const char* fmt, ...)
+{
+ int result = -1;
+ char buf[BUFSIZ];
+
+ va_list args;
+ va_start(args, fmt);
+#if defined(USE_STDIO_VSCAN)
+ if (::vsscanf(buf, fmt, args) != -1)
+ result = 0;
+#elif defined(USE_STRSTREAM_VSCAN)
+ strstreambuf ss(buf, sizeof(buf));
+ if (ss.vscan(fmt, args) != -1)
+ result = 0;
+#elif defined(USE_STRSTREAM_VSCAN_CAST)
+ strstreambuf ss(buf, sizeof(buf));
+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
+ result = 0;
+#else
+#error case $cf_vscan_func failed
+#endif
+ va_end(args);
+ return result;
+}
+],[int tmp, foo = scanw("%d", &tmp)],
+ [cf_cv_cpp_vscan_func=$cf_vscan_func; break],
+ [cf_cv_cpp_vscan_func=no])
+ test "$cf_cv_cpp_vscan_func" != no && break
+ done
+])
+
+AC_LANG_RESTORE
+fi
+
+case $cf_cv_cpp_vscan_func in #(vi
+stdio) #(vi
+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
+ AC_DEFINE(USE_STDIO_VSCAN)
+ ;;
+strstream)
+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
+ AC_DEFINE(USE_STRSTREAM_VSCAN)
+ ;;
+strstream_cast)
+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
+ AC_DEFINE(USE_STRSTREAM_VSCAN_CAST)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
+dnl ----------
+dnl "dirname" is not portable, so we fake it with a shell script.
+AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DIRS_TO_MAKE version: 3 updated: 2002/02/23 20:38:31
+dnl ---------------
+AC_DEFUN([CF_DIRS_TO_MAKE],
+[
+DIRS_TO_MAKE="lib"
+for cf_item in $cf_list_models
+do
+ CF_OBJ_SUBDIR($cf_item,cf_subdir)
+ for cf_item2 in $DIRS_TO_MAKE
+ do
+ test $cf_item2 = $cf_subdir && break
+ done
+ test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
+done
+for cf_dir in $DIRS_TO_MAKE
+do
+ test ! -d $cf_dir && mkdir $cf_dir
+done
+AC_SUBST(DIRS_TO_MAKE)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ERRNO version: 5 updated: 1997/11/30 12:44:39
+dnl --------
+dnl Check if 'errno' is declared in <errno.h>
+AC_DEFUN([CF_ERRNO],
+[
+CF_CHECK_ERRNO(errno)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ETIP_DEFINES version: 3 updated: 2003/03/22 19:13:43
+dnl ---------------
+dnl Test for conflicting definitions of exception in gcc 2.8.0, etc., between
+dnl math.h and builtin.h, only for ncurses
+AC_DEFUN([CF_ETIP_DEFINES],
+[
+AC_MSG_CHECKING(for special defines needed for etip.h)
+cf_save_CXXFLAGS="$CXXFLAGS"
+cf_result="none"
+for cf_math in "" MATH_H
+do
+for cf_excp in "" MATH_EXCEPTION
+do
+ CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
+ test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
+ test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
+AC_TRY_COMPILE([
+#include <etip.h.in>
+],[],[
+ test -n "$cf_math" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_math})
+ test -n "$cf_excp" && AC_DEFINE_UNQUOTED(ETIP_NEEDS_${cf_excp})
+ cf_result="$cf_math $cf_excp"
+ break
+],[])
+done
+done
+AC_MSG_RESULT($cf_result)
+CXXFLAGS="$cf_save_CXXFLAGS"
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_DLSYM version: 1 updated: 2004/06/16 20:52:45
+dnl -------------
+dnl Test for dlsym() and related functions, as well as libdl.
+dnl
+dnl Sets
+dnl $cf_have_dlsym
+dnl $cf_have_libdl
+AC_DEFUN([CF_FUNC_DLSYM],[
+cf_have_dlsym=no
+AC_CHECK_FUNC(dlsym,cf_have_dlsym=yes,[
+
+cf_have_libdl=no
+AC_CHECK_LIB(dl,dlsym,[
+ cf_have_dlsym=yes
+ cf_have_libdl=yes])])
+
+if test "$cf_have_dlsym" = yes ; then
+ test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
+
+ AC_MSG_CHECKING(whether able to link to dl*() functions)
+ AC_TRY_LINK([#include <dlfcn.h>],[
+ void *obj;
+ if ((obj = dlopen("filename", 0)) != 0) {
+ if (dlsym(obj, "symbolname") == 0) {
+ dlclose(obj);
+ }
+ }],[
+ AC_DEFINE(HAVE_LIBDL)],[
+ AC_MSG_ERROR(Cannot link test program for libdl)])
+ AC_MSG_RESULT(ok)
+else
+ AC_MSG_ERROR(Cannot find dlsym function)
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_MEMMOVE version: 5 updated: 2000/08/12 23:18:52
+dnl ---------------
+dnl Check for memmove, or a bcopy that can handle overlapping copy. If neither
+dnl is found, add our own version of memmove to the list of objects.
+AC_DEFUN([CF_FUNC_MEMMOVE],
+[
+AC_CHECK_FUNC(memmove,,[
+AC_CHECK_FUNC(bcopy,[
+ AC_CACHE_CHECK(if bcopy does overlapping moves,cf_cv_good_bcopy,[
+ AC_TRY_RUN([
+int main() {
+ static char data[] = "abcdefghijklmnopqrstuwwxyz";
+ char temp[40];
+ bcopy(data, temp, sizeof(data));
+ bcopy(temp+10, temp, 15);
+ bcopy(temp+5, temp+15, 10);
+ exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
+}
+ ],
+ [cf_cv_good_bcopy=yes],
+ [cf_cv_good_bcopy=no],
+ [cf_cv_good_bcopy=unknown])
+ ])
+ ],[cf_cv_good_bcopy=no])
+ if test "$cf_cv_good_bcopy" = yes ; then
+ AC_DEFINE(USE_OK_BCOPY)
+ else
+ AC_DEFINE(USE_MY_MEMMOVE)
+ fi
+])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_POLL version: 2 updated: 2000/02/06 01:38:04
+dnl ------------
+dnl See if the poll function really works. Some platforms have poll(), but
+dnl it does not work for terminals or files.
+AC_DEFUN([CF_FUNC_POLL],[
+AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[
+AC_TRY_RUN([
+#include <stdio.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <sys/poll.h>
+#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 CF_FUNC_TERMIOS version: 2 updated: 2000/07/22 23:37:24
+dnl ---------------
+dnl Some old/broken variations define tcgetattr() only as a macro in
+dnl termio(s).h
+AC_DEFUN([CF_FUNC_TERMIOS],[
+AC_REQUIRE([CF_STRUCT_TERMIOS])
+AC_CACHE_CHECK(for tcgetattr, cf_cv_have_tcgetattr,[
+AC_TRY_LINK([
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#define TTY struct termios
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#define TTY struct termio
+#endif
+#endif
+],[
+TTY foo;
+tcgetattr(1, &foo);],
+[cf_cv_have_tcgetattr=yes],
+[cf_cv_have_tcgetattr=no])])
+test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_FUNC_VSSCANF version: 3 updated: 2001/12/19 00:50:10
+dnl ---------------
+dnl Check for vsscanf() function, which is in c9x but generally not in earlier
+dnl versions of C. It is in the GNU C library, and can often be simulated by
+dnl other functions.
+AC_DEFUN([CF_FUNC_VSSCANF],
+[
+AC_CACHE_CHECK(for vsscanf function or workaround,cf_cv_func_vsscanf,[
+AC_TRY_LINK([
+#include <stdarg.h>
+#include <stdio.h>],[
+ va_list ap;
+ vsscanf("from", "%d", ap)],[cf_cv_func_vsscanf=vsscanf],[
+AC_TRY_LINK([
+#include <stdarg.h>
+#include <stdio.h>],[
+ FILE strbuf;
+ char *str = "from";
+
+ strbuf._flag = _IOREAD;
+ strbuf._ptr = strbuf._base = (unsigned char *) str;
+ strbuf._cnt = strlen(str);
+ strbuf._file = _NFILE;
+ return (vfscanf(&strbuf, "%d", ap))],[cf_cv_func_vsscanf=vfscanf],[
+AC_TRY_LINK([
+#include <stdarg.h>
+#include <stdio.h>],[
+ FILE strbuf;
+ char *str = "from";
+
+ strbuf._flag = _IOREAD;
+ strbuf._ptr = strbuf._base = (unsigned char *) str;
+ strbuf._cnt = strlen(str);
+ strbuf._file = _NFILE;
+ return (_doscan(&strbuf, "%d", ap))],[cf_cv_func_vsscanf=_doscan],[
+cf_cv_func_vsscanf=no])])])])
+
+case $cf_cv_func_vsscanf in #(vi
+vsscanf) AC_DEFINE(HAVE_VSSCANF);; #(vi
+vfscanf) AC_DEFINE(HAVE_VFSCANF);; #(vi
+_doscan) AC_DEFINE(HAVE__DOSCAN);;
+esac
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_ATTRIBUTES version: 9 updated: 2002/12/21 19:25:52
+dnl -----------------
+dnl Test for availability of useful gcc __attribute__ directives to quiet
+dnl compiler warnings. Though useful, not all are supported -- and contrary
+dnl to documentation, unrecognized directives cause older compilers to barf.
+AC_DEFUN([CF_GCC_ATTRIBUTES],
+[
+if test "$GCC" = yes
+then
+cat > conftest.i <<EOF
+#ifndef GCC_PRINTF
+#define GCC_PRINTF 0
+#endif
+#ifndef GCC_SCANF
+#define GCC_SCANF 0
+#endif
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+EOF
+if test "$GCC" = yes
+then
+ AC_CHECKING([for $CC __attribute__ directives])
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+#include "conftest.h"
+#include "conftest.i"
+#if GCC_PRINTF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#if GCC_SCANF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
+#endif
+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void foo(void) GCC_NORETURN;
+int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
+EOF
+ for cf_attribute in scanf printf unused noreturn
+ do
+ CF_UPPER(CF_ATTRIBUTE,$cf_attribute)
+ cf_directive="__attribute__(($cf_attribute))"
+ echo "checking for $CC $cf_directive" 1>&AC_FD_CC
+ case $cf_attribute in
+ scanf|printf)
+ cat >conftest.h <<EOF
+#define GCC_$CF_ATTRIBUTE 1
+EOF
+ ;;
+ *)
+ cat >conftest.h <<EOF
+#define GCC_$CF_ATTRIBUTE $cf_directive
+EOF
+ ;;
+ esac
+ if AC_TRY_EVAL(ac_compile); then
+ test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
+ cat conftest.h >>confdefs.h
+ fi
+ done
+else
+ fgrep define conftest.i >>confdefs.h
+fi
+rm -rf conftest*
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_VERSION version: 3 updated: 2003/09/06 19:16:57
+dnl --------------
+dnl Find version of gcc
+AC_DEFUN([CF_GCC_VERSION],[
+AC_REQUIRE([AC_PROG_CC])
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+ AC_MSG_CHECKING(version of $CC)
+ GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ AC_MSG_RESULT($GCC_VERSION)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_WARNINGS version: 16 updated: 2004/07/23 14:40:34
+dnl ---------------
+dnl Check if the compiler supports useful warning options. There's a few that
+dnl we don't use, simply because they're too noisy:
+dnl
+dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
+dnl -Wredundant-decls (system headers make this too noisy)
+dnl -Wtraditional (combines too many unrelated messages, only a few useful)
+dnl -Wwrite-strings (too noisy, but should review occasionally). This
+dnl is enabled for ncurses using "--enable-const".
+dnl -pedantic
+dnl
+dnl Parameter:
+dnl $1 is an optional list of gcc warning flags that a particular
+dnl application might want to use, e.g., "no-unused" for
+dnl -Wno-unused
+dnl Special:
+dnl If $with_ext_const is "yes", add a check for -Wwrite-strings
+dnl
+AC_DEFUN([CF_GCC_WARNINGS],
+[
+AC_REQUIRE([CF_GCC_VERSION])
+if test "$GCC" = yes
+then
+ cat > conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
+EOF
+ AC_CHECKING([for $CC warning options])
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS="-W -Wall"
+ cf_warn_CONST=""
+ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+ for cf_opt in \
+ Wbad-function-cast \
+ Wcast-align \
+ Wcast-qual \
+ Winline \
+ Wmissing-declarations \
+ Wmissing-prototypes \
+ Wnested-externs \
+ Wpointer-arith \
+ Wshadow \
+ Wstrict-prototypes \
+ Wundef $cf_warn_CONST $1
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if AC_TRY_EVAL(ac_compile); then
+ test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
+ case $cf_opt in #(vi
+ Wcast-qual) #(vi
+ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ ;;
+ Winline) #(vi
+ case $GCC_VERSION in
+ 3.3*)
+ CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+ continue;;
+ esac
+ ;;
+ esac
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ rm -f conftest*
+ CFLAGS="$cf_save_CFLAGS"
+fi
+AC_SUBST(EXTRA_CFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_TRY_LINK version: 1 updated: 2004/08/21 19:02:08
+dnl ----------------
+dnl Verify that a test program compiles/links with GNAT.
+dnl $cf_ada_make is set to the program that compiles/links
+dnl $ADAFLAGS may be set to the GNAT flags.
+dnl
+dnl $1 is the text of the spec
+dnl $2 is the text of the body
+dnl $3 is the shell command to execute if successful
+dnl $4 is the shell command to execute if not successful
+AC_DEFUN([CF_GNAT_TRY_LINK],
+[
+rm -f conftest*
+cat >>conftest.ads <<CF_EOF
+$1
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+$2
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&AC_FD_CC 2>&1 ) ; then
+ifelse($3,, :,[ $3])
+ifelse($4,,,[else
+ $4])
+fi
+rm -f conftest*
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_TRY_RUN version: 3 updated: 2004/08/21 19:02:08
+dnl ---------------
+dnl Verify that a test program compiles and runs with GNAT
+dnl $cf_ada_make is set to the program that compiles/links
+dnl $ADAFLAGS may be set to the GNAT flags.
+dnl
+dnl $1 is the text of the spec
+dnl $2 is the text of the body
+dnl $3 is the shell command to execute if successful
+dnl $4 is the shell command to execute if not successful
+AC_DEFUN([CF_GNAT_TRY_RUN],
+[
+rm -f conftest*
+cat >>conftest.ads <<CF_EOF
+$1
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+$2
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&AC_FD_CC 2>&1 ) ; then
+ if ( ./conftest 1>&AC_FD_CC 2>&1 ) ; then
+ifelse($3,, :,[ $3])
+ifelse($4,,,[ else
+ $4])
+ fi
+ifelse($4,,,[else
+ $4])
+fi
+rm -f conftest*
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_VERSION version: 11 updated: 2003/09/06 19:42:09
+dnl ---------------
+dnl Verify version of GNAT.
+AC_DEFUN([CF_GNAT_VERSION],
+[
+AC_MSG_CHECKING(for gnat version)
+cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\
+ sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'`
+AC_MSG_RESULT($cf_gnat_version)
+
+case $cf_gnat_version in
+ 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*)
+ cf_cv_prog_gnat_correct=yes
+ ;;
+ *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
+ cf_cv_prog_gnat_correct=no
+ ;;
+esac
+case $cf_gnat_version in
+ 3.[[1-9]]*|[[4-9]].*)
+ cf_compile_generics=generics
+ cf_generic_objects="\$(GENOBJS)"
+ ;;
+ *) cf_compile_generics=
+ cf_generic_objects=
+ ;;
+esac
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53
+dnl -------------
+dnl Check if we must define _GNU_SOURCE to get a reasonable value for
+dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
+dnl (or misfeature) of glibc2, which breaks portability of many applications,
+dnl since it is interwoven with GNU extensions.
+dnl
+dnl Well, yes we could work around it...
+AC_DEFUN([CF_GNU_SOURCE],
+[
+AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
+AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_gnu_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_gnu_source=no],
+ [cf_cv_gnu_source=yes])
+ CPPFLAGS="$cf_save"
+ ])
+])
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:46
+dnl --------------
+dnl If we're trying to use g++, test if libg++ is installed (a rather common
+dnl problem :-). If we have the compiler but no library, we'll be able to
+dnl configure, but won't be able to build the c++ demo program.
+AC_DEFUN([CF_GPP_LIBRARY],
+[
+cf_cxx_library=unknown
+case $cf_cv_system_name in #(vi
+os2*) #(vi
+ cf_gpp_libname=gpp
+ ;;
+*)
+ cf_gpp_libname=g++
+ ;;
+esac
+if test "$GXX" = yes; then
+ AC_MSG_CHECKING([for lib$cf_gpp_libname])
+ cf_save="$LIBS"
+ LIBS="$LIBS -l$cf_gpp_libname"
+ AC_TRY_LINK([
+#include <$cf_gpp_libname/builtin.h>
+ ],
+ [two_arg_error_handler_t foo2 = lib_error_handler],
+ [cf_cxx_library=yes
+ CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ if test "$cf_gpp_libname" = cpp ; then
+ AC_DEFINE(HAVE_GPP_BUILTIN_H)
+ else
+ AC_DEFINE(HAVE_GXX_BUILTIN_H)
+ fi],
+ [AC_TRY_LINK([
+#include <builtin.h>
+ ],
+ [two_arg_error_handler_t foo2 = lib_error_handler],
+ [cf_cxx_library=yes
+ CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ AC_DEFINE(HAVE_BUILTIN_H)],
+ [cf_cxx_library=no])])
+ LIBS="$cf_save"
+ AC_MSG_RESULT($cf_cxx_library)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GXX_VERSION version: 3 updated: 2003/09/06 19:16:21
+dnl --------------
+dnl Check for version of g++
+AC_DEFUN([CF_GXX_VERSION],[
+AC_REQUIRE([AC_PROG_CPP])
+GXX_VERSION=none
+if test "$GXX" = yes; then
+ AC_MSG_CHECKING(version of g++)
+ GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`"
+ AC_MSG_RESULT($GXX_VERSION)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
+dnl ---------------
+dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
+AC_DEFUN([CF_HELP_MESSAGE],
+[AC_DIVERT_HELP([$1])dnl
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15
+dnl ---------------
+dnl Construct the list of include-options according to whether we're building
+dnl in the source directory or using '--srcdir=DIR' option. If we're building
+dnl with gcc, don't append the includedir if it happens to be /usr/include,
+dnl since that usually breaks gcc's shadow-includes.
+AC_DEFUN([CF_INCLUDE_DIRS],
+[
+CPPFLAGS="-I. -I../include $CPPFLAGS"
+if test "$srcdir" != "."; then
+ CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
+fi
+if test "$GCC" != yes; then
+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test $prefix != /usr ; then
+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+ fi
+ else
+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+ fi
+fi
+AC_SUBST(CPPFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ISASCII version: 3 updated: 2000/08/12 23:18:52
+dnl ----------
+dnl Check if we have either a function or macro for 'isascii()'.
+AC_DEFUN([CF_ISASCII],
+[
+AC_MSG_CHECKING(for isascii)
+AC_CACHE_VAL(cf_cv_have_isascii,[
+ AC_TRY_LINK([#include <ctype.h>],[int x = isascii(' ')],
+ [cf_cv_have_isascii=yes],
+ [cf_cv_have_isascii=no])
+])dnl
+AC_MSG_RESULT($cf_cv_have_isascii)
+test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIBUTF8 version: 2 updated: 2002/01/19 22:51:32
+dnl ----------
+dnl Check for libutf8
+AC_DEFUN([CF_LIBUTF8],
+[
+AC_CACHE_CHECK(for putwc in libutf8,cf_cv_libutf8,[
+ cf_save_LIBS="$LIBS"
+ LIBS="-lutf8 $LIBS"
+AC_TRY_LINK([
+#include <libutf8.h>],[putwc(0,0);],
+ [cf_cv_libutf8=yes],
+ [cf_cv_libutf8=no])
+ LIBS="$cf_save_LIBS"
+])
+
+if test "$cf_cv_libutf8" = yes ; then
+ AC_DEFINE(HAVE_LIBUTF8_H)
+ LIBS="-lutf8 $LIBS"
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48
+dnl -------------
+dnl Compute the library-prefix for the given host system
+dnl $1 = variable to set
+AC_DEFUN([CF_LIB_PREFIX],
+[
+ case $cf_cv_system_name in
+ OS/2*) LIB_PREFIX='' ;;
+ os2*) LIB_PREFIX='' ;;
+ *) LIB_PREFIX='lib' ;;
+ esac
+ifelse($1,,,[$1=$LIB_PREFIX])
+ AC_SUBST(LIB_PREFIX)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_RULES version: 35 updated: 2004/09/18 17:54:16
+dnl ------------
+dnl Append definitions and rules for the given models to the subdirectory
+dnl Makefiles, and the recursion rule for the top-level Makefile. If the
+dnl subdirectory is a library-source directory, modify the LIBRARIES list in
+dnl the corresponding makefile to list the models that we'll generate.
+dnl
+dnl For shared libraries, make a list of symbolic links to construct when
+dnl generating each library. The convention used for Linux is the simplest
+dnl one:
+dnl lib<name>.so ->
+dnl lib<name>.so.<major> ->
+dnl lib<name>.so.<maj>.<minor>
+AC_DEFUN([CF_LIB_RULES],
+[
+CF_LIB_PREFIX(cf_prefix)
+AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
+for cf_dir in $SRC_SUBDIRS
+do
+ if test -f $srcdir/$cf_dir/modules; then
+
+ IMPORT_LIB=
+ SHARED_LIB=
+ LIBS_TO_MAKE=
+ 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) #(vi
+ case "$cf_cv_system_name" in #(vi
+ darwin*)
+ case .${LIB_SUFFIX} in
+ .w*)
+ cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+ cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
+ ;;
+ *)
+ cf_suffix='.$(REL_VERSION)'"$cf_suffix"
+ ;;
+ esac
+ ;; #(vi
+ *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
+ esac
+ ;;
+ abi)
+ case "$cf_cv_system_name" in #(vi
+ darwin*)
+ case .${LIB_SUFFIX} in
+ .w*)
+ cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+ cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
+ ;;
+ *)
+ cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
+ ;;
+ esac
+ ;; #(vi
+ *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
+ esac
+ ;;
+ esac
+ fi
+ # cygwin needs import library, and has unique naming convention
+ # use autodetected ${cf_prefix} for import lib and static lib, but
+ # use 'cyg' prefix for shared lib.
+ if test $cf_cv_shlib_version = cygdll ; then
+ SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
+ IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
+ LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
+ continue
+ fi
+ fi
+ LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
+ done
+
+ if test $cf_dir = ncurses ; then
+ cf_subsets="$LIB_SUBSETS"
+ cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
+ if test "$cf_termlib" != "$cf_subsets" ; then
+ cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
+ LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
+ fi
+ else
+ cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
+ fi
+
+ sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
+ -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
+ -e "s%@SHARED_LIB@%$SHARED_LIB%" \
+ $cf_dir/Makefile >$cf_dir/Makefile.out
+ mv $cf_dir/Makefile.out $cf_dir/Makefile
+
+ $AWK -f $srcdir/mk-0th.awk \
+ libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
+
+ for cf_subset in $cf_subsets
+ do
+ cf_subdirs=
+ for cf_item in $CF_LIST_MODELS
+ do
+ echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
+ CF_UPPER(CF_ITEM,$cf_item)
+ CF_LIB_SUFFIX($cf_item,cf_suffix)
+ CF_OBJ_SUBDIR($cf_item,cf_subdir)
+
+ # Test for case where we build libtinfo with a different name.
+ cf_libname=$cf_dir
+ if test $cf_dir = ncurses ; then
+ case $cf_subset in
+ *base*)
+ ;;
+ termlib*)
+ cf_libname=$TINFO_LIB_SUFFIX
+ if test -n "${DFT_ARG_SUFFIX}" ; then
+ # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
+ cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
+ fi
+ ;;
+ esac
+ fi
+
+ # These dependencies really are for development, not
+ # builds, but they are useful in porting, too.
+ cf_depend="../include/ncurses_cfg.h"
+ if test "$srcdir" = "."; then
+ cf_reldir="."
+ else
+ cf_reldir="\$(srcdir)"
+ fi
+
+ if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
+ cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
+ elif test -f $srcdir/$cf_dir/curses.priv.h; then
+ cf_depend="$cf_depend $cf_reldir/curses.priv.h"
+ fi
+
+ cf_dir_suffix=
+ old_cf_suffix="$cf_suffix"
+ if test "$cf_cv_shlib_version_infix" = yes ; then
+ if test -n "$LIB_SUFFIX" ; then
+ case $LIB_SUFFIX in
+ w*)
+ cf_libname=`echo $cf_libname | sed 's/w$//'`
+ cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+ cf_dir_suffix=w
+ ;;
+ esac
+ fi
+ fi
+
+ $AWK -f $srcdir/mk-1st.awk \
+ name=${cf_libname}${cf_dir_suffix} \
+ traces=$LIB_TRACING \
+ MODEL=$CF_ITEM \
+ model=$cf_subdir \
+ prefix=$cf_prefix \
+ suffix=$cf_suffix \
+ subset=$cf_subset \
+ ShlibVer=$cf_cv_shlib_version \
+ ShlibVerInfix=$cf_cv_shlib_version_infix \
+ DoLinks=$cf_cv_do_symlinks \
+ rmSoLocs=$cf_cv_rm_so_locs \
+ ldconfig="$LDCONFIG" \
+ overwrite=$WITH_OVERWRITE \
+ depend="$cf_depend" \
+ host="$host" \
+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
+
+ cf_suffix="$old_cf_suffix"
+
+ for cf_subdir2 in $cf_subdirs lib
+ do
+ test $cf_subdir = $cf_subdir2 && break
+ done
+ test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
+ $AWK -f $srcdir/mk-2nd.awk \
+ name=$cf_dir \
+ traces=$LIB_TRACING \
+ MODEL=$CF_ITEM \
+ model=$cf_subdir \
+ subset=$cf_subset \
+ srcdir=$srcdir \
+ echo=$WITH_ECHO \
+ crenames=$cf_cv_prog_CC_c_o \
+ cxxrenames=$cf_cv_prog_CXX_c_o \
+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
+ cf_subdirs="$cf_subdirs $cf_subdir"
+ done
+ done
+ fi
+
+ echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >>Makefile
+done
+
+for cf_dir in $SRC_SUBDIRS
+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
+ ;;
+ esac
+ fi
+
+ if test -f $srcdir/$cf_dir/modules; then
+ echo >> Makefile
+ if test -f $srcdir/$cf_dir/headers; then
+cat >> Makefile <<CF_EOF
+install.includes \\
+uninstall.includes \\
+CF_EOF
+ fi
+if test "$cf_dir" != "c++" ; then
+echo 'lint \' >> Makefile
+fi
+cat >> Makefile <<CF_EOF
+libs \\
+lintlib \\
+install.libs \\
+uninstall.libs \\
+install.$cf_dir \\
+uninstall.$cf_dir ::
+ cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@
+CF_EOF
+ elif test -f $srcdir/$cf_dir/headers; then
+cat >> Makefile <<CF_EOF
+
+libs \\
+install.libs \\
+uninstall.libs \\
+install.includes \\
+uninstall.includes ::
+ cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@
+CF_EOF
+fi
+done
+
+cat >> Makefile <<CF_EOF
+
+install.data \\
+uninstall.data ::
+$MAKE_TERMINFO cd misc && \$(MAKE) \$(CF_MFLAGS) \[$]@
+
+install.man \\
+uninstall.man ::
+ cd man && \$(MAKE) \$(CF_MFLAGS) \[$]@
+
+distclean ::
+ rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
+ rm -f headers.sh headers.sed
+ rm -rf \$(DIRS_TO_MAKE)
+CF_EOF
+
+# Special case: tack's manpage lives in its own directory.
+if test -d tack ; then
+if test -f $srcdir/$tack.h; then
+cat >> Makefile <<CF_EOF
+
+install.man \\
+uninstall.man ::
+ cd tack && \$(MAKE) \$(CF_MFLAGS) \[$]@
+CF_EOF
+fi
+fi
+
+dnl If we're installing into a subdirectory of /usr/include, etc., we should
+dnl prepend the subdirectory's name to the "#include" paths. It won't hurt
+dnl anything, and will make it more standardized. It's awkward to decide this
+dnl at configuration because of quoting, so we'll simply make all headers
+dnl installed via a script that can do the right thing.
+
+rm -f headers.sed headers.sh
+
+dnl ( generating this script makes the makefiles a little tidier :-)
+echo creating headers.sh
+cat >headers.sh <<CF_EOF
+#! /bin/sh
+# This shell script is generated by the 'configure' script. It is invoked in a
+# subdirectory of the build tree. It generates a sed-script in the parent
+# directory that is used to adjust includes for header files that reside in a
+# subdirectory of /usr/include, etc.
+PRG=""
+while test \[$]# != 3
+do
+PRG="\$PRG \[$]1"; shift
+done
+DST=\[$]1
+REF=\[$]2
+SRC=\[$]3
+TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
+echo installing \$SRC in \$DST
+CF_EOF
+if test $WITH_CURSES_H = yes; then
+ cat >>headers.sh <<CF_EOF
+case \$DST in
+/*/include/*)
+ END=\`basename \$DST\`
+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
+ do
+ NAME=\`basename \$i\`
+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
+ done
+ ;;
+*)
+ echo "" >> \$TMPSED
+ ;;
+esac
+CF_EOF
+else
+ cat >>headers.sh <<CF_EOF
+case \$DST in
+/*/include/*)
+ END=\`basename \$DST\`
+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
+ do
+ NAME=\`basename \$i\`
+ if test "\$NAME" = "curses.h"
+ then
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ NAME=ncurses.h
+ fi
+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
+ done
+ ;;
+*)
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ ;;
+esac
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+rm -f \$TMPSRC
+sed -f \$TMPSED \$SRC > \$TMPSRC
+NAME=\`basename \$SRC\`
+CF_EOF
+if test $WITH_CURSES_H != yes; then
+ cat >>headers.sh <<CF_EOF
+test "\$NAME" = "curses.h" && NAME=ncurses.h
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+# Just in case someone gzip'd manpages, remove the conflicting copy.
+test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
+
+eval \$PRG \$TMPSRC \$DST/\$NAME
+rm -f \$TMPSRC \$TMPSED
+CF_EOF
+
+chmod 0755 headers.sh
+
+for cf_dir in $SRC_SUBDIRS
+do
+ if test -f $srcdir/$cf_dir/headers; then
+ cat >>$cf_dir/Makefile <<CF_EOF
+\$(DESTDIR)\$(includedir) :
+ sh \$(srcdir)/../mkinstalldirs \[$]@
+
+install \\
+install.libs \\
+install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
+CF_EOF
+ j=""
+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
+ do
+ test -n "$j" && echo " $j \\" >>$cf_dir/Makefile
+ j=$i
+ done
+ echo " $j" >>$cf_dir/Makefile
+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
+ do
+ echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
+ test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
+ done
+
+ cat >>$cf_dir/Makefile <<CF_EOF
+
+uninstall \\
+uninstall.libs \\
+uninstall.includes ::
+CF_EOF
+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
+ do
+ i=`basename $i`
+ echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
+ test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
+ done
+ fi
+
+ if test -f $srcdir/$cf_dir/modules; then
+ if test "$cf_dir" != "c++" ; then
+ cat >>$cf_dir/Makefile <<"CF_EOF"
+depend : $(AUTO_SRC)
+ makedepend -- $(CPPFLAGS) -- $(C_SRC)
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+CF_EOF
+ fi
+ fi
+done
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_SUFFIX version: 13 updated: 2003/11/01 16:09:07
+dnl -------------
+dnl Compute the library file-suffix from the given model name
+dnl $1 = model name
+dnl $2 = variable to set
+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
+AC_DEFUN([CF_LIB_SUFFIX],
+[
+ AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
+ case $1 in
+ libtool) $2='.la' ;;
+ normal) $2='.a' ;;
+ debug) $2='_g.a' ;;
+ profile) $2='_p.a' ;;
+ shared)
+ case $cf_cv_system_name in
+ cygwin*) $2='.dll' ;;
+ darwin*) $2='.dylib' ;;
+ hpux*)
+ case $target in
+ ia64*) $2='.so' ;;
+ *) $2='.sl' ;;
+ esac
+ ;;
+ *) $2='.so' ;;
+ esac
+ esac
+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIB_TYPE version: 4 updated: 2000/10/20 22:57:49
+dnl -----------
+dnl Compute the string to append to -library from the given model name
+dnl $1 = model name
+dnl $2 = variable to set
+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
+AC_DEFUN([CF_LIB_TYPE],
+[
+ case $1 in
+ libtool) $2='' ;;
+ normal) $2='' ;;
+ debug) $2='_g' ;;
+ profile) $2='_p' ;;
+ shared) $2='' ;;
+ esac
+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LINK_DATAONLY version: 6 updated: 2003/02/02 01:41:46
+dnl ----------------
+dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
+dnl only data (i.e., no functions), for example NeXT. On those systems we'll
+dnl have to provide wrappers for global tables to ensure they're linked
+dnl properly.
+AC_DEFUN([CF_LINK_DATAONLY],
+[
+AC_MSG_CHECKING([if data-only library module links])
+AC_CACHE_VAL(cf_cv_link_dataonly,[
+ rm -f conftest.a
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int testdata[[3]] = { 123, 456, 789 };
+EOF
+ if AC_TRY_EVAL(ac_compile) ; then
+ mv conftest.o data.o && \
+ ( $AR $AR_OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext data.o
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int testfunc()
+{
+#if defined(NeXT)
+ exit(1); /* I'm told this linker is broken */
+#else
+ extern int testdata[[3]];
+ return testdata[[0]] == 123
+ && testdata[[1]] == 456
+ && testdata[[2]] == 789;
+#endif
+}
+EOF
+ if AC_TRY_EVAL(ac_compile); then
+ mv conftest.o func.o && \
+ ( $AR $AR_OPTS conftest.a func.o ) 2>&AC_FD_CC 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext func.o
+ ( eval $RANLIB conftest.a ) 2>&AC_FD_CC >/dev/null
+ cf_saveLIBS="$LIBS"
+ LIBS="conftest.a $LIBS"
+ AC_TRY_RUN([
+ int main()
+ {
+ extern int testfunc();
+ exit (!testfunc());
+ }
+ ],
+ [cf_cv_link_dataonly=yes],
+ [cf_cv_link_dataonly=no],
+ [cf_cv_link_dataonly=unknown])
+ LIBS="$cf_saveLIBS"
+ ])
+AC_MSG_RESULT($cf_cv_link_dataonly)
+
+if test "$cf_cv_link_dataonly" = no ; then
+ AC_DEFINE(BROKEN_LINKER)
+ BROKEN_LINKER=1
+fi
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LINK_FUNCS version: 5 updated: 2003/02/02 01:41:46
+dnl -------------
+dnl Most Unix systems have both link and symlink, a few don't have symlink.
+dnl A few non-Unix systems implement symlink, but not link.
+dnl A few non-systems implement neither (or have nonfunctional versions).
+AC_DEFUN([CF_LINK_FUNCS],
+[
+AC_CHECK_FUNCS( \
+ remove \
+ unlink )
+
+if test "$cross_compiling" = yes ; then
+ AC_CHECK_FUNCS( \
+ link \
+ symlink )
+else
+ AC_CACHE_CHECK(if link/symlink functions work,cf_cv_link_funcs,[
+ cf_cv_link_funcs=
+ for cf_func in link symlink ; do
+ AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main()
+{
+ int fail = 0;
+ char *src = "config.log";
+ char *dst = "conftest.chk";
+ struct stat src_sb;
+ struct stat dst_sb;
+
+ stat(src, &src_sb);
+ fail = ($cf_func("config.log", "conftest.chk") < 0)
+ || (stat(dst, &dst_sb) < 0)
+ || (dst_sb.st_mtime != src_sb.st_mtime);
+#ifdef HAVE_UNLINK
+ unlink(dst);
+#else
+ remove(dst);
+#endif
+ exit (fail);
+}
+ ],[
+ cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
+ eval 'ac_cv_func_'$cf_func'=yes'],[
+ eval 'ac_cv_func_'$cf_func'=no'],[
+ eval 'ac_cv_func_'$cf_func'=error'])
+ done
+ test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
+ ])
+ test "$ac_cv_func_link" = yes && AC_DEFINE(HAVE_LINK)
+ test "$ac_cv_func_symlink" = yes && AC_DEFINE(HAVE_SYMLINK)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MAKEFLAGS version: 9 updated: 2001/12/30 18:17:27
+dnl ------------
+dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make'
+dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
+dnl (GNU 'make' does both, something POSIX 'make', which happens to make the
+dnl $(MAKEFLAGS) variable incompatible because it adds the assignments :-)
+AC_DEFUN([CF_MAKEFLAGS],
+[
+AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[
+ cf_cv_makeflags=''
+ for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
+ do
+ cat >cf_makeflags.tmp <<CF_EOF
+SHELL = /bin/sh
+all :
+ @ echo '.$cf_option'
+CF_EOF
+ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
+ case "$cf_result" in
+ .*k)
+ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
+ case "$cf_result" in
+ .*CC=*) cf_cv_makeflags=
+ ;;
+ *) cf_cv_makeflags=$cf_option
+ ;;
+ esac
+ break
+ ;;
+ *) echo no match "$cf_result"
+ ;;
+ esac
+ done
+ rm -f cf_makeflags.tmp
+])
+
+AC_SUBST(cf_cv_makeflags)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40
+dnl ------------
+dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have
+dnl a monocase filesystem.
+AC_DEFUN([CF_MAKE_TAGS],[
+AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
+AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no)
+
+if test "$cf_cv_mixedcase" = yes ; then
+ AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)
+else
+ MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+ MAKE_UPPER_TAGS=
+else
+ MAKE_UPPER_TAGS="#"
+fi
+AC_SUBST(MAKE_UPPER_TAGS)
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+ MAKE_LOWER_TAGS=
+else
+ MAKE_LOWER_TAGS="#"
+fi
+AC_SUBST(MAKE_LOWER_TAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MANPAGE_FORMAT version: 7 updated: 2003/12/20 19:30:34
+dnl -----------------
+dnl Option to allow user to override automatic configuration of manpage format.
+dnl There are several special cases:
+dnl
+dnl gzip - man checks for, can display gzip'd files
+dnl compress - man checks for, can display compressed files
+dnl BSDI - files in the cat-directories are suffixed ".0"
+dnl formatted - installer should format (put files in cat-directory)
+dnl catonly - installer should only format, e.g., for a turnkey system.
+dnl
+dnl There are other configurations which this macro does not test, e.g., HPUX's
+dnl compressed manpages (but uncompressed manpages are fine, and HPUX's naming
+dnl convention would not match our use).
+AC_DEFUN([CF_MANPAGE_FORMAT],
+[
+AC_REQUIRE([CF_PATHSEP])
+AC_MSG_CHECKING(format of man-pages)
+
+AC_ARG_WITH(manpage-format,
+ [ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
+ optionally formatted/catonly, e.g., gzip,formatted],
+ [MANPAGE_FORMAT=$withval],
+ [MANPAGE_FORMAT=unknown])
+
+test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
+MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
+
+cf_unknown=
+
+case $MANPAGE_FORMAT in
+unknown)
+ if test -z "$MANPATH" ; then
+ MANPATH="/usr/man:/usr/share/man"
+ fi
+
+ # look for the 'date' man-page (it's most likely to be installed!)
+ MANPAGE_FORMAT=
+ cf_preform=no
+ cf_catonly=yes
+ cf_example=date
+
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
+ for cf_dir in $MANPATH; do
+ test -z "$cf_dir" && cf_dir=/usr/man
+ for cf_name in $cf_dir/man*/$cf_example.[[01]]* $cf_dir/cat*/$cf_example.[[01]]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
+ do
+ cf_test=`echo $cf_name | sed -e 's/*//'`
+ if test "x$cf_test" = "x$cf_name" ; then
+
+ case "$cf_name" in
+ *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
+ *.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
+ *.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
+ *) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
+ esac
+
+ case "$cf_name" in
+ $cf_dir/man*)
+ cf_catonly=no
+ ;;
+ $cf_dir/cat*)
+ cf_preform=yes
+ ;;
+ esac
+ break
+ fi
+
+ # if we found a match in either man* or cat*, stop looking
+ if test -n "$MANPAGE_FORMAT" ; then
+ cf_found=no
+ test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
+ test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
+ case "$cf_name" in
+ $cf_dir/cat*)
+ cf_found=yes
+ ;;
+ esac
+ test $cf_found=yes && break
+ fi
+ done
+ # only check the first directory in $MANPATH where we find manpages
+ if test -n "$MANPAGE_FORMAT" ; then
+ break
+ fi
+ done
+ # if we did not find the example, just assume it is normal
+ test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
+ IFS="$ac_save_ifs"
+ ;;
+*)
+ for cf_option in $MANPAGE_FORMAT; do
+ case $cf_option in #(vi
+ gzip|compress|BSDI|normal|formatted|catonly)
+ ;;
+ *)
+ cf_unknown="$cf_unknown $cf_option"
+ ;;
+ esac
+ done
+ ;;
+esac
+
+AC_MSG_RESULT($MANPAGE_FORMAT)
+if test -n "$cf_unknown" ; then
+ AC_MSG_WARN(Unexpected manpage-format $cf_unknown)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MANPAGE_RENAMES version: 6 updated: 2002/01/19 22:51:32
+dnl ------------------
+dnl The Debian people have their own naming convention for manpages. This
+dnl option lets us override the name of the file containing renaming, or
+dnl disable it altogether.
+AC_DEFUN([CF_MANPAGE_RENAMES],
+[
+AC_MSG_CHECKING(for manpage renaming)
+
+AC_ARG_WITH(manpage-renames,
+ [ --with-manpage-renames specify manpage-renaming],
+ [MANPAGE_RENAMES=$withval],
+ [MANPAGE_RENAMES=yes])
+
+case ".$MANPAGE_RENAMES" in #(vi
+.no) #(vi
+ ;;
+.|.yes)
+ # Debian 'man' program?
+ if test -f /etc/debian_version ; then
+ MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
+ else
+ MANPAGE_RENAMES=no
+ fi
+ ;;
+esac
+
+if test "$MANPAGE_RENAMES" != no ; then
+ if test -f $srcdir/man/$MANPAGE_RENAMES ; then
+ MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
+ elif test ! -f $MANPAGE_RENAMES ; then
+ AC_MSG_ERROR(not a filename: $MANPAGE_RENAMES)
+ fi
+
+ test ! -d man && mkdir man
+
+ # Construct a sed-script to perform renaming within man-pages
+ if test -n "$MANPAGE_RENAMES" ; then
+ test ! -d man && mkdir man
+ sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
+ fi
+fi
+
+AC_MSG_RESULT($MANPAGE_RENAMES)
+AC_SUBST(MANPAGE_RENAMES)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MANPAGE_SYMLINKS version: 4 updated: 2003/12/13 18:01:58
+dnl -------------------
+dnl Some people expect each tool to make all aliases for manpages in the
+dnl man-directory. This accommodates the older, less-capable implementations
+dnl of 'man', and is optional.
+AC_DEFUN([CF_MANPAGE_SYMLINKS],
+[
+AC_MSG_CHECKING(if manpage aliases will be installed)
+
+AC_ARG_WITH(manpage-aliases,
+ [ --with-manpage-aliases specify manpage-aliases using .so],
+ [MANPAGE_ALIASES=$withval],
+ [MANPAGE_ALIASES=yes])
+
+AC_MSG_RESULT($MANPAGE_ALIASES)
+
+if test "$LN_S" = "ln -s"; then
+ cf_use_symlinks=yes
+else
+ cf_use_symlinks=no
+fi
+
+MANPAGE_SYMLINKS=no
+if test "$MANPAGE_ALIASES" = yes ; then
+AC_MSG_CHECKING(if manpage symlinks should be used)
+
+AC_ARG_WITH(manpage-symlinks,
+ [ --with-manpage-symlinks specify manpage-aliases using symlinks],
+ [MANPAGE_SYMLINKS=$withval],
+ [MANPAGE_SYMLINKS=$cf_use_symlinks])
+
+if test "$$cf_use_symlinks" = no; then
+if test "$MANPAGE_SYMLINKS" = yes ; then
+ AC_MSG_WARN(cannot make symlinks, will use .so files)
+ MANPAGE_SYMLINKS=no
+fi
+fi
+
+AC_MSG_RESULT($MANPAGE_SYMLINKS)
+fi
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MANPAGE_TBL version: 3 updated: 2002/01/19 22:51:32
+dnl --------------
+dnl This option causes manpages to be run through tbl(1) to generate tables
+dnl correctly.
+AC_DEFUN([CF_MANPAGE_TBL],
+[
+AC_MSG_CHECKING(for manpage tbl)
+
+AC_ARG_WITH(manpage-tbl,
+ [ --with-manpage-tbl specify manpage processing with tbl],
+ [MANPAGE_TBL=$withval],
+ [MANPAGE_TBL=no])
+
+AC_MSG_RESULT($MANPAGE_TBL)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MAN_PAGES version: 27 updated: 2003/12/20 20:39:45
+dnl ------------
+dnl Try to determine if the man-pages on the system are compressed, and if
+dnl so, what format is used. Use this information to construct a script that
+dnl will install man-pages.
+AC_DEFUN([CF_MAN_PAGES],
+[
+CF_HELP_MESSAGE(Options to Specify How Manpages are Installed:)
+CF_MANPAGE_FORMAT
+CF_MANPAGE_RENAMES
+CF_MANPAGE_SYMLINKS
+CF_MANPAGE_TBL
+
+ if test "$prefix" = "NONE" ; then
+ cf_prefix="$ac_default_prefix"
+ else
+ cf_prefix="$prefix"
+ fi
+
+ case "$MANPAGE_FORMAT" in # (vi
+ *catonly*) # (vi
+ cf_format=yes
+ cf_inboth=no
+ ;;
+ *formatted*) # (vi
+ cf_format=yes
+ cf_inboth=yes
+ ;;
+ *)
+ cf_format=no
+ cf_inboth=no
+ ;;
+ esac
+
+test ! -d man && mkdir man
+
+cf_so_strip=
+cf_compress=
+case "$MANPAGE_FORMAT" in #(vi
+*compress*) #(vi
+ cf_so_strip="Z"
+ cf_compress=compress
+ ;;
+*gzip*) #(vi
+ cf_so_strip="gz"
+ cf_compress=gzip
+ ;;
+esac
+
+cf_edit_man=man/edit_man.sh
+
+cat >$cf_edit_man <<CF_EOF
+#! /bin/sh
+# this script is generated by the configure-script CF_MAN_PAGES macro.
+prefix="$cf_prefix"
+datadir="$datadir"
+NCURSES_OSPEED="$NCURSES_OSPEED"
+TERMINFO="$TERMINFO"
+MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
+INSTALL="$INSTALL"
+INSTALL_DATA="$INSTALL_DATA"
+transform="$program_transform_name"
+
+TMP=\${TMPDIR-/tmp}/man\$\$
+trap "rm -f \$TMP" 0 1 2 5 15
+
+form=\[$]1
+shift || exit 1
+
+verb=\[$]1
+shift || exit 1
+
+mandir=\[$]1
+shift || exit 1
+
+srcdir=\[$]1
+shift || exit 1
+
+if test "\$form" = normal ; then
+ if test "$cf_format" = yes ; then
+ if test "$cf_inboth" = no ; then
+ sh \[$]0 format \$verb \$mandir \$srcdir \[$]*
+ exit $?
+ fi
+ fi
+ cf_subdir=\$mandir/man
+ cf_tables=$MANPAGE_TBL
+else
+ cf_subdir=\$mandir/cat
+ cf_tables=yes
+fi
+
+# process the list of source-files
+for i in \[$]* ; do
+case \$i in #(vi
+*.orig|*.rej) ;; #(vi
+*.[[0-9]]*)
+ section=\`expr "\$i" : '.*\\.\\([[0-9]]\\)[[xm]]*'\`;
+ if test \$verb = installing ; then
+ if test ! -d \$cf_subdir\${section} ; then
+ \$MKDIRS \$cf_subdir\$section
+ fi
+ fi
+ aliases=
+ source=\`basename \$i\`
+ inalias=\$source
+ test ! -f \$inalias && inalias="\$srcdir/\$inalias"
+ if test ! -f \$inalias ; then
+ echo .. skipped \$source
+ continue
+ fi
+CF_EOF
+
+if test "$MANPAGE_ALIASES" != no ; then
+cat >>$cf_edit_man <<CF_EOF
+ aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
+CF_EOF
+fi
+
+if test "$MANPAGE_RENAMES" = no ; then
+cat >>$cf_edit_man <<CF_EOF
+ # perform program transformations for section 1 man pages
+ if test \$section = 1 ; then
+ target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+ else
+ target=\$cf_subdir\${section}/\$source
+ fi
+CF_EOF
+else
+cat >>$cf_edit_man <<CF_EOF
+ target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \[$]2}'\`
+ if test -z "\$target" ; then
+ echo '? missing rename for '\$source
+ target="\$source"
+ fi
+ target="\$cf_subdir\${section}/\${target}"
+CF_EOF
+fi
+
+ # replace variables in man page
+ ifelse($1,,,[
+ for cf_name in $1
+ do
+cat >>$cf_edit_man <<CF_EOF
+ prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
+CF_EOF
+ done
+ ])
+cat >>$cf_edit_man <<CF_EOF
+ sed -e "s,@DATADIR@,\$datadir," \\
+ -e "s,@TERMINFO@,\$TERMINFO," \\
+ -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
+CF_EOF
+
+ ifelse($1,,,[
+ for cf_name in $1
+ do
+ cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+cat >>$cf_edit_man <<CF_EOF
+ -e "s,@$cf_NAME@,\$prog_$cf_name," \\
+CF_EOF
+ done
+ ])
+
+if test -f $MANPAGE_RENAMES ; then
+cat >>$cf_edit_man <<CF_EOF
+ < \$i | sed -f $srcdir/edit_man.sed >\$TMP
+CF_EOF
+else
+cat >>$cf_edit_man <<CF_EOF
+ < \$i >\$TMP
+CF_EOF
+fi
+
+cat >>$cf_edit_man <<CF_EOF
+if test \$cf_tables = yes ; then
+ tbl \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+fi
+CF_EOF
+
+if test $with_curses_h != yes ; then
+cat >>$cf_edit_man <<CF_EOF
+ sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+
+cat >>$cf_edit_man <<CF_EOF
+ if test \$form = format ; then
+ nroff -man \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+ fi
+CF_EOF
+
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+ if test \$verb = installing ; then
+ if ( $cf_compress -f \$TMP )
+ then
+ mv \$TMP.$cf_so_strip \$TMP
+ fi
+ fi
+ target="\$target.$cf_so_strip"
+CF_EOF
+fi
+
+case "$MANPAGE_FORMAT" in #(vi
+*BSDI*)
+cat >>$cf_edit_man <<CF_EOF
+ if test \$form = format ; then
+ # BSDI installs only .0 suffixes in the cat directories
+ target="\`echo \$target|sed -e 's/\.[[1-9]]\+[[a-z]]*/.0/'\`"
+ fi
+CF_EOF
+ ;;
+esac
+
+cat >>$cf_edit_man <<CF_EOF
+ suffix=\`basename \$target | sed -e 's%^[[^.]]*%%'\`
+ if test \$verb = installing ; then
+ echo \$verb \$target
+ \$INSTALL_DATA \$TMP \$target
+ test -n "\$aliases" && (
+ cd \$cf_subdir\${section} && (
+ source=\`echo \$target |sed -e 's%^.*/\([[^/]][[^/]]*/[[^/]][[^/]]*$\)%\1%'\`
+ test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
+ target=\`basename \$target\`
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ if test "$MANPAGE_SYMLINKS" = yes ; then
+ if test -f \$cf_alias\${suffix} ; then
+ if ( cmp -s \$target \$cf_alias\${suffix} )
+ then
+ continue
+ fi
+ fi
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ $LN_S \$target \$cf_alias\${suffix}
+ elif test "\$target" != "\$cf_alias\${suffix}" ; then
+ echo ".so \$source" >\$TMP
+CF_EOF
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+ if test -n "$cf_so_strip" ; then
+ $cf_compress -f \$TMP
+ mv \$TMP.$cf_so_strip \$TMP
+ fi
+CF_EOF
+fi
+cat >>$cf_edit_man <<CF_EOF
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
+ fi
+ done
+ )
+ )
+ elif test \$verb = removing ; then
+ echo \$verb \$target
+ rm -f \$target
+ test -n "\$aliases" && (
+ cd \$cf_subdir\${section} && (
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ done
+ )
+ )
+ else
+# echo ".hy 0"
+ cat \$TMP
+ fi
+ ;;
+esac
+done
+
+if test $cf_inboth = yes ; then
+if test \$form != format ; then
+ sh \[$]0 format \$verb \$mandir \$srcdir \[$]*
+fi
+fi
+
+exit 0
+CF_EOF
+chmod 755 $cf_edit_man
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MATH_LIB version: 5 updated: 2000/05/28 01:39:10
+dnl -----------
+dnl Checks for libraries. At least one UNIX system, Apple Macintosh
+dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
+dnl AC_CHECK_LIB(m,sin), because that fails for C++.
+AC_DEFUN([CF_MATH_LIB],
+[
+AC_CACHE_CHECK(if -lm needed for math functions,
+ cf_cv_need_libm,[
+ AC_TRY_LINK([
+ #include <stdio.h>
+ #include <math.h>
+ ],
+ [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 CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
+dnl ----------------------
+dnl Check if the file-system supports mixed-case filenames. If we're able to
+dnl create a lowercase name and see it as uppercase, it doesn't support that.
+AC_DEFUN([CF_MIXEDCASE_FILENAMES],
+[
+AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
+if test "$cross_compiling" = yes ; then
+ case $target_alias in #(vi
+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+ cf_cv_mixedcase=no
+ ;;
+ *)
+ cf_cv_mixedcase=yes
+ ;;
+ esac
+else
+ rm -f conftest CONFTEST
+ echo test >conftest
+ if test -f CONFTEST ; then
+ cf_cv_mixedcase=no
+ else
+ cf_cv_mixedcase=yes
+ fi
+ rm -f conftest CONFTEST
+fi
+])
+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MKSTEMP version: 3 updated: 2001/11/08 20:59:59
+dnl ----------
+dnl Check for a working mkstemp. This creates two files, checks that they are
+dnl successfully created and distinct (AmigaOS apparently fails on the last).
+AC_DEFUN([CF_MKSTEMP],[
+AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
+rm -f conftest*
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+int main()
+{
+ char *tmpl = "conftestXXXXXX";
+ char name[2][80];
+ int n;
+ int result = 0;
+ int fd;
+ struct stat sb;
+
+ umask(077);
+ for (n = 0; n < 2; ++n) {
+ strcpy(name[n], tmpl);
+ if ((fd = mkstemp(name[n])) >= 0) {
+ if (!strcmp(name[n], tmpl)
+ || stat(name[n], &sb) != 0
+ || (sb.st_mode & S_IFMT) != S_IFREG
+ || (sb.st_mode & 077) != 0) {
+ result = 1;
+ }
+ close(fd);
+ }
+ }
+ if (result == 0
+ && !strcmp(name[0], name[1]))
+ result = 1;
+ exit(result);
+}
+],[cf_cv_func_mkstemp=yes
+],[cf_cv_func_mkstemp=no
+],[AC_CHECK_FUNC(mkstemp)
+])
+])
+if test "$cf_cv_func_mkstemp" = yes ; then
+ AC_DEFINE(HAVE_MKSTEMP)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
+dnl ----------------
+dnl Check if the given variable is a number. If not, report an error.
+dnl $1 is the variable
+dnl $2 is the message
+AC_DEFUN([CF_NUMBER_SYNTAX],[
+if test -n "$1" ; then
+ case $1 in #(vi
+ [[0-9]]*) #(vi
+ ;;
+ *)
+ AC_MSG_ERROR($2 is not a number: $1)
+ ;;
+ esac
+else
+ AC_MSG_ERROR($2 value is empty)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_OBJ_SUBDIR version: 4 updated: 2002/02/23 20:38:31
+dnl -------------
+dnl Compute the object-directory name from the given model name
+AC_DEFUN([CF_OBJ_SUBDIR],
+[
+ case $1 in
+ libtool) $2='obj_lo' ;;
+ normal) $2='objects' ;;
+ debug) $2='obj_g' ;;
+ profile) $2='obj_p' ;;
+ shared)
+ case $cf_cv_system_name in #(vi
+ cygwin) #(vi
+ $2='objects' ;;
+ *)
+ $2='obj_s' ;;
+ esac
+ esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:53
+dnl ----------
+dnl Provide a value for the $PATH and similar separator
+AC_DEFUN([CF_PATHSEP],
+[
+ case $cf_cv_system_name in
+ os2*) PATHSEP=';' ;;
+ *) PATHSEP=':' ;;
+ esac
+ifelse($1,,,[$1=$PATHSEP])
+ AC_SUBST(PATHSEP)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PATH_SYNTAX version: 9 updated: 2002/09/17 23:03:38
+dnl --------------
+dnl Check the argument to see that it looks like a pathname. Rewrite it if it
+dnl begins with one of the prefix/exec_prefix variables, and then again if the
+dnl result begins with 'NONE'. This is necessary to work around autoconf's
+dnl delayed evaluation of those symbols.
+AC_DEFUN([CF_PATH_SYNTAX],[
+case ".[$]$1" in #(vi
+.\[$]\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
+ ;;
+.\[$]{*prefix}*) #(vi
+ eval $1="[$]$1"
+ case ".[$]$1" in #(vi
+ .NONE/*)
+ $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56
+dnl ------------
+dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles.
+dnl
+dnl $1 = symbol to test
+dnl $2 = value (if any) to use for a predefinition
+AC_DEFUN([CF_PREDEFINE],
+[
+AC_MSG_CHECKING(if we must define $1)
+AC_TRY_COMPILE([#include <sys/types.h>
+],[
+#ifndef $1
+make an error
+#endif],[cf_result=no],[cf_result=yes])
+AC_MSG_RESULT($cf_result)
+
+if test "$cf_result" = yes ; then
+ CPPFLAGS="$CPPFLAGS ifelse($2,,-D$1,[-D$1=$2])"
+elif test "x$2" != "x" ; then
+ AC_MSG_CHECKING(checking for compatible value versus $2)
+ AC_TRY_COMPILE([#include <sys/types.h>
+],[
+#if $1-$2 < 0
+make an error
+#endif],[cf_result=yes],[cf_result=no])
+ AC_MSG_RESULT($cf_result)
+ if test "$cf_result" = no ; then
+ # perhaps we can override it - try...
+ CPPFLAGS="$CPPFLAGS -D$1=$2"
+ fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_CC_C_O version: 1 updated: 2004/02/14 15:00:43
+dnl --------------
+dnl Analogous to AC_PROG_CC_C_O, but more useful: tests only $CC, ensures that
+dnl the output file can be renamed, and allows for a shell variable that can
+dnl be used later. The parameter is either CC or CXX. The result is the
+dnl cache variable:
+dnl $cf_cv_prog_CC_c_o
+dnl $cf_cv_prog_CXX_c_o
+AC_DEFUN([CF_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_MSG_CHECKING([whether [$]$1 understands -c and -o together])
+AC_CACHE_VAL(cf_cv_prog_$1_c_o,
+[
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+ return 0;
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='[$]$1 -c conftest.$ac_ext -o conftest2.$ac_objext >&AC_FD_CC'
+if AC_TRY_EVAL(ac_try) &&
+ test -f conftest2.$ac_objext && AC_TRY_EVAL(ac_try);
+then
+ eval cf_cv_prog_$1_c_o=yes
+else
+ eval cf_cv_prog_$1_c_o=no
+fi
+rm -f conftest*
+])dnl
+if test $cf_cv_prog_$1_c_o = yes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
+dnl -----------
+dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
+AC_DEFUN([CF_PROG_EXT],
+[
+AC_REQUIRE([CF_CHECK_CACHE])
+case $cf_cv_system_name in
+os2*)
+ CFLAGS="$CFLAGS -Zmt"
+ CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+ CXXFLAGS="$CXXFLAGS -Zmt"
+ # autoconf's macro sets -Zexe and suffix both, which conflict:w
+ LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+ ac_cv_exeext=.exe
+ ;;
+esac
+
+AC_EXEEXT
+AC_OBJEXT
+
+PROG_EXT="$EXEEXT"
+AC_SUBST(PROG_EXT)
+test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_INSTALL version: 5 updated: 2002/12/21 22:46:07
+dnl ---------------
+dnl Force $INSTALL to be an absolute-path. Otherwise, edit_man.sh and the
+dnl misc/tabset install won't work properly. Usually this happens only when
+dnl using the fallback mkinstalldirs script
+AC_DEFUN([CF_PROG_INSTALL],
+[AC_PROG_INSTALL
+case $INSTALL in
+/*)
+ ;;
+*)
+ CF_DIRNAME(cf_dir,$INSTALL)
+ test -z "$cf_dir" && cf_dir=.
+ INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_LDCONFIG version: 1 updated: 2003/09/20 17:07:55
+dnl ----------------
+dnl Check for ldconfig, needed to fixup shared libraries that would be built
+dnl and then used in the install.
+AC_DEFUN([CF_PROG_LDCONFIG],[
+if test "$cross_compiling" = yes ; then
+ LDCONFIG=:
+else
+case "$cf_cv_system_name" in #(vi
+freebsd*) #(vi
+ test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
+ ;;
+*) LDPATH=$PATH:/sbin:/usr/sbin
+ AC_PATH_PROG(LDCONFIG,ldconfig,,$LDPATH)
+ ;;
+esac
+fi
+AC_SUBST(LDCONFIG)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_REGEX version: 3 updated: 1997/11/01 14:26:01
+dnl --------
+dnl Attempt to determine if we've got one of the flavors of regular-expression
+dnl code that we can support.
+AC_DEFUN([CF_REGEX],
+[
+AC_MSG_CHECKING([for regular-expression headers])
+AC_CACHE_VAL(cf_cv_regex,[
+AC_TRY_LINK([#include <sys/types.h>
+#include <regex.h>],[
+ regex_t *p;
+ int x = regcomp(p, "", 0);
+ int y = regexec(p, "", 0, 0, 0);
+ regfree(p);
+ ],[cf_cv_regex="regex.h"],[
+ AC_TRY_LINK([#include <regexp.h>],[
+ char *p = compile("", "", "", 0);
+ int x = step("", "");
+ ],[cf_cv_regex="regexp.h"],[
+ cf_save_LIBS="$LIBS"
+ LIBS="-lgen $LIBS"
+ AC_TRY_LINK([#include <regexpr.h>],[
+ char *p = compile("", "", "");
+ int x = step("", "");
+ ],[cf_cv_regex="regexpr.h"],[LIBS="$cf_save_LIBS"])])])
+])
+AC_MSG_RESULT($cf_cv_regex)
+case $cf_cv_regex in
+ regex.h) AC_DEFINE(HAVE_REGEX_H_FUNCS) ;;
+ regexp.h) AC_DEFINE(HAVE_REGEXP_H_FUNCS) ;;
+ regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS) ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_OPTS version: 30 updated: 2003/12/27 20:48:07
+dnl --------------
+dnl Attempt to determine the appropriate CC/LD options for creating a shared
+dnl library.
+dnl
+dnl Note: $(LOCAL_LDFLAGS) is used to link executables that will run within the
+dnl build-tree, i.e., by making use of the libraries that are compiled in ../lib
+dnl We avoid compiling-in a ../lib path for the shared library since that can
+dnl lead to unexpected results at runtime.
+dnl $(LOCAL_LDFLAGS2) has the same intention but assumes that the shared libraries
+dnl are compiled in ../../lib
+dnl
+dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure
+dnl to install symbolic links to the rel/abi versions of shared libraries.
+dnl
+dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi
+dnl version when making symbolic links.
+dnl
+dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library
+dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix
+dnl (ex: libncurses.so.<ver>).
+dnl
+dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
+AC_DEFUN([CF_SHARED_OPTS],
+[
+ AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ LD_SHARED_OPTS=
+ INSTALL_LIB="-m 644"
+
+ cf_cv_do_symlinks=no
+
+ AC_MSG_CHECKING(if release/abi version should be used for shared libs)
+ AC_ARG_WITH(shlib-version,
+ [ --with-shlib-version=X Specify rel or abi version for shared libs],
+ [test -z "$withval" && withval=auto
+ case $withval in #(vi
+ yes) #(vi
+ cf_cv_shlib_version=auto
+ ;;
+ rel|abi|auto|no) #(vi
+ cf_cv_shlib_version=$withval
+ ;;
+ *)
+ AC_ERROR([option value must be one of: rel, abi, auto or no])
+ ;;
+ esac
+ ],[cf_cv_shlib_version=auto])
+ AC_MSG_RESULT($cf_cv_shlib_version)
+
+ cf_cv_rm_so_locs=no
+
+ # Some less-capable ports of gcc support only -fpic
+ CC_SHARED_OPTS=
+ if test "$GCC" = yes
+ 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 <stdio.h>],[int x = 1],[break],[])
+ done
+ AC_MSG_RESULT($CC_SHARED_OPTS)
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ cf_cv_shlib_version_infix=no
+
+ case $cf_cv_system_name in
+ beos*)
+ MK_SHARED_LIB='$(CC) -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
+ ;;
+ cygwin*)
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
+ cf_cv_shlib_version=cygdll
+ cf_cv_shlib_version_infix=cygdll
+ ;;
+ darwin*)
+ EXTRA_CFLAGS="-no-cpp-precomp"
+ CC_SHARED_OPTS="-dynamic"
+ MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $[@]` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
+ cf_cv_shlib_version_infix=yes
+ ;;
+ hpux*)
+ # (tested with gcc 2.7.2 -- I don't have c89)
+ if test "$GCC" = yes; then
+ LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
+ else
+ CC_SHARED_OPTS='+Z'
+ LD_SHARED_OPTS='-Wl,+b,$(libdir)'
+ fi
+ MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $[@]'
+ # HP-UX shared libraries must be executable, and should be
+ # readonly to exploit a quirk in the memory manager.
+ INSTALL_LIB="-m 555"
+ ;;
+ irix*)
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+ fi
+ # tested with IRIX 5.2 and 'cc'.
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $[@]` -o $[@]'
+ cf_cv_rm_so_locs=yes
+ ;;
+ linux*|gnu*|k*bsd*-gnu)
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $[@]'
+ ;;
+ openbsd2*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $[@].$(ABI_VERSION)` -o $[@]'
+ ;;
+ freebsd[[45]]*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $[@]` -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+
+# This doesn't work - I keep getting spurious references to needing
+# libncurses.so.5.3 when ldd says it's resolved. LOCAL_LDFLAGS2 seems to be
+# no longer used anyway. And the rpath logic isn't relative - so I have to
+# add the local and install lib-directories:
+#
+# if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
+# LOCAL_LDFLAGS="-rpath `pwd`/lib"
+# LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
+# cf_ld_rpath_opt="-rpath "
+# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+# fi
+ ;;
+ openbsd*|freebsd*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='$(LD) -Bshareable -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ netbsd*)
+ 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,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+ 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
+ ;;
+ osf*|mls+*)
+ # 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).
+ MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $[@]`'
+ case $host_os in
+ osf4*)
+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
+ ;;
+ esac
+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-rpath"
+ # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
+ # tested with osr5.0.5
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-belf -KPIC'
+ fi
+ 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
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ LINK_PROGS='LD_RUN_PATH=$(libdir)'
+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
+ ;;
+ sunos4*)
+ # tested with SunOS 4.1.1 and gcc 2.7.0
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -assert pure-text -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ solaris2*)
+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-R"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ sysv5uw7*|unix_sv*)
+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -d y -G -o [$]@'
+ ;;
+ *)
+ CC_SHARED_OPTS='unknown'
+ MK_SHARED_LIB='echo unknown'
+ ;;
+ esac
+
+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
+ case "$cf_cv_shlib_version" in #(vi
+ rel|abi)
+ case "$MK_SHARED_LIB" in #(vi
+ *'-o $[@]')
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ ;;
+ *)
+ AC_MSG_WARN(ignored --with-shlib-version)
+ ;;
+ esac
+ ;;
+ esac
+
+ if test -n "$cf_ld_rpath_opt" ; then
+ AC_MSG_CHECKING(if we need a space after rpath option)
+ cf_save_LIBS="$LIBS"
+ LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
+ AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)
+ LIBS="$cf_save_LIBS"
+ AC_MSG_RESULT($cf_rpath_space)
+ test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
+ MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
+ fi
+
+ AC_SUBST(CC_SHARED_OPTS)
+ AC_SUBST(LD_SHARED_OPTS)
+ AC_SUBST(MK_SHARED_LIB)
+ AC_SUBST(LINK_PROGS)
+ AC_SUBST(LINK_TESTS)
+ AC_SUBST(EXTRA_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS2)
+ AC_SUBST(INSTALL_LIB)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16
+dnl -------------
+dnl Check for definitions & structures needed for window size-changing
+dnl FIXME: check that this works with "snake" (HP-UX 10.x)
+AC_DEFUN([CF_SIZECHANGE],
+[
+AC_REQUIRE([CF_STRUCT_TERMIOS])
+AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
+ cf_cv_sizechange=unknown
+ cf_save_CPPFLAGS="$CPPFLAGS"
+
+for cf_opts in "" "NEED_PTEM_H"
+do
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
+ AC_TRY_COMPILE([#include <sys/types.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#endif
+#endif
+#ifdef NEED_PTEM_H
+/* This is a workaround for SCO: they neglected to define struct winsize in
+ * termios.h -- it's only in termio.h and ptem.h
+ */
+#include <sys/stream.h>
+#include <sys/ptem.h>
+#endif
+#if !defined(sun) || !defined(HAVE_TERMIOS_H)
+#include <sys/ioctl.h>
+#endif
+],[
+#ifdef TIOCGSIZE
+ struct ttysize win; /* FIXME: what system is this? */
+ int y = win.ts_lines;
+ int x = win.ts_cols;
+#else
+#ifdef TIOCGWINSZ
+ struct winsize win;
+ int y = win.ws_row;
+ int x = win.ws_col;
+#else
+ no TIOCGSIZE or TIOCGWINSZ
+#endif /* TIOCGWINSZ */
+#endif /* TIOCGSIZE */
+ ],
+ [cf_cv_sizechange=yes],
+ [cf_cv_sizechange=no])
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ if test "$cf_cv_sizechange" = yes ; then
+ echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
+ break
+ fi
+done
+])
+if test "$cf_cv_sizechange" != no ; then
+ AC_DEFINE(HAVE_SIZECHANGE)
+ case $cf_cv_sizechange in #(vi
+ NEED*)
+ AC_DEFINE_UNQUOTED($cf_cv_sizechange )
+ ;;
+ esac
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SRC_MODULES version: 16 updated: 2004/02/14 20:18:37
+dnl --------------
+dnl For each parameter, test if the source-directory exists, and if it contains
+dnl a 'modules' file. If so, add to the list $cf_cv_src_modules which we'll
+dnl use in CF_LIB_RULES.
+dnl
+dnl This uses the configured value to make the lists SRC_SUBDIRS and
+dnl SUB_MAKEFILES which are used in the makefile-generation scheme.
+AC_DEFUN([CF_SRC_MODULES],
+[
+AC_MSG_CHECKING(for src modules)
+
+# dependencies and linker-arguments for test-programs
+TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
+if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+else
+ TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
+fi
+
+# dependencies and linker-arguments for utility-programs
+test "$with_termlib" = no && PROG_ARGS="$TEST_ARGS"
+
+cf_cv_src_modules=
+for cf_dir in $1
+do
+ if test -f $srcdir/$cf_dir/modules; then
+
+ # We may/may not have tack in the distribution, though the
+ # makefile is.
+ if test $cf_dir = tack ; then
+ if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
+ continue
+ fi
+ fi
+
+ if test -z "$cf_cv_src_modules"; then
+ cf_cv_src_modules=$cf_dir
+ else
+ cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
+ fi
+
+ # Make the ncurses_cfg.h file record the library interface files as
+ # well. These are header files that are the same name as their
+ # directory. Ncurses is the only library that does not follow
+ # that pattern.
+ if test $cf_dir = tack ; then
+ continue
+ elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
+ 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_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ fi
+ fi
+ fi
+done
+AC_MSG_RESULT($cf_cv_src_modules)
+TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
+AC_SUBST(TEST_DEPS)
+AC_SUBST(TEST_ARGS)
+
+PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
+AC_SUBST(PROG_ARGS)
+
+SRC_SUBDIRS="man include"
+for cf_dir in $cf_cv_src_modules
+do
+ SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
+done
+
+ADA_SUBDIRS=
+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
+
+SUB_MAKEFILES=
+for cf_dir in $SRC_SUBDIRS
+do
+ SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
+done
+
+if test -n "$ADA_SUBDIRS"; then
+ for cf_dir in $ADA_SUBDIRS
+ do
+ SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
+ done
+ AC_SUBST(ADA_SUBDIRS)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_STDCPP_LIBRARY version: 5 updated: 2000/08/12 23:18:52
+dnl -----------------
+dnl Check for -lstdc++, which is GNU's standard C++ library.
+AC_DEFUN([CF_STDCPP_LIBRARY],
+[
+if test -n "$GXX" ; then
+case $cf_cv_system_name in #(vi
+os2*) #(vi
+ cf_stdcpp_libname=stdcpp
+ ;;
+*)
+ cf_stdcpp_libname=stdc++
+ ;;
+esac
+AC_CACHE_CHECK(for library $cf_stdcpp_libname,cf_cv_libstdcpp,[
+ cf_save="$LIBS"
+ LIBS="$LIBS -l$cf_stdcpp_libname"
+AC_TRY_LINK([
+#include <strstream.h>],[
+char buf[80];
+strstreambuf foo(buf, sizeof(buf))
+],
+ [cf_cv_libstdcpp=yes],
+ [cf_cv_libstdcpp=no])
+ LIBS="$cf_save"
+])
+test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_STRIP_G_OPT version: 3 updated: 2002/12/21 19:25:52
+dnl --------------
+dnl Remove "-g" option from the compiler options
+AC_DEFUN([CF_STRIP_G_OPT],
+[$1=`echo ${$1} | sed -e 's%-g %%' -e 's%-g$%%'`])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_STRUCT_SIGACTION version: 3 updated: 2000/08/12 23:18:52
+dnl -------------------
+dnl Check if we need _POSIX_SOURCE defined to use struct sigaction. We'll only
+dnl do this if we've found the sigaction function.
+dnl
+dnl If needed, define SVR4_ACTION.
+AC_DEFUN([CF_STRUCT_SIGACTION],[
+if test "$ac_cv_func_sigaction" = yes; then
+AC_MSG_CHECKING(whether sigaction needs _POSIX_SOURCE)
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <signal.h>],
+ [struct sigaction act],
+ [sigact_bad=no],
+ [
+AC_TRY_COMPILE([
+#define _POSIX_SOURCE
+#include <sys/types.h>
+#include <signal.h>],
+ [struct sigaction act],
+ [sigact_bad=yes
+ AC_DEFINE(SVR4_ACTION)],
+ [sigact_bad=unknown])])
+AC_MSG_RESULT($sigact_bad)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_STRUCT_TERMIOS version: 5 updated: 2000/11/04 12:22:46
+dnl -----------------
+dnl Some machines require _POSIX_SOURCE to completely define struct termios.
+dnl If so, define SVR4_TERMIO
+AC_DEFUN([CF_STRUCT_TERMIOS],[
+AC_CHECK_HEADERS( \
+termio.h \
+termios.h \
+unistd.h \
+)
+if test "$ISC" = yes ; then
+ AC_CHECK_HEADERS( sys/termio.h )
+fi
+if test "$ac_cv_header_termios_h" = yes ; then
+ case "$CFLAGS $CPPFLAGS" in
+ *-D_POSIX_SOURCE*)
+ termios_bad=dunno ;;
+ *) termios_bad=maybe ;;
+ esac
+ if test "$termios_bad" = maybe ; then
+ AC_MSG_CHECKING(whether termios.h needs _POSIX_SOURCE)
+ AC_TRY_COMPILE([#include <termios.h>],
+ [struct termios foo; int x = foo.c_iflag],
+ termios_bad=no, [
+ AC_TRY_COMPILE([
+#define _POSIX_SOURCE
+#include <termios.h>],
+ [struct termios foo; int x = foo.c_iflag],
+ termios_bad=unknown,
+ termios_bad=yes AC_DEFINE(SVR4_TERMIO))
+ ])
+ AC_MSG_RESULT($termios_bad)
+ fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SUBST version: 2 updated: 1997/09/06 23:41:28
+dnl --------
+dnl Shorthand macro for substituting things that the user may override
+dnl with an environment variable.
+dnl
+dnl $1 = long/descriptive name
+dnl $2 = environment variable
+dnl $3 = default value
+AC_DEFUN([CF_SUBST],
+[AC_CACHE_VAL(cf_cv_subst_$2,[
+AC_MSG_CHECKING(for $1 (symbol $2))
+test -z "[$]$2" && $2=$3
+AC_MSG_RESULT([$]$2)
+AC_SUBST($2)
+cf_cv_subst_$2=[$]$2])
+$2=${cf_cv_subst_$2}
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SUBST_NCURSES_VERSION version: 7 updated: 2003/06/07 16:22:51
+dnl ------------------------
+dnl Get the version-number for use in shared-library naming, etc.
+AC_DEFUN([CF_SUBST_NCURSES_VERSION],
+[
+NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
+NCURSES_MINOR="`egrep '^NCURSES_MINOR[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
+NCURSES_PATCH="`egrep '^NCURSES_PATCH[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
+cf_cv_abi_version=${NCURSES_MAJOR}
+cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
+dnl Show the computed version, for logging
+cf_cv_timestamp=`date`
+AC_MSG_RESULT(Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp))
+dnl We need these values in the generated headers
+AC_SUBST(NCURSES_MAJOR)
+AC_SUBST(NCURSES_MINOR)
+AC_SUBST(NCURSES_PATCH)
+dnl We need these values in the generated makefiles
+AC_SUBST(cf_cv_rel_version)
+AC_SUBST(cf_cv_abi_version)
+AC_SUBST(cf_cv_builtin_bool)
+AC_SUBST(cf_cv_header_stdbool_h)
+AC_SUBST(cf_cv_type_of_bool)dnl
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SYS_TIME_SELECT version: 4 updated: 2000/10/04 09:18:40
+dnl ------------------
+dnl Check if we can include <sys/time.h> with <sys/select.h>; this breaks on
+dnl older SCO configurations.
+AC_DEFUN([CF_SYS_TIME_SELECT],
+[
+AC_MSG_CHECKING(if sys/time.h works with sys/select.h)
+AC_CACHE_VAL(cf_cv_sys_time_select,[
+AC_TRY_COMPILE([
+#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+],[],[cf_cv_sys_time_select=yes],
+ [cf_cv_sys_time_select=no])
+ ])
+AC_MSG_RESULT($cf_cv_sys_time_select)
+test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TYPEOF_CHTYPE version: 4 updated: 2000/10/04 09:18:40
+dnl ----------------
+dnl Determine the type we should use for chtype (and attr_t, which is treated
+dnl as the same thing). We want around 32 bits, so on most machines want a
+dnl long, but on newer 64-bit machines, probably want an int. If we're using
+dnl wide characters, we have to have a type compatible with that, as well.
+AC_DEFUN([CF_TYPEOF_CHTYPE],
+[
+AC_REQUIRE([CF_UNSIGNED_LITERALS])
+AC_MSG_CHECKING([for type of chtype])
+AC_CACHE_VAL(cf_cv_typeof_chtype,[
+ AC_TRY_RUN([
+#ifdef USE_WIDEC_SUPPORT
+#include <stddef.h> /* we want wchar_t */
+#define WANT_BITS 39
+#else
+#define WANT_BITS 31
+#endif
+#include <stdio.h>
+int main()
+{
+ FILE *fp = fopen("cf_test.out", "w");
+ if (fp != 0) {
+ char *result = "long";
+#ifdef USE_WIDEC_SUPPORT
+ /*
+ * If wchar_t is smaller than a long, it must be an int or a
+ * short. We prefer not to use a short anyway.
+ */
+ if (sizeof(unsigned long) > sizeof(wchar_t))
+ result = "int";
+#endif
+ if (sizeof(unsigned long) > sizeof(unsigned int)) {
+ int n;
+ unsigned int x;
+ for (n = 0; n < WANT_BITS; n++) {
+ unsigned int y = (x >> n);
+ if (y != 1 || x == 0) {
+ x = 0;
+ break;
+ }
+ }
+ /*
+ * If x is nonzero, an int is big enough for the bits
+ * that we want.
+ */
+ result = (x != 0) ? "int" : "long";
+ }
+ fputs(result, fp);
+ fclose(fp);
+ }
+ exit(0);
+}
+ ],
+ [cf_cv_typeof_chtype=`cat cf_test.out`],
+ [cf_cv_typeof_chtype=long],
+ [cf_cv_typeof_chtype=long])
+ rm -f cf_test.out
+ ])
+AC_MSG_RESULT($cf_cv_typeof_chtype)
+
+AC_SUBST(cf_cv_typeof_chtype)
+AC_DEFINE_UNQUOTED(TYPEOF_CHTYPE,$cf_cv_typeof_chtype)
+
+cf_cv_1UL="1"
+test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
+test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
+AC_SUBST(cf_cv_1UL)
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TYPE_SIGACTION version: 3 updated: 2000/08/12 23:18:52
+dnl -----------------
+dnl
+AC_DEFUN([CF_TYPE_SIGACTION],
+[
+AC_MSG_CHECKING([for type sigaction_t])
+AC_CACHE_VAL(cf_cv_type_sigaction,[
+ AC_TRY_COMPILE([
+#include <signal.h>],
+ [sigaction_t x],
+ [cf_cv_type_sigaction=yes],
+ [cf_cv_type_sigaction=no])])
+AC_MSG_RESULT($cf_cv_type_sigaction)
+test "$cf_cv_type_sigaction" = yes && AC_DEFINE(HAVE_TYPE_SIGACTION)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_UNSIGNED_LITERALS version: 2 updated: 1998/02/07 22:10:16
+dnl --------------------
+dnl Test if the compiler supports 'U' and 'L' suffixes. Only old compilers
+dnl won't, but they're still there.
+AC_DEFUN([CF_UNSIGNED_LITERALS],
+[
+AC_MSG_CHECKING([if unsigned literals are legal])
+AC_CACHE_VAL(cf_cv_unsigned_literals,[
+ AC_TRY_COMPILE([],[long x = 1L + 1UL + 1U + 1],
+ [cf_cv_unsigned_literals=yes],
+ [cf_cv_unsigned_literals=no])
+ ])
+AC_MSG_RESULT($cf_cv_unsigned_literals)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
+dnl --------
+dnl Make an uppercase version of a variable
+dnl $1=uppercase($2)
+AC_DEFUN([CF_UPPER],
+[
+$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14
+dnl ----------
+dnl Use AC_VERBOSE w/o the warnings
+AC_DEFUN([CF_VERBOSE],
+[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20
+dnl -------------
+dnl Check if type wide-character type $1 is declared, and if so, which header
+dnl file is needed. The second parameter is used to set a shell variable when
+dnl the type is not found. The first parameter sets a shell variable for the
+dnl opposite sense.
+AC_DEFUN([CF_WCHAR_TYPE],
+[
+# This is needed on Tru64 5.0 to declare $1
+AC_CACHE_CHECK(if we must include wchar.h to declare $1,cf_cv_$1,[
+AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif],
+ [$1 state],
+ [cf_cv_$1=no],
+ [AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif],
+ [$1 value],
+ [cf_cv_$1=yes],
+ [cf_cv_$1=unknown])])])
+
+if test "$cf_cv_$1" = yes ; then
+ AC_DEFINE(NEED_WCHAR_H)
+ NEED_WCHAR_H=1
+fi
+
+ifelse($2,,,[
+# if we do not find $1 in either place, use substitution to provide a fallback.
+if test "$cf_cv_$1" = unknown ; then
+ $2=1
+fi
+])
+ifelse($3,,,[
+# if we find $1 in either place, use substitution to provide a fallback.
+if test "$cf_cv_$1" != unknown ; then
+ $3=1
+fi
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl -------------------
+dnl Allow library's ABI to be overridden. Generally this happens when a
+dnl packager has incremented the ABI past that used in the original package,
+dnl and wishes to keep doing this.
+dnl
+dnl $1 is the package name, if any, to derive a corresponding {package}_ABI
+dnl symbol.
+AC_DEFUN([CF_WITH_ABI_VERSION],[
+test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
+AC_ARG_WITH(abi-version,
+[ --with-abi-version=XXX override derived ABI version],
+[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval)
+ cf_cv_abi_version=$withval])
+ CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version)
+ifelse($1,,,[
+$1_ABI=$cf_cv_abi_version
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_DBMALLOC version: 4 updated: 2004/02/28 05:49:27
+dnl ----------------
+dnl Configure-option for dbmalloc. The optional parameter is used to override
+dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
+AC_DEFUN([CF_WITH_DBMALLOC],[
+AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
+AC_ARG_WITH(dbmalloc,
+ [ --with-dbmalloc use Conor Cahill's dbmalloc library],
+ [with_dbmalloc=$withval],
+ [with_dbmalloc=no])
+AC_MSG_RESULT($with_dbmalloc)
+if test "$with_dbmalloc" = yes ; then
+ AC_CHECK_HEADER(dbmalloc.h,
+ [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_DMALLOC version: 4 updated: 2004/02/28 05:49:27
+dnl ---------------
+dnl Configure-option for dmalloc. The optional parameter is used to override
+dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
+AC_DEFUN([CF_WITH_DMALLOC],[
+AC_MSG_CHECKING(if you want to link with dmalloc for testing)
+AC_ARG_WITH(dmalloc,
+ [ --with-dmalloc use Gray Watson's dmalloc library],
+ [with_dmalloc=$withval],
+ [with_dmalloc=no])
+AC_MSG_RESULT($with_dmalloc)
+if test "$with_dmalloc" = yes ; then
+ AC_CHECK_HEADER(dmalloc.h,
+ [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_LIBTOOL version: 9 updated: 2004/01/16 14:55:37
+dnl ---------------
+dnl Provide a configure option to incorporate libtool. Define several useful
+dnl symbols for the makefile rules.
+dnl
+dnl The reference to AC_PROG_LIBTOOL does not normally work, since it uses
+dnl macros from libtool.m4 which is in the aclocal directory of automake.
+dnl Following is a simple script which turns on the AC_PROG_LIBTOOL macro.
+dnl But that still does not work properly since the macro is expanded outside
+dnl the CF_WITH_LIBTOOL macro:
+dnl
+dnl #!/bin/sh
+dnl ACLOCAL=`aclocal --print-ac-dir`
+dnl if test -z "$ACLOCAL" ; then
+dnl echo cannot find aclocal directory
+dnl exit 1
+dnl elif test ! -f $ACLOCAL/libtool.m4 ; then
+dnl echo cannot find libtool.m4 file
+dnl exit 1
+dnl fi
+dnl
+dnl LOCAL=aclocal.m4
+dnl ORIG=aclocal.m4.orig
+dnl
+dnl trap "mv $ORIG $LOCAL" 0 1 2 5 15
+dnl rm -f $ORIG
+dnl mv $LOCAL $ORIG
+dnl
+dnl # sed the LIBTOOL= assignment to omit the current directory?
+dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
+dnl cat $ORIG >>$LOCAL
+dnl
+dnl autoconf-257 $*
+dnl
+AC_DEFUN([CF_WITH_LIBTOOL],
+[
+ifdef([AC_PROG_LIBTOOL],,[
+LIBTOOL=
+])
+# common library maintenance symbols that are convenient for libtool scripts:
+LIB_CREATE='$(AR) -cr'
+LIB_OBJECT='$(OBJECTS)'
+LIB_SUFFIX=.a
+LIB_PREP="$RANLIB"
+
+# symbols used to prop libtool up to enable it to determine what it should be
+# doing:
+LIB_CLEAN=
+LIB_COMPILE=
+LIB_LINK=
+LIB_INSTALL=
+LIB_UNINSTALL=
+
+AC_MSG_CHECKING(if you want to build libraries with libtool)
+AC_ARG_WITH(libtool,
+ [ --with-libtool generate libraries with libtool],
+ [with_libtool=$withval],
+ [with_libtool=no])
+AC_MSG_RESULT($with_libtool)
+if test "$with_libtool" != "no"; then
+ifdef([AC_PROG_LIBTOOL],[
+ # missing_content_AC_PROG_LIBTOOL{{
+ AC_PROG_LIBTOOL
+ # missing_content_AC_PROG_LIBTOOL}}
+],[
+ if test "$with_libtool" != "yes" ; then
+ CF_PATH_SYNTAX(with_libtool)
+ LIBTOOL=$with_libtool
+ else
+ AC_PATH_PROG(LIBTOOL,libtool)
+ fi
+ if test -z "$LIBTOOL" ; then
+ AC_MSG_ERROR(Cannot find libtool)
+ fi
+])dnl
+ LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
+ LIB_OBJECT='$(OBJECTS:.o=.lo)'
+ LIB_SUFFIX=.la
+ LIB_CLEAN='$(LIBTOOL) --mode=clean'
+ LIB_COMPILE='$(LIBTOOL) --mode=compile'
+ LIB_LINK='$(LIBTOOL) --mode=link'
+ LIB_INSTALL='$(LIBTOOL) --mode=install'
+ LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
+ LIB_PREP=:
+
+ # Show the version of libtool
+ AC_MSG_CHECKING(version of libtool)
+
+ # Save the version in a cache variable - this is not entirely a good
+ # thing, but the version string from libtool is very ugly, and for
+ # bug reports it might be useful to have the original string.
+ cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
+ AC_MSG_RESULT($cf_cv_libtool_version)
+ if test -z "$cf_cv_libtool_version" ; then
+ AC_MSG_ERROR(This is not libtool)
+ fi
+
+ # special hack to add --tag option for C++ compiler
+ case $cf_cv_libtool_version in
+ 1.[[5-9]]*|[[2-9]]*)
+ LIBTOOL_CXX="$LIBTOOL --tag=CXX"
+ ;;
+ *)
+ LIBTOOL_CXX="$LIBTOOL"
+ ;;
+ esac
+else
+ LIBTOOL=""
+ LIBTOOL_CXX=""
+fi
+
+test -z "$LIBTOOL" && ECHO_LT=
+
+AC_SUBST(LIBTOOL)
+AC_SUBST(LIBTOOL_CXX)
+
+AC_SUBST(LIB_CREATE)
+AC_SUBST(LIB_OBJECT)
+AC_SUBST(LIB_SUFFIX)
+AC_SUBST(LIB_PREP)
+
+AC_SUBST(LIB_CLEAN)
+AC_SUBST(LIB_COMPILE)
+AC_SUBST(LIB_LINK)
+AC_SUBST(LIB_INSTALL)
+AC_SUBST(LIB_UNINSTALL)
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_PATH version: 6 updated: 1998/10/11 00:40:17
+dnl ------------
+dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
+dnl defaulting to yes/no.
+dnl
+dnl $1 = option name
+dnl $2 = help-text
+dnl $3 = environment variable to set
+dnl $4 = default value, shown in the help-message, must be a constant
+dnl $5 = default value, if it's an expression & cannot be in the help-message
+dnl
+AC_DEFUN([CF_WITH_PATH],
+[AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
+ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl
+CF_PATH_SYNTAX(withval)
+eval $3="$withval"
+AC_SUBST($3)dnl
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_PATHLIST version: 5 updated: 2001/12/10 01:28:30
+dnl ----------------
+dnl Process an option specifying a list of colon-separated paths.
+dnl
+dnl $1 = option name
+dnl $2 = help-text
+dnl $3 = environment variable to set
+dnl $4 = default value, shown in the help-message, must be a constant
+dnl $5 = default value, if it's an expression & cannot be in the help-message
+dnl $6 = flag to tell if we want to define or substitute
+dnl
+AC_DEFUN([CF_WITH_PATHLIST],[
+AC_REQUIRE([CF_PATHSEP])
+AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
+ifelse($4,,[withval=${$3}],[withval=${$3-ifelse($5,,$4,$5)}]))dnl
+
+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
+cf_dst_path=
+for cf_src_path in $withval
+do
+ CF_PATH_SYNTAX(cf_src_path)
+ test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
+ cf_dst_path="${cf_dst_path}${cf_src_path}"
+done
+IFS="$ac_save_ifs"
+
+ifelse($6,define,[
+# Strip single quotes from the value, e.g., when it was supplied as a literal
+# for $4 or $5.
+case $cf_dst_path in #(vi
+\'*)
+ cf_dst_path=`echo $cf_dst_path |sed -e s/\'// -e s/\'\$//`
+ ;;
+esac
+cf_dst_path=`echo "$cf_dst_path" | sed -e 's/\\\\/\\\\\\\\/g'`
+])
+
+eval '$3="$cf_dst_path"'
+AC_SUBST($3)dnl
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl -------------------
+dnl Allow library's release-version to be overridden. Generally this happens when a
+dnl packager has incremented the release-version past that used in the original package,
+dnl and wishes to keep doing this.
+dnl
+dnl $1 is the package name, if any, to derive corresponding {package}_MAJOR
+dnl and {package}_MINOR symbols
+dnl symbol.
+AC_DEFUN([CF_WITH_REL_VERSION],[
+test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
+AC_ARG_WITH(rel-version,
+[ --with-rel-version=XXX override derived release version],
+[AC_MSG_WARN(overriding release version $cf_cv_rel_version to $withval)
+ cf_cv_rel_version=$withval])
+ifelse($1,,[
+ CF_NUMBER_SYNTAX($cf_cv_rel_version,Release version)
+],[
+ $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
+ $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'`
+ CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version)
+ CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version)
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_SYSMOUSE version: 2 updated: 2003/03/22 19:13:43
+dnl ----------------
+dnl If we can compile with sysmouse, make it available unless it is not wanted.
+AC_DEFUN([CF_WITH_SYSMOUSE],[
+# not everyone has "test -c"
+if test -c /dev/sysmouse 2>/dev/null ; then
+AC_MSG_CHECKING(if you want to use sysmouse)
+AC_ARG_WITH(sysmouse,
+ [ --with-sysmouse use sysmouse (FreeBSD console)],
+ [cf_with_sysmouse=$withval],
+ [cf_with_sysmouse=maybe])
+ if test "$cf_with_sysmouse" != no ; then
+ AC_TRY_COMPILE([
+#include <osreldate.h>
+#if (__FreeBSD_version >= 400017)
+#include <sys/consio.h>
+#include <sys/fbio.h>
+#else
+#include <machine/console.h>
+#endif
+],[
+ struct mouse_info the_mouse;
+ ioctl(0, CONS_MOUSECTL, &the_mouse);
+],[cf_with_sysmouse=yes],[cf_with_sysmouse=no])
+ fi
+AC_MSG_RESULT($cf_with_sysmouse)
+test "$cf_with_sysmouse" = yes && AC_DEFINE(USE_SYSMOUSE)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_XOPEN_SOURCE version: 13 updated: 2004/08/22 12:16:05
+dnl ---------------
+dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
+dnl or adapt to the vendor's definitions to get equivalent functionality.
+AC_DEFUN([CF_XOPEN_SOURCE],[
+
+cf_XOPEN_SOURCE=ifelse($1,,500,$1)
+cf_POSIX_C_SOURCE=ifelse($2,,199506,$2)
+
+case $host_os in #(vi
+freebsd*) #(vi
+ # 5.x headers associate
+ # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112
+ # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506
+ cf_POSIX_C_SOURCE=200112
+ cf_XOPEN_SOURCE=600
+ CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+hpux*) #(vi
+ CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+ ;;
+irix6.*) #(vi
+ CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+ ;;
+linux*|gnu*) #(vi
+ CF_GNU_SOURCE
+ ;;
+mirbsd*) #(vi
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+ ;;
+netbsd*) #(vi
+ # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ ;;
+openbsd*) #(vi
+ # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+ ;;
+osf[[45]]*) #(vi
+ CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+ ;;
+sco*) #(vi
+ # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ ;;
+solaris*) #(vi
+ CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+ ;;
+*)
+ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_cv_xopen_source=yes])
+ CPPFLAGS="$cf_save"
+ ])
+])
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+
+ # FreeBSD 5.x headers demand this...
+ AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_xopen_source,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _POSIX_C_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_cv_xopen_source=yes])
+ CPPFLAGS="$cf_save"
+ ])
+])
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+esac
+])
diff --git a/Build/source/libs/ncurses/announce.html.in b/Build/source/libs/ncurses/announce.html.in
new file mode 100644
index 00000000000..11fb87c3547
--- /dev/null
+++ b/Build/source/libs/ncurses/announce.html.in
@@ -0,0 +1,569 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
+<!--
+ $Id: announce.html.in,v 1.53 2004/01/18 01:27:26 tom Exp $
+-->
+<HTML>
+<HEAD>
+<TITLE>Announcing ncurses @VERSION@</TITLE>
+<link rev=made href="mailto:bug-ncurses@gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</HEAD>
+<BODY>
+
+<H1>Announcing ncurses @VERSION@</H1>
+
+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.<P>
+
+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.<P>
+
+The ncurses code was developed under GNU/Linux.
+It has been in use for some time with OpenBSD as the system curses library,
+and on FreeBSD and NetBSD as an external package.
+It should port easily to any ANSI/POSIX-conforming UNIX.
+It has even been ported to OS/2 Warp!<P>
+
+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.<P>
+
+The ncurses distribution is available via anonymous FTP at
+the GNU distribution site
+<A HREF="ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</A>&nbsp;.
+<br>It is also available at
+<A HREF="ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</A>&nbsp;.
+
+<H1>Release Notes</H1>
+
+This release is designed to be upward compatible from ncurses 5.0 and 5.3;
+very few applications will require recompilation, depending on the platform.
+These are the highlights from the change-log since ncurses 5.3 release.
+<p>
+Interface changes:
+<ul>
+ <li>add the remaining functions for X/Open curses wide-character
+ support.
+ <ul>
+ <li>pecho_wchar()
+ <li>slk_wset()
+ </ul>
+ These are only available if the library is configured using the
+ <kbd>--enable-widec</kbd> option.
+
+ <li>write <code>getyx()</code> and related 2-return macros in terms of
+ <code>getcury()</code>,
+ <code>getcurx()</code>, etc.
+
+ <li>simplify ifdef for <code>bool</code> declaration in curses.h
+
+ <li>modify ifdef's in curses.h that disabled use of
+ <code>__attribute__()</code> for g++, since recent versions
+ implement the cases which ncurses uses.
+
+ <li>add <code>key_defined()</code> function, to tell which keycode a
+ string is bound to.
+</ul>
+New features and improvements:
+<ul>
+ <li>library
+ <ul>
+ <li>implement logic in lib_mouse.c to handle position reports which
+ are generated when XFree86 xterm is initialized with private
+ modes 1002 or 1003. These are returned to the application as the
+ REPORT_MOUSE_POSITION mask, which was not implemented.
+ <li>modify soft-key initialization to use A_REVERSE if A_STANDOUT
+ would not be shown when colors are used, i.e., if ncv#1 is set in
+ the terminfo as is done in "screen".
+ <li>add configure option for FreeBSD sysmouse, --with-sysmouse, and
+ implement library support for that.
+ </ul>
+
+ <li>programs:
+
+ <ul>
+ <li>tack:
+
+ <ul>
+ <li>allow it to run from fallback terminfo data.
+ <li>reset colors after each color test, correct a place
+ where <code>exit_standout_mode</code> was used instead of
+ <code>exit_attribute_mode</code>.
+ <li>improve <code>bce</code> test by making it set colors other
+ than black on white.
+ </ul>
+
+ <li>tic:
+
+ <ul>
+ <li>handle a case where an entry has no
+ description, and capabilities begin on the same line as the entry
+ name.
+ <li>allow a terminfo entry with a leading 2-character name.
+ <li>improved warnings when suppressing items to fit in termcap's
+ 1023-byte limit.
+ <li>add check for multiple "tc=" clauses in a termcap.
+ <li>correct logic for resolving "use=" clauses
+ allow infocmp and tic to show cancelled capabilities.
+ <li>check for incomplete line-drawing character mapping.
+ <li>check for missing/empty/illegal terminfo name.
+ </ul>
+
+ <li>tput:
+ <ul>
+ <li>modify tput to use the same parameter analysis as tparm() does,
+ to provide for user-defined strings, e.g., for xterm title, a
+ corresponding capability might be
+ title=\E]2;%p1%s^G,
+ </ul>
+
+ <li>tset:
+
+ <ul>
+ <li>use the system's default values for CKILL and other default
+ control characters.
+ <li>correct interchanged defaults for kill and interrupt
+ characters, which caused it to report unnecessarily.
+ </ul>
+
+ </ul>
+</ul>
+Major bug fixes:
+<ul>
+ <li>prevent recursion in wgetch() via wgetnstr() if the connection
+ cannot be switched between cooked/raw modes because it is not a TTY.
+
+ <li>correct a case in _nc_remove_string(), used by
+ <code>define_key()</code>, to avoid infinite loop if the given string
+ happens to be a substring of other strings which are assigned to keys.
+
+ <li>modify logic of acsc to use the original character if no mapping is
+ defined, rather than a null.
+
+ <li>several improvements for handling multi-cell display of wide
+ characters.
+ <ul>
+ <li>modify setcchar() to allow converting control characters to complex
+ characters.
+ <li>correct handling of multibyte characters in waddch_literal() which
+ force wrapping because they are started too late on the line.
+ <li>modify setcchar() to allow for wchar_t input strings that have
+ more than one spacing character.
+ </ul>
+
+ <li>other fixes for wide-character support:
+ <ul>
+ <li>rewrote lib_acs.c to allow PutAttrChar() to decide how to render
+ alternate-characters, i.e., to work with Linux console and UTF-8
+ locale.
+ <li>implement a workaround so that line-drawing works with screen's
+ crippled UTF-8 support (tested with 3.9.13). This only works with
+ the wide-character support (--enable-widec); the normal library
+ will simply suppress line-drawing when running in a UTF-8 locale in
+ screen.
+ <li>corrections to lib_get_wstr.c:
+ <ul>
+ <li>null-terminate buffer passed to setcchar(), which occasionally
+ failed.
+ <li>map special characters such as erase- and kill-characters into
+ key-codes so those will work as expected even if they are not
+ mentioned in the terminfo.
+ </ul>
+ </ul>
+
+ <li>modify <code>setupterm()</code> to check if the terminfo and
+ terminal-modes have already been read. This ensures that it does not
+ reinvoke <code>def_prog_mode()</code> when an application calls more
+ than one function, such as <code>tgetent()</code> and
+ <code>initscr()</code>.
+
+ <li>fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, REQ_DEL_CHAR,
+ REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure the cursor was at
+ the editing position before making modifications.
+
+ <li>correct <code>keybound()</code>, which reported definitions in the
+ wrong table, i.e., the list of definitions which are disabled by
+ <code>keyok()</code>.
+
+ <li>fixes related to safe_sprintf.c:
+ <ul>
+ <li>correct an allocation size in safe_sprintf.c for the "*" format
+ code.
+ <li>correct safe_sprintf.c to not return a null pointer if the format
+ happens to be an empty string.
+ <li>make return value from _nc_printf_string() consistent. Before,
+ depending on whether --enable-safe-sprintf was used, it might not
+ be cached for reallocating.
+ </ul>
+
+ <li>other low-level improvements to the optimization code include:
+ <ul>
+ <li>if the output is a socket or other non-tty device, use 1
+ millisecond
+ for the cost in mvcur; previously it was 9 milliseconds because the
+ baudrate was not known.
+ <li>modify lib_getch.c to avoid recursion via wgetnstr() when the
+ input
+ is not a tty and consequently mode-changes do not work.
+ <li>fix several places in tack/pad.c which tested and used the
+ parameter- and parameterless strings inconsistently.
+ <li>change several tputs() calls in scrolling code to use putp(), to
+ enable padding which may be needed for some terminals.
+ <li>improve mvcur() by checking if it is safe to move when video
+ attributes are set (msgr), and if not, reset/restore attributes
+ within that function rather than doing it separately in the GoTo()
+ function in tty_update.c.
+ <li>use tputs() rather than putp() in a few cases in tty_update.c
+ since the corresponding delays are proportional to the number of
+ lines affected: repeat_char, clr_eos, change_scroll_region.
+ </ul>
+
+ <li>correct line/column reference in adjust_window(), needed to make
+ special windows such as curscr track properly when resizing.
+
+ <li>fix a potential recursion between napms() and _nc_timed_wait()
+
+ <li>rewrote lib_insch.c, combining it with lib_insstr.c so both handle
+ tab and other control characters consistently.
+
+ <li>do not try to open gpm mouse driver if standard output is not a
+ tty; the gpm library does not make this check.
+</ul>
+
+Portability:
+<ul>
+ <li>configure script:
+ <ul>
+ <li>new options:
+ <dl>
+ <dt>--with-abi-version option.
+ <dd>addresses platforms where packagers have diverged from
+ ncurses ABI numbering.
+ <dt>--with-manpage-format=catonly
+ <dd>addresses
+ behavior of BSDI, allow install of man+cat files on NetBSD,
+ whose behavior has diverged by requiring both to be present.
+ <dt>--with-manpage-aliases
+ <dd>extends
+ "--with-manpage-aliases" to provide the option of generating
+ ".so" files rather than symbolic links for manpage aliases.
+ <dt>--with-rel-version
+ <dd>workaround to force
+ libtool on Darwin generate the "same" library names as with
+ the "--with-shared" option. The Darwin ld program does not
+ work well with a zero as the minor-version value.
+ <dt>--with-trace
+ <dd>simplifies defining TRACE to incorporate trace() in libraries.
+ </dl>
+
+ <li>fixes/improvements for cross-compiling:
+
+ <ul>
+ <li>allow BUILD_CC and related configure script variables to be
+ overridden from the environment.
+ <li>use AC_CHECK_TOOL to get proper values for AR and LD for cross
+ compiling.
+ <li>use <code>$cross_compiling</code> variable in configure script
+ rather than comparing <code>$host_alias</code> and
+ <code>$target</code> alias, since "host" is traditionally misused
+ in autoconf to refer to the target platform.
+ <li>modify run_tic.in to avoid using wrong shared libraries when
+ cross-compiling.
+ </ul>
+
+ <li>fixes for Mac OS X:
+ <ul>
+ <li>fix a redefinition of <code>$RANLIB</code> in the configure
+ script when libtool is used.
+ <li>modify MKlib_gen.sh to avoid passing "#" tokens through the C
+ preprocessor. This works around Mac OS X's preprocessor, which
+ insists on adding a blank on each side of the token.
+ </ul>
+
+ <li>workarounds for broken tools:
+ <ul>
+ <li>add configure check for wchar_t and wint_t types, rather than
+ rely on preprocessor definitions. Also work around for gcc
+ <code>fixinclude</code> bug which creates a shadow copy of
+ curses.h if it sees these symbols apparently typedef'd.
+ <li>modify configure script to omit -Winline for gcc 3.3, since
+ that feature is broken.
+ <li>several script fixes to work around the ironically named
+ <em>POSIXLY_CORRECT</em> feature of GNU sed 4.0.
+ <li>modify configure script to avoid using "head -1", which does
+ not work if POSIXLY_CORRECT (sic) is set.
+ <li>update configure script to reflect fix for
+ AC_PROG_GCC_TRADITIONAL, which is broken in autoconf 2.5x for Mac
+ OS X 10.2.3.
+ <li>repair check for missing C++ compiler, which is broken in
+ autoconf 2.5x by hardcoding it to g++.
+ </ul>
+
+ <li>corrected ifdef's relating to configure check for wchar_t, etc.
+ <li>remove configure script check to allow -Wconversion for older
+ versions of gcc
+ <li>modify configure script to accommodate libtool 1.5, as well as
+ add an parameter to the "--with-libtool" option which can specify
+ the pathname of libtool.
+ <li>change several sed scripts to avoid using "\+" since it is not a
+ BRE (basic regular expression). One instance caused terminfo.5 to
+ be misformatted on FreeBSD.
+ <li>use '%' as sed substitute delimiter in run_tic script to avoid
+ problems with pathname delimiters such as ':' and '@'.
+ <li>add -D_XOPEN_SOURCE=500 if needed when configuring with
+ "--enable-widec", to get <code>mbstate_t</code> declaration on HPUX
+ 11.11.
+ </ul>
+
+ <li>library:
+ <ul>
+ <li>adjust include-options in CF_ETIP_DEFINES to avoid missing
+ ncurses_dll.h, fixing special definitions that may be needed for
+ etip.h.
+ <li>modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use a
+ ".so" suffix.
+ <li>improve ifdef's to guard against redefinition of wchar_t and wint_t
+ in curses.h.
+ <li>remove an #undef for KEY_EVENT from curses.tail used in the
+ experimental NCURSES_WGETCH_EVENTS feature. The #undef confuses
+ Debian <code>dpkg</code>'s build script.
+ </ul>
+</ul>
+
+<H1>Features of Ncurses</H1>
+
+The ncurses package is fully compatible with SVr4 (System V Release 4) curses:
+
+<UL>
+<LI>All 257 of the SVr4 calls have been implemented (and are documented).
+<LI>Full support for SVr4 curses features including keyboard mapping, color,
+forms-drawing with ACS characters, and automatic recognition of keypad
+and function keys.
+<LI>An emulation of the SVr4 panels library, supporting
+a stack of windows with backing store, is included.
+<LI>An emulation of the SVr4 menus library, supporting
+a uniform but flexible interface for menu programming, is included.
+<LI>An emulation of the SVr4 form library, supporting
+data collection through on-screen forms, is included.
+<LI>Binary terminfo entries generated by the ncurses tic(1) implementation
+are bit-for-bit-compatible with the entry format SVr4 curses uses.
+<LI>The utilities have options to allow you to filter terminfo
+entries for use with less capable <STRONG>curses</STRONG>/<STRONG>terminfo</STRONG>
+versions such as the HP/UX and AIX ports.</UL>
+
+The ncurses package also has many useful extensions over SVr4:
+
+<UL>
+<LI>The API is 8-bit clean and base-level conformant with the X/OPEN curses
+specification, XSI curses (that is, it implements all BASE level features,
+but not all EXTENDED features). Most EXTENDED-level features not directly
+concerned with wide-character support are implemented, including many
+function calls not supported under SVr4 curses (but portability of all
+calls is documented so you can use the SVr4 subset only).
+<LI>Unlike SVr3 curses, ncurses can write to the rightmost-bottommost corner
+of the screen if your terminal has an insert-character capability.
+<LI>Ada95 and C++ bindings.
+<LI>Support for mouse event reporting with X Window xterm and OS/2 console windows.
+<LI>Extended mouse support via Alessandro Rubini's gpm package.
+<LI>The function <CODE>wresize()</CODE> allows you to resize windows, preserving
+their data.
+<LI>The function <CODE>use_default_colors()</CODE> allows you to
+use the terminal's default colors for the default color pair,
+achieving the effect of transparent colors.
+<LI>The functions <CODE>keyok()</CODE>
+and <CODE>define_key()</CODE> allow
+you to better control the use of function keys,
+e.g., disabling the ncurses KEY_MOUSE,
+or by defining more than one control sequence to map to a given key code.
+<LI>Support for 16-color terminals, such as aixterm and XFree86 xterm.
+<LI>Better cursor-movement optimization. The package now features a
+cursor-local-movement computation more efficient than either BSD's
+or System V's.
+<LI>Super hardware scrolling support. The screen-update code incorporates
+a novel, simple, and cheap algorithm that enables it to make optimal
+use of hardware scrolling, line-insertion, and line-deletion
+for screen-line movements. This algorithm is more powerful than
+the 4.4BSD curses quickch() routine.
+<LI>Real support for terminals with the magic-cookie glitch. The
+screen-update code will refrain from drawing a highlight if the magic-
+cookie unattributed spaces required just before the beginning and
+after the end would step on a non-space character. It will
+automatically shift highlight boundaries when doing so would make it
+possible to draw the highlight without changing the visual appearance
+of the screen.
+<LI>It is possible to generate the library with a list of pre-loaded
+fallback entries linked to it so that it can serve those terminal types even
+when no terminfo tree or termcap file is accessible (this may be useful
+for support of screen-oriented programs that must run in single-user mode).
+<LI>The tic(1)/captoinfo utility provided with ncurses has the
+ability to translate many termcaps from the XENIX, IBM and
+AT&amp;T extension sets.
+<LI>A BSD-like tset(1) utility is provided.
+<LI>The ncurses library and utilities will automatically read terminfo
+entries from $HOME/.terminfo if it exists, and compile to that directory
+if it exists and the user has no write access to the system directory.
+This feature makes it easier for users to have personal terminfo entries
+without giving up access to the system terminfo directory.
+<LI>You may specify a path of directories to search for compiled
+descriptions with the environment variable TERMINFO_DIRS (this
+generalizes the feature provided by TERMINFO under stock System V.)
+<LI>In terminfo source files, use capabilities may refer not just to
+other entries in the same source file (as in System V) but also to
+compiled entries in either the system terminfo directory or the user's
+$HOME/.terminfo directory.
+<LI>A script (<STRONG>capconvert</STRONG>) is provided to help BSD users
+transition from termcap to terminfo. It gathers the information in a
+TERMCAP environment variable and/or a ~/.termcap local entries file
+and converts it to an equivalent local terminfo tree under $HOME/.terminfo.
+<LI>Automatic fallback to the /etc/termcap file can be compiled in
+when it is not possible to build a terminfo tree. This feature is neither
+fast nor cheap, you don't want to use it unless you have to,
+but it's there.
+<LI>The table-of-entries utility <STRONG>toe</STRONG> makes it easy for users to
+see exactly what terminal types are available on the system.
+<LI>The library 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
+<CODE>#undef</CODE>.
+<LI>An HTML "Introduction to Programming with NCURSES" document provides
+a narrative introduction to the curses programming interface.
+</UL>
+
+<H1>State of the Package</H1>
+
+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.<P>
+
+The ncurses code has been tested with a wide variety of applications
+including (versions starting with those noted):
+<DL>
+<DT> cdk
+<DD> Curses Development Kit
+<br>
+<A HREF="http://invisible-island.net/cdk/">http://invisible-island.net/cdk/</A>
+<br>
+<A HREF="http://www.vexus.ca/products/CDK/">http://www.vexus.ca/products/CDK/</a>
+<DT> ded
+<DD> directory-editor
+<br>
+<A HREF="http://invisible-island.net/ded/">http://invisible-island.net/ded/</A>
+<DT> dialog
+<DD> the underlying application used in Slackware's setup, and the basis
+for similar applications on GNU/Linux.
+<br>
+<A HREF="http://invisible-island.net/dialog/">http://invisible-island.net/dialog/</A>
+<DT> lynx
+<DD> the character-screen WWW browser
+<br>
+<A HREF="http://lynx.isc.org/release/">http://lynx.isc.org/release/</A>
+<DT> Midnight Commander
+<DD> file manager
+<br>
+<A HREF="http://www.ibiblio.org/mc/">http://www.ibiblio.org/mc/</A>
+<DT> mutt
+<DD> mail utility
+<br>
+<A HREF="http://www.mutt.org/">http://www.mutt.org/</A>
+<DT> ncftp
+<DD> file-transfer utility
+<br>
+<A HREF="http://www.ncftp.com/">http://www.ncftp.com/</A>
+<DT> nvi
+<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
+<br>
+<A HREF="http://www.bostic.com/vi/">http://www.bostic.com/vi/</A>
+<br>
+<DT> pinfo
+<DD> Lynx-like info browser.
+<A HREF="http://dione.ids.pl/~pborys/software/pinfo/">http://dione.ids.pl/~pborys/software/pinfo/</A>
+<DT> tin
+<DD> newsreader, supporting color, MIME
+<A HREF="http://www.tin.org/">http://www.tin.org/</A>
+<DT> vh-1.6
+<DD> Volks-Hypertext browser for the Jargon File
+<br>
+<A HREF="http://www.debian.org/Packages/unstable/text/vh.html">http://www.debian.org/Packages/unstable/text/vh.html</A>
+</DL>
+as well as some that use ncurses for the terminfo support alone:
+<DL>
+<DT> minicom
+<DD> terminal emulator
+<br>
+<A HREF="http://www.netsonic.fi/~walker/minicom.html">http://www.netsonic.fi/~walker/minicom.html</A>
+<DT> vile
+<DD> vi-like-emacs
+<br>
+<A HREF="http://invisible-island.net/vile/">http://invisible-island.net/vile/</A>
+</DL>
+<P>
+
+The ncurses distribution includes a selection of test programs (including
+a few games).
+
+<H2>Who's Who and What's What</H2>
+
+Zeyd Ben-Halim
+started it from a previous package pcurses, written by Pavel Curtis.
+Eric S. Raymond
+continued development.
+J&uuml;rgen Pfeifer wrote most of the form and menu libraries.
+Ongoing work is being done by
+<A HREF="mailto:dickey@invisible-island.net">Thomas Dickey</A>.
+Thomas Dickey
+acts as the maintainer for the Free Software Foundation,
+which holds the copyright on ncurses.
+Contact the current maintainers at
+<A HREF="mailto:bug-ncurses@gnu.org">bug-ncurses@gnu.org</A>.
+<P>
+
+To join the ncurses mailing list, please write email to
+<CODE>bug-ncurses-request@gnu.org</CODE> containing the line:
+<PRE>
+ subscribe &lt;name&gt;@&lt;host.domain&gt;
+</PRE>
+
+This list is open to anyone interested in helping with the development and
+testing of this package.<P>
+
+Beta versions of ncurses and patches to the current release are made available at
+<A HREF="ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</A>&nbsp;.
+
+<H2>Future Plans</H2>
+<UL>
+<LI>Extended-level XPG4 conformance, with internationalization support.
+<LI>Ports to more systems, including DOS and Windows.
+</UL>
+We need people to help with these projects. If you are interested in working
+on them, please join the ncurses list.
+
+<H2>Other Related Resources</H2>
+
+The distribution provides a newer version of the terminfo-format
+terminal description file maintained by
+<A HREF="http://www.catb.org/~esr/terminfo/">Eric Raymond</A>&nbsp;.
+Unlike the older version, the termcap and terminfo data are provided
+in the same file.<P>
+
+You can find lots of information on terminal-related topics
+not covered in the terminfo file at
+<A HREF="http://www.cs.utk.edu/~shuford/terminal_index.html">Richard Shuford's
+archive</A>&nbsp;.
+</BODY>
+</HTML>
+<!--
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# mode:html
+# case-fold-search:nil
+# fill-column:70
+# End:
+-->
diff --git a/Build/source/libs/ncurses/config.guess b/Build/source/libs/ncurses/config.guess
new file mode 100755
index 00000000000..d0d57f6945f
--- /dev/null
+++ b/Build/source/libs/ncurses/config.guess
@@ -0,0 +1,1465 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-09-19'
+
+# 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
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+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
+
+# 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.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ 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
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # 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 ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # 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.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ 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 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ 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
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # 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 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* 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);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ 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
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 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 i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # 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.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # 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.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ 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}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ 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
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+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: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/Build/source/libs/ncurses/config.sub b/Build/source/libs/ncurses/config.sub
new file mode 100755
index 00000000000..1c366dfde9a
--- /dev/null
+++ b/Build/source/libs/ncurses/config.sub
@@ -0,0 +1,1579 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-07-08'
+
+# 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.
+#
+# 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
+# (at your option) any later version.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# 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 <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# 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.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ 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
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ 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/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -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.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | ms1 \
+ | msp430 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m32c)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # 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*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | ms1-* \
+ | msp430-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ m32c-*)
+ ;;
+ # 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
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ 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
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ 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
+ ;;
+ 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])
+ basic_machine=hppa1.0-hp
+ ;;
+ 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
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ 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
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ 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
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# 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
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/Build/source/libs/ncurses/configure b/Build/source/libs/ncurses/configure
new file mode 100755
index 00000000000..9b6f901d628
--- /dev/null
+++ b/Build/source/libs/ncurses/configure
@@ -0,0 +1,14017 @@
+#! /bin/sh
+# From configure.in Revision: 1.324 .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by Autoconf 2.52.20030208.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+cross_compiling=no
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+ac_unique_file="ncurses/base/lib_initscr.c"
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: should be removed in autoconf 3.0.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<EOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+EOF
+
+ cat <<EOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+EOF
+
+ cat <<\EOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+EOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\EOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+
+ --with-rel-version=XXX override derived release version
+ --with-abi-version=XXX override derived ABI version
+ --with-system-type=XXX test: override derived host system-type
+ --without-progs suppress build with programs (e.g., tic)
+ --without-curses-h install curses.h as ncurses.h only
+ --with-install-prefix prefixes actual install-location ($DESTDIR)
+Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
+ --with-build-cc=XXX the build C compiler ($BUILD_CC)
+ --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
+ --with-build-cflags=XXX the build C compiler-flags
+ --with-build-cppflags=XXX the build C preprocessor-flags
+ --with-build-ldflags=XXX the build linker-flags
+ --with-build-libs=XXX the build libraries
+Options to Specify the Libraries Built/Used:
+ --with-libtool generate libraries with libtool
+ --with-shared generate shared-libraries
+ --with-normal generate normal-libraries (default)
+ --with-debug generate debug-libraries (default)
+ --with-profile generate profile-libraries
+ --with-termlib generate separate terminfo library
+ --with-dbmalloc use Conor Cahill's dbmalloc library
+ --with-dmalloc use Gray Watson's dmalloc library
+ --with-gpm use Alessandro Rubini's GPM library
+ --with-sysmouse use sysmouse (FreeBSD console)
+ --enable-rpath use rpath option when generating shared libraries
+ --with-shlib-version=X Specify rel or abi version for shared libs
+Fine-Tuning Your Configuration:
+ --disable-overwrite leave out the link to -lcurses
+ --disable-database do not use terminfo, only fallbacks/termcap
+ --with-database=XXX specify terminfo source to install
+ --with-fallbacks=XXX specify list of fallback terminal descriptions
+ --without-xterm-new specify if xterm terminfo should be old version
+ --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
+ --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
+ --disable-big-core assume machine has little memory
+ --enable-termcap compile in termcap fallback support
+ --with-termpath=XXX specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
+ --enable-getcap fast termcap load, no xrefs to terminfo
+ --enable-getcap-cache cache translated termcaps in ~/.terminfo
+ --disable-home-terminfo drop ~/.terminfo from terminfo search-path
+ --enable-symlinks make tic use symbolic links not hard links
+ --enable-broken_linker compile with broken-linker support code
+ --enable-widec compile with wide-char/UTF-8 code
+ --with-bool=TYPE override fallback type of bool variable
+ --with-caps=alt compile with alternate Caps file
+ --with-ospeed=TYPE override type of ospeed variable
+ --enable-bsdpad recognize BSD-style prefix padding
+ --with-rcs-ids compile-in RCS identifiers
+Options to Specify How Manpages are Installed:
+ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
+ optionally formatted/catonly, e.g., gzip,formatted
+ --with-manpage-renames specify manpage-renaming
+ --with-manpage-aliases specify manpage-aliases using .so
+ --with-manpage-symlinks specify manpage-aliases using symlinks
+ --with-manpage-tbl specify manpage processing with tbl
+Extensions:
+ --disable-ext-funcs disable function-extensions
+ --enable-const compile with extra/non-standard const
+ --enable-no-padding compile with $NCURSES_NO_PADDING code
+ --enable-sigwinch compile with SIGWINCH handler
+ --enable-tcap-names compile with user-definable terminal capabilities
+Development Code:
+ --with-develop enable all development options
+ --enable-hard-tabs compile with hard-tabs code
+ --disable-root-environ limit environment when running as root
+ --enable-xmc-glitch compile with limited support for xmc
+Experimental Code:
+ --disable-assumed-color do not assume anything about default-colors
+ --disable-hashmap compile without hashmap scrolling-optimization
+ --enable-colorfgbg compile with $COLORFGBG code
+ --enable-safe-sprintf compile with experimental safe-sprintf code
+ --disable-scroll-hints compile without scroll-hints code
+Testing/development Options:
+ --enable-echo build: display "compiling" commands (default)
+ --enable-warnings build: turn on GCC compiler warnings
+ --enable-assertions test: turn on generation of assertion code
+ --disable-leaks test: suppress permanent memory-leaks
+ --enable-expanded test: generate functions for certain macros
+ --disable-macros test: use functions rather than macros
+ --with-trace test: add trace() function to all models of ncurses
+Ada95 Binding Options:
+ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
+ --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
+ --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+EOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
+ cd $ac_subdir
+ # A "../" for each directory in /$ac_subdir.
+ ac_dots=`echo $ac_subdir |
+ sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
+
+ case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_sub_srcdir=$srcdir ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_sub_srcdir=$srcdir/$ac_subdir ;;
+ *) # Relative path.
+ ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
+ esac
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_sub_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_sub_srcdir/configure; then
+ echo
+ $SHELL $ac_sub_srcdir/configure --help=recursive
+ elif test -f $ac_sub_srcdir/configure.ac ||
+ test -f $ac_sub_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\EOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+EOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<EOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.52.20030208. Invocation command line was
+
+ $ $0 $@
+
+EOF
+{
+cat <<_ASUNAME
+## ---------- ##
+## Platform. ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+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 || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+} >&5
+
+cat >&5 <<EOF
+## ------------ ##
+## Core tests. ##
+## ------------ ##
+
+EOF
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
+ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ echo >&5
+ echo "## ----------------- ##" >&5
+ echo "## Cache variables. ##" >&5
+ echo "## ----------------- ##" >&5
+ echo >&5
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} >&5
+ sed "/^$/d" confdefs.h >conftest.log
+ if test -s conftest.log; then
+ echo >&5
+ echo "## ------------ ##" >&5
+ echo "## confdefs.h. ##" >&5
+ echo "## ------------ ##" >&5
+ echo >&5
+ cat conftest.log >&5
+ fi
+ (echo; echo) >&5
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal" >&5
+ echo "$as_me: exit $exit_status" >&5
+ rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:938: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ cat "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:949: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:957: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:973: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:977: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:983: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:985: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:987: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status. It doesn't matter if
+ # we pass some twice (in addition to the command line arguments).
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
+ ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:1006: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:1008: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+echo "#! $SHELL" >conftest.sh
+echo "exit 0" >>conftest.sh
+chmod +x conftest.sh
+if { (echo "$as_me:1028: PATH=\".;.\"; conftest.sh") >&5
+ (PATH=".;."; conftest.sh) 2>&5
+ ac_status=$?
+ echo "$as_me:1031: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ ac_path_separator=';'
+else
+ ac_path_separator=:
+fi
+PATH_SEPARATOR="$ac_path_separator"
+rm -f conftest.sh
+
+ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
+
+NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
+NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
+NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
+cf_cv_abi_version=${NCURSES_MAJOR}
+cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
+cf_cv_timestamp=`date`
+echo "$as_me:1048: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
+echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
+
+test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
+
+# Check whether --with-rel-version or --without-rel-version was given.
+if test "${with_rel_version+set}" = set; then
+ withval="$with_rel_version"
+ { echo "$as_me:1056: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
+echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
+ cf_cv_rel_version=$withval
+fi;
+
+ NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
+ NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
+
+if test -n "$NCURSES_MAJOR" ; then
+ case $NCURSES_MAJOR in #(vi
+ [0-9]*) #(vi
+ ;;
+ *)
+ { { echo "$as_me:1069: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
+echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+else
+ { { echo "$as_me:1075: error: Release major-version value is empty" >&5
+echo "$as_me: error: Release major-version value is empty" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$NCURSES_MINOR" ; then
+ case $NCURSES_MINOR in #(vi
+ [0-9]*) #(vi
+ ;;
+ *)
+ { { echo "$as_me:1085: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
+echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+else
+ { { echo "$as_me:1091: error: Release minor-version value is empty" >&5
+echo "$as_me: error: Release minor-version value is empty" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
+
+# Check whether --with-abi-version or --without-abi-version was given.
+if test "${with_abi_version+set}" = set; then
+ withval="$with_abi_version"
+ { echo "$as_me:1101: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
+echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
+ cf_cv_abi_version=$withval
+fi;
+
+if test -n "$cf_cv_abi_version" ; then
+ case $cf_cv_abi_version in #(vi
+ [0-9]*) #(vi
+ ;;
+ *)
+ { { echo "$as_me:1111: error: ABI version is not a number: $cf_cv_abi_version" >&5
+echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+else
+ { { echo "$as_me:1117: error: ABI version value is empty" >&5
+echo "$as_me: error: ABI version value is empty" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:1139: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:1149: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:1153: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:1162: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:1166: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1171: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+echo "$as_me:1178: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:1187: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1192: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
+ echo "$as_me:1200: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:1209: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:1214: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+ system_name="$host_os"
+else
+ system_name="`(uname -s -r) 2>/dev/null`"
+ if test -z "$system_name" ; then
+ system_name="`(hostname) 2>/dev/null`"
+ fi
+fi
+test -n "$system_name" && cat >>confdefs.h <<EOF
+#define SYSTEM_NAME "$system_name"
+EOF
+
+if test "${cf_cv_system_name+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cf_cv_system_name="$system_name"
+fi
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && echo "$as_me:1245: result: Configuring for $cf_cv_system_name" >&5
+echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+ echo "$as_me:1249: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
+ { { echo "$as_me:1251: error: \"Please remove config.cache and try again.\"" >&5
+echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Check whether --with-system-type or --without-system-type was given.
+if test "${with_system_type+set}" = set; then
+ withval="$with_system_type"
+ { echo "$as_me:1259: WARNING: overriding system type to $withval" >&5
+echo "$as_me: WARNING: overriding system type to $withval" >&2;}
+ cf_cv_system_name=$withval
+fi;
+
+### Save the given $CFLAGS to allow user-override.
+cf_user_CFLAGS="$CFLAGS"
+
+### Default install-location
+
+echo "$as_me:1269: checking for prefix" >&5
+echo $ECHO_N "checking for prefix... $ECHO_C" >&6
+if test "x$prefix" = "xNONE" ; then
+ case "$cf_cv_system_name" in
+ # non-vendor systems don't have a conflict
+ openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
+ prefix=/usr
+ ;;
+ *) prefix=$ac_default_prefix
+ ;;
+ esac
+fi
+echo "$as_me:1281: result: $prefix" >&5
+echo "${ECHO_T}$prefix" >&6
+
+if test "x$prefix" = "xNONE" ; then
+echo "$as_me:1285: checking for default include-directory" >&5
+echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
+test -n "$verbose" && echo 1>&6
+for cf_symbol in \
+ $includedir \
+ $includedir/ncurses \
+ $prefix/include \
+ $prefix/include/ncurses \
+ /usr/local/include \
+ /usr/local/include/ncurses \
+ /usr/include \
+ /usr/include/ncurses
+do
+ cf_dir=`eval echo $cf_symbol`
+ if test -f $cf_dir/curses.h ; then
+ if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
+ includedir="$cf_symbol"
+ test -n "$verbose" && echo $ac_n " found " 1>&6
+ break
+ fi
+ fi
+ test -n "$verbose" && echo " tested $cf_dir" 1>&6
+done
+echo "$as_me:1308: result: $includedir" >&5
+echo "${ECHO_T}$includedir" >&6
+fi
+
+### Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:1321: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}gcc"
+echo "$as_me:1336: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1344: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1347: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:1356: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="gcc"
+echo "$as_me:1371: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1379: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1382: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:1395: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="${ac_tool_prefix}cc"
+echo "$as_me:1410: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1418: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1421: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:1430: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="cc"
+echo "$as_me:1445: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1453: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1456: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+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 "$as_me:1469: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+fi
+ac_cv_prog_CC="cc"
+echo "$as_me:1489: found $ac_dir/$ac_word" >&5
+break
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" ${1+"$@"}
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1511: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1514: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:1525: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+echo "$as_me:1540: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:1548: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:1551: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in 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 "$as_me:1564: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CC="$ac_prog"
+echo "$as_me:1579: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:1587: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:1590: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+test -z "$CC" && { { echo "$as_me:1602: error: no acceptable cc found in \$PATH" >&5
+echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:1607:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:1610: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1613: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1615: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1618: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:1620: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:1623: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 1627 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:1643: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:1646: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:1649: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+for ac_file in `ls a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ a.out ) # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1672: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:1678: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1683: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:1689: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1692: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:1699: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:1707: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:1714: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:1716: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:1719: checking for executable suffix" >&5
+echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
+if { (eval echo "$as_me:1721: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:1724: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:1740: error: cannot compute EXEEXT: cannot compile and link" >&5
+echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:1746: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:1752: checking for object suffix" >&5
+echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1758 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1773: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:1785: error: cannot compute OBJEXT: cannot compile" >&5
+echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:1792: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:1796: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1802 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1817: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1820: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1823: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1826: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:1838: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:1844: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1850 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1865: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1868: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1871: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:1881: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1908: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1911: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1914: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1917: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1929 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1942: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1945: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1948: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1951: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 1961 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1973: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1976: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1979: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1982: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+ echo "$as_me:2011: checking version of $CC" >&5
+echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+ GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ echo "$as_me:2015: result: $GCC_VERSION" >&5
+echo "${ECHO_T}$GCC_VERSION" >&6
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:2024: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2045 "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:2050: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2056: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2079 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2083: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2089: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:2126: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2136 "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:2141: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2147: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2170 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:2174: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:2180: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:2208: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ echo "$as_me:2220: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2227 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+int Autoconf = TIOCGETP;
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+else
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2242 "configure"
+#include "confdefs.h"
+#include <termio.h>
+int Autoconf = TCGETA;
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+echo "$as_me:2255: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+echo "$as_me:2262: checking whether $CC understands -c and -o together" >&5
+echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
+if test "${cf_cv_prog_CC_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+ return 0;
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+if { (eval echo "$as_me:2278: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2281: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (eval echo "$as_me:2283: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2286: \$? = $ac_status" >&5
+ (exit $ac_status); };
+then
+ eval cf_cv_prog_CC_c_o=yes
+else
+ eval cf_cv_prog_CC_c_o=no
+fi
+rm -f conftest*
+
+fi
+if test $cf_cv_prog_CC_c_o = yes; then
+ echo "$as_me:2297: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:2300: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:2304: checking for POSIXized ISC" >&5
+echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
+if test -d /etc/conf/kconfig.d &&
+ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+ echo "$as_me:2309: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ ISC=yes # If later tests want to check for ISC.
+
+cat >>confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+ if test "$GCC" = yes; then
+ CC="$CC -posix"
+ else
+ CC="$CC -Xp"
+ fi
+else
+ echo "$as_me:2323: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ISC=
+fi
+
+echo "$as_me:2328: checking for ${CC-cc} option to accept ANSI C" >&5
+echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
+if test "${cf_cv_ansi_cc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_ansi_cc=no
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX -Aa -D_HPUX_SOURCE
+# SVR4 -Xc
+# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
+for cf_arg in "-DCC_HAS_PROTOS" \
+ "" \
+ -qlanglvl=ansi \
+ -std1 \
+ -Ae \
+ "-Aa -D_HPUX_SOURCE" \
+ -Xc
+do
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_arg
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2422 "configure"
+#include "confdefs.h"
+
+#ifndef CC_HAS_PROTOS
+#if !defined(__STDC__) || (__STDC__ != 1)
+choke me
+#endif
+#endif
+
+int
+main ()
+{
+
+ int test (int i, double x);
+ struct s1 {int (*f) (int a);};
+ struct s2 {int (*f) (double a);};
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2443: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2446: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:2449: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2452: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ansi_cc="$cf_arg"; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+CFLAGS="$cf_save_CFLAGS"
+CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+echo "$as_me:2465: result: $cf_cv_ansi_cc" >&5
+echo "${ECHO_T}$cf_cv_ansi_cc" >&6
+
+if test "$cf_cv_ansi_cc" != "no"; then
+if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_ansi_cc
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+else
+ cat >>confdefs.h <<\EOF
+#define CC_HAS_PROTOS 1
+EOF
+
+fi
+fi
+
+if test "$cf_cv_ansi_cc" = "no"; then
+ { { echo "$as_me:2548: error: Your compiler does not appear to recognize prototypes.
+You have the following choices:
+ a. adjust your compiler options
+ b. get an up-to-date compiler
+ c. use a wrapper such as unproto" >&5
+echo "$as_me: error: Your compiler does not appear to recognize prototypes.
+You have the following choices:
+ a. adjust your compiler options
+ b. get an up-to-date compiler
+ c. use a wrapper such as unproto" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+case $cf_cv_system_name in
+os2*)
+ CFLAGS="$CFLAGS -Zmt"
+ CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+ CXXFLAGS="$CXXFLAGS -Zmt"
+ # autoconf's macro sets -Zexe and suffix both, which conflict:w
+ LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+ ac_cv_exeext=.exe
+ ;;
+esac
+
+PROG_EXT="$EXEEXT"
+
+test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
+#define PROG_EXT "$PROG_EXT"
+EOF
+
+echo "$as_me:2578: checking if you want to build programs such as tic" >&5
+echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
+
+# Check whether --with-progs or --without-progs was given.
+if test "${with_progs+set}" = set; then
+ withval="$with_progs"
+ cf_with_progs=$withval
+else
+ cf_with_progs=no
+fi;
+echo "$as_me:2588: result: $cf_with_progs" >&5
+echo "${ECHO_T}$cf_with_progs" >&6
+
+echo "$as_me:2591: checking if you wish to install curses.h" >&5
+echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
+
+# Check whether --with-curses-h or --without-curses-h was given.
+if test "${with_curses_h+set}" = set; then
+ withval="$with_curses_h"
+ with_curses_h=$withval
+else
+ with_curses_h=yes
+fi;
+echo "$as_me:2601: result: $with_curses_h" >&5
+echo "${ECHO_T}$with_curses_h" >&6
+
+modules_to_build="ncurses"
+if test "X$cf_with_progs" != Xno ; then
+modules_to_build="$modules_to_build progs tack"
+fi
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+for ac_prog in mawk gawk nawk awk
+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 "$as_me:2626: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AWK="$ac_prog"
+echo "$as_me:2641: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:2649: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:2652: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:2659: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:2679: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:2683: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:2700: checking for a BSD compatible install" >&5
+echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ for ac_dir in $PATH; do
+ IFS=$ac_save_IFS
+ # Account for people who put trailing slashes in PATH elements.
+ case $ac_dir/ in
+ / | ./ | .// | /cC/* \
+ | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
+ | /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if $as_executable_p "$ac_dir/$ac_prog"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:2749: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+case $INSTALL in
+/*)
+ ;;
+*)
+ cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
+ test -z "$cf_dir" && cf_dir=.
+ INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
+ ;;
+esac
+
+echo "$as_me:2770: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+# . the current directory, where building will happen
+# $prefix/lib where we will be installing things
+# $exec_prefix/lib likewise
+# eval it to expand exec_prefix.
+# $TMPDIR if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+# /tmp where it might want to write temporary files
+# /var/tmp likewise
+# /usr/tmp likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+ ac_tmpdirs=$TMPDIR
+else
+ ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+ test -d $ac_dir || continue
+ test -w $ac_dir || continue # It is less confusing to not echo anything here.
+ ac_xdir=$ac_dir/cf$$
+ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
+ ac_tf1=$ac_xdir/conftest9012345
+ ac_tf2=$ac_xdir/conftest9012346
+ (echo 1 >$ac_tf1) 2>/dev/null
+ (echo 2 >$ac_tf2) 2>/dev/null
+ ac_val=`cat $ac_tf1 2>/dev/null`
+ if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+ ac_cv_sys_long_file_names=no
+ rm -rf $ac_xdir 2>/dev/null
+ break
+ fi
+ rm -rf $ac_xdir 2>/dev/null
+done
+fi
+echo "$as_me:2809: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
+if test $ac_cv_sys_long_file_names = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_LONG_FILE_NAMES 1
+EOF
+
+fi
+
+echo "$as_me:2819: checking if filesystem supports mixed-case filenames" >&5
+echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
+if test "${cf_cv_mixedcase+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "$cross_compiling" = yes ; then
+ case $target_alias in #(vi
+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+ cf_cv_mixedcase=no
+ ;;
+ *)
+ cf_cv_mixedcase=yes
+ ;;
+ esac
+else
+ rm -f conftest CONFTEST
+ echo test >conftest
+ if test -f CONFTEST ; then
+ cf_cv_mixedcase=no
+ else
+ cf_cv_mixedcase=yes
+ fi
+ rm -f conftest CONFTEST
+fi
+
+fi
+echo "$as_me:2846: result: $cf_cv_mixedcase" >&5
+echo "${ECHO_T}$cf_cv_mixedcase" >&6
+test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
+#define MIXEDCASE_FILENAMES 1
+EOF
+
+echo "$as_me:2852: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:2856: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:2859: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+# Extract the first word of "ctags", so it can be a program name with args.
+set dummy ctags; ac_word=$2
+echo "$as_me:2865: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKE_LOWER_TAGS"; then
+ ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_MAKE_LOWER_TAGS="yes"
+echo "$as_me:2880: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
+fi
+fi
+MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
+if test -n "$MAKE_LOWER_TAGS"; then
+ echo "$as_me:2889: result: $MAKE_LOWER_TAGS" >&5
+echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
+else
+ echo "$as_me:2892: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$cf_cv_mixedcase" = yes ; then
+ # Extract the first word of "etags", so it can be a program name with args.
+set dummy etags; ac_word=$2
+echo "$as_me:2899: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAKE_UPPER_TAGS"; then
+ ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_MAKE_UPPER_TAGS="yes"
+echo "$as_me:2914: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
+fi
+fi
+MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
+if test -n "$MAKE_UPPER_TAGS"; then
+ echo "$as_me:2923: result: $MAKE_UPPER_TAGS" >&5
+echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
+else
+ echo "$as_me:2926: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+ MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+ MAKE_UPPER_TAGS=
+else
+ MAKE_UPPER_TAGS="#"
+fi
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+ MAKE_LOWER_TAGS=
+else
+ MAKE_LOWER_TAGS="#"
+fi
+
+for ac_prog in tdlint lint alint
+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 "$as_me:2950: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LINT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LINT"; then
+ ac_cv_prog_LINT="$LINT" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_LINT="$ac_prog"
+echo "$as_me:2965: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+LINT=$ac_cv_prog_LINT
+if test -n "$LINT"; then
+ echo "$as_me:2973: result: $LINT" >&5
+echo "${ECHO_T}$LINT" >&6
+else
+ echo "$as_me:2976: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$LINT" && break
+done
+
+for ac_prog in man man_db
+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 "$as_me:2987: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$MAN"; then
+ ac_cv_prog_MAN="$MAN" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_MAN="$ac_prog"
+echo "$as_me:3002: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+MAN=$ac_cv_prog_MAN
+if test -n "$MAN"; then
+ echo "$as_me:3010: result: $MAN" >&5
+echo "${ECHO_T}$MAN" >&6
+else
+ echo "$as_me:3013: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$MAN" && break
+done
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:3023: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+echo "$as_me:3038: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:3046: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:3049: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:3058: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_RANLIB="ranlib"
+echo "$as_me:3073: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:3082: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:3085: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ld; ac_word=$2
+echo "$as_me:3097: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_LD="${ac_tool_prefix}ld"
+echo "$as_me:3112: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+ echo "$as_me:3120: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:3123: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_LD"; then
+ ac_ct_LD=$LD
+ # Extract the first word of "ld", so it can be a program name with args.
+set dummy ld; ac_word=$2
+echo "$as_me:3132: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_LD"; then
+ ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_LD="ld"
+echo "$as_me:3147: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
+fi
+fi
+ac_ct_LD=$ac_cv_prog_ac_ct_LD
+if test -n "$ac_ct_LD"; then
+ echo "$as_me:3156: result: $ac_ct_LD" >&5
+echo "${ECHO_T}$ac_ct_LD" >&6
+else
+ echo "$as_me:3159: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ LD=$ac_ct_LD
+else
+ LD="$ac_cv_prog_LD"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:3171: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_AR="${ac_tool_prefix}ar"
+echo "$as_me:3186: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:3194: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:3197: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:3206: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_AR="ar"
+echo "$as_me:3221: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:3230: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:3233: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+if test "${cf_cv_subst_AR_OPTS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+echo "$as_me:3246: checking for archiver options (symbol AR_OPTS)" >&5
+echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
+test -z "$AR_OPTS" && AR_OPTS=rv
+echo "$as_me:3249: result: $AR_OPTS" >&5
+echo "${ECHO_T}$AR_OPTS" >&6
+
+cf_cv_subst_AR_OPTS=$AR_OPTS
+fi
+
+AR_OPTS=${cf_cv_subst_AR_OPTS}
+
+echo "$as_me:3257: checking for makeflags variable" >&5
+echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
+if test "${cf_cv_makeflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_makeflags=''
+ for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
+ do
+ cat >cf_makeflags.tmp <<CF_EOF
+SHELL = /bin/sh
+all :
+ @ echo '.$cf_option'
+CF_EOF
+ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
+ case "$cf_result" in
+ .*k)
+ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
+ case "$cf_result" in
+ .*CC=*) cf_cv_makeflags=
+ ;;
+ *) cf_cv_makeflags=$cf_option
+ ;;
+ esac
+ break
+ ;;
+ *) echo no match "$cf_result"
+ ;;
+ esac
+ done
+ rm -f cf_makeflags.tmp
+
+fi
+echo "$as_me:3290: result: $cf_cv_makeflags" >&5
+echo "${ECHO_T}$cf_cv_makeflags" >&6
+
+echo "$as_me:3293: checking if you have specified an install-prefix" >&5
+echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
+
+# Check whether --with-install-prefix or --without-install-prefix was given.
+if test "${with_install_prefix+set}" = set; then
+ withval="$with_install_prefix"
+ case "$withval" in #(vi
+ yes|no) #(vi
+ ;;
+ *) DESTDIR="$withval"
+ ;;
+ esac
+fi;
+echo "$as_me:3306: result: $DESTDIR" >&5
+echo "${ECHO_T}$DESTDIR" >&6
+
+###############################################################################
+
+# If we're cross-compiling, allow the user to override the tools and their
+# options. The configure script is oriented toward identifying the host
+# compiler, etc., but we need a build compiler to generate parts of the source.
+
+if test "$cross_compiling" = yes ; then
+ # defaults that we might want to override
+ : ${BUILD_CC=`echo '$(CC)'`}
+ : ${BUILD_CPP=`echo '$(CC) -E'`}
+ : ${BUILD_CFLAGS=}
+ : ${BUILD_CPPFLAGS=`echo ''`}
+ : ${BUILD_LDFLAGS=}
+ : ${BUILD_LIBS=`echo ''`}
+ : ${BUILD_EXEEXT=`echo '$x'`}
+ : ${BUILD_OBJEXT=`echo 'o'`}
+
+# Check whether --with-build-cc or --without-build-cc was given.
+if test "${with_build_cc+set}" = set; then
+ withval="$with_build_cc"
+ BUILD_CC="$withval"
+else
+ for ac_prog in $CC gcc cc
+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 "$as_me:3335: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_BUILD_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$BUILD_CC"; then
+ ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_BUILD_CC="$ac_prog"
+echo "$as_me:3350: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+BUILD_CC=$ac_cv_prog_BUILD_CC
+if test -n "$BUILD_CC"; then
+ echo "$as_me:3358: result: $BUILD_CC" >&5
+echo "${ECHO_T}$BUILD_CC" >&6
+else
+ echo "$as_me:3361: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$BUILD_CC" && break
+done
+
+fi;
+
+# Check whether --with-build-cpp or --without-build-cpp was given.
+if test "${with_build_cpp+set}" = set; then
+ withval="$with_build_cpp"
+ BUILD_CPP="$withval"
+else
+ BUILD_CPP='$(CC) -E'
+fi;
+
+# Check whether --with-build-cflags or --without-build-cflags was given.
+if test "${with_build_cflags+set}" = set; then
+ withval="$with_build_cflags"
+ BUILD_CFLAGS="$withval"
+fi;
+
+# Check whether --with-build-cppflags or --without-build-cppflags was given.
+if test "${with_build_cppflags+set}" = set; then
+ withval="$with_build_cppflags"
+ BUILD_CPPFLAGS="$withval"
+fi;
+
+# Check whether --with-build-ldflags or --without-build-ldflags was given.
+if test "${with_build_ldflags+set}" = set; then
+ withval="$with_build_ldflags"
+ BUILD_LDFLAGS="$withval"
+fi;
+
+# Check whether --with-build-libs or --without-build-libs was given.
+if test "${with_build_libs+set}" = set; then
+ withval="$with_build_libs"
+ BUILD_LIBS="$withval"
+fi;
+ # this assumes we're on Unix.
+ BUILD_EXEEXT=
+ BUILD_OBJEXT=o
+else
+ : ${BUILD_CC=`echo '$(CC)'`}
+ : ${BUILD_CPP=`echo '$(CPP)'`}
+ : ${BUILD_CFLAGS=`echo '$(CFLAGS)'`}
+ : ${BUILD_CPPFLAGS=`echo '$(CPPFLAGS)'`}
+ : ${BUILD_LDFLAGS=`echo '$(LDFLAGS)'`}
+ : ${BUILD_LIBS=`echo '$(LIBS)'`}
+ : ${BUILD_EXEEXT=`echo '$x'`}
+ : ${BUILD_OBJEXT=`echo 'o'`}
+fi
+
+###############################################################################
+
+### Options to allow the user to specify the set of libraries which are used.
+### Use "--without-normal --with-shared" to allow the default model to be
+### shared, for example.
+cf_list_models=""
+
+LIBTOOL=
+
+# common library maintenance symbols that are convenient for libtool scripts:
+LIB_CREATE='$(AR) -cr'
+LIB_OBJECT='$(OBJECTS)'
+LIB_SUFFIX=.a
+LIB_PREP="$RANLIB"
+
+# symbols used to prop libtool up to enable it to determine what it should be
+# doing:
+LIB_CLEAN=
+LIB_COMPILE=
+LIB_LINK=
+LIB_INSTALL=
+LIB_UNINSTALL=
+
+echo "$as_me:3438: checking if you want to build libraries with libtool" >&5
+echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
+
+# Check whether --with-libtool or --without-libtool was given.
+if test "${with_libtool+set}" = set; then
+ withval="$with_libtool"
+ with_libtool=$withval
+else
+ with_libtool=no
+fi;
+echo "$as_me:3448: result: $with_libtool" >&5
+echo "${ECHO_T}$with_libtool" >&6
+if test "$with_libtool" != "no"; then
+
+ if test "$with_libtool" != "yes" ; then
+
+case ".$with_libtool" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval with_libtool="$with_libtool"
+ case ".$with_libtool" in #(vi
+ .NONE/*)
+ with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ { { echo "$as_me:3473: error: expected a pathname, not \"$with_libtool\"" >&5
+echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ LIBTOOL=$with_libtool
+ else
+ # Extract the first word of "libtool", so it can be a program name with args.
+set dummy libtool; ac_word=$2
+echo "$as_me:3483: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_LIBTOOL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $LIBTOOL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
+ echo "$as_me:3500: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ ;;
+esac
+fi
+LIBTOOL=$ac_cv_path_LIBTOOL
+
+if test -n "$LIBTOOL"; then
+ echo "$as_me:3511: result: $LIBTOOL" >&5
+echo "${ECHO_T}$LIBTOOL" >&6
+else
+ echo "$as_me:3514: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ fi
+ if test -z "$LIBTOOL" ; then
+ { { echo "$as_me:3520: error: Cannot find libtool" >&5
+echo "$as_me: error: Cannot find libtool" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
+ LIB_OBJECT='$(OBJECTS:.o=.lo)'
+ LIB_SUFFIX=.la
+ LIB_CLEAN='$(LIBTOOL) --mode=clean'
+ LIB_COMPILE='$(LIBTOOL) --mode=compile'
+ LIB_LINK='$(LIBTOOL) --mode=link'
+ LIB_INSTALL='$(LIBTOOL) --mode=install'
+ LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
+ LIB_PREP=:
+
+ # Show the version of libtool
+ echo "$as_me:3535: checking version of libtool" >&5
+echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
+
+ # Save the version in a cache variable - this is not entirely a good
+ # thing, but the version string from libtool is very ugly, and for
+ # bug reports it might be useful to have the original string.
+ cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
+ echo "$as_me:3542: result: $cf_cv_libtool_version" >&5
+echo "${ECHO_T}$cf_cv_libtool_version" >&6
+ if test -z "$cf_cv_libtool_version" ; then
+ { { echo "$as_me:3545: error: This is not libtool" >&5
+echo "$as_me: error: This is not libtool" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # special hack to add --tag option for C++ compiler
+ case $cf_cv_libtool_version in
+ 1.[5-9]*|[2-9]*)
+ LIBTOOL_CXX="$LIBTOOL --tag=CXX"
+ ;;
+ *)
+ LIBTOOL_CXX="$LIBTOOL"
+ ;;
+ esac
+else
+ LIBTOOL=""
+ LIBTOOL_CXX=""
+fi
+
+test -z "$LIBTOOL" && ECHO_LT=
+
+if test "$with_libtool" != "no" ; then
+
+cf_list_models="$cf_list_models libtool"
+
+else
+
+echo "$as_me:3572: checking if you want to build shared libraries" >&5
+echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
+
+# Check whether --with-shared or --without-shared was given.
+if test "${with_shared+set}" = set; then
+ withval="$with_shared"
+ with_shared=$withval
+else
+ with_shared=no
+fi;
+echo "$as_me:3582: result: $with_shared" >&5
+echo "${ECHO_T}$with_shared" >&6
+test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
+
+echo "$as_me:3586: checking if you want to build static libraries" >&5
+echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
+
+# Check whether --with-normal or --without-normal was given.
+if test "${with_normal+set}" = set; then
+ withval="$with_normal"
+ with_normal=$withval
+else
+ with_normal=yes
+fi;
+echo "$as_me:3596: result: $with_normal" >&5
+echo "${ECHO_T}$with_normal" >&6
+test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
+
+echo "$as_me:3600: checking if you want to build debug libraries" >&5
+echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
+
+# Check whether --with-debug or --without-debug was given.
+if test "${with_debug+set}" = set; then
+ withval="$with_debug"
+ with_debug=$withval
+else
+ with_debug=no
+fi;
+echo "$as_me:3610: result: $with_debug" >&5
+echo "${ECHO_T}$with_debug" >&6
+test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
+
+echo "$as_me:3614: checking if you want to build profiling libraries" >&5
+echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
+
+# Check whether --with-profile or --without-profile was given.
+if test "${with_profile+set}" = set; then
+ withval="$with_profile"
+ with_profile=$withval
+else
+ with_profile=no
+fi;
+echo "$as_me:3624: result: $with_profile" >&5
+echo "${ECHO_T}$with_profile" >&6
+test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
+
+fi
+
+###############################################################################
+
+echo "$as_me:3632: checking for specified models" >&5
+echo $ECHO_N "checking for specified models... $ECHO_C" >&6
+test -z "$cf_list_models" && cf_list_models=normal
+test "$with_libtool" != "no" && cf_list_models=libtool
+echo "$as_me:3636: result: $cf_list_models" >&5
+echo "${ECHO_T}$cf_list_models" >&6
+
+### Use the first model as the default, and save its suffix for use in building
+### up test-applications.
+echo "$as_me:3641: checking for default model" >&5
+echo $ECHO_N "checking for default model... $ECHO_C" >&6
+DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
+echo "$as_me:3644: result: $DFT_LWR_MODEL" >&5
+echo "${ECHO_T}$DFT_LWR_MODEL" >&6
+
+DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+TINFO_NAME=tinfo
+
+LIB_NAME=ncurses
+
+LIB_DIR=../lib
+
+ case $cf_cv_system_name in
+ OS/2*) LIB_PREFIX='' ;;
+ os2*) LIB_PREFIX='' ;;
+ *) LIB_PREFIX='lib' ;;
+ esac
+cf_prefix=$LIB_PREFIX
+
+LIB_PREFIX=$cf_prefix
+
+LIB_SUFFIX=
+
+###############################################################################
+
+echo "$as_me:3668: checking if you want to build a separate terminfo library" >&5
+echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
+
+# Check whether --with-termlib or --without-termlib was given.
+if test "${with_termlib+set}" = set; then
+ withval="$with_termlib"
+ with_termlib=$withval
+else
+ with_termlib=no
+fi;
+echo "$as_me:3678: result: $with_termlib" >&5
+echo "${ECHO_T}$with_termlib" >&6
+
+### Checks for special libraries, must be done up-front.
+
+echo "$as_me:3683: checking if you want to link with dbmalloc for testing" >&5
+echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
+
+# Check whether --with-dbmalloc or --without-dbmalloc was given.
+if test "${with_dbmalloc+set}" = set; then
+ withval="$with_dbmalloc"
+ with_dbmalloc=$withval
+else
+ with_dbmalloc=no
+fi;
+echo "$as_me:3693: result: $with_dbmalloc" >&5
+echo "${ECHO_T}$with_dbmalloc" >&6
+if test "$with_dbmalloc" = yes ; then
+ echo "$as_me:3696: checking for dbmalloc.h" >&5
+echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_dbmalloc_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3702 "configure"
+#include "confdefs.h"
+#include <dbmalloc.h>
+_ACEOF
+if { (eval echo "$as_me:3706: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3712: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_dbmalloc_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_dbmalloc_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:3731: result: $ac_cv_header_dbmalloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
+if test $ac_cv_header_dbmalloc_h = yes; then
+
+echo "$as_me:3735: checking for debug_malloc in -ldbmalloc" >&5
+echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
+if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldbmalloc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3743 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char debug_malloc ();
+int
+main ()
+{
+debug_malloc ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3762: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3765: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3768: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3771: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dbmalloc_debug_malloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dbmalloc_debug_malloc=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:3782: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
+if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBDBMALLOC 1
+EOF
+
+ LIBS="-ldbmalloc $LIBS"
+
+fi
+
+fi
+
+fi
+
+echo "$as_me:3797: checking if you want to link with dmalloc for testing" >&5
+echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
+
+# Check whether --with-dmalloc or --without-dmalloc was given.
+if test "${with_dmalloc+set}" = set; then
+ withval="$with_dmalloc"
+ with_dmalloc=$withval
+else
+ with_dmalloc=no
+fi;
+echo "$as_me:3807: result: $with_dmalloc" >&5
+echo "${ECHO_T}$with_dmalloc" >&6
+if test "$with_dmalloc" = yes ; then
+ echo "$as_me:3810: checking for dmalloc.h" >&5
+echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_dmalloc_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3816 "configure"
+#include "confdefs.h"
+#include <dmalloc.h>
+_ACEOF
+if { (eval echo "$as_me:3820: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3826: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_dmalloc_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_dmalloc_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:3845: result: $ac_cv_header_dmalloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
+if test $ac_cv_header_dmalloc_h = yes; then
+
+echo "$as_me:3849: checking for dmalloc_debug in -ldmalloc" >&5
+echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
+if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldmalloc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3857 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dmalloc_debug ();
+int
+main ()
+{
+dmalloc_debug ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3876: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3879: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3882: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3885: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dmalloc_dmalloc_debug=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dmalloc_dmalloc_debug=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:3896: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
+if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBDMALLOC 1
+EOF
+
+ LIBS="-ldmalloc $LIBS"
+
+fi
+
+fi
+
+fi
+
+SHLIB_LIST=""
+echo "$as_me:3912: checking if you want to link with the GPM mouse library" >&5
+echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
+
+# Check whether --with-gpm or --without-gpm was given.
+if test "${with_gpm+set}" = set; then
+ withval="$with_gpm"
+ with_gpm=$withval
+else
+ with_gpm=maybe
+fi;
+echo "$as_me:3922: result: $with_gpm" >&5
+echo "${ECHO_T}$with_gpm" >&6
+if test "$with_gpm" != no ; then
+ echo "$as_me:3925: checking for Gpm_Open in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 3933 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Open ();
+int
+main ()
+{
+Gpm_Open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:3952: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:3955: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:3958: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3961: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_Gpm_Open=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_Gpm_Open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:3972: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
+if test $ac_cv_lib_gpm_Gpm_Open = yes; then
+
+ echo "$as_me:3976: checking for gpm.h" >&5
+echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
+if test "${ac_cv_header_gpm_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3982 "configure"
+#include "confdefs.h"
+#include <gpm.h>
+_ACEOF
+if { (eval echo "$as_me:3986: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:3992: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_gpm_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_gpm_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:4011: result: $ac_cv_header_gpm_h" >&5
+echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
+if test $ac_cv_header_gpm_h = yes; then
+
+ cat >>confdefs.h <<\EOF
+#define HAVE_GPM_H 1
+EOF
+
+ with_gpm=yes
+
+else
+
+ if test "$with_gpm" = yes ; then
+ { { echo "$as_me:4024: error: Cannot find GPM header" >&5
+echo "$as_me: error: Cannot find GPM header" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+fi
+
+else
+
+ if test "$with_gpm" = yes ; then
+ { { echo "$as_me:4034: error: Cannot link with GPM library" >&5
+echo "$as_me: error: Cannot link with GPM library" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ with_gpm=no
+
+fi
+
+ if test "$with_gpm" = yes ; then
+
+cf_have_dlsym=no
+echo "$as_me:4045: checking for dlsym" >&5
+echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
+if test "${ac_cv_func_dlsym+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4051 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlsym (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlsym ();
+char (*f) ();
+
+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_dlsym) || defined (__stub___dlsym)
+choke me
+#else
+f = dlsym;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4082: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4085: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4088: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4091: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlsym=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_dlsym=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:4101: result: $ac_cv_func_dlsym" >&5
+echo "${ECHO_T}$ac_cv_func_dlsym" >&6
+if test $ac_cv_func_dlsym = yes; then
+ cf_have_dlsym=yes
+else
+
+cf_have_libdl=no
+echo "$as_me:4108: checking for dlsym in -ldl" >&5
+echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlsym+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4116 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlsym ();
+int
+main ()
+{
+dlsym ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4135: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4138: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4141: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4144: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlsym=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlsym=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4155: result: $ac_cv_lib_dl_dlsym" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
+if test $ac_cv_lib_dl_dlsym = yes; then
+
+ cf_have_dlsym=yes
+ cf_have_libdl=yes
+fi
+
+fi
+
+if test "$cf_have_dlsym" = yes ; then
+ test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
+
+ echo "$as_me:4168: checking whether able to link to dl*() functions" >&5
+echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4171 "configure"
+#include "confdefs.h"
+#include <dlfcn.h>
+int
+main ()
+{
+
+ void *obj;
+ if ((obj = dlopen("filename", 0)) != 0) {
+ if (dlsym(obj, "symbolname") == 0) {
+ dlclose(obj);
+ }
+ }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4189: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4192: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4195: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4198: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cat >>confdefs.h <<\EOF
+#define HAVE_LIBDL 1
+EOF
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ { { echo "$as_me:4209: error: Cannot link test program for libdl" >&5
+echo "$as_me: error: Cannot link test program for libdl" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:4214: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+else
+ { { echo "$as_me:4217: error: Cannot find dlsym function" >&5
+echo "$as_me: error: Cannot find dlsym function" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ EXTRA_LIBS="-ldl -lncurses $EXTRA_LIBS"
+ SHLIB_LIST="-ldl $SHLIB_LIST"
+ cat >>confdefs.h <<\EOF
+#define HAVE_LIBGPM 1
+EOF
+
+ echo "$as_me:4228: checking for Gpm_Wgetch in -lgpm" >&5
+echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
+if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 4236 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char Gpm_Wgetch ();
+int
+main ()
+{
+Gpm_Wgetch ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4255: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4258: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4261: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4264: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_Gpm_Wgetch=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_Gpm_Wgetch=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:4275: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
+echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
+if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
+
+ { echo "$as_me:4279: WARNING: GPM library is already linked with curses - read the FAQ" >&5
+echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
+
+fi
+
+ fi
+fi
+
+# not everyone has "test -c"
+if test -c /dev/sysmouse 2>/dev/null ; then
+echo "$as_me:4289: checking if you want to use sysmouse" >&5
+echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
+
+# Check whether --with-sysmouse or --without-sysmouse was given.
+if test "${with_sysmouse+set}" = set; then
+ withval="$with_sysmouse"
+ cf_with_sysmouse=$withval
+else
+ cf_with_sysmouse=maybe
+fi;
+ if test "$cf_with_sysmouse" != no ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4301 "configure"
+#include "confdefs.h"
+
+#include <osreldate.h>
+#if (__FreeBSD_version >= 400017)
+#include <sys/consio.h>
+#include <sys/fbio.h>
+#else
+#include <machine/console.h>
+#endif
+
+int
+main ()
+{
+
+ struct mouse_info the_mouse;
+ ioctl(0, CONS_MOUSECTL, &the_mouse);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4324: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4327: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4330: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4333: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_with_sysmouse=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_with_sysmouse=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+echo "$as_me:4343: result: $cf_with_sysmouse" >&5
+echo "${ECHO_T}$cf_with_sysmouse" >&6
+test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
+#define USE_SYSMOUSE 1
+EOF
+
+fi
+
+if test X"$CC_G_OPT" = X"" ; then
+ CC_G_OPT='-g'
+ test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+fi
+
+if test X"$CXX_G_OPT" = X"" ; then
+ CXX_G_OPT='-g'
+ test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
+fi
+
+echo "$as_me:4361: checking for default loader flags" >&5
+echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
+case $DFT_LWR_MODEL in
+libtool) LD_MODEL='' ;;
+normal) LD_MODEL='' ;;
+debug) LD_MODEL=$CC_G_OPT ;;
+profile) LD_MODEL='-pg';;
+shared) LD_MODEL='' ;;
+esac
+echo "$as_me:4370: result: $LD_MODEL" >&5
+echo "${ECHO_T}$LD_MODEL" >&6
+
+echo "$as_me:4373: checking if rpath option should be used" >&5
+echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
+
+# Check whether --enable-rpath or --disable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval="$enable_rpath"
+ cf_cv_ld_rpath=$enableval
+else
+ cf_cv_ld_rpath=no
+fi;
+echo "$as_me:4383: result: $cf_cv_ld_rpath" >&5
+echo "${ECHO_T}$cf_cv_ld_rpath" >&6
+
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ LD_SHARED_OPTS=
+ INSTALL_LIB="-m 644"
+
+ cf_cv_do_symlinks=no
+
+ echo "$as_me:4393: checking if release/abi version should be used for shared libs" >&5
+echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
+
+# Check whether --with-shlib-version or --without-shlib-version was given.
+if test "${with_shlib_version+set}" = set; then
+ withval="$with_shlib_version"
+ test -z "$withval" && withval=auto
+ case $withval in #(vi
+ yes) #(vi
+ cf_cv_shlib_version=auto
+ ;;
+ rel|abi|auto|no) #(vi
+ cf_cv_shlib_version=$withval
+ ;;
+ *)
+ { { echo "$as_me:4408: error: option value must be one of: rel, abi, auto or no" >&5
+echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ cf_cv_shlib_version=auto
+fi;
+ echo "$as_me:4417: result: $cf_cv_shlib_version" >&5
+echo "${ECHO_T}$cf_cv_shlib_version" >&6
+
+ cf_cv_rm_so_locs=no
+
+ # Some less-capable ports of gcc support only -fpic
+ CC_SHARED_OPTS=
+ if test "$GCC" = yes
+ then
+ echo "$as_me:4426: checking which $CC option to use" >&5
+echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ for CC_SHARED_OPTS in -fPIC -fpic ''
+ do
+ CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4433 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+int x = 1
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:4445: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4448: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:4451: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4454: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ echo "$as_me:4463: result: $CC_SHARED_OPTS" >&5
+echo "${ECHO_T}$CC_SHARED_OPTS" >&6
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ cf_cv_shlib_version_infix=no
+
+ case $cf_cv_system_name in
+ beos*)
+ MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
+ ;;
+ cygwin*)
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
+ cf_cv_shlib_version=cygdll
+ cf_cv_shlib_version_infix=cygdll
+ ;;
+ darwin*)
+ EXTRA_CFLAGS="-no-cpp-precomp"
+ CC_SHARED_OPTS="-dynamic"
+ MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
+ cf_cv_shlib_version_infix=yes
+ ;;
+ hpux*)
+ # (tested with gcc 2.7.2 -- I don't have c89)
+ if test "$GCC" = yes; then
+ LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
+ else
+ CC_SHARED_OPTS='+Z'
+ LD_SHARED_OPTS='-Wl,+b,$(libdir)'
+ fi
+ MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
+ # HP-UX shared libraries must be executable, and should be
+ # readonly to exploit a quirk in the memory manager.
+ INSTALL_LIB="-m 555"
+ ;;
+ irix*)
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+ fi
+ # tested with IRIX 5.2 and 'cc'.
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
+ cf_cv_rm_so_locs=yes
+ ;;
+ linux*|gnu*|k*bsd*-gnu)
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
+ ;;
+ openbsd2*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
+ ;;
+ freebsd[45]*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $@` -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+
+# This doesn't work - I keep getting spurious references to needing
+# libncurses.so.5.3 when ldd says it's resolved. LOCAL_LDFLAGS2 seems to be
+# no longer used anyway. And the rpath logic isn't relative - so I have to
+# add the local and install lib-directories:
+#
+# if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
+# LOCAL_LDFLAGS="-rpath `pwd`/lib"
+# LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
+# cf_ld_rpath_opt="-rpath "
+# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+# fi
+ ;;
+ openbsd*|freebsd*)
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='$(LD) -Bshareable -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ netbsd*)
+ 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,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+ 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
+ ;;
+ osf*|mls+*)
+ # 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).
+ MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
+ case $host_os in
+ osf4*)
+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
+ ;;
+ esac
+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-rpath"
+ # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
+ # tested with osr5.0.5
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-belf -KPIC'
+ fi
+ 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
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ LINK_PROGS='LD_RUN_PATH=$(libdir)'
+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
+ ;;
+ sunos4*)
+ # tested with SunOS 4.1.1 and gcc 2.7.0
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ solaris2*)
+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-R"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ sysv5uw7*|unix_sv*)
+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='$(LD) -d y -G -o $@'
+ ;;
+ *)
+ CC_SHARED_OPTS='unknown'
+ MK_SHARED_LIB='echo unknown'
+ ;;
+ esac
+
+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
+ case "$cf_cv_shlib_version" in #(vi
+ rel|abi)
+ case "$MK_SHARED_LIB" in #(vi
+ *'-o $@')
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ ;;
+ *)
+ { echo "$as_me:4647: WARNING: ignored --with-shlib-version" >&5
+echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
+ ;;
+ esac
+ ;;
+ esac
+
+ if test -n "$cf_ld_rpath_opt" ; then
+ echo "$as_me:4655: checking if we need a space after rpath option" >&5
+echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
+ cf_save_LIBS="$LIBS"
+ LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4660 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:4672: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4675: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:4678: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4681: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_rpath_space=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_rpath_space=yes
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save_LIBS"
+ echo "$as_me:4691: result: $cf_rpath_space" >&5
+echo "${ECHO_T}$cf_rpath_space" >&6
+ test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
+ MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
+ fi
+
+if test "$CC_SHARED_OPTS" = "unknown"; then
+ for model in $cf_list_models; do
+ if test "$model" = "shared"; then
+ { { echo "$as_me:4700: error: Shared libraries are not supported in this version" >&5
+echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ done
+fi
+
+###############################################################################
+
+### use option --disable-overwrite to leave out the link to -lcurses
+echo "$as_me:4710: checking if you wish to install ncurses overwriting curses" >&5
+echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
+
+# Check whether --enable-overwrite or --disable-overwrite was given.
+if test "${enable_overwrite+set}" = set; then
+ enableval="$enable_overwrite"
+ with_overwrite=$enableval
+else
+ if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
+fi;
+echo "$as_me:4720: result: $with_overwrite" >&5
+echo "${ECHO_T}$with_overwrite" >&6
+
+echo "$as_me:4723: checking if external terminfo-database is used" >&5
+echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
+
+# Check whether --enable-database or --disable-database was given.
+if test "${enable_database+set}" = set; then
+ enableval="$enable_database"
+ use_database=$enableval
+else
+ use_database=yes
+fi;
+echo "$as_me:4733: result: $use_database" >&5
+echo "${ECHO_T}$use_database" >&6
+
+case $host_os in #(vi
+os2*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/emx.src'
+ ;;
+*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
+ ;;
+esac
+
+ case $cf_cv_system_name in
+ os2*) PATHSEP=';' ;;
+ *) PATHSEP=':' ;;
+ esac
+
+if test "$use_database" != no ; then
+ cat >>confdefs.h <<\EOF
+#define USE_DATABASE 1
+EOF
+
+ echo "$as_me:4755: checking which terminfo source-file will be installed" >&5
+echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
+
+# Check whether --enable-database or --disable-database was given.
+if test "${enable_database+set}" = set; then
+ enableval="$enable_database"
+ TERMINFO_SRC=$withval
+fi;
+ echo "$as_me:4763: result: $TERMINFO_SRC" >&5
+echo "${ECHO_T}$TERMINFO_SRC" >&6
+fi
+
+echo "$as_me:4767: checking for list of fallback descriptions" >&5
+echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
+
+# Check whether --with-fallbacks or --without-fallbacks was given.
+if test "${with_fallbacks+set}" = set; then
+ withval="$with_fallbacks"
+ with_fallback=$withval
+else
+ with_fallback=
+fi;
+echo "$as_me:4777: result: $with_fallback" >&5
+echo "${ECHO_T}$with_fallback" >&6
+FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
+
+echo "$as_me:4781: checking if you want modern xterm or antique" >&5
+echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
+
+# Check whether --with-xterm-new or --without-xterm-new was given.
+if test "${with_xterm_new+set}" = set; then
+ withval="$with_xterm_new"
+ with_xterm_new=$withval
+else
+ with_xterm_new=yes
+fi;
+case $with_xterm_new in
+no) with_xterm_new=xterm-old;;
+*) with_xterm_new=xterm-new;;
+esac
+echo "$as_me:4795: result: $with_xterm_new" >&5
+echo "${ECHO_T}$with_xterm_new" >&6
+WHICH_XTERM=$with_xterm_new
+
+MAKE_TERMINFO=
+if test "$use_database" = no ; then
+ TERMINFO="${datadir}/terminfo"
+ MAKE_TERMINFO="#"
+else
+
+echo "$as_me:4805: checking for list of terminfo directories" >&5
+echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
+
+# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
+if test "${with_terminfo_dirs+set}" = set; then
+ withval="$with_terminfo_dirs"
+
+else
+ withval=${TERMINFO_DIRS-${datadir}/terminfo}
+fi;
+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
+cf_dst_path=
+for cf_src_path in $withval
+do
+
+case ".$cf_src_path" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval cf_src_path="$cf_src_path"
+ case ".$cf_src_path" in #(vi
+ .NONE/*)
+ cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ { { echo "$as_me:4839: error: expected a pathname, not \"$cf_src_path\"" >&5
+echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
+ cf_dst_path="${cf_dst_path}${cf_src_path}"
+done
+IFS="$ac_save_ifs"
+
+eval 'TERMINFO_DIRS="$cf_dst_path"'
+
+echo "$as_me:4852: result: $TERMINFO_DIRS" >&5
+echo "${ECHO_T}$TERMINFO_DIRS" >&6
+test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
+#define TERMINFO_DIRS "$TERMINFO_DIRS"
+EOF
+
+echo "$as_me:4858: checking for default terminfo directory" >&5
+echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
+
+# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
+if test "${with_default_terminfo_dir+set}" = set; then
+ withval="$with_default_terminfo_dir"
+
+else
+ withval="${TERMINFO-${datadir}/terminfo}"
+fi;
+case ".$withval" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval withval="$withval"
+ case ".$withval" in #(vi
+ .NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ { { echo "$as_me:4887: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+eval TERMINFO="$withval"
+
+echo "$as_me:4895: result: $TERMINFO" >&5
+echo "${ECHO_T}$TERMINFO" >&6
+cat >>confdefs.h <<EOF
+#define TERMINFO "$TERMINFO"
+EOF
+
+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 "$as_me:4905: checking if big-core option selected" >&5
+echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
+
+# Check whether --enable-big-core or --disable-big-core was given.
+if test "${enable_big_core+set}" = set; then
+ enableval="$enable_big_core"
+ with_big_core=$enableval
+else
+ if test "$cross_compiling" = yes; then
+ with_big_core=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 4917 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
+int main() {
+ unsigned long n = 6000000L;
+ char *s = malloc(n);
+ if (s != 0)
+ s[0] = s[n-1] = 0;
+ exit(s == 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:4931: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:4934: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:4936: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:4939: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ with_big_core=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+with_big_core=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi;
+echo "$as_me:4951: result: $with_big_core" >&5
+echo "${ECHO_T}$with_big_core" >&6
+test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
+#define HAVE_BIG_CORE 1
+EOF
+
+### use option --enable-termcap to compile in the termcap fallback support
+echo "$as_me:4958: checking if you want termcap-fallback support" >&5
+echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
+
+# Check whether --enable-termcap or --disable-termcap was given.
+if test "${enable_termcap+set}" = set; then
+ enableval="$enable_termcap"
+ with_termcap=$enableval
+else
+ with_termcap=no
+fi;
+echo "$as_me:4968: result: $with_termcap" >&5
+echo "${ECHO_T}$with_termcap" >&6
+
+if test "$with_termcap" != "yes" ; then
+ if test "$use_database" = no ; then
+ if test -z "$with_fallback" ; then
+ { { echo "$as_me:4974: error: You have disabled the database w/o specifying fallbacks" >&5
+echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ cat >>confdefs.h <<\EOF
+#define PURE_TERMINFO 1
+EOF
+
+else
+
+cat >>confdefs.h <<\EOF
+#define USE_TERMCAP 1
+EOF
+
+echo "$as_me:4989: checking for list of termcap files" >&5
+echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
+
+# Check whether --with-termpath or --without-termpath was given.
+if test "${with_termpath+set}" = set; then
+ withval="$with_termpath"
+
+else
+ withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
+fi;
+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
+cf_dst_path=
+for cf_src_path in $withval
+do
+
+case ".$cf_src_path" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval cf_src_path="$cf_src_path"
+ case ".$cf_src_path" in #(vi
+ .NONE/*)
+ cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ { { echo "$as_me:5023: error: expected a pathname, not \"$cf_src_path\"" >&5
+echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
+ cf_dst_path="${cf_dst_path}${cf_src_path}"
+done
+IFS="$ac_save_ifs"
+
+eval 'TERMPATH="$cf_dst_path"'
+
+echo "$as_me:5036: result: $TERMPATH" >&5
+echo "${ECHO_T}$TERMPATH" >&6
+test -n "$TERMPATH" && cat >>confdefs.h <<EOF
+#define TERMPATH "$TERMPATH"
+EOF
+
+### use option --enable-getcap to use a hacked getcap for reading termcaps
+echo "$as_me:5043: checking if fast termcap-loader is needed" >&5
+echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
+
+# Check whether --enable-getcap or --disable-getcap was given.
+if test "${enable_getcap+set}" = set; then
+ enableval="$enable_getcap"
+ with_getcap=$enableval
+else
+ with_getcap=no
+fi;
+echo "$as_me:5053: result: $with_getcap" >&5
+echo "${ECHO_T}$with_getcap" >&6
+test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
+#define USE_GETCAP 1
+EOF
+
+echo "$as_me:5059: checking if translated termcaps will be cached in ~/.terminfo" >&5
+echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
+
+# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
+if test "${enable_getcap_cache+set}" = set; then
+ enableval="$enable_getcap_cache"
+ with_getcap_cache=$enableval
+else
+ with_getcap_cache=no
+fi;
+echo "$as_me:5069: result: $with_getcap_cache" >&5
+echo "${ECHO_T}$with_getcap_cache" >&6
+test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
+#define USE_GETCAP_CACHE 1
+EOF
+
+fi
+
+### Use option --disable-home-terminfo to completely remove ~/.terminfo
+echo "$as_me:5078: checking if ~/.terminfo is wanted" >&5
+echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
+
+# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
+if test "${enable_home_terminfo+set}" = set; then
+ enableval="$enable_home_terminfo"
+ with_home_terminfo=$enableval
+else
+ with_home_terminfo=yes
+fi;
+test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
+#define USE_HOME_TERMINFO 1
+EOF
+
+### Use option --enable-symlinks to make tic use symlinks, not hard links
+### to reduce storage requirements for the terminfo database.
+
+for ac_func in \
+ remove \
+ unlink
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:5100: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5106 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5140: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5143: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5146: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:5156: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+if test "$cross_compiling" = yes ; then
+
+for ac_func in \
+ link \
+ symlink
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:5173: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5179 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5210: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5213: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5216: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5219: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:5229: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+else
+ echo "$as_me:5240: checking if link/symlink functions work" >&5
+echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
+if test "${cf_cv_link_funcs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_link_funcs=
+ for cf_func in link symlink ; do
+ if test "$cross_compiling" = yes; then
+
+ eval 'ac_cv_func_'$cf_func'=error'
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5253 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main()
+{
+ int fail = 0;
+ char *src = "config.log";
+ char *dst = "conftest.chk";
+ struct stat src_sb;
+ struct stat dst_sb;
+
+ stat(src, &src_sb);
+ fail = ($cf_func("config.log", "conftest.chk") < 0)
+ || (stat(dst, &dst_sb) < 0)
+ || (dst_sb.st_mtime != src_sb.st_mtime);
+#ifdef HAVE_UNLINK
+ unlink(dst);
+#else
+ remove(dst);
+#endif
+ exit (fail);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:5283: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5286: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:5288: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5291: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
+ eval 'ac_cv_func_'$cf_func'=yes'
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ eval 'ac_cv_func_'$cf_func'=no'
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ done
+ test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
+
+fi
+echo "$as_me:5309: result: $cf_cv_link_funcs" >&5
+echo "${ECHO_T}$cf_cv_link_funcs" >&6
+ test "$ac_cv_func_link" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_LINK 1
+EOF
+
+ test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_SYMLINK 1
+EOF
+
+fi
+
+with_links=no
+with_symlinks=no
+
+if test "$ac_cv_func_link" != yes ; then
+ echo "$as_me:5325: checking if tic should use symbolic links" >&5
+echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
+ if test "$ac_cv_func_symlink" = yes ; then
+ with_symlinks=yes
+ else
+ with_symlinks=no
+ fi
+ echo "$as_me:5332: result: $with_symlinks" >&5
+echo "${ECHO_T}$with_symlinks" >&6
+elif test "$ac_cv_func_symlink" != yes ; then
+ echo "$as_me:5335: checking if tic should use hard links" >&5
+echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
+ if test "$ac_cv_func_link" = yes ; then
+ with_links=yes
+ else
+ with_links=no
+ fi
+ echo "$as_me:5342: result: $with_links" >&5
+echo "${ECHO_T}$with_links" >&6
+else
+ echo "$as_me:5345: checking if tic should use symbolic links" >&5
+echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
+
+# Check whether --enable-symlinks or --disable-symlinks was given.
+if test "${enable_symlinks+set}" = set; then
+ enableval="$enable_symlinks"
+ with_symlinks=$enableval
+else
+ with_symlinks=no
+fi;
+ echo "$as_me:5355: result: $with_symlinks" >&5
+echo "${ECHO_T}$with_symlinks" >&6
+fi
+
+test "$with_links" = yes && cat >>confdefs.h <<\EOF
+#define USE_LINKS 1
+EOF
+
+test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
+#define USE_SYMLINKS 1
+EOF
+
+### use option --enable-broken-linker to force on use of broken-linker support
+echo "$as_me:5368: checking if you want broken-linker support code" >&5
+echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
+
+# 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-no}
+fi;
+echo "$as_me:5378: result: $with_broken_linker" >&5
+echo "${ECHO_T}$with_broken_linker" >&6
+
+BROKEN_LINKER=0
+if test "$with_broken_linker" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define BROKEN_LINKER 1
+EOF
+
+ BROKEN_LINKER=1
+elif test "$DFT_LWR_MODEL" = shared ; then
+ case $cf_cv_system_name in #(vi
+ cygwin*)
+ cat >>confdefs.h <<\EOF
+#define BROKEN_LINKER 1
+EOF
+
+ BROKEN_LINKER=1
+ test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
+
+ ;;
+ esac
+fi
+
+### use option --enable-widec to turn on use of wide-character support
+NCURSES_CH_T=chtype
+NCURSES_LIBUTF8=0
+
+NEED_WCHAR_H=0
+NCURSES_MBSTATE_T=0
+NCURSES_WCHAR_T=0
+NCURSES_WINT_T=0
+
+# Check to define _XOPEN_SOURCE "automatically"
+
+cf_XOPEN_SOURCE=500
+cf_POSIX_C_SOURCE=199506
+
+case $host_os in #(vi
+freebsd*) #(vi
+ # 5.x headers associate
+ # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112
+ # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506
+ cf_POSIX_C_SOURCE=200112
+ cf_XOPEN_SOURCE=600
+ CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+hpux*) #(vi
+ CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+ ;;
+irix6.*) #(vi
+ CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+ ;;
+linux*|gnu*) #(vi
+
+echo "$as_me:5433: checking if we must define _GNU_SOURCE" >&5
+echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_gnu_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 5440 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5455: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5458: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5461: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5464: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5473 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5488: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5491: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5494: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5497: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:5512: result: $cf_cv_gnu_source" >&5
+echo "${ECHO_T}$cf_cv_gnu_source" >&6
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+
+ ;;
+mirbsd*) #(vi
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+ ;;
+netbsd*) #(vi
+ # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ ;;
+openbsd*) #(vi
+ # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+ ;;
+osf[45]*) #(vi
+ CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+ ;;
+sco*) #(vi
+ # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+ ;;
+solaris*) #(vi
+ CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+ ;;
+*)
+ echo "$as_me:5536: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5543 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5558: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5561: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5564: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5567: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5576 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5591: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5594: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5597: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5600: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:5615: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+
+ # FreeBSD 5.x headers demand this...
+ echo "$as_me:5620: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5627 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5642: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5645: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5648: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5651: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5660 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5675: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5678: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5681: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5684: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xopen_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xopen_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:5699: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
+test "$cf_cv_xopen_source" = yes && CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+esac
+
+# Checks for CODESET support.
+
+ echo "$as_me:5707: checking for nl_langinfo and CODESET" >&5
+echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
+if test "${am_cv_langinfo_codeset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5713 "configure"
+#include "confdefs.h"
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5725: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5728: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5731: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5734: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_langinfo_codeset=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+am_cv_langinfo_codeset=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:5745: result: $am_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
+ if test $am_cv_langinfo_codeset = yes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_LANGINFO_CODESET 1
+EOF
+
+ fi
+
+# use these variables to work around a defect in gcc's fixincludes.
+NCURSES_OK_WCHAR_T=
+NCURSES_OK_WINT_T=
+
+echo "$as_me:5759: checking if you want wide-character code" >&5
+echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
+
+# Check whether --enable-widec or --disable-widec was given.
+if test "${enable_widec+set}" = set; then
+ enableval="$enable_widec"
+ with_widec=$enableval
+else
+ with_widec=no
+fi;
+echo "$as_me:5769: result: $with_widec" >&5
+echo "${ECHO_T}$with_widec" >&6
+if test "$with_widec" = yes ; then
+ LIB_SUFFIX="w${LIB_SUFFIX}"
+ cat >>confdefs.h <<\EOF
+#define USE_WIDEC_SUPPORT 1
+EOF
+
+echo "$as_me:5777: checking if we must define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we must define _XOPEN_SOURCE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 5780 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5796: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5799: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5802: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5805: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_result=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:5814: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+
+if test "$cf_result" = yes ; then
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+elif test "x500" != "x" ; then
+ echo "$as_me:5820: checking checking for compatible value versus 500" >&5
+echo $ECHO_N "checking checking for compatible value versus 500... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5823 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#if _XOPEN_SOURCE-500 < 0
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5839: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5842: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5845: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5848: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_result=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:5857: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ if test "$cf_result" = no ; then
+ # perhaps we can override it - try...
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
+ fi
+fi
+
+echo "$as_me:5865: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 5868 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#ifndef _XOPEN_SOURCE_EXTENDED
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5884: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5887: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5890: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5893: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_result=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:5902: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+
+if test "$cf_result" = yes ; then
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
+elif test "x" != "x" ; then
+ echo "$as_me:5908: checking checking for compatible value versus " >&5
+echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5911 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+
+int
+main ()
+{
+
+#if _XOPEN_SOURCE_EXTENDED- < 0
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5927: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5930: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5933: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5936: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_result=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:5945: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ if test "$cf_result" = no ; then
+ # perhaps we can override it - try...
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
+ fi
+fi
+
+ # with_overwrite=no
+ NCURSES_CH_T=cchar_t
+
+for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:5959: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5965 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5996: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5999: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6002: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6005: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:6015: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+ if test "$ac_cv_func_putwc" != yes ; then
+
+echo "$as_me:6027: checking for putwc in libutf8" >&5
+echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
+if test "${cf_cv_libutf8+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_save_LIBS="$LIBS"
+ LIBS="-lutf8 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 6036 "configure"
+#include "confdefs.h"
+
+#include <libutf8.h>
+int
+main ()
+{
+putwc(0,0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:6049: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:6052: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:6055: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6058: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_libutf8=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_libutf8=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save_LIBS"
+
+fi
+echo "$as_me:6070: result: $cf_cv_libutf8" >&5
+echo "${ECHO_T}$cf_cv_libutf8" >&6
+
+if test "$cf_cv_libutf8" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_LIBUTF8_H 1
+EOF
+
+ LIBS="-lutf8 $LIBS"
+fi
+
+ if test "$cf_cv_libutf8" = yes ; then
+ NCURSES_LIBUTF8=1
+ fi
+ fi
+
+# This is needed on Tru64 5.0 to declare mbstate_t
+echo "$as_me:6087: checking if we must include wchar.h to declare mbstate_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
+if test "${cf_cv_mbstate_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 6094 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+mbstate_t state
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6112: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6115: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6118: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6121: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_mbstate_t=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6128 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+mbstate_t value
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6147: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6150: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6153: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6156: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_mbstate_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_mbstate_t=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6168: result: $cf_cv_mbstate_t" >&5
+echo "${ECHO_T}$cf_cv_mbstate_t" >&6
+
+if test "$cf_cv_mbstate_t" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
+
+ NEED_WCHAR_H=1
+fi
+
+# if we do not find mbstate_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_mbstate_t" = unknown ; then
+ NCURSES_MBSTATE_T=1
+fi
+
+# This is needed on Tru64 5.0 to declare wchar_t
+echo "$as_me:6185: checking if we must include wchar.h to declare wchar_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
+if test "${cf_cv_wchar_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 6192 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wchar_t state
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6210: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6213: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6216: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6219: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_wchar_t=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6226 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wchar_t value
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6245: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6248: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6251: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6254: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_wchar_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_wchar_t=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6266: result: $cf_cv_wchar_t" >&5
+echo "${ECHO_T}$cf_cv_wchar_t" >&6
+
+if test "$cf_cv_wchar_t" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
+
+ NEED_WCHAR_H=1
+fi
+
+# if we do not find wchar_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wchar_t" = unknown ; then
+ NCURSES_WCHAR_T=1
+fi
+
+# if we find wchar_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wchar_t" != unknown ; then
+ NCURSES_OK_WCHAR_T=1
+fi
+
+# This is needed on Tru64 5.0 to declare wint_t
+echo "$as_me:6288: checking if we must include wchar.h to declare wint_t" >&5
+echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
+if test "${cf_cv_wint_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 6295 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wint_t state
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6316: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6319: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6322: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_wint_t=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 6329 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <wchar.h>
+#ifdef HAVE_LIBUTF8_H
+#include <libutf8.h>
+#endif
+int
+main ()
+{
+wint_t value
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:6348: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:6351: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:6354: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:6357: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_wint_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_wint_t=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:6369: result: $cf_cv_wint_t" >&5
+echo "${ECHO_T}$cf_cv_wint_t" >&6
+
+if test "$cf_cv_wint_t" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
+
+ NEED_WCHAR_H=1
+fi
+
+# if we do not find wint_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wint_t" = unknown ; then
+ NCURSES_WINT_T=1
+fi
+
+# if we find wint_t in either place, use substitution to provide a fallback.
+if test "$cf_cv_wint_t" != unknown ; then
+ NCURSES_OK_WINT_T=1
+fi
+
+fi
+
+### use option --with-bool to override bool's type
+echo "$as_me:6393: checking for type of bool" >&5
+echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
+
+# Check whether --with-bool or --without-bool was given.
+if test "${with_bool+set}" = set; then
+ withval="$with_bool"
+ NCURSES_BOOL="$withval"
+else
+ NCURSES_BOOL=auto
+fi;
+echo "$as_me:6403: result: $NCURSES_BOOL" >&5
+echo "${ECHO_T}$NCURSES_BOOL" >&6
+
+echo "$as_me:6406: checking for alternate terminal capabilities file" >&5
+echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
+
+# Check whether --with-caps or --without-caps was given.
+if test "${with_caps+set}" = set; then
+ withval="$with_caps"
+ TERMINFO_CAPS=Caps.$withval
+else
+ TERMINFO_CAPS=Caps
+fi;
+test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
+echo "$as_me:6417: result: $TERMINFO_CAPS" >&5
+echo "${ECHO_T}$TERMINFO_CAPS" >&6
+
+### use option --with-ospeed to override ospeed's type
+echo "$as_me:6421: checking for type of ospeed" >&5
+echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
+
+# Check whether --with-ospeed or --without-ospeed was given.
+if test "${with_ospeed+set}" = set; then
+ withval="$with_ospeed"
+ NCURSES_OSPEED="$withval"
+else
+ NCURSES_OSPEED=short
+fi;
+echo "$as_me:6431: result: $NCURSES_OSPEED" >&5
+echo "${ECHO_T}$NCURSES_OSPEED" >&6
+
+### use option --enable-bsdpad to have tputs process BSD-style prefix padding
+echo "$as_me:6435: checking if tputs should process BSD-style prefix padding" >&5
+echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
+
+# Check whether --enable-bsdpad or --disable-bsdpad was given.
+if test "${enable_bsdpad+set}" = set; then
+ enableval="$enable_bsdpad"
+ with_bsdpad=$enableval
+else
+ with_bsdpad=no
+fi;
+echo "$as_me:6445: result: $with_bsdpad" >&5
+echo "${ECHO_T}$with_bsdpad" >&6
+test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
+#define BSD_TPUTS 1
+EOF
+
+### Enable compiling-in rcs id's
+echo "$as_me:6452: checking if RCS identifiers should be compiled-in" >&5
+echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
+
+# 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 "$as_me:6462: result: $with_rcs_ids" >&5
+echo "${ECHO_T}$with_rcs_ids" >&6
+test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
+#define USE_RCS_IDS 1
+EOF
+
+###############################################################################
+
+echo "$as_me:6470: checking format of man-pages" >&5
+echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
+
+# Check whether --with-manpage-format or --without-manpage-format was given.
+if test "${with_manpage_format+set}" = set; then
+ withval="$with_manpage_format"
+ MANPAGE_FORMAT=$withval
+else
+ MANPAGE_FORMAT=unknown
+fi;
+
+test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
+MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
+
+cf_unknown=
+
+case $MANPAGE_FORMAT in
+unknown)
+ if test -z "$MANPATH" ; then
+ MANPATH="/usr/man:/usr/share/man"
+ fi
+
+ # look for the 'date' man-page (it's most likely to be installed!)
+ MANPAGE_FORMAT=
+ cf_preform=no
+ cf_catonly=yes
+ cf_example=date
+
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
+ for cf_dir in $MANPATH; do
+ test -z "$cf_dir" && cf_dir=/usr/man
+ for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
+ do
+ cf_test=`echo $cf_name | sed -e 's/*//'`
+ if test "x$cf_test" = "x$cf_name" ; then
+
+ case "$cf_name" in
+ *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
+ *.Z) MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
+ *.0) MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
+ *) MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
+ esac
+
+ case "$cf_name" in
+ $cf_dir/man*)
+ cf_catonly=no
+ ;;
+ $cf_dir/cat*)
+ cf_preform=yes
+ ;;
+ esac
+ break
+ fi
+
+ # if we found a match in either man* or cat*, stop looking
+ if test -n "$MANPAGE_FORMAT" ; then
+ cf_found=no
+ test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
+ test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
+ case "$cf_name" in
+ $cf_dir/cat*)
+ cf_found=yes
+ ;;
+ esac
+ test $cf_found=yes && break
+ fi
+ done
+ # only check the first directory in $MANPATH where we find manpages
+ if test -n "$MANPAGE_FORMAT" ; then
+ break
+ fi
+ done
+ # if we did not find the example, just assume it is normal
+ test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
+ IFS="$ac_save_ifs"
+ ;;
+*)
+ for cf_option in $MANPAGE_FORMAT; do
+ case $cf_option in #(vi
+ gzip|compress|BSDI|normal|formatted|catonly)
+ ;;
+ *)
+ cf_unknown="$cf_unknown $cf_option"
+ ;;
+ esac
+ done
+ ;;
+esac
+
+echo "$as_me:6559: result: $MANPAGE_FORMAT" >&5
+echo "${ECHO_T}$MANPAGE_FORMAT" >&6
+if test -n "$cf_unknown" ; then
+ { echo "$as_me:6562: WARNING: Unexpected manpage-format $cf_unknown" >&5
+echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
+fi
+
+echo "$as_me:6566: checking for manpage renaming" >&5
+echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
+
+# Check whether --with-manpage-renames or --without-manpage-renames was given.
+if test "${with_manpage_renames+set}" = set; then
+ withval="$with_manpage_renames"
+ MANPAGE_RENAMES=$withval
+else
+ MANPAGE_RENAMES=yes
+fi;
+
+case ".$MANPAGE_RENAMES" in #(vi
+.no) #(vi
+ ;;
+.|.yes)
+ # Debian 'man' program?
+ if test -f /etc/debian_version ; then
+ MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
+ else
+ MANPAGE_RENAMES=no
+ fi
+ ;;
+esac
+
+if test "$MANPAGE_RENAMES" != no ; then
+ if test -f $srcdir/man/$MANPAGE_RENAMES ; then
+ MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
+ elif test ! -f $MANPAGE_RENAMES ; then
+ { { echo "$as_me:6594: error: not a filename: $MANPAGE_RENAMES" >&5
+echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test ! -d man && mkdir man
+
+ # Construct a sed-script to perform renaming within man-pages
+ if test -n "$MANPAGE_RENAMES" ; then
+ test ! -d man && mkdir man
+ sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
+ fi
+fi
+
+echo "$as_me:6608: result: $MANPAGE_RENAMES" >&5
+echo "${ECHO_T}$MANPAGE_RENAMES" >&6
+
+echo "$as_me:6611: checking if manpage aliases will be installed" >&5
+echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
+
+# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
+if test "${with_manpage_aliases+set}" = set; then
+ withval="$with_manpage_aliases"
+ MANPAGE_ALIASES=$withval
+else
+ MANPAGE_ALIASES=yes
+fi;
+
+echo "$as_me:6622: result: $MANPAGE_ALIASES" >&5
+echo "${ECHO_T}$MANPAGE_ALIASES" >&6
+
+if test "$LN_S" = "ln -s"; then
+ cf_use_symlinks=yes
+else
+ cf_use_symlinks=no
+fi
+
+MANPAGE_SYMLINKS=no
+if test "$MANPAGE_ALIASES" = yes ; then
+echo "$as_me:6633: checking if manpage symlinks should be used" >&5
+echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
+
+# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
+if test "${with_manpage_symlinks+set}" = set; then
+ withval="$with_manpage_symlinks"
+ MANPAGE_SYMLINKS=$withval
+else
+ MANPAGE_SYMLINKS=$cf_use_symlinks
+fi;
+
+if test "$$cf_use_symlinks" = no; then
+if test "$MANPAGE_SYMLINKS" = yes ; then
+ { echo "$as_me:6646: WARNING: cannot make symlinks" >&5
+echo "$as_me: WARNING: cannot make symlinks" >&2;}
+ MANPAGE_SYMLINKS=no
+fi
+fi
+
+echo "$as_me:6652: result: $MANPAGE_SYMLINKS" >&5
+echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
+fi
+
+echo "$as_me:6656: checking for manpage tbl" >&5
+echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
+
+# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
+if test "${with_manpage_tbl+set}" = set; then
+ withval="$with_manpage_tbl"
+ MANPAGE_TBL=$withval
+else
+ MANPAGE_TBL=no
+fi;
+
+echo "$as_me:6667: result: $MANPAGE_TBL" >&5
+echo "${ECHO_T}$MANPAGE_TBL" >&6
+
+ if test "$prefix" = "NONE" ; then
+ cf_prefix="$ac_default_prefix"
+ else
+ cf_prefix="$prefix"
+ fi
+
+ case "$MANPAGE_FORMAT" in # (vi
+ *catonly*) # (vi
+ cf_format=yes
+ cf_inboth=no
+ ;;
+ *formatted*) # (vi
+ cf_format=yes
+ cf_inboth=yes
+ ;;
+ *)
+ cf_format=no
+ cf_inboth=no
+ ;;
+ esac
+
+test ! -d man && mkdir man
+
+cf_so_strip=
+cf_compress=
+case "$MANPAGE_FORMAT" in #(vi
+*compress*) #(vi
+ cf_so_strip="Z"
+ cf_compress=compress
+ ;;
+*gzip*) #(vi
+ cf_so_strip="gz"
+ cf_compress=gzip
+ ;;
+esac
+
+cf_edit_man=man/edit_man.sh
+
+cat >$cf_edit_man <<CF_EOF
+#! /bin/sh
+# this script is generated by the configure-script CF_MAN_PAGES macro.
+prefix="$cf_prefix"
+datadir="$datadir"
+NCURSES_OSPEED="$NCURSES_OSPEED"
+TERMINFO="$TERMINFO"
+MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
+INSTALL="$INSTALL"
+INSTALL_DATA="$INSTALL_DATA"
+transform="$program_transform_name"
+
+TMP=\${TMPDIR-/tmp}/man\$\$
+trap "rm -f \$TMP" 0 1 2 5 15
+
+form=\$1
+shift || exit 1
+
+verb=\$1
+shift || exit 1
+
+mandir=\$1
+shift || exit 1
+
+srcdir=\$1
+shift || exit 1
+
+if test "\$form" = normal ; then
+ if test "$cf_format" = yes ; then
+ if test "$cf_inboth" = no ; then
+ sh \$0 format \$verb \$mandir \$srcdir \$*
+ exit $?
+ fi
+ fi
+ cf_subdir=\$mandir/man
+ cf_tables=$MANPAGE_TBL
+else
+ cf_subdir=\$mandir/cat
+ cf_tables=yes
+fi
+
+# process the list of source-files
+for i in \$* ; do
+case \$i in #(vi
+*.orig|*.rej) ;; #(vi
+*.[0-9]*)
+ section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
+ if test \$verb = installing ; then
+ if test ! -d \$cf_subdir\${section} ; then
+ \$MKDIRS \$cf_subdir\$section
+ fi
+ fi
+ aliases=
+ source=\`basename \$i\`
+ inalias=\$source
+ test ! -f \$inalias && inalias="\$srcdir/\$inalias"
+ if test ! -f \$inalias ; then
+ echo .. skipped \$source
+ continue
+ fi
+CF_EOF
+
+if test "$MANPAGE_ALIASES" != no ; then
+cat >>$cf_edit_man <<CF_EOF
+ aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
+CF_EOF
+fi
+
+if test "$MANPAGE_RENAMES" = no ; then
+cat >>$cf_edit_man <<CF_EOF
+ # perform program transformations for section 1 man pages
+ if test \$section = 1 ; then
+ target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+ else
+ target=\$cf_subdir\${section}/\$source
+ fi
+CF_EOF
+else
+cat >>$cf_edit_man <<CF_EOF
+ target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
+ if test -z "\$target" ; then
+ echo '? missing rename for '\$source
+ target="\$source"
+ fi
+ target="\$cf_subdir\${section}/\${target}"
+CF_EOF
+fi
+
+ # replace variables in man page
+
+ for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ do
+cat >>$cf_edit_man <<CF_EOF
+ prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
+CF_EOF
+ done
+
+cat >>$cf_edit_man <<CF_EOF
+ sed -e "s,@DATADIR@,\$datadir," \\
+ -e "s,@TERMINFO@,\$TERMINFO," \\
+ -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
+CF_EOF
+
+ for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ do
+ cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+cat >>$cf_edit_man <<CF_EOF
+ -e "s,@$cf_NAME@,\$prog_$cf_name," \\
+CF_EOF
+ done
+
+if test -f $MANPAGE_RENAMES ; then
+cat >>$cf_edit_man <<CF_EOF
+ < \$i | sed -f $srcdir/edit_man.sed >\$TMP
+CF_EOF
+else
+cat >>$cf_edit_man <<CF_EOF
+ < \$i >\$TMP
+CF_EOF
+fi
+
+cat >>$cf_edit_man <<CF_EOF
+if test \$cf_tables = yes ; then
+ tbl \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+fi
+CF_EOF
+
+if test $with_curses_h != yes ; then
+cat >>$cf_edit_man <<CF_EOF
+ sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+
+cat >>$cf_edit_man <<CF_EOF
+ if test \$form = format ; then
+ nroff -man \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+ fi
+CF_EOF
+
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+ if test \$verb = installing ; then
+ if ( $cf_compress -f \$TMP )
+ then
+ mv \$TMP.$cf_so_strip \$TMP
+ fi
+ fi
+ target="\$target.$cf_so_strip"
+CF_EOF
+fi
+
+case "$MANPAGE_FORMAT" in #(vi
+*BSDI*)
+cat >>$cf_edit_man <<CF_EOF
+ if test \$form = format ; then
+ # BSDI installs only .0 suffixes in the cat directories
+ target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
+ fi
+CF_EOF
+ ;;
+esac
+
+cat >>$cf_edit_man <<CF_EOF
+ suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
+ if test \$verb = installing ; then
+ echo \$verb \$target
+ \$INSTALL_DATA \$TMP \$target
+ test -n "\$aliases" && (
+ cd \$cf_subdir\${section} && (
+ source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
+ test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
+ target=\`basename \$target\`
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ if test "$MANPAGE_SYMLINKS" = yes ; then
+ if test -f \$cf_alias\${suffix} ; then
+ if ( cmp -s \$target \$cf_alias\${suffix} )
+ then
+ continue
+ fi
+ fi
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ $LN_S \$target \$cf_alias\${suffix}
+ elif test "\$target" != "\$cf_alias\${suffix}" ; then
+ echo ".so \$source" >\$TMP
+CF_EOF
+if test -n "$cf_compress" ; then
+cat >>$cf_edit_man <<CF_EOF
+ if test -n "$cf_so_strip" ; then
+ $cf_compress -f \$TMP
+ mv \$TMP.$cf_so_strip \$TMP
+ fi
+CF_EOF
+fi
+cat >>$cf_edit_man <<CF_EOF
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
+ fi
+ done
+ )
+ )
+ elif test \$verb = removing ; then
+ echo \$verb \$target
+ rm -f \$target
+ test -n "\$aliases" && (
+ cd \$cf_subdir\${section} && (
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ done
+ )
+ )
+ else
+# echo ".hy 0"
+ cat \$TMP
+ fi
+ ;;
+esac
+done
+
+if test $cf_inboth = yes ; then
+if test \$form != format ; then
+ sh \$0 format \$verb \$mandir \$srcdir \$*
+fi
+fi
+
+exit 0
+CF_EOF
+chmod 755 $cf_edit_man
+
+###############################################################################
+
+### Note that some functions (such as const) are normally disabled anyway.
+echo "$as_me:6955: checking if you want to build with function extensions" >&5
+echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
+
+# 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 "$as_me:6965: result: $with_ext_funcs" >&5
+echo "${ECHO_T}$with_ext_funcs" >&6
+if test "$with_ext_funcs" = yes ; then
+ NCURSES_EXT_FUNCS=1
+ cat >>confdefs.h <<\EOF
+#define HAVE_CURSES_VERSION 1
+EOF
+
+ 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_RESIZE_TERM 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
+
+else
+ NCURSES_EXT_FUNCS=0
+fi
+
+### use option --enable-const to turn on use of const beyond that in XSI.
+echo "$as_me:7002: checking for extended use of const keyword" >&5
+echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
+
+# Check whether --enable-const or --disable-const was given.
+if test "${enable_const+set}" = set; then
+ enableval="$enable_const"
+ with_ext_const=$enableval
+else
+ with_ext_const=no
+fi;
+echo "$as_me:7012: result: $with_ext_const" >&5
+echo "${ECHO_T}$with_ext_const" >&6
+NCURSES_CONST='/*nothing*/'
+if test "$with_ext_const" = yes ; then
+ NCURSES_CONST=const
+fi
+
+echo "$as_me:7019: checking if you want \$NCURSES_NO_PADDING code" >&5
+echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
+
+# 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 "$as_me:7029: result: $with_no_padding" >&5
+echo "${ECHO_T}$with_no_padding" >&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 "$as_me:7036: checking if you want SIGWINCH handler" >&5
+echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
+
+# 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 "$as_me:7046: result: $with_sigwinch" >&5
+echo "${ECHO_T}$with_sigwinch" >&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 "$as_me:7053: checking if you want user-definable terminal capabilities like termcap" >&5
+echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
+
+# 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_ext_funcs
+fi;
+echo "$as_me:7063: result: $with_tcap_names" >&5
+echo "${ECHO_T}$with_tcap_names" >&6
+NCURSES_XNAMES=0
+test "$with_tcap_names" = yes && NCURSES_XNAMES=1
+
+###############################################################################
+# These options are relatively safe to experiment with.
+
+echo "$as_me:7071: checking if you want all development code" >&5
+echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
+
+# Check whether --with-develop or --without-develop was given.
+if test "${with_develop+set}" = set; then
+ withval="$with_develop"
+ with_develop=$withval
+else
+ with_develop=no
+fi;
+echo "$as_me:7081: result: $with_develop" >&5
+echo "${ECHO_T}$with_develop" >&6
+
+### use option --enable-hard-tabs to turn on use of hard-tabs optimize
+echo "$as_me:7085: checking if you want hard-tabs code" >&5
+echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
+
+# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
+if test "${enable_hard_tabs+set}" = set; then
+ enableval="$enable_hard_tabs"
+ with_hardtabs=$enableval
+else
+ with_hardtabs=$with_develop
+fi;
+echo "$as_me:7095: result: $with_hardtabs" >&5
+echo "${ECHO_T}$with_hardtabs" >&6
+test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
+#define USE_HARD_TABS 1
+EOF
+
+echo "$as_me:7101: checking if you want to use restrict environment when running as root" >&5
+echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
+
+# Check whether --enable-root-environ or --disable-root-environ was given.
+if test "${enable_root_environ+set}" = set; then
+ enableval="$enable_root_environ"
+ with_root_environ=$enableval
+else
+ with_root_environ=yes
+fi;
+echo "$as_me:7111: result: $with_root_environ" >&5
+echo "${ECHO_T}$with_root_environ" >&6
+test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
+#define USE_ROOT_ENVIRON 1
+EOF
+
+### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
+echo "$as_me:7118: checking if you want limited support for xmc" >&5
+echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
+
+# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
+if test "${enable_xmc_glitch+set}" = set; then
+ enableval="$enable_xmc_glitch"
+ with_xmc_glitch=$enableval
+else
+ with_xmc_glitch=$with_develop
+fi;
+echo "$as_me:7128: result: $with_xmc_glitch" >&5
+echo "${ECHO_T}$with_xmc_glitch" >&6
+test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
+#define USE_XMC_SUPPORT 1
+EOF
+
+###############################################################################
+# These are just experimental, probably should not be in a package:
+
+echo "$as_me:7137: checking if you do not want to assume colors are white-on-black" >&5
+echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
+
+# Check whether --enable-assumed-color or --disable-assumed-color was given.
+if test "${enable_assumed_color+set}" = set; then
+ enableval="$enable_assumed_color"
+ with_assumed_color=$enableval
+else
+ with_assumed_color=yes
+fi;
+echo "$as_me:7147: result: $with_assumed_color" >&5
+echo "${ECHO_T}$with_assumed_color" >&6
+test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
+#define USE_ASSUMED_COLOR 1
+EOF
+
+### use option --enable-hashmap to turn on use of hashmap scrolling logic
+echo "$as_me:7154: checking if you want hashmap scrolling-optimization code" >&5
+echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
+
+# 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 "$as_me:7164: result: $with_hashmap" >&5
+echo "${ECHO_T}$with_hashmap" >&6
+test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
+#define USE_HASHMAP 1
+EOF
+
+### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
+echo "$as_me:7171: checking if you want colorfgbg code" >&5
+echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
+
+# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
+if test "${enable_colorfgbg+set}" = set; then
+ enableval="$enable_colorfgbg"
+ with_colorfgbg=$enableval
+else
+ with_colorfgbg=no
+fi;
+echo "$as_me:7181: result: $with_colorfgbg" >&5
+echo "${ECHO_T}$with_colorfgbg" >&6
+test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
+#define USE_COLORFGBG 1
+EOF
+
+echo "$as_me:7187: checking if you want experimental safe-sprintf code" >&5
+echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
+
+# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
+if test "${enable_safe_sprintf+set}" = set; then
+ enableval="$enable_safe_sprintf"
+ with_safe_sprintf=$enableval
+else
+ with_safe_sprintf=no
+fi;
+echo "$as_me:7197: result: $with_safe_sprintf" >&5
+echo "${ECHO_T}$with_safe_sprintf" >&6
+test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
+#define USE_SAFE_SPRINTF 1
+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 "$as_me:7206: checking if you want to experiment without scrolling-hints code" >&5
+echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
+
+# 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
+fi;
+echo "$as_me:7216: result: $with_scroll_hints" >&5
+echo "${ECHO_T}$with_scroll_hints" >&6
+test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
+#define USE_SCROLL_HINTS 1
+EOF
+
+fi
+
+###############################################################################
+
+### use option --disable-echo to suppress full display compiling commands
+echo "$as_me:7227: checking if you want to display full commands during build" >&5
+echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
+
+# Check whether --enable-echo or --disable-echo was given.
+if test "${enable_echo+set}" = set; then
+ enableval="$enable_echo"
+ with_echo=$enableval
+else
+ with_echo=yes
+fi;
+if test "$with_echo" = yes; then
+ ECHO_LINK=
+else
+ ECHO_LINK='@ echo linking $@ ... ;'
+ test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
+fi
+echo "$as_me:7243: result: $with_echo" >&5
+echo "${ECHO_T}$with_echo" >&6
+
+### use option --enable-warnings to turn on all gcc warnings
+echo "$as_me:7247: checking if you want to see compiler warnings" >&5
+echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+ enableval="$enable_warnings"
+ with_warnings=$enableval
+fi;
+echo "$as_me:7255: result: $with_warnings" >&5
+echo "${ECHO_T}$with_warnings" >&6
+
+if test -n "$with_warnings"; then
+ ADAFLAGS="$ADAFLAGS -gnatg"
+
+if test "$GCC" = yes
+then
+ cat > conftest.$ac_ext <<EOF
+#line 7264 "configure"
+int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
+EOF
+ { echo "$as_me:7267: checking for $CC warning options..." >&5
+echo "$as_me: checking for $CC warning options..." >&6;}
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS="-W -Wall"
+ cf_warn_CONST=""
+ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+ for cf_opt in \
+ Wbad-function-cast \
+ Wcast-align \
+ Wcast-qual \
+ Winline \
+ Wmissing-declarations \
+ Wmissing-prototypes \
+ Wnested-externs \
+ Wpointer-arith \
+ Wshadow \
+ Wstrict-prototypes \
+ Wundef $cf_warn_CONST
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if { (eval echo "$as_me:7287: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7290: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:7292: result: ... -$cf_opt" >&5
+echo "${ECHO_T}... -$cf_opt" >&6
+ case $cf_opt in #(vi
+ Wcast-qual) #(vi
+ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ ;;
+ Winline) #(vi
+ case $GCC_VERSION in
+ 3.3*)
+ test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
+
+ continue;;
+ esac
+ ;;
+ esac
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ rm -f conftest*
+ CFLAGS="$cf_save_CFLAGS"
+fi
+
+fi
+
+if test "$GCC" = yes
+then
+cat > conftest.i <<EOF
+#ifndef GCC_PRINTF
+#define GCC_PRINTF 0
+#endif
+#ifndef GCC_SCANF
+#define GCC_SCANF 0
+#endif
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+EOF
+if test "$GCC" = yes
+then
+ { echo "$as_me:7334: checking for $CC __attribute__ directives..." >&5
+echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
+cat > conftest.$ac_ext <<EOF
+#line 7337 "configure"
+#include "confdefs.h"
+#include "conftest.h"
+#include "conftest.i"
+#if GCC_PRINTF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#if GCC_SCANF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
+#endif
+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void foo(void) GCC_NORETURN;
+int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
+EOF
+ for cf_attribute in scanf printf unused noreturn
+ do
+
+CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cf_directive="__attribute__(($cf_attribute))"
+ echo "checking for $CC $cf_directive" 1>&5
+ case $cf_attribute in
+ scanf|printf)
+ cat >conftest.h <<EOF
+#define GCC_$CF_ATTRIBUTE 1
+EOF
+ ;;
+ *)
+ cat >conftest.h <<EOF
+#define GCC_$CF_ATTRIBUTE $cf_directive
+EOF
+ ;;
+ esac
+ if { (eval echo "$as_me:7375: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7378: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:7380: result: ... $cf_attribute" >&5
+echo "${ECHO_T}... $cf_attribute" >&6
+ cat conftest.h >>confdefs.h
+ fi
+ done
+else
+ fgrep define conftest.i >>confdefs.h
+fi
+rm -rf conftest*
+fi
+
+### use option --enable-assertions to turn on generation of assertion code
+echo "$as_me:7392: checking if you want to enable runtime assertions" >&5
+echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
+
+# Check whether --enable-assertions or --disable-assertions was given.
+if test "${enable_assertions+set}" = set; then
+ enableval="$enable_assertions"
+ with_assertions=$enableval
+else
+ with_assertions=no
+fi;
+echo "$as_me:7402: result: $with_assertions" >&5
+echo "${ECHO_T}$with_assertions" >&6
+if test -n "$GCC"
+then
+ if test "$with_assertions" = no
+ then
+ cat >>confdefs.h <<\EOF
+#define NDEBUG 1
+EOF
+
+ CPPFLAGS="$CPPFLAGS -DNDEBUG"
+ else
+ ADAFLAGS="$ADAFLAGS -gnata"
+ fi
+fi
+
+### use option --disable-leaks to suppress "permanent" leaks, for testing
+
+# Check whether --enable-leaks or --disable-leaks was given.
+if test "${enable_leaks+set}" = set; then
+ enableval="$enable_leaks"
+ test "$enableval" = no && cat >>confdefs.h <<\EOF
+#define NO_LEAKS 1
+EOF
+
+fi;
+cat >>confdefs.h <<\EOF
+#define HAVE_NC_ALLOC_H 1
+EOF
+
+### use option --enable-expanded to generate certain macros as functions
+
+# Check whether --enable-expanded or --disable-expanded was given.
+if test "${enable_expanded+set}" = set; then
+ enableval="$enable_expanded"
+ test "$enableval" = yes && cat >>confdefs.h <<\EOF
+#define NCURSES_EXPANDED 1
+EOF
+
+fi;
+
+### use option --disable-macros to suppress macros in favor of functions
+
+# Check whether --enable-macros or --disable-macros was given.
+if test "${enable_macros+set}" = set; then
+ enableval="$enable_macros"
+ test "$enableval" = no && cat >>confdefs.h <<\EOF
+#define NCURSES_NOMACROS 1
+EOF
+
+fi;
+
+# Normally we only add trace() to the debug-library. Allow this to be
+# extended to all models of the ncurses library:
+cf_all_traces=no
+case "$CFLAGS $CPPFLAGS" in
+*-DTRACE*)
+ cf_all_traces=yes
+ ;;
+esac
+
+echo "$as_me:7463: checking whether to add trace feature to all models" >&5
+echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
+
+# Check whether --with-trace or --without-trace was given.
+if test "${with_trace+set}" = set; then
+ withval="$with_trace"
+ cf_with_trace=$withval
+else
+ cf_with_trace=$cf_all_traces
+fi;
+echo "$as_me:7473: result: $with_trace" >&5
+echo "${ECHO_T}$with_trace" >&6
+
+if test "$cf_with_trace" = yes ; then
+ LIB_TRACING=all
+ ADA_TRACE=TRUE
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -DTRACE
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+else
+ LIB_TRACING=DEBUG
+ ADA_TRACE=FALSE
+fi
+
+### Checks for libraries.
+echo "$as_me:7554: checking for gettimeofday" >&5
+echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
+if test "${ac_cv_func_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7560 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gettimeofday (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+char (*f) ();
+
+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_gettimeofday) || defined (__stub___gettimeofday)
+choke me
+#else
+f = gettimeofday;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7591: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7594: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7597: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7600: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_gettimeofday=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7610: result: $ac_cv_func_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
+if test $ac_cv_func_gettimeofday = yes; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_GETTIMEOFDAY 1
+EOF
+
+else
+
+echo "$as_me:7619: checking for gettimeofday in -lbsd" >&5
+echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7627 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+int
+main ()
+{
+gettimeofday ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7646: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7649: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7652: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7655: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_bsd_gettimeofday=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7666: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
+if test $ac_cv_lib_bsd_gettimeofday = yes; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_GETTIMEOFDAY 1
+EOF
+
+ LIBS="$LIBS -lbsd"
+fi
+
+fi
+
+echo "$as_me:7678: checking if -lm needed for math functions" >&5
+echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
+if test "${cf_cv_need_libm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7685 "configure"
+#include "confdefs.h"
+
+ #include <stdio.h>
+ #include <math.h>
+
+int
+main ()
+{
+double x = rand(); printf("result = %g\n", sin(x))
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7700: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7703: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7706: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7709: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_need_libm=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_need_libm=yes
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:7719: result: $cf_cv_need_libm" >&5
+echo "${ECHO_T}$cf_cv_need_libm" >&6
+if test "$cf_cv_need_libm" = yes
+then
+MATH_LIB=-lm
+fi
+
+### Checks for header files.
+echo "$as_me:7727: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7733 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+_ACEOF
+if { (eval echo "$as_me:7741: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:7747: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7769 "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+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 <<_ACEOF
+#line 7787 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7808 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:7834: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7837: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:7839: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7842: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:7855: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+echo "$as_me:7868: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7874 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:7889: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:7892: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:7895: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7898: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:7908: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+EOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ echo "$as_me:7921: checking for opendir in -ldir" >&5
+echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
+if test "${ac_cv_lib_dir_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldir $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7929 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:7948: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:7951: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:7954: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:7957: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dir_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dir_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:7968: result: $ac_cv_lib_dir_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
+if test $ac_cv_lib_dir_opendir = yes; then
+ LIBS="$LIBS -ldir"
+fi
+
+else
+ echo "$as_me:7975: checking for opendir in -lx" >&5
+echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
+if test "${ac_cv_lib_x_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lx $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 7983 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char opendir ();
+int
+main ()
+{
+opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8002: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8005: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8008: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8011: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_x_opendir=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_x_opendir=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:8022: result: $ac_cv_lib_x_opendir" >&5
+echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
+if test $ac_cv_lib_x_opendir = yes; then
+ LIBS="$LIBS -lx"
+fi
+
+fi
+
+echo "$as_me:8030: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8036 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8052: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8055: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8058: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8061: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_time=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_time=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8071: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+echo "$as_me:8081: checking for regular-expression headers" >&5
+echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
+if test "${cf_cv_regex+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 8088 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <regex.h>
+int
+main ()
+{
+
+ regex_t *p;
+ int x = regcomp(p, "", 0);
+ int y = regexec(p, "", 0, 0, 0);
+ regfree(p);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8106: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8109: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8112: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8115: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_regex="regex.h"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8123 "configure"
+#include "confdefs.h"
+#include <regexp.h>
+int
+main ()
+{
+
+ char *p = compile("", "", "", 0);
+ int x = step("", "");
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8138: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8141: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8144: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8147: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_regex="regexp.h"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_save_LIBS="$LIBS"
+ LIBS="-lgen $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8157 "configure"
+#include "confdefs.h"
+#include <regexpr.h>
+int
+main ()
+{
+
+ char *p = compile("", "", "");
+ int x = step("", "");
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8172: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8175: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8178: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8181: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_regex="regexpr.h"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS="$cf_save_LIBS"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+echo "$as_me:8197: result: $cf_cv_regex" >&5
+echo "${ECHO_T}$cf_cv_regex" >&6
+case $cf_cv_regex in
+ regex.h) cat >>confdefs.h <<\EOF
+#define HAVE_REGEX_H_FUNCS 1
+EOF
+ ;;
+ regexp.h) cat >>confdefs.h <<\EOF
+#define HAVE_REGEXP_H_FUNCS 1
+EOF
+ ;;
+ regexpr.h) cat >>confdefs.h <<\EOF
+#define HAVE_REGEXPR_H_FUNCS 1
+EOF
+ ;;
+esac
+
+for ac_header in \
+fcntl.h \
+getopt.h \
+libc.h \
+limits.h \
+locale.h \
+poll.h \
+sys/bsdtypes.h \
+sys/ioctl.h \
+sys/param.h \
+sys/poll.h \
+sys/select.h \
+sys/time.h \
+sys/times.h \
+ttyent.h \
+unistd.h \
+wctype.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:8233: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8239 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:8243: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:8249: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:8268: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+# check for ISC (this may also define _POSIX_SOURCE)
+# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
+if test "$ISC" = yes ; then
+
+echo "$as_me:8282: checking for main in -lcposix" >&5
+echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
+if test "${ac_cv_lib_cposix_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 8290 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8302: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8305: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8308: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8311: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_cposix_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_cposix_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:8322: result: $ac_cv_lib_cposix_main" >&5
+echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
+if test $ac_cv_lib_cposix_main = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBCPOSIX 1
+EOF
+
+ LIBS="-lcposix $LIBS"
+
+fi
+
+ echo "$as_me:8333: checking for bzero in -linet" >&5
+echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
+if test "${ac_cv_lib_inet_bzero+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 8341 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bzero ();
+int
+main ()
+{
+bzero ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8360: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8363: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8366: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8369: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet_bzero=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_inet_bzero=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:8380: result: $ac_cv_lib_inet_bzero" >&5
+echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
+if test $ac_cv_lib_inet_bzero = yes; then
+ LIBS="$LIBS -linet"
+fi
+fi
+
+echo "$as_me:8387: checking if sys/time.h works with sys/select.h" >&5
+echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
+if test "${cf_cv_sys_time_select+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 8394 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8417: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8420: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8423: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_sys_time_select=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_sys_time_select=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+echo "$as_me:8435: result: $cf_cv_sys_time_select" >&5
+echo "${ECHO_T}$cf_cv_sys_time_select" >&6
+test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_SYS_TIME_SELECT 1
+EOF
+
+### checks for compiler characteristics
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+echo "$as_me:8448: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 8456 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8505: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8508: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8511: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8514: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:8531: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:8534: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+echo "$as_me:8539: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8545 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8603: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8606: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8609: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8612: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:8622: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\EOF
+#define const
+EOF
+
+fi
+
+echo "$as_me:8632: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8640 "configure"
+#include "confdefs.h"
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8649: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8652: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8655: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8658: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_inline=$ac_kw; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:8669: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ no)
+cat >>confdefs.h <<\EOF
+#define inline
+EOF
+ ;;
+ *) cat >>confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+test "$ac_cv_c_inline" != no && cat >>confdefs.h <<\EOF
+#define CC_HAS_INLINE_FUNCS 1
+EOF
+
+echo "$as_me:8688: checking if unsigned literals are legal" >&5
+echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
+if test "${cf_cv_unsigned_literals+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8695 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+long x = 1L + 1UL + 1U + 1
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8707: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8710: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8713: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8716: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_unsigned_literals=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_unsigned_literals=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+echo "$as_me:8728: result: $cf_cv_unsigned_literals" >&5
+echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
+
+echo "$as_me:8731: checking for type of chtype" >&5
+echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
+if test "${cf_cv_typeof_chtype+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test "$cross_compiling" = yes; then
+ cf_cv_typeof_chtype=long
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8741 "configure"
+#include "confdefs.h"
+
+#ifdef USE_WIDEC_SUPPORT
+#include <stddef.h> /* we want wchar_t */
+#define WANT_BITS 39
+#else
+#define WANT_BITS 31
+#endif
+#include <stdio.h>
+int main()
+{
+ FILE *fp = fopen("cf_test.out", "w");
+ if (fp != 0) {
+ char *result = "long";
+#ifdef USE_WIDEC_SUPPORT
+ /*
+ * If wchar_t is smaller than a long, it must be an int or a
+ * short. We prefer not to use a short anyway.
+ */
+ if (sizeof(unsigned long) > sizeof(wchar_t))
+ result = "int";
+#endif
+ if (sizeof(unsigned long) > sizeof(unsigned int)) {
+ int n;
+ unsigned int x;
+ for (n = 0; n < WANT_BITS; n++) {
+ unsigned int y = (x >> n);
+ if (y != 1 || x == 0) {
+ x = 0;
+ break;
+ }
+ }
+ /*
+ * If x is nonzero, an int is big enough for the bits
+ * that we want.
+ */
+ result = (x != 0) ? "int" : "long";
+ }
+ fputs(result, fp);
+ fclose(fp);
+ }
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:8788: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8791: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:8793: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8796: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_typeof_chtype=`cat cf_test.out`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_typeof_chtype=long
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ rm -f cf_test.out
+
+fi
+
+echo "$as_me:8811: result: $cf_cv_typeof_chtype" >&5
+echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
+
+cat >>confdefs.h <<EOF
+#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
+EOF
+
+cf_cv_1UL="1"
+test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
+test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
+
+### Checks for external-data
+
+echo "$as_me:8824: checking if external errno is declared" >&5
+echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
+if test "${cf_cv_dcl_errno+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8831 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#include <stdio.h>
+#include <sys/types.h>
+#include <errno.h>
+int
+main ()
+{
+long x = (long) errno
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:8849: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8852: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:8855: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8858: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_dcl_errno=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_dcl_errno=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:8869: result: $cf_cv_dcl_errno" >&5
+echo "${ECHO_T}$cf_cv_dcl_errno" >&6
+
+if test "$cf_cv_dcl_errno" = no ; then
+
+cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+fi
+
+# It's possible (for near-UNIX clones) that the data doesn't exist
+
+echo "$as_me:8884: checking if external errno exists" >&5
+echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
+if test "${cf_cv_have_errno+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8891 "configure"
+#include "confdefs.h"
+
+#undef errno
+extern int errno;
+
+int
+main ()
+{
+errno = 2
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8909: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8912: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8915: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_have_errno=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_have_errno=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:8926: result: $cf_cv_have_errno" >&5
+echo "${ECHO_T}$cf_cv_have_errno" >&6
+
+if test "$cf_cv_have_errno" = yes ; then
+
+cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+fi
+
+echo "$as_me:8939: checking if data-only library module links" >&5
+echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
+if test "${cf_cv_link_dataonly+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ rm -f conftest.a
+ cat >conftest.$ac_ext <<EOF
+#line 8947 "configure"
+int testdata[3] = { 123, 456, 789 };
+EOF
+ if { (eval echo "$as_me:8950: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8953: \$? = $ac_status" >&5
+ (exit $ac_status); } ; 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 <<EOF
+#line 8960 "configure"
+int testfunc()
+{
+#if defined(NeXT)
+ exit(1); /* I'm told this linker is broken */
+#else
+ extern int testdata[3];
+ return testdata[0] == 123
+ && testdata[1] == 456
+ && testdata[2] == 789;
+#endif
+}
+EOF
+ if { (eval echo "$as_me:8973: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:8976: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ mv conftest.o func.o && \
+ ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
+ fi
+ rm -f conftest.$ac_ext func.o
+ ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
+ cf_saveLIBS="$LIBS"
+ LIBS="conftest.a $LIBS"
+ if test "$cross_compiling" = yes; then
+ cf_cv_link_dataonly=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8989 "configure"
+#include "confdefs.h"
+
+ int main()
+ {
+ extern int testfunc();
+ exit (!testfunc());
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:9000: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9003: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:9005: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9008: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_link_dataonly=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_link_dataonly=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ LIBS="$cf_saveLIBS"
+
+fi
+
+echo "$as_me:9023: result: $cf_cv_link_dataonly" >&5
+echo "${ECHO_T}$cf_cv_link_dataonly" >&6
+
+if test "$cf_cv_link_dataonly" = no ; then
+ cat >>confdefs.h <<\EOF
+#define BROKEN_LINKER 1
+EOF
+
+ BROKEN_LINKER=1
+fi
+
+### Checks for library functions.
+
+for ac_func in \
+getcwd \
+getegid \
+geteuid \
+getttynam \
+issetugid \
+nanosleep \
+poll \
+remove \
+select \
+setbuf \
+setbuffer \
+setvbuf \
+sigaction \
+sigvec \
+strdup \
+strstr \
+tcgetpgrp \
+times \
+vsnprintf \
+
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:9059: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9065 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+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_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9096: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9099: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9102: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9105: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9115: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+if test "$with_getcap" = "yes" ; then
+
+echo "$as_me:9127: checking for terminal-capability database functions" >&5
+echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
+if test "${cf_cv_cgetent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9134 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+int
+main ()
+{
+
+ char temp[128];
+ char *buf = temp;
+ char *db_array = temp;
+ cgetent(&buf, /* int *, */ &db_array, "vt100");
+ cgetcap(buf, "tc", '=');
+ cgetmatch(buf, "tc");
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9154: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9157: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9160: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9163: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_cgetent=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_cgetent=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+echo "$as_me:9175: result: $cf_cv_cgetent" >&5
+echo "${ECHO_T}$cf_cv_cgetent" >&6
+test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_BSD_CGETENT 1
+EOF
+
+fi
+
+echo "$as_me:9183: checking for isascii" >&5
+echo $ECHO_N "checking for isascii... $ECHO_C" >&6
+if test "${cf_cv_have_isascii+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9190 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+int
+main ()
+{
+int x = isascii(' ')
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9202: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9205: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9208: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9211: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_have_isascii=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_have_isascii=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:9222: result: $cf_cv_have_isascii" >&5
+echo "${ECHO_T}$cf_cv_have_isascii" >&6
+test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_ISASCII 1
+EOF
+
+if test "$ac_cv_func_sigaction" = yes; then
+echo "$as_me:9229: checking whether sigaction needs _POSIX_SOURCE" >&5
+echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line 9232 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <signal.h>
+int
+main ()
+{
+struct sigaction act
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9246: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9249: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9252: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9255: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ sigact_bad=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9263 "configure"
+#include "confdefs.h"
+
+#define _POSIX_SOURCE
+#include <sys/types.h>
+#include <signal.h>
+int
+main ()
+{
+struct sigaction act
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9278: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9281: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9284: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9287: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ sigact_bad=yes
+ cat >>confdefs.h <<\EOF
+#define SVR4_ACTION 1
+EOF
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+sigact_bad=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:9302: result: $sigact_bad" >&5
+echo "${ECHO_T}$sigact_bad" >&6
+fi
+
+for ac_header in \
+termio.h \
+termios.h \
+unistd.h \
+
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:9313: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9319 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:9323: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:9329: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:9348: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+if test "$ISC" = yes ; then
+
+for ac_header in sys/termio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:9363: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9369 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:9373: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:9379: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:9398: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+fi
+if test "$ac_cv_header_termios_h" = yes ; then
+ case "$CFLAGS $CPPFLAGS" in
+ *-D_POSIX_SOURCE*)
+ termios_bad=dunno ;;
+ *) termios_bad=maybe ;;
+ esac
+ if test "$termios_bad" = maybe ; then
+ echo "$as_me:9416: checking whether termios.h needs _POSIX_SOURCE" >&5
+echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9419 "configure"
+#include "confdefs.h"
+#include <termios.h>
+int
+main ()
+{
+struct termios foo; int x = foo.c_iflag
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9431: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9434: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9437: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9440: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ termios_bad=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9448 "configure"
+#include "confdefs.h"
+
+#define _POSIX_SOURCE
+#include <termios.h>
+int
+main ()
+{
+struct termios foo; int x = foo.c_iflag
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9462: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9465: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9468: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9471: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ termios_bad=unknown
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+termios_bad=yes cat >>confdefs.h <<\EOF
+#define SVR4_TERMIO 1
+EOF
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:9486: result: $termios_bad" >&5
+echo "${ECHO_T}$termios_bad" >&6
+ fi
+fi
+
+echo "$as_me:9491: checking for tcgetattr" >&5
+echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
+if test "${cf_cv_have_tcgetattr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9498 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#define TTY struct termios
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#define TTY struct termio
+#endif
+#endif
+
+int
+main ()
+{
+
+TTY foo;
+tcgetattr(1, &foo);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9526: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9529: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9532: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9535: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_have_tcgetattr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_have_tcgetattr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9545: result: $cf_cv_have_tcgetattr" >&5
+echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
+test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_TCGETATTR 1
+EOF
+
+echo "$as_me:9551: checking for vsscanf function or workaround" >&5
+echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
+if test "${cf_cv_func_vsscanf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9558 "configure"
+#include "confdefs.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+int
+main ()
+{
+
+ va_list ap;
+ vsscanf("from", "%d", ap)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9574: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9577: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9580: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9583: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_func_vsscanf=vsscanf
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9591 "configure"
+#include "confdefs.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+int
+main ()
+{
+
+ FILE strbuf;
+ char *str = "from";
+
+ strbuf._flag = _IOREAD;
+ strbuf._ptr = strbuf._base = (unsigned char *) str;
+ strbuf._cnt = strlen(str);
+ strbuf._file = _NFILE;
+ return (vfscanf(&strbuf, "%d", ap))
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9613: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9616: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9619: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9622: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_func_vsscanf=vfscanf
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 9630 "configure"
+#include "confdefs.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+int
+main ()
+{
+
+ FILE strbuf;
+ char *str = "from";
+
+ strbuf._flag = _IOREAD;
+ strbuf._ptr = strbuf._base = (unsigned char *) str;
+ strbuf._cnt = strlen(str);
+ strbuf._file = _NFILE;
+ return (_doscan(&strbuf, "%d", ap))
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9652: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9655: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9658: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9661: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_func_vsscanf=_doscan
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+cf_cv_func_vsscanf=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9676: result: $cf_cv_func_vsscanf" >&5
+echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
+
+case $cf_cv_func_vsscanf in #(vi
+vsscanf) cat >>confdefs.h <<\EOF
+#define HAVE_VSSCANF 1
+EOF
+;; #(vi
+vfscanf) cat >>confdefs.h <<\EOF
+#define HAVE_VFSCANF 1
+EOF
+;; #(vi
+_doscan) cat >>confdefs.h <<\EOF
+#define HAVE__DOSCAN 1
+EOF
+;;
+esac
+
+echo "$as_me:9694: checking for working mkstemp" >&5
+echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
+if test "${cf_cv_func_mkstemp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+rm -f conftest*
+if test "$cross_compiling" = yes; then
+ echo "$as_me:9702: checking for mkstemp" >&5
+echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
+if test "${ac_cv_func_mkstemp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9708 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mkstemp (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char mkstemp ();
+char (*f) ();
+
+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_mkstemp) || defined (__stub___mkstemp)
+choke me
+#else
+f = mkstemp;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:9739: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9742: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:9745: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9748: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mkstemp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_mkstemp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:9758: result: $ac_cv_func_mkstemp" >&5
+echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9763 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+int main()
+{
+ char *tmpl = "conftestXXXXXX";
+ char name[2][80];
+ int n;
+ int result = 0;
+ int fd;
+ struct stat sb;
+
+ umask(077);
+ for (n = 0; n < 2; ++n) {
+ strcpy(name[n], tmpl);
+ if ((fd = mkstemp(name[n])) >= 0) {
+ if (!strcmp(name[n], tmpl)
+ || stat(name[n], &sb) != 0
+ || (sb.st_mode & S_IFMT) != S_IFREG
+ || (sb.st_mode & 077) != 0) {
+ result = 1;
+ }
+ close(fd);
+ }
+ }
+ if (result == 0
+ && !strcmp(name[0], name[1]))
+ result = 1;
+ exit(result);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:9801: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9804: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:9806: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9809: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_func_mkstemp=yes
+
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_func_mkstemp=no
+
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:9824: result: $cf_cv_func_mkstemp" >&5
+echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
+if test "$cf_cv_func_mkstemp" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_MKSTEMP 1
+EOF
+
+fi
+
+# setup for prototype of fallback for vsscanf()
+if test "$cf_cv_func_vsscanf" = vsscanf ; then
+ HAVE_VSSCANF=1
+else
+ HAVE_VSSCANF=0
+fi
+
+if test "$cross_compiling" = yes ; then
+ { echo "$as_me:9841: WARNING: cross compiling: assume setvbuf params not reversed" >&5
+echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
+else
+ echo "$as_me:9844: checking whether setvbuf arguments are reversed" >&5
+echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
+if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:9850: error: cannot run test program while cross compiling" >&5
+echo "$as_me: error: cannot run test program while cross compiling" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9855 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+/* If setvbuf has the reversed format, exit 0. */
+int
+main ()
+{
+ /* This call has the arguments reversed.
+ A reversed system may check and see that the address of main
+ is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
+ if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
+ exit(1);
+ putc('\r', stdout);
+ exit(0); /* Non-reversed systems segv here. */
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:9872: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:9875: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:9877: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9880: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setvbuf_reversed=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_setvbuf_reversed=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core core.* *.core
+fi
+echo "$as_me:9893: result: $ac_cv_func_setvbuf_reversed" >&5
+echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
+if test $ac_cv_func_setvbuf_reversed = yes; then
+
+cat >>confdefs.h <<\EOF
+#define SETVBUF_REVERSED 1
+EOF
+
+fi
+
+fi
+echo "$as_me:9904: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+if test "${ac_cv_type_signal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9910 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9932: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9935: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9938: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9941: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_signal=void
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_signal=int
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:9951: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6
+
+cat >>confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+echo "$as_me:9958: checking for type sigaction_t" >&5
+echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
+if test "${cf_cv_type_sigaction+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 9965 "configure"
+#include "confdefs.h"
+
+#include <signal.h>
+int
+main ()
+{
+sigaction_t x
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:9978: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:9981: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:9984: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:9987: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_type_sigaction=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_type_sigaction=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+echo "$as_me:9998: result: $cf_cv_type_sigaction" >&5
+echo "${ECHO_T}$cf_cv_type_sigaction" >&6
+test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_TYPE_SIGACTION 1
+EOF
+
+echo "$as_me:10004: checking declaration of size-change" >&5
+echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
+if test "${cf_cv_sizechange+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_sizechange=unknown
+ cf_save_CPPFLAGS="$CPPFLAGS"
+
+for cf_opts in "" "NEED_PTEM_H"
+do
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10019 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#endif
+#endif
+#ifdef NEED_PTEM_H
+/* This is a workaround for SCO: they neglected to define struct winsize in
+ * termios.h -- it's only in termio.h and ptem.h
+ */
+#include <sys/stream.h>
+#include <sys/ptem.h>
+#endif
+#if !defined(sun) || !defined(HAVE_TERMIOS_H)
+#include <sys/ioctl.h>
+#endif
+
+int
+main ()
+{
+
+#ifdef TIOCGSIZE
+ struct ttysize win; /* FIXME: what system is this? */
+ int y = win.ts_lines;
+ int x = win.ts_cols;
+#else
+#ifdef TIOCGWINSZ
+ struct winsize win;
+ int y = win.ws_row;
+ int x = win.ws_col;
+#else
+ no TIOCGSIZE or TIOCGWINSZ
+#endif /* TIOCGWINSZ */
+#endif /* TIOCGSIZE */
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10063: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10066: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10069: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10072: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_sizechange=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_sizechange=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ if test "$cf_cv_sizechange" = yes ; then
+ echo "size-change succeeded ($cf_opts)" >&5
+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
+ break
+ fi
+done
+
+fi
+echo "$as_me:10091: result: $cf_cv_sizechange" >&5
+echo "${ECHO_T}$cf_cv_sizechange" >&6
+if test "$cf_cv_sizechange" != no ; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_SIZECHANGE 1
+EOF
+
+ case $cf_cv_sizechange in #(vi
+ NEED*)
+ cat >>confdefs.h <<EOF
+#define $cf_cv_sizechange 1
+EOF
+
+ ;;
+ esac
+fi
+
+echo "$as_me:10108: checking for memmove" >&5
+echo $ECHO_N "checking for memmove... $ECHO_C" >&6
+if test "${ac_cv_func_memmove+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10114 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char memmove (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char memmove ();
+char (*f) ();
+
+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_memmove) || defined (__stub___memmove)
+choke me
+#else
+f = memmove;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10145: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10148: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10151: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10154: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_memmove=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_memmove=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10164: result: $ac_cv_func_memmove" >&5
+echo "${ECHO_T}$ac_cv_func_memmove" >&6
+if test $ac_cv_func_memmove = yes; then
+ :
+else
+
+echo "$as_me:10170: checking for bcopy" >&5
+echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
+if test "${ac_cv_func_bcopy+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10176 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char bcopy (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bcopy ();
+char (*f) ();
+
+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_bcopy) || defined (__stub___bcopy)
+choke me
+#else
+f = bcopy;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10207: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10210: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10213: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10216: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_bcopy=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_bcopy=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:10226: result: $ac_cv_func_bcopy" >&5
+echo "${ECHO_T}$ac_cv_func_bcopy" >&6
+if test $ac_cv_func_bcopy = yes; then
+
+ echo "$as_me:10230: checking if bcopy does overlapping moves" >&5
+echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
+if test "${cf_cv_good_bcopy+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test "$cross_compiling" = yes; then
+ cf_cv_good_bcopy=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10240 "configure"
+#include "confdefs.h"
+
+int main() {
+ static char data[] = "abcdefghijklmnopqrstuwwxyz";
+ char temp[40];
+ bcopy(data, temp, sizeof(data));
+ bcopy(temp+10, temp, 15);
+ bcopy(temp+5, temp+15, 10);
+ exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:10254: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10257: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:10259: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10262: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_good_bcopy=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_good_bcopy=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+echo "$as_me:10275: result: $cf_cv_good_bcopy" >&5
+echo "${ECHO_T}$cf_cv_good_bcopy" >&6
+
+else
+ cf_cv_good_bcopy=no
+fi
+
+ if test "$cf_cv_good_bcopy" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define USE_OK_BCOPY 1
+EOF
+
+ else
+ cat >>confdefs.h <<\EOF
+#define USE_MY_MEMMOVE 1
+EOF
+
+ fi
+
+fi
+
+echo "$as_me:10296: checking if poll really works" >&5
+echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
+if test "${cf_cv_working_poll+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+if test "$cross_compiling" = yes; then
+ cf_cv_working_poll=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10306 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#else
+#include <sys/poll.h>
+#endif
+int main() {
+ struct pollfd myfds;
+ int ret;
+
+ myfds.fd = 0;
+ myfds.events = POLLIN;
+
+ ret = poll(&myfds, 1, 100);
+ exit(ret != 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:10327: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10330: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:10332: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10335: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_working_poll=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_working_poll=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:10347: result: $cf_cv_working_poll" >&5
+echo "${ECHO_T}$cf_cv_working_poll" >&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$%%'`
+fi
+
+# Just in case, check if the C compiler has a bool type.
+
+echo "$as_me:10360: checking if we should include stdbool.h" >&5
+echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
+
+if test "${cf_cv_header_stdbool_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10368 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+bool foo = false
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10383: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10386: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10389: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_header_stdbool_h=0
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 10396 "configure"
+#include "confdefs.h"
+
+#ifndef __BEOS__
+#include <stdbool.h>
+#endif
+
+int
+main ()
+{
+bool foo = false
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10412: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10415: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10418: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10421: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_header_stdbool_h=1
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_header_stdbool_h=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$cf_cv_header_stdbool_h" = 1
+then echo "$as_me:10435: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else echo "$as_me:10437: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:10441: checking for builtin bool type" >&5
+echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
+
+if test "${cf_cv_cc_bool_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10449 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+bool x = false
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10464: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10467: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10470: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10473: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_cc_bool_type=1
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_cc_bool_type=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+if test "$cf_cv_cc_bool_type" = 1
+then echo "$as_me:10486: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else echo "$as_me:10488: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Check for C++ compiler characteristics (and ensure that it's there!)
+if test -n "$CXX" ; then
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:10510: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+echo "$as_me:10525: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ echo "$as_me:10533: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+ echo "$as_me:10536: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+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 "$as_me:10549: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_CXX="$ac_prog"
+echo "$as_me:10564: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ echo "$as_me:10572: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+ echo "$as_me:10575: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+ CXX=$ac_ct_CXX
+fi
+
+# Provide some information about the compiler.
+echo "$as_me:10587:" \
+ "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:10590: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:10593: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:10595: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:10598: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:10600: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:10603: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:10606: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10612 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10627: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10630: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10633: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10636: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:10648: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:10654: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10660 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10672: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10675: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10678: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10681: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:10691: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10718 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10731: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10734: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10737: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10740: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10750 "configure"
+#include "confdefs.h"
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:10762: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:10765: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:10768: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10771: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+if test -n "$GXX" ; then
+case $cf_cv_system_name in #(vi
+os2*) #(vi
+ cf_stdcpp_libname=stdcpp
+ ;;
+*)
+ cf_stdcpp_libname=stdc++
+ ;;
+esac
+echo "$as_me:10802: checking for library $cf_stdcpp_libname" >&5
+echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
+if test "${cf_cv_libstdcpp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_save="$LIBS"
+ LIBS="$LIBS -l$cf_stdcpp_libname"
+cat >conftest.$ac_ext <<_ACEOF
+#line 10811 "configure"
+#include "confdefs.h"
+
+#include <strstream.h>
+int
+main ()
+{
+
+char buf[80];
+strstreambuf foo(buf, sizeof(buf))
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10827: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10830: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10833: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10836: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_libstdcpp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_libstdcpp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save"
+
+fi
+echo "$as_me:10848: result: $cf_cv_libstdcpp" >&5
+echo "${ECHO_T}$cf_cv_libstdcpp" >&6
+test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
+fi
+
+ echo "$as_me:10853: checking whether $CXX understands -c and -o together" >&5
+echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
+if test "${cf_cv_prog_CXX_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat > conftest.$ac_ext <<CF_EOF
+#include <stdio.h>
+int main()
+{
+ return 0;
+}
+CF_EOF
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+if { (eval echo "$as_me:10869: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10872: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (eval echo "$as_me:10874: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10877: \$? = $ac_status" >&5
+ (exit $ac_status); };
+then
+ eval cf_cv_prog_CXX_c_o=yes
+else
+ eval cf_cv_prog_CXX_c_o=no
+fi
+rm -f conftest*
+
+fi
+if test $cf_cv_prog_CXX_c_o = yes; then
+ echo "$as_me:10888: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:10891: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ case $GXX_VERSION in
+ 1*|2.0-6*)
+ cf_cxx_library=yes
+ ;;
+ *-2.7*|2.7*)
+
+cf_cxx_library=unknown
+case $cf_cv_system_name in #(vi
+os2*) #(vi
+ cf_gpp_libname=gpp
+ ;;
+*)
+ cf_gpp_libname=g++
+ ;;
+esac
+if test "$GXX" = yes; then
+ echo "$as_me:10911: checking for lib$cf_gpp_libname" >&5
+echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
+ cf_save="$LIBS"
+ LIBS="$LIBS -l$cf_gpp_libname"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10916 "configure"
+#include "confdefs.h"
+
+#include <$cf_gpp_libname/builtin.h>
+
+int
+main ()
+{
+two_arg_error_handler_t foo2 = lib_error_handler
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10930: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10933: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10936: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10939: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cxx_library=yes
+ CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ if test "$cf_gpp_libname" = cpp ; then
+ cat >>confdefs.h <<\EOF
+#define HAVE_GPP_BUILTIN_H 1
+EOF
+
+ else
+ cat >>confdefs.h <<\EOF
+#define HAVE_GXX_BUILTIN_H 1
+EOF
+
+ fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 10958 "configure"
+#include "confdefs.h"
+
+#include <builtin.h>
+
+int
+main ()
+{
+two_arg_error_handler_t foo2 = lib_error_handler
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:10972: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:10975: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:10978: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:10981: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cxx_library=yes
+ CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ cat >>confdefs.h <<\EOF
+#define HAVE_BUILTIN_H 1
+EOF
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cxx_library=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save"
+ echo "$as_me:10998: result: $cf_cxx_library" >&5
+echo "${ECHO_T}$cf_cxx_library" >&6
+fi
+
+ ;;
+ *)
+ cf_cxx_library=no
+ ;;
+ esac
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:11013: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11030 "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:11035: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11041: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11064 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:11068: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11074: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:11111: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11121 "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:11126: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11132: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11155 "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:11159: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11165: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:11193: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+for ac_header in typeinfo
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:11207: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11213 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:11217: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11223: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:11242: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+echo "$as_me:11252: checking if we should include stdbool.h" >&5
+echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
+
+if test "${cf_cv_header_stdbool_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11260 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+bool foo = false
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11272: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11275: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11278: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11281: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_header_stdbool_h=0
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 11288 "configure"
+#include "confdefs.h"
+
+#ifndef __BEOS__
+#include <stdbool.h>
+#endif
+
+int
+main ()
+{
+bool foo = false
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11304: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11307: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11310: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11313: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_header_stdbool_h=1
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_header_stdbool_h=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$cf_cv_header_stdbool_h" = 1
+then echo "$as_me:11327: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else echo "$as_me:11329: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:11333: checking for builtin bool type" >&5
+echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
+
+if test "${cf_cv_builtin_bool+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11341 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+
+int
+main ()
+{
+bool x = false
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11356: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11359: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11362: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11365: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_builtin_bool=1
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_builtin_bool=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+if test "$cf_cv_builtin_bool" = 1
+then echo "$as_me:11378: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else echo "$as_me:11380: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:11384: checking for size of bool" >&5
+echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
+if test "${cf_cv_type_of_bool+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ rm -f cf_test.out
+ if test "$cross_compiling" = yes; then
+ cf_cv_type_of_bool=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11395 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined(__cplusplus)
+
+#ifdef HAVE_GXX_BUILTIN_H
+#include <g++/builtin.h>
+#elif HAVE_GPP_BUILTIN_H
+#include <gpp/builtin.h>
+#elif HAVE_BUILTIN_H
+#include <builtin.h>
+#endif
+
+#else
+
+#if $cf_cv_header_stdbool_h
+#include <stdbool.h>
+#endif
+
+#endif
+
+main()
+{
+ FILE *fp = fopen("cf_test.out", "w");
+ if (fp != 0) {
+ bool x = true;
+ if ((bool)(-x) >= 0)
+ fputs("unsigned ", fp);
+ if (sizeof(x) == sizeof(int)) fputs("int", fp);
+ else if (sizeof(x) == sizeof(char)) fputs("char", fp);
+ else if (sizeof(x) == sizeof(short))fputs("short",fp);
+ else if (sizeof(x) == sizeof(long)) fputs("long", fp);
+ fclose(fp);
+ }
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:11437: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11440: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:11442: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11445: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_type_of_bool=`cat cf_test.out`
+ if test -z "$cf_cv_type_of_bool"; then
+ cf_cv_type_of_bool=unknown
+ fi
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_type_of_bool=unknown
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+
+ rm -f cf_test.out
+echo "$as_me:11463: result: $cf_cv_type_of_bool" >&5
+echo "${ECHO_T}$cf_cv_type_of_bool" >&6
+if test "$cf_cv_type_of_bool" = unknown ; then
+ case .$NCURSES_BOOL in #(vi
+ .auto|.) NCURSES_BOOL=unsigned;;
+ esac
+ { echo "$as_me:11469: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
+ cf_cv_type_of_bool=$NCURSES_BOOL
+fi
+
+echo "$as_me:11474: checking for special defines needed for etip.h" >&5
+echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
+cf_save_CXXFLAGS="$CXXFLAGS"
+cf_result="none"
+for cf_math in "" MATH_H
+do
+for cf_excp in "" MATH_EXCEPTION
+do
+ CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
+ test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
+ test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
+cat >conftest.$ac_ext <<_ACEOF
+#line 11486 "configure"
+#include "confdefs.h"
+
+#include <etip.h.in>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11500: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11503: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11506: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11509: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ test -n "$cf_math" && cat >>confdefs.h <<EOF
+#define ETIP_NEEDS_${cf_math} 1
+EOF
+
+ test -n "$cf_excp" && cat >>confdefs.h <<EOF
+#define ETIP_NEEDS_${cf_excp} 1
+EOF
+
+ cf_result="$cf_math $cf_excp"
+ break
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+done
+echo "$as_me:11530: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+CXXFLAGS="$cf_save_CXXFLAGS"
+
+if test -n "$CXX"; then
+echo "$as_me:11535: checking if $CXX accepts parameter initialization" >&5
+echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
+if test "${cf_cv_cpp_param_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ if test "$cross_compiling" = yes; then
+ cf_cv_cpp_param_init=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11551 "configure"
+#include "confdefs.h"
+
+class TEST {
+private:
+ int value;
+public:
+ TEST(int x = 1);
+ ~TEST();
+};
+
+TEST::TEST(int x = 1) // some compilers do not like second initializer
+{
+ value = x;
+}
+void main() { }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:11570: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11573: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:11575: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11578: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_cpp_param_init=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_cpp_param_init=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+fi
+echo "$as_me:11596: result: $cf_cv_cpp_param_init" >&5
+echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
+fi
+test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
+#define CPP_HAS_PARAM_INIT 1
+EOF
+
+if test -n "$CXX"; then
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+for ac_header in strstream.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:11614: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11620 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:11624: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:11630: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:11649: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+echo "$as_me:11659: checking if $CXX supports vscan function" >&5
+echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
+if test "${cf_cv_cpp_vscan_func+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ for cf_vscan_func in strstream strstream_cast stdio
+ do
+ case $cf_vscan_func in #(vi
+ stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
+ strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
+ strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
+ esac
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11673 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#define $cf_vscan_defs 1
+#if defined(USE_STDIO_VSCAN)
+#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
+#include <strstream.h>
+#endif
+
+int scanw(const char* fmt, ...)
+{
+ int result = -1;
+ char buf[BUFSIZ];
+
+ va_list args;
+ va_start(args, fmt);
+#if defined(USE_STDIO_VSCAN)
+ if (::vsscanf(buf, fmt, args) != -1)
+ result = 0;
+#elif defined(USE_STRSTREAM_VSCAN)
+ strstreambuf ss(buf, sizeof(buf));
+ if (ss.vscan(fmt, args) != -1)
+ result = 0;
+#elif defined(USE_STRSTREAM_VSCAN_CAST)
+ strstreambuf ss(buf, sizeof(buf));
+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
+ result = 0;
+#else
+#error case $cf_vscan_func failed
+#endif
+ va_end(args);
+ return result;
+}
+
+int
+main ()
+{
+int tmp, foo = scanw("%d", &tmp)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11721: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11724: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11727: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_cpp_vscan_func=$cf_vscan_func; break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_cpp_vscan_func=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ test "$cf_cv_cpp_vscan_func" != no && break
+ done
+
+fi
+echo "$as_me:11740: result: $cf_cv_cpp_vscan_func" >&5
+echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+fi
+
+case $cf_cv_cpp_vscan_func in #(vi
+stdio) #(vi
+ cat >>confdefs.h <<\EOF
+#define CPP_HAS_VSCAN_FUNC 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define USE_STDIO_VSCAN 1
+EOF
+
+ ;;
+strstream)
+ cat >>confdefs.h <<\EOF
+#define CPP_HAS_VSCAN_FUNC 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define USE_STRSTREAM_VSCAN 1
+EOF
+
+ ;;
+strstream_cast)
+ cat >>confdefs.h <<\EOF
+#define CPP_HAS_VSCAN_FUNC 1
+EOF
+
+ cat >>confdefs.h <<\EOF
+#define USE_STRSTREAM_VSCAN_CAST 1
+EOF
+
+ ;;
+esac
+
+ CXX_AR='$(AR)'
+ CXX_AR_OPTS='$(AR_OPTS)'
+ case $cf_cv_system_name in #(vi
+ irix*) #(vi
+ if test "$GXX" != yes ; then
+ CXX_AR='$(CXX)'
+ CXX_AR_OPTS='-ar -o'
+ fi
+ ;;
+ sco3.2v5*) #(vi
+ CXXLDFLAGS="-u main"
+ ;;
+ solaris2*)
+ if test "$GXX" != yes ; then
+ CXX_AR='$(CXX)'
+ CXX_AR_OPTS='-xar -o'
+ fi
+ ;;
+ esac
+
+else
+ cf_cxx_library=no
+ cf_cv_builtin_bool=1
+
+ # Just because we are not configuring against C++ right now does not
+ # mean that a user will not want to use C++. Some distributors disable
+ # the C++ portion of this configuration as a shortcut (or just to avoid
+ # compiling the demo in the c++ directory). So we need a reasonable
+ # default for the 'bool' type.
+ #
+ # Caveat: since the storage of the bool type is not standardized, it
+ # may change.
+
+ if test "$NCURSES_BOOL" != auto ; then
+ cf_cv_type_of_bool=$NCURSES_AUTO
+ else
+ if test "$cf_cv_header_stdbool_h" = 1 ; then
+
+echo "$as_me:11822: checking for size of bool" >&5
+echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
+if test "${cf_cv_type_of_bool+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ rm -f cf_test.out
+ if test "$cross_compiling" = yes; then
+ cf_cv_type_of_bool=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 11833 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined(__cplusplus)
+
+#ifdef HAVE_GXX_BUILTIN_H
+#include <g++/builtin.h>
+#elif HAVE_GPP_BUILTIN_H
+#include <gpp/builtin.h>
+#elif HAVE_BUILTIN_H
+#include <builtin.h>
+#endif
+
+#else
+
+#if $cf_cv_header_stdbool_h
+#include <stdbool.h>
+#endif
+
+#endif
+
+main()
+{
+ FILE *fp = fopen("cf_test.out", "w");
+ if (fp != 0) {
+ bool x = true;
+ if ((bool)(-x) >= 0)
+ fputs("unsigned ", fp);
+ if (sizeof(x) == sizeof(int)) fputs("int", fp);
+ else if (sizeof(x) == sizeof(char)) fputs("char", fp);
+ else if (sizeof(x) == sizeof(short))fputs("short",fp);
+ else if (sizeof(x) == sizeof(long)) fputs("long", fp);
+ fclose(fp);
+ }
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11878: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:11880: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11883: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_type_of_bool=`cat cf_test.out`
+ if test -z "$cf_cv_type_of_bool"; then
+ cf_cv_type_of_bool=unknown
+ fi
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_type_of_bool=unknown
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+
+ rm -f cf_test.out
+echo "$as_me:11901: result: $cf_cv_type_of_bool" >&5
+echo "${ECHO_T}$cf_cv_type_of_bool" >&6
+if test "$cf_cv_type_of_bool" = unknown ; then
+ case .$NCURSES_BOOL in #(vi
+ .auto|.) NCURSES_BOOL=unsigned;;
+ esac
+ { echo "$as_me:11907: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
+ cf_cv_type_of_bool=$NCURSES_BOOL
+fi
+
+ else
+ echo "$as_me:11913: checking for fallback type of bool" >&5
+echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
+ case "$host_cpu" in #(vi
+ i?86) cf_cv_type_of_bool=char ;; #(vi
+ *) cf_cv_type_of_bool=int ;;
+ esac
+ echo "$as_me:11919: result: $cf_cv_type_of_bool" >&5
+echo "${ECHO_T}$cf_cv_type_of_bool" >&6
+ fi
+ fi
+fi
+
+# If the C compiler did not declare bool, and we did not determine that the C++
+# compiler does not declare bool, turn on an ifdef in curses.h that makes the
+# ncurses library use the same type as C++ bool. Note that this allows one to
+# specify the type of bool in a configure-script option and postpone
+# integration with the C++ compiler provided that the types are compatible.
+USE_CXX_BOOL=1
+if test $cf_cv_cc_bool_type = 1
+then
+ # oops: C has a bool. Unlikely, but C++ could differ.
+ USE_CXX_BOOL=0
+elif test $cf_cv_builtin_bool = 0
+then
+ # C++ has no bool
+ USE_CXX_BOOL=0
+else
+ # this is the normal case
+ USE_CXX_BOOL='defined(__cplusplus)'
+fi
+
+if test "$cf_with_ada" != "no" ; then
+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 "$as_me:11948: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_gnat_exists+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$gnat_exists"; then
+ ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_gnat_exists="yes"
+echo "$as_me:11963: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
+fi
+fi
+gnat_exists=$ac_cv_prog_gnat_exists
+if test -n "$gnat_exists"; then
+ echo "$as_me:11972: result: $gnat_exists" >&5
+echo "${ECHO_T}$gnat_exists" >&6
+else
+ echo "$as_me:11975: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "$ac_cv_prog_gnat_exists" = no; then
+ cf_ada_make=
+else
+
+echo "$as_me:11983: checking for gnat version" >&5
+echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
+cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
+ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
+echo "$as_me:11987: result: $cf_gnat_version" >&5
+echo "${ECHO_T}$cf_gnat_version" >&6
+
+case $cf_gnat_version in
+ 3.1[1-9]*|3.[2-9]*|[4-9].*)
+ cf_cv_prog_gnat_correct=yes
+ ;;
+ *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
+ cf_cv_prog_gnat_correct=no
+ ;;
+esac
+case $cf_gnat_version in
+ 3.[1-9]*|[4-9].*)
+ cf_compile_generics=generics
+ cf_generic_objects="\$(GENOBJS)"
+ ;;
+ *) cf_compile_generics=
+ cf_generic_objects=
+ ;;
+esac
+
+ # Extract the first word of "m4", so it can be a program name with args.
+set dummy m4; ac_word=$2
+echo "$as_me:12010: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_M4_exists+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$M4_exists"; then
+ ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_M4_exists="yes"
+echo "$as_me:12025: found $ac_dir/$ac_word" >&5
+break
+done
+
+ test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
+fi
+fi
+M4_exists=$ac_cv_prog_M4_exists
+if test -n "$M4_exists"; then
+ echo "$as_me:12034: result: $M4_exists" >&5
+echo "${ECHO_T}$M4_exists" >&6
+else
+ echo "$as_me:12037: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ if test "$ac_cv_prog_M4_exists" = no; then
+ cf_cv_prog_gnat_correct=no
+ echo Ada95 binding required program m4 not found. Ada95 binding disabled.
+ fi
+ if test "$cf_cv_prog_gnat_correct" = yes; then
+ echo "$as_me:12046: checking if GNAT works" >&5
+echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
+
+rm -f conftest*
+cat >>conftest.ads <<CF_EOF
+procedure conftest;
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+begin
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ GNAT.OS_Lib.OS_Exit (0);
+end conftest;
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
+ if ( ./conftest 1>&5 2>&1 ) ; then
+ cf_cv_prog_gnat_correct=yes
+ else
+ cf_cv_prog_gnat_correct=no
+ fi
+else
+ cf_cv_prog_gnat_correct=no
+fi
+rm -f conftest*
+
+ echo "$as_me:12074: result: $cf_cv_prog_gnat_correct" >&5
+echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
+ fi
+fi
+if test "$cf_cv_prog_gnat_correct" = yes; then
+ ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
+
+ echo "$as_me:12081: checking if GNAT pragma Unreferenced works" >&5
+echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
+
+rm -f conftest*
+cat >>conftest.ads <<CF_EOF
+procedure conftest;
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+ test : Integer;
+ pragma Unreferenced (test);
+begin
+ test := 1;
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ GNAT.OS_Lib.OS_Exit (0);
+end conftest;
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
+ cf_cv_pragma_unreferenced=yes
+else
+ cf_cv_pragma_unreferenced=no
+fi
+rm -f conftest*
+
+ echo "$as_me:12108: result: $cf_cv_pragma_unreferenced" >&5
+echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
+
+ # if the pragma is supported, use it (needed in the Trace code).
+ if test $cf_cv_pragma_unreferenced = yes ; then
+ PRAGMA_UNREF=TRUE
+ else
+ PRAGMA_UNREF=FALSE
+ fi
+
+# Check whether --with-ada-compiler or --without-ada-compiler was given.
+if test "${with_ada_compiler+set}" = set; then
+ withval="$with_ada_compiler"
+ cf_ada_compiler=$withval
+else
+ cf_ada_compiler=gnatmake
+fi;
+
+ cf_ada_package=terminal_interface
+
+# Check whether --with-ada-include or --without-ada-include was given.
+if test "${with_ada_include+set}" = set; then
+ withval="$with_ada_include"
+
+else
+ withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
+fi;
+case ".$withval" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval withval="$withval"
+ case ".$withval" in #(vi
+ .NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ { { echo "$as_me:12154: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+eval ADA_INCLUDE="$withval"
+
+# Check whether --with-ada-objects or --without-ada-objects was given.
+if test "${with_ada_objects+set}" = set; then
+ withval="$with_ada_objects"
+
+else
+ withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
+fi;
+case ".$withval" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval withval="$withval"
+ case ".$withval" in #(vi
+ .NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
+ ;;
+*)
+ { { echo "$as_me:12188: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+eval ADA_OBJECTS="$withval"
+
+fi
+fi
+
+### Construct the library-subsets, if any, from this set of keywords:
+### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
+echo "$as_me:12201: checking for library subsets" >&5
+echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
+if test "$with_termlib" != no ; then
+ LIB_SUBSETS="termlib"
+ test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
+ LIB_SUBSETS="${LIB_SUBSETS} "
+else
+ LIB_SUBSETS="termlib+"
+ test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
+fi
+LIB_SUBSETS="${LIB_SUBSETS}base"
+test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
+test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
+echo "$as_me:12214: result: $LIB_SUBSETS" >&5
+echo "${ECHO_T}$LIB_SUBSETS" >&6
+
+### Construct the list of include-directories to be generated
+
+CPPFLAGS="-I. -I../include $CPPFLAGS"
+if test "$srcdir" != "."; then
+ CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
+fi
+if test "$GCC" != yes; then
+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test $prefix != /usr ; then
+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+ fi
+ else
+ CPPFLAGS="$CPPFLAGS -I\$(includedir)"
+ fi
+fi
+
+ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
+if test "$srcdir" != "."; then
+ ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
+fi
+if test "$GCC" != yes; then
+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
+elif test "$includedir" != "/usr/include"; then
+ if test "$includedir" = '${prefix}/include' ; then
+ if test $prefix != /usr ; then
+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
+ fi
+ else
+ ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
+ fi
+fi
+
+### Build up pieces for makefile rules
+echo "$as_me:12252: checking default library suffix" >&5
+echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
+
+ case $DFT_LWR_MODEL in
+ libtool) DFT_ARG_SUFFIX='' ;;
+ 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 "$as_me:12263: result: $DFT_ARG_SUFFIX" >&5
+echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
+
+echo "$as_me:12266: checking default library-dependency suffix" >&5
+echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
+
+ case $DFT_LWR_MODEL in
+ libtool) DFT_DEP_SUFFIX='.la' ;;
+ normal) DFT_DEP_SUFFIX='.a' ;;
+ debug) DFT_DEP_SUFFIX='_g.a' ;;
+ profile) DFT_DEP_SUFFIX='_p.a' ;;
+ shared)
+ case $cf_cv_system_name in
+ cygwin*) DFT_DEP_SUFFIX='.dll' ;;
+ darwin*) DFT_DEP_SUFFIX='.dylib' ;;
+ hpux*)
+ case $target in
+ ia64*) DFT_DEP_SUFFIX='.so' ;;
+ *) DFT_DEP_SUFFIX='.sl' ;;
+ esac
+ ;;
+ *) DFT_DEP_SUFFIX='.so' ;;
+ esac
+ esac
+ test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
+if test $DFT_LWR_MODEL = shared ; then
+ case $cf_cv_system_name in #(vi
+ cygwin*)
+ DFT_DEP_SUFFIX=".dll.a"
+ ;;
+ esac
+fi
+echo "$as_me:12295: result: $DFT_DEP_SUFFIX" >&5
+echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
+
+echo "$as_me:12298: checking default object directory" >&5
+echo $ECHO_N "checking default object directory... $ECHO_C" >&6
+
+ case $DFT_LWR_MODEL in
+ libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
+ normal) DFT_OBJ_SUBDIR='objects' ;;
+ debug) DFT_OBJ_SUBDIR='obj_g' ;;
+ profile) DFT_OBJ_SUBDIR='obj_p' ;;
+ shared)
+ case $cf_cv_system_name in #(vi
+ cygwin) #(vi
+ DFT_OBJ_SUBDIR='objects' ;;
+ *)
+ DFT_OBJ_SUBDIR='obj_s' ;;
+ esac
+ esac
+echo "$as_me:12314: result: $DFT_OBJ_SUBDIR" >&5
+echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
+
+# libtool thinks it can make c++ shared libraries (perhaps only g++)
+if test "$cf_with_cxx" = yes ; then
+echo "$as_me:12319: checking c++ library-dependency suffix" >&5
+echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
+if test "$with_libtool" != "no"; then
+ CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
+else
+
+ case normal in
+ libtool) CXX_LIB_SUFFIX='.la' ;;
+ normal) CXX_LIB_SUFFIX='.a' ;;
+ debug) CXX_LIB_SUFFIX='_g.a' ;;
+ profile) CXX_LIB_SUFFIX='_p.a' ;;
+ shared)
+ case $cf_cv_system_name in
+ cygwin*) CXX_LIB_SUFFIX='.dll' ;;
+ darwin*) CXX_LIB_SUFFIX='.dylib' ;;
+ hpux*)
+ case $target in
+ ia64*) CXX_LIB_SUFFIX='.so' ;;
+ *) CXX_LIB_SUFFIX='.sl' ;;
+ esac
+ ;;
+ *) CXX_LIB_SUFFIX='.so' ;;
+ esac
+ esac
+ test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
+fi
+echo "$as_me:12345: result: $CXX_LIB_SUFFIX" >&5
+echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
+
+fi
+
+### Set up low-level terminfo dependencies for makefiles.
+TINFO_LIST="$SHLIB_LIST"
+if test "$with_termlib" != no ; then
+
+ if test "$with_termlib" != yes ; then
+ TINFO_NAME=$with_termlib
+ TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+ TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+ TINFO_LIB_SUFFIX="${with_termlib}"
+ else
+ TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
+ TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
+ TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
+ fi
+
+ TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
+ SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
+ fi
+fi
+
+PROG_ARGS="$TEST_ARGS"
+
+echo "$as_me:12376: checking where we will install curses.h" >&5
+echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
+test "$with_overwrite" = no && \
+test "x$includedir" = 'x${prefix}/include' && \
+ includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
+echo "$as_me:12381: result: $includedir" >&5
+echo "${ECHO_T}$includedir" >&6
+
+### Resolve a conflict between normal and wide-curses by forcing applications
+### that will need libutf8 to add it to their configure script.
+if test "$with_overwrite" != no ; then
+if test "$NCURSES_LIBUTF8" = 1 ; then
+ NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
+ { echo "$as_me:12389: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
+echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
+fi
+fi
+
+### predefined stuff for the test programs
+cat >>confdefs.h <<\EOF
+#define HAVE_SLK_COLOR 1
+EOF
+
+### Construct the list of subdirectories for which we'll customize makefiles
+### with the appropriate compile-rules.
+
+DIRS_TO_MAKE="lib"
+for cf_item in $cf_list_models
+do
+
+ case $cf_item in
+ libtool) cf_subdir='obj_lo' ;;
+ normal) cf_subdir='objects' ;;
+ debug) cf_subdir='obj_g' ;;
+ profile) cf_subdir='obj_p' ;;
+ shared)
+ case $cf_cv_system_name in #(vi
+ cygwin) #(vi
+ cf_subdir='objects' ;;
+ *)
+ cf_subdir='obj_s' ;;
+ esac
+ esac
+
+ for cf_item2 in $DIRS_TO_MAKE
+ do
+ test $cf_item2 = $cf_subdir && break
+ done
+ test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
+done
+for cf_dir in $DIRS_TO_MAKE
+do
+ test ! -d $cf_dir && mkdir $cf_dir
+done
+
+echo "$as_me:12431: checking for src modules" >&5
+echo $ECHO_N "checking for src modules... $ECHO_C" >&6
+
+# dependencies and linker-arguments for test-programs
+TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
+if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+else
+ TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
+fi
+
+# dependencies and linker-arguments for utility-programs
+test "$with_termlib" = no && PROG_ARGS="$TEST_ARGS"
+
+cf_cv_src_modules=
+for cf_dir in $modules_to_build
+do
+ if test -f $srcdir/$cf_dir/modules; then
+
+ # We may/may not have tack in the distribution, though the
+ # makefile is.
+ if test $cf_dir = tack ; then
+ if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
+ continue
+ fi
+ fi
+
+ if test -z "$cf_cv_src_modules"; then
+ cf_cv_src_modules=$cf_dir
+ else
+ cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
+ fi
+
+ # Make the ncurses_cfg.h file record the library interface files as
+ # well. These are header files that are the same name as their
+ # directory. Ncurses is the only library that does not follow
+ # that pattern.
+ if test $cf_dir = tack ; then
+ continue
+ elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
+
+cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define HAVE_${cf_have_include}_H 1
+EOF
+
+ cat >>confdefs.h <<EOF
+#define HAVE_LIB${cf_have_include} 1
+EOF
+
+ TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ fi
+ fi
+ fi
+done
+echo "$as_me:12491: result: $cf_cv_src_modules" >&5
+echo "${ECHO_T}$cf_cv_src_modules" >&6
+TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
+
+PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
+
+SRC_SUBDIRS="man include"
+for cf_dir in $cf_cv_src_modules
+do
+ SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
+done
+
+ADA_SUBDIRS=
+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
+
+SUB_MAKEFILES=
+for cf_dir in $SRC_SUBDIRS
+do
+ SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
+done
+
+if test -n "$ADA_SUBDIRS"; then
+ for cf_dir in $ADA_SUBDIRS
+ do
+ SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
+ done
+
+fi
+
+cat >>confdefs.h <<EOF
+#define NCURSES_PATHSEP '$PATHSEP'
+EOF
+
+cat >>confdefs.h <<EOF
+#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
+EOF
+
+### Now that we're done running tests, add the compiler-warnings, if any
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $EXTRA_CFLAGS
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+################################################################################
+ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
+ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:12683: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+ac_cs_invocation="\$0 \$@"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Name of the executable.
+as_me=`echo "$0" |sed 's,.*[\\/],,'`
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+# NLS nuisances.
+$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
+$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
+$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
+$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
+$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
+$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
+$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
+$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
+
+exec 6>&1
+
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\EOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.52.20030208,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=false;;
+ esac
+
+ case $1 in
+ # Handling of the options.
+EOF
+cat >>$CONFIG_STATUS <<EOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:12859: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES="$CONFIG_FILES $1"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ ac_need_defaults=false;;
+
+ # This is an error.
+ -*) { { echo "$as_me:12878: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+exec 5>>config.log
+cat >&5 << _ACEOF
+
+## ----------------------- ##
+## Running config.status. ##
+## ----------------------- ##
+
+This file was extended by $as_me 2.52.20030208, executed with
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ > $ac_cs_invocation
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+
+_ACEOF
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+#
+# INIT-COMMANDS section.
+#
+
+### Special initialization commands, used to pass information from the
+### configuration-run into config.status
+
+AWK="$AWK"
+CF_LIST_MODELS="$cf_list_models"
+DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
+DFT_LWR_MODEL="$DFT_LWR_MODEL"
+LDCONFIG="$LDCONFIG"
+LIB_NAME="$LIB_NAME"
+LIB_SUBSETS="$LIB_SUBSETS"
+LIB_SUFFIX="$LIB_SUFFIX"
+LIB_TRACING="$LIB_TRACING"
+MAKE_TERMINFO="$MAKE_TERMINFO"
+NCURSES_OSPEED="$NCURSES_OSPEED"
+SRC_SUBDIRS="$SRC_SUBDIRS"
+TERMINFO="$TERMINFO"
+TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
+TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
+TINFO_NAME="$TINFO_NAME"
+WITH_CURSES_H="$with_curses_h"
+WITH_ECHO="$with_echo"
+WITH_OVERWRITE="$with_overwrite"
+cf_cv_abi_version="$cf_cv_abi_version"
+cf_cv_do_symlinks="$cf_cv_do_symlinks"
+cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
+cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
+cf_cv_rel_version="$cf_cv_rel_version"
+cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
+cf_cv_shlib_version="$cf_cv_shlib_version"
+cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
+cf_cv_system_name="$cf_cv_system_name"
+cf_with_cxx_binding="$cf_with_cxx_binding"
+host="$host"
+target="$target"
+
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
+ "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
+ "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
+ "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
+ "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
+ *) { { echo "$as_me:12963: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+
+EOF
+
+cat >>$CONFIG_STATUS <<EOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@DEFS@,$DEFS,;t t
+s,@LIBS@,$LIBS,;t t
+s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
+s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
+s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
+s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
+s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
+s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
+s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
+s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
+s,@PROG_EXT@,$PROG_EXT,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@LN_S@,$LN_S,;t t
+s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
+s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
+s,@LINT@,$LINT,;t t
+s,@MAN@,$MAN,;t t
+s,@LINT_OPTS@,$LINT_OPTS,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s,@LD@,$LD,;t t
+s,@ac_ct_LD@,$ac_ct_LD,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@AR_OPTS@,$AR_OPTS,;t t
+s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
+s,@DESTDIR@,$DESTDIR,;t t
+s,@BUILD_CC@,$BUILD_CC,;t t
+s,@BUILD_CPP@,$BUILD_CPP,;t t
+s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
+s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
+s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
+s,@BUILD_LIBS@,$BUILD_LIBS,;t t
+s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
+s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
+s,@cf_list_models@,$cf_list_models,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
+s,@LIB_CREATE@,$LIB_CREATE,;t t
+s,@LIB_OBJECT@,$LIB_OBJECT,;t t
+s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
+s,@LIB_PREP@,$LIB_PREP,;t t
+s,@LIB_CLEAN@,$LIB_CLEAN,;t t
+s,@LIB_COMPILE@,$LIB_COMPILE,;t t
+s,@LIB_LINK@,$LIB_LINK,;t t
+s,@LIB_INSTALL@,$LIB_INSTALL,;t t
+s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
+s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
+s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
+s,@TINFO_NAME@,$TINFO_NAME,;t t
+s,@LIB_NAME@,$LIB_NAME,;t t
+s,@LIB_PREFIX@,$LIB_PREFIX,;t t
+s,@CC_G_OPT@,$CC_G_OPT,;t t
+s,@CXX_G_OPT@,$CXX_G_OPT,;t t
+s,@LD_MODEL@,$LD_MODEL,;t t
+s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
+s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
+s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
+s,@LINK_PROGS@,$LINK_PROGS,;t t
+s,@LINK_TESTS@,$LINK_TESTS,;t t
+s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
+s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
+s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
+s,@INSTALL_LIB@,$INSTALL_LIB,;t t
+s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
+s,@PATHSEP@,$PATHSEP,;t t
+s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
+s,@WHICH_XTERM@,$WHICH_XTERM,;t t
+s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
+s,@TERMINFO@,$TERMINFO,;t t
+s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
+s,@TERMPATH@,$TERMPATH,;t t
+s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
+s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
+s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
+s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
+s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
+s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
+s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
+s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
+s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
+s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
+s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
+s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
+s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
+s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
+s,@NCURSES_CONST@,$NCURSES_CONST,;t t
+s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
+s,@ECHO_LINK@,$ECHO_LINK,;t t
+s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+s,@ADA_TRACE@,$ADA_TRACE,;t t
+s,@MATH_LIB@,$MATH_LIB,;t t
+s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
+s,@cf_cv_1UL@,$cf_cv_1UL,;t t
+s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
+s,@CXX_AR@,$CXX_AR,;t t
+s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
+s,@CXXLIBS@,$CXXLIBS,;t t
+s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
+s,@gnat_exists@,$gnat_exists,;t t
+s,@M4_exists@,$M4_exists,;t t
+s,@cf_ada_make@,$cf_ada_make,;t t
+s,@cf_ada_compiler@,$cf_ada_compiler,;t t
+s,@cf_ada_package@,$cf_ada_package,;t t
+s,@ADAFLAGS@,$ADAFLAGS,;t t
+s,@cf_compile_generics@,$cf_compile_generics,;t t
+s,@cf_generic_objects@,$cf_generic_objects,;t t
+s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
+s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
+s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
+s,@ACPPFLAGS@,$ACPPFLAGS,;t t
+s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
+s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
+s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
+s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
+s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
+s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
+s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
+s,@PROG_ARGS@,$PROG_ARGS,;t t
+s,@EXTRA_LIBS@,$EXTRA_LIBS,;t t
+s,@TINFO_LIST@,$TINFO_LIST,;t t
+s,@SHLIB_LIST@,$SHLIB_LIST,;t t
+s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
+s,@TEST_DEPS@,$TEST_DEPS,;t t
+s,@TEST_ARGS@,$TEST_ARGS,;t t
+s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
+CEOF
+
+EOF
+
+ cat >>$CONFIG_STATUS <<\EOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case $srcdir in
+ .) ac_srcdir=.
+ if test -z "$ac_dots"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* )
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_dots$srcdir ;;
+ esac
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_dots$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:13313: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ configure_input="Generated automatically from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:13331: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:13344: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+EOF
+cat >>$CONFIG_STATUS <<EOF
+ sed "$ac_vpsub
+$extrasub
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_iB='\([ ]\),\1#\2define\3'
+ac_iC=' '
+ac_iD='\4,;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:13410: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:13421: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:13434: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+EOF
+
+# Transform confdefs.h into a list of #define's. We won't use it as a sed
+# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
+# be either 'cat' or 'sort'.
+cat confdefs.h | uniq >conftest.vals
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+echo ' rm -f conftest.frag' >> $CONFIG_STATUS
+while grep . conftest.vals >/dev/null
+do
+ # Write chunks of a limited-size here document to conftest.frag.
+ echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+ echo 'CEOF' >> $CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+ rm -f conftest.vals
+ mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+# Run sed to substitute the contents of conftest.frag into $tmp/in at the
+# marker @DEFS@.
+echo ' cat >> conftest.edit <<CEOF
+/@DEFS@/r conftest.frag
+/@DEFS@/d
+CEOF
+sed -f conftest.edit $tmp/in > $tmp/out
+rm -f $tmp/in
+mv $tmp/out $tmp/in
+rm -f conftest.edit conftest.frag
+' >> $CONFIG_STATUS
+
+cat >>$CONFIG_STATUS <<\EOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated automatically by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated automatically by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ { echo "$as_me:13492: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" || mkdir "$as_incr_dir"
+ ;;
+ esac
+done; }
+
+ fi
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+EOF
+cat >>$CONFIG_STATUS <<\EOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+
+ case $ac_dest in
+ default )
+
+ case $cf_cv_system_name in
+ OS/2*) LIB_PREFIX='' ;;
+ os2*) LIB_PREFIX='' ;;
+ *) LIB_PREFIX='lib' ;;
+ esac
+cf_prefix=$LIB_PREFIX
+
+for cf_dir in $SRC_SUBDIRS
+do
+ if test -f $srcdir/$cf_dir/modules; then
+
+ IMPORT_LIB=
+ SHARED_LIB=
+ LIBS_TO_MAKE=
+ for cf_item in $CF_LIST_MODELS
+ do
+
+ case $cf_item in
+ libtool) cf_suffix='.la' ;;
+ normal) cf_suffix='.a' ;;
+ debug) cf_suffix='_g.a' ;;
+ profile) cf_suffix='_p.a' ;;
+ shared)
+ case $cf_cv_system_name in
+ cygwin*) cf_suffix='.dll' ;;
+ darwin*) cf_suffix='.dylib' ;;
+ hpux*)
+ case $target in
+ ia64*) cf_suffix='.so' ;;
+ *) cf_suffix='.sl' ;;
+ esac
+ ;;
+ *) 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) #(vi
+ case "$cf_cv_system_name" in #(vi
+ darwin*)
+ case .${LIB_SUFFIX} in
+ .w*)
+ cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+ cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
+ ;;
+ *)
+ cf_suffix='.$(REL_VERSION)'"$cf_suffix"
+ ;;
+ esac
+ ;; #(vi
+ *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
+ esac
+ ;;
+ abi)
+ case "$cf_cv_system_name" in #(vi
+ darwin*)
+ case .${LIB_SUFFIX} in
+ .w*)
+ cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+ cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
+ ;;
+ *)
+ cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
+ ;;
+ esac
+ ;; #(vi
+ *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
+ esac
+ ;;
+ esac
+ fi
+ # cygwin needs import library, and has unique naming convention
+ # use autodetected ${cf_prefix} for import lib and static lib, but
+ # use 'cyg' prefix for shared lib.
+ if test $cf_cv_shlib_version = cygdll ; then
+ SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
+ IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
+ LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
+ continue
+ fi
+ fi
+ LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
+ done
+
+ if test $cf_dir = ncurses ; then
+ cf_subsets="$LIB_SUBSETS"
+ cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
+ if test "$cf_termlib" != "$cf_subsets" ; then
+ cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
+ LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
+ fi
+ else
+ cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
+ fi
+
+ sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
+ -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
+ -e "s%@SHARED_LIB@%$SHARED_LIB%" \
+ $cf_dir/Makefile >$cf_dir/Makefile.out
+ mv $cf_dir/Makefile.out $cf_dir/Makefile
+
+ $AWK -f $srcdir/mk-0th.awk \
+ libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
+
+ for cf_subset in $cf_subsets
+ do
+ cf_subdirs=
+ for cf_item in $CF_LIST_MODELS
+ do
+ echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
+
+CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ case $cf_item in
+ libtool) cf_suffix='.la' ;;
+ normal) cf_suffix='.a' ;;
+ debug) cf_suffix='_g.a' ;;
+ profile) cf_suffix='_p.a' ;;
+ shared)
+ case $cf_cv_system_name in
+ cygwin*) cf_suffix='.dll' ;;
+ darwin*) cf_suffix='.dylib' ;;
+ hpux*)
+ case $target in
+ ia64*) cf_suffix='.so' ;;
+ *) cf_suffix='.sl' ;;
+ esac
+ ;;
+ *) cf_suffix='.so' ;;
+ esac
+ esac
+ test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
+
+ case $cf_item in
+ libtool) cf_subdir='obj_lo' ;;
+ normal) cf_subdir='objects' ;;
+ debug) cf_subdir='obj_g' ;;
+ profile) cf_subdir='obj_p' ;;
+ shared)
+ case $cf_cv_system_name in #(vi
+ cygwin) #(vi
+ cf_subdir='objects' ;;
+ *)
+ cf_subdir='obj_s' ;;
+ esac
+ esac
+
+ # Test for case where we build libtinfo with a different name.
+ cf_libname=$cf_dir
+ if test $cf_dir = ncurses ; then
+ case $cf_subset in
+ *base*)
+ ;;
+ termlib*)
+ cf_libname=$TINFO_LIB_SUFFIX
+ if test -n "${DFT_ARG_SUFFIX}" ; then
+ # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
+ cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
+ fi
+ ;;
+ esac
+ fi
+
+ # These dependencies really are for development, not
+ # builds, but they are useful in porting, too.
+ cf_depend="../include/ncurses_cfg.h"
+ if test "$srcdir" = "."; then
+ cf_reldir="."
+ else
+ cf_reldir="\$(srcdir)"
+ fi
+
+ if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
+ cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
+ elif test -f $srcdir/$cf_dir/curses.priv.h; then
+ cf_depend="$cf_depend $cf_reldir/curses.priv.h"
+ fi
+
+ cf_dir_suffix=
+ old_cf_suffix="$cf_suffix"
+ if test "$cf_cv_shlib_version_infix" = yes ; then
+ if test -n "$LIB_SUFFIX" ; then
+ case $LIB_SUFFIX in
+ w*)
+ cf_libname=`echo $cf_libname | sed 's/w$//'`
+ cf_suffix=`echo $cf_suffix | sed 's/^w//'`
+ cf_dir_suffix=w
+ ;;
+ esac
+ fi
+ fi
+
+ $AWK -f $srcdir/mk-1st.awk \
+ name=${cf_libname}${cf_dir_suffix} \
+ traces=$LIB_TRACING \
+ MODEL=$CF_ITEM \
+ model=$cf_subdir \
+ prefix=$cf_prefix \
+ suffix=$cf_suffix \
+ subset=$cf_subset \
+ ShlibVer=$cf_cv_shlib_version \
+ ShlibVerInfix=$cf_cv_shlib_version_infix \
+ DoLinks=$cf_cv_do_symlinks \
+ rmSoLocs=$cf_cv_rm_so_locs \
+ ldconfig="$LDCONFIG" \
+ overwrite=$WITH_OVERWRITE \
+ depend="$cf_depend" \
+ host="$host" \
+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
+
+ cf_suffix="$old_cf_suffix"
+
+ for cf_subdir2 in $cf_subdirs lib
+ do
+ test $cf_subdir = $cf_subdir2 && break
+ done
+ test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
+ $AWK -f $srcdir/mk-2nd.awk \
+ name=$cf_dir \
+ traces=$LIB_TRACING \
+ MODEL=$CF_ITEM \
+ model=$cf_subdir \
+ subset=$cf_subset \
+ srcdir=$srcdir \
+ echo=$WITH_ECHO \
+ crenames=$cf_cv_prog_CC_c_o \
+ cxxrenames=$cf_cv_prog_CXX_c_o \
+ $srcdir/$cf_dir/modules >>$cf_dir/Makefile
+ cf_subdirs="$cf_subdirs $cf_subdir"
+ done
+ done
+ fi
+
+ echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
+done
+
+for cf_dir in $SRC_SUBDIRS
+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
+ ;;
+ esac
+ fi
+
+ if test -f $srcdir/$cf_dir/modules; then
+ echo >> Makefile
+ if test -f $srcdir/$cf_dir/headers; then
+cat >> Makefile <<CF_EOF
+install.includes \\
+uninstall.includes \\
+CF_EOF
+ fi
+if test "$cf_dir" != "c++" ; then
+echo 'lint \' >> Makefile
+fi
+cat >> Makefile <<CF_EOF
+libs \\
+lintlib \\
+install.libs \\
+uninstall.libs \\
+install.$cf_dir \\
+uninstall.$cf_dir ::
+ cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
+CF_EOF
+ elif test -f $srcdir/$cf_dir/headers; then
+cat >> Makefile <<CF_EOF
+
+libs \\
+install.libs \\
+uninstall.libs \\
+install.includes \\
+uninstall.includes ::
+ cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
+CF_EOF
+fi
+done
+
+cat >> Makefile <<CF_EOF
+
+install.data \\
+uninstall.data ::
+$MAKE_TERMINFO cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
+
+install.man \\
+uninstall.man ::
+ cd man && \$(MAKE) \$(CF_MFLAGS) \$@
+
+distclean ::
+ rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
+ rm -f headers.sh headers.sed
+ rm -rf \$(DIRS_TO_MAKE)
+CF_EOF
+
+# Special case: tack's manpage lives in its own directory.
+if test -d tack ; then
+if test -f $srcdir/$tack.h; then
+cat >> Makefile <<CF_EOF
+
+install.man \\
+uninstall.man ::
+ cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
+CF_EOF
+fi
+fi
+
+rm -f headers.sed headers.sh
+
+echo creating headers.sh
+cat >headers.sh <<CF_EOF
+#! /bin/sh
+# This shell script is generated by the 'configure' script. It is invoked in a
+# subdirectory of the build tree. It generates a sed-script in the parent
+# directory that is used to adjust includes for header files that reside in a
+# subdirectory of /usr/include, etc.
+PRG=""
+while test \$# != 3
+do
+PRG="\$PRG \$1"; shift
+done
+DST=\$1
+REF=\$2
+SRC=\$3
+TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
+echo installing \$SRC in \$DST
+CF_EOF
+if test $WITH_CURSES_H = yes; then
+ cat >>headers.sh <<CF_EOF
+case \$DST in
+/*/include/*)
+ END=\`basename \$DST\`
+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
+ do
+ NAME=\`basename \$i\`
+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
+ done
+ ;;
+*)
+ echo "" >> \$TMPSED
+ ;;
+esac
+CF_EOF
+else
+ cat >>headers.sh <<CF_EOF
+case \$DST in
+/*/include/*)
+ END=\`basename \$DST\`
+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
+ do
+ NAME=\`basename \$i\`
+ if test "\$NAME" = "curses.h"
+ then
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ NAME=ncurses.h
+ fi
+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
+ done
+ ;;
+*)
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ ;;
+esac
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+rm -f \$TMPSRC
+sed -f \$TMPSED \$SRC > \$TMPSRC
+NAME=\`basename \$SRC\`
+CF_EOF
+if test $WITH_CURSES_H != yes; then
+ cat >>headers.sh <<CF_EOF
+test "\$NAME" = "curses.h" && NAME=ncurses.h
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+# Just in case someone gzip'd manpages, remove the conflicting copy.
+test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
+
+eval \$PRG \$TMPSRC \$DST/\$NAME
+rm -f \$TMPSRC \$TMPSED
+CF_EOF
+
+chmod 0755 headers.sh
+
+for cf_dir in $SRC_SUBDIRS
+do
+ if test -f $srcdir/$cf_dir/headers; then
+ cat >>$cf_dir/Makefile <<CF_EOF
+\$(DESTDIR)\$(includedir) :
+ sh \$(srcdir)/../mkinstalldirs \$@
+
+install \\
+install.libs \\
+install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
+CF_EOF
+ j=""
+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
+ do
+ test -n "$j" && echo " $j \\" >>$cf_dir/Makefile
+ j=$i
+ done
+ echo " $j" >>$cf_dir/Makefile
+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
+ do
+ echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
+ test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
+ done
+
+ cat >>$cf_dir/Makefile <<CF_EOF
+
+uninstall \\
+uninstall.libs \\
+uninstall.includes ::
+CF_EOF
+ for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
+ do
+ i=`basename $i`
+ echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
+ test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
+ done
+ fi
+
+ if test -f $srcdir/$cf_dir/modules; then
+ if test "$cf_dir" != "c++" ; then
+ cat >>$cf_dir/Makefile <<"CF_EOF"
+depend : $(AUTO_SRC)
+ makedepend -- $(CPPFLAGS) -- $(C_SRC)
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+CF_EOF
+ fi
+ fi
+done
+
+ ;;
+ esac
+done
+EOF
+
+cat >>$CONFIG_STATUS <<\EOF
+
+{ (exit 0); exit 0; }
+EOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+${MAKE-make} preinstall
diff --git a/Build/source/libs/ncurses/configure.in b/Build/source/libs/ncurses/configure.in
new file mode 100644
index 00000000000..5bfd7b86b85
--- /dev/null
+++ b/Build/source/libs/ncurses/configure.in
@@ -0,0 +1,1341 @@
+dnl***************************************************************************
+dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+dnl *
+dnl Permission is hereby granted, free of charge, to any person obtaining a *
+dnl copy of this software and associated documentation files (the *
+dnl "Software"), to deal in the Software without restriction, including *
+dnl without limitation the rights to use, copy, modify, merge, publish, *
+dnl distribute, distribute with modifications, sublicense, and/or sell *
+dnl copies of the Software, and to permit persons to whom the Software is *
+dnl furnished to do so, subject to the following conditions: *
+dnl *
+dnl The above copyright notice and this permission notice shall be included *
+dnl in all copies or substantial portions of the Software. *
+dnl *
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+dnl *
+dnl Except as contained in this notice, the name(s) of the above copyright *
+dnl holders shall not be used in advertising or otherwise to promote the *
+dnl sale, use or other dealings in this Software without prior written *
+dnl authorization. *
+dnl***************************************************************************
+dnl
+dnl Author: Thomas E. Dickey 1995-on
+dnl
+dnl $Id: configure.in,v 1.324 2004/10/09 18:12:27 tom Exp $
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl See http://invisible-island.net/autoconf/ for additional information.
+dnl
+dnl ---------------------------------------------------------------------------
+AC_PREREQ(2.13.20020210)
+AC_REVISION($Revision: 1.324 $)
+AC_INIT(ncurses/base/lib_initscr.c)
+AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
+
+CF_SUBST_NCURSES_VERSION
+
+CF_WITH_REL_VERSION(NCURSES)
+CF_WITH_ABI_VERSION
+
+CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
+AC_ARG_WITH(system-type,
+[ --with-system-type=XXX test: override derived host system-type],
+[AC_MSG_WARN(overriding system type to $withval)
+ cf_cv_system_name=$withval])
+
+### Save the given $CFLAGS to allow user-override.
+cf_user_CFLAGS="$CFLAGS"
+
+### Default install-location
+CF_CFG_DEFAULTS
+
+### Checks for programs.
+AC_PROG_CC
+CF_GCC_VERSION
+
+AC_PROG_CPP
+AC_PROG_GCC_TRADITIONAL
+CF_PROG_CC_C_O(CC)
+AC_ISC_POSIX
+CF_ANSI_CC_REQD
+CF_PROG_EXT
+
+AC_MSG_CHECKING(if you want to build programs such as tic)
+AC_ARG_WITH(progs,
+ [ --without-progs suppress build with programs (e.g., tic)],
+ [cf_with_progs=$withval],
+ [cf_with_progs=no])
+AC_MSG_RESULT($cf_with_progs)
+
+AC_MSG_CHECKING(if you wish to install curses.h)
+AC_ARG_WITH(curses-h,
+ [ --without-curses-h install curses.h as ncurses.h only],
+ [with_curses_h=$withval],
+ [with_curses_h=yes])
+AC_MSG_RESULT($with_curses_h)
+
+modules_to_build="ncurses"
+if test "X$cf_with_progs" != Xno ; then
+modules_to_build="$modules_to_build progs tack"
+fi
+
+AC_ARG_PROGRAM
+AC_PROG_AWK
+AC_PROG_MAKE_SET
+CF_PROG_INSTALL
+AC_SYS_LONG_FILE_NAMES
+CF_MIXEDCASE_FILENAMES
+AC_PROG_LN_S
+CF_MAKE_TAGS
+AC_CHECK_PROGS(LINT, tdlint lint alint)
+AC_CHECK_PROGS(MAN, man man_db)
+AC_SUBST(LINT_OPTS)
+
+dnl These are standard among *NIX systems, but not when cross-compiling
+AC_CHECK_TOOL(RANLIB, ranlib, ':')
+AC_CHECK_TOOL(LD, ld, ld)
+AC_CHECK_TOOL(AR, ar, ar)
+CF_SUBST(archiver options,AR_OPTS,rv)
+
+CF_MAKEFLAGS
+
+dnl Special option for use by system-builders: the install-prefix is used to
+dnl adjust the location into which the actual install is done, so that an
+dnl archive can be built without modifying the host system's configuration.
+AC_MSG_CHECKING(if you have specified an install-prefix)
+AC_ARG_WITH(install-prefix,
+ [ --with-install-prefix prefixes actual install-location ($DESTDIR)],
+ [case "$withval" in #(vi
+ yes|no) #(vi
+ ;;
+ *) DESTDIR="$withval"
+ ;;
+ esac])
+AC_MSG_RESULT($DESTDIR)
+AC_SUBST(DESTDIR)
+
+###############################################################################
+CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:)
+# If we're cross-compiling, allow the user to override the tools and their
+# options. The configure script is oriented toward identifying the host
+# compiler, etc., but we need a build compiler to generate parts of the source.
+CF_BUILD_CC
+
+###############################################################################
+CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
+
+### Options to allow the user to specify the set of libraries which are 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")
+
+CF_WITH_LIBTOOL
+if test "$with_libtool" != "no" ; then
+
+cf_list_models="$cf_list_models libtool"
+
+else
+
+AC_MSG_CHECKING(if you want to build shared libraries)
+AC_ARG_WITH(shared,
+ [ --with-shared generate shared-libraries],
+ [with_shared=$withval],
+ [with_shared=no])
+AC_MSG_RESULT($with_shared)
+test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
+
+AC_MSG_CHECKING(if you want to build static libraries)
+AC_ARG_WITH(normal,
+ [ --with-normal generate normal-libraries (default)],
+ [with_normal=$withval],
+ [with_normal=yes])
+AC_MSG_RESULT($with_normal)
+test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
+
+AC_MSG_CHECKING(if you want to build debug libraries)
+AC_ARG_WITH(debug,
+ [ --with-debug generate debug-libraries (default)],
+ [with_debug=$withval],
+ [with_debug=no])
+AC_MSG_RESULT($with_debug)
+test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
+
+AC_MSG_CHECKING(if you want to build profiling libraries)
+AC_ARG_WITH(profile,
+ [ --with-profile generate profile-libraries],
+ [with_profile=$withval],
+ [with_profile=no])
+AC_MSG_RESULT($with_profile)
+test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
+
+fi
+
+###############################################################################
+
+AC_MSG_CHECKING(for specified models)
+test -z "$cf_list_models" && cf_list_models=normal
+dnl If we use libtool to generate libraries, then it must be the only
+dnl specified model.
+test "$with_libtool" != "no" && cf_list_models=libtool
+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],
+ [with_termlib=$withval],
+ [with_termlib=no])
+AC_MSG_RESULT($with_termlib)
+
+### Checks for special libraries, must be done up-front.
+CF_WITH_DBMALLOC
+CF_WITH_DMALLOC
+
+SHLIB_LIST=""
+AC_MSG_CHECKING(if you want to link with the GPM mouse library)
+AC_ARG_WITH(gpm,
+ [ --with-gpm use Alessandro Rubini's GPM library],
+ [with_gpm=$withval],
+ [with_gpm=maybe])
+AC_MSG_RESULT($with_gpm)
+if test "$with_gpm" != no ; then
+ AC_CHECK_LIB(gpm,Gpm_Open,[
+ AC_CHECK_HEADER(gpm.h,[
+ AC_DEFINE(HAVE_GPM_H)
+ with_gpm=yes
+ ],[
+ if test "$with_gpm" = yes ; then
+ AC_ERROR(Cannot find GPM header)
+ fi
+ ])
+ ],[
+ if test "$with_gpm" = yes ; then
+ AC_ERROR(Cannot link with GPM library)
+ fi
+ with_gpm=no
+ ])
+ if test "$with_gpm" = yes ; then
+ CF_FUNC_DLSYM
+ EXTRA_LIBS="-ldl -lncurses $EXTRA_LIBS"
+ SHLIB_LIST="-ldl $SHLIB_LIST"
+ AC_DEFINE(HAVE_LIBGPM)
+ AC_CHECK_LIB(gpm,Gpm_Wgetch,[
+ AC_MSG_WARN(GPM library is already linked with curses - read the FAQ)
+ ])
+ fi
+fi
+
+CF_WITH_SYSMOUSE
+
+dnl Not all ports of gcc support the -g option
+
+if test X"$CC_G_OPT" = X"" ; then
+ CC_G_OPT='-g'
+ test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
+fi
+AC_SUBST(CC_G_OPT)
+
+if test X"$CXX_G_OPT" = X"" ; then
+ CXX_G_OPT='-g'
+ test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
+fi
+AC_SUBST(CXX_G_OPT)
+
+AC_MSG_CHECKING(for default loader flags)
+case $DFT_LWR_MODEL in
+libtool) LD_MODEL='' ;;
+normal) LD_MODEL='' ;;
+debug) LD_MODEL=$CC_G_OPT ;;
+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,
+[ --enable-rpath use rpath option when generating shared libraries],
+[cf_cv_ld_rpath=$enableval],
+[cf_cv_ld_rpath=no])
+AC_MSG_RESULT($cf_cv_ld_rpath)
+
+CF_SHARED_OPTS
+if test "$CC_SHARED_OPTS" = "unknown"; then
+ for model in $cf_list_models; do
+ if test "$model" = "shared"; then
+ AC_ERROR(Shared libraries are not supported in this version)
+ fi
+ done
+fi
+
+###############################################################################
+CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
+
+### use option --disable-overwrite to leave out the link to -lcurses
+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],
+ [if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi])
+AC_MSG_RESULT($with_overwrite)
+
+AC_MSG_CHECKING(if external terminfo-database is used)
+AC_ARG_ENABLE(database,
+ [ --disable-database do not use terminfo, only fallbacks/termcap],
+ [use_database=$enableval],
+ [use_database=yes])
+AC_MSG_RESULT($use_database)
+
+case $host_os in #(vi
+os2*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/emx.src'
+ ;;
+*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
+ ;;
+esac
+AC_SUBST(TERMINFO_SRC)
+
+CF_PATHSEP
+if test "$use_database" != no ; then
+ AC_DEFINE(USE_DATABASE)
+ AC_MSG_CHECKING(which terminfo source-file will be installed)
+ AC_ARG_ENABLE(database,
+ [ --with-database=XXX specify terminfo source to install],
+ [TERMINFO_SRC=$withval])
+ AC_MSG_RESULT($TERMINFO_SRC)
+fi
+
+AC_MSG_CHECKING(for list of fallback descriptions)
+AC_ARG_WITH(fallbacks,
+ [ --with-fallbacks=XXX specify list of fallback terminal descriptions],
+ [with_fallback=$withval],
+ [with_fallback=])
+AC_MSG_RESULT($with_fallback)
+FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
+AC_SUBST(FALLBACK_LIST)
+
+AC_MSG_CHECKING(if you want modern xterm or antique)
+AC_ARG_WITH(xterm-new,
+ [ --without-xterm-new specify if xterm terminfo should be old version],
+ [with_xterm_new=$withval],
+ [with_xterm_new=yes])
+case $with_xterm_new in
+no) with_xterm_new=xterm-old;;
+*) with_xterm_new=xterm-new;;
+esac
+AC_MSG_RESULT($with_xterm_new)
+WHICH_XTERM=$with_xterm_new
+AC_SUBST(WHICH_XTERM)
+
+MAKE_TERMINFO=
+if test "$use_database" = no ; then
+ TERMINFO="${datadir}/terminfo"
+ MAKE_TERMINFO="#"
+else
+
+AC_MSG_CHECKING(for list of terminfo directories)
+CF_WITH_PATHLIST(terminfo-dirs,
+ [ --with-terminfo-dirs=XXX specify list of terminfo directories],
+ TERMINFO_DIRS,
+ DATADIR/terminfo,
+ ${datadir}/terminfo)
+AC_MSG_RESULT($TERMINFO_DIRS)
+test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS")
+
+AC_MSG_CHECKING(for default terminfo directory)
+CF_WITH_PATH(default-terminfo-dir,
+ [ --with-default-terminfo-dir=DIR default terminfo directory],
+ TERMINFO,
+ DATADIR/terminfo,
+ ${datadir}/terminfo)
+AC_MSG_RESULT($TERMINFO)
+AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO")
+
+fi
+
+AC_SUBST(TERMINFO)
+AC_SUBST(MAKE_TERMINFO)
+
+### use option --disable-big-core to make tic run on small machines
+### We need 4Mb, check if we can allocate 50% more than that.
+AC_MSG_CHECKING(if big-core option selected)
+AC_ARG_ENABLE(big-core,
+ [ --disable-big-core assume machine has little memory],
+ [with_big_core=$enableval],
+ [AC_TRY_RUN([
+#include <stdlib.h>
+#include <string.h>
+int main() {
+ unsigned long n = 6000000L;
+ char *s = malloc(n);
+ if (s != 0)
+ s[0] = s[n-1] = 0;
+ exit(s == 0);
+}],
+ [with_big_core=yes],
+ [with_big_core=no],
+ [with_big_core=no])])
+AC_MSG_RESULT($with_big_core)
+test "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE)
+
+### use option --enable-termcap to compile in the termcap fallback support
+AC_MSG_CHECKING(if you want termcap-fallback support)
+AC_ARG_ENABLE(termcap,
+ [ --enable-termcap compile in termcap fallback support],
+ [with_termcap=$enableval],
+ [with_termcap=no])
+AC_MSG_RESULT($with_termcap)
+
+if test "$with_termcap" != "yes" ; then
+ if test "$use_database" = no ; then
+ if test -z "$with_fallback" ; then
+ AC_ERROR(You have disabled the database w/o specifying fallbacks)
+ fi
+ fi
+ AC_DEFINE(PURE_TERMINFO)
+else
+
+AC_DEFINE(USE_TERMCAP)
+AC_MSG_CHECKING(for list of termcap files)
+CF_WITH_PATHLIST(termpath,
+ [ --with-termpath=XXX specify list of termcap files],
+ TERMPATH,
+ /etc/termcap:/usr/share/misc/termcap)
+AC_MSG_RESULT($TERMPATH)
+test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH")
+
+### use option --enable-getcap to use a hacked getcap for reading termcaps
+AC_MSG_CHECKING(if fast termcap-loader is needed)
+AC_ARG_ENABLE(getcap,
+ [ --enable-getcap fast termcap load, no xrefs to terminfo],
+ [with_getcap=$enableval],
+ [with_getcap=no])
+AC_MSG_RESULT($with_getcap)
+test "$with_getcap" = "yes" && AC_DEFINE(USE_GETCAP)
+
+AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo)
+AC_ARG_ENABLE(getcap-cache,
+ [ --enable-getcap-cache cache translated termcaps in ~/.terminfo],
+ [with_getcap_cache=$enableval],
+ [with_getcap_cache=no])
+AC_MSG_RESULT($with_getcap_cache)
+test "$with_getcap_cache" = "yes" && AC_DEFINE(USE_GETCAP_CACHE)
+
+fi
+
+### Use option --disable-home-terminfo to completely remove ~/.terminfo
+AC_MSG_CHECKING(if ~/.terminfo is wanted)
+AC_ARG_ENABLE(home-terminfo,
+ [ --disable-home-terminfo drop ~/.terminfo from terminfo search-path],
+ [with_home_terminfo=$enableval],
+ [with_home_terminfo=yes])
+test "$with_home_terminfo" = "yes" && AC_DEFINE(USE_HOME_TERMINFO)
+
+### Use option --enable-symlinks to make tic use symlinks, not hard links
+### to reduce storage requirements for the terminfo database.
+CF_LINK_FUNCS
+
+with_links=no
+with_symlinks=no
+
+if test "$ac_cv_func_link" != yes ; then
+ AC_MSG_CHECKING(if tic should use symbolic links)
+ if test "$ac_cv_func_symlink" = yes ; then
+ with_symlinks=yes
+ else
+ with_symlinks=no
+ fi
+ AC_MSG_RESULT($with_symlinks)
+elif test "$ac_cv_func_symlink" != yes ; then
+ AC_MSG_CHECKING(if tic should use hard links)
+ if test "$ac_cv_func_link" = yes ; then
+ with_links=yes
+ else
+ with_links=no
+ fi
+ AC_MSG_RESULT($with_links)
+else
+ AC_MSG_CHECKING(if tic should use symbolic links)
+ AC_ARG_ENABLE(symlinks,
+ [ --enable-symlinks make tic use symbolic links not hard links],
+ [with_symlinks=$enableval],
+ [with_symlinks=no])
+ AC_MSG_RESULT($with_symlinks)
+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-no}])
+AC_MSG_RESULT($with_broken_linker)
+
+BROKEN_LINKER=0
+if test "$with_broken_linker" = yes ; then
+ AC_DEFINE(BROKEN_LINKER)
+ BROKEN_LINKER=1
+elif test "$DFT_LWR_MODEL" = shared ; then
+ case $cf_cv_system_name in #(vi
+ cygwin*)
+ AC_DEFINE(BROKEN_LINKER)
+ BROKEN_LINKER=1
+ CF_VERBOSE(cygwin linker is broken anyway)
+ ;;
+ esac
+fi
+AC_SUBST(BROKEN_LINKER)
+
+### use option --enable-widec to turn on use of wide-character support
+NCURSES_CH_T=chtype
+NCURSES_LIBUTF8=0
+
+NEED_WCHAR_H=0
+NCURSES_MBSTATE_T=0
+NCURSES_WCHAR_T=0
+NCURSES_WINT_T=0
+
+# Check to define _XOPEN_SOURCE "automatically"
+CF_XOPEN_SOURCE
+
+# Checks for CODESET support.
+AM_LANGINFO_CODESET
+
+# use these variables to work around a defect in gcc's fixincludes.
+NCURSES_OK_WCHAR_T=
+NCURSES_OK_WINT_T=
+
+AC_MSG_CHECKING(if you want wide-character code)
+AC_ARG_ENABLE(widec,
+ [ --enable-widec compile with wide-char/UTF-8 code],
+ [with_widec=$enableval],
+ [with_widec=no])
+AC_MSG_RESULT($with_widec)
+if test "$with_widec" = yes ; then
+ LIB_SUFFIX="w${LIB_SUFFIX}"
+ AC_DEFINE(USE_WIDEC_SUPPORT)
+ CF_PREDEFINE(_XOPEN_SOURCE,500)
+ CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
+ # with_overwrite=no
+ NCURSES_CH_T=cchar_t
+ AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc)
+ if test "$ac_cv_func_putwc" != yes ; then
+ CF_LIBUTF8
+ if test "$cf_cv_libutf8" = yes ; then
+ NCURSES_LIBUTF8=1
+ fi
+ fi
+ CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T)
+ CF_WCHAR_TYPE(wchar_t, NCURSES_WCHAR_T, NCURSES_OK_WCHAR_T)
+ CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T)
+fi
+AC_SUBST(NCURSES_CH_T)
+AC_SUBST(NCURSES_LIBUTF8)
+
+AC_SUBST(NEED_WCHAR_H)
+AC_SUBST(NCURSES_MBSTATE_T)
+AC_SUBST(NCURSES_WCHAR_T)
+AC_SUBST(NCURSES_WINT_T)
+
+AC_SUBST(NCURSES_OK_WCHAR_T)
+AC_SUBST(NCURSES_OK_WINT_T)
+
+### use option --with-bool to override bool's type
+AC_MSG_CHECKING(for type of bool)
+AC_ARG_WITH(bool,
+ [ --with-bool=TYPE override fallback type of bool variable],
+ [NCURSES_BOOL="$withval"],
+ [NCURSES_BOOL=auto])
+AC_MSG_RESULT($NCURSES_BOOL)
+AC_SUBST(NCURSES_BOOL)
+
+AC_MSG_CHECKING(for alternate terminal capabilities file)
+AC_ARG_WITH(caps,
+ [ --with-caps=alt compile with alternate Caps file],
+ [TERMINFO_CAPS=Caps.$withval],
+ [TERMINFO_CAPS=Caps])
+test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
+AC_MSG_RESULT($TERMINFO_CAPS)
+AC_SUBST(TERMINFO_CAPS)
+
+### use option --with-ospeed to override ospeed's type
+AC_MSG_CHECKING(for type of ospeed)
+AC_ARG_WITH(ospeed,
+ [ --with-ospeed=TYPE override type of ospeed variable],
+ [NCURSES_OSPEED="$withval"],
+ [NCURSES_OSPEED=short])
+AC_MSG_RESULT($NCURSES_OSPEED)
+AC_SUBST(NCURSES_OSPEED)
+
+### 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,
+ [ --enable-bsdpad recognize BSD-style prefix padding],
+ [with_bsdpad=$enableval],
+ [with_bsdpad=no])
+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_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
+
+###############################################################################
+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
+ NCURSES_EXT_FUNCS=1
+ AC_DEFINE(HAVE_CURSES_VERSION)
+ AC_DEFINE(HAVE_HAS_KEY)
+ AC_DEFINE(HAVE_RESIZETERM)
+ AC_DEFINE(HAVE_RESIZE_TERM)
+ AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
+ AC_DEFINE(HAVE_WRESIZE)
+ AC_DEFINE(NCURSES_EXT_FUNCS)
+else
+ NCURSES_EXT_FUNCS=0
+fi
+AC_SUBST(NCURSES_EXT_FUNCS)
+
+### 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,
+ [ --enable-const compile with extra/non-standard const],
+ [with_ext_const=$enableval],
+ [with_ext_const=no])
+AC_MSG_RESULT($with_ext_const)
+NCURSES_CONST='/*nothing*/'
+if test "$with_ext_const" = yes ; then
+ NCURSES_CONST=const
+fi
+AC_SUBST(NCURSES_CONST)
+
+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)
+
+###############################################################################
+# These options are relatively safe to experiment with.
+CF_HELP_MESSAGE(Development Code:)
+AC_MSG_CHECKING(if you want all development code)
+AC_ARG_WITH(develop,
+ [ --with-develop enable all development options],
+ [with_develop=$withval],
+ [with_develop=no])
+AC_MSG_RESULT($with_develop)
+
+### use option --enable-hard-tabs to turn on use of hard-tabs optimize
+AC_MSG_CHECKING(if you want hard-tabs code)
+AC_ARG_ENABLE(hard-tabs,
+ [ --enable-hard-tabs compile with hard-tabs code],
+ [with_hardtabs=$enableval],
+ [with_hardtabs=$with_develop])
+AC_MSG_RESULT($with_hardtabs)
+test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
+
+AC_MSG_CHECKING(if you want to use restrict environment when running as root)
+AC_ARG_ENABLE(root-environ,
+ [ --disable-root-environ limit environment when running as root],
+ [with_root_environ=$enableval],
+ [with_root_environ=yes])
+AC_MSG_RESULT($with_root_environ)
+test "$with_root_environ" = yes && AC_DEFINE(USE_ROOT_ENVIRON)
+
+### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
+AC_MSG_CHECKING(if you want limited support for xmc)
+AC_ARG_ENABLE(xmc-glitch,
+ [ --enable-xmc-glitch compile with limited support for xmc],
+ [with_xmc_glitch=$enableval],
+ [with_xmc_glitch=$with_develop])
+AC_MSG_RESULT($with_xmc_glitch)
+test "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT)
+
+###############################################################################
+# These are just experimental, probably should not be in a package:
+CF_HELP_MESSAGE(Experimental Code:)
+
+AC_MSG_CHECKING(if you do not want to assume colors are white-on-black)
+AC_ARG_ENABLE(assumed-color,
+ [ --disable-assumed-color do not assume anything about default-colors],
+ [with_assumed_color=$enableval],
+ [with_assumed_color=yes])
+AC_MSG_RESULT($with_assumed_color)
+test "$with_assumed_color" = yes && AC_DEFINE(USE_ASSUMED_COLOR)
+
+### 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,
+ [ --disable-hashmap compile without hashmap scrolling-optimization],
+ [with_hashmap=$enableval],
+ [with_hashmap=yes])
+AC_MSG_RESULT($with_hashmap)
+test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
+
+### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
+AC_MSG_CHECKING(if you want colorfgbg code)
+AC_ARG_ENABLE(colorfgbg,
+ [ --enable-colorfgbg compile with $COLORFGBG code],
+ [with_colorfgbg=$enableval],
+ [with_colorfgbg=no])
+AC_MSG_RESULT($with_colorfgbg)
+test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
+
+AC_MSG_CHECKING(if you want experimental safe-sprintf code)
+AC_ARG_ENABLE(safe-sprintf,
+ [ --enable-safe-sprintf compile with experimental safe-sprintf code],
+ [with_safe_sprintf=$enableval],
+ [with_safe_sprintf=no])
+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 without scroll-hints code],
+ [with_scroll_hints=$enableval],
+ [with_scroll_hints=yes])
+AC_MSG_RESULT($with_scroll_hints)
+test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS)
+fi
+
+###############################################################################
+CF_HELP_MESSAGE(Testing/development Options:)
+
+### use option --disable-echo to suppress full display compiling commands
+AC_MSG_CHECKING(if you want to display full commands during build)
+AC_ARG_ENABLE(echo,
+ [ --enable-echo build: display "compiling" commands (default)],
+ [with_echo=$enableval],
+ [with_echo=yes])
+if test "$with_echo" = yes; then
+ ECHO_LINK=
+else
+ ECHO_LINK='@ echo linking $@ ... ;'
+ test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
+fi
+AC_MSG_RESULT($with_echo)
+AC_SUBST(ECHO_LINK)
+
+### use option --enable-warnings to turn on all gcc warnings
+AC_MSG_CHECKING(if you want to see compiler warnings)
+AC_ARG_ENABLE(warnings,
+ [ --enable-warnings build: turn on GCC compiler warnings],
+ [with_warnings=$enableval])
+AC_MSG_RESULT($with_warnings)
+
+if test -n "$with_warnings"; then
+ ADAFLAGS="$ADAFLAGS -gnatg"
+ CF_GCC_WARNINGS
+fi
+CF_GCC_ATTRIBUTES
+
+### use option --enable-assertions to turn on generation of assertion code
+AC_MSG_CHECKING(if you want to enable runtime assertions)
+AC_ARG_ENABLE(assertions,
+ [ --enable-assertions test: turn on generation of assertion code],
+ [with_assertions=$enableval],
+ [with_assertions=no])
+AC_MSG_RESULT($with_assertions)
+if test -n "$GCC"
+then
+ if test "$with_assertions" = no
+ then
+ AC_DEFINE(NDEBUG)
+ CPPFLAGS="$CPPFLAGS -DNDEBUG"
+ else
+ ADAFLAGS="$ADAFLAGS -gnata"
+ fi
+fi
+
+### use option --disable-leaks to suppress "permanent" leaks, for testing
+AC_ARG_ENABLE(leaks,
+ [ --disable-leaks test: suppress permanent memory-leaks],
+ [test "$enableval" = no && AC_DEFINE(NO_LEAKS)])
+AC_DEFINE(HAVE_NC_ALLOC_H)
+
+### use option --enable-expanded to generate certain macros as functions
+AC_ARG_ENABLE(expanded,
+ [ --enable-expanded test: generate functions for certain macros],
+ [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
+
+### use option --disable-macros to suppress macros in favor of functions
+AC_ARG_ENABLE(macros,
+ [ --disable-macros test: use functions rather than macros],
+ [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
+
+# Normally we only add trace() to the debug-library. Allow this to be
+# extended to all models of the ncurses library:
+cf_all_traces=no
+case "$CFLAGS $CPPFLAGS" in
+*-DTRACE*)
+ cf_all_traces=yes
+ ;;
+esac
+
+AC_MSG_CHECKING(whether to add trace feature to all models)
+AC_ARG_WITH(trace,
+[ --with-trace test: add trace() function to all models of ncurses],
+[cf_with_trace=$withval],
+[cf_with_trace=$cf_all_traces])
+AC_MSG_RESULT($with_trace)
+
+if test "$cf_with_trace" = yes ; then
+ LIB_TRACING=all
+ ADA_TRACE=TRUE
+ CF_ADD_CFLAGS(-DTRACE)
+else
+ LIB_TRACING=DEBUG
+ ADA_TRACE=FALSE
+fi
+
+AC_SUBST(ADA_TRACE)
+
+### Checks for libraries.
+AC_CHECK_FUNC(gettimeofday,
+ AC_DEFINE(HAVE_GETTIMEOFDAY),[
+
+AC_CHECK_LIB(bsd, gettimeofday,
+ AC_DEFINE(HAVE_GETTIMEOFDAY)
+ LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
+
+CF_MATH_LIB(MATH_LIB,sin(x))
+AC_SUBST(MATH_LIB)
+
+### Checks for header files.
+AC_STDC_HEADERS
+AC_HEADER_DIRENT
+AC_HEADER_TIME
+CF_REGEX
+
+dnl These are some other potentially nonportable headers.
+AC_CHECK_HEADERS( \
+fcntl.h \
+getopt.h \
+libc.h \
+limits.h \
+locale.h \
+poll.h \
+sys/bsdtypes.h \
+sys/ioctl.h \
+sys/param.h \
+sys/poll.h \
+sys/select.h \
+sys/time.h \
+sys/times.h \
+ttyent.h \
+unistd.h \
+wctype.h )
+
+# check for ISC (this may also define _POSIX_SOURCE)
+# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
+if test "$ISC" = yes ; then
+ AC_CHECK_LIB(cposix,main)
+ AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'
+fi
+
+CF_SYS_TIME_SELECT
+
+### checks for compiler characteristics
+AC_LANG_C
+AC_C_CONST
+AC_C_INLINE
+test "$ac_cv_c_inline" != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
+
+CF_TYPEOF_CHTYPE
+
+### Checks for external-data
+CF_ERRNO
+CF_LINK_DATAONLY
+
+### Checks for library functions.
+AC_CHECK_FUNCS( \
+getcwd \
+getegid \
+geteuid \
+getttynam \
+issetugid \
+nanosleep \
+poll \
+remove \
+select \
+setbuf \
+setbuffer \
+setvbuf \
+sigaction \
+sigvec \
+strdup \
+strstr \
+tcgetpgrp \
+times \
+vsnprintf \
+)
+if test "$with_getcap" = "yes" ; then
+ CF_CGETENT
+fi
+
+CF_ISASCII
+CF_STRUCT_SIGACTION
+CF_FUNC_TERMIOS
+CF_FUNC_VSSCANF
+CF_MKSTEMP
+
+# setup for prototype of fallback for vsscanf()
+if test "$cf_cv_func_vsscanf" = vsscanf ; then
+ HAVE_VSSCANF=1
+else
+ HAVE_VSSCANF=0
+fi
+AC_SUBST(HAVE_VSSCANF)
+
+dnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS
+if test "$cross_compiling" = yes ; then
+ AC_MSG_WARN(cross compiling: assume setvbuf params not reversed)
+else
+ AC_FUNC_SETVBUF_REVERSED
+fi
+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
+ CF_STRIP_G_OPT(CFLAGS)
+ CF_STRIP_G_OPT(CXXFLAGS)
+fi
+
+# Just in case, check if the C compiler has a bool type.
+CF_BOOL_DECL(cf_cv_cc_bool_type)
+
+# Check for C++ compiler characteristics (and ensure that it's there!)
+if test -n "$CXX" ; then
+ AC_LANG_CPLUSPLUS
+ CF_STDCPP_LIBRARY
+ CF_PROG_CC_C_O(CXX)
+
+ case $GXX_VERSION in
+ 1*|2.[0-6]*)
+ cf_cxx_library=yes
+ ;;
+ *-2.7*|2.7*)
+ CF_GPP_LIBRARY
+ ;;
+ *)
+ cf_cxx_library=no
+ ;;
+ esac
+
+ AC_CHECK_HEADERS(typeinfo)
+
+ CF_BOOL_DECL
+ CF_BOOL_SIZE
+ CF_ETIP_DEFINES
+ CF_CPP_PARAM_INIT
+ CF_CPP_VSCAN_FUNC
+
+ CXX_AR='$(AR)'
+ CXX_AR_OPTS='$(AR_OPTS)'
+ case $cf_cv_system_name in #(vi
+ irix*) #(vi
+ if test "$GXX" != yes ; then
+ CXX_AR='$(CXX)'
+ CXX_AR_OPTS='-ar -o'
+ fi
+ ;;
+ sco3.2v5*) #(vi
+ CXXLDFLAGS="-u main"
+ ;;
+ solaris2*)
+ if test "$GXX" != yes ; then
+ CXX_AR='$(CXX)'
+ CXX_AR_OPTS='-xar -o'
+ fi
+ ;;
+ esac
+ AC_SUBST(CXXLDFLAGS)
+ AC_SUBST(CXX_AR)
+ AC_SUBST(CXX_AR_OPTS)
+else
+ cf_cxx_library=no
+ cf_cv_builtin_bool=1
+
+ # Just because we are not configuring against C++ right now does not
+ # mean that a user will not want to use C++. Some distributors disable
+ # the C++ portion of this configuration as a shortcut (or just to avoid
+ # compiling the demo in the c++ directory). So we need a reasonable
+ # default for the 'bool' type.
+ #
+ # Caveat: since the storage of the bool type is not standardized, it
+ # may change.
+
+ if test "$NCURSES_BOOL" != auto ; then
+ cf_cv_type_of_bool=$NCURSES_AUTO
+ else
+ if test "$cf_cv_header_stdbool_h" = 1 ; then
+ CF_BOOL_SIZE
+ else
+ AC_MSG_CHECKING(for fallback type of bool)
+ case "$host_cpu" in #(vi
+ i?86) cf_cv_type_of_bool=char ;; #(vi
+ *) cf_cv_type_of_bool=int ;;
+ esac
+ AC_MSG_RESULT($cf_cv_type_of_bool)
+ fi
+ fi
+fi
+AC_SUBST(CXXLIBS)
+
+# If the C compiler did not declare bool, and we did not determine that the C++
+# compiler does not declare bool, turn on an ifdef in curses.h that makes the
+# ncurses library use the same type as C++ bool. Note that this allows one to
+# specify the type of bool in a configure-script option and postpone
+# integration with the C++ compiler provided that the types are compatible.
+USE_CXX_BOOL=1
+if test $cf_cv_cc_bool_type = 1
+then
+ # oops: C has a bool. Unlikely, but C++ could differ.
+ USE_CXX_BOOL=0
+elif test $cf_cv_builtin_bool = 0
+then
+ # C++ has no bool
+ USE_CXX_BOOL=0
+else
+ # this is the normal case
+ USE_CXX_BOOL='defined(__cplusplus)'
+fi
+AC_SUBST(USE_CXX_BOOL)
+
+CF_HELP_MESSAGE(Ada95 Binding Options:)
+
+dnl Check for availability of GNU Ada Translator (GNAT).
+dnl At the moment we support no other Ada95 compiler.
+if test "$cf_with_ada" != "no" ; then
+cf_ada_make=gnatmake
+AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
+if test "$ac_cv_prog_gnat_exists" = no; then
+ cf_ada_make=
+else
+ CF_GNAT_VERSION
+ AC_CHECK_PROG(M4_exists, m4, yes, no)
+ if test "$ac_cv_prog_M4_exists" = no; then
+ cf_cv_prog_gnat_correct=no
+ echo Ada95 binding required program m4 not found. Ada95 binding disabled.
+ fi
+ if test "$cf_cv_prog_gnat_correct" = yes; then
+ AC_MSG_CHECKING(if GNAT works)
+ CF_GNAT_TRY_RUN([procedure conftest;],
+[with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+begin
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ GNAT.OS_Lib.OS_Exit (0);
+end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no])
+ AC_MSG_RESULT($cf_cv_prog_gnat_correct)
+ fi
+fi
+if test "$cf_cv_prog_gnat_correct" = yes; then
+ ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
+
+ AC_MSG_CHECKING(if GNAT pragma Unreferenced works)
+ CF_GNAT_TRY_LINK([procedure conftest;],
+[with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+ test : Integer;
+ pragma Unreferenced (test);
+begin
+ test := 1;
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ GNAT.OS_Lib.OS_Exit (0);
+end conftest;],[cf_cv_pragma_unreferenced=yes],[cf_cv_pragma_unreferenced=no])
+ AC_MSG_RESULT($cf_cv_pragma_unreferenced)
+
+ # if the pragma is supported, use it (needed in the Trace code).
+ if test $cf_cv_pragma_unreferenced = yes ; then
+ PRAGMA_UNREF=TRUE
+ else
+ PRAGMA_UNREF=FALSE
+ fi
+
+ AC_ARG_WITH(ada-compiler,
+ [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
+ [cf_ada_compiler=$withval],
+ [cf_ada_compiler=gnatmake])
+
+ cf_ada_package=terminal_interface
+
+ AC_SUBST(cf_ada_make)
+ AC_SUBST(cf_ada_compiler)
+ AC_SUBST(cf_ada_package)
+ AC_SUBST(ADAFLAGS)
+ AC_SUBST(cf_compile_generics)
+ AC_SUBST(cf_generic_objects)
+ AC_SUBST(PRAGMA_UNREF)
+
+ CF_WITH_PATH(ada-include,
+ [ --with-ada-include=DIR Ada includes are in DIR],
+ ADA_INCLUDE,
+ 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/ada/adalib,
+ [$]prefix/lib/ada/adalib)
+ AC_SUBST(ADA_OBJECTS)
+
+fi
+fi
+
+### Construct the library-subsets, if any, from this set of keywords:
+### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
+AC_MSG_CHECKING(for library subsets)
+if test "$with_termlib" != no ; then
+ LIB_SUBSETS="termlib"
+ test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
+ LIB_SUBSETS="${LIB_SUBSETS} "
+else
+ LIB_SUBSETS="termlib+"
+ test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
+fi
+LIB_SUBSETS="${LIB_SUBSETS}base"
+test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
+test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
+AC_MSG_RESULT($LIB_SUBSETS)
+
+### 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
+if test $DFT_LWR_MODEL = shared ; then
+ case $cf_cv_system_name in #(vi
+ cygwin*)
+ DFT_DEP_SUFFIX=".dll.a"
+ ;;
+ esac
+fi
+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)
+
+# libtool thinks it can make c++ shared libraries (perhaps only g++)
+if test "$cf_with_cxx" = yes ; then
+AC_MSG_CHECKING(c++ library-dependency suffix)
+if test "$with_libtool" != "no"; then
+ CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
+else
+ CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX)dnl we normally make a static library
+fi
+AC_MSG_RESULT($CXX_LIB_SUFFIX)
+AC_SUBST(CXX_LIB_SUFFIX)
+fi
+
+### Set up low-level terminfo dependencies for makefiles.
+TINFO_LIST="$SHLIB_LIST"
+if test "$with_termlib" != no ; then
+
+ if test "$with_termlib" != yes ; then
+ TINFO_NAME=$with_termlib
+ TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+ TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
+ TINFO_LIB_SUFFIX="${with_termlib}"
+ else
+ TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
+ TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
+ TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
+ fi
+
+ TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
+ SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
+ fi
+fi
+AC_SUBST(TINFO_ARG_SUFFIX)
+AC_SUBST(TINFO_DEP_SUFFIX)
+AC_SUBST(TINFO_LIB_SUFFIX)
+
+PROG_ARGS="$TEST_ARGS"
+AC_SUBST(PROG_ARGS)
+
+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)
+
+### Resolve a conflict between normal and wide-curses by forcing applications
+### that will need libutf8 to add it to their configure script.
+if test "$with_overwrite" != no ; then
+if test "$NCURSES_LIBUTF8" = 1 ; then
+ NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
+ AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h)
+fi
+fi
+
+AC_SUBST(EXTRA_LIBS)
+AC_SUBST(TINFO_LIST)
+AC_SUBST(SHLIB_LIST)
+
+### predefined stuff for the test programs
+AC_DEFINE(HAVE_SLK_COLOR)
+
+### Construct the list of subdirectories for which we'll customize makefiles
+### with the appropriate compile-rules.
+
+CF_DIRS_TO_MAKE
+CF_SRC_MODULES($modules_to_build)
+
+AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
+
+AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}")
+
+### Now that we're done running tests, add the compiler-warnings, if any
+CF_ADD_CFLAGS($EXTRA_CFLAGS)
+
+################################################################################
+AC_OUTPUT( \
+ include/MKterm.h.awk \
+ include/curses.head:include/curses.h.in \
+ include/termcap.h \
+ include/unctrl.h \
+ $SUB_MAKEFILES \
+ Makefile,[
+CF_LIB_RULES
+],[
+### Special initialization commands, used to pass information from the
+### configuration-run into config.status
+
+AWK="$AWK"
+CF_LIST_MODELS="$cf_list_models"
+DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
+DFT_LWR_MODEL="$DFT_LWR_MODEL"
+LDCONFIG="$LDCONFIG"
+LIB_NAME="$LIB_NAME"
+LIB_SUBSETS="$LIB_SUBSETS"
+LIB_SUFFIX="$LIB_SUFFIX"
+LIB_TRACING="$LIB_TRACING"
+MAKE_TERMINFO="$MAKE_TERMINFO"
+NCURSES_OSPEED="$NCURSES_OSPEED"
+SRC_SUBDIRS="$SRC_SUBDIRS"
+TERMINFO="$TERMINFO"
+TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
+TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
+TINFO_NAME="$TINFO_NAME"
+WITH_CURSES_H="$with_curses_h"
+WITH_ECHO="$with_echo"
+WITH_OVERWRITE="$with_overwrite"
+cf_cv_abi_version="$cf_cv_abi_version"
+cf_cv_do_symlinks="$cf_cv_do_symlinks"
+cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
+cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
+cf_cv_rel_version="$cf_cv_rel_version"
+cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
+cf_cv_shlib_version="$cf_cv_shlib_version"
+cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
+cf_cv_system_name="$cf_cv_system_name"
+cf_with_cxx_binding="$cf_with_cxx_binding"
+host="$host"
+target="$target"
+
+],cat)dnl
+${MAKE-make} preinstall
diff --git a/Build/source/libs/ncurses/convert_configure.pl b/Build/source/libs/ncurses/convert_configure.pl
new file mode 100644
index 00000000000..dea92ca5d8c
--- /dev/null
+++ b/Build/source/libs/ncurses/convert_configure.pl
@@ -0,0 +1,90 @@
+extproc perl -S -w
+
+# The converted script is written to stdout, so run this script as
+# convert_configure configure > configure.cmd
+#
+# When the converted script runs, it expects that /tmp dir is
+# available (so we create it).
+#
+# run the result like this:
+# .\configure
+
+# Some frequent manual intervention:
+# a) Some makefiles hardwire SHELL = /bin/sh ==> change to: sh
+# b) Some makefiles recognize that exe files terminate on .exe
+# You need to give this script -no-zexe option...
+
+shift, $no_zexe = 1 if @ARGV and $ARGV[0] eq '-no-zexe';
+
+mkdir '/tmp', 0777 unless -d '/tmp';
+
+print <<EOF;
+extproc sh
+
+EOF
+
+print <<EOF unless $no_zexe;
+# Make sensible defaults:
+CC="gcc -Zexe -Zmt"
+export CC
+CXX="gcc -Zexe -Zmt"
+export CXX
+#GCCOPT="$GCCOPT -Zexe"
+#export GCCOPT
+EOF
+
+print <<EOF;
+CONFIG_SHELL=sh
+export CONFIG_SHELL
+
+# Optimization (GNU make 3.74 cannot be loaded :-():
+emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
+emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
+emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
+
+
+EOF
+
+$checking_path = 0;
+
+while (<>) {
+ if (/for\s+(\w+)\s+in\s*\$(PATH|ac_dummy)\s*;/) {
+ $checking_path = 1;
+ $varname = $1;
+ $subst= <<EOS
+$varname="`echo -E \\"\$$varname\\" | tr \\\\\\\\\\\\\\\\ / `"
+EOS
+ }
+ if (/if\s+test\s+-z\s+\"\$INSTALL\"/) {
+ $checking_install = 1;
+ }
+ $checking_install = $checking_path = 0 if /^\s*done\s*$/;
+ # We want to create an extra line like this one:
+# ac_dir="`echo -E \"$ac_dir\" | tr \\\\\\\\ / `"
+ s{^((\s*)if\s+test)\s*-f\s*(\$$varname/\S+)\s*;}
+ {$2$subst$1 -f $3 -o -f $3.exe ;}
+ if $checking_path; # Checking for executables
+ # change |/usr/sbin/*| to |/usr/sbin/*|?:[\\/]os2[\\/]install[\\/]*|
+ # in the list of things to skip (with both cases)
+ s{\Q|/usr/sbin/*|}
+ {|/usr/sbin/*|?:[\\\\/]os2[\\\\/]install[\\\\/]*|?:[\\\\/]OS2[\\\\/]INSTALL[\\\\/]*|}
+ if $checking_install; # Do not accept d:/os2/install/install.exe
+ s/^(host|build)=NONE$/$1=x86-emx-os2/; # Make default host/build
+ s/"\$\{IFS}:"$/"\${IFS};"/; # Fix IFS line
+ s/\bIFS=\":\"$/IFS=";"/; # Fix another IFS line
+ s/\btest\s+-s\s+conftest\b/test -f conftest/g; # Fix exe test
+ # This one is needed for curses:
+ s/^\s*host=`.*\$ac_config_sub \$host_alias`/$&\nif test -z "\$host"; then host=\$host_alias; fi/;
+ s,/bin/sh(?![/\w]),sh,g;
+ s,^(\s*/usr/sbin/sendmail\s*)\\$,$1 "`whence sendmail | tr '\\\\\\\\' / `" \\,;
+ print;
+}
+
+__END__
+
+Changes: 98/11 : support check for executables in ncurses.
+ 99/2 : support INSTALL,
+ new IFS=':' style
+ 99/11 : find sendmail
+ 00/01 : export CONFIG_SHELL
+ 00/10 : new syntax for host=`...` line
diff --git a/Build/source/libs/ncurses/dist.mk b/Build/source/libs/ncurses/dist.mk
new file mode 100644
index 00000000000..9e227e00aa7
--- /dev/null
+++ b/Build/source/libs/ncurses/dist.mk
@@ -0,0 +1,138 @@
+# $Id: dist.mk,v 1.439 2004/10/16 14:30:22 tom Exp $
+# Makefile for creating ncurses distributions.
+#
+# This only needs to be used directly as a makefile by developers, but
+# configure mines the current version number out of here. To move
+# to a new version number, just edit this file and run configure.
+#
+SHELL = /bin/sh
+
+# These define the major/minor/patch versions of ncurses.
+NCURSES_MAJOR = 5
+NCURSES_MINOR = 4
+NCURSES_PATCH = 20041016
+
+# We don't append the patch to the version, since this only applies to releases
+VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
+
+DUMP = lynx -dump
+DUMP2 = $(DUMP) -nolist
+
+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). Newer
+# versions of 'man' on Linux leave no margin (and make it harder to sync with
+# pages).
+MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html'
+
+ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml
+
+all : $(ALL)
+
+dist: $(ALL)
+ (cd ..; tar cvf ncurses-$(VERSION).tar `sed <ncurses-$(VERSION)/MANIFEST 's/^./ncurses-$(VERSION)/'`; gzip ncurses-$(VERSION).tar)
+
+distclean:
+ rm -f $(ALL) subst.tmp subst.sed MANIFEST.tmp
+
+# Don't mess with announce.html.in unless you have lynx available!
+doc/html/announce.html: announce.html.in
+ sed 's,@VERSION@,$(VERSION),' <announce.html.in > $@
+
+ANNOUNCE : doc/html/announce.html
+ $(DUMP) doc/html/announce.html > $@
+
+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 > $@
+
+MANPROG = tbl | nroff -man
+
+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
+ # change some things to make weblint happy:
+ @echo 's/<B>/<STRONG>/g' >> subst.tmp
+ @echo 's/<\/B>/<\/STRONG>/g' >> subst.tmp
+ @echo 's/<I>/<EM>/g' >> subst.tmp
+ @echo 's/<\/I>/<\/EM>/g' >> subst.tmp
+ @misc/csort < subst.tmp | uniq > subst.sed
+ @echo '/<\/TITLE>/a\' >> subst.sed
+ @echo '<link rev=made href="mailto:bug-ncurses@gnu.org">\' >> subst.sed
+ @echo '<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1">' >> subst.sed
+ @rm -f subst.tmp
+ @for f in man/*.[0-9]* ; do \
+ m=`basename $$f` ;\
+ T=`egrep '^.TH' $$f|sed -e 's/^.TH //' -e s'/"//g' -e 's/[ ]\+$$//'` ; \
+ g=$${m}.html ;\
+ if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\
+ echo "Converting $$m to HTML" ;\
+ echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">' > doc/html/man/$$g ;\
+ echo '<!-- ' >> doc/html/man/$$g ;\
+ egrep '^.\\"[^#]' $$f | \
+ sed -e 's/\$$/@/g' \
+ -e 's/^.../ */' \
+ -e 's/</\&lt;/g' \
+ -e 's/>/\&gt;/g' \
+ >> doc/html/man/$$g ;\
+ echo '-->' >> doc/html/man/$$g ;\
+ man/edit_man.sh normal editing /usr/man man $$f | $(MANPROG) | tr '\255' '-' | $(MAN2HTML) -title "$$T" | \
+ sed -f subst.sed |\
+ sed -e 's/"curses.3x.html"/"ncurses.3x.html"/g' \
+ >> doc/html/man/$$g ;\
+ 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
+ @misc/csort -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 ;\
+ misc/csort -u < MANIFEST.tmp > MANIFEST ;\
+ rm -f MANIFEST.tmp ;\
+ fi
+
+# Prepare distribution for version control
+vcprepare:
+ find . -type d -exec mkdir {}/RCS \;
+
+# Write-lock almost all files not under version control.
+ADA_EXCEPTIONS=$(shell eval 'a="\\\\\|";for x in Ada95/gen/terminal*.m4; do echo -n $${a}Ada95/ada_include/`basename $${x} .m4`; done')
+EXCEPTIONS = 'announce.html$\\|ANNOUNCE\\|misc/.*\\.doc\\|man/terminfo.5\\|lib_gen.c'$(ADA_EXCEPTIONS)
+writelock:
+ for x in `grep -v $(EXCEPTIONS) MANIFEST`; do if [ ! -f `dirname $$x`/RCS/`basename $$x`,v ]; then chmod a-w $${x}; fi; done
+
+# This only works on a clean source tree, of course.
+MANIFEST:
+ -rm -f $@
+ touch $@
+ find . -type f -print |misc/csort | fgrep -v .lsm |fgrep -v .spec >$@
+
+TAGS:
+ etags */*.[ch]
+
+# Makefile ends here
diff --git a/Build/source/libs/ncurses/include/Caps b/Build/source/libs/ncurses/include/Caps
new file mode 100644
index 00000000000..795f9daa850
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Caps
@@ -0,0 +1,1264 @@
+##############################################################################
+# Copyright (c) 1998,2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
+# and: Eric S. Raymond <esr@snark.thyrsus.com>
+#
+# $Id: Caps,v 1.35 2002/04/20 15:43:34 tom Exp $
+#
+# This is the master termcap/terminfo capability table.
+#
+# This table is used to generate initializers for tables that drive tic,
+# infocmp, and the library compilation code used to support the termcap
+# compatibility hack. It is also used to generate the tabular portion of the
+# terminfo(5) man page; lines beginning with `#%' are passed through to become
+# the terminfo table.
+#
+# This file has three major sections; a standard-capabilities table, two
+# extension-capability tables, and a section of aliases declarations.
+# The first two have the same format, as follows:
+#
+# FILE FORMAT
+#
+# Column 1: terminfo variable name
+# Column 2: terminfo capability name
+# Column 3: capability type (boolean, numeric, or string)
+# Column 4: termcap capability name
+# Column 5: KEY_xxx name, if any, `-' otherwise
+# Column 6: value for KEY_xxx name, if any, `-' otherwise
+# Column 7: Lead with `Y' if capability should be emitted in termcap
+# translations, `-' otherwise
+# Column 8: capability description
+#
+# The codes following [Y-] in column 7 describe the versions of termcap which
+# use the given capability. This information is not used by the curses library
+# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# termcap entry translations that are more than 1023 bytes long (and tank a
+# lot of old termcap-using programs). The codes read as follows:
+# B = mentioned in the BSD man page for 4.4BSD curses
+# C = used by the 4.4BSD curses library
+# G = mentioned in the documentation for GNU termcap
+# E = used by GNU Emacs
+# K = remove this terminfo capability when translating to standard format
+# The important codes are C and E. A cap with C or E should be preserved in
+# translation if possible. The problem is that preserving all such caps may
+# lead to some termcap translations being too long. The termcap maintainer
+# has a bit of a juggling act to do...potential problem cases are marked with
+# an asterisk (*).
+#
+# The aliases section has the following format:
+#
+# Column 1: either `capalias' or `infoalias'
+# Column 2: name to be aliased
+# Column 3: what name it should translate to. The name IGNORE means it
+# should be discarded with a warning message.
+# Column 4: name of the extension set (used for compiler warning messages)
+# Column 5: capability description (usually an associated terminfo variable)
+#
+# HANDLING TERMCAP AND TERMINFO EXTENSIONS
+#
+# There are basically five different ways to handle termcap and terminfo
+# extensions:
+#
+# 1. Don't list the capname here, or list it but comment it out (the latter
+# is preferable; someone might want to handle it in the future). If you do
+# this, the capability will be treated as unknown and raise a warning from
+# the compiler.
+#
+# 2. Alias it. This is appropriate if the capability has the same meaning
+# as an already-supported one. The compiler will handle aliasing, emitting
+# an appropriate informational message whenever an alias fires.
+#
+# 3. List it in the standard table. You almost certainly do *not* want
+# to do this -- the capabilities in that one, and their order, have been
+# carefully chosen to be SVr4-binary-compatible when they're written out
+# as a terminfo object, and breaking this would be bad. It's up the ncurses
+# library what to do with the terminfo data after it's read in.
+#
+# 4. List it in the aliases table with an IGNORE target field. If you
+# do this, the capability will be ignored on input (though the user will
+# get a warning message about it).
+#
+# 5. List it in the extensions table. If you do this, the compiler will
+# silently accept the capability, but the curses library proper will never
+# see it (because it won't be written out as part of the terminfo object
+# format). It's up to you what you have the compiler do with it.
+#
+# There are two opposite reasons to choose option 5. One is when you want
+# to eat the capability silently and discard it when doing translations
+# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
+# in this class. Nothing will ever use them again.
+#
+# More usually, you want the compiler to try to deduce something from the
+# capability value that it can use to translate it into your output format.
+# You'll need to write custom code, probably in postprocess_termcap() or
+# postprocess_terminfo(), to handle the translation.
+#
+# CONTROLLING ENTRY LENGTH
+#
+# Notes on specific elisions made to fit translations within 1023 bytes:
+#
+# Machines with IBM PC-like keyboards want to be able to define the following
+# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
+# only environments for End or Home-Down), key_dc, and key_ic. This is also
+# the set of keys the `joe' editor will be upset if it can't see. So don't
+# trim those out of the set to be translated to termcap, or various users of
+# the termcap file will become irate.
+#
+# It might look tempting to leave those long init strings out of translations.
+# We can't do it (yet); 4.4BSD tput and tset use them.
+#
+# We retain the sgr capability in translation in spite of the fact that neither
+# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
+# hard to understand without it, and (b) the entries in which it is long tend
+# to be older types that don't use up a lot of string space on function keys.
+# The tic(1) translation code will complain and elide it if it makes a critical
+# difference (there is special code in tic to recognize this situation).
+#
+# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
+# optimizer in BSD curses didn't use them. This omission seems to be the
+# single most effective one, it shortened the resolved length of all thirteen
+# problem entries in the 9.9.0 version of the terminfo master below critical.
+#
+# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
+# translations go back over critical if we do this. As 4.4BSD curses fades
+# into history and GNU termcap's application base shrinks towards being GNU
+# Emacs only, we'll probably elide out some BSD-only capabilities in order
+# to buy space for non-essentials Emacs is still using. Capabilities high
+# on that hit list: rc, sc, uc.
+#
+#############################################################################
+#
+# STANDARD 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 \fBvariable\fR is the name by which the programmer (at the terminfo level)
+#%accesses the capability.
+#%
+#%The \fBcapname\fR is the short name used in the text of the database,
+#%and is used by a person updating the database.
+#%Whenever possible, capnames are chosen to be the same as or similar to
+#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
+#%identical or very similar names). Semantics are also intended to match
+#%those of the specification.
+#%
+#%The termcap code is the old
+#%.B termcap
+#%capability name (some capabilities are new, and have names which termcap
+#%did not originate).
+#%.P
+#%Capability names have no hard length limit, but an informal limit of 5
+#%characters has been adopted to keep them short and to allow the tabs in
+#%the source file
+#%.B Caps
+#%to line up nicely.
+#%
+#%Finally, the description field attempts to convey the semantics of the
+#%capability. You may find some codes in the description field:
+#%.TP
+#%(P)
+#%indicates that padding may be specified
+#%.TP
+#%#[1-9]
+#%in the description field indicates that the string is passed through tparm with
+#%parms as given (#\fIi\fP).
+#%.TP
+#%(P*)
+#%indicates that padding may vary in proportion to the number of
+#%lines affected
+#%.TP
+#%(#\d\fIi\fP\u)
+#%indicates the \fIi\fP\uth\d parameter.
+#%
+#%.PP
+#% These are the boolean capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBBooleans name Code\fR
+auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
+auto_right_margin am bool am - - YBCGE terminal has automatic margins
+no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
+ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
+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 (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
+memory_below db bool db - - YB-GE display may be retained below the screen
+move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
+move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
+over_strike os bool os - - YBCG- terminal can overstrike
+status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
+dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
+tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+transparent_underline ul bool ul - - YBCGE underline character overstrikes
+xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
+needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
+prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
+hard_cursor chts bool HC - - ----- cursor is hard to see
+non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
+no_pad_char npc bool NP - - ----- pad character does not exist
+non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
+can_change ccc bool cc - - ----- terminal can re-define existing colors
+back_color_erase bce bool ut - - ----- screen erased with background color
+hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
+col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
+cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
+has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
+row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
+semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
+cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
+lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
+#%.TE
+#%.ad
+#%
+#%These are the numeric capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+columns cols num co - - YBCGE number of columns in a line
+init_tabs it num it - - YB-G- tabs initially every # spaces
+lines lines num li - - YBCGE number of lines on screen or page
+lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
+magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
+padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
+virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
+width_status_line wsl num ws - - YB-G- number of columns in status line
+num_labels nlab num Nl - - ----- number of labels on screen
+label_height lh num lh - - ----- rows in each label
+label_width lw num lw - - ----- columns in each label
+max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
+maximum_windows wnum num MW - - ----- maximum number of defineable windows
+# These came in with SVr4's color support
+max_colors colors num Co - - ----- maximum number of colors on screen
+max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
+no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
+#%.TE
+#%.ad
+#%
+#%The following numeric capabilities are present in the SVr4.0 term structure,
+#%but are not yet documented in the man page. They came in with SVr4's
+#%printer support.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
+dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
+dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
+max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
+max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
+micro_col_size mcs num Yf - - ----- character step size when in micro mode
+micro_line_size mls num Yg - - ----- line step size when in micro mode
+number_of_pins npins num Yh - - ----- numbers of pins in print-head
+output_res_char orc num Yi - - ----- horizontal resolution in units per line
+output_res_line orl num Yj - - ----- vertical resolution in units per line
+output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
+output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
+print_rate cps num Ym - - ----- print rate in characters per second
+wide_char_size widcs num Yn - - ----- character step size when in double wide mode
+buttons btns num BT - - ----- number of buttons on mouse
+bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
+bit_image_type bitype num Yp - - ----- type of bit-image device
+#%.TE
+#%.ad
+#%
+#%These are the string capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+back_tab cbt str bt - - YBCGE back tab (P)
+bell bel str bl - - YB-GE audible signal (bell) (P)
+carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
+change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
+clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
+clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
+clr_eol el str ce - - YBCGE clear to end of line (P)
+clr_eos ed str cd - - YBCGE clear to end of screen (P*)
+column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
+command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
+cursor_address cup str cm - - YBCGE move to row #1 columns #2
+cursor_down cud1 str do - - YBCGE down one line
+cursor_home home str ho - - YBCGE home cursor (if no cup)
+cursor_invisible civis str vi - - YB-G- make cursor invisible
+cursor_left cub1 str le - - YBCGE move left one space
+cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
+cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
+cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
+cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
+cursor_up cuu1 str up - - YBCGE up one line
+cursor_visible cvvis str vs - - YBCGE make cursor very visible
+delete_character dch1 str dc - - YBCGE delete character (P*)
+delete_line dl1 str dl - - YBCGE delete line (P*)
+dis_status_line dsl str ds - - YB-G- disable status line
+down_half_line hd str hd - - YB-G- half a line down
+enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
+enter_blink_mode blink str mb - - YB-G- turn on blinking
+enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
+enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
+enter_delete_mode smdc str dm - - YBCGE enter delete mode
+enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
+enter_insert_mode smir str im - - YBCGE enter insert mode
+enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
+enter_protected_mode prot str mp - - -B-G-* turn on protected mode
+enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
+enter_standout_mode smso str so - - YBCGE begin standout mode
+enter_underline_mode smul str us - - YBCGE begin underline mode
+erase_chars ech str ec - - YB-G- erase #1 characters (P)
+exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
+exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
+exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
+exit_delete_mode rmdc str ed - - YBCGE end delete mode
+exit_insert_mode rmir str ei - - YBCGE exit insert mode
+exit_standout_mode rmso str se - - YBCGE exit standout mode
+exit_underline_mode rmul str ue - - YBCGE exit underline mode
+flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
+form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
+from_status_line fsl str fs - - YB-G- return from status line
+init_1string is1 str i1 - - YB-G- initialization string
+init_2string is2 str is - - YB-G- initialization string
+init_3string is3 str i3 - - YB-G- initialization string
+init_file if str if - - YB-G- name of initialization file
+insert_character ich1 str ic - - YBCGE insert character (P)
+insert_line il1 str al - - YBCGE insert line (P*)
+insert_padding ip str ip - - YBCGE insert padding after inserted character
+key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
+key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
+key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
+key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
+key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
+key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
+key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
+key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
+key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
+key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
+key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
+key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
+key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
+key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
+key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
+key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
+key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
+key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
+key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
+key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
+key_home khome str kh KEY_HOME 0406 YBCGE home key
+key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
+key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
+key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
+key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
+key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
+key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
+key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
+key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
+key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
+key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
+key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
+keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
+keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
+lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
+lab_f10 lf10 str la - - ----- label on function key f10 if not f10
+lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
+lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
+lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
+lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
+lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
+lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
+lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
+lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
+meta_off rmm str mo - - YB-G-* turn off meta mode
+meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
+newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
+pad_char pad str pc - - YBCGE padding char (instead of null)
+parm_dch dch str DC - - YB-GE delete #1 characters (P*)
+parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
+parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
+parm_ich ich str IC - - YB-GE insert #1 characters (P*)
+parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
+parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
+parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
+parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
+parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
+parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
+pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
+pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
+pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
+print_screen mc0 str ps - - -B-G-* print contents of screen
+prtr_off mc4 str pf - - -B-G-* turn off printer
+prtr_on mc5 str po - - -B-G-* turn on printer
+repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
+reset_1string rs1 str r1 - - -B--- reset string
+reset_2string rs2 str r2 - - -B--- reset string
+reset_3string rs3 str r3 - - -B--- reset string
+reset_file rf str rf - - -B--- name of reset file
+restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
+row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
+save_cursor sc str sc - - YBCG- save current cursor position (P)
+scroll_forward ind str sf - - YBCGE scroll text up (P)
+scroll_reverse ri str sr - - YBCGE scroll text down (P)
+set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
+set_tab hts str st - - YB-G- set a tab in every row, current columns
+set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
+tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
+to_status_line tsl str ts - - YB-G- move to status line, column #1
+underline_char uc str uc - - YBCG- underline char and move past it
+up_half_line hu str hu - - YB-G- half a line up
+init_prog iprog str iP - - -B--- path name of program for initialization
+key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
+key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
+key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
+key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
+key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
+prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
+#
+# SVr1 capabilities stop here. IBM's version of terminfo is the same as
+# SVr4 up to this point, but has a different set afterwards.
+#
+char_padding rmp str rP - - ----- like ip but when in insert mode
+acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
+plab_norm pln str pn - - ----- program label #1 to show string #2
+key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
+enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
+exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
+enter_am_mode smam str SA - - ----- turn on automatic margins
+exit_am_mode rmam str RA - - ----- turn off automatic margins
+xon_character xonc str XN - - ----- XON character
+xoff_character xoffc str XF - - ----- XOFF character
+ena_acs enacs str eA - - ----- enable alternate char set
+label_on smln str LO - - ----- turn on soft labels
+label_off rmln str LF - - ----- turn off soft labels
+key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
+key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
+key_close kclo str @3 KEY_CLOSE 0544 ----- close key
+key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
+key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
+key_create kcrt str @6 KEY_CREATE 0547 ----- create key
+key_end kend str @7 KEY_END 0550 ----- end key
+key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
+key_exit kext str @9 KEY_EXIT 0551 ----- exit key
+key_find kfnd str @0 KEY_FIND 0552 ----- find key
+key_help khlp str %1 KEY_HELP 0553 ----- help key
+key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
+key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
+key_move kmov str %4 KEY_MOVE 0556 ----- move key
+key_next knxt str %5 KEY_NEXT 0557 ----- next key
+key_open kopn str %6 KEY_OPEN 0560 ----- open key
+key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
+key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
+key_print kprt str %9 KEY_PRINT 0532 ----- print key
+key_redo krdo str %0 KEY_REDO 0563 ----- redo key
+key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
+key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
+key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
+key_restart krst str &4 KEY_RESTART 0567 ----- restart key
+key_resume kres str &5 KEY_RESUME 0570 ----- resume key
+key_save ksav str &6 KEY_SAVE 0571 ----- save key
+key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
+key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
+key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
+key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
+key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
+key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
+key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
+key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
+key_select kslt str *6 KEY_SELECT 0601 ----- select key
+key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
+key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
+key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
+key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
+key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
+key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
+key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
+key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
+key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
+key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
+key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
+key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
+key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
+key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
+key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
+key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
+key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
+key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
+key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
+key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
+key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
+req_for_input rfi str RF - - ----- send next input char (for ptys)
+key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
+key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
+key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
+key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
+key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
+key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
+key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
+key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
+key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
+key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
+key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
+key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
+key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
+key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
+key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
+key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
+key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
+key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
+key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
+key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
+key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
+key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
+key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
+key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
+key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
+key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
+key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
+key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
+key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
+key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
+key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
+key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
+key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
+key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
+key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
+key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
+key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
+key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
+key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
+key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
+key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
+key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
+key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
+key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
+key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
+key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
+key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
+key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
+key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
+key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
+key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
+key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
+clr_bol el1 str cb - - ----- Clear to beginning of line
+clear_margins mgc str MC - - ----- clear right and left soft margins
+set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_right_margin smgr str MR - - ----- set right soft margin at current column
+label_format fln str Lf - - ----- label format
+set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
+display_clock dclk str DK - - ----- display clock
+remove_clock rmclk str RC - - ----- remove clock
+create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
+goto_window wingo str WG - - ----- go to window #1
+hangup hup str HU - - ----- hang-up phone
+dial_phone dial str DI - - ----- dial number #1
+quick_dial qdial str QD - - ----- dial number #1 without checking
+tone tone str TO - - ----- select touch tone dialing
+pulse pulse str PU - - ----- select pulse dialing
+flash_hook hook str fh - - ----- flash switch hook
+fixed_pause pause str PA - - ----- pause for 2-3 seconds
+wait_tone wait str WA - - ----- wait for dial-tone
+user0 u0 str u0 - - ----- User string #0
+user1 u1 str u1 - - ----- User string #1
+user2 u2 str u2 - - ----- User string #2
+user3 u3 str u3 - - ----- User string #3
+user4 u4 str u4 - - ----- User string #4
+user5 u5 str u5 - - ----- User string #5
+user6 u6 str u6 - - ----- User string #6
+user7 u7 str u7 - - ----- User string #7
+user8 u8 str u8 - - ----- User string #8
+user9 u9 str u9 - - ----- User string #9
+#
+# SVr4 added these capabilities to support color
+#
+orig_pair op str op - - ----- Set default pair to its original value
+orig_colors oc str oc - - ----- Set all color pairs to the original ones
+initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
+initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
+set_color_pair scp str sp - - ----- Set current color pair to #1
+set_foreground setf str Sf - - ----- Set foreground color #1
+set_background setb str Sb - - ----- Set background color #1
+#
+# SVr4 added these capabilities to support printers
+#
+change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
+change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
+change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
+change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
+define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
+enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
+enter_italics_mode sitm str ZH - - ----- Enter italic mode
+enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
+enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
+enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
+enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
+enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
+enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
+enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
+enter_upward_mode sum str ZP - - ----- Start upward carriage motion
+exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
+exit_italics_mode ritm str ZR - - ----- End italic mode
+exit_leftward_mode rlm str ZS - - ----- End left-motion mode
+exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
+exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
+exit_subscript_mode rsubm str ZV - - ----- End subscript mode
+exit_superscript_mode rsupm str ZW - - ----- End superscript mode
+exit_upward_mode rum str ZX - - ----- End reverse character motion
+micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
+micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
+micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
+micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
+micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
+micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
+order_of_pins porder str Ze - - ----- Match software bits to print-head pins
+parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
+parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
+parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
+parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
+select_char_set scs str Zj - - ----- Select character set, #1
+set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
+set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
+set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
+set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
+set_top_margin smgt str Zo - - ----- Set top margin at current line
+set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
+start_bit_image sbim str Zq - - ----- Start printing bit image graphics
+start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
+stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
+stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
+subscript_characters subcs str Zu - - ----- List of subscriptable characters
+superscript_characters supcs str Zv - - ----- List of superscriptable characters
+these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
+zero_motion zerom str Zx - - ----- No motion for subsequent character
+#%.TE
+#%.ad
+#%
+#%The following string capabilities are present in the SVr4.0 term structure,
+#%but were originally not documented in the man page.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw18.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
+key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
+mouse_info minfo str Mi - - ----- Mouse status information
+req_mouse_pos reqmp str RQ - - ----- Request mouse position
+get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
+set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
+set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
+pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
+device_type devt str dv - - ----- Indicate language/codeset support
+code_set_init csin str ci - - ----- Init sequence for multiple codesets
+set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
+set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
+set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
+set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
+set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
+set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
+bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
+bit_image_newline binel str Zz - - ----- Move to next row of the bit image
+bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
+color_names colornm str Yw - - ----- Give name for color #1
+define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+end_bit_image_region endbi str Yy - - ----- End a bit-image region
+set_color_band setcolor str Yz - - ----- Change to ribbon color #1
+set_page_length slines str YZ - - ----- Set page length to #1 lines
+#
+# SVr4 added these capabilities for direct PC-clone support
+#
+display_pc_char dispc str S1 - - ----- Display PC character #1
+enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
+exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
+enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
+exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
+pc_term_options pctrm str S6 - - ----- PC terminal options
+scancode_escape scesc str S7 - - ----- Escape for scancode emulation
+alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
+#%.TE
+#%.ad
+#%
+#%.in .8i
+#%The XSI Curses standard added these. They are some post-4.1
+#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
+#%The \fBncurses\fR termcap names for them are invented; according to the
+#%XSI Curses standard, they have no termcap names. If your compiled terminfo
+#%entries use these, they may not be binary-compatible with System V terminfo
+#%entries after SVr4.1; beware!
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
+enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
+enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
+enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
+enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
+enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
+set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
+set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+#%.TE
+#%.ad
+#
+# The magic token below tells the tic compiler-generator code that all the caps
+# past it should be ignored (not written out) when dumping terminfo objects. It
+# also tells the man page table generator not to pass through following lines
+# This means we can have obsolete capabilities and pseudo-capabilities that are
+# recognized for termcap or terminfo compilation, but not output.
+#
+# %%-STOP-HERE-%%
+#
+# Don't move this casually! In fact, don't move it at all unless you're
+# either doing it to add System V or XPG4 extensions, or have decided you
+# don't care about SVr4 binary compatibility.
+#
+#############################################################################
+#
+# TERMCAP EXTENSION CAPABILITIES
+#
+# The capabilities below are either obsolete or extensions on certain systems.
+# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
+# termcap sources; the rest are listed for completeness, and in case somebody
+# cares about them enough to hack in code that will translate them into
+# terminfo capabilities.
+#
+# The first part of the list is from Ross Ridge's `mytinfo' package
+# (comp.sources.unix, volume 26); the variable names and terminfo names (as
+# well as the termcap codes) match his list.
+#
+# This group of codes is not marked obsolete in 4.4BSD, but have no direct
+# terminfo equivalents. The rs capability is specially translated to terminfo
+# r2, and vice versa, if an entry does not already have an r2. Similarly,
+# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
+# The ug capability is thrown away, but assumed to be whatever sg is if the
+# latter is nonzero and we're dumping in termcap format.
+#
+termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
+termcap_reset OTrs str rs - - YB-G- terminal reset string
+magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
+#
+# Obsolete termcap capabilities. Some are used for termcap translation. The
+# code uses the 'OT' prefix we put on obsolete capabilities to suppress
+# printing them in terminfo source dumps of compiled entries.
+#
+backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
+crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
+no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
+carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
+new_line_delay OTdN num dN - - YB-G- pad needed for LF
+linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
+backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
+#
+# GNU termcap library extensions. The GNU termcap file distributed with
+# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
+# BSD termcap file. The name clash with terminfo MT is resolved by type
+# info; MT is converted to km.
+#
+gnu_has_meta_key OTMT bool MT - - ----E has meta key
+# gnu_tab_width OTtw num tw - - ----E tab width in spaces
+#
+# GNU termcap *does* include the following extended capability, Only the
+# now-obsolete Ann Arbor terminals used it.
+#
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+#
+# The following comments describe capnames so ancient that I believe no
+# software uses them any longer. Some of these have to go because they
+# clash with terminfo names in ways that cannot be resolved by type
+# information.
+#
+# These mytinfo codes are not used in the 4.4BSD curses code. They are
+# marked obsolete in the 4.4BSD manual pages.
+#
+# There is one conflict with terminfo; ma is in both. This conflict is
+# resolved by type information.
+#
+# The `ko' capability is translated by special code. It should contain a
+# comma-separated list of capabilities for which there are corresponding keys.
+# The `kn' code is accepted but ignored.
+#
+# The `ma' capability seems to have been designed to map between the rogue(2)
+# motion keys (including jkhl) and characters emitted by arrow keys on some
+# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+#
+# Here is a description of memory_lock_above and memory_unlock:
+# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
+# text. All lines above the cursor's current line become locked in place on
+# the screen. Then enter data normally. When the screen fills up, any
+# further data entered forces the first line of unfrozen line text to scroll
+# under the frozen data. Lines scrolled off the screen are inserted into
+# memory immediately preceding the first frozen line." (from the HP 700/96
+# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
+#
+# Applications that use terminfo are supposed to behave as though xr is
+# always true.
+#
+linefeed_is_newline OTNL bool NL - - YB--- move down with \n
+# even_parity OTEP bool EP - - -B--- terminal requires even parity
+# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
+# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
+# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
+# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
+backspace_delay OTdB num dB - - YB-G- padding required for ^H
+# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
+horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
+# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
+number_of_function_keys OTkn num kn - - -B-G- count of function keys
+other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
+arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
+# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
+has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
+return_does_clr_eol OTxr bool xr - - YB--- return clears the line
+# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
+#
+# mytinfo described this as a termcap capability, but it's not listed in the
+# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
+# package, like System V, behaves as though it is always true.
+#
+# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top line
+#
+# University of Waterloo termcap extensions (as described in mytinfo).
+# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
+# be resolved by a type check. The descriptions are guesses from what was
+# in the mytinfo tables.
+#
+# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
+# key_kill_char OTkk str kk - - ----- string set by kill key (?)
+# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
+# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
+# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
+#
+# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
+# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
+# check.
+#
+# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
+# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
+# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
+# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
+#
+# The mytinfo capabilities end here.
+#
+# XENIX extensions:
+#
+# Xenix defined its own set of forms-drawing capabilities:
+#
+# cap IBM ASCII description ACS ASCII
+# --- ----------- -------------------- ------------- ------
+# G1 191 \277 M-? single upper right ACS_URCORNER
+# G2 218 \332 M-Z single upper left ACS_ULCORNER
+# G3 192 \300 M-@ single lower left ACS_LLCORNER
+# G4 217 \331 M-Y single lower right ACS_LRCORNER
+# G5 187 \273 M-; double upper right
+# G6 201 \311 M-I double upper left
+# G7 200 \310 M-H double lower left
+# G8 188 \274 M-< double lower right
+# GC 197 \305 M-E single intersection ACS_PLUS _ _
+# GD 194 \302 M-B single down-tick ACS_TTEE |
+# GH 196 \304 M-D single horizontal line ACS_HLINE
+# GL 180 \264 M-4 single left tick ACS_RTEE -|
+# GR 195 \303 M-C single right tick ACS_LTEE |-
+# GU 193 \301 M-A single up tick ACS_BTEE _|_
+# GV 179 \263 M-3 single vertical line ACS_VLINE
+# Gc 206 \316 M-N double intersection
+# Gd 203 \313 M-K double down tick
+# Gh 205 \315 M-M double horizontal line
+# Gl 204 \204 M-L double left tick
+# Gr 185 \271 M-9 double right tick
+# Gu 202 \312 M-J double up tick
+# Gv 186 \272 M-: double vertical line
+#
+# The compiler will translate the single-line caps and discard the others
+# (via IGNORE aliases further down). We don't want to do normal pad
+# translation on these, they're often single-character printable ASCII
+# strings that happen to be numerics. There's awk code in parametrized.sh
+# that detects the acs_ prefix and uses it to suppress pad translation.
+# These terminfo names are invented.
+#
+acs_ulcorner OTG2 str G2 - - ----- single upper left
+acs_llcorner OTG3 str G3 - - ----- single lower left
+acs_urcorner OTG1 str G1 - - ----- single upper right
+acs_lrcorner OTG4 str G4 - - ----- single lower right
+acs_ltee OTGR str GR - - ----- tee pointing right
+acs_rtee OTGL str GL - - ----- tee pointing left
+acs_btee OTGU str GU - - ----- tee pointing up
+acs_ttee OTGD str GD - - ----- tee pointing down
+acs_hline OTGH str GH - - ----- single horizontal line
+acs_vline OTGV str GV - - ----- single vertical line
+acs_plus OTGC str GC - - ----- single intersection
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is almost all comments. What it's mainly for is to describe
+# what capabilities need to be squeezed out to get down to the XSI Curses
+# standard set. They are flagged with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+memory_lock meml str ml - - ----K memory lock above
+memory_unlock memu str mu - - ----K memory unlock
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+box_chars_1 box1 str bx - - ----K box characters primary set
+#box_chars_2 box2 str by - - ----K box characters secondary set
+#box_attr_1 batt1 str Bx - - ----K attributes for box1
+#box_attr_2 batt2 str By - - ----K attributes for box2
+#color_bg_0 colb0 str d0 - - ----K background color 0
+#color_bg_1 colb1 str d1 - - ----K background color 1
+#color_bg_2 colb2 str d2 - - ----K background color 2
+#color_bg_3 colb3 str d3 - - ----K background color 3
+#color_bg_4 colb4 str d4 - - ----K background color 4
+#color_bg_5 colb5 str d5 - - ----K background color 5
+#color_bg_6 colb6 str d6 - - ----K background color 6
+#color_bg_7 colb7 str d7 - - ----K background color 7
+#color_fg_0 colf0 str c0 - - ----K foreground color 0
+#color_fg_1 colf1 str c1 - - ----K foreground color 1
+#color_fg_2 colf2 str c2 - - ----K foreground color 2
+#color_fg_3 colf3 str c3 - - ----K foreground color 3
+#color_fg_4 colf4 str c4 - - ----K foreground color 4
+#color_fg_5 colf5 str c5 - - ----K foreground color 5
+#color_fg_6 colf6 str c6 - - ----K foreground color 6
+#color_fg_7 colf7 str c7 - - ----K foreground color 7
+#font_0 font0 str f0 - - ----- select font 0
+#font_1 font1 str f1 - - ----- select font 1
+#font_2 font2 str f2 - - ----- select font 2
+#font_3 font3 str f3 - - ----- select font 3
+#font_4 font4 str f4 - - ----K select font 4
+#font_5 font5 str f5 - - ----K select font 5
+#font_6 font6 str f6 - - ----K select font 6
+#font_7 font7 str f7 - - ----K select font 7
+#key_back_tab kbtab str k0 - - ----- backtab key
+#key_do kdo str ki - - ----K do request key
+#key_command kcmd str kd - - ----K command-request key
+#key_command_pane kcpn str kW - - ----K command-pane key
+#key_end kend str kw - - ----- end key
+#key_help khlp str kq - - ----- help key
+#key_newline knl str nl - - ----K newline key
+#key_next_pane knpn str kv - - ----K next-pane key
+#key_prev_cmd kppn str kp - - ----K previous-command key
+#key_prev_pane kppn str kV - - ----K previous-pane key
+#key_quit kquit str kQ - - ----K quit key
+#key_select ksel str kU - - ----- select key
+#key_scroll_left kscl str kz - - ----K scroll left
+#key_scroll_right kscr str kZ - - ----K scroll right
+#key_tab ktab str ko - - ----K tab key
+#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+#appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
+# the IBM manual pages, so the cap name strings are guesses. The terminfo
+# names are almost certainly right, the termcap ones almost certainly wrong.
+#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
+#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
+#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
+#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
+#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
+#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
+#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
+#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
+# Undocumented capabilities end here
+#key_sf1 ksf1 str S1 - - ----K special function key 1
+#key_sf2 ksf2 str S2 - - ----K special function key 2
+#key_sf3 ksf3 str S3 - - ----K special function key 3
+#key_sf4 ksf4 str S4 - - ----K special function key 4
+#key_sf5 ksf5 str S5 - - ----K special function key 5
+#key_sf6 ksf6 str S6 - - ----K special function key 6
+#key_sf7 ksf7 str S7 - - ----K special function key 7
+#key_sf8 ksf8 str S8 - - ----K special function key 8
+#key_sf9 ksf9 str S9 - - ----K special function key 9
+#key_sf10 ksf10 str SA - - ----K special function key 10
+# AIX version 3 documents different codes for F11, F12 and does not mention
+# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
+#key_f11 kf11 str k< - - ----- function key 11
+#key_f12 kf12 str k> - - ----- function key 12
+# Undocumented capabilities end here.
+#key_action kact str kJ - - ----K sent by action key
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+#enter_topline_mode topl str tp - - ----K start top-line mode
+#enter_bottom_mode btml str bm - - ----K start bottom-line mode
+#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+#
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# case-fold-search:nil
+# truncate-lines:t
+# End:
diff --git a/Build/source/libs/ncurses/include/Caps.aix4 b/Build/source/libs/ncurses/include/Caps.aix4
new file mode 100644
index 00000000000..3f946284d18
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Caps.aix4
@@ -0,0 +1,1255 @@
+##############################################################################
+# Copyright (c) 2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas Dickey
+#
+# $Id: Caps.aix4,v 1.6 2002/07/07 00:00:32 tom Exp $
+#
+# This is an adaptation of ncurses' termcap/terminfo capability table, which
+# is designed to align with AIX 4.x's terminfo.
+#
+# This table is used to generate initializers for tables that drive tic,
+# infocmp, and the library compilation code used to support the termcap
+# compatibility hack. It is also used to generate the tabular portion of the
+# terminfo(5) man page; lines beginning with `#%' are passed through to become
+# the terminfo table.
+#
+# This file has three major sections; a standard-capabilities table, two
+# extension-capability tables, and a section of aliases declarations.
+# The first two have the same format, as follows:
+#
+# FILE FORMAT
+#
+# Column 1: terminfo variable name
+# Column 2: terminfo capability name
+# Column 3: capability type (boolean, numeric, or string)
+# Column 4: termcap capability name
+# Column 5: KEY_xxx name, if any, `-' otherwise
+# Column 6: value for KEY_xxx name, if any, `-' otherwise
+# Column 7: Lead with `Y' if capability should be emitted in termcap
+# translations, `-' otherwise
+# Column 8: capability description
+#
+# The codes following [Y-] in column 7 describe the versions of termcap which
+# use the given capability. This information is not used by the curses library
+# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# termcap entry translations that are more than 1023 bytes long (and tank a
+# lot of old termcap-using programs). The codes read as follows:
+# B = mentioned in the BSD man page for 4.4BSD curses
+# C = used by the 4.4BSD curses library
+# G = mentioned in the documentation for GNU termcap
+# E = used by GNU Emacs
+# K = remove this terminfo capability when translating to standard format
+# The important codes are C and E. A cap with C or E should be preserved in
+# translation if possible. The problem is that preserving all such caps may
+# lead to some termcap translations being too long. The termcap maintainer
+# has a bit of a juggling act to do...potential problem cases are marked with
+# an asterisk (*).
+#
+# The aliases section has the following format:
+#
+# Column 1: either `capalias' or `infoalias'
+# Column 2: name to be aliased
+# Column 3: what name it should translate to. The name IGNORE means it
+# should be discarded with a warning message.
+# Column 4: name of the extension set (used for compiler warning messages)
+# Column 5: capability description (usually an associated terminfo variable)
+#
+# HANDLING TERMCAP AND TERMINFO EXTENSIONS
+#
+# There are basically five different ways to handle termcap and terminfo
+# extensions:
+#
+# 1. Don't list the capname here, or list it but comment it out (the latter
+# is preferable; someone might want to handle it in the future). If you do
+# this, the capability will be treated as unknown and raise a warning from
+# the compiler.
+#
+# 2. Alias it. This is appropriate if the capability has the same meaning
+# as an already-supported one. The compiler will handle aliasing, emitting
+# an appropriate informational message whenever an alias fires.
+#
+# 3. List it in the standard table. You almost certainly do *not* want
+# to do this -- the capabilities in that one, and their order, have been
+# carefully chosen to be SVr4-binary-compatible when they're written out
+# as a terminfo object, and breaking this would be bad. It's up the ncurses
+# library what to do with the terminfo data after it's read in.
+#
+# 4. List it in the aliases table with an IGNORE target field. If you
+# do this, the capability will be ignored on input (though the user will
+# get a warning message about it).
+#
+# 5. List it in the extensions table. If you do this, the compiler will
+# silently accept the capability, but the curses library proper will never
+# see it (because it won't be written out as part of the terminfo object
+# format). It's up to you what you have the compiler do with it.
+#
+# There are two opposite reasons to choose option 5. One is when you want
+# to eat the capability silently and discard it when doing translations
+# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
+# in this class. Nothing will ever use them again.
+#
+# More usually, you want the compiler to try to deduce something from the
+# capability value that it can use to translate it into your output format.
+# You'll need to write custom code, probably in postprocess_termcap() or
+# postprocess_terminfo(), to handle the translation.
+#
+# CONTROLLING ENTRY LENGTH
+#
+# Notes on specific elisions made to fit translations within 1023 bytes:
+#
+# Machines with IBM PC-like keyboards want to be able to define the following
+# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
+# only environments for End or Home-Down), key_dc, and key_ic. This is also
+# the set of keys the `joe' editor will be upset if it can't see. So don't
+# trim those out of the set to be translated to termcap, or various users of
+# the termcap file will become irate.
+#
+# It might look tempting to leave those long init strings out of translations.
+# We can't do it (yet); 4.4BSD tput and tset use them.
+#
+# We retain the sgr capability in translation in spite of the fact that neither
+# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
+# hard to understand without it, and (b) the entries in which it is long tend
+# to be older types that don't use up a lot of string space on function keys.
+# The tic(1) translation code will complain and elide it if it makes a critical
+# difference (there is special code in tic to recognize this situation).
+#
+# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
+# optimizer in BSD curses didn't use them. This omission seems to be the
+# single most effective one, it shortened the resolved length of all thirteen
+# problem entries in the 9.9.0 version of the terminfo master below critical.
+#
+# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
+# translations go back over critical if we do this. As 4.4BSD curses fades
+# into history and GNU termcap's application base shrinks towards being GNU
+# Emacs only, we'll probably elide out some BSD-only capabilities in order
+# to buy space for non-essentials Emacs is still using. Capabilities high
+# on that hit list: rc, sc, uc.
+#
+#############################################################################
+#
+# STANDARD 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 \fBvariable\fR is the name by which the programmer (at the terminfo level)
+#%accesses the capability.
+#%
+#%The \fBcapname\fR is the short name used in the text of the database,
+#%and is used by a person updating the database.
+#%Whenever possible, capnames are chosen to be the same as or similar to
+#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
+#%identical or very similar names). Semantics are also intended to match
+#%those of the specification.
+#%
+#%The termcap code is the old
+#%.B termcap
+#%capability name (some capabilities are new, and have names which termcap
+#%did not originate).
+#%.P
+#%Capability names have no hard length limit, but an informal limit of 5
+#%characters has been adopted to keep them short and to allow the tabs in
+#%the source file
+#%.B Caps
+#%to line up nicely.
+#%
+#%Finally, the description field attempts to convey the semantics of the
+#%capability. You may find some codes in the description field:
+#%.TP
+#%(P)
+#%indicates that padding may be specified
+#%.TP
+#%#[1-9]
+#%in the description field indicates that the string is passed through tparm with
+#%parms as given (#\fIi\fP).
+#%.TP
+#%(P*)
+#%indicates that padding may vary in proportion to the number of
+#%lines affected
+#%.TP
+#%(#\d\fIi\fP\u)
+#%indicates the \fIi\fP\uth\d parameter.
+#%
+#%.PP
+#% These are the boolean capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBBooleans name Code\fR
+auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
+auto_right_margin am bool am - - YBCGE terminal has automatic margins
+no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
+ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
+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 (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
+memory_below db bool db - - YB-GE display may be retained below the screen
+move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
+move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
+over_strike os bool os - - YBCG- terminal can overstrike
+status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
+dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
+tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+transparent_underline ul bool ul - - YBCGE underline character overstrikes
+xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
+needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
+prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
+hard_cursor chts bool HC - - ----- cursor is hard to see
+non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
+no_pad_char npc bool NP - - ----- pad character does not exist
+non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
+can_change ccc bool cc - - ----- terminal can re-define existing colors
+back_color_erase bce bool ut - - ----- screen erased with background color
+hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
+col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
+cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
+has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
+row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
+semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
+cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
+lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
+#%.TE
+#%.ad
+#%
+#%These are the numeric capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+columns cols num co - - YBCGE number of columns in a line
+init_tabs it num it - - YB-G- tabs initially every # spaces
+lines lines num li - - YBCGE number of lines on screen or page
+lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
+magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
+padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
+virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
+width_status_line wsl num ws - - YB-G- number of columns in status line
+num_labels nlab num Nl - - ----- number of labels on screen
+label_height lh num lh - - ----- rows in each label
+label_width lw num lw - - ----- columns in each label
+max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
+maximum_windows wnum num MW - - ----- maximum number of defineable windows
+# These came in with SVr4's color support
+max_colors colors num Co - - ----- maximum number of colors on screen
+max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
+no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
+#%.TE
+#%.ad
+#%
+#%The following numeric capabilities are present in the SVr4.0 term structure,
+#%but are not yet documented in the man page. They came in with SVr4's
+#%printer support.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
+dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
+dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
+max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
+max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
+micro_col_size mcs num Yf - - ----- character step size when in micro mode
+micro_line_size mls num Yg - - ----- line step size when in micro mode
+number_of_pins npins num Yh - - ----- numbers of pins in print-head
+output_res_char orc num Yi - - ----- horizontal resolution in units per line
+output_res_line orl num Yj - - ----- vertical resolution in units per line
+output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
+output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
+print_rate cps num Ym - - ----- print rate in characters per second
+wide_char_size widcs num Yn - - ----- character step size when in double wide mode
+buttons btns num BT - - ----- number of buttons on mouse
+bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
+bit_image_type bitype num Yp - - ----- type of bit-image device
+#%.TE
+#%.ad
+#%
+#%These are the string capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+back_tab cbt str bt - - YBCGE back tab (P)
+bell bel str bl - - YB-GE audible signal (bell) (P)
+carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
+change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
+clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
+clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
+clr_eol el str ce - - YBCGE clear to end of line (P)
+clr_eos ed str cd - - YBCGE clear to end of screen (P*)
+column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
+command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
+cursor_address cup str cm - - YBCGE move to row #1 columns #2
+cursor_down cud1 str do - - YBCGE down one line
+cursor_home home str ho - - YBCGE home cursor (if no cup)
+cursor_invisible civis str vi - - YB-G- make cursor invisible
+cursor_left cub1 str le - - YBCGE move left one space
+cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
+cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
+cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
+cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
+cursor_up cuu1 str up - - YBCGE up one line
+cursor_visible cvvis str vs - - YBCGE make cursor very visible
+delete_character dch1 str dc - - YBCGE delete character (P*)
+delete_line dl1 str dl - - YBCGE delete line (P*)
+dis_status_line dsl str ds - - YB-G- disable status line
+down_half_line hd str hd - - YB-G- half a line down
+enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
+enter_blink_mode blink str mb - - YB-G- turn on blinking
+enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
+enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
+enter_delete_mode smdc str dm - - YBCGE enter delete mode
+enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
+enter_insert_mode smir str im - - YBCGE enter insert mode
+enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
+enter_protected_mode prot str mp - - -B-G-* turn on protected mode
+enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
+enter_standout_mode smso str so - - YBCGE begin standout mode
+enter_underline_mode smul str us - - YBCGE begin underline mode
+erase_chars ech str ec - - YB-G- erase #1 characters (P)
+exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
+exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
+exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
+exit_delete_mode rmdc str ed - - YBCGE end delete mode
+exit_insert_mode rmir str ei - - YBCGE exit insert mode
+exit_standout_mode rmso str se - - YBCGE exit standout mode
+exit_underline_mode rmul str ue - - YBCGE exit underline mode
+flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
+form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
+from_status_line fsl str fs - - YB-G- return from status line
+init_1string is1 str i1 - - YB-G- initialization string
+init_2string is2 str is - - YB-G- initialization string
+init_3string is3 str i3 - - YB-G- initialization string
+init_file if str if - - YB-G- name of initialization file
+insert_character ich1 str ic - - YBCGE insert character (P)
+insert_line il1 str al - - YBCGE insert line (P*)
+insert_padding ip str ip - - YBCGE insert padding after inserted character
+key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
+key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
+key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
+key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
+key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
+key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
+key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
+key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
+key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
+key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
+key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
+key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
+key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
+key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
+key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
+key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
+key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
+key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
+key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
+key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
+key_home khome str kh KEY_HOME 0406 YBCGE home key
+key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
+key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
+key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
+key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
+key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
+key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
+key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
+key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
+key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
+key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
+key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
+keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
+keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
+lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
+lab_f10 lf10 str la - - ----- label on function key f10 if not f10
+lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
+lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
+lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
+lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
+lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
+lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
+lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
+lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
+meta_off rmm str mo - - YB-G-* turn off meta mode
+meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
+newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
+pad_char pad str pc - - YBCGE padding char (instead of null)
+parm_dch dch str DC - - YB-GE delete #1 characters (P*)
+parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
+parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
+parm_ich ich str IC - - YB-GE insert #1 characters (P*)
+parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
+parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
+parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
+parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
+parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
+parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
+pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
+pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
+pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
+print_screen mc0 str ps - - -B-G-* print contents of screen
+prtr_off mc4 str pf - - -B-G-* turn off printer
+prtr_on mc5 str po - - -B-G-* turn on printer
+repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
+reset_1string rs1 str r1 - - -B--- reset string
+reset_2string rs2 str r2 - - -B--- reset string
+reset_3string rs3 str r3 - - -B--- reset string
+reset_file rf str rf - - -B--- name of reset file
+restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
+row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
+save_cursor sc str sc - - YBCG- save current cursor position (P)
+scroll_forward ind str sf - - YBCGE scroll text up (P)
+scroll_reverse ri str sr - - YBCGE scroll text down (P)
+set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
+set_tab hts str st - - YB-G- set a tab in every row, current columns
+set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
+tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
+to_status_line tsl str ts - - YB-G- move to status line, column #1
+underline_char uc str uc - - YBCG- underline char and move past it
+up_half_line hu str hu - - YB-G- half a line up
+init_prog iprog str iP - - -B--- path name of program for initialization
+key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
+key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
+key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
+key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
+key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
+prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+box_chars_1 box1 str bx - - ----K box characters primary set
+box_chars_2 box2 str by - - ----K box characters secondary set
+box_attr_1 batt1 str Bx - - ----K attributes for box1
+box_attr_2 batt2 str By - - ----K attributes for box2
+color_bg_0 colb0 str d0 - - ----K background color 0
+color_bg_1 colb1 str d1 - - ----K background color 1
+color_bg_2 colb2 str d2 - - ----K background color 2
+color_bg_3 colb3 str d3 - - ----K background color 3
+color_bg_4 colb4 str d4 - - ----K background color 4
+color_bg_5 colb5 str d5 - - ----K background color 5
+color_bg_6 colb6 str d6 - - ----K background color 6
+color_bg_7 colb7 str d7 - - ----K background color 7
+color_fg_0 colf0 str c0 - - ----K foreground color 0
+color_fg_1 colf1 str c1 - - ----K foreground color 1
+color_fg_2 colf2 str c2 - - ----K foreground color 2
+color_fg_3 colf3 str c3 - - ----K foreground color 3
+color_fg_4 colf4 str c4 - - ----K foreground color 4
+color_fg_5 colf5 str c5 - - ----K foreground color 5
+color_fg_6 colf6 str c6 - - ----K foreground color 6
+color_fg_7 colf7 str c7 - - ----K foreground color 7
+font_0 font0 str f0 - - ----K select font 0
+font_1 font1 str f1 - - ----K select font 1
+font_2 font2 str f2 - - ----K select font 2
+font_3 font3 str f3 - - ----K select font 3
+font_4 font4 str f4 - - ----K select font 4
+font_5 font5 str f5 - - ----K select font 5
+font_6 font6 str f6 - - ----K select font 6
+font_7 font7 str f7 - - ----K select font 7
+key_back_tab kbtab str k0 - - ----K backtab key
+key_do kdo str ki - - ----K do request key
+key_command kcmd str kd - - ----K command-request key
+key_command_pane kcpn str kW - - ----K command-pane key
+key_end kend str kw KEY_END 0550 ----- end key
+key_help khlp str kq - - ----- help key
+key_newline knl str nl - - ----K newline key
+key_next_pane knpn str kv - - ----K next-pane key
+key_prev_cmd kppn str kp - - ----K previous-command key
+key_prev_pane kppn str kV - - ----K previous-pane key
+key_quit kquit str kQ - - ----K quit key
+key_select_aix ksel str kU - - ----- select key
+key_scroll_left kscl str kz - - ----K scroll left
+key_scroll_right kscr str kZ - - ----K scroll right
+key_tab ktab str ko - - ----K tab key
+key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+appl_defined_str apstr str za - - ----K application-defined string
+key_smap_in6 kmpf6 str kr - - ----K special mapped key 6 input
+key_smap_out6 kmpt6 str KR - - ----K special mapped key 6 output
+key_smap_in7 kmpf7 str ks - - ----K special mapped key 7 input
+key_smap_out7 kmpt7 str KS - - ----K special mapped key 7 output
+key_smap_in8 kmpf8 str kt - - ----K special mapped key 8 input
+key_smap_out8 kmpt8 str KT - - ----K special mapped key 8 output
+key_smap_in9 kmpf9 str ku - - ----K special mapped key 9 input
+key_smap_out9 kmpt9 str KU - - ----K special mapped key 9 output
+key_sf1 ksf1 str S1 - - ----K special function key 1
+key_sf2 ksf2 str S2 - - ----K special function key 2
+key_sf3 ksf3 str S3 - - ----K special function key 3
+key_sf4 ksf4 str S4 - - ----K special function key 4
+key_sf5 ksf5 str S5 - - ----K special function key 5
+key_sf6 ksf6 str S6 - - ----K special function key 6
+key_sf7 ksf7 str S7 - - ----K special function key 7
+key_sf8 ksf8 str S8 - - ----K special function key 8
+key_sf9 ksf9 str S9 - - ----K special function key 9
+key_sf10 ksf10 str S0 - - ----K special function key 10
+key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
+key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
+key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
+key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
+key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
+key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
+key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
+key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
+key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
+key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
+key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
+key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
+key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
+key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
+key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
+key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
+key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
+key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
+key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
+key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
+key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
+key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
+key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
+key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
+key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
+key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
+key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
+key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
+key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
+key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
+key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
+key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
+key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
+key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
+key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
+key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
+key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
+key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
+key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
+key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
+key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
+key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
+key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
+key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
+key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
+key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
+key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
+key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
+key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
+key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
+key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
+key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
+key_action kact str kJ - - ----K sent by action key
+
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+enter_topline_mode topl str tp - - ----K start top-line mode
+enter_bottom_mode btml str bm - - ----K start bottom-line mode
+enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+# SVr4 capabilities resume here. Note that key_end is in the IBM-extensions.
+#
+char_padding rmp str rP - - ----- like ip but when in insert mode
+acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
+plab_norm pln str pn - - ----- program label #1 to show string #2
+key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
+enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
+exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
+enter_am_mode smam str SA - - ----- turn on automatic margins
+exit_am_mode rmam str RA - - ----- turn off automatic margins
+xon_character xonc str XN - - ----- XON character
+xoff_character xoffc str XF - - ----- XOFF character
+ena_acs enacs str eA - - ----- enable alternate char set
+label_on smln str LO - - ----- turn on soft labels
+label_off rmln str LF - - ----- turn off soft labels
+key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
+key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
+key_close kclo str @3 KEY_CLOSE 0544 ----- close key
+#key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
+key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
+key_create kcrt str @6 KEY_CREATE 0547 ----- create key
+#key_end kend str @7 KEY_END 0550 ----- end key
+key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
+key_exit kext str @9 KEY_EXIT 0551 ----- exit key
+key_find kfnd str @0 KEY_FIND 0552 ----- find key
+#key_help khlp str %1 KEY_HELP 0553 ----- help key
+key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
+key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
+key_move kmov str %4 KEY_MOVE 0556 ----- move key
+key_next knxt str %5 KEY_NEXT 0557 ----- next key
+key_open kopn str %6 KEY_OPEN 0560 ----- open key
+key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
+key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
+key_print kprt str %9 KEY_PRINT 0532 ----- print key
+key_redo krdo str %0 KEY_REDO 0563 ----- redo key
+key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
+key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
+key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
+key_restart krst str &4 KEY_RESTART 0567 ----- restart key
+key_resume kres str &5 KEY_RESUME 0570 ----- resume key
+key_save ksav str &6 KEY_SAVE 0571 ----- save key
+key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
+key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
+key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
+key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
+key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
+key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
+key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
+key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
+key_select kslt str *6 KEY_SELECT 0601 ----- select key
+key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
+key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
+key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
+key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
+key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
+key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
+key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
+key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
+key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
+key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
+key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
+key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
+key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
+key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
+key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
+key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
+key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
+key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
+key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
+key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
+key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
+req_for_input rfi str RF - - ----- send next input char (for ptys)
+clr_bol el1 str cb - - ----- Clear to beginning of line
+clear_margins mgc str MC - - ----- clear right and left soft margins
+set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_right_margin smgr str MR - - ----- set right soft margin at current column
+label_format fln str Lf - - ----- label format
+set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
+display_clock dclk str DK - - ----- display clock
+remove_clock rmclk str RC - - ----- remove clock
+create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
+goto_window wingo str WG - - ----- go to window #1
+hangup hup str HU - - ----- hang-up phone
+dial_phone dial str DI - - ----- dial number #1
+quick_dial qdial str QD - - ----- dial number #1 without checking
+tone tone str TO - - ----- select touch tone dialing
+pulse pulse str PU - - ----- select pulse dialing
+flash_hook hook str fh - - ----- flash switch hook
+fixed_pause pause str PA - - ----- pause for 2-3 seconds
+wait_tone wait str WA - - ----- wait for dial-tone
+user0 u0 str u0 - - ----- User string #0
+user1 u1 str u1 - - ----- User string #1
+user2 u2 str u2 - - ----- User string #2
+user3 u3 str u3 - - ----- User string #3
+user4 u4 str u4 - - ----- User string #4
+user5 u5 str u5 - - ----- User string #5
+user6 u6 str u6 - - ----- User string #6
+user7 u7 str u7 - - ----- User string #7
+user8 u8 str u8 - - ----- User string #8
+user9 u9 str u9 - - ----- User string #9
+#
+# SVr4 added these capabilities to support color
+#
+orig_pair op str op - - ----- Set default pair to its original value
+orig_colors oc str oc - - ----- Set all color pairs to the original ones
+initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
+initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
+set_color_pair scp str sp - - ----- Set current color pair to #1
+set_foreground setf str Sf - - ----- Set foreground color #1
+set_background setb str Sb - - ----- Set background color #1
+#
+# SVr4 added these capabilities to support printers
+#
+change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
+change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
+change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
+change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
+define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
+enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
+enter_italics_mode sitm str ZH - - ----- Enter italic mode
+enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
+enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
+enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
+enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
+enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
+enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
+enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
+enter_upward_mode sum str ZP - - ----- Start upward carriage motion
+exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
+exit_italics_mode ritm str ZR - - ----- End italic mode
+exit_leftward_mode rlm str ZS - - ----- End left-motion mode
+exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
+exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
+exit_subscript_mode rsubm str ZV - - ----- End subscript mode
+exit_superscript_mode rsupm str ZW - - ----- End superscript mode
+exit_upward_mode rum str ZX - - ----- End reverse character motion
+micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
+micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
+micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
+micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
+micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
+micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
+order_of_pins porder str Ze - - ----- Match software bits to print-head pins
+parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
+parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
+parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
+parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
+select_char_set scs str Zj - - ----- Select character set, #1
+set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
+set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
+set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
+set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
+set_top_margin smgt str Zo - - ----- Set top margin at current line
+set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
+start_bit_image sbim str Zq - - ----- Start printing bit image graphics
+start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
+stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
+stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
+subscript_characters subcs str Zu - - ----- List of subscriptable characters
+superscript_characters supcs str Zv - - ----- List of superscriptable characters
+these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
+zero_motion zerom str Zx - - ----- No motion for subsequent character
+#%.TE
+#%.ad
+#%
+#%The following string capabilities are present in the SVr4.0 term structure,
+#%but were originally not documented in the man page.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw18.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
+key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
+mouse_info minfo str Mi - - ----- Mouse status information
+req_mouse_pos reqmp str RQ - - ----- Request mouse position
+get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
+set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
+set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
+pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
+device_type devt str dv - - ----- Indicate language/codeset support
+code_set_init csin str ci - - ----- Init sequence for multiple codesets
+set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
+set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
+set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
+set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
+set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
+set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
+bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
+bit_image_newline binel str Zz - - ----- Move to next row of the bit image
+bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
+color_names colornm str Yw - - ----- Give name for color #1
+define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+end_bit_image_region endbi str Yy - - ----- End a bit-image region
+set_color_band setcolor str Yz - - ----- Change to ribbon color #1
+set_page_length slines str YZ - - ----- Set page length to #1 lines
+#
+# SVr4 added these capabilities for direct PC-clone support
+#
+display_pc_char dispc str S1 - - ----- Display PC character #1
+enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
+exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
+enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
+exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
+pc_term_options pctrm str S6 - - ----- PC terminal options
+scancode_escape scesc str S7 - - ----- Escape for scancode emulation
+alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
+#%.TE
+#%.ad
+#%
+#%.in .8i
+#%The XSI Curses standard added these. They are some post-4.1
+#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
+#%The \fBncurses\fR termcap names for them are invented; according to the
+#%XSI Curses standard, they have no termcap names. If your compiled terminfo
+#%entries use these, they may not be binary-compatible with System V terminfo
+#%entries after SVr4.1; beware!
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
+enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
+enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
+enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
+enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
+enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
+set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
+set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+#%.TE
+#%.ad
+#
+# The magic token below tells the tic compiler-generator code that all the caps
+# past it should be ignored (not written out) when dumping terminfo objects. It
+# also tells the man page table generator not to pass through following lines
+# This means we can have obsolete capabilities and pseudo-capabilities that are
+# recognized for termcap or terminfo compilation, but not output.
+#
+# %%-STOP-HERE-%%
+#
+# Don't move this casually! In fact, don't move it at all unless you're
+# either doing it to add System V or XPG4 extensions, or have decided you
+# don't care about SVr4 binary compatibility.
+#
+#############################################################################
+#
+# TERMCAP EXTENSION CAPABILITIES
+#
+# The capabilities below are either obsolete or extensions on certain systems.
+# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
+# termcap sources; the rest are listed for completeness, and in case somebody
+# cares about them enough to hack in code that will translate them into
+# terminfo capabilities.
+#
+# The first part of the list is from Ross Ridge's `mytinfo' package
+# (comp.sources.unix, volume 26); the variable names and terminfo names (as
+# well as the termcap codes) match his list.
+#
+# This group of codes is not marked obsolete in 4.4BSD, but have no direct
+# terminfo equivalents. The rs capability is specially translated to terminfo
+# r2, and vice versa, if an entry does not already have an r2. Similarly,
+# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
+# The ug capability is thrown away, but assumed to be whatever sg is if the
+# latter is nonzero and we're dumping in termcap format.
+#
+termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
+termcap_reset OTrs str rs - - YB-G- terminal reset string
+magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
+#
+# Obsolete termcap capabilities. Some are used for termcap translation. The
+# code uses the 'OT' prefix we put on obsolete capabilities to suppress
+# printing them in terminfo source dumps of compiled entries.
+#
+backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
+crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
+no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
+carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
+new_line_delay OTdN num dN - - YB-G- pad needed for LF
+linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
+backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
+#
+# GNU termcap library extensions. The GNU termcap file distributed with
+# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
+# BSD termcap file. The name clash with terminfo MT is resolved by type
+# info; MT is converted to km.
+#
+gnu_has_meta_key OTMT bool MT - - ----E has meta key
+# gnu_tab_width OTtw num tw - - ----E tab width in spaces
+#
+# GNU termcap *does* include the following extended capability, Only the
+# now-obsolete Ann Arbor terminals used it.
+#
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+#
+# The following comments describe capnames so ancient that I believe no
+# software uses them any longer. Some of these have to go because they
+# clash with terminfo names in ways that cannot be resolved by type
+# information.
+#
+# These mytinfo codes are not used in the 4.4BSD curses code. They are
+# marked obsolete in the 4.4BSD manual pages.
+#
+# There is one conflict with terminfo; ma is in both. This conflict is
+# resolved by type information.
+#
+# The `ko' capability is translated by special code. It should contain a
+# comma-separated list of capabilities for which there are corresponding keys.
+# The `kn' code is accepted but ignored.
+#
+# The `ma' capability seems to have been designed to map between the rogue(2)
+# motion keys (including jkhl) and characters emitted by arrow keys on some
+# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+#
+# Here is a description of memory_lock_above and memory_unlock:
+# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
+# text. All lines above the cursor's current line become locked in place on
+# the screen. Then enter data normally. When the screen fills up, any
+# further data entered forces the first line of unfrozen line text to scroll
+# under the frozen data. Lines scrolled off the screen are inserted into
+# memory immediately preceding the first frozen line." (from the HP 700/96
+# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
+#
+# Applications that use terminfo are supposed to behave as though xr is
+# always true.
+#
+linefeed_is_newline OTNL bool NL - - YB--- move down with \n
+# even_parity OTEP bool EP - - -B--- terminal requires even parity
+# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
+# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
+# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
+# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
+backspace_delay OTdB num dB - - YB-G- padding required for ^H
+# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
+horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
+# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
+number_of_function_keys OTkn num kn - - -B-G- count of function keys
+other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
+arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
+# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
+has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
+return_does_clr_eol OTxr bool xr - - YB--- return clears the line
+# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
+#
+# mytinfo described this as a termcap capability, but it's not listed in the
+# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
+# package, like System V, behaves as though it is always true.
+#
+# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top line
+#
+# University of Waterloo termcap extensions (as described in mytinfo).
+# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
+# be resolved by a type check. The descriptions are guesses from what was
+# in the mytinfo tables.
+#
+# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
+# key_kill_char OTkk str kk - - ----- string set by kill key (?)
+# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
+# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
+# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
+#
+# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
+# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
+# check.
+#
+# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
+# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
+# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
+# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
+#
+# The mytinfo capabilities end here.
+#
+# XENIX extensions:
+#
+# Xenix defined its own set of forms-drawing capabilities:
+#
+# cap IBM ASCII description ACS ASCII
+# --- ----------- -------------------- ------------- ------
+# G1 191 \277 M-? single upper right ACS_URCORNER
+# G2 218 \332 M-Z single upper left ACS_ULCORNER
+# G3 192 \300 M-@ single lower left ACS_LLCORNER
+# G4 217 \331 M-Y single lower right ACS_LRCORNER
+# G5 187 \273 M-; double upper right
+# G6 201 \311 M-I double upper left
+# G7 200 \310 M-H double lower left
+# G8 188 \274 M-< double lower right
+# GC 197 \305 M-E single intersection ACS_PLUS _ _
+# GD 194 \302 M-B single down-tick ACS_TTEE |
+# GH 196 \304 M-D single horizontal line ACS_HLINE
+# GL 180 \264 M-4 single left tick ACS_RTEE -|
+# GR 195 \303 M-C single right tick ACS_LTEE |-
+# GU 193 \301 M-A single up tick ACS_BTEE _|_
+# GV 179 \263 M-3 single vertical line ACS_VLINE
+# Gc 206 \316 M-N double intersection
+# Gd 203 \313 M-K double down tick
+# Gh 205 \315 M-M double horizontal line
+# Gl 204 \204 M-L double left tick
+# Gr 185 \271 M-9 double right tick
+# Gu 202 \312 M-J double up tick
+# Gv 186 \272 M-: double vertical line
+#
+# The compiler will translate the single-line caps and discard the others
+# (via IGNORE aliases further down). We don't want to do normal pad
+# translation on these, they're often single-character printable ASCII
+# strings that happen to be numerics. There's awk code in parametrized.sh
+# that detects the acs_ prefix and uses it to suppress pad translation.
+# These terminfo names are invented.
+#
+acs_ulcorner OTG2 str G2 - - ----- single upper left
+acs_llcorner OTG3 str G3 - - ----- single lower left
+acs_urcorner OTG1 str G1 - - ----- single upper right
+acs_lrcorner OTG4 str G4 - - ----- single lower right
+acs_ltee OTGR str GR - - ----- tee pointing right
+acs_rtee OTGL str GL - - ----- tee pointing left
+acs_btee OTGU str GU - - ----- tee pointing up
+acs_ttee OTGD str GD - - ----- tee pointing down
+acs_hline OTGH str GH - - ----- single horizontal line
+acs_vline OTGV str GV - - ----- single vertical line
+acs_plus OTGC str GC - - ----- single intersection
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is almost all comments. What it's mainly for is to describe
+# what capabilities need to be squeezed out to get down to the XSI Curses
+# standard set. They are flagged with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+memory_lock meml str ml - - ----K memory lock above
+memory_unlock memu str mu - - ----K memory unlock
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+#
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# case-fold-search:nil
+# truncate-lines:t
+# End:
diff --git a/Build/source/libs/ncurses/include/Caps.hpux11 b/Build/source/libs/ncurses/include/Caps.hpux11
new file mode 100644
index 00000000000..e43d44effb0
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Caps.hpux11
@@ -0,0 +1,1278 @@
+##############################################################################
+# Copyright (c) 2002,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas Dickey
+#
+# $Id: Caps.hpux11,v 1.3 2003/11/15 20:27:40 tom Exp $
+#
+# This is an adaptation of ncurses' termcap/terminfo capability table, which
+# is designed to align with HPUX 11.x's terminfo.
+#
+# This table is used to generate initializers for tables that drive tic,
+# infocmp, and the library compilation code used to support the termcap
+# compatibility hack. It is also used to generate the tabular portion of the
+# terminfo(5) man page; lines beginning with `#%' are passed through to become
+# the terminfo table.
+#
+# This file has three major sections; a standard-capabilities table, two
+# extension-capability tables, and a section of aliases declarations.
+# The first two have the same format, as follows:
+#
+# FILE FORMAT
+#
+# Column 1: terminfo variable name
+# Column 2: terminfo capability name
+# Column 3: capability type (boolean, numeric, or string)
+# Column 4: termcap capability name
+# Column 5: KEY_xxx name, if any, `-' otherwise
+# Column 6: value for KEY_xxx name, if any, `-' otherwise
+# Column 7: Lead with `Y' if capability should be emitted in termcap
+# translations, `-' otherwise
+# Column 8: capability description
+#
+# The codes following [Y-] in column 7 describe the versions of termcap which
+# use the given capability. This information is not used by the curses library
+# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# termcap entry translations that are more than 1023 bytes long (and tank a
+# lot of old termcap-using programs). The codes read as follows:
+# B = mentioned in the BSD man page for 4.4BSD curses
+# C = used by the 4.4BSD curses library
+# G = mentioned in the documentation for GNU termcap
+# E = used by GNU Emacs
+# K = remove this terminfo capability when translating to standard format
+# The important codes are C and E. A cap with C or E should be preserved in
+# translation if possible. The problem is that preserving all such caps may
+# lead to some termcap translations being too long. The termcap maintainer
+# has a bit of a juggling act to do...potential problem cases are marked with
+# an asterisk (*).
+#
+# The aliases section has the following format:
+#
+# Column 1: either `capalias' or `infoalias'
+# Column 2: name to be aliased
+# Column 3: what name it should translate to. The name IGNORE means it
+# should be discarded with a warning message.
+# Column 4: name of the extension set (used for compiler warning messages)
+# Column 5: capability description (usually an associated terminfo variable)
+#
+# HANDLING TERMCAP AND TERMINFO EXTENSIONS
+#
+# There are basically five different ways to handle termcap and terminfo
+# extensions:
+#
+# 1. Don't list the capname here, or list it but comment it out (the latter
+# is preferable; someone might want to handle it in the future). If you do
+# this, the capability will be treated as unknown and raise a warning from
+# the compiler.
+#
+# 2. Alias it. This is appropriate if the capability has the same meaning
+# as an already-supported one. The compiler will handle aliasing, emitting
+# an appropriate informational message whenever an alias fires.
+#
+# 3. List it in the standard table. You almost certainly do *not* want
+# to do this -- the capabilities in that one, and their order, have been
+# carefully chosen to be SVr4-binary-compatible when they're written out
+# as a terminfo object, and breaking this would be bad. It's up the ncurses
+# library what to do with the terminfo data after it's read in.
+#
+# 4. List it in the aliases table with an IGNORE target field. If you
+# do this, the capability will be ignored on input (though the user will
+# get a warning message about it).
+#
+# 5. List it in the extensions table. If you do this, the compiler will
+# silently accept the capability, but the curses library proper will never
+# see it (because it won't be written out as part of the terminfo object
+# format). It's up to you what you have the compiler do with it.
+#
+# There are two opposite reasons to choose option 5. One is when you want
+# to eat the capability silently and discard it when doing translations
+# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
+# in this class. Nothing will ever use them again.
+#
+# More usually, you want the compiler to try to deduce something from the
+# capability value that it can use to translate it into your output format.
+# You'll need to write custom code, probably in postprocess_termcap() or
+# postprocess_terminfo(), to handle the translation.
+#
+# CONTROLLING ENTRY LENGTH
+#
+# Notes on specific elisions made to fit translations within 1023 bytes:
+#
+# Machines with IBM PC-like keyboards want to be able to define the following
+# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
+# only environments for End or Home-Down), key_dc, and key_ic. This is also
+# the set of keys the `joe' editor will be upset if it can't see. So don't
+# trim those out of the set to be translated to termcap, or various users of
+# the termcap file will become irate.
+#
+# It might look tempting to leave those long init strings out of translations.
+# We can't do it (yet); 4.4BSD tput and tset use them.
+#
+# We retain the sgr capability in translation in spite of the fact that neither
+# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
+# hard to understand without it, and (b) the entries in which it is long tend
+# to be older types that don't use up a lot of string space on function keys.
+# The tic(1) translation code will complain and elide it if it makes a critical
+# difference (there is special code in tic to recognize this situation).
+#
+# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
+# optimizer in BSD curses didn't use them. This omission seems to be the
+# single most effective one, it shortened the resolved length of all thirteen
+# problem entries in the 9.9.0 version of the terminfo master below critical.
+#
+# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
+# translations go back over critical if we do this. As 4.4BSD curses fades
+# into history and GNU termcap's application base shrinks towards being GNU
+# Emacs only, we'll probably elide out some BSD-only capabilities in order
+# to buy space for non-essentials Emacs is still using. Capabilities high
+# on that hit list: rc, sc, uc.
+#
+#############################################################################
+#
+# STANDARD 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 \fBvariable\fR is the name by which the programmer (at the terminfo level)
+#%accesses the capability.
+#%
+#%The \fBcapname\fR is the short name used in the text of the database,
+#%and is used by a person updating the database.
+#%Whenever possible, capnames are chosen to be the same as or similar to
+#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
+#%identical or very similar names). Semantics are also intended to match
+#%those of the specification.
+#%
+#%The termcap code is the old
+#%.B termcap
+#%capability name (some capabilities are new, and have names which termcap
+#%did not originate).
+#%.P
+#%Capability names have no hard length limit, but an informal limit of 5
+#%characters has been adopted to keep them short and to allow the tabs in
+#%the source file
+#%.B Caps
+#%to line up nicely.
+#%
+#%Finally, the description field attempts to convey the semantics of the
+#%capability. You may find some codes in the description field:
+#%.TP
+#%(P)
+#%indicates that padding may be specified
+#%.TP
+#%#[1-9]
+#%in the description field indicates that the string is passed through tparm with
+#%parms as given (#\fIi\fP).
+#%.TP
+#%(P*)
+#%indicates that padding may vary in proportion to the number of
+#%lines affected
+#%.TP
+#%(#\d\fIi\fP\u)
+#%indicates the \fIi\fP\uth\d parameter.
+#%
+#%.PP
+#% These are the boolean capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBBooleans name Code\fR
+auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
+auto_right_margin am bool am - - YBCGE terminal has automatic margins
+no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
+ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
+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 (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
+memory_below db bool db - - YB-GE display may be retained below the screen
+move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
+move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
+over_strike os bool os - - YBCG- terminal can overstrike
+status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
+dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
+tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+transparent_underline ul bool ul - - YBCGE underline character overstrikes
+xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
+# end booleans for HPUX 9, 10 (non-color curses)
+needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
+prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
+hard_cursor chts bool HC - - ----- cursor is hard to see
+non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
+no_pad_char npc bool NP - - ----- pad character does not exist
+non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
+can_change ccc bool cc - - ----- terminal can re-define existing colors
+back_color_erase bce bool ut - - ----- screen erased with background color
+hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
+col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
+cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
+has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
+row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
+semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
+cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
+lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
+#%.TE
+#%.ad
+#%
+#%These are the numeric capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+columns cols num co - - YBCGE number of columns in a line
+init_tabs it num it - - YB-G- tabs initially every # spaces
+lines lines num li - - YBCGE number of lines on screen or page
+lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
+magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
+padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
+virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
+width_status_line wsl num ws - - YB-G- number of columns in status line
+# end numbers for HPUX 9, 10 (non-color curses)
+num_labels nlab num Nl - - ----- number of labels on screen
+label_height lh num lh - - ----- rows in each label
+label_width lw num lw - - ----- columns in each label
+max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
+maximum_windows wnum num MW - - ----- maximum number of defineable windows
+# These came in with SVr4's color support
+max_colors colors num Co - - ----- maximum number of colors on screen
+max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
+no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
+#%.TE
+#%.ad
+#%
+#%The following numeric capabilities are present in the SVr4.0 term structure,
+#%but are not yet documented in the man page. They came in with SVr4's
+#%printer support.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
+dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
+dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
+max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
+max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
+micro_col_size mcs num Yf - - ----- character step size when in micro mode
+micro_line_size mls num Yg - - ----- line step size when in micro mode
+number_of_pins npins num Yh - - ----- numbers of pins in print-head
+output_res_char orc num Yi - - ----- horizontal resolution in units per line
+output_res_line orl num Yj - - ----- vertical resolution in units per line
+output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
+output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
+print_rate cps num Ym - - ----- print rate in characters per second
+wide_char_size widcs num Yn - - ----- character step size when in double wide mode
+buttons btns num BT - - ----- number of buttons on mouse
+bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
+bit_image_type bitype num Yp - - ----- type of bit-image device
+#%.TE
+#%.ad
+#%
+#%These are the string capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+back_tab cbt str bt - - YBCGE back tab (P)
+bell bel str bl - - YB-GE audible signal (bell) (P)
+carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
+change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
+clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
+clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
+clr_eol el str ce - - YBCGE clear to end of line (P)
+clr_eos ed str cd - - YBCGE clear to end of screen (P*)
+column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
+command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
+cursor_address cup str cm - - YBCGE move to row #1 columns #2
+cursor_down cud1 str do - - YBCGE down one line
+cursor_home home str ho - - YBCGE home cursor (if no cup)
+cursor_invisible civis str vi - - YB-G- make cursor invisible
+cursor_left cub1 str le - - YBCGE move left one space
+cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
+cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
+cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
+cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
+cursor_up cuu1 str up - - YBCGE up one line
+cursor_visible cvvis str vs - - YBCGE make cursor very visible
+delete_character dch1 str dc - - YBCGE delete character (P*)
+delete_line dl1 str dl - - YBCGE delete line (P*)
+dis_status_line dsl str ds - - YB-G- disable status line
+down_half_line hd str hd - - YB-G- half a line down
+enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
+enter_blink_mode blink str mb - - YB-G- turn on blinking
+enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
+enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
+enter_delete_mode smdc str dm - - YBCGE enter delete mode
+enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
+enter_insert_mode smir str im - - YBCGE enter insert mode
+enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
+enter_protected_mode prot str mp - - -B-G-* turn on protected mode
+enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
+enter_standout_mode smso str so - - YBCGE begin standout mode
+enter_underline_mode smul str us - - YBCGE begin underline mode
+erase_chars ech str ec - - YB-G- erase #1 characters (P)
+exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
+exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
+exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
+exit_delete_mode rmdc str ed - - YBCGE end delete mode
+exit_insert_mode rmir str ei - - YBCGE exit insert mode
+exit_standout_mode rmso str se - - YBCGE exit standout mode
+exit_underline_mode rmul str ue - - YBCGE exit underline mode
+flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
+form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
+from_status_line fsl str fs - - YB-G- return from status line
+init_1string is1 str i1 - - YB-G- initialization string
+init_2string is2 str is - - YB-G- initialization string
+init_3string is3 str i3 - - YB-G- initialization string
+init_file if str if - - YB-G- name of initialization file
+insert_character ich1 str ic - - YBCGE insert character (P)
+insert_line il1 str al - - YBCGE insert line (P*)
+insert_padding ip str ip - - YBCGE insert padding after inserted character
+key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
+key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
+key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
+key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
+key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
+key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
+key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
+key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
+key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
+key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
+key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
+key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
+key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
+key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
+key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
+key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
+key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
+key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
+key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
+key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
+key_home khome str kh KEY_HOME 0406 YBCGE home key
+key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
+key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
+key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
+key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
+key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
+key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
+key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
+key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
+key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
+key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
+key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
+keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
+keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
+lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
+lab_f10 lf10 str la - - ----- label on function key f10 if not f10
+lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
+lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
+lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
+lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
+lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
+lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
+lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
+lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
+meta_off rmm str mo - - YB-G-* turn off meta mode
+meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
+newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
+pad_char pad str pc - - YBCGE padding char (instead of null)
+parm_dch dch str DC - - YB-GE delete #1 characters (P*)
+parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
+parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
+parm_ich ich str IC - - YB-GE insert #1 characters (P*)
+parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
+parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
+parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
+parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
+parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
+parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
+pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
+pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
+pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
+print_screen mc0 str ps - - -B-G-* print contents of screen
+prtr_off mc4 str pf - - -B-G-* turn off printer
+prtr_on mc5 str po - - -B-G-* turn on printer
+repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
+reset_1string rs1 str r1 - - -B--- reset string
+reset_2string rs2 str r2 - - -B--- reset string
+reset_3string rs3 str r3 - - -B--- reset string
+reset_file rf str rf - - -B--- name of reset file
+restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
+row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
+save_cursor sc str sc - - YBCG- save current cursor position (P)
+scroll_forward ind str sf - - YBCGE scroll text up (P)
+scroll_reverse ri str sr - - YBCGE scroll text down (P)
+set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
+set_tab hts str st - - YB-G- set a tab in every row, current columns
+set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
+tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
+to_status_line tsl str ts - - YB-G- move to status line, column #1
+underline_char uc str uc - - YBCG- underline char and move past it
+up_half_line hu str hu - - YB-G- half a line up
+init_prog iprog str iP - - -B--- path name of program for initialization
+key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
+key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
+key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
+key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
+key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
+prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
+#
+# SVr1 capabilities stop here. IBM's version of terminfo is the same as
+# SVr4 up to this point, but has a different set afterwards.
+#
+# HPUX defines these if __HP_CURSES_COMPAT is defined:
+memory_lock meml str ml - - ----K memory lock above
+memory_unlock memu str mu - - ----K memory unlock
+#
+#
+plab_norm pln str pn - - ----- program label #1 to show string #2
+label_on smln str LO - - ----- turn on soft labels
+label_off rmln str LF - - ----- turn off soft labels
+key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
+key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
+key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
+key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
+key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
+key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
+key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
+key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
+key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
+key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
+key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
+key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
+key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
+key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
+key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
+key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
+key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
+key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
+key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
+key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
+key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
+key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
+key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
+key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
+key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
+key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
+key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
+key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
+key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
+key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
+key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
+key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
+key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
+key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
+key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
+key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
+key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
+key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
+key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
+key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
+key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
+key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
+key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
+key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
+key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
+key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
+key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
+key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
+key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
+key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
+key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
+key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
+# end of strings in HPUX 9
+char_padding rmp str rP - - ----- like ip but when in insert mode
+acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
+key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
+enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
+exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
+enter_am_mode smam str SA - - ----- turn on automatic margins
+exit_am_mode rmam str RA - - ----- turn off automatic margins
+xon_character xonc str XN - - ----- XON character
+xoff_character xoffc str XF - - ----- XOFF character
+ena_acs enacs str eA - - ----- enable alternate char set
+key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
+key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
+key_close kclo str @3 KEY_CLOSE 0544 ----- close key
+key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
+key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
+key_create kcrt str @6 KEY_CREATE 0547 ----- create key
+key_end kend str @7 KEY_END 0550 ----- end key
+key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
+key_exit kext str @9 KEY_EXIT 0551 ----- exit key
+key_find kfnd str @0 KEY_FIND 0552 ----- find key
+key_help khlp str %1 KEY_HELP 0553 ----- help key
+key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
+key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
+key_move kmov str %4 KEY_MOVE 0556 ----- move key
+key_next knxt str %5 KEY_NEXT 0557 ----- next key
+key_open kopn str %6 KEY_OPEN 0560 ----- open key
+key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
+key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
+key_print kprt str %9 KEY_PRINT 0532 ----- print key
+key_redo krdo str %0 KEY_REDO 0563 ----- redo key
+key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
+key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
+key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
+key_restart krst str &4 KEY_RESTART 0567 ----- restart key
+key_resume kres str &5 KEY_RESUME 0570 ----- resume key
+key_save ksav str &6 KEY_SAVE 0571 ----- save key
+key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
+key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
+key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
+key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
+key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
+key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
+key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
+key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
+key_select kslt str *6 KEY_SELECT 0601 ----- select key
+key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
+key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
+key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
+key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
+key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
+key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
+key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
+key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
+key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
+key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
+key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
+key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
+key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
+key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
+key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
+key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
+key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
+key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
+key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
+key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
+key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
+req_for_input rfi str RF - - ----- send next input char (for ptys)
+clr_bol el1 str cb - - ----- Clear to beginning of line
+clear_margins mgc str MC - - ----- clear right and left soft margins
+set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_right_margin smgr str MR - - ----- set right soft margin at current column
+label_format fln str Lf - - ----- label format
+set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
+display_clock dclk str DK - - ----- display clock
+remove_clock rmclk str RC - - ----- remove clock
+create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
+goto_window wingo str WG - - ----- go to window #1
+hangup hup str HU - - ----- hang-up phone
+dial_phone dial str DI - - ----- dial number #1
+quick_dial qdial str QD - - ----- dial number #1 without checking
+tone tone str TO - - ----- select touch tone dialing
+pulse pulse str PU - - ----- select pulse dialing
+flash_hook hook str fh - - ----- flash switch hook
+fixed_pause pause str PA - - ----- pause for 2-3 seconds
+wait_tone wait str WA - - ----- wait for dial-tone
+user0 u0 str u0 - - ----- User string #0
+user1 u1 str u1 - - ----- User string #1
+user2 u2 str u2 - - ----- User string #2
+user3 u3 str u3 - - ----- User string #3
+user4 u4 str u4 - - ----- User string #4
+user5 u5 str u5 - - ----- User string #5
+user6 u6 str u6 - - ----- User string #6
+user7 u7 str u7 - - ----- User string #7
+user8 u8 str u8 - - ----- User string #8
+user9 u9 str u9 - - ----- User string #9
+#
+# SVr4 added these capabilities to support color
+#
+orig_pair op str op - - ----- Set default pair to its original value
+orig_colors oc str oc - - ----- Set all color pairs to the original ones
+initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
+initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
+set_color_pair scp str sp - - ----- Set current color pair to #1
+set_foreground setf str Sf - - ----- Set foreground color #1
+set_background setb str Sb - - ----- Set background color #1
+#
+# SVr4 added these capabilities to support printers
+#
+change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
+change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
+change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
+change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
+define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
+enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
+enter_italics_mode sitm str ZH - - ----- Enter italic mode
+enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
+enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
+enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
+enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
+enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
+enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
+enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
+enter_upward_mode sum str ZP - - ----- Start upward carriage motion
+exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
+exit_italics_mode ritm str ZR - - ----- End italic mode
+exit_leftward_mode rlm str ZS - - ----- End left-motion mode
+exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
+exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
+exit_subscript_mode rsubm str ZV - - ----- End subscript mode
+exit_superscript_mode rsupm str ZW - - ----- End superscript mode
+exit_upward_mode rum str ZX - - ----- End reverse character motion
+micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
+micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
+micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
+micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
+micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
+micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
+order_of_pins porder str Ze - - ----- Match software bits to print-head pins
+parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
+parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
+parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
+parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
+select_char_set scs str Zj - - ----- Select character set, #1
+set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
+set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
+set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
+set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
+set_top_margin smgt str Zo - - ----- Set top margin at current line
+set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
+start_bit_image sbim str Zq - - ----- Start printing bit image graphics
+start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
+stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
+stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
+subscript_characters subcs str Zu - - ----- List of subscriptable characters
+superscript_characters supcs str Zv - - ----- List of superscriptable characters
+these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
+zero_motion zerom str Zx - - ----- No motion for subsequent character
+#%.TE
+#%.ad
+#%
+#%The following string capabilities are present in the SVr4.0 term structure,
+#%but were originally not documented in the man page.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw18.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
+key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
+mouse_info minfo str Mi - - ----- Mouse status information
+req_mouse_pos reqmp str RQ - - ----- Request mouse position
+get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
+set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
+set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
+pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
+device_type devt str dv - - ----- Indicate language/codeset support
+code_set_init csin str ci - - ----- Init sequence for multiple codesets
+set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
+set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
+set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
+set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
+set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
+set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
+bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
+bit_image_newline binel str Zz - - ----- Move to next row of the bit image
+bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
+color_names colornm str Yw - - ----- Give name for color #1
+define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+end_bit_image_region endbi str Yy - - ----- End a bit-image region
+set_color_band setcolor str Yz - - ----- Change to ribbon color #1
+set_page_length slines str YZ - - ----- Set page length to #1 lines
+#
+# SVr4 added these capabilities for direct PC-clone support
+#
+display_pc_char dispc str S1 - - ----- Display PC character #1
+enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
+exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
+enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
+exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
+pc_term_options pctrm str S6 - - ----- PC terminal options
+scancode_escape scesc str S7 - - ----- Escape for scancode emulation
+alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
+#%.TE
+#%.ad
+#%
+#%.in .8i
+#%The XSI Curses standard added these. They are some post-4.1
+#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
+#%The \fBncurses\fR termcap names for them are invented; according to the
+#%XSI Curses standard, they have no termcap names. If your compiled terminfo
+#%entries use these, they may not be binary-compatible with System V terminfo
+#%entries after SVr4.1; beware!
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
+enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
+enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
+enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
+enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
+enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
+set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
+exit_horizontal_hl_mode rhhlm str XH - - ----K Exit horizontal highlight mode
+exit_left_hl_mode rlhlm str XL - - ----K Exit left highlight mode
+exit_low_hl_mode rlohlm str XO - - ----K Exit low highlight mode
+exit_right_hl_mode rrhlm str XR - - ----K Exit right highlight mode
+exit_top_hl_mode rthlm str XT - - ----K Exit top highlight mode
+exit_vertical_hl_mode rvhlm str XV - - ----K Exit vertical highlight mode
+#%.TE
+#%.ad
+#
+# The magic token below tells the tic compiler-generator code that all the caps
+# past it should be ignored (not written out) when dumping terminfo objects. It
+# also tells the man page table generator not to pass through following lines
+# This means we can have obsolete capabilities and pseudo-capabilities that are
+# recognized for termcap or terminfo compilation, but not output.
+#
+# %%-STOP-HERE-%%
+#
+# Don't move this casually! In fact, don't move it at all unless you're
+# either doing it to add System V or XPG4 extensions, or have decided you
+# don't care about SVr4 binary compatibility.
+#
+#############################################################################
+#
+# TERMCAP EXTENSION CAPABILITIES
+#
+# The capabilities below are either obsolete or extensions on certain systems.
+# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
+# termcap sources; the rest are listed for completeness, and in case somebody
+# cares about them enough to hack in code that will translate them into
+# terminfo capabilities.
+#
+# The first part of the list is from Ross Ridge's `mytinfo' package
+# (comp.sources.unix, volume 26); the variable names and terminfo names (as
+# well as the termcap codes) match his list.
+#
+# This group of codes is not marked obsolete in 4.4BSD, but have no direct
+# terminfo equivalents. The rs capability is specially translated to terminfo
+# r2, and vice versa, if an entry does not already have an r2. Similarly,
+# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
+# The ug capability is thrown away, but assumed to be whatever sg is if the
+# latter is nonzero and we're dumping in termcap format.
+#
+termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
+termcap_reset OTrs str rs - - YB-G- terminal reset string
+magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
+#
+# Obsolete termcap capabilities. Some are used for termcap translation. The
+# code uses the 'OT' prefix we put on obsolete capabilities to suppress
+# printing them in terminfo source dumps of compiled entries.
+#
+backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
+crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
+no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
+carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
+new_line_delay OTdN num dN - - YB-G- pad needed for LF
+linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
+backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
+#
+# GNU termcap library extensions. The GNU termcap file distributed with
+# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
+# BSD termcap file. The name clash with terminfo MT is resolved by type
+# info; MT is converted to km.
+#
+gnu_has_meta_key OTMT bool MT - - ----E has meta key
+# gnu_tab_width OTtw num tw - - ----E tab width in spaces
+#
+# GNU termcap *does* include the following extended capability, Only the
+# now-obsolete Ann Arbor terminals used it.
+#
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+#
+# The following comments describe capnames so ancient that I believe no
+# software uses them any longer. Some of these have to go because they
+# clash with terminfo names in ways that cannot be resolved by type
+# information.
+#
+# These mytinfo codes are not used in the 4.4BSD curses code. They are
+# marked obsolete in the 4.4BSD manual pages.
+#
+# There is one conflict with terminfo; ma is in both. This conflict is
+# resolved by type information.
+#
+# The `ko' capability is translated by special code. It should contain a
+# comma-separated list of capabilities for which there are corresponding keys.
+# The `kn' code is accepted but ignored.
+#
+# The `ma' capability seems to have been designed to map between the rogue(2)
+# motion keys (including jkhl) and characters emitted by arrow keys on some
+# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+#
+# Here is a description of memory_lock_above and memory_unlock:
+# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
+# text. All lines above the cursor's current line become locked in place on
+# the screen. Then enter data normally. When the screen fills up, any
+# further data entered forces the first line of unfrozen line text to scroll
+# under the frozen data. Lines scrolled off the screen are inserted into
+# memory immediately preceding the first frozen line." (from the HP 700/96
+# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
+#
+# Applications that use terminfo are supposed to behave as though xr is
+# always true.
+#
+linefeed_is_newline OTNL bool NL - - YB--- move down with \n
+# even_parity OTEP bool EP - - -B--- terminal requires even parity
+# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
+# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
+# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
+# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
+backspace_delay OTdB num dB - - YB-G- padding required for ^H
+# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
+horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
+# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
+number_of_function_keys OTkn num kn - - -B-G- count of function keys
+other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
+arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
+# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
+has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
+return_does_clr_eol OTxr bool xr - - YB--- return clears the line
+# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
+#
+# mytinfo described this as a termcap capability, but it's not listed in the
+# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
+# package, like System V, behaves as though it is always true.
+#
+# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top line
+#
+# University of Waterloo termcap extensions (as described in mytinfo).
+# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
+# be resolved by a type check. The descriptions are guesses from what was
+# in the mytinfo tables.
+#
+# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
+# key_kill_char OTkk str kk - - ----- string set by kill key (?)
+# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
+# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
+# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
+#
+# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
+# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
+# check.
+#
+# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
+# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
+# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
+# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
+#
+# The mytinfo capabilities end here.
+#
+# XENIX extensions:
+#
+# Xenix defined its own set of forms-drawing capabilities:
+#
+# cap IBM ASCII description ACS ASCII
+# --- ----------- -------------------- ------------- ------
+# G1 191 \277 M-? single upper right ACS_URCORNER
+# G2 218 \332 M-Z single upper left ACS_ULCORNER
+# G3 192 \300 M-@ single lower left ACS_LLCORNER
+# G4 217 \331 M-Y single lower right ACS_LRCORNER
+# G5 187 \273 M-; double upper right
+# G6 201 \311 M-I double upper left
+# G7 200 \310 M-H double lower left
+# G8 188 \274 M-< double lower right
+# GC 197 \305 M-E single intersection ACS_PLUS _ _
+# GD 194 \302 M-B single down-tick ACS_TTEE |
+# GH 196 \304 M-D single horizontal line ACS_HLINE
+# GL 180 \264 M-4 single left tick ACS_RTEE -|
+# GR 195 \303 M-C single right tick ACS_LTEE |-
+# GU 193 \301 M-A single up tick ACS_BTEE _|_
+# GV 179 \263 M-3 single vertical line ACS_VLINE
+# Gc 206 \316 M-N double intersection
+# Gd 203 \313 M-K double down tick
+# Gh 205 \315 M-M double horizontal line
+# Gl 204 \204 M-L double left tick
+# Gr 185 \271 M-9 double right tick
+# Gu 202 \312 M-J double up tick
+# Gv 186 \272 M-: double vertical line
+#
+# The compiler will translate the single-line caps and discard the others
+# (via IGNORE aliases further down). We don't want to do normal pad
+# translation on these, they're often single-character printable ASCII
+# strings that happen to be numerics. There's awk code in parametrized.sh
+# that detects the acs_ prefix and uses it to suppress pad translation.
+# These terminfo names are invented.
+#
+acs_ulcorner OTG2 str G2 - - ----- single upper left
+acs_llcorner OTG3 str G3 - - ----- single lower left
+acs_urcorner OTG1 str G1 - - ----- single upper right
+acs_lrcorner OTG4 str G4 - - ----- single lower right
+acs_ltee OTGR str GR - - ----- tee pointing right
+acs_rtee OTGL str GL - - ----- tee pointing left
+acs_btee OTGU str GU - - ----- tee pointing up
+acs_ttee OTGD str GD - - ----- tee pointing down
+acs_hline OTGH str GH - - ----- single horizontal line
+acs_vline OTGV str GV - - ----- single vertical line
+acs_plus OTGC str GC - - ----- single intersection
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is almost all comments. What it's mainly for is to describe
+# what capabilities need to be squeezed out to get down to the XSI Curses
+# standard set. They are flagged with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+#memory_lock meml str ml - - ----K memory lock above
+#memory_unlock memu str mu - - ----K memory unlock
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+box_chars_1 box1 str bx - - ----K box characters primary set
+#box_chars_2 box2 str by - - ----K box characters secondary set
+#box_attr_1 batt1 str Bx - - ----K attributes for box1
+#box_attr_2 batt2 str By - - ----K attributes for box2
+#color_bg_0 colb0 str d0 - - ----K background color 0
+#color_bg_1 colb1 str d1 - - ----K background color 1
+#color_bg_2 colb2 str d2 - - ----K background color 2
+#color_bg_3 colb3 str d3 - - ----K background color 3
+#color_bg_4 colb4 str d4 - - ----K background color 4
+#color_bg_5 colb5 str d5 - - ----K background color 5
+#color_bg_6 colb6 str d6 - - ----K background color 6
+#color_bg_7 colb7 str d7 - - ----K background color 7
+#color_fg_0 colf0 str c0 - - ----K foreground color 0
+#color_fg_1 colf1 str c1 - - ----K foreground color 1
+#color_fg_2 colf2 str c2 - - ----K foreground color 2
+#color_fg_3 colf3 str c3 - - ----K foreground color 3
+#color_fg_4 colf4 str c4 - - ----K foreground color 4
+#color_fg_5 colf5 str c5 - - ----K foreground color 5
+#color_fg_6 colf6 str c6 - - ----K foreground color 6
+#color_fg_7 colf7 str c7 - - ----K foreground color 7
+#font_0 font0 str f0 - - ----- select font 0
+#font_1 font1 str f1 - - ----- select font 1
+#font_2 font2 str f2 - - ----- select font 2
+#font_3 font3 str f3 - - ----- select font 3
+#font_4 font4 str f4 - - ----K select font 4
+#font_5 font5 str f5 - - ----K select font 5
+#font_6 font6 str f6 - - ----K select font 6
+#font_7 font7 str f7 - - ----K select font 7
+#key_back_tab kbtab str k0 - - ----- backtab key
+#key_do kdo str ki - - ----K do request key
+#key_command kcmd str kd - - ----K command-request key
+#key_command_pane kcpn str kW - - ----K command-pane key
+#key_end kend str kw - - ----- end key
+#key_help khlp str kq - - ----- help key
+#key_newline knl str nl - - ----K newline key
+#key_next_pane knpn str kv - - ----K next-pane key
+#key_prev_cmd kppn str kp - - ----K previous-command key
+#key_prev_pane kppn str kV - - ----K previous-pane key
+#key_quit kquit str kQ - - ----K quit key
+#key_select ksel str kU - - ----- select key
+#key_scroll_left kscl str kz - - ----K scroll left
+#key_scroll_right kscr str kZ - - ----K scroll right
+#key_tab ktab str ko - - ----K tab key
+#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+#appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
+# the IBM manual pages, so the cap name strings are guesses. The terminfo
+# names are almost certainly right, the termcap ones almost certainly wrong.
+#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
+#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
+#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
+#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
+#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
+#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
+#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
+#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
+# Undocumented capabilities end here
+#key_sf1 ksf1 str S1 - - ----K special function key 1
+#key_sf2 ksf2 str S2 - - ----K special function key 2
+#key_sf3 ksf3 str S3 - - ----K special function key 3
+#key_sf4 ksf4 str S4 - - ----K special function key 4
+#key_sf5 ksf5 str S5 - - ----K special function key 5
+#key_sf6 ksf6 str S6 - - ----K special function key 6
+#key_sf7 ksf7 str S7 - - ----K special function key 7
+#key_sf8 ksf8 str S8 - - ----K special function key 8
+#key_sf9 ksf9 str S9 - - ----K special function key 9
+#key_sf10 ksf10 str SA - - ----K special function key 10
+# AIX version 3 documents different codes for F11, F12 and does not mention
+# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
+#key_f11 kf11 str k< - - ----- function key 11
+#key_f12 kf12 str k> - - ----- function key 12
+# Undocumented capabilities end here.
+#key_action kact str kJ - - ----K sent by action key
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+#enter_topline_mode topl str tp - - ----K start top-line mode
+#enter_bottom_mode btml str bm - - ----K start bottom-line mode
+#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+#
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# case-fold-search:nil
+# truncate-lines:t
+# End:
diff --git a/Build/source/libs/ncurses/include/Caps.keys b/Build/source/libs/ncurses/include/Caps.keys
new file mode 100644
index 00000000000..7ef7545fa5b
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Caps.keys
@@ -0,0 +1,1354 @@
+##############################################################################
+# Copyright (c) 2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas Dickey
+# and: Ilya Zakharevich
+#
+# $Id: Caps.keys,v 1.2 2002/04/20 15:43:49 tom Exp $
+#
+# This is an adaptation of ncurses' termcap/terminfo capability table, which
+# is illustrates an experimental extension to describe alt-, shift- and
+# control-modifiers applied to function and normal keys, as done on IBM pc's.
+#
+# This table is used to generate initializers for tables that drive tic,
+# infocmp, and the library compilation code used to support the termcap
+# compatibility hack. It is also used to generate the tabular portion of the
+# terminfo(5) man page; lines beginning with `#%' are passed through to become
+# the terminfo table.
+#
+# This file has three major sections; a standard-capabilities table, two
+# extension-capability tables, and a section of aliases declarations.
+# The first two have the same format, as follows:
+#
+# FILE FORMAT
+#
+# Column 1: terminfo variable name
+# Column 2: terminfo capability name
+# Column 3: capability type (boolean, numeric, or string)
+# Column 4: termcap capability name
+# Column 5: KEY_xxx name, if any, `-' otherwise
+# Column 6: value for KEY_xxx name, if any, `-' otherwise
+# Column 7: Lead with `Y' if capability should be emitted in termcap
+# translations, `-' otherwise
+# Column 8: capability description
+#
+# The codes following [Y-] in column 7 describe the versions of termcap which
+# use the given capability. This information is not used by the curses library
+# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# termcap entry translations that are more than 1023 bytes long (and tank a
+# lot of old termcap-using programs). The codes read as follows:
+# B = mentioned in the BSD man page for 4.4BSD curses
+# C = used by the 4.4BSD curses library
+# G = mentioned in the documentation for GNU termcap
+# E = used by GNU Emacs
+# K = remove this terminfo capability when translating to standard format
+# The important codes are C and E. A cap with C or E should be preserved in
+# translation if possible. The problem is that preserving all such caps may
+# lead to some termcap translations being too long. The termcap maintainer
+# has a bit of a juggling act to do...potential problem cases are marked with
+# an asterisk (*).
+#
+# The aliases section has the following format:
+#
+# Column 1: either `capalias' or `infoalias'
+# Column 2: name to be aliased
+# Column 3: what name it should translate to. The name IGNORE means it
+# should be discarded with a warning message.
+# Column 4: name of the extension set (used for compiler warning messages)
+# Column 5: capability description (usually an associated terminfo variable)
+#
+# HANDLING TERMCAP AND TERMINFO EXTENSIONS
+#
+# There are basically five different ways to handle termcap and terminfo
+# extensions:
+#
+# 1. Don't list the capname here, or list it but comment it out (the latter
+# is preferable; someone might want to handle it in the future). If you do
+# this, the capability will be treated as unknown and raise a warning from
+# the compiler.
+#
+# 2. Alias it. This is appropriate if the capability has the same meaning
+# as an already-supported one. The compiler will handle aliasing, emitting
+# an appropriate informational message whenever an alias fires.
+#
+# 3. List it in the standard table. You almost certainly do *not* want
+# to do this -- the capabilities in that one, and their order, have been
+# carefully chosen to be SVr4-binary-compatible when they're written out
+# as a terminfo object, and breaking this would be bad. It's up the ncurses
+# library what to do with the terminfo data after it's read in.
+#
+# 4. List it in the aliases table with an IGNORE target field. If you
+# do this, the capability will be ignored on input (though the user will
+# get a warning message about it).
+#
+# 5. List it in the extensions table. If you do this, the compiler will
+# silently accept the capability, but the curses library proper will never
+# see it (because it won't be written out as part of the terminfo object
+# format). It's up to you what you have the compiler do with it.
+#
+# There are two opposite reasons to choose option 5. One is when you want
+# to eat the capability silently and discard it when doing translations
+# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
+# in this class. Nothing will ever use them again.
+#
+# More usually, you want the compiler to try to deduce something from the
+# capability value that it can use to translate it into your output format.
+# You'll need to write custom code, probably in postprocess_termcap() or
+# postprocess_terminfo(), to handle the translation.
+#
+# CONTROLLING ENTRY LENGTH
+#
+# Notes on specific elisions made to fit translations within 1023 bytes:
+#
+# Machines with IBM PC-like keyboards want to be able to define the following
+# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
+# only environments for End or Home-Down), key_dc, and key_ic. This is also
+# the set of keys the `joe' editor will be upset if it can't see. So don't
+# trim those out of the set to be translated to termcap, or various users of
+# the termcap file will become irate.
+#
+# It might look tempting to leave those long init strings out of translations.
+# We can't do it (yet); 4.4BSD tput and tset use them.
+#
+# We retain the sgr capability in translation in spite of the fact that neither
+# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
+# hard to understand without it, and (b) the entries in which it is long tend
+# to be older types that don't use up a lot of string space on function keys.
+# The tic(1) translation code will complain and elide it if it makes a critical
+# difference (there is special code in tic to recognize this situation).
+#
+# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
+# optimizer in BSD curses didn't use them. This omission seems to be the
+# single most effective one, it shortened the resolved length of all thirteen
+# problem entries in the 9.9.0 version of the terminfo master below critical.
+#
+# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
+# translations go back over critical if we do this. As 4.4BSD curses fades
+# into history and GNU termcap's application base shrinks towards being GNU
+# Emacs only, we'll probably elide out some BSD-only capabilities in order
+# to buy space for non-essentials Emacs is still using. Capabilities high
+# on that hit list: rc, sc, uc.
+#
+#############################################################################
+#
+# STANDARD 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 \fBvariable\fR is the name by which the programmer (at the terminfo level)
+#%accesses the capability.
+#%
+#%The \fBcapname\fR is the short name used in the text of the database,
+#%and is used by a person updating the database.
+#%Whenever possible, capnames are chosen to be the same as or similar to
+#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
+#%identical or very similar names). Semantics are also intended to match
+#%those of the specification.
+#%
+#%The termcap code is the old
+#%.B termcap
+#%capability name (some capabilities are new, and have names which termcap
+#%did not originate).
+#%.P
+#%Capability names have no hard length limit, but an informal limit of 5
+#%characters has been adopted to keep them short and to allow the tabs in
+#%the source file
+#%.B Caps
+#%to line up nicely.
+#%
+#%Finally, the description field attempts to convey the semantics of the
+#%capability. You may find some codes in the description field:
+#%.TP
+#%(P)
+#%indicates that padding may be specified
+#%.TP
+#%#[1-9]
+#%in the description field indicates that the string is passed through tparm with
+#%parms as given (#\fIi\fP).
+#%.TP
+#%(P*)
+#%indicates that padding may vary in proportion to the number of
+#%lines affected
+#%.TP
+#%(#\d\fIi\fP\u)
+#%indicates the \fIi\fP\uth\d parameter.
+#%
+#%.PP
+#% These are the boolean capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBBooleans name Code\fR
+auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
+auto_right_margin am bool am - - YBCGE terminal has automatic margins
+no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
+ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
+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 (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
+memory_below db bool db - - YB-GE display may be retained below the screen
+move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
+move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
+over_strike os bool os - - YBCG- terminal can overstrike
+status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
+dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
+tilde_glitch hz bool hz - - YB-GE can't print ~'s (hazeltine)
+transparent_underline ul bool ul - - YBCGE underline character overstrikes
+xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
+needs_xon_xoff nxon bool nx - - ----- padding won't work, xon/xoff required
+prtr_silent mc5i bool 5i - - ----- printer won't echo on screen
+hard_cursor chts bool HC - - ----- cursor is hard to see
+non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
+no_pad_char npc bool NP - - ----- pad character does not exist
+non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
+can_change ccc bool cc - - ----- terminal can re-define existing colors
+back_color_erase bce bool ut - - ----- screen erased with background color
+hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
+col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
+cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
+has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
+row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
+semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
+cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
+lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
+#%.TE
+#%.ad
+#%
+#%These are the numeric capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+columns cols num co - - YBCGE number of columns in a line
+init_tabs it num it - - YB-G- tabs initially every # spaces
+lines lines num li - - YBCGE number of lines on screen or page
+lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
+magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
+padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
+virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
+width_status_line wsl num ws - - YB-G- number of columns in status line
+num_labels nlab num Nl - - ----- number of labels on screen
+label_height lh num lh - - ----- rows in each label
+label_width lw num lw - - ----- columns in each label
+max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
+maximum_windows wnum num MW - - ----- maximum number of defineable windows
+# These came in with SVr4's color support
+max_colors colors num Co - - ----- maximum number of colors on screen
+max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
+no_color_video ncv num NC - - ----- video attributes that can't be used with colors
+#%.TE
+#%.ad
+#%
+#%The following numeric capabilities are present in the SVr4.0 term structure,
+#%but are not yet documented in the man page. They came in with SVr4's
+#%printer support.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
+dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
+dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
+max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
+max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
+micro_col_size mcs num Yf - - ----- character step size when in micro mode
+micro_line_size mls num Yg - - ----- line step size when in micro mode
+number_of_pins npins num Yh - - ----- numbers of pins in print-head
+output_res_char orc num Yi - - ----- horizontal resolution in units per line
+output_res_line orl num Yj - - ----- vertical resolution in units per line
+output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
+output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
+print_rate cps num Ym - - ----- print rate in characters per second
+wide_char_size widcs num Yn - - ----- character step size when in double wide mode
+buttons btns num BT - - ----- number of buttons on mouse
+bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
+bit_image_type bitype num Yp - - ----- type of bit-image device
+#%.TE
+#%.ad
+#%
+#%These are the string capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+back_tab cbt str bt - - YBCGE back tab (P)
+bell bel str bl - - YB-GE audible signal (bell) (P)
+carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
+change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
+clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
+clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
+clr_eol el str ce - - YBCGE clear to end of line (P)
+clr_eos ed str cd - - YBCGE clear to end of screen (P*)
+column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
+command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
+cursor_address cup str cm - - YBCGE move to row #1 columns #2
+cursor_down cud1 str do - - YBCGE down one line
+cursor_home home str ho - - YBCGE home cursor (if no cup)
+cursor_invisible civis str vi - - YB-G- make cursor invisible
+cursor_left cub1 str le - - YBCGE move left one space
+cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
+cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
+cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
+cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
+cursor_up cuu1 str up - - YBCGE up one line
+cursor_visible cvvis str vs - - YBCGE make cursor very visible
+delete_character dch1 str dc - - YBCGE delete character (P*)
+delete_line dl1 str dl - - YBCGE delete line (P*)
+dis_status_line dsl str ds - - YB-G- disable status line
+down_half_line hd str hd - - YB-G- half a line down
+enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
+enter_blink_mode blink str mb - - YB-G- turn on blinking
+enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
+enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
+enter_delete_mode smdc str dm - - YBCGE enter delete mode
+enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
+enter_insert_mode smir str im - - YBCGE enter insert mode
+enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
+enter_protected_mode prot str mp - - -B-G-* turn on protected mode
+enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
+enter_standout_mode smso str so - - YBCGE begin standout mode
+enter_underline_mode smul str us - - YBCGE begin underline mode
+erase_chars ech str ec - - YB-G- erase #1 characters (P)
+exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
+exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
+exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
+exit_delete_mode rmdc str ed - - YBCGE end delete mode
+exit_insert_mode rmir str ei - - YBCGE exit insert mode
+exit_standout_mode rmso str se - - YBCGE exit standout mode
+exit_underline_mode rmul str ue - - YBCGE exit underline mode
+flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
+form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
+from_status_line fsl str fs - - YB-G- return from status line
+init_1string is1 str i1 - - YB-G- initialization string
+init_2string is2 str is - - YB-G- initialization string
+init_3string is3 str i3 - - YB-G- initialization string
+init_file if str if - - YB-G- name of initialization file
+insert_character ich1 str ic - - YBCGE insert character (P)
+insert_line il1 str al - - YBCGE insert line (P*)
+insert_padding ip str ip - - YBCGE insert padding after inserted character
+key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
+key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
+key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
+key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
+key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
+key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
+key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
+key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
+key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
+key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
+key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
+key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
+key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
+key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
+key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
+key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
+key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
+key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
+key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
+key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
+key_home khome str kh KEY_HOME 0406 YBCGE home key
+key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
+key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
+key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
+key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
+key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
+key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
+key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
+key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
+key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
+key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
+key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
+keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
+keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
+lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
+lab_f10 lf10 str la - - ----- label on function key f10 if not f10
+lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
+lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
+lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
+lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
+lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
+lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
+lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
+lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
+meta_off rmm str mo - - YB-G-* turn off meta mode
+meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
+newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
+pad_char pad str pc - - YBCGE padding char (instead of null)
+parm_dch dch str DC - - YB-GE delete #1 characters (P*)
+parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
+parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
+parm_ich ich str IC - - YB-GE insert #1 characters (P*)
+parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
+parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
+parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
+parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
+parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
+parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
+pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
+pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
+pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
+print_screen mc0 str ps - - -B-G-* print contents of screen
+prtr_off mc4 str pf - - -B-G-* turn off printer
+prtr_on mc5 str po - - -B-G-* turn on printer
+repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
+reset_1string rs1 str r1 - - -B--- reset string
+reset_2string rs2 str r2 - - -B--- reset string
+reset_3string rs3 str r3 - - -B--- reset string
+reset_file rf str rf - - -B--- name of reset file
+restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
+row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
+save_cursor sc str sc - - YBCG- save current cursor position (P)
+scroll_forward ind str sf - - YBCGE scroll text up (P)
+scroll_reverse ri str sr - - YBCGE scroll text down (P)
+set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
+set_tab hts str st - - YB-G- set a tab in every row, current columns
+set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
+tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
+to_status_line tsl str ts - - YB-G- move to status line, column #1
+underline_char uc str uc - - YBCG- underline char and move past it
+up_half_line hu str hu - - YB-G- half a line up
+init_prog iprog str iP - - -B--- path name of program for initialization
+key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
+key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
+key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
+key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
+key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
+prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
+#
+# SVr1 capabilities stop here. IBM's version of terminfo is the same as
+# SVr4 up to this point, but has a different set afterwards.
+#
+char_padding rmp str rP - - ----- like ip but when in insert mode
+acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
+plab_norm pln str pn - - ----- program label #1 to show string #2
+key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
+enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
+exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
+enter_am_mode smam str SA - - ----- turn on automatic margins
+exit_am_mode rmam str RA - - ----- turn off automatic margins
+xon_character xonc str XN - - ----- XON character
+xoff_character xoffc str XF - - ----- XOFF character
+ena_acs enacs str eA - - ----- enable alternate char set
+label_on smln str LO - - ----- turn on soft labels
+label_off rmln str LF - - ----- turn off soft labels
+key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
+key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
+key_close kclo str @3 KEY_CLOSE 0544 ----- close key
+key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
+key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
+key_create kcrt str @6 KEY_CREATE 0547 ----- create key
+key_end kend str @7 KEY_END 0550 ----- end key
+key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
+key_exit kext str @9 KEY_EXIT 0551 ----- exit key
+key_find kfnd str @0 KEY_FIND 0552 ----- find key
+key_help khlp str %1 KEY_HELP 0553 ----- help key
+key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
+key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
+key_move kmov str %4 KEY_MOVE 0556 ----- move key
+key_next knxt str %5 KEY_NEXT 0557 ----- next key
+key_open kopn str %6 KEY_OPEN 0560 ----- open key
+key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
+key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
+key_print kprt str %9 KEY_PRINT 0532 ----- print key
+key_redo krdo str %0 KEY_REDO 0563 ----- redo key
+key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
+key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
+key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
+key_restart krst str &4 KEY_RESTART 0567 ----- restart key
+key_resume kres str &5 KEY_RESUME 0570 ----- resume key
+key_save ksav str &6 KEY_SAVE 0571 ----- save key
+key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
+key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
+key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
+key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
+key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
+key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
+key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
+key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
+key_select kslt str *6 KEY_SELECT 0601 ----- select key
+key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
+key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
+key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
+key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
+key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
+key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
+key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
+key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
+key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
+key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
+key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
+key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
+key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
+key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
+key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
+key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
+key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
+key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
+key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
+key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
+key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
+req_for_input rfi str RF - - ----- send next input char (for ptys)
+key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
+key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
+key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
+key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
+key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
+key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
+key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
+key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
+key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
+key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
+key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
+key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
+key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
+key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
+key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
+key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
+key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
+key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
+key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
+key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
+key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
+key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
+key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
+key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
+key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
+key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
+key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
+key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
+key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
+key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
+key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
+key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
+key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
+key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
+key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
+key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
+key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
+key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
+key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
+key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
+key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
+key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
+key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
+key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
+key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
+key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
+key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
+key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
+key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
+key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
+key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
+key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
+clr_bol el1 str cb - - ----- Clear to beginning of line
+clear_margins mgc str MC - - ----- clear right and left soft margins
+set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_right_margin smgr str MR - - ----- set right soft margin at current column
+label_format fln str Lf - - ----- label format
+set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
+display_clock dclk str DK - - ----- display clock
+remove_clock rmclk str RC - - ----- remove clock
+create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
+goto_window wingo str WG - - ----- go to window #1
+hangup hup str HU - - ----- hang-up phone
+dial_phone dial str DI - - ----- dial number #1
+quick_dial qdial str QD - - ----- dial number #1 without checking
+tone tone str TO - - ----- select touch tone dialing
+pulse pulse str PU - - ----- select pulse dialing
+flash_hook hook str fh - - ----- flash switch hook
+fixed_pause pause str PA - - ----- pause for 2-3 seconds
+wait_tone wait str WA - - ----- wait for dial-tone
+user0 u0 str u0 - - ----- User string #0
+user1 u1 str u1 - - ----- User string #1
+user2 u2 str u2 - - ----- User string #2
+user3 u3 str u3 - - ----- User string #3
+user4 u4 str u4 - - ----- User string #4
+user5 u5 str u5 - - ----- User string #5
+user6 u6 str u6 - - ----- User string #6
+user7 u7 str u7 - - ----- User string #7
+user8 u8 str u8 - - ----- User string #8
+user9 u9 str u9 - - ----- User string #9
+#
+# NCurses extensions for keys accessible on most PC consoles
+#
+key_sup kUP str !5 KEY_SUP + ----- shifted up-arrow key
+key_sdown kDOWN str !6 KEY_SDOWN + ----- shifted down-arrow key
+key_sbackspace kBS str !7 KEY_SBACKSPACE + ----- shifted backspace key
+key_c_delete kcdelete str !8 KEY_C_DELETE + ----- control- delete-character key
+key_c_end kcend str !9 KEY_C_END + ----- control- end key
+key_c_home kchom str !0 KEY_C_HOME + ----- control- home key
+key_c_insert kcinsert str !_ KEY_C_INSERT + ----- control- insert-character key
+key_c_left kclft str %k KEY_C_LEFT + ----- control- left-arrow key
+key_c_next kcnxt str %l KEY_C_NEXT + ----- control- next key
+key_c_previous kcprv str %m KEY_C_PREVIOUS + ----- control- previous key
+key_c_print kcprt str %n KEY_C_PRINT + ----- control- print key
+key_c_right kcrit str %o KEY_C_RIGHT + ----- control- right-arrow key
+key_c_backspace kcbs str %p KEY_C_BACKSPACE + ----- control- backspace key
+key_c_up kcup str %q KEY_C_UP + ----- control- up-arrow key
+key_c_down kcdown str %r KEY_C_DOWN + ----- control- down-arrow key
+key_a_delete kadelete str %s KEY_A_DELETE + ----- alt- delete-character key
+key_a_end kaend str %t KEY_A_END + ----- alt- end key
+key_a_home kahom str %u KEY_A_HOME + ----- alt- home key
+key_a_insert kainsert str %v KEY_A_INSERT + ----- alt- insert-character key
+key_a_left kalft str %w KEY_A_LEFT + ----- alt- left-arrow key
+key_a_next kanxt str %x KEY_A_NEXT + ----- alt- next key
+key_a_previous kaprv str %y KEY_A_PREVIOUS + ----- alt- previous key
+key_a_print kaprt str %z KEY_A_PRINT + ----- alt- print key
+key_a_right karit str %! KEY_A_RIGHT + ----- alt- right-arrow key
+key_a_backspace kabs str %@ KEY_A_BACKSPACE + ----- alt- backspace key
+key_a_up kaup str %# KEY_A_UP + ----- alt- up-arrow key
+key_a_down kadown str %$ KEY_A_DOWN + ----- alt- down-arrow key
+key_a_a kaa str $a KEY_A_A + ----- alt- a key
+key_a_b kab str $b KEY_A_B + ----- alt- b key
+key_a_c kac str $c KEY_A_C + ----- alt- c key
+key_a_d kad str $d KEY_A_D + ----- alt- d key
+key_a_e kae str $e KEY_A_E + ----- alt- e key
+key_a_f kaf str $f KEY_A_F + ----- alt- f key
+key_a_g kag str $g KEY_A_G + ----- alt- g key
+key_a_h kah str $h KEY_A_H + ----- alt- h key
+key_a_i kai str $i KEY_A_I + ----- alt- i key
+key_a_j kaj str $j KEY_A_J + ----- alt- j key
+key_a_k kak str $k KEY_A_K + ----- alt- k key
+key_a_l kal str $l KEY_A_L + ----- alt- l key
+key_a_m kam str $m KEY_A_M + ----- alt- m key
+key_a_n kan str $n KEY_A_N + ----- alt- n key
+key_a_o kao str $o KEY_A_O + ----- alt- o key
+key_a_p kap str $p KEY_A_P + ----- alt- p key
+key_a_q kaq str $q KEY_A_Q + ----- alt- q key
+key_a_r kar str $r KEY_A_R + ----- alt- r key
+key_a_s kas str $s KEY_A_S + ----- alt- s key
+key_a_t kat str $t KEY_A_T + ----- alt- t key
+key_a_u kau str $u KEY_A_U + ----- alt- u key
+key_a_v kav str $v KEY_A_V + ----- alt- v key
+key_a_w kaw str $w KEY_A_W + ----- alt- w key
+key_a_x kax str $x KEY_A_X + ----- alt- x key
+key_a_y kay str $y KEY_A_Y + ----- alt- y key
+key_a_z kaz str $z KEY_A_Z + ----- alt- z key
+key_a_0 ka_0 str $0 KEY_A_0 + ----- alt- 0 key
+key_a_1 ka_1 str $1 KEY_A_1 + ----- alt- 1 key
+key_a_2 ka_2 str $2 KEY_A_2 + ----- alt- 2 key
+key_a_3 ka_3 str $3 KEY_A_3 + ----- alt- 3 key
+key_a_4 ka_4 str $4 KEY_A_4 + ----- alt- 4 key
+key_a_5 ka_5 str $5 KEY_A_5 + ----- alt- 5 key
+key_a_6 ka_6 str $6 KEY_A_6 + ----- alt- 6 key
+key_a_7 ka_7 str $7 KEY_A_7 + ----- alt- 7 key
+key_a_8 ka_8 str $8 KEY_A_8 + ----- alt- 8 key
+key_a_9 ka_9 str $9 KEY_A_9 + ----- alt- 9 key
+key_a_backtick ka_bt str $` KEY_A_BACKTICK + ----- alt- ` key
+key_a_under ka_und str $_ KEY_A_UNDER + ----- alt- _ key
+key_a_equals ka_eq str $= KEY_A_EQUALS + ----- alt- = key
+key_a_bar ka_bsl str $| KEY_A_BAR + ----- alt- | key
+key_a_lbracker ka_lbr str $[ KEY_A_LBRACKER + ----- alt- [ key
+key_a_rbracker ka_rbr str $] KEY_A_RBRACKER + ----- alt- ] key
+key_a_semi ka_semi str $; KEY_A_SEMI + ----- alt- ; key
+key_a_tick ka_tick str $' KEY_A_TICK + ----- alt- ' key
+key_a_comma ka_com str $, KEY_A_COMMA + ----- alt- , key
+key_a_dot ka_dot str $. KEY_A_DOT + ----- alt- . key
+key_a_question ka_sla str $? KEY_A_QUESTION + ----- alt- ? key
+key_a_divide ka_div str $/ KEY_A_DIVIDE + ----- alt- keypad / key
+key_a_multiply ka_mul str $* KEY_A_MULTIPLY + ----- alt- keypad * key
+key_a_add ka_add str $+ KEY_A_ADD + ----- alt- keypad + key
+key_a_subtract ka_sub str $- KEY_A_SUBTRACT + ----- alt- keypad - key
+key_a_kenter ka_kent str $< KEY_A_KENTER + ----- alt- keypad enter key
+key_a_enter ka_ent str $> KEY_A_ENTER + ----- alt- enter key
+key_c_at kcat str %% KEY_C_AT + ----- control- @ key
+key_c_divide kcdiv str %/ KEY_C_DIVIDE + ----- control- keypad / key
+key_c_multiply kcmul str %* KEY_C_MULTIPLY + ----- control- keypad * key
+key_c_add kcadd str %+ KEY_C_ADD + ----- control- keypad + key
+key_c_subtract kcsub str %- KEY_C_SUBTRACT + ----- control- keypad - key
+#
+# SVr4 added these capabilities to support color
+#
+orig_pair op str op - - ----- Set default pair to its original value
+orig_colors oc str oc - - ----- Set all color pairs to the original ones
+initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
+initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
+set_color_pair scp str sp - - ----- Set current color pair to #1
+set_foreground setf str Sf - - ----- Set foreground color #1
+set_background setb str Sb - - ----- Set background color #1
+#
+# SVr4 added these capabilities to support printers
+#
+change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
+change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
+change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
+change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
+define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
+enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
+enter_italics_mode sitm str ZH - - ----- Enter italic mode
+enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
+enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
+enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
+enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
+enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
+enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
+enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
+enter_upward_mode sum str ZP - - ----- Start upward carriage motion
+exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
+exit_italics_mode ritm str ZR - - ----- End italic mode
+exit_leftward_mode rlm str ZS - - ----- End left-motion mode
+exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
+exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
+exit_subscript_mode rsubm str ZV - - ----- End subscript mode
+exit_superscript_mode rsupm str ZW - - ----- End superscript mode
+exit_upward_mode rum str ZX - - ----- End reverse character motion
+micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
+micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
+micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
+micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
+micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
+micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
+order_of_pins porder str Ze - - ----- Match software bits to print-head pins
+parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
+parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
+parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
+parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
+select_char_set scs str Zj - - ----- Select character set, #1
+set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
+set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
+set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
+set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
+set_top_margin smgt str Zo - - ----- Set top margin at current line
+set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
+start_bit_image sbim str Zq - - ----- Start printing bit image graphics
+start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
+stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
+stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
+subscript_characters subcs str Zu - - ----- List of subscriptable characters
+superscript_characters supcs str Zv - - ----- List of superscriptable characters
+these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
+zero_motion zerom str Zx - - ----- No motion for subsequent character
+#%.TE
+#%.ad
+#%
+#%The following string capabilities are present in the SVr4.0 term structure,
+#%but were originally not documented in the man page.
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw18.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
+key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
+mouse_info minfo str Mi - - ----- Mouse status information
+req_mouse_pos reqmp str RQ - - ----- Request mouse position
+get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
+set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
+set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
+pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
+device_type devt str dv - - ----- Indicate language/codeset support
+code_set_init csin str ci - - ----- Init sequence for multiple codesets
+set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
+set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
+set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
+set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
+set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
+set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
+bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
+bit_image_newline binel str Zz - - ----- Move to next row of the bit image
+bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
+color_names colornm str Yw - - ----- Give name for color #1
+define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+end_bit_image_region endbi str Yy - - ----- End a bit-image region
+set_color_band setcolor str Yz - - ----- Change to ribbon color #1
+set_page_length slines str YZ - - ----- Set page length to #1 lines
+#
+# SVr4 added these capabilities for direct PC-clone support
+#
+display_pc_char dispc str S1 - - ----- Display PC character #1
+enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
+exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
+enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
+exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
+pc_term_options pctrm str S6 - - ----- PC terminal options
+scancode_escape scesc str S7 - - ----- Escape for scancode emulation
+alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
+#%.TE
+#%.ad
+#%
+#%.in .8i
+#%The XSI Curses standard added these. They are some post-4.1
+#%versions of System V curses, e.g., Solaris 2.5 and IRIX 6.x.
+#%The \fBncurses\fR termcap names for them are invented; according to the
+#%XSI Curses standard, they have no termcap names. If your compiled terminfo
+#%entries use these, they may not be binary-compatible with System V terminfo
+#%entries after SVr4.1; beware!
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
+enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
+enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
+enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
+enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
+enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
+set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
+set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+#%.TE
+#%.ad
+#
+# The magic token below tells the tic compiler-generator code that all the caps
+# past it should be ignored (not written out) when dumping terminfo objects. It
+# also tells the man page table generator not to pass through following lines
+# This means we can have obsolete capabilities and pseudo-capabilities that are
+# recognized for termcap or terminfo compilation, but not output.
+#
+# %%-STOP-HERE-%%
+#
+# Don't move this casually! In fact, don't move it at all unless you're
+# either doing it to add System V or XPG4 extensions, or have decided you
+# don't care about SVr4 binary compatibility.
+#
+#############################################################################
+#
+# TERMCAP EXTENSION CAPABILITIES
+#
+# The capabilities below are either obsolete or extensions on certain systems.
+# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
+# termcap sources; the rest are listed for completeness, and in case somebody
+# cares about them enough to hack in code that will translate them into
+# terminfo capabilities.
+#
+# The first part of the list is from Ross Ridge's `mytinfo' package
+# (comp.sources.unix, volume 26); the variable names and terminfo names (as
+# well as the termcap codes) match his list.
+#
+# This group of codes is not marked obsolete in 4.4BSD, but have no direct
+# terminfo equivalents. The rs capability is specially translated to terminfo
+# r2, and vice versa, if an entry does not already have an r2. Similarly,
+# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
+# The ug capability is thrown away, but assumed to be whatever sg is if the
+# latter is nonzero and we're dumping in termcap format.
+#
+termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
+termcap_reset OTrs str rs - - YB-G- terminal reset string
+magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
+#
+# Obsolete termcap capabilities. Some are used for termcap translation. The
+# code uses the 'OT' prefix we put on obsolete capabilities to suppress
+# printing them in terminfo source dumps of compiled entries.
+#
+backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
+crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
+no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
+carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
+new_line_delay OTdN num dN - - YB-G- pad needed for LF
+linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
+backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
+#
+# GNU termcap library extensions. The GNU termcap file distributed with
+# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
+# BSD termcap file. The name clash with terminfo MT is resolved by type
+# info; MT is converted to km.
+#
+gnu_has_meta_key OTMT bool MT - - ----E has meta key
+# gnu_tab_width OTtw num tw - - ----E tab width in spaces
+#
+# GNU termcap *does* include the following extended capability, Only the
+# now-obsolete Ann Arbor terminals used it.
+#
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+#
+# The following comments describe capnames so ancient that I believe no
+# software uses them any longer. Some of these have to go because they
+# clash with terminfo names in ways that cannot be resolved by type
+# information.
+#
+# These mytinfo codes are not used in the 4.4BSD curses code. They are
+# marked obsolete in the 4.4BSD manual pages.
+#
+# There is one conflict with terminfo; ma is in both. This conflict is
+# resolved by type information.
+#
+# The `ko' capability is translated by special code. It should contain a
+# comma-separated list of capabilities for which there are corresponding keys.
+# The `kn' code is accepted but ignored.
+#
+# The `ma' capability seems to have been designed to map between the rogue(2)
+# motion keys (including jkhl) and characters emitted by arrow keys on some
+# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+#
+# Here is a description of memory_lock_above and memory_unlock:
+# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
+# text. All lines above the cursor's current line become locked in place on
+# the screen. Then enter data normally. When the screen fills up, any
+# further data entered forces the first line of unfrozen line text to scroll
+# under the frozen data. Lines scrolled off the screen are inserted into
+# memory immediately preceding the first frozen line." (from the HP 700/96
+# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
+#
+# Applications that use terminfo are supposed to behave as though xr is
+# always true.
+#
+linefeed_is_newline OTNL bool NL - - YB--- move down with \n
+# even_parity OTEP bool EP - - -B--- terminal requires even parity
+# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
+# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
+# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
+# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
+backspace_delay OTdB num dB - - YB-G- padding required for ^H
+# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
+horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
+# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
+number_of_function_keys OTkn num kn - - -B-G- count of function keys
+other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
+arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
+# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
+has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
+return_does_clr_eol OTxr bool xr - - YB--- return clears the line
+# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
+#
+# mytinfo described this as a termcap capability, but it's not listed in the
+# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
+# package, like System V, behaves as though it is always true.
+#
+# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top line
+#
+# University of Waterloo termcap extensions (as described in mytinfo).
+# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
+# be resolved by a type check. The descriptions are guesses from what was
+# in the mytinfo tables.
+#
+# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
+# key_kill_char OTkk str kk - - ----- string set by kill key (?)
+# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
+# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
+# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
+#
+# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
+# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
+# check.
+#
+# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
+# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
+# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
+# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
+#
+# The mytinfo capabilities end here.
+#
+# XENIX extensions:
+#
+# Xenix defined its own set of forms-drawing capabilities:
+#
+# cap IBM ASCII description ACS ASCII
+# --- ----------- -------------------- ------------- ------
+# G1 191 \277 M-? single upper right ACS_URCORNER
+# G2 218 \332 M-Z single upper left ACS_ULCORNER
+# G3 192 \300 M-@ single lower left ACS_LLCORNER
+# G4 217 \331 M-Y single lower right ACS_LRCORNER
+# G5 187 \273 M-; double upper right
+# G6 201 \311 M-I double upper left
+# G7 200 \310 M-H double lower left
+# G8 188 \274 M-< double lower right
+# GC 197 \305 M-E single intersection ACS_PLUS _ _
+# GD 194 \302 M-B single down-tick ACS_TTEE |
+# GH 196 \304 M-D single horizontal line ACS_HLINE
+# GL 180 \264 M-4 single left tick ACS_RTEE -|
+# GR 195 \303 M-C single right tick ACS_LTEE |-
+# GU 193 \301 M-A single up tick ACS_BTEE _|_
+# GV 179 \263 M-3 single vertical line ACS_VLINE
+# Gc 206 \316 M-N double intersection
+# Gd 203 \313 M-K double down tick
+# Gh 205 \315 M-M double horizontal line
+# Gl 204 \204 M-L double left tick
+# Gr 185 \271 M-9 double right tick
+# Gu 202 \312 M-J double up tick
+# Gv 186 \272 M-: double vertical line
+#
+# The compiler will translate the single-line caps and discard the others
+# (via IGNORE aliases further down). We don't want to do normal pad
+# translation on these, they're often single-character printable ASCII
+# strings that happen to be numerics. There's awk code in parametrized.sh
+# that detects the acs_ prefix and uses it to suppress pad translation.
+# These terminfo names are invented.
+#
+acs_ulcorner OTG2 str G2 - - ----- single upper left
+acs_llcorner OTG3 str G3 - - ----- single lower left
+acs_urcorner OTG1 str G1 - - ----- single upper right
+acs_lrcorner OTG4 str G4 - - ----- single lower right
+acs_ltee OTGR str GR - - ----- tee pointing right
+acs_rtee OTGL str GL - - ----- tee pointing left
+acs_btee OTGU str GU - - ----- tee pointing up
+acs_ttee OTGD str GD - - ----- tee pointing down
+acs_hline OTGH str GH - - ----- single horizontal line
+acs_vline OTGV str GV - - ----- single vertical line
+acs_plus OTGC str GC - - ----- single intersection
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is almost all comments. What it's mainly for is to describe
+# what capabilities need to be squeezed out to get down to the XSI Curses
+# standard set. They are flagged with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+memory_lock meml str ml - - ----K memory lock above
+memory_unlock memu str mu - - ----K memory unlock
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+box_chars_1 box1 str bx - - ----K box characters primary set
+#box_chars_2 box2 str by - - ----K box characters secondary set
+#box_attr_1 batt1 str Bx - - ----K attributes for box1
+#box_attr_2 batt2 str By - - ----K attributes for box2
+#color_bg_0 colb0 str d0 - - ----K background color 0
+#color_bg_1 colb1 str d1 - - ----K background color 1
+#color_bg_2 colb2 str d2 - - ----K background color 2
+#color_bg_3 colb3 str d3 - - ----K background color 3
+#color_bg_4 colb4 str d4 - - ----K background color 4
+#color_bg_5 colb5 str d5 - - ----K background color 5
+#color_bg_6 colb6 str d6 - - ----K background color 6
+#color_bg_7 colb7 str d7 - - ----K background color 7
+#color_fg_0 colf0 str c0 - - ----K foreground color 0
+#color_fg_1 colf1 str c1 - - ----K foreground color 1
+#color_fg_2 colf2 str c2 - - ----K foreground color 2
+#color_fg_3 colf3 str c3 - - ----K foreground color 3
+#color_fg_4 colf4 str c4 - - ----K foreground color 4
+#color_fg_5 colf5 str c5 - - ----K foreground color 5
+#color_fg_6 colf6 str c6 - - ----K foreground color 6
+#color_fg_7 colf7 str c7 - - ----K foreground color 7
+#font_0 font0 str f0 - - ----- select font 0
+#font_1 font1 str f1 - - ----- select font 1
+#font_2 font2 str f2 - - ----- select font 2
+#font_3 font3 str f3 - - ----- select font 3
+#font_4 font4 str f4 - - ----K select font 4
+#font_5 font5 str f5 - - ----K select font 5
+#font_6 font6 str f6 - - ----K select font 6
+#font_7 font7 str f7 - - ----K select font 7
+#key_back_tab kbtab str k0 - - ----- backtab key
+#key_do kdo str ki - - ----K do request key
+#key_command kcmd str kd - - ----K command-request key
+#key_command_pane kcpn str kW - - ----K command-pane key
+#key_end kend str kw - - ----- end key
+#key_help khlp str kq - - ----- help key
+#key_newline knl str nl - - ----K newline key
+#key_next_pane knpn str kv - - ----K next-pane key
+#key_prev_cmd kppn str kp - - ----K previous-command key
+#key_prev_pane kppn str kV - - ----K previous-pane key
+#key_quit kquit str kQ - - ----K quit key
+#key_select ksel str kU - - ----- select key
+#key_scroll_left kscl str kz - - ----K scroll left
+#key_scroll_right kscr str kZ - - ----K scroll right
+#key_tab ktab str ko - - ----K tab key
+#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+#appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
+# the IBM manual pages, so the cap name strings are guesses. The terminfo
+# names are almost certainly right, the termcap ones almost certainly wrong.
+#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
+#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
+#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
+#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
+#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
+#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
+#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
+#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
+# Undocumented capabilities end here
+#key_sf1 ksf1 str S1 - - ----K special function key 1
+#key_sf2 ksf2 str S2 - - ----K special function key 2
+#key_sf3 ksf3 str S3 - - ----K special function key 3
+#key_sf4 ksf4 str S4 - - ----K special function key 4
+#key_sf5 ksf5 str S5 - - ----K special function key 5
+#key_sf6 ksf6 str S6 - - ----K special function key 6
+#key_sf7 ksf7 str S7 - - ----K special function key 7
+#key_sf8 ksf8 str S8 - - ----K special function key 8
+#key_sf9 ksf9 str S9 - - ----K special function key 9
+#key_sf10 ksf10 str SA - - ----K special function key 10
+# AIX version 3 documents different codes for F11, F12 and does not mention
+# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
+#key_f11 kf11 str k< - - ----- function key 11
+#key_f12 kf12 str k> - - ----- function key 12
+# Undocumented capabilities end here.
+#key_action kact str kJ - - ----K sent by action key
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+#enter_topline_mode topl str tp - - ----K start top-line mode
+#enter_bottom_mode btml str bm - - ----K start bottom-line mode
+#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+#
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# case-fold-search:nil
+# truncate-lines:t
+# End:
diff --git a/Build/source/libs/ncurses/include/Caps.osf1r5 b/Build/source/libs/ncurses/include/Caps.osf1r5
new file mode 100644
index 00000000000..958461ae252
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Caps.osf1r5
@@ -0,0 +1,1274 @@
+##############################################################################
+# Copyright (c) 2002 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas Dickey
+#
+# $Id: Caps.osf1r5,v 1.3 2002/07/07 00:02:52 tom Exp $
+#
+# This is an adaptation of ncurses' termcap/terminfo capability table, which
+# is designed to align with OSF/1 version 5 (Tru64) terminfo.
+#
+# This table is used to generate initializers for tables that drive tic,
+# infocmp, and the library compilation code used to support the termcap
+# compatibility hack. It is also used to generate the tabular portion of the
+# terminfo(5) man page; lines beginning with `#%' are passed through to become
+# the terminfo table.
+#
+# This file has three major sections; a standard-capabilities table, two
+# extension-capability tables, and a section of aliases declarations.
+# The first two have the same format, as follows:
+#
+# FILE FORMAT
+#
+# Column 1: terminfo variable name
+# Column 2: terminfo capability name
+# Column 3: capability type (boolean, numeric, or string)
+# Column 4: termcap capability name
+# Column 5: KEY_xxx name, if any, `-' otherwise
+# Column 6: value for KEY_xxx name, if any, `-' otherwise
+# Column 7: Lead with `Y' if capability should be emitted in termcap
+# translations, `-' otherwise
+# Column 8: capability description
+#
+# The codes following [Y-] in column 7 describe the versions of termcap which
+# use the given capability. This information is not used by the curses library
+# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# termcap entry translations that are more than 1023 bytes long (and tank a
+# lot of old termcap-using programs). The codes read as follows:
+# B = mentioned in the BSD man page for 4.4BSD curses
+# C = used by the 4.4BSD curses library
+# G = mentioned in the documentation for GNU termcap
+# E = used by GNU Emacs
+# K = remove this terminfo capability when translating to standard format
+# The important codes are C and E. A cap with C or E should be preserved in
+# translation if possible. The problem is that preserving all such caps may
+# lead to some termcap translations being too long. The termcap maintainer
+# has a bit of a juggling act to do...potential problem cases are marked with
+# an asterisk (*).
+#
+# The aliases section has the following format:
+#
+# Column 1: either `capalias' or `infoalias'
+# Column 2: name to be aliased
+# Column 3: what name it should translate to. The name IGNORE means it
+# should be discarded with a warning message.
+# Column 4: name of the extension set (used for compiler warning messages)
+# Column 5: capability description (usually an associated terminfo variable)
+#
+# HANDLING TERMCAP AND TERMINFO EXTENSIONS
+#
+# There are basically five different ways to handle termcap and terminfo
+# extensions:
+#
+# 1. Don't list the capname here, or list it but comment it out (the latter
+# is preferable; someone might want to handle it in the future). If you do
+# this, the capability will be treated as unknown and raise a warning from
+# the compiler.
+#
+# 2. Alias it. This is appropriate if the capability has the same meaning
+# as an already-supported one. The compiler will handle aliasing, emitting
+# an appropriate informational message whenever an alias fires.
+#
+# 3. List it in the standard table. You almost certainly do *not* want
+# to do this -- the capabilities in that one, and their order, have been
+# carefully chosen to be SVr4-binary-compatible when they're written out
+# as a terminfo object, and breaking this would be bad. It's up the ncurses
+# library what to do with the terminfo data after it's read in.
+#
+# 4. List it in the aliases table with an IGNORE target field. If you
+# do this, the capability will be ignored on input (though the user will
+# get a warning message about it).
+#
+# 5. List it in the extensions table. If you do this, the compiler will
+# silently accept the capability, but the curses library proper will never
+# see it (because it won't be written out as part of the terminfo object
+# format). It's up to you what you have the compiler do with it.
+#
+# There are two opposite reasons to choose option 5. One is when you want
+# to eat the capability silently and discard it when doing translations
+# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
+# in this class. Nothing will ever use them again.
+#
+# More usually, you want the compiler to try to deduce something from the
+# capability value that it can use to translate it into your output format.
+# You'll need to write custom code, probably in postprocess_termcap() or
+# postprocess_terminfo(), to handle the translation.
+#
+# CONTROLLING ENTRY LENGTH
+#
+# Notes on specific elisions made to fit translations within 1023 bytes:
+#
+# Machines with IBM PC-like keyboards want to be able to define the following
+# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
+# only environments for End or Home-Down), key_dc, and key_ic. This is also
+# the set of keys the `joe' editor will be upset if it can't see. So don't
+# trim those out of the set to be translated to termcap, or various users of
+# the termcap file will become irate.
+#
+# It might look tempting to leave those long init strings out of translations.
+# We can't do it (yet); 4.4BSD tput and tset use them.
+#
+# We retain the sgr capability in translation in spite of the fact that neither
+# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
+# hard to understand without it, and (b) the entries in which it is long tend
+# to be older types that don't use up a lot of string space on function keys.
+# The tic(1) translation code will complain and elide it if it makes a critical
+# difference (there is special code in tic to recognize this situation).
+#
+# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
+# optimizer in BSD curses didn't use them. This omission seems to be the
+# single most effective one, it shortened the resolved length of all thirteen
+# problem entries in the 9.9.0 version of the terminfo master below critical.
+#
+# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
+# translations go back over critical if we do this. As 4.4BSD curses fades
+# into history and GNU termcap's application base shrinks towards being GNU
+# Emacs only, we'll probably elide out some BSD-only capabilities in order
+# to buy space for non-essentials Emacs is still using. Capabilities high
+# on that hit list: rc, sc, uc.
+#
+#############################################################################
+#
+# STANDARD 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 \fBvariable\fR is the name by which the programmer (at the terminfo level)
+#%accesses the capability.
+#%
+#%The \fBcapname\fR is the short name used in the text of the database,
+#%and is used by a person updating the database.
+#%Whenever possible, capnames are chosen to be the same as or similar to
+#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
+#%identical or very similar names). Semantics are also intended to match
+#%those of the specification.
+#%
+#%The termcap code is the old
+#%.B termcap
+#%capability name (some capabilities are new, and have names which termcap
+#%did not originate).
+#%.P
+#%Capability names have no hard length limit, but an informal limit of 5
+#%characters has been adopted to keep them short and to allow the tabs in
+#%the source file
+#%.B Caps
+#%to line up nicely.
+#%
+#%Finally, the description field attempts to convey the semantics of the
+#%capability. You may find some codes in the description field:
+#%.TP
+#%(P)
+#%indicates that padding may be specified
+#%.TP
+#%#[1-9]
+#%in the description field indicates that the string is passed through tparm with
+#%parms as given (#\fIi\fP).
+#%.TP
+#%(P*)
+#%indicates that padding may vary in proportion to the number of
+#%lines affected
+#%.TP
+#%(#\d\fIi\fP\u)
+#%indicates the \fIi\fP\uth\d parameter.
+#%
+#%.PP
+#% These are the boolean capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBBooleans name Code\fR
+auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
+auto_right_margin am bool am - - YBCGE terminal has automatic margins
+no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
+ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
+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 (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
+memory_below db bool db - - YB-GE display may be retained below the screen
+move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
+move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
+over_strike os bool os - - YBCG- terminal can overstrike
+status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
+dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
+tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+transparent_underline ul bool ul - - YBCGE underline character overstrikes
+xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
+back_color_erase bce bool ut - - ----- screen erased with background color
+can_change ccc bool cc - - ----- terminal can re-define existing colors
+col_addr_glitch xhpa bool YA - - ----- only positive motion for hpa/mhpa caps
+cpi_changes_res cpix bool YF - - ----- changing character pitch changes resolution
+cr_cancels_micro_mode crxm bool YB - - ----- using cr turns off micro mode
+hard_cursor chts bool HC - - ----- cursor is hard to see
+has_print_wheel daisy bool YC - - ----- printer needs operator to change character set
+hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
+lpi_changes_res lpix bool YG - - ----- changing line pitch changes resolution
+needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
+non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
+non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
+no_pad_char npc bool NP - - ----- pad character does not exist
+prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
+row_addr_glitch xvpa bool YD - - ----- only positive motion for vpa/mvpa caps
+semi_auto_right_margin sam bool YE - - ----- printing in last column causes cr
+#%.TE
+#%.ad
+#%
+#%These are the numeric capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+columns cols num co - - YBCGE number of columns in a line
+init_tabs it num it - - YB-G- tabs initially every # spaces
+lines lines num li - - YBCGE number of lines on screen or page
+lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
+magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
+padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
+virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
+width_status_line wsl num ws - - YB-G- number of columns in status line
+bit_image_entwining bitwin num Yo - - ----- number of passes for each bit-image row
+bit_image_type bitype num Yp - - ----- type of bit-image device
+buffer_capacity bufsz num Ya - - ----- numbers of bytes buffered before printing
+buttons btns num BT - - ----- number of buttons on mouse
+dot_vert_spacing spinv num Yb - - ----- spacing of pins vertically in pins per inch
+dot_horz_spacing spinh num Yc - - ----- spacing of dots horizontally in dots per inch
+label_height lh num lh - - ----- rows in each label
+label_width lw num lw - - ----- columns in each label
+max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
+max_colors colors num Co - - ----- maximum number of colors on screen
+max_micro_address maddr num Yd - - ----- maximum value in micro_..._address
+max_micro_jump mjump num Ye - - ----- maximum value in parm_..._micro
+max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
+maximum_windows wnum num MW - - ----- maximum number of defineable windows
+micro_col_size mcs num Yf - - ----- character step size when in micro mode
+micro_line_size mls num Yg - - ----- line step size when in micro mode
+no_color_video ncv num NC - - ----- video attributes that can not be used with colors
+number_of_pins npins num Yh - - ----- numbers of pins in print-head
+num_labels nlab num Nl - - ----- number of labels on screen
+output_res_char orc num Yi - - ----- horizontal resolution in units per line
+output_res_line orl num Yj - - ----- vertical resolution in units per line
+output_res_horz_inch orhi num Yk - - ----- horizontal resolution in units per inch
+output_res_vert_inch orvi num Yl - - ----- vertical resolution in units per inch
+print_rate cps num Ym - - ----- print rate in characters per second
+wide_char_size widcs num Yn - - ----- character step size when in double wide mode
+#%.TE
+#%.ad
+#%
+#%These are the string capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+back_tab cbt str bt - - YBCGE back tab (P)
+bell bel str bl - - YB-GE audible signal (bell) (P)
+carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
+change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
+clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
+clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
+clr_eol el str ce - - YBCGE clear to end of line (P)
+clr_eos ed str cd - - YBCGE clear to end of screen (P*)
+column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
+command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
+cursor_address cup str cm - - YBCGE move to row #1 columns #2
+cursor_down cud1 str do - - YBCGE down one line
+cursor_home home str ho - - YBCGE home cursor (if no cup)
+cursor_invisible civis str vi - - YB-G- make cursor invisible
+cursor_left cub1 str le - - YBCGE move left one space
+cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
+cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
+cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
+cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
+cursor_up cuu1 str up - - YBCGE up one line
+cursor_visible cvvis str vs - - YBCGE make cursor very visible
+delete_character dch1 str dc - - YBCGE delete character (P*)
+delete_line dl1 str dl - - YBCGE delete line (P*)
+dis_status_line dsl str ds - - YB-G- disable status line
+down_half_line hd str hd - - YB-G- half a line down
+enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
+enter_blink_mode blink str mb - - YB-G- turn on blinking
+enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
+enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
+enter_delete_mode smdc str dm - - YBCGE enter delete mode
+enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
+enter_insert_mode smir str im - - YBCGE enter insert mode
+enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
+enter_protected_mode prot str mp - - -B-G-* turn on protected mode
+enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
+enter_standout_mode smso str so - - YBCGE begin standout mode
+enter_underline_mode smul str us - - YBCGE begin underline mode
+erase_chars ech str ec - - YB-G- erase #1 characters (P)
+exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
+exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
+exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
+exit_delete_mode rmdc str ed - - YBCGE end delete mode
+exit_insert_mode rmir str ei - - YBCGE exit insert mode
+exit_standout_mode rmso str se - - YBCGE exit standout mode
+exit_underline_mode rmul str ue - - YBCGE exit underline mode
+flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
+form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
+from_status_line fsl str fs - - YB-G- return from status line
+init_1string is1 str i1 - - YB-G- initialization string
+init_2string is2 str is - - YB-G- initialization string
+init_3string is3 str i3 - - YB-G- initialization string
+init_file if str if - - YB-G- name of initialization file
+insert_character ich1 str ic - - YBCGE insert character (P)
+insert_line il1 str al - - YBCGE insert line (P*)
+insert_padding ip str ip - - YBCGE insert padding after inserted character
+key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
+key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
+key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
+key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
+key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
+key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
+key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
+key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
+key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
+key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
+key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
+key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
+key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
+key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
+key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
+key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
+key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
+key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
+key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
+key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
+key_home khome str kh KEY_HOME 0406 YBCGE home key
+key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
+key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
+key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
+key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
+key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
+key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
+key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
+key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
+key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
+key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
+key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
+keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
+keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
+lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
+lab_f10 lf10 str la - - ----- label on function key f10 if not f10
+lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
+lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
+lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
+lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
+lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
+lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
+lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
+lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
+meta_off rmm str mo - - YB-G-* turn off meta mode
+meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
+newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
+pad_char pad str pc - - YBCGE padding char (instead of null)
+parm_dch dch str DC - - YB-GE delete #1 characters (P*)
+parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
+parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
+parm_ich ich str IC - - YB-GE insert #1 characters (P*)
+parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
+parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
+parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
+parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
+parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
+parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
+pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
+pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
+pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
+print_screen mc0 str ps - - -B-G-* print contents of screen
+prtr_off mc4 str pf - - -B-G-* turn off printer
+prtr_on mc5 str po - - -B-G-* turn on printer
+repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
+reset_1string rs1 str r1 - - -B--- reset string
+reset_2string rs2 str r2 - - -B--- reset string
+reset_3string rs3 str r3 - - -B--- reset string
+reset_file rf str rf - - -B--- name of reset file
+restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
+row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
+save_cursor sc str sc - - YBCG- save current cursor position (P)
+scroll_forward ind str sf - - YBCGE scroll text up (P)
+scroll_reverse ri str sr - - YBCGE scroll text down (P)
+set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
+set_tab hts str st - - YB-G- set a tab in every row, current columns
+set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
+tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
+to_status_line tsl str ts - - YB-G- move to status line, column #1
+underline_char uc str uc - - YBCG- underline char and move past it
+up_half_line hu str hu - - YB-G- half a line up
+init_prog iprog str iP - - -B--- path name of program for initialization
+key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
+key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
+key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
+key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
+key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
+prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
+#
+# SVr1 capabilities stop here. IBM's version of terminfo is the same as
+# SVr4 up to this point, but has a different set afterwards.
+#
+# OSF1 differences start here, based on IBM version:
+#
+box_chars_1 box1 str bx - - ----K box characters primary set
+box_chars_2 box2 str by - - ----K box characters secondary set
+box_attr_1 batt1 str Bx - - ----K attributes for box1
+box_attr_2 batt2 str By - - ----K attributes for box2
+color_bg_0 colb0 str d0 - - ----K background color 0
+color_bg_1 colb1 str d1 - - ----K background color 1
+color_bg_2 colb2 str d2 - - ----K background color 2
+color_bg_3 colb3 str d3 - - ----K background color 3
+color_bg_4 colb4 str d4 - - ----K background color 4
+color_bg_5 colb5 str d5 - - ----K background color 5
+color_bg_6 colb6 str d6 - - ----K background color 6
+color_bg_7 colb7 str d7 - - ----K background color 7
+color_fg_0 colf0 str c0 - - ----K foreground color 0
+color_fg_1 colf1 str c1 - - ----K foreground color 1
+color_fg_2 colf2 str c2 - - ----K foreground color 2
+color_fg_3 colf3 str c3 - - ----K foreground color 3
+color_fg_4 colf4 str c4 - - ----K foreground color 4
+color_fg_5 colf5 str c5 - - ----K foreground color 5
+color_fg_6 colf6 str c6 - - ----K foreground color 6
+color_fg_7 colf7 str c7 - - ----K foreground color 7
+font_0 font0 str f0 - - ----- select font 0
+font_1 font1 str f1 - - ----- select font 1
+font_2 font2 str f2 - - ----- select font 2
+font_3 font3 str f3 - - ----- select font 3
+font_4 font4 str f4 - - ----K select font 4
+font_5 font5 str f5 - - ----K select font 5
+font_6 font6 str f6 - - ----K select font 6
+font_7 font7 str f7 - - ----K select font 7
+key_back_tab kbtab str k0 - - ----- backtab key
+key_do kdo str ki - - ----K do request key
+key_command kcmd str kc KEY_COMMAND 0545 ----- command key
+key_command_pane kcpn str kW - - ----K command-pane key
+key_end kend str @7 KEY_END 0550 ----- end key
+key_help khlp str %1 KEY_HELP 0553 ----- help key
+key_newline knl str nl - - ----K newline key
+key_next_pane knpn str kv - - ----K next-pane key
+key_prev_cmd kppn str kp - - ----K previous-command key
+key_prev_pane kppn str kV - - ----K previous-pane key
+key_quit kquit str kQ - - ----K quit key
+key_select kslt str *6 KEY_SELECT 0601 ----- select key
+key_scroll_left kscl str kz - - ----K scroll left
+key_scroll_right kscr str kZ - - ----K scroll right
+key_tab ktab str ko - - ----K tab key
+key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities are described in
+# the Tru64 manual pages.
+key_smap_in6 kmpf6 str Kr - - ----K special mapped key 6 input
+key_smap_out6 kmpt6 str KR - - ----K special mapped key 6 output
+key_smap_in7 kmpf7 str Ks - - ----K special mapped key 7 input
+key_smap_out7 kmpt7 str KS - - ----K special mapped key 7 output
+key_smap_in8 kmpf8 str Kt - - ----K special mapped key 8 input
+key_smap_out8 kmpt8 str KT - - ----K special mapped key 8 output
+key_smap_in9 kmpf9 str Ku - - ----K special mapped key 9 input
+key_smap_out9 kmpt9 str KU - - ----K special mapped key 9 output
+key_sf1 ksf1 str S1 - - ----K special function key 1
+key_sf2 ksf2 str S2 - - ----K special function key 2
+key_sf3 ksf3 str S3 - - ----K special function key 3
+key_sf4 ksf4 str S4 - - ----K special function key 4
+key_sf5 ksf5 str S5 - - ----K special function key 5
+key_sf6 ksf6 str S6 - - ----K special function key 6
+key_sf7 ksf7 str S7 - - ----K special function key 7
+key_sf8 ksf8 str S8 - - ----K special function key 8
+key_sf9 ksf9 str S9 - - ----K special function key 9
+key_sf10 ksf10 str SA - - ----K special function key 10
+#
+key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
+key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
+key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
+key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
+key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
+key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
+key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
+key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
+key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
+key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
+key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
+key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
+key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
+key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
+key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
+key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
+key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
+key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
+key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
+key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
+key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
+key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
+key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
+key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
+key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
+key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
+key_action kact str kJ KEY_ACTION 0541 ----K sent by action key
+acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
+alt_scancode_esc scesa str S8 - - ----- Alternate escape for scancode emulation
+bit_image_repeat birep str Xy - - ----- Repeat bit image cell #1 #2 times
+bit_image_newline binel str Zz - - ----- Move to next row of the bit image
+bit_image_carriage_return bicr str Yv - - ----- Move to beginning of same row
+change_char_pitch cpi str ZA - - ----- Change number of characters per inch to #1
+change_line_pitch lpi str ZB - - ----- Change number of lines per inch to #1
+change_res_horz chr str ZC - - ----- Change horizontal resolution to #1
+change_res_vert cvr str ZD - - ----- Change vertical resolution to #1
+char_padding rmp str rP - - ----- like ip but when in insert mode
+char_set_names csnm str Zy - - ----- Produce #1'th item from list of character set names
+clear_margins mgc str MC - - ----- clear right and left soft margins
+clr_bol el1 str cb - - ----- Clear to beginning of line
+code_set_init csin str ci - - ----- Init sequence for multiple codesets
+color_names colornm str Yw - - ----- Give name for color #1
+create_window cwin str CW - - ----- define a window #1 from #2,#3 to #4,#5
+define_bit_image_region defbi str Yx - - ----- Define rectangualar bit image region
+define_char defc str ZE - - ----- Define a character #1, #2 dots wide, descender #3
+device_type devt str dv - - ----- Indicate language/codeset support
+dial_phone dial str DI - - ----- dial number #1
+display_clock dclk str DK - - ----- display clock
+display_pc_char dispc str S1 - - ----- Display PC character #1
+ena_acs enacs str eA - - ----- enable alternate char set
+end_bit_image_region endbi str Yy - - ----- End a bit-image region
+enter_am_mode smam str SA - - ----- turn on automatic margins
+enter_doublewide_mode swidm str ZF - - ----- Enter double-wide mode
+enter_draft_quality sdrfq str ZG - - ----- Enter draft-quality mode
+enter_italics_mode sitm str ZH - - ----- Enter italic mode
+enter_leftward_mode slm str ZI - - ----- Start leftward carriage motion
+enter_micro_mode smicm str ZJ - - ----- Start micro-motion mode
+enter_near_letter_quality snlq str ZK - - ----- Enter NLQ mode
+enter_normal_quality snrmq str ZL - - ----- Enter normal-quality mode
+enter_pc_charset_mode smpch str S2 - - ----- Enter PC character display mode
+enter_scancode_mode smsc str S4 - - ----- Enter PC scancode mode
+enter_shadow_mode sshm str ZM - - ----- Enter shadow-print mode
+enter_subscript_mode ssubm str ZN - - ----- Enter subscript mode
+enter_superscript_mode ssupm str ZO - - ----- Enter superscript mode
+enter_upward_mode sum str ZP - - ----- Start upward carriage motion
+enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
+exit_am_mode rmam str RA - - ----- turn off automatic margins
+exit_doublewide_mode rwidm str ZQ - - ----- End double-wide mode
+exit_italics_mode ritm str ZR - - ----- End italic mode
+exit_leftward_mode rlm str ZS - - ----- End left-motion mode
+exit_micro_mode rmicm str ZT - - ----- End micro-motion mode
+exit_pc_charset_mode rmpch str S3 - - ----- Exit PC character display mode
+exit_scancode_mode rmsc str S5 - - ----- Exit PC scancode mode
+exit_shadow_mode rshm str ZU - - ----- End shadow-print mode
+exit_subscript_mode rsubm str ZV - - ----- End subscript mode
+exit_superscript_mode rsupm str ZW - - ----- End superscript mode
+exit_upward_mode rum str ZX - - ----- End reverse character motion
+exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
+fixed_pause pause str PA - - ----- pause for 2-3 seconds
+flash_hook hook str fh - - ----- flash switch hook
+get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
+goto_window wingo str WG - - ----- go to window #1
+hangup hup str HU - - ----- hang-up phone
+initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
+initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
+key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
+key_btab kcbt str kB KEY_BTAB 0632 ----- back-tab key
+key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
+key_close kclo str @3 KEY_CLOSE 0544 ----- close key
+key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
+key_create kcrt str @6 KEY_CREATE 0547 ----- create key
+key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
+key_exit kext str @9 KEY_EXIT 0551 ----- exit key
+key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
+key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
+key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
+key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
+key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
+key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
+key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
+key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
+key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
+key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
+key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
+key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
+key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
+key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
+key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
+key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
+key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
+key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
+key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
+key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
+key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
+key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
+key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
+key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
+key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
+key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
+key_find kfnd str @0 KEY_FIND 0552 ----- find key
+key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
+key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
+key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
+key_move kmov str %4 KEY_MOVE 0556 ----- move key
+key_next knxt str %5 KEY_NEXT 0557 ----- next key
+key_open kopn str %6 KEY_OPEN 0560 ----- open key
+key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
+key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
+key_print kprt str %9 KEY_PRINT 0532 ----- print key
+key_redo krdo str %0 KEY_REDO 0563 ----- redo key
+key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
+key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
+key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
+key_restart krst str &4 KEY_RESTART 0567 ----- restart key
+key_resume kres str &5 KEY_RESUME 0570 ----- resume key
+key_save ksav str &6 KEY_SAVE 0571 ----- save key
+key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
+key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
+key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
+key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
+key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
+key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
+key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
+key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
+key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
+key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
+key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
+key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
+key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
+key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
+key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
+key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
+key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
+key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
+key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
+key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
+key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
+key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
+key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
+key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
+key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
+key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
+key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
+key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
+key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
+key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+label_format fln str Lf - - ----- label format
+label_off rmln str LF - - ----- turn off soft labels
+label_on smln str LO - - ----- turn on soft labels
+micro_column_address mhpa str ZY - - ----- Like column_address in micro mode
+micro_down mcud1 str ZZ - - ----- Like cursor_down in micro mode
+micro_left mcub1 str Za - - ----- Like cursor_left in micro mode
+micro_right mcuf1 str Zb - - ----- Like cursor_right in micro mode
+micro_row_address mvpa str Zc - - ----- Like row_address #1 in micro mode
+micro_up mcuu1 str Zd - - ----- Like cursor_up in micro mode
+mouse_info minfo str Mi - - ----- Mouse status information
+order_of_pins porder str Ze - - ----- Match software bits to print-head pins
+orig_colors oc str oc - - ----- Set all color pairs to the original ones
+orig_pair op str op - - ----- Set default pair to its original value
+parm_down_micro mcud str Zf - - ----- Like parm_down_cursor in micro mode
+parm_left_micro mcub str Zg - - ----- Like parm_left_cursor in micro mode
+parm_right_micro mcuf str Zh - - ----- Like parm_right_cursor in micro mode
+parm_up_micro mcuu str Zi - - ----- Like parm_up_cursor in micro mode
+pc_term_options pctrm str S6 - - ----- PC terminal options
+pkey_plab pfxl str xl - - ----- Program function key #1 to type string #2 and show string #3
+plab_norm pln str pn - - ----- program label #1 to show string #2
+pulse pulse str PU - - ----- select pulse dialing
+quick_dial qdial str QD - - ----- dial number #1 without checking
+req_for_input rfi str RF - - ----- send next input char (for ptys)
+req_mouse_pos reqmp str RQ - - ----- Request mouse position
+remove_clock rmclk str RC - - ----- remove clock
+scancode_escape scesc str S7 - - ----- Escape for scancode emulation
+select_char_set scs str Zj - - ----- Select character set, #1
+set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
+set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
+set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
+set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
+set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
+set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
+set_background setb str Sb - - ----- Set background color #1
+set_bottom_margin smgb str Zk - - ----- Set bottom margin at current line
+set_bottom_margin_parm smgbp str Zl - - ----- Set bottom margin at line #1 or (if smgtp is not given) #2 lines from bottom
+set_clock sclk str SC - - ----- set clock, #1 hrs #2 mins #3 secs
+set_color_band setcolor str Yz - - ----- Change to ribbon color #1
+set_color_pair scp str sp - - ----- Set current color pair to #1
+set_foreground setf str Sf - - ----- Set foreground color #1
+set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_left_margin_parm smglp str Zm - - ----- Set left (right) margin at column #1
+set_lr_margin smglr str ML - - ----- Set both left and right margins to #1, #2. (ML is not in BSD termcap).
+set_page_length slines str YZ - - ----- Set page length to #1 lines
+set_right_margin smgr str MR - - ----- set right soft margin at current column
+set_right_margin_parm smgrp str Zn - - ----- Set right margin at column #1
+set_tb_margin smgtb str MT - - ----- Sets both top and bottom margins to #1, #2
+set_top_margin smgt str Zo - - ----- Set top margin at current line
+set_top_margin_parm smgtp str Zp - - ----- Set top (bottom) margin at row #1
+start_bit_image sbim str Zq - - ----- Start printing bit image graphics
+start_char_set_def scsd str Zr - - ----- Start character set definition #1, with #2 characters in the set
+stop_bit_image rbim str Zs - - ----- Stop printing bit image graphics
+stop_char_set_def rcsd str Zt - - ----- End definition of character set #1
+subscript_characters subcs str Zu - - ----- List of subscriptable characters
+superscript_characters supcs str Zv - - ----- List of superscriptable characters
+these_cause_cr docr str Zw - - ----- Printing any of these characters causes CR
+tone tone str TO - - ----- select touch tone dialing
+user0 u0 str u0 - - ----- User string #0
+user1 u1 str u1 - - ----- User string #1
+user2 u2 str u2 - - ----- User string #2
+user3 u3 str u3 - - ----- User string #3
+user4 u4 str u4 - - ----- User string #4
+user5 u5 str u5 - - ----- User string #5
+user6 u6 str u6 - - ----- User string #6
+user7 u7 str u7 - - ----- User string #7
+user8 u8 str u8 - - ----- User string #8
+user9 u9 str u9 - - ----- User string #9
+wait_tone wait str WA - - ----- wait for dial-tone
+xoff_character xoffc str XF - - ----- XOFF character
+xon_character xonc str XN - - ----- XON character
+zero_motion zerom str Zx - - ----- No motion for subsequent character
+set_pglen_inch slength str sL - - ----- YI Set page length to #1 hundredth of an inch
+enter_horizontal_hl_mode ehhlm str Xh - - ----- Enter horizontal highlight mode
+enter_left_hl_mode elhlm str Xl - - ----- Enter left highlight mode
+enter_low_hl_mode elohlm str Xo - - ----- Enter low highlight mode
+enter_right_hl_mode erhlm str Xr - - ----- Enter right highlight mode
+enter_top_hl_mode ethlm str Xt - - ----- Enter top highlight mode
+enter_vertical_hl_mode evhlm str Xv - - ----- Enter vertical highlight mode
+set_a_attributes sgr1 str sA - - ----- Define second set of video attributes #1-#6
+#
+#
+#
+# %%-STOP-HERE-%%
+#
+# Don't move this casually! In fact, don't move it at all unless you're
+# either doing it to add System V or XPG4 extensions, or have decided you
+# don't care about SVr4 binary compatibility.
+#
+#############################################################################
+#
+# TERMCAP EXTENSION CAPABILITIES
+#
+# The capabilities below are either obsolete or extensions on certain systems.
+# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
+# termcap sources; the rest are listed for completeness, and in case somebody
+# cares about them enough to hack in code that will translate them into
+# terminfo capabilities.
+#
+# The first part of the list is from Ross Ridge's `mytinfo' package
+# (comp.sources.unix, volume 26); the variable names and terminfo names (as
+# well as the termcap codes) match his list.
+#
+# This group of codes is not marked obsolete in 4.4BSD, but have no direct
+# terminfo equivalents. The rs capability is specially translated to terminfo
+# r2, and vice versa, if an entry does not already have an r2. Similarly,
+# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
+# The ug capability is thrown away, but assumed to be whatever sg is if the
+# latter is nonzero and we're dumping in termcap format.
+#
+termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
+termcap_reset OTrs str rs - - YB-G- terminal reset string
+magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
+#
+# Obsolete termcap capabilities. Some are used for termcap translation. The
+# code uses the 'OT' prefix we put on obsolete capabilities to suppress
+# printing them in terminfo source dumps of compiled entries.
+#
+backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
+crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
+no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
+carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
+new_line_delay OTdN num dN - - YB-G- pad needed for LF
+linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
+backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
+#
+# GNU termcap library extensions. The GNU termcap file distributed with
+# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
+# BSD termcap file. The name clash with terminfo MT is resolved by type
+# info; MT is converted to km.
+#
+gnu_has_meta_key OTMT bool MT - - ----E has meta key
+# gnu_tab_width OTtw num tw - - ----E tab width in spaces
+#
+# GNU termcap *does* include the following extended capability, Only the
+# now-obsolete Ann Arbor terminals used it.
+#
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+#
+# The following comments describe capnames so ancient that I believe no
+# software uses them any longer. Some of these have to go because they
+# clash with terminfo names in ways that cannot be resolved by type
+# information.
+#
+# These mytinfo codes are not used in the 4.4BSD curses code. They are
+# marked obsolete in the 4.4BSD manual pages.
+#
+# There is one conflict with terminfo; ma is in both. This conflict is
+# resolved by type information.
+#
+# The `ko' capability is translated by special code. It should contain a
+# comma-separated list of capabilities for which there are corresponding keys.
+# The `kn' code is accepted but ignored.
+#
+# The `ma' capability seems to have been designed to map between the rogue(2)
+# motion keys (including jkhl) and characters emitted by arrow keys on some
+# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+#
+# Here is a description of memory_lock_above and memory_unlock:
+# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
+# text. All lines above the cursor's current line become locked in place on
+# the screen. Then enter data normally. When the screen fills up, any
+# further data entered forces the first line of unfrozen line text to scroll
+# under the frozen data. Lines scrolled off the screen are inserted into
+# memory immediately preceding the first frozen line." (from the HP 700/96
+# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
+#
+# Applications that use terminfo are supposed to behave as though xr is
+# always true.
+#
+linefeed_is_newline OTNL bool NL - - YB--- move down with \n
+# even_parity OTEP bool EP - - -B--- terminal requires even parity
+# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
+# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
+# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
+# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
+backspace_delay OTdB num dB - - YB-G- padding required for ^H
+# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
+horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
+# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
+number_of_function_keys OTkn num kn - - -B-G- count of function keys
+other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
+arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
+# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
+has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
+return_does_clr_eol OTxr bool xr - - YB--- return clears the line
+# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
+#
+# mytinfo described this as a termcap capability, but it's not listed in the
+# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
+# package, like System V, behaves as though it is always true.
+#
+# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top line
+#
+# University of Waterloo termcap extensions (as described in mytinfo).
+# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
+# be resolved by a type check. The descriptions are guesses from what was
+# in the mytinfo tables.
+#
+# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
+# key_kill_char OTkk str kk - - ----- string set by kill key (?)
+# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
+# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
+# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
+#
+# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
+# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
+# check.
+#
+# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
+# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
+# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
+# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
+#
+# The mytinfo capabilities end here.
+#
+# XENIX extensions:
+#
+# Xenix defined its own set of forms-drawing capabilities:
+#
+# cap IBM ASCII description ACS ASCII
+# --- ----------- -------------------- ------------- ------
+# G1 191 \277 M-? single upper right ACS_URCORNER
+# G2 218 \332 M-Z single upper left ACS_ULCORNER
+# G3 192 \300 M-@ single lower left ACS_LLCORNER
+# G4 217 \331 M-Y single lower right ACS_LRCORNER
+# G5 187 \273 M-; double upper right
+# G6 201 \311 M-I double upper left
+# G7 200 \310 M-H double lower left
+# G8 188 \274 M-< double lower right
+# GC 197 \305 M-E single intersection ACS_PLUS _ _
+# GD 194 \302 M-B single down-tick ACS_TTEE |
+# GH 196 \304 M-D single horizontal line ACS_HLINE
+# GL 180 \264 M-4 single left tick ACS_RTEE -|
+# GR 195 \303 M-C single right tick ACS_LTEE |-
+# GU 193 \301 M-A single up tick ACS_BTEE _|_
+# GV 179 \263 M-3 single vertical line ACS_VLINE
+# Gc 206 \316 M-N double intersection
+# Gd 203 \313 M-K double down tick
+# Gh 205 \315 M-M double horizontal line
+# Gl 204 \204 M-L double left tick
+# Gr 185 \271 M-9 double right tick
+# Gu 202 \312 M-J double up tick
+# Gv 186 \272 M-: double vertical line
+#
+# The compiler will translate the single-line caps and discard the others
+# (via IGNORE aliases further down). We don't want to do normal pad
+# translation on these, they're often single-character printable ASCII
+# strings that happen to be numerics. There's awk code in parametrized.sh
+# that detects the acs_ prefix and uses it to suppress pad translation.
+# These terminfo names are invented.
+#
+acs_ulcorner OTG2 str G2 - - ----- single upper left
+acs_llcorner OTG3 str G3 - - ----- single lower left
+acs_urcorner OTG1 str G1 - - ----- single upper right
+acs_lrcorner OTG4 str G4 - - ----- single lower right
+acs_ltee OTGR str GR - - ----- tee pointing right
+acs_rtee OTGL str GL - - ----- tee pointing left
+acs_btee OTGU str GU - - ----- tee pointing up
+acs_ttee OTGD str GD - - ----- tee pointing down
+acs_hline OTGH str GH - - ----- single horizontal line
+acs_vline OTGV str GV - - ----- single vertical line
+acs_plus OTGC str GC - - ----- single intersection
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is almost all comments. What it's mainly for is to describe
+# what capabilities need to be squeezed out to get down to the XSI Curses
+# standard set. They are flagged with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+memory_lock meml str ml - - ----K memory lock above
+memory_unlock memu str mu - - ----K memory unlock
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+#box_chars_1 box1 str bx - - ----K box characters primary set
+#box_chars_2 box2 str by - - ----K box characters secondary set
+#box_attr_1 batt1 str Bx - - ----K attributes for box1
+#box_attr_2 batt2 str By - - ----K attributes for box2
+#color_bg_0 colb0 str d0 - - ----K background color 0
+#color_bg_1 colb1 str d1 - - ----K background color 1
+#color_bg_2 colb2 str d2 - - ----K background color 2
+#color_bg_3 colb3 str d3 - - ----K background color 3
+#color_bg_4 colb4 str d4 - - ----K background color 4
+#color_bg_5 colb5 str d5 - - ----K background color 5
+#color_bg_6 colb6 str d6 - - ----K background color 6
+#color_bg_7 colb7 str d7 - - ----K background color 7
+#color_fg_0 colf0 str c0 - - ----K foreground color 0
+#color_fg_1 colf1 str c1 - - ----K foreground color 1
+#color_fg_2 colf2 str c2 - - ----K foreground color 2
+#color_fg_3 colf3 str c3 - - ----K foreground color 3
+#color_fg_4 colf4 str c4 - - ----K foreground color 4
+#color_fg_5 colf5 str c5 - - ----K foreground color 5
+#color_fg_6 colf6 str c6 - - ----K foreground color 6
+#color_fg_7 colf7 str c7 - - ----K foreground color 7
+#font_0 font0 str f0 - - ----- select font 0
+#font_1 font1 str f1 - - ----- select font 1
+#font_2 font2 str f2 - - ----- select font 2
+#font_3 font3 str f3 - - ----- select font 3
+#font_4 font4 str f4 - - ----K select font 4
+#font_5 font5 str f5 - - ----K select font 5
+#font_6 font6 str f6 - - ----K select font 6
+#font_7 font7 str f7 - - ----K select font 7
+#key_back_tab kbtab str k0 - - ----- backtab key
+#key_do kdo str ki - - ----K do request key
+#key_command kcmd str kd - - ----K command-request key
+#key_command_pane kcpn str kW - - ----K command-pane key
+#key_end kend str kw - - ----- end key
+#key_help khlp str kq - - ----- help key
+#key_newline knl str nl - - ----K newline key
+#key_next_pane knpn str kv - - ----K next-pane key
+#key_prev_cmd kppn str kp - - ----K previous-command key
+#key_prev_pane kppn str kV - - ----K previous-pane key
+#key_quit kquit str kQ - - ----K quit key
+#key_select ksel str kU - - ----- select key
+#key_scroll_left kscl str kz - - ----K scroll left
+#key_scroll_right kscr str kZ - - ----K scroll right
+#key_tab ktab str ko - - ----K tab key
+#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+#appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
+# the IBM manual pages, so the cap name strings are guesses. The terminfo
+# names are almost certainly right, the termcap ones almost certainly wrong.
+#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
+#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
+#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
+#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
+#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
+#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
+#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
+#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
+# Undocumented capabilities end here
+#key_sf1 ksf1 str S1 - - ----K special function key 1
+#key_sf2 ksf2 str S2 - - ----K special function key 2
+#key_sf3 ksf3 str S3 - - ----K special function key 3
+#key_sf4 ksf4 str S4 - - ----K special function key 4
+#key_sf5 ksf5 str S5 - - ----K special function key 5
+#key_sf6 ksf6 str S6 - - ----K special function key 6
+#key_sf7 ksf7 str S7 - - ----K special function key 7
+#key_sf8 ksf8 str S8 - - ----K special function key 8
+#key_sf9 ksf9 str S9 - - ----K special function key 9
+#key_sf10 ksf10 str SA - - ----K special function key 10
+# AIX version 3 documents different codes for F11, F12 and does not mention
+# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
+#key_f11 kf11 str k< - - ----- function key 11
+#key_f12 kf12 str k> - - ----- function key 12
+# Undocumented capabilities end here.
+#key_action kact str kJ - - ----K sent by action key
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+#enter_topline_mode topl str tp - - ----K start top-line mode
+#enter_bottom_mode btml str bm - - ----K start bottom-line mode
+#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+#
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# case-fold-search:nil
+# truncate-lines:t
+# End:
diff --git a/Build/source/libs/ncurses/include/Caps.uwin b/Build/source/libs/ncurses/include/Caps.uwin
new file mode 100644
index 00000000000..6efa208f182
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Caps.uwin
@@ -0,0 +1,1090 @@
+##############################################################################
+# Copyright (c) 2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas Dickey
+#
+# $Id: Caps.uwin,v 1.3 2002/07/07 00:05:00 tom Exp $
+#
+# This is an adaptation of ncurses' termcap/terminfo capability table, which
+# is designed to align with U/Win's terminfo.
+#
+# This table is used to generate initializers for tables that drive tic,
+# infocmp, and the library compilation code used to support the termcap
+# compatibility hack. It is also used to generate the tabular portion of the
+# terminfo(5) man page; lines beginning with `#%' are passed through to become
+# the terminfo table.
+#
+# This file has three major sections; a standard-capabilities table, two
+# extension-capability tables, and a section of aliases declarations.
+# The first two have the same format, as follows:
+#
+# FILE FORMAT
+#
+# Column 1: terminfo variable name
+# Column 2: terminfo capability name
+# Column 3: capability type (boolean, numeric, or string)
+# Column 4: termcap capability name
+# Column 5: KEY_xxx name, if any, `-' otherwise
+# Column 6: value for KEY_xxx name, if any, `-' otherwise
+# Column 7: Lead with `Y' if capability should be emitted in termcap
+# translations, `-' otherwise
+# Column 8: capability description
+#
+# The codes following [Y-] in column 7 describe the versions of termcap which
+# use the given capability. This information is not used by the curses library
+# proper; rather, it's there to help the terminfo maintainer avoid emitting
+# termcap entry translations that are more than 1023 bytes long (and tank a
+# lot of old termcap-using programs). The codes read as follows:
+# B = mentioned in the BSD man page for 4.4BSD curses
+# C = used by the 4.4BSD curses library
+# G = mentioned in the documentation for GNU termcap
+# E = used by GNU Emacs
+# K = remove this terminfo capability when translating to standard format
+# The important codes are C and E. A cap with C or E should be preserved in
+# translation if possible. The problem is that preserving all such caps may
+# lead to some termcap translations being too long. The termcap maintainer
+# has a bit of a juggling act to do...potential problem cases are marked with
+# an asterisk (*).
+#
+# The aliases section has the following format:
+#
+# Column 1: either `capalias' or `infoalias'
+# Column 2: name to be aliased
+# Column 3: what name it should translate to. The name IGNORE means it
+# should be discarded with a warning message.
+# Column 4: name of the extension set (used for compiler warning messages)
+# Column 5: capability description (usually an associated terminfo variable)
+#
+# HANDLING TERMCAP AND TERMINFO EXTENSIONS
+#
+# There are basically five different ways to handle termcap and terminfo
+# extensions:
+#
+# 1. Don't list the capname here, or list it but comment it out (the latter
+# is preferable; someone might want to handle it in the future). If you do
+# this, the capability will be treated as unknown and raise a warning from
+# the compiler.
+#
+# 2. Alias it. This is appropriate if the capability has the same meaning
+# as an already-supported one. The compiler will handle aliasing, emitting
+# an appropriate informational message whenever an alias fires.
+#
+# 3. List it in the standard table. You almost certainly do *not* want
+# to do this -- the capabilities in that one, and their order, have been
+# carefully chosen to be SVr4-binary-compatible when they're written out
+# as a terminfo object, and breaking this would be bad. It's up the ncurses
+# library what to do with the terminfo data after it's read in.
+#
+# 4. List it in the aliases table with an IGNORE target field. If you
+# do this, the capability will be ignored on input (though the user will
+# get a warning message about it).
+#
+# 5. List it in the extensions table. If you do this, the compiler will
+# silently accept the capability, but the curses library proper will never
+# see it (because it won't be written out as part of the terminfo object
+# format). It's up to you what you have the compiler do with it.
+#
+# There are two opposite reasons to choose option 5. One is when you want
+# to eat the capability silently and discard it when doing translations
+# to terminfo with tic -I. Some very old obsolete BSD caps like :kn: are
+# in this class. Nothing will ever use them again.
+#
+# More usually, you want the compiler to try to deduce something from the
+# capability value that it can use to translate it into your output format.
+# You'll need to write custom code, probably in postprocess_termcap() or
+# postprocess_terminfo(), to handle the translation.
+#
+# CONTROLLING ENTRY LENGTH
+#
+# Notes on specific elisions made to fit translations within 1023 bytes:
+#
+# Machines with IBM PC-like keyboards want to be able to define the following
+# keys: key_npage, key_ppage, key_home, key_ll (which is used for in termcap-
+# only environments for End or Home-Down), key_dc, and key_ic. This is also
+# the set of keys the `joe' editor will be upset if it can't see. So don't
+# trim those out of the set to be translated to termcap, or various users of
+# the termcap file will become irate.
+#
+# It might look tempting to leave those long init strings out of translations.
+# We can't do it (yet); 4.4BSD tput and tset use them.
+#
+# We retain the sgr capability in translation in spite of the fact that neither
+# 4.4BSD nor GNU Emacs uses it, because (a) some entry naming distinctions are
+# hard to understand without it, and (b) the entries in which it is long tend
+# to be older types that don't use up a lot of string space on function keys.
+# The tic(1) translation code will complain and elide it if it makes a critical
+# difference (there is special code in tic to recognize this situation).
+#
+# Yes, BSD tset(1) uses hpa. We elide hpa/vpa anyway because the motion
+# optimizer in BSD curses didn't use them. This omission seems to be the
+# single most effective one, it shortened the resolved length of all thirteen
+# problem entries in the 9.9.0 version of the terminfo master below critical.
+#
+# It would be nice to keep f11 and f12 for Emacs use, but a couple of termcap
+# translations go back over critical if we do this. As 4.4BSD curses fades
+# into history and GNU termcap's application base shrinks towards being GNU
+# Emacs only, we'll probably elide out some BSD-only capabilities in order
+# to buy space for non-essentials Emacs is still using. Capabilities high
+# on that hit list: rc, sc, uc.
+#
+#############################################################################
+#
+# STANDARD 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 \fBvariable\fR is the name by which the programmer (at the terminfo level)
+#%accesses the capability.
+#%
+#%The \fBcapname\fR is the short name used in the text of the database,
+#%and is used by a person updating the database.
+#%Whenever possible, capnames are chosen to be the same as or similar to
+#%the ANSI X3.64-1979 standard (now superseded by ECMA-48, which uses
+#%identical or very similar names). Semantics are also intended to match
+#%those of the specification.
+#%
+#%The termcap code is the old
+#%.B termcap
+#%capability name (some capabilities are new, and have names which termcap
+#%did not originate).
+#%.P
+#%Capability names have no hard length limit, but an informal limit of 5
+#%characters has been adopted to keep them short and to allow the tabs in
+#%the source file
+#%.B Caps
+#%to line up nicely.
+#%
+#%Finally, the description field attempts to convey the semantics of the
+#%capability. You may find some codes in the description field:
+#%.TP
+#%(P)
+#%indicates that padding may be specified
+#%.TP
+#%#[1-9]
+#%in the description field indicates that the string is passed through tparm with
+#%parms as given (#\fIi\fP).
+#%.TP
+#%(P*)
+#%indicates that padding may vary in proportion to the number of
+#%lines affected
+#%.TP
+#%(#\d\fIi\fP\u)
+#%indicates the \fIi\fP\uth\d parameter.
+#%
+#%.PP
+#% These are the boolean capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBBooleans name Code\fR
+auto_left_margin bw bool bw - - YB-G- cub1 wraps from column 0 to last column
+auto_right_margin am bool am - - YBCGE terminal has automatic margins
+no_esc_ctlc xsb bool xb - - YBCG- beehive (f1=escape, f2=ctrl C)
+ceol_standout_glitch xhp bool xs - - YBCGE standout not erased by overwriting (hp)
+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 (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
+memory_below db bool db - - YB-GE display may be retained below the screen
+move_insert_mode mir bool mi - - YBCGE safe to move while in insert mode
+move_standout_mode msgr bool ms - - YBCGE safe to move while in standout mode
+over_strike os bool os - - YBCG- terminal can overstrike
+status_line_esc_ok eslok bool es - - YB-G- escape can be used on the status line
+dest_tabs_magic_smso xt bool xt - - YBCGE tabs destructive, magic so char (t1061)
+tilde_glitch hz bool hz - - YB-GE cannot print ~'s (hazeltine)
+transparent_underline ul bool ul - - YBCGE underline character overstrikes
+xon_xoff xon bool xo - - YB--- terminal uses xon/xoff handshaking
+needs_xon_xoff nxon bool nx - - ----- padding will not work, xon/xoff required
+prtr_silent mc5i bool 5i - - ----- printer will not echo on screen
+hard_cursor chts bool HC - - ----- cursor is hard to see
+non_rev_rmcup nrrmc bool NR - - ----- smcup does not reverse rmcup
+no_pad_char npc bool NP - - ----- pad character does not exist
+non_dest_scroll_region ndscr bool ND - - ----- scrolling region is non-destructive
+back_color_erase bce bool ut - - ----- screen erased with background color
+can_change ccc bool cc - - ----- terminal can re-define existing colors
+hue_lightness_saturation hls bool hl - - ----- terminal uses only HLS color notation (Tektronix)
+#%.TE
+#%.ad
+#%
+#%These are the numeric capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBNumeric name Code\fR
+columns cols num co - - YBCGE number of columns in a line
+init_tabs it num it - - YB-G- tabs initially every # spaces
+lines lines num li - - YBCGE number of lines on screen or page
+lines_of_memory lm num lm - - YB-G- lines of memory if > line. 0 means varies
+magic_cookie_glitch xmc num sg - - YBCGE number of blank characters left by smso or rmso
+padding_baud_rate pb num pb - - YB-GE lowest baud rate where padding needed
+virtual_terminal vt num vt - - YB--- virtual terminal number (CB/unix)
+width_status_line wsl num ws - - YB-G- number of columns in status line
+num_labels nlab num Nl - - ----- number of labels on screen
+label_height lh num lh - - ----- rows in each label
+label_width lw num lw - - ----- columns in each label
+buttons btns num BT - - ----- number of buttons on mouse
+#max_attributes ma num ma - - YBC-- maximum combined attributes terminal can handle
+#maximum_windows wnum num MW - - ----- maximum number of defineable windows
+# These came in with SVr4's color support
+max_colors colors num Co - - ----- maximum number of colors on screen
+max_pairs pairs num pa - - ----- maximum number of color-pairs on the screen
+no_color_video ncv num NC - - ----- video attributes that cannot be used with colors
+#%.TE
+#%.ad
+#%
+#%The following numeric capabilities are present in the SVr4.0 term structure,
+#%but are not yet documented in the man page. They came in with SVr4's
+#%printer support.
+#%
+#%.na
+#%
+#%These are the string capabilities:
+#%
+#%.na
+#%.TS H
+#%center expand;
+#%c l l c
+#%c l l c
+#%lw25 lw6 lw2 lw20.
+#%\fBVariable Cap- TCap Description\fR
+#%\fBString name Code\fR
+back_tab cbt str bt - - YBCGE back tab (P)
+bell bel str bl - - YB-GE audible signal (bell) (P)
+carriage_return cr str cr - - YBCGE carriage return (P*) (P*)
+change_scroll_region csr str cs - - YBCGE change region to line #1 to line #2 (P)
+clear_all_tabs tbc str ct - - YB-G- clear all tab stops (P)
+clear_screen clear str cl - - YBCGE clear screen and home cursor (P*)
+clr_eol el str ce - - YBCGE clear to end of line (P)
+clr_eos ed str cd - - YBCGE clear to end of screen (P*)
+column_address hpa str ch - - -B-GE* horizontal position #1, absolute (P)
+command_character cmdch str CC - - YB-G- terminal settable cmd character in prototype !?
+cursor_address cup str cm - - YBCGE move to row #1 columns #2
+cursor_down cud1 str do - - YBCGE down one line
+cursor_home home str ho - - YBCGE home cursor (if no cup)
+cursor_invisible civis str vi - - YB-G- make cursor invisible
+cursor_left cub1 str le - - YBCGE move left one space
+cursor_mem_address mrcup str CM - - YB-G- memory relative cursor addressing, move to row #1 columns #2
+cursor_normal cnorm str ve - - YBCGE make cursor appear normal (undo civis/cvvis)
+cursor_right cuf1 str nd - - YBCGE non-destructive space (move right one space)
+cursor_to_ll ll str ll - - YBCGE last line, first column (if no cup)
+cursor_up cuu1 str up - - YBCGE up one line
+cursor_visible cvvis str vs - - YBCGE make cursor very visible
+delete_character dch1 str dc - - YBCGE delete character (P*)
+delete_line dl1 str dl - - YBCGE delete line (P*)
+dis_status_line dsl str ds - - YB-G- disable status line
+down_half_line hd str hd - - YB-G- half a line down
+enter_alt_charset_mode smacs str as - - YB-G- start alternate character set (P)
+enter_blink_mode blink str mb - - YB-G- turn on blinking
+enter_bold_mode bold str md - - YB-G- turn on bold (extra bright) mode
+enter_ca_mode smcup str ti - - YBCGE string to start programs using cup
+enter_delete_mode smdc str dm - - YBCGE enter delete mode
+enter_dim_mode dim str mh - - YB-G- turn on half-bright mode
+enter_insert_mode smir str im - - YBCGE enter insert mode
+enter_secure_mode invis str mk - - -B-G-* turn on blank mode (characters invisible)
+enter_protected_mode prot str mp - - -B-G-* turn on protected mode
+enter_reverse_mode rev str mr - - YB-G- turn on reverse video mode
+enter_standout_mode smso str so - - YBCGE begin standout mode
+enter_underline_mode smul str us - - YBCGE begin underline mode
+erase_chars ech str ec - - YB-G- erase #1 characters (P)
+exit_alt_charset_mode rmacs str ae - - YB-G- end alternate character set (P)
+exit_attribute_mode sgr0 str me - - YB-GE turn off all attributes
+exit_ca_mode rmcup str te - - YBCGE strings to end programs using cup
+exit_delete_mode rmdc str ed - - YBCGE end delete mode
+exit_insert_mode rmir str ei - - YBCGE exit insert mode
+exit_standout_mode rmso str se - - YBCGE exit standout mode
+exit_underline_mode rmul str ue - - YBCGE exit underline mode
+flash_screen flash str vb - - YBCGE visible bell (may not move cursor)
+form_feed ff str ff - - YB-G- hardcopy terminal page eject (P*)
+from_status_line fsl str fs - - YB-G- return from status line
+init_1string is1 str i1 - - YB-G- initialization string
+init_2string is2 str is - - YB-G- initialization string
+init_3string is3 str i3 - - YB-G- initialization string
+init_file if str if - - YB-G- name of initialization file
+insert_character ich1 str ic - - YBCGE insert character (P)
+insert_line il1 str al - - YBCGE insert line (P*)
+insert_padding ip str ip - - YBCGE insert padding after inserted character
+key_backspace kbs str kb KEY_BACKSPACE 0407 YB-G- backspace key
+key_catab ktbc str ka KEY_CATAB 0526 -B-G-* clear-all-tabs key
+key_clear kclr str kC KEY_CLEAR 0515 -B-G-* clear-screen or erase key
+key_ctab kctab str kt KEY_CTAB 0525 -B-G-* clear-tab key
+key_dc kdch1 str kD KEY_DC 0512 YB-G- delete-character key
+key_dl kdl1 str kL KEY_DL 0510 -B-G-* delete-line key
+key_down kcud1 str kd KEY_DOWN 0402 YBCGE down-arrow key
+key_eic krmir str kM KEY_EIC 0514 -B-G-* sent by rmir or smir in insert mode
+key_eol kel str kE KEY_EOL 0517 -B-G-* clear-to-end-of-line key
+key_eos ked str kS KEY_EOS 0516 -B-G-* clear-to-end-of-screen key
+key_f0 kf0 str k0 KEY_F(0) 0410 YBCGE F0 function key
+key_f1 kf1 str k1 KEY_F(1) - YBCGE F1 function key
+key_f10 kf10 str k; KEY_F(10) - ----E F10 function key
+key_f2 kf2 str k2 KEY_F(2) - YBCGE F2 function key
+key_f3 kf3 str k3 KEY_F(3) - YBCGE F3 function key
+key_f4 kf4 str k4 KEY_F(4) - YBCGE F4 function key
+key_f5 kf5 str k5 KEY_F(5) - YBCGE F5 function key
+key_f6 kf6 str k6 KEY_F(6) - YBCGE F6 function key
+key_f7 kf7 str k7 KEY_F(7) - YBCGE F7 function key
+key_f8 kf8 str k8 KEY_F(8) - YBCGE F8 function key
+key_f9 kf9 str k9 KEY_F(9) - YBCGE F9 function key
+key_home khome str kh KEY_HOME 0406 YBCGE home key
+key_ic kich1 str kI KEY_IC 0513 YB-GE insert-character key
+key_il kil1 str kA KEY_IL 0511 -B-G-* insert-line key
+key_left kcub1 str kl KEY_LEFT 0404 YBCGE left-arrow key
+key_ll kll str kH KEY_LL 0533 YB-G- lower-left key (home down)
+key_npage knp str kN KEY_NPAGE 0522 YB-GE next-page key
+key_ppage kpp str kP KEY_PPAGE 0523 YB-GE previous-page key
+key_right kcuf1 str kr KEY_RIGHT 0405 YBCGE right-arrow key
+key_sf kind str kF KEY_SF 0520 -B-G-* scroll-forward key
+key_sr kri str kR KEY_SR 0521 -B-G-* scroll-backward key
+key_stab khts str kT KEY_STAB 0524 -B-G-* set-tab key
+key_up kcuu1 str ku KEY_UP 0403 YBCGE up-arrow key
+keypad_local rmkx str ke - - YBCGE leave 'keyboard_transmit' mode
+keypad_xmit smkx str ks - - YBCGE enter 'keyboard_transmit' mode
+lab_f0 lf0 str l0 - - -B-G-* label on function key f0 if not f0
+lab_f1 lf1 str l1 - - -B-G-* label on function key f1 if not f1
+lab_f10 lf10 str la - - ----- label on function key f10 if not f10
+lab_f2 lf2 str l2 - - -B-G-* label on function key f2 if not f2
+lab_f3 lf3 str l3 - - -B-G-* label on function key f3 if not f3
+lab_f4 lf4 str l4 - - -B-G-* label on function key f4 if not f4
+lab_f5 lf5 str l5 - - -B-G-* label on function key f5 if not f5
+lab_f6 lf6 str l6 - - -B-G-* label on function key f6 if not f6
+lab_f7 lf7 str l7 - - -B-G-* label on function key f7 if not f7
+lab_f8 lf8 str l8 - - -B-G-* label on function key f8 if not f8
+lab_f9 lf9 str l9 - - -B-G-* label on function key f9 if not f9
+meta_off rmm str mo - - YB-G-* turn off meta mode
+meta_on smm str mm - - YB-G-* turn on meta mode (8th-bit on)
+newline nel str nw - - YB-G-* newline (behave like cr followed by lf)
+pad_char pad str pc - - YBCGE padding char (instead of null)
+parm_dch dch str DC - - YB-GE delete #1 characters (P*)
+parm_delete_line dl str DL - - YBCGE delete #1 lines (P*)
+parm_down_cursor cud str DO - - YBCGE down #1 lines (P*)
+parm_ich ich str IC - - YB-GE insert #1 characters (P*)
+parm_index indn str SF - - YBCG- scroll forward #1 lines (P)
+parm_insert_line il str AL - - YBCGE insert #1 lines (P*)
+parm_left_cursor cub str LE - - YBCGE move #1 characters to the left (P)
+parm_right_cursor cuf str RI - - YBCGE move #1 characters to the right (P*)
+parm_rindex rin str SR - - YBCG- scroll back #1 lines (P)
+parm_up_cursor cuu str UP - - YBCGE up #1 lines (P*)
+pkey_key pfkey str pk - - -B--- program function key #1 to type string #2
+pkey_local pfloc str pl - - -B--- program function key #1 to execute string #2
+pkey_xmit pfx str px - - -B--- program function key #1 to transmit string #2
+print_screen mc0 str ps - - -B-G-* print contents of screen
+prtr_off mc4 str pf - - -B-G-* turn off printer
+prtr_on mc5 str po - - -B-G-* turn on printer
+repeat_char rep str rp - - YB-GE repeat char #1 #2 times (P*)
+reset_1string rs1 str r1 - - -B--- reset string
+reset_2string rs2 str r2 - - -B--- reset string
+reset_3string rs3 str r3 - - -B--- reset string
+reset_file rf str rf - - -B--- name of reset file
+restore_cursor rc str rc - - YBCG- restore cursor to position of last save_cursor
+row_address vpa str cv - - -B-GE* vertical position #1 absolute (P)
+save_cursor sc str sc - - YBCG- save current cursor position (P)
+scroll_forward ind str sf - - YBCGE scroll text up (P)
+scroll_reverse ri str sr - - YBCGE scroll text down (P)
+set_attributes sgr str sa - - YB-G- define video attributes #1-#9 (PG9)
+set_tab hts str st - - YB-G- set a tab in every row, current columns
+set_window wind str wi - - -B-GE current window is lines #1-#2 cols #3-#4
+tab ht str ta - - YBCGE tab to next 8-space hardware tab stop
+to_status_line tsl str ts - - YB-G- move to status line, column #1
+underline_char uc str uc - - YBCG- underline char and move past it
+up_half_line hu str hu - - YB-G- half a line up
+init_prog iprog str iP - - -B--- path name of program for initialization
+key_a1 ka1 str K1 KEY_A1 0534 YB-GE upper left of keypad
+key_a3 ka3 str K3 KEY_A3 0535 YB-GE upper right of keypad
+key_b2 kb2 str K2 KEY_B2 0536 YB-GE center of keypad
+key_c1 kc1 str K4 KEY_C1 0537 YB-GE lower left of keypad
+key_c3 kc3 str K5 KEY_C3 0540 YB-GE lower right of keypad
+prtr_non mc5p str pO - - -B-G-* turn on printer for #1 bytes
+#
+# SVr1 capabilities stop here. IBM's version of terminfo is the same as
+# SVr4 up to this point, but has a different set afterwards.
+#
+char_padding rmp str rP - - ----- like ip but when in insert mode
+acs_chars acsc str ac - - ----- graphics charset pairs, based on vt100
+plab_norm pln str pn - - ----- program label #1 to show string #2
+key_btab kcbt str kB KEY_BTAB 0541 ----- back-tab key
+enter_xon_mode smxon str SX - - ----- turn on xon/xoff handshaking
+exit_xon_mode rmxon str RX - - ----- turn off xon/xoff handshaking
+enter_am_mode smam str SA - - ----- turn on automatic margins
+exit_am_mode rmam str RA - - ----- turn off automatic margins
+xon_character xonc str XN - - ----- XON character
+xoff_character xoffc str XF - - ----- XOFF character
+ena_acs enacs str eA - - ----- enable alternate char set
+label_on smln str LO - - ----- turn on soft labels
+label_off rmln str LF - - ----- turn off soft labels
+key_beg kbeg str @1 KEY_BEG 0542 ----- begin key
+key_cancel kcan str @2 KEY_CANCEL 0543 ----- cancel key
+key_close kclo str @3 KEY_CLOSE 0544 ----- close key
+key_command kcmd str @4 KEY_COMMAND 0545 ----- command key
+key_copy kcpy str @5 KEY_COPY 0546 ----- copy key
+key_create kcrt str @6 KEY_CREATE 0547 ----- create key
+key_end kend str @7 KEY_END 0550 ----- end key
+key_enter kent str @8 KEY_ENTER 0527 ----- enter/send key
+key_exit kext str @9 KEY_EXIT 0551 ----- exit key
+key_find kfnd str @0 KEY_FIND 0552 ----- find key
+key_help khlp str %1 KEY_HELP 0553 ----- help key
+key_mark kmrk str %2 KEY_MARK 0554 ----- mark key
+key_message kmsg str %3 KEY_MESSAGE 0555 ----- message key
+key_move kmov str %4 KEY_MOVE 0556 ----- move key
+key_next knxt str %5 KEY_NEXT 0557 ----- next key
+key_open kopn str %6 KEY_OPEN 0560 ----- open key
+key_options kopt str %7 KEY_OPTIONS 0561 ----- options key
+key_previous kprv str %8 KEY_PREVIOUS 0562 ----- previous key
+key_print kprt str %9 KEY_PRINT 0532 ----- print key
+key_redo krdo str %0 KEY_REDO 0563 ----- redo key
+key_reference kref str &1 KEY_REFERENCE 0564 ----- reference key
+key_refresh krfr str &2 KEY_REFRESH 0565 ----- refresh key
+key_replace krpl str &3 KEY_REPLACE 0566 ----- replace key
+key_restart krst str &4 KEY_RESTART 0567 ----- restart key
+key_resume kres str &5 KEY_RESUME 0570 ----- resume key
+key_save ksav str &6 KEY_SAVE 0571 ----- save key
+key_suspend kspd str &7 KEY_SUSPEND 0627 ----- suspend key
+key_undo kund str &8 KEY_UNDO 0630 ----- undo key
+key_sbeg kBEG str &9 KEY_SBEG 0572 ----- shifted begin key
+key_scancel kCAN str &0 KEY_SCANCEL 0573 ----- shifted cancel key
+key_scommand kCMD str *1 KEY_SCOMMAND 0574 ----- shifted command key
+key_scopy kCPY str *2 KEY_SCOPY 0575 ----- shifted copy key
+key_screate kCRT str *3 KEY_SCREATE 0576 ----- shifted create key
+key_sdc kDC str *4 KEY_SDC 0577 ----- shifted delete-character key
+key_sdl kDL str *5 KEY_SDL 0600 ----- shifted delete-line key
+key_select kslt str *6 KEY_SELECT 0601 ----- select key
+key_send kEND str *7 KEY_SEND 0602 ----- shifted end key
+key_seol kEOL str *8 KEY_SEOL 0603 ----- shifted clear-to-end-of-line key
+key_sexit kEXT str *9 KEY_SEXIT 0604 ----- shifted exit key
+key_sfind kFND str *0 KEY_SFIND 0605 ----- shifted find key
+key_shelp kHLP str #1 KEY_SHELP 0606 ----- shifted help key
+key_shome kHOM str #2 KEY_SHOME 0607 ----- shifted home key
+key_sic kIC str #3 KEY_SIC 0610 ----- shifted insert-character key
+key_sleft kLFT str #4 KEY_SLEFT 0611 ----- shifted left-arrow key
+key_smessage kMSG str %a KEY_SMESSAGE 0612 ----- shifted message key
+key_smove kMOV str %b KEY_SMOVE 0613 ----- shifted move key
+key_snext kNXT str %c KEY_SNEXT 0614 ----- shifted next key
+key_soptions kOPT str %d KEY_SOPTIONS 0615 ----- shifted options key
+key_sprevious kPRV str %e KEY_SPREVIOUS 0616 ----- shifted previous key
+key_sprint kPRT str %f KEY_SPRINT 0617 ----- shifted print key
+key_sredo kRDO str %g KEY_SREDO 0620 ----- shifted redo key
+key_sreplace kRPL str %h KEY_SREPLACE 0621 ----- shifted replace key
+key_sright kRIT str %i KEY_SRIGHT 0622 ----- shifted right-arrow key
+key_srsume kRES str %j KEY_SRSUME 0623 ----- shifted resume key
+key_ssave kSAV str !1 KEY_SSAVE 0624 ----- shifted save key
+key_ssuspend kSPD str !2 KEY_SSUSPEND 0625 ----- shifted suspend key
+key_sundo kUND str !3 KEY_SUNDO 0626 ----- shifted undo key
+req_for_input rfi str RF - - ----- send next input char (for ptys)
+key_f11 kf11 str F1 KEY_F(11) - ----E F11 function key
+key_f12 kf12 str F2 KEY_F(12) - ----E F12 function key
+key_f13 kf13 str F3 KEY_F(13) - ----E F13 function key
+key_f14 kf14 str F4 KEY_F(14) - ----E F14 function key
+key_f15 kf15 str F5 KEY_F(15) - ----E F15 function key
+key_f16 kf16 str F6 KEY_F(16) - ----E F16 function key
+key_f17 kf17 str F7 KEY_F(17) - ----E F17 function key
+key_f18 kf18 str F8 KEY_F(18) - ----E F18 function key
+key_f19 kf19 str F9 KEY_F(19) - ----E F19 function key
+key_f20 kf20 str FA KEY_F(20) - ----E F20 function key
+key_f21 kf21 str FB KEY_F(21) - ----E F21 function key
+key_f22 kf22 str FC KEY_F(22) - ----E F22 function key
+key_f23 kf23 str FD KEY_F(23) - ----E F23 function key
+key_f24 kf24 str FE KEY_F(24) - ----E F24 function key
+key_f25 kf25 str FF KEY_F(25) - ----E F25 function key
+key_f26 kf26 str FG KEY_F(26) - ----E F26 function key
+key_f27 kf27 str FH KEY_F(27) - ----E F27 function key
+key_f28 kf28 str FI KEY_F(28) - ----E F28 function key
+key_f29 kf29 str FJ KEY_F(29) - ----E F29 function key
+key_f30 kf30 str FK KEY_F(30) - ----E F30 function key
+key_f31 kf31 str FL KEY_F(31) - ----E F31 function key
+key_f32 kf32 str FM KEY_F(32) - ----E F32 function key
+key_f33 kf33 str FN KEY_F(33) - ----E F33 function key
+key_f34 kf34 str FO KEY_F(34) - ----E F34 function key
+key_f35 kf35 str FP KEY_F(35) - ----E F35 function key
+key_f36 kf36 str FQ KEY_F(36) - ----E F36 function key
+key_f37 kf37 str FR KEY_F(37) - ----E F37 function key
+key_f38 kf38 str FS KEY_F(38) - ----E F38 function key
+key_f39 kf39 str FT KEY_F(39) - ----E F39 function key
+key_f40 kf40 str FU KEY_F(40) - ----E F40 function key
+key_f41 kf41 str FV KEY_F(41) - ----E F41 function key
+key_f42 kf42 str FW KEY_F(42) - ----E F42 function key
+key_f43 kf43 str FX KEY_F(43) - ----E F43 function key
+key_f44 kf44 str FY KEY_F(44) - ----E F44 function key
+key_f45 kf45 str FZ KEY_F(45) - ----E F45 function key
+key_f46 kf46 str Fa KEY_F(46) - ----E F46 function key
+key_f47 kf47 str Fb KEY_F(47) - ----E F47 function key
+key_f48 kf48 str Fc KEY_F(48) - ----E F48 function key
+key_f49 kf49 str Fd KEY_F(49) - ----E F49 function key
+key_f50 kf50 str Fe KEY_F(50) - ----E F50 function key
+key_f51 kf51 str Ff KEY_F(51) - ----E F51 function key
+key_f52 kf52 str Fg KEY_F(52) - ----E F52 function key
+key_f53 kf53 str Fh KEY_F(53) - ----E F53 function key
+key_f54 kf54 str Fi KEY_F(54) - ----E F54 function key
+key_f55 kf55 str Fj KEY_F(55) - ----E F55 function key
+key_f56 kf56 str Fk KEY_F(56) - ----E F56 function key
+key_f57 kf57 str Fl KEY_F(57) - ----E F57 function key
+key_f58 kf58 str Fm KEY_F(58) - ----E F58 function key
+key_f59 kf59 str Fn KEY_F(59) - ----E F59 function key
+key_f60 kf60 str Fo KEY_F(60) - ----E F60 function key
+key_f61 kf61 str Fp KEY_F(61) - ----E F61 function key
+key_f62 kf62 str Fq KEY_F(62) - ----E F62 function key
+key_f63 kf63 str Fr KEY_F(63) - ----E F63 function key
+clr_bol el1 str cb - - ----- Clear to beginning of line
+clear_margins mgc str MC - - ----- clear right and left soft margins
+set_left_margin smgl str ML - - ----- set left soft margin at current column. See smgl. (ML is not in BSD termcap).
+set_right_margin smgr str MR - - ----- set right soft margin at current column
+device_type devt str dv - - ----- Indicate language/codeset support
+code_set_init csin str ci - - ----- Init sequence for multiple codesets
+set0_des_seq s0ds str s0 - - ----- Shift to codeset 0 (EUC set 0, ASCII)
+set1_des_seq s1ds str s1 - - ----- Shift to codeset 1
+set2_des_seq s2ds str s2 - - ----- Shift to codeset 2
+set3_des_seq s3ds str s3 - - ----- Shift to codeset 3
+key_mouse kmous str Km KEY_MOUSE 0631 ----- Mouse event has occurred
+mouse_info minfo str Mi - - ----- Mouse status information
+req_mouse_pos reqmp str RQ - - ----- Request mouse position
+get_mouse getm str Gm - - ----- Curses should get button events, parameter #1 not documented.
+release_mouse relm str Rm - - ----- Curses should release the mouse */
+color_names colornm str Yw - - ----- Give name for color #1
+initialize_color initc str Ic - - ----- initialize color #1 to (#2,#3,#4)
+initialize_pair initp str Ip - - ----- Initialize color pair #1 to fg=(#2,#3,#4), bg=(#5,#6,#7)
+orig_colors oc str oc - - ----- Set all color pairs to the original ones
+orig_pair op str op - - ----- Set default pair to its original value
+set_a_background setab str AB - - ----- Set background color to #1, using ANSI escape
+set_a_foreground setaf str AF - - ----- Set foreground color to #1, using ANSI escape
+set_background setb str Sb - - ----- Set background color #1
+set_color_pair scp str sp - - ----- Set current color pair to #1
+set_foreground setf str Sf - - ----- Set foreground color #1
+#%.TE
+#%.ad
+#%
+# The magic token below tells the tic compiler-generator code that all the caps
+# past it should be ignored (not written out) when dumping terminfo objects. It
+# also tells the man page table generator not to pass through following lines
+# This means we can have obsolete capabilities and pseudo-capabilities that are
+# recognized for termcap or terminfo compilation, but not output.
+#
+# %%-STOP-HERE-%%
+#
+# Don't move this casually! In fact, don't move it at all unless you're
+# either doing it to add System V or XPG4 extensions, or have decided you
+# don't care about SVr4 binary compatibility.
+#
+#############################################################################
+#
+# TERMCAP EXTENSION CAPABILITIES
+#
+# The capabilities below are either obsolete or extensions on certain systems.
+# They are not used by SVR4 terminfo. Some are used by captoinfo to translate
+# termcap sources; the rest are listed for completeness, and in case somebody
+# cares about them enough to hack in code that will translate them into
+# terminfo capabilities.
+#
+# The first part of the list is from Ross Ridge's `mytinfo' package
+# (comp.sources.unix, volume 26); the variable names and terminfo names (as
+# well as the termcap codes) match his list.
+#
+# This group of codes is not marked obsolete in 4.4BSD, but have no direct
+# terminfo equivalents. The rs capability is specially translated to terminfo
+# r2, and vice versa, if an entry does not already have an r2. Similarly,
+# i2 is translated to r3 if there is no r3 (because SV terminfo maps is to i2).
+# The ug capability is thrown away, but assumed to be whatever sg is if the
+# latter is nonzero and we're dumping in termcap format.
+#
+termcap_init2 OTi2 str i2 - - YB--- secondary initialization string
+termcap_reset OTrs str rs - - YB-G- terminal reset string
+magic_cookie_glitch_ul OTug num ug - - YBCGE number of blanks left by ul
+#
+# Obsolete termcap capabilities. Some are used for termcap translation. The
+# code uses the 'OT' prefix we put on obsolete capabilities to suppress
+# printing them in terminfo source dumps of compiled entries.
+#
+backspaces_with_bs OTbs bool bs - - YBCGE uses ^H to move left
+crt_no_scrolling OTns bool ns - - YBCG- crt cannot scroll
+no_correctly_working_cr OTnc bool nc - - YBCG- no way to go to start of line
+carriage_return_delay OTdC num dC - - YB-G- pad needed for CR
+new_line_delay OTdN num dN - - YB-G- pad needed for LF
+linefeed_if_not_lf OTnl str nl - - YBCGE use to move down
+backspace_if_not_bs OTbc str bc - - YBCGE move left, if not ^H
+#
+# GNU termcap library extensions. The GNU termcap file distributed with
+# Emacs no longer uses these, but MT showed up in pre-9.0 versions of the
+# BSD termcap file. The name clash with terminfo MT is resolved by type
+# info; MT is converted to km.
+#
+gnu_has_meta_key OTMT bool MT - - ----E has meta key
+# gnu_tab_width OTtw num tw - - ----E tab width in spaces
+#
+# GNU termcap *does* include the following extended capability, Only the
+# now-obsolete Ann Arbor terminals used it.
+#
+# gnu_change_scroll_region OTcS str cS - - ---GE alternate set scrolling region
+#
+# The following comments describe capnames so ancient that I believe no
+# software uses them any longer. Some of these have to go because they
+# clash with terminfo names in ways that cannot be resolved by type
+# information.
+#
+# These mytinfo codes are not used in the 4.4BSD curses code. They are
+# marked obsolete in the 4.4BSD manual pages.
+#
+# There is one conflict with terminfo; ma is in both. This conflict is
+# resolved by type information.
+#
+# The `ko' capability is translated by special code. It should contain a
+# comma-separated list of capabilities for which there are corresponding keys.
+# The `kn' code is accepted but ignored.
+#
+# The `ma' capability seems to have been designed to map between the rogue(2)
+# motion keys (including jkhl) and characters emitted by arrow keys on some
+# primitive pre-ANSI terminals. It's so obsolete it's fossilized...
+#
+# Here is a description of memory_lock_above and memory_unlock:
+# "You can 'freeze' data on the screen by turning on Memory Lock in a line of
+# text. All lines above the cursor's current line become locked in place on
+# the screen. Then enter data normally. When the screen fills up, any
+# further data entered forces the first line of unfrozen line text to scroll
+# under the frozen data. Lines scrolled off the screen are inserted into
+# memory immediately preceding the first frozen line." (from the HP 700/96
+# User's manual). VT100/ANSI memory lock set is \E[>2h, reset is \E[>2l.
+#
+# Applications that use terminfo are supposed to behave as though xr is
+# always true.
+#
+linefeed_is_newline OTNL bool NL - - YB--- move down with \n
+# even_parity OTEP bool EP - - -B--- terminal requires even parity
+# odd_parity OTOP bool OP - - -B--- terminal requires odd parity
+# half_duplex OTHD bool HD - - -B--- terminal is half-duplex
+# lower_case_only OTLC bool LC - - -B--- terminal has only lower case
+# upper_case_only OTUC bool UC - - -B--- terminal has only upper case
+backspace_delay OTdB num dB - - YB-G- padding required for ^H
+# form_feed_delay OTdF num dF - - -B-G- padding required for ^L
+horizontal_tab_delay OTdT num dT - - YB-G- padding required for ^I
+# vertical_tab_delay OTdV num dV - - -B--- padding required for ^V
+number_of_function_keys OTkn num kn - - -B-G- count of function keys
+other_non_function_keys OTko str ko - - -B-G- list of self-mapped keycaps
+arrow_key_map OTma str ma - - YBC-- map arrow keys rogue(1) motion keys
+# memory_lock_above OTml str ml - - -B--- lock visible screen memory above the current line
+# memory_unlock OTmu str mu - - -B--- unlock visible screen memory above the current line
+has_hardware_tabs OTpt bool pt - - YB--- has 8-char tabs invoked with ^I
+return_does_clr_eol OTxr bool xr - - YB--- return clears the line
+# tek_4025_insert_line OTxx bool xx - - -BC-- Tektronix 4025 insert-line glitch
+#
+# mytinfo described this as a termcap capability, but it's not listed in the
+# 4.4BSD man pages, and not found in the 4.4BSD termcap file. The ncurses
+# package, like System V, behaves as though it is always true.
+#
+# rind_only_at_top OTxq bool xq - - ----- reverse index only works from top line
+#
+# University of Waterloo termcap extensions (as described in mytinfo).
+# The `xl' termcap file clashes with a terminfo name; this ambiguity cannot
+# be resolved by a type check. The descriptions are guesses from what was
+# in the mytinfo tables.
+#
+# key_interrupt_char OTki str ki - - ----- string set by interrupt key (?)
+# key_kill_char OTkk str kk - - ----- string set by kill key (?)
+# key_suspend_char OTkz str kz - - ----- string set by suspend key (?)
+# initialization_messy OTxc bool xc - - ----- initialization leaves garbage on the screen (?)
+# ind_at_bottom_does_cr OTxl bool xl - - ----- index does a carriage return
+#
+# Nonstandard capabilities unique to Ross Ridge's `mytinfo' package.
+# SR clashes with a terminfo name; this ambiguity cannot be resolved by a type
+# check.
+#
+# scroll_left OTsl1 str Sl - - ----- scroll screen leftward
+# scroll_right OTsr1 str Sr - - ----- scroll screen rightward
+# parm_scroll_left OTsl str SL - - ----- scroll screen leftward #1 characters
+# parm_scroll_right OTsr str SR - - ----- scroll screen rightward #1 characters
+#
+# The mytinfo capabilities end here.
+#
+# XENIX extensions:
+#
+# Xenix defined its own set of forms-drawing capabilities:
+#
+# cap IBM ASCII description ACS ASCII
+# --- ----------- -------------------- ------------- ------
+# G1 191 \277 M-? single upper right ACS_URCORNER
+# G2 218 \332 M-Z single upper left ACS_ULCORNER
+# G3 192 \300 M-@ single lower left ACS_LLCORNER
+# G4 217 \331 M-Y single lower right ACS_LRCORNER
+# G5 187 \273 M-; double upper right
+# G6 201 \311 M-I double upper left
+# G7 200 \310 M-H double lower left
+# G8 188 \274 M-< double lower right
+# GC 197 \305 M-E single intersection ACS_PLUS _ _
+# GD 194 \302 M-B single down-tick ACS_TTEE |
+# GH 196 \304 M-D single horizontal line ACS_HLINE
+# GL 180 \264 M-4 single left tick ACS_RTEE -|
+# GR 195 \303 M-C single right tick ACS_LTEE |-
+# GU 193 \301 M-A single up tick ACS_BTEE _|_
+# GV 179 \263 M-3 single vertical line ACS_VLINE
+# Gc 206 \316 M-N double intersection
+# Gd 203 \313 M-K double down tick
+# Gh 205 \315 M-M double horizontal line
+# Gl 204 \204 M-L double left tick
+# Gr 185 \271 M-9 double right tick
+# Gu 202 \312 M-J double up tick
+# Gv 186 \272 M-: double vertical line
+#
+# The compiler will translate the single-line caps and discard the others
+# (via IGNORE aliases further down). We don't want to do normal pad
+# translation on these, they're often single-character printable ASCII
+# strings that happen to be numerics. There's awk code in parametrized.sh
+# that detects the acs_ prefix and uses it to suppress pad translation.
+# These terminfo names are invented.
+#
+acs_ulcorner OTG2 str G2 - - ----- single upper left
+acs_llcorner OTG3 str G3 - - ----- single lower left
+acs_urcorner OTG1 str G1 - - ----- single upper right
+acs_lrcorner OTG4 str G4 - - ----- single lower right
+acs_ltee OTGR str GR - - ----- tee pointing right
+acs_rtee OTGL str GL - - ----- tee pointing left
+acs_btee OTGU str GU - - ----- tee pointing up
+acs_ttee OTGD str GD - - ----- tee pointing down
+acs_hline OTGH str GH - - ----- single horizontal line
+acs_vline OTGV str GV - - ----- single vertical line
+acs_plus OTGC str GC - - ----- single intersection
+#
+#############################################################################
+#
+# TERMINFO EXTENSION CAPABILITIES
+#
+# This section is almost all comments. What it's mainly for is to describe
+# what capabilities need to be squeezed out to get down to the XSI Curses
+# standard set. They are flagged with K.
+#
+# HP extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in HP
+# terminfo files. Except for memory_lock and memory_unlock, they are
+# functionally identical to SVr4 extensions, but they make the binary format
+# different. Grrr....
+#
+memory_lock meml str ml - - ----K memory lock above
+memory_unlock memu str mu - - ----K memory unlock
+#plab_norm pln str pn - - ----- program label #1 to show string #2
+#label_on smln str LO - - ----- turn on soft labels
+#label_off rmln str LF - - ----- turn off soft labels
+#key_f11 kf11 str F1 - - ----- F11 function key
+#key_f12 kf12 str F2 - - ----- F12 function key
+#key_f13 kf13 str F3 - - ----- F13 function key
+#key_f14 kf14 str F4 - - ----- F14 function key
+#key_f15 kf15 str F5 - - ----- F15 function key
+#key_f16 kf16 str F6 - - ----- F16 function key
+#key_f17 kf17 str F7 - - ----- F17 function key
+#key_f18 kf18 str F8 - - ----- F18 function key
+#key_f19 kf19 str F9 - - ----- F19 function key
+#key_f20 kf20 str FA - - ----- F20 function key
+#key_f21 kf21 str FB - - ----- F21 function key
+#key_f22 kf22 str FC - - ----- F22 function key
+#key_f23 kf23 str FD - - ----- F23 function key
+#key_f24 kf24 str FE - - ----- F24 function key
+#key_f25 kf25 str FF - - ----- F25 function key
+#key_f26 kf26 str FG - - ----- F26 function key
+#key_f27 kf27 str FH - - ----- F27 function key
+#key_f28 kf28 str FI - - ----- F28 function key
+#key_f29 kf29 str FJ - - ----- F29 function key
+#key_f30 kf30 str FK - - ----- F30 function key
+#key_f31 kf31 str FL - - ----- F31 function key
+#key_f32 kf32 str FM - - ----- F32 function key
+#key_f33 kf33 str FN - - ----- F33 function key
+#key_f34 kf34 str FO - - ----- F34 function key
+#key_f35 kf35 str FP - - ----- F35 function key
+#key_f36 kf36 str FQ - - ----- F36 function key
+#key_f37 kf37 str FR - - ----- F37 function key
+#key_f38 kf38 str FS - - ----- F38 function key
+#key_f39 kf39 str FT - - ----- F39 function key
+#key_f40 kf40 str FU - - ----- F40 function key
+#key_f41 kf41 str FV - - ----- F41 function key
+#key_f42 kf42 str FW - - ----- F42 function key
+#key_f43 kf43 str FX - - ----- F43 function key
+#key_f44 kf44 str FY - - ----- F44 function key
+#key_f45 kf45 str FZ - - ----- F45 function key
+#key_f46 kf46 str Fa - - ----- F46 function key
+#key_f47 kf47 str Fb - - ----- F47 function key
+#key_f48 kf48 str Fc - - ----- F48 function key
+#key_f49 kf49 str Fd - - ----- F49 function key
+#key_f50 kf50 str Fe - - ----- F50 function key
+#key_f51 kf51 str Ff - - ----- F51 function key
+#key_f52 kf52 str Fg - - ----- F52 function key
+#key_f53 kf53 str Fh - - ----- F53 function key
+#key_f54 kf54 str Fi - - ----- F54 function key
+#key_f55 kf55 str Fj - - ----- F55 function key
+#key_f56 kf56 str Fk - - ----- F56 function key
+#key_f57 kf57 str Fl - - ----- F57 function key
+#key_f58 kf58 str Fm - - ----- F58 function key
+#key_f59 kf59 str Fn - - ----- F59 function key
+#key_f60 kf60 str Fo - - ----- F60 function key
+#key_f61 kf61 str Fp - - ----- F61 function key
+#key_f62 kf62 str Fq - - ----- F62 function key
+#key_f63 kf63 str Fr - - ----- F63 function key
+#
+# IBM extensions
+#
+# These extensions follow ptr_non (replacing everything after it) in IBM
+# terminfo files.
+#
+# The places in the box[12] capabilities correspond to acsc characters, here is
+# the mapping:
+#
+# box1[0] = ACS_ULCORNER
+# box1[1] = ACS_HLINE
+# box1[2] = ACS_URCORNER
+# box1[3] = ACS_VLINE
+# box1[4] = ACS_LRCORNER
+# box1[5] = ACS_LLCORNER
+# box1[6] = ACS_TTEE
+# box1[7] = ACS_RTEE
+# box1[8] = ACS_BTEE
+# box1[9] = ACS_LTEE
+# box1[10] = ACS_PLUS
+#
+# The box2 characters are the double-line versions of these forms graphics.
+#
+box_chars_1 box1 str bx - - ----K box characters primary set
+#box_chars_2 box2 str by - - ----K box characters secondary set
+#box_attr_1 batt1 str Bx - - ----K attributes for box1
+#box_attr_2 batt2 str By - - ----K attributes for box2
+#color_bg_0 colb0 str d0 - - ----K background color 0
+#color_bg_1 colb1 str d1 - - ----K background color 1
+#color_bg_2 colb2 str d2 - - ----K background color 2
+#color_bg_3 colb3 str d3 - - ----K background color 3
+#color_bg_4 colb4 str d4 - - ----K background color 4
+#color_bg_5 colb5 str d5 - - ----K background color 5
+#color_bg_6 colb6 str d6 - - ----K background color 6
+#color_bg_7 colb7 str d7 - - ----K background color 7
+#color_fg_0 colf0 str c0 - - ----K foreground color 0
+#color_fg_1 colf1 str c1 - - ----K foreground color 1
+#color_fg_2 colf2 str c2 - - ----K foreground color 2
+#color_fg_3 colf3 str c3 - - ----K foreground color 3
+#color_fg_4 colf4 str c4 - - ----K foreground color 4
+#color_fg_5 colf5 str c5 - - ----K foreground color 5
+#color_fg_6 colf6 str c6 - - ----K foreground color 6
+#color_fg_7 colf7 str c7 - - ----K foreground color 7
+#font_0 font0 str f0 - - ----- select font 0
+#font_1 font1 str f1 - - ----- select font 1
+#font_2 font2 str f2 - - ----- select font 2
+#font_3 font3 str f3 - - ----- select font 3
+#font_4 font4 str f4 - - ----K select font 4
+#font_5 font5 str f5 - - ----K select font 5
+#font_6 font6 str f6 - - ----K select font 6
+#font_7 font7 str f7 - - ----K select font 7
+#key_back_tab kbtab str k0 - - ----- backtab key
+#key_do kdo str ki - - ----K do request key
+#key_command kcmd str kd - - ----K command-request key
+#key_command_pane kcpn str kW - - ----K command-pane key
+#key_end kend str kw - - ----- end key
+#key_help khlp str kq - - ----- help key
+#key_newline knl str nl - - ----K newline key
+#key_next_pane knpn str kv - - ----K next-pane key
+#key_prev_cmd kppn str kp - - ----K previous-command key
+#key_prev_pane kppn str kV - - ----K previous-pane key
+#key_quit kquit str kQ - - ----K quit key
+#key_select ksel str kU - - ----- select key
+#key_scroll_left kscl str kz - - ----K scroll left
+#key_scroll_right kscr str kZ - - ----K scroll right
+#key_tab ktab str ko - - ----K tab key
+#key_smap_in1 kmpf1 str Kv - - ----K special mapped key 1 input
+#key_smap_out1 kmpt1 str KV - - ----K special mapped key 1 output
+#key_smap_in2 kmpf2 str Kw - - ----K special mapped key 2 input
+#key_smap_out2 kmpt2 str KW - - ----K special mapped key 2 output
+#key_smap_in3 kmpf3 str Kx - - ----K special mapped key 3 input
+#key_smap_out3 kmpt3 str KX - - ----K special mapped key 3 output
+#key_smap_in4 kmpf4 str Ky - - ----K special mapped key 4 input
+#key_smap_out4 kmpt4 str KY - - ----K special mapped key 4 output
+#key_smap_in5 kmpf5 str Kz - - ----K special mapped key 5 input
+#key_smap_out5 kmpt5 str KZ - - ----K special mapped key 5 output
+#appl_defined_str apstr str za - - ----K application-defined string
+# The key_smap_in[6789] and key_smap_out[6789] capabilities aren't described in
+# the IBM manual pages, so the cap name strings are guesses. The terminfo
+# names are almost certainly right, the termcap ones almost certainly wrong.
+#key_smap_in6 kmpf6 str k! - - ----K special mapped key 6 input
+#key_smap_out6 kmpt6 str K@ - - ----K special mapped key 6 output
+#key_smap_in7 kmpf7 str k# - - ----K special mapped key 7 input
+#key_smap_out7 kmpt7 str K$ - - ----K special mapped key 7 output
+#key_smap_in8 kmpf8 str k% - - ----K special mapped key 8 input
+#key_smap_out8 kmpt8 str K^ - - ----K special mapped key 8 output
+#key_smap_in9 kmpf9 str k& - - ----K special mapped key 9 input
+#key_smap_out9 kmpt9 str K* - - ----K special mapped key 9 output
+# Undocumented capabilities end here
+#key_sf1 ksf1 str S1 - - ----K special function key 1
+#key_sf2 ksf2 str S2 - - ----K special function key 2
+#key_sf3 ksf3 str S3 - - ----K special function key 3
+#key_sf4 ksf4 str S4 - - ----K special function key 4
+#key_sf5 ksf5 str S5 - - ----K special function key 5
+#key_sf6 ksf6 str S6 - - ----K special function key 6
+#key_sf7 ksf7 str S7 - - ----K special function key 7
+#key_sf8 ksf8 str S8 - - ----K special function key 8
+#key_sf9 ksf9 str S9 - - ----K special function key 9
+#key_sf10 ksf10 str SA - - ----K special function key 10
+# AIX version 3 documents different codes for F11, F12 and does not mention
+# F13-F64. AIX version 4 uses the same naming for F0-F63 as above.
+#key_f11 kf11 str k< - - ----- function key 11
+#key_f12 kf12 str k> - - ----- function key 12
+# Undocumented capabilities end here.
+#key_action kact str kJ - - ----K sent by action key
+# The IBM docs say these capabilities are for table-drawing, and are
+# valid only for aixterm descriptions.
+#enter_topline_mode topl str tp - - ----K start top-line mode
+#enter_bottom_mode btml str bm - - ----K start bottom-line mode
+#enter_rvert_mode rvert str rv - - ----K start right-vertical mode
+#enter_lvert_mode lvert str lv - - ----K start left-vertical mode
+#
+#############################################################################
+#
+# ALIAS DECLARATIONS
+#
+# Here we set up aliases for translating extensions into standard terminfo.
+#
+#---------------------------------- Termcap aliases -------------------------
+#
+# BSD aliases:
+#
+# This is a common error in many termcap files. We'll get notified during
+# translation when this (or any other alias) fires.
+#
+capalias sb sr BSD scroll text down
+#
+# AT&T extensions:
+#
+# The old AT&T 5410, 5420, 5425, pc6300plus, 610, and s4 entries used a set of
+# nonstandard capabilities. Its signature is the KM capability, used to name
+# some sort of keymap file. EE, BO, CI, CV, XS, DS, FL and FE are in this
+# set. Comments in the original, and a little cross-checking with other AT&T
+# documentation, seem to establish the following mappings:
+#
+capalias BO mr AT&T enter_reverse_mode
+capalias CI vi AT&T cursor_invisible
+capalias CV ve AT&T cursor_normal
+capalias DS mh AT&T enter_dim_mode
+#capalias EE me AT&T exit_attribute_mode
+capalias FE LF AT&T label_on
+capalias FL LO AT&T label_off
+capalias XS mk AT&T enter_secure_mode
+#
+# We comment out EE because the conflicting XENIX EE is more common in
+# old entries.
+#
+# XENIX extensions:
+#
+# These are the ones we know how to translate directly:
+#
+capalias EE mh XENIX exit_attribute_mode
+capalias GE ae XENIX exit_alt_charset_mode
+capalias GS as XENIX enter_alt_charset_mode
+capalias CF vi XENIX cursor_invis
+capalias CO ve XENIX cursor_normal
+capalias EN @7 XENIX key_end
+capalias HM kh XENIX key_home
+capalias LD kL XENIX key_dl
+capalias PD kN XENIX key_npage
+capalias PN po XENIX prtr_off
+capalias PS pf XENIX prtr_on
+capalias PU kP XENIX key_ppage
+capalias RT @8 XENIX kent
+capalias UP ku XENIX kcuu1
+capalias G6 IGNORE XENIX double-ACS_ULCORNER
+capalias G7 IGNORE XENIX double-ACS_LLCORNER
+capalias G5 IGNORE XENIX double-ACS_URCORNER
+capalias G8 IGNORE XENIX double-ACS_LRCORNER
+capalias Gr IGNORE XENIX double-ACS_LTEE
+capalias Gr IGNORE XENIX double-ACS_RTEE
+capalias Gu IGNORE XENIX double-ACS_BTEE
+capalias Gd IGNORE XENIX double ACS_TTEE
+capalias Gh IGNORE XENIX double-ACS_HLINE
+capalias Gv IGNORE XENIX double-ACS_VLINE
+capalias Gc IGNORE XENIX double-ACS_PLUS
+capalias GG IGNORE XENIX acs-glitch
+#
+# IBM extensions:
+#
+capalias kq %1 IBM key_help
+#
+# Iris extensions:
+#
+capalias HS mh IRIS enter_dim_mode
+#
+# Tektronix extensions:
+#
+capalias KA k; Tek key_f10
+capalias KB F1 Tek key_f11
+capalias KC F2 Tek key_f12
+capalias KD F3 Tek key_f13
+capalias KE F4 Tek key_f14
+capalias KF F5 Tek key_f15
+capalias BC Sb Tek set_background
+capalias FC Sf Tek set_foreground
+#
+# There are also the following:
+#
+# XENIX XENIX variable name name clash with terminfo?
+# ----- ------------------- -------------------------
+# CL key_char_left
+# CR key_char_right
+# CW key_change_window
+# HP ??
+# LF key_linefeed label_off
+# NU key_next_unlocked_cell
+# PL ??
+# PR ??
+# RC key_recalc remove_clock
+# RF key_toggle_ref req_for_input
+# WL key_word_left
+# WR key_word_right
+#
+# If you know what any of the question-marked ones mean, please tell us.
+#
+#--------------------------------- Terminfo aliases ------------------------
+#
+# IBM extensions:
+#
+infoalias font0 s0ds IBM set0_des_seq
+infoalias font1 s1ds IBM set1_des_seq
+infoalias font2 s2ds IBM set2_des_seq
+infoalias font3 s3ds IBM set3_des_seq
+infoalias kbtab kcbt IBM key_backtab
+infoalias ksel kslt IBM key_select
+#
+# Some others are identical to SVr4/XPG4 capabilities, in particular:
+# kcmd, kend, khlp, and kf11...kf63.
+#
+#############################################################################
+#
+# The following sets edit modes for GNU EMACS
+# Local Variables:
+# case-fold-search:nil
+# truncate-lines:t
+# End:
diff --git a/Build/source/libs/ncurses/include/MKhashsize.sh b/Build/source/libs/ncurses/include/MKhashsize.sh
new file mode 100755
index 00000000000..d11d7bf23c8
--- /dev/null
+++ b/Build/source/libs/ncurses/include/MKhashsize.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# MKhashsize.sh --- generate size include for hash functions
+#
+echo "/*"
+echo " * hashsize.h -- hash and token table constants"
+echo " */"
+
+CAPS="${1-Caps}"
+TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
+
+echo ""
+echo "#define CAPTABSIZE ${TABSIZE}"
+echo "#define HASHTABSIZE (${TABSIZE} * 2)"
diff --git a/Build/source/libs/ncurses/include/MKkey_defs.sh b/Build/source/libs/ncurses/include/MKkey_defs.sh
new file mode 100755
index 00000000000..b3cb4f7f72c
--- /dev/null
+++ b/Build/source/libs/ncurses/include/MKkey_defs.sh
@@ -0,0 +1,182 @@
+#! /bin/sh
+# $Id: MKkey_defs.sh,v 1.14 2003/12/06 17:10:09 tom Exp $
+##############################################################################
+# Copyright (c) 2001-2002,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# MKkey_defs.sh -- generate function-key definitions for curses.h
+#
+# Author: Thomas E. Dickey 2001
+#
+# Extract function-key definitions from the Caps file
+#
+: ${AWK-awk}
+DATA=${1-Caps}
+
+data=data$$
+pass1=pass1_$$
+pass2=pass2_$$
+pass3=pass3_$$
+pass4=pass4_$$
+trap 'rm -f $data pass[1234]_$$' 0 1 2 5 15
+
+# change repeated tabs (used for readability) to single tabs (needed to make
+# awk see the right field alignment of the corresponding columns):
+if sort -k 6 $DATA >$data 2>/dev/null
+then
+ # POSIX
+ sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n -k 6 >$data
+elif sort -n +5 $DATA >$data 2>/dev/null
+then
+ # SunOS (and SVr4, marked as obsolete but still recognized)
+ sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n +5 >$data
+else
+ echo "Your sort utility is broken. Please install one that works." >&2
+ exit 1
+fi
+
+# add keys that we generate automatically:
+cat >>$data <<EOF
+key_resize kr1 str R1 KEY_RESIZE + ----- Terminal resize event
+key_event kv1 str V1 KEY_EVENT + ----- We were interrupted by an event
+EOF
+
+cat <<EOF
+/*
+ * These definitions were generated by $0 $DATA
+ */
+EOF
+
+# KEY_RESET
+maxkey=345
+
+for pass in 1 2 3 4
+do
+
+output=pass${pass}_$$
+
+${AWK-awk} >$output <$data '
+function print_cols(text,cols) {
+ printf "%s", text
+ len = length(text);
+ while (len < cols) {
+ printf " "
+ len += 8;
+ }
+}
+function decode(keycode) {
+ result = 0;
+ if (substr(keycode, 1, 2) == "0x") {
+ digits="0123456789abcdef";
+ } else if (substr(keycode, 1, 1) == "0") {
+ digits="01234567";
+ } else {
+ digits="0123456789";
+ }
+ while (length(keycode) != 0) {
+ digit=substr(keycode, 1, 1);
+ keycode=substr(keycode, 2);
+ result = result * length(digits) + index(digits, digit) - 1;
+ }
+ return result;
+}
+
+BEGIN {
+ maxkey='$maxkey';
+ pass='$pass';
+ key_max=1;
+ bits=1;
+ while (key_max < maxkey) {
+ bits = bits + 1;
+ key_max = (key_max * 2) + 1;
+ }
+ octal_fmt = sprintf ("%%0%do", (bits + 2) / 3 + 1);
+}
+
+/^$/ {next;}
+/^#/ {next;}
+/^capalias/ {next;}
+/^infoalias/ {next;}
+
+$5 != "-" && $6 != "-" {
+ if ($6 == "+") {
+ if (pass == 1 || pass == 2)
+ next;
+ thiskey=maxkey + 1;
+ } else {
+ if (pass == 3)
+ next;
+ thiskey=decode($6);
+ }
+ if (thiskey > maxkey)
+ maxkey = thiskey;
+ if (pass == 2 || pass == 3) {
+ showkey=sprintf(octal_fmt, thiskey);
+ if ($5 == "KEY_F(0)" ) {
+ printf "#define "
+ print_cols("KEY_F0", 16);
+ print_cols(showkey, 16);
+ print "/* Function keys. Space for 64 */";
+ printf "#define "
+ print_cols("KEY_F(n)", 16);
+ print_cols("(KEY_F0+(n))", 16);
+ print "/* Value of function key n */"
+ } else {
+ printf "#define "
+ print_cols($5, 16);
+ print_cols(showkey, 16);
+ printf "/*"
+ for (i = 8; i <= NF; i++)
+ printf " %s", $i
+ print " */"
+ }
+ }
+ }
+END {
+ if (pass == 1) {
+ print maxkey;
+ } else if (pass == 4) {
+ print "";
+ printf "#define ";
+ print_cols("KEY_MAX", 16);
+ result = sprintf (octal_fmt, key_max);
+ print_cols(result, 16);
+ printf "/* Maximum key value is ";
+ printf octal_fmt, maxkey;
+ print " */";
+ }
+ }
+'
+if test $pass = 1 ; then
+ maxkey=`cat $pass1`
+fi
+
+done
+
+cat $pass2
+cat $pass3
+cat $pass4
diff --git a/Build/source/libs/ncurses/include/MKncurses_def.sh b/Build/source/libs/ncurses/include/MKncurses_def.sh
new file mode 100755
index 00000000000..4aac86554b5
--- /dev/null
+++ b/Build/source/libs/ncurses/include/MKncurses_def.sh
@@ -0,0 +1,80 @@
+#! /bin/sh
+# $Id: MKncurses_def.sh,v 1.2 2003/10/25 16:19:46 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. #
+##############################################################################
+#
+# MKncurses_def.sh -- generate fallback definitions for ncurses_cfg.h
+#
+# Author: Thomas E. Dickey 2000
+#
+# Given the choice between constructs such as
+#
+# #if defined(foo) && foo
+# #if foo
+#
+# we chose the latter. It is guaranteed by the language standard, and there
+# appear to be no broken compilers that do not honor that detail. But some
+# people want to use gcc's -Wundef option (corresponding to one of the less
+# useful features in Watcom's compiler) to check for misspellings. So we
+# generate a set of fallback definitions to quiet the warnings without making
+# the code ugly.
+#
+DEFS="${1-ncurses_defs}"
+cat <<EOF
+/*
+ * This file is generated by $0
+ */
+
+#ifndef NC_DEFINE_H
+#define NC_DEFINE_H 1
+
+EOF
+
+${AWK-awk} <$DEFS '
+!/^[@#]/ {
+ if ( NF == 1 )
+ {
+ print "#ifndef", $1
+ print "#define", $1, "0"
+ print "#endif"
+ print ""
+ } else if ( NF != 0 ) {
+ print "#ifndef", $1
+ printf "#define"
+ for (n = 1; n <= NF; n++) {
+ printf " %s", $n
+ }
+ print ""
+ print "#endif"
+ print ""
+ }
+}
+END {
+print "#endif /* NC_DEFINE_H */"
+ }
+'
diff --git a/Build/source/libs/ncurses/include/MKparametrized.sh b/Build/source/libs/ncurses/include/MKparametrized.sh
new file mode 100755
index 00000000000..4c336552981
--- /dev/null
+++ b/Build/source/libs/ncurses/include/MKparametrized.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+# $Id: MKparametrized.sh,v 1.5 2000/10/01 00:57:24 tom Exp $
+#
+# MKparametrized.sh -- generate indirection vectors for various sort methods
+#
+# The output of this script is C source for an array specifying whether
+# termcap strings should undergo parameter and padding translation.
+#
+CAPS="${1-Caps}"
+cat <<EOF
+/*
+ * parametrized.h --- is a termcap capability parametrized?
+ *
+ * Note: this file is generated using MKparametrized.sh, do not edit by hand.
+ * A value of -1 in the table means suppress both pad and % translations.
+ * A value of 0 in the table means do pad but not % translations.
+ * A value of 1 in the table means do both pad and % translations.
+ */
+
+static short const parametrized[] = {
+EOF
+
+# We detect whether % translations should be done by looking for #[0-9] in the
+# description field. We presently suppress padding translation only for the
+# XENIX acs_* capabilities. Maybe someday we'll dedicate a flag field for
+# this, that would be cleaner....
+
+${AWK-awk} <$CAPS '
+$3 != "str" {next;}
+$1 ~ /^acs_/ {print "-1,\t/* ", $2, " */"; count++; next;}
+$0 ~ /#[0-9]/ {print "1,\t/* ", $2, " */"; count++; next;}
+ {print "0,\t/* ", $2, " */"; count++;}
+END {printf("} /* %d entries */;\n\n", count);}
+'
+
diff --git a/Build/source/libs/ncurses/include/MKterm.h.awk.in b/Build/source/libs/ncurses/include/MKterm.h.awk.in
new file mode 100644
index 00000000000..6cf0445cbb3
--- /dev/null
+++ b/Build/source/libs/ncurses/include/MKterm.h.awk.in
@@ -0,0 +1,311 @@
+BEGIN {
+ print "/****************************************************************************"
+ print " * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *"
+ print " * *"
+ print " * Permission is hereby granted, free of charge, to any person obtaining a *"
+ print " * copy of this software and associated documentation files (the *"
+ print " * \"Software\"), to deal in the Software without restriction, including *"
+ print " * without limitation the rights to use, copy, modify, merge, publish, *"
+ print " * distribute, distribute with modifications, sublicense, and/or sell *"
+ print " * copies of the Software, and to permit persons to whom the Software is *"
+ print " * furnished to do so, subject to the following conditions: *"
+ print " * *"
+ print " * The above copyright notice and this permission notice shall be included *"
+ print " * in all copies or substantial portions of the Software. *"
+ print " * *"
+ print " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS *"
+ print " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *"
+ print " * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *"
+ print " * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *"
+ print " * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *"
+ print " * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *"
+ print " * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *"
+ print " * *"
+ print " * Except as contained in this notice, the name(s) of the above copyright *"
+ print " * holders shall not be used in advertising or otherwise to promote the *"
+ print " * sale, use or other dealings in this Software without prior written *"
+ print " * authorization. *"
+ print " ****************************************************************************/"
+ print ""
+ print "/****************************************************************************/"
+ print "/* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */"
+ print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
+ print "/* and: Thomas E. Dickey 1995-2003 */"
+ print "/****************************************************************************/"
+ print ""
+ print "/* $Id: MKterm.h.awk.in,v 1.42 2003/12/27 19:09:16 tom Exp $ */"
+ print ""
+ print "/*"
+ print "** term.h -- Definition of struct term"
+ print "*/"
+ print ""
+ print "#ifndef NCURSES_TERM_H_incl"
+ print "#define NCURSES_TERM_H_incl 1"
+ print ""
+ print "#undef NCURSES_VERSION"
+ print "#define NCURSES_VERSION \"@NCURSES_MAJOR@.@NCURSES_MINOR@\""
+ print ""
+ print "#include <ncurses_dll.h>"
+ print ""
+ print "#ifdef __cplusplus"
+ print "extern \"C\" {"
+ print "#endif"
+ print ""
+ print "/* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H"
+ print " * definition (based on the system for which this was configured)."
+ print " */"
+ print ""
+ print "#undef HAVE_TERMIOS_H"
+ print "#define HAVE_TERMIOS_H 1/*default*/"
+ print ""
+ print "#undef HAVE_TCGETATTR"
+ print "#define HAVE_TCGETATTR 1/*default*/"
+ print ""
+ print "#undef NCURSES_CONST"
+ print "#define NCURSES_CONST @NCURSES_CONST@"
+ print ""
+ print "#undef NCURSES_XNAMES"
+ print "#define NCURSES_XNAMES @NCURSES_XNAMES@"
+ print ""
+ print "/* We will use these symbols to hide differences between"
+ print " * termios/termio/sgttyb interfaces."
+ print " */"
+ print "#undef TTY"
+ print "#undef SET_TTY"
+ print "#undef GET_TTY"
+ print ""
+ print "/* Assume POSIX termio if we have the header and function */"
+ print "#if HAVE_TERMIOS_H && HAVE_TCGETATTR"
+ print ""
+ print "#undef TERMIOS"
+ print "#define TERMIOS 1"
+ print ""
+ print "#include <termios.h>"
+ print "#define TTY struct termios"
+ print ""
+ print "#else /* !HAVE_TERMIOS_H */"
+ print ""
+ print "#if HAVE_TERMIO_H"
+ print ""
+ print "#undef TERMIOS"
+ print "#define TERMIOS 1"
+ print ""
+ print "#include <termio.h>"
+ print "#define TTY struct termio"
+ print ""
+ print "/* Add definitions to make termio look like termios."
+ print " * But ifdef it, since there are some implementations"
+ print " * that try to do this for us in a fake <termio.h>."
+ print " */"
+ print "#ifndef TCSANOW"
+ print "#define TCSANOW TCSETA"
+ print "#endif"
+ print "#ifndef TCSADRAIN"
+ print "#define TCSADRAIN TCSETAW"
+ print "#endif"
+ print "#ifndef TCSAFLUSH"
+ print "#define TCSAFLUSH TCSETAF"
+ print "#endif"
+ print "#ifndef tcsetattr"
+ print "#define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)"
+ print "#endif"
+ print "#ifndef tcgetattr"
+ print "#define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)"
+ print "#endif"
+ print "#ifndef cfgetospeed"
+ print "#define cfgetospeed(t) ((t)->c_cflag & CBAUD)"
+ print "#endif"
+ print "#ifndef TCIFLUSH "
+ print "#define TCIFLUSH 0"
+ print "#endif"
+ print "#ifndef TCOFLUSH "
+ print "#define TCOFLUSH 1"
+ print "#endif"
+ print "#ifndef TCIOFLUSH "
+ print "#define TCIOFLUSH 2"
+ print "#endif"
+ print "#ifndef tcflush"
+ print "#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)"
+ print "#endif"
+ print ""
+ print "#else /* !HAVE_TERMIO_H */"
+ print ""
+ print "#undef TERMIOS"
+ print "#include <sgtty.h>"
+ print "#include <sys/ioctl.h>"
+ print "#define TTY struct sgttyb"
+ print ""
+ print "#endif /* HAVE_TERMIO_H */"
+ print ""
+ print "#endif /* HAVE_TERMIOS_H */"
+ print ""
+ print "#ifdef TERMIOS"
+ print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
+ print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
+ print "#else"
+ print "#define GET_TTY(fd, buf) gtty(fd, buf)"
+ print "#define SET_TTY(fd, buf) stty(fd, buf)"
+ print "#endif"
+ print ""
+ print "#define NAMESIZE 256"
+ print ""
+ print "#define CUR cur_term->type."
+ print ""
+ }
+
+$2 == "%%-STOP-HERE-%%" {
+ print ""
+ printf "#define BOOLWRITE %d\n", BoolCount
+ printf "#define NUMWRITE %d\n", NumberCount
+ printf "#define STRWRITE %d\n", StringCount
+ print ""
+ print "/* older synonyms for some capabilities */"
+ print "#define beehive_glitch no_esc_ctlc"
+ print "#define teleray_glitch dest_tabs_magic_smso"
+ print "#define micro_char_size micro_col_size"
+ print ""
+ print "#ifdef __INTERNAL_CAPS_VISIBLE"
+ }
+
+/^#/ {next;}
+
+$1 == "acs_chars" {acsindex = StringCount}
+
+$3 == "bool" {
+ printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
+ }
+
+$3 == "num" {
+ printf "#define %-30s CUR Numbers[%d]\n", $1, NumberCount++
+ }
+
+$3 == "str" {
+ printf "#define %-30s CUR Strings[%d]\n", $1, StringCount++
+ }
+
+END {
+ print "#endif /* __INTERNAL_CAPS_VISIBLE */"
+ print ""
+ print ""
+ print "/*"
+ print " * Predefined terminfo array sizes"
+ print " */"
+ printf "#define BOOLCOUNT %d\n", BoolCount
+ printf "#define NUMCOUNT %d\n", NumberCount
+ printf "#define STRCOUNT %d\n", StringCount
+ print ""
+ print "/* used by code for comparing entries */"
+ print "#define acs_chars_index ", acsindex
+ print ""
+ print "typedef struct termtype { /* in-core form of terminfo data */"
+ print " char *term_names; /* str_table offset of term names */"
+ print " char *str_table; /* pointer to string table */"
+ print " char *Booleans; /* array of boolean values */"
+ print " short *Numbers; /* array of integer values */"
+ print " char **Strings; /* array of string offsets */"
+ print ""
+ print "#if NCURSES_XNAMES"
+ print " char *ext_str_table; /* pointer to extended string table */"
+ print " char **ext_Names; /* corresponding names */"
+ print ""
+ print " unsigned short num_Booleans;/* count total Booleans */"
+ print " unsigned short num_Numbers; /* count total Numbers */"
+ print " unsigned short num_Strings; /* count total Strings */"
+ print ""
+ print " unsigned short ext_Booleans;/* count extensions to Booleans */"
+ print " unsigned short ext_Numbers; /* count extensions to Numbers */"
+ print " unsigned short ext_Strings; /* count extensions to Strings */"
+ print "#endif /* NCURSES_XNAMES */"
+ print ""
+ print "} TERMTYPE;"
+ print ""
+ print "typedef struct term { /* describe an actual terminal */"
+ print " TERMTYPE type; /* terminal type description */"
+ print " short Filedes; /* file description being written to */"
+ print " TTY Ottyb, /* original state of the terminal */"
+ print " Nttyb; /* current state of the terminal */"
+ print " int _baudrate; /* used to compute padding */"
+ print " char * _termname; /* used for termname() */"
+ print "} TERMINAL;"
+ print ""
+ print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
+ print ""
+ print "#if BROKEN_LINKER"
+ print "#define boolnames _nc_boolnames()"
+ print "#define boolcodes _nc_boolcodes()"
+ print "#define boolfnames _nc_boolfnames()"
+ print "#define numnames _nc_numnames()"
+ print "#define numcodes _nc_numcodes()"
+ print "#define numfnames _nc_numfnames()"
+ print "#define strnames _nc_strnames()"
+ print "#define strcodes _nc_strcodes()"
+ print "#define strfnames _nc_strfnames()"
+ print ""
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolnames (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolcodes (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolfnames (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numnames (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numcodes (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numfnames (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strnames (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strcodes (void);"
+ print "extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strfnames (void);"
+ print ""
+ print "#else"
+ print ""
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];"
+ print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];"
+ print ""
+ print "#endif"
+ print ""
+ print "/* internals */"
+ print "extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);"
+ print "extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);"
+ print "extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);"
+ print "extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);"
+ print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
+ print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
+ print "extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const);"
+ print "extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);"
+ print ""
+ print "/* entry points */"
+ print "extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);"
+ print "extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);"
+ print ""
+ print "/* miscellaneous entry points */"
+ print "extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);"
+ print "extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *);"
+ print ""
+ print "/* terminfo entry points, also declared in curses.h */"
+ print "#if !defined(__NCURSES_H)"
+ print "extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);"
+ print "extern NCURSES_EXPORT_VAR(char) ttytype[];"
+ print "extern NCURSES_EXPORT(int) putp (const char *);"
+ print "extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);"
+ print "#endif /* __NCURSES_H */"
+ print ""
+ print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
+ print "#if !defined(NCURSES_TERMCAP_H_incl)"
+ print "extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);"
+ print "extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);"
+ print "extern NCURSES_EXPORT(int) tgetent (char *, const char *);"
+ print "extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
+ print "#endif /* NCURSES_TERMCAP_H_incl */"
+ print ""
+ print "#ifdef __cplusplus"
+ print "}"
+ print "#endif"
+ print ""
+ print "#endif /* NCURSES_TERM_H_incl */"
+ }
diff --git a/Build/source/libs/ncurses/include/Makefile.in b/Build/source/libs/ncurses/include/Makefile.in
new file mode 100644
index 00000000000..90d001ef942
--- /dev/null
+++ b/Build/source/libs/ncurses/include/Makefile.in
@@ -0,0 +1,130 @@
+# $Id: Makefile.in,v 1.35 2001/12/08 18:50:06 tom Exp $
+##############################################################################
+# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey 1996-2001
+#
+# Makefile for ncurses source code.
+#
+# This makes/installs ncurses include-files
+#
+# The variable 'srcdir' refers to the source-distribution, and can be set with
+# the configure script by "--srcdir=DIR".
+
+# turn off _all_ suffix rules; we'll generate our own
+.SUFFIXES:
+
+SHELL = /bin/sh
+THIS = Makefile
+
+DESTDIR = @DESTDIR@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+includedir = @includedir@
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+AWK = @AWK@
+LN_S = @LN_S@
+
+VERSION = @cf_cv_rel_version@
+
+# The "Caps" file specifies the terminfo database format, as well as the list
+# of function keys.
+TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@
+
+# These files are generated by the configure script
+CONFIG_SRC = \
+ MKterm.h.awk \
+ curses.head \
+ termcap.h \
+ unctrl.h
+
+# These files are generated by this makefile
+AUTO_SRC = \
+ curses.h \
+ hashsize.h \
+ ncurses_def.h \
+ parametrized.h \
+ term.h symlink
+
+################################################################################
+all \
+libs \
+depend \
+sources \
+install :: $(AUTO_SRC)
+
+symlink:
+ @test -d ncurses || ln -s . ncurses
+
+curses.h : $(TERMINFO_CAPS) \
+ curses.head \
+ $(srcdir)/curses.tail \
+ $(srcdir)/MKkey_defs.sh
+ cat curses.head >$@
+ AWK=$(AWK) sh $(srcdir)/MKkey_defs.sh $(TERMINFO_CAPS) >>$@
+ sh -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
+ cat $(srcdir)/curses.tail >>$@
+
+term.h: $(TERMINFO_CAPS) MKterm.h.awk
+ $(AWK) -f MKterm.h.awk $(TERMINFO_CAPS) > $@
+ sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
+
+hashsize.h: $(TERMINFO_CAPS) $(srcdir)/MKhashsize.sh
+ sh $(srcdir)/MKhashsize.sh $(TERMINFO_CAPS) >$@
+
+ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
+ AWK=$(AWK) sh $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
+
+parametrized.h: $(TERMINFO_CAPS) $(srcdir)/MKparametrized.sh
+ AWK=$(AWK) sh $(srcdir)/MKparametrized.sh $(TERMINFO_CAPS) >$@
+
+tags:
+ ctags *.[ch]
+
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
+
+mostlyclean ::
+ -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
+
+clean :: mostlyclean
+ -rm -f $(AUTO_SRC)
+ -rm -f ncurses
+
+distclean :: clean
+ -rm -f Makefile $(CONFIG_SRC)
+
+realclean :: distclean
+
+###############################################################################
+# The remainder of this file is automatically generated during configuration
+###############################################################################
diff --git a/Build/source/libs/ncurses/include/capdefaults.c b/Build/source/libs/ncurses/include/capdefaults.c
new file mode 100644
index 00000000000..071f9e17cdb
--- /dev/null
+++ b/Build/source/libs/ncurses/include/capdefaults.c
@@ -0,0 +1,84 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/* $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_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 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;
+#undef EXTRACT_DELAY
+}
diff --git a/Build/source/libs/ncurses/include/curses.h.in b/Build/source/libs/ncurses/include/curses.h.in
new file mode 100644
index 00000000000..1ddbb47e002
--- /dev/null
+++ b/Build/source/libs/ncurses/include/curses.h.in
@@ -0,0 +1,1026 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/* $Id: curses.h.in,v 1.151 2004/06/19 22:26:53 tom Exp $ */
+
+#ifndef __NCURSES_H
+#define __NCURSES_H
+
+#define CURSES 1
+#define CURSES_H 1
+
+/* This should be defined for the enhanced functionality to be visible.
+ * However, some of the wide-character (enhanced) functionality is missing.
+ * So we do not define it (yet).
+#define _XOPEN_CURSES 1
+ */
+
+/* These are defined only in curses.h, and are used for conditional compiles */
+#define NCURSES_VERSION_MAJOR @NCURSES_MAJOR@
+#define NCURSES_VERSION_MINOR @NCURSES_MINOR@
+#define NCURSES_VERSION_PATCH @NCURSES_PATCH@
+
+/* This is defined in more than one ncurses header, for identification */
+#undef NCURSES_VERSION
+#define NCURSES_VERSION "@NCURSES_MAJOR@.@NCURSES_MINOR@"
+
+#include <ncurses_dll.h>
+
+/*
+ * User-definable tweak to disable the include of <stdbool.h>.
+ */
+#ifndef NCURSES_ENABLE_STDBOOL_H
+#define NCURSES_ENABLE_STDBOOL_H @cf_cv_header_stdbool_h@
+#endif
+
+/*
+ * NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses
+ * configured using --disable-macros.
+ */
+#ifdef NCURSES_NOMACROS
+#define NCURSES_ATTR_T attr_t
+#endif
+
+#ifndef NCURSES_ATTR_T
+#define NCURSES_ATTR_T int
+#endif
+
+/*
+ * Expands to 'const' if ncurses is configured using --enable-const. Note that
+ * doing so makes it incompatible with other implementations of X/Open Curses.
+ */
+#undef NCURSES_CONST
+#define NCURSES_CONST @NCURSES_CONST@
+
+/*
+ * The internal type used for color values
+ */
+#undef NCURSES_COLOR_T
+#define NCURSES_COLOR_T short
+
+/*
+ * The internal type used for window dimensions.
+ */
+#undef NCURSES_SIZE_T
+#define NCURSES_SIZE_T short
+
+/*
+ * NCURSES_CH_T is used in building the library, but not used otherwise in
+ * this header file, since that would make the normal/wide-character versions
+ * of the header incompatible.
+ */
+#undef NCURSES_CH_T
+#define NCURSES_CH_T @NCURSES_CH_T@
+
+typedef unsigned @cf_cv_typeof_chtype@ chtype;
+
+#include <stdio.h>
+#include <unctrl.h>
+#include <stdarg.h> /* we need va_list */
+#ifdef _XOPEN_SOURCE_EXTENDED
+#include <stddef.h> /* we want wchar_t */
+#endif /* _XOPEN_SOURCE_EXTENDED */
+
+/* XSI and SVr4 specify that curses implements 'bool'. However, C++ may also
+ * implement it. If so, we must use the C++ compiler's type to avoid conflict
+ * with other interfaces.
+ *
+ * A further complication is that <stdbool.h> may declare 'bool' to be a
+ * different type, such as an enum which is not necessarily compatible with
+ * C++. If we have <stdbool.h>, make 'bool' a macro, so users may #undef it.
+ * Otherwise, let it remain a typedef to avoid conflicts with other #define's.
+ * In either case, make a typedef for NCURSES_BOOL which can be used if needed
+ * from either C or C++.
+ */
+
+#undef TRUE
+#define TRUE 1
+
+#undef FALSE
+#define FALSE 0
+
+typedef @cf_cv_type_of_bool@ NCURSES_BOOL;
+
+#if @USE_CXX_BOOL@ /* __cplusplus, etc. */
+
+/* use the C++ compiler's bool type */
+#define NCURSES_BOOL bool
+
+#else /* c89, c99, etc. */
+
+#if NCURSES_ENABLE_STDBOOL_H
+#include <stdbool.h>
+/* use whatever the C compiler decides bool really is */
+#define NCURSES_BOOL bool
+#else
+/* there is no predefined bool - use our own */
+#undef bool
+#define bool NCURSES_BOOL
+#endif
+
+#endif /* !__cplusplus, etc. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * XSI attributes. In the ncurses implementation, they are identical to the
+ * A_ attributes.
+ */
+#define WA_ATTRIBUTES A_ATTRIBUTES
+#define WA_NORMAL A_NORMAL
+#define WA_STANDOUT A_STANDOUT
+#define WA_UNDERLINE A_UNDERLINE
+#define WA_REVERSE A_REVERSE
+#define WA_BLINK A_BLINK
+#define WA_DIM A_DIM
+#define WA_BOLD A_BOLD
+#define WA_ALTCHARSET A_ALTCHARSET
+#define WA_INVIS A_INVIS
+#define WA_PROTECT A_PROTECT
+#define WA_HORIZONTAL A_HORIZONTAL
+#define WA_LEFT A_LEFT
+#define WA_LOW A_LOW
+#define WA_RIGHT A_RIGHT
+#define WA_TOP A_TOP
+#define WA_VERTICAL A_VERTICAL
+
+/* colors */
+extern NCURSES_EXPORT_VAR(int) COLORS;
+extern NCURSES_EXPORT_VAR(int) COLOR_PAIRS;
+
+#define COLOR_BLACK 0
+#define COLOR_RED 1
+#define COLOR_GREEN 2
+#define COLOR_YELLOW 3
+#define COLOR_BLUE 4
+#define COLOR_MAGENTA 5
+#define COLOR_CYAN 6
+#define COLOR_WHITE 7
+
+/* line graphics */
+
+#if @BROKEN_LINKER@
+extern NCURSES_EXPORT_VAR(chtype*) _nc_acs_map(void);
+#define acs_map (_nc_acs_map())
+#else
+extern NCURSES_EXPORT_VAR(chtype) acs_map[];
+#endif
+
+#define NCURSES_ACS(c) (acs_map[(unsigned char)c])
+
+/* VT100 symbols begin here */
+#define ACS_ULCORNER NCURSES_ACS('l') /* upper left corner */
+#define ACS_LLCORNER NCURSES_ACS('m') /* lower left corner */
+#define ACS_URCORNER NCURSES_ACS('k') /* upper right corner */
+#define ACS_LRCORNER NCURSES_ACS('j') /* lower right corner */
+#define ACS_LTEE NCURSES_ACS('t') /* tee pointing right */
+#define ACS_RTEE NCURSES_ACS('u') /* tee pointing left */
+#define ACS_BTEE NCURSES_ACS('v') /* tee pointing up */
+#define ACS_TTEE NCURSES_ACS('w') /* tee pointing down */
+#define ACS_HLINE NCURSES_ACS('q') /* horizontal line */
+#define ACS_VLINE NCURSES_ACS('x') /* vertical line */
+#define ACS_PLUS NCURSES_ACS('n') /* large plus or crossover */
+#define ACS_S1 NCURSES_ACS('o') /* scan line 1 */
+#define ACS_S9 NCURSES_ACS('s') /* scan line 9 */
+#define ACS_DIAMOND NCURSES_ACS('`') /* diamond */
+#define ACS_CKBOARD NCURSES_ACS('a') /* checker board (stipple) */
+#define ACS_DEGREE NCURSES_ACS('f') /* degree symbol */
+#define ACS_PLMINUS NCURSES_ACS('g') /* plus/minus */
+#define ACS_BULLET NCURSES_ACS('~') /* bullet */
+/* Teletype 5410v1 symbols begin here */
+#define ACS_LARROW NCURSES_ACS(',') /* arrow pointing left */
+#define ACS_RARROW NCURSES_ACS('+') /* arrow pointing right */
+#define ACS_DARROW NCURSES_ACS('.') /* arrow pointing down */
+#define ACS_UARROW NCURSES_ACS('-') /* arrow pointing up */
+#define ACS_BOARD NCURSES_ACS('h') /* board of squares */
+#define ACS_LANTERN NCURSES_ACS('i') /* lantern symbol */
+#define ACS_BLOCK NCURSES_ACS('0') /* solid square block */
+/*
+ * These aren't documented, but a lot of System Vs have them anyway
+ * (you can spot pprryyzz{{||}} in a lot of AT&T terminfo strings).
+ * The ACS_names may not match AT&T's, our source didn't know them.
+ */
+#define ACS_S3 NCURSES_ACS('p') /* scan line 3 */
+#define ACS_S7 NCURSES_ACS('r') /* scan line 7 */
+#define ACS_LEQUAL NCURSES_ACS('y') /* less/equal */
+#define ACS_GEQUAL NCURSES_ACS('z') /* greater/equal */
+#define ACS_PI NCURSES_ACS('{') /* Pi */
+#define ACS_NEQUAL NCURSES_ACS('|') /* not equal */
+#define ACS_STERLING NCURSES_ACS('}') /* UK pound sign */
+
+/*
+ * Line drawing ACS names are of the form ACS_trbl, where t is the top, r
+ * is the right, b is the bottom, and l is the left. t, r, b, and l might
+ * be B (blank), S (single), D (double), or T (thick). The subset defined
+ * here only uses B and S.
+ */
+#define ACS_BSSB ACS_ULCORNER
+#define ACS_SSBB ACS_LLCORNER
+#define ACS_BBSS ACS_URCORNER
+#define ACS_SBBS ACS_LRCORNER
+#define ACS_SBSS ACS_RTEE
+#define ACS_SSSB ACS_LTEE
+#define ACS_SSBS ACS_BTEE
+#define ACS_BSSS ACS_TTEE
+#define ACS_BSBS ACS_HLINE
+#define ACS_SBSB ACS_VLINE
+#define ACS_SSSS ACS_PLUS
+
+#undef ERR
+#define ERR (-1)
+
+#undef OK
+#define OK (0)
+
+/* values for the _flags member */
+#define _SUBWIN 0x01 /* is this a sub-window? */
+#define _ENDLINE 0x02 /* is the window flush right? */
+#define _FULLWIN 0x04 /* is the window full-screen? */
+#define _SCROLLWIN 0x08 /* bottom edge is at screen bottom? */
+#define _ISPAD 0x10 /* is this window a pad? */
+#define _HASMOVED 0x20 /* has cursor moved since last refresh? */
+#define _WRAPPED 0x40 /* cursor was just wrappped */
+
+/*
+ * this value is used in the firstchar and lastchar fields to mark
+ * unchanged lines
+ */
+#define _NOCHANGE -1
+
+/*
+ * this value is used in the oldindex field to mark lines created by insertions
+ * and scrolls.
+ */
+#define _NEWINDEX -1
+
+typedef struct screen SCREEN;
+typedef struct _win_st WINDOW;
+
+typedef chtype attr_t; /* ...must be at least as wide as chtype */
+
+#ifdef _XOPEN_SOURCE_EXTENDED
+
+#if @NCURSES_LIBUTF8@
+#ifdef mblen /* libutf8.h defines it w/o undefining first */
+#undef mblen
+#endif
+#include <libutf8.h>
+#endif
+
+#if @NEED_WCHAR_H@
+#include <wchar.h> /* ...to get mbstate_t, etc. */
+#endif
+
+#if @NCURSES_WCHAR_T@
+typedef unsigned short wchar_t@NCURSES_OK_WCHAR_T@;
+#endif
+
+#if @NCURSES_WINT_T@
+typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
+#endif
+
+#define CCHARW_MAX 5
+typedef struct
+{
+ attr_t attr;
+ wchar_t chars[CCHARW_MAX];
+}
+cchar_t;
+
+#endif /* _XOPEN_SOURCE_EXTENDED */
+
+struct ldat;
+
+struct _win_st
+{
+ NCURSES_SIZE_T _cury, _curx; /* current cursor position */
+
+ /* window location and size */
+ NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */
+ NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */
+
+ short _flags; /* window state flags */
+
+ /* attribute tracking */
+ attr_t _attrs; /* current attribute for non-space character */
+ chtype _bkgd; /* current background char/attribute pair */
+
+ /* option values set by user */
+ bool _notimeout; /* no time out on function-key entry? */
+ bool _clear; /* consider all data in the window invalid? */
+ bool _leaveok; /* OK to not reset cursor on exit? */
+ bool _scroll; /* OK to scroll this window? */
+ bool _idlok; /* OK to use insert/delete line? */
+ bool _idcok; /* OK to use insert/delete char? */
+ bool _immed; /* window in immed mode? (not yet used) */
+ bool _sync; /* window in sync mode? */
+ bool _use_keypad; /* process function keys into KEY_ symbols? */
+ int _delay; /* 0 = nodelay, <0 = blocking, >0 = delay */
+
+ struct ldat *_line; /* the actual line data */
+
+ /* global screen state */
+ NCURSES_SIZE_T _regtop; /* top line of scrolling region */
+ NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */
+
+ /* these are used only if this is a sub-window */
+ int _parx; /* x coordinate of this window in parent */
+ int _pary; /* y coordinate of this window in parent */
+ WINDOW *_parent; /* pointer to parent if a sub-window */
+
+ /* these are used only if this is a pad */
+ struct pdat
+ {
+ NCURSES_SIZE_T _pad_y, _pad_x;
+ NCURSES_SIZE_T _pad_top, _pad_left;
+ NCURSES_SIZE_T _pad_bottom, _pad_right;
+ } _pad;
+
+ NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */
+
+#ifdef _XOPEN_SOURCE_EXTENDED
+ cchar_t _bkgrnd; /* current background char/attribute pair */
+#endif
+};
+
+extern NCURSES_EXPORT_VAR(WINDOW *) stdscr;
+extern NCURSES_EXPORT_VAR(WINDOW *) curscr;
+extern NCURSES_EXPORT_VAR(WINDOW *) newscr;
+
+extern NCURSES_EXPORT_VAR(int) LINES;
+extern NCURSES_EXPORT_VAR(int) COLS;
+extern NCURSES_EXPORT_VAR(int) TABSIZE;
+
+/*
+ * This global was an undocumented feature under AIX curses.
+ */
+extern NCURSES_EXPORT_VAR(int) ESCDELAY; /* ESC expire time in milliseconds */
+
+extern NCURSES_EXPORT_VAR(char) ttytype[]; /* needed for backward compatibility */
+
+/*
+ * These functions are extensions - not in XSI Curses.
+ */
+#if @NCURSES_EXT_FUNCS@
+extern NCURSES_EXPORT(bool) is_term_resized (int, int);
+extern NCURSES_EXPORT(char *) keybound (int, int);
+extern NCURSES_EXPORT(const char *) curses_version (void);
+extern NCURSES_EXPORT(int) assume_default_colors (int, int);
+extern NCURSES_EXPORT(int) define_key (const char *, int);
+extern NCURSES_EXPORT(int) key_defined (const char *);
+extern NCURSES_EXPORT(int) keyok (int, bool);
+extern NCURSES_EXPORT(int) resize_term (int, int);
+extern NCURSES_EXPORT(int) resizeterm (int, int);
+extern NCURSES_EXPORT(int) use_default_colors (void);
+extern NCURSES_EXPORT(int) use_extended_names (bool);
+extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int);
+#else
+#define curses_version() NCURSES_VERSION
+#endif
+
+/*
+ * This is an extension to support events...
+ */
+#if @NCURSES_EXT_FUNCS@
+#ifdef NCURSES_WGETCH_EVENTS
+#if !defined(__BEOS__) /* Fix _nc_timed_wait() on BEOS... */
+# define NCURSES_EVENT_VERSION 1
+#endif /* !defined(__BEOS__) */
+
+/*
+ * Bits to set in _nc_event.data.flags
+ */
+# define _NC_EVENT_TIMEOUT_MSEC 1
+# define _NC_EVENT_FILE 2
+# define _NC_EVENT_FILE_READABLE 2
+# if 0 /* Not supported yet... */
+# define _NC_EVENT_FILE_WRITABLE 4
+# define _NC_EVENT_FILE_EXCEPTION 8
+# endif
+
+typedef struct
+{
+ int type;
+ union
+ {
+ long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */
+ struct
+ {
+ unsigned int flags;
+ int fd;
+ unsigned int result;
+ } fev; /* _NC_EVENT_FILE */
+ } data;
+} _nc_event;
+
+typedef struct
+{
+ int count;
+ int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */
+ _nc_event *events[1];
+} _nc_eventlist;
+
+extern NCURSES_EXPORT(int) wgetch_events(WINDOW *, _nc_eventlist *); /* experimental */
+extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *);/* experimental */
+
+#endif /* NCURSES_WGETCH_EVENTS */
+#endif /* NCURSES_EXT_FUNCS */
+
+/*
+ * GCC (and some other compilers) define '__attribute__'; we're using this
+ * macro to alert the compiler to flag inconsistencies in printf/scanf-like
+ * function calls. Just in case '__attribute__' isn't defined, make a dummy.
+ * Old versions of G++ do not accept it anyway, at least not consistently with
+ * GCC.
+ */
+#if !(defined(__GNUC__) || defined(__GNUG__) || defined(__attribute__))
+#define __attribute__(p) /* nothing */
+#endif
+
+/*
+ * We cannot define these in ncurses_cfg.h, since they require parameters to be
+ * passed (that's non-portable).
+ */
+#ifndef GCC_PRINTFLIKE
+#if defined(GCC_PRINTF) && !defined(printf)
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#endif
+
+#ifndef GCC_SCANFLIKE
+#if defined(GCC_SCANF) && !defined(scanf)
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
+#endif
+#endif
+
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+
+/*
+ * Function prototypes. This is the complete XSI Curses list of required
+ * functions. Those marked `generated' will have sources generated from the
+ * macro definitions later in this file, in order to satisfy XPG4.2
+ * requirements.
+ */
+
+extern NCURSES_EXPORT(int) addch (const chtype); /* generated */
+extern NCURSES_EXPORT(int) addchnstr (const chtype *, int); /* generated */
+extern NCURSES_EXPORT(int) addchstr (const chtype *); /* generated */
+extern NCURSES_EXPORT(int) addnstr (const char *, int); /* generated */
+extern NCURSES_EXPORT(int) addstr (const char *); /* generated */
+extern NCURSES_EXPORT(int) attroff (NCURSES_ATTR_T); /* generated */
+extern NCURSES_EXPORT(int) attron (NCURSES_ATTR_T); /* generated */
+extern NCURSES_EXPORT(int) attrset (NCURSES_ATTR_T); /* generated */
+extern NCURSES_EXPORT(int) attr_get (attr_t *, short *, void *); /* generated */
+extern NCURSES_EXPORT(int) attr_off (attr_t, void *); /* generated */
+extern NCURSES_EXPORT(int) attr_on (attr_t, void *); /* generated */
+extern NCURSES_EXPORT(int) attr_set (attr_t, short, void *); /* generated */
+extern NCURSES_EXPORT(int) baudrate (void); /* implemented */
+extern NCURSES_EXPORT(int) beep (void); /* implemented */
+extern NCURSES_EXPORT(int) bkgd (chtype); /* generated */
+extern NCURSES_EXPORT(void) bkgdset (chtype); /* generated */
+extern NCURSES_EXPORT(int) border (chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* generated */
+extern NCURSES_EXPORT(int) box (WINDOW *, chtype, chtype); /* generated */
+extern NCURSES_EXPORT(bool) can_change_color (void); /* implemented */
+extern NCURSES_EXPORT(int) cbreak (void); /* implemented */
+extern NCURSES_EXPORT(int) chgat (int, attr_t, short, const void *); /* generated */
+extern NCURSES_EXPORT(int) clear (void); /* generated */
+extern NCURSES_EXPORT(int) clearok (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(int) clrtobot (void); /* generated */
+extern NCURSES_EXPORT(int) clrtoeol (void); /* generated */
+extern NCURSES_EXPORT(int) color_content (short,short*,short*,short*); /* implemented */
+extern NCURSES_EXPORT(int) color_set (short,void*); /* generated */
+extern NCURSES_EXPORT(int) COLOR_PAIR (int); /* generated */
+extern NCURSES_EXPORT(int) copywin (const WINDOW*,WINDOW*,int,int,int,int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) curs_set (int); /* implemented */
+extern NCURSES_EXPORT(int) def_prog_mode (void); /* implemented */
+extern NCURSES_EXPORT(int) def_shell_mode (void); /* implemented */
+extern NCURSES_EXPORT(int) delay_output (int); /* implemented */
+extern NCURSES_EXPORT(int) delch (void); /* generated */
+extern NCURSES_EXPORT(void) delscreen (SCREEN *); /* implemented */
+extern NCURSES_EXPORT(int) delwin (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) deleteln (void); /* generated */
+extern NCURSES_EXPORT(WINDOW *) derwin (WINDOW *,int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) doupdate (void); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) dupwin (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) echo (void); /* implemented */
+extern NCURSES_EXPORT(int) echochar (const chtype); /* generated */
+extern NCURSES_EXPORT(int) erase (void); /* generated */
+extern NCURSES_EXPORT(int) endwin (void); /* implemented */
+extern NCURSES_EXPORT(char) erasechar (void); /* implemented */
+extern NCURSES_EXPORT(void) filter (void); /* implemented */
+extern NCURSES_EXPORT(int) flash (void); /* implemented */
+extern NCURSES_EXPORT(int) flushinp (void); /* implemented */
+extern NCURSES_EXPORT(chtype) getbkgd (WINDOW *); /* generated */
+extern NCURSES_EXPORT(int) getch (void); /* generated */
+extern NCURSES_EXPORT(int) getnstr (char *, int); /* generated */
+extern NCURSES_EXPORT(int) getstr (char *); /* generated */
+extern NCURSES_EXPORT(WINDOW *) getwin (FILE *); /* implemented */
+extern NCURSES_EXPORT(int) halfdelay (int); /* implemented */
+extern NCURSES_EXPORT(bool) has_colors (void); /* implemented */
+extern NCURSES_EXPORT(bool) has_ic (void); /* implemented */
+extern NCURSES_EXPORT(bool) has_il (void); /* implemented */
+extern NCURSES_EXPORT(int) hline (chtype, int); /* generated */
+extern NCURSES_EXPORT(void) idcok (WINDOW *, bool); /* implemented */
+extern NCURSES_EXPORT(int) idlok (WINDOW *, bool); /* implemented */
+extern NCURSES_EXPORT(void) immedok (WINDOW *, bool); /* implemented */
+extern NCURSES_EXPORT(chtype) inch (void); /* generated */
+extern NCURSES_EXPORT(int) inchnstr (chtype *, int); /* generated */
+extern NCURSES_EXPORT(int) inchstr (chtype *); /* generated */
+extern NCURSES_EXPORT(WINDOW *) initscr (void); /* implemented */
+extern NCURSES_EXPORT(int) init_color (short,short,short,short); /* implemented */
+extern NCURSES_EXPORT(int) init_pair (short,short,short); /* implemented */
+extern NCURSES_EXPORT(int) innstr (char *, int); /* generated */
+extern NCURSES_EXPORT(int) insch (chtype); /* generated */
+extern NCURSES_EXPORT(int) insdelln (int); /* generated */
+extern NCURSES_EXPORT(int) insertln (void); /* generated */
+extern NCURSES_EXPORT(int) insnstr (const char *, int); /* generated */
+extern NCURSES_EXPORT(int) insstr (const char *); /* generated */
+extern NCURSES_EXPORT(int) instr (char *); /* generated */
+extern NCURSES_EXPORT(int) intrflush (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(bool) isendwin (void); /* implemented */
+extern NCURSES_EXPORT(bool) is_linetouched (WINDOW *,int); /* implemented */
+extern NCURSES_EXPORT(bool) is_wintouched (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(NCURSES_CONST char *) keyname (int); /* implemented */
+extern NCURSES_EXPORT(int) keypad (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(char) killchar (void); /* implemented */
+extern NCURSES_EXPORT(int) leaveok (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(char *) longname (void); /* implemented */
+extern NCURSES_EXPORT(int) meta (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(int) move (int, int); /* generated */
+extern NCURSES_EXPORT(int) mvaddch (int, int, const chtype); /* generated */
+extern NCURSES_EXPORT(int) mvaddchnstr (int, int, const chtype *, int); /* generated */
+extern NCURSES_EXPORT(int) mvaddchstr (int, int, const chtype *); /* generated */
+extern NCURSES_EXPORT(int) mvaddnstr (int, int, const char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvaddstr (int, int, const char *); /* generated */
+extern NCURSES_EXPORT(int) mvchgat (int, int, int, attr_t, short, const void *); /* generated */
+extern NCURSES_EXPORT(int) mvcur (int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) mvdelch (int, int); /* generated */
+extern NCURSES_EXPORT(int) mvderwin (WINDOW *, int, int); /* implemented */
+extern NCURSES_EXPORT(int) mvgetch (int, int); /* generated */
+extern NCURSES_EXPORT(int) mvgetnstr (int, int, char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvgetstr (int, int, char *); /* generated */
+extern NCURSES_EXPORT(int) mvhline (int, int, chtype, int); /* generated */
+extern NCURSES_EXPORT(chtype) mvinch (int, int); /* generated */
+extern NCURSES_EXPORT(int) mvinchnstr (int, int, chtype *, int); /* generated */
+extern NCURSES_EXPORT(int) mvinchstr (int, int, chtype *); /* generated */
+extern NCURSES_EXPORT(int) mvinnstr (int, int, char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvinsch (int, int, chtype); /* generated */
+extern NCURSES_EXPORT(int) mvinsnstr (int, int, const char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvinsstr (int, int, const char *); /* generated */
+extern NCURSES_EXPORT(int) mvinstr (int, int, char *); /* generated */
+extern NCURSES_EXPORT(int) mvprintw (int,int, const char *,...) /* implemented */
+ GCC_PRINTFLIKE(3,4);
+extern NCURSES_EXPORT(int) mvscanw (int,int, NCURSES_CONST char *,...) /* implemented */
+ GCC_SCANFLIKE(3,4);
+extern NCURSES_EXPORT(int) mvvline (int, int, chtype, int); /* generated */
+extern NCURSES_EXPORT(int) mvwaddch (WINDOW *, int, int, const chtype); /* generated */
+extern NCURSES_EXPORT(int) mvwaddchnstr (WINDOW *, int, int, const chtype *, int);/* generated */
+extern NCURSES_EXPORT(int) mvwaddchstr (WINDOW *, int, int, const chtype *); /* generated */
+extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvwaddstr (WINDOW *, int, int, const char *); /* generated */
+extern NCURSES_EXPORT(int) mvwchgat (WINDOW *, int, int, int, attr_t, short, const void *);/* generated */
+extern NCURSES_EXPORT(int) mvwdelch (WINDOW *, int, int); /* generated */
+extern NCURSES_EXPORT(int) mvwgetch (WINDOW *, int, int); /* generated */
+extern NCURSES_EXPORT(int) mvwgetnstr (WINDOW *, int, int, char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvwgetstr (WINDOW *, int, int, char *); /* generated */
+extern NCURSES_EXPORT(int) mvwhline (WINDOW *, int, int, chtype, int); /* generated */
+extern NCURSES_EXPORT(int) mvwin (WINDOW *,int,int); /* implemented */
+extern NCURSES_EXPORT(chtype) mvwinch (WINDOW *, int, int); /* generated */
+extern NCURSES_EXPORT(int) mvwinchnstr (WINDOW *, int, int, chtype *, int); /* generated */
+extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); /* generated */
+extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype); /* generated */
+extern NCURSES_EXPORT(int) mvwinsnstr (WINDOW *, int, int, const char *, int); /* generated */
+extern NCURSES_EXPORT(int) mvwinsstr (WINDOW *, int, int, const char *); /* generated */
+extern NCURSES_EXPORT(int) mvwinstr (WINDOW *, int, int, char *); /* generated */
+extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...) /* implemented */
+ GCC_PRINTFLIKE(4,5);
+extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...) /* implemented */
+ GCC_SCANFLIKE(4,5);
+extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int); /* generated */
+extern NCURSES_EXPORT(int) napms (int); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) newpad (int,int); /* implemented */
+extern NCURSES_EXPORT(SCREEN *) newterm (NCURSES_CONST char *,FILE *,FILE *); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) newwin (int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) nl (void); /* implemented */
+extern NCURSES_EXPORT(int) nocbreak (void); /* implemented */
+extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(int) noecho (void); /* implemented */
+extern NCURSES_EXPORT(int) nonl (void); /* implemented */
+extern NCURSES_EXPORT(void) noqiflush (void); /* implemented */
+extern NCURSES_EXPORT(int) noraw (void); /* implemented */
+extern NCURSES_EXPORT(int) notimeout (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(int) overlay (const WINDOW*,WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) overwrite (const WINDOW*,WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) pair_content (short,short*,short*); /* implemented */
+extern NCURSES_EXPORT(int) PAIR_NUMBER (int); /* generated */
+extern NCURSES_EXPORT(int) pechochar (WINDOW *, const chtype); /* implemented */
+extern NCURSES_EXPORT(int) pnoutrefresh (WINDOW*,int,int,int,int,int,int);/* implemented */
+extern NCURSES_EXPORT(int) prefresh (WINDOW *,int,int,int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) printw (const char *,...) /* implemented */
+ GCC_PRINTFLIKE(1,2);
+extern NCURSES_EXPORT(int) putp (const char *); /* implemented */
+extern NCURSES_EXPORT(int) putwin (WINDOW *, FILE *); /* implemented */
+extern NCURSES_EXPORT(void) qiflush (void); /* implemented */
+extern NCURSES_EXPORT(int) raw (void); /* implemented */
+extern NCURSES_EXPORT(int) redrawwin (WINDOW *); /* generated */
+extern NCURSES_EXPORT(int) refresh (void); /* generated */
+extern NCURSES_EXPORT(int) resetty (void); /* implemented */
+extern NCURSES_EXPORT(int) reset_prog_mode (void); /* implemented */
+extern NCURSES_EXPORT(int) reset_shell_mode (void); /* implemented */
+extern NCURSES_EXPORT(int) ripoffline (int, int (*)(WINDOW *, int)); /* implemented */
+extern NCURSES_EXPORT(int) savetty (void); /* implemented */
+extern NCURSES_EXPORT(int) scanw (NCURSES_CONST char *,...) /* implemented */
+ GCC_SCANFLIKE(1,2);
+extern NCURSES_EXPORT(int) scr_dump (const char *); /* implemented */
+extern NCURSES_EXPORT(int) scr_init (const char *); /* implemented */
+extern NCURSES_EXPORT(int) scrl (int); /* generated */
+extern NCURSES_EXPORT(int) scroll (WINDOW *); /* generated */
+extern NCURSES_EXPORT(int) scrollok (WINDOW *,bool); /* implemented */
+extern NCURSES_EXPORT(int) scr_restore (const char *); /* implemented */
+extern NCURSES_EXPORT(int) scr_set (const char *); /* implemented */
+extern NCURSES_EXPORT(int) setscrreg (int,int); /* generated */
+extern NCURSES_EXPORT(SCREEN *) set_term (SCREEN *); /* implemented */
+extern NCURSES_EXPORT(int) slk_attroff (const chtype); /* implemented */
+extern NCURSES_EXPORT(int) slk_attr_off (const attr_t, void *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) slk_attron (const chtype); /* implemented */
+extern NCURSES_EXPORT(int) slk_attr_on (attr_t,void*); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) slk_attrset (const chtype); /* implemented */
+extern NCURSES_EXPORT(attr_t) slk_attr (void); /* implemented */
+extern NCURSES_EXPORT(int) slk_attr_set (const attr_t,short,void*); /* implemented */
+extern NCURSES_EXPORT(int) slk_clear (void); /* implemented */
+extern NCURSES_EXPORT(int) slk_color (short); /* implemented */
+extern NCURSES_EXPORT(int) slk_init (int); /* implemented */
+extern NCURSES_EXPORT(char *) slk_label (int); /* implemented */
+extern NCURSES_EXPORT(int) slk_noutrefresh (void); /* implemented */
+extern NCURSES_EXPORT(int) slk_refresh (void); /* implemented */
+extern NCURSES_EXPORT(int) slk_restore (void); /* implemented */
+extern NCURSES_EXPORT(int) slk_set (int,const char *,int); /* implemented */
+extern NCURSES_EXPORT(int) slk_touch (void); /* implemented */
+extern NCURSES_EXPORT(int) standout (void); /* generated */
+extern NCURSES_EXPORT(int) standend (void); /* generated */
+extern NCURSES_EXPORT(int) start_color (void); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) subpad (WINDOW *, int, int, int, int); /* implemented */
+extern NCURSES_EXPORT(WINDOW *) subwin (WINDOW *,int,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) syncok (WINDOW *, bool); /* implemented */
+extern NCURSES_EXPORT(chtype) termattrs (void); /* implemented */
+extern NCURSES_EXPORT(char *) termname (void); /* implemented */
+extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */
+extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *); /* implemented */
+extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *); /* implemented */
+extern NCURSES_EXPORT(void) timeout (int); /* generated */
+extern NCURSES_EXPORT(int) touchline (WINDOW *, int, int); /* generated */
+extern NCURSES_EXPORT(int) touchwin (WINDOW *); /* generated */
+extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...); /* implemented */
+extern NCURSES_EXPORT(int) typeahead (int); /* implemented */
+extern NCURSES_EXPORT(int) ungetch (int); /* implemented */
+extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* generated */
+extern NCURSES_EXPORT(void) use_env (bool); /* implemented */
+extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */
+extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int)); /* implemented */
+extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */
+extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */
+extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */
+extern NCURSES_EXPORT(int) vwscanw (WINDOW *, NCURSES_CONST char *,va_list); /* implemented */
+extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, NCURSES_CONST char *,va_list); /* generated */
+extern NCURSES_EXPORT(int) waddch (WINDOW *, const chtype); /* implemented */
+extern NCURSES_EXPORT(int) waddchnstr (WINDOW *,const chtype *,int); /* implemented */
+extern NCURSES_EXPORT(int) waddchstr (WINDOW *,const chtype *); /* generated */
+extern NCURSES_EXPORT(int) waddnstr (WINDOW *,const char *,int); /* implemented */
+extern NCURSES_EXPORT(int) waddstr (WINDOW *,const char *); /* generated */
+extern NCURSES_EXPORT(int) wattron (WINDOW *, int); /* generated */
+extern NCURSES_EXPORT(int) wattroff (WINDOW *, int); /* generated */
+extern NCURSES_EXPORT(int) wattrset (WINDOW *, int); /* generated */
+extern NCURSES_EXPORT(int) wattr_get (WINDOW *, attr_t *, short *, void *); /* generated */
+extern NCURSES_EXPORT(int) wattr_on (WINDOW *, attr_t, void *); /* implemented */
+extern NCURSES_EXPORT(int) wattr_off (WINDOW *, attr_t, void *); /* implemented */
+extern NCURSES_EXPORT(int) wattr_set (WINDOW *, attr_t, short, void *); /* generated */
+extern NCURSES_EXPORT(int) wbkgd (WINDOW *, chtype); /* implemented */
+extern NCURSES_EXPORT(void) wbkgdset (WINDOW *,chtype); /* implemented */
+extern NCURSES_EXPORT(int) wborder (WINDOW *,chtype,chtype,chtype,chtype,chtype,chtype,chtype,chtype); /* implemented */
+extern NCURSES_EXPORT(int) wchgat (WINDOW *, int, attr_t, short, const void *);/* implemented */
+extern NCURSES_EXPORT(int) wclear (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wclrtobot (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wclrtoeol (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wcolor_set (WINDOW*,short,void*); /* implemented */
+extern NCURSES_EXPORT(void) wcursyncup (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wdelch (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wdeleteln (WINDOW *); /* generated */
+extern NCURSES_EXPORT(int) wechochar (WINDOW *, const chtype); /* implemented */
+extern NCURSES_EXPORT(int) werase (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wgetch (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wgetnstr (WINDOW *,char *,int); /* implemented */
+extern NCURSES_EXPORT(int) wgetstr (WINDOW *, char *); /* generated */
+extern NCURSES_EXPORT(int) whline (WINDOW *, chtype, int); /* implemented */
+extern NCURSES_EXPORT(chtype) winch (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) winchnstr (WINDOW *, chtype *, int); /* implemented */
+extern NCURSES_EXPORT(int) winchstr (WINDOW *, chtype *); /* generated */
+extern NCURSES_EXPORT(int) winnstr (WINDOW *, char *, int); /* implemented */
+extern NCURSES_EXPORT(int) winsch (WINDOW *, chtype); /* implemented */
+extern NCURSES_EXPORT(int) winsdelln (WINDOW *,int); /* implemented */
+extern NCURSES_EXPORT(int) winsertln (WINDOW *); /* generated */
+extern NCURSES_EXPORT(int) winsnstr (WINDOW *, const char *,int); /* implemented */
+extern NCURSES_EXPORT(int) winsstr (WINDOW *, const char *); /* generated */
+extern NCURSES_EXPORT(int) winstr (WINDOW *, char *); /* generated */
+extern NCURSES_EXPORT(int) wmove (WINDOW *,int,int); /* implemented */
+extern NCURSES_EXPORT(int) wnoutrefresh (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wprintw (WINDOW *, const char *,...) /* implemented */
+ GCC_PRINTFLIKE(2,3);
+extern NCURSES_EXPORT(int) wredrawln (WINDOW *,int,int); /* implemented */
+extern NCURSES_EXPORT(int) wrefresh (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(int) wscanw (WINDOW *, NCURSES_CONST char *,...) /* implemented */
+ GCC_SCANFLIKE(2,3);
+extern NCURSES_EXPORT(int) wscrl (WINDOW *,int); /* implemented */
+extern NCURSES_EXPORT(int) wsetscrreg (WINDOW *,int,int); /* implemented */
+extern NCURSES_EXPORT(int) wstandout (WINDOW *); /* generated */
+extern NCURSES_EXPORT(int) wstandend (WINDOW *); /* generated */
+extern NCURSES_EXPORT(void) wsyncdown (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(void) wsyncup (WINDOW *); /* implemented */
+extern NCURSES_EXPORT(void) wtimeout (WINDOW *,int); /* implemented */
+extern NCURSES_EXPORT(int) wtouchln (WINDOW *,int,int,int); /* implemented */
+extern NCURSES_EXPORT(int) wvline (WINDOW *,chtype,int); /* implemented */
+
+/*
+ * vid_attr() was implemented originally based on the draft of XSI curses.
+ */
+#ifndef _XOPEN_SOURCE_EXTENDED
+#define vid_attr(a,pair,opts) vidattr(a)
+#endif
+
+/* attributes */
+
+#define NCURSES_ATTR_SHIFT 8
+#define NCURSES_BITS(mask,shift) ((mask) << ((shift) + NCURSES_ATTR_SHIFT))
+
+#define A_NORMAL 0L
+#define A_ATTRIBUTES NCURSES_BITS(~(@cf_cv_1UL@ - @cf_cv_1UL@),0)
+#define A_CHARTEXT (NCURSES_BITS(@cf_cv_1UL@,0) - @cf_cv_1UL@)
+#define A_COLOR NCURSES_BITS(((@cf_cv_1UL@) << 8) - @cf_cv_1UL@,0)
+#define A_STANDOUT NCURSES_BITS(@cf_cv_1UL@,8)
+#define A_UNDERLINE NCURSES_BITS(@cf_cv_1UL@,9)
+#define A_REVERSE NCURSES_BITS(@cf_cv_1UL@,10)
+#define A_BLINK NCURSES_BITS(@cf_cv_1UL@,11)
+#define A_DIM NCURSES_BITS(@cf_cv_1UL@,12)
+#define A_BOLD NCURSES_BITS(@cf_cv_1UL@,13)
+#define A_ALTCHARSET NCURSES_BITS(@cf_cv_1UL@,14)
+#define A_INVIS NCURSES_BITS(@cf_cv_1UL@,15)
+#define A_PROTECT NCURSES_BITS(@cf_cv_1UL@,16)
+#define A_HORIZONTAL NCURSES_BITS(@cf_cv_1UL@,17)
+#define A_LEFT NCURSES_BITS(@cf_cv_1UL@,18)
+#define A_LOW NCURSES_BITS(@cf_cv_1UL@,19)
+#define A_RIGHT NCURSES_BITS(@cf_cv_1UL@,20)
+#define A_TOP NCURSES_BITS(@cf_cv_1UL@,21)
+#define A_VERTICAL NCURSES_BITS(@cf_cv_1UL@,22)
+
+#define COLOR_PAIR(n) NCURSES_BITS(n, 0)
+#define PAIR_NUMBER(a) ((int)(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT))
+
+/*
+ * pseudo functions
+ */
+#define wgetstr(w, s) wgetnstr(w, s, -1)
+#define getnstr(s, n) wgetnstr(stdscr, s, n)
+
+#define setterm(term) setupterm(term, 1, (int *)0)
+
+#define fixterm() reset_prog_mode()
+#define resetterm() reset_shell_mode()
+#define saveterm() def_prog_mode()
+#define crmode() cbreak()
+#define nocrmode() nocbreak()
+#define gettmode()
+
+#define getyx(win,y,x) (y = getcury(win), x = getcurx(win))
+#define getbegyx(win,y,x) (y = getbegy(win), x = getbegx(win))
+#define getmaxyx(win,y,x) (y = getmaxy(win), x = getmaxx(win))
+#define getparyx(win,y,x) (y = getpary(win), x = getparx(win))
+
+#define getsyx(y,x) do { if(newscr->_leaveok) (y)=(x)=-1; \
+ else getyx(newscr,(y),(x)); \
+ } while(0)
+#define setsyx(y,x) do { if((y)==-1 && (x)==-1) newscr->_leaveok=TRUE; \
+ else {newscr->_leaveok=FALSE;wmove(newscr,(y),(x));} \
+ } while(0)
+
+/* It seems older SYSV curses versions define these */
+#define getattrs(win) ((win)?(win)->_attrs:A_NORMAL)
+#define getcurx(win) ((win)?(win)->_curx:ERR)
+#define getcury(win) ((win)?(win)->_cury:ERR)
+#define getbegx(win) ((win)?(win)->_begx:ERR)
+#define getbegy(win) ((win)?(win)->_begy:ERR)
+#define getmaxx(win) ((win)?((win)->_maxx + 1):ERR)
+#define getmaxy(win) ((win)?((win)->_maxy + 1):ERR)
+#define getparx(win) ((win)?(win)->_parx:ERR)
+#define getpary(win) ((win)?(win)->_pary:ERR)
+
+#define wstandout(win) (wattrset(win,A_STANDOUT))
+#define wstandend(win) (wattrset(win,A_NORMAL))
+#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
+
+#define wattron(win,at) wattr_on(win, (attr_t) at, (void *)0)
+#define wattroff(win,at) wattr_off(win, (attr_t) at, (void *)0)
+#define wattrset(win,at) ((win)->_attrs = (at))
+
+#define scroll(win) wscrl(win,1)
+
+#define touchwin(win) wtouchln((win), 0, getmaxy(win), 1)
+#define touchline(win, s, c) wtouchln((win), s, c, 1)
+#define untouchwin(win) wtouchln((win), 0, getmaxy(win), 0)
+
+#define box(win, v, h) wborder(win, v, v, h, h, 0, 0, 0, 0)
+#define border(ls, rs, ts, bs, tl, tr, bl, br) wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br)
+#define hline(ch, n) whline(stdscr, ch, n)
+#define vline(ch, n) wvline(stdscr, ch, n)
+
+#define winstr(w, s) winnstr(w, s, -1)
+#define winchstr(w, s) winchnstr(w, s, -1)
+#define winsstr(w, s) winsnstr(w, s, -1)
+
+#define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1)
+#define waddstr(win,str) waddnstr(win,str,-1)
+#define waddchstr(win,str) waddchnstr(win,str,-1)
+
+/*
+ * pseudo functions for standard screen
+ */
+
+#define addch(ch) waddch(stdscr,ch)
+#define addchnstr(str,n) waddchnstr(stdscr,str,n)
+#define addchstr(str) waddchstr(stdscr,str)
+#define addnstr(str,n) waddnstr(stdscr,str,n)
+#define addstr(str) waddnstr(stdscr,str,-1)
+#define attroff(at) wattroff(stdscr,at)
+#define attron(at) wattron(stdscr,at)
+#define attrset(at) wattrset(stdscr,at)
+#define attr_get(ap,cp,o) wattr_get(stdscr,ap,cp,o)
+#define attr_off(a,o) wattr_off(stdscr,a,o)
+#define attr_on(a,o) wattr_on(stdscr,a,o)
+#define attr_set(a,c,o) wattr_set(stdscr,a,c,o)
+#define bkgd(ch) wbkgd(stdscr,ch)
+#define bkgdset(ch) wbkgdset(stdscr,ch)
+#define chgat(n,a,c,o) wchgat(stdscr,n,a,c,o)
+#define clear() wclear(stdscr)
+#define clrtobot() wclrtobot(stdscr)
+#define clrtoeol() wclrtoeol(stdscr)
+#define color_set(c,o) wcolor_set(stdscr,c,o)
+#define delch() wdelch(stdscr)
+#define deleteln() winsdelln(stdscr,-1)
+#define echochar(c) wechochar(stdscr,c)
+#define erase() werase(stdscr)
+#define getch() wgetch(stdscr)
+#define getstr(str) wgetstr(stdscr,str)
+#define inch() winch(stdscr)
+#define inchnstr(s,n) winchnstr(stdscr,s,n)
+#define inchstr(s) winchstr(stdscr,s)
+#define innstr(s,n) winnstr(stdscr,s,n)
+#define insch(c) winsch(stdscr,c)
+#define insdelln(n) winsdelln(stdscr,n)
+#define insertln() winsdelln(stdscr,1)
+#define insnstr(s,n) winsnstr(stdscr,s,n)
+#define insstr(s) winsstr(stdscr,s)
+#define instr(s) winstr(stdscr,s)
+#define move(y,x) wmove(stdscr,y,x)
+#define refresh() wrefresh(stdscr)
+#define scrl(n) wscrl(stdscr,n)
+#define setscrreg(t,b) wsetscrreg(stdscr,t,b)
+#define standend() wstandend(stdscr)
+#define standout() wstandout(stdscr)
+#define timeout(delay) wtimeout(stdscr,delay)
+#define wdeleteln(win) winsdelln(win,-1)
+#define winsertln(win) winsdelln(win,1)
+
+/*
+ * mv functions
+ */
+
+#define mvwaddch(win,y,x,ch) (wmove(win,y,x) == ERR ? ERR : waddch(win,ch))
+#define mvwaddchnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,n))
+#define mvwaddchstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddchnstr(win,str,-1))
+#define mvwaddnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,n))
+#define mvwaddstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : waddnstr(win,str,-1))
+#define mvwdelch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wdelch(win))
+#define mvwchgat(win,y,x,n,a,c,o) (wmove(win,y,x) == ERR ? ERR : wchgat(win,n,a,c,o))
+#define mvwgetch(win,y,x) (wmove(win,y,x) == ERR ? ERR : wgetch(win))
+#define mvwgetnstr(win,y,x,str,n) (wmove(win,y,x) == ERR ? ERR : wgetnstr(win,str,n))
+#define mvwgetstr(win,y,x,str) (wmove(win,y,x) == ERR ? ERR : wgetstr(win,str))
+#define mvwhline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline(win,c,n))
+#define mvwinch(win,y,x) (wmove(win,y,x) == ERR ? (chtype)ERR : winch(win))
+#define mvwinchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winchnstr(win,s,n))
+#define mvwinchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winchstr(win,s))
+#define mvwinnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winnstr(win,s,n))
+#define mvwinsch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winsch(win,c))
+#define mvwinsnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : winsnstr(win,s,n))
+#define mvwinsstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winsstr(win,s))
+#define mvwinstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : winstr(win,s))
+#define mvwvline(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline(win,c,n))
+
+#define mvaddch(y,x,ch) mvwaddch(stdscr,y,x,ch)
+#define mvaddchnstr(y,x,str,n) mvwaddchnstr(stdscr,y,x,str,n)
+#define mvaddchstr(y,x,str) mvwaddchstr(stdscr,y,x,str)
+#define mvaddnstr(y,x,str,n) mvwaddnstr(stdscr,y,x,str,n)
+#define mvaddstr(y,x,str) mvwaddstr(stdscr,y,x,str)
+#define mvchgat(y,x,n,a,c,o) mvwchgat(stdscr,y,x,n,a,c,o)
+#define mvdelch(y,x) mvwdelch(stdscr,y,x)
+#define mvgetch(y,x) mvwgetch(stdscr,y,x)
+#define mvgetnstr(y,x,str,n) mvwgetnstr(stdscr,y,x,str,n)
+#define mvgetstr(y,x,str) mvwgetstr(stdscr,y,x,str)
+#define mvhline(y,x,c,n) mvwhline(stdscr,y,x,c,n)
+#define mvinch(y,x) mvwinch(stdscr,y,x)
+#define mvinchnstr(y,x,s,n) mvwinchnstr(stdscr,y,x,s,n)
+#define mvinchstr(y,x,s) mvwinchstr(stdscr,y,x,s)
+#define mvinnstr(y,x,s,n) mvwinnstr(stdscr,y,x,s,n)
+#define mvinsch(y,x,c) mvwinsch(stdscr,y,x,c)
+#define mvinsnstr(y,x,s,n) mvwinsnstr(stdscr,y,x,s,n)
+#define mvinsstr(y,x,s) mvwinsstr(stdscr,y,x,s)
+#define mvinstr(y,x,s) mvwinstr(stdscr,y,x,s)
+#define mvvline(y,x,c,n) mvwvline(stdscr,y,x,c,n)
+
+/*
+ * Some wide-character functions do not depend on the extensions.
+ */
+#define getbkgd(win) ((win)->_bkgd)
+
+#define slk_attr_off(a,v) ((v) ? ERR : slk_attroff(a))
+#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
+
+#define wattr_get(win,a,p,opts) ((void)((a) != 0 && (*(a) = (win)->_attrs)), \
+ (void)((p) != 0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \
+ OK)
+
+/*
+ * XSI curses deprecates SVr4 vwprintw/vwscanw, which are supposed to use
+ * varargs.h. It adds new calls vw_printw/vw_scanw, which are supposed to
+ * use POSIX stdarg.h. The ncurses versions of vwprintw/vwscanw already
+ * use stdarg.h, so...
+ */
+#define vw_printw vwprintw
+#define vw_scanw vwscanw
+
+/*
+ * Export fallback function for use in C++ binding.
+ */
+#if !@HAVE_VSSCANF@
+#define vsscanf(a,b,c) _nc_vsscanf(a,b,c)
+NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
+#endif
+
+/*
+ * Pseudo-character tokens outside ASCII range. The curses wgetch() function
+ * will return any given one of these only if the corresponding k- capability
+ * is defined in your terminal's terminfo entry.
+ *
+ * Some keys (KEY_A1, etc) are arranged like this:
+ * a1 up a3
+ * left b2 right
+ * c1 down c3
+ *
+ * A few key codes do not depend upon the terminfo entry.
+ */
+#define KEY_CODE_YES 0400 /* A wchar_t contains a key code */
+#define KEY_MIN 0401 /* Minimum curses key */
+#define KEY_BREAK 0401 /* Break key (unreliable) */
+#define KEY_SRESET 0530 /* Soft (partial) reset (unreliable) */
+#define KEY_RESET 0531 /* Reset or hard reset (unreliable) */
diff --git a/Build/source/libs/ncurses/include/curses.tail b/Build/source/libs/ncurses/include/curses.tail
new file mode 100644
index 00000000000..8767b0f0bc8
--- /dev/null
+++ b/Build/source/libs/ncurses/include/curses.tail
@@ -0,0 +1,137 @@
+/* $Id: curses.tail,v 1.9 2004/09/25 20:40:35 tom Exp $ */
+
+/* mouse interface */
+#define NCURSES_MOUSE_VERSION 1
+
+/* event masks */
+#define BUTTON1_RELEASED 000000000001L
+#define BUTTON1_PRESSED 000000000002L
+#define BUTTON1_CLICKED 000000000004L
+#define BUTTON1_DOUBLE_CLICKED 000000000010L
+#define BUTTON1_TRIPLE_CLICKED 000000000020L
+#define BUTTON1_RESERVED_EVENT 000000000040L
+#define BUTTON2_RELEASED 000000000100L
+#define BUTTON2_PRESSED 000000000200L
+#define BUTTON2_CLICKED 000000000400L
+#define BUTTON2_DOUBLE_CLICKED 000000001000L
+#define BUTTON2_TRIPLE_CLICKED 000000002000L
+#define BUTTON2_RESERVED_EVENT 000000004000L
+#define BUTTON3_RELEASED 000000010000L
+#define BUTTON3_PRESSED 000000020000L
+#define BUTTON3_CLICKED 000000040000L
+#define BUTTON3_DOUBLE_CLICKED 000000100000L
+#define BUTTON3_TRIPLE_CLICKED 000000200000L
+#define BUTTON3_RESERVED_EVENT 000000400000L
+#define BUTTON4_RELEASED 000001000000L
+#define BUTTON4_PRESSED 000002000000L
+#define BUTTON4_CLICKED 000004000000L
+#define BUTTON4_DOUBLE_CLICKED 000010000000L
+#define BUTTON4_TRIPLE_CLICKED 000020000000L
+#define BUTTON4_RESERVED_EVENT 000040000000L
+#define BUTTON_CTRL 000100000000L
+#define BUTTON_SHIFT 000200000000L
+#define BUTTON_ALT 000400000000L
+#define ALL_MOUSE_EVENTS 000777777777L
+#define REPORT_MOUSE_POSITION 001000000000L
+
+/* macros to extract single event-bits from masks */
+#define BUTTON_RELEASE(e, x) ((e) & (001 << (6 * ((x) - 1))))
+#define BUTTON_PRESS(e, x) ((e) & (002 << (6 * ((x) - 1))))
+#define BUTTON_CLICK(e, x) ((e) & (004 << (6 * ((x) - 1))))
+#define BUTTON_DOUBLE_CLICK(e, x) ((e) & (010 << (6 * ((x) - 1))))
+#define BUTTON_TRIPLE_CLICK(e, x) ((e) & (020 << (6 * ((x) - 1))))
+#define BUTTON_RESERVED_EVENT(e, x) ((e) & (040 << (6 * ((x) - 1))))
+
+typedef unsigned long mmask_t;
+
+typedef struct
+{
+ short id; /* ID to distinguish multiple devices */
+ int x, y, z; /* event coordinates (character-cell) */
+ mmask_t bstate; /* button state bits */
+}
+MEVENT;
+
+extern NCURSES_EXPORT(int) getmouse (MEVENT *);
+extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
+extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);
+extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int);
+extern NCURSES_EXPORT(int) mouseinterval (int);
+extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW* win,int* y, int* x, bool to_screen);
+extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
+
+#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
+
+/* other non-XSI functions */
+
+extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */
+extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */
+
+/* Debugging : use with libncurses_g.a */
+
+extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
+extern NCURSES_EXPORT(void) _tracedump (const char *, WINDOW *);
+extern NCURSES_EXPORT(char *) _traceattr (attr_t);
+extern NCURSES_EXPORT(char *) _traceattr2 (int, chtype);
+extern NCURSES_EXPORT(char *) _nc_tracebits (void);
+extern NCURSES_EXPORT(char *) _tracechar (int);
+extern NCURSES_EXPORT(char *) _tracechtype (chtype);
+extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype);
+#ifdef _XOPEN_SOURCE_EXTENDED
+#define _tracech_t _tracecchar_t
+extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *);
+#define _tracech_t2 _tracecchar_t2
+extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *);
+#else
+#define _tracech_t _tracechtype
+#define _tracech_t2 _tracechtype2
+#endif
+extern NCURSES_EXPORT(char *) _tracemouse (const MEVENT *);
+extern NCURSES_EXPORT(void) trace (const unsigned int);
+
+/* trace masks */
+#define TRACE_DISABLE 0x0000 /* turn off tracing */
+#define TRACE_TIMES 0x0001 /* trace user and system times of updates */
+#define TRACE_TPUTS 0x0002 /* trace tputs calls */
+#define TRACE_UPDATE 0x0004 /* trace update actions, old & new screens */
+#define TRACE_MOVE 0x0008 /* trace cursor moves and scrolls */
+#define TRACE_CHARPUT 0x0010 /* trace all character outputs */
+#define TRACE_ORDINARY 0x001F /* trace all update actions */
+#define TRACE_CALLS 0x0020 /* trace all curses calls */
+#define TRACE_VIRTPUT 0x0040 /* trace virtual character puts */
+#define TRACE_IEVENT 0x0080 /* trace low-level input processing */
+#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_ATTRS 0x1000 /* trace attribute updates */
+
+#define TRACE_SHIFT 13 /* number of bits in the trace masks */
+#define TRACE_MAXIMUM ((1 << TRACE_SHIFT) - 1) /* maximum trace level */
+
+#if defined(TRACE) || defined(NCURSES_TEST)
+extern NCURSES_EXPORT_VAR(int) _nc_optimize_enable; /* enable optimizations */
+#ifdef _XOPEN_SOURCE_EXTENDED
+extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
+extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
+#endif
+extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
+#define OPTIMIZE_MVCUR 0x01 /* cursor movement optimization */
+#define OPTIMIZE_HASHMAP 0x02 /* diff hashing to detect scrolls */
+#define OPTIMIZE_SCROLL 0x04 /* scroll optimization */
+#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */
+#endif
+
+#ifdef __cplusplus
+
+/* these names conflict with STL */
+#undef box
+#undef clear
+#undef erase
+#undef move
+#undef refresh
+
+}
+#endif
+
+#endif /* __NCURSES_H */
diff --git a/Build/source/libs/ncurses/include/curses.wide b/Build/source/libs/ncurses/include/curses.wide
new file mode 100644
index 00000000000..a37f3f845d4
--- /dev/null
+++ b/Build/source/libs/ncurses/include/curses.wide
@@ -0,0 +1,239 @@
+
+#ifdef _XOPEN_SOURCE_EXTENDED
+
+/* $Id: curses.wide,v 1.28 2004/01/03 20:35:14 tom Exp $ */
+
+extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
+
+#define NCURSES_WACS(c) (&_nc_wacs[(unsigned char)c])
+
+#define WACS_BSSB NCURSES_WACS('l')
+#define WACS_SSBB NCURSES_WACS('m')
+#define WACS_BBSS NCURSES_WACS('k')
+#define WACS_SBBS NCURSES_WACS('j')
+#define WACS_SBSS NCURSES_WACS('u')
+#define WACS_SSSB NCURSES_WACS('t')
+#define WACS_SSBS NCURSES_WACS('v')
+#define WACS_BSSS NCURSES_WACS('w')
+#define WACS_BSBS NCURSES_WACS('q')
+#define WACS_SBSB NCURSES_WACS('x')
+#define WACS_SSSS NCURSES_WACS('n')
+
+#define WACS_ULCORNER WACS_BSSB
+#define WACS_LLCORNER WACS_SSBB
+#define WACS_URCORNER WACS_BBSS
+#define WACS_LRCORNER WACS_SBBS
+#define WACS_RTEE WACS_SBSS
+#define WACS_LTEE WACS_SSSB
+#define WACS_BTEE WACS_SSBS
+#define WACS_TTEE WACS_BSSS
+#define WACS_HLINE WACS_BSBS
+#define WACS_VLINE WACS_SBSB
+#define WACS_PLUS WACS_SSSS
+
+#define WACS_S1 NCURSES_WACS('o') /* scan line 1 */
+#define WACS_S9 NCURSES_WACS('s') /* scan line 9 */
+#define WACS_DIAMOND NCURSES_WACS('`') /* diamond */
+#define WACS_CKBOARD NCURSES_WACS('a') /* checker board */
+#define WACS_DEGREE NCURSES_WACS('f') /* degree symbol */
+#define WACS_PLMINUS NCURSES_WACS('g') /* plus/minus */
+#define WACS_BULLET NCURSES_WACS('~') /* bullet */
+
+ /* Teletype 5410v1 symbols */
+#define WACS_LARROW NCURSES_WACS(',') /* arrow left */
+#define WACS_RARROW NCURSES_WACS('+') /* arrow right */
+#define WACS_DARROW NCURSES_WACS('.') /* arrow down */
+#define WACS_UARROW NCURSES_WACS('-') /* arrow up */
+#define WACS_BOARD NCURSES_WACS('h') /* board of squares */
+#define WACS_LANTERN NCURSES_WACS('i') /* lantern symbol */
+#define WACS_BLOCK NCURSES_WACS('0') /* solid square block */
+
+ /* ncurses extensions */
+#define WACS_S3 NCURSES_WACS('p') /* scan line 3 */
+#define WACS_S7 NCURSES_WACS('r') /* scan line 7 */
+#define WACS_LEQUAL NCURSES_WACS('y') /* less/equal */
+#define WACS_GEQUAL NCURSES_WACS('z') /* greater/equal */
+#define WACS_PI NCURSES_WACS('{') /* Pi */
+#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */
+#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */
+
+/*
+ * Function prototypes for wide-character operations.
+ *
+ * "generated" comments should include ":WIDEC" to make the corresponding
+ * functions ifdef'd in lib_gen.c
+ *
+ * "implemented" comments do not need this marker.
+ */
+
+extern NCURSES_EXPORT(int) add_wch (const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) add_wchnstr (const cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) add_wchstr (const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) addnwstr (const wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) addwstr (const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) bkgrnd (const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(void) bkgrndset (const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) border_set (const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) box_set (WINDOW *, const cchar_t *, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) echo_wchar (const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) erasewchar (wchar_t*); /* implemented */
+extern NCURSES_EXPORT(int) get_wch (wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) get_wstr (wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) getbkgrnd (cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) getcchar (const cchar_t *, wchar_t*, attr_t*, short*, void*); /* implemented */
+extern NCURSES_EXPORT(int) getn_wstr (wint_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) hline_set (const cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) in_wch (cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) in_wchnstr (cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) in_wchstr (cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) innwstr (wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) ins_nwstr (const wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) ins_wch (const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) ins_wstr (const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) inwstr (wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(NCURSES_CONST char*) key_name (wchar_t); /* implemented */
+extern NCURSES_EXPORT(int) killwchar (wchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) mvadd_wch (int, int, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvadd_wchnstr (int, int, const cchar_t *, int);/* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvadd_wchstr (int, int, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvaddnwstr (int, int, const wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvaddwstr (int, int, const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvget_wch (int, int, wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvget_wstr (int, int, wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvgetn_wstr (int, int, wint_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvhline_set (int, int, const cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvin_wch (int, int, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvin_wchnstr (int, int, cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvin_wchstr (int, int, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvinnwstr (int, int, wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvins_nwstr (int, int, const wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvins_wch (int, int, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvins_wstr (int, int, const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvinwstr (int, int, wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvvline_set (int, int, const cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwadd_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwadd_wchnstr (WINDOW *, int, int, const cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwadd_wchstr (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwaddnwstr (WINDOW *, int, int, const wchar_t *, int);/* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwaddwstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwget_wch (WINDOW *, int, int, wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwget_wstr (WINDOW *, int, int, wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwgetn_wstr (WINDOW *, int, int, wint_t *, int);/* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwhline_set (WINDOW *, int, int, const cchar_t *, int);/* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwin_wch (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwin_wchnstr (WINDOW *, int,int, cchar_t *,int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwin_wchstr (WINDOW *, int, int, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwinnwstr (WINDOW *, int, int, wchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwins_nwstr (WINDOW *, int,int, const wchar_t *,int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwins_wch (WINDOW *, int, int, const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwins_wstr (WINDOW *, int, int, const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwinwstr (WINDOW *, int, int, wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) mvwvline_set (WINDOW *, int,int, const cchar_t *,int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) pecho_wchar (WINDOW *, const cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) setcchar (cchar_t *, const wchar_t *, const attr_t, short, const void *); /* implemented */
+extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */
+extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */
+extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *); /* implemented */
+extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); /* implemented */
+extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */
+extern NCURSES_EXPORT(int) wadd_wchstr (WINDOW *,const cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) waddnwstr (WINDOW *,const wchar_t *,int); /* implemented */
+extern NCURSES_EXPORT(int) waddwstr (WINDOW *,const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) wbkgrnd (WINDOW *,const cchar_t *); /* implemented */
+extern NCURSES_EXPORT(void) wbkgrndset (WINDOW *,const cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wborder_set (WINDOW *,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*,const cchar_t*); /* implemented */
+extern NCURSES_EXPORT(int) wecho_wchar (WINDOW *, const cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wget_wch (WINDOW *, wint_t *); /* implemented */
+extern NCURSES_EXPORT(int) wget_wstr (WINDOW *, wint_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) wgetbkgrnd (WINDOW *, cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wgetn_wstr (WINDOW *,wint_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) whline_set (WINDOW *, const cchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) win_wch (WINDOW *, cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) win_wchnstr (WINDOW *, cchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) win_wchstr (WINDOW *, cchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) winnwstr (WINDOW *, wchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) wins_nwstr (WINDOW *, const wchar_t *, int); /* implemented */
+extern NCURSES_EXPORT(int) wins_wch (WINDOW *, const cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wins_wstr (WINDOW *, const wchar_t *); /* generated:WIDEC */
+extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */
+extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */
+extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */
+
+/*
+ * XSI curses macros for XPG4 conformance.
+ */
+#define add_wch(c) wadd_wch(stdscr,c)
+#define add_wchnstr(str,n) wadd_wchnstr(stdscr,str,n)
+#define add_wchstr(str) wadd_wchstr(stdscr,str)
+#define addnwstr(wstr,n) waddnwstr(stdscr,wstr,n)
+#define addwstr(wstr) waddwstr(stdscr,wstr)
+#define bkgrnd(c) wbkgrnd(stdscr,c)
+#define bkgrndset(c) wbkgrndset(stdscr,c)
+#define border_set(l,r,t,b,tl,tr,bl,br) wborder_set(stdscr,l,r,t,b,tl,tr,bl,br)
+#define box_set(w,v,h) wborder_set(w,v,v,h,h,0,0,0,0)
+#define echo_wchar(c) wecho_wchar(stdscr,c)
+#define get_wch(c) wget_wch(stdscr,c)
+#define get_wstr(t) wget_wstr(stdscr,t)
+#define getbkgrnd(wch) wgetbkgrnd(stdscr,wch)
+#define getn_wstr(t,n) wgetn_wstr(stdscr,t,n)
+#define hline_set(c,n) whline_set(stdscr,c,n)
+#define in_wch(c) win_wch(stdscr,c)
+#define in_wchnstr(c,n) win_wchnstr(stdscr,c,n)
+#define in_wchstr(c) win_wchstr(stdscr,c)
+#define innwstr(c,n) winnwstr(stdscr,c,n)
+#define ins_nwstr(t,n) wins_nwstr(stdscr,t,n)
+#define ins_wch(c) wins_wch(stdscr,c)
+#define ins_wstr(t) wins_wstr(stdscr,t)
+#define inwstr(c) winwstr(stdscr,c)
+#define vid_attr(a,pair,opts) vidattr(a)
+#define vline_set(c,n) wvline_set(stdscr,c,n)
+#define wadd_wchstr(win,str) wadd_wchnstr(win,str,-1)
+#define waddwstr(win,wstr) waddnwstr(win,wstr,-1)
+#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
+#define wget_wstr(w,t) wgetn_wstr(w,t,-1)
+#define wgetbkgrnd(win,wch) (*wch = win->_bkgrnd, OK)
+#define win_wchstr(w,c) win_wchnstr(w,c,-1)
+#define wins_wstr(w,t) wins_nwstr(w,t,-1)
+
+#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,y,x,c)
+#define mvadd_wchnstr(y,x,s,n) mvwadd_wchnstr(stdscr,y,x,s,n)
+#define mvadd_wchstr(y,x,s) mvwadd_wchstr(stdscr,y,x,s)
+#define mvaddnwstr(y,x,wstr,n) mvwaddnwstr(stdscr,y,x,wstr,n)
+#define mvaddwstr(y,x,wstr) mvwaddwstr(stdscr,y,x,wstr)
+#define mvget_wch(y,x,c) mvwget_wch(stdscr,y,x,c)
+#define mvget_wstr(y,x,t) mvwget_wstr(stdscr,y,x,t)
+#define mvgetn_wstr(y,x,t,n) mvwgetn_wstr(stdscr,y,x,t,n)
+#define mvhline_set(y,x,c,n) mvwhline_set(stdscr,y,x,c,n)
+#define mvin_wch(y,x,c) mvwin_wch(stdscr,y,x,c)
+#define mvin_wchnstr(y,x,c,n) mvwin_wchnstr(stdscr,y,x,c,n)
+#define mvin_wchstr(y,x,c) mvwin_wchstr(stdscr,y,x,c)
+#define mvinnwstr(y,x,c,n) mvwinnwstr(stdscr,y,x,c,n)
+#define mvins_nwstr(y,x,t,n) mvwins_nwstr(stdscr,y,x,t,n)
+#define mvins_wch(y,x,c) mvwins_wch(stdscr,y,x,c)
+#define mvins_wstr(y,x,t) mvwins_wstr(stdscr,y,x,t)
+#define mvinwstr(y,x,c) mvwinwstr(stdscr,y,x,c)
+#define mvvline_set(y,x,c,n) mvwvline_set(stdscr,y,x,c,n)
+
+#define mvwadd_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wadd_wch(win,c))
+#define mvwadd_wchnstr(win,y,x,s,n) (wmove(win,y,x) == ERR ? ERR : wadd_wchnstr(win,s,n))
+#define mvwadd_wchstr(win,y,x,s) (wmove(win,y,x) == ERR ? ERR : wadd_wchstr(win,s))
+#define mvwaddnwstr(win,y,x,wstr,n) (wmove(win,y,x) == ERR ? ERR : waddnwstr(win,wstr,n))
+#define mvwaddwstr(win,y,x,wstr) (wmove(win,y,x) == ERR ? ERR : waddwstr(win,wstr))
+#define mvwget_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wget_wch(win,c))
+#define mvwget_wstr(win,y,x,t) (wmove(win,y,x) == ERR ? ERR : wget_wstr(win,t))
+#define mvwgetn_wstr(win,y,x,t,n) (wmove(win,y,x) == ERR ? ERR : wgetn_wstr(win,t,n))
+#define mvwhline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : whline_set(win,c,n))
+#define mvwin_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : win_wch(win,c))
+#define mvwin_wchnstr(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : win_wchnstr(win,c,n))
+#define mvwin_wchstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : win_wchstr(win,c))
+#define mvwinnwstr(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : winnwstr(win,c,n))
+#define mvwins_nwstr(win,y,x,t,n) (wmove(win,y,x) == ERR ? ERR : wins_nwstr(win,t,n))
+#define mvwins_wch(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : wins_wch(win,c))
+#define mvwins_wstr(win,y,x,t) (wmove(win,y,x) == ERR ? ERR : wins_wstr(win,t))
+#define mvwinwstr(win,y,x,c) (wmove(win,y,x) == ERR ? ERR : winwstr(win,c))
+#define mvwvline_set(win,y,x,c,n) (wmove(win,y,x) == ERR ? ERR : wvline_set(win,c,n))
+
+#endif /* _XOPEN_SOURCE_EXTENDED */
diff --git a/Build/source/libs/ncurses/include/edit_cfg.sh b/Build/source/libs/ncurses/include/edit_cfg.sh
new file mode 100755
index 00000000000..8d64fee1801
--- /dev/null
+++ b/Build/source/libs/ncurses/include/edit_cfg.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+# $Id: edit_cfg.sh,v 1.12 2001/12/23 00:52:40 tom Exp $
+##############################################################################
+# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,2000
+#
+# Edit the default value of the term.h file based on the autoconf-generated
+# values:
+#
+# $1 = ncurses_cfg.h
+# $2 = term.h
+#
+BAK=save$$
+TMP=edit$$
+trap "rm -f $BAK $TMP" 0 1 2 5 15
+for name in \
+ HAVE_TCGETATTR \
+ HAVE_TERMIOS_H \
+ HAVE_TERMIO_H \
+ BROKEN_LINKER
+do
+ mv $2 $BAK
+ if ( grep "[ ]$name[ ]" $1 2>&1 >$TMP )
+ then
+ value=1
+ else
+ value=0
+ fi
+ echo '** edit: '$name $value
+ sed \
+ -e "s@#define ${name}.*\$@#define $name $value@" \
+ -e "s@#if $name\$@#if $value /* $name */@" \
+ -e "s@#if !$name\$@#if $value /* !$name */@" \
+ $BAK >$2
+ if (cmp -s $2 $BAK)
+ then
+ mv $BAK $2
+ else
+ rm -f $BAK
+ fi
+done
diff --git a/Build/source/libs/ncurses/include/headers b/Build/source/libs/ncurses/include/headers
new file mode 100644
index 00000000000..da3738db1e2
--- /dev/null
+++ b/Build/source/libs/ncurses/include/headers
@@ -0,0 +1,35 @@
+##############################################################################
+# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey <dickey@clark.net> 1996
+#
+term.h
+curses.h
+unctrl.h
+termcap.h
+$(srcdir)/ncurses_dll.h
diff --git a/Build/source/libs/ncurses/include/nc_alloc.h b/Build/source/libs/ncurses/include/nc_alloc.h
new file mode 100644
index 00000000000..95efa38fe09
--- /dev/null
+++ b/Build/source/libs/ncurses/include/nc_alloc.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 <dickey@clark.net> 1996,1997 *
+ ****************************************************************************/
+/* $Id: nc_alloc.h,v 1.12 2004/05/08 18:44:57 tom Exp $ */
+
+#ifndef NC_ALLOC_included
+#define NC_ALLOC_included 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if HAVE_LIBDMALLOC
+#include <dmalloc.h> /* Gray Watson's library */
+#else
+#undef HAVE_LIBDMALLOC
+#define HAVE_LIBDMALLOC 0
+#endif
+
+#if HAVE_LIBDBMALLOC
+#include <dbmalloc.h> /* Conor Cahill's library */
+#else
+#undef HAVE_LIBDBMALLOC
+#define HAVE_LIBDBMALLOC 0
+#endif
+
+#ifndef NO_LEAKS
+#define NO_LEAKS 0
+#endif
+
+#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS
+#define HAVE_NC_FREEALL 1
+struct termtype;
+extern NCURSES_EXPORT(void) _nc_free_and_exit(int) GCC_NORETURN;
+extern NCURSES_EXPORT(void) _nc_free_tparm(void);
+extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
+#define ExitProgram(code) _nc_free_and_exit(code)
+#endif
+
+#ifndef HAVE_NC_FREEALL
+#define HAVE_NC_FREEALL 0
+#endif
+
+#ifndef ExitProgram
+#define ExitProgram(code) exit(code)
+#endif
+
+/* doalloc.c */
+extern NCURSES_EXPORT(void *) _nc_doalloc(void *, size_t);
+#if !HAVE_STRDUP
+#define strdup _nc_strdup
+extern NCURSES_EXPORT(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))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NC_ALLOC_included */
diff --git a/Build/source/libs/ncurses/include/nc_panel.h b/Build/source/libs/ncurses/include/nc_panel.h
new file mode 100644
index 00000000000..bb1f6745ac0
--- /dev/null
+++ b/Build/source/libs/ncurses/include/nc_panel.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+
+/*
+ * $Id: nc_panel.h,v 1.3 2000/12/10 02:04:35 tom Exp $
+ *
+ * nc_panel.h
+ *
+ * Headerfile to provide an interface for the panel layer into
+ * the SCREEN structure of the ncurses core.
+ */
+
+#ifndef NC_PANEL_H
+#define NC_PANEL_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct panel; /* Forward Declaration */
+
+struct panelhook {
+ struct panel* top_panel;
+ struct panel* bottom_panel;
+ struct panel* stdscr_pseudo_panel;
+};
+
+/* Retrieve the panelhook of the current screen */
+extern NCURSES_EXPORT(struct panelhook*) _nc_panelhook (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NC_PANEL_H */
diff --git a/Build/source/libs/ncurses/include/ncurses_cfg.hin b/Build/source/libs/ncurses/include/ncurses_cfg.hin
new file mode 100644
index 00000000000..14391bad91b
--- /dev/null
+++ b/Build/source/libs/ncurses/include/ncurses_cfg.hin
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+/*
+ * $Id: ncurses_cfg.hin,v 1.4 2002/09/07 16:55:14 tom Exp $
+ *
+ * This is a template-file used to generate the "ncurses_cfg.h" file.
+ *
+ * Rather than list every definition, the configuration script substitutes the
+ * definitions that it finds using 'sed'. You need a patch (original date
+ * 971222) to autoconf 2.12 or 2.13 to do this.
+ *
+ * See:
+ * http://invisible-island.net/autoconf/
+ * ftp://invisible-island.net/autoconf/
+ */
+#ifndef NC_CONFIG_H
+#define NC_CONFIG_H
+@DEFS@
+
+#include <ncurses_def.h>
+
+ /* The C compiler may not treat these properly but C++ has to */
+#ifdef __cplusplus
+#undef const
+#undef inline
+#else
+#if defined(lint) || defined(TRACE)
+#undef inline
+#define inline /* nothing */
+#endif
+#endif
+
+#endif /* NC_CONFIG_H */
diff --git a/Build/source/libs/ncurses/include/ncurses_defs b/Build/source/libs/ncurses/include/ncurses_defs
new file mode 100644
index 00000000000..73cc026a78a
--- /dev/null
+++ b/Build/source/libs/ncurses/include/ncurses_defs
@@ -0,0 +1,180 @@
+# $Id: ncurses_defs,v 1.25 2004/10/09 18:18:46 tom Exp $
+##############################################################################
+# Copyright (c) 2000-2003,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# 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. #
+##############################################################################
+#
+# See "MKncurses_def.sh" for an explanation.
+#
+# (hint: don't try to define NDEBUG ;-)
+
+BROKEN_LINKER
+BSD_TPUTS
+CC_HAS_INLINE_FUNCS
+CC_HAS_PROTOS
+CPP_HAS_PARAM_INIT
+CPP_HAS_VSCAN_FUNC
+CURSES_ACS_ARRAY acs_map
+CURSES_WACS_ARRAY _nc_wacs
+DECL_ERRNO
+ETIP_NEEDS_MATH_H
+GCC_NORETURN /* nothing */
+GCC_UNUSED /* nothing */
+HAVE_BIG_CORE
+HAVE_BSD_CGETENT
+HAVE_BSD_SIGNAL_H
+HAVE_BTOWC
+HAVE_BUILTIN_H
+HAVE_DIRENT_H
+HAVE_ERRNO
+HAVE_FCNTL_H
+HAVE_FORM_H
+HAVE_GETCWD
+HAVE_GETEGID
+HAVE_GETEUID
+HAVE_GETNSTR
+HAVE_GETOPT_H
+HAVE_GETTIMEOFDAY
+HAVE_GETTTYNAM
+HAVE_GPM_H
+HAVE_GPP_BUILTIN_H
+HAVE_GXX_BUILTIN_H
+HAVE_HAS_KEY
+HAVE_ISASCII
+HAVE_ISSETUGID
+HAVE_LANGINFO_CODESET
+HAVE_LIBC_H
+HAVE_LIBDBMALLOC
+HAVE_LIBDMALLOC
+HAVE_LIBFORM
+HAVE_LIBGPM
+HAVE_LIBMENU
+HAVE_LIBPANEL
+HAVE_LIMITS_H
+HAVE_LINK
+HAVE_LOCALE_H
+HAVE_LONG_FILE_NAMES
+HAVE_MBLEN
+HAVE_MBRLEN
+HAVE_MBRTOWC
+HAVE_MBTOWC
+HAVE_MENU_H
+HAVE_MKSTEMP
+HAVE_NANOSLEEP
+HAVE_NC_ALLOC_H
+HAVE_PANEL_H
+HAVE_POLL
+HAVE_POLL_H
+HAVE_PURIFY
+HAVE_PUTWC
+HAVE_REGEXPR_H_FUNCS
+HAVE_REGEXP_H_FUNCS
+HAVE_REGEX_H_FUNCS
+HAVE_REMOVE
+HAVE_RESIZETERM
+HAVE_SELECT
+HAVE_SETBUF
+HAVE_SETBUFFER
+HAVE_SETVBUF
+HAVE_SIGACTION
+HAVE_SIGVEC
+HAVE_SIZECHANGE
+HAVE_SLK_COLOR
+HAVE_STRDUP
+HAVE_STRSTR
+HAVE_SYMLINK
+HAVE_SYS_BSDTYPES_H
+HAVE_SYS_IOCTL_H
+HAVE_SYS_PARAM_H
+HAVE_SYS_POLL_H
+HAVE_SYS_SELECT_H
+HAVE_SYS_TERMIO_H
+HAVE_SYS_TIMES_H
+HAVE_SYS_TIME_H
+HAVE_SYS_TIME_SELECT
+HAVE_TCGETATTR
+HAVE_TCGETPGRP
+HAVE_TELL
+HAVE_TERMIOS_H
+HAVE_TERMIO_H
+HAVE_TIMES
+HAVE_TTYENT_H
+HAVE_TYPEINFO
+HAVE_TYPE_ATTR_T
+HAVE_TYPE_SIGACTION
+HAVE_UNISTD_H
+HAVE_UNLINK
+HAVE_USE_DEFAULT_COLORS
+HAVE_VFSCANF
+HAVE_VSNPRINTF
+HAVE_VSSCANF
+HAVE_WCTOB
+HAVE_WCTOMB
+HAVE_WCTYPE_H
+HAVE_WORKING_POLL
+HAVE_WRESIZE
+HAVE__DOSCAN
+MIXEDCASE_FILENAMES
+NCURSES_EXPANDED
+NCURSES_EXT_FUNCS
+NCURSES_NOMACROS
+NCURSES_NO_PADDING
+NCURSES_PATHSEP ':'
+NDEBUG
+NEED_PTEM_H
+NO_LEAKS
+PURE_TERMINFO
+RETSIGTYPE
+STDC_HEADERS
+SVR4_ACTION
+SVR4_TERMIO
+SYSTEM_NAME "unknown"
+TERMINFO "none"
+TERMPATH "none"
+TIME_WITH_SYS_TIME
+TYPEOF_CHTYPE
+USE_COLORFGBG
+USE_DATABASE
+USE_GETCAP
+USE_GETCAP_CACHE
+USE_HARD_TABS
+USE_HASHMAP
+USE_HOME_TERMINFO
+USE_LINKS
+USE_MY_MEMMOVE
+USE_OK_BCOPY
+USE_RCS_IDS
+USE_SAFE_SPRINTF
+USE_SCROLL_HINTS
+USE_SIGWINCH
+USE_STDIO_VSCAN
+USE_STRSTREAM_VSCAN
+USE_STRSTREAM_VSCAN_CAST
+USE_SYMLINKS
+USE_SYSMOUSE
+USE_TERMCAP
+USE_WIDEC_SUPPORT
+USE_XMC_SUPPORT
diff --git a/Build/source/libs/ncurses/include/ncurses_dll.h b/Build/source/libs/ncurses/include/ncurses_dll.h
new file mode 100644
index 00000000000..de46c60508e
--- /dev/null
+++ b/Build/source/libs/ncurses/include/ncurses_dll.h
@@ -0,0 +1,52 @@
+/* $Id: ncurses_dll.h,v 1.4 2003/07/19 18:44:32 Charles.Wilson Exp $ */
+
+#ifndef NCURSES_DLL_H_incl
+#define NCURSES_DLL_H_incl 1
+
+/* no longer needed on cygwin or mingw, thanks to auto-import */
+/* but this structure may be useful at some point for an MSVC build */
+/* so, for now unconditionally define the important flags */
+/* "the right way" for proper static and dll+auto-import behavior */
+#undef NCURSES_DLL
+#define NCURSES_STATIC
+
+#if defined(__CYGWIN__)
+# if defined(NCURSES_DLL)
+# if defined(NCURSES_STATIC)
+# undef NCURSES_STATIC
+# endif
+# endif
+# undef NCURSES_IMPEXP
+# undef NCURSES_API
+# undef NCURSES_EXPORT
+# undef NCURSES_EXPORT_VAR
+# if defined(NCURSES_DLL)
+/* building a DLL */
+# define NCURSES_IMPEXP __declspec(dllexport)
+# elif defined(NCURSES_STATIC)
+/* building or linking to a static library */
+# define NCURSES_IMPEXP /* nothing */
+# else
+/* linking to the DLL */
+# define NCURSES_IMPEXP __declspec(dllimport)
+# endif
+# define NCURSES_API __cdecl
+# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
+# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
+#endif
+
+/* Take care of non-cygwin platforms */
+#if !defined(NCURSES_IMPEXP)
+# define NCURSES_IMPEXP /* nothing */
+#endif
+#if !defined(NCURSES_API)
+# define NCURSES_API /* nothing */
+#endif
+#if !defined(NCURSES_EXPORT)
+# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
+#endif
+#if !defined(NCURSES_EXPORT_VAR)
+# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
+#endif
+
+#endif /* NCURSES_DLL_H_incl */
diff --git a/Build/source/libs/ncurses/include/term_entry.h b/Build/source/libs/ncurses/include/term_entry.h
new file mode 100644
index 00000000000..c83ac7455ba
--- /dev/null
+++ b/Build/source/libs/ncurses/include/term_entry.h
@@ -0,0 +1,165 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1998-2004 *
+ ****************************************************************************/
+
+/* $Id: term_entry.h,v 1.33 2004/07/05 11:51:16 tom Exp $ */
+
+/*
+ * term_entry.h -- interface to entry-manipulation code
+ */
+
+#ifndef NCURSES_TERM_ENTRY_H_incl
+#define NCURSES_TERM_ENTRY_H_incl 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <term.h>
+
+#define MAX_USES 32
+#define MAX_CROSSLINKS 16
+
+typedef struct entry {
+ TERMTYPE tterm;
+ int nuses;
+ struct
+ {
+ 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;
+ struct entry *last;
+}
+ENTRY;
+
+#if NCURSES_XNAMES
+#define NUM_BOOLEANS(tp) (tp)->num_Booleans
+#define NUM_NUMBERS(tp) (tp)->num_Numbers
+#define NUM_STRINGS(tp) (tp)->num_Strings
+#define EXT_NAMES(tp,i,limit,index,table) (i >= limit) ? tp->ext_Names[index] : table[i]
+#else
+#define NUM_BOOLEANS(tp) BOOLCOUNT
+#define NUM_NUMBERS(tp) NUMCOUNT
+#define NUM_STRINGS(tp) STRCOUNT
+#define EXT_NAMES(tp,i,limit,index,table) table[i]
+#endif
+
+#define NUM_EXT_NAMES(tp) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
+
+#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
+#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++)
+#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
+
+#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
+#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
+#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)
+
+extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
+extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
+#define for_entry_list(qp) for (qp = _nc_head; qp; qp = qp->next)
+
+#define MAX_LINE 132
+
+#define NULLHOOK (bool(*)(ENTRY *))0
+
+/*
+ * Note that WANTED and PRESENT are not simple inverses! If a capability
+ * has been explicitly cancelled, it's not considered WANTED.
+ */
+#define WANTED(s) ((s) == ABSENT_STRING)
+#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
+
+#define ANDMISSING(p,q) \
+ {if (PRESENT(p) && !PRESENT(q)) _nc_warning(#p " but no " #q);}
+
+#define PAIRED(p,q) \
+ { \
+ if (PRESENT(q) && !PRESENT(p)) \
+ _nc_warning(#q " but no " #p); \
+ if (PRESENT(p) && !PRESENT(q)) \
+ _nc_warning(#p " but no " #q); \
+ }
+
+/* alloc_entry.c: elementary allocation code */
+extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
+extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
+extern NCURSES_EXPORT(void) _nc_init_entry (TERMTYPE *const);
+extern NCURSES_EXPORT(void) _nc_merge_entry (TERMTYPE *const, TERMTYPE *const);
+extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
+
+/* alloc_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE *, TERMTYPE *);
+extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, TERMTYPE *);
+
+/* free_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
+
+/* lib_acs.c */
+extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
+
+/* parse_entry.c: entry-parsing code */
+#if NCURSES_XNAMES
+extern NCURSES_EXPORT_VAR(bool) _nc_user_definable;
+extern NCURSES_EXPORT_VAR(bool) _nc_disable_period;
+#endif
+extern NCURSES_EXPORT(int) _nc_parse_entry (ENTRY *, int, bool);
+extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
+
+/* write_entry.c: writing an entry to the file system */
+extern NCURSES_EXPORT(void) _nc_set_writedir (char *);
+extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const);
+
+/* comp_parse.c: entry list handling */
+extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
+extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
+extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
+extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
+extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
+extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
+extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE *, bool);
+
+/* trace_xnames.c */
+extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NCURSES_TERM_ENTRY_H_incl */
diff --git a/Build/source/libs/ncurses/include/termcap.h.in b/Build/source/libs/ncurses/include/termcap.h.in
new file mode 100644
index 00000000000..6adc3122206
--- /dev/null
+++ b/Build/source/libs/ncurses/include/termcap.h.in
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/* $Id: termcap.h.in,v 1.16 2001/03/24 21:53:27 tom Exp $ */
+
+#ifndef NCURSES_TERMCAP_H_incl
+#define NCURSES_TERMCAP_H_incl 1
+
+#undef NCURSES_VERSION
+#define NCURSES_VERSION "@NCURSES_MAJOR@.@NCURSES_MINOR@"
+
+#include <ncurses_dll.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#include <sys/types.h>
+
+#undef NCURSES_CONST
+#define NCURSES_CONST @NCURSES_CONST@
+
+#undef NCURSES_OSPEED
+#define NCURSES_OSPEED @NCURSES_OSPEED@
+
+extern NCURSES_EXPORT_VAR(char) PC;
+extern NCURSES_EXPORT_VAR(char *) UP;
+extern NCURSES_EXPORT_VAR(char *) BC;
+extern NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed;
+
+#if !defined(NCURSES_TERM_H_incl)
+extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);
+extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
+extern NCURSES_EXPORT(int) tgetent (char *, const char *);
+extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);
+extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);
+extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NCURSES_TERMCAP_H_incl */
diff --git a/Build/source/libs/ncurses/include/tic.h b/Build/source/libs/ncurses/include/tic.h
new file mode 100644
index 00000000000..7765c5aa3e3
--- /dev/null
+++ b/Build/source/libs/ncurses/include/tic.h
@@ -0,0 +1,311 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996 on *
+ ****************************************************************************/
+
+/*
+ * $Id: tic.h,v 1.49 2004/04/03 20:22:58 tom Exp $
+ * tic.h - Global variables and structures for the terminfo
+ * compiler.
+ */
+
+#ifndef __TIC_H
+#define __TIC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <curses.h> /* for the _tracef() prototype, ERR/OK, bool defs */
+
+/*
+** The format of compiled terminfo files is as follows:
+**
+** Header (12 bytes), containing information given below
+** Names Section, containing the names of the terminal
+** Boolean Section, containing the values of all of the
+** boolean capabilities
+** A null byte may be inserted here to make
+** sure that the Number Section begins on an
+** even word boundary.
+** Number Section, containing the values of all of the numeric
+** capabilities, each as a short integer
+** String Section, containing short integer offsets into the
+** String Table, one per string capability
+** String Table, containing the actual characters of the string
+** capabilities.
+**
+** NOTE that all short integers in the file are stored using VAX/PDP-style
+** byte-order, i.e., least-significant byte first.
+**
+** There is no structure definition here because it would only confuse
+** matters. Terminfo format is a raw byte layout, not a structure
+** dump. If you happen to be on a little-endian machine with 16-bit
+** shorts that requires no padding between short members in a struct,
+** then there is a natural C structure that captures the header, but
+** not very helpfully.
+*/
+
+#define MAGIC 0432 /* first two bytes of a compiled entry */
+
+/*
+ * The "maximum" here is misleading; XSI guarantees minimum values, which a
+ * given implementation may exceed.
+ */
+#define MAX_NAME_SIZE 512 /* maximum legal name field size (XSI:127) */
+#define MAX_ENTRY_SIZE 4096 /* maximum legal entry size */
+
+/*
+ * The maximum size of individual name or alias is guaranteed in XSI to be at
+ * least 14, since that corresponds to the older filename lengths. Newer
+ * systems allow longer aliases, though not many terminal descriptions are
+ * written to use them. The MAX_ALIAS symbol is used for warnings.
+ */
+#if HAVE_LONG_FILE_NAMES
+#define MAX_ALIAS 32 /* smaller than POSIX minimum for PATH_MAX */
+#else
+#define MAX_ALIAS 14 /* SVr3 filename length */
+#endif
+
+/* 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) << TRACE_SHIFT)
+
+#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 >= DEBUG_LEVEL(n)) _tracef a
+#else
+#define DEBUG(n, a) /*nothing*/
+#endif
+
+extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+extern NCURSES_EXPORT(void) _nc_tracef (char *, ...) GCC_PRINTFLIKE(1,2);
+extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
+extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
+
+/*
+ * These are the types of tokens returned by the scanner. The first
+ * three are also used in the hash table of capability names. The scanner
+ * returns one of these values after loading the specifics into the global
+ * structure curr_token.
+ */
+
+#define BOOLEAN 0 /* Boolean capability */
+#define NUMBER 1 /* Numeric capability */
+#define STRING 2 /* String-valued capability */
+#define CANCEL 3 /* Capability to be cancelled in following tc's */
+#define NAMES 4 /* The names for a terminal type */
+#define UNDEF 5 /* Undefined */
+
+#define NO_PUSHBACK -1 /* used in pushtype to indicate no pushback */
+
+ /*
+ * The global structure in which the specific parts of a
+ * scanned token are returned.
+ *
+ */
+
+struct token
+{
+ char *tk_name; /* name of capability */
+ int tk_valnumber; /* value of capability (if a number) */
+ char *tk_valstring; /* value of capability (if a string) */
+};
+
+extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
+
+ /*
+ * List of keynames with their corresponding code.
+ */
+struct kn {
+ const char *name;
+ int code;
+};
+
+extern NCURSES_EXPORT_VAR(const struct kn) _nc_key_names[];
+
+ /*
+ * Offsets to string capabilities, with the corresponding functionkey
+ * codes.
+ */
+struct tinfo_fkeys {
+ unsigned offset;
+ chtype code;
+ };
+
+#if BROKEN_LINKER
+
+#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
+extern NCURSES_EXPORT(struct tinfo_fkeys *) _nc_tinfo_fkeysf (void);
+
+#else
+
+extern NCURSES_EXPORT_VAR(struct tinfo_fkeys) _nc_tinfo_fkeys[];
+
+#endif
+
+ /*
+ * The file comp_captab.c contains an array of these structures, one
+ * per possible capability. These are indexed by a hash table array of
+ * pointers to the same structures for use by the parser.
+ */
+
+struct name_table_entry
+{
+ const char *nte_name; /* name to hash on */
+ int nte_type; /* BOOLEAN, NUMBER or STRING */
+ short nte_index; /* index of associated variable in its array */
+ short nte_link; /* index in table of next hash, or -1 */
+};
+
+struct alias
+{
+ const char *from;
+ const char *to;
+ const char *source;
+};
+
+extern NCURSES_EXPORT_VAR(const struct name_table_entry * const) _nc_info_hash_table[];
+extern NCURSES_EXPORT_VAR(const struct name_table_entry * const) _nc_cap_hash_table[];
+
+extern NCURSES_EXPORT_VAR(const struct alias) _nc_capalias_table[];
+extern NCURSES_EXPORT_VAR(const struct alias) _nc_infoalias_table[];
+
+extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
+extern NCURSES_EXPORT(const struct name_table_entry * const *) _nc_get_hash_table (bool);
+
+#define NOTFOUND ((struct name_table_entry *) 0)
+
+/* out-of-band values for representing absent capabilities */
+#define ABSENT_BOOLEAN ((signed char)-1) /* 255 */
+#define ABSENT_NUMERIC (-1)
+#define ABSENT_STRING (char *)0
+
+/* out-of-band values for representing cancels */
+#define CANCELLED_BOOLEAN ((signed char)-2) /* 254 */
+#define CANCELLED_NUMERIC (-2)
+#define CANCELLED_STRING (char *)(-1)
+
+#define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */
+#define VALID_NUMERIC(s) ((s) >= 0)
+#define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING)
+
+/* termcap entries longer than this may break old binaries */
+#define MAX_TERMCAP_LENGTH 1023
+
+/* this is a documented limitation of terminfo */
+#define MAX_TERMINFO_LENGTH 4096
+
+#ifndef TERMINFO
+#define TERMINFO "/usr/share/terminfo"
+#endif
+
+/* access.c */
+extern NCURSES_EXPORT(unsigned) _nc_pathlast (const char *);
+extern NCURSES_EXPORT(char *) _nc_basename (char *);
+extern NCURSES_EXPORT(char *) _nc_rootname (char *);
+
+/* comp_hash.c: name lookup */
+extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
+ (const char *, const struct name_table_entry *const *);
+extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
+ (const char *, int, const struct name_table_entry *);
+
+/* comp_scan.c: lexical analysis */
+extern NCURSES_EXPORT(int) _nc_get_token (bool);
+extern NCURSES_EXPORT(void) _nc_panic_mode (char);
+extern NCURSES_EXPORT(void) _nc_push_token (int);
+extern NCURSES_EXPORT(void) _nc_reset_input (FILE *, char *);
+extern NCURSES_EXPORT_VAR(int) _nc_curr_col;
+extern NCURSES_EXPORT_VAR(int) _nc_curr_line;
+extern NCURSES_EXPORT_VAR(int) _nc_syntax;
+extern NCURSES_EXPORT_VAR(long) _nc_comment_end;
+extern NCURSES_EXPORT_VAR(long) _nc_comment_start;
+extern NCURSES_EXPORT_VAR(long) _nc_curr_file_pos;
+extern NCURSES_EXPORT_VAR(long) _nc_start_line;
+#define SYN_TERMINFO 0
+#define SYN_TERMCAP 1
+
+/* comp_error.c: warning & abort messages */
+extern NCURSES_EXPORT(void) _nc_set_source (const char *const name);
+extern NCURSES_EXPORT(void) _nc_get_type (char *name);
+extern NCURSES_EXPORT(void) _nc_set_type (const char *const name);
+extern NCURSES_EXPORT(void) _nc_syserr_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern NCURSES_EXPORT(void) _nc_err_abort (const char *const,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern NCURSES_EXPORT(void) _nc_warning (const char *const,...) GCC_PRINTFLIKE(1,2);
+extern NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings;
+
+/* comp_expand.c: expand string into readable form */
+extern NCURSES_EXPORT(char *) _nc_tic_expand (const char *, bool, int);
+
+/* comp_scan.c: decode string from readable form */
+extern NCURSES_EXPORT(int) _nc_trans_string (char *, char *);
+
+/* captoinfo.c: capability conversion */
+extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const);
+extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int const);
+
+/* lib_tparm.c */
+#define NUM_PARM 9
+
+extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
+
+extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount);
+
+/* lib_tputs.c */
+extern NCURSES_EXPORT_VAR(int) _nc_nulls_sent; /* Add one for every null sent */
+
+/* comp_main.c: compiler main */
+extern const char * _nc_progname;
+
+/* read_entry.c */
+extern NCURSES_EXPORT(const char *) _nc_tic_dir (const char *);
+
+/* write_entry.c */
+extern NCURSES_EXPORT(int) _nc_tic_written (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TIC_H */
diff --git a/Build/source/libs/ncurses/include/unctrl.h.in b/Build/source/libs/ncurses/include/unctrl.h.in
new file mode 100644
index 00000000000..70d74b7714b
--- /dev/null
+++ b/Build/source/libs/ncurses/include/unctrl.h.in
@@ -0,0 +1,63 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * unctrl.h
+ *
+ * Display a printable version of a control character.
+ * Control characters are displayed in caret notation (^x), DELETE is displayed
+ * as ^?. Printable characters are displayed as is.
+ */
+
+/* $Id: unctrl.h.in,v 1.10 2001/03/24 21:53:25 tom Exp $ */
+
+#ifndef NCURSES_UNCTRL_H_incl
+#define NCURSES_UNCTRL_H_incl 1
+
+#undef NCURSES_VERSION
+#define NCURSES_VERSION "@NCURSES_MAJOR@.@NCURSES_MINOR@"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <curses.h>
+
+#undef unctrl
+NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* NCURSES_UNCTRL_H_incl */
diff --git a/Build/source/libs/ncurses/install-sh b/Build/source/libs/ncurses/install-sh
new file mode 100755
index 00000000000..9f59f0be50e
--- /dev/null
+++ b/Build/source/libs/ncurses/install-sh
@@ -0,0 +1,251 @@
+#! /bin/sh
+#
+# install - install a program, script, or datafile
+# 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. 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
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ :
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ :
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ :
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ :
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ :
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ :
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/Build/source/libs/ncurses/man/MKterminfo.sh b/Build/source/libs/ncurses/man/MKterminfo.sh
new file mode 100755
index 00000000000..3a996095656
--- /dev/null
+++ b/Build/source/libs/ncurses/man/MKterminfo.sh
@@ -0,0 +1,110 @@
+#!/bin/sh
+# $Id: MKterminfo.sh,v 1.12 2003/01/11 21:42:12 tom Exp $
+#
+# MKterminfo.sh -- generate terminfo.5 from Caps tabular data
+#
+#***************************************************************************
+# Copyright (c) 1998,2002,2003 Free Software Foundation, Inc. *
+# *
+# Permission is hereby granted, free of charge, to any person obtaining a *
+# copy of this software and associated documentation files (the *
+# "Software"), to deal in the Software without restriction, including *
+# without limitation the rights to use, copy, modify, merge, publish, *
+# distribute, distribute with modifications, sublicense, and/or sell *
+# copies of the Software, and to permit persons to whom the Software is *
+# furnished to do so, subject to the following conditions: *
+# *
+# The above copyright notice and this permission notice shall be included *
+# in all copies or substantial portions of the Software. *
+# *
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+# IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+# THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+# *
+# Except as contained in this notice, the name(s) of the above copyright *
+# holders shall not be used in advertising or otherwise to promote the *
+# sale, use or other dealings in this Software without prior written *
+# authorization. *
+#***************************************************************************
+#
+# This script takes terminfo.head and terminfo.tail and splices in between
+# them a table derived from the Caps data file. Besides avoiding having
+# the docs fall out of sync with the table, this also lets us set up tbl
+# commands for better formatting of the table.
+#
+# NOTE: The s in this script really are control characters. It translates
+#  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:
+if test "${LANGUAGE+set}" = set; then LANGUAGE=C; export LANGUAGE; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi
+
+#
+head=$1
+caps=$2
+tail=$3
+cat <<'EOF'
+'\" t
+.\" DO NOT EDIT THIS FILE BY HAND!
+.\" It is generated from terminfo.head, Caps, and terminfo.tail.
+.\"
+.\" Note: this must be run through tbl before nroff.
+.\" The magic cookie on the first line triggers this under some man programs.
+EOF
+cat $head
+
+temp=temp$$
+sorted=sorted$$
+unsorted=unsorted$$
+trap "rm -f $sorted $temp $unsorted; exit 99" 1 2 5 15
+
+sed -n <$caps "\
+/%%-STOP-HERE-%%/q
+/^#%/s/#%//p
+/^#/d
+s/[ ][ ]*/ /g
+s/$/T}/
+s/ [A-Z0-9_()\-][A-Z0-9_()\-]* [0-9\-][0-9\-]* [Y\-][B\-][C\-][G\-][EK\-]\** / T{/
+s/ bool / /p
+s/ num / /p
+s/ str / /p
+" |sed -e 's/^$/../' | tr "\134" "\006" >$unsorted
+
+rm -f $sorted
+rm -f $temp
+saved=no
+while true
+do
+ data=
+ read data
+ test -z "$data" && break
+ case "$data" in #(vi
+ **) #(vi
+ echo "$data" >>$temp
+ saved=yes
+ ;;
+ *)
+ if test $saved = yes ; then
+ saved=no
+ sort $temp >>$sorted
+ rm -f $temp
+ fi
+ echo "$data" >>$sorted
+ ;;
+ esac
+done <$unsorted
+test $saved = yes && sort $temp >>$sorted
+
+sed -e 's/^\.\.$//' $sorted | tr "\005\006" "\012\134"
+cat $tail
+
+rm -f $sorted $temp $unsorted
diff --git a/Build/source/libs/ncurses/man/Makefile.in b/Build/source/libs/ncurses/man/Makefile.in
new file mode 100644
index 00000000000..92fb9d30cdb
--- /dev/null
+++ b/Build/source/libs/ncurses/man/Makefile.in
@@ -0,0 +1,79 @@
+# $Id: Makefile.in,v 1.35 2003/12/20 18:41:10 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey 1996,1997
+#
+# Makefile for ncurses manual pages.
+#
+# NOTE: When you add or rename a man page, make sure you update both
+# the top-level MANIFEST and any man/*.renames files!
+
+SHELL = /bin/sh
+
+DESTDIR = @DESTDIR@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+mandir = @mandir@
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+all \
+sources : terminfo.5
+depend :
+
+$(DESTDIR)$(mandir) :
+ sh $(srcdir)/../mkinstalldirs $@
+
+EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]*
+
+install install.man : terminfo.5 $(DESTDIR)$(mandir)
+ sh ./edit_man.sh normal installing $(EDITARGS)
+
+uninstall uninstall.man :
+ -sh ./edit_man.sh normal removing $(EDITARGS)
+
+# We compose terminfo.5 from the real sources...
+CAPLIST=$(srcdir)/../include/@TERMINFO_CAPS@
+terminfo.5: $(srcdir)/terminfo.head $(CAPLIST) $(srcdir)/terminfo.tail Makefile $(srcdir)/MKterminfo.sh
+ sh $(srcdir)/MKterminfo.sh $(srcdir)/terminfo.head $(CAPLIST) $(srcdir)/terminfo.tail >terminfo.5
+
+mostlyclean :
+ -rm -f core tags TAGS *~ *.bak *.ln *.atac trace
+
+clean: mostlyclean
+ rm -f terminfo.5
+
+edit_man.sed : make_sed.sh @MANPAGE_RENAMES@
+ sh $srcdir/make_sed.sh @MANPAGE_RENAMES@ >edit_man.sed
+
+distclean realclean: clean
+ rm -f Makefile edit_man.*
diff --git a/Build/source/libs/ncurses/man/captoinfo.1m b/Build/source/libs/ncurses/man/captoinfo.1m
new file mode 100644
index 00000000000..94a5ae96b79
--- /dev/null
+++ b/Build/source/libs/ncurses/man/captoinfo.1m
@@ -0,0 +1,189 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: captoinfo.1m,v 1.18 2004/07/05 13:16:08 tom Exp $
+.TH captoinfo 1M ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+\fBcaptoinfo\fR - convert a \fItermcap\fR description into a \fIterminfo\fR description
+.SH SYNOPSIS
+\fBcaptoinfo\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . .
+.SH DESCRIPTION
+\fBcaptoinfo\fR looks in \fIfile\fR for \fBtermcap\fR descriptions. For each
+one found, an equivalent \fBterminfo\fR description is written to standard
+output. Termcap \fBtc\fR capabilities are translated directly to terminfo
+\fBuse\fR capabilities.
+
+If no \fIfile\fR is given, then the environment variable \fBTERMCAP\fR is used
+for the filename or entry. If \fBTERMCAP\fR is a full pathname to a file, only
+the terminal whose name is specified in the environment variable \fBTERM\fR is
+extracted from that file. If the environment variable \fBTERMCAP\fR is not
+set, then the file \fB\*d\fR is read.
+.TP 5
+\fB-v\fR
+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 TRANSLATIONS FROM NONSTANDARD CAPABILITIES
+.PP
+Some obsolete nonstandard capabilities will automatically be translated
+into standard (SVr4/XSI Curses) terminfo capabilities by \fBcaptoinfo\fR.
+Whenever one of these automatic 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.
+.PP
+.TS H
+c c c c
+c c c c
+l l l l.
+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
+.TE
+.PP
+XENIX termcap also used to have a set of extension capabilities
+for forms drawing, designed to take advantage of the IBM PC
+high-half graphics. They were as follows:
+.PP
+.TS H
+c c
+l l.
+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
+.TE
+.PP
+If the single-line capabilities occur in an entry, they will automatically
+be composed into an \fBacsc\fR string. The double-line capabilities and
+\fBGG\fR are discarded with a warning message.
+.PP
+IBM's AIX has a terminfo facility descended from SVr1 terminfo but incompatible
+with the SVr4 format. The following AIX extensions are automatically
+translated:
+.PP
+.TS
+c c
+l l.
+IBM XSI
+_
+ksel kslt
+kbtab kcbt
+font0 s0ds
+font1 s1ds
+font2 s2ds
+font3 s3ds
+.TE
+.PP
+Additionally, the AIX \fBbox1\fR capability will be automatically translated to
+an \fBacsc\fR string.
+.PP
+Hewlett-Packard's terminfo library supports two nonstandard terminfo
+capabilities \fBmeml\fR (memory lock) and \fBmemu\fR (memory unlock).
+These will be discarded with a warning message.
+.SH NOTES
+This utility is actually a link to \fItic\fR(1M), running in \fI-I\fR mode.
+You can use other \fItic\fR options such as \fB-f\fR and \fB-x\fR.
+
+The trace option isn't identical to SVr4's. Under SVr4, instead of following
+the \fB-v\fR with a trace level n, you repeat it n times.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fB@INFOCMP@\fR(1M), \fBterminfo\fR(\*n)
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/clear.1 b/Build/source/libs/ncurses/man/clear.1
new file mode 100644
index 00000000000..4c4991f1d1a
--- /dev/null
+++ b/Build/source/libs/ncurses/man/clear.1
@@ -0,0 +1,48 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: clear.1,v 1.3 2000/07/15 23:59:35 china Exp $
+.TH clear 1 ""
+.ds n 5
+.SH NAME
+\fBclear\fR - clear the terminal screen
+.SH SYNOPSIS
+\fBclear\fR
+.br
+.SH DESCRIPTION
+\fBclear\fR clears your screen if this is possible. It looks in the
+environment for the terminal type and then in the \fBterminfo\fR database to
+figure out how to clear the screen.
+.SH SEE ALSO
+\fB@TPUT@\fR(1), \fBterminfo\fR(\*n)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_add_wch.3x b/Build/source/libs/ncurses/man/curs_add_wch.3x
new file mode 100644
index 00000000000..fae59ae0b6c
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_add_wch.3x
@@ -0,0 +1,134 @@
+.\"***************************************************************************
+.\" Copyright (c) 2001,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_add_wch.3x,v 1.4 2002/02/16 22:28:43 tom Exp $
+.TH curs_add_wch 3X ""
+.SH NAME
+\fBadd_wch\fP,
+\fBwadd_wch\fP,
+\fBmvadd_wch\fP,
+\fBmvwadd_wch\fP,
+\fBecho_wchar\fP,
+\fBwecho_wchar\fP - add a complex character and rendition to a \fBcurses\fR window, then advance the cursor
+.SH SYNOPSIS
+.PP
+\fB#include <curses.h>\fP
+.sp
+.B "int add_wch( const cchar_t *\fIwch\fB );"
+.br
+.B "int wadd_wch( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );"
+.br
+.B "int mvadd_wch( int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );"
+.br
+.B "int mvwadd_wch( WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );"
+.br
+.B "int echo_wchar( const cchar_t *\fIwch\fB );"
+.br
+.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );"
+.br
+.SH DESCRIPTION
+.PP
+The
+\fBadd_wch\fP,
+\fBwadd_wch\fP,
+\fBmvadd_wch\fP, and
+\fBmvwadd_wch\fP
+functions put the complex character \fIwch\fP into the given
+window at its current position,
+which is then advanced.
+These functions perform
+wrapping and special-character processing as follows:
+.TP 5
+-
+If \fIwch\fP refers to a spacing character,
+then any previous character at that location is removed.
+A new character specified by \fIwch\fP is
+placed at that location with rendition specified by \fIwch\fP.
+The cursor then advances to
+the next spacing character on the screen.
+.TP 5
+-
+If \fIwch\fP refers to a non-spacing character,
+all previous characters at that location are preserved.
+The non-spacing characters of \fIwch\fP
+are added to the spacing complex character,
+and the rendition specified by \fIwch\fP is ignored.
+.TP 5
+-
+If the character part of \fIwch\fP is
+a tab, newline, backspace or other control character,
+the window is updated and the cursor moves as if \fBaddch\fR(3X) were called.
+.PP
+The \fBecho_wchar\fP
+function is functionally equivalent to a call to
+\fBadd_wch\fP
+followed by a call to
+\fBrefresh\fP.
+Similarly, the
+\fBwecho_wchar\fP
+is functionally equivalent to a call to
+\fBwadd_wch\fP
+followed by a call to
+\fBwrefresh\fP.
+The knowledge
+that only a single character is being output is taken into consideration and,
+for non-control characters, a considerable performance gain might be seen
+by using the *\fBecho\fP* functions instead of their equivalents.
+.SH RETURN VALUES
+.PP
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
+.SH NOTES
+.PP
+Note that
+\fBadd_wch\fP,
+\fBmvadd_wch\fP,
+\fBmvwadd_wch\fP, and
+\fBecho_wchar\fP
+may be macros.
+.SH PORTABILITY
+.PP
+All these functions are described in the XSI Curses standard, Issue 4.
+The defaults specified for forms-drawing characters apply in the POSIX locale.
+.PP
+XSI documents constants beginning with \fBWACS_\fP which are used for
+line-drawing.
+Those are not currently implemented in \fBncurses\fP.
+.SH SEE ALSO
+.PP
+\fBcurses\fR(3X),
+\fBcurs_attr_get\fR(3X),
+\fBcurs_clear\fR(3X),
+\fBcurs_outopts\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBputwc\fR(3)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_add_wchstr.3x b/Build/source/libs/ncurses/man/curs_add_wchstr.3x
new file mode 100644
index 00000000000..23181b7fd7f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_add_wchstr.3x
@@ -0,0 +1,97 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_add_wchstr.3x,v 1.3 2004/03/13 19:39:10 tom Exp $
+.TH curs_add_wchstr 3X ""
+.SH NAME
+\fBadd_wchstr\fR,
+\fBadd_wchnstr\fR,
+\fBwadd_wchstr\fR,
+\fBwadd_wchnstr\fR,
+\fBmvadd_wchstr\fR,
+\fBmvadd_wchnstr\fR,
+\fBmvwadd_wchstr\fR,
+\fBmvwadd_wchnstr\fR \- add an array of complex characters (and attributes) to a curses window
+.SH SYNOPSIS
+.B #include <curses.h>
+.PP
+.nf
+\fBint add_wchstr(const cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint add_wchnstr(const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint wadd_wchstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint wadd_wchnstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvadd_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint mvadd_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwadd_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint mvwadd_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+These routines copy the array of complex characters \fIwchstr\fR
+into the window image structure at and after the current cursor position.
+The four routines with \fIn\fR as the last
+argument copy at most \fIn\fR elements, but no more than will fit on the line.
+If \fBn\fR=\fB-1\fR then the whole array is copied,
+to the maximum number of characters that will fit on the line.
+.PP
+The window cursor is \fInot\fR advanced.
+These routines work faster than \fBwaddnstr\fR.
+On the other hand, they do not perform checking
+(such as for the newline, backspace, or carriage return characters),
+they do not advance the current cursor position,
+they do not expand other control characters to ^-escapes,
+and they truncate the string if it crosses the right margin,
+rather then wrapping it around to the new line.
+.PP
+These routines end successfully
+on encountering a null \fIcchar_t\fR, or
+when they have filled the current line.
+If a complex character cannot completely fit at the end of the current line,
+the remaining columns are filled with the background character and rendition.
+.SH NOTES
+All functions except \fBwadd_wchnstr\fR may be macros.
+.SH RETURN VALUES
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
+.SH PORTABILITY
+All these entry points are described in the XSI Curses standard, Issue 4.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_addchstr\fR(3X)
+\fBcurs_addwstr\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_addch.3x b/Build/source/libs/ncurses/man/curs_addch.3x
new file mode 100644
index 00000000000..13053d00537
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_addch.3x
@@ -0,0 +1,173 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_addch.3x,v 1.23 2004/01/31 13:16:21 tom Exp $
+.TH curs_addch 3X ""
+.SH NAME
+\fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR,
+\fBechochar\fR,
+\fBwechochar\fR - add a character (with attributes) to a \fBcurses\fR window, then advance the cursor
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBint addch(const chtype ch);\fR
+.br
+\fBint waddch(WINDOW *win, const chtype ch);\fR
+.br
+\fBint mvaddch(int y, int x, const chtype ch);\fR
+.br
+\fBint mvwaddch(WINDOW *win, int y, int x, const chtype ch);\fR
+.br
+\fBint echochar(const chtype ch);\fR
+.br
+\fBint wechochar(WINDOW *win, const chtype ch);\fR
+.br
+.SH DESCRIPTION
+The \fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR and \fBmvwaddch\fR routines put
+the character \fIch\fR into the given window at its current window position,
+which is then advanced. They are analogous to \fBputchar\fR in \fBstdio\fR(3).
+If the advance is at the right margin, the cursor automatically wraps to the
+beginning of the next line. At the bottom of the current scrolling region, if
+\fBscrollok\fR is enabled, the scrolling region is scrolled up one line.
+.PP
+If \fIch\fR is a tab, newline, or backspace,
+the cursor is moved appropriately within the window.
+Backspace moves the cursor one character left; at the left
+edge of a window it does nothing.
+Newline does a \fBclrtoeol\fR,
+then moves the cursor to the window left margin on the next line,
+scrolling the window if on the last line.
+Tabs are considered to be at every eighth column.
+The tab interval may be altered by setting the \fBTABSIZE\fR variable.
+.PP
+If \fIch\fR is any control character other than tab, newline, or backspace, it
+is drawn in \fB^\fR\fIX\fR notation. Calling \fBwinch\fR after adding a
+control character does not return the character itself, but instead returns
+the ^-representation of the control character.
+.PP
+Video attributes can be combined with a character argument passed to
+\fBaddch\fR or related functions by logical-ORing them into the character.
+(Thus, text, including attributes, can be copied from one place to another
+using \fBinch\fR and \fBaddch\fR.) See the \fBcurs_attr\fR(3X) page for
+values of predefined video attribute constants that can be usefully OR'ed
+into characters.
+.PP
+The \fBechochar\fR and \fBwechochar\fR routines are equivalent to a call to
+\fBaddch\fR followed by a call to \fBrefresh\fR, or a call to \fBwaddch\fR
+followed by a call to \fBwrefresh\fR. The knowledge that only a single
+character is being output is used and, for non-control characters, a
+considerable performance gain may be seen by using these routines instead of
+their equivalents.
+.SS Line Graphics
+The following variables may be used to add line drawing characters to the
+screen with routines of the \fBaddch\fR family. The default character listed
+below is used if the \fBacsc\fR capability doesn't define a terminal-specific
+replacement for it (but see the EXTENSIONS section below). The names are
+taken from VT100 nomenclature.
+.PP
+.TS
+l l l
+_ _ _
+l l l.
+\fIName\fR \fIDefault\fR \fIDescription\fR
+ACS_BLOCK # solid square block
+ACS_BOARD # board of squares
+ACS_BTEE + bottom tee
+ACS_BULLET o bullet
+ACS_CKBOARD : checker board (stipple)
+ACS_DARROW v arrow pointing down
+ACS_DEGREE ' degree symbol
+ACS_DIAMOND + diamond
+ACS_GEQUAL > greater-than-or-equal-to
+ACS_HLINE - horizontal line
+ACS_LANTERN # lantern symbol
+ACS_LARROW < arrow pointing left
+ACS_LEQUAL < less-than-or-equal-to
+ACS_LLCORNER + lower left-hand corner
+ACS_LRCORNER + lower right-hand corner
+ACS_LTEE + left tee
+ACS_NEQUAL ! not-equal
+ACS_PI * greek pi
+ACS_PLMINUS # plus/minus
+ACS_PLUS + plus
+ACS_RARROW > arrow pointing right
+ACS_RTEE + right tee
+ACS_S1 - scan line 1
+ACS_S3 - scan line 3
+ACS_S7 - scan line 7
+ACS_S9 \&_ scan line 9
+ACS_STERLING f pound-sterling symbol
+ACS_TTEE + top tee
+ACS_UARROW ^ arrow pointing up
+ACS_ULCORNER + upper left-hand corner
+ACS_URCORNER + upper right-hand corner
+ACS_VLINE | vertical line
+.TE
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
+(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
+successful completion, unless otherwise noted in the preceding routine
+descriptions.
+.SH NOTES
+Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
+\fBechochar\fR may be macros.
+.SH PORTABILITY
+All these functions are described in the XSI Curses standard, Issue 4.
+The defaults specified for forms-drawing characters apply in the POSIX locale.
+.LP
+Some ACS symbols
+(ACS_S3,
+ACS_S7,
+ACS_LEQUAL,
+ACS_GEQUAL,
+ACS_PI,
+ACS_NEQUAL,
+ACS_STERLING)
+were not documented in
+any publicly released System V. However, many publicly available terminfos
+include \fBacsc\fR strings in which their key characters (pryz{|}) are
+embedded, and a second-hand list of their character descriptions has come
+to light. The ACS-prefixed names for them were invented for \fBncurses\fR(3X).
+.LP
+The \fBTABSIZE\fR variable is implemented in some versions of curses,
+but is not part of X/Open curses.
+.LP
+If \fIch\fR is a carriage return,
+the cursor is moved to the beginning of the current row of the window.
+This is true of other implementations, but is not documented.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_attr\fR(3X), \fBcurs_clear\fR(3X),
+\fBcurs_inch\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X),
+\fBputc\fR(3S).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_addchstr.3x b/Build/source/libs/ncurses/man/curs_addchstr.3x
new file mode 100644
index 00000000000..9de749fc8f9
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_addchstr.3x
@@ -0,0 +1,82 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_addchstr.3x,v 1.8 2003/12/27 18:51:24 tom Exp $
+.TH curs_addchstr 3X ""
+.SH NAME
+\fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR,
+\fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR,
+\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBint addchstr(const chtype *chstr);\fR
+.br
+\fBint addchnstr(const chtype *chstr, int n);\fR
+.br
+\fBint waddchstr(WINDOW *win, const chtype *chstr);\fR
+.br
+\fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR
+.br
+\fBint mvaddchstr(int y, int x, const chtype *chstr);\fR
+.br
+\fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR
+.br
+\fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR
+.br
+\fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR
+.SH DESCRIPTION
+These routines copy \fIchstr\fR into the window image structure at and after
+the current cursor position. The four routines with \fIn\fR as the last
+argument copy at most \fIn\fR elements, but no more than will fit on the line.
+If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of
+characters that will fit on the line.
+.PP
+The window cursor is \fInot\fR advanced, and these routines work faster than
+\fBwaddnstr\fR. On the other hand, they don't perform any kind of checking
+(such as for the newline, backspace, or carriage return characters), they don't
+advance the current cursor position, they don't expand other control characters
+to ^-escapes, and they truncate the string if it crosses the right margin,
+rather then wrapping it around to the new line.
+.SH RETURN VALUES
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
+(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
+successful completion, unless otherwise noted in the preceding routine
+descriptions.
+.SH NOTES
+Note that all routines except \fBwaddchnstr\fR may be macros.
+.SH PORTABILITY
+All these entry points are described in the XSI Curses standard, Issue 4.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_addstr.3x b/Build/source/libs/ncurses/man/curs_addstr.3x
new file mode 100644
index 00000000000..0ffacc6fa9b
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_addstr.3x
@@ -0,0 +1,87 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_addstr.3x,v 1.11 2003/12/27 18:51:15 tom Exp $
+.TH curs_addstr 3X ""
+.SH NAME
+\fBaddstr\fR,
+\fBaddnstr\fR,
+\fBwaddstr\fR,
+\fBwaddnstr\fR,
+\fBmvaddstr\fR,
+\fBmvaddnstr\fR,
+\fBmvwaddstr\fR,
+\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+.PP
+\fBint addstr(const char *\fR\fIstr\fR\fB);\fR
+.br
+\fBint addnstr(const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint waddstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB);\fR
+.br
+\fBint waddnstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvaddstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR
+.br
+\fBint mvaddnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwaddstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR
+.br
+\fBint mvwaddnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr, int \fR\fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+These routines write the characters of the (null-terminated) character string
+\fIstr\fR on the given window.
+It is similar to calling \fBwaddch\fR once for each character in the string.
+The four routines with \fIn\fR as the last argument
+write at most \fIn\fR characters.
+If \fIn\fR is -1, then the entire string will be added,
+up to the maximum number of characters that will fit on the line,
+or until a terminating null is reached.
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
+(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
+successful completion.
+.SH NOTES
+Note that all of these routines except \fBwaddstr\fR and \fBwaddnstr\fR may be
+macros.
+.SH PORTABILITY
+All these entry points are described in the XSI Curses standard, Issue 4. The
+XSI errors EILSEQ and EOVERFLOW, associated with extended-level conformance,
+are not yet detected.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_addch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_addwstr.3x b/Build/source/libs/ncurses/man/curs_addwstr.3x
new file mode 100644
index 00000000000..e1dedaf1584
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_addwstr.3x
@@ -0,0 +1,92 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_addwstr.3x,v 1.4 2004/09/11 20:57:04 tom Exp $
+.TH curs_addwstr 3X ""
+.SH NAME
+\fBaddwstr\fR,
+\fBaddnwstr\fR,
+\fBwaddwstr\fR,
+\fBwaddnwstr\fR,
+\fBmvaddwstr\fR,
+\fBmvaddnwstr\fR,
+\fBmvwaddwstr\fR,
+\fBmvwaddnwstr\fR \- add a string of wide characters to a \fBcurses\fR window and advance cursor
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+.PP
+\fBint addwstr(const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint addnwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint waddwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint waddnwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvaddwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint mvaddnwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwaddwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint mvwaddnwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+These routines write the characters of the
+(null-terminated) \fBwchar_t\fR character string
+\fIwstr\fR on the given window.
+It is similar to constructing a \fBcchar_t\fR for each wchar_t in the string,
+then calling \fBwadd_wch\fR for the resulting \fBcchar_t\fR.
+.PP
+The \fImv\fR routines perform cursor movement once, before writing any
+characters.
+Thereafter, the cursor is advanced as a side-effect of writing to the window.
+.PP
+The four routines with \fIn\fR as the last argument
+write at most \fIn\fR \fBwchar_t\fR characters.
+If \fIn\fR is -1, then the entire string will be added,
+up to the maximum number of characters that will fit on the line,
+or until a terminating null is reached.
+.SH RETURN VALUES
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
+.SH NOTES
+Note that all of these routines except \fBwaddnwstr\fR may be macros.
+.SH PORTABILITY
+All these entry points are described in the XSI Curses standard, Issue 4.
+.SH SEE ALSO
+.PP
+Functions:
+\fBcurses\fR(3X),
+\fBcurs_add_wch\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_attr.3x b/Build/source/libs/ncurses/man/curs_attr.3x
new file mode 100644
index 00000000000..bcbf61c498a
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_attr.3x
@@ -0,0 +1,232 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_attr.3x,v 1.27 2003/12/27 18:50:51 tom Exp $
+.TH curs_attr 3X ""
+.SH NAME
+\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
+\fBattrset\fR, \fBwattrset\fR, \fBcolor_set\fR, \fBwcolor_set\fR,
+\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, \fBwstandout\fR,
+\fBattr_get\fR, \fBwattr_get\fR,
+\fBattr_off\fR, \fBwattr_off\fR,
+\fBattr_on\fR, \fBwattr_on\fR,
+\fBattr_set\fR, \fBwattr_set\fR,
+\fBchgat\fR, \fBwchgat\fR,
+\fBmvchgat\fR, \fBmvwchgat\fR,
+\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+\fBint attroff(int attrs);\fR
+.br
+\fBint wattroff(WINDOW *win, int attrs);\fR
+.br
+\fBint attron(int attrs);\fR
+.br
+\fBint wattron(WINDOW *win, int attrs);\fR
+.br
+\fBint attrset(int attrs);\fR
+.br
+\fBint wattrset(WINDOW *win, int attrs);\fR
+.br
+\fBint color_set(short color_pair_number, void* opts);\fR
+.br
+\fBint wcolor_set(WINDOW *win, short color_pair_number,\fR
+ \fBvoid* opts);\fR
+.br
+\fBint standend(void);\fR
+.br
+\fBint wstandend(WINDOW *win);\fR
+.br
+\fBint standout(void);\fR
+.br
+\fBint wstandout(WINDOW *win);\fR
+.br
+\fBint attr_get(attr_t *attrs, short *pair, void *opts);\fR
+.br
+\fBint wattr_get(WINDOW *win, attr_t *attrs, short *pair,\fR
+ \fBvoid *opts);\fR
+.br
+\fBint attr_off(attr_t attrs, void *opts);\fR
+.br
+\fBint wattr_off(WINDOW *win, attr_t attrs, void *opts);\fR
+.br
+\fBint attr_on(attr_t attrs, void *opts);\fR
+.br
+\fBint wattr_on(WINDOW *win, attr_t attrs, void *opts);\fR
+.br
+\fBint attr_set(attr_t attrs, short pair, void *opts);\fR
+.br
+\fBint wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);\fR
+.br
+\fBint chgat(int n, attr_t attr, short color,\fR
+ \fBconst void *opts)\fR
+.br
+\fBint wchgat(WINDOW *win, int n, attr_t attr,\fR
+ \fBshort color, const void *opts)\fR
+.br
+\fBint mvchgat(int y, int x, int n, attr_t attr,\fR
+ \fBshort color, const void *opts)\fR
+.br
+\fBint mvwchgat(WINDOW *win, int y, int x, int n,\fR
+ \fBattr_t attr, short color, const void *opts)\fR
+.br
+.SH DESCRIPTION
+These routines manipulate the current attributes of the named window. The
+current attributes of a window apply to all characters that are written into
+the window with \fBwaddch\fR, \fBwaddstr\fR and \fBwprintw\fR. Attributes are
+a property of the character, and move with the character through any scrolling
+and insert/delete line/character operations. To the extent possible, they are
+displayed as appropriate modifications to the graphic rendition of characters
+put on the screen.
+.PP
+The routine \fBattrset\fR sets the current attributes of the given window to
+\fIattrs\fR. The routine \fBattroff\fR turns off the named attributes without
+turning any other attributes on or off. The routine \fBattron\fR turns on the
+named attributes without affecting any others. The routine \fBstandout\fR is
+the same as \fBattron(A_STANDOUT)\fR. The routine \fBstandend\fR is the same
+as \fBattrset(A_NORMAL)\fR or \fBattrset(0)\fR, that is, it turns off all
+attributes.
+.PP
+The \fBattrset\fR and related routines do not affect the attributes used
+when erasing portions of the window.
+See \fBcurs_bkgd\fR(3X) for functions which modify the attributes used for
+erasing and clearing.
+.PP
+The routine \fBcolor_set\fR sets the current color of the given window to the
+foreground/background combination described by the color_pair_number. The
+parameter opts is reserved for future use, applications must supply a null
+pointer.
+.PP
+The routine \fBwattr_get\fR returns the current attribute and color pair for
+the given window; \fBattr_get\fR returns the current attribute and color pair
+for \fBstdscr\fR.
+The remaining \fBattr_\fR* functions operate exactly like the corresponding
+\fBattr\fR* functions, except that they take arguments of type \fBattr_t\fR
+rather than \fBint\fR.
+.PP
+The routine \fBchgat\fR changes the attributes of a given number of characters
+starting at the current cursor location of \fBstdscr\fR. It does not update
+the cursor and does not perform wrapping. A character count of -1 or greater
+than the remaining window width means to change attributes all the way to the
+end of the current line. The \fBwchgat\fR function generalizes this to any
+window; the \fBmvwchgat\fR function does a cursor move before acting. In these
+functions, the color argument is a color-pair index (as in the first argument
+of \fIinit_pair\fR, see \fBcurs_color\fR(3X)). The \fBopts\fR argument is not
+presently used, but is reserved for the future (leave it \fBNULL\fR).
+Note that changing the attributes does not imply
+that a subsequent \fBrefresh\fR will update the screen to match,
+since the character values are not modified.
+Use \fBtouchwin\fR to force the screen to match the updated attributes.
+.SS Attributes
+The following video attributes, defined in \fB<curses.h>\fR, can be passed to
+the routines \fBattron\fR, \fBattroff\fR, and \fBattrset\fR, or OR'ed with the
+characters passed to \fBaddch\fR.
+.PP
+.TS
+center ;
+l l .
+\fBA_NORMAL\fR Normal display (no highlight)
+\fBA_STANDOUT\fR Best highlighting mode of the terminal.
+\fBA_UNDERLINE\fR Underlining
+\fBA_REVERSE\fR Reverse video
+\fBA_BLINK\fR Blinking
+\fBA_DIM\fR Half bright
+\fBA_BOLD\fR Extra bright or bold
+\fBA_PROTECT\fR Protected mode
+\fBA_INVIS\fR Invisible or blank mode
+\fBA_ALTCHARSET\fR Alternate character set
+\fBA_CHARTEXT\fR Bit-mask to extract a character
+\fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR Color-pair number \fIn\fR
+.TE
+.PP
+The following macro is the reverse of \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR:
+.PP
+.br
+\fBPAIR_NUMBER(\fR\fIattrs\fR) Returns the pair number associated
+ with the \fBCOLOR_PAIR(\fR\fIn\fR\fB)\fR attribute.
+.br
+.PP
+The return values of many of these routines are not meaningful (they are
+implemented as macro-expanded assignments and simply return their argument).
+The SVr4 manual page claims (falsely) that these routines always return \fB1\fR.
+.SH NOTES
+Note that \fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
+\fBattrset\fR, \fBwattrset\fR, \fBstandend\fR and \fBstandout\fR may be macros.
+.SH PORTABILITY
+All these functions are supported in the XSI Curses standard, Issue 4. The
+standard defined the dedicated type for highlights, \fBattr_t\fR, which is not
+defined in SVr4 curses. The functions taking \fBattr_t\fR arguments are
+not supported under SVr4.
+.PP
+The XSI Curses standard states that whether the traditional functions
+\fBattron\fR/\fBattroff\fR/\fBattrset\fR can manipulate attributes other than
+\fBA_BLINK\fR, \fBA_BOLD\fR, \fBA_DIM\fR, \fBA_REVERSE\fR, \fBA_STANDOUT\fR, or
+\fBA_UNDERLINE\fR is "unspecified". Under this implementation as well as
+SVr4 curses, these functions correctly manipulate all other highlights
+(specifically, \fBA_ALTCHARSET\fR, \fBA_PROTECT\fR, and \fBA_INVIS\fR).
+.PP
+XSI Curses added the new entry points, \fBattr_get\fR, \fBattr_on\fR,
+\fBattr_off\fR, \fBattr_set\fR, \fBwattr_on\fR, \fBwattr_off\fR,
+\fBwattr_get\fR, \fBwattr_set\fR. These are intended to work with
+a new series of highlight macros prefixed with \fBWA_\fR.
+.PP
+.TS
+center ;
+l l .
+\fBWA_NORMAL\fR Normal display (no highlight)
+\fBWA_STANDOUT\fR Best highlighting mode of the terminal.
+\fBWA_UNDERLINE\fR Underlining
+\fBWA_REVERSE\fR Reverse video
+\fBWA_BLINK\fR Blinking
+\fBWA_DIM\fR Half bright
+\fBWA_BOLD\fR Extra bright or bold
+\fBWA_ALTCHARSET\fR Alternate character set
+.TE
+.PP
+The XSI curses standard specifies that each pair of corresponding \fBA_\fR
+and \fBWA_\fR-using functions operates on the same current-highlight
+information.
+.PP
+The XSI standard extended conformance level adds new highlights
+\fBA_HORIZONTAL\fR, \fBA_LEFT\fR, \fBA_LOW\fR, \fBA_RIGHT\fR, \fBA_TOP\fR,
+\fBA_VERTICAL\fR (and corresponding \fBWA_\fR macros for each) which this
+curses does not yet support.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_addch\fR(3X),
+\fBcurs_addstr\fR(3X),
+\fBcurs_bkgd\fR(3X),
+\fBcurs_printw\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_beep.3x b/Build/source/libs/ncurses/man/curs_beep.3x
new file mode 100644
index 00000000000..579931ccc47
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_beep.3x
@@ -0,0 +1,63 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_beep.3x,v 1.9 2003/12/27 18:44:30 tom Exp $
+.TH curs_beep 3X ""
+.SH NAME
+\fBbeep\fR, \fBflash\fR - \fBcurses\fR bell and screen flash routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBint beep(void);\fR
+.br
+\fBint flash(void);\fR
+.br
+.SH DESCRIPTION
+The \fBbeep\fR and \fBflash\fR routines are used to alert the terminal user.
+The routine \fBbeep\fR sounds an audible alarm on the terminal, if possible;
+otherwise it flashes the screen (visible bell). The routine \fBflash\fR
+flashes the screen, and if that is not possible, sounds the alert. If neither
+alert is possible, nothing happens. Nearly all terminals have an audible alert
+(bell or beep), but only some can flash the screen.
+.SH RETURN VALUE
+These routines return \fBOK\fR if they succeed in beeping or flashing,
+\fBERR\fR otherwise.
+.SH EXTENSIONS
+SVr4's beep and flash routines always returned \fBOK\fR, so it was not
+possible to tell when the beep or flash failed.
+.SH PORTABILITY
+These functions are defined in the XSI Curses standard, Issue 4. Like SVr4, it
+specifies that they always return \fBOK\fR.
+.SH SEE ALSO
+\fBcurses\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_bkgd.3x b/Build/source/libs/ncurses/man/curs_bkgd.3x
new file mode 100644
index 00000000000..b2d768a441d
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_bkgd.3x
@@ -0,0 +1,98 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_bkgd.3x,v 1.19 2003/12/27 18:50:40 tom Exp $
+.TH curs_bkgd 3X ""
+.SH NAME
+\fBbkgdset\fR, \fBwbkgdset\fR,
+\fBbkgd\fR, \fBwbkgd\fR,
+\fBgetbkgd\fR - \fBcurses\fR window background manipulation routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBvoid bkgdset(chtype ch);\fR
+.br
+\fBvoid wbkgdset(WINDOW *win, chtype ch);\fR
+.br
+\fBint bkgd(chtype ch);\fR
+.br
+\fBint wbkgd(WINDOW *win, chtype ch);\fR
+.br
+\fBchtype getbkgd(WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+The \fBbkgdset\fR and \fBwbkgdset\fR routines manipulate the
+background of the named window.
+The window background is a \fBchtype\fR consisting of
+any combination of attributes (i.e., rendition) and a character.
+The attribute part of the background is combined (OR'ed) with all non-blank
+characters that are written into the window with \fBwaddch\fR. Both
+the character and attribute parts of the background are combined with
+the blank characters. The background becomes a property of the
+character and moves with the character through any scrolling and
+insert/delete line/character operations.
+.PP
+To the extent possible on a particular terminal,
+the attribute part of the background is displayed
+as the graphic rendition of the character put on the screen.
+.PP
+The \fBbkgd\fR and \fBwbkgd\fR functions
+set the background property of the current or specified window
+and then apply this setting to every character position in that window:
+.PP
+.RS
+The rendition of every character on the screen is changed to
+the new background rendition.
+.PP
+Wherever the former background character
+appears, it is changed to the new background character.
+.RE
+.PP
+The \fBgetbkgd\fR function returns the given window's current background
+character/attribute pair.
+.SH RETURN VALUE
+The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR.
+The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set",
+but this appears to be an error.
+.SH NOTES
+Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure.
+but gives no failure conditions.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_addch\fR(3X),
+\fBcurs_attr\fR(3X),
+\fBcurs_outopts\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_bkgrnd.3x b/Build/source/libs/ncurses/man/curs_bkgrnd.3x
new file mode 100644
index 00000000000..fd42338a2bb
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_bkgrnd.3x
@@ -0,0 +1,106 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_bkgrnd.3x,v 1.2 2004/03/13 19:39:10 tom Exp $
+.TH curs_bkgrnd 3X ""
+.SH NAME
+\fBbkgrnd\fR,
+\fBwbkgrnd\fR,
+\fBbkgrndset\fR,
+\fBwbkgrndset\fR,
+\fBgetbkgrnd\fR,
+\fBwgetbkgrnd\fR \- \fBcurses\fR window complex background manipulation routines
+.SH SYNOPSIS
+.PP
+.B #include <curses.h>
+
+\fBint bkgrnd(\fR\fB const cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint wbkgrnd(\fR\fB WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBvoid bkgrndset(const cchar_t *\fR\fIwch\fR \fB);\fR
+.br
+\fBvoid wbkgrndset(WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint getbkgrnd(cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint wgetbkgrnd(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+.SH DESCRIPTION
+The \fBbkgrndset\fR and \fBwbkgrndset\fR routines manipulate the
+background of the named window.
+The window background is a \fBcchar_t\fR consisting of
+any combination of attributes (i.e., rendition) and a complex character.
+The attribute part of the background is combined (OR'ed) with all non-blank
+characters that are written into the window with \fBwaddch\fR. Both
+the character and attribute parts of the background are combined with
+the blank characters.
+The background becomes a property of the
+character and moves with the character through any scrolling and
+insert/delete line/character operations.
+
+To the extent possible on a
+particular terminal, the attribute part of the background is displayed
+as the graphic rendition of the character put on the screen.
+
+The \fBbkgrnd\fR and \fBwbkgrnd\fR functions
+set the background property of the current or specified window
+and then apply this setting to every character position in that window:
+
+.RS
+The rendition of every character on the screen is changed to
+the new background rendition.
+
+Wherever the former background character
+appears, it is changed to the new background character.
+.RE
+
+The \fBgetbkgrnd\fR function returns the given window's current background
+character/attribute pair via the \fBwch\fR pointer.
+
+.SH NOTES
+Note that
+\fBbkgrnd\fR,
+\fBbkgrndset\fR, and
+\fBgetbkgrnd\fR
+may be macros.
+.SH RETURN VALUES
+The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value.
+.PP
+Upon successful completion, the other functions return \fBOK\fR.
+Otherwise, they return \fBERR\fR.
+A null window pointer is treated as an error.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_bkgd\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_border.3x b/Build/source/libs/ncurses/man/curs_border.3x
new file mode 100644
index 00000000000..c087fad73bc
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_border.3x
@@ -0,0 +1,138 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_border.3x,v 1.15 2002/02/16 22:21:47 tom Exp $
+.TH curs_border 3X ""
+.SH NAME
+\fBborder\fR, \fBwborder\fR, \fBbox\fR,
+\fBhline\fR, \fBwhline\fR,
+\fBvline\fR, \fBwvline\fR,
+\fBmvhline\fR, \fBmvwhline\fR,
+\fBmvvline\fR, \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+\fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR
+ \fBchtype tl, chtype tr, chtype bl, chtype br);\fR
+.br
+\fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR
+ \fBchtype ts, chtype bs, chtype tl, chtype tr,\fR
+ \fBchtype bl, chtype br);\fR
+.br
+\fBint box(WINDOW *win, chtype verch, chtype horch);\fR
+.br
+\fBint hline(chtype ch, int n);\fR
+.br
+\fBint whline(WINDOW *win, chtype ch, int n);\fR
+.br
+\fBint vline(chtype ch, int n);\fR
+.br
+\fBint wvline(WINDOW *win, chtype ch, int n);\fR
+.br
+\fBmvhline(int y, int x, chtype ch, int n);\fR
+.br
+\fBmvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
+.br
+\fBint mvvline(int y, int x, chtype ch, int n);\fR
+.br
+\fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
+.br
+.SH DESCRIPTION
+The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines
+draw a box around the edges of a window.
+Other than the window, each argument is a character with attributes:
+.RS
+\fIls\fR - left side,
+.br
+\fIrs\fR - right side,
+.br
+\fIts\fR - top side,
+.br
+\fIbs\fR - bottom side,
+.br
+\fItl\fR - top left-hand corner,
+.br
+\fItr\fR - top right-hand corner,
+.br
+\fIbl\fR - bottom left-hand corner, and
+.br
+\fIbr\fR - bottom right-hand corner.
+.RE
+If any of these arguments is zero, then the corresponding
+default values (defined in \fBcurses.h\fR) are used instead:
+.RS
+\fBACS_VLINE\fR,
+.br
+\fBACS_VLINE\fR,
+.br
+\fBACS_HLINE\fR,
+.br
+\fBACS_HLINE\fR,
+.br
+\fBACS_ULCORNER\fR,
+.br
+\fBACS_URCORNER\fR,
+.br
+\fBACS_LLCORNER\fR,
+.br
+\fBACS_LRCORNER\fR.
+.RE
+
+\fBbox(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIhorch\fR\fB)\fR is a shorthand
+for the following call: \fBwborder(\fR\fIwin\fR\fB,\fR \fIverch\fR\fB,\fR
+\fIverch\fR\fB,\fR \fIhorch\fR\fB,\fR \fIhorch\fR\fB, 0, 0, 0, 0)\fR.
+
+The \fBhline\fR and \fBwhline\fR functions draw a horizontal (left to right)
+line using \fIch\fR starting at the current cursor position in the window. The
+current cursor position is not changed. The line is at most \fIn\fR characters
+long, or as many as fit into the window.
+
+The \fBvline\fR and \fBwvline\fR functions draw a vertical (top to bottom) line
+using \fIch\fR starting at the current cursor position in the window. The
+current cursor position is not changed. The line is at most \fIn\fR characters
+long, or as many as fit into the window.
+.SH RETURN VALUE
+All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
+non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
+.SH NOTES
+The borders generated by these functions are \fIinside\fR borders (this
+is also true of SVr4 curses, though the fact is not documented).
+
+Note that \fBborder\fR and \fBbox\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+The standard specifies that they return \fBERR\fR on failure,
+but specifies no error conditions.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_outopts\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_border_set.3x b/Build/source/libs/ncurses/man/curs_border_set.3x
new file mode 100644
index 00000000000..907a9ce840d
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_border_set.3x
@@ -0,0 +1,201 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_border_set.3x,v 1.4 2004/03/13 19:39:10 tom Exp $
+.TH curs_border_set 3X ""
+.SH NAME
+\fBborder_set\fR,
+\fBwborder_set\fR,
+\fBbox_set\fR,
+\fBhline_set\fR,
+\fBwhline_set\fR,
+\fBmvhline_set\fR,
+\fBmvwhline_set\fR,
+\fBvline_set\fR,
+\fBwvline_set\fR,
+\fBmvvline_set\fR,
+\fBmvwvline_set\fR \- create \fBcurses\fR borders or lines using complex characters and renditions
+.SH SYNOPSIS
+.PP
+\fB#include <curses.h>\fR
+.sp
+\fBint border_set(\fR
+ \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
+ \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
+ \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
+ \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR
+\fB);\fR
+.br
+\fBint wborder_set(\fR
+ \fBWINDOW *win\fR,
+ \fBconst cchar_t *\fR\fIls\fR, \fBconst cchar_t *\fR\fIrs\fR,
+ \fBconst cchar_t *\fR\fIts\fR, \fBconst cchar_t *\fR\fIbs\fR,
+ \fBconst cchar_t *\fR\fItl\fR, \fBconst cchar_t *\fR\fItr\fR,
+ \fBconst cchar_t *\fR\fIbl\fR, \fBconst cchar_t *\fR\fIbr\fR\fB);\fR
+.br
+\fBint box_set(\fR
+ \fBWINDOW *win\fR,
+ \fBconst cchar_t *\fR\fIverch\fR,
+ \fBconst cchar_t *\fR\fIhorch\fR\fB);\fR
+.br
+\fBint hline_set(\fR
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint whline_set(\fR
+ \fBWINDOW *\fR\fIwin\fR,
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint mvhline_set(\fR
+ \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwhline_set(\fR
+ \fBWINDOW *\fR\fIwin\fR,
+ \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint vline_set(\fR
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint wvline_set(\fR
+ \fBWINDOW *\fR\fIwin\fR,
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint mvvline_set(\fR
+ \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwvline_set(\fR
+ \fBWINDOW *\fR\fIwin\fR,
+ \fBint \fR\fIy\fR, \fBint \fR\fIx\fR,
+ \fBconst cchar_t *\fR\fIwch\fR, \fBint \fR\fIn\fR\fB);\fR
+.br
+.SH DESCRIPTION
+.PP
+The
+\fBborder_set\fR
+and
+\fBwborder_set\fR
+functions draw a border around the edges of the current or specified window.
+These functions do not change the cursor position, and do not wrap.
+.PP
+Other than the window, each argument is a complex character with attributes:
+.RS
+\fIls\fR - left side,
+.br
+\fIrs\fR - right side,
+.br
+\fIts\fR - top side,
+.br
+\fIbs\fR - bottom side,
+.br
+\fItl\fR - top left-hand corner,
+.br
+\fItr\fR - top right-hand corner,
+.br
+\fIbl\fR - bottom left-hand corner, and
+.br
+\fIbr\fR - bottom right-hand corner.
+.RE
+.PP
+If any of these arguments is zero, then the corresponding
+default values (defined in \fBcurses.h\fR) are used instead:
+.RS
+\fBWACS_VLINE\fR,
+.br
+\fBWACS_VLINE\fR,
+.br
+\fBWACS_HLINE\fR,
+.br
+\fBWACS_HLINE\fR,
+.br
+\fBWACS_ULCORNER\fR,
+.br
+\fBWACS_URCORNER\fR,
+.br
+\fBWACS_LLCORNER\fR, and
+.br
+\fBWACS_LRCORNER\fR.
+.RE
+.PP
+\fBbox_set(\fR\fIwin\fR, \fIverch\fR\fB, \fR\fIhorch\fR\fB);\fR
+is a shorthand for the following call:
+.PP
+\fBwborder_set(\fR\fIwin\fR\fB, \fR\fIverch\fR\fB, \fR\fIverch\fR\fB,\fR
+ \fIhorch\fR\fB, \fR\fIhorch\fR\fB, NULL, NULL, NULL, NULL);\fR
+.PP
+The
+\fB*line_set\fR
+functions use
+\fIwch\fR
+to draw a line starting at the current cursor position in the window.
+The line is at most \fIn\fR characters long or as many as fit into the window.
+The current cursor position is not changed.
+.PP
+The
+\fBhline_set\fR,
+\fBmvhline_set\fR,
+\fBmvwhline_set\fR, and
+\fBwhline_set\fR
+functions draw a line proceeding toward the last column of the same line.
+.PP
+The
+\fBvline_set\fR,
+\fBmvvline_set\fR,
+\fBmvwvline_set\fR, and
+\fBwvline_set\fR
+functions draw a line proceeding toward the last line of the window.
+.br
+.SH NOTES
+.PP
+Note that
+\fBborder_set\fR,
+\fBhline_set\fR,
+\fBmvhline_set\fR,
+\fBmvvline_set\fR,
+\fBmvwhline_set\fR,
+\fBmvwvline_set\fR, and
+\fBvline_set\fR
+may be macros.
+.br
+.SH RETURN VALUES
+.PP
+Upon successful completion, these functions return
+\fBOK\fR.
+Otherwise, they return
+\fBERR\fR.
+.SH SEE ALSO
+\fBncurses\fR(3X),
+\fBcurs_border\fR(3X),
+\fBcurs_outopts\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_clear.3x b/Build/source/libs/ncurses/man/curs_clear.3x
new file mode 100644
index 00000000000..d08e852a27b
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_clear.3x
@@ -0,0 +1,94 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_clear.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
+.TH curs_clear 3X ""
+.SH NAME
+\fBerase\fR, \fBwerase\fR, \fBclear\fR,
+\fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR,
+\fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
+.SH SYNOPSIS
+\fB# include <curses.h>\fR
+
+\fBint erase(void);\fR
+.br
+\fBint werase(WINDOW *win);\fR
+.br
+\fBint clear(void);\fR
+.br
+\fBint wclear(WINDOW *win);\fR
+.br
+\fBint clrtobot(void);\fR
+.br
+\fBint wclrtobot(WINDOW *win);\fR
+.br
+\fBint clrtoeol(void);\fR
+.br
+\fBint wclrtoeol(WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+The \fBerase\fR and \fBwerase\fR routines copy blanks to every
+position in the window, clearing the screen.
+
+The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
+\fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
+cleared completely on the next call to \fBwrefresh\fR for that window
+and repainted from scratch.
+
+The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
+end of screen. That is, they erase all lines below the cursor in the window.
+Also, the current line to the right of the cursor, inclusive, is erased.
+
+The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
+to the right of the cursor, inclusive, to the end of the current line.
+
+Blanks created by erasure have the current background rendition (as set
+by \fBwbkgdset\fR) merged into them.
+.SH RETURN VALUE
+All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
+non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
+.SH NOTES
+Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
+\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4. The
+standard specifies that they return \fBERR\fR on failure, but specifies no
+error conditions.
+
+Some historic curses implementations had, as an undocumented feature, the
+ability to do the equivalent of \fBclearok(..., 1)\fR by saying
+\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
+ncurses.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_color.3x b/Build/source/libs/ncurses/man/curs_color.3x
new file mode 100644
index 00000000000..18926d92e6c
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_color.3x
@@ -0,0 +1,216 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_color.3x,v 1.19 2002/02/16 22:38:32 tom Exp $
+.TH curs_color 3X ""
+.SH NAME
+\fBstart_color\fR,
+\fBinit_pair\fR,
+\fBinit_color\fR,
+\fBhas_colors\fR,
+\fBcan_change_color\fR,
+\fBcolor_content\fR,
+\fBpair_content\fR,
+\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines
+.SH SYNOPSIS
+\fB# include <curses.h>\fR
+.br
+\fBint start_color(void);\fR
+.br
+\fBint init_pair(short pair, short f, short b);\fR
+.br
+\fBint init_color(short color, short r, short g, short b);\fR
+.br
+\fBbool has_colors(void);\fR
+.br
+\fBbool can_change_color(void);\fR
+.br
+\fBint color_content(short color, short *r, short *g, short *b);\fR
+.br
+\fBint pair_content(short pair, short *f, short *b);\fR
+.br
+.SH DESCRIPTION
+.SS Overview
+\fBcurses\fR support color attributes on terminals with that capability. To
+use these routines \fBstart_color\fR must be called, usually right after
+\fBinitscr\fR. Colors are always used in pairs (referred to as color-pairs).
+A color-pair consists of a foreground color (for characters) and a background
+color (for the blank field on which the characters are displayed). A
+programmer initializes a color-pair with the routine \fBinit_pair\fR. After it
+has been initialized, \fBCOLOR_PAIR\fR(\fIn\fR), a macro defined in
+\fB<curses.h>\fR, can be used as a new video attribute.
+
+If a terminal is capable of redefining colors, the programmer can use the
+routine \fBinit_color\fR to change the definition of a color. The routines
+\fBhas_colors\fR and \fBcan_change_color\fR return \fBTRUE\fR or \fBFALSE\fR,
+depending on whether the terminal has color capabilities and whether the
+programmer can change the colors. The routine \fBcolor_content\fR allows a
+programmer to extract the amounts of red, green, and blue components in an
+initialized color. The routine \fBpair_content\fR allows a programmer to find
+out how a given color-pair is currently defined.
+.SS Routine Descriptions
+The \fBstart_color\fR routine requires no arguments. It must be
+called if the programmer wants to use colors, and before any other
+color manipulation routine is called. It is good practice to call
+this routine right after \fBinitscr\fR. \fBstart_color\fR initializes
+eight basic colors (black, red, green, yellow, blue, magenta, cyan,
+and white), and two global variables, \fBCOLORS\fR and
+\fBCOLOR_PAIRS\fR (respectively defining the maximum number of colors
+and color-pairs the terminal can support). It also restores the
+colors on the terminal to the values they had when the terminal was
+just turned on.
+
+The \fBinit_pair\fR routine changes the definition of a color-pair. It takes
+three arguments: the number of the color-pair to be changed, the foreground
+color number, and the background color number.
+For portable applications:
+.TP 5
+-
+The value of the first argument
+must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR.
+.TP 5
+-
+The value of the second and
+third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired
+to white on black and cannot be changed).
+.PP
+If the color-pair was previously
+initialized, the screen is refreshed and all occurrences of that color-pair
+are changed to the new definition.
+
+As an extension, ncurses allows you to set color pair 0 via
+the \fBassume_default_colors\fR routine, or to specify the use of
+default colors (color number \fB-1\fR) if you first invoke the
+\fBuse_default_colors\fR routine.
+
+The \fBinit_color\fR routine changes the definition of a color. It takes four
+arguments: the number of the color to be changed followed by three RGB values
+(for the amounts of red, green, and blue components). The value of the first
+argument must be between \fB0\fR and \fBCOLORS\fR. (See the section
+\fBColors\fR for the default color index.) Each of the last three arguments
+must be a value between 0 and 1000. When \fBinit_color\fR is used, all
+occurrences of that color on the screen immediately change to the new
+definition.
+
+The \fBhas_colors\fR routine requires no arguments. It returns \fBTRUE\fR if
+the terminal can manipulate colors; otherwise, it returns \fBFALSE\fR. This
+routine facilitates writing terminal-independent programs. For example, a
+programmer can use it to decide whether to use color or some other video
+attribute.
+
+The \fBcan_change_color\fR routine requires no arguments. It returns
+\fBTRUE\fR if the terminal supports colors and can change their definitions;
+other, it returns \fBFALSE\fR. This routine facilitates writing
+terminal-independent programs.
+
+The \fBcolor_content\fR routine gives programmers a way to find the intensity
+of the red, green, and blue (RGB) components in a color. It requires four
+arguments: the color number, and three addresses of \fBshort\fRs for storing
+the information about the amounts of red, green, and blue components in the
+given color. The value of the first argument must be between 0 and
+\fBCOLORS\fR. The values that are stored at the addresses pointed to by the
+last three arguments are between 0 (no component) and 1000 (maximum amount of
+component).
+
+The \fBpair_content\fR routine allows programmers to find out what colors a
+given color-pair consists of. It requires three arguments: the color-pair
+number, and two addresses of \fBshort\fRs for storing the foreground and the
+background color numbers. The value of the first argument must be between 1
+and \fBCOLOR_PAIRS-1\fR. The values that are stored at the addresses pointed
+to by the second and third arguments are between 0 and \fBCOLORS\fR.
+.SS Colors
+In \fB<curses.h>\fR the following macros are defined. These are the default
+colors. \fBcurses\fR also assumes that \fBCOLOR_BLACK\fR is the default
+background color for all terminals.
+
+.nf
+ \fBCOLOR_BLACK\fR
+ \fBCOLOR_RED\fR
+ \fBCOLOR_GREEN\fR
+ \fBCOLOR_YELLOW\fR
+ \fBCOLOR_BLUE\fR
+ \fBCOLOR_MAGENTA\fR
+ \fBCOLOR_CYAN\fR
+ \fBCOLOR_WHITE\fR
+.fi
+.SH RETURN VALUE
+The routines \fBcan_change_color()\fR and \fBhas_colors()\fR return \fBTRUE\fR
+or \fBFALSE\fR.
+
+All other routines return the integer \fBERR\fR upon failure and an \fBOK\fR
+(SVr4 specifies only "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+In the \fIncurses\fR implementation, there is a separate color activation flag,
+color palette, color pairs table, and associated COLORS and COLOR_PAIRS counts
+for each screen; the \fBstart_color\fR function only affects the current
+screen. The SVr4/XSI interface is not really designed with this in mind, and
+historical implementations may use a single shared color palette.
+
+Note that setting an implicit background color via a color pair affects only
+character cells that a character write operation explicitly touches. To change
+the background color used when parts of a window are blanked by erasing or
+scrolling operations, see \fBcurs_bkgd\fR(3X).
+
+Several caveats apply on 386 and 486 machines with VGA-compatible graphics:
+.TP 5
+-
+COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with
+the \fBA_BOLD\fR attribute.
+.TP 5
+-
+The A_BLINK attribute should in theory cause the background to go bright. This
+often fails to work, and even some cards for which it mostly works (such as the
+Paradise and compatibles) do the wrong thing when you try to set a bright
+"yellow" background (you get a blinking yellow foreground instead).
+.TP 5
+-
+Color RGB values are not settable.
+.SH PORTABILITY
+This implementation satisfies XSI Curses's minimum maximums
+for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR.
+.PP
+The \fBinit_pair\fP routine accepts negative values of foreground
+and background color to support the \fBuse_default_colors\fP extension,
+but only if that routine has been first invoked.
+.PP
+The assumption that \fBCOLOR_BLACK\fR is the default
+background color for all terminals can be modified using the
+\fBassume_default_colors\fP extension,
+
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_initscr\fR(3X),
+\fBcurs_attr\fR(3X),
+\fBdefault_colors\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_delch.3x b/Build/source/libs/ncurses/man/curs_delch.3x
new file mode 100644
index 00000000000..34bd9ac3e24
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_delch.3x
@@ -0,0 +1,70 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_delch.3x,v 1.7 2000/07/01 19:55:37 tom Exp $
+.TH curs_delch 3X ""
+.SH NAME
+\fBdelch\fR,
+\fBwdelch\fR,
+\fBmvdelch\fR,
+\fBmvwdelch\fR - delete character under the cursor in a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint delch(void);\fR
+.br
+\fBint wdelch(WINDOW *win);\fR
+.br
+\fBint mvdelch(int y, int x);\fR
+.br
+\fBint mvwdelch(WINDOW *win, int y, int x);\fR
+.br
+.SH DESCRIPTION
+These routines delete the character under the cursor; all characters to the
+right of the cursor on the same line are moved to the left one position and the
+last character on the line is filled with a blank. The cursor position does
+not change (after moving to \fIy\fR, \fIx\fR, if specified). (This does not
+imply use of the hardware delete character feature.)
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+Note that \fBdelch\fR, \fBmvdelch\fR, and \fBmvwdelch\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4. The
+standard specifies that they return \fBERR\fR on failure, but specifies no
+error conditions.
+.SH SEE ALSO
+\fBcurses\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_deleteln.3x b/Build/source/libs/ncurses/man/curs_deleteln.3x
new file mode 100644
index 00000000000..38a5496a9bb
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_deleteln.3x
@@ -0,0 +1,87 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_deleteln.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $
+.TH curs_deleteln 3X ""
+.SH NAME
+\fBdeleteln\fR,
+\fBwdeleteln\fR,
+\fBinsdelln\fR,
+\fBwinsdelln\fR,
+\fBinsertln\fR,
+\fBwinsertln\fR - delete and insert lines in a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint deleteln(void);\fR
+.br
+\fBint wdeleteln(WINDOW *win);\fR
+.br
+\fBint insdelln(int n);\fR
+.br
+\fBint winsdelln(WINDOW *win, int n);\fR
+.br
+\fBint insertln(void);\fR
+.br
+\fBint winsertln(WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+The \fBdeleteln\fR and \fBwdeleteln\fR routines delete the line under the
+cursor in the window; all lines below the current line are moved up one line.
+The bottom line of the window is cleared. The cursor position does not change.
+
+The \fBinsdelln\fR and \fBwinsdelln\fR routines, for positive \fIn\fR, insert
+\fIn\fR lines into the specified window above the current line. The \fIn\fR
+bottom lines are lost. For negative \fIn\fR, delete \fIn\fR lines (starting
+with the one under the cursor), and move the remaining lines up. The bottom
+\fIn\fR lines are cleared. The current cursor position remains the same.
+
+The \fBinsertln\fR and \fBwinsertln\fR routines insert a blank line above the
+current line and the bottom line is lost.
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4. The
+standard specifies that they return \fBERR\fR on failure, but specifies no
+error conditions.
+.SH NOTES
+Note that all but \fBwinsdelln\fR may be macros.
+
+These routines do not require a hardware line delete or insert feature in the
+terminal. In fact, they won't use hardware line delete/insert unless
+\fBidlok(..., TRUE)\fR has been set on the current window.
+.SH SEE ALSO
+\fBcurses\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_extend.3x b/Build/source/libs/ncurses/man/curs_extend.3x
new file mode 100644
index 00000000000..a5f187f0221
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_extend.3x
@@ -0,0 +1,84 @@
+.\"***************************************************************************
+.\" Copyright (c) 1999-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1999
+.\"
+.\" $Id: curs_extend.3x,v 1.13 2004/07/05 13:16:08 tom Exp $
+.TH curs_extend 3X ""
+.SH NAME
+\fBcurses_version\fP,
+\fBuse_extended_names\fP \- miscellaneous curses extensions
+
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBconst char * curses_version(void);\fP
+.br
+\fBint use_extended_names(bool enable);\fP
+.SH DESCRIPTION
+These functions are extensions to the curses library
+which do not fit easily into other categories.
+.PP
+Use
+.I curses_version()
+to get the version number, including patch level of the library, e.g.,
+.B 5.0.19991023
+.PP
+The
+.I use_extended_names()
+function controls whether the calling application
+is able to use user-defined or nonstandard names
+which may be compiled into the terminfo
+description, i.e., via the terminfo or termcap interfaces.
+Normally these names are available for use, since the essential decision
+is made by using the \fB-x\fP option of \fItic\fP to compile
+extended terminal definitions.
+However you can disable this feature
+to ensure compatibility with other implementations of curses.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBcurs_getch\fR(3X),
+\fBcurs_mouse\fR(3X),
+\fBcurs_print\fR(3X),
+\fBdefault_colors\fR(3X),
+\fBdefine_key\fR(3X),
+\fBkeybound\fR(3X),
+\fBkeyok\fR(3X),
+\fBresizeterm\fR(3X),
+\fBwresize\fR(3X).
+.SH AUTHOR
+Thomas Dickey.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_get_wch.3x b/Build/source/libs/ncurses/man/curs_get_wch.3x
new file mode 100644
index 00000000000..ce723a0a65d
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_get_wch.3x
@@ -0,0 +1,161 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_get_wch.3x,v 1.5 2003/05/10 20:33:49 jmc Exp $
+.TH curs_get_wch 3X ""
+.SH NAME
+\fBget_wch\fR,
+\fBwget_wch\fR,
+\fBmvget_wch\fR,
+\fBmvwget_wch\fR,
+\fBunget_wch\fR \- get (or push back) a wide character from curses terminal keyboard
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.sp
+\fBint get_wch(wint_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint wget_wch(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint mvget_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint mvwget_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint unget_wch(const wchar_t \fR\fIwch\fR\fB);\fR
+.SH DESCRIPTION
+The
+\fBget_wch\fR,
+\fBwget_wch\fR,
+\fBmvget_wch\fR, and
+\fBmvwget_wch\fR
+functions read a character
+from the terminal associated with the current or specified window.
+In no-delay mode,
+if no input is waiting, the value \fBERR\fR is returned.
+In delay mode,
+the program waits until the system passes text through to the program.
+Depending on the setting of \fBcbreak\fR,
+this is after one character (cbreak mode),
+or after the first newline (nocbreak mode).
+In half-delay mode,
+the program waits until the user types a character or the specified
+timeout interval has elapsed.
+
+Unless \fBnoecho\fR has been set,
+these routines echo the character into the designated window.
+
+If the window is not a pad and has been moved or modified since the
+last call to \fBwrefresh\fR,
+\fBwrefresh\fR will be called before another character is read.
+
+If \fBkeypad\fR is enabled,
+these functions respond to
+the pressing of a function key by setting the object pointed to by
+\fIwch\fR
+to the corresponding
+\fBKEY_\fR
+value defined
+in
+\fB<curses.h>\fR
+and returning
+\fBKEY_CODE_YES\fR.
+If a character (such as escape) that could be the
+beginning of a function key is received, curses sets a timer.
+If the remainder
+of the sequence does arrive within the designated time, curses passes through
+the character; otherwise, curses returns the function key value.
+For this
+reason, many terminals experience a delay between the time a user presses
+the escape key and the time the escape is returned to the program.
+.PP
+The
+\fBunget_wch\fR
+function pushes the wide character
+\fIwch\fR
+back onto the head of the input queue, so the wide character
+is returned by the next call to
+\fBget_wch\fR.
+The pushback of
+one character is guaranteed.
+If the program calls
+\fBunget_wch\fR
+too many times without an intervening call to
+\fBget_wch\fR,
+the operation may fail.
+.SH NOTES
+The header file
+\fB<curses.h>\fR
+automatically
+includes the header file
+\fB<stdio.h>\fR.
+.PP
+Applications should not define the escape key by itself as a single-character
+function.
+.PP
+When using
+\fBget_wch\fR,
+\fBwget_wch\fR,
+\fBmvget_wch\fR, or
+\fBmvwget_wch\fR, applications should
+not use
+\fBnocbreak\fR
+mode and
+\fBecho\fR
+mode
+at the same time.
+Depending on the state of the tty driver when each character
+is typed, the program may produce undesirable results.
+.PP
+All functions except \fBwget_wch\fR and \fBunget_wch\fR
+may be macros.
+.SH RETURN VALUES
+When
+\fBget_wch\fR,
+\fBwget_wch\fR,
+\fBmvget_wch\fR, and
+\fBmvwget_wch\fR
+functions successfully
+report the pressing of a function key, they return
+\fBKEY_CODE_YES\fR.
+When they successfully report a wide character, they return
+\fBOK\fR.
+Otherwise, they return
+\fBERR\fR.
+.PP
+Upon successful completion,
+\fBunget_wch\fR
+returns
+\fBOK\fR.
+Otherwise, the function returns
+\fBERR\fR.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_getch\fR(3X),
+\fBcurs_ins_wch\fR(3X),
+\fBcurs_inopts\fR(3X),
+\fBcurs_move\fR(3X),
+\fBcurs_refresh\fR(3X)
diff --git a/Build/source/libs/ncurses/man/curs_get_wstr.3x b/Build/source/libs/ncurses/man/curs_get_wstr.3x
new file mode 100644
index 00000000000..86a5b82a11f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_get_wstr.3x
@@ -0,0 +1,167 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_get_wstr.3x,v 1.3 2003/07/05 11:15:28 tom Exp $
+.TH curs_get_wstr 3X ""
+.SH NAME
+\fBget_wstr\fR,
+\fBgetn_wstr\fR,
+\fBwget_wstr\fR,
+\fBwgetn_wstr\fR,
+\fBmvget_wstr\fR,
+\fBmvgetn_wstr\fR,
+\fBmvwget_wstr\fR,
+\fBmvwgetn_wstr\fR \- get an array of wide characters from a curses terminal keyboard
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+
+\fBint get_wstr(wint_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint getn_wstr(wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint wget_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint wgetn_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvget_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint mvgetn_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwget_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint mvwgetn_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+The effect of
+\fBget_wstr\fR
+is as though a series of calls
+to
+\fBget_wch\fR
+were made, until a newline, other end-of-line, or end-of-file condition is processed.
+An end-of-file condition is represented by \fBWEOF\fR, as defined in \fB<wchar.h>\fR.
+The newline and end-of-line conditions are represented by the \fB\\n\fR \fBwchar_t\fR value.
+In all instances, the end of the string is terminated by a null \fBwchar_t\fR.
+The routine places resulting values in the area pointed to by \fIwstr\fR.
+
+The user's erase and kill characters are interpreted. If keypad
+mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
+are both considered equivalent to the user's kill character.
+
+Characters input are echoed only if \fBecho\fR is currently on. In that case,
+backspace is echoed as deletion of the previous character (typically a left
+motion).
+
+The effect of
+\fBwget_wstr\fR
+is as though a series of
+calls to
+\fBwget_wch\fR
+were made.
+
+The effect of
+\fBmvget_wstr\fR
+is as though a call to
+\fBmove\fR
+and then a series of calls to
+\fBget_wch\fR
+were
+made.
+
+The effect of
+\fBmvwget_wstr\fR
+is as though a call to
+\fBwmove\fR
+and then a series of calls to
+\fBwget_wch\fR
+were made.
+
+The
+\fBgetn_wstr\fR,
+\fBmvgetn_wstr\fR,
+\fBmvwgetn_wstr\fR, and
+\fBwgetn_wstr\fR
+functions are identical
+to the
+\fBget_wstr\fR,
+\fBmvget_wstr\fR,
+\fBmvwget_wstr\fR, and
+\fBwget_wstr\fR
+functions, respectively,
+except that the
+\fB*n_*\fR
+versions read at most
+\fIn\fR
+characters, letting the application prevent overflow of the
+input buffer.
+.SH NOTES
+Using
+\fBget_wstr\fR,
+\fBmvget_wstr\fR,
+\fBmvwget_wstr\fR, or
+\fBwget_wstr\fR
+to read a line that
+overflows the array pointed to by
+\fBwstr\fR
+causes undefined
+results.
+The use of
+\fBgetn_wstr\fR,
+\fBmvgetn_wstr\fR,
+\fBmvwgetn_wstr\fR, or
+\fBwgetn_wstr\fR, respectively, is recommended.
+
+These functions cannot return \fBKEY_\fR values because there
+is no way to distinguish a \fBKEY_\fR value from a valid \fBwchar_t\fR value.
+
+All of these routines except \fBwgetn_wstr\fR may be macros.
+.SH RETURN VALUES
+All of these functions return \fBOK\fR upon successful completion.
+Otherwise, they return \fBERR\fR.
+.SH PORTABILITY
+These functions are described in The Single Unix Specification, Version 2.
+No error conditions are defined.
+This implementation returns ERR if the window pointer is null,
+or if the lower-level \fBwget_wch\fR call returns an ERR.
+In the latter case,
+an ERR return without other data is treated as an end-of-file condition,
+and the returned array contains a \fBWEOF\fR followed by a null \fBwchar_t\fR.
+.PP
+X/Open curses documents these functions to pass an array of \fBwchar_t\fR,
+but all of the vendors implement this using \fBwint_t\fR.
+.SH SEE ALSO
+Functions:
+\fBcurses\fR(3X),
+\fBcurs_get_wch\fR(3X),
+\fBcurs_getstr\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_getcchar.3x b/Build/source/libs/ncurses/man/curs_getcchar.3x
new file mode 100644
index 00000000000..06623175831
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_getcchar.3x
@@ -0,0 +1,144 @@
+.\"***************************************************************************
+.\" Copyright (c) 2001-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_getcchar.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $
+.TH curs_getcchar 3X ""
+.SH NAME
+\fBgetcchar\fP,
+\fBsetcchar\fP \- Get a wide character string and rendition from a \fBcchar_t\fP or set a \fBcchar_t\fP from a wide-character string
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+.sp
+\fBint getcchar(\fP
+.br
+.B " const cchar_t *\fIwcval\fP,"
+.br
+.B " wchar_t *\fIwch\fP,"
+.br
+.B " attr_t *\fIattrs\fP,"
+.br
+.B " short *\fIcolor_pair\fP,"
+.br
+.B " void *\fIopts\fP );"
+.sp
+.B "int setcchar("
+.br
+.B " cchar_t *\fIwcval\fP,"
+.br
+.B " const wchar_t *\fIwch\fP,"
+.br
+.B " const attr_t \fIattrs\fP,"
+.br
+.B " short \fIcolor_pair\fP,"
+.br
+.B " void *\fIopts\fP );"
+.SH DESCRIPTION
+.PP
+The \fBgetcchar\fP function gets a wide-character string
+and rendition from a \fBcchar_t\fP argument.
+When \fIwch\fP is not a null pointer,
+the \fBgetcchar\fP function does the following:
+.TP 5
+-
+Extracts information from a \fBcchar_t\fP value \fIwcval\fP
+.TP 5
+-
+Stores the character attributes in the location pointed to by \fIattrs\fP
+.TP 5
+-
+Stores the color-pair in the location pointed to by \fIcolor_pair\fP
+.TP 5
+-
+Stores the wide-character string,
+characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP.
+.PP
+When
+\fIwch\fP
+is a null pointer, the
+\fBgetcchar\fP
+function does the following:
+.TP 5
+-
+Obtains the number of wide characters pointed to by \fIwcval\fP
+.TP 5
+-
+Does not change the data referenced by
+\fIattrs\fP
+or
+\fIcolor_pair\fP
+.PP
+The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP
+by using:
+.TP 5
+-
+The character attributes in
+\fIattrs\fP
+.TP 5
+-
+The color pair in
+\fIcolor_pair\fP
+.TP 5
+-
+The wide-character string pointed to by \fIwch\fP.
+The string must be L'\\0' terminated,
+contain at most one character with strictly positive width,
+which must be the first,
+and contain no characters of negative width.
+.SH NOTES
+.PP
+The \fIopts\fP argument is reserved for future use.
+Currently, an application must provide a null pointer as \fIopts\fP.
+.PP
+The \fIwcval\fP argument may be a value generated by a call to
+\fBsetcchar\fP or by a function that has a \fBcchar_t\fP output argument.
+If \fIwcval\fP is constructed by any other means, the effect is unspecified.
+.SH RETURN VALUES
+.PP
+When \fIwch\fP is a null pointer,
+\fBgetcchar\fP returns the number of wide characters referenced by
+\fIwcval\fP, including the null terminator.
+.PP
+When \fIwch\fP is not a null pointer,
+\fBgetcchar\fP returns \fBOK\fP upon successful completion,
+and \fBERR\fP otherwise.
+.PP
+Upon successful completion, \fBsetcchar\fP returns \fBOK\fP.
+Otherwise, it returns \fBERR\fP.
+.SH SEE ALSO
+.PP
+Functions:
+\fBcurses\fR(3X),
+\fBwcwidth\fR(3X),
+\fBcurs_attr_get\fR(3X),
+\fBcan_change_color\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_getch.3x b/Build/source/libs/ncurses/man/curs_getch.3x
new file mode 100644
index 00000000000..88003a5d9dd
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_getch.3x
@@ -0,0 +1,307 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_getch.3x,v 1.24 2003/12/27 18:46:06 tom Exp $
+.TH curs_getch 3X ""
+.SH NAME
+\fBgetch\fR,
+\fBwgetch\fR,
+\fBmvgetch\fR,
+\fBmvwgetch\fR,
+\fBungetch\fR,
+\fBhas_key\fR \- get (or push back) characters from \fBcurses\fR terminal keyboard
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBint getch(void);\fR
+.br
+\fBint wgetch(WINDOW *win);\fR
+.br
+\fBint mvgetch(int y, int x);\fR
+.br
+\fBint mvwgetch(WINDOW *win, int y, int x);\fR
+.br
+\fBint ungetch(int ch);\fR
+.br
+\fBint has_key(int ch);\fR
+.br
+.SH DESCRIPTION
+The \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR and \fBmvwgetch\fR, routines read
+a character from the window.
+In no-delay mode, if no input is waiting, the value \fBERR\fR is returned.
+In delay mode, the program waits until the system
+passes text through to the program.
+Depending on the setting of \fBcbreak\fR,
+this is after one character (cbreak mode),
+or after the first newline (nocbreak mode).
+In half-delay mode,
+the program waits until a character is typed or the
+specified timeout has been reached.
+.PP
+Unless \fBnoecho\fR has been set,
+then the character will also be echoed into the
+designated window according to the following rules:
+If the character is the current erase character, left arrow, or backspace,
+the cursor is moved one space to the left and that screen position is erased
+as if \fBdelch\fR had been called.
+If the character value is any other \fBKEY_\fR define, the user is alerted
+with a \fBbeep\fR call.
+Otherwise the character is simply output to the screen.
+.PP
+If the window is not a pad, and it has been moved or modified since the last
+call to \fBwrefresh\fR, \fBwrefresh\fR will be called before another character
+is read.
+.PP
+If \fBkeypad\fR is \fBTRUE\fR, and a function key is pressed, the token for
+that function key is returned instead of the raw characters.
+Possible function
+keys are defined in \fB<curses.h>\fR as macros with values outside the range
+of 8-bit characters whose names begin with \fBKEY_\fR. Thus, a variable
+intended to hold the return value of a function key must be of short size or
+larger.
+.PP
+When a character that could be the beginning of a function key is received
+(which, on modern terminals, means an escape character),
+\fBcurses\fR sets a timer.
+If the remainder of the sequence does not come in within the designated
+time, the character is passed through;
+otherwise, the function key value is returned.
+For this reason, many terminals experience a delay between the time
+a user presses the escape key and the escape is returned to the program.
+.PP
+The \fBungetch\fR routine places \fIch\fR back onto the input queue to be
+returned by the next call to \fBwgetch\fR.
+There is just one input queue for all windows.
+.PP
+.SS Function Keys
+The following function keys, defined in \fB<curses.h>\fR, might be returned by
+\fBgetch\fR if \fBkeypad\fR has been enabled.
+Note that not all of these are
+necessarily supported on any particular terminal.
+.sp
+.TS
+center tab(/) ;
+l l
+l l .
+\fIName\fR/\fIKey\fR \fIname\fR
+.PP
+KEY_BREAK/Break key
+KEY_DOWN/The four arrow keys ...
+KEY_UP
+KEY_LEFT
+KEY_RIGHT
+KEY_HOME/Home key (upward+left arrow)
+KEY_BACKSPACE/Backspace
+KEY_F0/T{
+Function keys; space for 64 keys is reserved.
+T}
+KEY_F(\fIn\fR)/T{
+For 0 \(<= \fIn\fR \(<= 63
+T}
+KEY_DL/Delete line
+KEY_IL/Insert line
+KEY_DC/Delete character
+KEY_IC/Insert char or enter insert mode
+KEY_EIC/Exit insert char mode
+KEY_CLEAR/Clear screen
+KEY_EOS/Clear to end of screen
+KEY_EOL/Clear to end of line
+KEY_SF/Scroll 1 line forward
+KEY_SR/Scroll 1 line backward (reverse)
+KEY_NPAGE/Next page
+KEY_PPAGE/Previous page
+KEY_STAB/Set tab
+KEY_CTAB/Clear tab
+KEY_CATAB/Clear all tabs
+KEY_ENTER/Enter or send
+KEY_SRESET/Soft (partial) reset
+KEY_RESET/Reset or hard reset
+KEY_PRINT/Print or copy
+KEY_LL/Home down or bottom (lower left)
+KEY_A1/Upper left of keypad
+KEY_A3/Upper right of keypad
+KEY_B2/Center of keypad
+KEY_C1/Lower left of keypad
+KEY_C3/Lower right of keypad
+KEY_BTAB/Back tab key
+KEY_BEG/Beg(inning) key
+KEY_CANCEL/Cancel key
+KEY_CLOSE/Close key
+KEY_COMMAND/Cmd (command) key
+KEY_COPY/Copy key
+KEY_CREATE/Create key
+KEY_END/End key
+KEY_EXIT/Exit key
+KEY_FIND/Find key
+KEY_HELP/Help key
+KEY_MARK/Mark key
+KEY_MESSAGE/Message key
+KEY_MOUSE/Mouse event read
+KEY_MOVE/Move key
+KEY_NEXT/Next object key
+KEY_OPEN/Open key
+KEY_OPTIONS/Options key
+KEY_PREVIOUS/Previous object key
+KEY_REDO/Redo key
+KEY_REFERENCE/Ref(erence) key
+KEY_REFRESH/Refresh key
+KEY_REPLACE/Replace key
+KEY_RESIZE/Screen resized
+KEY_RESTART/Restart key
+KEY_RESUME/Resume key
+KEY_SAVE/Save key
+KEY_SBEG/Shifted beginning key
+KEY_SCANCEL/Shifted cancel key
+KEY_SCOMMAND/Shifted command key
+KEY_SCOPY/Shifted copy key
+KEY_SCREATE/Shifted create key
+KEY_SDC/Shifted delete char key
+KEY_SDL/Shifted delete line key
+KEY_SELECT/Select key
+KEY_SEND/Shifted end key
+KEY_SEOL/Shifted clear line key
+KEY_SEXIT/Shifted exit key
+KEY_SFIND/Shifted find key
+KEY_SHELP/Shifted help key
+KEY_SHOME/Shifted home key
+KEY_SIC/Shifted input key
+KEY_SLEFT/Shifted left arrow key
+KEY_SMESSAGE/Shifted message key
+KEY_SMOVE/Shifted move key
+KEY_SNEXT/Shifted next key
+KEY_SOPTIONS/Shifted options key
+KEY_SPREVIOUS/Shifted prev key
+KEY_SPRINT/Shifted print key
+KEY_SREDO/Shifted redo key
+KEY_SREPLACE/Shifted replace key
+KEY_SRIGHT/Shifted right arrow
+KEY_SRSUME/Shifted resume key
+KEY_SSAVE/Shifted save key
+KEY_SSUSPEND/Shifted suspend key
+KEY_SUNDO/Shifted undo key
+KEY_SUSPEND/Suspend key
+KEY_UNDO/Undo key
+.TE
+.PP
+Keypad is arranged like this:
+.sp
+.TS
+center allbox tab(/) ;
+c c c .
+\fBA1\fR/\fBup\fR/\fBA3\fR
+\fBleft\fR/\fBB2\fR/\fBright\fR
+\fBC1\fR/\fBdown\fR/\fBC3\fR
+.TE
+.sp
+The \fBhas_key\fR routine takes a key value from the above list, and
+returns TRUE or FALSE according to whether
+the current terminal type recognizes a key with that value.
+Note that a few values do not correspond to a real key,
+e.g., KEY_RESIZE and KEY_MOUSE.
+.PP
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an integer value
+other than \fBERR\fR (\fBOK\fR in the case of ungetch()) upon successful
+completion.
+.SH NOTES
+Use of the escape key by a programmer for a single character function is
+discouraged, as it will cause a delay of up to one second while the
+keypad code looks for a following function-key sequence.
+.PP
+Note that some keys may be the same as commonly used control
+keys, e.g., KEY_ENTER versus control/M, KEY_BACKSPACE versus control/H.
+Some curses implementations may differ according to whether they
+treat these control keys specially (and ignore the terminfo), or
+use the terminfo definitions.
+\fBNcurses\fR uses the terminfo definition.
+If it says that KEY_ENTER is control/M, \fBgetch\fR will return KEY_ENTER
+when you press control/M.
+.PP
+When using \fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR, or
+\fBmvwgetch\fR, nocbreak mode (\fBnocbreak\fR) and echo mode
+(\fBecho\fR) should not be used at the same time.
+Depending on the
+state of the tty driver when each character is typed, the program may
+produce undesirable results.
+.PP
+Note that \fBgetch\fR, \fBmvgetch\fR, and \fBmvwgetch\fR may be macros.
+.PP
+Historically, the set of keypad macros was largely defined by the extremely
+function-key-rich keyboard of the AT&T 7300, aka 3B1, aka Safari 4.
+Modern
+personal computers usually have only a small subset of these.
+IBM PC-style
+consoles typically support little more than \fBKEY_UP\fR, \fBKEY_DOWN\fR,
+\fBKEY_LEFT\fR, \fBKEY_RIGHT\fR, \fBKEY_HOME\fR, \fBKEY_END\fR,
+\fBKEY_NPAGE\fR, \fBKEY_PPAGE\fR, and function keys 1 through 12.
+The Ins key
+is usually mapped to \fBKEY_IC\fR.
+.SH PORTABILITY
+The *get* functions are described in the XSI Curses standard, Issue 4.
+They
+read single-byte characters only.
+The standard specifies that they return
+\fBERR\fR on failure, but specifies no error conditions.
+.PP
+The echo behavior of these functions on input of \fBKEY_\fR or backspace
+characters was not specified in the SVr4 documentation.
+This description is
+adopted from the XSI Curses standard.
+.PP
+The behavior of \fBgetch\fR and friends in the presence of handled signals is
+unspecified in the SVr4 and XSI Curses documentation.
+Under historical curses
+implementations, it varied depending on whether the operating system's
+implementation of handled signal receipt interrupts a \fBread\fR(2) call in
+progress or not, and also (in some implementations) depending on whether an
+input timeout or non-blocking mode has been set.
+.PP
+Programmers concerned about portability should be prepared for either of two
+cases: (a) signal receipt does not interrupt \fBgetch\fR; (b) signal receipt
+interrupts \fBgetch\fR and causes it to return ERR with \fBerrno\fR set to
+\fBEINTR\fR.
+Under the \fBncurses\fR implementation, handled signals never
+interrupt \fBgetch\fR.
+.PP
+The \fBhas_key\fR function is unique to \fBncurses\fR.
+We recommend that
+any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_inopts\fR(3X),
+\fBcurs_mouse\fR(3X),
+\fBcurs_move\fR(3X),
+\fBcurs_refresh\fR(3X).
+\fBresizeterm\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_getstr.3x b/Build/source/libs/ncurses/man/curs_getstr.3x
new file mode 100644
index 00000000000..ffbd2887240
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_getstr.3x
@@ -0,0 +1,107 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_getstr.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $
+.TH curs_getstr 3X ""
+.SH NAME
+\fBgetstr\fR,
+\fBgetnstr\fR,
+\fBwgetstr\fR,
+\fBwgetnstr\fR,
+\fBmvgetstr\fR,
+\fBmvgetnstr\fR,
+\fBmvwgetstr\fR,
+\fBmvwgetnstr\fR - accept character strings from \fBcurses\fR terminal keyboard
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint getstr(char *str);\fR
+.br
+\fBint getnstr(char *str, int n);\fR
+.br
+\fBint wgetstr(WINDOW *win, char *str);\fR
+.br
+\fBint wgetnstr(WINDOW *win, char *str, int n);\fR
+.br
+\fBint mvgetstr(int y, int x, char *str);\fR
+.br
+\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR
+.br
+\fBint mvgetnstr(int y, int x, char *str, int n);\fR
+.br
+\fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR
+.br
+.SH DESCRIPTION
+The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR,
+until a newline or carriage return is received (the terminating character is
+not included in the returned string). The resulting value is placed in the
+area pointed to by the character pointer \fIstr\fR.
+
+\fBwgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible
+overflow of the input buffer. Any attempt to enter more characters (other
+than the terminating newline or carriage return) causes a beep. Function
+keys also cause a beep and are ignored. The \fBgetnstr\fR function reads
+from the \fIstdscr\fR default window.
+
+The user's erase and kill characters are interpreted. If keypad
+mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
+are both considered equivalent to the user's kill character.
+
+Characters input are echoed only if \fBecho\fR is currently on. In that case,
+backspace is echoed as deletion of the previous character (typically a left
+motion).
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an \fBOK\fR (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+They read single-byte characters only.
+The standard does not define any error conditions.
+This implementation returns ERR if the window pointer is null,
+or if the lower-level \fBwgetch\fR call returns an ERR.
+
+SVr3 and early SVr4 curses implementations did not reject function keys;
+the SVr4.0 documentation claimed that "special keys" (such as function
+keys, "home" key, "clear" key, \fIetc\fR.) are "interpreted", without
+giving details. It lied. In fact, the `character' value appended to the
+string by those implementations was predictable but not useful
+(being, in fact, the low-order eight bits of the key's KEY_ value).
+
+The functions \fBgetnstr\fR, \fBmvgetnstr\fR, and \fBmvwgetnstr\fR were
+present but not documented in SVr4.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_getch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_getyx.3x b/Build/source/libs/ncurses/man/curs_getyx.3x
new file mode 100644
index 00000000000..1e1a6eff1f3
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_getyx.3x
@@ -0,0 +1,89 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_getyx.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $
+.TH curs_getyx 3X ""
+.SH NAME
+\fBgetyx\fR,
+\fBgetparyx\fR,
+\fBgetbegyx\fR,
+\fBgetmaxyx\fR - get \fBcurses\fR cursor and window coordinates
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBvoid getyx(WINDOW *win, int y, int x);\fR
+.br
+\fBvoid getparyx(WINDOW *win, int y, int x);\fR
+.br
+\fBvoid getbegyx(WINDOW *win, int y, int x);\fR
+.br
+\fBvoid getmaxyx(WINDOW *win, int y, int x);\fR
+.br
+.SH DESCRIPTION
+The \fBgetyx\fR macro places the current cursor position of the given window in
+the two integer variables \fIy\fR and \fIx\fR.
+
+If \fIwin\fR is a subwindow, the \fBgetparyx\fR macro places the beginning
+coordinates of the subwindow relative to the parent window into two integer
+variables \fIy\fR and \fIx\fR.
+Otherwise, \fB-1\fR is placed into \fIy\fR and \fIx\fR.
+
+Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store
+the current beginning coordinates and size of the specified window.
+.SH RETURN VALUE
+The return values of these macros are undefined (i.e.,
+they should not be used as the right-hand side of assignment statements).
+.SH NOTES
+All of these interfaces are macros.
+A "\fB&\fR" is not necessary before the variables \fIy\fR and \fIx\fR.
+.SH PORTABILITY
+The
+\fBgetyx\fR,
+\fBgetparyx\fR,
+\fBgetbegyx\fR and
+\fBgetmaxyx\fR
+functions are described in the XSI Curses standard, Issue 4.
+.PP
+This implementation also provides
+\fBgetbegx\fR,
+\fBgetbegy\fR,
+\fBgetcurx\fR,
+\fBgetcury\fR,
+\fBgetmaxx\fR,
+\fBgetmaxy\fR,
+\fBgetparx\fR and
+\fBgetpary\fR
+for compatibility with older versions of curses.
+.SH SEE ALSO
+\fBcurses\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_in_wch.3x b/Build/source/libs/ncurses/man/curs_in_wch.3x
new file mode 100644
index 00000000000..668595c6f3e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_in_wch.3x
@@ -0,0 +1,68 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_in_wch.3x,v 1.1 2002/03/10 15:08:57 tom Exp $
+.TH curs_in_wch 3X ""
+.SH NAME
+\fBin_wch\fR,
+\fBmvin_wch\fR,
+\fBmvwin_wch\fR,
+\fBwin_wch\fR - extract a complex character and rendition from a window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint in_wch(cchar_t *\fR\fIwcval\fR\fB);\fR
+.br
+\fBint mvin_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
+.br
+\fBint mvwin_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
+.br
+\fBint win_wch(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
+.SH DESCRIPTION
+These functions extract the complex character and rendition from
+the current position in the named window into the \fBcchar_t\fR object
+referenced by wcval.
+.SH RETURN VALUE
+No errors are defined in the XSI Curses standard.
+This implementation checks for null pointers, returns ERR in that case.
+Also, the \fImv\fR routines check for error moving the cursor, returning ERR
+in that case.
+Otherwise they return OK
+.SH NOTES
+Note that all of these routines may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_inch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_in_wchstr.3x b/Build/source/libs/ncurses/man/curs_in_wchstr.3x
new file mode 100644
index 00000000000..0012789f70f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_in_wchstr.3x
@@ -0,0 +1,117 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_in_wchstr.3x,v 1.2 2002/05/18 21:48:30 tom Exp $
+.TH curs_in_wchstr 3X ""
+.SH NAME
+\fBin_wchstr\fR,
+\fBin_wchnstr\fR,
+\fBwin_wchstr\fR,
+\fBwin_wchnstr\fR,
+\fBmvin_wchstr\fR,
+\fBmvin_wchnstr\fR,
+\fBmvwin_wchstr\fR,
+\fBmvwin_wchnstr\fR \- get an array of complex characters and renditions from a curses window
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+
+\fBint in_wchstr(cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint in_wchnstr(cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint win_wchstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint win_wchnstr(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvin_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint mvin_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwin_wchstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR\fB);\fR
+.br
+\fBint mvwin_wchnstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwchstr\fR, int \fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+These functions return an array of complex characters in \fIwchstr\fR,
+starting at the current cursor position in the named window.
+Attributes (rendition) are stored with the characters.
+.PP
+The
+\fBin_wchnstr\fR,
+\fBmvin_wchnstr\fR,
+\fBmvwin_wchnstr\fR
+and
+\fBwin_wchnstr\fR
+fill the array
+with at most
+\fIn\fR
+\fBcchar_t\fR
+elements.
+.br
+.SH NOTES
+Note that all routines except
+\fBwin_wchnstr\fR
+may be
+macros.
+.PP
+Reading a line that overflows the array pointed to by
+\fIwchstr\fR
+with
+\fBin_wchstr\fR,
+\fBmvin_wchstr\fR,
+\fBmvwin_wchstr\fR
+or
+\fBwin_wchstr\fR
+causes undefined results. Therefore, the use of
+\fBin_wchnstr\fR,
+\fBmvin_wchnstr\fR,
+\fBmvwin_wchnstr\fR, or
+\fBwin_wchnstr\fR
+is recommended.
+.SH RETURN VALUES
+Upon successful completion, these functions return
+\fBOK\fR.
+Otherwise, they return
+\fBERR\fR.
+.SH PORTABILITY
+The XSI Curses defines no error conditions.
+This implementation checks for null pointers,
+returning ERR in that case.
+.SH SEE ALSO
+Functions:
+\fBcurses\fR(3X),
+\fBcurs_in_wch\fR(3X)
+\fBcurs_instr\fR(3X),
+\fBcurs_inwstr\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_inch.3x b/Build/source/libs/ncurses/man/curs_inch.3x
new file mode 100644
index 00000000000..bcc8d6f85c6
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_inch.3x
@@ -0,0 +1,73 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_inch.3x,v 1.11 1998/11/29 01:04:34 Rick.Ohnemus Exp $
+.TH curs_inch 3X ""
+.SH NAME
+\fBinch\fR, \fBwinch\fR, \fBmvinch\fR, \fBmvwinch\fR
+- get a character and attributes from a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBchtype inch(void);\fR
+.br
+\fBchtype winch(WINDOW *win);\fR
+.br
+\fBchtype mvinch(int y, int x);\fR
+.br
+\fBchtype mvwinch(WINDOW *win, int y, int x);\fR
+.br
+.SH DESCRIPTION
+These routines return the character, of type \fBchtype\fR, at the current
+position in the named window. If any attributes are set for that position,
+their values are OR'ed into the value returned. Constants defined in
+\fB<curses.h>\fR can be used with the \fB&\fR (logical AND) operator to
+extract the character or attributes alone.
+
+.SS Attributes
+The following bit-masks may be AND-ed with characters returned by \fBwinch\fR.
+
+.TS
+l l .
+\fBA_CHARTEXT\fR Bit-mask to extract character
+\fBA_ATTRIBUTES\fR Bit-mask to extract attributes
+\fBA_COLOR\fR Bit-mask to extract color-pair field information
+.TE
+.SH NOTES
+Note that all of these routines may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_inchstr.3x b/Build/source/libs/ncurses/man/curs_inchstr.3x
new file mode 100644
index 00000000000..60f9d566e9f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_inchstr.3x
@@ -0,0 +1,88 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_inchstr.3x,v 1.8 2000/07/01 20:16:18 tom Exp $
+.TH curs_inchstr 3X ""
+.SH NAME
+\fBinchstr\fR,
+\fBinchnstr\fR,
+\fBwinchstr\fR,
+\fBwinchnstr\fR,
+\fBmvinchstr\fR,
+\fBmvinchnstr\fR,
+\fBmvwinchstr\fR,
+\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint inchstr(chtype *chstr);\fR
+.br
+\fBint inchnstr(chtype *chstr, int n);\fR
+.br
+\fBint winchstr(WINDOW *win, chtype *chstr);\fR
+.br
+\fBint winchnstr(WINDOW *win, chtype *chstr, int n);\fR
+.br
+\fBint mvinchstr(int y, int x, chtype *chstr);\fR
+.br
+\fBint mvinchnstr(int y, int x, chtype *chstr, int n);\fR
+.br
+\fBint mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);\fR
+.br
+\fBint mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);\fR
+.br
+.SH DESCRIPTION
+These routines return a NULL-terminated array of \fBchtype\fR quantities,
+starting at the current cursor position in the named window and ending at the
+right margin of the window. The four functions with \fIn\fR as
+the last argument, return a leading substring at most \fIn\fR characters long
+(exclusive of the trailing (chtype)0).
+Constants defined in \fB<curses.h>\fR can be used with the \fB&\fR (logical
+AND) operator to extract the character or the attribute alone from any position
+in the \fIchstr\fR [see \fBcurs_inch\fR(3X)].
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an integer value
+other than \fBERR\fR upon successful completion (the number of characters
+retrieved, exclusive of the trailing 0).
+.SH NOTES
+Note that all routines except \fBwinchnstr\fR may be macros. SVr4 does not
+document whether the result string is 0-terminated; it does not document
+whether a length limit argument includes any trailing 0; and it does not
+document the meaning of the return value.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4. It is no
+more specific than the SVr4 documentation on the trailing 0. It does specify
+that the successful return of the functions is \fBOK\fR.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_inch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_initscr.3x b/Build/source/libs/ncurses/man/curs_initscr.3x
new file mode 100644
index 00000000000..02f149dff7f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_initscr.3x
@@ -0,0 +1,124 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_initscr.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $
+.TH curs_initscr 3X ""
+.SH NAME
+\fBinitscr\fR,
+\fBnewterm\fR,
+\fBendwin\fR,
+\fBisendwin\fR,
+\fBset_term\fR,
+\fBdelscreen\fR - \fBcurses\fR screen initialization and manipulation routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBWINDOW *initscr(void);\fR
+.br
+\fBint endwin(void);\fR
+.br
+\fBbool isendwin(void);\fR
+.br
+\fBSCREEN *newterm(char *type, FILE *outfd, FILE *infd);\fR
+.br
+\fBSCREEN *set_term(SCREEN *new);\fR
+.br
+\fBvoid delscreen(SCREEN* sp);\fR
+.br
+.SH DESCRIPTION
+\fBinitscr\fR is normally the first \fBcurses\fR routine to call when
+initializing a program. A few special routines sometimes need to be
+called before it; these are \fBslk_init\fR, \fBfilter\fR, \fBripoffline\fR,
+\fBuse_env\fR. For multiple-terminal applications, \fBnewterm\fR may be
+called before \fBinitscr\fR.
+
+The initscr code determines the terminal type and initializes all \fBcurses\fR
+data structures. \fBinitscr\fR also causes the first call to \fBrefresh\fR to
+clear the screen. If errors occur, \fBinitscr\fR writes an appropriate error
+message to standard error and exits; otherwise, a pointer is returned to
+\fBstdscr\fR.
+
+A program that outputs to more than one terminal should use the \fBnewterm\fR
+routine for each terminal instead of \fBinitscr\fR. A program that needs to
+inspect capabilities, so it can continue to run in a line-oriented mode if the
+terminal cannot support a screen-oriented program, would also use
+\fBnewterm\fR. The routine \fBnewterm\fR should be called once for each
+terminal. It returns a variable of type \fBSCREEN *\fR which should be saved
+as a reference to that terminal. The arguments are the \fItype\fR of the
+terminal to be used in place of \fB$TERM\fR, a file pointer for output to the
+terminal, and another file pointer for input from the terminal (if \fItype\fR
+is \fBNULL\fR, \fB$TERM\fR will be used). The program must also call
+\fBendwin\fR for each terminal being used before exiting from \fBcurses\fR.
+If \fBnewterm\fR is called more than once for the same terminal, the first
+terminal referred to must be the last one for which \fBendwin\fR is called.
+
+A program should always call \fBendwin\fR before exiting or escaping from
+\fBcurses\fR mode temporarily. This routine restores tty modes, moves the
+cursor to the lower left-hand corner of the screen and resets the terminal into
+the proper non-visual mode. Calling \fBrefresh\fR or \fBdoupdate\fR after a
+temporary escape causes the program to resume visual mode.
+
+The \fBisendwin\fR routine returns \fBTRUE\fR if \fBendwin\fR has been
+called without any subsequent calls to \fBwrefresh\fR, and \fBFALSE\fR
+otherwise.
+
+The \fBset_term\fR routine is used to switch between different
+terminals. The screen reference \fBnew\fR becomes the new current
+terminal. The previous terminal is returned by the routine. This is
+the only routine which manipulates \fBSCREEN\fR pointers; all other
+routines affect only the current terminal.
+
+The \fBdelscreen\fR routine frees storage associated with the
+\fBSCREEN\fR data structure. The \fBendwin\fR routine does not do
+this, so \fBdelscreen\fR should be called after \fBendwin\fR if a
+particular \fBSCREEN\fR is no longer needed.
+.SH RETURN VALUE
+\fBendwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR
+upon successful completion.
+
+Routines that return pointers always return \fBNULL\fR on error.
+.SH NOTES
+Note that \fBinitscr\fR and \fBnewterm\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4. It
+specifies that portable applications must not call \fBinitscr\fR more than
+once.
+
+Old versions of curses, e.g., BSD 4.4, may have returned a null pointer
+from \fBinitscr\fR when an error is detected, rather than exiting.
+It is safe but redundant to check the return value of \fBinitscr\fR
+in XSI Curses.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_kernel\fR(3X), \fBcurs_refresh\fR(3X),
+\fBcurs_slk\fR(3X), \fBcurs_util\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_inopts.3x b/Build/source/libs/ncurses/man/curs_inopts.3x
new file mode 100644
index 00000000000..24a9bd61452
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_inopts.3x
@@ -0,0 +1,214 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_inopts.3x,v 1.11 2003/12/27 18:45:42 tom Exp $
+.TH curs_inopts 3X ""
+.SH NAME
+\fBcbreak\fR, \fBnocbreak\fR, \fBecho\fR,
+\fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR, \fBkeypad\fR,
+\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBraw\fR, \fBnoraw\fR,
+\fBnoqiflush\fR, \fBqiflush\fR, \fBtimeout\fR, \fBwtimeout\fR,
+\fBtypeahead\fR - \fBcurses\fR input options
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBint cbreak(void);\fR
+.br
+\fBint nocbreak(void);\fR
+.br
+\fBint echo(void);\fR
+.br
+\fBint noecho(void);\fR
+.br
+\fBint halfdelay(int tenths);\fR
+.br
+\fBint intrflush(WINDOW *win, bool bf);\fR
+.br
+\fBint keypad(WINDOW *win, bool bf);\fR
+.br
+\fBint meta(WINDOW *win, bool bf);\fR
+.br
+\fBint nodelay(WINDOW *win, bool bf);\fR
+.br
+\fBint raw(void);\fR
+.br
+\fBint noraw(void);\fR
+.br
+\fBvoid noqiflush(void);\fR
+.br
+\fBvoid qiflush(void);\fR
+.br
+\fBint notimeout(WINDOW *win, bool bf);\fR
+.br
+\fBvoid timeout(int delay);\fR
+.br
+\fBvoid wtimeout(WINDOW *win, int delay);\fR
+.br
+\fBint typeahead(int fd);\fR
+.br
+.SH DESCRIPTION
+Normally, the tty driver buffers typed characters until a newline or carriage
+return is typed. The \fBcbreak\fR routine disables line buffering and
+erase/kill character-processing (interrupt and flow control characters are
+unaffected), making characters typed by the user immediately available to the
+program. The \fBnocbreak\fR routine returns the terminal to normal (cooked)
+mode.
+.PP
+Initially the terminal may or may not be in \fBcbreak\fR mode, as the mode is
+inherited; therefore, a program should call \fBcbreak\fR or \fBnocbreak\fR
+explicitly. Most interactive programs using \fBcurses\fR set the \fBcbreak\fR
+mode. Note that \fBcbreak\fR overrides \fBraw\fR.
+[See \fBcurs_getch\fR(3X) for a
+discussion of how these routines interact with \fBecho\fR and \fBnoecho\fR.]
+.PP
+The \fBecho\fR and \fBnoecho\fR routines control whether characters typed by
+the user are echoed by \fBgetch\fR as they are typed. Echoing by the tty
+driver is always disabled, but initially \fBgetch\fR is in echo mode, so
+characters typed are echoed. Authors of most interactive programs prefer to do
+their own echoing in a controlled area of the screen, or not to echo at all, so
+they disable echoing by calling \fBnoecho\fR.
+[See \fBcurs_getch\fR(3X) for a
+discussion of how these routines interact with \fBcbreak\fR and
+\fBnocbreak\fR.]
+.PP
+The \fBhalfdelay\fR routine is used for half-delay mode, which is similar to
+\fBcbreak\fR mode in that characters typed by the user are immediately
+available to the program. However, after blocking for \fItenths\fR tenths of
+seconds, ERR is returned if nothing has been typed. The value of \fBtenths\fR
+must be a number between 1 and 255. Use \fBnocbreak\fR to leave half-delay
+mode.
+.PP
+If the \fBintrflush\fR option is enabled, (\fIbf\fR is \fBTRUE\fR), when an
+interrupt key is pressed on the keyboard (interrupt, break, quit) all output in
+the tty driver queue will be flushed, giving the effect of faster response to
+the interrupt, but causing \fBcurses\fR to have the wrong idea of what is on
+the screen. Disabling (\fIbf\fR is \fBFALSE\fR), the option prevents the
+flush. The default for the option is inherited from the tty driver settings.
+The window argument is ignored.
+.PP
+The \fBkeypad\fR option enables the keypad of the user's terminal. If
+enabled (\fIbf\fR is \fBTRUE\fR), the user can press a function key
+(such as an arrow key) and \fBwgetch\fR returns a single value
+representing the function key, as in \fBKEY_LEFT\fR. If disabled
+(\fIbf\fR is \fBFALSE\fR), \fBcurses\fR does not treat function keys
+specially and the program has to interpret the escape sequences
+itself. If the keypad in the terminal can be turned on (made to
+transmit) and off (made to work locally), turning on this option
+causes the terminal keypad to be turned on when \fBwgetch\fR is
+called. The default value for keypad is false.
+.PP
+Initially, whether the terminal returns 7 or 8 significant bits on
+input depends on the control mode of the tty driver [see termio(7)].
+To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR,
+\fBTRUE\fR); this is equivalent, under POSIX, to setting the CS8 flag
+on the terminal. To force 7 bits to be returned, invoke
+\fBmeta\fR(\fIwin\fR, \fBFALSE\fR); this is equivalent, under POSIX,
+to setting the CS7 flag on the terminal. The window argument,
+\fIwin\fR, is always ignored. If the terminfo capabilities \fBsmm\fR
+(meta_on) and \fBrmm\fR (meta_off) are defined for the terminal,
+\fBsmm\fR is sent to the terminal when \fBmeta\fR(\fIwin\fR,
+\fBTRUE\fR) is called and \fBrmm\fR is sent when \fBmeta\fR(\fIwin\fR,
+\fBFALSE\fR) is called.
+.PP
+The \fBnodelay\fR option causes \fBgetch\fR to be a non-blocking call.
+If no input is ready, \fBgetch\fR returns \fBERR\fR. If disabled
+(\fIbf\fR is \fBFALSE\fR), \fBgetch\fR waits until a key is pressed.
+.PP
+While interpreting an input escape sequence, \fBwgetch\fR sets a timer
+while waiting for the next character. If \fBnotimeout(\fR\fIwin\fR,
+\fBTRUE\fR) is called, then \fBwgetch\fR does not set a timer. The
+purpose of the timeout is to differentiate between sequences received
+from a function key and those typed by a user.
+.PP
+The \fBraw\fR and \fBnoraw\fR routines place the terminal into or out of raw
+mode. Raw mode is similar to \fBcbreak\fR mode, in that characters typed are
+immediately passed through to the user program. The differences are that in
+raw mode, the interrupt, quit, suspend, and flow control characters are all
+passed through uninterpreted, instead of generating a signal. The behavior of
+the BREAK key depends on other bits in the tty driver that are not set by
+\fBcurses\fR.
+.PP
+When the \fBnoqiflush\fR routine is used, normal flush of input and
+output queues associated with the \fBINTR\fR, \fBQUIT\fR and
+\fBSUSP\fR characters will not be done [see termio(7)]. When
+\fBqiflush\fR is called, the queues will be flushed when these control
+characters are read. You may want to call \fBnoqiflush()\fR in a signal
+handler if you want output to continue as though the interrupt
+had not occurred, after the handler exits.
+.PP
+The \fBtimeout\fR and \fBwtimeout\fR routines set blocking or
+non-blocking read for a given window. If \fIdelay\fR is negative,
+blocking read is used (i.e., waits indefinitely for
+input). If \fIdelay\fR is zero, then non-blocking read is used
+(i.e., read returns \fBERR\fR if no input is waiting). If
+\fIdelay\fR is positive, then read blocks for \fIdelay\fR
+milliseconds, and returns \fBERR\fR if there is still no input.
+Hence, these routines provide the same functionality as \fBnodelay\fR,
+plus the additional capability of being able to block for only
+\fIdelay\fR milliseconds (where \fIdelay\fR is positive).
+.PP
+The \fBcurses\fR library does ``line-breakout optimization'' by looking for
+typeahead periodically while updating the screen. If input is found,
+and it is coming from a tty, the current update is postponed until
+\fBrefresh\fR or \fBdoupdate\fR is called again. This allows faster
+response to commands typed in advance. Normally, the input FILE
+pointer passed to \fBnewterm\fR, or \fBstdin\fR in the case that
+\fBinitscr\fR was used, will be used to do this typeahead checking.
+The \fBtypeahead\fR routine specifies that the file descriptor
+\fIfd\fR is to be used to check for typeahead instead. If \fIfd\fR is
+-1, then no typeahead checking is done.
+.SH RETURN VALUE
+All routines that return an integer return \fBERR\fR upon failure and OK (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion, unless otherwise noted in the preceding routine descriptions.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+.PP
+The ncurses library obeys the XPG4 standard and the historical practice of the
+AT&T curses implementations, in that the echo bit is cleared when curses
+initializes the terminal state. BSD curses differed from this slightly; it
+left the echo bit on at initialization, but the BSD \fBraw\fR call turned it
+off as a side-effect. For best portability, set echo or noecho explicitly
+just after initialization, even if your program remains in cooked mode.
+.SH NOTES
+Note that \fBecho\fR, \fBnoecho\fR, \fBhalfdelay\fR, \fBintrflush\fR,
+\fBmeta\fR, \fBnodelay\fR, \fBnotimeout\fR, \fBnoqiflush\fR,
+\fBqiflush\fR, \fBtimeout\fR, and \fBwtimeout\fR may be macros.
+.PP
+The \fBnoraw\fR and \fBnocbreak\fR calls follow historical practice in that
+they attempt to restore to normal (`cooked') mode from raw and cbreak modes
+respectively. Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver
+control states that are hard to predict or understand; it is not recommended.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_getch\fR(3X), \fBcurs_initscr\fR(3X), \fBtermio\fR(7)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_ins_wch.3x b/Build/source/libs/ncurses/man/curs_ins_wch.3x
new file mode 100644
index 00000000000..23cf0999572
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_ins_wch.3x
@@ -0,0 +1,65 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_ins_wch.3x,v 1.2 2002/03/10 23:43:27 tom Exp $
+.TH curs_ins_wch 3X ""
+.SH NAME
+\fBins_wch\fR,
+\fBmvins_wch\fR,
+\fBmvwins_wch\fR,
+\fBwins_wch\fR \- insert a complex character and rendition into a window
+.SH SYNOPSIS
+#include <curses.h>
+
+\fBint ins_wch(const cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint wins_wch(WINDOW *\fR\fIwin, const cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint mvins_wch(int \fR\fIy, int \fR\fIx, const cchar_t *\fR\fIwch\fR\fB);\fR
+.br
+\fBint mvwins_wch(WINDOW *\fR\fIwin, int \fR\fIy, int \fR\fIx, const cchar_t *\fR\fIwch\fR\fB);\fR
+.SH DESCRIPTION
+These routines, insert the complex character \fIwch\fR with rendition
+before the character under the cursor.
+All characters to the right of the cursor are moved one space to the right,
+with the possibility of the rightmost character on the line being lost.
+The insertion operation does not change the cursor position.
+.SH RETURN VALUE
+If successful, these functions return OK.
+If not, they return ERR.
+.SH ERRORS
+No errors are defined.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_insch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_ins_wstr.3x b/Build/source/libs/ncurses/man/curs_ins_wstr.3x
new file mode 100644
index 00000000000..197f30f5cd7
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_ins_wstr.3x
@@ -0,0 +1,104 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_ins_wstr.3x,v 1.2 2002/03/10 23:43:27 tom Exp $
+.TH curs_ins_wstr 3X ""
+.SH NAME
+\fBins_wstr\fR,
+\fBins_nwstr\fR,
+\fBwins_wstr\fR,
+\fBwins_nwstr\fR,
+\fBmvins_wstr\fR,
+\fBmvins_nwstr\fR,
+\fBmvwins_wstr\fR,
+\fBmvwins_nwstr\fR \- insert a wide-character string into a curses window
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+
+\fBint ins_wstr(const wchar_t *\fR\fIwstr);\fR
+.br
+\fBint ins_nwstr(const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint wins_wstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint wins_nwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvins_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint mvins_nwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwins_wstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
+.br
+\fBint mvwins_nwstr(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+These routines insert a \fBwchar_t\fR character string
+(as many characters as will fit on the line)
+before the character under the cursor.
+All characters to the right of the cursor are shifted right,
+with the possibility of the rightmost characters on the line being lost.
+No wrapping is performed.
+The cursor position does not change
+(after moving to \fIy\fR, \fIx\fR, if specified).
+The four routines with \fIn\fR as the last argument
+insert a leading substring of at most \fIn\fR \fBwchar_t\fR characters.
+If \fIn\fR is less than 1, the entire string is inserted.
+
+If a character in \fIwstr\fR is a tab, newline, carriage return or
+backspace, the cursor is moved appropriately within the window.
+A newline also does a \fBclrtoeol\fR before moving.
+Tabs are considered to be at every eighth column.
+If a character in \fIwstr\fR is another control character,
+it is drawn in the \fB^\fR\fIX\fR notation.
+Calling \fBwin_wch\fR after adding a control character
+(and moving to it, if necessary)
+does not return the control character,
+but instead returns a character in the ^-representation
+of the control character.
+.SH NOTES
+Note that all but wins_nwstr may be macros.
+
+If the first character in the string is a nonspacing character, these
+functions will fail.
+XSI does not define what will happen if a nonspacing character follows
+a control character.
+.SH RETURN VALUES
+Upon successful completion, these functions return OK.
+Otherwise, they return ERR.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_insstr\fR(3X),
+\fBcurs_in_wch\fR(3X),
+\fBcurs_ins_wch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_insch.3x b/Build/source/libs/ncurses/man/curs_insch.3x
new file mode 100644
index 00000000000..44eaa1ecafa
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_insch.3x
@@ -0,0 +1,70 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_insch.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $
+.TH curs_insch 3X ""
+.SH NAME
+\fBinsch\fR,
+\fBwinsch\fR,
+\fBmvinsch\fR,
+\fBmvwinsch\fR - insert a character before cursor in a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint insch(chtype ch);\fR
+.br
+\fBint winsch(WINDOW *win, chtype ch);\fR
+.br
+\fBint mvinsch(int y, int x, chtype ch);\fR
+.br
+\fBint mvwinsch(WINDOW *win, int y, int x, chtype ch);\fR
+.br
+.SH DESCRIPTION
+These routines insert the character \fIch\fR before the character under the
+cursor. All characters to the right of the cursor are moved one space to the
+right, with the possibility of the rightmost character on the line being lost.
+The insertion operation does not change the cursor position.
+.SH RETURN VALUE
+All routines that return an integer return \fBERR\fR upon failure and OK (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion, unless otherwise noted in the preceding routine descriptions.
+.SH NOTES
+These routines do not necessarily imply use of a hardware insert character
+feature.
+
+Note that \fBinsch\fR, \fBmvinsch\fR, and \fBmvwinsch\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_insstr.3x b/Build/source/libs/ncurses/man/curs_insstr.3x
new file mode 100644
index 00000000000..c96f2277ecc
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_insstr.3x
@@ -0,0 +1,99 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2001,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_insstr.3x,v 1.14 2004/06/19 22:22:51 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
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+\fBint insstr(const char *str);\fR
+.br
+\fBint insnstr(const char *str, int n);\fR
+.br
+\fBint winsstr(WINDOW *win, const char *str);\fR
+.br
+\fBint winsnstr(WINDOW *win, const char *str, int n);\fR
+.br
+\fBint mvinsstr(int y, int x, const char *str);\fR
+.br
+\fBint mvinsnstr(int y, int x, const char *str, int n);\fR
+.br
+\fBint mvwinsstr(WINDOW *win, int y, int x, const char *str);\fR
+.br
+\fBint mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);\fR
+.br
+.SH DESCRIPTION
+These routines insert a character string
+(as many characters as will fit on the line)
+before the character under the cursor.
+All characters to the right of the cursor are shifted right
+with the possibility of the rightmost characters on the line being lost.
+The cursor position does not change
+(after moving to \fIy\fR, \fIx\fR, if specified).
+The functions with \fIn\fR as the last argument
+insert a leading substring of at most \fIn\fR characters.
+If \fIn\fR<=0, then the entire string is inserted.
+
+Special characters are handled as in \fBaddch\fP.
+.SH RETURN VALUE
+All routines that return an integer return \fBERR\fR upon failure and OK (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion, unless otherwise noted in the preceding routine descriptions.
+.SH NOTES
+Note that all but \fBwinsnstr\fR may be macros.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4, which adds
+const qualifiers to the arguments. The XSI Curses error conditions
+\fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with extended-level conformance
+are not yet detected (this implementation does not yet support XPG4 multibyte
+characters).
+.LP
+The Single Unix Specification, Version 2 states that
+\fBinsnstr\fP and \fBwinsnstr\fP perform wrapping.
+This is probably an error, since it makes this group of functions inconsistent.
+Also, no implementation of curses documents this inconsistency.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBunctrl\fR(3X),
+\fBcurs_clear\fR(3X),
+\fBcurs_inch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_instr.3x b/Build/source/libs/ncurses/man/curs_instr.3x
new file mode 100644
index 00000000000..9a09ab278c4
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_instr.3x
@@ -0,0 +1,89 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_instr.3x,v 1.10 2001/11/03 19:58:56 tom Exp $
+.TH curs_instr 3X ""
+.SH NAME
+\fBinstr\fR,
+\fBinnstr\fR,
+\fBwinstr\fR,
+\fBwinnstr\fR,
+\fBmvinstr\fR,
+\fBmvinnstr\fR,
+\fBmvwinstr\fR,
+\fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint instr(char *str);\fR
+.br
+\fBint innstr(char *str, int n);\fR
+.br
+\fBint winstr(WINDOW *win, char *str);\fR
+.br
+\fBint winnstr(WINDOW *win, char *str, int n);\fR
+.br
+\fBint mvinstr(int y, int x, char *str);\fR
+.br
+\fBint mvinnstr(int y, int x, char *str, int n);\fR
+.br
+\fBint mvwinstr(WINDOW *win, int y, int x, char *str);\fR
+.br
+\fBint mvwinnstr(WINDOW *win, int y, int x, char *str, int n);\fR
+.br
+.SH DESCRIPTION
+These routines return a string of characters in \fIstr\fR, extracted starting
+at the current cursor position in the named window.
+Attributes are stripped from the characters. The four
+functions with \fIn\fR as the last argument return a leading substring at most
+\fIn\fR characters long (exclusive of the trailing NUL).
+.SH RETURN VALUE
+All of the functions return \fBERR\fR upon failure,
+or the number of characters actually read into the string.
+.SH NOTES
+Note that all routines except \fBwinnstr\fR may be macros.
+.SH PORTABILITY
+The XSI Curses
+error conditions \fBEILSEQ\fR and \fBEILOVERFLOW\fR associated with
+extended-level conformance are not yet detected (this implementation does not
+yet support XPG4 multibyte characters).
+SVr4 does not
+document whether a length limit includes or excludes the trailing NUL.
+.PP
+The ncurses library extends the XSI description by allowing a negative
+value for \fIn\fR.
+In this case, the functions return the string ending at the right margin.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
+
diff --git a/Build/source/libs/ncurses/man/curs_inwstr.3x b/Build/source/libs/ncurses/man/curs_inwstr.3x
new file mode 100644
index 00000000000..df32d851c2f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_inwstr.3x
@@ -0,0 +1,94 @@
+.\"***************************************************************************
+.\" Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_inwstr.3x,v 1.3 2004/03/13 19:39:10 tom Exp $
+.TH curs_inwstr 3 ""
+.SH NAME
+\fBinwstr\fR,
+\fBinnwstr\fR,
+\fBwinwstr\fR,
+\fBwinnwstr\fR,
+\fBmvinwstr\fR,
+\fBmvinnwstr\fR,
+\fBmvwinwstr\fR,
+\fBmvwinnwstr\fR \- get a string of \fBwchar_t\fR characters from a curses window
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h> \fR
+
+\fBint inwstr(\fR\fBwchar_t *\fR\fIstr\fR\fB);\fR
+.br
+\fBint innwstr(\fR\fBwchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint winwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR
+.br
+\fBint winnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvinwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR
+.br
+\fBint mvinnwstr(\fR\fBint \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.br
+\fBint mvwinwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB);\fR
+.br
+\fBint mvwinnwstr(\fR\fBWINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wchar_t *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
+.fi
+.SH DESCRIPTION
+These routines return a string of \fBwchar_t\fR characters in \fIwstr\fR,
+extracted starting at the current cursor position in the named window.
+Attributes are stripped from the characters.
+The four functions with \fIn\fR as the last argument return a leading substring at most
+\fIn\fR bytes long (exclusive of the trailing NUL).
+Transfer stops at the end of the current line, or when \fIn\fR bytes have
+been stored at the location referenced by \fIwstr\fR.
+.PP
+If the size \fIn\fR is not large enough to store a complete character,
+an error is generated.
+.SH NOTES
+Note that all routines except
+\fBwinnwstr\fR
+may be macros.
+.SH RETURN VALUES
+All routines return
+\fBERR\fR
+upon failure. Upon
+successful completion, the *\fBinwstr\fR
+routines return
+\fBOK\fR, and the *\fBinnwstr\fR
+routines return the
+number of characters read into the string.
+.SH SEE ALSO
+Functions:
+\fBcurses\fR(3X),
+\fBcurs_instr\fR(3X),
+\fBcurs_in_wchstr\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_kernel.3x b/Build/source/libs/ncurses/man/curs_kernel.3x
new file mode 100644
index 00000000000..caeb5bba0cd
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_kernel.3x
@@ -0,0 +1,159 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_kernel.3x,v 1.13 2001/12/08 18:01:25 tom Exp $
+.TH curs_kernel 3X ""
+.SH NAME
+\fBdef_prog_mode\fR, \fBdef_shell_mode\fR,
+\fBreset_prog_mode\fR, \fBreset_shell_mode\fR, \fBresetty\fR,
+\fBsavetty\fR, \fBgetsyx\fR, \fBsetsyx\fR, \fBripoffline\fR,
+\fBcurs_set\fR, \fBnapms\fR - low-level \fBcurses\fR routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint def_prog_mode(void);\fR
+.br
+\fBint def_shell_mode(void);\fR
+.br
+\fBint reset_prog_mode(void);\fR
+.br
+\fBint reset_shell_mode(void);\fR
+.br
+\fBint resetty(void);\fR
+.br
+\fBint savetty(void);\fR
+.br
+\fBvoid getsyx(int y, int x);\fR
+.br
+\fBvoid setsyx(int y, int x);\fR
+.br
+\fBint ripoffline(int line, int (*init)(WINDOW *, int));\fR
+.br
+\fBint curs_set(int visibility);\fR
+.br
+\fBint napms(int ms);\fR
+.br
+.SH DESCRIPTION
+The following routines give low-level access to various \fBcurses\fR
+capabilities. Theses routines typically are used inside library
+routines.
+
+The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the
+current terminal modes as the "program" (in \fBcurses\fR) or "shell"
+(not in \fBcurses\fR) state for use by the \fBreset_prog_mode\fR and
+\fBreset_shell_mode\fR routines. This is done automatically by
+\fBinitscr\fR. There is one such save area for each screen context
+allocated by \fBnewterm()\fR.
+
+The \fBreset_prog_mode\fR and \fBreset_shell_mode\fR routines restore
+the terminal to "program" (in \fBcurses\fR) or "shell" (out of
+\fBcurses\fR) state. These are done automatically by \fBendwin\fR
+and, after an \fBendwin\fR, by \fBdoupdate\fR, so they normally are
+not called.
+
+The \fBresetty\fR and \fBsavetty\fR routines save and restore the
+state of the terminal modes. \fBsavetty\fR saves the current state in
+a buffer and \fBresetty\fR restores the state to what it was at the
+last call to \fBsavetty\fR.
+
+The \fBgetsyx\fR routine returns the current coordinates of the virtual screen
+cursor in \fIy\fR and \fIx\fR. If \fBleaveok\fR is currently \fBTRUE\fR, then
+\fB-1\fR,\fB-1\fR is returned. If lines have been removed from the top of the
+screen, using \fBripoffline\fR, \fIy\fR and \fIx\fR include these lines;
+therefore, \fIy\fR and \fIx\fR should be used only as arguments for
+\fBsetsyx\fR.
+
+The \fBsetsyx\fR routine sets the virtual screen cursor to
+\fIy\fR, \fIx\fR. If \fIy\fR and \fIx\fR are both \fB-1\fR, then
+\fBleaveok\fR is set. The two routines \fBgetsyx\fR and \fBsetsyx\fR
+are designed to be used by a library routine, which manipulates
+\fBcurses\fR windows but does not want to change the current position
+of the program's cursor. The library routine would call \fBgetsyx\fR
+at the beginning, do its manipulation of its own windows, do a
+\fBwnoutrefresh\fR on its windows, call \fBsetsyx\fR, and then call
+\fBdoupdate\fR.
+
+The \fBripoffline\fR routine provides access to the same facility that
+\fBslk_init\fR [see \fBcurs_slk\fR(3X)] uses to reduce the size of the
+screen. \fBripoffline\fR must be called before \fBinitscr\fR or
+\fBnewterm\fR is called. If \fIline\fR is positive, a line is removed
+from the top of \fBstdscr\fR; if \fIline\fR is negative, a line is
+removed from the bottom. When this is done inside \fBinitscr\fR, the
+routine \fBinit\fR (supplied by the user) is called with two
+arguments: a window pointer to the one-line window that has been
+allocated and an integer with the number of columns in the window.
+Inside this initialization routine, the integer variables \fBLINES\fR
+and \fBCOLS\fR (defined in \fB<curses.h>\fR) are not guaranteed to be
+accurate and \fBwrefresh\fR or \fBdoupdate\fR must not be called. It
+is allowable to call \fBwnoutrefresh\fR during the initialization
+routine.
+
+\fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or
+\fBnewterm\fR.
+
+The \fBcurs_set\fR routine sets the cursor state is set to invisible,
+normal, or very visible for \fBvisibility\fR equal to \fB0\fR,
+\fB1\fR, or \fB2\fR respectively. If the terminal supports the
+\fIvisibility\fR requested, the previous \fIcursor\fR state is
+returned; otherwise, \fBERR\fR is returned.
+
+The \fBnapms\fR routine is used to sleep for \fIms\fR milliseconds.
+.SH RETURN VALUE
+Except for \fBcurs_set\fR, these routines always return \fBOK\fR.
+\fBcurs_set\fR returns the previous cursor state, or \fBERR\fR if the
+requested \fIvisibility\fR is not supported.
+.SH NOTES
+Note that \fBgetsyx\fR is a macro, so \fB&\fR is not necessary before
+the variables \fIy\fR and \fIx\fR.
+
+Older SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently
+incorrect". This implementation gets it right, but it may be unwise to count
+on the correctness of the return value anywhere else.
+
+Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR
+if \fBcurs_set\fR
+has been called to make the cursor other than normal, i.e., either
+invisible or very visible.
+There is no way for ncurses to determine the initial cursor state to
+restore that.
+.SH PORTABILITY
+The functions \fBsetsyx\fR and \fBgetsyx\fR are not described in the XSI
+Curses standard, Issue 4. All other functions are as described in XSI Curses.
+
+The SVr4 documentation describes \fBsetsyx\fR and \fBgetsyx\fR as having return
+type int. This is misleading, as they are macros with no documented semantics
+for the return value.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X),
+\fBcurs_scr_dump\fR(3X), \fBcurs_slk\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_mouse.3x b/Build/source/libs/ncurses/man/curs_mouse.3x
new file mode 100644
index 00000000000..b15507629b9
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_mouse.3x
@@ -0,0 +1,254 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_mouse.3x,v 1.24 2003/12/27 18:47:54 tom Exp $
+.TH curs_mouse 3X ""
+.SH NAME
+\fBgetmouse\fR, \fBungetmouse\fR,
+\fBmousemask\fR, \fBwenclose\fR,
+\fBmouse_trafo\fR, \fBwmouse_trafo\fR,
+\fBmouseinterval\fR - mouse interface through curses
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>
+.PP
+\fBtypedef unsigned long mmask_t;
+.PP
+typedef struct
+{
+ short id; \fI/* ID to distinguish multiple devices */\fB
+ int x, y, z; \fI/* event coordinates */\fB
+ mmask_t bstate; \fI/* button state bits */\fB
+}
+MEVENT;\fR
+.fi
+.br
+\fBint getmouse(MEVENT *event);\fR
+.br
+\fBint ungetmouse(MEVENT *event);\fR
+.br
+\fBmmask_t mousemask(mmask_t newmask, mmask_t *oldmask);\fR
+.br
+\fBbool wenclose(const WINDOW *win, int y, int x);\fR
+.br
+\fBbool mouse_trafo(int* pY, int* pX, bool to_screen);\fR
+.br
+\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX,\fR
+.br
+ \fBbool to_screen);\fR
+.br
+\fBint mouseinterval(int erval);\fR
+.br
+.SH DESCRIPTION
+These functions provide an interface to mouse events from
+\fBncurses\fR(3X).
+Mouse events are represented by \fBKEY_MOUSE\fR
+pseudo-key values in the \fBwgetch\fR input stream.
+.PP
+To make mouse events visible, use the \fBmousemask\fR function.
+This will set
+the mouse events to be reported.
+By default, no mouse events are reported.
+The function will return a mask to indicate which of the specified mouse events
+can be reported; on complete failure it returns 0.
+If oldmask is non-NULL,
+this function fills the indicated location with the previous value of the given
+window's mouse event mask.
+.PP
+As a side effect, setting a zero mousemask may turn off the mouse pointer;
+setting a nonzero mask may turn it on.
+Whether this happens is device-dependent.
+.PP
+Here are the mouse event type masks:
+.PP
+.TS
+l l
+_ _
+l l.
+\fIName\fR \fIDescription\fR
+BUTTON1_PRESSED mouse button 1 down
+BUTTON1_RELEASED mouse button 1 up
+BUTTON1_CLICKED mouse button 1 clicked
+BUTTON1_DOUBLE_CLICKED mouse button 1 double clicked
+BUTTON1_TRIPLE_CLICKED mouse button 1 triple clicked
+BUTTON2_PRESSED mouse button 2 down
+BUTTON2_RELEASED mouse button 2 up
+BUTTON2_CLICKED mouse button 2 clicked
+BUTTON2_DOUBLE_CLICKED mouse button 2 double clicked
+BUTTON2_TRIPLE_CLICKED mouse button 2 triple clicked
+BUTTON3_PRESSED mouse button 3 down
+BUTTON3_RELEASED mouse button 3 up
+BUTTON3_CLICKED mouse button 3 clicked
+BUTTON3_DOUBLE_CLICKED mouse button 3 double clicked
+BUTTON3_TRIPLE_CLICKED mouse button 3 triple clicked
+BUTTON4_PRESSED mouse button 4 down
+BUTTON4_RELEASED mouse button 4 up
+BUTTON4_CLICKED mouse button 4 clicked
+BUTTON4_DOUBLE_CLICKED mouse button 4 double clicked
+BUTTON4_TRIPLE_CLICKED mouse button 4 triple clicked
+BUTTON_SHIFT shift was down during button state change
+BUTTON_CTRL control was down during button state change
+BUTTON_ALT alt was down during button state change
+ALL_MOUSE_EVENTS report all button state changes
+REPORT_MOUSE_POSITION report mouse movement
+.TE
+.PP
+Once a class of mouse events have been made visible in a window,
+calling the \fBwgetch\fR function on that window may return
+\fBKEY_MOUSE\fR as an indicator that a mouse event has been queued.
+To read the event data and pop the event off the queue, call
+\fBgetmouse\fR.
+This function will return \fBOK\fR if a mouse event
+is actually visible in the given window, \fBERR\fR otherwise.
+When \fBgetmouse\fR returns \fBOK\fR, the data deposited as y and
+x in the event structure coordinates will be screen-relative character-cell
+coordinates.
+The returned state mask will have exactly one bit set to
+indicate the event type.
+.PP
+The \fBungetmouse\fR function behaves analogously to \fBungetch\fR.
+It pushes
+a \fBKEY_MOUSE\fR event onto the input queue, and associates with that event
+the given state data and screen-relative character-cell coordinates.
+.PP
+The \fBwenclose\fR function tests whether a given pair of screen-relative
+character-cell coordinates is enclosed by a given window, returning TRUE
+if it is and FALSE otherwise.
+It is useful for determining what subset of
+the screen windows enclose the location of a mouse event.
+.PP
+The \fBwmouse_trafo\fR function transforms a given pair of coordinates from
+stdscr-relative coordinates to screen-relative coordinates or vice versa.
+Please remember, that stdscr-relative coordinates are not always identical
+to screen-relative coordinates due to the mechanism to reserve lines on top
+or bottom of the screen for other purposes (ripoff() call, see also slk_...
+functions).
+If the parameter \fBto_screen\fR is \fBTRUE\fR, the pointers
+\fBpY, pX\fR must reference the coordinates of a location inside the window
+\fBwin\fR.
+They are converted to screen-relative coordinates and returned
+through the pointers.
+If the conversion was successful, the function returns \fBTRUE\fR.
+If one of the parameters was NULL or the location is
+not inside the window, \fBFALSE\fR is returned.
+If \fBto_screen\fR is
+\fBFALSE\fR, the pointers \fBpY, pX\fR must reference screen-relative
+coordinates.
+They are converted to stdscr-relative coordinates if the
+window \fBwin\fR encloses this point.
+In this case the function returns \fBTRUE\fR.
+If one of the parameters is NULL or the point is not inside the
+window, \fBFALSE\fR is returned.
+Please notice, that the referenced coordinates
+are only replaced by the converted coordinates if the transformation was
+successful.
+.PP
+The \fBmouseinterval\fR function sets the maximum time (in thousands of a
+second) that can elapse between press and release events for them to
+be recognized as a click.
+Use \fBmouseinterval(-1)\fR to disable click resolution.
+This function returns the previous interval value.
+The default is one sixth of a second.
+.PP
+Note that mouse events will be ignored when input is in cooked mode, and will
+cause an error beep when cooked mode is being simulated in a window by a
+function such as \fBgetstr\fR that expects a linefeed for input-loop
+termination.
+.SH RETURN VALUE
+\fBgetmouse\fR, \fBungetmouse\fR and \fBmouseinterval\fR
+return the integer \fBERR\fR upon failure or \fBOK\fR
+upon successful completion.
+\fBmousemask\fR returns the
+mask of reportable events.
+\fBwenclose\fR and \fBwmouse_trafo\fR
+are boolean functions returning \fBTRUE\fR or \fBFALSE\fR depending
+on their test result.
+.SH PORTABILITY
+These calls were designed for \fBncurses\fR(3X), and are not found in SVr4
+curses, 4.4BSD curses, or any other previous version of curses.
+.PP
+The feature macro \fBNCURSES_MOUSE_VERSION\fR is provided so the preprocessor
+can be used to test whether these features are present (its value is 1).
+If the interface is changed, the value of \fBNCURSES_MOUSE_VERSION\fR will be
+incremented.
+.PP
+The order of the \fBMEVENT\fR structure members is not guaranteed.
+Additional fields may be added to the structure in the future.
+.PP
+Under \fBncurses\fR(3X), these calls are implemented using either
+xterm's built-in mouse-tracking API or
+platform-specific drivers including
+.RS
+Alessandro Rubini's gpm server.
+.br
+FreeBSD sysmouse
+.br
+OS/2 EMX
+.RE
+If you are using an unsupported configuration,
+mouse events will not be visible to
+\fBncurses\fR(3X) (and the \fBwmousemask\fR function will always
+return \fB0\fR).
+.PP
+If the terminfo entry contains a \fBXM\fR string,
+this is used in the xterm mouse driver to control the
+way the terminal is initialized for mouse operation.
+The default, if \fBXM\fR is not found,
+corresponds to private mode 1000 of xterm:
+.RS
+\\E[?1000%?%p1%{1}%=%th%el%;
+.RE
+The z member in the event structure is not presently used.
+It is intended
+for use with touch screens (which may be pressure-sensitive) or with
+3D-mice/trackballs/power gloves.
+.SH BUGS
+Mouse events under xterm will not in fact be ignored during cooked mode,
+if they have been enabled by \fBwmousemask\fR.
+Instead, the xterm mouse
+report sequence will appear in the string read.
+.PP
+Mouse events under xterm will not be detected correctly in a window with
+its keypad bit off, since they are interpreted as a variety of function key.
+Your terminfo description must have \fBkmous\fR set to "\\E[M" (the beginning
+of the response from xterm for mouse clicks).
+.PP
+Because there are no standard terminal responses that would serve to identify
+terminals which support the xterm mouse protocol, \fBncurses\fR assumes that
+if your $TERM environment variable contains "xterm",
+or \fBkmous\fR is defined in
+the terminal description, then the terminal may send mouse events.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_move.3x b/Build/source/libs/ncurses/man/curs_move.3x
new file mode 100644
index 00000000000..2fff160c2f1
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_move.3x
@@ -0,0 +1,63 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_move.3x,v 1.7 2001/11/03 19:58:47 tom Exp $
+.TH curs_move 3X ""
+.SH NAME
+\fBmove\fR, \fBwmove\fR - move \fBcurses\fR window cursor
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint move(int y, int x);\fR
+.br
+\fBint wmove(WINDOW *win, int y, int x);\fR
+.br
+.SH DESCRIPTION
+These routines move the cursor associated with the window to line \fIy\fR and
+column \fIx\fR. This routine does not move the physical cursor of the terminal
+until \fBrefresh\fR is called. The position specified is relative to the upper
+left-hand corner of the window, which is (0,0).
+.SH RETURN VALUE
+These routines return \fBERR\fR upon failure and OK (SVr4
+specifies only "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+Note that \fBmove\fR may be a macro.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4. The
+standard specifies that if (y,x) is within a multi-column character, the cursor
+is moved to the first column of that character; however, this implementation
+does not yet support the extended-level XSI multibyte characters.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_refresh\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_outopts.3x b/Build/source/libs/ncurses/man/curs_outopts.3x
new file mode 100644
index 00000000000..c5b518c12eb
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_outopts.3x
@@ -0,0 +1,193 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_outopts.3x,v 1.18 2003/05/10 20:33:49 jmc Exp $
+.TH curs_outopts 3X ""
+.SH NAME
+\fBclearok\fR, \fBidlok\fR, \fBidcok\fR, \fBimmedok\fR,
+\fBleaveok\fR, \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBscrollok\fR,
+\fBnl\fR, \fBnonl\fR - \fBcurses\fR output options
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint clearok(WINDOW *win, bool bf);\fR
+.br
+\fBint idlok(WINDOW *win, bool bf);\fR
+.br
+\fBvoid idcok(WINDOW *win, bool bf);\fR
+.br
+\fBvoid immedok(WINDOW *win, bool bf);\fR
+.br
+\fBint leaveok(WINDOW *win, bool bf);\fR
+.br
+\fBint setscrreg(int top, int bot);\fR
+.br
+\fBint wsetscrreg(WINDOW *win, int top, int bot);\fR
+.br
+\fBint scrollok(WINDOW *win, bool bf);\fR
+.br
+\fBint nl(void);\fR
+.br
+\fBint nonl(void);\fR
+.br
+.SH DESCRIPTION
+These routines set options that change the style of output within
+\fBcurses\fR.
+All options are initially \fBFALSE\fR, unless otherwise stated.
+It is not necessary to turn these options off before calling \fBendwin\fR.
+
+If \fBclearok\fR is called with \fBTRUE\fR as argument, the next
+call to \fBwrefresh\fR with this window will clear the screen completely and
+redraw the entire screen from scratch.
+This is useful when the contents of the
+screen are uncertain, or in some cases for a more pleasing visual effect.
+If
+the \fIwin\fR argument to \fBclearok\fR is the global variable \fBcurscr\fR,
+the next call to \fBwrefresh\fR with any window causes the screen to be cleared
+and repainted from scratch.
+
+If \fBidlok\fR is called with \fBTRUE\fR as second argument, \fBcurses\fR
+considers using the hardware insert/delete line feature of terminals so
+equipped.
+Calling \fBidlok\fR with \fBFALSE\fR as second argument disables use
+of line insertion and deletion.
+This option should be enabled only if the
+application needs insert/delete line, for example, for a screen editor.
+It is
+disabled by default because insert/delete line tends to be visually annoying
+when used in applications where it isn't really needed.
+If insert/delete line
+cannot be used, \fBcurses\fR redraws the changed portions of all lines.
+
+If \fBidcok\fR is called with \fBFALSE\fR as second argument, \fBcurses\fR
+no longer considers using the hardware insert/delete character feature of
+terminals so equipped.
+Use of character insert/delete is enabled by default.
+Calling \fBidcok\fR with \fBTRUE\fR as second argument re-enables use
+of character insertion and deletion.
+
+If \fBimmedok\fR is called with \fBTRUE as argument\fR, any change
+in the window image, such as the ones caused by \fBwaddch, wclrtobot, wscrl\fR,
+etc., automatically cause a call to \fBwrefresh\fR.
+However, it may
+degrade performance considerably, due to repeated calls to \fBwrefresh\fR.
+It is disabled by default.
+
+Normally, the hardware cursor is left at the location of the window cursor
+being refreshed.
+The \fBleaveok\fR option allows the cursor to be left
+wherever the update happens to leave it.
+It is useful for applications where
+the cursor is not used, since it reduces the need for cursor motions.
+
+The \fBsetscrreg\fR and \fBwsetscrreg\fR routines allow the application
+programmer to set a software scrolling region in a window.
+\fItop\fR and
+\fIbot\fR are the line numbers of the top and bottom margin of the scrolling
+region.
+(Line 0 is the top line of the window.) If this option and
+\fBscrollok\fR are enabled, an attempt to move off the bottom margin line
+causes all lines in the scrolling region to scroll one line in the direction
+of the first line.
+Only the text of the window is scrolled.
+(Note that this
+has nothing to do with the use of a physical scrolling region capability in the
+terminal, like that in the VT100.
+If \fBidlok\fR is enabled and the terminal
+has either a scrolling region or insert/delete line capability, they will
+probably be used by the output routines.)
+
+The \fBscrollok\fR option controls what happens when the cursor of a window is
+moved off the edge of the window or scrolling region, either as a result of a
+newline action on the bottom line, or typing the last character of the last
+line.
+If disabled, (\fIbf\fR is \fBFALSE\fR), the cursor is left on the bottom
+line.
+If enabled, (\fIbf\fR is \fBTRUE\fR), the window is scrolled up one line
+(Note that to get the physical scrolling effect on the terminal, it is
+also necessary to call \fBidlok\fR).
+
+The \fBnl\fR and \fBnonl\fR routines control whether the underlying display
+device translates the return key into newline on input, and whether it
+translates newline into return and line-feed on output (in either case, the
+call \fBaddch('\\n')\fR does the equivalent of return and line feed on the
+virtual screen).
+Initially, these translations do occur.
+If you disable them
+using \fBnonl\fR, \fBcurses\fR will be able to make better use of the line-feed
+capability, resulting in faster cursor motion.
+Also, \fBcurses\fR will then be
+able to detect the return key.
+.SH RETURN VALUE
+The functions \fBsetscrreg\fR and \fBwsetscrreg\fR return \fBOK\fR upon success
+and \fBERR\fR upon failure.
+All other routines that return an integer always
+return \fBOK\fR.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4.
+
+The XSI Curses standard is ambiguous on the question of whether \fBraw\fR()
+should disable the CRLF translations controlled by \fBnl\fR() and \fBnonl\fR().
+BSD curses did turn off these translations; AT&T curses (at least as late as
+SVr1) did not.
+We choose to do so, on the theory that a programmer requesting
+raw input wants a clean (ideally 8-bit clean) connection that the operating
+system does not mess with.
+
+Some historic curses implementations had, as an undocumented feature, the
+ability to do the equivalent of \fBclearok(..., 1)\fR by saying
+\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR.
+This will not work under
+ncurses.
+
+Earlier System V curses implementations specified that with \fBscrollok\fR
+enabled, any window modification triggering a scroll also forced a physical
+refresh.
+XSI Curses does not require this, and \fBncurses\fR avoids doing
+it to perform better vertical-motion optimization at \fBwrefresh\fR
+time.
+
+The XSI Curses standard does not mention that the cursor should be
+made invisible as a side-effect of \fBleaveok\fR.
+SVr4 curses documentation does this, but the code does not.
+Use \fBcurs_set\fR to make the cursor invisible.
+.SH NOTES
+Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR,
+\fBnonl\fR and \fBsetscrreg\fR may be macros.
+
+The \fBimmedok\fR routine is useful for windows that are used as terminal
+emulators.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_addch\fR(3X), \fBcurs_clear\fR(3X),
+\fBcurs_initscr\fR(3X), \fBcurs_scroll\fR(3X), \fBcurs_refresh\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_overlay.3x b/Build/source/libs/ncurses/man/curs_overlay.3x
new file mode 100644
index 00000000000..3d817d41c67
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_overlay.3x
@@ -0,0 +1,76 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_overlay.3x,v 1.11 2002/07/20 14:53:00 tom Exp $
+.TH curs_overlay 3X ""
+.SH NAME
+\fBoverlay\fR,
+\fBoverwrite\fR,
+\fBcopywin\fR - overlay and manipulate overlapped \fBcurses\fR windows
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint overlay(const WINDOW *srcwin, WINDOW *dstwin);\fR
+.br
+\fBint overwrite(const WINDOW *srcwin, WINDOW *dstwin);\fR
+.br
+\fBint copywin(const WINDOW *srcwin, WINDOW *dstwin, int sminrow,\fR
+ \fBint smincol, int dminrow, int dmincol, int dmaxrow,\fR
+ \fBint dmaxcol, int overlay);\fR
+.SH DESCRIPTION
+The \fBoverlay\fR and \fBoverwrite\fR routines overlay \fIsrcwin\fR on
+top of \fIdstwin\fR. \fIscrwin\fR and \fIdstwin\fR are not required
+to be the same size; only text where the two windows overlap is
+copied. The difference is that \fBoverlay\fR is non-destructive
+(blanks are not copied) whereas \fBoverwrite\fR is destructive.
+
+The \fBcopywin\fR routine provides a finer granularity of control over the
+\fBoverlay\fR and \fBoverwrite\fR routines. Like in the \fBprefresh\fR
+routine, a rectangle is specified in the destination window, (\fIdminrow\fR,
+\fIdmincol\fR) and (\fIdmaxrow\fR, \fIdmaxcol\fR), and the upper-left-corner
+coordinates of the source window, (\fIsminrow\fR, \fIsmincol\fR). If the
+argument \fIoverlay\fR is \fBtrue\fR, then copying is non-destructive, as in
+\fBoverlay\fR.
+.SH RETURN VALUE
+Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+Note that \fBoverlay\fR and \fBoverwrite\fR may be macros.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions (adding the const
+qualifiers). It further specifies their behavior in the presence of characters
+with multibyte renditions (not yet supported in this implementation).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_pad\fR(3X), \fBcurs_refresh\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_pad.3x b/Build/source/libs/ncurses/man/curs_pad.3x
new file mode 100644
index 00000000000..4db08dcf440
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_pad.3x
@@ -0,0 +1,133 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_pad.3x,v 1.12 2004/01/04 01:36:49 tom Exp $
+.TH curs_pad 3X ""
+.SH NAME
+\fBnewpad\fR, \fBsubpad\fR, \fBprefresh\fR,
+\fBpnoutrefresh\fR,
+\fBpechochar\fR, \fBpecho_wchar\fR - create and display \fBcurses\fR pads
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.sp
+\fBWINDOW *newpad(int nlines, int ncols);\fR
+.br
+\fBWINDOW *subpad(WINDOW *orig, int nlines, int ncols,\fR
+ \fBint begin_y, int begin_x);\fR
+.br
+\fBint prefresh(WINDOW *pad, int pminrow, int pmincol,\fR
+ \fBint sminrow, int smincol, int smaxrow, int smaxcol);\fR
+.br
+\fBint pnoutrefresh(WINDOW *pad, int pminrow, int pmincol,\fR
+ \fBint sminrow, int smincol, int smaxrow, int smaxcol);\fR
+.br
+\fBint pechochar(WINDOW *pad, chtype ch);\fR
+.br
+\fBint pecho_wchar(WINDOW *pad, const cchar_t *wch);\fR
+.SH DESCRIPTION
+The \fBnewpad\fR routine creates and returns a pointer to a new pad data
+structure with the given number of lines, \fInlines\fR, and columns,
+\fIncols\fR.
+A pad is like a window, except that it is not restricted by the
+screen size, and is not necessarily associated with a particular part of the
+screen.
+Pads can be used when a large window is needed, and only a part of the
+window will be on the screen at one time.
+Automatic refreshes of pads
+(e.g., from scrolling or echoing of input) do not occur.
+It is not
+legal to call \fBwrefresh\fR with a \fIpad\fR as an argument; the routines
+\fBprefresh\fR or \fBpnoutrefresh\fR should be called instead.
+Note that these
+routines require additional parameters to specify the part of the pad to be
+displayed and the location on the screen to be used for the display.
+.PP
+The \fBsubpad\fR routine creates and returns a pointer to a subwindow within a
+pad with the given number of lines, \fInlines\fR, and columns, \fIncols\fR.
+Unlike \fBsubwin\fR, which uses screen coordinates, the window is at position
+(\fIbegin\fR_\fIx\fR\fB,\fR \fIbegin\fR_\fIy\fR) on the pad.
+The window is
+made in the middle of the window \fIorig\fR, so that changes made to one window
+affect both windows.
+During the use of this routine, it will often be
+necessary to call \fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before
+calling \fBprefresh\fR.
+.PP
+The \fBprefresh\fR and \fBpnoutrefresh\fR routines are analogous to
+\fBwrefresh\fR and \fBwnoutrefresh\fR except that they relate to pads instead
+of windows.
+The additional parameters are needed to indicate what part of the
+pad and screen are involved.
+\fIpminrow\fR and \fIpmincol\fR specify the upper
+left-hand corner of the rectangle to be displayed in the pad.
+\fIsminrow\fR,
+\fIsmincol\fR, \fIsmaxrow\fR, and \fIsmaxcol\fR specify the edges of the
+rectangle to be displayed on the screen.
+The lower right-hand corner of the
+rectangle to be displayed in the pad is calculated from the screen coordinates,
+since the rectangles must be the same size.
+Both rectangles must be entirely
+contained within their respective structures.
+Negative values of
+\fIpminrow\fR, \fIpmincol\fR, \fIsminrow\fR, or \fIsmincol\fR are treated as if
+they were zero.
+.PP
+The \fBpechochar\fR routine is functionally equivalent to a call to \fBaddch\fR
+followed by a call to \fBrefresh\fR, a call to \fBwaddch\fR followed by a call
+to \fBwrefresh\fR, or a call to \fBwaddch\fR followed by a call to
+\fBprefresh\fR.
+The knowledge that only a single character is being output is
+taken into consideration and, for non-control characters, a considerable
+performance gain might be seen by using these routines instead of their
+equivalents.
+In the case of \fBpechochar\fR, the last location of the pad on
+the screen is reused for the arguments to \fBprefresh\fR.
+.PP
+The \fBpecho_wchar\fR function is the analogous wide-character
+form of \fBpechochar\fR.
+It outputs one character to a pad and immediately refreshes the pad.
+It does this by a call to \fBwadd_wch\fR followed by a call to \fBprefresh\fR.
+.SH RETURN VALUE
+Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion.
+.PP
+Routines that return pointers return \fBNULL\fR on error, and set \fBerrno\fR
+to \fBENOMEM\fR.
+.SH NOTES
+Note that \fBpechochar\fR may be a macro.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_refresh\fR(3X), \fBcurs_touch\fR(3X), \fBcurs_addch\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_print.3x b/Build/source/libs/ncurses/man/curs_print.3x
new file mode 100644
index 00000000000..3077d34769e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_print.3x
@@ -0,0 +1,74 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_print.3x,v 1.6 2003/05/10 20:33:49 jmc Exp $
+.TH curs_print 3X ""
+.SH NAME
+\fBmcprint\fR - ship binary data to printer
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint mcprint(char *data, int len);\fR
+.SH DESCRIPTION
+This function uses the \fBmc5p\fR or \fBmc4\fR and \fBmc5\fR capabilities,
+if they are present, to ship given data to a printer attached to the terminal.
+
+Note that the \fBmcprint\fR code has no way to do flow control with the printer
+or to know how much buffering it has. Your application is responsible for
+keeping the rate of writes to the printer below its continuous throughput rate
+(typically about half of its nominal cps rating). Dot-matrix printers and
+6-page-per-minute lasers can typically handle 80cps, so a good conservative
+rule of thumb is to sleep for a second after shipping each 80-character line.
+
+.SH RETURN VALUE
+The \fBmcprint\fR function returns \fBERR\fR if the write operation aborted
+for some reason. In this case, errno will contain either an error associated
+with \fBwrite(2)\fR or one of the following:
+.TP 5
+ENODEV
+Capabilities for printer redirection don't exist.
+.TP 5
+ENOMEM
+Couldn't allocate sufficient memory to buffer the printer write.
+
+When \fBmcprint\fR succeeds, it returns the number of characters actually
+sent to the printer.
+.SH PORTABILITY
+The \fBmcprint\fR call was designed for \fBncurses\fR(3X), and is not found
+in SVr4 curses, 4.4BSD curses, or any other previous version of curses.
+.SH BUGS
+Padding in the \fBmc5p\fR, \fBmc4\fR and \fBmc5\fR capabilities will not be
+interpreted.
+.SH SEE ALSO
+\fBcurses\fR(3X)\fR
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_printw.3x b/Build/source/libs/ncurses/man/curs_printw.3x
new file mode 100644
index 00000000000..f16e2fe05e4
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_printw.3x
@@ -0,0 +1,84 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_printw.3x,v 1.13 2002/11/16 22:28:57 tom Exp $
+.TH curs_printw 3X ""
+.SH NAME
+\fBprintw\fR,
+\fBwprintw\fR,
+\fBmvprintw\fR,
+\fBmvwprintw\fR,
+\fBvwprintw\fR, \fBvw_printw\fR - print formatted output in \fBcurses\fR windows
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint printw(const char *fmt, ...);\fR
+.br
+\fBint wprintw(WINDOW *win, const char *fmt, ...);\fR
+.br
+\fBint mvprintw(int y, int x, const char *fmt, ...);\fR
+.br
+\fBint mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);\fR
+.br
+\fBint vwprintw(WINDOW *win, const char *fmt, va_list varglist);\fR
+.br
+\fBint vw_printw(WINDOW *win, const char *fmt, va_list varglist);\fR
+.br
+.SH DESCRIPTION
+The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR
+routines are analogous to \fBprintf\fR [see \fBprintf\fR(3S)]. In
+effect, the string that would be output by \fBprintf\fR is output
+instead as though \fBwaddstr\fR were used on the given window.
+
+The \fBvwprintw\fR and \fBwv_printw\fR routines are analogous
+to \fBvprintf\fR [see \fBprintf\fR(3S)]
+and perform a \fBwprintw\fR using a variable argument list.
+The third argument is a \fBva_list\fR, a pointer to a
+list of arguments, as defined in \fB<stdarg.h>\fR.
+.SH RETURN VALUE
+Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions. The function
+\fBvwprintw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function
+\fBvw_printw\fR using the \fB<stdarg.h>\fR interface.
+The Single Unix Specification, Version 2 states that
+\fBvw_printw\fR is preferred to \fBvwprintw\fR since the latter requires
+including \fB<varargs.h>\fR, which
+cannot be used in the same file as \fB<stdarg.h>\fR.
+This implementation uses \fB<stdarg.h>\fR for both, because that header
+is included in \fB<curses.h\fR>.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBprintf\fR(3S), \fBvprintf(3S)\fR
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_refresh.3x b/Build/source/libs/ncurses/man/curs_refresh.3x
new file mode 100644
index 00000000000..210b326a618
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_refresh.3x
@@ -0,0 +1,126 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_refresh.3x,v 1.10 2001/11/03 18:57:12 tom Exp $
+.TH curs_refresh 3X ""
+.SH NAME
+\fBdoupdate\fR,
+\fBredrawwin\fR,
+\fBrefresh\fR,
+\fBwnoutrefresh\fR,
+\fBwredrawln\fR,
+\fBwrefresh\fR - refresh \fBcurses\fR windows and lines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint refresh(void);\fR
+.br
+\fBint wrefresh(WINDOW *win);\fR
+.br
+\fBint wnoutrefresh(WINDOW *win);\fR
+.br
+\fBint doupdate(void);\fR
+.br
+\fBint redrawwin(WINDOW *win);\fR
+.br
+\fBint wredrawln(WINDOW *win, int beg_line, int num_lines);\fR
+.br
+.SH DESCRIPTION
+The \fBrefresh\fR and \fBwrefresh\fR routines (or \fBwnoutrefresh\fR and
+\fBdoupdate\fR) must be called to get actual output to the terminal, as other
+routines merely manipulate data structures.
+The routine \fBwrefresh\fR copies
+the named window to the physical terminal screen, taking into account what is
+already there to do optimizations.
+The \fBrefresh\fR routine is the
+same, using \fBstdscr\fR as the default window.
+Unless \fBleaveok\fR has been
+enabled, the physical cursor of the terminal is left at the location of the
+cursor for that window.
+
+The \fBwnoutrefresh\fR and \fBdoupdate\fR routines allow multiple updates with
+more efficiency than \fBwrefresh\fR alone.
+In addition to all the window
+structures, \fBcurses\fR keeps two data structures representing the terminal
+screen: a physical screen, describing what is actually on the screen, and a
+virtual screen, describing what the programmer wants to have on the screen.
+
+The routine \fBwrefresh\fR works by first calling \fBwnoutrefresh\fR, which
+copies the named window to the virtual screen, and then calling \fBdoupdate\fR,
+which compares the virtual screen to the physical screen and does the actual
+update.
+If the programmer wishes to output several windows at once, a series
+of calls to \fBwrefresh\fR results in alternating calls to \fBwnoutrefresh\fR
+and \fBdoupdate\fR, causing several bursts of output to the screen.
+By first
+calling \fBwnoutrefresh\fR for each window, it is then possible to call
+\fBdoupdate\fR once, resulting in only one burst of output, with fewer total
+characters transmitted and less CPU time used.
+If the \fIwin\fR argument to
+\fBwrefresh\fR is the global variable \fBcurscr\fR, the screen is immediately
+cleared and repainted from scratch.
+
+The phrase "copies the named window to the virtual screen" above is ambiguous.
+What actually happens is that all \fItouched\fR (changed) lines in the window
+are copied to the virtual screen.
+This affects programs that use overlapping
+windows; it means that if two windows overlap, you can refresh them in either
+order and the overlap region will be modified only when it is explicitly
+changed.
+(But see the section on \fBPORTABILITY\fR below for a warning about
+exploiting this behavior.)
+
+The \fBwredrawln\fR routine indicates to \fBcurses\fR that some screen lines
+are corrupted and should be thrown away before anything is written over them.
+It touches the indicated lines (marking them changed).
+The routine \fBredrawwin\fR() touches the entire window.
+.SH RETURN VALUE
+Routines that return an integer return \fBERR\fR upon failure, and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+Note that \fBrefresh\fR and \fBredrawwin\fR may be macros.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions.
+
+Whether \fBwnoutrefresh()\fR copies to the virtual screen the entire contents
+of a window or just its changed portions has never been well-documented in
+historic curses versions (including SVr4).
+It might be unwise to rely on
+either behavior in programs that might have to be linked with other curses
+implementations.
+Instead, you can do an explicit \fBtouchwin()\fR before the
+\fBwnoutrefresh()\fR call to guarantee an entire-contents copy anywhere.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_outopts\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_scanw.3x b/Build/source/libs/ncurses/man/curs_scanw.3x
new file mode 100644
index 00000000000..8b67801f7dd
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_scanw.3x
@@ -0,0 +1,97 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_scanw.3x,v 1.12 2002/07/20 15:48:09 tom Exp $
+.TH curs_scanw 3X ""
+.SH NAME
+\fBscanw\fR,
+\fBwscanw\fR,
+\fBmvscanw\fR,
+\fBmvwscanw\fR,
+\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint scanw(char *fmt, ...);\fR
+.br
+\fBint wscanw(WINDOW *win, char *fmt, ...);\fR
+.br
+\fBint mvscanw(int y, int x, char *fmt, ...);\fR
+.br
+\fBint mvwscanw(WINDOW *win, int y, int x, char *fmt, ...);\fR
+.br
+\fBint vw_scanw(WINDOW *win, char *fmt, va_list varglist);\fR
+.br
+\fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR
+.SH DESCRIPTION
+The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to
+\fBscanf\fR [see \fBscanf\fR(3S)]. The effect of these routines is as though
+\fBwgetstr\fR were called on the window, and the resulting line used as input
+for \fBsscanf\fR(3). Fields which do not map to a variable in the \fIfmt\fR
+field are lost.
+
+The \fBvwscanw\fR and \fBvw_scanw\fR routines are analogous to \fBvscanf\fR.
+They perform a \fBwscanw\fR using a variable argument list.
+The third argument is a \fIva_list\fR,
+a pointer to a list of arguments, as defined in \fB<stdarg.h>\fR.
+.SH RETURN VALUE
+\fBvwscanw\fR returns \fBERR\fR on failure and an integer equal to the
+number of fields scanned on success.
+
+Applications may use the return value from the \fBscanw\fR, \fBwscanw\fR,
+\fBmvscanw\fR and \fBmvwscanw\fR routines to determine the number of fields
+which were mapped in the call.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions. The function
+\fBvwscanw\fR is marked TO BE WITHDRAWN, and is to be replaced by a function
+\fBvw_scanw\fR using the \fB<stdarg.h>\fR interface.
+The Single Unix Specification, Version 2 states that
+\fBvw_scanw\fR is preferred to \fBvwscanw\fR since the latter requires
+including \fB<varargs.h>\fR, which
+cannot be used in the same file as \fB<stdarg.h>\fR.
+This implementation uses \fB<stdarg.h>\fR for both, because that header
+is included in \fB<curses.h\fR>.
+.LP
+Both XSI and The Single Unix Specification, Version 2 state that these
+functions return ERR or OK.
+Since the underlying \fBscanf\fR can return the number of items scanned,
+and the SVr4 code was documented to use this feature,
+this is probably an editing error which was introduced in XSI,
+rather than being done intentionally.
+Portable applications should only test if the return value is ERR,
+since the OK value (zero) is likely to be misleading.
+One possible way to get useful results would be to use a "%n" conversion
+at the end of the format string to ensure that something was processed.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_getstr\fR(3X), \fBcurs_printw\fR(3X), \fBscanf\fR(3S)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_scr_dump.3x b/Build/source/libs/ncurses/man/curs_scr_dump.3x
new file mode 100644
index 00000000000..a925ea56d94
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_scr_dump.3x
@@ -0,0 +1,94 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_scr_dump.3x,v 1.3 2003/10/25 20:34:06 tom Exp $
+.TH curs_scr_dump 3X ""
+.SH NAME
+\fBscr_dump\fR,
+\fBscr_restore\fR,
+\fBscr_init\fR,
+\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint scr_dump(const char *filename);\fR
+.br
+\fBint scr_restore(const char *filename);\fR
+.br
+\fBint scr_init(const char *filename);\fR
+.br
+\fBint scr_set(const char *filename);\fR
+.br
+.SH DESCRIPTION
+The \fBscr_dump\fR routine dumps the current contents of the virtual screen
+to the file \fIfilename\fR.
+
+The \fBscr_restore\fR routine sets the virtual screen to the contents
+of \fIfilename\fR, which must have been written using \fBscr_dump\fR. The next
+call to \fBdoupdate\fR restores the screen to the way it looked in the dump
+file.
+
+The \fBscr_init\fR routine reads in the contents of \fIfilename\fR and uses
+them to initialize the \fBcurses\fR data structures about what the terminal
+currently has on its screen. If the data is determined to be valid,
+\fBcurses\fR bases its next update of the screen on this information rather
+than clearing the screen and starting from scratch. \fBscr_init\fR is used
+after \fBinitscr\fR or a \fBsystem\fR call to share
+the screen with another process which has done a \fBscr_dump\fR after its
+\fBendwin\fR call. The data is declared invalid if the terminfo capabilities
+\fBrmcup\fR and \fBnrrmc\fR exist; also if the terminal has been written to
+since the preceding \fBscr_dump\fR call.
+
+The \fBscr_set\fR routine is a combination of \fBscr_restore\fR and
+\fBscr_init\fR. It tells the program that the information in \fIfilename\fR is
+what is currently on the screen, and also what the program wants on the screen.
+This can be thought of as a screen inheritance function.
+
+To read (write) a window from (to) a file, use the \fBgetwin\fR and
+\fBputwin\fR routines [see \fBcurs_util\fR(3X)].
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and \fBOK\fR
+upon success.
+.SH NOTES
+Note that \fBscr_init\fR, \fBscr_set\fR, and \fBscr_restore\fR may be macros.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4, describes these functions (adding the const
+qualifiers).
+
+The SVr4 docs merely say under \fBscr_init\fR that the dump data is also
+considered invalid "if the time-stamp of the tty is old" but don't define
+"old".
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_refresh\fR(3X),
+\fBcurs_util\fR(3X), \fBsystem\fR(3S)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_scroll.3x b/Build/source/libs/ncurses/man/curs_scroll.3x
new file mode 100644
index 00000000000..4e694c33b1f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_scroll.3x
@@ -0,0 +1,84 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_scroll.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $
+.TH curs_scroll 3X ""
+.SH NAME
+\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint scroll(WINDOW *win);\fR
+.br
+\fBint scrl(int n);\fR
+.br
+\fBint wscrl(WINDOW *win, int n);\fR
+.br
+.SH DESCRIPTION
+The \fBscroll\fR routine scrolls the window up one line.
+This involves moving
+the lines in the window data structure.
+As an optimization, if the scrolling
+region of the window is the entire screen, the physical screen may be scrolled
+at the same time.
+
+For positive \fIn\fR, the \fBscrl\fR and \fBwscrl\fR routines scroll the
+window up \fIn\fR lines (line \fIi\fR+\fIn\fR becomes \fIi\fR); otherwise
+scroll the window down \fIn\fR lines.
+This involves moving the lines in the
+window character image structure.
+The current cursor position is not changed.
+
+For these functions to work, scrolling must be enabled via \fBscrollok\fR.
+.SH RETURN VALUE
+These routines return \fBERR\fR upon failure, and \fBOK\fR (SVr4 only specifies
+"an integer value other than \fBERR\fR") upon successful completion.
+.SH NOTES
+Note that \fBscrl\fR and \fBscroll\fR may be macros.
+
+The SVr4 documentation says that the optimization of physically scrolling
+immediately if the scroll region is the entire screen "is" performed, not
+"may be" performed.
+This implementation deliberately does not guarantee
+that this will occur, to leave open the possibility of smarter
+optimization of multiple scroll actions on the next update.
+
+Neither the SVr4 nor the XSI documentation specify whether the current
+attribute or
+current color-pair of blanks generated by the scroll function is zeroed.
+Under this implementation it is.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_outopts\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_slk.3x b/Build/source/libs/ncurses/man/curs_slk.3x
new file mode 100644
index 00000000000..1271f859696
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_slk.3x
@@ -0,0 +1,149 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_slk.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $
+.TH curs_slk 3X ""
+.SH NAME
+\fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR,
+\fBslk_noutrefresh\fR, \fBslk_label\fR,
+\fBslk_clear\fR, \fBslk_restore\fR, \fBslk_touch\fR,
+\fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR,
+\fBslk_attr_on\fR, \fBslk_attr_set\fR, \fBslk_attr_off\fR,
+\fBslk_attr\fR, \fBslk_color\fR - \fBcurses\fR soft label routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint slk_init(int fmt);\fR
+.br
+\fBint slk_set(int labnum, const char *label, int fmt);\fR
+.br
+\fBint slk_refresh(void);\fR
+.br
+\fBint slk_noutrefresh(void);\fR
+.br
+\fBchar *slk_label(int labnum);\fR
+.br
+\fBint slk_clear(void);\fR
+.br
+\fBint slk_restore(void);\fR
+.br
+\fBint slk_touch(void);\fR
+.br
+\fBint slk_attron(const chtype attrs);\fR
+.br
+\fBint slk_attroff(const chtype attrs);\fR
+.br
+\fBint slk_attrset(const chtype attrs);\fR
+.br
+\fBint slk_attr_on(attr_t attrs, void* opts);\fR
+.br
+\fBint slk_attr_off(const attr_t attrs, void * opts);\fR
+.br
+\fBint slk_attr_set(const attr_t attrs,\fR
+.br
+ \fBshort color_pair_number, void* opts);\fR
+.br
+\fBattr_t slk_attr(void);\fR
+.br
+\fBint slk_color(short color_pair_number);\fR
+.br
+.SH DESCRIPTION
+The slk* functions manipulate the set of soft function-key labels that exist on
+many terminals. For those terminals that do not have soft labels,
+\fBcurses\fR takes over the bottom line of \fBstdscr\fR, reducing the size of
+\fBstdscr\fR and the variable \fBLINES\fR. \fBcurses\fR standardizes on eight
+labels of up to eight characters each. In addition to this, the ncurses
+implementation supports a mode where it simulates 12 labels of up to five
+characters each. This is most common for todays PC like enduser devices.
+Please note that ncurses simulates this mode by taking over up to two lines at
+the bottom of the screen, it doesn't try to use any hardware support for this
+mode.
+
+The \fBslk_init\fR routine must be called before \fBinitscr\fR or \fBnewterm\fR
+is called. If \fBinitscr\fR eventually uses a line from \fBstdscr\fR to
+emulate the soft labels, then \fIfmt\fR determines how the labels are arranged
+on the screen. Setting \fIfmt\fR to \fB0\fR indicates a 3-2-3 arrangement of
+the labels, \fB1\fR indicates a 4-4 arrangement and \fB2\fR indicates the
+PC like 4-4-4 mode. If \fBfmt\fR is set to \fB3\fR, it is again the PC like
+4-4-4 mode, but in addition an index line is generated, helping the user to
+identify the key numbers easily.
+
+The \fBslk_set\fR routine requires \fIlabnum\fR to be a label number,
+from \fB1\fR to \fB8\fR (resp. \fB12\fR); \fIlabel\fR must be the string
+to be put on the label, up to eight (resp. five) characters in length.
+A null string or a null pointer sets up a blank label. \fIfmt\fR is either
+\fB0\fR, \fB1\fR, or \fB2\fR, indicating whether the label is to be
+left-justified, centered, or right-justified, respectively, within the
+label.
+
+The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to
+the \fBwrefresh\fR and \fBwnoutrefresh\fR routines.
+
+The \fBslk_label\fR routine returns the current label for label number
+\fIlabnum\fR, with leading and trailing blanks stripped.
+
+The \fBslk_clear\fR routine clears the soft labels from the screen.
+
+The \fBslk_restore\fR routine restores the soft labels to the screen
+after a \fBslk_clear\fR has been performed.
+
+The \fBslk_touch\fR routine forces all the soft labels to be output
+the next time a \fBslk_noutrefresh\fR is performed.
+
+The \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR and \fBslk_attr\fR
+routines correspond to \fBattron\fR, \fBattrset\fR, \fBattroff\fR and \fBattr_get\fR.
+They have an effect only if soft labels are simulated on the bottom line of
+the screen. The default highlight for soft keys is A_STANDOUT (as in
+System V curses, which does not document this fact).
+
+The \fBslk_color\fR routine corresponds to \fBcolor_set\fR. It has an effect only
+if soft labels are simulated on the bottom line of the screen.
+
+.SH RETURN VALUE
+These routines return \fBERR\fR upon failure and OK (SVr4 specifies only "an
+integer value other than \fBERR\fR") upon successful completion. \fBslk_attr\fR
+returns the attribute used for the soft keys.
+
+\fBslk_label\fR returns \fBNULL\fR on error.
+.SH NOTES
+Most applications would use \fBslk_noutrefresh\fR because a
+\fBwrefresh\fR is likely to follow soon.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4, describes these functions. It changes the
+argument type of the attribute-manipulation functions \fBslk_attron\fR,
+\fBslk_attroff\fR, \fBslk_attrset\fR to be \fBattr_t\fR, and adds \fBconst\fR
+qualifiers. The format codes \fB2\fR and \fB3\fR for \fBslk_init()\fR and the
+function \fBslk_attr\fR are specific to ncurses.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_attr\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_refresh\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_termattrs.3x b/Build/source/libs/ncurses/man/curs_termattrs.3x
new file mode 100644
index 00000000000..48ff21ced68
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_termattrs.3x
@@ -0,0 +1,134 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_termattrs.3x,v 1.9 2003/12/27 18:37:47 tom Exp $
+.TH curs_termattrs 3X ""
+.SH NAME
+\fBbaudrate\fR,
+\fBerasechar\fR,
+\fBerasewchar\fR,
+\fBhas_ic\fR,
+\fBhas_il\fR,
+\fBkillchar\fR,
+\fBkillwchar\fR,
+\fBlongname\fR,
+\fBterm_attrs\fR,
+\fBtermattrs\fR,
+\fBtermname\fR - \fBcurses\fR environment query routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.PP
+\fBint baudrate(void);\fR
+.br
+\fBchar erasechar(void);\fR
+.br
+\fBint erasewchar(wchar_t *\fR\fIch\fR\fB);\fR
+.br
+\fBbool has_ic(void);\fR
+.br
+\fBbool has_il(void);\fR
+.br
+\fBchar killchar(void);\fR
+.br
+\fBint killwchar(wchar_t *\fR\fIch\fR\fB);\fR
+.br
+\fBchar *longname(void);\fR
+.br
+\fBattr_t term_attrs(void);\fR
+.br
+\fBchtype termattrs(void);\fR
+.br
+\fBchar *termname(void);\fR
+.br
+.SH DESCRIPTION
+The \fBbaudrate\fR routine returns the output speed of the terminal. The
+number returned is in bits per second, for example \fB9600\fR, and is an
+integer.
+.PP
+The \fBerasechar\fR routine returns the user's current erase character.
+.PP
+The \fBerasewchar\fR routine stores the current erase character
+in the location referenced by \fIch\fR.
+If no erase character has been defined, the routine fails
+and the location referenced by \fIch\fR is not changed.
+.PP
+The \fBhas_ic\fR routine is true if the terminal has insert- and delete-
+character capabilities.
+.PP
+The \fBhas_il\fR routine is true if the terminal has insert- and delete-line
+capabilities, or can simulate them using scrolling regions. This might
+be used to determine if it would be appropriate to turn on physical
+scrolling using \fBscrollok\fR.
+.PP
+The \fBkillchar\fR routine returns the user's current line kill character.
+.PP
+The \fBkillwchar\fR routine stores the current line-kill character
+in the location referenced by \fIch\fR.
+If no line-kill character has been defined,
+the routine fails and the location referenced by \fIch\fR is not changed.
+.PP
+The \fBlongname\fR routine returns a pointer to a static area
+containing a verbose description of the current terminal. The maximum
+length of a verbose description is 128 characters. It is defined only
+after the call to \fBinitscr\fR or \fBnewterm\fR. The area is
+overwritten by each call to \fBnewterm\fR and is not restored by
+\fBset_term\fR, so the value should be saved between calls to
+\fBnewterm\fR if \fBlongname\fR is going to be used with multiple
+terminals.
+.PP
+If a given terminal doesn't support a video attribute that an
+application program is trying to use, \fBcurses\fR may substitute a
+different video attribute for it.
+The \fBtermattrs\fR and \fBterm_attrs\fR functions
+return a logical \fBOR\fR of all video attributes supported by the
+terminal using \fIA_\fR and \fIWA_\fR constants respectively.
+This information is useful when a \fBcurses\fR program
+needs complete control over the appearance of the screen.
+.PP
+The \fBtermname\fR routine returns the terminal name used by \fBsetupterm\fR.
+.SH RETURN VALUE
+\fBlongname\fR and \fBtermname\fR return \fBNULL\fR on error.
+.PP
+Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion.
+.SH NOTES
+Note that \fBtermattrs\fR may be a macro.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions. It changes the
+return type of \fBtermattrs\fR to the new type \fBattr_t\fR.
+Most versions of curses truncate the result returned by \fBtermname\fR to
+14 characters.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_outopts\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_termcap.3x b/Build/source/libs/ncurses/man/curs_termcap.3x
new file mode 100644
index 00000000000..c5c5517e610
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_termcap.3x
@@ -0,0 +1,164 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_termcap.3x,v 1.18 2003/02/08 22:25:47 tom Exp $
+.TH curs_termcap 3X ""
+.ds n 5
+.SH NAME
+\fBtgetent\fR,
+\fBtgetflag\fR,
+\fBtgetnum\fR,
+\fBtgetstr\fR,
+\fBtgoto\fR,
+\fBtputs\fR - direct \fBcurses\fR interface to the terminfo capability database
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+\fB#include <term.h>\fR
+.br
+\fBextern char PC;\fR
+\fBextern char * UP;\fR
+\fBextern char * BC;\fR
+\fBextern @NCURSES_OSPEED@ ospeed;\fR
+.br
+\fBint tgetent(char *bp, const char *name);\fR
+.br
+\fBint tgetflag(char *id);\fR
+.br
+\fBint tgetnum(char *id);\fR
+.br
+\fBchar *tgetstr(char *id, char **area);\fR
+.br
+\fBchar *tgoto(const char *cap, int col, int row);\fR
+.br
+\fBint tputs(const char *str, int affcnt, int (*putc)(int));\fR
+.br
+.SH DESCRIPTION
+These routines are included as a conversion aid for programs that use
+the \fItermcap\fR library. Their parameters are the same and the
+routines are emulated using the \fIterminfo\fR database. Thus, they
+can only be used to query the capabilities of entries for which a
+terminfo entry has been compiled.
+
+The \fBtgetent\fR routine loads the entry for \fIname\fR.
+It returns 1 on success, 0 if there is no such entry, and -1 if the
+terminfo database could not be found.
+The emulation ignores the buffer pointer \fIbp\fR.
+
+The \fBtgetflag\fR routine gets the boolean entry for \fIid\fR,
+or zero if it is not available.
+
+The \fBtgetnum\fR routine gets the numeric entry for \fIid\fR,
+or -1 if it is not available.
+
+The \fBtgetstr\fR routine returns the string entry for \fIid\fR,
+or zero if it is not available.
+Use \fBtputs\fR to output the returned string.
+The return value will also be copied to the buffer pointed to by \fIarea\fR,
+and the \fIarea\fR value will be updated to point past the null ending
+this value.
+
+Only the first two characters of the \fBid\fR parameter of
+\fBtgetflag\fR,
+\fBtgetnum\fR and
+\fBtgetstr\fR are compared in lookups.
+
+The \fBtgoto\fR routine instantiates the parameters into the given capability.
+The output from this routine is to be passed to \fBtputs\fR.
+
+The \fBtputs\fR routine is described on the \fBcurs_terminfo\fR(3X) manual
+page. It can retrieve capabilities by either termcap or terminfo name.
+
+The variables
+\fBPC\fR,
+\fBUP\fR and
+\fBBC\fR
+are set by \fBtgetent\fR to the terminfo entry's data for
+\fBpad_char\fR,
+\fBcursor_up\fR and
+\fBbackspace_if_not_bs\fR,
+respectively.
+\fBUP\fR is not used by ncurses.
+\fBPC\fR is used in the \fBtdelay_output\fR function.
+\fBBC\fR is used in the \fBtgoto\fR emulation.
+The variable \fBospeed\fR is set by ncurses in a system-specific coding
+to reflect the terminal speed.
+
+.SH RETURN VALUE
+Except where explicitly noted,
+routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion.
+
+Routines that return pointers return \fBNULL\fR on error.
+.SH BUGS
+If you call \fBtgetstr\fR to fetch \fBca\fR or any other parameterized string,
+be aware that it will be returned in terminfo notation, not the older and
+not-quite-compatible termcap notation. This won't cause problems if all
+you do with it is call \fBtgoto\fR or \fBtparm\fR, which both expand
+terminfo-style strings as terminfo.
+(The \fBtgoto\fR function, if configured to support termcap, will check
+if the string is indeed terminfo-style by looking for "%p" parameters or
+"$<..>" delays, and invoke a termcap-style parser if the string does not
+appear to be terminfo).
+
+Because terminfo conventions for representing padding in string capabilities
+differ from termcap's, \fBtputs("50");\fR will put out a literal "50" rather
+than busy-waiting for 50 milliseconds. Cope with it.
+
+Note that termcap has nothing analogous to terminfo's \fBsgr\fR string.
+One consequence of this is that termcap applications assume \fRme\fR
+(terminfo \fBsgr0\fR) does not reset the alternate character set.
+This implementation checks for, and modifies the data shown to the
+termcap interface to accommodate termcap's limitation in this respect.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions. However, they
+are marked TO BE WITHDRAWN and may be removed in future versions.
+
+Neither the XSI Curses standard nor the SVr4 man pages documented the return
+values of \fBtgetent\fR correctly, though all three were in fact returned ever
+since SVr1.
+In particular, an omission in the XSI Curses documentation has been
+misinterpreted to mean that \fBtgetent\fR returns \fBOK\fR or \fBERR\fR.
+Because the purpose of these functions is to provide compatibility with
+the \fItermcap\fR library, that is a defect in XCurses, Issue 4, Version 2
+rather than in ncurses.
+
+External variables are provided for support of certain termcap applications.
+However, termcap applications' use of those variables is poorly documented,
+e.g., not distinguishing between input and output.
+In particular, some applications are reported to declare and/or
+modify \fBospeed\fR.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBterminfo\fR(\*n), \fBputc\fR(3S).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_terminfo.3x b/Build/source/libs/ncurses/man/curs_terminfo.3x
new file mode 100644
index 00000000000..d5c9bf68275
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_terminfo.3x
@@ -0,0 +1,294 @@
+.\"***************************************************************************
+.\" Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_terminfo.3x,v 1.18 2003/12/27 18:48:59 tom Exp $
+.TH curs_terminfo 3X ""
+.ds n 5
+.SH NAME
+\fBdel_curterm\fR,
+\fBmvcur\fR,
+\fBputp\fR,
+\fBrestartterm\fR,
+\fBset_curterm\fR,
+\fBsetterm\fR,
+\fBsetupterm\fR,
+\fBtigetflag\fR,
+\fBtigetnum\fR,
+\fBtigetstr\fR,
+\fBtparm\fR,
+\fBtputs\fR,
+\fBvid_attr\fR,
+\fBvid_puts\fR,
+\fBvidattr\fR,
+\fBvidputs\fR - \fBcurses\fR interfaces to terminfo database
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+.br
+\fB#include <term.h>\fR
+.PP
+\fBint setupterm(char *\fR\fIterm\fR\fB, int \fR\fIfildes\fR\fB, int *\fR\fIerrret\fR\fB);\fR
+.br
+\fBint setterm(char *\fR\fIterm\fR\fB);\fR
+.br
+\fBTERMINAL *set_curterm(TERMINAL *\fR\fInterm\fR\fB);\fR
+.br
+\fBint del_curterm(TERMINAL *\fR\fIoterm\fR\fB);\fR
+.br
+\fBint restartterm(const char *\fR\fIterm\fR\fB, int \fR\fIfildes\fR\fB, int *\fR\fIerrret\fR\fB);\fR
+.br
+\fBchar *tparm(char *\fR\fIstr\fR\fB, ...);\fR
+.br
+\fBint tputs(const char *\fR\fIstr\fR\fB, int \fR\fIaffcnt\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR
+.br
+\fBint putp(const char *\fR\fIstr\fR\fB);\fR
+.br
+\fBint vidputs(chtype \fR\fIattrs\fR\fB, int (*\fR\fIputc\fR\fB)(int));\fR
+.br
+\fBint vidattr(chtype \fR\fIattrs\fR\fB);\fR
+.br
+\fBint vid_puts(attr_t \fR\fIattrs\fR\fB, short \fR\fIpair\fR\fB, void *\fR\fIopts\fR\fB, int (*\fR\fIputc\fR\fB)(char));\fR
+.br
+\fBint vid_attr(attr_t \fR\fIattrs\fR\fB, short \fR\fIpair\fR\fB, void *\fR\fIopts\fR\fB);\fR
+.br
+\fBint mvcur(int \fR\fIoldrow\fR\fB, int \fR\fIoldcol\fR\fB, int \fR\fInewrow\fR, int \fR\fInewcol\fR\fB);\fR
+.br
+\fBint tigetflag(char *\fR\fIcapname\fR\fB);\fR
+.br
+\fBint tigetnum(char *\fR\fIcapname\fR\fB);\fR
+.br
+\fBchar *tigetstr(char *\fR\fIcapname\fR\fB);\fR
+.br
+.fi
+.SH DESCRIPTION
+These low-level routines must be called by programs that have to deal
+directly with the \fBterminfo\fR database to handle certain terminal
+capabilities, such as programming function keys. For all other
+functionality, \fBcurses\fR routines are more suitable and their use is
+recommended.
+.PP
+Initially, \fBsetupterm\fR should be called. Note that
+\fBsetupterm\fR is automatically called by \fBinitscr\fR and
+\fBnewterm\fR. This defines the set of terminal-dependent variables
+[listed in \fBterminfo\fR(\*n)]. The \fBterminfo\fR variables
+\fBlines\fR and \fBcolumns\fR are initialized by \fBsetupterm\fR as
+follows: If \fBuse_env(FALSE)\fR has been called, values for
+\fBlines\fR and \fBcolumns\fR specified in \fBterminfo\fR are used.
+Otherwise, if the environment variables \fBLINES\fR and \fBCOLUMNS\fR
+exist, their values are used. If these environment variables do not
+exist and the program is running in a window, the current window size
+is used. Otherwise, if the environment variables do not exist, the
+values for \fBlines\fR and \fBcolumns\fR specified in the
+\fBterminfo\fR database are used.
+.PP
+The header files \fBcurses.h\fR and \fBterm.h\fR should be included (in this
+order) to get the definitions for these strings, numbers, and flags.
+Parameterized strings should be passed through \fBtparm\fR to instantiate them.
+All \fBterminfo\fR strings [including the output of \fBtparm\fR] should be printed
+with \fBtputs\fR or \fBputp\fR. Call the \fBreset_shell_mode\fR to restore the
+tty modes before exiting [see \fBcurs_kernel\fR(3X)]. Programs which use
+cursor addressing should output \fBenter_ca_mode\fR upon startup and should
+output \fBexit_ca_mode\fR before exiting. Programs desiring shell escapes
+should call
+.PP
+\fBreset_shell_mode\fR and output \fBexit_ca_mode\fR before the shell
+is called and should output \fBenter_ca_mode\fR and call
+\fBreset_prog_mode\fR after returning from the shell.
+.PP
+The \fBsetupterm\fR routine reads in the \fBterminfo\fR database,
+initializing the \fBterminfo\fR structures, but does not set up the
+output virtualization structures used by \fBcurses\fR. The terminal
+type is the character string \fIterm\fR; if \fIterm\fR is null, the
+environment variable \fBTERM\fR is used.
+All output is to file descriptor \fBfildes\fR which is initialized for output.
+If \fIerrret\fR is not null,
+then \fBsetupterm\fR returns \fBOK\fR or
+\fBERR\fR and stores a status value in the integer pointed to by
+\fIerrret\fR.
+A return value of \fBOK\fR combined with status of \fB1\fR in \fIerrret\fR
+is normal.
+If \fBERR\fR is returned, examine \fIerrret\fR:
+.RS
+.TP 5
+.B 1
+means that the terminal is hardcopy, cannot be used for curses applications.
+.TP 5
+.B 0
+means that the terminal could not be found,
+or that it is a generic type,
+having too little information for curses applications to run.
+.TP 5
+.B -1
+means that the \fBterminfo\fR database could not be found.
+.RE
+.PP
+If \fIerrret\fR is
+null, \fBsetupterm\fR prints an error message upon finding an error
+and exits. Thus, the simplest call is:
+
+ \fBsetupterm((char *)0, 1, (int *)0);\fR,
+
+which uses all the defaults and sends the output to \fBstdout\fR.
+.PP
+The \fBsetterm\fR routine is being replaced by \fBsetupterm\fR. The call:
+
+ \fBsetupterm(\fR\fIterm\fR\fB, 1, (int *)0)\fR
+
+provides the same functionality as \fBsetterm(\fR\fIterm\fR\fB)\fR.
+The \fBsetterm\fR routine is included here for BSD compatibility, and
+is not recommended for new programs.
+.PP
+The \fBset_curterm\fR routine sets the variable \fBcur_term\fR to
+\fInterm\fR, and makes all of the \fBterminfo\fR boolean, numeric, and
+string variables use the values from \fInterm\fR. It returns the old value
+of \fBcur_term\fR.
+.PP
+The \fBdel_curterm\fR routine frees the space pointed to by
+\fIoterm\fR and makes it available for further use. If \fIoterm\fR is
+the same as \fBcur_term\fR, references to any of the \fBterminfo\fR
+boolean, numeric, and string variables thereafter may refer to invalid
+memory locations until another \fBsetupterm\fR has been called.
+.PP
+The \fBrestartterm\fR routine is similar to \fBsetupterm\fR and \fBinitscr\fR,
+except that it is called after restoring memory to a previous state (for
+example, when reloading a game saved as a core image dump). It assumes that
+the windows and the input and output options are the same as when memory was
+saved, but the terminal type and baud rate may be different. Accordingly,
+it saves various tty state bits, does a setupterm, and then restores the bits.
+.PP
+The \fBtparm\fR routine instantiates the string \fIstr\fR with
+parameters \fIpi\fR. A pointer is returned to the result of \fIstr\fR
+with the parameters applied.
+.PP
+The \fBtputs\fR routine applies padding information to the string
+\fIstr\fR and outputs it. The \fIstr\fR must be a terminfo string
+variable or the return value from \fBtparm\fR, \fBtgetstr\fR, or
+\fBtgoto\fR. \fIaffcnt\fR is the number of lines affected, or 1 if
+not applicable. \fIputc\fR is a \fBputchar\fR-like routine to which
+the characters are passed, one at a time.
+.PP
+The \fBputp\fR routine calls \fBtputs(\fR\fIstr\fR\fB, 1, putchar)\fR.
+Note that the output of \fBputp\fR always goes to \fBstdout\fR, not to
+the \fIfildes\fR specified in \fBsetupterm\fR.
+.PP
+The \fBvidputs\fR routine displays the string on the terminal in the
+video attribute mode \fIattrs\fR, which is any combination of the
+attributes listed in \fBcurses\fR(3X). The characters are passed to
+the \fBputchar\fR-like routine \fIputc\fR.
+.PP
+The \fBvidattr\fR routine is like the \fBvidputs\fR routine, except
+that it outputs through \fBputchar\fR.
+.PP
+The \fBvid_attr\fR and \fBvid_puts\fR routines correspond to vidattr and vidputs,
+respectively.
+They use a set of arguments for representing the video attributes plus color,
+i.e.,
+one of type attr_t for the attributes and one of short for
+the color_pair number.
+The \fBvid_attr\fR and \fBvid_puts\fR routines
+are designed to use the attribute constants with the \fIWA_\fR prefix.
+The opts argument is reserved for future use.
+Currently, applications must provide a null pointer for that argument.
+.PP
+The \fBmvcur\fR routine provides low-level cursor motion. It takes
+effect immediately (rather than at the next refresh).
+.PP
+The \fBtigetflag\fR, \fBtigetnum\fR and \fBtigetstr\fR routines return
+the value of the capability corresponding to the \fBterminfo\fR
+\fIcapname\fR passed to them, such as \fBxenl\fR.
+.PP
+The \fBtigetflag\fR routine returns the value \fB-1\fR if
+\fIcapname\fR is not a boolean capability,
+or \fB0\fR if it is canceled or absent from the terminal description.
+.PP
+The \fBtigetnum\fR routine returns the value \fB-2\fR if
+\fIcapname\fR is not a numeric capability,
+or \fB-1\fR if it is canceled or absent from the terminal description.
+.PP
+The \fBtigetstr\fR routine returns the value \fB(char *)-1\fR
+if \fIcapname\fR is not a string capability,
+or \fB0\fR if it is canceled or absent from the terminal description.
+.PP
+The \fIcapname\fR for each capability is given in the table column entitled
+\fIcapname\fR code in the capabilities section of \fBterminfo\fR(\*n).
+
+\fBchar *boolnames\fR, \fB*boolcodes\fR, \fB*boolfnames\fR
+
+\fBchar *numnames\fR, \fB*numcodes\fR, \fB*numfnames\fR
+
+\fBchar *strnames\fR, \fB*strcodes\fR, \fB*strfnames\fR
+
+These null-terminated arrays contain the \fIcapnames\fR, the
+\fBtermcap\fR codes, and the full C names, for each of the
+\fBterminfo\fR variables.
+.SH RETURN VALUE
+Routines that return an integer return \fBERR\fR upon failure and \fBOK\fR
+(SVr4 only specifies "an integer value other than \fBERR\fR") upon successful
+completion, unless otherwise noted in the preceding routine descriptions.
+.PP
+Routines that return pointers always return \fBNULL\fR on error.
+.SH NOTES
+The \fBsetupterm\fR routine should be used in place of \fBsetterm\fR.
+It may be useful when you want to test for terminal capabilities without
+committing to the allocation of storage involved in \fBinitscr\fR.
+.PP
+Note that \fBvidattr\fR and \fBvidputs\fR may be macros.
+.SH PORTABILITY
+The function \fBsetterm\fR is not described in the XSI Curses standard and must
+be considered non-portable. All other functions are as described in the XSI
+curses standard.
+.PP
+In System V Release 4, \fBset_curterm\fR has an \fBint\fR return type and
+returns \fBOK\fR or \fBERR\fR. We have chosen to implement the XSI Curses
+semantics.
+.PP
+In System V Release 4, the third argument of \fBtputs\fR has the type
+\fBint (*putc)(char)\fR.
+.PP
+The XSI Curses standard prototypes \fBtparm\fR with a fixed number of parameters,
+rather than a variable argument list.
+This implementation uses a variable argument list.
+Portable applications should provide 9 parameters after the format;
+zeroes are fine for this purpose.
+.PP
+XSI notes that after calling \fBmvcur\fR, the curses state may not match the
+actual terminal state, and that an application should touch and refresh
+the window before resuming normal curses calls.
+Both ncurses and System V Release 4 curses implement \fBmvcur\fR using
+the SCREEN data allocated in either \fBinitscr\fR or \fBnewterm\fR.
+So though it is documented as a terminfo function,
+\fBmvcur\fR is really a curses function which is not well specified.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_kernel\fR(3X), \fBcurs_termcap\fR(3X),
+\fBputc\fR(3S), \fBterminfo\fR(\*n)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_touch.3x b/Build/source/libs/ncurses/man/curs_touch.3x
new file mode 100644
index 00000000000..58ffa9f6042
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_touch.3x
@@ -0,0 +1,96 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_touch.3x,v 1.8 2000/07/08 11:07:57 tom Exp $
+.TH curs_touch 3X ""
+.SH NAME
+\fBtouchwin\fR,
+\fBtouchline\fR,
+\fBuntouchwin\fR,
+\fBwtouchln\fR,
+\fBis_linetouched\fR,
+\fBis_wintouched\fR - \fBcurses\fR refresh control routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+\fBint touchwin(WINDOW *win);\fR
+.br
+\fBint touchline(WINDOW *win, int start, int count);\fR
+.br
+\fBint untouchwin(WINDOW *win);\fR
+.br
+\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR
+.br
+\fBbool is_linetouched(WINDOW *win, int line);\fR
+.br
+\fBbool is_wintouched(WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+The \fBtouchwin\fR and \fBtouchline\fR routines throw away all
+optimization information about which parts of the window have been
+touched, by pretending that the entire window has been drawn on. This
+is sometimes necessary when using overlapping windows, since a change
+to one window affects the other window, but the records of which lines
+have been changed in the other window do not reflect the change. The
+routine \fBtouchline\fR only pretends that \fIcount\fR lines have been
+changed, beginning with line \fIstart\fR.
+
+The \fBuntouchwin\fR routine marks all lines in the window as unchanged since
+the last call to \fBwrefresh\fR.
+
+The \fBwtouchln\fR routine makes \fIn\fR lines in the window, starting
+at line \fIy\fR, look as if they have (\fIchanged\fR\fB=1\fR) or have
+not (\fIchanged\fR\fB=0\fR) been changed since the last call to
+\fBwrefresh\fR.
+
+The \fBis_linetouched\fR and \fBis_wintouched\fR routines return
+\fBTRUE\fR if the specified line/window was modified since the last
+call to \fBwrefresh\fR; otherwise they return \fBFALSE\fR. In
+addition, \fBis_linetouched\fR returns \fBERR\fR if \fIline\fR is not
+valid for the given window.
+.SH RETURN VALUE
+All routines return the integer \fBERR\fR upon failure and an integer value
+other than \fBERR\fR upon successful completion, unless otherwise noted in the
+preceding routine descriptions.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions.
+
+Some historic curses implementations had, as an undocumented feature, the
+ability to do the equivalent of \fBclearok(..., 1)\fR by saying
+\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
+ncurses.
+.SH NOTES
+Note that all routines except \fBwtouchln\fR may be macros.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_refresh\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_trace.3x b/Build/source/libs/ncurses/man/curs_trace.3x
new file mode 100644
index 00000000000..4af258da3b0
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_trace.3x
@@ -0,0 +1,149 @@
+.\"***************************************************************************
+.\" Copyright (c) 2000,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_trace.3x,v 1.5 2002/02/16 22:39:52 tom Exp $
+.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 <curses.h>\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<curses.h>\fR.
+These include:
+.TP 5
+TRACE_DISABLE
+turn off tracing.
+.TP 5
+TRACE_TIMES
+trace user and system times of updates.
+.TP 5
+TRACE_TPUTS
+trace tputs calls.
+.TP 5
+TRACE_UPDATE
+trace update actions, old & new screens.
+.TP 5
+TRACE_MOVE
+trace cursor movement and scrolling.
+.TP 5
+TRACE_CHARPUT
+trace all character outputs.
+.TP 5
+TRACE_ORDINARY
+trace all update actions.
+The old and new screen contents are written to the trace file
+for each refresh.
+.TP 5
+TRACE_CALLS
+trace all curses calls.
+The parameters for each call are traced, as well as return values.
+.TP 5
+TRACE_VIRTPUT
+trace virtual character puts, i.e., calls to \fBaddch\fR.
+.TP 5
+TRACE_IEVENT
+trace low-level input processing, including timeouts.
+.TP 5
+TRACE_BITS
+trace state of TTY control bits.
+.TP 5
+TRACE_ICALLS
+trace internal/nested calls.
+.TP 5
+TRACE_CCALLS
+trace per-character calls.
+.TP 5
+TRACE_DATABASE
+trace read/write of terminfo/termcap data.
+.TP 5
+TRACE_ATTRS
+trace changes to video attributes and colors.
+.TP 5
+TRACE_MAXIMUM
+maximum trace level, enables all of the separate trace features.
+
+Some tracing features are enabled whenever the \fBtrace\fR parameter
+is nonzero. Some features overlap.
+The specific names are used as a guideline.
+.SH RETURN VALUE
+Routines which return a value are designed to be used as parameters
+to the \fB_tracef\fR routine.
+.SH PORTABILITY
+These functions are not part of the XSI interface.
+Some other curses implementations are known to
+have similar, undocumented features,
+but they are not compatible with ncurses.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_util.3x b/Build/source/libs/ncurses/man/curs_util.3x
new file mode 100644
index 00000000000..de19a308c85
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_util.3x
@@ -0,0 +1,146 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_util.3x,v 1.12 2004/01/31 17:24:53 tom Exp $
+.TH curs_util 3X ""
+.SH NAME
+\fBdelay_output\fR,
+\fBfilter\fR,
+\fBflushinp\fR,
+\fBgetwin\fR,
+\fBkey_name\fR,
+\fBkeyname\fR,
+\fBputwin\fR,
+\fBunctrl\fR,
+\fBuse_env\fR,
+\fBwunctrl\fR - miscellaneous \fBcurses\fR utility routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.sp
+\fBchar *unctrl(chtype c);\fR
+.br
+\fBchar *wunctrl(cchar_t *c);\fR
+.br
+\fBchar *keyname(int c);\fR
+.br
+\fBchar *key_name(wchar_t w);\fR
+.br
+\fBvoid filter(void);\fR
+.br
+\fBvoid use_env(bool f);\fR
+.br
+\fBint putwin(WINDOW *win, FILE *filep);\fR
+.br
+\fBWINDOW *getwin(FILE *filep);\fR
+.br
+\fBint delay_output(int ms);\fR
+.br
+\fBint flushinp(void);\fR
+.br
+.SH DESCRIPTION
+The \fBunctrl\fR routine returns a character string which is a printable
+representation of the character \fIc\fR, ignoring attributes.
+Control characters are displayed in the \fB^\fR\fIX\fR notation.
+Printing characters are displayed as is.
+The corresponding \fBwunctrl\fR returns a printable representation of
+a wide-character.
+.PP
+The \fBkeyname\fR routine returns a character string corresponding to the key \fIc\fR.
+Control characters are displayed in the \fB^\fR\fIX\fR notation.
+Values above 128 are either meta characters, shown in the \fBM-\fR\fIX\fR notation,
+or the names of function keys, or null.
+The corresponding \fBkey_name\fR returns a character string corresponding
+to the wide-character value \fIw\fR.
+The two functions do not return the same set of strings;
+the latter returns null where the former would display a meta character.
+.PP
+The \fBfilter\fR routine, if used, must be called before \fBinitscr\fR or
+\fBnewterm\fR are called. The effect is that, during those calls, \fBLINES\fR
+is set to 1; the capabilities \fBclear\fR, \fBcup\fR, \fBcud\fR, \fBcud1\fR,
+\fBcuu1\fR, \fBcuu\fR, \fBvpa\fR are disabled; and the \fBhome\fR string is
+set to the value of \fBcr\fR.
+.PP
+The \fBuse_env\fR routine, if used, is called before \fBinitscr\fR or
+\fBnewterm\fR are called. When called with \fBFALSE\fR as an
+argument, the values of \fBlines\fR and \fBcolumns\fR specified in the
+\fIterminfo\fR database will be used, even if environment variables
+\fBLINES\fR and \fBCOLUMNS\fR (used by default) are set, or if
+\fBcurses\fR is running in a window (in which case default behavior
+would be to use the window size if \fBLINES\fR and \fBCOLUMNS\fR are
+not set).
+.PP
+The \fBputwin\fR routine writes all data associated with window \fIwin\fR into
+the file to which \fIfilep\fR points. This information can be later retrieved
+using the \fBgetwin\fR function.
+.PP
+The \fBgetwin\fR routine reads window related data stored in the file by
+\fBputwin\fR. The routine then creates and initializes a new window using that
+data. It returns a pointer to the new window.
+.PP
+The \fBdelay_output\fR routine inserts an \fIms\fR millisecond pause
+in output. This routine should not be used extensively because
+padding characters are used rather than a CPU pause.
+If no padding character is specified, this uses \fBnapms\fR to perform the delay.
+.PP
+The \fBflushinp\fR routine throws away any typeahead that has been typed by the
+user and has not yet been read by the program.
+.SH RETURN VALUE
+Except for \fBflushinp\fR, routines that return an integer return \fBERR\fR
+upon failure and \fBOK\fR (SVr4 specifies only "an integer value other than
+\fBERR\fR") upon successful completion.
+.PP
+\fBflushinp\fR always returns \fBOK\fR.
+.PP
+Routines that return pointers return \fBNULL\fR on error.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions.
+It states that \fBunctrl\fR and \fBwunctrl\fR will return a null pointer if
+unsuccessful, but does not define any error conditions.
+.PP
+The SVr4 documentation describes the action of \fBfilter\fR only in the vaguest
+terms. The description here is adapted from the XSI Curses standard (which
+erroneously fails to describe the disabling of \fBcuu\fR).
+.PP
+The strings returned by \fBunctrl\fR in this implementation are determined
+at compile time, showing C1 controls from the upper-128 codes with a `~'
+prefix rather than `^'.
+Other implementations typically show both sets of control characters with `^',
+and may strip the parameter to 7 bits.
+This implementation uses 8 bits but does not modify the string to reflect
+locale.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_initscr\fR(3X),
+\fBcurs_kernel\fR(3X),
+\fBcurs_scr_dump\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/curs_window.3x b/Build/source/libs/ncurses/man/curs_window.3x
new file mode 100644
index 00000000000..6aad4e7f495
--- /dev/null
+++ b/Build/source/libs/ncurses/man/curs_window.3x
@@ -0,0 +1,159 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_window.3x,v 1.10 2003/05/10 20:33:49 jmc Exp $
+.TH curs_window 3X ""
+.SH NAME
+\fBnewwin\fR,
+\fBdelwin\fR,
+\fBmvwin\fR,
+\fBsubwin\fR,
+\fBderwin\fR,
+\fBmvderwin\fR,
+\fBdupwin\fR,
+\fBwsyncup\fR,
+\fBsyncok\fR,
+\fBwcursyncup\fR,
+\fBwsyncdown\fR - create \fBcurses\fR windows
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBWINDOW *newwin(int nlines, int ncols, int begin_y,\fR
+ \fBint begin_x);\fR
+.br
+\fBint delwin(WINDOW *win);\fR
+.br
+\fBint mvwin(WINDOW *win, int y, int x);\fR
+.br
+\fBWINDOW *subwin(WINDOW *orig, int nlines, int ncols,\fR
+ \fBint begin_y, int begin_x);\fR
+.br
+\fBWINDOW *derwin(WINDOW *orig, int nlines, int ncols,\fR
+ \fBint begin_y, int begin_x);\fR
+.br
+\fBint mvderwin(WINDOW *win, int par_y, int par_x);\fR
+.br
+\fBWINDOW *dupwin(WINDOW *win);\fR
+.br
+\fBvoid wsyncup(WINDOW *win);\fR
+.br
+\fBint syncok(WINDOW *win, bool bf);\fR
+.br
+\fBvoid wcursyncup(WINDOW *win);\fR
+.br
+\fBvoid wsyncdown(WINDOW *win);\fR
+.br
+.SH DESCRIPTION
+Calling \fBnewwin\fR creates and returns a pointer to a new window with the
+given number of lines and columns. The upper left-hand corner of the window is
+at line \fIbegin\fR_\fIy\fR, column \fIbegin\fR_\fIx\fR. If either
+\fInlines\fR or \fIncols\fR is zero, they default to \fBLINES -\fR
+\fIbegin\fR_\fIy\fR and \fBCOLS -\fR \fIbegin\fR_\fIx\fR. A new full-screen
+window is created by calling \fBnewwin(0,0,0,0)\fR.
+
+Calling \fBdelwin\fR deletes the named window, freeing all memory
+associated with it (it does not actually erase the window's screen
+image). Subwindows must be deleted before the main window can be
+deleted.
+
+Calling \fBmvwin\fR moves the window so that the upper left-hand
+corner is at position (\fIx\fR, \fIy\fR). If the move would cause the
+window to be off the screen, it is an error and the window is not
+moved. Moving subwindows is allowed, but should be avoided.
+
+Calling \fBsubwin\fR creates and returns a pointer to a new window
+with the given number of lines, \fInlines\fR, and columns,
+\fIncols\fR. The window is at position (\fIbegin\fR_\fIy\fR,
+\fIbegin\fR_\fIx\fR) on the screen. (This position is relative to the
+screen, and not to the window \fIorig\fR.) The window is made in the
+middle of the window \fIorig\fR, so that changes made to one window
+will affect both windows. The subwindow shares memory with the window
+\fIorig\fR. When using this routine, it is necessary to call
+\fBtouchwin\fR or \fBtouchline\fR on \fIorig\fR before calling
+\fBwrefresh\fR on the subwindow.
+
+Calling \fBderwin\fR is the same as calling \fBsubwin,\fR except that
+\fIbegin\fR_\fIy\fR and \fIbegin\fR_\fIx\fR are relative to the origin
+of the window \fIorig\fR rather than the screen. There is no
+difference between the subwindows and the derived windows.
+
+Calling \fBmvderwin\fR moves a derived window (or subwindow)
+inside its parent window. The screen-relative parameters of the
+window are not changed. This routine is used to display different
+parts of the parent window at the same physical position on the
+screen.
+
+Calling \fBdupwin\fR creates an exact duplicate of the window \fIwin\fR.
+
+Calling \fBwsyncup\fR touches all locations in ancestors of \fIwin\fR that are
+changed in \fIwin\fR. If \fBsyncok\fR is called with second argument
+\fBTRUE\fR then \fBwsyncup\fR is called automatically whenever there is a
+change in the window.
+
+The \fBwsyncdown\fR routine touches each location in \fIwin\fR that has been
+touched in any of its ancestor windows. This routine is called by
+\fBwrefresh\fR, so it should almost never be necessary to call it manually.
+
+The routine \fBwcursyncup\fR updates the current cursor position of all the
+ancestors of the window to reflect the current cursor position of the
+window.
+.SH RETURN VALUE
+Routines that return an integer return the integer \fBERR\fR upon failure and
+\fBOK\fR (SVr4 only specifies "an integer value other than \fBERR\fR") upon
+successful completion.
+
+\fBdelwin\fR returns the integer \fBERR\fR upon failure and \fBOK\fR
+upon successful completion.
+
+Routines that return pointers return \fBNULL\fR on error.
+.SH NOTES
+If many small changes are made to the window, the \fBwsyncup\fR option could
+degrade performance.
+
+Note that \fBsyncok\fR may be a macro.
+.SH BUGS
+The subwindow functions (\fIsubwin\fR, \fIderwin\fR, \fImvderwin\fR,
+\fBwsyncup\fR, \fBwsyncdown\fR, \fBwcursyncup\fR, \fBsyncok\fR) are flaky,
+incompletely implemented, and not well tested.
+
+The System V curses documentation is very unclear about what \fBwsyncup\fR
+and \fBwsyncdown\fR actually do. It seems to imply that they are only
+supposed to touch exactly those lines that are affected by ancestor changes.
+The language here, and the behavior of the \fBcurses\fR implementation,
+is patterned on the XPG4 curses standard. The weaker XPG4 spec may result
+in slower updates.
+.SH PORTABILITY
+The XSI Curses standard, Issue 4 describes these functions.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBcurs_refresh\fR(3X), \fBcurs_touch\fR(3X)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/default_colors.3x b/Build/source/libs/ncurses/man/default_colors.3x
new file mode 100644
index 00000000000..ae07899dcbf
--- /dev/null
+++ b/Build/source/libs/ncurses/man/default_colors.3x
@@ -0,0 +1,125 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1997,1999,2000
+.\"
+.\" $Id: default_colors.3x,v 1.17 2003/10/25 20:41:08 tom Exp $
+.TH default_colors 3X ""
+.SH NAME
+\fBuse_default_colors\fR,
+\fBassume_default_colors\fR \- use terminal's default colors
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBint use_default_colors(void);\fP
+.br
+\fBint assume_default_colors(int fg, int bg);\fP
+.SH DESCRIPTION
+The
+.I use_default_colors()
+and
+.I assume_default_colors()
+functions are extensions to the curses library.
+They are used with terminals that support ISO 6429 color, or equivalent.
+These terminals allow the application to reset color to an unspecified
+default value (e.g., with SGR 39 or SGR 49).
+.PP
+Applications that paint a colored background over the whole screen
+do not take advantage of SGR 39 and SGR 49.
+Some applications are designed to work with the default background,
+using colors only for text.
+For example, there are several implementations of the \fBls\fP program
+which use colors to denote different file types or permissions.
+These "color ls" programs do not necessarily modify the background color,
+typically using only the \fIsetaf\fP terminfo capability to set the
+foreground color.
+Full-screen applications that use default colors can achieve similar
+visual effects.
+.PP
+The first function,
+.I use_default_colors()
+tells the curses library to assign terminal default
+foreground/background colors to color number -1. So init_pair(x,COLOR_RED,-1)
+will initialize pair x as red on default background and init_pair(x,-1,COLOR_BLUE) will
+initialize pair x as default foreground on blue.
+.PP
+The other,
+.I assume_default_colors()
+is a refinement which tells which colors to paint for color pair 0.
+This function recognizes a special color number -1,
+which denotes the default terminal color.
+.PP
+The following are equivalent:
+.RS
+.br
+.I use_default_colors();
+.br
+.I assume_default_colors(-1,-1);
+.RE
+.PP
+These are ncurses extensions.
+For other curses implementations, color
+number -1 does not mean anything, just as for ncurses before a
+successful call of \fIuse_default_colors()\fP or \fIassume_default_colors()\fP.
+.PP
+Other curses implementations do not allow an application to modify color pair 0.
+They assume that the background is COLOR_BLACK,
+but do not ensure that the color pair 0 is painted to match the
+assumption.
+If your application does not use either
+.I use_default_colors()
+or
+.I assume_default_colors()
+ncurses will paint a white foreground (text) with black background
+for color pair 0.
+.SH RETURN VALUE
+These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success.
+They will fail if either the terminal does not support
+the \fIorig_pair\fP or \fIorig_colors\fP capability.
+If the \fIinitialize_pair\fP capability is found, this causes an
+error as well.
+.SH NOTES
+Associated with this extension, the \fBinit_pair\fR(3X) function accepts
+negative arguments to specify default foreground or background
+colors.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBcurs_color\fR(3X),
+\fBded\fP(1).
+.SH AUTHOR
+Thomas Dickey (from an analysis of the requirements for color xterm
+for XFree86 3.1.2C, February 1996).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/define_key.3x b/Build/source/libs/ncurses/man/define_key.3x
new file mode 100644
index 00000000000..b7bca879f2a
--- /dev/null
+++ b/Build/source/libs/ncurses/man/define_key.3x
@@ -0,0 +1,65 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1997
+.\"
+.\" $Id: define_key.3x,v 1.11 2004/06/05 19:20:03 tom Exp $
+.TH define_key 3X ""
+.SH NAME
+\fBdefine_key\fP \- define a keycode
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBint define_key(const char *definition, int keycode);\fP
+.SH DESCRIPTION
+This is an extension to the curses library.
+It permits an application to define keycodes with their corresponding control
+strings, so that the ncurses library will interpret them just as it would
+the predefined codes in the terminfo database.
+.PP
+If the given string is null, any existing definition for the keycode is
+removed.
+Similarly, if the given keycode is negative or zero, any existing string
+for the given definition is removed.
+.SH RETURN VALUE
+The keycode must be greater than zero, else ERR is returned.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBkeyok\fR(3X),
+\fBkey_defined\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/Build/source/libs/ncurses/man/form.3x b/Build/source/libs/ncurses/man/form.3x
new file mode 100644
index 00000000000..811b9ff7473
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form.3x
@@ -0,0 +1,200 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form.3x,v 1.15 2002/01/19 22:48:05 tom Exp $
+.TH form 3X ""
+.SH NAME
+\fBform\fR - curses extension for programming forms
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+.SH DESCRIPTION
+The \fBform\fR library provides terminal-independent facilities for composing
+form screens on character-cell terminals. The library includes: field
+routines, which create and modify form fields; and form routines, which group
+fields into forms, display forms on the screen, and handle interaction with the
+user.
+
+The \fBform\fR library uses the \fBcurses\fR libraries, and a curses
+initialization routine such as \fBinitscr\fR must be called before using any of
+these functions. To use the \fBform\fR library, link with the options
+\fB-lform -lcurses\fR.
+
+.SS Current Default Values for Field Attributes
+
+The \fBform\fR library maintains a default value for field attributes. You
+can get or set this default by calling the appropriate \fBset_\fR
+or retrieval
+routine with a \fBNULL\fR field pointer. Changing this default with a
+\fBset_\fR function affects future field creations, but does not change the
+rendering of fields already created.
+
+.SS Routine Name Index
+
+The following table lists each \fBform\fR routine and the name of
+the manual page on which it is described.
+
+.TS
+l l
+l l .
+\fBcurses\fR Routine Name Manual Page Name
+=
+current_field \fBform_page\fR(3X)
+data_ahead \fBform_data\fR(3X)
+data_behind \fBform_data\fR(3X)
+dup_field \fBform_field_new\fR(3X)
+dynamic_fieldinfo \fBform_field_info\fR(3X)
+field_arg \fBform_field_validation\fR(3X)
+field_back \fBform_field_attributes\fR(3X)
+field_buffer \fBform_field_buffer\fR(3X)
+field_count \fBform_field\fR(3X)
+field_fore \fBform_field_attributes\fR(3X)
+field_index \fBform_page\fR(3X)
+field_info \fBform_field_info\fR(3X)
+field_init \fBform_hook\fR(3X)
+field_just \fBform_field_just\fR(3X)
+field_opts \fBform_field_opts\fR(3X)
+field_opts_off \fBform_field_opts\fR(3X)
+field_opts_on \fBform_field_opts\fR(3X)
+field_pad \fBform_field_attributes\fR(3X)
+field_status \fBform_field_buffer\fR(3X)
+field_term \fBform_hook\fR(3X)
+field_type \fBform_field_validation\fR(3X)
+field_userptr \fBform_field_userptr\fR(3X)
+form_driver \fBform_driver\fR(3X)
+form_fields \fBform_field\fR(3X)
+form_init \fBform_hook\fR(3X)
+form_opts \fBform_opts\fR(3X)
+form_opts_off \fBform_opts\fR(3X)
+form_opts_on \fBform_opts\fR(3X)
+form_page \fBform_page\fR(3X)
+form_request_by_name \fBform_requestname\fR(3X)
+form_request_name \fBform_requestname\fR(3X)
+form_sub \fBform_win\fR(3X)
+form_term \fBform_hook\fR(3X)
+form_userptr \fBform_userptr\fR(3X)
+form_win \fBform_win\fR(3X)
+free_field \fBform_field_new\fR(3X)
+free_form \fBform_new\fR(3X)
+link_field \fBform_field_new\fR(3X)
+link_fieldtype \fBform_fieldtype\fR(3X)
+move_field \fBform_field\fR(3X)
+new_field \fBform_field_new\fR(3X)
+new_form \fBform_new\fR(3X)
+new_page \fBform_new_page\fR(3X)
+pos_form_cursor \fBform_cursor\fR(3X)
+post_form \fBform_post\fR(3X)
+scale_form \fBform_win\fR(3X)
+set_current_field \fBform_page\fR(3X)
+set_field_back \fBform_field_attributes\fR(3X)
+set_field_buffer \fBform_field_buffer\fR(3X)
+set_field_fore \fBform_field_attributes\fR(3X)
+set_field_init \fBform_hook\fR(3X)
+set_field_just \fBform_field_just\fR(3X)
+set_field_opts \fBform_field_opts\fR(3X)
+set_field_pad \fBform_field_attributes\fR(3X)
+set_field_status \fBform_field_buffer\fR(3X)
+set_field_term \fBform_hook\fR(3X)
+set_field_type \fBform_field_validation\fR(3X)
+set_field_userptr \fBform_field_userptr\fR(3X)
+set_fieldtype_arg \fBform_fieldtype\fR(3X)
+set_fieldtype_choice \fBform_fieldtype\fR(3X)
+set_form_fields \fBform_field\fR(3X)
+set_form_init \fBform_hook\fR(3X)
+set_form_opts \fBform_field_opts\fR(3X)
+set_form_page \fBform_page\fR(3X)
+set_form_sub \fBform_win\fR(3X)
+set_form_term \fBform_hook\fR(3X)
+set_form_userptr \fBform_userptr\fR(3X)
+set_form_win \fBform_win\fR(3X)
+set_max_field \fBform_field_buffer\fR(3X)
+set_new_page \fBform_new_page\fR(3X)
+unpost_form \fBform_post\fR(3X)
+.TE
+.SH RETURN VALUE
+Routines that return pointers return \fBNULL\fR on error. Routines that return
+an integer return one of the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_CONNECTED\fR
+The field is already connected to a form.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The form is already posted.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NO_ROOM\fR
+Form is too large for its window.
+.TP 5
+\fBE_NOT_POSTED\fR
+The form has not been posted.
+.TP 5
+\fBE_UNKNOWN_COMMAND\fR
+The form driver code saw an unknown request code.
+.TP 5
+\fBE_INVALID_FIELD\fR
+Contents of a field are not valid.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No fields are connected to the form.
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The form driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header files
+\fB<curses.h>\fR and \fB<eti.h>\fR.
+
+In your library list, libform.a should be before libncurses.a; that is,
+you want to say `-lform -lncurses', not the other way around (which would
+give you a link error using GNU \fBld\fR(1) and many other linkers).
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_cursor.3x b/Build/source/libs/ncurses/man/form_cursor.3x
new file mode 100644
index 00000000000..ab37c99e7fa
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_cursor.3x
@@ -0,0 +1,74 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_cursor.3x,v 1.4 1998/11/29 01:05:43 Rick.Ohnemus Exp $
+.TH form_cursor 3X ""
+.SH NAME
+\fBform_cursor\fR - position a form window cursor
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int pos_form_cursor(FORM *form);
+.br
+.SH DESCRIPTION
+The function \fBpos_form_cursor\fR restores the cursor to the position required
+for the forms driver to continue processing requests. This is useful after
+\fBcurses\fR routines have been called to do screen-painting in response to a
+form operation.
+.SH RETURN VALUE
+This routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_NOT_POSTED\fR
+The form has not been posted.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_data.3x b/Build/source/libs/ncurses/man/form_data.3x
new file mode 100644
index 00000000000..3767e954590
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_data.3x
@@ -0,0 +1,63 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_data.3x,v 1.7 1998/11/29 01:13:22 Rick.Ohnemus Exp $
+.TH form_data 3X ""
+.SH NAME
+\fBform_data\fR - test for off-screen data in given forms
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+bool data_ahead(const FORM *form);
+.br
+bool data_behind(const FORM *form);
+.br
+.SH DESCRIPTION
+The function \fBdata_ahead\fR tests whether there is off-screen data
+ahead in the given form. It returns TRUE (1) or FALSE (0).
+
+The function \fBdata_behind\fR tests whether there is off-screen data
+behind in the given form. It returns TRUE (1) or FALSE (0).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_driver.3x b/Build/source/libs/ncurses/man/form_driver.3x
new file mode 100644
index 00000000000..23540891019
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_driver.3x
@@ -0,0 +1,272 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_driver.3x,v 1.9 2002/02/16 22:39:52 tom Exp $
+.TH form_driver 3X ""
+.SH NAME
+\fBform_driver\fR - command-processing loop of the form system
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int form_driver(FORM *form, int c);
+.br
+.SH DESCRIPTION
+Once a form has been posted (displayed), you should funnel input events to it
+through \fBform_driver\fR. This routine has two major input cases; either
+the input is a form navigation request or it's a printable ASCII character.
+The form driver requests are as follows:
+.TP 5
+REQ_NEXT_PAGE
+Move to the next page.
+.TP 5
+REQ_PREV_PAGE
+Move to the previous page.
+.TP 5
+REQ_FIRST_PAGE
+Move to the first page.
+.TP 5
+REQ_LAST_PAGE
+Move to the last field.
+
+.TP 5
+REQ_NEXT_FIELD
+Move to the next field.
+.TP 5
+REQ_PREV_FIELD
+Move to the previous field.
+.TP 5
+REQ_FIRST_FIELD
+Move to the first field.
+.TP 5
+REQ_LAST_FIELD
+Move to the last field.
+.TP 5
+REQ_SNEXT_FIELD
+Move to the sorted next field.
+.TP 5
+REQ_SPREV_FIELD
+Move to the sorted previous field.
+.TP 5
+REQ_SFIRST_FIELD
+Move to the sorted first field.
+.TP 5
+REQ_SLAST_FIELD
+Move to the sorted last field.
+.TP 5
+REQ_LEFT_FIELD
+Move left to a field.
+.TP 5
+REQ_RIGHT_FIELD
+Move right to a field.
+.TP 5
+REQ_UP_FIELD
+Move up to a field.
+.TP 5
+REQ_DOWN_FIELD
+Move down to a field.
+
+.TP 5
+REQ_NEXT_CHAR
+Move to the next char.
+.TP 5
+REQ_PREV_CHAR
+Move to the previous char.
+.TP 5
+REQ_NEXT_LINE
+Move to the next line.
+.TP 5
+REQ_PREV_LINE
+Move to the previous line.
+.TP 5
+REQ_NEXT_WORD
+Move to the next word.
+.TP 5
+REQ_PREV_WORD
+Move to the previous word.
+.TP 5
+REQ_BEG_FIELD
+Move to the beginning of the field.
+.TP 5
+REQ_END_FIELD
+Move to the end of the field.
+.TP 5
+REQ_BEG_LINE
+Move to the beginning of the line.
+.TP 5
+REQ_END_LINE
+Move to the end of the line.
+.TP 5
+REQ_LEFT_CHAR
+Move left in the field.
+.TP 5
+REQ_RIGHT_CHAR
+Move right in the field.
+.TP 5
+REQ_UP_CHAR
+Move up in the field.
+.TP 5
+REQ_DOWN_CHAR
+Move down in the field.
+
+.TP 5
+REQ_NEW_LINE
+Insert or overlay a new line.
+.TP 5
+REQ_INS_CHAR
+Insert a blank at the cursor.
+.TP 5
+REQ_INS_LINE
+Insert a blank line at the cursor.
+.TP 5
+REQ_DEL_CHAR
+Delete character at the cursor.
+.TP 5
+REQ_DEL_PREV
+Delete character before the cursor.
+.TP 5
+REQ_DEL_LINE
+Delete line at the cursor.
+.TP 5
+REQ_DEL_WORD
+Delete blank-delimited word at the cursor.
+.TP 5
+REQ_CLR_EOL
+Clear to end of line from cursor.
+.TP 5
+REQ_CLR_EOF
+Clear to end of field from cursor.
+.TP 5
+REQ_CLR_FIELD
+Clear the entire field.
+.TP 5
+REQ_OVL_MODE
+Enter overlay mode.
+.TP 5
+REQ_INS_MODE
+Enter insert mode.
+
+.TP 5
+REQ_SCR_FLINE
+Scroll the field forward a line.
+.TP 5
+REQ_SCR_BLINE
+Scroll the field backward a line.
+.TP 5
+REQ_SCR_FPAGE
+Scroll the field forward a page.
+.TP 5
+REQ_SCR_BPAGE
+Scroll the field backward a page.
+.TP 5
+REQ_SCR_FHPAGE
+Scroll the field forward half a page.
+.TP 5
+REQ_SCR_BHPAGE
+Scroll the field backward half a page.
+
+.TP 5
+REQ_SCR_FCHAR
+Scroll the field forward a character.
+.TP 5
+REQ_SCR_BCHAR
+Scroll the field backward a character.
+.TP 5
+REQ_SCR_HFLINE
+Horizontal scroll the field forward a line.
+.TP 5
+REQ_SCR_HBLINE
+Horizontal scroll the field backward a line.
+.TP 5
+REQ_SCR_HFHALF
+Horizontal scroll the field forward half a line.
+.TP 5
+REQ_SCR_HBHALF
+Horizontal scroll the field backward half a line.
+
+.TP
+REQ_VALIDATION
+Validate field.
+.TP
+REQ_NEXT_CHOICE
+Display next field choice.
+.TP
+REQ_PREV_CHOICE
+Display previous field choice.
+.PP
+If the second argument is a printable ASCII character, the driver places it
+in the current position in the current field. If it is one of the forms
+requests listed above, that request is executed.
+.PP
+If the second argument is neither printable ASCII nor one of the above
+pre-defined form requests, the driver assumes it is an application-specific
+command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
+should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
+pre-defined requests.
+.SH RETURN VALUE
+\fBform_driver\fR return one of the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NOT_POSTED\fR
+The form has not been posted.
+.TP 5
+\fBE_UNKNOWN_COMMAND\fR
+The form driver code saw an unknown request code.
+.TP 5
+\fBE_INVALID_FIELD\fR
+Contents of field is invalid.
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The form driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header files
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field.3x b/Build/source/libs/ncurses/man/form_field.3x
new file mode 100644
index 00000000000..e916bf18255
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field.3x
@@ -0,0 +1,97 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field.3x,v 1.6 2003/05/10 20:33:49 jmc Exp $
+.TH form_field 3X ""
+.SH NAME
+\fBform_field\fR - make and break connections between fields and forms
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_form_fields(FORM *form, FIELD **fields);
+.br
+FIELD **form_fields(const FORM *form);
+.br
+int field_count(const FORM *form);
+.br
+int move_field(FIELD *field, int frow, int fcol);
+.br
+.SH DESCRIPTION
+The function \fBset_form_fields\fR changes the field pointer array of
+the given \fIform\fR. The array must be terminated by a \fBNULL\fR.
+
+The function \fBform_fields\fR returns the field array of the given form.
+
+The function \fBfield_count\fR returns the count of fields in \fIform\fR.
+
+The function \fBmove_field\fR moves the given field (which must be disconnected)
+to a specified location on the screen.
+.SH RETURN VALUES
+The function \fBform_fields\fR returns \fBNULL\fR on error.
+
+The function \fBfield_count\fR returns \fBERR\fR (the general
+\fBcurses\fR error return value) on error.
+
+The functions \fBset_form_fields\fR and \fBmove_field\fR return one of
+the following codes on error:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The form is already posted.
+.TP 5
+\fBE_CONNECTED\fR
+The field is already connected to a form.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+
+The SVr4 forms library documentation specifies the \fBfield_count\fR error value
+as -1 (which is the value of \fBERR\fR).
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_attributes.3x b/Build/source/libs/ncurses/man/form_field_attributes.3x
new file mode 100644
index 00000000000..ac7a3b53eec
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_attributes.3x
@@ -0,0 +1,91 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2001,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_attributes.3x,v 1.7 2002/01/19 22:48:14 tom Exp $
+.TH form_field_attributes 3X ""
+.SH NAME
+\fBform_field_attributes\fR - color and attribute control for form fields
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_fore(FIELD *field, chtype attr);
+.br
+chtype field_fore(const FIELD *field);
+.br
+int set_field_back(FIELD *field, chtype attr);
+.br
+chtype field_back(const FIELD *field);
+.br
+int set_field_pad(FIELD *field, int pad);
+.br
+int field_pad(const FIELD *field);
+.br
+.SH DESCRIPTION
+The function \fBset_field_fore\fR sets the foreground attribute of
+\fIfield\fR. This is the highlight used to display the field contents. The
+function \fBfield_fore\fR returns the foreground attribute. The default is
+\fBA_STANDOUT\fR.
+
+The function \fBset_field_back\fR sets the background attribute of
+\fIform\fR. This is the highlight used to display the extent fields in the
+form. The function \fBfield_back\fR returns the background attribute. The
+default is \fBA_NORMAL\fR.
+
+The function \fBset_field_pad\fR sets the character used to fill the field.
+The function \fBfield_pad\fR returns the given form's pad character. The
+default is a blank.
+.SH RETURN VALUE
+These routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_buffer.3x b/Build/source/libs/ncurses/man/form_field_buffer.3x
new file mode 100644
index 00000000000..3432cde19a1
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_buffer.3x
@@ -0,0 +1,105 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_buffer.3x,v 1.11 2004/05/16 15:58:51 tom Exp $
+.TH form_field_buffer 3X ""
+.SH NAME
+\fBform_field_buffer\fR - field buffer control
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_buffer(FIELD *field, int buf, const char *value);
+.br
+char *field_buffer(const FIELD *field, int buffer);
+.br
+int set_field_status(FIELD *field, bool status);
+.br
+bool field_status(const FIELD *field);
+.br
+int set_max_field(FIELD *field, int max);
+.br
+.SH DESCRIPTION
+The function \fBset_field_buffer\fR sets the numbered buffer of the given field
+to contain a given string. Buffer 0 is the displayed value of the field; other
+numbered buffers may be allocated by applications through the \fBnbuf\fR
+argument of (see \fBform_field_new\fR(3X)) but are not manipulated by the forms
+library. The function \fBfield_buffer\fR returns the address of the buffer.
+Please note that this buffer has always the length of the buffer, that means
+that it may typically contain trailing spaces. If you entered leading spaces
+the buffer may also contain them. If you want the raw data, you must write your
+own routine that copies the value out of the buffer and removes the leading
+and trailing spaces. Please note also, that subsequent operations on the form
+will probably change the content of the buffer. So don't use it for long term
+storage of the entered form data.
+
+The function \fBset_field_status\fR sets the associated status flag of
+\fIfield\fR; \fBfield_status\fR gets the current value. The status flag
+is set to a nonzero value whenever the field changes.
+
+The function \fBset_max_field\fR sets the maximum size for a dynamic field.
+An argument of 0 turns off any maximum size threshold for that field.
+.SH RETURN VALUE
+The \fBfield_buffer\fR function returns NULL on error.
+
+The \fBfield_status\fR function returns \fBTRUE\fR or \fBFALSE\fR.
+
+The remaining routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+
+When configured for wide-characters, \fBfield_buffer\fP returns a pointer
+to temporary storage (allocated and freed by the library).
+The application should not attempt to modify the data.
+It will be freed on the next call to \fBfield_buffer\fP to return the
+same buffer.
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_info.3x b/Build/source/libs/ncurses/man/form_field_info.3x
new file mode 100644
index 00000000000..56b81ac7daa
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_info.3x
@@ -0,0 +1,84 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000,2001,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_info.3x,v 1.8 2002/01/19 22:48:32 tom Exp $
+.TH form_field_info 3X ""
+.SH NAME
+\fBform_field_info\fR - retrieve field characteristics
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int field_info(const FIELD *field, int *rows, int *cols,
+ int *frow, int *fcol, int *nrow, int *nbuf);
+.br
+int dynamic_field_info(const FIELD *field, int *rows, int *cols, int *max);
+.br
+.SH DESCRIPTION
+The function \fBfield_info\fR returns the sizes and other attributes passed in
+to the field at its creation time. The attributes are: height, width, row of
+upper-left corner, column of upper-left corner, number off-screen rows, and
+number of working buffers.
+
+The function \fBdynamic_field_info\fR returns the actual size of the field, and
+its maximum possible size. If the field has no size limit, the location
+addressed by the third argument will be set to 0. (A field can be made dynamic
+by turning off the \fBO_STATIC\fR).
+.SH RETURN VALUE
+These routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.PP
+A null (zero pointer) is accepted for any of the return values,
+to ignore that value.
+Not all implementations allow this, e.g., Solaris 2.7 does not.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_just.3x b/Build/source/libs/ncurses/man/form_field_just.3x
new file mode 100644
index 00000000000..61b62b88b93
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_just.3x
@@ -0,0 +1,78 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_just.3x,v 1.7 2003/05/10 20:33:49 jmc Exp $
+.TH form_field_just 3X ""
+.SH NAME
+\fBform_field_just\fR - retrieve field characteristics
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_just(FIELD *field, int justification);
+.br
+int field_just(const FIELD *field);
+.br
+.SH DESCRIPTION
+The function \fBset_field_just\fR sets the justification attribute of
+a field; \fBfield_just\fR returns a field's justification attribute.
+The attribute may be one of NO_JUSTIFICATION, JUSTIFY_RIGHT,
+JUSTIFY_LEFT, or JUSTIFY_CENTER.
+
+.SH RETURN VALUE
+The function \fBfield_just\fR returns one of: NO_JUSTIFICATION,
+JUSTIFY_RIGHT, JUSTIFY_LEFT, or JUSTIFY_CENTER.
+
+The function \fBset_field_just\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_new.3x b/Build/source/libs/ncurses/man/form_field_new.3x
new file mode 100644
index 00000000000..a8174a5cad4
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_new.3x
@@ -0,0 +1,96 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_new.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $
+.TH form_field_new 3X ""
+.SH NAME
+\fBform_field_new\fR - create and destroy form fields
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+FIELD *new_field(int height, int width,
+ int toprow, int leftcol,
+ int offscreen, int nbuffers);
+.br
+FIELD *dup_field(FIELD *field, int toprow, int leftcol);
+.br
+FIELD *link_field(FIELD *field, int toprow, int leftcol);
+.br
+int free_field(FIELD *field);
+.br
+.SH DESCRIPTION
+The function \fBnew_field\fR allocates a new field and initializes it from the
+parameters given: height, width, row of upper-left corner, column of upper-left
+corner, number off-screen rows, and number of additional working buffers.
+
+The function \fBdup_field\fR duplicates a field at a new location. Most
+attributes (including current contents, size, validation type, buffer count,
+growth threshold, justification, foreground, background, pad character,
+options, and user pointer) are copied. Field status and the field page bit are
+not copied.
+
+The function \fBlink_field\fR acts like \fBdup_field\fR, but the new field
+shares buffers with its parent. Attribute data is separate.
+
+The function \fBfree_field\fR de-allocates storage associated with a field.
+.SH RETURN VALUE
+The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return
+\fBNULL\fR on error.
+
+The function \fBfree_field\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+
+It may be unwise to count on the set of attributes copied by
+\fBdup_field\fR(3X) being portable; the System V forms library documents are
+not very explicit about what gets copied and what doesn't.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_opts.3x b/Build/source/libs/ncurses/man/form_field_opts.3x
new file mode 100644
index 00000000000..8a3e501840e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_opts.3x
@@ -0,0 +1,120 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_opts.3x,v 1.8 2003/05/10 20:33:49 jmc Exp $
+.TH form_field_opts 3X ""
+.SH NAME
+\fBform_field_opts\fR - set and get field options
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_opts(FIELD *field, OPTIONS opts);
+.br
+int field_opts_on(FIELD *field, OPTIONS opts);
+.br
+int field_opts_off(FIELD *field, OPTIONS opts);
+.br
+OPTIONS field_opts(const FIELD *field);
+.br
+.SH DESCRIPTION
+The function \fBset_field_opts\fR sets all the given field's option bits (field
+option bits may be logically-OR'ed together).
+
+The function \fBfield_opts_on\fR turns on the given option bits, and leaves
+others alone.
+
+The function \fBfield_opts_off\fR turns off the given option bits, and leaves
+others alone.
+
+The function \fBfield_opts\fR returns the field's current option bits.
+
+The following options are defined (all are on by default):
+.TP 5
+O_VISIBLE
+The field is displayed. If this option is off, display of the field is
+suppressed.
+.TP 5
+O_ACTIVE
+The field is visited during processing. If this option is off, the field will
+not be reachable by navigation keys. Please notice that an invisible field
+appears to be inactive also.
+.TP 5
+O_PUBLIC
+The field contents are displayed as data is entered.
+.TP 5
+O_EDIT
+The field can be edited.
+.TP 5
+O_WRAP
+Words that don't fit on a line are wrapped to the next line. Words are
+blank-separated.
+.TP 5
+O_BLANK
+The field is cleared whenever a character is entered at the first position.
+.TP 5
+O_AUTOSKIP
+Skip to the next field when this one fills.
+.TP 5
+O_NULLOK
+Allow a blank field.
+.TP 5
+O_STATIC
+Field buffers are fixed to field's original size.
+.TP 5
+O_PASSOK
+Validate field only if modified by user.
+.SH RETURN VALUE
+Except for \fBfield_opts\fR, each routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_CURRENT\fR
+The field is the current field.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.TP 5
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_userptr.3x b/Build/source/libs/ncurses/man/form_field_userptr.3x
new file mode 100644
index 00000000000..2aba2083bc0
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_userptr.3x
@@ -0,0 +1,73 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_userptr.3x,v 1.6 1998/11/29 01:07:05 Rick.Ohnemus Exp $
+.TH form_field_userptr 3X ""
+.SH NAME
+\fBform_field_userptr\fR - associate application data with a form field
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_userptr(FIELD *field, void*userptr);
+.br
+void *field_userptr(const FIELD *field);
+.br
+.SH DESCRIPTION
+Every form field has a field that can be used to hold application-specific data
+(that is, the form-driver code leaves it alone). These functions get and set
+that field.
+.SH RETURN VALUE
+The function \fBfield_userptr\fR returns \fBNULL\fR on error. The function
+\fBset_field_userptr\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+
+The user pointer should be a void pointer. We leave it as a char pointer for
+SVr4 compatibility.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_field_validation.3x b/Build/source/libs/ncurses/man/form_field_validation.3x
new file mode 100644
index 00000000000..c82abf3c107
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_field_validation.3x
@@ -0,0 +1,144 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_field_validation.3x,v 1.14 2003/05/10 20:33:49 jmc Exp $
+.TH form_field_validation 3X ""
+.SH NAME
+\fBform_field_validation\fR - data type validation for fields
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_type(FIELD *field, FIELDTYPE *type, ...);
+.br
+FIELDTYPE *field_type(const FIELD *field);
+.br
+void *field_arg(const FIELD *field);
+.sp
+FIELDTYPE *TYPE_ALNUM;
+.br
+FIELDTYPE *TYPE_ALPHA;
+.br
+FIELDTYPE *TYPE_ENUM;
+.br
+FIELDTYPE *TYPE_INTEGER;
+.br
+FIELDTYPE *TYPE_NUMERIC;
+.br
+FIELDTYPE *TYPE_REGEXP;
+.br
+FIELDTYPE *TYPE_IPV4;
+.br
+.SH DESCRIPTION
+The function \fBset_field_type\fR declares a data type for a given form field.
+This is the type checked by validation functions.
+The predefined types are as follows:
+.TP 5
+TYPE_ALNUM
+Alphanumeric data. Requires a third \fBint\fR argument, a minimum field width.
+.TP 5
+TYPE_ALPHA
+Character data. Requires a third \fBint\fR argument, a minimum field width.
+.TP 5
+TYPE_ENUM
+Accept one of a specified set of strings. Requires a third \fB(char **)\fR
+argument pointing to a string list; a fourth \fBint\fR flag argument to enable
+case-sensitivity; and a fifth \fBint\fR flag argument specifying whether a partial
+match must be a unique one (if this flag is off, a prefix matches the first
+of any set of more than one list elements with that prefix). Please notice
+that the string list is not copied, only a reference to it is stored in the
+field. So you should avoid using a list that lives in automatic variables
+on the stack.
+.TP 5
+TYPE_INTEGER
+Integer data, parsable to an integer by \fBatoi(3)\fR. Requires a third
+\fBint\fR argument controlling the precision, a fourth \fBlong\fR argument
+constraining minimum value, and a fifth \fBlong\fR constraining maximum value.
+If the maximum value is less than or equal to the minimum value, the range is
+simply ignored. On return the field buffer is formatted according to the
+\fBprintf\fR format specification ".*ld", where the '*' is replaced by the
+precision argument.
+For details of the precision handling see \fBprintf's\fR man-page.
+.TP 5
+TYPE_NUMERIC
+Numeric data (may have a decimal-point part). Requires a third
+\fBint\fR argument controlling the precision, a fourth \fBdouble\fR
+argument constraining minimum value, and a fifth \fBdouble\fR constraining
+maximum value. If your system supports locales, the decimal point character
+to be used must be the one specified by your locale.
+If the maximum value is less than or equal to the minimum value, the range is
+simply ignored. On return the field buffer is formatted according to the
+\fBprintf\fR format specification ".*f", where the '*' is replaced by the
+precision argument.
+For details of the precision handling see \fBprintf's\fR man-page.
+.TP 5
+TYPE_REGEXP
+Regular expression data. Requires a regular expression \fB(char *)\fR third argument;
+the data is valid if the regular expression matches it. Regular expressions
+are in the format of \fBregcomp\fR(3X) and \fBregexec\fR(3X). Please notice
+that the regular expression must match the whole field. If you have for
+example an eight character wide field, a regular expression "^[0-9]*$" always
+means that you have to fill all eight positions with digits. If you want to
+allow fewer digits, you may use for example "^[0-9]* *$" which is good for
+trailing spaces (up to an empty field), or "^ *[0-9]* *$" which is good for
+leading and trailing spaces around the digits.
+.TP 5
+TYPE_IPV4
+An Internet Protocol Version 4 address. This requires no additional argument. It
+is checked whether or not the buffer has the form a.b.c.d, where a,b,c and d are
+numbers between 0 and 255. Trailing blanks in the buffer are ignored. The address
+itself is not validated. Please note that this is an ncurses extension. This
+field type may not be available in other curses implementations.
+.PP
+It is possible to set up new programmer-defined field types. See the
+\fBform_fieldtype\fR(3X) manual page.
+.SH RETURN VALUE
+The functions \fBfield_type\fR and \fBfield_arg\fR return \fBNULL\fR on
+error. The function \fBset_field_type\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_fieldtype.3x b/Build/source/libs/ncurses/man/form_fieldtype.3x
new file mode 100644
index 00000000000..979258a2ba9
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_fieldtype.3x
@@ -0,0 +1,135 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_fieldtype.3x,v 1.12 2003/05/10 20:33:49 jmc Exp $
+.TH form_fieldtype 3X ""
+.SH NAME
+\fBform_fieldtype\fR - define validation-field types
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+FIELDTYPE *new_fieldtype(
+ bool (* const field_check)(FIELD *, const void *),
+ bool (* const char_check)(int, const void *));
+.br
+int free_fieldtype(FIELDTYPE *fieldtype);
+.br
+int set_fieldtype_arg(
+ FIELDTYPE *fieldtype,
+ void *(* const make_arg)(va_list *),
+ void *(* const copy_arg)(const void *),
+ void (* const free_arg)(void *));
+.br
+int set_fieldtype_choice(
+ FIELDTYPE *fieldtype,
+ bool (* const next_choice)(FIELD *, const void *),
+ bool (* const prev_choice)(FIELD *, const void *));
+.br
+FIELDTYPE *link_fieldtype(FIELDTYPE *type1,
+ FIELDTYPE *type2);
+.br
+.SH DESCRIPTION
+The function \fBnew_fieldtype\fR creates a new field type usable for data
+validation. You supply it with \fIfield_check\fR, a predicate to check the
+validity of an entered data string whenever the user attempts to leave a field.
+The (FIELD *) argument is passed in so the validation predicate can see the
+field's buffer, sizes and other attributes; the second argument is an
+argument-block structure, about which more below.
+
+You also supply \fBnew_fieldtype\fR with \fIchar_check\fR,
+a function to validate input characters as they are entered; it will be passed
+the character to be checked and a pointer to an argument-block structure.
+
+The function \fBfree_fieldtype\fR frees the space allocated for a given
+validation type.
+
+The function \fBset_fieldtype_arg\fR associates three storage-management functions
+with a field type.
+The \fImake_arg\fR function is automatically applied to the
+list of arguments you give \fBset_field_type\fR when attaching validation
+to a field; its job is to bundle these into an allocated argument-block
+object which can later be passed to validation predicated.
+The other two hook arguments should copy and free argument-block structures.
+They will be used by the forms-driver code.
+You must supply the \fImake_arg\fR function,
+the other two are optional, you may supply NULL for them.
+In this case it is assumed
+that \fImake_arg\fR does not allocate memory but simply loads the
+argument into a single scalar value.
+
+The function \fBlink_fieldtype\fR creates
+a new field type from the two given types.
+They are connected by an logical 'OR'.
+
+The form driver requests \fBREQ_NEXT_CHOICE\fR and \fBREQ_PREV_CHOICE\fR assume
+that the possible values of a field form an ordered set, and provide the forms
+user with a way to move through the set.
+The \fBset_fieldtype_choice\fR
+function allows forms programmers to define successor and predecessor functions
+for the field type.
+These functions take the field pointer and an
+argument-block structure as arguments.
+.SH RETURN VALUE
+The pointer-valued routines return NULL on error.
+
+The integer-valued routines return one of the following codes on
+error:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_CONNECTED\fR
+The field is already connected to a form.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+
+All of the \fB(char *)\fR arguments of these functions should actually be
+\fB(void *)\fR. The type has been left uncorrected for strict compatibility
+with System V.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_hook.3x b/Build/source/libs/ncurses/man/form_hook.3x
new file mode 100644
index 00000000000..19c1b9fbd7a
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_hook.3x
@@ -0,0 +1,100 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_hook.3x,v 1.6 1999/03/20 22:37:15 Todd.Miller Exp $
+.TH form_hook 3X ""
+.SH NAME
+\fBform_hook\fR - set hooks for automatic invocation by applications
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_field_init(FORM *form, void (*func)(FORM *));
+.br
+void (*)(FORM *) field_init(const FORM *form);
+.br
+int set_field_term(FORM *form, void (*func)(FORM *));
+.br
+void (*)(FORM *) field_term(const FORM *form);
+.br
+int set_form_init(FORM *form, void (*func)(FORM *));
+.br
+void (*)(FORM *) form_init(const FORM *form);
+.br
+int set_form_term(FORM *form, void (*func)(FORM *));
+.br
+void (*)(FORM *) form_term(const FORM *form);
+.br
+.SH DESCRIPTION
+These functions make it possible to set hook functions to be called at various
+points in the automatic processing of input event codes by \fBform_driver\fR.
+
+The function \fBset_field_init\fR sets a hook to be called at form-post time
+and each time the selected field changes (after the change). \fBfield_init\fR
+returns the current field init hook, if any (\fBNULL\fR if there is no such
+hook).
+
+The function \fBset_field_term\fR sets a hook to be called at form-unpost time
+and each time the selected field changes (before the change). \fBfield_term\fR
+returns the current field term hook, if any (\fBNULL\fR if there is no such
+hook).
+
+The function \fBset_form_init\fR sets a hook to be called at form-post time and
+just after a page change once it is posted. \fBform_init\fR returns the
+current form init hook, if any (\fBNULL\fR if there is no such hook).
+
+The function \fBset_form_term\fR sets a hook to be called at form-unpost time
+and just before a page change once it is posted. \fBform_init\fR
+returns the current form term hook, if any (\fBNULL\fR if there is no such
+hook).
+.SH RETURN VALUE
+Routines that return pointers return \fBNULL\fR on error. Other routines
+return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_new.3x b/Build/source/libs/ncurses/man/form_new.3x
new file mode 100644
index 00000000000..0f4c5015d11
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_new.3x
@@ -0,0 +1,79 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_new.3x,v 1.5 1998/11/29 01:07:37 Rick.Ohnemus Exp $
+.TH form_new 3X ""
+.SH NAME
+\fBform_new\fR - create and destroy forms
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+FORM *new_form(FIELD **fields);
+.br
+int free_form(FORM *form);
+.br
+.SH DESCRIPTION
+The function \fBnew_form\fR creates a new form connected to a specified field
+pointer array (which must be \fBNULL\fR-terminated).
+
+The function \fBfree_form\fR disconnects \fIform\fR from its field array
+and frees the storage allocated for the form.
+.SH RETURN VALUE
+The function \fBnew_form\fR returns \fBNULL\fR on error.
+
+The function \fBfree_form\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The form has already been posted.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_new_page.3x b/Build/source/libs/ncurses/man/form_new_page.3x
new file mode 100644
index 00000000000..432f624f529
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_new_page.3x
@@ -0,0 +1,77 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_new_page.3x,v 1.6 2002/01/19 22:48:51 tom Exp $
+.TH form_new_page 3X ""
+.SH NAME
+\fBform_new_page\fR - form pagination functions
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_new_page(FIELD *field, bool new_page_flag);
+.br
+bool new_page(const FIELD *field);
+.br
+.SH DESCRIPTION
+The function \fBset_new_page\fR sets or resets a flag marking the given field
+as the beginning of a new page on its form.
+
+The function \fBnew_page\fR is a predicate which tests if a given field marks
+a page beginning on its form.
+.SH RETURN VALUE
+The function \fBnew_page\fR returns \fBTRUE\fR or \fBFALSE\fR.
+
+The function \fBset_new_page\fR return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_CONNECTED\fR
+The given field is already connected to a form.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_opts.3x b/Build/source/libs/ncurses/man/form_opts.3x
new file mode 100644
index 00000000000..7921b377256
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_opts.3x
@@ -0,0 +1,90 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_opts.3x,v 1.6 1998/11/29 01:07:53 Rick.Ohnemus Exp $
+.TH form_opts 3X ""
+.SH NAME
+\fBform_opts\fR - set and get form options
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_form_opts(FORM *form, OPTIONS opts);
+.br
+int form_opts_on(FORM *form, OPTIONS opts);
+.br
+int form_opts_off(FORM *form, OPTIONS opts);
+.br
+OPTIONS form_opts(const FORM *form);
+.br
+.SH DESCRIPTION
+The function \fBset_form_opts\fR sets all the given form's option bits (form
+option bits may be logically-OR'ed together).
+
+The function \fBform_opts_on\fR turns on the given option bits, and leaves
+others alone.
+
+The function \fBform_opts_off\fR turns off the given option bits, and leaves
+others alone.
+
+The function \fBform_opts\fR returns the form's current option bits.
+
+The following options are defined (all are on by default):
+.TP 5
+O_NL_OVERLOAD
+Overload the \fBREQ_NEW_LINE\fR forms driver request so that calling it at the
+end of a field goes to the next field.
+.TP 5
+O_BS_OVERLOAD
+Overload the \fBREQ_DEL_PREV\fR forms driver request so that calling it at the
+beginning of a field goes to the previous field.
+.SH RETURN VALUE
+Except for \fBform_opts\fR, each routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_page.3x b/Build/source/libs/ncurses/man/form_page.3x
new file mode 100644
index 00000000000..4b5d15aec18
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_page.3x
@@ -0,0 +1,95 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_page.3x,v 1.8 1998/11/29 01:08:02 Rick.Ohnemus Exp $
+.TH form_page 3X ""
+.SH NAME
+\fBform_page\fR - set and get form page number
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_current_field(FORM *form, FIELD *field);
+.br
+FIELD *current_field(const FORM *);
+.br
+int set_form_page(FORM *form, int n);
+.br
+int form_page(const FORM *form);
+.br
+int field_index(const FIELD *field);
+.br
+.SH DESCRIPTION
+The function \fBset_current field\fR sets the current field of the given
+form; \fBcurrent_field\fR returns the current field of the given form.
+.PP
+The function \fBset_form_page\fR sets the form's page number (goes to page
+\fIn\fR of the form).
+.PP
+The function \fBform_page\fR returns the form's current page number.
+.PP
+The function \fBfield_index\fR returns the index of the field in the
+field array of the form it is connected to. It returns \fBERR\fR if
+the argument is the null pointer or the field is not connected.
+.SH RETURN VALUE
+Except for \fBform_page\fR, each routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_INVALID_FIELD\fR
+Contents of a field are not valid.
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The form driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_post.3x b/Build/source/libs/ncurses/man/form_post.3x
new file mode 100644
index 00000000000..56e86ab9469
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_post.3x
@@ -0,0 +1,90 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_post.3x,v 1.4 1998/11/29 01:08:10 Rick.Ohnemus Exp $
+.TH form_post 3X ""
+.SH NAME
+\fBform_post\fR - write or erase forms from associated subwindows
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int post_form(FORM *form);
+.br
+int unpost_form(FORM *form);
+.br
+.SH DESCRIPTION
+The function \fBpost_form\fR displays a form to its associated subwindow. To
+trigger physical display of the subwindow, use \fBrefresh\fR or some equivalent
+\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR
+input request will do).
+
+The function \fBunpost_form\fR erases form from its associated subwindow.
+.SH RETURN VALUE
+These routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The form has already been posted.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NO_ROOM\fR
+Form is too large for its window.
+.TP 5
+\fBE_NOT_POSTED\fR
+The form has not been posted.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the form.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_requestname.3x b/Build/source/libs/ncurses/man/form_requestname.3x
new file mode 100644
index 00000000000..df1f701b382
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_requestname.3x
@@ -0,0 +1,69 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_requestname.3x,v 1.6 1998/11/29 01:08:18 Rick.Ohnemus Exp $
+.TH form_requestname 3X ""
+.SH NAME
+\fBform_requestname\fR - handle printable form request names
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+const char *form_request_name(int request);
+.br
+int form_request_by_name(const char *name);
+.br
+.SH DESCRIPTION
+The function \fBform_request_name\fR returns the printable name of a form
+request code.
+.br
+The function \fBform_request_by_name\fR searches in the name-table for a request
+with the given name and returns its request code. Otherwise E_NO_MATCH is returned.
+.SH RETURN VALUE
+\fBform_request_name\fR returns \fBNULL\fR on error and sets errno
+to \fBE_BAD_ARGUMENT\fR.
+.br
+\fBform_request_by_name\fR returns \fBE_NO_MATCH\fR on error.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_userptr.3x b/Build/source/libs/ncurses/man/form_userptr.3x
new file mode 100644
index 00000000000..00e3d71aa40
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_userptr.3x
@@ -0,0 +1,73 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_userptr.3x,v 1.9 1998/11/29 01:08:39 Rick.Ohnemus Exp $
+.TH form_userptr 3X ""
+.SH NAME
+\fBform_userptr\fR - associate application data with a form item
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_form_userptr(FORM *form, void *userptr);
+.br
+void* form_userptr(const FORM *form);
+.br
+.SH DESCRIPTION
+Every form and every form item has a field that can be used to hold
+application-specific data (that is, the form-driver code leaves it alone).
+These functions get and set the form user pointer field.
+.SH RETURN VALUE
+The function \fBform_userptr\fR returns \fBNULL\fR on error.
+The function \fBset_form_userptr\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+
+The user pointer should be a void pointer. We leave it as a char pointer for
+SVr4 compatibility.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/form_win.3x b/Build/source/libs/ncurses/man/form_win.3x
new file mode 100644
index 00000000000..e5659702886
--- /dev/null
+++ b/Build/source/libs/ncurses/man/form_win.3x
@@ -0,0 +1,95 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: form_win.3x,v 1.8 1999/04/10 23:36:08 tom Exp $
+.TH form_win 3X ""
+.SH NAME
+\fBform_win\fR - make and break form window and subwindow associations
+.SH SYNOPSIS
+\fB#include <form.h>\fR
+.br
+int set_form_win(FORM *form, WINDOW *win);
+.br
+WINDOW *form_win(const FORM *form);
+.br
+int set_form_sub(FORM *form, WINDOW *sub);
+.br
+WINDOW *form_sub(const FORM *form);
+.br
+int scale_form(const FORM *form, int *rows, int *columns);
+.br
+.SH DESCRIPTION
+Every form has an associated pair of \fBcurses\fR windows. The form window
+displays any title and border associated with the window; the form subwindow
+displays the items of the form that are currently available for selection.
+
+The first four functions get and set those windows. It is not necessary to set
+either window; by default, the driver code uses \fBstdscr\fR for both.
+
+In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though
+it were \fBstsdcr\fR. A form argument of \fBNULL\fR is treated as a request
+to change the system default form window or subwindow.
+
+The function \fBscale_form\fR returns the minimum size required for the
+subwindow of \fIform\fR.
+.SH RETURN VALUE
+Routines that return pointers return \fBNULL\fR on error. Routines that return
+an integer return one of the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The form has already been posted.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the form.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBform\fR(3X).
+.SH NOTES
+The header file \fB<form.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V forms library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/infocmp.1m b/Build/source/libs/ncurses/man/infocmp.1m
new file mode 100644
index 00000000000..1bf6498032e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/infocmp.1m
@@ -0,0 +1,424 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: infocmp.1m,v 1.39 2004/08/28 22:43:49 tom Exp $
+.TH infocmp 1M ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+\fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions
+.SH SYNOPSIS
+\fBinfocmp\fR [\fB-\
+1\
+C\
+E\
+F\
+G\
+I\
+L\
+T\
+V\
+c\
+d\
+e\
+g\
+i\
+l\
+n\
+p\
+q\
+r\
+t\
+u\
+x\
+\fR]
+.br
+ [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB-R \fR\fBsubset\fR]
+.br
+ [\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR]
+.br
+ [\fItermname\fR...]
+.SH DESCRIPTION
+\fBinfocmp\fR can be used to compare a binary \fBterminfo\fR entry with other
+terminfo entries, rewrite a \fBterminfo\fR description to take advantage of the
+\fBuse=\fR terminfo field, or print out a \fBterminfo\fR description from the
+binary file (\fBterm\fR) 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.
+.SS Default Options
+If no options are specified and zero or one \fItermnames\fR are specified, the
+\fB-I\fR option will be assumed. If more than one \fItermname\fR is specified,
+the \fB-d\fR option will be assumed.
+.SS Comparison Options [-d] [-c] [-n]
+\fBinfocmp\fR compares the \fBterminfo\fR description of the first terminal
+\fItermname\fR with each of the descriptions given by the entries for the other
+terminal's \fItermnames\fR. If a capability is defined for only one of the
+terminals, the value returned will depend on the type of the capability:
+\fBF\fR for boolean variables, \fB-1\fR for integer variables, and \fBNULL\fR
+for string variables.
+
+The \fB-d\fR option produces a list of each capability that is different
+between two entries. This option is useful to show the difference between two
+entries, created by different people, for the same or similar terminals.
+
+The \fB-c\fR option produces a list of each capability that is common between
+two entries. Capabilities that are not set are ignored. This option can be
+used as a quick check to see if the \fB-u\fR option is worth using.
+
+The \fB-n\fR option produces a list of each capability that is in neither
+entry. If no \fItermnames\fR are given, the environment variable \fBTERM\fR
+will be used for both of the \fItermnames\fR. This can be used as a quick
+check to see if anything was left out of a description.
+.SS Source Listing Options [-I] [-L] [-C] [-r]
+The \fB-I\fR, \fB-L\fR, and \fB-C\fR options will produce a source listing for
+each terminal named.
+
+.TS
+center tab(/) ;
+l l .
+\fB-I\fR/use the \fBterminfo\fR names
+\fB-L\fR/use the long C variable name listed in <\fBterm.h\fR>
+\fB-C\fR/use the \fBtermcap\fR names
+\fB-r\fR/when using \fB-C\fR, put out all capabilities in \fBtermcap\fR form
+.TE
+
+If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be
+used for the terminal name.
+
+The source produced by the \fB-C\fR option may be used directly as a
+\fBtermcap\fR entry, but not all parameterized strings can be changed to
+the \fBtermcap\fR format. \fBinfocmp\fR will attempt to convert most of the
+parameterized information, and anything not converted will be plainly marked in
+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 \fBtermcap\fR expects it. Mandatory
+padding (padding information with a trailing '/') will become optional.
+
+All \fBtermcap\fR variables no longer supported by \fBterminfo\fR, but which
+are derivable from other \fBterminfo\fR variables, will be output. Not all
+\fBterminfo\fR capabilities will be translated; only those variables which were
+part of \fBtermcap\fR will normally be output. Specifying the \fB-r\fR option
+will take off this restriction, allowing all capabilities to be output in
+\fItermcap\fR form.
+
+Note that because padding is collected to the beginning of the capability, not
+all capabilities are output. Mandatory padding is not supported. Because
+\fBtermcap\fR strings are not as flexible, it is not always possible to convert
+a \fBterminfo\fR string capability into an equivalent \fBtermcap\fR format. A
+subsequent conversion of the \fBtermcap\fR file back into \fBterminfo\fR format
+will not necessarily reproduce the original \fBterminfo\fR
+source.
+
+Some common \fBterminfo\fR parameter sequences, their \fBtermcap\fR
+equivalents, and some terminal types which commonly have such sequences, are:
+
+.TS
+center tab(/) ;
+l c l
+l l l.
+\fBterminfo/termcap\fR/Representative Terminals
+=
+\fB%p1%c/%.\fR/adm
+\fB%p1%d/%d\fR/hp, ANSI standard, vt100
+\fB%p1%'x'%+%c/%+x\fR/concept
+\fB%i/%i\fRq/ANSI standard, vt100
+\fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fR/concept
+\fB%p2\fR is printed before \fB%p1/%r\fR/hp
+.TE
+.SS Use= Option [-u]
+The \fB-u\fR option produces a \fBterminfo\fR source description of the first
+terminal \fItermname\fR which is relative to the sum of the descriptions given
+by the entries for the other terminals \fItermnames\fR. It does this by
+analyzing the differences between the first \fItermname\fR and the other
+\fItermnames\fR and producing a description with \fBuse=\fR 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 \fBinfocmp\fR will show what can be done to change
+one description to be relative to the other.
+
+A capability will get printed with an at-sign (@) if it no longer exists in the
+first \fItermname\fR, but one of the other \fItermname\fR entries contains a
+value for it. A capability's value gets printed if the value in the first
+\fItermname\fR is not found in any of the other \fItermname\fR entries, or if
+the first of the other \fItermname\fR entries that has this capability gives a
+different value for the capability than that in the first \fItermname\fR.
+
+The order of the other \fItermname\fR entries is significant. Since the
+terminfo compiler \fBtic\fR does a left-to-right scan of the capabilities,
+specifying two \fBuse=\fR entries that contain differing entries for the same
+capabilities will produce different results depending on the order that the
+entries are given in. \fBinfocmp\fR will flag any such inconsistencies between
+the other \fItermname\fR entries as they are found.
+
+Alternatively, specifying a capability \fIafter\fR a \fBuse=\fR entry that
+contains that capability will cause the second specification to be ignored.
+Using \fBinfocmp\fR to recreate a description can be a useful check to make
+sure that everything 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 specifying extra \fBuse=\fR fields that are
+superfluous. \fBinfocmp\fR will flag any other \fItermname use=\fR fields that
+were not needed.
+.SS Changing Databases [-A \fIdirectory\fR] [-B \fIdirectory\fR]
+The location of the compiled \fBterminfo\fR database is taken from the
+environment variable \fBTERMINFO\fR . If the variable is not defined, or the
+terminal is not found in that location, the system \fBterminfo\fR database,
+in \fB@TERMINFO@\fR, will be used. The options \fB-A\fR
+and \fB-B\fR may be used to override this location. The \fB-A\fR option will
+set \fBTERMINFO\fR for the first \fItermname\fR and the \fB-B\fR option will
+set \fBTERMINFO\fR for the other \fItermnames\fR. With this, it is possible to
+compare descriptions for a terminal with the same name located in two different
+databases. This is useful for comparing descriptions for the same terminal
+created by different people.
+.SS Other Options
+.TP 5
+\fB-1\fR
+causes the fields to be printed out one to a line. Otherwise,
+the fields will be printed several to a line to a maximum width
+of 60 characters.
+.TP
+\fB-a\fR
+tells \fBinfocmp\fP to retain commented-out capabilities rather than discarding
+them. Capabilities are commented by prefixing them with a period.
+.TP 5
+\fB-E\fR
+Dump the capabilities of the given terminal as tables, needed in
+the C initializer for a
+TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR).
+This option is useful for preparing versions 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.
+.sp
+Before ncurses 5.0, the split between the \fB-e\fP and \fB-E\fP
+options was not needed; but support for extended names required making
+the arrays of terminal capabilities separate from the TERMTYPE structure.
+.TP 5
+\fB-e\fR
+Dump the capabilities of the given terminal as a C initializer for a
+TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR).
+This option is useful for preparing versions of the curses library hardwired
+for a given terminal type.
+.TP 5
+\fB-F\fR
+compare terminfo files. This assumes that two following arguments are
+filenames. The files are searched for pairwise matches between
+entries, with two entries considered to match if any of their names do.
+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 differences, but resolution can be forced
+by also specifying \fB-r\fR.
+.TP 5
+\fB-f\fR
+Display complex terminfo strings which contain if/then/else/endif expressions
+indented for readability.
+.TP 5
+\fB-G\fR
+Display constant literals in decimal form
+rather than their character equivalents.
+.TP 5
+\fB-g\fR
+Display constant character literals in quoted form
+rather than their decimal equivalents.
+.TP 5
+\fB-i\fR
+Analyze the initialization (\fBis1\fR, \fBis2\fR, \fBis3\fR), and reset
+(\fBrs1\fR, \fBrs2\fR, \fBrs3\fR), strings in the entry. For each string, the
+code tries to analyze it into actions in terms of the other capabilities in the
+entry, certain X3.64/ISO 6429/ECMA-48 capabilities, and certain DEC VT-series
+private modes (the set of recognized special 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 recognized actions
+translated into {}-bracketed descriptions. Here is a list of the DEC/ANSI
+special sequences recognized:
+
+.TS
+center tab(/) ;
+l l
+l l.
+Action/Meaning
+=
+RIS/full reset
+SC/save cursor
+RC/restore cursor
+LL/home-down
+RSR/reset scroll region
+
+DECSTR/soft reset (VT320)
+S7C1T/7-bit controls (VT220)
+
+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
+
+ECMA[+-]AM/keyboard action mode
+ECMA[+-]IRM/insert replace mode
+ECMA[+-]SRM/send receive mode
+ECMA[+-]LNM/linefeed 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
+.TE
+.sp
+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}).
+.TP 5
+\fB-l\fR
+Set output format to terminfo.
+.TP 5
+\fB-p\fR
+Ignore padding specifications when comparing strings.
+.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 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
+with termcap equivalents recognized by 4.4BSD.
+.TP
+\fB-s \fR\fI[d|i|l|c]\fR
+The \fB-s\fR option sorts the fields within each type according to the argument
+below:
+.br
+.RS 5
+.TP 5
+\fBd\fR
+leave fields in the order that they are stored in the \fIterminfo\fR database.
+.TP 5
+\fBi\fR
+sort by \fIterminfo\fR name.
+.TP 5
+\fBl\fR
+sort by the long C variable name.
+.TP 5
+\fBc\fR
+sort by the \fItermcap\fR name.
+.RE
+.IP
+If the \fB-s\fR option is not given, the fields printed out will be
+sorted alphabetically by the \fBterminfo\fR name within each type,
+except in the case of the \fB-C\fR or the \fB-L\fR options, which cause the
+sorting to be done by the \fBtermcap\fR name or the long C variable
+name, respectively.
+.TP 5
+\fB-T\fR
+eliminates size-restrictions on the generated text.
+This is mainly useful for testing and analysis, since the compiled
+descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
+.TP
+\fB-t\fR
+tells \fBtic\fP to discard commented-out capabilities.
+Normally when translating from terminfo to termcap,
+untranslatable capabilities are commented-out.
+.TP 5
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.TP 5
+\fB-v\fR \fIn\fR
+prints out tracing information on standard error as the program runs.
+Higher values of n induce greater verbosity.
+.TP 5
+\fB-w\fR \fIwidth\fR
+changes the output to \fIwidth\fR characters.
+.TP
+\fB-x\fR
+print information for user-defined capabilities.
+These are extensions to the terminfo repertoire which can be loaded
+using the \fB-x\fR option of \fBtic\fP.
+.SH FILES
+.TP 20
+\*d
+Compiled terminal description database.
+.SH EXTENSIONS
+The
+\fB-E\fR,
+\fB-F\fR,
+\fB-G\fR,
+\fB-R\fR,
+\fB-T\fR,
+\fB-V\fR,
+\fB-a\fR,
+\fB-e\fR,
+\fB-f\fR,
+\fB-g\fR,
+\fB-i\fR,
+\fB-l\fR,
+\fB-p\fR,
+\fB-q\fR and
+\fB-t\fR
+options are not supported in SVr4 curses.
+
+The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's.
+Actual BSD curses versions will have a more restricted set. To see only the
+4.4BSD set, use \fB-r\fR \fB-RBSD\fR.
+.SH BUGS
+The \fB-F\fR option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode.
+.SH SEE ALSO
+\fBinfocmp\fR(1M), \fBcaptoinfo\fR(1M), \fBinfotocap\fR(1M),
+\fBtic\fR(1M), \fBtoe\fR(1M),
+\fBcurses\fR(3X), \fBterminfo\fR(\*n).
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/infotocap.1m b/Build/source/libs/ncurses/man/infotocap.1m
new file mode 100644
index 00000000000..e1dacc63ad0
--- /dev/null
+++ b/Build/source/libs/ncurses/man/infotocap.1m
@@ -0,0 +1,74 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1999-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: infotocap.1m,v 1.5 2004/07/05 13:16:08 tom Exp $
+.TH infotocap 1M ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+\fBinfotocap\fR - convert a \fIterminfo\fR description into a \fItermcap\fR description
+.SH SYNOPSIS
+\fBinfotocap\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . .
+.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/Build/source/libs/ncurses/man/key_defined.3x b/Build/source/libs/ncurses/man/key_defined.3x
new file mode 100644
index 00000000000..a0bf8bb4109
--- /dev/null
+++ b/Build/source/libs/ncurses/man/key_defined.3x
@@ -0,0 +1,60 @@
+.\"***************************************************************************
+.\" Copyright (c) 2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 2003
+.\"
+.\" $Id: key_defined.3x,v 1.3 2004/06/05 19:19:09 tom Exp $
+.TH key_defined 3X ""
+.SH NAME
+\fBkey_defined\fP \- check if a keycode is defined
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBint key_defined(const char *definition);\fP
+.SH DESCRIPTION
+This is an extension to the curses library.
+It permits an application to determine if a string is currently bound
+to any keycode.
+.SH RETURN VALUE
+If the string is bound to a keycode, its value (greater than zero) is returned.
+If no keycode is bound, zero is returned.
+If the string conflicts with longer strings which are bound to keys, -1 is returned.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBdefine_key\fR(3X).
+.SH AUTHOR
+Thomas Dickey.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/keybound.3x b/Build/source/libs/ncurses/man/keybound.3x
new file mode 100644
index 00000000000..61074e436f7
--- /dev/null
+++ b/Build/source/libs/ncurses/man/keybound.3x
@@ -0,0 +1,64 @@
+.\"***************************************************************************
+.\" Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1999
+.\"
+.\" $Id: keybound.3x,v 1.5 2003/10/25 20:33:16 tom Exp $
+.TH keyok 3X ""
+.SH NAME
+\fBkeybound\fP \- return definition of keycode
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBchar * keybound(int keycode, int count);\fP
+.SH DESCRIPTION
+This is an extension to the curses library.
+It permits an application to determine the string which is defined
+in the terminfo for specific keycodes.
+.SH RETURN VALUE
+The \fIkeycode\fP parameter must be greater than zero, else NULL is returned.
+If it does not correspond to a defined key, then NULL is returned.
+The \fIcount\fP parameter is used to allow the application to iterate
+through multiple definitions, counting from zero.
+When successful,
+the function returns a string which must be freed by the caller.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBdefine_key\fR(3X),
+\fBkeyok\fR(3X).
+.SH AUTHOR
+Thomas Dickey.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/keyok.3x b/Build/source/libs/ncurses/man/keyok.3x
new file mode 100644
index 00000000000..f9209089a7a
--- /dev/null
+++ b/Build/source/libs/ncurses/man/keyok.3x
@@ -0,0 +1,63 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1997
+.\"
+.\" $Id: keyok.3x,v 1.8 2003/10/25 20:41:08 tom Exp $
+.TH keyok 3X ""
+.SH NAME
+\fBkeyok\fP \- enable or disable a keycode
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBint keyok(int keycode, bool enable);\fP
+.SH DESCRIPTION
+This is an extension to the curses library.
+It permits an application to disable specific keycodes, rather than
+use the \fIkeypad\fP function to disable all keycodes.
+Keys that have been disabled can be reenabled.
+.SH RETURN VALUE
+The keycode must be greater than zero, else ERR is returned.
+If it does not correspond to a defined key, then ERR is returned.
+If the \fIenable\fP parameter is true, then the key must have been disabled,
+and vice versa.
+Otherwise, the function returns OK.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH SEE ALSO
+\fBdefine_key\fR(3X).
+.SH AUTHOR
+Thomas Dickey.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/make_sed.sh b/Build/source/libs/ncurses/man/make_sed.sh
new file mode 100755
index 00000000000..766801d551a
--- /dev/null
+++ b/Build/source/libs/ncurses/man/make_sed.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+# $Id: make_sed.sh,v 1.7 2003/10/25 20:33:16 tom Exp $
+##############################################################################
+# Copyright (c) 1998,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey 1997
+#
+# Construct a sed-script to perform renaming within man-pages. Originally
+# written in much simpler form, this one accounts for the common cases of
+# section-names in man-pages.
+
+if test $# != 1 ; then
+ echo '? expected a single filename'
+ exit 1
+fi
+
+COL=col$$
+INPUT=input$$
+UPPER=upper$$
+SCRIPT=script$$
+RESULT=result$$
+rm -f $UPPER $SCRIPT $RESULT
+trap "rm -f $COL.* $INPUT $UPPER $SCRIPT $RESULT" 0 1 2 5 15
+fgrep -v \# $1 | \
+sed -e 's/[ ][ ]*/ /g' >$INPUT
+
+for F in 1 2 3 4
+do
+sed -e 's/\./ /g' $INPUT | \
+cut -f $F > $COL.$F
+done
+for F in 2 4
+do
+ tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ <$COL.$F >$UPPER
+ mv $UPPER $COL.$F
+done
+paste $COL.* | \
+sed -e 's/^/s\/\\</' \
+ -e 's/$/\//' >$UPPER
+
+# Do the TH lines
+sed -e 's/\//\/TH /' \
+ -e 's/ / /' \
+ -e 's/ / ""\/TH /' \
+ -e 's/ / /' \
+ -e 's/\/$/ ""\//' \
+ $UPPER >>$RESULT
+
+# Do the embedded references
+sed -e 's/</<fB/' \
+ -e 's/ /\\\\fR(/' \
+ -e 's/ /)\/fB/' \
+ -e 's/ /\\\\fR(/' \
+ -e 's/\/$/)\//' \
+ $UPPER >>$RESULT
+
+# Finally, send the result to standard output
+cat $RESULT
diff --git a/Build/source/libs/ncurses/man/man_db.renames b/Build/source/libs/ncurses/man/man_db.renames
new file mode 100644
index 00000000000..ff5546b3c98
--- /dev/null
+++ b/Build/source/libs/ncurses/man/man_db.renames
@@ -0,0 +1,139 @@
+# $Id: man_db.renames,v 0.32 2003/05/31 17:27:11 tom Exp $
+# Manual-page renamings for the man_db program
+#
+# Files:
+captoinfo.1m captoinfo.1
+clear.1 clear.1
+curs_add_wch.3x add_wch.3ncurses
+curs_add_wchstr.3x add_wchstr.3ncurses
+curs_addch.3x addch.3ncurses
+curs_addchstr.3x addchstr.3ncurses
+curs_addstr.3x addstr.3ncurses
+curs_addwstr.3x addwstr.3ncurses
+curs_attr.3x attr.3ncurses
+curs_beep.3x beep.3ncurses
+curs_bkgd.3x bkgd.3ncurses
+curs_bkgrnd.3x bkgrnd.3ncurses
+curs_border.3x border.3ncurses
+curs_border_set.3x border_set.3ncurses
+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_get_wch.3x get_wch.3ncurses
+curs_get_wstr.3x get_wstr.3ncurses
+curs_getcchar.3x getcchar.3ncurses
+curs_getch.3x getch.3ncurses
+curs_getstr.3x getstr.3ncurses
+curs_getyx.3x getyx.3ncurses
+curs_in_wch.3x in_wch.3ncurses
+curs_in_wchstr.3x in_wchstr.3ncurses
+curs_inch.3x inch.3ncurses
+curs_inchstr.3x inchstr.3ncurses
+curs_initscr.3x initscr.3ncurses
+curs_inopts.3x inopts.3ncurses
+curs_ins_wch.3x ins_wch.3ncurses
+curs_ins_wstr.3x ins_wstr.3ncurses
+curs_insch.3x insch.3ncurses
+curs_insstr.3x insstr.3ncurses
+curs_instr.3x instr.3ncurses
+curs_inwstr.3x inwstr.3ncurses
+curs_kernel.3x kernel.3ncurses
+curs_mouse.3x mouse.3ncurses
+curs_move.3x move.3ncurses
+curs_outopts.3x outopts.3ncurses
+curs_overlay.3x overlay.3ncurses
+curs_pad.3x pad.3ncurses
+curs_print.3x print.3ncurses
+curs_printw.3x printw.3ncurses
+curs_refresh.3x refresh.3ncurses
+curs_scanw.3x scanw.3ncurses
+curs_scr_dump.3x scr_dump.3ncurses
+curs_scroll.3x scroll.3ncurses
+curs_slk.3x slk.3ncurses
+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
+default_colors.3x default_colors.3ncurses
+define_key.3x define_key.3ncurses
+form.3x form.3form
+form_cursor.3x cursor.3form
+form_data.3x data.3form
+form_driver.3x driver.3form
+form_field.3x field.3form
+form_field_attributes.3x field_attributes.3form
+form_field_buffer.3x field_buffer.3form
+form_field_info.3x field_info.3form
+form_field_just.3x field_just.3form
+form_field_new.3x field_new.3form
+form_field_opts.3x field_opts.3form
+form_field_userptr.3x field_userptr.3form
+form_field_validation.3x field_validation.3form
+form_fieldtype.3x fieldtype.3form
+form_hook.3x hook.3form
+form_new.3x new.3form
+form_new_page.3x new_page.3form
+form_opts.3x opts.3form
+form_page.3x page.3form
+form_post.3x post.3form
+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
+key_defined.3x key_defined.3ncurses
+menu.3x menu.3menu
+menu_attributes.3x attributes.3menu
+menu_cursor.3x cursor.3menu
+menu_driver.3x driver.3menu
+menu_format.3x format.3menu
+menu_hook.3x hook.3menu
+menu_items.3x items.3menu
+menu_mark.3x mark.3menu
+menu_new.3x new.3menu
+menu_opts.3x opts.3menu
+menu_pattern.3x pattern.3menu
+menu_post.3x post.3menu
+menu_requestname.3x requestname.3menu
+menu_spacing.3x spacing.3menu
+menu_userptr.3x userptr.3menu
+menu_win.3x win.3menu
+mitem_current.3x menu_current.3menu
+mitem_name.3x menu_name.3menu
+mitem_new.3x menu_new.3menu
+mitem_opts.3x menu_opts.3menu
+mitem_userptr.3x menu_userptr.3menu
+mitem_value.3x menu_value.3menu
+mitem_visible.3x menu_visible.3menu
+ncurses.3x ncurses.3ncurses
+panel.3x panel.3curses
+printf.3s printf.3
+putc.3s putc.3
+resizeterm.3x resizeterm.3ncurses
+scanf.3s scanf.3
+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
+tset.1 tset.1
+vprintf.3s vprintf.3
+wresize.3x wresize.3ncurses
+#
+# Other cross-references:
+addch.3x addch.3ncurses
+can_change_color.3x can_change_color.3ncurses
+curs_attr_get.3x attr_get.3ncurses
+dup_field.3x dup_field.3ncurses
+init_pair.3x init_pair.3ncurses
diff --git a/Build/source/libs/ncurses/man/manlinks.sed b/Build/source/libs/ncurses/man/manlinks.sed
new file mode 100644
index 00000000000..4da7790dfd9
--- /dev/null
+++ b/Build/source/libs/ncurses/man/manlinks.sed
@@ -0,0 +1,101 @@
+# $Id: manlinks.sed,v 1.12 2003/12/20 13:17:56 tom Exp $
+##############################################################################
+# Copyright (c) 2000-2002,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# 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
+#
+# eliminate formatting controls that get in the way
+/^'\\"/d
+/\.\\"/d
+/^\.br/d
+/^\.sp/d
+s/^\.IX//
+s/\\f.//g
+s/[:,]/ /g
+#
+# eliminate unnecessary whitespace, convert multiple blanks to single space
+s/^[ ][ ]*//
+s/[ ][ ]*$//
+s/[ ][ ]*/ /g
+#
+# convert ".SH" into a more manageable form
+s/\.SH[ ][ ]*/.SH_(/
+#
+# in ".SH NAME"
+# change "\-" to "-", eliminate text after "-", and split the remaining lines
+# at each space, making a list of names:
+/^\.SH_(NAME/,/^\.SH_(SYNOPSIS/{
+s/\\-.*/ -/
+/ -/{
+s/ -.*//
+s/ /\
+/g
+}
+/^-/{
+d
+}
+s/ /\
+/g
+}
+#
+# in ".SH SYNOPSIS"
+# remove any line that does not contain a '(', since we only want functions.
+# then strip off return-type of each function.
+# finally, remove the parameter list, which begins with a '('.
+/^\.SH_(SYNOPSIS/,/^\.SH_(DESCRIPTION/{
+/^[^(]*$/d
+# reduce
+# .B "int add_wch( const cchar_t *\fIwch\fB );"
+# to
+# add_wch( const cchar_t *\fIwch\fB );"
+s/^\([^ (]* [^ (]* [*]*\)//g
+s/^\([^ (]* [*]*\)//g
+# trim blanks in case we have
+# void (*) (FORM *) field_init(const FORM *form);
+s/) (/)(/g
+# reduce stuff like
+# void (*)(FORM *) field_init(const FORM *form);
+# to
+# field_init(const FORM *form);
+s/^\(([^)]*)\)\(([^)]*)\)*[ ]*//g
+# rename marker temporarily
+s/\.SH_(/.SH_/
+# kill lines with ");", and trim off beginning of argument list.
+s/[()].*//
+# rename marker back
+s/\.SH_/.SH_(/
+}
+#
+# delete ".SH DESCRIPTION" and following lines
+/^\.SH_(DESCRIPTION/,${
+d
+}
+#
+# delete any remaining directives
+/^\./d
diff --git a/Build/source/libs/ncurses/man/menu.3x b/Build/source/libs/ncurses/man/menu.3x
new file mode 100644
index 00000000000..e81913c43cb
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu.3x
@@ -0,0 +1,190 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2000,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu.3x,v 1.15 2002/01/19 22:48:58 tom Exp $
+.TH menu 3X ""
+.SH NAME
+\fBmenu\fR - curses extension for programming menus
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+.SH DESCRIPTION
+The \fBmenu\fR library provides terminal-independent facilities for composing
+menu systems on character-cell terminals. The library includes: item routines,
+which create and modify menu items; and menu routines, which group items into
+menus, display menus on the screen, and handle interaction with the user.
+
+The \fBmenu\fR library uses the \fBcurses\fR libraries, and a curses
+initialization routine such as \fBinitscr\fR must be called before using any of
+these functions. To use the \fBmenu\fR library, link with the options
+\fB-lmenu -lcurses\fR.
+
+.SS Current Default Values for Item Attributes
+
+The \fBmenu\fR library maintains a default value for item attributes. You can
+get or set this default by calling the appropriate \fBget_\fR or \fBset_\fR
+routine with a \fBNULL\fR item pointer. Changing this default with a
+\fBset_\fR function affects future item creations, but does not change the
+rendering of items already created.
+
+.SS Routine Name Index
+
+The following table lists each \fBmenu\fR routine and the name of
+the manual page on which it is described.
+
+.TS
+l l .
+\fBcurses\fR Routine Name Manual Page Name
+=
+current_item \fBmitem_current\fR(3X)
+free_item \fBmitem_new\fR(3X)
+free_menu \fBmenu_new\fR(3X)
+item_count \fBmenu_items\fR(3X)
+item_description \fBmitem_name\fR(3X)
+item_index \fBmitem_current\fR(3X)
+item_init \fBmenu_hook\fR(3X)
+item_name \fBmitem_name\fR(3X)
+item_opts \fBmitem_opts\fR(3X)
+item_opts_off \fBmitem_opts\fR(3X)
+item_opts_on \fBmitem_opts\fR(3X)
+item_term \fBmenu_hook\fR(3X)
+item_userptr \fBmitem_userptr\fR(3X)
+item_value \fBmitem_value\fR(3X)
+item_visible \fBmitem_visible\fR(3X)
+menu_back \fBmenu_attributes\fR(3X)
+menu_driver \fBmenu_driver\fR(3X)
+menu_fore \fBmenu_attributes\fR(3X)
+menu_format \fBmenu_format\fR(3X)
+menu_grey \fBmenu_attributes\fR(3X)
+menu_init \fBmenu_hook\fR(3X)
+menu_items \fBmenu_items\fR(3X)
+menu_mark \fBmenu_mark\fR(3X)
+menu_opts \fBmenu_opts\fR(3X)
+menu_opts_off \fBmenu_opts\fR(3X)
+menu_opts_on \fBmenu_opts\fR(3X)
+menu_pad \fBmenu_attributes\fR(3X)
+menu_pattern \fBmenu_pattern\fR(3X)
+menu_request_by_name \fBmenu_requestname\fR(3X)
+menu_request_name \fBmenu_requestname\fR(3X)
+menu_spacing \fBmenu_spacing\fR(3X)
+menu_sub \fBmenu_win\fR(3X)
+menu_term \fBmenu_hook\fR(3X)
+menu_userptr \fBmenu_userptr\fR(3X)
+menu_win \fBmenu_win\fR(3X)
+new_item \fBmitem_new\fR(3X)
+new_menu \fBmenu_new\fR(3X)
+pos_menu_cursor \fBmenu_cursor\fR(3X)
+post_menu \fBmenu_post\fR(3X)
+scale_menu \fBmenu_win\fR(3X)
+set_current_item \fBmitem_current\fR(3X)
+set_item_init \fBmenu_hook\fR(3X)
+set_item_opts \fBmitem_opts\fR(3X)
+set_item_term \fBmenu_hook\fR(3X)
+set_item_userptr \fBmitem_userptr\fR(3X)
+set_item_value \fBmitem_value\fR(3X)
+set_menu_back \fBmenu_attributes\fR(3X)
+set_menu_fore \fBmenu_attributes\fR(3X)
+set_menu_format \fBmenu_format\fR(3X)
+set_menu_grey \fBmenu_attributes\fR(3X)
+set_menu_init \fBmenu_hook\fR(3X)
+set_menu_items \fBmenu_items\fR(3X)
+set_menu_mark \fBmenu_mark\fR(3X)
+set_menu_opts \fBmitem_opts\fR(3X)
+set_menu_pad \fBmenu_attributes\fR(3X)
+set_menu_pattern \fBmenu_pattern\fR(3X)
+set_menu_spacing \fBmenu_spacing\fR(3X)
+set_menu_sub \fBmenu_win\fR(3X)
+set_menu_term \fBmenu_hook\fR(3X)
+set_menu_userptr \fBmenu_userptr\fR(3X)
+set_menu_win \fBmenu_win\fR(3X)
+set_top_row \fBmitem_current\fR(3X)
+top_row \fBmitem_current\fR(3X)
+unpost_menu \fBmenu_post\fR(3X)
+.TE
+.SH RETURN VALUE
+Routines that return pointers return \fBNULL\fR on error. Routines that return
+an integer return one of the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The menu is already posted.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NO_ROOM\fR
+Menu is too large for its window.
+.TP 5
+\fBE_NOT_POSTED\fR
+The menu has not been posted.
+.TP 5
+\fBE_UNKNOWN_COMMAND\fR
+The menu driver code saw an unknown request code.
+.TP 5
+\fBE_NO_MATCH\fR
+Character failed to match.
+.TP 5
+\fBE_NOT_SELECTABLE\fR
+The designated item cannot be selected.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the menu.
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The menu driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "menu_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header files
+\fB<curses.h>\fR and \fB<eti.h>\fR.
+
+In your library list, libmenu.a should be before libncurses.a; that is,
+you want to say `-lmenu -lncurses', not the other way around (which would
+give you a link error using GNU \fBld\fR(1) and many other linkers).
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_attributes.3x b/Build/source/libs/ncurses/man/menu_attributes.3x
new file mode 100644
index 00000000000..99a2ac2bc10
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_attributes.3x
@@ -0,0 +1,100 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_attributes.3x,v 1.7 2002/01/19 22:49:06 tom Exp $
+.TH menu_attributes 3X ""
+.SH NAME
+\fBmenu_attributes\fR - color and attribute control for menus
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_fore(MENU *menu, chtype attr);
+.br
+chtype menu_fore(const MENU *menu);
+.br
+int set_menu_back(MENU *menu, chtype attr);
+.br
+chtype menu_back(const MENU *menu);
+.br
+int set_menu_grey(MENU *menu, chtype attr);
+.br
+chtype menu_grey(const MENU *menu);
+.br
+int set_menu_pad(MENU *menu, int pad);
+.br
+int menu_pad(const MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBset_menu_fore\fR sets the foreground attribute of
+\fImenu\fR. This is the highlight used for selected menu items.
+\fBmenu_fore\fR returns the foreground attribute. The default
+is \fBA_STANDOUT\fR.
+
+The function \fBset_menu_back\fR sets the background attribute of
+\fImenu\fR. This is the highlight used for selectable (but not currently
+selected) menu items. The function \fBmenu_back\fR returns the background
+attribute. The default is \fBA_NORMAL\fR.
+
+The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. This is
+the highlight used for un-selectable menu items in menus that permit more than
+one selection. The function \fBmenu_grey\fR returns the grey attribute.
+The default is \fBA_UNDERLINE\fR.
+
+The function \fBset_menu_pad\fR sets the character used to fill the space
+between the name and description parts of a menu item. \fBmenu_pad\fR returns
+the given menu's pad character. The default is a blank.
+.SH RETURN VALUE
+These routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X) and related pages whose names begin "menu_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_cursor.3x b/Build/source/libs/ncurses/man/menu_cursor.3x
new file mode 100644
index 00000000000..2cc58507de6
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_cursor.3x
@@ -0,0 +1,73 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_cursor.3x,v 1.5 1998/11/29 01:09:30 Rick.Ohnemus Exp $
+.TH menu_cursor 3X ""
+.SH NAME
+\fBmenu_cursor\fR - position a menu's cursor
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int pos_menu_cursor(const MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBpos_menu_cursor\fR restores the cursor to the current position
+associated with the menu's selected item. This is useful after \fBcurses\fR
+routines have been called to do screen-painting in response to a menu select.
+.SH RETURN VALUE
+This routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_NOT_POSTED\fR
+The menu has not been posted.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_driver.3x b/Build/source/libs/ncurses/man/menu_driver.3x
new file mode 100644
index 00000000000..1651724b0bf
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_driver.3x
@@ -0,0 +1,170 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_driver.3x,v 1.11 2003/05/10 20:22:01 tom Exp $
+.TH menu_driver 3X ""
+.SH NAME
+\fBmenu_driver\fR - command-processing loop of the menu system
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int menu_driver(MENU *menu, int c);
+.br
+.SH DESCRIPTION
+Once a menu has been posted (displayed), you should funnel input events to it
+through \fBmenu_driver\fR. This routine has three major input cases; either
+the input is a menu navigation request, it's a printable ASCII character or it
+is the KEY_MOUSE special key associated with an mouse event.
+The menu driver requests are as follows:
+.TP 5
+REQ_LEFT_ITEM
+Move left to an item.
+.TP 5
+REQ_RIGHT_ITEM
+Move right to an item.
+.TP 5
+REQ_UP_ITEM
+Move up to an item.
+.TP 5
+REQ_DOWN_ITEM
+Move down to an item.
+.TP 5
+REQ_SCR_ULINE
+Scroll up a line.
+.TP 5
+REQ_SCR_DLINE
+Scroll down a line.
+.TP 5
+REQ_SCR_DPAGE
+Scroll down a page.
+.TP 5
+REQ_SCR_UPAGE
+Scroll up a page.
+.TP 5
+REQ_FIRST_ITEM
+Move to the first item.
+.TP 5
+REQ_LAST_ITEM
+Move to the last item.
+.TP 5
+REQ_NEXT_ITEM
+Move to the next item.
+.TP 5
+REQ_PREV_ITEM
+Move to the previous item.
+.TP 5
+REQ_TOGGLE_ITEM
+Select/deselect an item.
+.TP 5
+REQ_CLEAR_PATTERN
+Clear the menu pattern buffer.
+.TP 5
+REQ_BACK_PATTERN
+Delete the previous character from the pattern buffer.
+.TP 5
+REQ_NEXT_MATCH
+Move to the next item matching the pattern match.
+.TP 5
+REQ_PREV_MATCH
+Move to the previous item matching the pattern match.
+.PP
+If the second argument is a printable ASCII character, the code appends
+it to the pattern buffer and attempts to move to the next item matching
+the new pattern. If there is no such match, \fBmenu_driver\fR returns
+\fBE_NO_MATCH\fR and deletes the appended character from the buffer.
+.PP
+If the second argument is one of the above pre-defined requests, the
+corresponding action is performed.
+.PP
+If the second argument is the KEY_MOUSE special key, the associated
+mouse event is translated into one of the above pre-defined requests.
+Currently only clicks in the user window (e.g. inside the menu display
+area or the decoration window) are handled. If you click above the
+display region of the menu, a REQ_SCR_ULINE is generated, if you
+doubleclick a REQ_SCR_UPAGE is generated and if you tripleclick a
+REQ_FIRST_ITEM is generated. If you click below the display region of
+the menu, a REQ_SCR_DLINE is generated, if you doubleclick a REQ_SCR_DPAGE
+is generated and if you tripleclick a REQ_LAST_ITEM is generated. If you
+click at an item inside the display area of the menu, the menu cursor
+is positioned to that item. If you double-click at an item a REQ_TOGGLE_ITEM
+is generated and \fBE_UNKNOWN_COMMAND\fR is returned. This return value makes
+sense, because a double click usually means that an item-specific action should
+be returned. It's exactly the purpose of this return value to signal that an
+application specific command should be executed. If a translation
+into a request was done, \fBmenu_driver\fR returns the result of this request.
+If you clicked outside the user window or the mouse event couldn't be translated
+into a menu request an \fBE_REQUEST_DENIED\fR is returned.
+.PP
+If the second argument is neither printable ASCII nor one of the above
+pre-defined menu requests or KEY_MOUSE, the drive assumes it is an application-specific
+command and returns \fBE_UNKNOWN_COMMAND\fR. Application-defined commands
+should be defined relative to \fBMAX_COMMAND\fR, the maximum value of these
+pre-defined requests.
+.SH RETURN VALUE
+\fBmenu_driver\fR return one of the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NOT_POSTED\fR
+The menu has not been posted.
+.TP 5
+\fBE_UNKNOWN_COMMAND\fR
+The menu driver code saw an unknown request code.
+.TP 5
+\fBE_NO_MATCH\fR
+Character failed to match.
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The menu driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header files
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions. The support for mouse events is ncurses specific.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_format.3x b/Build/source/libs/ncurses/man/menu_format.3x
new file mode 100644
index 00000000000..7dde28face8
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_format.3x
@@ -0,0 +1,84 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_format.3x,v 1.8 2001/08/04 20:36:19 William.Setzer Exp $
+.TH menu_format 3X ""
+.SH NAME
+\fBmenu_format\fR - set and get menu sizes
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_format(MENU *menu, int rows, int cols);
+.br
+void menu_format(const MENU *menu, int *rows, int *cols);
+.br
+.SH DESCRIPTION
+The function \fBset_menu_format\fR sets the maximum display size of the given
+menu. If this size is too small to display all menu items, the menu will be
+made scrollable. If this size is larger than the menus subwindow and the
+subwindow is too small to display all menu items, \fBpost_menu()\fR will fail.
+
+The default format is 16 rows, 1 column. Calling \fBset_menu_format\fR with a
+null menu pointer will change this default. A zero row or column argument to
+\fBset_menu_format\fR is interpreted as a request not to change the current
+value.
+
+The function \fBmenu_format\fR returns the maximum-size constraints for the
+given menu into the storage addressed by \fBrows\fR and \fBcols\fR.
+.SH RETURN VALUE
+These routines returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The menu is already posted.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_hook.3x b/Build/source/libs/ncurses/man/menu_hook.3x
new file mode 100644
index 00000000000..531528a6078
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_hook.3x
@@ -0,0 +1,101 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_hook.3x,v 1.6 1998/11/29 01:09:47 Rick.Ohnemus Exp $
+.TH menu_hook 3X ""
+.SH NAME
+\fBmenu_hook\fR - set hooks for automatic invocation by applications
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_item_init(MENU *menu, void (*func)(MENU *));
+.br
+void (*)(MENU *) item_init(const MENU *menu);
+.br
+int set_item_term(MENU *menu, void (*func)(MENU *));
+.br
+void (*)(MENU *) item_term(const MENU *menu);
+.br
+int set_menu_init(MENU *menu, void (*func)(MENU *));
+.br
+void (*)(MENU *) menu_init(const MENU *menu);
+.br
+int set_menu_term(MENU *menu, void (*func)(MENU *));
+.br
+void (*)(MENU *) menu_term(const MENU *menu);
+.br
+.SH DESCRIPTION
+These functions make it possible to set hook functions to be called at various
+points in the automatic processing of input event codes by \fBmenu_driver\fR.
+
+The function \fBset_item_init\fR sets a hook to be called at menu-post time and
+each time the selected item changes (after the change). \fBitem_init\fR
+returns the current item init hook, if any (\fBNULL\fR if there is no such
+hook).
+
+The function \fBset_item_term\fR sets a hook to be called at menu-unpost time
+and each time the selected item changes (before the change). \fBitem_term\fR
+returns the current item term hook, if any (\fBNULL\fR if there is no such
+hook).
+
+The function \fBset_menu_init\fR sets a hook to be called at menu-post time and
+just after the top row on the menu changes once it is posted. \fBmenu_init\fR
+returns the current menu init hook, if any (\fBNULL\fR if there is no such
+hook).
+
+The function \fBset_menu_term\fR sets a hook to be called at menu-unpost time
+and just before the top row on the menu changes once it is posted.
+\fBmenu_term\fR returns the current menu term hook, if any (\fBNULL\fR if there
+is no such hook).
+.SH RETURN VALUE
+Routines that return pointers return \fBNULL\fR on error. Other routines
+return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_items.3x b/Build/source/libs/ncurses/man/menu_items.3x
new file mode 100644
index 00000000000..7ec7db5604b
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_items.3x
@@ -0,0 +1,91 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_items.3x,v 1.5 1998/11/29 01:09:56 Rick.Ohnemus Exp $
+.TH menu_items 3X ""
+.SH NAME
+\fBmenu_items\fR - make and break connections between items and menus
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_items(MENU *menu, ITEM **items);
+.br
+ITEM **menu_items(const MENU *menu);
+.br
+int item_count(const MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBset_menu_items\fR changes the item pointer array of the given
+\fImenu\fR. The array must be terminated by a \fBNULL\fR.
+
+The function \fBmenu_items\fR returns the item array of the given menu.
+
+The function \fBitem_count\fR returns the count of items in \fImenu\fR.
+.SH RETURN VALUES
+The function \fBmenu_items\fR returns \fBNULL\fR on error.
+
+The function \fBitem_count\fR returns \fBERR\fR (the general \fBcurses\fR error
+return value) on error.
+
+The function \fBset_menu_items\fR returns one of the following codes on error:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The menu is already posted.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the menu.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+
+The SVr4 menu library documentation specifies the \fBitem_count\fR error value
+as -1 (which is the value of \fBERR\fR).
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_mark.3x b/Build/source/libs/ncurses/man/menu_mark.3x
new file mode 100644
index 00000000000..72ea000335e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_mark.3x
@@ -0,0 +1,84 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_mark.3x,v 1.6 1998/11/29 01:10:03 Rick.Ohnemus Exp $
+.TH menu_mark 3X ""
+.SH NAME
+\fBmenu_mark\fR - get and set the menu mark string
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_mark(MENU *menu, const char *mark);
+.br
+const char *menu_mark(const MENU *menu);
+.br
+.SH DESCRIPTION
+In order to make menu selections visible on older terminals without
+highlighting or color capability, the menu library marks selected items
+in a menu with a prefix string.
+
+The function \fBset_menu_mark\fR sets the mark string for the given menu.
+Calling \fBset_menu_mark\fR with a null menu item will abolish the mark string.
+Note that changing the length of the mark string for a menu while the
+menu is posted is likely to produce unhelpful behavior.
+
+The default string is "-" (a dash). Calling \fBset_menu_mark\fR with
+a \fBNULL\fR menu argument will change this default.
+
+The function \fBmenu_mark\fR returns the menu's mark string (or \fBNULL\fR if
+there is none).
+.SH RETURN VALUE
+The function \fBmenu_mark\fR returns \fBNULL\fR on error. The function
+\fBset_menu_mark\fR may return the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_new.3x b/Build/source/libs/ncurses/man/menu_new.3x
new file mode 100644
index 00000000000..c53bd9b8cb6
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_new.3x
@@ -0,0 +1,79 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_new.3x,v 1.7 1998/11/29 01:10:13 Rick.Ohnemus Exp $
+.TH menu_new 3X ""
+.SH NAME
+\fBmenu_new\fR - create and destroy menus
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+MENU *new_menu(ITEM **items);
+.br
+int free_menu(MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBnew_menu\fR creates a new menu connected to a specified item
+pointer array (which must be \fBNULL\fR-terminated).
+
+The function \fBfree_menu\fR disconnects \fImenu\fR from its item array
+and frees the storage allocated for the menu.
+.SH RETURN VALUE
+The function \fBnew_menu\fR returns \fBNULL\fR on error.
+
+The function \fBfree_menu\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The menu has already been posted.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_opts.3x b/Build/source/libs/ncurses/man/menu_opts.3x
new file mode 100644
index 00000000000..30cad58d495
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_opts.3x
@@ -0,0 +1,104 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_opts.3x,v 1.7 1998/11/29 01:10:21 Rick.Ohnemus Exp $
+.TH menu_opts 3X ""
+.SH NAME
+\fBmenu_opts\fR - set and get menu options
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_opts(MENU *menu, OPTIONS opts);
+.br
+int menu_opts_on(MENU *menu, OPTIONS opts);
+.br
+int menu_opts_off(MENU *menu, OPTIONS opts);
+.br
+OPTIONS menu_opts(const MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBset_menu_opts\fR sets all the given menu's option bits (menu
+option bits may be logically-OR'ed together).
+
+The function \fBmenu_opts_on\fR turns on the given option bits, and leaves
+others alone.
+
+The function \fBmenu_opts_off\fR turns off the given option bits, and leaves
+others alone.
+
+The function \fBmenu_opts\fR returns the menu's current option bits.
+
+The following options are defined (all are on by default):
+.TP 5
+O_ONEVALUE
+Only one item can be selected for this menu.
+.TP 5
+O_SHOWDESC
+Display the item descriptions when the menu is posted.
+.TP 5
+O_ROWMAJOR
+Display the menu in row-major order.
+.TP 5
+O_IGNORECASE
+Ignore the case when pattern-matching.
+.TP 5
+O_SHOWMATCH
+Move the cursor to within the item name while pattern-matching.
+.TP 5
+O_NONCYCLIC
+Don't wrap around next-item and previous-item,
+requests to the other end of the menu.
+.SH RETURN VALUE
+Except for \fBmenu_opts\fR, each routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_POSTED\fR
+The menu is already posted.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_pattern.3x b/Build/source/libs/ncurses/man/menu_pattern.3x
new file mode 100644
index 00000000000..2fdc09a6158
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_pattern.3x
@@ -0,0 +1,82 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_pattern.3x,v 1.8 2003/05/10 20:22:01 tom Exp $
+.TH menu_pattern 3X ""
+.SH NAME
+\fBmenu_pattern\fR - get and set a menu's pattern buffer
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_pattern(MENU *menu, const char *pattern);
+.br
+char *menu_pattern(const MENU *menu);
+.br
+.SH DESCRIPTION
+Every menu has an associated pattern match buffer. As input events that are
+printable ASCII characters come in, they are appended to this match buffer
+and tested for a match, as described in \fBmenu_driver\fR(3X).
+
+The function \fBset_menu_pattern\fR sets the pattern buffer for the given menu
+and tries to find the first matching item. If it succeeds, that item becomes
+current; if not, the current item does not change.
+
+The function \fBmenu_pattern\fR returns the pattern buffer of the given
+\fImenu\fR.
+.SH RETURN VALUE
+The function \fBmenu_pattern\fR returns \fBNULL\fR on error. The function
+\fBset_menu_pattern\fR may return the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_NO_MATCH\fR
+Character failed to match.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_post.3x b/Build/source/libs/ncurses/man/menu_post.3x
new file mode 100644
index 00000000000..a4182d64952
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_post.3x
@@ -0,0 +1,91 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_post.3x,v 1.7 1998/11/29 01:10:33 Rick.Ohnemus Exp $
+.TH menu_post 3X ""
+.SH NAME
+\fBmenu_post\fR - write or erase menus from associated subwindows
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int post_menu(MENU *menu);
+.br
+int unpost_menu(MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBpost_menu\fR displays a menu to its associated subwindow. To
+trigger physical display of the subwindow, use \fBrefresh\fR or some equivalent
+\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR
+input request will do). \fBpost_menu\fR resets the selection status of all items.
+
+The function \fBunpost_menu\fR erases menu from its associated subwindow.
+.SH RETURN VALUE
+These routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The menu has already been posted.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NO_ROOM\fR
+Menu is too large for its window. You should consider to use
+\fBset_menu_format()\fR to solve the problem.
+.TP 5
+\fBE_NOT_POSTED\fR
+The menu has not been posted.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the menu.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_requestname.3x b/Build/source/libs/ncurses/man/menu_requestname.3x
new file mode 100644
index 00000000000..f4b646a455f
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_requestname.3x
@@ -0,0 +1,69 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_requestname.3x,v 1.6 1998/11/29 01:10:40 Rick.Ohnemus Exp $
+.TH menu_requestname 3X ""
+.SH NAME
+\fBmenu_requestname\fR - handle printable menu request names
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+const char *menu_request_name(int request);
+.br
+int menu_request_by_name(const char *name);
+.br
+.SH DESCRIPTION
+The function \fBmenu_request_name\fR returns the printable name of a menu
+request code.
+.br
+The function \fBmenu_request_by_name\fR searches in the name-table for a request
+with the given name and returns its request code. Otherwise E_NO_MATCH is returned.
+.SH RETURN VALUE
+\fBmenu_request_name\fR returns \fBNULL\fR on error and sets errno
+to \fBE_BAD_ARGUMENT\fR.
+.br
+\fBmenu_request_by_name\fR returns \fBE_NO_MATCH\fR on error.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_spacing.3x b/Build/source/libs/ncurses/man/menu_spacing.3x
new file mode 100644
index 00000000000..18316219320
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_spacing.3x
@@ -0,0 +1,84 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2001 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_spacing.3x,v 1.6 2001/08/04 20:36:16 William.Setzer Exp $
+.TH menu_spacing 3X ""
+.SH NAME
+\fBmenu_spacing\fR - Control spacing between menu items.
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_spacing(MENU *menu,
+ int spc_description,
+ int spc_rows,
+ int spc_columns);
+.br
+int menu_spacing(const MENU *menu,
+ int* spc_description,
+ int* spc_rows,
+ int* spc_columns);
+.br
+.SH DESCRIPTION
+The function \fBset_menu_spacing\fR sets the spacing informations for the menu.
+\fBspc_description\fR controls the number of spaces between an item name and an item
+description. It must not be larger than \fBTABSIZE\fR. The menu system puts in the
+middle of this spacing area the pad character. The remaining parts are filled with
+spaces.
+\fBspc_rows\fR controls the number of rows that are used for an item. It must not be
+larger than 3. The menu system inserts then blank lines between item rows, these lines
+will contain the pad character in the appropriate positions.
+\fBspc_columns\fR controls the number of blanks between columns of items. It must not
+be larger than TABSIZE.
+A value of 0 for all the spacing values resets them to the default, which is 1 for all
+of them.
+.br
+The function \fBmenu_spacing\fR passes back the spacing info for the menu. If a
+pointer is NULL, this specific info is simply not returned.
+.SH RETURN VALUE
+Both routines return \fBE_OK\fR on success. \fBset_menu_spacing\fR may return
+\fBE_POSTED\fR if the menu is posted, or \fBE_BAD_ARGUMENT\fR if one of the
+spacing values is out of range.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_userptr.3x b/Build/source/libs/ncurses/man/menu_userptr.3x
new file mode 100644
index 00000000000..1fe354183d8
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_userptr.3x
@@ -0,0 +1,73 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_userptr.3x,v 1.6 1998/11/29 01:11:02 Rick.Ohnemus Exp $
+.TH menu_userptr 3X ""
+.SH NAME
+\fBmenu_userptr\fR - associate application data with a menu item
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_userptr(MENU *menu, void *userptr);
+.br
+void *menu_userptr(const MENU *menu);
+.br
+.SH DESCRIPTION
+Every menu and every menu item has a field that can be used to hold
+application-specific data (that is, the menu-driver code leaves it alone).
+These functions get and set the menu user pointer field.
+.SH RETURN VALUE
+Except for \fBmenu_userptr\fR (which returns \fBNULL\fR on error), each
+function returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+
+The user pointer should be a void pointer. We leave it as a char pointer for
+SVr4 compatibility.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/menu_win.3x b/Build/source/libs/ncurses/man/menu_win.3x
new file mode 100644
index 00000000000..336da44b0c5
--- /dev/null
+++ b/Build/source/libs/ncurses/man/menu_win.3x
@@ -0,0 +1,95 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_win.3x,v 1.6 1998/11/29 01:11:11 Rick.Ohnemus Exp $
+.TH menu_win 3X ""
+.SH NAME
+\fBmenu_win\fR - make and break menu window and subwindow associations
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_win(MENU *menu, WINDOW *win);
+.br
+WINDOW *menu_win(const MENU *menu);
+.br
+int set_menu_sub(MENU *menu, WINDOW *sub);
+.br
+WINDOW *menu_sub(const MENU *menu);
+.br
+int scale_menu(const MENU *menu, int *rows, int *columns);
+.br
+.SH DESCRIPTION
+Every menu has an associated pair of \fBcurses\fR windows. The menu window
+displays any title and border associated with the window; the menu subwindow
+displays the items of the menu that are currently available for selection.
+
+The first four functions get and set those windows. It is not necessary to set
+either window; by default, the driver code uses \fBstdscr\fR for both.
+
+In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though
+it were \fBstsdcr\fR. A menu argument of \fBNULL\fR is treated as a request
+to change the system default menu window or subwindow.
+
+The function \fBscale_menu\fR returns the minimum size required for the
+subwindow of \fImenu\fR.
+.SH RETURN VALUE
+Routines that return pointers return \fBNULL\fR on error. Routines that return
+an integer return one of the following error codes:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_POSTED\fR
+The menu has already been posted.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the menu.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_current.3x b/Build/source/libs/ncurses/man/mitem_current.3x
new file mode 100644
index 00000000000..179a23be3b2
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_current.3x
@@ -0,0 +1,101 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_current.3x,v 1.9 1998/12/26 19:52:34 tom Exp $
+.TH mitem_current 3X ""
+.SH NAME
+\fBmitem_current\fR - set and get current_menu_item
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_current_item(MENU *menu, const ITEM *item);
+.br
+ITEM *current_item(const MENU *menu);
+.br
+int set_top_row(MENU *menu, int row);
+.br
+int top_row(const MENU *menu);
+.br
+int item_index(const ITEM *item);
+.br
+.SH DESCRIPTION
+The function \fBset_current_item\fR sets the current item (the item on which
+the menu cursor is positioned). \fBcurrent_item\fR returns a pointer to the
+current item in the given menu.
+
+The function \fBset_top_row\fR sets the top row of the menu to show the given
+row (the top row is initially 0, and is reset to this value whenever the
+\fBO_ROWMAJOR\fR option is toggled). The item leftmost on the given row
+becomes current. The function \fBtop_row\fR returns the number of the top menu
+row being displayed.
+
+The function \fBitem_index\fR returns the (zero-origin) index of \fIitem\fR in
+the menu's item pointer list.
+.SH RETURN VALUE
+\fBcurrent_item\fR returns \fBNULL\fR on error.
+
+\fBtop_row\fR and \fBitem_index\fR return \fBERR\fR (the general \fBcurses\fR
+error value) on error.
+
+\fBset_current_item\fR and \fBset_top_row\fR return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_BAD_STATE\fR
+Routine was called from an initialization or termination function.
+.TP 5
+\fBE_NOT_CONNECTED\fR
+No items are connected to the menu.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+
+The SVr4 menu library documentation specifies the \fBtop_row\fR and
+\fBindex_item\fR error value as -1 (which is the value of \fBERR\fR).
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_name.3x b/Build/source/libs/ncurses/man/mitem_name.3x
new file mode 100644
index 00000000000..007752e0bbe
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_name.3x
@@ -0,0 +1,64 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_name.3x,v 1.5 1998/11/29 01:11:29 Rick.Ohnemus Exp $
+.TH mitem_name 3X ""
+.SH NAME
+\fBmitem_name\fR - get menu item name and description fields
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+const char *item_name(const ITEM *item);
+.br
+const char *item_description(const ITEM *item);
+.br
+.SH DESCRIPTION
+The function \fBitem_name\fR returns the name part of the given item.
+.br
+The function \fBitem_description\fR returns the description part of the given
+item.
+.SH RETURN VALUE
+These routines returns \fBNULL\fR on error.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_new.3x b/Build/source/libs/ncurses/man/mitem_new.3x
new file mode 100644
index 00000000000..afba950b13b
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_new.3x
@@ -0,0 +1,83 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_new.3x,v 1.8 2003/10/25 20:08:57 Jared.Yanovich Exp $
+.TH mitem_new 3X ""
+.SH NAME
+\fBmitem_new\fR - create and destroy menu items
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+ITEM *new_item(const char *name, const char *description);
+.br
+int free_item(ITEM *item);
+.br
+.SH DESCRIPTION
+The function \fBnew_item\fR allocates a new item and initializes it from the
+\fBname\fR and \fBdescription\fR pointers. Please notice that the item stores
+only the pointers to the name and description. Those pointers must be valid
+during the lifetime of the item. So you should be very careful with names
+or descriptions allocated on the stack of some routines.
+.br
+The function \fBfree_item\fR de-allocates an item. Please notice that it
+is the responsibility of the application to release the memory for the
+name or the description of the item.
+.SH RETURN VALUE
+The function \fBnew_item\fR returns \fBNULL\fR on error.
+
+The function \fBfree_item\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.TP 5
+\fBE_CONNECTED\fR
+Item is connected to a menu.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_opts.3x b/Build/source/libs/ncurses/man/mitem_opts.3x
new file mode 100644
index 00000000000..99e4e5ea7e9
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_opts.3x
@@ -0,0 +1,84 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_opts.3x,v 1.6 1998/11/29 01:12:37 Rick.Ohnemus Exp $
+.TH mitem_opts 3X ""
+.SH NAME
+\fBmitem_opts\fR - set and get menu item options
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_item_opts(ITEM *item, OPTIONS opts);
+.br
+int item_opts_on(ITEM *item, OPTIONS opts);
+.br
+int item_opts_off(ITEM *item, OPTIONS opts);
+.br
+OPTIONS item_opts(const ITEM *item);
+.br
+.SH DESCRIPTION
+The function \fBset_item_opts\fR sets all the given item's option bits (menu
+option bits may be logically-OR'ed together).
+
+The function \fBitem_opts_on\fR turns on the given option bits, and leaves
+others alone.
+
+The function \fBitem_opts_off\fR turns off the given option bits, and leaves
+others alone.
+
+The function \fBitem_opts\fR returns the item's current option bits.
+
+There is only one defined option bit mask, \fBO_SELECTABLE\fR. When this is
+on, the item may be selected during menu processing. This option defaults
+to on.
+.SH RETURN VALUE
+Except for \fBitem_opts\fR, each routine returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_userptr.3x b/Build/source/libs/ncurses/man/mitem_userptr.3x
new file mode 100644
index 00000000000..2dd564fd61e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_userptr.3x
@@ -0,0 +1,72 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_userptr.3x,v 1.6 1998/11/29 01:12:47 Rick.Ohnemus Exp $
+.TH mitem_userptr 3X ""
+.SH NAME
+\fBmitem_userptr\fR - associate application data with a menu item
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_item_userptr(ITEM *item, void *userptr);
+.br
+void *item_userptr(const ITEM *item);
+.br
+.SH DESCRIPTION
+Every menu item has a field that can be used to hold application-specific data
+(that is, the menu-driver code leaves it alone). These functions get and set
+that field.
+.SH RETURN VALUE
+Except for \fBitem_userptr\fR (which returns \fBNULL\fR on error), each function returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+
+The user pointer should be a void pointer. We leave it as a char pointer for
+SVr4 compatibility.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_value.3x b/Build/source/libs/ncurses/man/mitem_value.3x
new file mode 100644
index 00000000000..5817d8d277b
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_value.3x
@@ -0,0 +1,76 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,2002 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_value.3x,v 1.6 2002/02/16 22:40:59 tom Exp $
+.TH mitem_value 3X ""
+.SH NAME
+\fBmitem_value\fR - set and get menu item values
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_item_value(ITEM *item, bool value);
+.br
+bool item_value(const ITEM *item);
+.br
+.SH DESCRIPTION
+If you turn off the menu option \fBO_ONEVALUE\fR (e.g., with
+\fBset_menu_opts\fR or \fBmenu_opts_off\fR; see \fBmenu_opts\fR(3X)), the menu
+becomes multi-valued; that is, more than one item may simultaneously be
+selected.
+
+In a multi_valued menu, you can used \fBset_item_value\fR to select the
+given menu item (second argument \fBTRUE\fR) or deselect it (second argument
+\fBFALSE\fR).
+.SH RETURN VALUE
+The function \fBset_item_value\fR returns one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_REQUEST_DENIED\fR
+The menu driver could not process the request.
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/mitem_visible.3x b/Build/source/libs/ncurses/man/mitem_visible.3x
new file mode 100644
index 00000000000..8f9039c2f6d
--- /dev/null
+++ b/Build/source/libs/ncurses/man/mitem_visible.3x
@@ -0,0 +1,59 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: mitem_visible.3x,v 1.5 1998/11/29 01:12:55 Rick.Ohnemus Exp $
+.TH mitem_visible 3X ""
+.SH NAME
+\fBmitem_visible\fR - check visibility of a menu item
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+bool item_visible(const ITEM *item);
+.br
+.SH DESCRIPTION
+A menu item is visible when it is in the portion of a posted menu that
+is mapped onto the screen (if the menu is scrollable, in particular, this
+portion will be smaller than the whole menu).
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBmenu\fR(3X).
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/ncurses.3x b/Build/source/libs/ncurses/man/ncurses.3x
new file mode 100644
index 00000000000..4e9b8ca46ce
--- /dev/null
+++ b/Build/source/libs/ncurses/man/ncurses.3x
@@ -0,0 +1,919 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: ncurses.3x,v 1.72 2004/09/25 19:06:20 tom Exp $
+.hy 0
+.TH ncurses 3X ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+\fBncurses\fR - CRT screen handling and optimization package
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+.SH DESCRIPTION
+The \fBncurses\fR library routines give the user a terminal-independent method
+of updating character screens with reasonable optimization. This
+implementation is ``new curses'' (ncurses) and is the approved replacement for
+4.4BSD classic curses, which has been discontinued.
+.PP
+The \fBncurses\fR routines emulate the \fBcurses\fR(3X) library of System V
+Release 4 UNIX, and the XPG4 curses standard (XSI curses) but the \fBncurses\fR
+library is freely redistributable in source form. Differences from the SVr4
+curses are summarized under the EXTENSIONS and BUGS sections below and
+described in detail in the EXTENSIONS and BUGS sections of individual man
+pages.
+.PP
+A program using these routines must be linked with the \fB-lncurses\fR option,
+or (if it has been generated) with the debugging library \fB-lncurses_g\fR.
+(Your system integrator may also have installed these libraries under
+the names \fB-lcurses\fR and \fB-lcurses_g\fR.)
+The ncurses_g library generates trace logs (in a file called 'trace' in the
+current directory) that describe curses actions.
+.PP
+The \fBncurses\fR package supports: overall screen, window and pad
+manipulation; output to windows and pads; reading terminal input; control over
+terminal and \fBcurses\fR input and output options; environment query
+routines; color manipulation; use of soft label keys; terminfo capabilities;
+and access to low-level terminal-manipulation routines.
+.PP
+To initialize the routines, the routine \fBinitscr\fR or \fBnewterm\fR
+must be called before any of the other routines that deal with windows
+and screens are used. The routine \fBendwin\fR must be called before
+exiting. To get character-at-a-time input without echoing (most
+interactive, screen oriented programs want this), the following
+sequence should be used:
+.sp
+ \fBinitscr(); cbreak(); noecho();\fR
+.sp
+Most programs would additionally use the sequence:
+.sp
+ \fBnonl();\fR
+ \fBintrflush(stdscr, FALSE);\fR
+ \fBkeypad(stdscr, TRUE);\fR
+.sp
+Before a \fBcurses\fR program is run, the tab stops of the terminal
+should be set and its initialization strings, if defined, must be
+output. This can be done by executing the \fBtput init\fR command
+after the shell environment variable \fBTERM\fR has been exported.
+\fBtset(1)\fR is usually responsible for doing this.
+[See \fBterminfo\fR(\*n) for further details.]
+.PP
+The \fBncurses\fR library permits manipulation of data structures,
+called \fIwindows\fR, which can be thought of as two-dimensional
+arrays of characters representing all or part of a CRT screen. A
+default window called \fBstdscr\fR, which is the size of the terminal
+screen, is supplied. Others may be created with \fBnewwin\fR.
+.PP
+Note that \fBcurses\fR does not handle overlapping windows, that's done by
+the \fBpanel\fR(3X) library. This means that you can either use
+\fBstdscr\fR or divide the screen into tiled windows and not using
+\fBstdscr\fR at all. Mixing the two will result in unpredictable, and
+undesired, effects.
+.PP
+Windows are referred to by variables declared as \fBWINDOW *\fR.
+These data structures are manipulated with routines described here and
+elsewhere in the \fBncurses\fR manual pages. Among which the most basic
+routines are \fBmove\fR and \fBaddch\fR. More general versions of
+these routines are included with names beginning with \fBw\fR,
+allowing the user to specify a window. The routines not beginning
+with \fBw\fR affect \fBstdscr\fR.)
+.PP
+After using routines to manipulate a window, \fBrefresh\fR is called,
+telling \fBcurses\fR to make the user's CRT screen look like
+\fBstdscr\fR. The characters in a window are actually of type
+\fBchtype\fR, (character and attribute data) so that other information
+about the character may also be stored with each character.
+.PP
+Special windows called \fIpads\fR may also be manipulated. These are windows
+which are not constrained to the size of the screen and whose contents need not
+be completely displayed. See \fBcurs_pad\fR(3X) for more information.
+.PP
+In addition to drawing characters on the screen, video attributes and colors
+may be supported, causing the characters to show up in such modes as
+underlined, in reverse video, or in color on terminals that support such
+display enhancements. Line drawing characters may be specified to be output.
+On input, \fBcurses\fR is also able to translate arrow and function keys that
+transmit escape sequences into single values. The video attributes, line
+drawing characters, and input values use names, defined in \fB<curses.h>\fR,
+such as \fBA_REVERSE\fR, \fBACS_HLINE\fR, and \fBKEY_LEFT\fR.
+.PP
+If the environment variables \fBLINES\fR and \fBCOLUMNS\fR are set, or if the
+program is executing in a window environment, line and column information in
+the environment will override information read by \fIterminfo\fR. This would
+effect a program running in an AT&T 630 layer, for example, where the size of a
+screen is changeable (see \fBENVIRONMENT\fR).
+.PP
+If the environment variable \fBTERMINFO\fR is defined, any program using
+\fBcurses\fR checks for a local terminal definition before checking in the
+standard place. For example, if \fBTERM\fR is set to \fBatt4424\fR, then the
+compiled terminal definition is found in
+.sp
+ \fB\*d/a/att4424\fR.
+.sp
+(The \fBa\fR is copied from the first letter of \fBatt4424\fR to avoid
+creation of huge directories.) However, if \fBTERMINFO\fR is set to
+\fB$HOME/myterms\fR, \fBcurses\fR first checks
+.sp
+ \fB$HOME/myterms/a/att4424\fR,
+.sp
+and if that fails, it then checks
+.sp
+ \fB\*d/a/att4424\fR.
+.sp
+This is useful for developing experimental definitions or when write
+permission in \fB\*d\fR is not available.
+.PP
+The integer variables \fBLINES\fR and \fBCOLS\fR are defined in
+\fB<curses.h>\fR and will be filled in by \fBinitscr\fR with the size of the
+screen. The constants \fBTRUE\fR and \fBFALSE\fR have the values \fB1\fR and
+\fB0\fR, respectively.
+.PP
+The \fBcurses\fR routines also define the \fBWINDOW *\fR variable \fBcurscr\fR
+which is used for certain low-level operations like clearing and redrawing a
+screen containing garbage. The \fBcurscr\fR can be used in only a few
+routines.
+.
+.SS Routine and Argument Names
+Many \fBcurses\fR routines have two or more versions. The routines prefixed
+with \fBw\fR require a window argument. The routines prefixed with \fBp\fR
+require a pad argument. Those without a prefix generally use \fBstdscr\fR.
+.PP
+The routines prefixed with \fBmv\fR require a \fIy\fR and \fIx\fR
+coordinate to move to before performing the appropriate action. The
+\fBmv\fR routines imply a call to \fBmove\fR before the call to the
+other routine. The coordinate \fIy\fR always refers to the row (of
+the window), and \fIx\fR always refers to the column. The upper
+left-hand corner is always (0,0), not (1,1).
+.PP
+The routines prefixed with \fBmvw\fR take both a window argument and
+\fIx\fR and \fIy\fR coordinates. The window argument is always
+specified before the coordinates.
+.PP
+In each case, \fIwin\fR is the window affected, and \fIpad\fR is the
+pad affected; \fIwin\fR and \fIpad\fR are always pointers to type
+\fBWINDOW\fR.
+.PP
+Option setting routines require a Boolean flag \fIbf\fR with the value
+\fBTRUE\fR or \fBFALSE\fR; \fIbf\fR is always of type \fBbool\fR. The
+variables \fIch\fR and \fIattrs\fR below are always of type
+\fBchtype\fR. The types \fBWINDOW\fR, \fBSCREEN\fR, \fBbool\fR, and
+\fBchtype\fR are defined in \fB<curses.h>\fR. The type \fBTERMINAL\fR
+is defined in \fB<term.h>\fR. All other arguments are integers.
+.SS Routine Name Index
+The following table lists each \fBcurses\fR routine and the name of
+the manual page on which it is described. Routines flagged with `*'
+are ncurses-specific, not described by XPG4 or present in SVr4.
+.PP
+.TS
+center tab(/);
+l l
+l l .
+\fBcurses\fR Routine Name/Manual Page Name
+=
+COLOR_PAIR/\fBcurs_color\fR(3X)
+PAIR_NUMBER/\fBcurs_attr\fR(3X)
+_nc_tracebits/\fBcurs_trace\fR(3X)*
+_traceattr/\fBcurs_trace\fR(3X)*
+_traceattr2/\fBcurs_trace\fR(3X)*
+_tracechar/\fBcurs_trace\fR(3X)*
+_tracechtype/\fBcurs_trace\fR(3X)*
+_tracechtype2/\fBcurs_trace\fR(3X)*
+_tracedump/\fBcurs_trace\fR(3X)*
+_tracef/\fBcurs_trace\fR(3X)*
+_tracemouse/\fBcurs_trace\fR(3X)*
+add_wch/\fBcurs_add_wch\fR(3X)
+add_wchnstr/\fBcurs_add_wchstr\fR(3X)
+add_wchstr/\fBcurs_add_wchstr\fR(3X)
+addch/\fBcurs_addch\fR(3X)
+addchnstr/\fBcurs_addchstr\fR(3X)
+addchstr/\fBcurs_addchstr\fR(3X)
+addnstr/\fBcurs_addstr\fR(3X)
+addnwstr/\fBcurs_addwstr\fR(3X)
+addstr/\fBcurs_addstr\fR(3X)
+addwstr/\fBcurs_addwstr\fR(3X)
+assume_default_colors/\fBdefault_colors\fR(3X)*
+attr_get/\fBcurs_attr\fR(3X)
+attr_off/\fBcurs_attr\fR(3X)
+attr_on/\fBcurs_attr\fR(3X)
+attr_set/\fBcurs_attr\fR(3X)
+attroff/\fBcurs_attr\fR(3X)
+attron/\fBcurs_attr\fR(3X)
+attrset/\fBcurs_attr\fR(3X)
+baudrate/\fBcurs_termattrs\fR(3X)
+beep/\fBcurs_beep\fR(3X)
+bkgd/\fBcurs_bkgd\fR(3X)
+bkgdset/\fBcurs_bkgd\fR(3X)
+bkgrnd/\fBcurs_bkgrnd\fR(3X)
+bkgrndset/\fBcurs_bkgrnd\fR(3X)
+border/\fBcurs_border\fR(3X)
+border_set/\fBcurs_border_set\fR(3X)
+box/\fBcurs_border\fR(3X)
+box_set/\fBcurs_border_set\fR(3X)
+can_change_color/\fBcurs_color\fR(3X)
+cbreak/\fBcurs_inopts\fR(3X)
+chgat/\fBcurs_attr\fR(3X)
+clear/\fBcurs_clear\fR(3X)
+clearok/\fBcurs_outopts\fR(3X)
+clrtobot/\fBcurs_clear\fR(3X)
+clrtoeol/\fBcurs_clear\fR(3X)
+color_content/\fBcurs_color\fR(3X)
+color_set/\fBcurs_attr\fR(3X)
+copywin/\fBcurs_overlay\fR(3X)
+curs_set/\fBcurs_kernel\fR(3X)
+curses_version/\fBcurs_extend\fR(3X)*
+def_prog_mode/\fBcurs_kernel\fR(3X)
+def_shell_mode/\fBcurs_kernel\fR(3X)
+define_key/\fBdefine_key\fR(3X)*
+del_curterm/\fBcurs_terminfo\fR(3X)
+delay_output/\fBcurs_util\fR(3X)
+delch/\fBcurs_delch\fR(3X)
+deleteln/\fBcurs_deleteln\fR(3X)
+delscreen/\fBcurs_initscr\fR(3X)
+delwin/\fBcurs_window\fR(3X)
+derwin/\fBcurs_window\fR(3X)
+doupdate/\fBcurs_refresh\fR(3X)
+dupwin/\fBcurs_window\fR(3X)
+echo/\fBcurs_inopts\fR(3X)
+echo_wchar/\fBcurs_add_wch\fR(3X)
+echochar/\fBcurs_addch\fR(3X)
+endwin/\fBcurs_initscr\fR(3X)
+erase/\fBcurs_clear\fR(3X)
+erasechar/\fBcurs_termattrs\fR(3X)
+erasewchar/\fBcurs_termattrs\fR(3X)
+filter/\fBcurs_util\fR(3X)
+flash/\fBcurs_beep\fR(3X)
+flushinp/\fBcurs_util\fR(3X)
+get_wch/\fBcurs_get_wch\fR(3X)
+get_wstr/\fBcurs_get_wstr\fR(3X)
+getbegyx/\fBcurs_getyx\fR(3X)
+getbkgd/\fBcurs_bkgd\fR(3X)
+getbkgrnd/\fBcurs_bkgrnd\fR(3X)
+getcchar/\fBcurs_getcchar\fR(3X)
+getch/\fBcurs_getch\fR(3X)
+getmaxyx/\fBcurs_getyx\fR(3X)
+getmouse/\fBcurs_mouse\fR(3X)*
+getn_wstr/\fBcurs_get_wstr\fR(3X)
+getnstr/\fBcurs_getstr\fR(3X)
+getparyx/\fBcurs_getyx\fR(3X)
+getstr/\fBcurs_getstr\fR(3X)
+getsyx/\fBcurs_kernel\fR(3X)
+getwin/\fBcurs_util\fR(3X)
+getyx/\fBcurs_getyx\fR(3X)
+halfdelay/\fBcurs_inopts\fR(3X)
+has_colors/\fBcurs_color\fR(3X)
+has_ic/\fBcurs_termattrs\fR(3X)
+has_il/\fBcurs_termattrs\fR(3X)
+has_key/\fBcurs_getch\fR(3X)*
+hline/\fBcurs_border\fR(3X)
+hline_set/\fBcurs_border_set\fR(3X)
+idcok/\fBcurs_outopts\fR(3X)
+idlok/\fBcurs_outopts\fR(3X)
+immedok/\fBcurs_outopts\fR(3X)
+in_wch/\fBcurs_in_wch\fR(3X)
+in_wchnstr/\fBcurs_in_wchstr\fR(3X)
+in_wchstr/\fBcurs_in_wchstr\fR(3X)
+inch/\fBcurs_inch\fR(3X)
+inchnstr/\fBcurs_inchstr\fR(3X)
+inchstr/\fBcurs_inchstr\fR(3X)
+init_color/\fBcurs_color\fR(3X)
+init_pair/\fBcurs_color\fR(3X)
+initscr/\fBcurs_initscr\fR(3X)
+innstr/\fBcurs_instr\fR(3X)
+innwstr/\fBcurs_inwstr\fR(3X)
+ins_nwstr/\fBcurs_ins_wstr\fR(3X)
+ins_wch/\fBcurs_ins_wch\fR(3X)
+ins_wstr/\fBcurs_ins_wstr\fR(3X)
+insch/\fBcurs_insch\fR(3X)
+insdelln/\fBcurs_deleteln\fR(3X)
+insertln/\fBcurs_deleteln\fR(3X)
+insnstr/\fBcurs_insstr\fR(3X)
+insstr/\fBcurs_insstr\fR(3X)
+instr/\fBcurs_instr\fR(3X)
+intrflush/\fBcurs_inopts\fR(3X)
+inwstr/\fBcurs_inwstr\fR(3X)
+is_linetouched/\fBcurs_touch\fR(3X)
+is_wintouched/\fBcurs_touch\fR(3X)
+isendwin/\fBcurs_initscr\fR(3X)
+key_defined/\fBkey_defined\fR(3X)*
+key_name/\fBcurs_util\fR(3X)
+keybound/\fBkeybound\fR(3X)*
+keyname/\fBcurs_util\fR(3X)
+keyok/\fBkeyok\fR(3X)*
+keypad/\fBcurs_inopts\fR(3X)
+killchar/\fBcurs_termattrs\fR(3X)
+killwchar/\fBcurs_termattrs\fR(3X)
+leaveok/\fBcurs_outopts\fR(3X)
+longname/\fBcurs_termattrs\fR(3X)
+mcprint/\fBcurs_print\fR(3X)*
+meta/\fBcurs_inopts\fR(3X)
+mouse_trafo/\fBcurs_mouse\fR(3X)*
+mouseinterval/\fBcurs_mouse\fR(3X)*
+mousemask/\fBcurs_mouse\fR(3X)*
+move/\fBcurs_move\fR(3X)
+mvadd_wch/\fBcurs_add_wch\fR(3X)
+mvadd_wchnstr/\fBcurs_add_wchstr\fR(3X)
+mvadd_wchstr/\fBcurs_add_wchstr\fR(3X)
+mvaddch/\fBcurs_addch\fR(3X)
+mvaddchnstr/\fBcurs_addchstr\fR(3X)
+mvaddchstr/\fBcurs_addchstr\fR(3X)
+mvaddnstr/\fBcurs_addstr\fR(3X)
+mvaddnwstr/\fBcurs_addwstr\fR(3X)
+mvaddstr/\fBcurs_addstr\fR(3X)
+mvaddwstr/\fBcurs_addwstr\fR(3X)
+mvchgat/\fBcurs_attr\fR(3X)
+mvcur/\fBcurs_terminfo\fR(3X)
+mvdelch/\fBcurs_delch\fR(3X)
+mvderwin/\fBcurs_window\fR(3X)
+mvget_wch/\fBcurs_get_wch\fR(3X)
+mvget_wstr/\fBcurs_get_wstr\fR(3X)
+mvgetch/\fBcurs_getch\fR(3X)
+mvgetn_wstr/\fBcurs_get_wstr\fR(3X)
+mvgetnstr/\fBcurs_getstr\fR(3X)
+mvgetstr/\fBcurs_getstr\fR(3X)
+mvhline/\fBcurs_border\fR(3X)
+mvhline_set/\fBcurs_border_set\fR(3X)
+mvin_wch/\fBcurs_in_wch\fR(3X)
+mvin_wchnstr/\fBcurs_in_wchstr\fR(3X)
+mvin_wchstr/\fBcurs_in_wchstr\fR(3X)
+mvinch/\fBcurs_inch\fR(3X)
+mvinchnstr/\fBcurs_inchstr\fR(3X)
+mvinchstr/\fBcurs_inchstr\fR(3X)
+mvinnstr/\fBcurs_instr\fR(3X)
+mvinnwstr/\fBcurs_inwstr\fR(3X)
+mvins_nwstr/\fBcurs_ins_wstr\fR(3X)
+mvins_wch/\fBcurs_ins_wch\fR(3X)
+mvins_wstr/\fBcurs_ins_wstr\fR(3X)
+mvinsch/\fBcurs_insch\fR(3X)
+mvinsnstr/\fBcurs_insstr\fR(3X)
+mvinsstr/\fBcurs_insstr\fR(3X)
+mvinstr/\fBcurs_instr\fR(3X)
+mvinwstr/\fBcurs_inwstr\fR(3X)
+mvprintw/\fBcurs_printw\fR(3X)
+mvscanw/\fBcurs_scanw\fR(3X)
+mvvline/\fBcurs_border\fR(3X)
+mvvline_set/\fBcurs_border_set\fR(3X)
+mvwadd_wch/\fBcurs_add_wch\fR(3X)
+mvwadd_wchnstr/\fBcurs_add_wchstr\fR(3X)
+mvwadd_wchstr/\fBcurs_add_wchstr\fR(3X)
+mvwaddch/\fBcurs_addch\fR(3X)
+mvwaddchnstr/\fBcurs_addchstr\fR(3X)
+mvwaddchstr/\fBcurs_addchstr\fR(3X)
+mvwaddnstr/\fBcurs_addstr\fR(3X)
+mvwaddnwstr/\fBcurs_addwstr\fR(3X)
+mvwaddstr/\fBcurs_addstr\fR(3X)
+mvwaddwstr/\fBcurs_addwstr\fR(3X)
+mvwchgat/\fBcurs_attr\fR(3X)
+mvwdelch/\fBcurs_delch\fR(3X)
+mvwget_wch/\fBcurs_get_wch\fR(3X)
+mvwget_wstr/\fBcurs_get_wstr\fR(3X)
+mvwgetch/\fBcurs_getch\fR(3X)
+mvwgetn_wstr/\fBcurs_get_wstr\fR(3X)
+mvwgetnstr/\fBcurs_getstr\fR(3X)
+mvwgetstr/\fBcurs_getstr\fR(3X)
+mvwhline/\fBcurs_border\fR(3X)
+mvwhline_set/\fBcurs_border_set\fR(3X)
+mvwin/\fBcurs_window\fR(3X)
+mvwin_wch/\fBcurs_in_wch\fR(3X)
+mvwin_wchnstr/\fBcurs_in_wchstr\fR(3X)
+mvwin_wchstr/\fBcurs_in_wchstr\fR(3X)
+mvwinch/\fBcurs_inch\fR(3X)
+mvwinchnstr/\fBcurs_inchstr\fR(3X)
+mvwinchstr/\fBcurs_inchstr\fR(3X)
+mvwinnstr/\fBcurs_instr\fR(3X)
+mvwinnwstr/\fBcurs_inwstr\fR(3X)
+mvwins_nwstr/\fBcurs_ins_wstr\fR(3X)
+mvwins_wch/\fBcurs_ins_wch\fR(3X)
+mvwins_wstr/\fBcurs_ins_wstr\fR(3X)
+mvwinsch/\fBcurs_insch\fR(3X)
+mvwinsnstr/\fBcurs_insstr\fR(3X)
+mvwinsstr/\fBcurs_insstr\fR(3X)
+mvwinstr/\fBcurs_instr\fR(3X)
+mvwinwstr/\fBcurs_inwstr\fR(3X)
+mvwprintw/\fBcurs_printw\fR(3X)
+mvwscanw/\fBcurs_scanw\fR(3X)
+mvwvline/\fBcurs_border\fR(3X)
+mvwvline_set/\fBcurs_border_set\fR(3X)
+napms/\fBcurs_kernel\fR(3X)
+newpad/\fBcurs_pad\fR(3X)
+newterm/\fBcurs_initscr\fR(3X)
+newwin/\fBcurs_window\fR(3X)
+nl/\fBcurs_outopts\fR(3X)
+nocbreak/\fBcurs_inopts\fR(3X)
+nodelay/\fBcurs_inopts\fR(3X)
+noecho/\fBcurs_inopts\fR(3X)
+nonl/\fBcurs_outopts\fR(3X)
+noqiflush/\fBcurs_inopts\fR(3X)
+noraw/\fBcurs_inopts\fR(3X)
+notimeout/\fBcurs_inopts\fR(3X)
+overlay/\fBcurs_overlay\fR(3X)
+overwrite/\fBcurs_overlay\fR(3X)
+pair_content/\fBcurs_color\fR(3X)
+pechochar/\fBcurs_pad\fR(3X)
+pnoutrefresh/\fBcurs_pad\fR(3X)
+prefresh/\fBcurs_pad\fR(3X)
+printw/\fBcurs_printw\fR(3X)
+putp/\fBcurs_terminfo\fR(3X)
+putwin/\fBcurs_util\fR(3X)
+qiflush/\fBcurs_inopts\fR(3X)
+raw/\fBcurs_inopts\fR(3X)
+redrawwin/\fBcurs_refresh\fR(3X)
+refresh/\fBcurs_refresh\fR(3X)
+reset_prog_mode/\fBcurs_kernel\fR(3X)
+reset_shell_mode/\fBcurs_kernel\fR(3X)
+resetty/\fBcurs_kernel\fR(3X)
+resizeterm/\fBresizeterm\fR(3X)*
+restartterm/\fBcurs_terminfo\fR(3X)
+ripoffline/\fBcurs_kernel\fR(3X)
+savetty/\fBcurs_kernel\fR(3X)
+scanw/\fBcurs_scanw\fR(3X)
+scr_dump/\fBcurs_scr_dump\fR(3X)
+scr_init/\fBcurs_scr_dump\fR(3X)
+scr_restore/\fBcurs_scr_dump\fR(3X)
+scr_set/\fBcurs_scr_dump\fR(3X)
+scrl/\fBcurs_scroll\fR(3X)
+scroll/\fBcurs_scroll\fR(3X)
+scrollok/\fBcurs_outopts\fR(3X)
+set_curterm/\fBcurs_terminfo\fR(3X)
+set_term/\fBcurs_initscr\fR(3X)
+setcchar/\fBcurs_getcchar\fR(3X)
+setscrreg/\fBcurs_outopts\fR(3X)
+setsyx/\fBcurs_kernel\fR(3X)
+setterm/\fBcurs_terminfo\fR(3X)
+setupterm/\fBcurs_terminfo\fR(3X)
+slk_attr/\fBcurs_slk\fR(3X)*
+slk_attr_off/\fBcurs_slk\fR(3X)
+slk_attr_on/\fBcurs_slk\fR(3X)
+slk_attr_set/\fBcurs_slk\fR(3X)
+slk_attroff/\fBcurs_slk\fR(3X)
+slk_attron/\fBcurs_slk\fR(3X)
+slk_attrset/\fBcurs_slk\fR(3X)
+slk_clear/\fBcurs_slk\fR(3X)
+slk_color/\fBcurs_slk\fR(3X)
+slk_init/\fBcurs_slk\fR(3X)
+slk_label/\fBcurs_slk\fR(3X)
+slk_noutrefresh/\fBcurs_slk\fR(3X)
+slk_refresh/\fBcurs_slk\fR(3X)
+slk_restore/\fBcurs_slk\fR(3X)
+slk_set/\fBcurs_slk\fR(3X)
+slk_touch/\fBcurs_slk\fR(3X)
+standend/\fBcurs_attr\fR(3X)
+standout/\fBcurs_attr\fR(3X)
+start_color/\fBcurs_color\fR(3X)
+subpad/\fBcurs_pad\fR(3X)
+subwin/\fBcurs_window\fR(3X)
+syncok/\fBcurs_window\fR(3X)
+term_attrs/\fBcurs_termattrs\fR(3X)
+termattrs/\fBcurs_termattrs\fR(3X)
+termname/\fBcurs_termattrs\fR(3X)
+tgetent/\fBcurs_termcap\fR(3X)
+tgetflag/\fBcurs_termcap\fR(3X)
+tgetnum/\fBcurs_termcap\fR(3X)
+tgetstr/\fBcurs_termcap\fR(3X)
+tgoto/\fBcurs_termcap\fR(3X)
+tigetflag/\fBcurs_terminfo\fR(3X)
+tigetnum/\fBcurs_terminfo\fR(3X)
+tigetstr/\fBcurs_terminfo\fR(3X)
+timeout/\fBcurs_inopts\fR(3X)
+touchline/\fBcurs_touch\fR(3X)
+touchwin/\fBcurs_touch\fR(3X)
+tparm/\fBcurs_terminfo\fR(3X)
+tputs/\fBcurs_termcap\fR(3X)
+tputs/\fBcurs_terminfo\fR(3X)
+trace/\fBcurs_trace\fR(3X)*
+typeahead/\fBcurs_inopts\fR(3X)
+unctrl/\fBcurs_util\fR(3X)
+unget_wch/\fBcurs_get_wch\fR(3X)
+ungetch/\fBcurs_getch\fR(3X)
+ungetmouse/\fBcurs_mouse\fR(3X)*
+untouchwin/\fBcurs_touch\fR(3X)
+use_default_colors/\fBdefault_colors\fR(3X)*
+use_env/\fBcurs_util\fR(3X)
+use_extended_names/\fBcurs_extend\fR(3X)*
+vid_attr/\fBcurs_terminfo\fR(3X)
+vid_puts/\fBcurs_terminfo\fR(3X)
+vidattr/\fBcurs_terminfo\fR(3X)
+vidputs/\fBcurs_terminfo\fR(3X)
+vline/\fBcurs_border\fR(3X)
+vline_set/\fBcurs_border_set\fR(3X)
+vw_printw/\fBcurs_printw\fR(3X)
+vw_scanw/\fBcurs_scanw\fR(3X)
+vwprintw/\fBcurs_printw\fR(3X)
+vwscanw/\fBcurs_scanw\fR(3X)
+wadd_wch/\fBcurs_add_wch\fR(3X)
+wadd_wchnstr/\fBcurs_add_wchstr\fR(3X)
+wadd_wchstr/\fBcurs_add_wchstr\fR(3X)
+waddch/\fBcurs_addch\fR(3X)
+waddchnstr/\fBcurs_addchstr\fR(3X)
+waddchstr/\fBcurs_addchstr\fR(3X)
+waddnstr/\fBcurs_addstr\fR(3X)
+waddnwstr/\fBcurs_addwstr\fR(3X)
+waddstr/\fBcurs_addstr\fR(3X)
+waddwstr/\fBcurs_addwstr\fR(3X)
+wattr_get/\fBcurs_attr\fR(3X)
+wattr_off/\fBcurs_attr\fR(3X)
+wattr_on/\fBcurs_attr\fR(3X)
+wattr_set/\fBcurs_attr\fR(3X)
+wattroff/\fBcurs_attr\fR(3X)
+wattron/\fBcurs_attr\fR(3X)
+wattrset/\fBcurs_attr\fR(3X)
+wbkgd/\fBcurs_bkgd\fR(3X)
+wbkgdset/\fBcurs_bkgd\fR(3X)
+wbkgrnd/\fBcurs_bkgrnd\fR(3X)
+wbkgrndset/\fBcurs_bkgrnd\fR(3X)
+wborder/\fBcurs_border\fR(3X)
+wborder_set/\fBcurs_border_set\fR(3X)
+wchgat/\fBcurs_attr\fR(3X)
+wclear/\fBcurs_clear\fR(3X)
+wclrtobot/\fBcurs_clear\fR(3X)
+wclrtoeol/\fBcurs_clear\fR(3X)
+wcolor_set/\fBcurs_attr\fR(3X)
+wcursyncup/\fBcurs_window\fR(3X)
+wdelch/\fBcurs_delch\fR(3X)
+wdeleteln/\fBcurs_deleteln\fR(3X)
+wecho_wchar/\fBcurs_add_wch\fR(3X)
+wechochar/\fBcurs_addch\fR(3X)
+wenclose/\fBcurs_mouse\fR(3X)*
+werase/\fBcurs_clear\fR(3X)
+wget_wch/\fBcurs_get_wch\fR(3X)
+wget_wstr/\fBcurs_get_wstr\fR(3X)
+wgetbkgrnd/\fBcurs_bkgrnd\fR(3X)
+wgetch/\fBcurs_getch\fR(3X)
+wgetn_wstr/\fBcurs_get_wstr\fR(3X)
+wgetnstr/\fBcurs_getstr\fR(3X)
+wgetstr/\fBcurs_getstr\fR(3X)
+whline/\fBcurs_border\fR(3X)
+whline_set/\fBcurs_border_set\fR(3X)
+win_wch/\fBcurs_in_wch\fR(3X)
+win_wchnstr/\fBcurs_in_wchstr\fR(3X)
+win_wchstr/\fBcurs_in_wchstr\fR(3X)
+winch/\fBcurs_inch\fR(3X)
+winchnstr/\fBcurs_inchstr\fR(3X)
+winchstr/\fBcurs_inchstr\fR(3X)
+winnstr/\fBcurs_instr\fR(3X)
+winnwstr/\fBcurs_inwstr\fR(3X)
+wins_nwstr/\fBcurs_ins_wstr\fR(3X)
+wins_wch/\fBcurs_ins_wch\fR(3X)
+wins_wstr/\fBcurs_ins_wstr\fR(3X)
+winsch/\fBcurs_insch\fR(3X)
+winsdelln/\fBcurs_deleteln\fR(3X)
+winsertln/\fBcurs_deleteln\fR(3X)
+winsnstr/\fBcurs_insstr\fR(3X)
+winsstr/\fBcurs_insstr\fR(3X)
+winstr/\fBcurs_instr\fR(3X)
+winwstr/\fBcurs_inwstr\fR(3X)
+wmouse_trafo/\fBcurs_mouse\fR(3X)*
+wmove/\fBcurs_move\fR(3X)
+wnoutrefresh/\fBcurs_refresh\fR(3X)
+wprintw/\fBcurs_printw\fR(3X)
+wredrawln/\fBcurs_refresh\fR(3X)
+wrefresh/\fBcurs_refresh\fR(3X)
+wresize/\fBwresize\fR(3X)*
+wscanw/\fBcurs_scanw\fR(3X)
+wscrl/\fBcurs_scroll\fR(3X)
+wsetscrreg/\fBcurs_outopts\fR(3X)
+wstandend/\fBcurs_attr\fR(3X)
+wstandout/\fBcurs_attr\fR(3X)
+wsyncdown/\fBcurs_window\fR(3X)
+wsyncup/\fBcurs_window\fR(3X)
+wtimeout/\fBcurs_inopts\fR(3X)
+wtouchln/\fBcurs_touch\fR(3X)
+wunctrl/\fBcurs_util\fR(3X)
+wvline/\fBcurs_border\fR(3X)
+wvline_set/\fBcurs_border_set\fR(3X)
+.TE
+.SH RETURN VALUE
+Routines that return an integer return \fBERR\fR upon failure and an
+integer value other than \fBERR\fR upon successful completion, unless
+otherwise noted in the routine descriptions.
+.PP
+All macros return the value of the \fBw\fR version, except \fBsetscrreg\fR,
+\fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and \fBgetmaxyx\fR. The return
+values of \fBsetscrreg\fR, \fBwsetscrreg\fR, \fBgetyx\fR, \fBgetbegyx\fR, and
+\fBgetmaxyx\fR are undefined (i.e., these should not be used as the
+right-hand side of assignment statements).
+.PP
+Routines that return pointers return \fBNULL\fR on error.
+.SH ENVIRONMENT
+The following environment symbols are useful for customizing the
+runtime behavior of the \fBncurses\fR library. The most important
+ones have been already discussed in detail.
+.TP 5
+BAUDRATE
+The debugging library checks this environment symbol when the application
+has redirected output to a file.
+The symbol's numeric value is used for the baudrate.
+If no value is found, \fBncurses\fR uses 9600.
+This allows testers to construct repeatable test-cases
+that take into account costs that depend on baudrate.
+.TP 5
+CC
+When set, change occurrences of the command_character
+(i.e., the \fBcmdch\fP capability)
+of the loaded terminfo entries to the value of this symbol.
+Very few terminfo entries provide this feature.
+.TP 5
+COLUMNS
+Specify the width of the screen in characters.
+Applications running in a windowing environment usually are able to
+obtain the width of the window in which they are executing.
+If neither the $COLUMNS value nor the terminal's screen size is available,
+\fBncurses\fR uses the size which may be specified in the terminfo database
+(i.e., the \fBcols\fR capability).
+.IP
+It is important that your application use a correct size for the screen.
+However, this is not always possible because your application may be
+running on a host which does not honor NAWS (Negotiations About Window
+Size), or because you are temporarily running as another user.
+.IP
+Either COLUMNS or LINES symbols may be specified independently.
+This is mainly useful to circumvent legacy misfeatures of terminal descriptions,
+e.g., xterm which commonly specifies a 65 line screen.
+For best results, \fBlines\fR and \fBcols\fR should not be specified in
+a terminal description for terminals which are run as emulations.
+.IP
+Use the \fBuse_env\fR function to disable this feature.
+.TP 5
+ESCDELAY
+Specifies the total time, in milliseconds, for which ncurses will
+await a character sequence, e.g., a function key.
+The default value, 1000 milliseconds, is enough for most uses.
+However, it is made a variable to accommodate unusual applications.
+.IP
+The most common instance where you may wish to change this value
+is to work with slow hosts, e.g., running on a network.
+If the host cannot read characters rapidly enough, it will have the same
+effect as if the terminal did not send characters rapidly enough.
+The library will still see a timeout.
+.IP
+Note that xterm mouse events are built up from character sequences
+received from the xterm.
+If your application makes heavy use of multiple-clicking, you may
+wish to lengthen this default value because the timeout applies
+to the composed multi-click event as well as the individual clicks.
+.IP
+In addition to the environment variable,
+this implementation provides a global variable with the same name.
+Portable applications should not rely upon the presence of ESCDELAY
+in either form,
+but setting the environment variable rather than the global variable
+does not create problems when compiling an application.
+.TP 5
+HOME
+Tells \fBncurses\fR where your home directory is.
+That is where it may read and write auxiliary terminal descriptions:
+.IP
+$HOME/.termcap
+.br
+$HOME/.terminfo
+.TP 5
+LINES
+Like COLUMNS, specify the height of the screen in characters.
+See COLUMNS for a detailed description.
+.TP 5
+MOUSE_BUTTONS_123
+This applies only to the OS/2 EMX port.
+It specifies the order of buttons on the mouse.
+OS/2 numbers a 3-button mouse inconsistently from other
+platforms:
+.sp
+1 = left
+.br
+2 = right
+.br
+3 = middle.
+.sp
+This symbol lets you customize the mouse.
+The symbol must be three numeric digits 1-3 in any order, e.g., 123 or 321.
+If it is not specified, \fBncurses\fR uses 132.
+.TP 5
+NCURSES_ASSUMED_COLORS
+Override the compiled-in assumption that the
+terminal's default colors are white-on-black
+(see \fBassume_default_colors\fR(3X)).
+You may set the foreground and background color values with this environment
+variable by proving a 2-element list: foreground,background.
+For example, to tell ncurses to not assume anything
+about the colors, set this to "-1,-1".
+To make it green-on-black, set it to "2,0".
+Any positive value from zero to the terminfo \fBmax_colors\fR value is allowed.
+.TP 5
+NCURSES_NO_PADDING
+Most of the terminal descriptions in the terminfo database are written
+for real "hardware" terminals.
+Many people use terminal emulators
+which run in a windowing environment and use curses-based applications.
+Terminal emulators can duplicate
+all of the important aspects of a hardware terminal, but they do not
+have the same limitations.
+The chief limitation of a hardware terminal from the standpoint
+of your application is the management of dataflow, i.e., timing.
+Unless a hardware terminal is interfaced into a terminal concentrator
+(which does flow control),
+it (or your application) must manage dataflow, preventing overruns.
+The cheapest solution (no hardware cost)
+is for your program to do this by pausing after
+operations that the terminal does slowly, such as clearing the display.
+.IP
+As a result, many terminal descriptions (including the vt100)
+have delay times embedded. You may wish to use these descriptions,
+but not want to pay the performance penalty.
+.IP
+Set the NCURSES_NO_PADDING symbol to disable all but mandatory
+padding. Mandatory padding is used as a part of special control
+sequences such as \fIflash\fR.
+.TP 5
+NCURSES_NO_SETBUF
+Normally \fBncurses\fR enables buffered output during terminal initialization.
+This is done (as in SVr4 curses) for performance reasons.
+For testing purposes, both of \fBncurses\fR and certain applications,
+this feature is made optional. Setting the NCURSES_NO_SETBUF variable
+disables output buffering, leaving the output in the original (usually
+line buffered) mode.
+.TP 5
+NCURSES_TRACE
+During initialization, the \fBncurses\fR debugging library
+checks the NCURSES_TRACE symbol.
+If it is defined, to a numeric value, \fBncurses\fR calls the \fBtrace\fR
+function, using that value as the argument.
+.IP
+The argument values, which are defined in \fBcurses.h\fR, provide several
+types of information.
+When running with traces enabled, your application will write the
+file \fBtrace\fR to the current directory.
+.TP 5
+TERM
+Denotes your terminal type.
+Each terminal type is distinct, though many are similar.
+.TP 5
+TERMCAP
+If the \fBncurses\fR library has been configured with \fItermcap\fR
+support, \fBncurses\fR will check for a terminal's description in
+termcap form if it is not available in the terminfo database.
+.IP
+The TERMCAP symbol contains either a terminal description (with
+newlines stripped out),
+or a file name telling where the information denoted by the TERM symbol exists.
+In either case, setting it directs \fBncurses\fR to ignore
+the usual place for this information, e.g., /etc/termcap.
+.TP 5
+TERMINFO
+Overrides the directory in which \fBncurses\fR searches for your terminal
+description.
+This is the simplest, but not the only way to change the list of directories.
+The complete list of directories in order follows:
+.RS
+.TP 3
+-
+the last directory to which \fBncurses\fR wrote, if any, is searched first
+.TP 3
+-
+the directory specified by the TERMINFO symbol
+.TP 3
+-
+$HOME/.terminfo
+.TP 3
+-
+directories listed in the TERMINFO_DIRS symbol
+.TP 3
+-
+one or more directories whose names are configured and compiled into the
+ncurses library, e.g.,
+@TERMINFO@
+.RE
+.TP 5
+TERMINFO_DIRS
+Specifies a list of directories to search for terminal descriptions.
+The list is separated by colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
+All of the terminal descriptions are in terminfo form, which makes
+a subdirectory named for the first letter of the terminal names therein.
+.TP 5
+TERMPATH
+If TERMCAP does not hold a file name then \fBncurses\fR checks
+the TERMPATH symbol.
+This is a list of filenames separated by spaces or colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
+If the TERMPATH symbol is not set, \fBncurses\fR looks in the files
+/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, in that order.
+.PP
+The library may be configured to disregard the following variables when the
+current user is the superuser (root), or if the application uses setuid or
+setgid permissions:
+$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
+.SH FILES
+.TP 5
+@DATADIR@/tabset
+directory containing initialization files for the terminal capability database
+@TERMINFO@
+terminal capability database
+.SH SEE ALSO
+\fBterminfo\fR(\*n) and related pages whose names begin "curs_" for detailed routine
+descriptions.
+.SH EXTENSIONS
+The \fBncurses\fR library can be compiled with an option (\fB-DUSE_GETCAP\fR)
+that falls back to the old-style /etc/termcap file if the terminal setup code
+cannot find a terminfo entry corresponding to \fBTERM\fR. Use of this feature
+is not recommended, as it essentially includes an entire termcap compiler in
+the \fBncurses\fR startup code, at significant cost in core and startup cycles.
+.PP
+The \fBncurses\fR library includes facilities for capturing mouse events on
+certain terminals (including xterm). See the \fBcurs_mouse\fR(3X)
+manual page for details.
+.PP
+The \fBncurses\fR library includes facilities for responding to window
+resizing events, e.g., when running in an xterm.
+See the \fBresizeterm\fR(3X)
+and \fBwresize\fR(3X) manual pages for details.
+In addition, the library may be configured with a SIGWINCH handler.
+.PP
+The \fBncurses\fR library extends the fixed set of function key capabilities
+of terminals by allowing the application designer to define additional
+key sequences at runtime.
+See the \fBdefine_key\fR(3X)
+\fBkey_defined\fR(3X),
+and \fBkeyok\fR(3X) manual pages for details.
+.PP
+The \fBncurses\fR library can exploit the capabilities of terminals which
+implement the ISO-6429 SGR 39 and SGR 49 controls, which allow an application
+to reset the terminal to its original foreground and background colors.
+From the users' perspective, the application is able to draw colored
+text on a background whose color is set independently, providing better
+control over color contrasts.
+See the \fBdefault_colors\fR(3X) manual page for details.
+.PP
+The \fBncurses\fR library includes a function for directing application output
+to a printer attached to the terminal device. See the \fBcurs_print\fR(3X)
+manual page for details.
+.SH PORTABILITY
+The \fBncurses\fR library is intended to be BASE-level conformant with the XSI
+Curses standard. The EXTENDED XSI Curses functionality
+(including color support) is supported.
+.PP
+A small number of local differences (that is, individual differences between
+the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR
+sections of the library man pages.
+.PP
+The routine \fBhas_key\fR is not part of XPG4, nor is it present in SVr4. See
+the \fBcurs_getch\fR(3X) manual page for details.
+.PP
+The routine \fBslk_attr\fR is not part of XPG4, nor is it present in SVr4. See
+the \fBcurs_slk\fR(3X) manual page for details.
+.PP
+The routines \fBgetmouse\fR, \fBmousemask\fR, \fBungetmouse\fR,
+\fBmouseinterval\fR, and \fBwenclose\fR relating to mouse interfacing are not
+part of XPG4, nor are they present in SVr4. See the \fBcurs_mouse\fR(3X)
+manual page for details.
+.PP
+The routine \fBmcprint\fR was not present in any previous curses
+implementation. See the \fBcurs_print\fR(3X) manual page for details.
+.PP
+The routine \fBwresize\fR is not part of XPG4, nor is it present in SVr4. See
+the \fBwresize\fR(3X) manual page for details.
+.PP
+In historic curses versions, delays embedded in the capabilities \fBcr\fR,
+\fBind\fR, \fBcub1\fR, \fBff\fR and \fBtab\fR activated corresponding delay
+bits in the UNIX tty driver. In this implementation, all padding is done by
+NUL sends. This method is slightly more expensive, but narrows the interface
+to the UNIX kernel significantly and increases the package's portability
+correspondingly.
+.SH NOTES
+The header file \fB<curses.h>\fR automatically includes the header files
+\fB<stdio.h>\fR and \fB<unctrl.h>\fR.
+.PP
+If standard output from a \fBncurses\fR program is re-directed to something
+which is not a tty, screen updates will be directed to standard error. This
+was an undocumented feature of AT&T System V Release 3 curses.
+.SH AUTHORS
+Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
+Based on pcurses by Pavel Curtis.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/panel.3x b/Build/source/libs/ncurses/man/panel.3x
new file mode 100644
index 00000000000..800ad32ee11
--- /dev/null
+++ b/Build/source/libs/ncurses/man/panel.3x
@@ -0,0 +1,182 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: panel.3x,v 1.11 2003/05/17 22:44:09 jmc Exp $
+.TH panel 3X ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+panel - panel stack extension for curses
+.SH SYNOPSIS
+\fB#include <panel.h>\fR
+.P
+\fBcc [flags] sourcefiles -lpanel -lncurses\fR
+.P
+\fBPANEL *new_panel(WINDOW *win)\fR
+.br
+\fBint bottom_panel(PANEL *pan)\fR
+.br
+\fBint top_panel(PANEL *pan)\fR
+.br
+\fBint show_panel(PANEL *pan)\fR
+.br
+\fBvoid update_panels();\fR
+.br
+\fBint hide_panel(PANEL *pan)\fR
+.br
+\fBWINDOW *panel_window(const PANEL *pan)\fR
+.br
+\fBint replace_panel(PANEL *pan, WINDOW *window)\fR
+.br
+\fBint move_panel(PANEL *pan, int starty, int startx)\fR
+.br
+\fBint panel_hidden(const PANEL *pan)\fR
+.br
+\fBPANEL *panel_above(const PANEL *pan)\fR
+.br
+\fBPANEL *panel_below(const PANEL *pan)\fR
+.br
+\fBint set_panel_userptr(PANEL *pan, const void *ptr)\fR
+.br
+\fBconst void *panel_userptr(const PANEL *pan)\fR
+.br
+\fBint del_panel(PANEL *pan)\fR
+.br
+.SH DESCRIPTION
+Panels are \fBcurses\fR(3X) windows with the added feature of
+depth. Panel functions allow the use of stacked windows and ensure
+the proper portions of each window and the curses \fBstdscr\fR window are
+hidden or displayed when panels are added, moved, modified or removed.
+The set of currently visible panels is the stack of panels. The
+\fBstdscr\fR window is beneath all panels, and is not considered part
+of the stack.
+.P
+A window is associated with every panel. The panel routines enable
+you to create, move, hide, and show panels, as well as position a
+panel at any desired location in the stack.
+.P
+Panel routines are a functional layer added to \fBcurses\fR(3X), make only
+high-level curses calls, and work anywhere terminfo curses does.
+.SH FUNCTIONS
+.TP
+\fBnew_panel(win)\fR
+allocates a \fBPANEL\fR structure, associates it with
+\fBwin\fR, places the panel on the top of the stack (causes it
+to be displayed above any other panel) and returns a
+pointer to the new panel.
+.TP
+\fBvoid update_panels()\fR
+refreshes the virtual screen to reflect the relations between the
+panels in the stack, but does not call doupdate() to refresh the
+physical screen. Use this function and not wrefresh or wnoutrefresh.
+update_panels() may be called more than once before a call to
+doupdate(), but doupdate() is the function responsible for updating
+the physical screen.
+.TP
+\fBdel_panel(pan)\fR
+removes the given panel from the stack and deallocates the
+\fBPANEL\fR structure (but not its associated window).
+.TP
+\fBhide_panel(pan)\fR
+removes the given panel from the panel stack and thus hides it from
+view. The \fBPANEL\fR structure is not lost, merely removed from the stack.
+.TP
+\fBshow_panel(pan)\fR
+makes a hidden panel visible by placing it on top of the panels in the
+panel stack. See COMPATIBILITY below.
+.TP
+\fBtop_panel(pan)\fR
+puts the given visible panel on top of all panels in the stack. See
+COMPATIBILITY below.
+.TP
+\fBbottom_panel(pan)\fR
+puts panel at the bottom of all panels.
+.TP
+\fBmove_panel(pan,starty,startx)\fR
+moves the given panel window so that its upper-left corner is at
+\fBstarty\fR, \fBstartx\fR. It does not change the position of the
+panel in the stack. Be sure to use this function, not \fBmvwin()\fR,
+to move a panel window.
+.TP
+\fBreplace_panel(pan,window)\fR
+replaces the current window of panel with \fBwindow\fR (useful, for
+example if you want to resize a panel; if you're using \fBncurses\fR,
+you can call \fBreplace_panel\fR on the output of \fBwresize\fR(3X)).
+It does not change the position of the panel in the stack.
+.TP
+\fBpanel_above(pan)\fR
+returns a pointer to the panel above pan. If the panel argument is
+\fB(PANEL *)0\fR, it returns a pointer to the bottom panel in the stack.
+.TP
+\fBpanel_below(pan)\fR
+returns a pointer to the panel just below pan. If the panel argument
+is \fB(PANEL *)0\fR, it returns a pointer to the top panel in the stack.
+.TP
+\fBset_panel_userptr(pan,ptr)\fR
+sets the panel's user pointer.
+.TP
+\fBpanel_userptr(pan)\fR
+returns the user pointer for a given panel.
+.TP
+\fBpanel_window(pan)\fR
+returns a pointer to the window of the given panel.
+.SH DIAGNOSTICS
+Each routine that returns a pointer returns \fBNULL\fR if an error
+occurs. Each routine that returns an int value returns \fBOK\fR if it
+executes successfully and \fBERR\fR if not.
+.SH COMPATIBILITY
+Reasonable care has been taken to ensure compatibility
+with the native panel facility introduced in SVr3.2 (inspection of
+the SVr4 manual pages suggests the programming interface is unchanged).
+The \fBPANEL\fR data structures are merely similar. The programmer
+is cautioned not to directly use \fBPANEL\fR fields.
+.P
+The functions \fBshow_panel()\fR and \fBtop_panel()\fR are identical
+in this implementation, and work equally well with displayed or hidden
+panels. In the native System V implementation, \fBshow_panel()\fR is
+intended for making a hidden panel visible (at the top of the stack)
+and \fBtop_panel()\fR is intended for making an already-visible panel
+move to the top of the stack. You are cautioned to use the correct
+function to ensure compatibility with native panel libraries.
+.SH NOTE
+In your library list, libpanel.a should be before libncurses.a; that is,
+you want to say `-lpanel -lncurses', not the other way around (which would
+give you a link error using GNU \fBld\fR(1) and some other linkers).
+.SH FILES
+.P
+panel.h
+interface for the panels library
+.P
+libpanel.a
+the panels library itself
+.SH SEE ALSO
+\fBcurses\fR(3X)
+.SH AUTHOR
+Originally written by Warren Tucker <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.
diff --git a/Build/source/libs/ncurses/man/resizeterm.3x b/Build/source/libs/ncurses/man/resizeterm.3x
new file mode 100644
index 00000000000..da5d84df748
--- /dev/null
+++ b/Build/source/libs/ncurses/man/resizeterm.3x
@@ -0,0 +1,92 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1996,1997,2002
+.\"
+.\" $Id: resizeterm.3x,v 1.10 2003/10/25 20:41:08 tom Exp $
+.TH resizeterm 3X ""
+.SH NAME
+\fBis_term_resized\fR,
+\fBresize_term\fR,
+\fBresizeterm\fR - change the curses terminal size
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBbool is_term_resized(int lines, int columns);\fR
+.br
+\fBint resize_term(int lines, int columns);\fR
+.br
+\fBint resizeterm(int lines, int columns);\fR
+.SH DESCRIPTION
+This is an extension to the curses library.
+It provides callers with a hook into the \fBncurses\fR data to resize windows,
+primarily for use by programs running in an X Window terminal (e.g., xterm).
+The function \fBresizeterm\fR resizes the standard and current windows
+to the specified dimensions, and adjusts other bookkeeping data used by
+the \fBncurses\fR library that record the window dimensions.
+
+Most of the work is done by the inner function \fBresize_term\fR.
+The outer function \fBresizeterm\fR adds bookkeeping for the SIGWINCH handler.
+When resizing the windows,
+\fBresize_term\fR blank-fills the areas that are extended.
+The calling application should fill in these areas with appropriate data.
+The \fBresize_term\fR function attempts to resize all windows.
+However, due to the calling convention of pads,
+it is not possible to resize these
+without additional interaction with the application.
+
+A support function \fBis_term_resized\fR is provided so that applications
+can check if the \fBresize_term\fR function would modify the window structures.
+It returns TRUE if the windows would be modified, and FALSE otherwise.
+.SH RETURN VALUE
+Except as notes, these function return
+the integer \fBERR\fR upon failure and \fBOK\fR on success.
+They will fail if either of the dimensions are less than or equal to zero,
+or if an error occurs while (re)allocating memory for the windows.
+.SH NOTES
+While these functions are intended to be used to support a signal handler
+(i.e., for SIGWINCH), care should be taken to avoid invoking them in a
+context where \fBmalloc\fR or \fBrealloc\fR may have been interrupted,
+since it uses those functions.
+.PP
+If ncurses is configured to supply its own SIGWINCH handler,
+the \fBresizeterm\fR function ungetch's a \fBKEY_RESIZE\fR which
+will be read on the next call to \fBgetch\fR.
+This is used to alert an application that the screen size has changed,
+and that it should repaint special features such as pads that cannot
+be done automatically.
+.SH SEE ALSO
+\fBwresize\fR(3X).
+.SH AUTHOR
+Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/term.5 b/Build/source/libs/ncurses/man/term.5
new file mode 100644
index 00000000000..e999b2e8c51
--- /dev/null
+++ b/Build/source/libs/ncurses/man/term.5
@@ -0,0 +1,208 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: term.5,v 1.16 2004/07/05 13:16:08 tom Exp $
+.TH TERM 5
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+term \- format of compiled term file.
+.SH SYNOPSIS
+.B term
+.SH DESCRIPTION
+.PP
+Compiled terminfo descriptions are placed under the directory \fB\*d\fP.
+In order to avoid a linear search of a huge \s-1UNIX\s+1 system directory, a
+two-level scheme is used: \fB\*d/c/name\fP
+where
+.I name
+is the name of the terminal, and
+.I c
+is the first character of
+.IR name .
+Thus,
+.I act4
+can be found in the file \fB\*d/a/act4\fP.
+Synonyms for the same terminal are implemented by multiple
+links to the same compiled file.
+.PP
+The format has been chosen so that it will be the same on all hardware.
+An 8 or more bit byte is assumed, but no assumptions about byte ordering
+or sign extension are made.
+.PP
+The compiled file is created with the
+.I tic
+program, and read by the routine
+.IR setupterm .
+The file is divided into six parts:
+the header,
+terminal names,
+boolean flags,
+numbers,
+strings,
+and
+string table.
+.PP
+The header section begins the file.
+This section contains six short integers in the format
+described below.
+These integers are
+(1) the magic number (octal 0432);
+(2) the size, in bytes, of the names section;
+(3) the number of bytes in the boolean section;
+(4) the number of short integers in the numbers section;
+(5) the number of offsets (short integers) in the strings section;
+(6) the size, in bytes, of the string table.
+.PP
+Short integers are stored in two 8-bit bytes.
+The first byte contains the least significant 8 bits of the value,
+and the second byte contains the most significant 8 bits.
+(Thus, the value represented is 256*second+first.)
+The value -1 is represented by the two bytes 0377, 0377; other negative
+values are illegal. This value generally
+means that the corresponding capability is missing from this terminal.
+Note that this format corresponds to the hardware of the \s-1VAX\s+1
+and \s-1PDP\s+1-11 (that is, little-endian machines).
+Machines where this does not correspond to the hardware must read the
+integers as two bytes and compute the little-endian value.
+.PP
+The terminal names section comes next.
+It contains the first line of the terminfo description,
+listing the various names for the terminal,
+separated by the `|' character.
+The section is terminated with an \s-1ASCII NUL\s+1 character.
+.PP
+The boolean flags have one byte for each flag.
+This byte is either 0 or 1 as the flag is present or absent.
+The capabilities are in the same order as the file <term.h>.
+.PP
+Between the boolean section and the number section,
+a null byte will be inserted, if necessary,
+to ensure that the number section begins on an even byte (this is a
+relic of the PDP-11's word-addressed architecture, originally
+designed in to avoid IOT traps induced by addressing a word on an
+odd byte boundary).
+All short integers are aligned on a short word boundary.
+.PP
+The numbers section is similar to the flags section.
+Each capability takes up two bytes,
+and is stored as a little-endian short integer.
+If the value represented is -1, the capability is taken to be missing.
+.PP
+The strings section is also similar.
+Each capability is stored as a short integer, in the format above.
+A value of -1 means the capability is missing.
+Otherwise, the value is taken as an offset from the beginning
+of the string table.
+Special characters in ^X or \ec notation are stored in their
+interpreted form, not the printing representation.
+Padding information $<nn> and parameter information %x are
+stored intact in uninterpreted form.
+.PP
+The final section is the string table.
+It contains all the values of string capabilities referenced in
+the string section.
+Each string is null terminated.
+.PP
+Note that it is possible for
+.I setupterm
+to expect a different set of capabilities
+than are actually present in the file.
+Either the database may have been updated since
+.I setupterm
+has been recompiled
+(resulting in extra unrecognized entries in the file)
+or the program may have been recompiled more recently
+than the database was updated
+(resulting in missing entries).
+The routine
+.I setupterm
+must be prepared for both possibilities \-
+this is why the numbers and sizes are included.
+Also, new capabilities must always be added at the end of the lists
+of boolean, number, and string capabilities.
+.PP
+Despite the consistent use of little-endian for numbers and the otherwise
+self-describing format, it is not wise to count on portability of binary
+terminfo entries between commercial UNIX versions. The problem is that there
+are at least three versions of terminfo (under HP-UX, AIX, and OSF/1) which
+diverged from System V terminfo after SVr1, and have added extension
+capabilities to the string table that (in the binary format) collide with
+System V and XSI Curses extensions. See \fBterminfo\fR(\*n) for detailed
+discussion of terminfo source compatibility issues.
+.PP
+As an example, here is a hex dump of the description for the Lear-Siegler
+ADM-3, a popular though rather stupid early terminal:
+.nf
+.sp
+adm3a|lsi adm3a,
+ am,
+ cols#80, lines#24,
+ bel=^G, clear=\032$<1>, cr=^M, cub1=^H, cud1=^J,
+ cuf1=^L, cup=\\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
+ home=^^, ind=^J,
+.sp
+.ft CW
+\s-20000 1a 01 10 00 02 00 03 00 82 00 31 00 61 64 6d 33 ........ ..1.adm3
+0010 61 7c 6c 73 69 20 61 64 6d 33 61 00 00 01 50 00 a|lsi ad m3a...P.
+0020 ff ff 18 00 ff ff 00 00 02 00 ff ff ff ff 04 00 ........ ........
+0030 ff ff ff ff ff ff ff ff 0a 00 25 00 27 00 ff ff ........ ..%.'...
+0040 29 00 ff ff ff ff 2b 00 ff ff 2d 00 ff ff ff ff ).....+. ..-.....
+0050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+00a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+00b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+00c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+00d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+00e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+00f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0110 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ........ ........
+0120 ff ff ff ff ff ff 2f 00 07 00 0d 00 1a 24 3c 31 ....../. .....$<1
+0130 3e 00 1b 3d 25 70 31 25 7b 33 32 7d 25 2b 25 63 >..=%p1% {32}%+%c
+0140 25 70 32 25 7b 33 32 7d 25 2b 25 63 00 0a 00 1e %p2%{32} %+%c....
+0150 00 08 00 0c 00 0b 00 0a 00 ........ .\s+2
+.ft R
+.fi
+.sp
+.PP
+Some limitations: total compiled entries cannot exceed 4096 bytes.
+The name field cannot exceed 128 bytes.
+.SH FILES
+\*d/*/* compiled terminal capability data base
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBterminfo\fR(\*n).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/term.7 b/Build/source/libs/ncurses/man/term.7
new file mode 100644
index 00000000000..e3be223b042
--- /dev/null
+++ b/Build/source/libs/ncurses/man/term.7
@@ -0,0 +1,204 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: term.7,v 1.14 2003/05/10 20:33:49 jmc Exp $
+.TH TERM 7
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+term \- conventions for naming terminal types
+.SH DESCRIPTION
+.PP
+The environment variable \fBTERM\fR should normally contain the type name of
+the terminal, console or display-device type you are using. This information
+is critical for all screen-oriented programs, including your editor and mailer.
+.PP
+A default \fBTERM\fR value will be set on a per-line basis by either
+\fB/etc/inittab\fR (Linux and System-V-like UNIXes) or \fB/etc/ttys\fR (BSD
+UNIXes). This will nearly always suffice for workstation and microcomputer
+consoles.
+.PP
+If you use a dialup line, the type of device attached to it may vary. Older
+UNIX systems pre-set a very dumb terminal type like `dumb' or `dialup' on
+dialup lines. Newer ones may pre-set `vt100', reflecting the prevalence of DEC
+VT100-compatible terminals and personal-computer emulators.
+.PP
+Modern telnets pass your \fBTERM\fR environment variable from the local side to
+the remote one. There can be problems if the remote terminfo or termcap entry
+for your type is not compatible with yours, but this situation is rare and
+can almost always be avoided by explicitly exporting `vt100' (assuming you
+are in fact using a VT100-superset console, terminal, or terminal emulator.)
+.PP
+In any case, you are free to override the system \fBTERM\fR setting to your
+taste in your shell profile. The \fBtset\fP(1) utility may be of assistance;
+you can give it a set of rules for deducing or requesting a terminal type based
+on the tty device and baud rate.
+.PP
+Setting your own \fBTERM\fR value may also be useful if you have created a
+custom entry incorporating options (such as visual bell or reverse-video)
+which you wish to override the system default type for your line.
+.PP
+Terminal type descriptions are stored as files of capability data underneath
+\*d. To browse a list of all terminal names recognized by the system, do
+
+ toe | more
+
+from your shell. These capability files are in a binary format optimized for
+retrieval speed (unlike the old text-based \fBtermcap\fR format they replace);
+to examine an entry, you must use the \fBinfocmp\fR(1) command. Invoke it as
+follows:
+
+ infocmp \fIentry-name\fR
+
+where \fIentry-name\fR is the name of the type you wish to examine (and the
+name of its capability file the subdirectory of \*d named for its first
+letter). This command dumps a capability file in the text format described by
+\fBterminfo\fR(\*n).
+.PP
+The first line of a \fBterminfo\fR(\*n) description gives the names by which
+terminfo knows a terminal, separated by `|' (pipe-bar) characters with the last
+name field terminated by a comma. The first name field is the type's
+\fIprimary name\fR, and is the one to use when setting \fBTERM\fR. The last
+name field (if distinct from the first) is actually a description of the
+terminal type (it may contain blanks; the others must be single words). Name
+fields between the first and last (if present) are aliases for the terminal,
+usually historical names retained for compatibility.
+.PP
+There are some conventions for how to choose terminal primary names that help
+keep them informative and unique. Here is a step-by-step guide to naming
+terminals that also explains how to parse them:
+.PP
+First, choose a root name. The root will consist of a lower-case letter
+followed by up to seven lower-case letters or digits. You need to avoid using
+punctuation characters in root names, because they are used and interpreted as
+filenames and shell meta-characters (such as !, $, *, ?, etc.) embedded in them
+may cause odd and unhelpful behavior. The slash (/), or any other character
+that may be interpreted by anyone's file system (\e, $, [, ]), is especially
+dangerous (terminfo is platform-independent, and choosing names with special
+characters could someday make life difficult for users of a future port). The
+dot (.) character is relatively safe as long as there is at most one per root
+name; some historical terminfo names use it.
+.PP
+The root name for a terminal or workstation console type should almost always
+begin with a vendor prefix (such as \fBhp\fR for Hewlett-Packard, \fBwy\fR for
+Wyse, or \fBatt\fR for AT&T terminals), or a common name of the terminal line
+(\fBvt\fR for the VT series of terminals from DEC, or \fBsun\fR for Sun
+Microsystems workstation consoles, or \fBregent\fR for the ADDS Regent series.
+You can list the terminfo tree to see what prefixes are already in common use.
+The root name prefix should be followed when appropriate by a model number;
+thus \fBvt100\fR, \fBhp2621\fR, \fBwy50\fR.
+.PP
+The root name for a PC-Unix console type should be the OS name,
+i.e. \fBlinux\fR, \fBbsdos\fR, \fBfreebsd\fR, \fBnetbsd\fR. It should
+\fInot\fR be \fBconsole\fR or any other generic that might cause confusion in a
+multi-platform environment! If a model number follows, it should indicate
+either the OS release level or the console driver release level.
+.PP
+The root name for a terminal emulator (assuming it doesn't fit one of the
+standard ANSI or vt100 types) should be the program name or a readily
+recognizable abbreviation of it (i.e. \fBversaterm\fR, \fBctrm\fR).
+.PP
+Following the root name, you may add any reasonable number of hyphen-separated
+feature suffixes.
+.TP 5
+2p
+Has two pages of memory. Likewise 4p, 8p, etc.
+.TP 5
+mc
+Magic-cookie. Some terminals (notably older Wyses) can only support one
+attribute without magic-cookie lossage. Their base entry is usually paired
+with another that has this suffix and uses magic cookies to support multiple
+attributes.
+.TP 5
+-am
+Enable auto-margin (right-margin wraparound).
+.TP 5
+-m
+Mono mode - suppress color support.
+.TP 5
+-na
+No arrow keys - termcap ignores arrow keys which are actually there on the
+terminal, so the user can use the arrow keys locally.
+.TP 5
+-nam
+No auto-margin - suppress am capability.
+.TP 5
+-nl
+No labels - suppress soft labels.
+.TP 5
+-nsl
+No status line - suppress status line.
+.TP 5
+-pp
+Has a printer port which is used.
+.TP 5
+-rv
+Terminal in reverse video mode (black on white).
+.TP 5
+-s
+Enable status line.
+.TP 5
+-vb
+Use visible bell (flash) rather than beep.
+.TP 5
+-w
+Wide; terminal is in 132 column mode.
+.PP
+Conventionally, if your terminal type is a variant intended to specify a
+line height, that suffix should go first. So, for a hypothetical FuBarCo
+model 2317 terminal in 30-line mode with reverse video, best form would be
+\fBfubar-30-rv\fR (rather than, say, `fubar-rv-30').
+.PP
+Terminal types that are written not as standalone entries, but rather as
+components to be plugged into other entries via \fBuse\fP capabilities,
+are distinguished by using embedded plus signs rather than dashes.
+.PP
+Commands which use a terminal type to control display often accept a -T
+option that accepts a terminal name argument. Such programs should fall back
+on the \fBTERM\fR environment variable when no -T option is specified.
+.SH PORTABILITY
+For maximum compatibility with older System V UNIXes, names and aliases
+should be unique within the first 14 characters.
+.SH FILES
+.TP 5
+\*d/?/*
+compiled terminal capability data base
+.TP 5
+/etc/inittab
+tty line initialization (AT&T-like UNIXes)
+.TP 5
+/etc/ttys
+tty line initialization (BSD-like UNIXes)
+.SH SEE ALSO
+\fBcurses\fR(3X), \fBterminfo\fR(\*n), \fBterm\fR(\*n).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/terminfo.head b/Build/source/libs/ncurses/man/terminfo.head
new file mode 100644
index 00000000000..398170fffda
--- /dev/null
+++ b/Build/source/libs/ncurses/man/terminfo.head
@@ -0,0 +1,105 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: terminfo.head,v 1.12 2004/09/25 19:07:11 tom Exp $
+.TH TERMINFO 5 "" "" "File Formats"
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+terminfo \- terminal capability data base
+.SH SYNOPSIS
+\*d/*/*
+.SH DESCRIPTION
+.I Terminfo
+is a data base describing terminals, used by screen-oriented programs such as
+\fBnvi\fR(1),
+\fBrogue\fR(1)
+and libraries such as
+\fBcurses\fR(3X).
+.I Terminfo
+describes terminals by giving a set of capabilities which they
+have, by specifying how to perform screen operations, and by
+specifying padding requirements and initialization sequences.
+.PP
+Entries in
+.I terminfo
+consist of a sequence of `,' separated fields (embedded commas may be
+escaped with a backslash or notated as \e054).
+White space after the `,' separator is ignored.
+The first entry for each terminal gives the names which are known for the
+terminal, separated by `|' characters.
+The first name given is the most common abbreviation for the terminal,
+the last name given should be a long name fully identifying the terminal,
+and all others are understood as synonyms for the terminal name.
+All names but the last should be in lower case and contain no blanks;
+the last name may well contain upper case and blanks for readability.
+.PP
+Lines beginning with a `#' in the first column are treated as comments.
+While comment lines are legal at any point, the output of \fIcaptoinfo\fP
+and \fIinfotocap\fP (aliases for \fItic\fP)
+will move comments so they occur only between entries.
+.PP
+Newlines and leading tabs may be used for formatting entries for readability.
+These are removed from parsed entries.
+The \fIinfocmp\ -f\fP option relies on this to format if-then-else expressions:
+the result can be read by \fItic\fP.
+.PP
+Terminal names (except for the last, verbose entry) should
+be chosen using the following conventions.
+The particular piece of hardware making up the terminal should
+have a root name, thus ``hp2621''.
+This name should not contain hyphens.
+Modes that the hardware can be in, or user preferences, should
+be indicated by appending a hyphen and a mode suffix.
+Thus, a vt100 in 132 column mode would be vt100-w.
+The following suffixes should be used where possible:
+.PP
+.TS
+center ;
+l c l
+l l l.
+\fBSuffix Meaning Example\fP
+-\fInn\fP Number of lines on the screen aaa-60
+-\fIn\fPp Number of pages of memory c100-4p
+-am With automargins (usually the default) vt100-am
+-m Mono mode; suppress color ansi-m
+-mc Magic cookie; spaces when highlighting wy30-mc
+-na No arrow keys (leave them in local) c100-na
+-nam Without automatic margins vt100-nam
+-nl No status line att4415-nl
+-ns No status line hp2626-ns
+-rv Reverse video c100-rv
+-s Enable status line vt100-s
+-vb Use visible bell instead of beep wy370-vb
+-w Wide mode (> 80 columns, usually 132) vt100-w
+.TE
+.PP
+For more on terminal naming conventions, see the \fBterm(7)\fR manual page.
+.SS Capabilities
+.\" Head of terminfo man page ends here
+.ps -1
diff --git a/Build/source/libs/ncurses/man/terminfo.tail b/Build/source/libs/ncurses/man/terminfo.tail
new file mode 100644
index 00000000000..0178e307ecd
--- /dev/null
+++ b/Build/source/libs/ncurses/man/terminfo.tail
@@ -0,0 +1,1666 @@
+.\" $Id: terminfo.tail,v 1.41 2004/07/05 13:08:56 tom Exp $
+.\" Beginning of terminfo.tail file
+.\" See "terminfo.head" for copyright.
+.ps +1
+.PP
+.SS A Sample Entry
+.PP
+The following entry, describing an ANSI-standard terminal, is representative
+of what a \fBterminfo\fR entry for a modern terminal typically looks like.
+.PP
+.nf
+.in -2
+.ta .3i
+.ft CW
+\s-2ansi|ansi/pc-term compatible with color,
+ mc5i,
+ colors#8, ncv#3, pairs#64,
+ cub=\\E[%p1%dD, cud=\\E[%p1%dB, cuf=\\E[%p1%dC,
+ cuu=\\E[%p1%dA, dch=\\E[%p1%dP, dl=\\E[%p1%dM,
+ ech=\\E[%p1%dX, el1=\\E[1K, hpa=\\E[%p1%dG, ht=\\E[I,
+ ich=\\E[%p1%d@, il=\\E[%p1%dL, indn=\\E[%p1%dS, .indn=\\E[%p1%dT,
+ kbs=^H, kcbt=\\E[Z, kcub1=\\E[D, kcud1=\\E[B,
+ kcuf1=\\E[C, kcuu1=\\E[A, kf1=\\E[M, kf10=\\E[V,
+ kf11=\\E[W, kf12=\\E[X, kf2=\\E[N, kf3=\\E[O, kf4=\\E[P,
+ kf5=\\E[Q, kf6=\\E[R, kf7=\\E[S, kf8=\\E[T, kf9=\\E[U,
+ kich1=\\E[L, mc4=\\E[4i, mc5=\\E[5i, nel=\\r\\E[S,
+ op=\\E[37;40m, rep=%p1%c\\E[%p2%{1}%-%db,
+ rin=\\E[%p1%dT, s0ds=\\E(B, s1ds=\\E)B, s2ds=\\E*B,
+ s3ds=\\E+B, setab=\\E[4%p1%dm, setaf=\\E[3%p1%dm,
+ setb=\\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=\\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p8%t;11%;%?%p9%t;12%;m,
+ sgr0=\\E[0;10m, tbc=\\E[2g, u6=\\E[%d;%dR, u7=\\E[6n,
+ u8=\\E[?%[;0123456789]c, u9=\\E[c, vpa=\\E[%p1%dd,\s+2
+.in +2
+.fi
+.ft R
+.PP
+Entries may continue onto multiple lines by placing white space at
+the beginning of each line except the first.
+Comments may be included on lines beginning with ``#''.
+Capabilities in
+.I terminfo
+are of three types:
+Boolean capabilities which indicate that the terminal has
+some particular feature, numeric capabilities giving the size of the terminal
+or the size of particular delays, and string
+capabilities, which give a sequence which can be used to perform particular
+terminal operations.
+.PP
+.SS Types of Capabilities
+.PP
+All capabilities have names.
+For instance, the fact that
+ANSI-standard terminals have
+.I "automatic margins"
+(i.e., an automatic return and line-feed
+when the end of a line is reached) is indicated by the capability \fBam\fR.
+Hence the description of ansi includes \fBam\fR.
+Numeric capabilities are followed by the character `#' and then a positive value.
+Thus \fBcols\fR, which indicates the number of columns the terminal has,
+gives the value `80' for ansi.
+Values for numeric capabilities may be specified in decimal, octal or hexadecimal,
+using the C programming language conventions (e.g., 255, 0377 and 0xff or 0xFF).
+.PP
+Finally, string valued capabilities, such as \fBel\fR (clear to end of line
+sequence) are given by the two-character code, an `=', and then a string
+ending at the next following `,'.
+.PP
+A number of escape sequences are provided in the string valued capabilities
+for easy encoding of characters there.
+Both \fB\eE\fR and \fB\ee\fR
+map to an \s-1ESCAPE\s0 character,
+\fB^x\fR maps to a control-x for any appropriate x, and the sequences
+\fB\en \el \er \et \eb \ef \es\fR give
+a newline, line-feed, return, tab, backspace, form-feed, and space.
+Other escapes include \fB\e^\fR for \fB^\fR,
+\fB\e\e\fR for \fB\e\fR,
+\fB\e\fR, for comma,
+\fB\e:\fR for \fB:\fR,
+and \fB\e0\fR for null.
+(\fB\e0\fR will produce \e200, which does not terminate a string but behaves
+as a null character on most terminals, providing CS7 is specified.
+See stty(1).)
+Finally, characters may be given as three octal digits after a \fB\e\fR.
+.PP
+A delay in milliseconds may appear anywhere in a string capability, enclosed in
+$<..> brackets, as in \fBel\fP=\eEK$<5>, and padding characters are supplied by
+.I tputs
+to provide this delay.
+The delay must be a number with at most one decimal
+place of precision; it may be followed by suffixes `*' or '/' or both.
+A `*'
+indicates that the padding required is proportional to the number of lines
+affected by the operation, and the amount given is the per-affected-unit
+padding required.
+(In the case of insert character, the factor is still the
+number of
+.IR lines
+affected.) Normally, padding is advisory if the device has the \fBxon\fR
+capability; it is used for cost computation but does not trigger delays.
+A `/'
+suffix indicates that the padding is mandatory and forces a delay of the given
+number of milliseconds even on devices for which \fBxon\fR is present to
+indicate flow control.
+.PP
+Sometimes individual capabilities must be commented out.
+To do this, put a period before the capability name.
+For example, see the second
+.B ind
+in the example above.
+.br
+.ne 5
+.PP
+.SS Fetching Compiled Descriptions
+.PP
+If the environment variable TERMINFO is set, it is interpreted as the pathname
+of a directory containing the compiled description you are working on.
+Only
+that directory is searched.
+.PP
+If TERMINFO is not set, the \fBncurses\fR version of the terminfo reader code
+will instead look in the directory \fB$HOME/.terminfo\fR
+for a compiled description.
+If it fails to find one there, and the environment variable TERMINFO_DIRS is
+set, it will interpret the contents of that variable as a list of colon-
+separated directories to be searched (an empty entry is interpreted as a
+command to search \fI\*d\fR).
+If no description is found in any of the
+TERMINFO_DIRS directories, the fetch fails.
+.PP
+If neither TERMINFO nor TERMINFO_DIRS is set, the last place tried will be the
+system terminfo directory, \fI\*d\fR.
+.PP
+(Neither the \fB$HOME/.terminfo\fR lookups nor TERMINFO_DIRS extensions are
+supported under stock System V terminfo/curses.)
+.PP
+.SS Preparing Descriptions
+.PP
+We now outline how to prepare descriptions of terminals.
+The most effective way to prepare a terminal description is by imitating
+the description of a similar terminal in
+.I terminfo
+and to build up a description gradually, using partial descriptions
+with
+.I vi
+or some other screen-oriented program to check that they are correct.
+Be aware that a very unusual terminal may expose deficiencies in
+the ability of the
+.I terminfo
+file to describe it
+or bugs in the screen-handling code of the test program.
+.PP
+To get the padding for insert line right (if the terminal manufacturer
+did not document it) a severe test is to edit a large file at 9600 baud,
+delete 16 or so lines from the middle of the screen, then hit the `u'
+key several times quickly.
+If the terminal messes up, more padding is usually needed.
+A similar test can be used for insert character.
+.PP
+.SS Basic Capabilities
+.PP
+The number of columns on each line for the terminal is given by the
+\fBcols\fR numeric capability.
+If the terminal is a \s-1CRT\s0, then the
+number of lines on the screen is given by the \fBlines\fR capability.
+If the terminal wraps around to the beginning of the next line when
+it reaches the right margin, then it should have the \fBam\fR capability.
+If the terminal can clear its screen, leaving the cursor in the home
+position, then this is given by the \fBclear\fR string capability.
+If the terminal overstrikes
+(rather than clearing a position when a character is struck over)
+then it should have the \fBos\fR capability.
+If the terminal is a printing terminal, with no soft copy unit,
+give it both
+.B hc
+and
+.BR os .
+.RB ( os
+applies to storage scope terminals, such as \s-1TEKTRONIX\s+1 4010
+series, as well as hard copy and APL terminals.)
+If there is a code to move the cursor to the left edge of the current
+row, give this as
+.BR cr .
+(Normally this will be carriage return, control M.)
+If there is a code to produce an audible signal (bell, beep, etc)
+give this as
+.BR bel .
+.PP
+If there is a code to move the cursor one position to the left
+(such as backspace) that capability should be given as
+.BR cub1 .
+Similarly, codes to move to the right, up, and down should be
+given as
+.BR cuf1 ,
+.BR cuu1 ,
+and
+.BR cud1 .
+These local cursor motions should not alter the text they pass over,
+for example, you would not normally use `\fBcuf1\fP=\ ' because the
+space would erase the character moved over.
+.PP
+A very important point here is that the local cursor motions encoded
+in
+.I terminfo
+are undefined at the left and top edges of a \s-1CRT\s0 terminal.
+Programs should never attempt to backspace around the left edge,
+unless
+.B bw
+is given,
+and never attempt to go up locally off the top.
+In order to scroll text up, a program will go to the bottom left corner
+of the screen and send the
+.B ind
+(index) string.
+.PP
+To scroll text down, a program goes to the top left corner
+of the screen and sends the
+.B ri
+(reverse index) string.
+The strings
+.B ind
+and
+.B ri
+are undefined when not on their respective corners of the screen.
+.PP
+Parameterized versions of the scrolling sequences are
+.B indn
+and
+.B rin
+which have the same semantics as
+.B ind
+and
+.B ri
+except that they take one parameter, and scroll that many lines.
+They are also undefined except at the appropriate edge of the screen.
+.PP
+The \fBam\fR capability tells whether the cursor sticks at the right
+edge of the screen when text is output, but this does not necessarily
+apply to a
+.B cuf1
+from the last column.
+The only local motion which is defined from the left edge is if
+.B bw
+is given, then a
+.B cub1
+from the left edge will move to the right edge of the previous row.
+If
+.B bw
+is not given, the effect is undefined.
+This is useful for drawing a box around the edge of the screen, for example.
+If the terminal has switch selectable automatic margins,
+the
+.I terminfo
+file usually assumes that this is on; i.e., \fBam\fR.
+If the terminal has a command which moves to the first column of the next
+line, that command can be given as
+.B nel
+(newline).
+It does not matter if the command clears the remainder of the current line,
+so if the terminal has no
+.B cr
+and
+.B lf
+it may still be possible to craft a working
+.B nel
+out of one or both of them.
+.PP
+These capabilities suffice to describe hard-copy and \*(lqglass-tty\*(rq terminals.
+Thus the model 33 teletype is described as
+.PP
+.DT
+.nf
+.ft CW
+.\".in -2
+\s-133\||\|tty33\||\|tty\||\|model 33 teletype,
+ bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,\s+1
+.\".in +2
+.ft R
+.PP
+while the Lear Siegler \s-1ADM-3\s0 is described as
+.PP
+.DT
+.nf
+.ft CW
+.\".in -2
+\s-1adm3\||\|3\||\|lsi adm3,
+ am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
+ ind=^J, lines#24,\s+1
+.\".in +2
+.ft R
+.fi
+.PP
+.SS Parameterized Strings
+.PP
+Cursor addressing and other strings requiring parameters
+in the terminal are described by a
+parameterized string capability, with
+.IR printf (3S)
+like escapes \fB%x\fR in it.
+For example, to address the cursor, the
+.B cup
+capability is given, using two parameters:
+the row and column to address to.
+(Rows and columns are numbered from zero and refer to the
+physical screen visible to the user, not to any unseen memory.)
+If the terminal has memory relative cursor addressing,
+that can be indicated by
+.BR mrcup .
+.PP
+The parameter mechanism uses a stack and special \fB%\fP codes
+to manipulate it.
+Typically a sequence will push one of the
+parameters onto the stack and then print it in some format.
+Print (e.g., "%d") is a special case.
+Other operations, including "%t" pop their operand from the stack.
+It is noted that more complex operations are often necessary,
+e.g., in the \fBsgr\fP string.
+.PP
+The \fB%\fR encodings have the following meanings:
+.PP
+.TP 5
+\s-1%%
+outputs `%'
+.TP
+%\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP
+as in \fBprintf\fP, flags are [-+#] and space
+.TP
+%c
+print pop() like %c in \fBprintf\fP
+.TP
+%s
+print pop() like %s in \fBprintf\fP
+.TP
+%p[1-9]
+push \fIi\fP'th parameter
+.TP
+%P[a-z]
+set dynamic variable [a-z] to pop()
+.TP
+%g[a-z]
+get dynamic variable [a-z] and push it
+.TP
+%P[A-Z]
+set static variable [a-z] to pop()
+.TP
+%g[A-Z]
+get static variable [a-z] and push it
+.IP
+The terms "static" and "dynamic" are misleading.
+Historically, these are simply two different sets of variables,
+whose values are not reset between calls to \fBtparm\fP.
+However, that fact is not documented in other implementations.
+Relying on it will adversely impact portability to other implementations.
+.TP
+%'\fIc\fP'
+char constant \fIc\fP
+.TP
+%{\fInn\fP}
+integer constant \fInn\fP
+.TP
+%l
+push strlen(pop)
+.TP
+%+ %- %* %/ %m
+arithmetic (%m is mod): push(pop() op pop())
+.TP
+%& %| %^
+bit operations: push(pop() op pop())
+.TP
+%= %> %<
+logical operations: push(pop() op pop())
+.TP
+%A, %O
+logical and & or operations (for conditionals)
+.TP
+%! %~
+unary operations push(op pop())
+.TP
+%i
+add 1 to first two parameters (for ANSI terminals)
+.TP
+%? \fIexpr\fP %t \fIthenpart\fP %e \fIelsepart\fP %;
+This forms an if-then-else.
+The %e \fIelsepart\fP is optional.
+Usually the %? \fIexpr\fP part pushes a value onto the stack,
+and %t pops it from the stack, testing if it is nonzero (true).
+If it is zero (false), control passes to the %e (else) part.
+.IP
+It is possible to form else-if's a la Algol 68:
+.RS
+%? c\d1\u %t b\d1\u %e c\d2\u %t b\d2\u %e c\d3\u %t b\d3\u %e c\d4\u %t b\d4\u %e %;
+.RE
+.IP
+where c\di\u are conditions, b\di\u are bodies.
+.IP
+Use the \fB-f\fP option of \fBtic\fP or \fBinfocmp\fP to see
+the structure of if-the-else's.
+Some strings, e.g., \fBsgr\fP can be very complicated when written
+on one line.
+The \fB-f\fP option splits the string into lines with the parts indented.
+.PP
+Binary operations are in postfix form with the operands in the usual order.
+That is, to get x-5 one would use "%gx%{5}%-".
+%P and %g variables are
+persistent across escape-string evaluations.
+.PP
+Consider the HP2645, which, to get to row 3 and column 12, needs
+to be sent \eE&a12c03Y padded for 6 milliseconds.
+Note that the order
+of the rows and columns is inverted here, and that the row and column
+are printed as two digits.
+Thus its \fBcup\fR capability is \*(lqcup=6\eE&%p2%2dc%p1%2dY\*(rq.
+.PP
+The Microterm \s-1ACT-IV\s0 needs the current row and column sent
+preceded by a \fB^T\fR, with the row and column simply encoded in binary,
+\*(lqcup=^T%p1%c%p2%c\*(rq.
+Terminals which use \*(lq%c\*(rq need to be able to
+backspace the cursor (\fBcub1\fR),
+and to move the cursor up one line on the screen (\fBcuu1\fR).
+This is necessary because it is not always safe to transmit \fB\en\fR
+\fB^D\fR and \fB\er\fR, as the system may change or discard them.
+(The library routines dealing with terminfo set tty modes so that
+tabs are never expanded, so \et is safe to send.
+This turns out to be essential for the Ann Arbor 4080.)
+.PP
+A final example is the \s-1LSI ADM\s0-3a, which uses row and column
+offset by a blank character, thus \*(lqcup=\eE=%p1%' '%+%c%p2%' '%+%c\*(rq.
+After sending `\eE=', this pushes the first parameter, pushes the
+ASCII value for a space (32), adds them (pushing the sum on the stack
+in place of the two previous values) and outputs that value as a character.
+Then the same is done for the second parameter.
+More complex arithmetic is possible using the stack.
+.PP
+.SS Cursor Motions
+.PP
+If the terminal has a fast way to home the cursor
+(to very upper left corner of screen) then this can be given as
+\fBhome\fR; similarly a fast way of getting to the lower left-hand corner
+can be given as \fBll\fR; this may involve going up with \fBcuu1\fR
+from the home position,
+but a program should never do this itself (unless \fBll\fR does) because it
+can make no assumption about the effect of moving up from the home position.
+Note that the home position is the same as addressing to (0,0):
+to the top left corner of the screen, not of memory.
+(Thus, the \eEH sequence on HP terminals cannot be used for
+.BR home .)
+.PP
+If the terminal has row or column absolute cursor addressing,
+these can be given as single parameter capabilities
+.B hpa
+(horizontal position absolute)
+and
+.B vpa
+(vertical position absolute).
+Sometimes these are shorter than the more general two parameter
+sequence (as with the hp2645) and can be used in preference to
+.BR cup .
+If there are parameterized local motions (e.g., move
+.I n
+spaces to the right) these can be given as
+.BR cud ,
+.BR cub ,
+.BR cuf ,
+and
+.BR cuu
+with a single parameter indicating how many spaces to move.
+These are primarily useful if the terminal does not have
+.BR cup ,
+such as the \s-1TEKTRONIX\s+1 4025.
+.PP
+If the terminal needs to be in a special mode when running
+a program that uses these capabilities,
+the codes to enter and exit this mode can be given as \fBsmcup\fR and \fBrmcup\fR.
+This arises, for example, from terminals like the Concept with more than
+one page of memory.
+If the terminal has only memory relative cursor addressing and not screen
+relative cursor addressing, a one screen-sized window must be fixed into
+the terminal for cursor addressing to work properly.
+This is also used for the \s-1TEKTRONIX\s+1 4025,
+where
+.B smcup
+sets the command character to be the one used by terminfo.
+If the \fBsmcup\fP sequence will not restore the screen after an
+\fBrmcup\fP sequence is output (to the state prior to outputting
+\fBrmcup\fP), specify \fBnrrmc\fP.
+.PP
+.SS Area Clears
+.PP
+If the terminal can clear from the current position to the end of the
+line, leaving the cursor where it is, this should be given as \fBel\fR.
+If the terminal can clear from the beginning of the line to the current
+position inclusive, leaving
+the cursor where it is, this should be given as \fBel1\fP.
+If the terminal can clear from the current position to the end of the
+display, then this should be given as \fBed\fR.
+\fBEd\fR is only defined from the first column of a line.
+(Thus, it can be simulated by a request to delete a large number of lines,
+if a true
+.B ed
+is not available.)
+.PP
+.SS Insert/delete line and vertical motions
+.PP
+If the terminal can open a new blank line before the line where the cursor
+is, this should be given as \fBil1\fR; this is done only from the first
+position of a line.
+The cursor must then appear on the newly blank line.
+If the terminal can delete the line which the cursor is on, then this
+should be given as \fBdl1\fR; this is done only from the first position on
+the line to be deleted.
+Versions of
+.B il1
+and
+.B dl1
+which take a single parameter and insert or delete that many lines can
+be given as
+.B il
+and
+.BR dl .
+.PP
+If the terminal has a settable scrolling region (like the vt100)
+the command to set this can be described with the
+.B csr
+capability, which takes two parameters:
+the top and bottom lines of the scrolling region.
+The cursor position is, alas, undefined after using this command.
+.PP
+It is possible to get the effect of insert or delete line using
+.B csr
+on a properly chosen region; the
+.B sc
+and
+.B rc
+(save and restore cursor) commands may be useful for ensuring that
+your synthesized insert/delete string does not move the cursor.
+(Note that the \fBncurses\fR(3X) library does this synthesis
+automatically, so you need not compose insert/delete strings for
+an entry with \fBcsr\fR).
+.PP
+Yet another way to construct insert and delete might be to use a combination of
+index with the memory-lock feature found on some terminals (like the HP-700/90
+series, which however also has insert/delete).
+.PP
+Inserting lines at the top or bottom of the screen can also be
+done using
+.B ri
+or
+.B ind
+on many terminals without a true insert/delete line,
+and is often faster even on terminals with those features.
+.PP
+The boolean \fBnon_dest_scroll_region\fR should be set if each scrolling
+window is effectively a view port on a screen-sized canvas.
+To test for
+this capability, create a scrolling region in the middle of the screen,
+write something to the bottom line, move the cursor to the top of the region,
+and do \fBri\fR followed by \fBdl1\fR or \fBind\fR.
+If the data scrolled
+off the bottom of the region by the \fBri\fR re-appears, then scrolling
+is non-destructive.
+System V and XSI Curses expect that \fBind\fR, \fBri\fR,
+\fBindn\fR, and \fBrin\fR will simulate destructive scrolling; their
+documentation cautions you not to define \fBcsr\fR unless this is true.
+This \fBcurses\fR implementation is more liberal and will do explicit erases
+after scrolling if \fBndstr\fR is defined.
+.PP
+If the terminal has the ability to define a window as part of
+memory, which all commands affect,
+it should be given as the parameterized string
+.BR wind .
+The four parameters are the starting and ending lines in memory
+and the starting and ending columns in memory, in that order.
+.PP
+If the terminal can retain display memory above, then the
+\fBda\fR capability should be given; if display memory can be retained
+below, then \fBdb\fR should be given.
+These indicate
+that deleting a line or scrolling may bring non-blank lines up from below
+or that scrolling back with \fBri\fR may bring down non-blank lines.
+.PP
+.SS Insert/Delete Character
+.PP
+There are two basic kinds of intelligent terminals with respect to
+insert/delete character which can be described using
+.I terminfo.
+The most common insert/delete character operations affect only the characters
+on the current line and shift characters off the end of the line rigidly.
+Other terminals, such as the Concept 100 and the Perkin Elmer Owl, make
+a distinction between typed and untyped blanks on the screen, shifting
+upon an insert or delete only to an untyped blank on the screen which is
+either eliminated, or expanded to two untyped blanks.
+You can determine the
+kind of terminal you have by clearing the screen and then typing
+text separated by cursor motions.
+Type \*(lqabc\ \ \ \ def\*(rq using local
+cursor motions (not spaces) between the \*(lqabc\*(rq and the \*(lqdef\*(rq.
+Then position the cursor before the \*(lqabc\*(rq and put the terminal in insert
+mode.
+If typing characters causes the rest of the line to shift
+rigidly and characters to fall off the end, then your terminal does
+not distinguish between blanks and untyped positions.
+If the \*(lqabc\*(rq
+shifts over to the \*(lqdef\*(rq which then move together around the end of the
+current line and onto the next as you insert, you have the second type of
+terminal, and should give the capability \fBin\fR, which stands for
+\*(lqinsert null\*(rq.
+While these are two logically separate attributes (one line versus multi-line
+insert mode, and special treatment of untyped spaces) we have seen no
+terminals whose insert mode cannot be described with the single attribute.
+.PP
+Terminfo can describe both terminals which have an insert mode, and terminals
+which send a simple sequence to open a blank position on the current line.
+Give as \fBsmir\fR the sequence to get into insert mode.
+Give as \fBrmir\fR the sequence to leave insert mode.
+Now give as \fBich1\fR any sequence needed to be sent just before sending
+the character to be inserted.
+Most terminals with a true insert mode
+will not give \fBich1\fR; terminals which send a sequence to open a screen
+position should give it here.
+.PP
+If your terminal has both, insert mode is usually preferable to \fBich1\fR.
+Technically, you should not give both unless the terminal actually requires
+both to be used in combination.
+Accordingly, some non-curses applications get
+confused if both are present; the symptom is doubled characters in an update
+using insert.
+This requirement is now rare; most \fBich\fR sequences do not
+require previous smir, and most smir insert modes do not require \fBich1\fR
+before each character.
+Therefore, the new \fBcurses\fR actually assumes this
+is the case and uses either \fBrmir\fR/\fBsmir\fR or \fBich\fR/\fBich1\fR as
+appropriate (but not both).
+If you have to write an entry to be used under
+new curses for a terminal old enough to need both, include the
+\fBrmir\fR/\fBsmir\fR sequences in \fBich1\fR.
+.PP
+If post insert padding is needed, give this as a number of milliseconds
+in \fBip\fR (a string option).
+Any other sequence which may need to be
+sent after an insert of a single character may also be given in \fBip\fR.
+If your terminal needs both to be placed into an `insert mode' and
+a special code to precede each inserted character, then both
+.BR smir / rmir
+and
+.B ich1
+can be given, and both will be used.
+The
+.B ich
+capability, with one parameter,
+.IR n ,
+will repeat the effects of
+.B ich1
+.I n
+times.
+.PP
+If padding is necessary between characters typed while not
+in insert mode, give this as a number of milliseconds padding in \fBrmp\fP.
+.PP
+It is occasionally necessary to move around while in insert mode
+to delete characters on the same line (e.g., if there is a tab after
+the insertion position).
+If your terminal allows motion while in
+insert mode you can give the capability \fBmir\fR to speed up inserting
+in this case.
+Omitting \fBmir\fR will affect only speed.
+Some terminals
+(notably Datamedia's) must not have \fBmir\fR because of the way their
+insert mode works.
+.PP
+Finally, you can specify
+.B dch1
+to delete a single character,
+.B dch
+with one parameter,
+.IR n ,
+to delete
+.I n characters,
+and delete mode by giving \fBsmdc\fR and \fBrmdc\fR
+to enter and exit delete mode (any mode the terminal needs to be placed
+in for
+.B dch1
+to work).
+.PP
+A command to erase
+.I n
+characters (equivalent to outputting
+.I n
+blanks without moving the cursor)
+can be given as
+.B ech
+with one parameter.
+.PP
+.SS "Highlighting, Underlining, and Visible Bells"
+.PP
+If your terminal has one or more kinds of display attributes,
+these can be represented in a number of different ways.
+You should choose one display form as
+\f2standout mode\fR,
+representing a good, high contrast, easy-on-the-eyes,
+format for highlighting error messages and other attention getters.
+(If you have a choice, reverse video plus half-bright is good,
+or reverse video alone.)
+The sequences to enter and exit standout mode
+are given as \fBsmso\fR and \fBrmso\fR, respectively.
+If the code to change into or out of standout
+mode leaves one or even two blank spaces on the screen,
+as the TVI 912 and Teleray 1061 do,
+then \fBxmc\fR should be given to tell how many spaces are left.
+.PP
+Codes to begin underlining and end underlining can be given as \fBsmul\fR
+and \fBrmul\fR respectively.
+If the terminal has a code to underline the current character and move
+the cursor one space to the right,
+such as the Microterm Mime,
+this can be given as \fBuc\fR.
+.PP
+Other capabilities to enter various highlighting modes include
+.B blink
+(blinking)
+.B bold
+(bold or extra bright)
+.B dim
+(dim or half-bright)
+.B invis
+(blanking or invisible text)
+.B prot
+(protected)
+.B rev
+(reverse video)
+.B sgr0
+(turn off
+.I all
+attribute modes)
+.B smacs
+(enter alternate character set mode)
+and
+.B rmacs
+(exit alternate character set mode).
+Turning on any of these modes singly may or may not turn off other modes.
+.PP
+If there is a sequence to set arbitrary combinations of modes,
+this should be given as
+.B sgr
+(set attributes),
+taking 9 parameters.
+Each parameter is either 0 or nonzero, as the corresponding attribute is on or off.
+The 9 parameters are, in order:
+standout, underline, reverse, blink, dim, bold, blank, protect, alternate
+character set.
+Not all modes need be supported by
+.BR sgr ,
+only those for which corresponding separate attribute commands exist.
+.PP
+For example, the DEC vt220 supports most of the modes:
+.PP
+.TS
+center;
+l c c
+l c c
+lw28 lw6 lw2 lw20.
+\fBtparm parameter attribute escape sequence\fP
+
+none none \\E[0m
+p1 standout \\E[0;1;7m
+p2 underline \\E[0;4m
+p3 reverse \\E[0;7m
+p4 blink \\E[0;5m
+p5 dim not available
+p6 bold \\E[0;1m
+p7 invis \\E[0;8m
+p8 protect not used
+p9 altcharset ^O (off) ^N (on)
+.TE
+.PP
+We begin each escape sequence by turning off any existing modes, since
+there is no quick way to determine whether they are active.
+Standout is set up to be the combination of reverse and bold.
+The vt220 terminal has a protect mode,
+though it is not commonly used in sgr
+because it protects characters on the screen from the host's erasures.
+The altcharset mode also is different in that it is either ^O or ^N,
+depending on whether it is off or on.
+If all modes are turned on, the resulting sequence is \\E[0;1;4;5;7;8m^N.
+.PP
+Some sequences are common to different modes.
+For example, ;7 is output when either p1 or p3 is true, that is, if
+either standout or reverse modes are turned on.
+.PP
+Writing out the above sequences, along with their dependencies yields
+.PP
+.TS
+center;
+l c c
+l c c
+lw28 lw6 lw2 lw20.
+\fBsequence when to output terminfo translation\fP
+
+\\E[0 always \\E[0
+;1 if p1 or p6 %?%p1%p6%|%t;1%;
+;4 if p2 %?%p2%|%t;4%;
+;5 if p4 %?%p4%|%t;5%;
+;7 if p1 or p3 %?%p1%p3%|%t;7%;
+;8 if p7 %?%p7%|%t;8%;
+m always m
+^N or ^O if p9 ^N, else ^O %?%p9%t^N%e^O%;
+.TE
+.PP
+Putting this all together into the sgr sequence gives:
+.PP
+.nf
+ sgr=\\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;
+ %?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\\016%e\\017%;,
+.fi
+.PP
+Remember that if you specify sgr, you must also specify sgr0.
+Also, some implementations rely on sgr being given if sgr0 is,
+Not all terminfo entries necessarily have an sgr string, however.
+Many terminfo entries are derived from termcap entries
+which have no sgr string.
+The only drawback to adding an sgr string is that termcap also
+assumes that sgr0 does not exit alternate character set mode.
+.PP
+Terminals with the ``magic cookie'' glitch
+.RB ( xmc )
+deposit special ``cookies'' when they receive mode-setting sequences,
+which affect the display algorithm rather than having extra bits for
+each character.
+Some terminals, such as the HP 2621, automatically leave standout
+mode when they move to a new line or the cursor is addressed.
+Programs using standout mode should exit standout mode before
+moving the cursor or sending a newline,
+unless the
+.B msgr
+capability, asserting that it is safe to move in standout mode, is present.
+.PP
+If the terminal has
+a way of flashing the screen to indicate an error quietly (a bell replacement)
+then this can be given as \fBflash\fR; it must not move the cursor.
+.PP
+If the cursor needs to be made more visible than normal when it is
+not on the bottom line (to make, for example, a non-blinking underline into an
+easier to find block or blinking underline)
+give this sequence as
+.BR cvvis .
+If there is a way to make the cursor completely invisible, give that as
+.BR civis .
+The capability
+.BR cnorm
+should be given which undoes the effects of both of these modes.
+.PP
+If your terminal correctly generates underlined characters
+(with no special codes needed)
+even though it does not overstrike,
+then you should give the capability \fBul\fR.
+If a character overstriking another leaves both characters on the screen,
+specify the capability \fBos\fP.
+If overstrikes are erasable with a blank,
+then this should be indicated by giving \fBeo\fR.
+.PP
+.SS Keypad and Function Keys
+.PP
+If the terminal has a keypad that transmits codes when the keys are pressed,
+this information can be given.
+Note that it is not possible to handle
+terminals where the keypad only works in local (this applies, for example,
+to the unshifted HP 2621 keys).
+If the keypad can be set to transmit or not transmit,
+give these codes as \fBsmkx\fR and \fBrmkx\fR.
+Otherwise the keypad is assumed to always transmit.
+The codes sent by the left arrow, right arrow, up arrow, down arrow,
+and home keys can be given as
+\fBkcub1, kcuf1, kcuu1, kcud1, \fRand\fB khome\fR respectively.
+If there are function keys such as f0, f1, ..., f10, the codes they send
+can be given as \fBkf0, kf1, ..., kf10\fR.
+If these keys have labels other than the default f0 through f10, the labels
+can be given as \fBlf0, lf1, ..., lf10\fR.
+The codes transmitted by certain other special keys can be given:
+.B kll
+(home down),
+.B kbs
+(backspace),
+.B ktbc
+(clear all tabs),
+.B kctab
+(clear the tab stop in this column),
+.B kclr
+(clear screen or erase key),
+.B kdch1
+(delete character),
+.B kdl1
+(delete line),
+.B krmir
+(exit insert mode),
+.B kel
+(clear to end of line),
+.B ked
+(clear to end of screen),
+.B kich1
+(insert character or enter insert mode),
+.B kil1
+(insert line),
+.B knp
+(next page),
+.B kpp
+(previous page),
+.B kind
+(scroll forward/down),
+.B kri
+(scroll backward/up),
+.B khts
+(set a tab stop in this column).
+In addition, if the keypad has a 3 by 3 array of keys including the four
+arrow keys, the other five keys can be given as
+.BR ka1 ,
+.BR ka3 ,
+.BR kb2 ,
+.BR kc1 ,
+and
+.BR kc3 .
+These keys are useful when the effects of a 3 by 3 directional pad are needed.
+.PP
+Strings to program function keys can be given as
+.BR pfkey ,
+.BR pfloc ,
+and
+.BR pfx .
+A string to program screen labels should be specified as \fBpln\fP.
+Each of these strings takes two parameters: the function key number to
+program (from 0 to 10) and the string to program it with.
+Function key numbers out of this range may program undefined keys in
+a terminal dependent manner.
+The difference between the capabilities is that
+.B pfkey
+causes pressing the given key to be the same as the user typing the
+given string;
+.B pfloc
+causes the string to be executed by the terminal in local; and
+.B pfx
+causes the string to be transmitted to the computer.
+.PP
+The capabilities \fBnlab\fP, \fBlw\fP and \fBlh\fP
+define the number of programmable
+screen labels and their width and height.
+If there are commands to turn the labels on and off,
+give them in \fBsmln\fP and \fBrmln\fP.
+\fBsmln\fP is normally output after one or more pln
+sequences to make sure that the change becomes visible.
+.PP
+.SS Tabs and Initialization
+.PP
+If the terminal has hardware tabs, the command to advance to the next
+tab stop can be given as
+.B ht
+(usually control I).
+A ``back-tab'' command which moves leftward to the preceding tab stop can
+be given as
+.BR cbt .
+By convention, if the teletype modes indicate that tabs are being
+expanded by the computer rather than being sent to the terminal,
+programs should not use
+.B ht
+or
+.B cbt
+even if they are present, since the user may not have the tab stops
+properly set.
+If the terminal has hardware tabs which are initially set every
+.I n
+spaces when the terminal is powered up,
+the numeric parameter
+.B it
+is given, showing the number of spaces the tabs are set to.
+This is normally used by the
+.IR tset
+command to determine whether to set the mode for hardware tab expansion,
+and whether to set the tab stops.
+If the terminal has tab stops that can be saved in non-volatile memory,
+the terminfo description can assume that they are properly set.
+.PP
+Other capabilities
+include
+.BR is1 ,
+.BR is2 ,
+and
+.BR is3 ,
+initialization strings for the terminal,
+.BR iprog ,
+the path name of a program to be run to initialize the terminal,
+and \fBif\fR, the name of a file containing long initialization strings.
+These strings are expected to set the terminal into modes consistent
+with the rest of the terminfo description.
+They are normally sent to the terminal, by the
+.I init
+option of the
+.IR tput
+program, each time the user logs in.
+They will be printed in the following order:
+run the program
+.BR iprog ;
+output
+.BR is1 ;
+.BR is2 ;
+set the margins using
+.BR mgc ,
+.BR smgl
+and
+.BR smgr ;
+set tabs using
+.B tbc
+and
+.BR hts ;
+print the file
+.BR if ;
+and finally
+output
+.BR is3 .
+.PP
+Most initialization is done with
+.BR is2 .
+Special terminal modes can be set up without duplicating strings
+by putting the common sequences in
+.B is2
+and special cases in
+.B is1
+and
+.BR is3 .
+A pair of sequences that does a harder reset from a totally unknown state
+can be analogously given as
+.BR rs1 ,
+.BR rs2 ,
+.BR rf ,
+and
+.BR rs3 ,
+analogous to
+.B is2
+and
+.BR if .
+These strings are output by the
+.IR reset
+program, which is used when the terminal gets into a wedged state.
+Commands are normally placed in
+.BR rs1 ,
+.BR rs2
+.B rs3
+and
+.B rf
+only if they produce annoying effects on the screen and are not
+necessary when logging in.
+For example, the command to set the vt100 into 80-column mode would
+normally be part of
+.BR is2 ,
+but it causes an annoying glitch of the screen and is not normally
+needed since the terminal is usually already in 80 column mode.
+.PP
+If there are commands to set and clear tab stops, they can be given as
+.B tbc
+(clear all tab stops)
+and
+.B hts
+(set a tab stop in the current column of every row).
+If a more complex sequence is needed to set the tabs than can be
+described by this, the sequence can be placed in
+.B is2
+or
+.BR if .
+.SS Delays and Padding
+.PP
+Many older and slower terminals don't support either XON/XOFF or DTR
+handshaking, including hard copy terminals and some very archaic CRTs
+(including, for example, DEC VT100s).
+These may require padding characters
+after certain cursor motions and screen changes.
+.PP
+If the terminal uses xon/xoff handshaking for flow control (that is,
+it automatically emits ^S back to the host when its input buffers are
+close to full), set
+.BR xon .
+This capability suppresses the emission of padding.
+You can also set it
+for memory-mapped console devices effectively that don't have a speed limit.
+Padding information should still be included so that routines can
+make better decisions about relative costs, but actual pad characters will
+not be transmitted.
+.PP
+If \fBpb\fR (padding baud rate) is given, padding is suppressed at baud rates
+below the value of \fBpb\fR.
+If the entry has no padding baud rate, then
+whether padding is emitted or not is completely controlled by \fBxon\fR.
+.PP
+If the terminal requires other than a null (zero) character as a pad,
+then this can be given as \fBpad\fR.
+Only the first character of the
+.B pad
+string is used.
+.PP
+.SS Status Lines
+Some terminals have an extra `status line' which is not normally used by
+software (and thus not counted in the terminal's \fBlines\fR capability).
+.PP
+The simplest case is a status line which is cursor-addressable but not
+part of the main scrolling region on the screen; the Heathkit H19 has
+a status line of this kind, as would a 24-line VT100 with a 23-line
+scrolling region set up on initialization.
+This situation is indicated
+by the \fBhs\fR capability.
+.PP
+Some terminals with status lines need special sequences to access the
+status line.
+These may be expressed as a string with single parameter
+\fBtsl\fR which takes the cursor to a given zero-origin column on the
+status line.
+The capability \fBfsl\fR must return to the main-screen
+cursor positions before the last \fBtsl\fR.
+You may need to embed the
+string values of \fBsc\fR (save cursor) and \fBrc\fR (restore cursor)
+in \fBtsl\fR and \fBfsl\fR to accomplish this.
+.PP
+The status line is normally assumed to be the same width as the width
+of the terminal.
+If this is untrue, you can specify it with the numeric
+capability \fBwsl\fR.
+.PP
+A command to erase or blank the status line may be specified as \fBdsl\fR.
+.PP
+The boolean capability \fBeslok\fR specifies that escape sequences, tabs,
+etc., work ordinarily in the status line.
+.PP
+The \fBncurses\fR implementation does not yet use any of these capabilities.
+They are documented here in case they ever become important.
+.PP
+.SS Line Graphics
+.PP
+Many terminals have alternate character sets useful for forms-drawing.
+Terminfo and \fBcurses\fR build in support for the drawing characters
+supported by the VT100, with some characters from the AT&T 4410v1 added.
+This alternate character set may be specified by the \fBacsc\fR capability.
+.PP
+.TS H
+center expand;
+c l l c
+c l l c
+lw28 lw6 lw2 lw20.
+.\".TH
+\fBGlyph ACS Ascii VT100\fR
+\fBName Name Default Name\fR
+UK pound sign ACS_STERLING f }
+arrow pointing down ACS_DARROW v .
+arrow pointing left ACS_LARROW < ,
+arrow pointing right ACS_RARROW > +
+arrow pointing up ACS_UARROW ^ -
+board of squares ACS_BOARD # h
+bullet ACS_BULLET o ~
+checker board (stipple) ACS_CKBOARD : a
+degree symbol ACS_DEGREE \e f
+diamond ACS_DIAMOND + `
+greater-than-or-equal-to ACS_GEQUAL > z
+greek pi ACS_PI * {
+horizontal line ACS_HLINE - q
+lantern symbol ACS_LANTERN # i
+large plus or crossover ACS_PLUS + n
+less-than-or-equal-to ACS_LEQUAL < y
+lower left corner ACS_LLCORNER + m
+lower right corner ACS_LRCORNER + j
+not-equal ACS_NEQUAL ! |
+plus/minus ACS_PLMINUS # g
+scan line 1 ACS_S1 ~ o
+scan line 3 ACS_S3 - p
+scan line 7 ACS_S7 - r
+scan line 9 ACS_S9 \&_ s
+solid square block ACS_BLOCK # 0
+tee pointing down ACS_TTEE + w
+tee pointing left ACS_RTEE + u
+tee pointing right ACS_LTEE + t
+tee pointing up ACS_BTEE + v
+upper left corner ACS_ULCORNER + l
+upper right corner ACS_URCORNER + k
+vertical line ACS_VLINE | x
+.TE
+.PP
+The best way to define a new device's graphics set is to add a column
+to a copy of this table for your terminal, giving the character which
+(when emitted between \fBsmacs\fR/\fBrmacs\fR switches) will be rendered
+as the corresponding graphic.
+Then read off the VT100/your terminal
+character pairs right to left in sequence; these become the ACSC string.
+.PP
+.SS Color Handling
+.PP
+Most color terminals are either `Tektronix-like' or `HP-like'.
+Tektronix-like
+terminals have a predefined set of N colors (where N usually 8), and can set
+character-cell foreground and background characters independently, mixing them
+into N * N color-pairs.
+On HP-like terminals, the use must set each color
+pair up separately (foreground and background are not independently settable).
+Up to M color-pairs may be set up from 2*M different colors.
+ANSI-compatible
+terminals are Tektronix-like.
+.PP
+Some basic color capabilities are independent of the color method.
+The numeric
+capabilities \fBcolors\fR and \fBpairs\fR specify the maximum numbers of colors
+and color-pairs that can be displayed simultaneously.
+The \fBop\fR (original
+pair) string resets foreground and background colors to their default values
+for the terminal.
+The \fBoc\fR string resets all colors or color-pairs to
+their default values for the terminal.
+Some terminals (including many PC
+terminal emulators) erase screen areas with the current background color rather
+than the power-up default background; these should have the boolean capability
+\fBbce\fR.
+.PP
+To change the current foreground or background color on a Tektronix-type
+terminal, use \fBsetaf\fR (set ANSI foreground) and \fBsetab\fR (set ANSI
+background) or \fBsetf\fR (set foreground) and \fBsetb\fR (set background).
+These take one parameter, the color number.
+The SVr4 documentation describes
+only \fBsetaf\fR/\fBsetab\fR; the XPG4 draft says that "If the terminal
+supports ANSI escape sequences to set background and foreground, they should
+be coded as \fBsetaf\fR and \fBsetab\fR, respectively.
+If the terminal
+supports other escape sequences to set background and foreground, they should
+be coded as \fBsetf\fR and \fBsetb\fR, respectively.
+The \fIvidputs()\fR
+function and the refresh functions use \fBsetaf\fR and \fBsetab\fR if they are
+defined."
+.PP
+The \fBsetaf\fR/\fBsetab\fR and \fBsetf\fR/\fBsetb\fR capabilities take a
+single numeric argument each.
+Argument values 0-7 of \fBsetaf\fR/\fBsetab\fR are portably defined as
+follows (the middle column is the symbolic #define available in the header for
+the \fBcurses\fR or \fBncurses\fR libraries).
+The terminal hardware is free to
+map these as it likes, but the RGB values indicate normal locations in color
+space.
+.PP
+.TS H
+center;
+l c c c
+l l n l.
+\fBColor #define Value RGB\fR
+black \fBCOLOR_BLACK\fR 0 0, 0, 0
+red \fBCOLOR_RED\ \fR 1 max,0,0
+green \fBCOLOR_GREEN\fR 2 0,max,0
+yellow \fBCOLOR_YELLOW\fR 3 max,max,0
+blue \fBCOLOR_BLUE\fR 4 0,0,max
+magenta \fBCOLOR_MAGENTA\fR 5 max,0,max
+cyan \fBCOLOR_CYAN\fR 6 0,max,max
+white \fBCOLOR_WHITE\fR 7 max,max,max
+.TE
+.PP
+The argument values of \fBsetf\fR/\fBsetb\fR historically correspond to
+a different mapping, i.e.,
+.TS H
+center;
+l c c c
+l l n l.
+\fBColor #define Value RGB\fR
+black \fBCOLOR_BLACK\fR 0 0, 0, 0
+blue \fBCOLOR_BLUE\fR 1 0,0,max
+green \fBCOLOR_GREEN\fR 2 0,max,0
+cyan \fBCOLOR_CYAN\fR 3 0,max,max
+red \fBCOLOR_RED\ \fR 4 max,0,0
+magenta \fBCOLOR_MAGENTA\fR 5 max,0,max
+yellow \fBCOLOR_YELLOW\fR 6 max,max,0
+white \fBCOLOR_WHITE\fR 7 max,max,max
+.TE
+It is important to not confuse the two sets of color capabilities;
+otherwise red/blue will be interchanged on the display.
+.PP
+On an HP-like terminal, use \fBscp\fR with a color-pair number parameter to set
+which color pair is current.
+.PP
+On a Tektronix-like terminal, the capability \fBccc\fR may be present to
+indicate that colors can be modified.
+If so, the \fBinitc\fR capability will
+take a color number (0 to \fBcolors\fR - 1)and three more parameters which
+describe the color.
+These three parameters default to being interpreted as RGB
+(Red, Green, Blue) values.
+If the boolean capability \fBhls\fR is present,
+they are instead as HLS (Hue, Lightness, Saturation) indices.
+The ranges are
+terminal-dependent.
+.PP
+On an HP-like terminal, \fBinitp\fR may give a capability for changing a
+color-pair value.
+It will take seven parameters; a color-pair number (0 to
+\fBmax_pairs\fR - 1), and two triples describing first background and then
+foreground colors.
+These parameters must be (Red, Green, Blue) or
+(Hue, Lightness, Saturation) depending on \fBhls\fR.
+.PP
+On some color terminals, colors collide with highlights.
+You can register
+these collisions with the \fBncv\fR capability.
+This is a bit-mask of
+attributes not to be used when colors are enabled.
+The correspondence with the
+attributes understood by \fBcurses\fR is as follows:
+.PP
+.TS
+center;
+l c c
+lw25 lw2 lw10.
+\fBAttribute Bit Decimal\fR
+A_STANDOUT 0 1
+A_UNDERLINE 1 2
+A_REVERSE 2 4
+A_BLINK 3 8
+A_DIM 4 16
+A_BOLD 5 32
+A_INVIS 6 64
+A_PROTECT 7 128
+A_ALTCHARSET 8 256
+.TE
+.PP
+For example, on many IBM PC consoles, the underline attribute collides with the
+foreground color blue and is not available in color mode.
+These should have
+an \fBncv\fR capability of 2.
+.PP
+SVr4 curses does nothing with \fBncv\fR, ncurses recognizes it and optimizes
+the output in favor of colors.
+.PP
+.SS Miscellaneous
+If the terminal requires other than a null (zero) character as a pad, then this
+can be given as pad.
+Only the first character of the pad string is used.
+If the terminal does not have a pad character, specify npc.
+Note that ncurses implements the termcap-compatible \fBPC\fR variable;
+though the application may set this value to something other than
+a null, ncurses will test \fBnpc\fR first and use napms if the terminal
+has no pad character.
+.PP
+If the terminal can move up or down half a line,
+this can be indicated with
+.B hu
+(half-line up)
+and
+.B hd
+(half-line down).
+This is primarily useful for superscripts and subscripts on hard-copy terminals.
+If a hard-copy terminal can eject to the next page (form feed), give this as
+.B ff
+(usually control L).
+.PP
+If there is a command to repeat a given character a given number of
+times (to save time transmitting a large number of identical characters)
+this can be indicated with the parameterized string
+.BR rep .
+The first parameter is the character to be repeated and the second
+is the number of times to repeat it.
+Thus, tparm(repeat_char, 'x', 10) is the same as `xxxxxxxxxx'.
+.PP
+If the terminal has a settable command character, such as the \s-1TEKTRONIX\s+1 4025,
+this can be indicated with
+.BR cmdch .
+A prototype command character is chosen which is used in all capabilities.
+This character is given in the
+.B cmdch
+capability to identify it.
+The following convention is supported on some UNIX systems:
+The environment is to be searched for a
+.B CC
+variable, and if found, all
+occurrences of the prototype character are replaced with the character
+in the environment variable.
+.PP
+Terminal descriptions that do not represent a specific kind of known
+terminal, such as
+.IR switch ,
+.IR dialup ,
+.IR patch ,
+and
+.IR network ,
+should include the
+.B gn
+(generic) capability so that programs can complain that they do not know
+how to talk to the terminal.
+(This capability does not apply to
+.I virtual
+terminal descriptions for which the escape sequences are known.)
+.PP
+If the terminal has a ``meta key'' which acts as a shift key,
+setting the 8th bit of any character transmitted, this fact can
+be indicated with
+.BR km .
+Otherwise, software will assume that the 8th bit is parity and it
+will usually be cleared.
+If strings exist to turn this ``meta mode'' on and off, they
+can be given as
+.B smm
+and
+.BR rmm .
+.PP
+If the terminal has more lines of memory than will fit on the screen
+at once, the number of lines of memory can be indicated with
+.BR lm .
+A value of
+.BR lm #0
+indicates that the number of lines is not fixed,
+but that there is still more memory than fits on the screen.
+.PP
+If the terminal is one of those supported by the \s-1UNIX\s+1 virtual
+terminal protocol, the terminal number can be given as
+.BR vt .
+.PP
+Media copy
+strings which control an auxiliary printer connected to the terminal
+can be given as
+.BR mc0 :
+print the contents of the screen,
+.BR mc4 :
+turn off the printer, and
+.BR mc5 :
+turn on the printer.
+When the printer is on, all text sent to the terminal will be sent
+to the printer.
+It is undefined whether the text is also displayed on the terminal screen
+when the printer is on.
+A variation
+.B mc5p
+takes one parameter, and leaves the printer on for as many characters
+as the value of the parameter, then turns the printer off.
+The parameter should not exceed 255.
+All text, including
+.BR mc4 ,
+is transparently passed to the printer while an
+.B mc5p
+is in effect.
+.PP
+.SS Glitches and Braindamage
+.PP
+Hazeltine terminals, which do not allow `~' characters to be displayed should
+indicate \fBhz\fR.
+.PP
+Terminals which ignore a line-feed immediately after an \fBam\fR wrap,
+such as the Concept and vt100,
+should indicate \fBxenl\fR.
+.PP
+If
+.B el
+is required to get rid of standout
+(instead of merely writing normal text on top of it),
+\fBxhp\fP should be given.
+.PP
+Teleray terminals, where tabs turn all characters moved over to blanks,
+should indicate \fBxt\fR (destructive tabs).
+Note: the variable indicating this is now `dest_tabs_magic_smso'; in
+older versions, it was teleray_glitch.
+This glitch is also taken to mean that it is not possible to position
+the cursor on top of a ``magic cookie'',
+that to erase standout mode it is instead necessary to use
+delete and insert line.
+The ncurses implementation ignores this glitch.
+.PP
+The Beehive Superbee, which is unable to correctly transmit the escape
+or control C characters, has
+.BR xsb ,
+indicating that the f1 key is used for escape and f2 for control C.
+(Only certain Superbees have this problem, depending on the ROM.)
+Note that in older terminfo versions, this capability was called
+`beehive_glitch'; it is now `no_esc_ctl_c'.
+.PP
+Other specific terminal problems may be corrected by adding more
+capabilities of the form \fBx\fR\fIx\fR.
+.PP
+.SS Similar Terminals
+.PP
+If there are two very similar terminals, one (the variant) can be defined as
+being just like the other (the base) with certain exceptions.
+In the
+definition of the variant, the string capability \fBuse\fR can be given with
+the name of the base terminal.
+The capabilities given before
+.B use
+override those in the base type named by
+.BR use .
+If there are multiple \fBuse\fR capabilities, they are merged in reverse order.
+That is, the rightmost \fBuse\fR reference is processed first, then the one to
+its left, and so forth.
+Capabilities given explicitly in the entry override
+those brought in by \fBuse\fR references.
+.PP
+A capability can be canceled by placing \fBxx@\fR to the left of the
+use reference that imports it, where \fIxx\fP is the capability.
+For example, the entry
+.PP
+ 2621-nl, smkx@, rmkx@, use=2621,
+.PP
+defines a 2621-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
+and hence does not turn on the function key labels when in visual mode.
+This is useful for different modes for a terminal, or for different
+user preferences.
+.PP
+.SS Pitfalls of Long Entries
+.PP
+Long terminfo entries are unlikely to be a problem; to date, no entry has even
+approached terminfo's 4096-byte string-table maximum.
+Unfortunately, the termcap
+translations are much more strictly limited (to 1023 bytes), thus termcap translations
+of long terminfo entries can cause problems.
+.PP
+The man pages for 4.3BSD and older versions of \fBtgetent()\fP instruct the user to
+allocate a 1024-byte buffer for the termcap entry.
+The entry gets null-terminated by
+the termcap library, so that makes the maximum safe length for a termcap entry
+1k-1 (1023) bytes.
+Depending on what the application and the termcap library
+being used does, and where in the termcap file the terminal type that \fBtgetent()\fP
+is searching for is, several bad things can happen.
+.PP
+Some termcap libraries print a warning message or exit if they find an
+entry that's longer than 1023 bytes; others don't; others truncate the
+entries to 1023 bytes.
+Some application programs allocate more than
+the recommended 1K for the termcap entry; others don't.
+.PP
+Each termcap entry has two important sizes associated with it: before
+"tc" expansion, and after "tc" expansion.
+"tc" is the capability that
+tacks on another termcap entry to the end of the current one, to add
+on its capabilities.
+If a termcap entry doesn't use the "tc"
+capability, then of course the two lengths are the same.
+.PP
+The "before tc expansion" length is the most important one, because it
+affects more than just users of that particular terminal.
+This is the
+length of the entry as it exists in /etc/termcap, minus the
+backslash-newline pairs, which \fBtgetent()\fP strips out while reading it.
+Some termcap libraries strip off the final newline, too (GNU termcap does not).
+Now suppose:
+.TP 5
+*
+a termcap entry before expansion is more than 1023 bytes long,
+.TP 5
+*
+and the application has only allocated a 1k buffer,
+.TP 5
+*
+and the termcap library (like the one in BSD/OS 1.1 and GNU) reads
+the whole entry into the buffer, no matter what its length, to see
+if it's the entry it wants,
+.TP 5
+*
+and \fBtgetent()\fP 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 \fBtgetent()\fP has to search
+the whole termcap file).
+.PP
+Then \fBtgetent()\fP will overwrite memory, perhaps its stack, and probably core dump
+the program.
+Programs like telnet are particularly vulnerable; modern telnets
+pass along values like the terminal type automatically.
+The results are almost
+as undesirable with a termcap library, like SunOS 4.1.3 and Ultrix 4.4, that
+prints warning messages when it reads an overly long termcap entry.
+If a
+termcap library truncates long entries, like OSF/1 3.0, it is immune to dying
+here but will return incorrect data for the terminal.
+.PP
+The "after tc expansion" length will have a similar effect to the
+above, but only for people who actually set TERM to that terminal
+type, since \fBtgetent()\fP only does "tc" expansion once it's found the
+terminal type it was looking for, not while searching.
+.PP
+In summary, a termcap entry that is longer than 1023 bytes can cause,
+on various combinations of termcap libraries and applications, a core
+dump, warnings, or incorrect operation.
+If it's too long even before
+"tc" expansion, it will have this effect even for users of some other
+terminal types and users whose TERM variable does not have a termcap
+entry.
+.PP
+When in -C (translate to termcap) mode, the \fBncurses\fR implementation of
+\fBtic\fR(1) issues warning messages when the pre-tc length of a termcap
+translation is too long.
+The -c (check) option also checks resolved (after tc
+expansion) lengths.
+.SS Binary Compatibility
+It is not wise to count on portability of binary terminfo entries between
+commercial UNIX versions.
+The problem is that there are at least two versions
+of terminfo (under HP-UX and AIX) which diverged from System V terminfo after
+SVr1, and have added extension capabilities to the string table that (in the
+binary format) collide with System V and XSI Curses extensions.
+.SH EXTENSIONS
+Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, don't
+interpret the %A and %O operators in parameter strings.
+.PP
+SVr4/XPG4 do not specify whether \fBmsgr\fR licenses movement while in
+an alternate-character-set mode (such modes may, among other things, map
+CR and NL to characters that don't trigger local motions).
+The \fBncurses\fR implementation ignores \fBmsgr\fR in \fBALTCHARSET\fR
+mode.
+This raises the possibility that an XPG4
+implementation making the opposite interpretation may need terminfo
+entries made for \fBncurses\fR to have \fBmsgr\fR turned off.
+.PP
+The \fBncurses\fR library handles insert-character and insert-character modes
+in a slightly non-standard way to get better update efficiency.
+See
+the \fBInsert/Delete Character\fR subsection above.
+.PP
+The parameter substitutions for \fBset_clock\fR and \fBdisplay_clock\fR are
+not documented in SVr4 or the XSI Curses standard.
+They are deduced from the
+documentation for the AT&T 505 terminal.
+.PP
+Be careful assigning the \fBkmous\fR capability.
+The \fBncurses\fR wants to
+interpret it as \fBKEY_MOUSE\fR, for use by terminals and emulators like xterm
+that can return mouse-tracking information in the keyboard-input stream.
+.PP
+Different commercial ports of terminfo and curses support different subsets of
+the XSI Curses standard and (in some cases) different extension sets.
+Here
+is a summary, accurate as of October 1995:
+.PP
+\fBSVR4, Solaris, ncurses\fR --
+These support all SVr4 capabilities.
+.PP
+\fBSGI\fR --
+Supports the SVr4 set, adds one undocumented extended string
+capability (\fBset_pglen\fR).
+.PP
+\fBSVr1, Ultrix\fR --
+These support a restricted subset of terminfo capabilities.
+The booleans
+end with \fBxon_xoff\fR; the numerics with \fBwidth_status_line\fR; and the
+strings with \fBprtr_non\fR.
+.PP
+\fBHP/UX\fR --
+Supports the SVr1 subset, plus the SVr[234] numerics \fBnum_labels\fR,
+\fBlabel_height\fR, \fBlabel_width\fR, plus function keys 11 through 63, plus
+\fBplab_norm\fR, \fBlabel_on\fR, and \fBlabel_off\fR, plus some incompatible
+extensions in the string table.
+.PP
+\fBAIX\fR --
+Supports the SVr1 subset, plus function keys 11 through 63, plus a number
+of incompatible string table extensions.
+.PP
+\fBOSF\fR --
+Supports both the SVr4 set and the AIX extensions.
+.SH FILES
+.TP 25
+\*d/?/*
+files containing terminal descriptions
+.SH SEE ALSO
+\fBtic\fR(1M),
+\fBinfocmp\fR(1M),
+\fBcurses\fR(3X),
+\fBprintf\fR(3S),
+\fBterm\fR(\*n).
+.SH AUTHORS
+Zeyd M. Ben-Halim, Eric S. Raymond, Thomas E. Dickey.
+Based on pcurses by Pavel Curtis.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/tic.1m b/Build/source/libs/ncurses/man/tic.1m
new file mode 100644
index 00000000000..053b31f0f8e
--- /dev/null
+++ b/Build/source/libs/ncurses/man/tic.1m
@@ -0,0 +1,313 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: tic.1m,v 1.37 2004/07/05 13:09:39 tom Exp $
+.TH tic 1M ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+\fBtic\fR - the \fIterminfo\fR entry-description compiler
+.SH SYNOPSIS
+\fBtic\fR
+[\fB-\
+1\
+C\
+G\
+I\
+L\
+N\
+T\
+V\
+a\
+c\
+f\
+g\
+r\
+s\
+t\
+x\
+\fR]
+[\fB-e\fR \fInames\fR]
+[\fB-o\fR \fIdir\fR]
+[\fB-R\fR \fIsubset\fR]
+[\fB-v\fR[\fIn\fR]]
+[\fB-w\fR[\fIn\fR]]
+\fIfile\fR
+.br
+.SH DESCRIPTION
+The command \fBtic\fR translates a \fBterminfo\fR file from source
+format into compiled format. The compiled format is necessary for use with
+the library routines in \fBncurses\fR(3X).
+.PP
+The results are normally placed in the system terminfo
+directory \fB\*d\fR. There are two ways to change this behavior.
+.PP
+First, you may override the system default by setting the variable
+\fBTERMINFO\fR in your shell environment to a valid (existing) directory name.
+.PP
+Secondly, if \fBtic\fR cannot get access to \fI\*d\fR or your TERMINFO
+directory, it looks for the directory \fI$HOME/.terminfo\fR; if that directory
+exists, the entry is placed there.
+.PP
+Libraries that read terminfo entries are expected to check for a TERMINFO
+directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and
+finally look in \fI\*d\fR.
+.TP
+\fB-1\fR
+restricts the output to a single column
+.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.
+If the source is termcap, accept the 2-character names required by version 6.
+Otherwise these are ignored.
+.TP
+\fB-C\fR
+Force source translation to termcap format. Note: this differs from the \fB-C\fR
+option of \fIinfocmp\fR(1M) in that it does not merely translate capability
+names, but also translates terminfo strings to termcap format. Capabilities
+that are not translatable are left in the entry under their terminfo names
+but commented out with two preceding dots.
+.TP
+\fB-c\fR
+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
+libraries (and a documented limit in terminfo), these entries may cause core
+dumps.
+.TP
+\fB-e \fR\fInames\fR
+Limit writes and translations to the following comma-separated list of
+terminals.
+If any name or alias of a terminal matches one of the names in
+the list, the entry will be written or translated as normal.
+Otherwise no output will be generated for it.
+The option value is interpreted as a file containing the list if it
+contains a '/'.
+(Note: depending on how tic was compiled, this option may require \fB-I\fR or \fB-C\fR.)
+.TP
+\fB-f\fR
+Display complex terminfo strings which contain if/then/else/endif expressions
+indented for readability.
+.TP
+\fB-G\fR
+Display constant literals in decimal form
+rather than their character equivalents.
+.TP
+\fB-g\fR
+Display constant character literals in quoted form
+rather than their decimal equivalents.
+.TP
+\fB-I\fR
+Force source translation to terminfo format.
+.TP
+\fB-L\fR
+Force source translation to terminfo format
+using the long C variable names listed in <\fBterm.h\fR>
+.TP
+\fB-N\fR
+Disable smart defaults.
+Normally, when translating from termcap to terminfo, the compiler makes
+a number of assumptions about the defaults of string capabilities
+\fBreset1_string\fR, \fBcarriage_return\fR, \fBcursor_left\fR,
+\fBcursor_down\fR, \fBscroll_forward\fR, \fBtab\fR, \fBnewline\fR,
+\fBkey_backspace\fR, \fBkey_left\fR, and \fBkey_down\fR, then attempts
+to use obsolete termcap capabilities to deduce correct values. It also
+normally suppresses output of obsolete termcap capabilities such as \fBbs\fR.
+This option forces a more literal translation that also preserves the
+obsolete capabilities.
+.TP
+\fB-o\fR\fIdir\fR
+Write compiled entries to given directory. Overrides the TERMINFO environment
+variable.
+.TP
+\fB-R\fR\fIsubset\fR
+Restrict output to a given subset. This option is for use with archaic
+versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
+the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
+that have their own extensions incompatible with SVr4/XSI. Available subsets
+are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details.
+.TP
+\fB-r\fR
+Force entry resolution (so there are no remaining tc capabilities) even
+when doing translation to termcap format. This may be needed if you are
+preparing a termcap file for a termcap library (such as GNU termcap through
+version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple
+tc capabilities per entry.
+.TP
+\fB-s\fR
+Summarize the compile by showing the directory into which entries
+are written, and the number of entries which are compiled.
+.TP
+\fB-T\fR
+eliminates size-restrictions on the generated text.
+This is mainly useful for testing and analysis, since the compiled
+descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
+.TP
+\fB-t\fR
+tells \fBtic\fP to discard commented-out capabilities.
+Normally when translating from terminfo to termcap,
+untranslatable capabilities are commented-out.
+.TP
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.TP
+\fB-v\fR\fIn\fR
+specifies that (verbose) output be written to standard error trace
+information showing \fBtic\fR's progress. The optional integer
+\fIn\fR is a number from 1 to 10, inclusive, indicating the desired
+level of detail of information. If \fIn\fR is omitted, the default
+level is 1. If \fIn\fR is specified and greater than 1, the level of
+detail is increased.
+.TP
+\fB-w\fR\fIn\fR
+specifies the width of the output.
+.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
+format [see \fBterminfo\fR(\*n)]. Each description in the file
+describes the capabilities of a particular terminal.
+.PP
+The debug flag levels are as follows:
+.TP
+1
+Names of files created and linked
+.TP
+2
+Information related to the ``use'' facility
+.TP
+3
+Statistics from the hashing algorithm
+.TP
+5
+String-table memory allocations
+.TP
+7
+Entries into the string-table
+.TP
+8
+List of tokens encountered by scanner
+.TP
+9
+All values computed in construction of the hash table
+.LP
+If the debug level \fIn\fR is not given, it is taken to be one.
+.PP
+All but one of the capabilities recognized by \fBtic\fR are documented
+in \fBterminfo\fR(\*n). The exception is the \fBuse\fR capability.
+
+When a \fBuse\fR=\fIentry\fR-\fIname\fR field is discovered in a
+terminal entry currently being compiled, \fBtic\fR reads in the binary
+from \fB\*d\fR to complete the entry. (Entries created from
+\fIfile\fR will be used first. If the environment variable
+\fBTERMINFO\fR is set, that directory is searched instead of
+\fB\*d\fR.) \fBtic\fR duplicates the capabilities in
+\fIentry\fR-\fIname\fR for the current entry, with the exception of
+those capabilities that explicitly are defined in the current entry.
+
+When an entry, e.g., \fBentry_name_1\fR, contains a
+\fBuse=\fR\fIentry\fR_\fIname\fR_\fI2\fR field, any canceled
+capabilities in \fIentry\fR_\fIname\fR_\fI2\fR must also appear in
+\fBentry_name_1\fR before \fBuse=\fR for these capabilities to be
+canceled in \fBentry_name_1\fR.
+
+If the environment variable \fBTERMINFO\fR is set, the compiled
+results are placed there instead of \fB\*d\fR.
+
+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.
+.SH COMPATIBILITY
+There is some evidence that historic \fBtic\fR implementations treated
+description fields with no whitespace in them as additional aliases or
+short names. This \fBtic\fR does not do that, but it does warn when
+description fields may be treated that way and check them for dangerous
+characters.
+.SH EXTENSIONS
+Unlike the stock SVr4 \fBtic\fR 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 \fBterminfo\fR(\*n) 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 \fBuse\fR
+capabilities.
+This implementation of \fBtic\fR will find \fBuse\fR targets anywhere
+in the source file, or anywhere in the file tree rooted at \fBTERMINFO\fR (if
+\fBTERMINFO\fR is defined), or in the user's \fI$HOME/.terminfo\fR directory
+(if it exists), or (finally) anywhere in the system's file tree of
+compiled entries.
+
+The error messages from this \fBtic\fR have the same format as GNU C
+error messages, and can be parsed by GNU Emacs's compile facility.
+
+The
+\fB-C\fR,
+\fB-G\fR,
+\fB-I\fR,
+\fB-N\fR,
+\fB-R\fR,
+\fB-T\fR,
+\fB-V\fR,
+\fB-a\fR,
+\fB-e\fR,
+\fB-f\fR,
+\fB-g\fR,
+\fB-o\fR,
+\fB-r\fR,
+\fB-s\fR,
+\fB-t\fR and
+\fB-x\fR
+options
+are not supported under SVr4.
+The SVr4 \fB-c\fR mode does not report bad use links.
+
+System V does not compile entries to or read entries from your
+\fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it.
+.SH FILES
+.TP 5
+\fB\*d/?/*\fR
+Compiled terminal description database.
+.SH SEE ALSO
+\fB@INFOCMP@\fR(1M), \fB@CAPTOINFO@\fR(1M), \fB@INFOTOCAP@\fR(1M),
+\fB@TOE@\fR(1M), \fBcurses\fR(3X), \fBterminfo\fR(\*n).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/toe.1m b/Build/source/libs/ncurses/man/toe.1m
new file mode 100644
index 00000000000..b7dc95963e4
--- /dev/null
+++ b/Build/source/libs/ncurses/man/toe.1m
@@ -0,0 +1,81 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: toe.1m,v 1.13 2004/07/05 13:16:08 tom Exp $
+.TH toe 1M ""
+.ds n 5
+.ds d @TERMINFO@
+.SH NAME
+\fBtoe\fR - table of (terminfo) entries
+.SH SYNOPSIS
+\fBtoe\fR [\fB-v\fR[\fIn\fR]] [\fB-huUV\fR] \fIfile...\fR
+.br
+.SH DESCRIPTION
+.PP
+With no options, \fBtoe\fR lists all available terminal types by primary name
+with descriptions. File arguments specify the directories to be scanned; if no
+such arguments are given, your default terminfo directory is scanned. If you
+also specify the \fB-h\fR option, a directory header will be issued as each
+directory is entered.
+.PP
+There are other options intended for use by terminfo file maintainers:
+.TP
+\fB-u\fR \fIfile\fR
+says to issue a report on dependencies in the given file. This report condenses
+the `use' relation: each line consists of the primary name of a terminal that
+has use capabilities, followed by a colon, followed by the
+whitespace-separated primary names of all terminals which occur in those use
+capabilities, followed by a newline
+.TP
+\fB-U\fR \fIfile\fR
+says to issue a report on reverse dependencies in the given file. This report
+reverses the `use' relation: each line consists of the primary name of a
+terminal that occurs in use capabilities, followed by a colon, followed by the
+whitespace-separated primary names of all terminals which depend on it,
+followed by a newline.
+.TP
+\fB-v\fR\fIn\fR
+specifies that (verbose) output be written to standard error trace
+information showing \fBtoe\fR's progress. The optional integer
+\fIn\fR is a number from 1 to 10, interpreted as for \fBtic\fR(1).
+.TP 5
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.SH FILES
+.TP 5
+\fB\*d/?/*\fR
+Compiled terminal description database.
+.SH SEE ALSO
+\fB@TIC@\fR(1M), \fB@INFOCMP@\fR(1M), \fB@CAPTOINFO@\fR(1M),
+\fB@INFOTOCAP@\fR(1M), \fBcurses\fR(3X), \fBterminfo\fR(\*n).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/tput.1 b/Build/source/libs/ncurses/man/tput.1
new file mode 100644
index 00000000000..7aedb352063
--- /dev/null
+++ b/Build/source/libs/ncurses/man/tput.1
@@ -0,0 +1,288 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: tput.1,v 1.21 2004/07/05 13:16:08 tom Exp $
+.TH tput 1 ""
+.ds d @TERMINFO@
+.ds n 1
+.SH NAME
+\fBtput\fR, \fBreset\fR - initialize a terminal or query terminfo database
+.SH SYNOPSIS
+\fBtput\fR [\fB-T\fR\fItype\fR] \fIcapname\fR [\fIparms\fR ... ]
+.br
+\fBtput\fR [\fB-T\fR\fItype\fR] \fBinit\fR
+.br
+\fBtput\fR [\fB-T\fR\fItype\fR] \fBreset\fR
+.br
+\fBtput\fR [\fB-T\fR\fItype\fR] \fBlongname\fR
+.br
+\fBtput -S\fR \fB<<\fR
+.br
+\fBtput -V\fR
+.br
+.SH DESCRIPTION
+The \fBtput\fR utility uses the \fBterminfo\fR database to make the
+values of terminal-dependent capabilities and information available to
+the shell (see \fBsh\fR(1)), to initialize or reset the terminal, or
+return the long name of the requested terminal type. \fBtput\fR
+outputs a string if the attribute (\fIcap\fRability \fIname\fR) is of
+type string, or an integer if the attribute is of type integer. If
+the attribute is of type boolean, \fBtput\fR simply sets the exit code
+(\fB0\fR for TRUE if the terminal has the capability, \fB1\fR for
+FALSE if it does not), and produces no output. Before using a value
+returned on standard output, the user should test the exit code
+[\fB$?\fR, see \fBsh\fR(1)] to be sure it is \fB0\fR.
+(See the \fBEXIT CODES\fR and \fBDIAGNOSTICS\fR sections.)
+For a complete list of capabilities
+and the \fIcapname\fR associated with each, see \fBterminfo\fR(\*n).
+.TP
+\fB-T\fR\fItype\fR
+indicates the \fItype\fR of terminal. Normally this option is
+unnecessary, because the default is taken from the environment
+variable \fBTERM\fR. If \fB-T\fR is specified, then the shell
+variables \fBLINES\fR and \fBCOLUMNS\fR will be ignored,and the
+operating system will not be queried for the actual screen size.
+.TP
+\fIcapname\fR
+indicates the attribute from the \fBterminfo\fR database. When
+\fBtermcap\fR support is compiled in, the \fBtermcap\fR name for
+the attribute is also accepted.
+.TP
+\fIparms\fR
+If the attribute is a string that takes parameters, the arguments
+\fIparms\fR will be instantiated into the string.
+An all-numeric argument will be passed to the attribute as a number.
+.IP
+Only a few terminfo capabilities require string parameters;
+\fBtput\fR uses a table to decide which to pass as strings.
+Normally \fBtput\fR uses \fBtparm\fR (3X) to perform the substitution.
+If no parameters are given for the attribute,
+\fBtput\fR writes the string without performing the substitution.
+.TP
+\fB-S\fR
+allows more than one capability per invocation of \fBtput\fR. The
+capabilities must be passed to \fBtput\fR from the standard input
+instead of from the command line (see example).
+Only one \fIcapname\fR is allowed per line.
+The \fB-S\fR option changes the
+meaning of the \fB0\fR and \fB1\fR boolean and string exit codes (see the
+EXIT CODES section).
+.IP
+Again, \fBtput\fR uses a table and the presence of parameters in its input
+to decide whether to use \fBtparm\fR (3X),
+and how to interpret the parameters.
+.TP
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.TP
+\fBinit\fR
+If the \fBterminfo\fR database is present and an entry for the user's
+terminal exists (see \fB-T\fR\fItype\fR, above), the following will
+occur: (1) if present, the terminal's initialization strings will be
+output (\fBis1\fR, \fBis2\fR, \fBis3\fR, \fBif\fR, \fBiprog\fR), (2)
+any delays (e.g., newline) specified in the entry will be set in the
+tty driver, (3) tabs expansion will be turned on or off according to
+the specification in the entry, and (4) if tabs are not expanded,
+standard tabs will be set (every 8 spaces). If an entry does not
+contain the information needed for any of the four above activities,
+that activity will silently be skipped.
+.TP
+\fBreset\fR
+Instead of putting out initialization strings, the terminal's
+reset strings will be output if present (\fBrs1\fR, \fBrs2\fR, \fBrs3\fR, \fBrf\fR).
+If the reset strings are not present, but initialization
+strings are, the initialization strings will be output.
+Otherwise, \fBreset\fR acts identically to \fBinit\fR.
+.TP
+\fBlongname\fR
+If the \fBterminfo\fR database is present and an entry for the
+user's terminal exists (see \fB-T\fR\fItype\fR above), then the long name
+of the terminal will be put out. The long name is the last
+name in the first line of the terminal's description in the
+\fBterminfo\fR database [see \fBterm\fR(5)].
+.PP
+If \fBtput\fR is invoked by a link named \fBreset\fR, this has the
+same effect as \fBtput reset\fR.
+See \fBtset\fR for comparison, which has similar behavior.
+.SH EXAMPLES
+.TP 5
+\fBtput init\fR
+Initialize the terminal according to the type of
+terminal in the environmental variable \fBTERM\fR. This
+command should be included in everyone's .profile after
+the environmental variable \fBTERM\fR has been exported, as
+illustrated on the \fBprofile\fR(5) manual page.
+.TP 5
+\fBtput -T5620 reset\fR
+Reset an AT&T 5620 terminal, overriding the type of
+terminal in the environmental variable \fBTERM\fR.
+.TP 5
+\fBtput cup 0 0\fR
+Send the sequence to move the cursor to row \fB0\fR, column \fB0\fR
+(the upper left corner of the screen, usually known as the "home"
+cursor position).
+.TP 5
+\fBtput clear\fR
+Echo the clear-screen sequence for the current terminal.
+.TP 5
+\fBtput cols\fR
+Print the number of columns for the current terminal.
+.TP 5
+\fBtput -T450 cols\fR
+Print the number of columns for the 450 terminal.
+.TP 5
+\fBbold=`tput smso` offbold=`tput rmso`\fR
+Set the shell variables \fBbold\fR, to begin stand-out mode
+sequence, and \fBoffbold\fR, to end standout mode sequence,
+for the current terminal. This might be followed by a
+prompt: \fBecho "${bold}Please type in your name: ${offbold}\\c"\fR
+.TP 5
+\fBtput hc\fR
+Set exit code to indicate if the current terminal is a hard copy terminal.
+.TP 5
+\fBtput cup 23 4\fR
+Send the sequence to move the cursor to row 23, column 4.
+.TP 5
+\fBtput cup\fR
+Send the terminfo string for cursor-movement, with no parameters substituted.
+.TP 5
+\fBtput longname\fR
+Print the long name from the \fBterminfo\fR database for the
+type of terminal specified in the environmental
+variable \fBTERM\fR.
+.PP
+.RS 5
+\fBtput -S <<!\fR
+.br
+\fB> clear\fR
+.br
+\fB> cup 10 10\fR
+.br
+\fB> bold\fR
+.br
+\fB> !\fR
+.RE
+.TP 5
+\&
+This example shows \fBtput\fR processing several capabilities in one invocation.
+It clears the screen,
+moves the cursor to position 10, 10
+and turns on bold (extra bright) mode.
+The list is terminated by an exclamation mark (\fB!\fR) on a line by itself.
+.SH FILES
+.TP
+\fB\*d\fR
+compiled terminal description database
+.TP
+\fB/usr/include/curses.h\fR
+\fBcurses\fR(3X) header file
+.TP
+\fB/usr/include/term.h\fR
+\fBterminfo\fR header file
+.TP
+\fB@DATADIR@/tabset/*\fR
+tab settings for some terminals, in a format
+appropriate to be output to the terminal (escape
+sequences that set margins and tabs); for more
+information, see the "Tabs and Initialization"
+section of \fBterminfo\fR(5)
+.SH EXIT CODES
+If the \fB-S\fR option is used,
+\fBtput\fR checks for errors from each line,
+and if any errors are found, will set the exit code to 4 plus the
+number of lines with errors.
+If no errors are found, the exit code is \fB0\fR.
+No indication of which line failed can be given so
+exit code \fB1\fR will never appear. Exit codes \fB2\fR, \fB3\fR, and
+\fB4\fR retain their usual interpretation.
+If the \fB-S\fR option is not used,
+the exit code depends on the type of \fIcapname\fR:
+.RS 5
+.TP
+.I boolean
+a value of \fB0\fR is set for TRUE and \fB1\fR for FALSE.
+.TP
+.I string
+a value of \fB0\fR is set if the
+\fIcapname\fR is defined for this terminal \fItype\fR (the value of
+\fIcapname\fR is returned on standard output);
+a value of \fB1\fR is set if \fIcapname\fR
+is not defined for this terminal \fItype\fR
+(nothing is written to standard output).
+.TP
+.I integer
+a value of \fB0\fR is always set,
+whether or not \fIcapname\fR is defined for this terminal \fItype\fR.
+To determine if \fIcapname\fR is defined for this terminal \fItype\fR,
+the user must test the value written to standard output.
+A value of \fB-1\fR
+means that \fIcapname\fR is not defined for this terminal \fItype\fR.
+.TP
+.I other
+\fBreset\fR or \fBinit\fR may fail to find their respective files.
+In that case, the exit code is set to 4 + \fBerrno\fR.
+.RE
+.PP
+Any other exit code indicates an error; see the DIAGNOSTICS section.
+.SH DIAGNOSTICS
+\fBtput\fR prints the following error messages and sets the corresponding exit
+codes.
+.PP
+.ne 15
+.TS
+l l.
+exit code error message
+=
+\fB0\fR T{
+(\fIcapname\fR is a numeric variable that is not specified in the
+\fBterminfo\fR(\*n) database for this terminal type, e.g.
+\fBtput -T450 lines\fR and \fBtput -T2621 xmc\fR)
+T}
+\fB1\fR no error message is printed, see the \fBEXIT CODES\fR section.
+\fB2\fR usage error
+\fB3\fR unknown terminal \fItype\fR or no \fBterminfo\fR database
+\fB4\fR unknown \fBterminfo\fR capability \fIcapname\fR
+\fB>4\fR error occurred in -S
+=
+.TE
+.SH PORTABILITY
+The \fBlongname\fR and \fB-S\fR options, and the parameter-substitution
+features used in the \fBcup\fR example, are not supported in BSD curses or in
+AT&T/USL curses before SVr4.
+.SH SEE ALSO
+\fB@CLEAR@\fR(1),
+\fBstty\fR(1),
+\fBtabs\fR(\*n),
+\fBterminfo\fR(5).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/man/tset.1 b/Build/source/libs/ncurses/man/tset.1
new file mode 100644
index 00000000000..5f89b725e10
--- /dev/null
+++ b/Build/source/libs/ncurses/man/tset.1
@@ -0,0 +1,254 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: tset.1,v 1.14 2004/07/05 13:16:08 tom Exp $
+.TH tset 1 ""
+.SH NAME
+\fBtset\fR, \fBreset\fR - terminal initialization
+.SH SYNOPSIS
+\fBtset\fR [\fB-IQVqrs\fR] [\fB-\fR] [\fB-e\fR \fIch\fR] [\fB-i\fR \fIch\fR] [\fB-k\fR \fIch\fR] [\fB-m\fR \fImapping\fR] [\fIterminal\fR]
+.br
+A
+\fBreset\fR [\fB-IQVqrs\fR] [\fB-\fR] [\fB-e\fR \fIch\fR] [\fB-i\fR \fIch\fR] [\fB-k\fR \fIch\fR] [\fB-m\fR \fImapping\fR] [\fIterminal\fR]
+.SH DESCRIPTION
+\&\fBTset\fR initializes terminals.
+\fBTset\fR first determines the type of terminal that you are using.
+This determination is done as follows, using the first terminal type found.
+.PP
+1. The \fBterminal\fR argument specified on the command line.
+.PP
+2. The value of the \fBTERM\fR environmental variable.
+.PP
+3. (BSD systems only.) The terminal type associated with the standard
+error output device in the \fI/etc/ttys\fR file. (On Linux and
+System-V-like UNIXes, \fIgetty\fR does this job by setting
+\fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.)
+.PP
+4. The default terminal type, ``unknown''.
+.PP
+If the terminal type was not specified on the command-line, the \fB-m\fR
+option mappings are then applied (see below for more information).
+Then, if the terminal type begins with a question mark (``?''), the
+user is prompted for confirmation of the terminal type. An empty
+response confirms the type, or, another type can be entered to specify
+a new type. Once the terminal type has been determined, the terminfo
+entry for the terminal is retrieved. If no terminfo entry is found
+for the type, the user is prompted for another terminal type.
+.PP
+Once the terminfo entry is retrieved, the window size, backspace, interrupt
+and line kill characters (among many other things) are set and the terminal
+and tab initialization strings are sent to the standard error output.
+Finally, if the erase, interrupt and line kill characters have changed,
+or are not set to their default values, their values are displayed to the
+standard error output.
+.PP
+When invoked as \fBreset\fR, \fBtset\fR sets cooked and echo modes,
+turns off cbreak and raw modes, turns on newline translation and
+resets any unset special characters to their default values before
+doing the terminal initialization described above. This is useful
+after a program dies leaving a terminal in an abnormal state. Note,
+you may have to type
+
+ \fB<LF>reset<LF>\fR
+
+(the line-feed character is normally control-J) to get the terminal
+to work, as carriage-return may no longer work in the abnormal state.
+Also, the terminal will often not echo the command.
+.PP
+The options are as follows:
+.TP 5
+.B -q
+The terminal type is displayed to the standard output, and the terminal is
+not initialized in any way. The option `-' by itself is equivalent but
+archaic.
+.TP
+.B -e
+Set the erase character to \fIch\fR.
+.TP
+.B -I
+Do not send the terminal or tab initialization strings to the terminal.
+.TP
+.B -Q
+Don't display any values for the erase, interrupt and line kill characters.
+.TP
+.B -V
+reports the version of ncurses which was used in this program, and exits.
+.TP
+.B -i
+Set the interrupt character to \fIch\fR.
+.TP
+.B -k
+Set the line kill character to \fIch\fR.
+.TP
+.B -m
+Specify a mapping from a port type to a terminal.
+See below for more information.
+.TP
+.B -r
+Print the terminal type to the standard error output.
+.TP
+.B -s
+Print the sequence of shell commands to initialize the environment variable
+\fBTERM\fR to the standard output.
+See the section below on setting the environment for details.
+.PP
+The arguments for the \fB-e\fR, \fB-i\fR, and \fB-k\fR
+options may either be entered as actual characters or by using the `hat'
+notation, i.e. control-h may be specified as ``^H'' or ``^h''.
+.SH SETTING THE ENVIRONMENT
+It is often desirable to enter the terminal type and information about
+the terminal's capabilities into the shell's environment.
+This is done using the \fB-s\fR option.
+.PP
+When the \fB-s\fR option is specified, the commands to enter the information
+into the shell's environment are written to the standard output. If
+the \fBSHELL\fR environmental variable ends in ``csh'', the commands
+are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
+Note, the \fBcsh\fR commands set and unset the shell variable
+\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR
+or \fB.profile\fR files will initialize the environment correctly:
+
+ eval \`tset -s options ... \`
+
+.SH TERMINAL TYPE MAPPING
+When the terminal is not hardwired into the system (or the current
+system information is incorrect) the terminal type derived from the
+\fI/etc/ttys\fR file or the \fBTERM\fR environmental variable is often
+something generic like \fBnetwork\fR, \fBdialup\fR, or \fBunknown\fR.
+When \fBtset\fR is used in a startup script it is often desirable to
+provide information about the type of terminal used on such ports.
+.PP
+The purpose of the \fB-m\fR option is to map
+from some set of conditions to a terminal type, that is, to
+tell \fBtset\fR
+``If I'm on this port at a particular speed, guess that I'm on that
+kind of terminal''.
+.PP
+The argument to the \fB-m\fR option consists of an optional port type, an
+optional operator, an optional baud rate specification, an optional
+colon (``:'') character and a terminal type. The port type is a
+string (delimited by either the operator or the colon character). The
+operator may be any combination of ``>'', ``<'', ``@'', and ``!''; ``>''
+means greater than, ``<'' means less than, ``@'' means equal to
+and ``!'' inverts the sense of the test.
+The baud rate is specified as a number and is compared with the speed
+of the standard error output (which should be the control terminal).
+The terminal type is a string.
+.PP
+If the terminal type is not specified on the command line, the \fB-m\fR
+mappings are applied to the terminal type. If the port type and baud
+rate match the mapping, the terminal type specified in the mapping
+replaces the current type. If more than one mapping is specified, the
+first applicable mapping is used.
+.PP
+For example, consider the following mapping: \fBdialup>9600:vt100\fR.
+The port type is dialup , the operator is >, the baud rate
+specification is 9600, and the terminal type is vt100. The result of
+this mapping is to specify that if the terminal type is \fBdialup\fR,
+and the baud rate is greater than 9600 baud, a terminal type of
+\fBvt100\fR will be used.
+.PP
+If no baud rate is specified, the terminal type will match any baud rate.
+If no port type is specified, the terminal type will match any port type.
+For example, \fB-m dialup:vt100 -m :?xterm\fR
+will cause any dialup port, regardless of baud rate, to match the terminal
+type vt100, and any non-dialup port type to match the terminal type ?xterm.
+Note, because of the leading question mark, the user will be
+queried on a default port as to whether they are actually using an xterm
+terminal.
+.PP
+No whitespace characters are permitted in the \fB-m\fR option argument.
+Also, to avoid problems with meta-characters, it is suggested that the
+entire \fB-m\fR option argument be placed within single quote characters,
+and that \fBcsh\fR users insert a backslash character (``\e'') before
+any exclamation marks (``!'').
+.SH HISTORY
+The \fBtset\fR command appeared in BSD 3.0. The \fBncurses\fR implementation
+was lightly adapted from the 4.4BSD sources for a terminfo environment by Eric
+S. Raymond <esr@snark.thyrsus.com>.
+.SH COMPATIBILITY
+The \fBtset\fR utility has been provided for backward-compatibility with BSD
+environments (under most modern UNIXes, \fB/etc/inittab\fR and \fIgetty\fR(1)
+can set \fBTERM\fR appropriately for each dial-up line; this obviates what was
+\fBtset\fR's most important use). This implementation behaves like 4.4BSD
+tset, with a few exceptions specified here.
+.PP
+The \fB-S\fR option of BSD tset no longer works; it prints an error message to stderr
+and dies. The \fB-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these
+changes are because the \fBTERMCAP\fR variable is no longer supported under
+terminfo-based \fBncurses\fR, which makes \fBtset -S\fR useless (we made it die
+noisily rather than silently induce lossage).
+.PP
+There was an undocumented 4.4BSD feature that invoking tset via a link named
+`TSET` (or via any other name beginning with an upper-case letter) set the
+terminal to use upper-case only. This feature has been omitted.
+.PP
+The \fB-A\fR, \fB-E\fR, \fB-h\fR, \fB-u\fR and \fB-v\fR
+options were deleted from the \fBtset\fR
+utility in 4.4BSD.
+None of them were documented in 4.3BSD and all are
+of limited utility at best.
+The \fB-a\fR, \fB-d\fR, and \fB-p\fR options are similarly
+not documented or useful, but were retained as they appear to be in
+widespread use. It is strongly recommended that any usage of these
+three options be changed to use the \fB-m\fR option instead. The
+-n option remains, but has no effect. The \fB-adnp\fR options are therefore
+omitted from the usage summary above.
+.PP
+It is still permissible to specify the \fB-e\fR, \fB-i\fR, and \fB-k\fR options without
+arguments, although it is strongly recommended that such usage be fixed to
+explicitly specify the character.
+.PP
+As of 4.4BSD, executing \fBtset\fR as \fBreset\fR no longer implies the \fB-Q\fR
+option. Also, the interaction between the - option and the \fIterminal\fR
+argument in some historic implementations of \fBtset\fR has been removed.
+.SH ENVIRONMENT
+The \fBtset\fR command uses the \fBSHELL\fR and \fBTERM\fR
+environment variables.
+.SH FILES
+.TP 5
+/etc/ttys
+system port name to terminal type mapping database (BSD versions only).
+.TP
+@TERMINFO@
+terminal capability database
+.SH SEE ALSO
+csh(1),
+sh(1),
+stty(1),
+tty(4),
+termcap(5),
+ttys(5),
+environ(7)
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
+
diff --git a/Build/source/libs/ncurses/man/wresize.3x b/Build/source/libs/ncurses/man/wresize.3x
new file mode 100644
index 00000000000..ce7c10b8d95
--- /dev/null
+++ b/Build/source/libs/ncurses/man/wresize.3x
@@ -0,0 +1,64 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey 1996
+.\"
+.\" $Id: wresize.3x,v 1.8 2003/10/25 20:41:08 tom Exp $
+.TH wresize 3X ""
+.SH NAME
+\fBwresize\fR - resize a curses window
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+
+\fBint wresize(WINDOW *win, int lines, int columns);\fR
+.SH DESCRIPTION
+The \fBwresize\fR function reallocates storage for an \fBncurses\fR
+window to adjust its dimensions to the specified values.
+If either dimension is larger than the current values, the
+window's data is filled with blanks that have the current background rendition
+(as set by \fBwbkgndset\fR) merged into them.
+.SH RETURN VALUE
+The function returns the integer \fBERR\fR upon failure and \fBOK\fR on success.
+It will fail if either of the dimensions less than or equal to zero,
+or if an error occurs while (re)allocating memory for the window.
+.SH NOTES
+The only restriction placed on the dimensions is that they be greater than zero.
+The dimensions are not compared to \fBcurses\fR screen dimensions to
+simplify the logic of \fBresizeterm\fR.
+The caller must ensure that the window's dimensions fit within the
+actual screen dimensions.
+.SH SEE ALSO
+\fBresizeterm\fR(3X).
+.SH AUTHOR
+Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/Build/source/libs/ncurses/mk-0th.awk b/Build/source/libs/ncurses/mk-0th.awk
new file mode 100644
index 00000000000..7d3bac76d21
--- /dev/null
+++ b/Build/source/libs/ncurses/mk-0th.awk
@@ -0,0 +1,101 @@
+# $Id: mk-0th.awk,v 1.15 2004/04/04 00:07:38 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "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 <dickey@clark.net> 1996,1997
+#
+# Generate list of sources for a library, together with lint/lintlib rules
+#
+# Variables:
+# libname (library name, e.g., "ncurses", "panel", "forms", "menus")
+#
+BEGIN {
+ print ""
+ print "# generated by mk-0th.awk"
+ print ""
+ print ".SUFFIXES: .c .cc .h .i .ii"
+ print ".c.i :"
+ printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
+ print ".cc.ii :"
+ printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
+ print ".h.i :"
+ printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
+ print ""
+ found = 0;
+ }
+ !/^[@#]/ {
+ if ( $0 != "" && $1 != "link_test" )
+ {
+ if ( found == 0 )
+ {
+ if ( subsets ~ /widechar/ )
+ widechar = 1;
+ else
+ widechar = 0;
+ printf "C_SRC ="
+ if ( $2 == "lib" )
+ found = 1
+ else
+ found = 2
+ }
+ if ( libname == "c++" || libname == "c++w" ) {
+ printf " \\\n\t%s/%s.cc", $3, $1
+ } else if ( widechar == 1 || $3 != "$(wide)" ) {
+ printf " \\\n\t%s/%s.c", $3, $1
+ }
+ }
+ }
+END {
+ print ""
+ if ( found == 1 )
+ {
+ print ""
+ printf "# Producing llib-l%s is time-consuming, so there's no direct-dependency for\n", libname
+ print "# it in the lintlib rule. We'll only remove in the cleanest setup."
+ print "clean ::"
+ printf "\trm -f llib-l%s.*\n", libname
+ print ""
+ print "realclean ::"
+ printf "\trm -f llib-l%s\n", libname
+ print ""
+ printf "llib-l%s : $(C_SRC)\n", libname
+ printf "\tcproto -a -l -DNCURSES_ENABLE_STDBOOL_H=0 -DLINT $(CPPFLAGS) $(C_SRC) >$@\n"
+ print ""
+ print "lintlib :"
+ printf "\tsh $(srcdir)/../misc/makellib %s $(CPPFLAGS)", libname
+ print ""
+ print "lint :"
+ print "\t$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(C_SRC) $(LINT_LIBS)"
+ }
+ else
+ {
+ print ""
+ print "lintlib :"
+ print "\t@echo no action needed"
+ }
+ }
diff --git a/Build/source/libs/ncurses/mk-1st.awk b/Build/source/libs/ncurses/mk-1st.awk
new file mode 100644
index 00000000000..4f045e7cf50
--- /dev/null
+++ b/Build/source/libs/ncurses/mk-1st.awk
@@ -0,0 +1,373 @@
+# $Id: mk-1st.awk,v 1.63 2004/01/31 23:40:12 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Generate list of objects for a given model library
+# Variables:
+# name (library name, e.g., "ncurses", "panel", "forms", "menus")
+# model (directory into which we compile, e.g., "obj")
+# prefix (e.g., "lib", for Unix-style libraries)
+# suffix (e.g., "_g.a", for debug libraries)
+# MODEL (e.g., "DEBUG", uppercase; toupper is not portable)
+# depend (optional dependencies for all objects, e.g, ncurses_cfg.h)
+# subset ("none", "base", "base+ext_funcs" or "termlib")
+# host (cross-compile host, if any)
+# ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable)
+# ShlibVerInfix ("yes" or "no", determines location of version #)
+# DoLinks ("yes", "reverse" or "no", flag to add symbolic links)
+# rmSoLocs ("yes" or "no", flag to add extra clean target)
+# overwrite ("yes" or "no", flag to add link to libcurses.a
+#
+# Notes:
+# CLIXs nawk does not like underscores in command-line variable names.
+# Mixed-case is ok.
+# HP/UX requires shared libraries to have executable permissions.
+#
+function symlink(src,dst) {
+ if ( src != dst ) {
+ printf "rm -f %s; ", dst
+ printf "$(LN_S) %s %s; ", src, dst
+ }
+ }
+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);
+ }
+ } else {
+ if ( ShlibVer == "rel" ) {
+ rmlink(directory, abi_name);
+ rmlink(directory, lib_name);
+ } else if ( ShlibVer == "abi" ) {
+ rmlink(directory, lib_name);
+ }
+ }
+ }
+function sharedlinks(directory) {
+ if ( ShlibVer != "auto" && ShlibVer != "cygdll" ) {
+ 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 ")\n"
+ }
+ }
+BEGIN {
+ found = 0
+ using = 0
+ }
+ /^@/ {
+ using = 0
+ if (subset == "none") {
+ using = 1
+ } else if (index(subset,$2) > 0) {
+ if (using == 0) {
+ if (found == 0) {
+ print ""
+ printf "# generated by mk-1st.awk (subset=%s)\n", subset
+ print ""
+ }
+ using = 1
+ }
+ if ( subset == "termlib" || subset == "termlib+ext_tinfo" ) {
+ OBJS = MODEL "_T"
+ } else {
+ OBJS = MODEL
+ }
+ }
+ }
+ /^[@#]/ {
+ next
+ }
+ $1 ~ /trace/ {
+ if (traces != "all" && traces != MODEL && $1 != "lib_trace")
+ next
+ }
+ {
+ if (using \
+ && ( $1 != "link_test" ) \
+ && ( $2 == "lib" \
+ || $2 == "progs" \
+ || $2 == "c++" \
+ || $2 == "tack" ))
+ {
+ if ( found == 0 )
+ {
+ printf "%s_OBJS =", OBJS
+ if ( $2 == "lib" )
+ found = 1
+ else
+ found = 2
+ }
+ printf " \\\n\t../%s/%s$o", model, $1
+ }
+ }
+END {
+ print ""
+ if ( found != 0 )
+ {
+ printf "\n$(%s_OBJS) : %s\n", OBJS, depend
+ }
+ if ( found == 1 )
+ {
+ print ""
+ lib_name = sprintf("%s%s%s", prefix, name, suffix)
+ if ( MODEL == "SHARED" )
+ {
+ if (ShlibVerInfix == "cygdll") {
+ abi_name = sprintf("%s%s$(ABI_VERSION)%s", "cyg", name, suffix);
+ rel_name = sprintf("%s%s$(REL_VERSION)%s", "cyg", name, suffix);
+ imp_name = sprintf("%s%s%s.a", prefix, name, suffix);
+ } else if (ShlibVerInfix == "yes") {
+ abi_name = sprintf("%s%s.$(ABI_VERSION)%s", prefix, name, suffix);
+ rel_name = sprintf("%s%s.$(REL_VERSION)%s", prefix, name, suffix);
+ } else {
+ abi_name = sprintf("%s.$(ABI_VERSION)", lib_name);
+ rel_name = sprintf("%s.$(REL_VERSION)", lib_name);
+ }
+ if ( DoLinks == "reverse") {
+ end_name = lib_name;
+ } else {
+ if ( ShlibVer == "rel" ) {
+ end_name = rel_name;
+ } else if ( ShlibVer == "abi" || ShlibVer == "cygdll" ) {
+ end_name = abi_name;
+ } else {
+ end_name = lib_name;
+ }
+ }
+
+ if ( ShlibVer == "cygdll" ) {
+ dst_dirs = "$(DESTDIR)$(bindir) $(DESTDIR)$(libdir)";
+ printf "$(SHARED_LIB) $(IMPORT_LIB) : $(%s_OBJS)\n", OBJS;
+ print "\t-@rm -f $(SHARED_LIB) $(IMPORT_LIB)";
+ } else {
+ dst_dirs = "$(DESTDIR)$(libdir)";
+ printf "../lib/%s : $(%s_OBJS)\n", end_name, OBJS
+ print "\t-@rm -f $@";
+ }
+ if ( subset == "termlib" || subset == "termlib+ext_tinfo" ) {
+ printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(TINFO_LIST) $(LDFLAGS)\n", OBJS
+ } else {
+ printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(SHLIB_LIST) $(LDFLAGS)\n", OBJS
+ }
+ sharedlinks("../lib")
+
+ print ""
+ print "install \\"
+ print "install.libs \\"
+ printf "install.%s :: %s $(LIBRARIES)\n", name, dst_dirs
+
+ if ( ShlibVer == "cygdll" ) {
+
+ src_name = sprintf("../lib/%s", end_name);
+ dst_name = sprintf("$(DESTDIR)$(bindir)/%s", end_name);
+ printf "\t@echo installing %s as %s\n", src_name, dst_name
+ printf "\t-@rm -f %s\n", dst_name
+ printf "\t$(INSTALL_LIB) %s %s\n", src_name, dst_name
+
+ src_name = sprintf("../lib/%s", imp_name);
+ dst_name = sprintf("$(DESTDIR)$(libdir)/%s", imp_name);
+ printf "\t@echo installing %s as %s\n", src_name, dst_name
+ printf "\t-@rm -f %s\n", dst_name
+ printf "\t$(INSTALL_LIB) %s %s\n", src_name, dst_name
+
+ } else {
+
+ src_name = sprintf("../lib/%s", end_name);
+ dst_name = sprintf("$(DESTDIR)$(libdir)/%s", end_name);
+ printf "\t@echo installing %s as %s\n", src_name, dst_name
+ printf "\t-@rm -f %s\n", dst_name
+ printf "\t$(INSTALL_LIB) %s %s\n", src_name, dst_name
+
+ sharedlinks("$(DESTDIR)$(libdir)")
+
+ }
+
+ if ( overwrite == "yes" && name == "ncurses" )
+ {
+ if ( ShlibVer == "cygdll" ) {
+ ovr_name = sprintf("libcurses%s.a", suffix)
+ printf "\t@echo linking %s to %s\n", imp_name, ovr_name
+ printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, imp_name, ovr_name
+ } else {
+ ovr_name = sprintf("libcurses%s", suffix)
+ printf "\t@echo linking %s to %s\n", end_name, ovr_name
+ printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, end_name, ovr_name
+ }
+ }
+ if ( ldconfig != "" ) {
+ printf "\t- test -z \"$(DESTDIR)\" && %s\n", ldconfig
+ }
+ print ""
+ print "uninstall \\"
+ print "uninstall.libs \\"
+ printf "uninstall.%s ::\n", name
+ if ( ShlibVer == "cygdll" ) {
+
+ printf "\t@echo uninstalling $(DESTDIR)$(bindir)/%s\n", end_name
+ printf "\t-@rm -f $(DESTDIR)$(bindir)/%s\n", end_name
+
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", imp_name
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/%s\n", imp_name
+
+ } else {
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", end_name
+ removelinks("$(DESTDIR)$(libdir)")
+ if ( overwrite == "yes" && name == "ncurses" )
+ {
+ if ( ShlibVer == "cygdll" ) {
+ ovr_name = sprintf("libcurses%s.a", suffix)
+ } else {
+ ovr_name = sprintf("libcurses%s", suffix)
+ }
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/%s\n", ovr_name
+ }
+ }
+ if ( rmSoLocs == "yes" ) {
+ print ""
+ print "mostlyclean \\"
+ print "clean ::"
+ printf "\t-@rm -f so_locations\n"
+ }
+ }
+ else if ( MODEL == "LIBTOOL" )
+ {
+ if ( $2 == "c++" ) {
+ compile="CXX"
+ } else {
+ compile="CC"
+ }
+ end_name = lib_name;
+ printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
+ printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)\n", compile, lib_name, OBJS
+ print ""
+ print "install \\"
+ print "install.libs \\"
+ printf "install.%s :: $(DESTDIR)$(libdir) ../lib/%s\n", name, lib_name
+ printf "\t@echo installing ../lib/%s as $(DESTDIR)$(libdir)/%s\n", lib_name, lib_name
+ printf "\tcd ../lib; $(LIBTOOL_INSTALL) $(INSTALL) %s $(DESTDIR)$(libdir)\n", lib_name
+ print ""
+ print "uninstall \\"
+ print "uninstall.libs \\"
+ printf "uninstall.%s ::\n", name
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", lib_name
+ printf "\t-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(libdir)/%s\n", lib_name
+ }
+ else
+ {
+ end_name = lib_name;
+ printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
+ printf "\t$(AR) $(AR_OPTS) $@ $?\n"
+ printf "\t$(RANLIB) $@\n"
+ if ( host == "vxworks" )
+ {
+ printf "\t$(LD) $(LD_OPTS) $? -o $(@:.a=$o)\n"
+ }
+ print ""
+ print "install \\"
+ print "install.libs \\"
+ printf "install.%s :: $(DESTDIR)$(libdir) ../lib/%s\n", name, lib_name
+ printf "\t@echo installing ../lib/%s as $(DESTDIR)$(libdir)/%s\n", lib_name, lib_name
+ printf "\t$(INSTALL_DATA) ../lib/%s $(DESTDIR)$(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 $(DESTDIR)$(libdir)/libcurses.a\n"
+ printf "\t(cd $(DESTDIR)$(libdir) && $(LN_S) libncurses.a libcurses.a)\n"
+ }
+ printf "\t$(RANLIB) $(DESTDIR)$(libdir)/%s\n", lib_name
+ if ( host == "vxworks" )
+ {
+ printf "\t@echo installing ../lib/lib%s$o as $(DESTDIR)$(libdir)/lib%s$o\n", name, name
+ printf "\t$(INSTALL_DATA) ../lib/lib%s$o $(DESTDIR)$(libdir)/lib%s$o\n", name, name
+ }
+ print ""
+ print "uninstall \\"
+ print "uninstall.libs \\"
+ printf "uninstall.%s ::\n", name
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", lib_name
+ printf "\t-@rm -f $(DESTDIR)$(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 $(DESTDIR)$(libdir)/libcurses.a\n"
+ }
+ if ( host == "vxworks" )
+ {
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/lib%s$o\n", name
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/lib%s$o\n", name
+ }
+ }
+ print ""
+ print "clean ::"
+ removelinks("../lib");
+ print ""
+ print "mostlyclean::"
+ printf "\t-rm -f $(%s_OBJS)\n", OBJS
+ if ( MODEL == "LIBTOOL" ) {
+ printf "\t-$(LIBTOOL_CLEAN) rm -f $(%s_OBJS:$o=.lo)\n", OBJS
+ }
+ }
+ else if ( found == 2 )
+ {
+ print ""
+ print "mostlyclean::"
+ printf "\t-rm -f $(%s_OBJS)\n", OBJS
+ if ( MODEL == "LIBTOOL" ) {
+ printf "\t-$(LIBTOOL_CLEAN) rm -f $(%s_OBJS:$o=.lo)\n", OBJS
+ }
+ print ""
+ print "clean ::"
+ printf "\t-rm -f $(%s_OBJS)\n", OBJS
+ if ( MODEL == "LIBTOOL" ) {
+ printf "\t-$(LIBTOOL_CLEAN) rm -f $(%s_OBJS:$o=.lo)\n", OBJS
+ }
+ }
+ }
diff --git a/Build/source/libs/ncurses/mk-2nd.awk b/Build/source/libs/ncurses/mk-2nd.awk
new file mode 100644
index 00000000000..c58e072209d
--- /dev/null
+++ b/Build/source/libs/ncurses/mk-2nd.awk
@@ -0,0 +1,128 @@
+# $Id: mk-2nd.awk,v 1.17 2004/02/15 01:31:16 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Generate compile-rules for the modules that we are using in libraries or
+# programs. We are listing them explicitly because we have turned off the
+# suffix rules (to force compilation with the appropriate flags). We could use
+# make-recursion but that would result in makefiles that are useless for
+# development.
+#
+# Variables:
+# model
+# MODEL (uppercase version of "model"; toupper is not portable)
+# echo (yes iff we will show the $(CC) lines)
+# subset ("none", "base", "base+ext_funcs" or "termlib")
+# crenames ("yes" or "no", flag to control whether -c & -o options are used)
+# cxxrenames ("yes" or "no", flag to control whether -c & -o options are used)
+#
+# Fields in src/modules:
+# $1 = module name
+# $2 = progs|lib|c++
+# $3 = source-directory
+#
+# Fields in src/modules past $3 are dependencies
+#
+BEGIN {
+ found = 0
+ using = 0
+ }
+ /^@/ {
+ using = 0
+ if (subset == "none") {
+ using = 1
+ } else if (index(subset,$2) > 0) {
+ if (using == 0) {
+ if (found == 0) {
+ print ""
+ print "# generated by mk-2nd.awk"
+ print ""
+ }
+ using = 1
+ }
+ }
+ }
+ /^[@#]/ {
+ next
+ }
+ $1 ~ /trace/ {
+ if (traces != "all" && traces != MODEL && $1 != "lib_trace")
+ next
+ }
+ {
+ if ($0 != "" \
+ && using != 0) {
+ found = 1
+ if ( $1 != "" ) {
+ print ""
+ if ( $2 == "c++" ) {
+ compile="CXX"
+ suffix=".cc"
+ use_c_o=cxxrenames
+ } else {
+ compile="CC"
+ suffix=".c"
+ use_c_o=crenames
+ }
+ printf "../%s/%s$o :\t%s/%s%s", model, $1, $3, $1, suffix
+ for (n = 4; n <= NF; n++) printf " \\\n\t\t\t%s", $n
+ print ""
+ if ( echo == "yes" )
+ atsign=""
+ else {
+ atsign="@"
+ printf "\t@echo 'compiling %s (%s)'\n", $1, model
+ }
+ printf "\t%s", atsign;
+ if ( use_c_o != "yes" ) {
+ printf "cd ../%s; ", model;
+ }
+ printf "$(LIBTOOL_COMPILE) $(%s) $(CFLAGS_%s) -c ", compile, MODEL
+ if ( $3 == "." || srcdir == "." ) {
+ dir = $3 "/"
+ sub("^\\$\\(srcdir\\)/","",dir);
+ sub("^\\./","",dir);
+ printf "../%s/%s%s%s", name, dir, $1, suffix
+ } else {
+ printf "%s/%s%s", $3, $1, suffix
+ }
+ if ( use_c_o == "yes" ) {
+ printf " -o ../%s/%s$o", model, $1
+ }
+ } else {
+ printf "%s", $1
+ for (n = 2; n <= NF; n++) printf " %s", $n
+ }
+ print ""
+ }
+ }
+END {
+ print ""
+ }
diff --git a/Build/source/libs/ncurses/mkinstalldirs b/Build/source/libs/ncurses/mkinstalldirs
new file mode 100755
index 00000000000..ffe7494c407
--- /dev/null
+++ b/Build/source/libs/ncurses/mkinstalldirs
@@ -0,0 +1,38 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Last modified: 1994-03-25
+# Public domain
+#
+
+errstatus=0
+umask 022
+
+for file in ${1+"$@"} ; do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d in ${1+"$@"} ; do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp" 1>&2
+ case "$pathcomp" in
+ [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]: )
+ ;; # DOSISH systems
+ * ) mkdir "$pathcomp" || errstatus=$? ;;
+ esac
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/Build/source/libs/ncurses/ncurses.ac b/Build/source/libs/ncurses/ncurses.ac
new file mode 100644
index 00000000000..d59c1857544
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses.ac
@@ -0,0 +1,105 @@
+if test "$needs_ncurses" = no; then
+ CURSESCPPFLAGS=
+ LDCURSESLIB=
+ CURSESDEP=
+else
+ #
+ # Check for ncurses.
+ #
+ have_ncurses=no
+ HAVE_NCURSES_CURSES_H=no
+
+ EXTRA_NCURSES_INCLUDE=
+ EXTRA_NCURSES_LIBDIR=
+
+ if test "$with_system_ncurses" = yes; then
+ if test "x$with_ncurses_libdir" != x; then
+ EXTRA_NCURSES_LIBDIR="-L$with_ncurses_libdir"
+ fi
+ if test "x$with_ncurses_include" != x; then
+ EXTRA_NCURSES_INCLUDE="-I$with_ncurses_include"
+ fi
+ fi
+
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_CPP=$CPP
+ OLD_LIBS=$LIBS
+
+ LDFLAGS="$LDFLAGS $EXTRA_NCURSES_LIBDIR"
+ CPP="$CPP $EXTRA_NCURSES_INCLUDE"
+
+ CURSESCPPFLAGS=
+ if test "$try_ncurses" = yes; then
+ AC_CHECK_LIB(ncurses, wresize, have_ncurses=yes, have_ncurses=no)
+ if test "${have_ncurses}" = "yes" ; then
+ AC_DEFINE(HAVE_NCURSES)
+ if (
+ AC_CHECK_HEADERS(ncurses/curses.h, HAVE_NCURSES_CURSES_H=yes, HAVE_NCURSES_CURSES_H=no)
+ test $HAVE_NCURSES_CURSES_H = yes && exit 0
+ exit 1
+ )
+ then
+ HAVE_NCURSES_CURSES_H=yes
+ else
+ HAVE_NCURSES_CURSES_H=no
+ fi
+
+ if (
+ AC_CHECK_HEADERS(ncurses.h, HAVE_NCURSES_H=yes, HAVE_NCURSES_H=no)
+ test $HAVE_NCURSES_H = yes && exit 0
+ exit 1
+ )
+ then
+ HAVE_NCURSES_H=yes
+ else
+ HAVE_NCURSES_H=no
+ fi
+
+ if test "${HAVE_NCURSES_CURSES_H}" = no && test "${HAVE_NCURSES_H}" = no; then
+ # Try again, and check for the bogus ncurses/ include bug.
+ # (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
+ # <ncurses/unctrl.h>)
+ AC_MSG_RESULT(Trying again with -I/usr/include/ncurses...)
+ OLD_CPP="${CPP}"
+ CPP="${CPP} -I/usr/include/ncurses"
+ if (
+ AC_CHECK_HEADERS(ncurses/curses.h, HAVE_NCURSES_CURSES_H=yes, HAVE_NCURSES_CURSES_H=no)
+ test $HAVE_NCURSES_CURSES_H = yes && exit 0
+ exit 1
+ )
+ then
+ HAVE_NCURSES_CURSES_H=yes
+ else
+ HAVE_NCURSES_CURSES_H=no
+ fi
+
+ if test "${HAVE_NCURSES_CURSES_H}" = "yes" ; then
+ CURSESCPPFLAGS=-I/usr/include/ncurses
+ AC_MSG_RESULT([ Your system has the bogus ncurses include bug.])
+ else
+ CPP="${OLD_CPP}"
+ fi
+ fi
+ fi
+ fi
+
+ LDFLAGS=$OLD_LDFLAGS
+ CPP=$OLD_CPP
+ LIBS=$OLD_LIBS
+
+ if test "${have_ncurses}" = yes && { test "${HAVE_NCURSES_CURSES_H}" = yes || test "${HAVE_NCURSES_H}" = yes; }; then
+ LDCURSESLIB="$EXTRA_NCURSES_LIBDIR -lncurses"
+ CURSESDEP=
+ CURSESCPPFLAGS="$CURSESCPPFLAGS $EXTRA_NCURSES_INCLUDE"
+ using_system_ncurses=yes
+ else
+ CURSESCPPFLAGS='-I$(NCURSESDIR)/include -I$(NCURSESSRCDIR)/include'
+ LDCURSESLIB='$(NCURSESDIR)/lib/libncurses.a'
+ CURSESDEP='$(NCURSESDIR)/lib/libncurses.a'
+ using_system_ncurses=no
+ fi
+fi
+
+AC_SUBST(CURSESCPPFLAGS)
+AC_SUBST(LDCURSESLIB)
+AC_SUBST(CURSESDEP)
diff --git a/Build/source/libs/ncurses/ncurses/Makefile.in b/Build/source/libs/ncurses/ncurses/Makefile.in
new file mode 100644
index 00000000000..d260b02c4b3
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/Makefile.in
@@ -0,0 +1,288 @@
+# $Id: Makefile.in,v 1.94 2004/08/14 17:20:11 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey 1996-2002
+#
+# Makefile for ncurses source code.
+#
+# This makes the following:
+# programs
+# includes
+# libraries (normal/debug/profile/shared)
+#
+# The variable 'srcdir' refers to the source-distribution, and can be set with
+# the configure script by "--srcdir=DIR".
+#
+# The rules are organized to produce the libraries for the configured models,
+# and the programs with the configured default model.
+
+# turn off _all_ suffix rules; we'll generate our own
+.SUFFIXES:
+
+SHELL = /bin/sh
+THIS = Makefile
+
+CF_MFLAGS = @cf_cv_makeflags@
+@SET_MAKE@
+
+x = @EXEEXT@
+o = .@OBJEXT@
+
+MODEL = @DFT_LWR_MODEL@
+DESTDIR = @DESTDIR@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+
+LIBTOOL = @LIBTOOL@
+LIBTOOL_CLEAN = @LIB_CLEAN@
+LIBTOOL_COMPILE = @LIB_COMPILE@
+LIBTOOL_LINK = @LIB_LINK@
+LIBTOOL_INSTALL = @LIB_INSTALL@
+LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+
+INSTALL = @INSTALL@
+INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
+INSTALL_PROG = @INSTALL_PROG@
+INSTALL_DATA = @INSTALL_DATA@
+
+AR = @AR@
+AR_OPTS = @AR_OPTS@
+AWK = @AWK@
+LD = @LD@
+LN_S = @LN_S@
+
+CC = @CC@
+CPP = @CPP@
+CFLAGS = @CFLAGS@
+
+INCDIR = $(srcdir)/../include
+CPPFLAGS = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) @CPPFLAGS@
+
+CCFLAGS = $(CPPFLAGS) $(CFLAGS)
+
+BUILD_CPPFLAGS = -I../include @BUILD_CPPFLAGS@
+BUILD_CC = @BUILD_CC@
+BUILD_CCFLAGS = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) -I$(INCDIR) $(BUILD_CPPFLAGS) @BUILD_CFLAGS@
+BUILD_LDFLAGS = @BUILD_LDFLAGS@
+BUILD_LIBS = @BUILD_LIBS@
+
+# The executables built in this directory are used for generating source that
+# is compiled into the build, or are test-programs that are not installed.
+
+BUILD_EXEEXT = @BUILD_EXEEXT@
+x = @PROG_EXT@
+
+CFLAGS_LIBTOOL = $(CCFLAGS)
+CFLAGS_NORMAL = $(CCFLAGS)
+CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
+CFLAGS_PROFILE = $(CCFLAGS) -pg
+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
+
+CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
+
+LINK = $(LIBTOOL) $(CC)
+LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
+
+SHLIB_DIRS = -L../lib
+SHLIB_LIST = $(SHLIB_DIRS) @SHLIB_LIST@
+TINFO_LIST = $(SHLIB_DIRS) @TINFO_LIST@
+
+MK_SHARED_LIB = @MK_SHARED_LIB@
+
+NCURSES_MAJOR = @NCURSES_MAJOR@
+NCURSES_MINOR = @NCURSES_MINOR@
+REL_VERSION = @cf_cv_rel_version@
+ABI_VERSION = @cf_cv_abi_version@
+
+RANLIB = @LIB_PREP@
+
+IMPORT_LIB = @IMPORT_LIB@
+SHARED_LIB = @SHARED_LIB@
+LIBRARIES = @LIBS_TO_MAKE@
+
+LINT = @LINT@
+LINT_OPTS = @LINT_OPTS@
+LINT_LIBS = -lncurses @LIBS@
+
+FALLBACK_LIST = @FALLBACK_LIST@
+
+TERMINFO_CAPS = $(top_srcdir)/include/@TERMINFO_CAPS@
+
+AUTO_SRC = \
+ ../include/nomacros.h \
+ codes.c \
+ comp_captab.c \
+ expanded.c \
+ fallback.c \
+ init_keytry.h \
+ keys.list \
+ lib_gen.c \
+ lib_keyname.c \
+ link_test.c \
+ names.c \
+ unctrl.c
+
+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@
+
+TEST_PROGS = \
+ captoinfo$x \
+ hardscroll$x \
+ link_test$x \
+ hashmap$x \
+ lib_mvcur$x
+
+base = $(srcdir)/base
+serial = $(srcdir)/tty
+tinfo = $(srcdir)/tinfo
+trace = $(srcdir)/trace
+wide = $(srcdir)/widechar
+
+################################################################################
+all \
+libs :: $(AUTO_SRC) ../lib $(LIBRARIES)
+
+sources: $(AUTO_SRC)
+
+$(DESTDIR)$(bindir) \
+$(DESTDIR)$(libdir) :
+ sh $(srcdir)/../mkinstalldirs $@
+
+../lib : ; mkdir $@
+
+fallback.c : $(tinfo)/MKfallback.sh
+ sh $(tinfo)/MKfallback.sh @TERMINFO@ @TERMINFO_SRC@ $(FALLBACK_LIST) >$@
+
+lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
+ sh $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
+
+../include/nomacros.h : $(base)/MKlib_gen.sh ../include/curses.h
+ sh $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h | \
+ fgrep undef >$@
+
+init_keytry.h: make_keys$(BUILD_EXEEXT) keys.list
+ ./make_keys keys.list > $@
+
+keys.list : $(tinfo)/MKkeys_list.sh
+ AWK=$(AWK) sh $(tinfo)/MKkeys_list.sh $(TERMINFO_CAPS) | sort >$@
+
+make_keys$(BUILD_EXEEXT) : \
+ $(tinfo)/make_keys.c \
+ names.c
+ $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
+
+make_hash$(BUILD_EXEEXT) : \
+ $(tinfo)/comp_hash.c \
+ ../include/hashsize.h
+ $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
+
+expanded.c : $(serial)/MKexpanded.sh
+ sh $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
+
+comp_captab.c: \
+ make_hash$(BUILD_EXEEXT) \
+ ../include/hashsize.h \
+ $(tinfo)/MKcaptab.awk
+ sh $(tinfo)/MKcaptab.awk $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ > $@
+
+lib_keyname.c: keys.list $(base)/MKkeyname.awk
+ $(AWK) -f $(base)/MKkeyname.awk keys.list > $@
+
+names.c codes.c: $(tinfo)/MKnames.awk
+ $(AWK) -f $(tinfo)/MKnames.awk $(srcdir)/../include/@TERMINFO_CAPS@
+ cat namehdr boolnames boolfnames numnames numfnames strnames strfnames nameftr >names.c
+ cat namehdr boolcodes numcodes strcodes codeftr >codes.c
+ -rm -f namehdr nameftr codeftr boolnames boolfnames boolcodes numnames numfnames numcodes strnames strfnames strcodes
+
+unctrl.c: $(base)/MKunctrl.awk
+ echo | $(AWK) -f $(base)/MKunctrl.awk >$@
+
+tags:
+ ctags *.[ch] */*.[ch]
+
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch] */*.[ch]
+
+mostlyclean ::
+ -rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
+ -rm -f $(TEST_PROGS)
+
+clean :: mostlyclean
+ -rm -f $(AUTO_SRC)
+ -rm -f make_keys$(BUILD_EXEEXT)
+ -rm -f make_hash$(BUILD_EXEEXT)
+ -rm -rf .libs
+
+distclean :: clean
+ -rm -f Makefile
+
+realclean :: distclean
+
+# These rules are used to allow "make -n" to work on a clean directory-tree
+../include/hashsize.h \
+../include/parametrized.h \
+../include/term.h :
+ cd ../include; $(MAKE) $(CF_MFLAGS)
+
+# These rules build test-programs for the modules that have test-drivers
+test_progs : $(TEST_PROGS)
+
+link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
+ sh $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@
+
+captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS)
+ @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS)
+
+hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS)
+ @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS)
+
+hashmap$x : $(serial)/hashmap.c $(TEST_DEPS)
+ @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS)
+
+lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \
+ ../@DFT_OBJ_SUBDIR@/dump_entry$o
+ @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS)
+
+link_test$x : link_test.c $(TEST_DEPS) \
+ ../@DFT_OBJ_SUBDIR@/link_test$o
+ @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) ../@DFT_OBJ_SUBDIR@/link_test$o $(TEST_LDFLAGS)
+
+../@DFT_OBJ_SUBDIR@/dump_entry$o:
+ cd ../progs && $(MAKE) ../@DFT_OBJ_SUBDIR@/dump_entry$o
+
+###############################################################################
+# The remainder of this file is automatically generated during configuration
+###############################################################################
diff --git a/Build/source/libs/ncurses/ncurses/README b/Build/source/libs/ncurses/ncurses/README
new file mode 100644
index 00000000000..20c94d3c289
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/README
@@ -0,0 +1,2 @@
+For discussion of the package internals, see hackguide.html in the doc/html
+directory.
diff --git a/Build/source/libs/ncurses/ncurses/README.IZ b/Build/source/libs/ncurses/ncurses/README.IZ
new file mode 100644
index 00000000000..2952f6854e5
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/README.IZ
@@ -0,0 +1,65 @@
+Here is the patch. I did no testing whatsoever with event watching
+requests present (I need some applications which exersize this before
+this, probably lynx ;-), but the code looks working "the normal way".
+
+I had no way to test that the poll() branch compiles/works...
+
+Here is the API:
+
+*) two new functions wgetch_events() wgetstrn_event() are introduced,
+ which allow an event-watch specification given as the last argument;
+
+*) if the last argument is NULL, they behave as wgetch() and
+ wgetstrn() (TESTED!);
+
+*) the event specification is a pointer to _nc_eventlist, which
+ contains bookkeeping elements (count and the summary of results),
+ and an array of pointers to _nc_event;
+
+*) each _nc_event is a typed union, with two types supported "as
+ shipped": _NC_EVENT_TIMEOUT_MSEC, _NC_EVENT_FILE. For
+ _NC_EVENT_FILE the fields are fd, flag, and the output field.
+
+*) The only supported flag "as shipped" is _NC_EVENT_FILE_READABLE.
+ If the file was found readable, the return field is set to this,
+ otherwise to 0;
+
+*) If these functions return KEY_EVENT, this means that the return
+ fields in both the _nc_eventlist and _nc_event structures make
+ sense. The field result_flags of _nc_eventlist may have a
+ combination of bits _NC_EVENT_TIMEOUT_MSEC and _NC_EVENT_FILE_READABLE
+ set;
+
+*) The timeout_msec field of _NC_EVENT_TIMEOUT_MSEC _nc_event's is
+ updated on return, even if the return is not KEY_EVENT. However,
+ the change in the value represents only the amount of time spent in
+ waiting for events, not the amount of time spent bookkeeping;
+
+*) the return KEY_EVENT of wgetstrn_event() means that the output
+ string includes the user input typed so far, but the user did not have
+ a chance to press ENTER (or whatever). This call should be
+ repeated (with "shifted" pointer to a buffer, of course) to
+ complete the input;
+
+*) The presence of this extension can be checked via inspecting
+ #ifdef NCURSES_EVENT_VERSION. This symbol is not defined on BeOS,
+ since there is no support for this on BeOS.
+
+Known issues: calls interrupted by KEY_EVENT reset the ESCDELAY
+timer. This is not entirely new, since other synthetic events behave
+the same (see "if (ch >= KEY_MIN)" branch of kgetch()). However,
+KEY_EVENT may be generated in a continuous stream (say, when
+downloading a file), thus this may be more important than with other
+synthetic keys. An additional field in window structure which keeps
+timestamp of the first raw key in the queue may be needed to
+circumvent this.
+
+Another possible issue: KEY_EVENT has a preference over a user input,
+so a stream of KEY_EVENT's can make input hard. Maybe use
+result_flags as in input parameter too, which specifies whether the
+user input should have higher precedence?
+
+Also: I took an opportunity to document kgetch() better.
+
+Enjoy,
+Ilya
diff --git a/Build/source/libs/ncurses/ncurses/SigAction.h b/Build/source/libs/ncurses/ncurses/SigAction.h
new file mode 100644
index 00000000000..150fc42b05a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/SigAction.h
@@ -0,0 +1,113 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * $Id: SigAction.h,v 1.7 2003/12/07 01:00:03 tom Exp $
+ *
+ * This file exists to handle non-POSIX systems which don't have <unistd.h>,
+ * and usually no sigaction() nor <termios.h>
+ */
+
+#ifndef _SIGACTION_H
+#define _SIGACTION_H
+
+#ifndef HAVE_SIGACTION
+#define HAVE_SIGACTION 0
+#endif
+
+#ifndef HAVE_SIGVEC
+#define HAVE_SIGVEC 0
+#endif
+
+#if HAVE_SIGACTION
+
+#if !HAVE_TYPE_SIGACTION
+typedef struct sigaction sigaction_t;
+#endif
+
+#else /* !HAVE_SIGACTION */
+
+#if HAVE_SIGVEC
+
+#if HAVE_LIBC_H
+#include <libc.h>
+#endif
+
+#undef SIG_BLOCK
+#define SIG_BLOCK 00
+
+#undef SIG_UNBLOCK
+#define SIG_UNBLOCK 01
+
+#undef SIG_SETMASK
+#define SIG_SETMASK 02
+
+ /*
+ * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration,
+ * and is useful for testing this header file.
+ */
+#if HAVE_BSD_SIGNAL_H
+#include <bsd/signal.h>
+#endif
+
+typedef struct sigvec sigaction_t;
+
+#define sigset_t _nc_sigset_t
+typedef unsigned long sigset_t;
+
+#undef sa_mask
+#define sa_mask sv_mask
+#undef sa_handler
+#define sa_handler sv_handler
+#undef sa_flags
+#define sa_flags sv_flags
+
+#undef sigaction
+#define sigaction _nc_sigaction
+#undef sigprocmask
+#define sigprocmask _nc_sigprocmask
+#undef sigemptyset
+#define sigemptyset _nc_sigemptyset
+#undef sigsuspend
+#define sigsuspend _nc_sigsuspend
+#undef sigdelset
+#define sigdelset _nc_sigdelset
+#undef sigaddset
+#define sigaddset _nc_sigaddset
+
+/* tty/lib_tstp.c is the only user */
+#include <base/sigaction.c>
+
+#endif /* HAVE_SIGVEC */
+#endif /* HAVE_SIGACTION */
+#endif /* !defined(_SIGACTION_H) */
diff --git a/Build/source/libs/ncurses/ncurses/base/MKkeyname.awk b/Build/source/libs/ncurses/ncurses/base/MKkeyname.awk
new file mode 100644
index 00000000000..4bf83eafbca
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/MKkeyname.awk
@@ -0,0 +1,90 @@
+# $Id: MKkeyname.awk,v 1.24 2002/09/01 19:43:34 tom Exp $
+##############################################################################
+# Copyright (c) 1999-2001,2002 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+BEGIN {
+ print "/* generated by MKkeyname.awk */"
+ print ""
+ print "#include <curses.priv.h>"
+ print "#include <tic.h>"
+ print ""
+ print "const struct kn _nc_key_names[] = {"
+}
+
+/^[^#]/ {
+ printf "\t{ \"%s\", %s },\n", $1, $1;
+ }
+
+END {
+ printf "\t{ 0, 0 }};\n"
+ print ""
+ print "NCURSES_EXPORT(NCURSES_CONST char *) keyname (int c)"
+ print "{"
+ print "static char **table;"
+ print "int i;"
+ print "char name[20];"
+ print "char *p;"
+ print ""
+ print "\tif (c == -1) return \"-1\";"
+ print ""
+ print "\tfor (i = 0; _nc_key_names[i].name != 0; i++)"
+ print "\t\tif (_nc_key_names[i].code == c)"
+ print "\t\t\treturn (NCURSES_CONST char *)_nc_key_names[i].name;"
+ print "\tif (c < 0 || c >= 256) return 0;"
+ print ""
+ print "\tif (table == 0)"
+ print "\t\ttable = typeCalloc(char *, 256);"
+ print "\tif (table == 0)"
+ print "\t\treturn keyname(256);"
+ print ""
+ print "\tif (table[c] == 0) {"
+ print "\t\tp = name;"
+ print "\t\tif (c >= 128) {"
+ print "\t\t\tstrcpy(p, \"M-\");"
+ print "\t\t\tp += 2;"
+ print "\t\t\tc -= 128;"
+ print "\t\t}"
+ print "\t\tif (c < 32)"
+ print "\t\t\tsprintf(p, \"^%c\", c + '@');"
+ print "\t\telse if (c == 127)"
+ print "\t\t\tstrcpy(p, \"^?\");"
+ print "\t\telse"
+ print "\t\t\tsprintf(p, \"%c\", c);"
+ print "\t\ttable[c] = strdup(name);"
+ print "\t}"
+ print "\treturn (NCURSES_CONST char *)table[c];"
+ print "}"
+ print ""
+ print "#if USE_WIDEC_SUPPORT"
+ print "NCURSES_EXPORT(NCURSES_CONST char *) key_name (wchar_t c)"
+ print "{"
+ print "\tNCURSES_CONST char *result = keyname((int)c);"
+ print "\tif (!strncmp(result, \"M-\", 2)) result = 0;"
+ print "\treturn result;"
+ print "}"
+ print "#endif"
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/MKlib_gen.sh b/Build/source/libs/ncurses/ncurses/base/MKlib_gen.sh
new file mode 100755
index 00000000000..583a349b6bf
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/MKlib_gen.sh
@@ -0,0 +1,401 @@
+#!/bin/sh
+#
+# MKlib_gen.sh -- generate sources from curses.h macro definitions
+#
+# ($Id: MKlib_gen.sh,v 1.23 2004/02/07 13:31:35 tom Exp $)
+#
+##############################################################################
+# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# The XSI Curses standard requires all curses entry points to exist as
+# functions, even though many definitions would normally be shadowed
+# by macros. Rather than hand-hack all that code, we actually
+# generate functions from the macros.
+#
+# This script accepts a file of prototypes on standard input. It discards
+# any that don't have a `generated' comment attached. It then parses each
+# prototype (relying on the fact that none of the macros take function
+# pointer or array arguments) and generates C source from it.
+#
+# Here is what the pipeline stages are doing:
+#
+# 1. sed: extract prototypes of generated functions
+# 2. sed: decorate prototypes with generated arguments a1. a2,...z
+# 3. awk: generate the calls with args matching the formals
+# 4. sed: prefix function names in prototypes so the preprocessor won't expand
+# them.
+# 5. cpp: macro-expand the file so the macro calls turn into C calls
+# 6. awk: strip the expansion junk off the front and add the new header
+# 7. sed: squeeze spaces, strip off gen_ prefix, create needed #undef
+#
+
+# keep the editing independent of locale:
+if test "${LANGUAGE+set}" = set; then LANGUAGE=C; export LANGUAGE; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi
+
+preprocessor="$1 -I../include"
+AWK="$2"
+USE="$3"
+
+PID=$$
+ED1=sed1_${PID}.sed
+ED2=sed2_${PID}.sed
+ED3=sed3_${PID}.sed
+ED4=sed4_${PID}.sed
+AW1=awk1_${PID}.awk
+AW2=awk2_${PID}.awk
+TMP=gen__${PID}.c
+trap "rm -f $ED1 $ED2 $ED3 $ED4 $AW1 $AW2 $TMP" 0 1 2 5 15
+
+ALL=$USE
+if test "$USE" = implemented ; then
+ CALL="call_"
+ cat >$ED1 <<EOF1
+/^extern.*implemented/{
+ h
+ s/^.*implemented:\([^ *]*\).*/P_POUNDCif_USE_\1_SUPPORT/p
+ g
+ s/^extern \([^;]*\);.*/\1/p
+ g
+ s/^.*implemented:\([^ *]*\).*/P_POUNDCendif/p
+}
+/^extern.*generated/{
+ h
+ s/^.*generated:\([^ *]*\).*/P_POUNDCif_USE_\1_SUPPORT/p
+ g
+ s/^extern \([^;]*\);.*/\1/p
+ g
+ s/^.*generated:\([^ *]*\).*/P_POUNDCendif/p
+}
+EOF1
+else
+ CALL=""
+ cat >$ED1 <<EOF1
+/^extern.*${ALL}/{
+ h
+ s/^.*${ALL}:\([^ *]*\).*/P_POUNDCif_USE_\1_SUPPORT/p
+ g
+ s/^extern \([^;]*\);.*/\1/p
+ g
+ s/^.*${ALL}:\([^ *]*\).*/P_POUNDCendif/p
+}
+EOF1
+fi
+
+cat >$ED2 <<EOF2
+/^P_/b nc
+/(void)/b nc
+ s/,/ a1% /
+ s/,/ a2% /
+ s/,/ a3% /
+ s/,/ a4% /
+ s/,/ a5% /
+ s/,/ a6% /
+ s/,/ a7% /
+ s/,/ a8% /
+ s/,/ a9% /
+ s/,/ a10% /
+ s/,/ a11% /
+ s/,/ a12% /
+ s/,/ a13% /
+ s/,/ a14% /
+ s/,/ a15% /
+ s/*/ * /g
+ s/%/ , /g
+ s/)/ z)/
+ s/\.\.\. z)/...)/
+:nc
+ s/(/ ( /
+ s/)/ )/
+EOF2
+
+cat >$ED3 <<EOF3
+/^P_/{
+ s/^P_POUNDCif_/#if /
+ s/^P_POUNDCendif/#endif/
+ s/^P_//
+ b done
+}
+ s/ */ /g
+ s/ */ /g
+ s/ ,/,/g
+ s/( /(/g
+ s/ )/)/g
+ s/ gen_/ /
+ s/^M_/#undef /
+ s/^[ ]*%[ ]*%[ ]*/ /
+:done
+EOF3
+
+if test "$USE" = generated ; then
+cat >$ED4 <<EOF
+ s/^\(.*\) \(.*\) (\(.*\))\$/NCURSES_EXPORT(\1) \2 (\3)/
+EOF
+else
+cat >$ED4 <<EOF
+/^\(.*\) \(.*\) (\(.*\))\$/ {
+ h
+ s/^\(.*\) \(.*\) (\(.*\))\$/extern \1 call_\2 (\3);/
+ p
+ g
+ s/^\(.*\) \(.*\) (\(.*\))\$/\1 call_\2 (\3)/
+ }
+EOF
+fi
+
+cat >$AW1 <<\EOF1
+BEGIN {
+ skip=0;
+ }
+/^P_POUNDCif/ {
+ print "\n"
+ print $0
+ skip=0;
+}
+/^P_POUNDCendif/ {
+ print $0
+ skip=1;
+}
+$0 !~ /^P_/ {
+ if (skip)
+ print "\n"
+ skip=1;
+
+ first=$1
+ for (i = 1; i <= NF; i++) {
+ if ( $i != "NCURSES_CONST" ) {
+ first = i;
+ break;
+ }
+ }
+ second = first + 1;
+ if ( $first == "chtype" ) {
+ returnType = "Char";
+ } else if ( $first == "SCREEN" ) {
+ returnType = "SP";
+ } else if ( $first == "WINDOW" ) {
+ returnType = "Win";
+ } else if ( $first == "attr_t" || $second == "attrset" || $second == "standout" || $second == "standend" || $second == "wattrset" || $second == "wstandout" || $second == "wstandend" ) {
+ returnType = "Attr";
+ } else if ( $first == "bool" || $first == "NCURSES_BOOL" ) {
+ returnType = "Bool";
+ } else if ( $second == "*" ) {
+ returnType = "Ptr";
+ } else {
+ returnType = "Code";
+ }
+ myfunc = second;
+ for (i = second; i <= NF; i++) {
+ if ($i != "*") {
+ myfunc = i;
+ break;
+ }
+ }
+ if (using == "generated") {
+ print "M_" $myfunc
+ }
+ print $0;
+ print "{";
+ argcount = 1;
+ check = NF - 1;
+ if ($check == "void")
+ argcount = 0;
+ if (argcount != 0) {
+ for (i = 1; i <= NF; i++)
+ if ($i == ",")
+ argcount++;
+ }
+
+ # suppress trace-code for functions that we cannot do properly here,
+ # since they return data.
+ dotrace = 1;
+ if ($myfunc ~ /innstr/)
+ dotrace = 0;
+ if ($myfunc ~ /innwstr/)
+ dotrace = 0;
+
+ # workaround functions that we do not parse properly
+ if ($myfunc ~ /ripoffline/) {
+ dotrace = 0;
+ argcount = 2;
+ }
+ if ($myfunc ~ /wunctrl/) {
+ dotrace = 0;
+ }
+
+ call = "%%T((T_CALLED(\""
+ args = ""
+ comma = ""
+ num = 0;
+ pointer = 0;
+ argtype = ""
+ for (i = myfunc; i <= NF; i++) {
+ ch = $i;
+ if ( ch == "*" )
+ pointer = 1;
+ else if ( ch == "va_list" )
+ pointer = 1;
+ else if ( ch == "char" )
+ argtype = "char";
+ else if ( ch == "int" )
+ argtype = "int";
+ else if ( ch == "short" )
+ argtype = "short";
+ else if ( ch == "chtype" )
+ argtype = "chtype";
+ else if ( ch == "attr_t" || ch == "NCURSES_ATTR_T" )
+ argtype = "attr";
+
+ if ( ch == "," || ch == ")" ) {
+ if (pointer) {
+ if ( argtype == "char" ) {
+ call = call "%s"
+ comma = comma "_nc_visbuf2(" num ","
+ pointer = 0;
+ } else
+ call = call "%p"
+ } else if (argcount != 0) {
+ if ( argtype == "int" || argtype == "short" ) {
+ call = call "%d"
+ argtype = ""
+ } else if ( argtype != "" ) {
+ call = call "%s"
+ comma = comma "_trace" argtype "2(" num ","
+ } else {
+ call = call "%#lx"
+ comma = comma "(long)"
+ }
+ }
+ if (ch == ",")
+ args = args comma "a" ++num;
+ else if ( argcount != 0 && $check != "..." )
+ args = args comma "z"
+ call = call ch
+ if (pointer == 0 && argcount != 0 && argtype != "" )
+ args = args ")"
+ if (args != "")
+ comma = ", "
+ pointer = 0;
+ argtype = ""
+ }
+ if ( i == 2 || ch == "(" )
+ call = call ch
+ }
+ call = call "\")"
+ if (args != "")
+ call = call ", " args
+ call = call ")); "
+
+ if (dotrace)
+ printf "%s", call
+
+ if (match($0, "^void"))
+ call = ""
+ else if (dotrace)
+ call = sprintf("return%s( ", returnType);
+ else
+ call = "%%return ";
+
+ call = call $myfunc "(";
+ for (i = 1; i < argcount; i++) {
+ if (i != 1)
+ call = call ", ";
+ call = call "a" i;
+ }
+ if ( argcount != 0 && $check != "..." ) {
+ if (argcount != 1)
+ call = call ", ";
+ call = call "z";
+ }
+ if (!match($0, "^void"))
+ call = call ") ";
+ if (dotrace)
+ call = call ")";
+ print call ";"
+
+ if (match($0, "^void"))
+ print "%%returnVoid;"
+ print "}";
+}
+EOF1
+
+cat >$AW2 <<EOF1
+BEGIN {
+ print "/*"
+ print " * DO NOT EDIT THIS FILE BY HAND!"
+ printf " * It is generated by $0 %s.\n", "$USE"
+ if ( "$USE" == "generated" ) {
+ print " *"
+ print " * This is a file of trivial functions generated from macro"
+ print " * definitions in curses.h to satisfy the XSI Curses requirement"
+ print " * that every macro also exist as a callable function."
+ print " *"
+ print " * It will never be linked unless you call one of the entry"
+ print " * points with its normal macro definition disabled. In that"
+ print " * case, if you have no shared libraries, it will indirectly"
+ print " * pull most of the rest of the library into your link image."
+ }
+ print " */"
+ print "#include <curses.priv.h>"
+ print ""
+ }
+/^DECLARATIONS/ {start = 1; next;}
+ {if (start) print \$0;}
+END {
+ if ( "$USE" != "generated" ) {
+ print "int main(void) { return 0; }"
+ }
+ }
+EOF1
+
+cat >$TMP <<EOF
+#include <ncurses_cfg.h>
+#include <curses.h>
+
+DECLARATIONS
+
+EOF
+
+sed -n -f $ED1 \
+| sed -e 's/NCURSES_EXPORT(\(.*\)) \(.*\) (\(.*\))/\1 \2(\3)/' \
+| sed -f $ED2 \
+| $AWK -f $AW1 using=$USE \
+| sed -e 's/^\([a-z_][a-z_]*[ *]*\)/\1 gen_/' -e 's/ / /g' >>$TMP
+
+$preprocessor $TMP 2>/dev/null \
+| sed -e 's/ / /g' -e 's/^ //' \
+| $AWK -f $AW2 \
+| sed -f $ED3 \
+| sed \
+ -e 's/^.*T_CALLED.*returnCode( \([a-z].*) \));/ return \1;/' \
+ -e 's/^.*T_CALLED.*returnCode( \((wmove.*) \));/ return \1;/' \
+| sed -f $ED4
diff --git a/Build/source/libs/ncurses/ncurses/base/MKunctrl.awk b/Build/source/libs/ncurses/ncurses/base/MKunctrl.awk
new file mode 100644
index 00000000000..79ca5fc5673
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/MKunctrl.awk
@@ -0,0 +1,72 @@
+# $Id: MKunctrl.awk,v 1.10 2004/04/03 22:50:37 tom Exp $
+##############################################################################
+# Copyright (c) 1998,2001,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey <dickey@clark.net> 1997
+#
+
+BEGIN {
+ print "/* generated by MKunctrl.awk */"
+ print ""
+ print "#include <curses.priv.h>"
+ print ""
+ print "#undef unctrl"
+ print ""
+ }
+END {
+ print "NCURSES_EXPORT(NCURSES_CONST char *) unctrl (register chtype ch)"
+ print "{"
+ printf "static const char* const table[] = {"
+ for ( ch = 0; ch < 256; ch++ ) {
+ gap = ","
+ if ((ch % 8) == 0)
+ printf "\n "
+ if (ch < 32) {
+ 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 " "
+ }
+ if (ch == 255)
+ gap = "\n"
+ else if (((ch + 1) % 8) != 0)
+ gap = gap " "
+ printf "%s", gap
+ }
+ print "};"
+ print "int check = ChCharOf(ch);"
+ print ""
+ print "\tif (check < 0 || check >= (int)SIZEOF(table)) return 0;"
+ print ""
+ print "\treturn (NCURSES_CONST char *)table[check];"
+ print "}"
+ }
diff --git a/Build/source/libs/ncurses/ncurses/base/README b/Build/source/libs/ncurses/ncurses/base/README
new file mode 100644
index 00000000000..ffa16963e9e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/README
@@ -0,0 +1,7 @@
+-- $Id: README,v 1.1 1998/11/14 22:58:22 tom Exp $
+
+The functions in this directory are the generic (not device-specific) modules
+of ncurses.
+
+As a rule, these modules should not depend directly on term.h references and
+associated terminfo function and variables.
diff --git a/Build/source/libs/ncurses/ncurses/base/define_key.c b/Build/source/libs/ncurses/ncurses/base/define_key.c
new file mode 100644
index 00000000000..0c8bc48debe
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/define_key.c
@@ -0,0 +1,63 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: define_key.c,v 1.8 2003/05/17 23:28:05 tom Exp $")
+
+NCURSES_EXPORT(int)
+define_key(const char *str, int keycode)
+{
+ int code = ERR;
+
+ T((T_CALLED("define_key(%s,%d)"), _nc_visbuf(str), keycode));
+ if (keycode > 0) {
+ if (str != 0) {
+ define_key(str, 0);
+ } else if (has_key(keycode)) {
+ while (_nc_remove_key(&(SP->_keytry), keycode))
+ code = OK;
+ }
+ if (str != 0) {
+ if (key_defined(str) == 0) {
+ (void) _nc_add_to_try(&(SP->_keytry), str, keycode);
+ code = OK;
+ } else {
+ code = ERR;
+ }
+ }
+ } else {
+ while (_nc_remove_string(&(SP->_keytry), str))
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/key_defined.c b/Build/source/libs/ncurses/ncurses/base/key_defined.c
new file mode 100644
index 00000000000..dac18874877
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/key_defined.c
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Copyright (c) 2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey, 2003 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: key_defined.c,v 1.3 2003/05/17 23:12:27 tom Exp $")
+
+static int
+find_definition(struct tries *tree, const char *str)
+{
+ struct tries *ptr;
+ int result = 0;
+
+ if (str != 0 && *str != '\0') {
+ for (ptr = tree; ptr != 0; ptr = ptr->sibling) {
+ if (UChar(*str) == UChar(ptr->ch)) {
+ if (str[1] == '\0' && ptr->child != 0) {
+ result = -1;
+ } else if ((result = find_definition(ptr->child, str + 1)) == 0) {
+ result = ptr->value;
+ } else if (str[1] == '\0') {
+ result = -1;
+ }
+ }
+ if (result != 0)
+ break;
+ }
+ }
+ return (result);
+}
+
+/*
+ * Returns the keycode associated with the given string. If none is found,
+ * return 0. If the string is only a prefix to other strings, return -1.
+ */
+NCURSES_EXPORT(int)
+key_defined(const char *str)
+{
+ int code = ERR;
+
+ T((T_CALLED("key_defined(%s)"), _nc_visbuf(str)));
+ if (SP != 0 && str != 0) {
+ code = find_definition(SP->_keytry, str);
+ }
+
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/keybound.c b/Build/source/libs/ncurses/ncurses/base/keybound.c
new file mode 100644
index 00000000000..06a1f44fc2f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/keybound.c
@@ -0,0 +1,47 @@
+/****************************************************************************
+ * Copyright (c) 1999-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 <dickey@clark.net> 1999 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: keybound.c,v 1.4 2003/03/08 19:39:31 tom Exp $")
+
+/*
+ * Returns the count'th string definition which is associated with the
+ * given keycode. The result is malloc'd, must be freed by the caller.
+ */
+
+NCURSES_EXPORT(char *)
+keybound(int code, int count)
+{
+ T((T_CALLED("keybound(%d,%d)"), code, count));
+ returnPtr(_nc_expand_try(SP->_keytry, code, &count, 0));
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/keyok.c b/Build/source/libs/ncurses/ncurses/base/keyok.c
new file mode 100644
index 00000000000..e3b4be297c1
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/keyok.c
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: keyok.c,v 1.5 2000/12/10 02:43:26 tom Exp $")
+
+/*
+ * Enable (or disable) ncurses' interpretation of a keycode by adding (or
+ * removing) the corresponding 'tries' entry.
+ *
+ * Do this by storing a second tree of tries, which records the disabled keys.
+ * The simplest way to copy is to make a function that returns the string (with
+ * nulls set to 0200), then use that to reinsert the string into the
+ * corresponding tree.
+ */
+
+NCURSES_EXPORT(int)
+keyok(int c, bool flag)
+{
+ int code = ERR;
+ int count = 0;
+ char *s;
+
+ T((T_CALLED("keyok(%d,%d)"), c, flag));
+ if (flag) {
+ while ((s = _nc_expand_try(SP->_key_ok, c, &count, 0)) != 0
+ && _nc_remove_key(&(SP->_key_ok), c)) {
+ _nc_add_to_try(&(SP->_keytry), s, c);
+ free(s);
+ code = OK;
+ count = 0;
+ }
+ } else {
+ while ((s = _nc_expand_try(SP->_keytry, c, &count, 0)) != 0
+ && _nc_remove_key(&(SP->_keytry), c)) {
+ _nc_add_to_try(&(SP->_key_ok), s, c);
+ free(s);
+ code = OK;
+ count = 0;
+ }
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_addch.c b/Build/source/libs/ncurses/ncurses/base/lib_addch.c
new file mode 100644
index 00000000000..08651a04aa7
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_addch.c
@@ -0,0 +1,413 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+** lib_addch.c
+**
+** The routine waddch().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_addch.c,v 1.84 2004/09/26 00:10:54 tom Exp $")
+
+/*
+ * Ugly microtweaking alert. Everything from here to end of module is
+ * likely to be speed-critical -- profiling data sure says it is!
+ * Most of the important screen-painting functions are shells around
+ * waddch(). So we make every effort to reduce function-call overhead
+ * by inlining stuff, even at the cost of making wrapped copies for
+ * export. Also we supply some internal versions that don't call the
+ * window sync hook, for use by string-put functions.
+ */
+
+/* Return bit mask for clearing color pair number if given ch has color */
+#define COLOR_MASK(ch) (~(attr_t)((ch)&A_COLOR?A_COLOR:0))
+
+static inline NCURSES_CH_T
+render_char(WINDOW *win, NCURSES_CH_T ch)
+/* compute a rendition of the given char correct for the current context */
+{
+ attr_t a = win->_attrs;
+
+ if (ISBLANK(ch) && AttrOf(ch) == A_NORMAL) {
+ /* color in attrs has precedence over bkgrnd */
+ ch = win->_nc_bkgd;
+ SetAttr(ch, a | (AttrOf(win->_nc_bkgd) & COLOR_MASK(a)));
+ } else {
+ /* color in attrs has precedence over bkgrnd */
+ a |= AttrOf(win->_nc_bkgd) & COLOR_MASK(a);
+ /* color in ch has precedence */
+ AddAttr(ch, (a & COLOR_MASK(AttrOf(ch))));
+ }
+
+ TR(TRACE_VIRTPUT, ("render_char bkg %s, attrs %s -> ch %s",
+ _tracech_t2(1, CHREF(win->_nc_bkgd)),
+ _traceattr(win->_attrs),
+ _tracech_t2(3, CHREF(ch))));
+
+ return (ch);
+}
+
+NCURSES_EXPORT(NCURSES_CH_T)
+_nc_render(WINDOW *win, NCURSES_CH_T ch)
+/* make render_char() visible while still allowing us to inline it below */
+{
+ return render_char(win, ch);
+}
+
+/* check if position is legal; if not, return error */
+#ifndef NDEBUG /* treat this like an assertion */
+#define CHECK_POSITION(win, x, y) \
+ if (y > win->_maxy \
+ || x > win->_maxx \
+ || y < 0 \
+ || x < 0) { \
+ TR(TRACE_VIRTPUT, ("Alert! Win=%p _curx = %d, _cury = %d " \
+ "(_maxx = %d, _maxy = %d)", win, x, y, \
+ win->_maxx, win->_maxy)); \
+ return(ERR); \
+ }
+#else
+#define CHECK_POSITION(win, x, y) /* nothing */
+#endif
+
+static
+#if !USE_WIDEC_SUPPORT /* cannot be inline if it is recursive */
+inline
+#endif
+int
+waddch_literal(WINDOW *win, NCURSES_CH_T ch)
+{
+ int x;
+ int y;
+ struct ldat *line;
+
+ x = win->_curx;
+ y = win->_cury;
+
+ CHECK_POSITION(win, x, y);
+
+ /*
+ * 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);
+
+ line = win->_line + y;
+
+ CHANGED_CELL(line, x);
+
+ /*
+ * Build up multibyte characters until we have a wide-character.
+ */
+ if_WIDEC({
+ if (WINDOW_EXT(win, addch_used) != 0 || !Charable(ch)) {
+ char *buffer = WINDOW_EXT(win, addch_work);
+ int len;
+ mbstate_t state;
+ wchar_t result;
+
+ if ((WINDOW_EXT(win, addch_used) != 0) &&
+ (WINDOW_EXT(win, addch_x) != x ||
+ WINDOW_EXT(win, addch_y) != y)) {
+ /* discard the incomplete multibyte character */
+ WINDOW_EXT(win, addch_used) = 0;
+ TR(TRACE_VIRTPUT,
+ ("Alert discarded multibyte on move (%d,%d) -> (%d,%d)",
+ WINDOW_EXT(win, addch_y), WINDOW_EXT(win, addch_x),
+ y, x));
+ }
+ WINDOW_EXT(win, addch_x) = x;
+ WINDOW_EXT(win, addch_y) = y;
+
+ memset(&state, 0, sizeof(state));
+ buffer[WINDOW_EXT(win, addch_used)] = CharOf(ch);
+ WINDOW_EXT(win, addch_used) += 1;
+ buffer[WINDOW_EXT(win, addch_used)] = '\0';
+ if ((len = mbrtowc(&result,
+ buffer,
+ WINDOW_EXT(win, addch_used), &state)) > 0) {
+ attr_t attrs = AttrOf(ch);
+ SetChar(ch, result, attrs);
+ WINDOW_EXT(win, addch_used) = 0;
+ if (is8bits(CharOf(ch))) {
+ const char *s = unctrl(CharOf(ch));
+ if (s[1] != 0) {
+ return waddstr(win, s);
+ }
+ }
+ } else {
+ if (len == -1) {
+ /*
+ * An error occurred. We could either discard everything,
+ * or assume that the error was in the previous input.
+ * Try the latter.
+ */
+ TR(TRACE_VIRTPUT, ("Alert! mbrtowc returns error"));
+ buffer[0] = CharOf(ch);
+ WINDOW_EXT(win, addch_used) = 1;
+ }
+ return OK;
+ }
+ }
+ });
+
+ /*
+ * Handle non-spacing characters
+ */
+ if_WIDEC({
+ if (wcwidth(CharOf(ch)) == 0) {
+ int i;
+ if ((x > 0 && y >= 0)
+ || ((y = win->_cury - 1) >= 0 &&
+ (x = win->_maxx) > 0)) {
+ wchar_t *chars = (win->_line[y].text[x - 1].chars);
+ for (i = 0; i < CCHARW_MAX; ++i) {
+ if (chars[i] == 0) {
+ chars[i] = CharOf(ch);
+ break;
+ }
+ }
+ }
+ goto testwrapping;
+ }
+ });
+ line->text[x++] = ch;
+ /*
+ * Provide for multi-column characters
+ */
+ if_WIDEC({
+ int len = wcwidth(CharOf(ch));
+ while (len-- > 1) {
+ if (x + (len - 1) > win->_maxx) {
+ NCURSES_CH_T blank = NewChar2(BLANK_TEXT, BLANK_ATTR);
+ AddAttr(blank, AttrOf(ch));
+ if (waddch_literal(win, blank) != ERR)
+ return waddch_literal(win, ch);
+ return ERR;
+ }
+ AddAttr(line->text[x++], WA_NAC);
+ TR(TRACE_VIRTPUT, ("added NAC %d", x - 1));
+ }
+ }
+ testwrapping:
+ );
+
+ TR(TRACE_VIRTPUT, ("cell (%d, %d..%d) = %s",
+ win->_cury, win->_curx, x - 1,
+ _tracech_t(CHREF(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 (Solaris 2.6
+ * does this also, however).
+ */
+ 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->_curx = x;
+ return OK;
+}
+
+static inline int
+waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
+/* the workhorse function -- add a character to the given window */
+{
+ int x, y;
+ chtype t = CharOf(ch);
+ const char *s = 0;
+
+ /*
+ * If we are using the alternate character set, forget about locale.
+ * Otherwise, if unctrl() returns a single-character or the locale
+ * claims the code is printable, treat it that way.
+ */
+ if ((AttrOf(ch) & A_ALTCHARSET)
+ || ((s = unctrl(t))[1] == 0 ||
+ (
+ isprint(t)
+#if USE_WIDEC_SUPPORT
+ || WINDOW_EXT(win, addch_used)
+#endif
+ )))
+ return waddch_literal(win, ch);
+
+ /*
+ * Handle carriage control and other codes that are not printable, or are
+ * known to expand to more than one character according to unctrl().
+ */
+ x = win->_curx;
+ y = win->_cury;
+
+ 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)) {
+ NCURSES_CH_T blank = NewChar2(BLANK_TEXT, BLANK_ATTR);
+ AddAttr(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);
+ }
+ /* FALLTHRU */
+ case '\r':
+ x = 0;
+ win->_flags &= ~_WRAPPED;
+ break;
+ case '\b':
+ if (x == 0)
+ return (OK);
+ x--;
+ win->_flags &= ~_WRAPPED;
+ break;
+ default:
+ while (*s) {
+ NCURSES_CH_T sch;
+ SetChar(sch, *s++, AttrOf(ch));
+ if (waddch_literal(win, sch) == ERR)
+ return ERR;
+ }
+ return (OK);
+ }
+
+ win->_curx = x;
+ win->_cury = y;
+
+ return (OK);
+}
+
+NCURSES_EXPORT(int)
+_nc_waddch_nosync(WINDOW *win, const NCURSES_CH_T c)
+/* export copy of waddch_nosync() so the string-put functions can use it */
+{
+ return (waddch_nosync(win, c));
+}
+
+/*
+ * The versions below call _nc_synhook(). We wanted to avoid this in the
+ * version exported for string puts; they'll call _nc_synchook once at end
+ * of run.
+ */
+
+/* These are actual entry points */
+
+NCURSES_EXPORT(int)
+waddch(WINDOW *win, const chtype ch)
+{
+ int code = ERR;
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win,
+ _tracechtype(ch)));
+
+ if (win && (waddch_nosync(win, wch) != ERR)) {
+ _nc_synchook(win);
+ code = OK;
+ }
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+wechochar(WINDOW *win, const chtype ch)
+{
+ int code = ERR;
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
+ _tracechtype(ch)));
+
+ if (win && (waddch_nosync(win, wch) != ERR)) {
+ bool save_immed = win->_immed;
+ win->_immed = TRUE;
+ _nc_synchook(win);
+ win->_immed = save_immed;
+ code = OK;
+ }
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_addstr.c b/Build/source/libs/ncurses/ncurses/base/lib_addstr.c
new file mode 100644
index 00000000000..93d6743c0ce
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_addstr.c
@@ -0,0 +1,209 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * *
+ * Rewritten 2001-2002 to support wide-characters by *
+ * Sven Verdoolaege *
+ * Thomas Dickey *
+ ****************************************************************************/
+
+/*
+** lib_addstr.c
+*
+** The routines waddnstr(), waddchnstr().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_addstr.c,v 1.40 2004/07/10 20:39:03 tom Exp $")
+
+NCURSES_EXPORT(int)
+waddnstr(WINDOW *win, const char *astr, int n)
+{
+ const char *str = astr;
+ int code = ERR;
+
+ T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbufn(astr, n), n));
+
+ if (win && (str != 0)) {
+ TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(win->_attrs)));
+ code = OK;
+ if (n < 0)
+ n = (int) strlen(astr);
+
+ TR(TRACE_VIRTPUT, ("str is not null, length = %d", n));
+ while ((n-- > 0) && (*str != '\0')) {
+ NCURSES_CH_T ch;
+ TR(TRACE_VIRTPUT, ("*str = %#o", UChar(*str)));
+ SetChar(ch, UChar(*str++), A_NORMAL);
+ if (_nc_waddch_nosync(win, ch) == ERR) {
+ code = ERR;
+ break;
+ }
+ }
+ _nc_synchook(win);
+ }
+ TR(TRACE_VIRTPUT, ("waddnstr returns %d", code));
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+waddchnstr(WINDOW *win, const chtype *astr, int n)
+{
+ 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));
+
+ 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);
+
+ line = &(win->_line[y]);
+#if USE_WIDEC_SUPPORT
+ {
+ int i;
+ for (i = 0; i < n; ++i)
+ SetChar(line->text[i + x], ChCharOf(astr[i]), ChAttrOf(astr[i]));
+ }
+#else
+ memcpy(line->text + x, astr, n * sizeof(*astr));
+#endif
+ CHANGED_RANGE(line, x, x + n - 1);
+
+ _nc_synchook(win);
+ returnCode(code);
+}
+
+#if USE_WIDEC_SUPPORT
+
+NCURSES_EXPORT(int)
+_nc_wchstrlen(const cchar_t * s)
+{
+ int result = 0;
+ while (CharOf(s[result]) != L'\0') {
+ result++;
+ }
+ return result;
+}
+
+NCURSES_EXPORT(int)
+wadd_wchnstr(WINDOW *win, const cchar_t * astr, int n)
+{
+ NCURSES_CH_T blank = NewChar(BLANK_TEXT);
+ NCURSES_SIZE_T y = win->_cury;
+ NCURSES_SIZE_T x = win->_curx;
+ int code = OK;
+ struct ldat *line;
+ int i, start, end;
+
+ T((T_CALLED("wadd_wchnstr(%p,%s,%d)"), win, _nc_viscbuf(astr, n), n));
+
+ if (!win)
+ returnCode(ERR);
+
+ if (n < 0) {
+ n = _nc_wchstrlen(astr);
+ }
+ if (n > win->_maxx - x + 1)
+ n = win->_maxx - x + 1;
+ if (n == 0)
+ returnCode(code);
+
+ line = &(win->_line[y]);
+ start = x;
+ end = x + n - 1;
+ if (isnac(line->text[x])) {
+ line->text[x - 1] = _nc_render(win, blank);
+ --start;
+ }
+ for (i = 0; i < n && x <= win->_maxx; ++i) {
+ line->text[x++] = _nc_render(win, astr[i]);
+ if (wcwidth(CharOf(astr[i])) > 1) {
+ if (x <= win->_maxx)
+ AddAttr(line->text[x++], WA_NAC);
+ else
+ line->text[x - 1] = _nc_render(win, blank);
+ }
+ }
+ if (x <= win->_maxx && isnac(line->text[x])) {
+ line->text[x] = _nc_render(win, blank);
+ ++end;
+ }
+ CHANGED_RANGE(line, start, end);
+
+ _nc_synchook(win);
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+waddnwstr(WINDOW *win, const wchar_t * str, int n)
+{
+ int code = ERR;
+
+ T((T_CALLED("waddnwstr(%p,%s,%d)"), win, _nc_viswbufn(str, n), n));
+
+ if (win && (str != 0)) {
+ TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(win->_attrs)));
+ code = OK;
+ if (n < 0)
+ n = (int) wcslen(str);
+
+ TR(TRACE_VIRTPUT, ("str is not null, length = %d", n));
+ while ((n-- > 0) && (*str != L('\0'))) {
+ NCURSES_CH_T ch;
+ TR(TRACE_VIRTPUT, ("*str[0] = %#lx", (unsigned long) *str));
+ SetChar(ch, *str++, A_NORMAL);
+ if (wadd_wch(win, &ch) == ERR) {
+ code = ERR;
+ break;
+ }
+ }
+ _nc_synchook(win);
+ }
+ TR(TRACE_VIRTPUT, ("waddnwstr returns %d", code));
+ returnCode(code);
+}
+
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_beep.c b/Build/source/libs/ncurses/ncurses/base/lib_beep.c
new file mode 100644
index 00000000000..c23d0a1d2ff
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_beep.c
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * beep.c
+ *
+ * The routine beep().
+ *
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* beep, flash */
+
+MODULE_ID("$Id: lib_beep.c,v 1.9 2000/12/10 02:43:26 tom Exp $")
+
+/*
+ * beep()
+ *
+ * Sound the current terminal's audible bell if it has one. If not,
+ * flash the screen if possible.
+ *
+ */
+
+NCURSES_EXPORT(int)
+beep(void)
+{
+ int res = ERR;
+
+ T((T_CALLED("beep()")));
+
+ /* FIXME: should make sure that we are not in altchar mode */
+ if (bell) {
+ TPUTS_TRACE("bell");
+ res = putp(bell);
+ _nc_flush();
+ } else if (flash_screen) {
+ TPUTS_TRACE("flash_screen");
+ res = putp(flash_screen);
+ _nc_flush();
+ }
+
+ returnCode(res);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_bkgd.c b/Build/source/libs/ncurses/ncurses/base/lib_bkgd.c
new file mode 100644
index 00000000000..3f3a2ac79bd
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_bkgd.c
@@ -0,0 +1,138 @@
+/****************************************************************************
+ * Copyright (c) 1998,2001-2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_bkgd.c,v 1.30 2003/07/05 16:46:49 tom Exp $")
+
+/*
+ * Set the window's background information.
+ */
+#if USE_WIDEC_SUPPORT
+NCURSES_EXPORT(void)
+#else
+static inline void
+#endif
+wbkgrndset(WINDOW *win, const ARG_CH_T ch)
+{
+ T((T_CALLED("wbkgdset(%p,%s)"), win, _tracech_t(ch)));
+
+ if (win) {
+ attr_t off = AttrOf(win->_nc_bkgd);
+ attr_t on = AttrOf(CHDEREF(ch));
+
+ toggle_attr_off(win->_attrs, off);
+ toggle_attr_on(win->_attrs, on);
+
+ if (CharOf(CHDEREF(ch)) == L('\0'))
+ SetChar(win->_nc_bkgd, BLANK_TEXT, AttrOf(CHDEREF(ch)));
+ else
+ win->_nc_bkgd = CHDEREF(ch);
+#if USE_WIDEC_SUPPORT
+ /*
+ * If we're compiled for wide-character support, _bkgrnd is the
+ * preferred location for the background information since it stores
+ * more than _bkgd. Update _bkgd each time we modify _bkgrnd, so the
+ * macro getbkgd() will work.
+ */
+ {
+ cchar_t wch;
+ int tmp;
+
+ wgetbkgrnd(win, &wch);
+ tmp = _nc_to_char(CharOf(wch));
+
+ win->_bkgd = ((tmp == EOF) ? ' ' : (chtype) tmp) | AttrOf(wch);
+ }
+#endif
+ }
+ returnVoid;
+}
+
+NCURSES_EXPORT(void)
+wbkgdset(WINDOW *win, chtype ch)
+{
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
+ wbkgrndset(win, CHREF(wch));
+}
+
+/*
+ * Set the window's background information and apply it to each cell.
+ */
+#if USE_WIDEC_SUPPORT
+NCURSES_EXPORT(int)
+#else
+static inline int
+#undef wbkgrnd
+#endif
+wbkgrnd(WINDOW *win, const ARG_CH_T ch)
+{
+ int code = ERR;
+ int x, y;
+ NCURSES_CH_T new_bkgd = CHDEREF(ch);
+
+ T((T_CALLED("wbkgd(%p,%s)"), win, _tracech_t(ch)));
+
+ if (win) {
+ NCURSES_CH_T old_bkgrnd;
+ wgetbkgrnd(win, &old_bkgrnd);
+
+ wbkgrndset(win, CHREF(new_bkgd));
+ wattrset(win, AttrOf(win->_nc_bkgd));
+
+ for (y = 0; y <= win->_maxy; y++) {
+ for (x = 0; x <= win->_maxx; x++) {
+ if (CharEq(win->_line[y].text[x], old_bkgrnd))
+ win->_line[y].text[x] = win->_nc_bkgd;
+ else {
+ NCURSES_CH_T wch = win->_line[y].text[x];
+ RemAttr(wch, (~A_ALTCHARSET));
+ win->_line[y].text[x] = _nc_render(win, wch);
+ }
+ }
+ }
+ touchwin(win);
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+wbkgd(WINDOW *win, chtype ch)
+{
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
+ return wbkgrnd(win, CHREF(wch));
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_box.c b/Build/source/libs/ncurses/ncurses/base/lib_box.c
new file mode 100644
index 00000000000..50f436592de
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_box.c
@@ -0,0 +1,126 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_box.c
+**
+** The routine wborder().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_box.c,v 1.21 2002/09/15 01:04:27 tom Exp $")
+
+#if USE_WIDEC_SUPPORT
+static inline chtype
+_my_render(WINDOW *win, chtype ch)
+{
+ NCURSES_CH_T wch;
+ SetChar2(wch, ch);
+ wch = _nc_render(win, wch);
+ return CharOf(wch) | AttrOf(wch);
+}
+#define RENDER_WITH_DEFAULT(ch,def) w ## ch = _my_render(win, (ch == 0) ? def : ch)
+#else
+#define RENDER_WITH_DEFAULT(ch,def) w ## ch = _nc_render(win, (ch == 0) ? def : ch)
+#endif
+
+NCURSES_EXPORT(int)
+wborder(WINDOW *win,
+ chtype ls, chtype rs,
+ chtype ts, chtype bs,
+ chtype tl, chtype tr,
+ chtype bl, chtype br)
+{
+ NCURSES_SIZE_T i;
+ NCURSES_SIZE_T endx, endy;
+ chtype wls, wrs, wts, wbs, wtl, wtr, wbl, wbr;
+
+ 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);
+
+ RENDER_WITH_DEFAULT(ls, ACS_VLINE);
+ RENDER_WITH_DEFAULT(rs, ACS_VLINE);
+ RENDER_WITH_DEFAULT(ts, ACS_HLINE);
+ RENDER_WITH_DEFAULT(bs, ACS_HLINE);
+ RENDER_WITH_DEFAULT(tl, ACS_ULCORNER);
+ RENDER_WITH_DEFAULT(tr, ACS_URCORNER);
+ RENDER_WITH_DEFAULT(bl, ACS_LLCORNER);
+ RENDER_WITH_DEFAULT(br, ACS_LRCORNER);
+
+ T(("using %s, %s, %s, %s, %s, %s, %s, %s",
+ _tracechtype2(1, wls),
+ _tracechtype2(2, wrs),
+ _tracechtype2(3, wts),
+ _tracechtype2(4, wbs),
+ _tracechtype2(5, wtl),
+ _tracechtype2(6, wtr),
+ _tracechtype2(7, wbl),
+ _tracechtype2(8, wbr)));
+
+ endx = win->_maxx;
+ endy = win->_maxy;
+
+ for (i = 0; i <= endx; i++) {
+ SetChar2(win->_line[0].text[i], wts);
+ SetChar2(win->_line[endy].text[i], wbs);
+ }
+ win->_line[endy].firstchar = win->_line[0].firstchar = 0;
+ win->_line[endy].lastchar = win->_line[0].lastchar = endx;
+
+ for (i = 0; i <= endy; i++) {
+ SetChar2(win->_line[i].text[0], wls);
+ SetChar2(win->_line[i].text[endx], wrs);
+ win->_line[i].firstchar = 0;
+ win->_line[i].lastchar = endx;
+ }
+ SetChar2(win->_line[0].text[0], wtl);
+ SetChar2(win->_line[0].text[endx], wtr);
+ SetChar2(win->_line[endy].text[0], wbl);
+ SetChar2(win->_line[endy].text[endx], wbr);
+
+ _nc_synchook(win);
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_chgat.c b/Build/source/libs/ncurses/ncurses/base/lib_chgat.c
new file mode 100644
index 00000000000..54e66ed1ffa
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_chgat.c
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_chgat.c
+**
+** The routine wchgat().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_chgat.c,v 1.5 2001/06/03 00:05:02 skimo Exp $")
+
+NCURSES_EXPORT(int)
+wchgat
+(WINDOW *win, int n, attr_t attr, short color, const void *opts GCC_UNUSED)
+{
+ int i;
+
+ T((T_CALLED("wchgat(%p,%d,%s,%d)"), win, n, _traceattr(attr), color));
+
+ if (win) {
+ toggle_attr_on(attr, COLOR_PAIR(color));
+
+ for (i = win->_curx; i <= win->_maxx && (n == -1 || (n-- > 0)); i++)
+ SetAttr(win->_line[win->_cury].text[i], attr);
+
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_clear.c b/Build/source/libs/ncurses/ncurses/base/lib_clear.c
new file mode 100644
index 00000000000..e0b4edf9e22
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_clear.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_clear.c
+**
+** The routine wclear().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_clear.c,v 1.7 2000/12/10 02:43:26 tom Exp $")
+
+NCURSES_EXPORT(int)
+wclear(WINDOW *win)
+{
+ int code = ERR;
+
+ T((T_CALLED("wclear(%p)"), win));
+
+ if ((code = werase(win)) != ERR)
+ win->_clear = TRUE;
+
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_clearok.c b/Build/source/libs/ncurses/ncurses/base/lib_clearok.c
new file mode 100644
index 00000000000..9b56bd1ec63
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_clearok.c
@@ -0,0 +1,55 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_clearok.c
+**
+** The routine clearok.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_clearok.c,v 1.4 2000/12/10 02:43:26 tom Exp $")
+
+NCURSES_EXPORT(int)
+clearok(WINDOW *win, bool flag)
+{
+ T((T_CALLED("clearok(%p,%d)"), win, flag));
+
+ if (win) {
+ win->_clear = flag;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_clrbot.c b/Build/source/libs/ncurses/ncurses/base/lib_clrbot.c
new file mode 100644
index 00000000000..bc12960e48f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_clrbot.c
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_clrbot.c
+**
+** The routine wclrtobot().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_clrbot.c,v 1.19 2001/12/19 01:05:59 tom Exp $")
+
+NCURSES_EXPORT(int)
+wclrtobot(WINDOW *win)
+{
+ int code = ERR;
+
+ T((T_CALLED("wclrtobot(%p)"), win));
+
+ if (win) {
+ NCURSES_SIZE_T y;
+ NCURSES_SIZE_T startx = win->_curx;
+ NCURSES_CH_T blank = win->_nc_bkgd;
+
+ 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]);
+ NCURSES_CH_T *ptr = &(line->text[startx]);
+ NCURSES_CH_T *end = &(line->text[win->_maxx]);
+
+ CHANGED_TO_EOL(line, startx, win->_maxx);
+
+ while (ptr <= end)
+ *ptr++ = blank;
+
+ startx = 0;
+ }
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_clreol.c b/Build/source/libs/ncurses/ncurses/base/lib_clreol.c
new file mode 100644
index 00000000000..c46ebd93a33
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_clreol.c
@@ -0,0 +1,91 @@
+/****************************************************************************
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_clreol.c
+**
+** The routine wclrtoeol().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_clreol.c,v 1.21 2001/12/19 01:06:04 tom Exp $")
+
+NCURSES_EXPORT(int)
+wclrtoeol(WINDOW *win)
+{
+ int code = ERR;
+
+ T((T_CALLED("wclrtoeol(%p)"), win));
+
+ if (win) {
+ NCURSES_CH_T blank;
+ NCURSES_CH_T *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) != 0
+ && 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) != 0
+ || y > win->_maxy
+ || x > win->_maxx)
+ returnCode(ERR);
+
+ blank = win->_nc_bkgd;
+ line = &win->_line[y];
+ CHANGED_TO_EOL(line, x, win->_maxx);
+
+ ptr = &(line->text[x]);
+ end = &(line->text[win->_maxx]);
+
+ while (ptr <= end)
+ *ptr++ = blank;
+
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_color.c b/Build/source/libs/ncurses/ncurses/base/lib_color.c
new file mode 100644
index 00000000000..e4abf1b3725
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_color.c
@@ -0,0 +1,535 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/* lib_color.c
+ *
+ * Handles color emulation of SYS V curses
+ */
+
+#include <curses.priv.h>
+
+#include <term.h>
+#include <tic.h>
+
+MODULE_ID("$Id: lib_color.c,v 1.64 2004/09/25 22:49:16 tom Exp $")
+
+/*
+ * These should be screen structure members. They need to be globals for
+ * historical reasons. So we assign them in start_color() and also in
+ * set_term()'s screen-switching logic.
+ */
+NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0;
+NCURSES_EXPORT_VAR(int) COLORS = 0;
+
+#define DATA(r,g,b) {r,g,b, 0,0,0, 0}
+
+#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
+
+/*
+ * Given a RGB range of 0..1000, we'll normally set the individual values
+ * to about 2/3 of the maximum, leaving full-range for bold/bright colors.
+ */
+#define RGB_ON 680
+#define RGB_OFF 0
+/* *INDENT-OFF* */
+static const color_t cga_palette[] =
+{
+ /* R G B */
+ DATA(RGB_OFF, RGB_OFF, RGB_OFF), /* COLOR_BLACK */
+ DATA(RGB_ON, RGB_OFF, RGB_OFF), /* COLOR_RED */
+ DATA(RGB_OFF, RGB_ON, RGB_OFF), /* COLOR_GREEN */
+ DATA(RGB_ON, RGB_ON, RGB_OFF), /* COLOR_YELLOW */
+ DATA(RGB_OFF, RGB_OFF, RGB_ON), /* COLOR_BLUE */
+ DATA(RGB_ON, RGB_OFF, RGB_ON), /* COLOR_MAGENTA */
+ DATA(RGB_OFF, RGB_ON, RGB_ON), /* COLOR_CYAN */
+ DATA(RGB_ON, RGB_ON, RGB_ON), /* COLOR_WHITE */
+};
+
+static const color_t hls_palette[] =
+{
+ /* H L S */
+ DATA( 0, 0, 0), /* COLOR_BLACK */
+ DATA( 120, 50, 100), /* COLOR_RED */
+ DATA( 240, 50, 100), /* COLOR_GREEN */
+ DATA( 180, 50, 100), /* COLOR_YELLOW */
+ DATA( 330, 50, 100), /* COLOR_BLUE */
+ DATA( 60, 50, 100), /* COLOR_MAGENTA */
+ DATA( 300, 50, 100), /* COLOR_CYAN */
+ DATA( 0, 50, 100), /* COLOR_WHITE */
+};
+/* *INDENT-ON* */
+
+#if 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)
+{
+ if (c < 16) {
+ static const int table[] =
+ {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))
+{
+ 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))
+{
+ 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 void
+init_color_table(void)
+{
+ const color_t *tp;
+ int n;
+
+ 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;
+ }
+ }
+ }
+}
+
+/*
+ * Reset the color pair, e.g., to whatever color pair 0 is.
+ */
+static bool
+reset_color_pair(void)
+{
+ bool result = FALSE;
+
+ if (orig_pair != 0) {
+ TPUTS_TRACE("orig_pair");
+ putp(orig_pair);
+ result = TRUE;
+ }
+ return result;
+}
+
+/*
+ * Reset color pairs and definitions. Actually we do both more to accommodate
+ * badly-written terminal descriptions than for the relatively rare case where
+ * someone has changed the color definitions.
+ */
+bool
+_nc_reset_colors(void)
+{
+ int result = FALSE;
+
+ T((T_CALLED("_nc_reset_colors()")));
+ if (SP->_color_defs > 0)
+ SP->_color_defs = -(SP->_color_defs);
+
+ if (reset_color_pair())
+ result = TRUE;
+ if (orig_colors != 0) {
+ TPUTS_TRACE("orig_colors");
+ putp(orig_colors);
+ result = TRUE;
+ }
+ returnBool(result);
+}
+
+NCURSES_EXPORT(int)
+start_color(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("start_color()")));
+
+ if (!SP->_coloron) {
+
+ if (reset_color_pair() != TRUE) {
+ set_foreground_color(default_fg(), _nc_outch);
+ set_background_color(default_bg(), _nc_outch);
+ }
+
+ if (max_pairs > 0 && max_colors > 0) {
+ COLOR_PAIRS = SP->_pair_count = max_pairs;
+ COLORS = SP->_color_count = max_colors;
+
+ if ((SP->_color_pairs = TYPE_CALLOC(unsigned short,
+ max_pairs)) != 0) {
+ if ((SP->_color_table = TYPE_CALLOC(color_t,
+ max_colors)) != 0) {
+ SP->_color_pairs[0] = PAIR_OF(default_fg(), default_bg());
+ init_color_table();
+
+ T(("started color: COLORS = %d, COLOR_PAIRS = %d",
+ COLORS, COLOR_PAIRS));
+
+ SP->_coloron = 1;
+ result = OK;
+ } else {
+ FreeAndNull(SP->_color_pairs);
+ }
+ }
+ }
+ }
+ returnCode(OK);
+}
+
+/* This function was originally written by Daniel Weaver <danw@znyx.com> */
+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;
+
+ /* calculate lightness */
+ *l = (min + max) / 20;
+
+ if (min == max) { /* black, white and all shades of gray */
+ *h = 0;
+ *s = 0;
+ return;
+ }
+
+ /* calculate saturation */
+ if (*l < 50)
+ *s = ((max - min) * 100) / (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
+ t = 360 + ((r - g) * 60) / (max - min);
+
+ *h = t % 360;
+}
+
+/*
+ * Extension (1997/1/18) - Allow negative f/b values to set default color
+ * values.
+ */
+NCURSES_EXPORT(int)
+init_pair(short pair, short f, short b)
+{
+ unsigned result;
+
+ T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b));
+
+ if ((pair < 0) || (pair >= COLOR_PAIRS))
+ returnCode(ERR);
+#if 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)
+ || (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 ((AttrOf(ptr->text[x]) & A_COLOR) == z) {
+ /* Set the old cell to zero to ensure it will be
+ updated on the next doupdate() */
+ SetChar(ptr->text[x], 0, 0);
+ CHANGED_CELL(ptr, x);
+ changed = TRUE;
+ }
+ }
+ if (changed)
+ _nc_make_oldhash(y);
+ }
+ }
+ 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);
+}
+
+#define okRGB(n) ((n) >= 0 && (n) <= 1000)
+
+NCURSES_EXPORT(int)
+init_color(short color, short r, short g, short b)
+{
+ int result = ERR;
+
+ T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b));
+
+ if (initialize_color != NULL
+ && (color >= 0 && color < COLORS)
+ && (okRGB(r) && okRGB(g) && okRGB(b))) {
+
+ SP->_color_table[color].init = 1;
+ SP->_color_table[color].r = r;
+ SP->_color_table[color].g = g;
+ SP->_color_table[color].b = b;
+
+ 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;
+ }
+
+ TPUTS_TRACE("initialize_color");
+ putp(tparm(initialize_color, color, r, g, b));
+ SP->_color_defs = max(color + 1, SP->_color_defs);
+ result = OK;
+ }
+ returnCode(result);
+}
+
+NCURSES_EXPORT(bool)
+can_change_color(void)
+{
+ T((T_CALLED("can_change_color()")));
+ returnCode((can_change != 0) ? TRUE : FALSE);
+}
+
+NCURSES_EXPORT(bool)
+has_colors(void)
+{
+ 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);
+}
+
+NCURSES_EXPORT(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;
+ T(("...color_content(%d,%d,%d,%d)", color, *r, *g, *b));
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+pair_content(short pair, short *f, short *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);
+
+ T(("...pair_content(%d,%d,%d)", pair, *f, *b));
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(void)
+_nc_do_color(int old_pair, int pair, bool reverse, int (*outc) (int))
+{
+ NCURSES_COLOR_T fg = C_MASK, bg = C_MASK;
+ NCURSES_COLOR_T old_fg, old_bg;
+
+ 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);
+ return;
+ } else if (SP != 0) {
+ pair_content(pair, &fg, &bg);
+ }
+ }
+
+ if (old_pair >= 0
+ && SP != 0
+ && pair_content(old_pair, &old_fg, &old_bg) != ERR) {
+ if ((fg == C_MASK && old_fg != C_MASK)
+ || (bg == C_MASK && old_bg != C_MASK)) {
+#if 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
+ reset_color_pair();
+ }
+ } else {
+ reset_color_pair();
+ if (old_pair < 0)
+ return;
+ }
+
+#if 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;
+ }
+
+ TR(TRACE_ATTRS, ("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/Build/source/libs/ncurses/ncurses/base/lib_colorset.c b/Build/source/libs/ncurses/ncurses/base/lib_colorset.c
new file mode 100644
index 00000000000..cd3f7f6638d
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_colorset.c
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Juergen Pfeifer, 1998 *
+ ****************************************************************************/
+
+/*
+** lib_colorset.c
+**
+** The routine wcolor_set().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_colorset.c,v 1.10 2003/12/07 00:15:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+wcolor_set(WINDOW *win, short color_pair_number, void *opts)
+{
+ T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
+ if (win
+ && !opts
+ && (color_pair_number >= 0)
+ && (color_pair_number < COLOR_PAIRS)) {
+ TR(TRACE_ATTRS, ("... current %ld", (long) PAIR_NUMBER(win->_attrs)));
+ win->_attrs &= ALL_BUT_COLOR;
+ win->_attrs |= COLOR_PAIR(color_pair_number);
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_delch.c b/Build/source/libs/ncurses/ncurses/base/lib_delch.c
new file mode 100644
index 00000000000..0c30f2d93c1
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_delch.c
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_delch.c
+**
+** The routine wdelch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_delch.c,v 1.12 2001/12/19 01:06:09 tom Exp $")
+
+NCURSES_EXPORT(int)
+wdelch(WINDOW *win)
+{
+ int code = ERR;
+
+ T((T_CALLED("wdelch(%p)"), win));
+
+ if (win) {
+ NCURSES_CH_T blank = win->_nc_bkgd;
+ struct ldat *line = &(win->_line[win->_cury]);
+ NCURSES_CH_T *end = &(line->text[win->_maxx]);
+ NCURSES_CH_T *temp2 = &(line->text[win->_curx + 1]);
+ NCURSES_CH_T *temp1 = temp2 - 1;
+
+ CHANGED_TO_EOL(line, win->_curx, win->_maxx);
+ while (temp1 < end)
+ *temp1++ = *temp2++;
+
+ *temp1 = blank;
+
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_delwin.c b/Build/source/libs/ncurses/ncurses/base/lib_delwin.c
new file mode 100644
index 00000000000..89d8e7c32ec
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_delwin.c
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_delwin.c
+**
+** The routine delwin().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_delwin.c,v 1.13 2001/08/26 00:40:20 tom Exp $")
+
+static bool
+cannot_delete(WINDOW *win)
+{
+ WINDOWLIST *p;
+ bool result = TRUE;
+
+ for (p = _nc_windows; p != 0; p = p->next) {
+ if (&(p->win) == win) {
+ result = FALSE;
+ } else if ((p->win._flags & _SUBWIN) != 0
+ && p->win._parent == win) {
+ result = TRUE;
+ break;
+ }
+ }
+ return result;
+}
+
+NCURSES_EXPORT(int)
+delwin(WINDOW *win)
+{
+ T((T_CALLED("delwin(%p)"), win));
+
+ if (win == 0
+ || cannot_delete(win))
+ returnCode(ERR);
+
+ if (win->_flags & _SUBWIN)
+ touchwin(win->_parent);
+ else if (curscr != 0)
+ touchwin(curscr);
+
+ returnCode(_nc_freewin(win));
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_dft_fgbg.c b/Build/source/libs/ncurses/ncurses/base/lib_dft_fgbg.c
new file mode 100644
index 00000000000..24705c9615e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_dft_fgbg.c
@@ -0,0 +1,71 @@
+/****************************************************************************
+ * 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"), 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 <dickey@clark.net> 1997,1999 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.15 2000/12/10 02:43:27 tom Exp $")
+
+/*
+ * Modify the behavior of color-pair 0 so that the library doesn't assume that
+ * it is white on black. This is an extension to XSI curses.
+ */
+NCURSES_EXPORT(int)
+use_default_colors(void)
+{
+ T((T_CALLED("use_default_colors()")));
+ returnCode(assume_default_colors(C_MASK, C_MASK));
+}
+
+/*
+ * Modify the behavior of color-pair 0 so that the library assumes that it
+ * is something specific, possibly not white on black.
+ */
+NCURSES_EXPORT(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 (initialize_pair) /* don't know how to handle this */
+ returnCode(ERR);
+
+ 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/Build/source/libs/ncurses/ncurses/base/lib_echo.c b/Build/source/libs/ncurses/ncurses/base/lib_echo.c
new file mode 100644
index 00000000000..df44713d1a1
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_echo.c
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * echo.c
+ *
+ * Routines:
+ * echo()
+ * noecho()
+ *
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_echo.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+echo(void)
+{
+ T((T_CALLED("echo()")));
+ SP->_echo = TRUE;
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+noecho(void)
+{
+ T((T_CALLED("noecho()")));
+ SP->_echo = FALSE;
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_endwin.c b/Build/source/libs/ncurses/ncurses/base/lib_endwin.c
new file mode 100644
index 00000000000..66662871962
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_endwin.c
@@ -0,0 +1,60 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_endwin.c
+**
+** The routine endwin().
+**
+*/
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_endwin.c,v 1.19 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+endwin(void)
+{
+ T((T_CALLED("endwin()")));
+
+ if (SP) {
+ SP->_endwin = TRUE;
+ SP->_mouse_wrap(SP);
+ _nc_screen_wrap();
+ _nc_mvcur_wrap(); /* wrap up cursor addressing */
+ returnCode(reset_shell_mode());
+ }
+
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_erase.c b/Build/source/libs/ncurses/ncurses/base/lib_erase.c
new file mode 100644
index 00000000000..5e397312ffe
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_erase.c
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_erase.c
+**
+** The routine werase().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_erase.c,v 1.15 2001/12/19 01:06:13 tom Exp $")
+
+NCURSES_EXPORT(int)
+werase(WINDOW *win)
+{
+ int code = ERR;
+ int y;
+ NCURSES_CH_T blank;
+ NCURSES_CH_T *sp, *end, *start;
+
+ T((T_CALLED("werase(%p)"), win));
+
+ if (win) {
+ blank = win->_nc_bkgd;
+ for (y = 0; y <= win->_maxy; y++) {
+ start = win->_line[y].text;
+ end = &start[win->_maxx];
+
+ for (sp = start; sp <= end; sp++)
+ *sp = blank;
+
+ win->_line[y].firstchar = 0;
+ win->_line[y].lastchar = win->_maxx;
+ }
+ win->_curx = win->_cury = 0;
+ win->_flags &= ~_WRAPPED;
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_flash.c b/Build/source/libs/ncurses/ncurses/base/lib_flash.c
new file mode 100644
index 00000000000..a6b022a8e81
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_flash.c
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * flash.c
+ *
+ * The routine flash().
+ *
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* beep, flash */
+
+MODULE_ID("$Id: lib_flash.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
+
+/*
+ * flash()
+ *
+ * Flash the current terminal's screen if possible. If not,
+ * sound the audible bell if one exists.
+ *
+ */
+
+NCURSES_EXPORT(int)
+flash(void)
+{
+ int res = ERR;
+
+ T((T_CALLED("flash()")));
+
+ /* FIXME: should make sure that we are not in altchar mode */
+ if (flash_screen) {
+ TPUTS_TRACE("flash_screen");
+ res = putp(flash_screen);
+ _nc_flush();
+ } else if (bell) {
+ TPUTS_TRACE("bell");
+ res = putp(bell);
+ _nc_flush();
+ }
+
+ returnCode(res);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_freeall.c b/Build/source/libs/ncurses/ncurses/base/lib_freeall.c
new file mode 100644
index 00000000000..78f38203755
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_freeall.c
@@ -0,0 +1,129 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1996,1997 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term_entry.h>
+#include <tic.h>
+
+#if HAVE_NC_FREEALL
+
+#if HAVE_LIBDBMALLOC
+extern int malloc_errfd; /* FIXME */
+#endif
+
+MODULE_ID("$Id: lib_freeall.c,v 1.29 2004/05/16 15:49:05 tom Exp $")
+
+/*
+ * Free all ncurses data. This is used for testing only (there's no practical
+ * use for it as an extension).
+ */
+NCURSES_EXPORT(void)
+_nc_freeall(void)
+{
+ WINDOWLIST *p, *q;
+ char *s;
+
+ T((T_CALLED("_nc_freeall()")));
+#if NO_LEAKS
+ _nc_free_tparm();
+ FreeAndNull(_nc_oldnums);
+#endif
+ if (SP != 0) {
+ while (_nc_windows != 0) {
+ /* 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;
+ }
+ }
+ }
+ delscreen(SP);
+ }
+
+ del_curterm(cur_term);
+ _nc_free_entries(_nc_head);
+ _nc_get_type(0);
+ _nc_first_name(0);
+#if USE_WIDEC_SUPPORT
+ FreeIfNeeded(_nc_wacs);
+#endif
+
+ if ((s = _nc_home_terminfo()) != 0)
+ free(s);
+
+ (void) _nc_printf_string(0, 0);
+#ifdef TRACE
+ (void) _nc_trace_buf(-1, 0);
+#endif
+
+#if HAVE_LIBDBMALLOC
+ malloc_dump(malloc_errfd);
+#elif HAVE_LIBDMALLOC
+#elif HAVE_PURIFY
+ purify_all_inuse();
+#endif
+ returnVoid;
+}
+
+NCURSES_EXPORT(void)
+_nc_free_and_exit(int code)
+{
+ char *last_setbuf = (SP != 0) ? SP->_setbuf : 0;
+
+ _nc_freeall();
+#ifdef TRACE
+ trace(0); /* close trace file, freeing its setbuf */
+ free(_nc_varargs("?", 0));
+#endif
+ fclose(stdout);
+ FreeIfNeeded(last_setbuf);
+ exit(code);
+}
+
+#else
+NCURSES_EXPORT(void)
+_nc_freeall(void)
+{
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_getch.c b/Build/source/libs/ncurses/ncurses/base/lib_getch.c
new file mode 100644
index 00000000000..84700cc7a1b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_getch.c
@@ -0,0 +1,575 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_getch.c
+**
+** The routine getch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_getch.c,v 1.71 2003/05/17 23:49:28 tom Exp $")
+
+#include <fifo_defs.h>
+
+NCURSES_EXPORT_VAR(int)
+ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
+
+#ifdef NCURSES_WGETCH_EVENTS
+#define TWAIT_MASK 7
+#else
+#define TWAIT_MASK 3
+#endif
+
+/*
+ * Check for mouse activity, returning nonzero if we find any.
+ */
+static int
+check_mouse_activity(int delay EVENTLIST_2nd(_nc_eventlist * evl))
+{
+ int rc;
+
+#if USE_SYSMOUSE
+ if ((SP->_mouse_type == M_SYSMOUSE)
+ && (SP->_sysmouse_head < SP->_sysmouse_tail)) {
+ return 2;
+ }
+#endif
+ rc = _nc_timed_wait(TWAIT_MASK, delay, (int *) 0 EVENTLIST_2nd(evl));
+#if USE_SYSMOUSE
+ if ((SP->_mouse_type == M_SYSMOUSE)
+ && (SP->_sysmouse_head < SP->_sysmouse_tail)
+ && (rc == 0)
+ && (errno == EINTR)) {
+ rc |= 2;
+ }
+#endif
+ return rc;
+}
+
+static inline int
+fifo_peek(void)
+{
+ int ch = SP->_fifo[peek];
+ TR(TRACE_IEVENT, ("peeking at %d", peek));
+
+ p_inc();
+ return ch;
+}
+
+static inline int
+fifo_pull(void)
+{
+ int ch;
+ ch = SP->_fifo[head];
+ TR(TRACE_IEVENT, ("pulling %s from %d", _tracechar(ch), head));
+
+ if (peek == head) {
+ h_inc();
+ peek = head;
+ } else
+ h_inc();
+
+#ifdef TRACE
+ if (_nc_tracing & TRACE_IEVENT)
+ _nc_fifo_dump();
+#endif
+ return ch;
+}
+
+static inline int
+fifo_push(EVENTLIST_0th(_nc_eventlist * evl))
+{
+ int n;
+ int ch = 0;
+ int mask = 0;
+
+ (void) mask;
+ if (tail == -1)
+ return ERR;
+
+#ifdef HIDE_EINTR
+ again:
+ errno = 0;
+#endif
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if (evl
+#if USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE
+ || (SP->_mouse_fd >= 0)
+#endif
+ ) {
+ mask = check_mouse_activity(-1 EVENTLIST_2nd(evl));
+ } else
+ mask = 0;
+
+ if (mask & 4) {
+ T(("fifo_push: ungetch KEY_EVENT"));
+ ungetch(KEY_EVENT);
+ return KEY_EVENT;
+ }
+#elif USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE
+ if (SP->_mouse_fd >= 0) {
+ mask = check_mouse_activity(-1 EVENTLIST_2nd(evl));
+ }
+#endif
+
+#if USE_GPM_SUPPORT || USE_EMX_MOUSE
+ if ((SP->_mouse_fd >= 0) && (mask & 2)) {
+ SP->_mouse_event(SP);
+ ch = KEY_MOUSE;
+ n = 1;
+ } else
+#endif
+#if USE_SYSMOUSE
+ if ((SP->_mouse_type == M_SYSMOUSE)
+ && (SP->_sysmouse_head < SP->_sysmouse_tail)) {
+ SP->_mouse_event(SP);
+ ch = KEY_MOUSE;
+ n = 1;
+ } else if ((SP->_mouse_type == M_SYSMOUSE)
+ && (mask <= 0) && errno == EINTR) {
+ SP->_mouse_event(SP);
+ ch = KEY_MOUSE;
+ n = 1;
+ } else
+#endif
+ { /* Can block... */
+ unsigned char c2 = 0;
+ n = read(SP->_ifd, &c2, 1);
+ ch = c2;
+ }
+
+#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;
+#endif
+
+ if ((n == -1) || (n == 0)) {
+ TR(TRACE_IEVENT, ("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno));
+ ch = ERR;
+ }
+ TR(TRACE_IEVENT, ("read %d characters", n));
+
+ SP->_fifo[tail] = ch;
+ SP->_fifohold = 0;
+ if (head == -1)
+ head = peek = tail;
+ t_inc();
+ TR(TRACE_IEVENT, ("pushed %s at %d", _tracechar(ch), tail));
+#ifdef TRACE
+ if (_nc_tracing & TRACE_IEVENT)
+ _nc_fifo_dump();
+#endif
+ return ch;
+}
+
+static inline void
+fifo_clear(void)
+{
+ memset(SP->_fifo, 0, sizeof(SP->_fifo));
+ head = -1;
+ tail = peek = 0;
+}
+
+static int kgetch(EVENTLIST_0th(_nc_eventlist * evl));
+
+#define wgetch_should_refresh(win) (\
+ (is_wintouched(win) || (win->_flags & _HASMOVED)) \
+ && !(win->_flags & _ISPAD))
+
+NCURSES_EXPORT(int)
+_nc_wgetch(WINDOW *win,
+ unsigned long *result,
+ int use_meta
+ EVENTLIST_2nd(_nc_eventlist * evl))
+{
+ int ch;
+#ifdef NCURSES_WGETCH_EVENTS
+ long event_delay = -1;
+#endif
+
+ T((T_CALLED("_nc_wgetch(%p)"), win));
+
+ *result = 0;
+ if (!win)
+ returnCode(ERR);
+
+ if (cooked_key_in_fifo()) {
+ if (wgetch_should_refresh(win))
+ wrefresh(win);
+
+ *result = fifo_pull();
+ returnCode(OK);
+ }
+#ifdef NCURSES_WGETCH_EVENTS
+ if (evl && (evl->count == 0))
+ evl = NULL;
+ event_delay = _nc_eventlist_timeout(evl);
+#endif
+
+ /*
+ * 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->_notty &&
+ !SP->_raw &&
+ !SP->_cbreak &&
+ !SP->_called_wgetch) {
+ char buf[MAXCOLUMNS], *sp;
+ int rc;
+
+ TR(TRACE_IEVENT, ("filling queue in cooked mode"));
+
+ SP->_called_wgetch = TRUE;
+ rc = wgetnstr(win, buf, MAXCOLUMNS);
+ SP->_called_wgetch = FALSE;
+
+ /* ungetch in reverse order */
+#ifdef NCURSES_WGETCH_EVENTS
+ if (rc != KEY_EVENT)
+#endif
+ ungetch('\n');
+ for (sp = buf + strlen(buf); sp > buf; sp--)
+ ungetch(sp[-1]);
+
+#ifdef NCURSES_WGETCH_EVENTS
+ /* Return it first */
+ if (rc == KEY_EVENT) {
+ *result = rc;
+ returnCode(OK);
+ }
+#endif
+
+ *result = fifo_pull();
+ returnCode(OK);
+ }
+
+ if (win->_use_keypad != SP->_keypad_on)
+ _nc_keypad(win->_use_keypad);
+
+ if (wgetch_should_refresh(win))
+ wrefresh(win);
+
+ if (!win->_notimeout && (win->_delay >= 0 || SP->_cbreak > 1)) {
+ int delay;
+
+ TR(TRACE_IEVENT, ("timed delay in wgetch()"));
+ if (SP->_cbreak > 1)
+ delay = (SP->_cbreak - 1) * 100;
+ else
+ delay = win->_delay;
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if (event_delay >= 0 && delay > event_delay)
+ delay = event_delay;
+#endif
+
+ TR(TRACE_IEVENT, ("delay is %d milliseconds", delay));
+
+ if (head == -1) { /* fifo is empty */
+ int rc = check_mouse_activity(delay EVENTLIST_2nd(evl));
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if (rc & 4) {
+ *result = KEY_EVENT;
+ returnCode(OK);
+ }
+#endif
+ if (!rc)
+ 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;
+ int rc;
+
+ do {
+ ch = kgetch(EVENTLIST_1st(evl));
+ if (ch == KEY_MOUSE) {
+ ++runcount;
+ if (SP->_mouse_inline(SP))
+ break;
+ }
+ if (SP->_maxclick < 0)
+ break;
+ } while
+ (ch == KEY_MOUSE
+ && (((rc = check_mouse_activity(SP->_maxclick
+ EVENTLIST_2nd(evl))) != 0
+ && !(rc & 4))
+ || !SP->_mouse_parse(runcount)));
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((rc & 4) && !ch == KEY_EVENT) {
+ ungetch(ch);
+ ch = KEY_EVENT;
+ }
+#endif
+ if (runcount > 0 && ch != KEY_MOUSE) {
+#ifdef NCURSES_WGETCH_EVENTS
+ /* mouse event sequence ended by an event, report event */
+ if (ch == KEY_EVENT) {
+ ungetch(KEY_MOUSE); /* FIXME This interrupts a gesture... */
+ } else
+#endif
+ {
+ /* mouse event sequence ended by keystroke, store keystroke */
+ ungetch(ch);
+ ch = KEY_MOUSE;
+ }
+ }
+ } else {
+ if (head == -1)
+ fifo_push(EVENTLIST_1st(evl));
+ ch = fifo_pull();
+ }
+
+ if (ch == ERR) {
+#if USE_SIZECHANGE
+ if (SP->_sig_winch) {
+ _nc_update_screensize();
+ /* resizeterm can push KEY_RESIZE */
+ if (cooked_key_in_fifo()) {
+ *result = fifo_pull();
+ returnCode(*result >= KEY_MIN ? KEY_CODE_YES : OK);
+ }
+ }
+#endif
+ 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 (!use_meta)
+ if ((ch < KEY_MIN) && (ch & 0x80))
+ ch &= 0x7f;
+
+ T(("wgetch returning : %s", _tracechar(ch)));
+
+ *result = ch;
+ returnCode(ch >= KEY_MIN ? KEY_CODE_YES : OK);
+}
+
+#ifdef NCURSES_WGETCH_EVENTS
+NCURSES_EXPORT(int)
+wgetch_events(WINDOW *win, _nc_eventlist * evl)
+{
+ int code;
+ unsigned long value;
+
+ T((T_CALLED("wgetch_events(%p,%p)"), win, evl));
+ code = _nc_wgetch(win,
+ &value,
+ SP->_use_meta
+ EVENTLIST_2nd(evl));
+ if (code != ERR)
+ code = value;
+ returnCode(code);
+}
+#endif
+
+NCURSES_EXPORT(int)
+wgetch(WINDOW *win)
+{
+ int code;
+ unsigned long value;
+
+ T((T_CALLED("wgetch(%p)"), win));
+ code = _nc_wgetch(win,
+ &value,
+ SP->_use_meta
+ EVENTLIST_2nd((_nc_eventlist *) 0));
+ if (code != ERR)
+ code = value;
+ returnCode(code);
+}
+
+/*
+** int
+** kgetch()
+**
+** Get an input character, but take care of keypad sequences, returning
+** an appropriate code when one matches the input. After each character
+** is received, set an alarm call based on ESCDELAY. If no more of the
+** sequence is received by the time the alarm goes off, pass through
+** the sequence gotten so far.
+**
+** This function must be called when there are no cooked keys in queue.
+** (that is head==-1 || peek==head)
+**
+*/
+
+static int
+kgetch(EVENTLIST_0th(_nc_eventlist * evl))
+{
+ struct tries *ptr;
+ int ch = 0;
+ int timeleft = ESCDELAY;
+
+ TR(TRACE_IEVENT, ("kgetch() called"));
+
+ ptr = SP->_keytry;
+
+ for (;;) {
+ if (cooked_key_in_fifo() && SP->_fifo[head] >= KEY_MIN) {
+ break;
+ } else if (!raw_key_in_fifo()) {
+ ch = fifo_push(EVENTLIST_1st(evl));
+ if (ch == ERR) {
+ peek = head; /* the keys stay uninterpreted */
+ return ERR;
+ }
+#ifdef NCURSES_WGETCH_EVENTS
+ else if (ch == KEY_EVENT) {
+ peek = head; /* the keys stay uninterpreted */
+ return fifo_pull(); /* Remove KEY_EVENT from the queue */
+ }
+#endif
+ }
+
+ ch = fifo_peek();
+ if (ch >= KEY_MIN) {
+ /* If not first in queue, somebody put this key there on purpose in
+ * emergency. Consider it higher priority than the unfinished
+ * keysequence we are parsing.
+ */
+ peek = head;
+ /* assume the key is the last in fifo */
+ t_dec(); /* remove the key */
+ return ch;
+ }
+
+ TR(TRACE_IEVENT, ("ch: %s", _tracechar((unsigned char) ch)));
+ while ((ptr != NULL) && (ptr->ch != (unsigned char) ch))
+ ptr = ptr->sibling;
+
+ if (ptr == NULL) {
+ TR(TRACE_IEVENT, ("ptr is null"));
+ break;
+ }
+ TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d",
+ ptr, ptr->ch, ptr->value));
+
+ 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()) {
+ int rc;
+
+ TR(TRACE_IEVENT, ("waiting for rest of sequence"));
+ rc = check_mouse_activity(timeleft EVENTLIST_2nd(evl));
+#ifdef NCURSES_WGETCH_EVENTS
+ if (rc & 4) {
+ TR(TRACE_IEVENT, ("interrupted by a user event"));
+ /* FIXME Should have preserved remainder timeleft for reusal... */
+ peek = head; /* Restart interpreting later */
+ return KEY_EVENT;
+ }
+#endif
+ if (!rc) {
+ TR(TRACE_IEVENT, ("ran out of time"));
+ break;
+ }
+ }
+ }
+ ch = fifo_pull();
+ peek = head;
+ return ch;
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_getstr.c b/Build/source/libs/ncurses/ncurses/base/lib_getstr.c
new file mode 100644
index 00000000000..76170382449
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_getstr.c
@@ -0,0 +1,215 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_getstr.c
+**
+** The routine wgetstr().
+**
+*/
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_getstr.c,v 1.24 2002/09/01 17:31:12 tom Exp $")
+
+/*
+ * This wipes out the last character, no matter whether it was a tab, control
+ * or other character, and handles reverse wraparound.
+ */
+static char *
+WipeOut(WINDOW *win, int y, int x, char *first, char *last, bool echoed)
+{
+ if (last > first) {
+ *--last = '\0';
+ if (echoed) {
+ int y1 = win->_cury;
+ int x1 = win->_curx;
+
+ wmove(win, y, x);
+ waddstr(win, first);
+ getyx(win, y, x);
+ while (win->_cury < y1
+ || (win->_cury == y1 && win->_curx < x1))
+ waddch(win, (chtype) ' ');
+
+ wmove(win, y, x);
+ }
+ }
+ return last;
+}
+
+NCURSES_EXPORT(int)
+wgetnstr_events(WINDOW *win,
+ char *str,
+ int maxlen,
+ EVENTLIST_1st(_nc_eventlist * evl))
+{
+ TTY buf;
+ bool oldnl, oldecho, oldraw, oldcbreak;
+ char erasec;
+ char killc;
+ char *oldstr;
+ int ch;
+ int y, x;
+
+ T((T_CALLED("wgetnstr(%p,%p, %d)"), win, str, maxlen));
+
+ if (!win)
+ returnCode(ERR);
+
+ _nc_get_tty_mode(&buf);
+
+ oldnl = SP->_nl;
+ oldecho = SP->_echo;
+ oldraw = SP->_raw;
+ oldcbreak = SP->_cbreak;
+ nl();
+ noecho();
+ noraw();
+ cbreak();
+
+ erasec = erasechar();
+ killc = killchar();
+
+ oldstr = str;
+ getyx(win, y, x);
+
+ if (is_wintouched(win) || (win->_flags & _HASMOVED))
+ wrefresh(win);
+
+ while ((ch = wgetch_events(win, evl)) != ERR) {
+ /*
+ * Some terminals (the Wyse-50 is the most common) generate
+ * a \n from the down-arrow key. With this logic, it's the
+ * user's choice whether to set kcud=\n for wgetch();
+ * terminating *getstr() with \n should work either way.
+ */
+ if (ch == '\n'
+ || ch == '\r'
+ || ch == KEY_DOWN
+ || ch == KEY_ENTER) {
+ if (oldecho == TRUE
+ && win->_cury == win->_maxy
+ && win->_scroll)
+ wechochar(win, (chtype) '\n');
+ break;
+ }
+#ifdef KEY_EVENT
+ if (ch == KEY_EVENT)
+ break;
+#endif
+ if (ch == erasec || ch == KEY_LEFT || ch == KEY_BACKSPACE) {
+ if (str > oldstr) {
+ str = WipeOut(win, y, x, oldstr, str, oldecho);
+ }
+ } else if (ch == killc) {
+ while (str > oldstr) {
+ str = WipeOut(win, y, x, oldstr, str, oldecho);
+ }
+ } else if (ch >= KEY_MIN
+ || (maxlen >= 0 && str - oldstr >= maxlen)) {
+ beep();
+ } else {
+ *str++ = ch;
+ if (oldecho == TRUE) {
+ int oldy = win->_cury;
+ if (waddch(win, (chtype) ch) == ERR) {
+ /*
+ * We can't really use the lower-right
+ * corner for input, since it'll mess
+ * up bookkeeping for erases.
+ */
+ win->_flags &= ~_WRAPPED;
+ waddch(win, (chtype) ' ');
+ str = WipeOut(win, y, x, oldstr, str, oldecho);
+ continue;
+ } else if (win->_flags & _WRAPPED) {
+ /*
+ * If the last waddch forced a wrap &
+ * scroll, adjust our reference point
+ * for erasures.
+ */
+ if (win->_scroll
+ && oldy == win->_maxy
+ && win->_cury == win->_maxy) {
+ if (--y <= 0) {
+ y = 0;
+ }
+ }
+ win->_flags &= ~_WRAPPED;
+ }
+ wrefresh(win);
+ }
+ }
+ }
+
+ win->_curx = 0;
+ win->_flags &= ~_WRAPPED;
+ if (win->_cury < win->_maxy)
+ win->_cury++;
+ wrefresh(win);
+
+ /* Restore with a single I/O call, to fix minor asymmetry between
+ * raw/noraw, etc.
+ */
+ SP->_nl = oldnl;
+ SP->_echo = oldecho;
+ SP->_raw = oldraw;
+ SP->_cbreak = oldcbreak;
+
+ _nc_set_tty_mode(&buf);
+
+ *str = '\0';
+ if (ch == ERR)
+ returnCode(ch);
+#ifdef KEY_EVENT
+ if (ch == KEY_EVENT)
+ returnCode(ch);
+#endif
+
+ T(("wgetnstr returns %s", _nc_visbuf(oldstr)));
+
+ returnCode(OK);
+}
+
+#ifdef NCURSES_WGETCH_EVENTS
+NCURSES_EXPORT(int)
+wgetnstr(WINDOW *win, char *str, int maxlen)
+{
+ returnCode(wgetnstr_events(win,
+ str,
+ maxlen,
+ EVENTLIST_1st((_nc_eventlist *) 0)));
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_hline.c b/Build/source/libs/ncurses/ncurses/base/lib_hline.c
new file mode 100644
index 00000000000..2cb6cc5ce6f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_hline.c
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_hline.c
+**
+** The routine whline().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_hline.c,v 1.10 2001/06/03 00:39:24 skimo Exp $")
+
+NCURSES_EXPORT(int)
+whline(WINDOW *win, chtype ch, int n)
+{
+ int code = ERR;
+ NCURSES_SIZE_T start;
+ NCURSES_SIZE_T end;
+
+ T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
+
+ if (win) {
+ struct ldat *line = &(win->_line[win->_cury]);
+ NCURSES_CH_T wch;
+
+ start = win->_curx;
+ end = start + n - 1;
+ if (end > win->_maxx)
+ end = win->_maxx;
+
+ CHANGED_RANGE(line, start, end);
+
+ if (ch == 0)
+ SetChar(wch, ChCharOf(ACS_HLINE), ChAttrOf(ACS_HLINE));
+ else
+ SetChar(wch, ChCharOf(ch), ChAttrOf(ch));
+ wch = _nc_render(win, wch);
+
+ while (end >= start) {
+ line->text[end] = wch;
+ end--;
+ }
+
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_immedok.c b/Build/source/libs/ncurses/ncurses/base/lib_immedok.c
new file mode 100644
index 00000000000..87988b66f1a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_immedok.c
@@ -0,0 +1,54 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_immedok.c
+**
+** The routine immedok.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_immedok.c,v 1.4 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(void)
+immedok(WINDOW *win, bool flag)
+{
+ T((T_CALLED("immedok(%p,%d)"), win, flag));
+
+ if (win)
+ win->_immed = flag;
+
+ returnVoid;
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_inchstr.c b/Build/source/libs/ncurses/ncurses/base/lib_inchstr.c
new file mode 100644
index 00000000000..6ff01687826
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_inchstr.c
@@ -0,0 +1,64 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_inchstr.c
+**
+** The routine winchnstr().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_inchstr.c,v 1.10 2001/06/02 23:37:58 skimo Exp $")
+
+NCURSES_EXPORT(int)
+winchnstr(WINDOW *win, chtype * str, int n)
+{
+ int i = 0;
+
+ T((T_CALLED("winchnstr(%p,%p,%d)"), win, str, n));
+
+ if (!str)
+ returnCode(0);
+
+ if (win) {
+ for (; (n < 0 || (i < n)) && (win->_curx + i <= win->_maxx); i++)
+ str[i] =
+ CharOf(win->_line[win->_cury].text[win->_curx + i]) |
+ AttrOf(win->_line[win->_cury].text[win->_curx + i]);
+ }
+ str[i] = (chtype) 0;
+
+ returnCode(i);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_initscr.c b/Build/source/libs/ncurses/ncurses/base/lib_initscr.c
new file mode 100644
index 00000000000..d8ac5c6ce3f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_initscr.c
@@ -0,0 +1,97 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2003 *
+ ****************************************************************************/
+
+/*
+** lib_initscr.c
+**
+** The routines initscr(), and termname().
+**
+*/
+
+#include <curses.priv.h>
+
+#if HAVE_SYS_TERMIO_H
+#include <sys/termio.h> /* needed for ISC */
+#endif
+
+MODULE_ID("$Id: lib_initscr.c,v 1.33 2003/12/27 19:13:51 tom Exp $")
+
+NCURSES_EXPORT(WINDOW *)
+initscr(void)
+{
+ static bool initialized = FALSE;
+ NCURSES_CONST char *name;
+ int value;
+
+ START_TRACE();
+ T((T_CALLED("initscr()")));
+ /* Portable applications must not call initscr() more than once */
+ if (!initialized) {
+ initialized = TRUE;
+
+ if ((name = getenv("TERM")) == 0
+ || *name == '\0')
+ name = "unknown";
+#ifdef __CYGWIN__
+ /*
+ * 2002/9/21
+ * Work around a bug in Cygwin. Full-screen subprocesses run from
+ * bash, in turn spawned from another full-screen process, will dump
+ * core when attempting to write to stdout. Opening /dev/tty
+ * explicitly seems to fix the problem.
+ */
+ if (isatty(fileno(stdout))) {
+ FILE *fp = fopen("/dev/tty", "w");
+ if (fp != 0 && isatty(fileno(fp))) {
+ fclose(stdout);
+ dup2(fileno(fp), STDOUT_FILENO);
+ stdout = fdopen(STDOUT_FILENO, "w");
+ }
+ }
+#endif
+ if (newterm(name, stdout, stdin) == 0) {
+ fprintf(stderr, "Error opening terminal: %s.\n", name);
+ exit(EXIT_FAILURE);
+ }
+
+ /* allow user to set maximum escape delay from the environment */
+ if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
+ ESCDELAY = value;
+ }
+
+ /* def_shell_mode - done in newterm/_nc_setupscreen */
+ def_prog_mode();
+ }
+ returnWin(stdscr);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_insch.c b/Build/source/libs/ncurses/ncurses/base/lib_insch.c
new file mode 100644
index 00000000000..f20b987971a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_insch.c
@@ -0,0 +1,137 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Sven Verdoolaege *
+ * and: Thomas E. Dickey *
+ ****************************************************************************/
+
+/*
+** lib_insch.c
+**
+** The routine winsch().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_insch.c,v 1.21 2004/06/19 22:52:59 tom Exp $")
+
+/*
+ * Insert the given character, updating the current location to simplify
+ * inserting a string.
+ */
+void
+_nc_insert_ch(WINDOW *win, chtype ch)
+{
+ NCURSES_CH_T wch;
+ int count;
+ NCURSES_CONST char *s;
+
+ switch (ch) {
+ case '\t':
+ for (count = (TABSIZE - (win->_curx % TABSIZE)); count > 0; count--)
+ _nc_insert_ch(win, ' ');
+ break;
+ case '\n':
+ case '\r':
+ case '\b':
+ SetChar2(wch, ch);
+ _nc_waddch_nosync(win, wch);
+ break;
+ default:
+ if (
+#if USE_WIDEC_SUPPORT
+ WINDOW_EXT(win, addch_used) == 0 &&
+#endif
+ is8bits(ChCharOf(ch)) &&
+ isprint(ChCharOf(ch))) {
+ if (win->_curx <= win->_maxx) {
+ struct ldat *line = &(win->_line[win->_cury]);
+ NCURSES_CH_T *end = &(line->text[win->_curx]);
+ NCURSES_CH_T *temp1 = &(line->text[win->_maxx]);
+ NCURSES_CH_T *temp2 = temp1 - 1;
+
+ SetChar2(wch, ch);
+
+ CHANGED_TO_EOL(line, win->_curx, win->_maxx);
+ while (temp1 > end)
+ *temp1-- = *temp2--;
+
+ *temp1 = _nc_render(win, wch);
+
+ win->_curx++;
+ }
+ } else if (is8bits(ChCharOf(ch)) && iscntrl(ChCharOf(ch))) {
+ s = unctrl(ChCharOf(ch));
+ while (*s != '\0') {
+ _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
+ ++s;
+ }
+ }
+#if USE_WIDEC_SUPPORT
+ else {
+ /*
+ * Handle multibyte characters here
+ */
+ if (WINDOW_EXT(win, addch_used) == 0) {
+ _nc_insert_ch(win, ChAttrOf(ch) | ' ');
+ }
+ SetChar2(wch, ch);
+ _nc_waddch_nosync(win, wch);
+ }
+#endif
+ break;
+ }
+}
+
+NCURSES_EXPORT(int)
+winsch(WINDOW *win, chtype c)
+{
+ NCURSES_SIZE_T oy;
+ NCURSES_SIZE_T ox;
+ int code = ERR;
+
+ T((T_CALLED("winsch(%p, %s)"), win, _tracechtype(c)));
+
+ if (win != 0) {
+ oy = win->_cury;
+ ox = win->_curx;
+
+ _nc_insert_ch(win, c);
+
+ win->_curx = ox;
+ win->_cury = oy;
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_insdel.c b/Build/source/libs/ncurses/ncurses/base/lib_insdel.c
new file mode 100644
index 00000000000..342c6541f95
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_insdel.c
@@ -0,0 +1,63 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_insdel.c
+**
+** The routine winsdelln(win, n).
+** positive n insert n lines above current line
+** negative n delete n lines starting from current line
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_insdel.c,v 1.12 2003/07/26 22:40:06 tom Exp $")
+
+NCURSES_EXPORT(int)
+winsdelln(WINDOW *win, int n)
+{
+ int code = ERR;
+
+ T((T_CALLED("winsdelln(%p,%d)"), win, n));
+
+ if (win) {
+ if (n != 0) {
+ _nc_scroll_window(win, -n, win->_cury, win->_maxy,
+ win->_nc_bkgd);
+ _nc_synchook(win);
+ }
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_insnstr.c b/Build/source/libs/ncurses/ncurses/base/lib_insnstr.c
new file mode 100644
index 00000000000..b6ddfde3c52
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_insnstr.c
@@ -0,0 +1,68 @@
+/****************************************************************************
+ * Copyright (c) 2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey *
+ ****************************************************************************/
+
+/*
+** lib_insnstr.c
+**
+** The routine winsnstr().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_insnstr.c,v 1.1 2004/02/28 23:44:56 tom Exp $")
+
+NCURSES_EXPORT(int)
+winsnstr(WINDOW *win, const char *s, int n)
+{
+ int code = ERR;
+ NCURSES_SIZE_T oy;
+ NCURSES_SIZE_T ox;
+ const unsigned char *str = (const unsigned char *) s;
+ const unsigned char *cp;
+
+ T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbufn(s, n), n));
+
+ if (win != 0 && str != 0) {
+ oy = win->_cury;
+ ox = win->_curx;
+ for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
+ _nc_insert_ch(win, (chtype) UChar(*cp));
+ }
+ win->_curx = ox;
+ win->_cury = oy;
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_instr.c b/Build/source/libs/ncurses/ncurses/base/lib_instr.c
new file mode 100644
index 00000000000..157d2ec9b4f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_instr.c
@@ -0,0 +1,73 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_instr.c
+**
+** The routine winnstr().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_instr.c,v 1.12 2002/10/05 23:23:05 tom Exp $")
+
+NCURSES_EXPORT(int)
+winnstr(WINDOW *win, char *str, int n)
+{
+ int i = 0, row, col;
+
+ T((T_CALLED("winnstr(%p,%p,%d)"), win, str, n));
+
+ if (!str)
+ returnCode(0);
+
+ if (win) {
+ getyx(win, row, col);
+
+ if (n < 0)
+ n = win->_maxx - win->_curx + 1;
+
+ for (; i < n;) {
+ str[i++] = CharOf(win->_line[row].text[col]);
+ if (++col > win->_maxx) {
+ col = 0;
+ if (++row > win->_maxy)
+ break;
+ }
+ }
+ }
+ str[i] = '\0'; /* SVr4 does not seem to count the null */
+ T(("winnstr returns %s", _nc_visbuf(str)));
+ returnCode(i);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_isendwin.c b/Build/source/libs/ncurses/ncurses/base/lib_isendwin.c
new file mode 100644
index 00000000000..b337d97a94c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_isendwin.c
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_endwin.c
+**
+** The routine endwin().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_isendwin.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(bool)
+isendwin(void)
+{
+ if (SP == NULL)
+ return FALSE;
+ return SP->_endwin;
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_leaveok.c b/Build/source/libs/ncurses/ncurses/base/lib_leaveok.c
new file mode 100644
index 00000000000..17d095d0f8c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_leaveok.c
@@ -0,0 +1,55 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_leaveok.c
+**
+** The routine leaveok.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_leaveok.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+leaveok(WINDOW *win, bool flag)
+{
+ T((T_CALLED("leaveok(%p,%d)"), win, flag));
+
+ if (win) {
+ win->_leaveok = flag;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_mouse.c b/Build/source/libs/ncurses/ncurses/base/lib_mouse.c
new file mode 100644
index 00000000000..556d2b60792
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_mouse.c
@@ -0,0 +1,1296 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+ * This module is intended to encapsulate ncurses's interface to pointing
+ * devices.
+ *
+ * The first method used is xterm's internal mouse-tracking facility.
+ * The second is Alessandro Rubini's GPM server.
+ *
+ * Notes for implementors of new mouse-interface methods:
+ *
+ * The code is logically split into a lower level that accepts event reports
+ * in a device-dependent format and an upper level that parses mouse gestures
+ * and filters events. The mediating data structure is a circular queue of
+ * MEVENT structures.
+ *
+ * Functionally, the lower level's job is to pick up primitive events and
+ * put them on the circular queue. This can happen in one of two ways:
+ * either (a) _nc_mouse_event() detects a series of incoming mouse reports
+ * and queues them, or (b) code in lib_getch.c detects the kmous prefix in
+ * the keyboard input stream and calls _nc_mouse_inline to 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 MEVENTs) into
+ * a gesture (a high-level or composite MEVENT).
+ *
+ * Don't be too shy about adding new event types or modifiers, if you can find
+ * room for them in the 32-bit mask. The API is written so that users get
+ * feedback on which theoretical event types they won't see when they call
+ * mousemask. There's one bit per button (the RESERVED_EVENT bit) not being
+ * used yet, and a couple of bits open at the high end.
+ */
+
+#ifdef __EMX__
+# include <io.h>
+# define INCL_DOS
+# define INCL_VIO
+# define INCL_KBD
+# define INCL_MOU
+# define INCL_DOSPROCESS
+# include <os2.h> /* Need to include before the others */
+#endif
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_mouse.c,v 1.69 2004/10/09 17:50:31 tom Exp $")
+
+#include <term.h>
+#include <tic.h>
+
+#if USE_GPM_SUPPORT
+#ifndef LINT /* don't need this for llib-lncurses */
+#undef buttons /* term.h defines this, and gpm uses it! */
+#include <gpm.h>
+#include <linux/keyboard.h> /* defines KG_* macros */
+/* use dynamic loader to avoid linkage dependency */
+#include <dlfcn.h>
+#ifdef RTLD_NOW
+#define my_RTLD RTLD_NOW
+#else
+#ifdef RTLD_LAZY
+#define my_RTLD RTLD_LAZY
+#else
+make an error
+#endif
+#endif
+#endif
+#endif /* USE_GPM_SUPPORT */
+
+#if USE_SYSMOUSE
+#undef buttons /* symbol conflict in consio.h */
+#undef mouse_info /* symbol conflict in consio.h */
+#include <osreldate.h>
+#if (__FreeBSD_version >= 400017)
+#include <sys/consio.h>
+#include <sys/fbio.h>
+#else
+#include <machine/console.h>
+#endif
+#endif /* use_SYSMOUSE */
+
+#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
+
+#define MASK_RELEASE(x) ((001 << (6 * ((x) - 1))))
+#define MASK_PRESS(x) ((002 << (6 * ((x) - 1))))
+#define MASK_CLICK(x) ((004 << (6 * ((x) - 1))))
+#define MASK_DOUBLE_CLICK(x) ((010 << (6 * ((x) - 1))))
+#define MASK_TRIPLE_CLICK(x) ((020 << (6 * ((x) - 1))))
+#define MASK_RESERVED_EVENT(x) ((040 << (6 * ((x) - 1))))
+
+#define BUTTON_CLICKED (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED)
+#define BUTTON_PRESSED (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED)
+#define BUTTON_RELEASED (BUTTON1_RELEASED | BUTTON2_RELEASED | BUTTON3_RELEASED)
+
+#define INVALID_EVENT -1
+#define NORMAL_EVENT 0
+
+#if USE_GPM_SUPPORT
+#ifndef LINT
+static Gpm_Connect gpm_connect;
+static int (*my_Gpm_Open) (Gpm_Connect *, int);
+static int (*my_Gpm_GetEvent) (Gpm_Event *);
+static int *my_gpm_fd;
+#endif
+#endif
+
+static mmask_t eventmask; /* current event mask */
+
+static bool _nc_mouse_parse(int);
+static void _nc_mouse_resume(SCREEN *);
+static void _nc_mouse_wrap(SCREEN *);
+
+/* maintain a circular list of mouse events */
+
+/* The definition of the circular list size (EV_MAX), is in curses.priv.h, so
+ * 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 */
+
+#undef NEXT
+#define NEXT(ep) ((ep == events + EV_MAX - 1) ? events : ep + 1)
+
+#undef PREV
+#define PREV(ep) ((ep == events) ? events + EV_MAX - 1 : ep - 1)
+
+#ifdef TRACE
+static void
+_trace_slot(const char *tag)
+{
+ MEVENT *ep;
+
+ _tracef(tag);
+
+ for (ep = events; ep < events + EV_MAX; ep++)
+ _tracef("mouse event queue slot %ld = %s",
+ (long) (ep - events),
+ _tracemouse(ep));
+}
+#endif
+
+#if USE_EMX_MOUSE
+
+# define TOP_ROW 0
+# define LEFT_COL 0
+
+static int mouse_wfd;
+static int mouse_thread;
+static int mouse_activated;
+static char mouse_buttons[] =
+{0, 1, 3, 2};
+
+# define M_FD(sp) sp->_mouse_fd
+
+static void
+write_event(int down, int button, int x, int y)
+{
+ char buf[6];
+ unsigned long ignore;
+
+ strncpy(buf, key_mouse, 3); /* should be "\033[M" */
+ buf[3] = ' ' + (button - 1) + (down ? 0 : 0x40);
+ buf[4] = ' ' + x - LEFT_COL + 1;
+ buf[5] = ' ' + y - TOP_ROW + 1;
+ DosWrite(mouse_wfd, buf, 6, &ignore);
+}
+
+static void
+mouse_server(unsigned long ignored GCC_UNUSED)
+{
+ unsigned short fWait = MOU_WAIT;
+ /* NOPTRRECT mourt = { 0,0,24,79 }; */
+ MOUEVENTINFO mouev;
+ HMOU hmou;
+ unsigned short mask = MOUSE_BN1_DOWN | MOUSE_BN2_DOWN | MOUSE_BN3_DOWN;
+ int nbuttons = 3;
+ int oldstate = 0;
+ char err[80];
+ unsigned long rc;
+
+ /* open the handle for the mouse */
+ if (MouOpen(NULL, &hmou) == 0) {
+ rc = MouSetEventMask(&mask, hmou);
+ if (rc) { /* retry with 2 buttons */
+ mask = MOUSE_BN1_DOWN | MOUSE_BN2_DOWN;
+ rc = MouSetEventMask(&mask, hmou);
+ nbuttons = 2;
+ }
+ if (rc == 0 && MouDrawPtr(hmou) == 0) {
+ for (;;) {
+ /* sit and wait on the event queue */
+ rc = MouReadEventQue(&mouev, &fWait, hmou);
+ if (rc) {
+ sprintf(err, "Error reading mouse queue, rc=%lu.\r\n", rc);
+ break;
+ }
+ if (!mouse_activated)
+ goto finish;
+
+ /*
+ * OS/2 numbers a 3-button mouse inconsistently from other
+ * platforms:
+ * 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);
+ if ((mouev.fs ^ oldstate) & MOUSE_BN2_DOWN)
+ 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);
+
+ finish:
+ oldstate = mouev.fs;
+ }
+ } else
+ sprintf(err, "Error setting event mask, buttons=%d, rc=%lu.\r\n",
+ nbuttons, rc);
+
+ DosWrite(2, err, strlen(err), &rc);
+ MouClose(hmou);
+ }
+ DosExit(EXIT_THREAD, 0L);
+}
+
+static void
+server_state(const int state)
+{ /* It would be nice to implement pointer-off and stop looping... */
+ mouse_activated = state;
+}
+
+#endif /* USE_EMX_MOUSE */
+
+#if USE_SYSMOUSE
+static void
+handle_sysmouse(int sig GCC_UNUSED)
+{
+ struct mouse_info the_mouse;
+ MEVENT *work;
+
+ the_mouse.operation = MOUSE_GETINFO;
+ if (SP != 0
+ && SP->_mouse_fd >= 0
+ && SP->_sysmouse_tail < FIFO_SIZE
+ && ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse) != -1) {
+
+ if (SP->_sysmouse_head > SP->_sysmouse_tail) {
+ SP->_sysmouse_tail = 0;
+ SP->_sysmouse_head = 0;
+ }
+ work = &(SP->_sysmouse_fifo[SP->_sysmouse_tail]);
+ memset(work, 0, sizeof(*work));
+ work->id = NORMAL_EVENT; /* there's only one mouse... */
+
+ SP->_sysmouse_old_buttons = SP->_sysmouse_new_buttons;
+ SP->_sysmouse_new_buttons = the_mouse.u.data.buttons & 0x7;
+
+ if (SP->_sysmouse_new_buttons) {
+ if (SP->_sysmouse_new_buttons & 1)
+ work->bstate |= BUTTON1_PRESSED;
+ if (SP->_sysmouse_new_buttons & 2)
+ work->bstate |= BUTTON2_PRESSED;
+ if (SP->_sysmouse_new_buttons & 4)
+ work->bstate |= BUTTON3_PRESSED;
+ } else {
+ if (SP->_sysmouse_old_buttons & 1)
+ work->bstate |= BUTTON1_RELEASED;
+ if (SP->_sysmouse_old_buttons & 2)
+ work->bstate |= BUTTON2_RELEASED;
+ if (SP->_sysmouse_old_buttons & 4)
+ work->bstate |= BUTTON3_RELEASED;
+ }
+
+ /* for cosmetic bug in syscons.c on FreeBSD 3.[34] */
+ the_mouse.operation = MOUSE_HIDE;
+ ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse);
+ the_mouse.operation = MOUSE_SHOW;
+ ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse);
+
+ /*
+ * We're only interested if the button is pressed or released.
+ * FIXME: implement continuous event-tracking.
+ */
+ if (SP->_sysmouse_new_buttons != SP->_sysmouse_old_buttons) {
+ SP->_sysmouse_tail += 1;
+ }
+ work->x = the_mouse.u.data.x / SP->_sysmouse_char_width;
+ work->y = the_mouse.u.data.y / SP->_sysmouse_char_height;
+ }
+}
+#endif
+
+static int initialized;
+
+static void
+init_xterm_mouse(void)
+{
+ SP->_mouse_type = M_XTERM;
+ SP->_mouse_xtermcap = tigetstr("XM");
+ if (!VALID_STRING(SP->_mouse_xtermcap))
+ SP->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;";
+}
+
+#if !USE_EMX_MOUSE
+static void
+enable_xterm_mouse(int enable)
+{
+ putp(tparm(SP->_mouse_xtermcap, enable));
+}
+#endif /* !USE_EMX_MOUSE */
+
+static void
+initialize_mousetype(void)
+{
+ static const char *xterm_kmous = "\033[M";
+
+ /* Try gpm first, because gpm may be configured to run in xterm */
+#if USE_GPM_SUPPORT
+ /* GPM does printf's without checking if stdout is a terminal */
+ if (isatty(fileno(stdout))) {
+ static bool first = TRUE;
+ static bool found = FALSE;
+
+ if (first) {
+ void *obj;
+ first = FALSE;
+
+ if ((obj = dlopen("libgpm.so", my_RTLD)) != 0) {
+ if ((my_gpm_fd = dlsym(obj, "gpm_fd")) == 0 ||
+ (my_Gpm_Open = dlsym(obj, "Gpm_Open")) == 0 ||
+ (my_Gpm_GetEvent = dlsym(obj, "Gpm_GetEvent")) == 0) {
+ T(("GPM initialization failed: %s", dlerror()));
+ dlclose(obj);
+ } else {
+ found = TRUE;
+ }
+ }
+ }
+
+ if (found) {
+ /* 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 (my_Gpm_Open(&gpm_connect, 0) >= 0) { /* returns the file-descriptor */
+ SP->_mouse_type = M_GPM;
+ SP->_mouse_fd = *my_gpm_fd;
+ return;
+ }
+ }
+ }
+#endif
+
+ /* OS/2 VIO */
+#if USE_EMX_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");
+ return;
+ } else {
+ int rc;
+
+ if (!mouse_buttons[0]) {
+ char *s = getenv("MOUSE_BUTTONS_123");
+
+ mouse_buttons[0] = 1;
+ if (s && strlen(s) >= 3) {
+ mouse_buttons[1] = s[0] - '0';
+ mouse_buttons[2] = s[1] - '0';
+ mouse_buttons[3] = s[2] - '0';
+ }
+ }
+ mouse_wfd = handles[1];
+ M_FD(SP) = handles[0];
+ /* Needed? */
+ 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) {
+ printf("mouse thread error %d=%#x", rc, rc);
+ return;
+ } else {
+ SP->_mouse_type = M_XTERM;
+ return;
+ }
+ }
+ }
+#endif
+
+#if USE_SYSMOUSE
+ {
+ struct mouse_info the_mouse;
+ char *the_device = 0;
+
+ if (isatty(SP->_ifd))
+ the_device = ttyname(SP->_ifd);
+ if (the_device == 0)
+ the_device = "/dev/tty";
+
+ SP->_mouse_fd = open(the_device, O_RDWR);
+
+ if (SP->_mouse_fd >= 0) {
+ /*
+ * sysmouse does not have a usable user interface for obtaining
+ * mouse events. The logical way to proceed (reading data on a
+ * stream) only works if one opens the device as root. Even in
+ * that mode, careful examination shows we lose events
+ * occasionally. The interface provided for user programs is to
+ * establish a signal handler. really.
+ *
+ * Take over SIGUSR2 for this purpose since SIGUSR1 is more
+ * likely to be used by an application. getch() will have to
+ * handle the misleading EINTR's.
+ */
+ signal(SIGUSR2, SIG_IGN);
+ the_mouse.operation = MOUSE_MODE;
+ the_mouse.u.mode.mode = 0;
+ the_mouse.u.mode.signal = SIGUSR2;
+ if (ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse) != -1) {
+ signal(SIGUSR2, handle_sysmouse);
+ the_mouse.operation = MOUSE_SHOW;
+ ioctl(SP->_mouse_fd, CONS_MOUSECTL, &the_mouse);
+
+#if defined(FBIO_MODEINFO) || defined(CONS_MODEINFO) /* FreeBSD > 2.x */
+ {
+#ifndef FBIO_GETMODE /* FreeBSD 3.x */
+#define FBIO_GETMODE CONS_GET
+#define FBIO_MODEINFO CONS_MODEINFO
+#endif /* FBIO_GETMODE */
+ video_info_t the_video;
+
+ if (ioctl(SP->_mouse_fd,
+ FBIO_GETMODE,
+ &the_video.vi_mode) != -1
+ && ioctl(SP->_mouse_fd,
+ FBIO_MODEINFO,
+ &the_video) != -1) {
+ SP->_sysmouse_char_width = the_video.vi_cwidth;
+ SP->_sysmouse_char_height = the_video.vi_cheight;
+ }
+ }
+#endif /* defined(FBIO_MODEINFO) || defined(CONS_MODEINFO) */
+
+ if (SP->_sysmouse_char_width <= 0)
+ SP->_sysmouse_char_width = 8;
+ if (SP->_sysmouse_char_height <= 0)
+ SP->_sysmouse_char_height = 16;
+ SP->_mouse_type = M_SYSMOUSE;
+ return;
+ }
+ }
+ }
+#endif /* USE_SYSMOUSE */
+
+ /* we know how to recognize mouse events under "xterm" */
+ if (key_mouse != 0) {
+ if (!strcmp(key_mouse, xterm_kmous)) {
+ init_xterm_mouse();
+ return;
+ }
+ } else if (strstr(cur_term->type.term_names, "xterm") != 0) {
+ (void) _nc_add_to_try(&(SP->_keytry), xterm_kmous, KEY_MOUSE);
+ init_xterm_mouse();
+ 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", SP->_mouse_type));
+ }
+}
+
+/*
+ * Query to see if there is a pending mouse event. This is called from
+ * fifo_push() in lib_getch.c
+ */
+static bool
+_nc_mouse_event(SCREEN *sp GCC_UNUSED)
+{
+ bool result = FALSE;
+
+ switch (SP->_mouse_type) {
+ case M_XTERM:
+ /* xterm: never have to query, mouse events are in the keyboard stream */
+#if USE_EMX_MOUSE
+ {
+ char kbuf[3];
+
+ int i, res = read(M_FD(sp), &kbuf, 3); /* Eat the prefix */
+ if (res != 3)
+ printf("Got %d chars instead of 3 for prefix.\n", res);
+ for (i = 0; i < res; i++) {
+ if (kbuf[i] != key_mouse[i])
+ printf("Got char %d instead of %d for prefix.\n",
+ (int) kbuf[i], (int) key_mouse[i]);
+ }
+ result = TRUE;
+ }
+#endif /* USE_EMX_MOUSE */
+ break;
+
+#if USE_GPM_SUPPORT
+ case M_GPM:
+ {
+ /* query server for event, return TRUE if we find one */
+ Gpm_Event ev;
+
+ if (my_Gpm_GetEvent(&ev) == 1) {
+ /* there's only one mouse... */
+ eventp->id = NORMAL_EVENT;
+
+ eventp->bstate = 0;
+ switch (ev.type & 0x0f) {
+ case (GPM_DOWN):
+ if (ev.buttons & GPM_B_LEFT)
+ eventp->bstate |= BUTTON1_PRESSED;
+ if (ev.buttons & GPM_B_MIDDLE)
+ eventp->bstate |= BUTTON2_PRESSED;
+ if (ev.buttons & GPM_B_RIGHT)
+ eventp->bstate |= BUTTON3_PRESSED;
+ break;
+ case (GPM_UP):
+ if (ev.buttons & GPM_B_LEFT)
+ eventp->bstate |= BUTTON1_RELEASED;
+ if (ev.buttons & GPM_B_MIDDLE)
+ eventp->bstate |= BUTTON2_RELEASED;
+ if (ev.buttons & GPM_B_RIGHT)
+ eventp->bstate |= BUTTON3_RELEASED;
+ break;
+ default:
+ break;
+ }
+
+ eventp->x = ev.x - 1;
+ eventp->y = ev.y - 1;
+ eventp->z = 0;
+
+ /* bump the next-free pointer into the circular list */
+ eventp = NEXT(eventp);
+ result = TRUE;
+ }
+ }
+ break;
+#endif
+
+#if USE_SYSMOUSE
+ case M_SYSMOUSE:
+ if (SP->_sysmouse_head < SP->_sysmouse_tail) {
+ *eventp = SP->_sysmouse_fifo[SP->_sysmouse_head];
+
+ /*
+ * Point the fifo-head to the next possible location. If there
+ * are none, reset the indices. This may be interrupted by the
+ * signal handler, doing essentially the same reset.
+ */
+ SP->_sysmouse_head += 1;
+ if (SP->_sysmouse_head == SP->_sysmouse_tail) {
+ SP->_sysmouse_tail = 0;
+ SP->_sysmouse_head = 0;
+ }
+
+ /* bump the next-free pointer into the circular list */
+ eventp = NEXT(eventp);
+ result = TRUE;
+ }
+ break;
+#endif /* USE_SYSMOUSE */
+
+ case M_NONE:
+ break;
+ }
+
+ return result; /* true if we found an event */
+}
+
+static bool
+_nc_mouse_inline(SCREEN *sp)
+/* mouse report received in the keyboard stream -- parse its info */
+{
+ bool result = FALSE;
+
+ TR(MY_TRACE, ("_nc_mouse_inline() called"));
+
+ if (SP->_mouse_type == M_XTERM) {
+ unsigned char kbuf[4];
+ mmask_t 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
+ * Xterm Control Sequences reference. This is how we
+ * arrange for mouse events to be reported via a KEY_MOUSE
+ * return value from wgetch(). After this value is received,
+ * _nc_mouse_inline() gets called and is immediately
+ * responsible for parsing the mouse status information
+ * following the prefix.
+ *
+ * The following quotes from the ctrlseqs.ms document in the
+ * X distribution, describing the X mouse tracking feature:
+ *
+ * Parameters for all mouse tracking escape sequences
+ * generated by xterm encode numeric parameters in a single
+ * character as value+040. For example, ! is 1.
+ *
+ * On button press or release, xterm sends ESC [ M CbCxCy.
+ * The low two bits of Cb encode button information: 0=MB1
+ * pressed, 1=MB2 pressed, 2=MB3 pressed, 3=release. The
+ * upper bits encode what modifiers were down when the
+ * button was pressed and are added together. 4=Shift,
+ * 8=Meta, 16=Control. Cx and Cy are the x and y coordinates
+ * of the mouse event. The upper left corner is (1,1).
+ *
+ * (End quote) By the time we get here, we've eaten the
+ * key prefix. FYI, the loop below is necessary because
+ * mouse click info isn't guaranteed to present as a
+ * single clist item. It always does under Linux but often
+ * fails to under Solaris.
+ */
+ for (grabbed = 0; grabbed < 3; grabbed += res) {
+
+ /* For VIO mouse we add extra bit 64 to disambiguate button-up. */
+#if USE_EMX_MOUSE
+ res = read(M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3);
+#else
+ res = read(sp->_ifd, kbuf + grabbed, 3 - grabbed);
+#endif
+ if (res == -1)
+ break;
+ }
+ kbuf[3] = '\0';
+
+ TR(TRACE_IEVENT,
+ ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf));
+
+ /* there's only one mouse... */
+ eventp->id = NORMAL_EVENT;
+
+ /* processing code goes here */
+ eventp->bstate = 0;
+ prev = PREV(eventp)->bstate;
+
+#if USE_EMX_MOUSE
+#define PRESS_POSITION(n) \
+ eventp->bstate = MASK_PRESS(n); \
+ if (kbuf[0] & 0x40) \
+ eventp->bstate = MASK_RELEASE(n)
+#else
+#define PRESS_POSITION(n) \
+ eventp->bstate = (prev & MASK_PRESS(n) \
+ ? REPORT_MOUSE_POSITION \
+ : MASK_PRESS(n))
+#endif
+
+ switch (kbuf[0] & 0x3) {
+ case 0x0:
+ PRESS_POSITION(1);
+ break;
+
+ case 0x1:
+ PRESS_POSITION(2);
+ break;
+
+ case 0x2:
+ PRESS_POSITION(3);
+ break;
+
+ case 0x3:
+ /*
+ * Release events aren't reported for individual buttons, just for
+ * the button set as a whole. However, because there are normally
+ * no mouse events under xterm that intervene between press and
+ * release, we can infer the button actually released by looking at
+ * the previous event.
+ */
+ if (prev & (BUTTON_PRESSED | BUTTON_RELEASED)) {
+ eventp->bstate = BUTTON_RELEASED;
+ if (!(prev & BUTTON1_PRESSED))
+ eventp->bstate &= ~BUTTON1_RELEASED;
+ if (!(prev & BUTTON2_PRESSED))
+ eventp->bstate &= ~BUTTON2_RELEASED;
+ if (!(prev & BUTTON3_PRESSED))
+ eventp->bstate &= ~BUTTON3_RELEASED;
+ } else {
+ /*
+ * XFree86 xterm will return a stream of release-events to
+ * let the application know where the mouse is going, if the
+ * private mode 1002 or 1003 is enabled.
+ */
+ eventp->bstate = REPORT_MOUSE_POSITION;
+ }
+ break;
+ }
+ result = (eventp->bstate & REPORT_MOUSE_POSITION) ? TRUE : FALSE;
+
+ if (kbuf[0] & 4) {
+ eventp->bstate |= BUTTON_SHIFT;
+ }
+ if (kbuf[0] & 8) {
+ eventp->bstate |= BUTTON_ALT;
+ }
+ if (kbuf[0] & 16) {
+ eventp->bstate |= BUTTON_CTRL;
+ }
+
+ eventp->x = (kbuf[1] - ' ') - 1;
+ eventp->y = (kbuf[2] - ' ') - 1;
+ 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);
+#endif
+ }
+
+ return (result);
+}
+
+static void
+mouse_activate(bool on)
+{
+ if (!on && !initialized)
+ return;
+
+ _nc_mouse_init();
+
+ if (on) {
+
+ switch (SP->_mouse_type) {
+ case M_XTERM:
+#if NCURSES_EXT_FUNCS
+ keyok(KEY_MOUSE, on);
+#endif
+ TPUTS_TRACE("xterm mouse initialization");
+#if USE_EMX_MOUSE
+ server_state(1);
+#else
+ enable_xterm_mouse(1);
+#endif
+ break;
+#if USE_GPM_SUPPORT
+ case M_GPM:
+ SP->_mouse_fd = *my_gpm_fd;
+ break;
+#endif
+#if USE_SYSMOUSE
+ case M_SYSMOUSE:
+ signal(SIGUSR2, handle_sysmouse);
+ break;
+#endif
+ case M_NONE:
+ return;
+ }
+ /* Make runtime binding to cut down on object size of applications that
+ * do not use the mouse (e.g., 'clear').
+ */
+ SP->_mouse_event = _nc_mouse_event;
+ SP->_mouse_inline = _nc_mouse_inline;
+ SP->_mouse_parse = _nc_mouse_parse;
+ SP->_mouse_resume = _nc_mouse_resume;
+ SP->_mouse_wrap = _nc_mouse_wrap;
+
+ } else {
+
+ switch (SP->_mouse_type) {
+ case M_XTERM:
+ TPUTS_TRACE("xterm mouse deinitialization");
+#if USE_EMX_MOUSE
+ server_state(0);
+#else
+ enable_xterm_mouse(0);
+#endif
+ break;
+#if USE_GPM_SUPPORT
+ case M_GPM:
+ break;
+#endif
+#if USE_SYSMOUSE
+ case M_SYSMOUSE:
+ signal(SIGUSR2, SIG_IGN);
+ break;
+#endif
+ case M_NONE:
+ return;
+ }
+ }
+ _nc_flush();
+}
+
+/**************************************************************************
+ *
+ * Device-independent code
+ *
+ **************************************************************************/
+
+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;
+
+ TR(MY_TRACE, ("_nc_mouse_parse(%d) called", runcount));
+
+ /*
+ * When we enter this routine, the event list next-free pointer
+ * points just past a run of mouse events that we know were separated
+ * in time by less than the critical click interval. The job of this
+ * routine is to collapse this run into a single higher-level event
+ * or gesture.
+ *
+ * We accomplish this in two passes. The first pass merges press/release
+ * pairs into click events. The second merges runs of click events into
+ * double or triple-click events.
+ *
+ * It's possible that the run may not resolve to a single event (for
+ * example, if the user quadruple-clicks). If so, leading events
+ * in the run are ignored.
+ *
+ * Note that this routine is independent of the format of the specific
+ * format of the pointing-device's reports. We can use it to parse
+ * gestures on anything that reports press/release events on a per-
+ * 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)));
+ return (prev->id >= NORMAL_EVENT)
+ ? ((prev->bstate & eventmask) ? TRUE : FALSE)
+ : FALSE;
+ }
+
+ /* find the start of the run */
+ runp = eventp;
+ for (n = runcount; n > 0; n--) {
+ runp = PREV(runp);
+ }
+
+#ifdef TRACE
+ 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,
+ runcount);
+ }
+#endif /* TRACE */
+
+ /* first pass; merge press/release pairs */
+ do {
+ merge = FALSE;
+ for (ep = runp; (next = NEXT(ep)) != eventp; ep = next) {
+ if (ep->x == next->x && ep->y == next->y
+ && (ep->bstate & BUTTON_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_CLICKED;
+ merge = TRUE;
+ }
+ if ((eventmask & BUTTON2_CLICKED)
+ && (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_CLICKED;
+ merge = TRUE;
+ }
+ if (merge)
+ next->id = INVALID_EVENT;
+ }
+ }
+ } while
+ (merge);
+
+#ifdef TRACE
+ 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,
+ runcount);
+ }
+#endif /* TRACE */
+
+ /*
+ * Second pass; merge click runs. At this point, click events are
+ * each followed by one invalid event. We merge click events
+ * forward in the queue.
+ *
+ * NOTE: There is a problem with this design! If the application
+ * allows enough click events to pile up in the circular queue so
+ * they wrap around, it will cheerfully merge the newest forward
+ * into the oldest, creating a bogus doubleclick and confusing
+ * the queue-traversal logic rather badly. Generally this won't
+ * happen, because calling getmouse() marks old events invalid and
+ * ineligible for merges. The true solution to this problem would
+ * be to timestamp each MEVENT and perform the obvious sanity check,
+ * but the timer element would have to have sub-second resolution,
+ * which would get us into portability trouble.
+ */
+ do {
+ MEVENT *follower;
+
+ merge = FALSE;
+ for (ep = runp; (next = NEXT(ep)) != eventp; ep = next)
+ if (ep->id != INVALID_EVENT) {
+ if (next->id != INVALID_EVENT)
+ continue;
+ follower = NEXT(next);
+ if (follower->id == INVALID_EVENT)
+ continue;
+
+ /* merge click events forward */
+ if ((ep->bstate & BUTTON_CLICKED)
+ && (follower->bstate & BUTTON_CLICKED)) {
+ if ((eventmask & BUTTON1_DOUBLE_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_DOUBLE_CLICKED;
+ merge = TRUE;
+ }
+ if ((eventmask & BUTTON3_DOUBLE_CLICKED)
+ && (follower->bstate & BUTTON3_CLICKED)) {
+ follower->bstate &= ~BUTTON3_CLICKED;
+ follower->bstate |= BUTTON3_DOUBLE_CLICKED;
+ merge = TRUE;
+ }
+ if (merge)
+ ep->id = INVALID_EVENT;
+ }
+
+ /* merge double-click events forward */
+ if ((ep->bstate &
+ (BUTTON1_DOUBLE_CLICKED
+ | BUTTON2_DOUBLE_CLICKED
+ | BUTTON3_DOUBLE_CLICKED))
+ && (follower->bstate & BUTTON_CLICKED)) {
+ if ((eventmask & BUTTON1_TRIPLE_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_TRIPLE_CLICKED;
+ merge = TRUE;
+ }
+ if ((eventmask & BUTTON3_TRIPLE_CLICKED)
+ && (follower->bstate & BUTTON3_CLICKED)) {
+ follower->bstate &= ~BUTTON3_CLICKED;
+ follower->bstate |= BUTTON3_TRIPLE_CLICKED;
+ merge = TRUE;
+ }
+ if (merge)
+ ep->id = INVALID_EVENT;
+ }
+ }
+ } while
+ (merge);
+
+#ifdef TRACE
+ 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,
+ runcount);
+ }
+#endif /* TRACE */
+
+ /*
+ * Now try to throw away trailing events flagged invalid, or that
+ * don't match the current event mask.
+ */
+ for (; runcount; prev = PREV(eventp), runcount--)
+ if (prev->id == INVALID_EVENT || !(prev->bstate & eventmask)) {
+ eventp = prev;
+ }
+#ifdef TRACE
+ 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,
+ 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)));
+#endif /* TRACE */
+
+ /* after all this, do we have a valid event? */
+ return (PREV(eventp)->id != INVALID_EVENT);
+}
+
+static void
+_nc_mouse_wrap(SCREEN *sp GCC_UNUSED)
+/* release mouse -- called by endwin() before shellout/exit */
+{
+ TR(MY_TRACE, ("_nc_mouse_wrap() called"));
+
+ switch (SP->_mouse_type) {
+ case M_XTERM:
+ if (eventmask)
+ mouse_activate(FALSE);
+ break;
+#if USE_GPM_SUPPORT
+ /* GPM: pass all mouse events to next client */
+ case M_GPM:
+ break;
+#endif
+#if USE_SYSMOUSE
+ case M_SYSMOUSE:
+ mouse_activate(FALSE);
+ break;
+#endif
+ case M_NONE:
+ break;
+ }
+}
+
+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"));
+
+ switch (SP->_mouse_type) {
+ case M_XTERM:
+ /* xterm: re-enable reporting */
+ if (eventmask)
+ mouse_activate(TRUE);
+ break;
+
+#if USE_GPM_SUPPORT
+ case M_GPM:
+ /* GPM: reclaim our event set */
+ break;
+#endif
+
+#if USE_SYSMOUSE
+ case M_SYSMOUSE:
+ mouse_activate(TRUE);
+ break;
+#endif
+ case M_NONE:
+ break;
+ }
+}
+
+/**************************************************************************
+ *
+ * Mouse interface entry points for the API
+ *
+ **************************************************************************/
+
+NCURSES_EXPORT(int)
+getmouse(MEVENT * aevent)
+/* grab a copy of the current mouse event */
+{
+ T((T_CALLED("getmouse(%p)"), aevent));
+
+ if (aevent && (SP->_mouse_type != M_NONE)) {
+ /* compute the current-event pointer */
+ 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)));
+
+ prev->id = INVALID_EVENT; /* so the queue slot becomes free */
+ returnCode(OK);
+ }
+ returnCode(ERR);
+}
+
+NCURSES_EXPORT(int)
+ungetmouse(MEVENT * aevent)
+/* enqueue a synthesized mouse event to be seen by the next wgetch() */
+{
+ T((T_CALLED("ungetmouse(%p)"), aevent));
+
+ /* stick the given event in the next-free slot */
+ *eventp = *aevent;
+
+ /* bump the next-free pointer into the circular list */
+ eventp = NEXT(eventp);
+
+ /* push back the notification event on the keyboard queue */
+ returnCode(ungetch(KEY_MOUSE));
+}
+
+NCURSES_EXPORT(mmask_t)
+mousemask(mmask_t newmask, mmask_t * oldmask)
+/* set the mouse event mask */
+{
+ mmask_t result = 0;
+
+ T((T_CALLED("mousemask(%#lx,%p)"), newmask, oldmask));
+
+ if (oldmask)
+ *oldmask = eventmask;
+
+ if (!newmask && !initialized)
+ returnBits(0);
+
+ _nc_mouse_init();
+ if (SP->_mouse_type != M_NONE) {
+ eventmask = newmask &
+ (REPORT_MOUSE_POSITION | BUTTON_ALT | BUTTON_CTRL | BUTTON_SHIFT
+ | BUTTON_PRESSED
+ | BUTTON_RELEASED
+ | BUTTON_CLICKED
+ | BUTTON1_DOUBLE_CLICKED | BUTTON1_TRIPLE_CLICKED
+ | BUTTON2_DOUBLE_CLICKED | BUTTON2_TRIPLE_CLICKED
+ | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED);
+
+ mouse_activate(eventmask != 0);
+
+ result = eventmask;
+ }
+
+ returnBits(result);
+}
+
+NCURSES_EXPORT(bool)
+wenclose(const WINDOW *win, int y, int x)
+/* check to see if given window encloses given screen location */
+{
+ bool result = FALSE;
+
+ T((T_CALLED("wenclose(%p,%d,%d)"), win, y, x));
+
+ if (win != 0) {
+ y -= win->_yoffset;
+ result = ((win->_begy <= y &&
+ win->_begx <= x &&
+ (win->_begx + win->_maxx) >= x &&
+ (win->_begy + win->_maxy) >= y) ? TRUE : FALSE);
+ }
+ returnBool(result);
+}
+
+NCURSES_EXPORT(int)
+mouseinterval(int maxclick)
+/* set the maximum mouse interval within which to recognize a click */
+{
+ int oldval;
+
+ T((T_CALLED("mouseinterval(%d)"), maxclick));
+
+ if (SP != 0) {
+ oldval = SP->_maxclick;
+ if (maxclick >= 0)
+ SP->_maxclick = maxclick;
+ } else {
+ oldval = DEFAULT_MAXCLICK;
+ }
+
+ returnCode(oldval);
+}
+
+/* This may be used by other routines to ask for the existence of mouse
+ support */
+NCURSES_EXPORT(int)
+_nc_has_mouse(void)
+{
+ return (SP->_mouse_type == M_NONE ? 0 : 1);
+}
+
+NCURSES_EXPORT(bool)
+wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen)
+{
+ bool result = FALSE;
+
+ T((T_CALLED("wmouse_trafo(%p,%p,%p,%d)"), win, pY, pX, to_screen));
+
+ 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;
+ }
+ }
+ returnBool(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_move.c b/Build/source/libs/ncurses/ncurses/base/lib_move.c
new file mode 100644
index 00000000000..e917eb78052
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_move.c
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_move.c
+**
+** The routine wmove().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_move.c,v 1.11 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(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 = (NCURSES_SIZE_T) x;
+ win->_cury = (NCURSES_SIZE_T) y;
+
+ win->_flags &= ~_WRAPPED;
+ win->_flags |= _HASMOVED;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_mvwin.c b/Build/source/libs/ncurses/ncurses/base/lib_mvwin.c
new file mode 100644
index 00000000000..63d54ccda57
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_mvwin.c
@@ -0,0 +1,108 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_mvwin.c
+**
+** The routine mvwin().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_mvwin.c,v 1.12 2001/12/19 01:06:22 tom Exp $")
+
+NCURSES_EXPORT(int)
+mvwin(WINDOW *win, int by, int bx)
+{
+ T((T_CALLED("mvwin(%p,%d,%d)"), win, by, bx));
+
+ if (!win || (win->_flags & _ISPAD))
+ returnCode(ERR);
+
+ /* Copying subwindows is allowed, but it is expensive... */
+ if (win->_flags & _SUBWIN) {
+ int err = ERR;
+ WINDOW *parent = win->_parent;
+ if (parent) { /* Now comes the complicated and costly part, you should really
+ * try to avoid to move subwindows. Because a subwindow shares
+ * the text buffers with its parent, one can't do a simple
+ * memmove of the text buffers. One has to create a copy, then
+ * to relocate the subwindow and then to do a copy.
+ */
+ if ((by - parent->_begy == win->_pary) &&
+ (bx - parent->_begx == win->_parx))
+ err = OK; /* we don't actually move */
+ else {
+ WINDOW *clone = dupwin(win);
+ if (clone) {
+ /* now we have the clone, so relocate win */
+
+ werase(win); /* Erase the original place */
+ /* fill with parents background */
+ wbkgrnd(win, CHREF(parent->_nc_bkgd));
+ wsyncup(win); /* Tell the parent(s) */
+
+ err = mvderwin(win,
+ by - parent->_begy,
+ bx - parent->_begx);
+ if (err != ERR) {
+ err = copywin(clone, win,
+ 0, 0, 0, 0, win->_maxy, win->_maxx, 0);
+ if (ERR != err)
+ wsyncup(win);
+ }
+ if (ERR == delwin(clone))
+ err = ERR;
+ }
+ }
+ }
+ returnCode(err);
+ }
+
+ if (by + win->_maxy > screen_lines - 1
+ || bx + win->_maxx > screen_columns - 1
+ || by < 0
+ || bx < 0)
+ returnCode(ERR);
+
+ /*
+ * Whether or not the window is moved, touch the window's contents so
+ * that a following call to 'wrefresh()' will paint the window at the
+ * new location. This ensures that if the caller has refreshed another
+ * window at the same location, that this one will be displayed.
+ */
+ win->_begy = by;
+ win->_begx = bx;
+ returnCode(touchwin(win));
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_newterm.c b/Build/source/libs/ncurses/ncurses/base/lib_newterm.c
new file mode 100644
index 00000000000..ad7b122be8a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_newterm.c
@@ -0,0 +1,211 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+** lib_newterm.c
+**
+** The newterm() function.
+**
+*/
+
+#include <curses.priv.h>
+
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
+#define _POSIX_SOURCE
+#endif
+
+#include <term.h> /* clear_screen, cup & friends, cur_term */
+#include <tic.h>
+
+MODULE_ID("$Id: lib_newterm.c,v 1.58 2004/08/14 20:36:39 tom Exp $")
+
+#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
+#define ONLCR 0
+#endif
+
+/*
+ * SVr4/XSI Curses specify that hardware echo is turned off in initscr, and not
+ * restored during the curses session. The library simulates echo in software.
+ * (The behavior is unspecified if the application enables hardware echo).
+ *
+ * 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)
+{
+ int result = ERR;
+
+ /* for extended XPG4 conformance requires cbreak() at this point */
+ /* (SVr4 curses does this anyway) */
+ if (cbreak() == OK) {
+ TTY buf;
+
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag &= ~(ECHO | ECHONL);
+ buf.c_iflag &= ~(ICRNL | INLCR | IGNCR);
+ buf.c_oflag &= ~(ONLCR);
+#else
+ buf.sg_flags &= ~(ECHO | CRMOD);
+#endif
+ if ((result = _nc_set_tty_mode(&buf)) == OK)
+ cur_term->Nttyb = buf;
+ }
+ return result;
+}
+
+/*
+ * filter() has to be called before either initscr() or newterm(), so there is
+ * apparently no way to make this flag apply to some terminals and not others,
+ * aside from possibly delaying a filter() call until some terminals have been
+ * initialized.
+ */
+static int filter_mode = FALSE;
+
+NCURSES_EXPORT(void)
+filter(void)
+{
+ T((T_CALLED("filter")));
+ filter_mode = TRUE;
+ returnVoid;
+}
+
+NCURSES_EXPORT(SCREEN *)
+newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
+{
+ int errret;
+ int slk_format = _nc_slk_format;
+ SCREEN *current;
+
+ START_TRACE();
+ 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)
+ returnSP(0);
+
+ /* implement filter mode */
+ if (filter_mode) {
+ LINES = 1;
+
+ 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;
+ }
+
+ /* 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))
+ returnSP(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);
+ returnSP(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);
+ typeahead(fileno(ifp));
+#ifdef TERMIOS
+ SP->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 &&
+ !(cur_term->Ottyb.c_iflag & ISTRIP));
+#else
+ 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.
+ */
+#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);
+
+ /* compute movement costs so we can do better move optimization */
+ _nc_mvcur_init();
+
+ /* initialize terminal to a sane state */
+ _nc_screen_init();
+
+ /* Initialize the terminal line settings. */
+ _nc_initscr();
+
+ _nc_signal_handler(TRUE);
+
+#if USE_SIZECHANGE
+ /*
+ * Pretend we received a SIGWINCH, just in case we're starting up in a
+ * terminal that cannot initialize its size properly (Debian #265631).
+ */
+ SP->_sig_winch = TRUE;
+#endif
+
+ returnSP(SP);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_newwin.c b/Build/source/libs/ncurses/ncurses/base/lib_newwin.c
new file mode 100644
index 00000000000..f17264c65ef
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_newwin.c
@@ -0,0 +1,303 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_newwin.c
+**
+** The routines newwin(), subwin() and their dependent
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_newwin.c,v 1.35 2004/04/10 23:42:00 tom Exp $")
+
+static WINDOW *
+remove_window_from_screen(WINDOW *win)
+{
+ SCREEN **scan = &_nc_screen_chain;
+
+ while (*scan) {
+ SCREEN *sp = *scan;
+ if (sp->_curscr == win) {
+ sp->_curscr = 0;
+ if (win == curscr)
+ curscr = 0;
+ } else if (sp->_stdscr == win) {
+ sp->_stdscr = 0;
+ if (win == stdscr)
+ stdscr = 0;
+ } else if (sp->_newscr == win) {
+ sp->_newscr = 0;
+ if (win == newscr)
+ newscr = 0;
+ } else {
+ scan = &(*scan)->_next_screen;
+ continue;
+ }
+ break;
+ }
+
+ return 0;
+}
+
+NCURSES_EXPORT(int)
+_nc_freewin(WINDOW *win)
+{
+ WINDOWLIST *p, *q;
+ int i;
+ int result = ERR;
+
+ if (win != 0) {
+ for (p = _nc_windows, q = 0; p != 0; q = p, p = p->next) {
+ if (&(p->win) == win) {
+ remove_window_from_screen(win);
+ if (q == 0)
+ _nc_windows = p->next;
+ else
+ q->next = p->next;
+
+ if (!(win->_flags & _SUBWIN)) {
+ for (i = 0; i <= win->_maxy; i++)
+ FreeIfNeeded(win->_line[i].text);
+ }
+ free(win->_line);
+ free(p);
+
+ result = OK;
+ T(("...deleted win=%p", win));
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+NCURSES_EXPORT(WINDOW *)
+newwin(int num_lines, int num_columns, int begy, int begx)
+{
+ WINDOW *win;
+ NCURSES_CH_T *ptr;
+ int i;
+
+ 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 (num_lines == 0)
+ num_lines = SP->_lines_avail - begy;
+ if (num_columns == 0)
+ num_columns = screen_columns - begx;
+
+ if ((win = _nc_makenew(num_lines, num_columns, begy, begx, 0)) == 0)
+ returnWin(0);
+
+ for (i = 0; i < num_lines; i++) {
+ win->_line[i].text = typeCalloc(NCURSES_CH_T, (unsigned) num_columns);
+ if (win->_line[i].text == 0) {
+ (void) _nc_freewin(win);
+ returnWin(0);
+ }
+ for (ptr = win->_line[i].text;
+ ptr < win->_line[i].text + num_columns;
+ ptr++)
+ SetChar(*ptr, BLANK_TEXT, BLANK_ATTR);
+ }
+
+ returnWin(win);
+}
+
+NCURSES_EXPORT(WINDOW *)
+derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
+{
+ WINDOW *win;
+ int i;
+ int flags = _SUBWIN;
+
+ 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);
+
+ if (num_lines == 0)
+ num_lines = orig->_maxy + 1 - begy;
+
+ if (num_columns == 0)
+ num_columns = orig->_maxx + 1 - begx;
+
+ if (orig->_flags & _ISPAD)
+ flags |= _ISPAD;
+
+ 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->_nc_bkgd = orig->_nc_bkgd;
+
+ for (i = 0; i < num_lines; i++)
+ win->_line[i].text = &orig->_line[begy++].text[begx];
+
+ win->_parent = orig;
+
+ returnWin(win);
+}
+
+NCURSES_EXPORT(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));
+
+ 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);
+}
+
+NCURSES_EXPORT(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 (!dimension_limit(num_lines) || !dimension_limit(num_columns))
+ return 0;
+
+ if ((wp = typeCalloc(WINDOWLIST, 1)) == 0)
+ return 0;
+
+ win = &(wp->win);
+
+ 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;
+ SetChar(win->_nc_bkgd, BLANK_TEXT, BLANK_ATTR);
+
+ 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;
+ _nc_windows = wp;
+
+ T((T_CREATE("window %p"), win));
+
+ return (win);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_nl.c b/Build/source/libs/ncurses/ncurses/base/lib_nl.c
new file mode 100644
index 00000000000..32515da0be8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_nl.c
@@ -0,0 +1,79 @@
+/****************************************************************************
+ * 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"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * nl.c
+ *
+ * Routines:
+ * nl()
+ * nonl()
+ *
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_nl.c,v 1.8 2000/12/10 02:43:27 tom Exp $")
+
+#ifdef __EMX__
+#include <io.h>
+#endif
+
+NCURSES_EXPORT(int)
+nl(void)
+{
+ T((T_CALLED("nl()")));
+
+ SP->_nl = TRUE;
+
+#ifdef __EMX__
+ _nc_flush();
+ _fsetmode(NC_OUTPUT, "t");
+#endif
+
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+nonl(void)
+{
+ T((T_CALLED("nonl()")));
+
+ SP->_nl = FALSE;
+
+#ifdef __EMX__
+ _nc_flush();
+ _fsetmode(NC_OUTPUT, "b");
+#endif
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_overlay.c b/Build/source/libs/ncurses/ncurses/base/lib_overlay.c
new file mode 100644
index 00000000000..7840b45036e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_overlay.c
@@ -0,0 +1,184 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_overlay.c
+**
+** The routines overlay(), copywin(), and overwrite().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_overlay.c,v 1.21 2002/09/21 23:03:32 tom Exp $")
+
+static int
+overlap(const WINDOW *const s, WINDOW *const d, int const flag)
+{
+ int sx1, sy1, sx2, sy2;
+ int dx1, dy1, dx2, dy2;
+ int sminrow, smincol;
+ int dminrow, dmincol;
+ int dmaxrow, dmaxcol;
+
+ T((T_CALLED("overlap(%p,%p,%d)"), s, d, flag));
+
+ if (s == 0 || d == 0) {
+ returnCode(ERR);
+ } else {
+ T(("src : begy %d, begx %d, maxy %d, maxx %d",
+ s->_begy, s->_begx, s->_maxy, s->_maxx));
+ T(("dst : begy %d, begx %d, maxy %d, maxx %d",
+ d->_begy, d->_begx, d->_maxy, d->_maxx));
+
+ sx1 = s->_begx;
+ sy1 = s->_begy;
+ sx2 = sx1 + s->_maxx;
+ sy2 = sy1 + s->_maxy;
+
+ dx1 = d->_begx;
+ dy1 = d->_begy;
+ dx2 = dx1 + d->_maxx;
+ dy2 = dy1 + d->_maxy;
+
+ if (dx2 < sx1 || dx1 > sx2 || dy2 < sy1 || dy1 > sy2) {
+ returnCode(ERR); /* No intersection */
+ } else {
+ sminrow = max(sy1, dy1) - sy1;
+ smincol = max(sx1, dx1) - sx1;
+ dminrow = max(sy1, dy1) - dy1;
+ dmincol = max(sx1, dx1) - dx1;
+ dmaxrow = min(sy2, dy2) - dy1;
+ dmaxcol = min(sx2, dx2) - dx1;
+
+ returnCode(copywin(s, d,
+ sminrow, smincol,
+ dminrow, dmincol,
+ dmaxrow, dmaxcol,
+ flag));
+ }
+ }
+}
+
+/*
+**
+** overlay(win1, win2)
+**
+**
+** overlay() writes the overlapping area of win1 behind win2
+** on win2 non-destructively.
+**
+**/
+
+NCURSES_EXPORT(int)
+overlay(const WINDOW *win1, WINDOW *win2)
+{
+ T((T_CALLED("overlay(%p,%p)"), win1, win2));
+ returnCode(overlap(win1, win2, TRUE));
+}
+
+/*
+**
+** overwrite(win1, win2)
+**
+**
+** overwrite() writes the overlapping area of win1 behind win2
+** on win2 destructively.
+**
+**/
+
+NCURSES_EXPORT(int)
+overwrite(const WINDOW *win1, WINDOW *win2)
+{
+ T((T_CALLED("overwrite(%p,%p)"), win1, win2));
+ returnCode(overlap(win1, win2, FALSE));
+}
+
+NCURSES_EXPORT(int)
+copywin(const WINDOW *src, WINDOW *dst,
+ int sminrow, int smincol,
+ int dminrow, int dmincol,
+ int dmaxrow, int dmaxcol,
+ int over)
+{
+ int sx, sy, dx, dy;
+ bool touched;
+ attr_t bk = AttrOf(dst->_nc_bkgd);
+ attr_t mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0);
+
+ T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
+ src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
+
+ if (!src || !dst)
+ returnCode(ERR);
+
+ /* make sure rectangle exists in source */
+ if ((sminrow + dmaxrow - dminrow) > (src->_maxy + 1) ||
+ (smincol + dmaxcol - dmincol) > (src->_maxx + 1)) {
+ returnCode(ERR);
+ }
+
+ T(("rectangle exists in source"));
+
+ /* make sure rectangle fits in destination */
+ if (dmaxrow > dst->_maxy || dmaxcol > dst->_maxx) {
+ returnCode(ERR);
+ }
+
+ T(("rectangle fits in destination"));
+
+ for (dy = dminrow, sy = sminrow; dy <= dmaxrow; sy++, dy++) {
+ touched = FALSE;
+ for (dx = dmincol, sx = smincol; dx <= dmaxcol; sx++, dx++) {
+ if (over) {
+ if ((CharOf(src->_line[sy].text[sx]) != L(' ')) &&
+ (!CharEq(dst->_line[dy].text[dx], src->_line[sy].text[sx]))) {
+ dst->_line[dy].text[dx] = src->_line[sy].text[sx];
+ SetAttr(dst->_line[dy].text[dx],
+ (AttrOf(src->_line[sy].text[sx]) & mask) | bk);
+ touched = TRUE;
+ }
+ } else {
+ if (!CharEq(dst->_line[dy].text[dx], src->_line[sy].text[sx])) {
+ dst->_line[dy].text[dx] = src->_line[sy].text[sx];
+ touched = TRUE;
+ }
+ }
+ }
+ if (touched) {
+ touchline(dst, dminrow, (dmaxrow - dminrow + 1));
+ }
+ }
+ T(("finished copywin"));
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_pad.c b/Build/source/libs/ncurses/ncurses/base/lib_pad.c
new file mode 100644
index 00000000000..97b2d357acb
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_pad.c
@@ -0,0 +1,313 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_pad.c
+ * newpad -- create a new pad
+ * pnoutrefresh -- refresh a pad, no update
+ * pechochar -- add a char to a pad and refresh
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_pad.c,v 1.38 2002/08/03 23:29:26 Philippe.Blain Exp $")
+
+NCURSES_EXPORT(WINDOW *)
+newpad(int l, int c)
+{
+ WINDOW *win;
+ NCURSES_CH_T *ptr;
+ int i;
+
+ T((T_CALLED("newpad(%d, %d)"), l, c));
+
+ if (l <= 0 || c <= 0)
+ 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(NCURSES_CH_T, ((size_t) c))) == 0) {
+ (void) _nc_freewin(win);
+ returnWin(0);
+ }
+ for (ptr = win->_line[i].text; ptr < win->_line[i].text + c; ptr++)
+ SetChar(*ptr, BLANK_TEXT, BLANK_ATTR);
+ }
+
+ returnWin(win);
+}
+
+NCURSES_EXPORT(WINDOW *)
+subpad
+(WINDOW *orig, int l, int c, int begy, int begx)
+{
+ WINDOW *win = (WINDOW *) 0;
+
+ T((T_CALLED("subpad(%d, %d)"), l, c));
+
+ if (orig) {
+ if (!(orig->_flags & _ISPAD)
+ || ((win = derwin(orig, l, c, begy, begx)) == NULL))
+ returnWin(0);
+ }
+ returnWin(win);
+}
+
+NCURSES_EXPORT(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);
+}
+
+NCURSES_EXPORT(int)
+pnoutrefresh
+(WINDOW *win, int pminrow, int pmincol,
+ int sminrow, int smincol, int smaxrow, int smaxcol)
+{
+ NCURSES_SIZE_T i, j;
+ NCURSES_SIZE_T m, n;
+ NCURSES_SIZE_T pmaxrow;
+ NCURSES_SIZE_T pmaxcol;
+
+#if USE_SCROLL_HINTS
+ const int my_len = 2; /* parameterize the threshold for hardscroll */
+ NCURSES_SIZE_T displaced;
+ bool wide;
+#endif
+
+ 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);
+
+ /* 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;
+ }
+
+ if (smaxrow >= screen_lines
+ || smaxcol >= screen_columns
+ || sminrow > smaxrow
+ || smincol > smaxcol)
+ returnCode(ERR);
+
+ T(("pad being refreshed"));
+
+#if USE_SCROLL_HINTS
+ 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;
+#endif
+
+ /*
+ * 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.
+ */
+#if USE_SCROLL_HINTS
+ wide = (smincol < my_len && smaxcol > (newscr->_maxx - my_len));
+#endif
+
+ 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++) {
+ NCURSES_CH_T ch = oline->text[j];
+#if USE_WIDEC_SUPPORT
+ /*
+ * Special case for leftmost character of the displayed area.
+ * Only half of a double-width character may be visible.
+ */
+ if (j == pmincol
+ && j > 0
+ && isnac(ch)) {
+ SetChar(ch, L(' '), AttrOf(oline->text[j - 1]));
+ }
+#endif
+ if (!CharEq(ch, nline->text[n])) {
+ nline->text[n] = ch;
+ CHANGED_CELL(nline, n);
+ }
+ }
+
+#if USE_SCROLL_HINTS
+ 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;
+ 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.
+ */
+#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;
+#endif
+
+ 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);
+}
+
+NCURSES_EXPORT(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);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_printw.c b/Build/source/libs/ncurses/ncurses/base/lib_printw.c
new file mode 100644
index 00000000000..03ec64294c0
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_printw.c
@@ -0,0 +1,139 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+/*
+** lib_printw.c
+**
+** The routines printw(), wprintw() and friends.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_printw.c,v 1.15 2003/02/08 20:50:13 tom Exp $")
+
+NCURSES_EXPORT(int)
+printw(const char *fmt,...)
+{
+ va_list argp;
+ int code;
+
+#ifdef TRACE
+ va_start(argp, fmt);
+ T((T_CALLED("printw(%s%s)"),
+ _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ va_end(argp);
+#endif
+
+ va_start(argp, fmt);
+ code = vwprintw(stdscr, fmt, argp);
+ va_end(argp);
+
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+wprintw(WINDOW *win, const char *fmt,...)
+{
+ va_list argp;
+ int code;
+
+#ifdef TRACE
+ va_start(argp, fmt);
+ T((T_CALLED("wprintw(%p,%s%s)"),
+ win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ va_end(argp);
+#endif
+
+ va_start(argp, fmt);
+ code = vwprintw(win, fmt, argp);
+ va_end(argp);
+
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+mvprintw(int y, int x, const char *fmt,...)
+{
+ va_list argp;
+ int code;
+
+#ifdef TRACE
+ va_start(argp, fmt);
+ T((T_CALLED("mvprintw(%d,%d,%s%s)"),
+ y, x, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ va_end(argp);
+#endif
+
+ if ((code = move(y, x)) != ERR) {
+ va_start(argp, fmt);
+ code = vwprintw(stdscr, fmt, argp);
+ va_end(argp);
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+mvwprintw(WINDOW *win, int y, int x, const char *fmt,...)
+{
+ va_list argp;
+ int code;
+
+#ifdef TRACE
+ va_start(argp, fmt);
+ T((T_CALLED("mvwprintw(%d,%d,%p,%s%s)"),
+ y, x, win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ va_end(argp);
+#endif
+
+ if ((code = wmove(win, y, x)) != ERR) {
+ va_start(argp, fmt);
+ code = vwprintw(win, fmt, argp);
+ va_end(argp);
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+vwprintw(WINDOW *win, const char *fmt, va_list argp)
+{
+ char *buf;
+ int code = ERR;
+
+ T((T_CALLED("vwprintw(%p,%s,%p)"),
+ win, _nc_visbuf(fmt), argp));
+
+ if ((buf = _nc_printf_string(fmt, argp)) != 0) {
+ code = waddstr(win, buf);
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_redrawln.c b/Build/source/libs/ncurses/ncurses/base/lib_redrawln.c
new file mode 100644
index 00000000000..91a03711de7
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_redrawln.c
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+/*
+ * lib_redrawln.c
+ *
+ * The routine wredrawln().
+ *
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_redrawln.c,v 1.10 2001/09/29 17:41:31 tom Exp $")
+
+NCURSES_EXPORT(int)
+wredrawln(WINDOW *win, int beg, int num)
+{
+ int i;
+ int end;
+ size_t len = (win->_maxx + 1);
+
+ T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));
+
+ if (beg < 0)
+ beg = 0;
+
+ if (touchline(win, beg, num) == ERR)
+ returnCode(ERR);
+
+ end = beg + num;
+ if (end > curscr->_maxy + 1)
+ end = curscr->_maxy + 1;
+ if (end > win->_maxy + 1)
+ end = win->_maxy + 1;
+
+ if (len > (size_t) (curscr->_maxx + 1))
+ len = (size_t) (curscr->_maxx + 1);
+ len *= sizeof(curscr->_line[0].text[0]);
+
+ for (i = beg; i < end; i++) {
+ memset(curscr->_line[i + win->_begy].text + win->_begx, 0, len);
+ _nc_make_oldhash(i + win->_begy);
+ }
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_refresh.c b/Build/source/libs/ncurses/ncurses/base/lib_refresh.c
new file mode 100644
index 00000000000..e5908a39e92
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_refresh.c
@@ -0,0 +1,187 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_refresh.c
+ *
+ * The routines wrefresh() and wnoutrefresh().
+ *
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_refresh.c,v 1.32 2002/05/26 00:17:04 tom Exp $")
+
+NCURSES_EXPORT(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);
+}
+
+NCURSES_EXPORT(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;
+#if USE_SCROLL_HINTS
+ bool wide;
+#endif
+
+ 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);
+
+ /* put them here so "win == 0" won't break our code */
+ begx = win->_begx;
+ begy = win->_begy;
+
+ newscr->_nc_bkgd = win->_nc_bkgd;
+ newscr->_attrs = win->_attrs;
+
+ /* merge in change information from all subwindows of this window */
+ wsyncdown(win);
+
+#if USE_SCROLL_HINTS
+ /*
+ * 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));
+#endif
+
+ 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 > newscr->_maxx - begx)
+ limit_x = newscr->_maxx - begx;
+
+ 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;
+
+ if (last > limit_x)
+ last = limit_x;
+
+ for (j = oline->firstchar, n = j + begx; j <= last; j++, n++) {
+ if (!CharEq(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;
+
+ 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);
+ }
+
+ 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;
+
+#ifdef TRACE
+ if (_nc_tracing & TRACE_UPDATE)
+ _tracedump("newscr", newscr);
+#endif /* TRACE */
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_restart.c b/Build/source/libs/ncurses/ncurses/base/lib_restart.c
new file mode 100644
index 00000000000..31da4b7cb89
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_restart.c
@@ -0,0 +1,92 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * Terminfo-only terminal setup routines:
+ *
+ * int restartterm(const char *, int, int *)
+ * TERMINAL *set_curterm(TERMINAL *)
+ * int del_curterm(TERMINAL *)
+ */
+
+#include <curses.priv.h>
+
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
+#define _POSIX_SOURCE
+#endif
+
+#include <term.h> /* lines, columns, cur_term */
+
+MODULE_ID("$Id: lib_restart.c,v 1.5 2002/08/31 22:30:10 Philippe.Blain Exp $")
+
+NCURSES_EXPORT(int)
+restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
+{
+ int saveecho = SP->_echo;
+ int savecbreak = SP->_cbreak;
+ int saveraw = SP->_raw;
+ int savenl = SP->_nl;
+
+ T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
+
+ if (setupterm(termp, filenum, errret) != OK)
+ returnCode(ERR);
+
+ if (saveecho)
+ echo();
+ else
+ noecho();
+
+ if (savecbreak) {
+ cbreak();
+ noraw();
+ } else if (saveraw) {
+ nocbreak();
+ raw();
+ } else {
+ nocbreak();
+ noraw();
+ }
+ if (savenl)
+ nl();
+ else
+ nonl();
+
+ reset_prog_mode();
+
+#if USE_SIZECHANGE
+ _nc_update_screensize();
+#endif
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_scanw.c b/Build/source/libs/ncurses/ncurses/base/lib_scanw.c
new file mode 100644
index 00000000000..b8a5a227a1a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_scanw.c
@@ -0,0 +1,106 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_scanw.c
+**
+** The routines scanw(), wscanw() and friends.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_scanw.c,v 1.11 2001/06/30 23:39:41 tom Exp $")
+
+NCURSES_EXPORT(int)
+vwscanw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp)
+{
+ char buf[BUFSIZ];
+
+ if (wgetnstr(win, buf, sizeof(buf) - 1) == ERR)
+ return (ERR);
+
+ return (vsscanf(buf, fmt, argp));
+}
+
+NCURSES_EXPORT(int)
+scanw(NCURSES_CONST char *fmt,...)
+{
+ int code;
+ va_list ap;
+
+ T(("scanw(\"%s\",...) called", fmt));
+
+ va_start(ap, fmt);
+ code = vwscanw(stdscr, fmt, ap);
+ va_end(ap);
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+wscanw(WINDOW *win, NCURSES_CONST char *fmt,...)
+{
+ int code;
+ va_list ap;
+
+ T(("wscanw(%p,\"%s\",...) called", win, fmt));
+
+ va_start(ap, fmt);
+ code = vwscanw(win, fmt, ap);
+ va_end(ap);
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+mvscanw(int y, int x, NCURSES_CONST char *fmt,...)
+{
+ int code;
+ va_list ap;
+
+ va_start(ap, fmt);
+ code = (move(y, x) == OK) ? vwscanw(stdscr, fmt, ap) : ERR;
+ va_end(ap);
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+mvwscanw(WINDOW *win, int y, int x, NCURSES_CONST char *fmt,...)
+{
+ int code;
+ va_list ap;
+
+ va_start(ap, fmt);
+ code = (wmove(win, y, x) == OK) ? vwscanw(win, fmt, ap) : ERR;
+ va_end(ap);
+ return (code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_screen.c b/Build/source/libs/ncurses/ncurses/base/lib_screen.c
new file mode 100644
index 00000000000..43f848d8a64
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_screen.c
@@ -0,0 +1,205 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996 on *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_screen.c,v 1.28 2002/09/14 23:30:41 tom Exp $")
+
+NCURSES_EXPORT(WINDOW *)
+getwin(FILE * filep)
+{
+ WINDOW tmp, *nwin;
+ int n;
+
+ T((T_CALLED("getwin(%p)"), filep));
+
+ clearerr(filep);
+ (void) fread(&tmp, sizeof(WINDOW), 1, filep);
+ if (ferror(filep))
+ returnWin(0);
+
+ if (tmp._flags & _ISPAD) {
+ nwin = newpad(tmp._maxy + 1, tmp._maxx + 1);
+ } else {
+ nwin = newwin(tmp._maxy + 1, tmp._maxx + 1, 0, 0);
+ }
+
+ /*
+ * We deliberately do not restore the _parx, _pary, or _parent
+ * fields, because the window hierarchy within which they
+ * made sense is probably gone.
+ */
+ if (nwin != 0) {
+ nwin->_curx = tmp._curx;
+ nwin->_cury = tmp._cury;
+ nwin->_maxy = tmp._maxy;
+ nwin->_maxx = tmp._maxx;
+ nwin->_begy = tmp._begy;
+ nwin->_begx = tmp._begx;
+ nwin->_yoffset = tmp._yoffset;
+ nwin->_flags = tmp._flags & ~(_SUBWIN);
+
+ nwin->_attrs = tmp._attrs;
+ nwin->_nc_bkgd = tmp._nc_bkgd;
+
+ nwin->_notimeout = tmp._notimeout;
+ nwin->_clear = tmp._clear;
+ nwin->_leaveok = tmp._leaveok;
+ nwin->_idlok = tmp._idlok;
+ nwin->_idcok = tmp._idcok;
+ nwin->_immed = tmp._immed;
+ nwin->_scroll = tmp._scroll;
+ nwin->_sync = tmp._sync;
+ nwin->_use_keypad = tmp._use_keypad;
+ nwin->_delay = tmp._delay;
+
+ nwin->_regtop = tmp._regtop;
+ nwin->_regbottom = tmp._regbottom;
+
+ if (tmp._flags & _ISPAD)
+ nwin->_pad = tmp._pad;
+
+ for (n = 0; n <= nwin->_maxy; n++) {
+ clearerr(filep);
+ (void) fread(nwin->_line[n].text,
+ sizeof(NCURSES_CH_T),
+ (size_t) (nwin->_maxx + 1),
+ filep);
+ if (ferror(filep)) {
+ delwin(nwin);
+ returnWin(0);
+ }
+ }
+ touchwin(nwin);
+ }
+ returnWin(nwin);
+}
+
+NCURSES_EXPORT(int)
+putwin(WINDOW *win, FILE * filep)
+{
+ int code = ERR;
+ int n;
+
+ T((T_CALLED("putwin(%p,%p)"), win, filep));
+
+ if (win != 0) {
+ size_t len = (win->_maxx + 1);
+
+ clearerr(filep);
+ if (fwrite(win, sizeof(WINDOW), 1, filep) != 1
+ || ferror(filep))
+ returnCode(code);
+
+ for (n = 0; n <= win->_maxy; n++) {
+ if (fwrite(win->_line[n].text,
+ sizeof(NCURSES_CH_T), len, filep) != len
+ || ferror(filep)) {
+ returnCode(code);
+ }
+ }
+ code = OK;
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+scr_restore(const char *file)
+{
+ FILE *fp = 0;
+
+ T((T_CALLED("scr_restore(%s)"), _nc_visbuf(file)));
+
+ if (_nc_access(file, R_OK) < 0
+ || (fp = fopen(file, "rb")) == 0) {
+ returnCode(ERR);
+ } else {
+ delwin(newscr);
+ SP->_newscr = newscr = getwin(fp);
+ (void) fclose(fp);
+ returnCode(OK);
+ }
+}
+
+NCURSES_EXPORT(int)
+scr_dump(const char *file)
+{
+ FILE *fp = 0;
+
+ T((T_CALLED("scr_dump(%s)"), _nc_visbuf(file)));
+
+ if (_nc_access(file, W_OK) < 0
+ || (fp = fopen(file, "wb")) == 0) {
+ returnCode(ERR);
+ } else {
+ (void) putwin(newscr, fp);
+ (void) fclose(fp);
+ returnCode(OK);
+ }
+}
+
+NCURSES_EXPORT(int)
+scr_init(const char *file)
+{
+ FILE *fp = 0;
+
+ T((T_CALLED("scr_init(%s)"), _nc_visbuf(file)));
+
+ if (exit_ca_mode && non_rev_rmcup)
+ returnCode(ERR);
+
+ if (_nc_access(file, R_OK) < 0
+ || (fp = fopen(file, "rb")) == 0) {
+ returnCode(ERR);
+ } else {
+ delwin(curscr);
+ SP->_curscr = curscr = getwin(fp);
+ (void) fclose(fp);
+ returnCode(OK);
+ }
+}
+
+NCURSES_EXPORT(int)
+scr_set(const char *file)
+{
+ T((T_CALLED("scr_set(%s)"), _nc_visbuf(file)));
+
+ if (scr_init(file) == ERR) {
+ returnCode(ERR);
+ } else {
+ delwin(newscr);
+ SP->_newscr = newscr = dupwin(curscr);
+ returnCode(OK);
+ }
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_scroll.c b/Build/source/libs/ncurses/ncurses/base/lib_scroll.c
new file mode 100644
index 00000000000..f8e16bafa87
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_scroll.c
@@ -0,0 +1,130 @@
+/****************************************************************************
+ * Copyright (c) 1998,2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 1996-2003 *
+ * and: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_scroll.c
+**
+** The routine wscrl(win, n).
+** positive n scroll the window up (ie. move lines down)
+** negative n scroll the window down (ie. move lines up)
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_scroll.c,v 1.24 2003/07/26 23:25:26 tom Exp $")
+
+NCURSES_EXPORT(void)
+_nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top,
+ NCURSES_SIZE_T const bottom, NCURSES_CH_T blank)
+{
+ int limit;
+ int line;
+ int j;
+ size_t to_copy = (size_t) (sizeof(NCURSES_CH_T) * (win->_maxx + 1));
+
+ TR(TRACE_MOVE, ("_nc_scroll_window(%p, %d, %d, %d)", win, n, top, bottom));
+
+ if (top < 0
+ || bottom < top
+ || bottom > win->_maxy) {
+ TR(TRACE_MOVE, ("nothing to scroll"));
+ return;
+ }
+
+ /*
+ * 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) {
+ limit = top - n;
+ for (line = bottom; line >= limit && line >= 0; line--) {
+ TR(TRACE_MOVE, ("...copying %d to %d", line + n, line));
+ memcpy(win->_line[line].text,
+ win->_line[line + n].text,
+ to_copy);
+ if_USE_SCROLL_HINTS(win->_line[line].oldindex =
+ win->_line[line + n].oldindex);
+ }
+ for (line = top; line < limit && line <= win->_maxy; line++) {
+ TR(TRACE_MOVE, ("...filling %d", line));
+ for (j = 0; j <= win->_maxx; j++)
+ win->_line[line].text[j] = blank;
+ if_USE_SCROLL_HINTS(win->_line[line].oldindex = _NEWINDEX);
+ }
+ }
+
+ /* shift n lines upwards */
+ if (n > 0) {
+ limit = bottom - n;
+ for (line = top; line <= limit && line <= win->_maxy; line++) {
+ memcpy(win->_line[line].text,
+ win->_line[line + n].text,
+ to_copy);
+ if_USE_SCROLL_HINTS(win->_line[line].oldindex =
+ win->_line[line + n].oldindex);
+ }
+ for (line = bottom; line > limit && line >= 0; 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);
+}
+
+NCURSES_EXPORT(int)
+wscrl(WINDOW *win, int n)
+{
+ T((T_CALLED("wscrl(%p,%d)"), win, n));
+
+ if (!win || !win->_scroll) {
+ TR(TRACE_MOVE, ("...scrollok is false"));
+ returnCode(ERR);
+ }
+
+ if (n != 0) {
+ _nc_scroll_window(win, n, win->_regtop, win->_regbottom, win->_nc_bkgd);
+ _nc_synchook(win);
+ }
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_scrollok.c b/Build/source/libs/ncurses/ncurses/base/lib_scrollok.c
new file mode 100644
index 00000000000..f6b30259be7
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_scrollok.c
@@ -0,0 +1,55 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_scrollok.c
+**
+** The routine scrollok.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_scrollok.c,v 1.4 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+scrollok(WINDOW *win, bool flag)
+{
+ T((T_CALLED("scrollok(%p,%d)"), win, flag));
+
+ if (win) {
+ win->_scroll = flag;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_scrreg.c b/Build/source/libs/ncurses/ncurses/base/lib_scrreg.c
new file mode 100644
index 00000000000..c85d60f1164
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_scrreg.c
@@ -0,0 +1,60 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_scrreg.c
+**
+** The routine wsetscrreg().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_scrreg.c,v 1.10 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(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 = (NCURSES_SIZE_T) top;
+ win->_regbottom = (NCURSES_SIZE_T) bottom;
+
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_set_term.c b/Build/source/libs/ncurses/ncurses/base/lib_set_term.c
new file mode 100644
index 00000000000..bfa0f70185a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_set_term.c
@@ -0,0 +1,497 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+** lib_set_term.c
+**
+** The routine set_term().
+**
+*/
+
+#include <curses.priv.h>
+
+#include <term.h> /* cur_term */
+#include <tic.h>
+
+MODULE_ID("$Id: lib_set_term.c,v 1.82 2004/04/24 20:17:39 tom Exp $")
+
+NCURSES_EXPORT(SCREEN *)
+set_term(SCREEN * screenp)
+{
+ SCREEN *oldSP;
+
+ T((T_CALLED("set_term(%p)"), 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;
+
+ T((T_RETURN("%p"), oldSP));
+ return (oldSP);
+}
+
+static void
+_nc_free_keytry(struct tries *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.
+ */
+NCURSES_EXPORT(void)
+delscreen(SCREEN * sp)
+{
+ SCREEN **scan = &_nc_screen_chain;
+ int i;
+
+ T((T_CALLED("delscreen(%p)"), sp));
+
+ while (*scan) {
+ if (*scan == sp) {
+ *scan = sp->_next_screen;
+ break;
+ }
+ scan = &(*scan)->_next_screen;
+ }
+
+ (void) _nc_freewin(sp->_curscr);
+ (void) _nc_freewin(sp->_newscr);
+ (void) _nc_freewin(sp->_stdscr);
+
+ if (sp->_slk != 0) {
+ if (sp->_slk->ent != 0) {
+ for (i = 0; i < sp->_slk->labcnt; ++i) {
+ FreeIfNeeded(sp->_slk->ent[i].ent_text);
+ FreeIfNeeded(sp->_slk->ent[i].form_text);
+ }
+ free(sp->_slk->ent);
+ }
+ free(sp->_slk);
+ sp->_slk = 0;
+ }
+
+ _nc_free_keytry(sp->_keytry);
+ sp->_keytry = 0;
+
+ _nc_free_keytry(sp->_key_ok);
+ sp->_key_ok = 0;
+
+ FreeIfNeeded(sp->_color_table);
+ FreeIfNeeded(sp->_color_pairs);
+
+ FreeIfNeeded(sp->oldhash);
+ FreeIfNeeded(sp->newhash);
+ FreeIfNeeded(sp->hashtab);
+
+ 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;
+}
+
+static ripoff_t rippedoff[5];
+static ripoff_t *rsp = rippedoff;
+#define N_RIPS SIZEOF(SP->_rippedoff)
+
+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 NCURSES_EXT_FUNCS && 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;
+ }
+ while (*dst != 0 && *dst != ';')
+ dst++;
+ if (*dst == ';')
+ dst++;
+ return dst;
+}
+#endif
+
+NCURSES_EXPORT(int)
+_nc_setupscreen(short slines, short const scolumns, FILE *output)
+/* OS-independent screen initializations */
+{
+ int bottom_stolen = 0;
+ int i;
+
+ T((T_CALLED("_nc_setupscreen(%d, %d, %p)"), slines, scolumns, output));
+ assert(SP == 0); /* has been reset in newterm() ! */
+ if (!_nc_alloc_screen())
+ returnCode(ERR);
+
+ SP->_next_screen = _nc_screen_chain;
+ _nc_screen_chain = SP;
+
+#ifdef __DJGPP__
+ T(("setting output mode to binary"));
+ fflush(output);
+ setmode(output, O_BINARY);
+#endif
+ _nc_set_buffer(output, TRUE);
+ SP->_term = cur_term;
+ SP->_lines = slines;
+ 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 */
+
+#if NCURSES_NO_PADDING
+ SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0;
+ TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used",
+ SP->_no_padding ? " not" : ""));
+#endif
+
+#if NCURSES_EXT_FUNCS
+ SP->_default_color = FALSE;
+ SP->_has_sgr_39_49 = FALSE;
+
+ /*
+ * Set our assumption of the terminal's default foreground and background
+ * colors. The curs_color man-page states that we can assume that the
+ * background is black. The origin of this assumption appears to be
+ * terminals that displayed colored text, but no colored backgrounds, e.g.,
+ * the first colored terminals around 1980. More recent ones with better
+ * technology can display not only colored backgrounds, but all
+ * combinations. So a terminal might be something other than "white" on
+ * black (green/black looks monochrome too), but black on white or even
+ * on ivory.
+ *
+ * White-on-black is the simplest thing to use for monochrome. Almost
+ * all applications that use color paint both text and background, so
+ * the distinction is moot. But a few do not - which is why we leave this
+ * configurable (a better solution is to use assume_default_colors() for
+ * the rare applications that do require that sort of appearance, since
+ * is appears that more users expect to be able to make a white-on-black
+ * or black-on-white display under control of the application than not).
+ */
+#ifdef USE_ASSUMED_COLOR
+ SP->_default_fg = COLOR_WHITE;
+ SP->_default_bg = COLOR_BLACK;
+#else
+ SP->_default_fg = C_MASK;
+ SP->_default_bg = C_MASK;
+#endif
+
+ /*
+ * Allow those assumed/default color assumptions to be overridden at
+ * runtime:
+ */
+ if (getenv("NCURSES_ASSUMED_COLORS") != 0) {
+ char *p = getenv("NCURSES_ASSUMED_COLORS");
+ int fg, bg;
+ char sep1, sep2;
+ int count = sscanf(p, "%d%c%d%c", &fg, &sep1, &bg, &sep2);
+ if (count >= 1) {
+ SP->_default_fg = (fg >= 0 && fg < max_colors) ? fg : C_MASK;
+ if (count >= 3) {
+ SP->_default_bg = (bg >= 0 && bg < max_colors) ? bg : C_MASK;
+ }
+ TR(TRACE_CHARPUT | TRACE_MOVE,
+ ("from environment assumed fg=%d, bg=%d",
+ SP->_default_fg,
+ SP->_default_bg));
+ }
+ }
+#if 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");
+ TR(TRACE_CHARPUT | TRACE_MOVE, ("decoding COLORFGBG %s", p));
+ p = extract_fgbg(p, &(SP->_default_fg));
+ p = extract_fgbg(p, &(SP->_default_bg));
+ if (*p) /* assume rxvt was compiled with xpm support */
+ p = extract_fgbg(p, &(SP->_default_bg));
+ TR(TRACE_CHARPUT | TRACE_MOVE, ("decoded fg=%d, bg=%d",
+ SP->_default_fg, SP->_default_bg));
+ if (SP->_default_fg >= max_colors) {
+ if (set_a_foreground != ABSENT_STRING
+ && !strcmp(set_a_foreground, "\033[3%p1%dm")) {
+ set_a_foreground = "\033[3%?%p1%{8}%>%t9%e%p1%d%;m";
+ } else {
+ SP->_default_fg %= max_colors;
+ }
+ }
+ if (SP->_default_bg >= max_colors) {
+ if (set_a_background != ABSENT_STRING
+ && !strcmp(set_a_background, "\033[4%p1%dm")) {
+ set_a_background = "\033[4%?%p1%{8}%>%t9%e%p1%d%;m";
+ } else {
+ SP->_default_bg %= max_colors;
+ }
+ }
+ }
+#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
+ /*
+ * 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;
+#else
+ magic_cookie_glitch = ABSENT_NUMERIC;
+ acs_chars = 0;
+#endif
+ }
+
+ /* initialize normal acs before wide, since we use mapping in the latter */
+ _nc_init_acs();
+#if USE_WIDEC_SUPPORT
+ _nc_init_wacs();
+
+ SP->_screen_acs_fix = (_nc_unicode_locale() && _nc_locale_breaks_acs());
+ {
+ char *env = _nc_get_locale();
+ SP->_legacy_coding = ((env == 0)
+ || !strcmp(env, "C")
+ || !strcmp(env, "POSIX"));
+ }
+#endif
+
+ _nc_idcok = TRUE;
+ _nc_idlok = FALSE;
+
+ _nc_windows = 0; /* no windows yet */
+
+ SP->oldhash = 0;
+ SP->newhash = 0;
+
+ T(("creating newscr"));
+ if ((newscr = newwin(slines, scolumns, 0, 0)) == 0)
+ returnCode(ERR);
+
+ T(("creating curscr"));
+ if ((curscr = newwin(slines, scolumns, 0, 0)) == 0)
+ returnCode(ERR);
+
+ SP->_newscr = newscr;
+ SP->_curscr = curscr;
+#if USE_SIZECHANGE
+ SP->_resize = resizeterm;
+#endif
+
+ newscr->_clear = TRUE;
+ curscr->_clear = FALSE;
+
+ def_shell_mode();
+ def_prog_mode();
+
+ for (i = 0, rsp = rippedoff; rsp->line && (i < (int) N_RIPS); rsp++, i++) {
+ T(("ripping off line %d at %s", i, rsp->line < 0 ? "bottom" : "top"));
+ SP->_rippedoff[i] = rippedoff[i];
+ if (rsp->hook) {
+ int count = (rsp->line < 0) ? -rsp->line : rsp->line;
+
+ SP->_rippedoff[i].w = newwin(count,
+ scolumns,
+ ((rsp->line < 0)
+ ? SP->_lines_avail - count
+ : 0),
+ 0);
+ if (SP->_rippedoff[i].w != 0)
+ SP->_rippedoff[i].hook(SP->_rippedoff[i].w, scolumns);
+ else
+ returnCode(ERR);
+ if (rsp->line < 0)
+ bottom_stolen += count;
+ else
+ SP->_topstolen += count;
+ SP->_lines_avail -= count;
+ }
+ rsp->line = 0;
+ }
+ SP->_rip_count = i;
+ /* 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)
+ returnCode(ERR);
+ SP->_stdscr = stdscr;
+
+ returnCode(OK);
+}
+
+/* The internal implementation interprets line as the number of
+ lines to rip off from the top or bottom.
+ */
+NCURSES_EXPORT(int)
+_nc_ripoffline(int line, int (*init) (WINDOW *, int))
+{
+ T((T_CALLED("_nc_ripoffline(%d, %p)"), line, init));
+
+ if (line != 0) {
+
+ if (rsp >= rippedoff + N_RIPS)
+ returnCode(ERR);
+
+ rsp->line = line;
+ rsp->hook = init;
+ rsp->w = 0;
+ rsp++;
+ }
+
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(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));
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slk.c b/Build/source/libs/ncurses/ncurses/base/lib_slk.c
new file mode 100644
index 00000000000..4bdf8afc45c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slk.c
@@ -0,0 +1,215 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slk.c
+ * Soft key routines.
+ */
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <term.h> /* num_labels, label_*, plab_norm */
+
+MODULE_ID("$Id: lib_slk.c,v 1.28 2003/05/24 21:10:28 tom Exp $")
+
+/*
+ * We'd like to move these into the screen context structure, but cannot,
+ * because slk_init() is called before initscr()/newterm().
+ */
+NCURSES_EXPORT_VAR(int)
+_nc_slk_format = 0; /* one more than format specified in slk_init() */
+
+/*
+ * Paint the info line for the PC style SLK emulation.
+ *
+ */
+static void
+slk_paint_info(WINDOW *win)
+{
+ if (win && SP->slk_format == 4) {
+ int i;
+
+ mvwhline(win, 0, 0, 0, getmaxx(win));
+ wmove(win, 0, 0);
+
+ for (i = 0; i < SP->_slk->maxlab; i++) {
+ mvwprintw(win, 0, SP->_slk->ent[i].ent_x, "F%d", i + 1);
+ }
+ }
+}
+
+/*
+ * Free any memory related to soft labels, return an error.
+ */
+static int
+slk_failed(void)
+{
+ if (SP->_slk) {
+ FreeIfNeeded(SP->_slk->ent);
+ free(SP->_slk);
+ SP->_slk = (SLK *) 0;
+ }
+ return ERR;
+}
+
+/*
+ * Initialize soft labels.
+ * Called from newterm()
+ */
+NCURSES_EXPORT(int)
+_nc_slk_initialize(WINDOW *stwin, int cols)
+{
+ int i, x;
+ int res = OK;
+ unsigned max_length;
+
+ T((T_CALLED("_nc_slk_initialize()")));
+
+ if (SP->_slk) { /* we did this already, so simply return */
+ returnCode(OK);
+ } else if ((SP->_slk = typeCalloc(SLK, 1)) == 0)
+ returnCode(ERR);
+
+ SP->_slk->ent = NULL;
+
+ /*
+ * If we use colors, vidputs() will suppress video attributes that conflict
+ * with colors. In that case, we're still guaranteed that "reverse" would
+ * work.
+ */
+ if ((no_color_video & 1) == 0)
+ SP->_slk->attr = A_STANDOUT;
+ else
+ SP->_slk->attr = A_REVERSE;
+
+ SP->_slk->maxlab = ((num_labels > 0)
+ ? num_labels
+ : MAX_SKEY(_nc_slk_format));
+ SP->_slk->maxlen = ((num_labels > 0)
+ ? label_width * label_height
+ : MAX_SKEY_LEN(_nc_slk_format));
+ SP->_slk->labcnt = ((SP->_slk->maxlab < MAX_SKEY(_nc_slk_format))
+ ? MAX_SKEY(_nc_slk_format)
+ : SP->_slk->maxlab);
+
+ if (SP->_slk->maxlen <= 0
+ || SP->_slk->labcnt <= 0
+ || (SP->_slk->ent = typeCalloc(slk_ent,
+ (unsigned) SP->_slk->labcnt)) == NULL)
+ returnCode(slk_failed());
+
+ max_length = SP->_slk->maxlen;
+ for (i = 0; i < SP->_slk->labcnt; i++) {
+
+ if ((SP->_slk->ent[i].ent_text = (char *)_nc_doalloc(0, max_length + 1)) == 0)
+ returnCode(slk_failed());
+ memset(SP->_slk->ent[i].ent_text, 0, max_length + 1);
+
+ if ((SP->_slk->ent[i].form_text = (char *)_nc_doalloc(0, max_length + 1)) == 0)
+ returnCode(slk_failed());
+ memset(SP->_slk->ent[i].form_text, 0, max_length + 1);
+
+ memset(SP->_slk->ent[i].form_text, ' ', max_length);
+ SP->_slk->ent[i].visible = (i < SP->_slk->maxlab);
+ }
+ if (_nc_slk_format >= 3) { /* PC style */
+ int gap = (cols - 3 * (3 + 4 * max_length)) / 2;
+
+ if (gap < 1)
+ gap = 1;
+
+ for (i = x = 0; i < SP->_slk->maxlab; i++) {
+ SP->_slk->ent[i].ent_x = x;
+ x += max_length;
+ x += (i == 3 || i == 7) ? gap : 1;
+ }
+ slk_paint_info(stwin);
+ } else {
+ if (_nc_slk_format == 2) { /* 4-4 */
+ int gap = cols - (SP->_slk->maxlab * max_length) - 6;
+
+ if (gap < 1)
+ gap = 1;
+ for (i = x = 0; i < SP->_slk->maxlab; i++) {
+ SP->_slk->ent[i].ent_x = x;
+ x += max_length;
+ x += (i == 3) ? gap : 1;
+ }
+ } else {
+ if (_nc_slk_format == 1) { /* 1 -> 3-2-3 */
+ int gap = (cols - (SP->_slk->maxlab * max_length) - 5)
+ / 2;
+
+ if (gap < 1)
+ gap = 1;
+ for (i = x = 0; i < SP->_slk->maxlab; i++) {
+ SP->_slk->ent[i].ent_x = x;
+ x += max_length;
+ x += (i == 2 || i == 4) ? gap : 1;
+ }
+ } else
+ returnCode(slk_failed());
+ }
+ }
+ SP->_slk->dirty = TRUE;
+ if ((SP->_slk->win = stwin) == NULL) {
+ returnCode(slk_failed());
+ }
+
+ /* We now reset the format so that the next newterm has again
+ * per default no SLK keys and may call slk_init again to
+ * define a new layout. (juergen 03-Mar-1999)
+ */
+ SP->slk_format = _nc_slk_format;
+ _nc_slk_format = 0;
+ returnCode(res);
+}
+
+/*
+ * Restore the soft labels on the screen.
+ */
+NCURSES_EXPORT(int)
+slk_restore(void)
+{
+ T((T_CALLED("slk_restore()")));
+
+ if (SP->_slk == NULL)
+ return (ERR);
+ SP->_slk->hidden = FALSE;
+ SP->_slk->dirty = TRUE;
+ /* we have to repaint info line eventually */
+ slk_paint_info(SP->_slk->win);
+
+ returnCode(slk_refresh());
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkatr_set.c b/Build/source/libs/ncurses/ncurses/base/lib_slkatr_set.c
new file mode 100644
index 00000000000..45cc89cb0d8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkatr_set.c
@@ -0,0 +1,55 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Juergen Pfeifer, 1998 *
+ ****************************************************************************/
+
+/*
+ * lib_slkatr_set.c
+ * Soft key routines.
+ * Set the labels attributes
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkatr_set.c,v 1.7 2003/10/25 15:27:03 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_attr_set
+(const attr_t attr, short color_pair_number, void *opts)
+{
+ T((T_CALLED("slk_attr_set(%s,%d)"), _traceattr(attr), color_pair_number));
+
+ if (SP != 0 && SP->_slk != 0 && !opts &&
+ color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
+ SP->_slk->attr = attr;
+ toggle_attr_on(SP->_slk->attr, COLOR_PAIR(color_pair_number));
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkatrof.c b/Build/source/libs/ncurses/ncurses/base/lib_slkatrof.c
new file mode 100644
index 00000000000..c271c342101
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkatrof.c
@@ -0,0 +1,53 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkatrof.c
+ * Soft key routines.
+ * Switch off labels attributes
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkatrof.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_attroff(const chtype attr)
+{
+ T((T_CALLED("slk_attroff(%s)"), _traceattr(attr)));
+
+ if (SP != 0 && SP->_slk != 0) {
+ toggle_attr_off(SP->_slk->attr, attr);
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkatron.c b/Build/source/libs/ncurses/ncurses/base/lib_slkatron.c
new file mode 100644
index 00000000000..d174b039492
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkatron.c
@@ -0,0 +1,53 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkatron.c
+ * Soft key routines.
+ * Switch on labels attributes
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkatron.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_attron(const chtype attr)
+{
+ T((T_CALLED("slk_attron(%s)"), _traceattr(attr)));
+
+ if (SP != 0 && SP->_slk != 0) {
+ toggle_attr_on(SP->_slk->attr, attr);
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkatrset.c b/Build/source/libs/ncurses/ncurses/base/lib_slkatrset.c
new file mode 100644
index 00000000000..cda74cad42d
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkatrset.c
@@ -0,0 +1,53 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkatrset.c
+ * Soft key routines.
+ * Set the labels attributes
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkatrset.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_attrset(const chtype attr)
+{
+ T((T_CALLED("slk_attrset(%s)"), _traceattr(attr)));
+
+ if (SP != 0 && SP->_slk != 0) {
+ SP->_slk->attr = attr;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkattr.c b/Build/source/libs/ncurses/ncurses/base/lib_slkattr.c
new file mode 100644
index 00000000000..5044a08d727
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkattr.c
@@ -0,0 +1,52 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkattr.c
+ * Soft key routines.
+ * Fetch the labels attributes
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkattr.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(attr_t)
+slk_attr(void)
+{
+ T((T_CALLED("slk_attr()")));
+
+ if (SP != 0 && SP->_slk != 0) {
+ returnAttr(SP->_slk->attr);
+ } else
+ returnAttr(0);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkclear.c b/Build/source/libs/ncurses/ncurses/base/lib_slkclear.c
new file mode 100644
index 00000000000..03e6721cbb2
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkclear.c
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkclear.c
+ * Soft key routines.
+ * Remove soft labels from the screen.
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkclear.c,v 1.8 2001/12/19 01:07:01 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_clear(void)
+{
+ T((T_CALLED("slk_clear()")));
+
+ if (SP == NULL || SP->_slk == NULL)
+ returnCode(ERR);
+ SP->_slk->hidden = TRUE;
+ /* For simulated SLK's it's looks much more natural to
+ inherit those attributes from the standard screen */
+ SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
+ SP->_slk->win->_attrs = stdscr->_attrs;
+ if (SP->_slk->win == stdscr) {
+ returnCode(OK);
+ } else {
+ werase(SP->_slk->win);
+ returnCode(wrefresh(SP->_slk->win));
+ }
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkcolor.c b/Build/source/libs/ncurses/ncurses/base/lib_slkcolor.c
new file mode 100644
index 00000000000..d7af4a258d8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkcolor.c
@@ -0,0 +1,52 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Juergen Pfeifer, 1998 *
+ ****************************************************************************/
+
+/*
+ * lib_slkcolor.c
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkcolor.c,v 1.9 2003/10/25 15:27:03 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_color(short color_pair_number)
+{
+ T((T_CALLED("slk_color(%d)"), color_pair_number));
+
+ if (SP != 0 && SP->_slk != 0 &&
+ color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
+ T(("... current %ld", (long) PAIR_NUMBER(SP->_slk->attr)));
+ toggle_attr_on(SP->_slk->attr, COLOR_PAIR(color_pair_number));
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkinit.c b/Build/source/libs/ncurses/ncurses/base/lib_slkinit.c
new file mode 100644
index 00000000000..f003b5f033f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkinit.c
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkinit.c
+ * Soft key routines.
+ * Initialize soft labels. Called by the user before initscr().
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slkinit.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_init(int format)
+{
+ T((T_CALLED("slk_init(%d)"), format));
+ if (format < 0 || format > 3)
+ returnCode(ERR);
+ _nc_slk_format = 1 + format;
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slklab.c b/Build/source/libs/ncurses/ncurses/base/lib_slklab.c
new file mode 100644
index 00000000000..42bb4ac1425
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slklab.c
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slklab.c
+ * Soft key routines.
+ * Fetch the label text.
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slklab.c,v 1.7 2003/03/29 22:53:48 tom Exp $")
+
+NCURSES_EXPORT(char *)
+slk_label(int n)
+{
+ T((T_CALLED("slk_label(%d)"), n));
+
+ if (SP == NULL || SP->_slk == NULL || n < 1 || n > SP->_slk->labcnt)
+ returnPtr(0);
+ returnPtr(SP->_slk->ent[n - 1].ent_text);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkrefr.c b/Build/source/libs/ncurses/ncurses/base/lib_slkrefr.c
new file mode 100644
index 00000000000..9040cc0429e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkrefr.c
@@ -0,0 +1,120 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkrefr.c
+ * Write SLK window to the (virtual) screen.
+ */
+#include <curses.priv.h>
+#include <term.h> /* num_labels, label_*, plab_norm */
+
+MODULE_ID("$Id: lib_slkrefr.c,v 1.11 2003/03/29 22:53:48 tom Exp $")
+
+/*
+ * Write the soft labels to the soft-key window.
+ */
+static void
+slk_intern_refresh(SLK * slk)
+{
+ int i;
+ int fmt = SP->slk_format;
+
+ for (i = 0; i < slk->labcnt; i++) {
+ if (slk->dirty || slk->ent[i].dirty) {
+ if (slk->ent[i].visible) {
+ if (num_labels > 0 && SLK_STDFMT(fmt)) {
+ if (i < num_labels) {
+ TPUTS_TRACE("plab_norm");
+ putp(tparm(plab_norm, i + 1, slk->ent[i].form_text));
+ }
+ } else {
+ wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x);
+ if (SP && SP->_slk)
+ wattrset(slk->win, SP->_slk->attr);
+ waddnstr(slk->win, slk->ent[i].form_text,
+ MAX_SKEY_LEN(fmt));
+ /* if we simulate SLK's, it's looking much more
+ natural to use the current ATTRIBUTE also
+ for the label window */
+ wattrset(slk->win, stdscr->_attrs);
+ }
+ }
+ slk->ent[i].dirty = FALSE;
+ }
+ }
+ slk->dirty = FALSE;
+
+ if (num_labels > 0) {
+ if (slk->hidden) {
+ TPUTS_TRACE("label_off");
+ putp(label_off);
+ } else {
+ TPUTS_TRACE("label_on");
+ putp(label_on);
+ }
+ }
+}
+
+/*
+ * Refresh the soft labels.
+ */
+NCURSES_EXPORT(int)
+slk_noutrefresh(void)
+{
+ T((T_CALLED("slk_noutrefresh()")));
+
+ if (SP == NULL || SP->_slk == NULL)
+ returnCode(ERR);
+ if (SP->_slk->hidden)
+ returnCode(OK);
+ slk_intern_refresh(SP->_slk);
+
+ returnCode(wnoutrefresh(SP->_slk->win));
+}
+
+/*
+ * Refresh the soft labels.
+ */
+NCURSES_EXPORT(int)
+slk_refresh(void)
+{
+ T((T_CALLED("slk_refresh()")));
+
+ if (SP == NULL || SP->_slk == NULL)
+ returnCode(ERR);
+ if (SP->_slk->hidden)
+ returnCode(OK);
+ slk_intern_refresh(SP->_slk);
+
+ returnCode(wrefresh(SP->_slk->win));
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slkset.c b/Build/source/libs/ncurses/ncurses/base/lib_slkset.c
new file mode 100644
index 00000000000..595a8ad1b9b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slkset.c
@@ -0,0 +1,95 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slkset.c
+ * Set soft label text.
+ */
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_slkset.c,v 1.10 2003/04/12 21:32:16 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_set(int i, const char *astr, int format)
+{
+ SLK *slk = SP->_slk;
+ size_t len;
+ int offset;
+ const char *str = astr;
+ const char *p;
+
+ T((T_CALLED("slk_set(%d, \"%s\", %d)"), i, str, format));
+
+ if (slk == NULL || i < 1 || i > slk->labcnt || format < 0 || format > 2)
+ returnCode(ERR);
+ if (str == NULL)
+ str = "";
+
+ while (isspace(UChar(*str)))
+ str++; /* skip over leading spaces */
+ p = str;
+ while (isprint(UChar(*p)))
+ p++; /* The first non-print stops */
+
+ --i; /* Adjust numbering of labels */
+
+ len = (size_t) (p - str);
+ if (len > (size_t) slk->maxlen)
+ len = slk->maxlen;
+ if (len == 0)
+ slk->ent[i].ent_text[0] = 0;
+ else
+ strncpy(slk->ent[i].ent_text, str, len)[len] = 0;
+ memset(slk->ent[i].form_text, ' ', (unsigned) slk->maxlen);
+ slk->ent[i].ent_text[slk->maxlen] = 0;
+
+ switch (format) {
+ default:
+ case 0: /* left-justified */
+ offset = 0;
+ break;
+ case 1: /* centered */
+ offset = (slk->maxlen - len) / 2;
+ break;
+ case 2: /* right-justified */
+ offset = slk->maxlen - len;
+ break;
+ }
+ memcpy(slk->ent[i].form_text + offset,
+ slk->ent[i].ent_text,
+ len);
+ slk->ent[i].form_text[slk->maxlen] = 0;
+ slk->ent[i].dirty = TRUE;
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_slktouch.c b/Build/source/libs/ncurses/ncurses/base/lib_slktouch.c
new file mode 100644
index 00000000000..5eb5df385b8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_slktouch.c
@@ -0,0 +1,53 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_slktouch.c
+ * Soft key routines.
+ * Force the code to believe that the soft keys have been changed.
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_slktouch.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_touch(void)
+{
+ T((T_CALLED("slk_touch()")));
+
+ if (SP == NULL || SP->_slk == NULL)
+ returnCode(ERR);
+ SP->_slk->dirty = TRUE;
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_touch.c b/Build/source/libs/ncurses/ncurses/base/lib_touch.c
new file mode 100644
index 00000000000..2ac21f2e0d1
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_touch.c
@@ -0,0 +1,91 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_touch.c
+**
+** The routines untouchwin(),
+** wtouchln(),
+** is_linetouched()
+** is_wintouched().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_touch.c,v 1.9 2000/12/10 02:43:27 tom Exp $")
+
+NCURSES_EXPORT(bool)
+is_linetouched(WINDOW *win, int line)
+{
+ T((T_CALLED("is_linetouched(%p,%d)"), win, line));
+
+ /* XSI doesn't define any error */
+ if (!win || (line > win->_maxy) || (line < 0))
+ returnCode((bool) ERR);
+
+ returnCode(win->_line[line].firstchar != _NOCHANGE ? TRUE : FALSE);
+}
+
+NCURSES_EXPORT(bool)
+is_wintouched(WINDOW *win)
+{
+ int i;
+
+ T((T_CALLED("is_wintouched(%p)"), win));
+
+ if (win)
+ for (i = 0; i <= win->_maxy; i++)
+ if (win->_line[i].firstchar != _NOCHANGE)
+ returnCode(TRUE);
+ returnCode(FALSE);
+}
+
+NCURSES_EXPORT(int)
+wtouchln(WINDOW *win, int y, int n, int changed)
+{
+ int i;
+
+ T((T_CALLED("wtouchln(%p,%d,%d,%d)"), win, y, n, changed));
+
+ if (!win || (n < 0) || (y < 0) || (y > win->_maxy))
+ returnCode(ERR);
+
+ for (i = y; i < y + n; i++) {
+ if (i > win->_maxy)
+ break;
+ win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
+ win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE;
+ }
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_ungetch.c b/Build/source/libs/ncurses/ncurses/base/lib_ungetch.c
new file mode 100644
index 00000000000..a6164df5edc
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_ungetch.c
@@ -0,0 +1,79 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_ungetch.c
+**
+** The routine ungetch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_ungetch.c,v 1.8 2002/08/24 22:08:48 tom Exp $")
+
+#include <fifo_defs.h>
+
+#ifdef TRACE
+NCURSES_EXPORT(void)
+_nc_fifo_dump(void)
+{
+ int i;
+ T(("head = %d, tail = %d, peek = %d", head, tail, peek));
+ for (i = 0; i < 10; i++)
+ T(("char %d = %s", i, _tracechar(SP->_fifo[i])));
+}
+#endif /* TRACE */
+
+NCURSES_EXPORT(int)
+ungetch(int ch)
+{
+ T((T_CALLED("ungetch(%s)"), _tracechar(ch)));
+
+ if (tail == -1)
+ returnCode(ERR);
+ if (head == -1) {
+ head = 0;
+ t_inc()
+ peek = tail; /* no raw keys */
+ } else
+ h_dec();
+
+ SP->_fifo[head] = ch;
+ T(("ungetch %s ok", _tracechar(ch)));
+#ifdef TRACE
+ if (_nc_tracing & TRACE_IEVENT)
+ _nc_fifo_dump();
+#endif
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_vline.c b/Build/source/libs/ncurses/ncurses/base/lib_vline.c
new file mode 100644
index 00000000000..c19570b6626
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_vline.c
@@ -0,0 +1,79 @@
+/****************************************************************************
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_vline.c
+**
+** The routine wvline().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_vline.c,v 1.9 2001/06/03 00:39:24 skimo Exp $")
+
+NCURSES_EXPORT(int)
+wvline(WINDOW *win, chtype ch, int n)
+{
+ int code = ERR;
+ NCURSES_SIZE_T row, col;
+ NCURSES_SIZE_T end;
+
+ T((T_CALLED("wvline(%p,%s,%d)"), win, _tracechtype(ch), n));
+
+ if (win) {
+ NCURSES_CH_T wch;
+ row = win->_cury;
+ col = win->_curx;
+ end = row + n - 1;
+ if (end > win->_maxy)
+ end = win->_maxy;
+
+ if (ch == 0)
+ SetChar(wch, ChCharOf(ACS_VLINE), ChAttrOf(ACS_VLINE));
+ else
+ SetChar(wch, ChCharOf(ch), ChAttrOf(ch));
+ wch = _nc_render(win, wch);
+
+ while (end >= row) {
+ struct ldat *line = &(win->_line[end]);
+ line->text[col] = wch;
+ CHANGED_CELL(line, col);
+ end--;
+ }
+
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_wattroff.c b/Build/source/libs/ncurses/ncurses/base/lib_wattroff.c
new file mode 100644
index 00000000000..2cfe6947cc8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_wattroff.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_wattroff.c
+**
+** The routine wattr_off().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_wattroff.c,v 1.7 2002/07/20 17:07:16 tom Exp $")
+
+NCURSES_EXPORT(int)
+wattr_off(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
+{
+ T((T_CALLED("wattr_off(%p,%s)"), win, _traceattr(at)));
+ if (win) {
+ T(("... current %s", _traceattr(win->_attrs)));
+ toggle_attr_off(win->_attrs, at);
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_wattron.c b/Build/source/libs/ncurses/ncurses/base/lib_wattron.c
new file mode 100644
index 00000000000..5d1a6a9d22b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_wattron.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_wattron.c
+**
+** The routines wattr_on().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_wattron.c,v 1.7 2002/07/20 17:07:16 tom Exp $")
+
+NCURSES_EXPORT(int)
+wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
+{
+ T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at)));
+ if (win) {
+ T(("... current %s", _traceattr(win->_attrs)));
+ toggle_attr_on(win->_attrs, at);
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_winch.c b/Build/source/libs/ncurses/ncurses/base/lib_winch.c
new file mode 100644
index 00000000000..18da9c59494
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_winch.c
@@ -0,0 +1,54 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ ****************************************************************************/
+
+/*
+** lib_winch.c
+**
+** The routine winch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_winch.c,v 1.5 2001/06/02 23:42:08 skimo Exp $")
+
+NCURSES_EXPORT(chtype)
+winch(WINDOW *win)
+{
+ T((T_CALLED("winch(%p)"), win));
+ if (win != 0) {
+ returnChar(CharOf(win->_line[win->_cury].text[win->_curx]) |
+ AttrOf(win->_line[win->_cury].text[win->_curx]));
+ } else {
+ returnChar(0);
+ }
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/lib_window.c b/Build/source/libs/ncurses/ncurses/base/lib_window.c
new file mode 100644
index 00000000000..25101673044
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/lib_window.c
@@ -0,0 +1,248 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_window.c
+**
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_window.c,v 1.21 2002/09/14 23:28:02 tom Exp $")
+
+NCURSES_EXPORT(void)
+_nc_synchook(WINDOW *win)
+/* hook to be called after each window change */
+{
+ if (win->_immed)
+ wrefresh(win);
+ if (win->_sync)
+ wsyncup(win);
+}
+
+NCURSES_EXPORT(int)
+mvderwin(WINDOW *win, int y, int x)
+/* move a derived window */
+{
+ WINDOW *orig;
+ int i;
+
+ T((T_CALLED("mvderwin(%p,%d,%d)"), win, y, x));
+
+ if (win && (orig = win->_parent)) {
+ if (win->_parx == x && win->_pary == y)
+ returnCode(OK);
+ if (x < 0 || y < 0)
+ returnCode(ERR);
+ if ((x + getmaxx(win) > getmaxx(orig)) ||
+ (y + getmaxy(win) > getmaxy(orig)))
+ returnCode(ERR);
+ } else
+ returnCode(ERR);
+ wsyncup(win);
+ win->_parx = x;
+ win->_pary = y;
+ for (i = 0; i < getmaxy(win); i++)
+ win->_line[i].text = &(orig->_line[y++].text[x]);
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+syncok(WINDOW *win, bool bf)
+/* enable/disable automatic wsyncup() on each change to window */
+{
+ T((T_CALLED("syncok(%p,%d)"), win, bf));
+
+ if (win) {
+ win->_sync = bf;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
+
+NCURSES_EXPORT(void)
+wsyncup(WINDOW *win)
+/* mark changed every cell in win's ancestors that is changed in win */
+/* Rewritten by J. Pfeifer, 1-Apr-96 (don't even think that...) */
+{
+ WINDOW *wp;
+
+ T((T_CALLED("wsyncup(%p)"), win));
+ if (win && win->_parent) {
+ for (wp = win; wp->_parent; wp = wp->_parent) {
+ int y;
+ WINDOW *pp = wp->_parent;
+
+ assert((wp->_pary <= pp->_maxy) &&
+ ((wp->_pary + wp->_maxy) <= pp->_maxy));
+
+ for (y = 0; y <= wp->_maxy; y++) {
+ int left = wp->_line[y].firstchar;
+ if (left >= 0) { /* line is touched */
+ struct ldat *line = &(pp->_line[wp->_pary + y]);
+ /* left & right character in parent window coordinates */
+ int right = wp->_line[y].lastchar + wp->_parx;
+ left += wp->_parx;
+
+ CHANGED_RANGE(line, left, right);
+ }
+ }
+ }
+ }
+ returnVoid;
+}
+
+NCURSES_EXPORT(void)
+wsyncdown(WINDOW *win)
+/* mark changed every cell in win that is changed in any of its ancestors */
+/* Rewritten by J. Pfeifer, 1-Apr-96 (don't even think that...) */
+{
+ T((T_CALLED("wsyncdown(%p)"), win));
+
+ if (win && win->_parent) {
+ WINDOW *pp = win->_parent;
+ int y;
+
+ /* This recursion guarantees, that the changes are propagated down-
+ wards from the root to our direct parent. */
+ wsyncdown(pp);
+
+ /* and now we only have to propagate the changes from our direct
+ parent, if there are any. */
+ assert((win->_pary <= pp->_maxy) &&
+ ((win->_pary + win->_maxy) <= pp->_maxy));
+
+ for (y = 0; y <= win->_maxy; y++) {
+ if (pp->_line[win->_pary + y].firstchar >= 0) { /* parent changed */
+ struct ldat *line = &(win->_line[y]);
+ /* left and right character in child coordinates */
+ int left = pp->_line[win->_pary + y].firstchar - win->_parx;
+ int right = pp->_line[win->_pary + y].lastchar - win->_parx;
+ /* The change maybe outside the childs range */
+ if (left < 0)
+ left = 0;
+ if (right > win->_maxx)
+ right = win->_maxx;
+ CHANGED_RANGE(line, left, right);
+ }
+ }
+ }
+ returnVoid;
+}
+
+NCURSES_EXPORT(void)
+wcursyncup(WINDOW *win)
+/* sync the cursor in all derived windows to its value in the base window */
+{
+ WINDOW *wp;
+
+ T((T_CALLED("wcursyncup(%p)"), win));
+ for (wp = win; wp && wp->_parent; wp = wp->_parent) {
+ wmove(wp->_parent, wp->_pary + wp->_cury, wp->_parx + wp->_curx);
+ }
+ returnVoid;
+}
+
+NCURSES_EXPORT(WINDOW *)
+dupwin(WINDOW *win)
+/* make an exact duplicate of the given window */
+{
+ WINDOW *nwin = 0;
+ size_t linesize;
+ int i;
+
+ T((T_CALLED("dupwin(%p)"), win));
+
+ if (win != 0) {
+
+ if (win->_flags & _ISPAD) {
+ nwin = newpad(win->_maxy + 1,
+ win->_maxx + 1);
+ } else {
+ nwin = newwin(win->_maxy + 1,
+ win->_maxx + 1,
+ win->_begy,
+ win->_begx);
+ }
+
+ if (nwin != 0) {
+
+ nwin->_curx = win->_curx;
+ nwin->_cury = win->_cury;
+ nwin->_maxy = win->_maxy;
+ nwin->_maxx = win->_maxx;
+ nwin->_begy = win->_begy;
+ nwin->_begx = win->_begx;
+ nwin->_yoffset = win->_yoffset;
+
+ nwin->_flags = win->_flags & ~_SUBWIN;
+ /* Due to the use of newwin(), the clone is not a subwindow.
+ * The text is really copied into the clone.
+ */
+
+ nwin->_attrs = win->_attrs;
+ nwin->_nc_bkgd = win->_nc_bkgd;
+
+ nwin->_notimeout = win->_notimeout;
+ nwin->_clear = win->_clear;
+ nwin->_leaveok = win->_leaveok;
+ nwin->_scroll = win->_scroll;
+ nwin->_idlok = win->_idlok;
+ nwin->_idcok = win->_idcok;
+ nwin->_immed = win->_immed;
+ nwin->_sync = win->_sync;
+ nwin->_use_keypad = win->_use_keypad;
+ nwin->_delay = win->_delay;
+
+ nwin->_parx = 0;
+ nwin->_pary = 0;
+ nwin->_parent = (WINDOW *) 0;
+ /* See above: the clone isn't a subwindow! */
+
+ nwin->_regtop = win->_regtop;
+ nwin->_regbottom = win->_regbottom;
+
+ if (win->_flags & _ISPAD)
+ nwin->_pad = win->_pad;
+
+ linesize = (win->_maxx + 1) * sizeof(NCURSES_CH_T);
+ for (i = 0; i <= nwin->_maxy; i++) {
+ memcpy(nwin->_line[i].text, win->_line[i].text, linesize);
+ nwin->_line[i].firstchar = win->_line[i].firstchar;
+ nwin->_line[i].lastchar = win->_line[i].lastchar;
+ }
+ }
+ }
+ returnWin(nwin);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/memmove.c b/Build/source/libs/ncurses/ncurses/base/memmove.c
new file mode 100644
index 00000000000..4fafc4cda9d
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/memmove.c
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: memmove.c,v 1.4 2000/12/10 02:43:28 tom Exp $")
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ ****************************************************************************/
+
+#if USE_MY_MEMMOVE
+#define DST ((char *)s1)
+#define SRC ((const char *)s2)
+NCURSES_EXPORT(void *)
+_nc_memmove(void *s1, const void *s2, size_t n)
+{
+ if (n != 0) {
+ if ((DST + n > SRC) && (SRC + n > DST)) {
+ static char *bfr;
+ static size_t length;
+ register size_t j;
+ if (length < n) {
+ length = (n * 3) / 2;
+ bfr = typeRealloc(char, length, bfr);
+ }
+ for (j = 0; j < n; j++)
+ bfr[j] = SRC[j];
+ SRC = bfr;
+ }
+ while (n-- != 0)
+ DST[n] = SRC[n];
+ }
+ return s1;
+}
+#else
+extern
+NCURSES_EXPORT(void)
+_nc_memmove(void); /* quiet's gcc warning */
+NCURSES_EXPORT(void)
+_nc_memmove(void)
+{
+} /* nonempty for strict ANSI compilers */
+#endif /* USE_MY_MEMMOVE */
diff --git a/Build/source/libs/ncurses/ncurses/base/nc_panel.c b/Build/source/libs/ncurses/ncurses/base/nc_panel.c
new file mode 100644
index 00000000000..59bfbbe86ef
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/nc_panel.c
@@ -0,0 +1,41 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: nc_panel.c,v 1.4 2000/12/10 02:43:28 tom Exp $")
+
+NCURSES_EXPORT(struct panelhook *)
+_nc_panelhook(void)
+{
+ return (SP ? &(SP->_panelHook) : NULL);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/resizeterm.c b/Build/source/libs/ncurses/ncurses/base/resizeterm.c
new file mode 100644
index 00000000000..09ba6007e53
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/resizeterm.c
@@ -0,0 +1,330 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 *
+ ****************************************************************************/
+
+/*
+ * This is an extension to the curses library. It provides callers with a hook
+ * into the NCURSES data to resize windows, primarily for use by programs
+ * running in an X Window terminal (e.g., xterm). I abstracted this module
+ * from my application library for NCURSES because it must be compiled with
+ * the private data structures -- T.Dickey 1995/7/4.
+ */
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: resizeterm.c,v 1.17 2004/07/31 20:24:38 tom Exp $")
+
+#define stolen_lines (screen_lines - SP->_lines_avail)
+
+static int current_lines;
+static int current_cols;
+
+#ifdef TRACE
+static void
+show_window_sizes(const char *name)
+{
+ WINDOWLIST *wp;
+
+ _tracef("%s resizing: %2d x %2d (%2d x %2d)", name, LINES, COLS,
+ screen_lines, screen_columns);
+ for (wp = _nc_windows; wp != 0; wp = wp->next) {
+ _tracef(" window %p is %2d x %2d at %2d,%2d",
+ &(wp->win),
+ wp->win._maxy + 1,
+ wp->win._maxx + 1,
+ wp->win._begy,
+ wp->win._begx);
+ }
+}
+#endif
+
+NCURSES_EXPORT(bool)
+is_term_resized(int ToLines, int ToCols)
+{
+ T((T_CALLED("is_term_resized(%d, %d)"), ToLines, ToCols));
+ returnCode(ToLines > 0
+ && ToCols > 0
+ && (ToLines != screen_lines
+ || ToCols != screen_columns));
+}
+
+/*
+ * Return the number of levels of child-windows under the current window.
+ */
+static int
+child_depth(WINDOW *cmp)
+{
+ int depth = 0;
+
+ if (cmp != 0) {
+ WINDOWLIST *wp;
+
+ for (wp = _nc_windows; wp != 0; wp = wp->next) {
+ WINDOW *tst = &(wp->win);
+ if (tst->_parent == cmp) {
+ depth = 1 + child_depth(tst);
+ break;
+ }
+ }
+ }
+ return depth;
+}
+
+/*
+ * Return the number of levels of parent-windows above the current window.
+ */
+static int
+parent_depth(WINDOW *cmp)
+{
+ int depth = 0;
+
+ if (cmp != 0) {
+ WINDOW *tst;
+ while ((tst = cmp->_parent) != 0) {
+ ++depth;
+ cmp = tst;
+ }
+ }
+ return depth;
+}
+
+/*
+ * FIXME: must adjust position so it's within the parent!
+ */
+static int
+adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen)
+{
+ int result;
+ int bottom = current_lines + SP->_topstolen - stolen;
+ int myLines = win->_maxy + 1;
+ int myCols = win->_maxx + 1;
+
+ T((T_CALLED("adjust_window(%p,%d,%d) currently %dx%d at %d,%d"),
+ win, ToLines, ToCols,
+ getmaxy(win), getmaxx(win),
+ getbegy(win), getbegx(win)));
+
+ if (win->_begy >= bottom) {
+ win->_begy += (ToLines - current_lines);
+ } else {
+ if (myLines == current_lines - stolen
+ && ToLines != current_lines)
+ myLines = ToLines - stolen;
+ else if (myLines == current_lines
+ && ToLines != current_lines)
+ myLines = ToLines;
+ }
+
+ if (myLines > ToLines)
+ myLines = ToLines;
+
+ if (myCols > ToCols)
+ myCols = ToCols;
+
+ if (myLines == current_lines
+ && ToLines != current_lines)
+ myLines = ToLines;
+
+ if (myCols == current_cols
+ && ToCols != current_cols)
+ myCols = ToCols;
+
+ result = wresize(win, myLines, myCols);
+ returnCode(result);
+}
+
+/*
+ * If we're decreasing size, recursively search for windows that have no
+ * children, decrease those to fit, then decrease the containing window, etc.
+ */
+static int
+decrease_size(int ToLines, int ToCols, int stolen)
+{
+ bool found;
+ int depth = 0;
+ WINDOWLIST *wp;
+
+ T((T_CALLED("decrease_size(%d, %d)"), ToLines, ToCols));
+
+ do {
+ found = FALSE;
+ TR(TRACE_UPDATE, ("decreasing size of windows to %dx%d, depth=%d",
+ ToLines, ToCols, depth));
+ for (wp = _nc_windows; wp != 0; wp = wp->next) {
+ WINDOW *win = &(wp->win);
+
+ if (!(win->_flags & _ISPAD)) {
+ if (child_depth(win) == depth) {
+ found = TRUE;
+ if (adjust_window(win, ToLines, ToCols, stolen) != OK)
+ returnCode(ERR);
+ }
+ }
+ }
+ ++depth;
+ } while (found);
+ returnCode(OK);
+}
+
+/*
+ * If we're increasing size, recursively search for windows that have no
+ * parent, increase those to fit, then increase the contained window, etc.
+ */
+static int
+increase_size(int ToLines, int ToCols, int stolen)
+{
+ bool found;
+ int depth = 0;
+ WINDOWLIST *wp;
+
+ T((T_CALLED("increase_size(%d, %d)"), ToLines, ToCols));
+
+ do {
+ found = FALSE;
+ TR(TRACE_UPDATE, ("increasing size of windows to %dx%d, depth=%d",
+ ToLines, ToCols, depth));
+ for (wp = _nc_windows; wp != 0; wp = wp->next) {
+ WINDOW *win = &(wp->win);
+
+ if (!(win->_flags & _ISPAD)) {
+ if (parent_depth(win) == depth) {
+ found = TRUE;
+ if (adjust_window(win, ToLines, ToCols, stolen) != OK)
+ returnCode(ERR);
+ }
+ }
+ }
+ ++depth;
+ } while (found);
+ returnCode(OK);
+}
+
+/*
+ * This function reallocates NCURSES window structures, with no side-effects
+ * such as ungetch().
+ */
+NCURSES_EXPORT(int)
+resize_term(int ToLines, int ToCols)
+{
+ int result = OK;
+ int was_stolen = (screen_lines - SP->_lines_avail);
+
+ T((T_CALLED("resize_term(%d,%d) old(%d,%d)"),
+ ToLines, ToCols,
+ screen_lines, screen_columns));
+
+ if (is_term_resized(ToLines, ToCols)) {
+ int myLines = current_lines = screen_lines;
+ int myCols = current_cols = screen_columns;
+
+#ifdef TRACE
+ if (_nc_tracing & TRACE_UPDATE)
+ show_window_sizes("before");
+#endif
+ if (ToLines > screen_lines) {
+ increase_size(myLines = ToLines, myCols, was_stolen);
+ current_lines = myLines;
+ current_cols = myCols;
+ }
+
+ if (ToCols > screen_columns) {
+ increase_size(myLines, myCols = ToCols, was_stolen);
+ current_lines = myLines;
+ current_cols = myCols;
+ }
+
+ if (ToLines < myLines ||
+ ToCols < myCols) {
+ decrease_size(ToLines, ToCols, was_stolen);
+ }
+
+ screen_lines = lines = ToLines;
+ screen_columns = columns = ToCols;
+
+ SP->_lines_avail = lines - was_stolen;
+
+ if (SP->oldhash) {
+ FreeAndNull(SP->oldhash);
+ }
+ if (SP->newhash) {
+ FreeAndNull(SP->newhash);
+ }
+#ifdef TRACE
+ if (_nc_tracing & TRACE_UPDATE) {
+ LINES = ToLines - was_stolen;
+ COLS = ToCols;
+ show_window_sizes("after");
+ }
+#endif
+ }
+
+ /*
+ * Always update LINES, to allow for call from lib_doupdate.c which
+ * needs to have the count adjusted by the stolen (ripped off) lines.
+ */
+ LINES = ToLines - was_stolen;
+ COLS = ToCols;
+
+ returnCode(result);
+}
+
+/*
+ * This function reallocates NCURSES window structures. It is invoked in
+ * response to a SIGWINCH interrupt. Other user-defined windows may also need
+ * to be reallocated.
+ *
+ * Because this performs memory allocation, it should not (in general) be
+ * invoked directly from the signal handler.
+ */
+NCURSES_EXPORT(int)
+resizeterm(int ToLines, int ToCols)
+{
+ int result = OK;
+
+ SP->_sig_winch = FALSE;
+
+ T((T_CALLED("resizeterm(%d,%d) old(%d,%d)"),
+ ToLines, ToCols,
+ screen_lines, screen_columns));
+
+ if (is_term_resized(ToLines, ToCols)) {
+
+#if USE_SIGWINCH
+ ungetch(KEY_RESIZE); /* so application can know this */
+ clearok(curscr, TRUE); /* screen contents are unknown */
+#endif
+
+ result = resize_term(ToLines, ToCols);
+ }
+
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/safe_sprintf.c b/Build/source/libs/ncurses/ncurses/base/safe_sprintf.c
new file mode 100644
index 00000000000..81fe44f0c78
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/safe_sprintf.c
@@ -0,0 +1,262 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: safe_sprintf.c,v 1.18 2003/08/09 21:52:04 tom Exp $")
+
+#if USE_SAFE_SPRINTF
+
+typedef enum {
+ Flags, Width, Prec, Type, Format
+} PRINTF;
+
+#define VA_INTGR(type) ival = va_arg(ap, type)
+#define VA_FLOAT(type) fval = va_arg(ap, type)
+#define VA_POINT(type) pval = (void *)va_arg(ap, type)
+
+/*
+ * Scan a variable-argument list for printf to determine the number of
+ * characters that would be emitted.
+ */
+static int
+_nc_printf_length(const char *fmt, va_list ap)
+{
+ size_t length = BUFSIZ;
+ char *buffer;
+ char *format;
+ int len = 0;
+ size_t fmt_len;
+ char fmt_arg[BUFSIZ];
+
+ if (fmt == 0 || *fmt == '\0')
+ return 0;
+ fmt_len = strlen(fmt) + 1;
+ if ((format = typeMalloc(char, fmt_len)) == 0)
+ return -1;
+ if ((buffer = typeMalloc(char, length)) == 0) {
+ free(format);
+ return -1;
+ }
+
+ while (*fmt != '\0') {
+ if (*fmt == '%') {
+ static char dummy[] = "";
+ PRINTF state = Flags;
+ char *pval = dummy; /* avoid const-cast */
+ double fval = 0.0;
+ int done = FALSE;
+ int ival = 0;
+ int prec = -1;
+ int type = 0;
+ int used = 0;
+ int width = -1;
+ size_t f = 0;
+
+ format[f++] = *fmt;
+ while (*++fmt != '\0' && len >= 0 && !done) {
+ format[f++] = *fmt;
+
+ if (isdigit(UChar(*fmt))) {
+ int num = *fmt - '0';
+ if (state == Flags && num != 0)
+ state = Width;
+ if (state == Width) {
+ if (width < 0)
+ width = 0;
+ width = (width * 10) + num;
+ } else if (state == Prec) {
+ if (prec < 0)
+ prec = 0;
+ prec = (prec * 10) + num;
+ }
+ } else if (*fmt == '*') {
+ VA_INTGR(int);
+ if (state == Flags)
+ state = Width;
+ if (state == Width) {
+ width = ival;
+ } else if (state == Prec) {
+ prec = ival;
+ }
+ sprintf(fmt_arg, "%d", ival);
+ fmt_len += strlen(fmt_arg);
+ if ((format = realloc(format, fmt_len)) == 0) {
+ return -1;
+ }
+ strcpy(&format[--f], fmt_arg);
+ f = strlen(format);
+ } else if (isalpha(UChar(*fmt))) {
+ done = TRUE;
+ switch (*fmt) {
+ case 'Z': /* FALLTHRU */
+ case 'h': /* FALLTHRU */
+ case 'l': /* FALLTHRU */
+ done = FALSE;
+ type = *fmt;
+ break;
+ case 'i': /* FALLTHRU */
+ case 'd': /* FALLTHRU */
+ case 'u': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ if (type == 'l')
+ VA_INTGR(long);
+ else if (type == 'Z')
+ VA_INTGR(size_t);
+ else
+ VA_INTGR(int);
+ used = 'i';
+ break;
+ case 'f': /* FALLTHRU */
+ case 'e': /* FALLTHRU */
+ case 'E': /* FALLTHRU */
+ case 'g': /* FALLTHRU */
+ case 'G': /* FALLTHRU */
+ VA_FLOAT(double);
+ used = 'f';
+ break;
+ case 'c':
+ VA_INTGR(int);
+ used = 'i';
+ break;
+ case 's':
+ VA_POINT(char *);
+ if (prec < 0)
+ prec = strlen(pval);
+ if (prec > (int) length) {
+ length = length + prec;
+ buffer = typeRealloc(char, length, buffer);
+ if (buffer == 0) {
+ free(format);
+ return -1;
+ }
+ }
+ used = 'p';
+ break;
+ case 'p':
+ VA_POINT(void *);
+ used = 'p';
+ break;
+ case 'n':
+ VA_POINT(int *);
+ used = 0;
+ break;
+ default:
+ break;
+ }
+ } else if (*fmt == '.') {
+ state = Prec;
+ } else if (*fmt == '%') {
+ done = TRUE;
+ used = 'p';
+ }
+ }
+ format[f] = '\0';
+ switch (used) {
+ case 'i':
+ sprintf(buffer, format, ival);
+ break;
+ case 'f':
+ sprintf(buffer, format, fval);
+ break;
+ default:
+ sprintf(buffer, format, pval);
+ break;
+ }
+ len += (int) strlen(buffer);
+ } else {
+ fmt++;
+ len++;
+ }
+ }
+
+ free(buffer);
+ free(format);
+ return len;
+}
+#endif
+
+/*
+ * Wrapper for vsprintf that allocates a buffer big enough to hold the result.
+ */
+NCURSES_EXPORT(char *)
+_nc_printf_string(const char *fmt, va_list ap)
+{
+ static char *buf;
+ static size_t used;
+ char *result = 0;
+
+ if (fmt != 0) {
+#if USE_SAFE_SPRINTF
+ int len = _nc_printf_length(fmt, ap);
+
+ if ((int) used < len + 1) {
+ used = 2 * (len + 1);
+ buf = typeRealloc(char, used, buf);
+ }
+ if (buf != 0) {
+ *buf = '\0';
+ if (len >= 0) {
+ vsprintf(buf, fmt, ap);
+ }
+ result = buf;
+ }
+#else
+ static int rows, cols;
+
+ if (screen_lines > rows || screen_columns > cols) {
+ if (screen_lines > rows)
+ rows = screen_lines;
+ if (screen_columns > cols)
+ cols = screen_columns;
+ used = (rows * (cols + 1)) + 1;
+ buf = typeRealloc(char, used, buf);
+ }
+
+ if (buf != 0) {
+# if HAVE_VSNPRINTF
+ vsnprintf(buf, used, fmt, ap); /* GNU extension */
+# else
+ vsprintf(buf, fmt, ap); /* ANSI */
+# endif
+ result = buf;
+ }
+#endif
+ } else if (buf != 0) { /* see _nc_freeall() */
+ free(buf);
+ buf = 0;
+ used = 0;
+ }
+ return result;
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/sigaction.c b/Build/source/libs/ncurses/ncurses/base/sigaction.c
new file mode 100644
index 00000000000..36442e090a4
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/sigaction.c
@@ -0,0 +1,99 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2003 *
+ ****************************************************************************/
+
+/* This file provides sigaction() emulation using sigvec() */
+/* Use only if this is non POSIX system */
+
+MODULE_ID("$Id: sigaction.c,v 1.14 2003/12/07 01:06:52 tom Exp $")
+
+static int
+_nc_sigaction(int sig, sigaction_t * sigact, sigaction_t * osigact)
+{
+ return sigvec(sig, sigact, osigact);
+}
+
+static int
+_nc_sigemptyset(sigset_t * mask)
+{
+ *mask = 0;
+ return 0;
+}
+
+static int
+_nc_sigprocmask(int mode, sigset_t * mask, sigset_t * omask)
+{
+ sigset_t current = sigsetmask(0);
+
+ if (omask)
+ *omask = current;
+
+ if (mode == SIG_BLOCK)
+ current |= *mask;
+ else if (mode == SIG_UNBLOCK)
+ current &= ~*mask;
+ else if (mode == SIG_SETMASK)
+ current = *mask;
+
+ sigsetmask(current);
+ return 0;
+}
+
+static int
+_nc_sigaddset(sigset_t * mask, int sig)
+{
+ *mask |= sigmask(sig);
+ return 0;
+}
+
+/* not used in lib_tstp.c */
+#if 0
+static int
+_nc_sigsuspend(sigset_t * mask)
+{
+ return sigpause(*mask);
+}
+
+static int
+_nc_sigdelset(sigset_t * mask, int sig)
+{
+ *mask &= ~sigmask(sig);
+ return 0;
+}
+
+static int
+_nc_sigismember(sigset_t * mask, int sig)
+{
+ return (*mask & sigmask(sig)) != 0;
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/base/tries.c b/Build/source/libs/ncurses/ncurses/base/tries.c
new file mode 100644
index 00000000000..3ae47898b29
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/tries.c
@@ -0,0 +1,141 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+/*
+** tries.c
+**
+** Functions to manage the tree of partial-completions for keycodes.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: tries.c,v 1.19 2003/05/17 23:11:24 tom Exp $")
+
+/*
+ * Expand a keycode into the string that it corresponds to, returning null if
+ * no match was found, otherwise allocating a string of the result.
+ */
+NCURSES_EXPORT(char *)
+_nc_expand_try(struct tries *tree, unsigned short code, int *count, size_t len)
+{
+ struct tries *ptr = tree;
+ char *result = 0;
+
+ if (code != 0) {
+ while (ptr != 0) {
+ if ((result = _nc_expand_try(ptr->child, code, count, len + 1))
+ != 0) {
+ break;
+ }
+ if (ptr->value == code) {
+ *count -= 1;
+ if (*count == -1) {
+ result = typeCalloc(char, len + 2);
+ break;
+ }
+ }
+ ptr = ptr->sibling;
+ }
+ }
+ if (result != 0) {
+ if ((result[len] = ptr->ch) == 0)
+ *((unsigned char *) (result + len)) = 128;
+#ifdef TRACE
+ if (len == 0)
+ _tracef("expand_key %s %s", _tracechar(code), _nc_visbuf(result));
+#endif
+ }
+ return result;
+}
+
+/*
+ * Remove a code from the specified tree, freeing the unused nodes. Returns
+ * true if the code was found/removed.
+ */
+NCURSES_EXPORT(int)
+_nc_remove_key(struct tries **tree, unsigned short code)
+{
+ T((T_CALLED("_nc_remove_key(%p,%d)"), tree, code));
+
+ if (code == 0)
+ returnCode(FALSE);
+
+ while (*tree != 0) {
+ if (_nc_remove_key(&(*tree)->child, code)) {
+ returnCode(TRUE);
+ }
+ if ((*tree)->value == code) {
+ if ((*tree)->child) {
+ /* don't cut the whole sub-tree */
+ (*tree)->value = 0;
+ } else {
+ struct tries *to_free = *tree;
+ *tree = (*tree)->sibling;
+ free(to_free);
+ }
+ returnCode(TRUE);
+ }
+ tree = &(*tree)->sibling;
+ }
+ returnCode(FALSE);
+}
+
+/*
+ * Remove a string from the specified tree, freeing the unused nodes. Returns
+ * true if the string was found/removed.
+ */
+NCURSES_EXPORT(int)
+_nc_remove_string(struct tries **tree, const char *string)
+{
+ T((T_CALLED("_nc_remove_string(%p,%s)"), tree, _nc_visbuf(string)));
+
+ if (string == 0 || *string == 0)
+ returnCode(FALSE);
+
+ while (*tree != 0) {
+ if (UChar((*tree)->ch) == UChar(*string)) {
+ if (string[1] != 0)
+ returnCode(_nc_remove_string(&(*tree)->child, string + 1));
+ if ((*tree)->child == 0) {
+ struct tries *to_free = *tree;
+ *tree = (*tree)->sibling;
+ free(to_free);
+ returnCode(TRUE);
+ } else {
+ returnCode(FALSE);
+ }
+ }
+ tree = &(*tree)->sibling;
+ }
+ returnCode(FALSE);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/version.c b/Build/source/libs/ncurses/ncurses/base/version.c
new file mode 100644
index 00000000000..6e7a9870d3b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/version.c
@@ -0,0 +1,42 @@
+/****************************************************************************
+ * Copyright (c) 1999-2000,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 <dickey@clark.net> 1999 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: version.c,v 1.5 2004/01/10 21:18:17 tom Exp $")
+
+NCURSES_EXPORT(const char *)
+curses_version(void)
+{
+ T((T_CALLED("curses_version()")));
+ returnPtr("ncurses " NCURSES_VERSION_STRING);
+}
diff --git a/Build/source/libs/ncurses/ncurses/base/vsscanf.c b/Build/source/libs/ncurses/ncurses/base/vsscanf.c
new file mode 100644
index 00000000000..e6253c3a38a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/vsscanf.c
@@ -0,0 +1,356 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * State-machine fallback written by Thomas E. Dickey 2002 *
+ ****************************************************************************/
+
+/*
+ * This function is needed to support vwscanw
+ */
+
+#include <curses.priv.h>
+
+#if !HAVE_VSSCANF
+
+MODULE_ID("$Id: vsscanf.c,v 1.18 2004/04/03 20:27:02 tom Exp $")
+
+#if !(HAVE_VFSCANF || HAVE__DOSCAN)
+
+#include <ctype.h>
+
+#define L_SQUARE '['
+#define R_SQUARE ']'
+
+typedef enum {
+ cUnknown
+ ,cError /* anything that isn't ANSI */
+ ,cAssigned
+ ,cChar
+ ,cInt
+ ,cFloat
+ ,cDouble
+ ,cPointer
+ ,cLong
+ ,cShort
+ ,cRange
+ ,cString
+} ChunkType;
+
+typedef enum {
+ oUnknown
+ ,oShort
+ ,oLong
+} OtherType;
+
+typedef enum {
+ sUnknown
+ ,sPercent /* last was '%' beginning a format */
+ ,sNormal /* ...somewhere in the middle */
+ ,sLeft /* last was left square bracket beginning a range */
+ ,sRange /* ...somewhere in the middle */
+ ,sFinal /* last finished a format */
+} ScanState;
+
+static ChunkType
+final_ch(int ch, OtherType other)
+{
+ ChunkType result = cUnknown;
+
+ switch (ch) {
+ case 'c':
+ if (other == oUnknown)
+ result = cChar;
+ else
+ result = cError;
+ break;
+ case 'd':
+ case 'i':
+ case 'X':
+ case 'x':
+ switch (other) {
+ case oUnknown:
+ result = cInt;
+ break;
+ case oShort:
+ result = cShort;
+ break;
+ case oLong:
+ result = cLong;
+ break;
+ }
+ break;
+ case 'E':
+ case 'e':
+ case 'f':
+ case 'g':
+ switch (other) {
+ case oUnknown:
+ result = cFloat;
+ break;
+ case oShort:
+ result = cError;
+ break;
+ case oLong:
+ result = cDouble;
+ break;
+ }
+ break;
+ case 'n':
+ if (other == oUnknown)
+ result = cAssigned;
+ else
+ result = cError;
+ break;
+ case 'p':
+ if (other == oUnknown)
+ result = cPointer;
+ else
+ result = cError;
+ break;
+ case 's':
+ if (other == oUnknown)
+ result = cString;
+ else
+ result = cError;
+ break;
+ }
+ return result;
+}
+
+static OtherType
+other_ch(int ch)
+{
+ OtherType result = oUnknown;
+ switch (ch) {
+ case 'h':
+ result = oShort;
+ break;
+ case 'l':
+ result = oLong;
+ break;
+ }
+ return result;
+}
+#endif
+
+/*VARARGS2*/
+NCURSES_EXPORT(int)
+vsscanf(const char *str, const char *format, va_list ap)
+{
+#if HAVE_VFSCANF || HAVE__DOSCAN
+ /*
+ * This code should work on anything descended from AT&T SVr1.
+ */
+ FILE strbuf;
+
+ strbuf._flag = _IOREAD;
+ strbuf._ptr = strbuf._base = (unsigned char *) str;
+ strbuf._cnt = strlen(str);
+ strbuf._file = _NFILE;
+
+#if HAVE_VFSCANF
+ return (vfscanf(&strbuf, format, ap));
+#else
+ return (_doscan(&strbuf, format, ap));
+#endif
+#else
+ static int can_convert = -1;
+
+ int assigned = 0;
+ int consumed = 0;
+
+ T((T_CALLED("vsscanf(%s,%s,...)"),
+ _nc_visbuf2(1, str),
+ _nc_visbuf2(2, format)));
+
+ /*
+ * This relies on having a working "%n" format conversion. Check if it
+ * works. Only very old C libraries do not support it.
+ *
+ * FIXME: move this check into the configure script.
+ */
+ if (can_convert < 0) {
+ int check1;
+ int check2;
+ if (sscanf("123", "%d%n", &check1, &check2) > 0
+ && check1 == 123
+ && check2 == 3) {
+ can_convert = 1;
+ } else {
+ can_convert = 0;
+ }
+ }
+
+ if (can_convert) {
+ size_t len_fmt = strlen(format) + 32;
+ char *my_fmt = malloc(len_fmt);
+ ChunkType chunk, ctest;
+ OtherType other, otest;
+ ScanState state;
+ unsigned n;
+ int eaten;
+ void *pointer;
+
+ if (my_fmt != 0) {
+ /*
+ * Split the original format into chunks, adding a "%n" to the end
+ * of each (except of course if it used %n), and use that
+ * information to decide where to start scanning the next chunk.
+ *
+ * FIXME: does %n count bytes or characters? If the latter, this
+ * will require further work for multibyte strings.
+ */
+ while (*format != '\0') {
+ /* find a chunk */
+ state = sUnknown;
+ chunk = cUnknown;
+ other = oUnknown;
+ pointer = 0;
+ for (n = 0; format[n] != 0 && state != sFinal; ++n) {
+ my_fmt[n] = format[n];
+ switch (state) {
+ case sUnknown:
+ if (format[n] == '%')
+ state = sPercent;
+ break;
+ case sPercent:
+ if (format[n] == '%') {
+ state = sUnknown;
+ } else if (format[n] == L_SQUARE) {
+ state = sLeft;
+ } else {
+ state = sNormal;
+ --n;
+ }
+ break;
+ case sLeft:
+ state = sRange;
+ if (format[n] == '^') {
+ ++n;
+ my_fmt[n] = format[n];
+ }
+ break;
+ case sRange:
+ if (format[n] == R_SQUARE) {
+ state = sFinal;
+ chunk = cRange;
+ }
+ break;
+ case sNormal:
+ if (format[n] == '*') {
+ state = sUnknown;
+ } else {
+ if ((ctest = final_ch(format[n], other)) != cUnknown) {
+ state = sFinal;
+ chunk = ctest;
+ } else if ((otest = other_ch(format[n])) != oUnknown) {
+ other = otest;
+ } else if (isalpha(UChar(format[n]))) {
+ state = sFinal;
+ chunk = cError;
+ }
+ }
+ break;
+ case sFinal:
+ break;
+ }
+ }
+ my_fmt[n] = '\0';
+ format += n;
+
+ if (chunk == cUnknown
+ || chunk == cError) {
+ if (assigned == 0)
+ assigned = EOF;
+ break;
+ }
+
+ /* add %n, if the format was not that */
+ if (chunk != cAssigned) {
+ strcat(my_fmt, "%n");
+ }
+
+ switch (chunk) {
+ case cAssigned:
+ strcat(my_fmt, "%n");
+ pointer = &eaten;
+ break;
+ case cInt:
+ pointer = va_arg(ap, int *);
+ break;
+ case cShort:
+ pointer = va_arg(ap, short *);
+ break;
+ case cFloat:
+ pointer = va_arg(ap, float *);
+ break;
+ case cDouble:
+ pointer = va_arg(ap, double *);
+ break;
+ case cLong:
+ pointer = va_arg(ap, long *);
+ break;
+ case cPointer:
+ pointer = va_arg(ap, void *);
+ break;
+ case cChar:
+ case cRange:
+ case cString:
+ pointer = va_arg(ap, char *);
+ break;
+ case cError:
+ case cUnknown:
+ break;
+ }
+ /* do the conversion */
+ T(("...converting chunk #%d type %d(%s,%s)",
+ assigned + 1, chunk,
+ _nc_visbuf2(1, str + consumed),
+ _nc_visbuf2(2, my_fmt)));
+ if (sscanf(str + consumed, my_fmt, pointer, &eaten) > 0)
+ consumed += eaten;
+ else
+ break;
+ ++assigned;
+ }
+ free(my_fmt);
+ }
+ }
+ returnCode(assigned);
+#endif
+}
+#else
+extern
+NCURSES_EXPORT(void)
+_nc_vsscanf(void); /* quiet's gcc warning */
+NCURSES_EXPORT(void)
+_nc_vsscanf(void)
+{
+} /* nonempty for strict ANSI compilers */
+#endif /* !HAVE_VSSCANF */
diff --git a/Build/source/libs/ncurses/ncurses/base/wresize.c b/Build/source/libs/ncurses/ncurses/base/wresize.c
new file mode 100644
index 00000000000..a61742a57c6
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/base/wresize.c
@@ -0,0 +1,239 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 1996-2002 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: wresize.c,v 1.23 2002/09/28 15:15:51 tom Exp $")
+
+static int
+cleanup_lines(struct ldat *data, int length)
+{
+ while (--length >= 0)
+ free(data->text);
+ free(data);
+ return ERR;
+}
+
+/*
+ * If we have reallocated the ldat structs, we will have to repair pointers
+ * used in subwindows.
+ */
+static void
+repair_subwindows(WINDOW *cmp)
+{
+ WINDOWLIST *wp;
+ struct ldat *pline = cmp->_line;
+ int row;
+
+ for (wp = _nc_windows; wp != 0; wp = wp->next) {
+ WINDOW *tst = &(wp->win);
+
+ if (tst->_parent == cmp) {
+
+ if (tst->_pary > cmp->_maxy)
+ tst->_pary = cmp->_maxy;
+ if (tst->_parx > cmp->_maxx)
+ tst->_parx = cmp->_maxx;
+
+ if (tst->_maxy + tst->_pary > cmp->_maxy)
+ tst->_maxy = cmp->_maxy - tst->_pary;
+ if (tst->_maxx + tst->_parx > cmp->_maxx)
+ tst->_maxx = cmp->_maxx - tst->_parx;
+
+ for (row = 0; row <= tst->_maxy; ++row) {
+ tst->_line[row].text = &pline[tst->_pary + row].text[tst->_parx];
+ }
+ repair_subwindows(tst);
+ }
+ }
+}
+
+/*
+ * Reallocate a curses WINDOW struct to either shrink or grow to the specified
+ * new lines/columns. If it grows, the new character cells are filled with
+ * blanks. The application is responsible for repainting the blank area.
+ */
+NCURSES_EXPORT(int)
+wresize(WINDOW *win, int ToLines, int ToCols)
+{
+ int col, row, size_x, size_y;
+ struct ldat *pline;
+ struct ldat *new_lines = 0;
+
+#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)
+ _tracedump("...before", win);
+ }
+#endif
+
+ if (!win || --ToLines < 0 || --ToCols < 0)
+ returnCode(ERR);
+
+ size_x = win->_maxx;
+ size_y = win->_maxy;
+
+ if (ToLines == size_y
+ && ToCols == size_x)
+ returnCode(OK);
+
+ if ((win->_flags & _SUBWIN)) {
+ /*
+ * 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 (win->_pary + ToLines > win->_parent->_maxy
+ || win->_parx + ToCols > win->_parent->_maxx) {
+ returnCode(ERR);
+ }
+ pline = win->_parent->_line;
+ } else {
+ pline = 0;
+ }
+
+ /*
+ * Allocate new memory as needed. Do the allocations without modifying
+ * the original window, in case an allocation fails. Always allocate
+ * (at least temporarily) the array pointing to the individual lines.
+ */
+ new_lines = typeCalloc(struct ldat, (unsigned) (ToLines + 1));
+ if (new_lines == 0)
+ returnCode(ERR);
+
+ /*
+ * For each line in the target, allocate or adjust pointers for the
+ * corresponding text, depending on whether this is a window or a
+ * subwindow.
+ */
+ for (row = 0; row <= ToLines; ++row) {
+ int begin = (row > size_y) ? 0 : (size_x + 1);
+ int end = ToCols;
+ NCURSES_CH_T *s;
+
+ if (!(win->_flags & _SUBWIN)) {
+ if (row <= size_y) {
+ if (ToCols != size_x) {
+ if ((s = typeMalloc(NCURSES_CH_T, ToCols + 1)) == 0)
+ returnCode(cleanup_lines(new_lines, row));
+ for (col = 0; col <= ToCols; ++col) {
+ s[col] = (col <= size_x
+ ? win->_line[row].text[col]
+ : win->_nc_bkgd);
+ }
+ } else {
+ s = win->_line[row].text;
+ }
+ } else {
+ if ((s = typeMalloc(NCURSES_CH_T, ToCols + 1)) == 0)
+ returnCode(cleanup_lines(new_lines, row));
+ for (col = 0; col <= ToCols; ++col)
+ s[col] = win->_nc_bkgd;
+ }
+ } else {
+ s = &pline[win->_pary + row].text[win->_parx];
+ }
+
+ if_USE_SCROLL_HINTS(new_lines[row].oldindex = row);
+ if (row <= size_y) {
+ new_lines[row].firstchar = win->_line[row].firstchar;
+ new_lines[row].lastchar = win->_line[row].lastchar;
+ }
+ if ((ToCols != size_x) || (row > size_y)) {
+ if (end >= begin) { /* growing */
+ if (new_lines[row].firstchar < begin)
+ new_lines[row].firstchar = begin;
+ } else { /* shrinking */
+ new_lines[row].firstchar = 0;
+ }
+ new_lines[row].lastchar = ToCols;
+ }
+ new_lines[row].text = s;
+ }
+
+ /*
+ * Dispose of unwanted memory.
+ */
+ if (!(win->_flags & _SUBWIN)) {
+ if (ToCols == size_x) {
+ for (row = ToLines + 1; row <= size_y; row++) {
+ free(win->_line[row].text);
+ }
+ } else {
+ for (row = 0; row <= size_y; row++) {
+ free(win->_line[row].text);
+ }
+ }
+ }
+
+ free(win->_line);
+ win->_line = new_lines;
+
+ /*
+ * 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;
+
+ /*
+ * Check for subwindows of this one, and readjust pointers to our text,
+ * if needed.
+ */
+ repair_subwindows(win);
+
+#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);
+#endif
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/curses.priv.h b/Build/source/libs/ncurses/ncurses/curses.priv.h
new file mode 100644
index 00000000000..a34f679401c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/curses.priv.h
@@ -0,0 +1,1131 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+
+/*
+ * $Id: curses.priv.h,v 1.260 2004/10/16 15:19:14 tom Exp $
+ *
+ * curses.priv.h
+ *
+ * Header file for curses library objects which are private to
+ * the library.
+ *
+ */
+
+#ifndef CURSES_PRIV_H
+#define CURSES_PRIV_H 1
+
+#include <ncurses_dll.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ncurses_cfg.h>
+
+#if USE_RCS_IDS
+#define MODULE_ID(id) static const char Ident[] = id;
+#else
+#define MODULE_ID(id) /*nothing*/
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if HAVE_SYS_BSDTYPES_H
+#include <sys/bsdtypes.h> /* needed for ISC */
+#endif
+
+#if HAVE_LIMITS_H
+# include <limits.h>
+#elif HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#include <assert.h>
+#include <stdio.h>
+
+#include <errno.h>
+
+#ifndef PATH_MAX
+# if defined(_POSIX_PATH_MAX)
+# define PATH_MAX _POSIX_PATH_MAX
+# elif defined(MAXPATHLEN)
+# define PATH_MAX MAXPATHLEN
+# else
+# define PATH_MAX 255 /* the Posix minimum path-size */
+# endif
+#endif
+
+#if DECL_ERRNO
+extern int errno;
+#endif
+
+#include <nc_panel.h>
+
+/* Some systems have a broken 'select()', but workable 'poll()'. Use that */
+#if HAVE_WORKING_POLL
+#define USE_FUNC_POLL 1
+#if HAVE_POLL_H
+#include <poll.h>
+#else
+#include <sys/poll.h>
+#endif
+#else
+#define USE_FUNC_POLL 0
+#endif
+
+/* include signal.h before curses.h to work-around defect in glibc 2.1.3 */
+#include <signal.h>
+
+/* Alessandro Rubini's GPM (general-purpose mouse) */
+#if HAVE_LIBGPM && HAVE_GPM_H
+#define USE_GPM_SUPPORT 1
+#else
+#define USE_GPM_SUPPORT 0
+#endif
+
+/* QNX mouse support */
+#if defined(__QNX__) && !defined(__QNXNTO__)
+#define USE_QNX_MOUSE 1
+#else
+#define USE_QNX_MOUSE 0
+#endif
+
+/* EMX mouse support */
+#ifdef __EMX__
+#define USE_EMX_MOUSE 1
+#else
+#define USE_EMX_MOUSE 0
+#endif
+
+#define DEFAULT_MAXCLICK 166
+#define EV_MAX 8 /* size of mouse circular event queue */
+
+/*
+ * If we don't have signals to support it, don't add a sigwinch handler.
+ * In any case, resizing is an extended feature. Use it if we've got it.
+ */
+#if !NCURSES_EXT_FUNCS
+#undef HAVE_SIZECHANGE
+#define HAVE_SIZECHANGE 0
+#endif
+
+#if HAVE_SIZECHANGE && defined(SIGWINCH)
+#define USE_SIZECHANGE 1
+#else
+#define USE_SIZECHANGE 0
+#undef USE_SIGWINCH
+#define USE_SIGWINCH 0
+#endif
+
+/*
+ * If desired, one can configure this, disabling environment variables that
+ * point to custom terminfo/termcap locations.
+ */
+#ifdef USE_ROOT_ENVIRON
+#define use_terminfo_vars() 1
+#else
+#define use_terminfo_vars() _nc_env_access()
+extern NCURSES_EXPORT(int) _nc_env_access (void);
+#endif
+
+/*
+ * Not all platforms have memmove; some have an equivalent bcopy. (Some may
+ * have neither).
+ */
+#if USE_OK_BCOPY
+#define memmove(d,s,n) bcopy(s,d,n)
+#elif USE_MY_MEMMOVE
+#define memmove(d,s,n) _nc_memmove(d,s,n)
+extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
+#endif
+
+/*
+ * Scroll hints are useless when hashmap is used
+ */
+#if !USE_SCROLL_HINTS
+#if !USE_HASHMAP
+#define USE_SCROLL_HINTS 1
+#else
+#define USE_SCROLL_HINTS 0
+#endif
+#endif
+
+#if USE_SCROLL_HINTS
+#define if_USE_SCROLL_HINTS(stmt) stmt
+#else
+#define if_USE_SCROLL_HINTS(stmt) /*nothing*/
+#endif
+
+/*
+ * Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
+ * when we're throwing control codes at the screen at high volume. To see
+ * this, re-enable USE_HARD_TABS and run worm for a while. Other systems
+ * probably don't want to define this either due to uncertainties about tab
+ * delays and expansion in raw mode.
+ */
+
+struct tries {
+ struct tries *child; /* ptr to child. NULL if none */
+ struct tries *sibling; /* ptr to sibling. NULL if none */
+ unsigned char ch; /* character at this node */
+ unsigned short value; /* code of string so far. 0 if none. */
+};
+
+/*
+ * Definitions for color pairs
+ */
+#define C_SHIFT 8 /* we need more bits than there are colors */
+#define C_MASK ((1 << C_SHIFT) - 1)
+
+#define PAIR_OF(fg, bg) ((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK))
+
+/*
+ * Common/troublesome character definitions
+ */
+#define L_BRACE '{'
+#define R_BRACE '}'
+#define S_QUOTE '\''
+#define D_QUOTE '"'
+
+#define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"
+
+/*
+ * Structure for palette tables
+ */
+
+typedef struct
+{
+ short red, green, blue; /* what color_content() returns */
+ short r, g, b; /* params to init_color() */
+ int init; /* true if we called init_color() */
+}
+color_t;
+
+#define MAXCOLUMNS 135
+#define MAXLINES 66
+#define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */
+
+#define ACS_LEN 128
+
+#define WINDOWLIST struct _win_list
+
+#if USE_WIDEC_SUPPORT
+#define _nc_bkgd _bkgrnd
+#else
+#undef _XOPEN_SOURCE_EXTENDED
+#define _nc_bkgd _bkgd
+#define wgetbkgrnd(win, wch) *wch = win->_bkgd
+#define wbkgrnd wbkgd
+#endif
+
+#include <curses.h> /* we'll use -Ipath directive to get the right one! */
+#include <term.h>
+
+struct ldat
+{
+ NCURSES_CH_T *text; /* text of the line */
+ NCURSES_SIZE_T firstchar; /* first changed character in the line */
+ NCURSES_SIZE_T lastchar; /* last changed character in the line */
+ NCURSES_SIZE_T oldindex; /* index of the line at last update */
+};
+
+typedef enum {
+ M_XTERM = -1 /* use xterm's mouse tracking? */
+ ,M_NONE = 0 /* no mouse device */
+#if USE_GPM_SUPPORT
+ ,M_GPM /* use GPM */
+#endif
+#if USE_SYSMOUSE
+ ,M_SYSMOUSE /* FreeBSD sysmouse on console */
+#endif
+} MouseType;
+
+/*
+ * Structure for soft labels.
+ */
+
+typedef struct
+{
+ char *ent_text; /* text for the label */
+ char *form_text; /* formatted text (left/center/...) */
+ int ent_x; /* x coordinate of this field */
+ char dirty; /* this label has changed */
+ char visible; /* field is visible */
+} slk_ent;
+
+typedef struct {
+ char dirty; /* all labels have changed */
+ char hidden; /* soft labels are hidden */
+ WINDOW *win;
+ slk_ent *ent;
+ short maxlab; /* number of available labels */
+ short labcnt; /* number of allocated labels */
+ short maxlen; /* length of labels */
+ chtype attr; /* soft label attribute */
+} SLK;
+
+typedef struct {
+ unsigned long hashval;
+ int oldcount, newcount;
+ int oldindex, newindex;
+} HASHMAP;
+
+typedef struct {
+ int line; /* lines to take, < 0 => from bottom*/
+ int (*hook)(WINDOW *, int); /* callback for user */
+ WINDOW *w; /* maybe we need this for cleanup */
+} ripoff_t;
+
+struct screen {
+ int _ifd; /* input file ptr for screen */
+ FILE *_ofp; /* output file ptr for screen */
+ char *_setbuf; /* buffered I/O for output */
+ int _buffered; /* setvbuf uses _setbuf data */
+ int _checkfd; /* filedesc for typeahead check */
+ TERMINAL *_term; /* terminal type information */
+ short _lines; /* screen lines */
+ short _columns; /* screen columns */
+
+ short _lines_avail; /* lines available for stdscr */
+ short _topstolen; /* lines stolen from top */
+ ripoff_t _rippedoff[5]; /* list of lines stolen */
+ int _rip_count; /* ...and total lines stolen */
+
+ WINDOW *_curscr; /* current screen */
+ WINDOW *_newscr; /* virtual screen to be updated to */
+ WINDOW *_stdscr; /* screen's full-window context */
+
+ struct tries *_keytry; /* "Try" for use with keypad mode */
+ struct tries *_key_ok; /* Disabled keys via keyok(,FALSE) */
+ bool _tried; /* keypad mode was initialized */
+ bool _keypad_on; /* keypad mode is currently on */
+
+ bool _called_wgetch; /* check for recursion in wgetch() */
+ int _fifo[FIFO_SIZE]; /* input push-back buffer */
+ short _fifohead, /* head of fifo queue */
+ _fifotail, /* tail of fifo queue */
+ _fifopeek, /* where to peek for next char */
+ _fifohold; /* set if breakout marked */
+
+ int _endwin; /* are we out of window mode? */
+ attr_t _current_attr; /* terminal attribute current set */
+ int _coloron; /* is color enabled? */
+ int _color_defs; /* are colors modified */
+ int _cursor; /* visibility of the cursor */
+ int _cursrow; /* physical cursor row */
+ int _curscol; /* physical cursor column */
+ bool _notty; /* true if we cannot switch non-tty */
+ int _nl; /* True if NL -> CR/NL is on */
+ int _raw; /* True if in raw mode */
+ int _cbreak; /* 1 if in cbreak mode */
+ /* > 1 if in halfdelay mode */
+ int _echo; /* True if echo on */
+ int _use_meta; /* use the meta key? */
+ SLK *_slk; /* ptr to soft key struct / NULL */
+ int slk_format; /* selected format for this screen */
+ /* cursor movement costs; units are 10ths of milliseconds */
+#if NCURSES_NO_PADDING
+ int _no_padding; /* flag to set if padding disabled */
+#endif
+ int _char_padding; /* cost of character put */
+ int _cr_cost; /* cost of (carriage_return) */
+ int _cup_cost; /* cost of (cursor_address) */
+ int _home_cost; /* cost of (cursor_home) */
+ int _ll_cost; /* cost of (cursor_to_ll) */
+#if USE_HARD_TABS
+ int _ht_cost; /* cost of (tab) */
+ int _cbt_cost; /* cost of (backtab) */
+#endif /* USE_HARD_TABS */
+ int _cub1_cost; /* cost of (cursor_left) */
+ int _cuf1_cost; /* cost of (cursor_right) */
+ int _cud1_cost; /* cost of (cursor_down) */
+ int _cuu1_cost; /* cost of (cursor_up) */
+ int _cub_cost; /* cost of (parm_cursor_left) */
+ int _cuf_cost; /* cost of (parm_cursor_right) */
+ int _cud_cost; /* cost of (parm_cursor_down) */
+ int _cuu_cost; /* cost of (parm_cursor_up) */
+ int _hpa_cost; /* cost of (column_address) */
+ int _vpa_cost; /* cost of (row_address) */
+ /* 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) */
+ int _dch1_cost; /* cost of (delete_character) */
+ int _ich1_cost; /* cost of (insert_character) */
+ int _dch_cost; /* cost of (parm_dch) */
+ int _ich_cost; /* cost of (parm_ich) */
+ int _ech_cost; /* cost of (erase_chars) */
+ 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) */
+ /* used in lib_mvcur.c */
+ char * _address_cursor;
+ /* used in tty_update.c */
+ int _scrolling; /* 1 if terminal's smart enough to */
+
+ /* used in lib_color.c */
+ color_t *_color_table; /* screen's color palette */
+ int _color_count; /* count of colors in palette */
+ unsigned short *_color_pairs; /* screen's color pair list */
+ int _pair_count; /* count of color pairs */
+#if 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]; /* the real alternate-charset map */
+
+ /* used in lib_vidattr.c */
+ bool _use_rmso; /* true if we may use 'rmso' */
+ bool _use_rmul; /* true if we may use 'rmul' */
+
+ /*
+ * These data correspond to the state of the idcok() and idlok()
+ * functions. A caveat is in order here: the XSI and SVr4
+ * documentation specify that these functions apply to the window which
+ * is given as an argument. However, ncurses implements this logic
+ * only for the newscr/curscr update process, _not_ per-window.
+ */
+ bool _nc_sp_idlok;
+ bool _nc_sp_idcok;
+#define _nc_idlok SP->_nc_sp_idlok
+#define _nc_idcok SP->_nc_sp_idcok
+
+ /*
+ * These are the data that support the mouse interface.
+ */
+ MouseType _mouse_type;
+ int _maxclick;
+ bool (*_mouse_event) (SCREEN *);
+ bool (*_mouse_inline)(SCREEN *);
+ bool (*_mouse_parse) (int);
+ void (*_mouse_resume)(SCREEN *);
+ void (*_mouse_wrap) (SCREEN *);
+ int _mouse_fd; /* file-descriptor, if any */
+ NCURSES_CONST char *_mouse_xtermcap; /* string to enable/disable mouse */
+#if USE_SYSMOUSE
+ MEVENT _sysmouse_fifo[FIFO_SIZE];
+ int _sysmouse_head;
+ int _sysmouse_tail;
+ int _sysmouse_char_width; /* character width */
+ int _sysmouse_char_height; /* character height */
+ int _sysmouse_old_buttons;
+ int _sysmouse_new_buttons;
+#endif
+
+ /*
+ * This supports automatic resizing
+ */
+#if USE_SIZECHANGE
+ int (*_resize)(int,int);
+#endif
+
+ /*
+ * These are data that support the proper handling of the panel stack on an
+ * per screen basis.
+ */
+ struct panelhook _panelHook;
+ /*
+ * Linked-list of all windows, to support '_nc_resizeall()' and
+ * '_nc_freeall()'
+ */
+ WINDOWLIST *_nc_sp_windows;
+#define _nc_windows SP->_nc_sp_windows
+
+ bool _sig_winch;
+ SCREEN *_next_screen;
+
+ /* hashes for old and new lines */
+ unsigned long *oldhash, *newhash;
+ HASHMAP *hashtab;
+ int hashtab_len;
+
+ bool _cleanup; /* cleanup after int/quit signal */
+ int (*_outch)(int); /* output handler if not putc */
+
+ /* recent versions of 'screen' have partially-working support for
+ * UTF-8, but do not permit ACS at the same time (see tty_update.c).
+ */
+#if USE_WIDEC_SUPPORT
+ bool _legacy_coding;
+ bool _screen_acs_fix;
+#endif
+ bool _screen_acs_map[ACS_LEN];
+};
+
+extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain;
+
+#if NCURSES_NOMACROS
+#include <nomacros.h>
+#endif
+
+ WINDOWLIST {
+ WINDOW win; /* first, so WINDOW_EXT() works */
+ WINDOWLIST *next;
+#ifdef _XOPEN_SOURCE_EXTENDED
+ char addch_work[(MB_LEN_MAX * 9) + 1];
+ int addch_used;
+ int addch_x;
+ int addch_y;
+#endif
+};
+
+#define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field)
+
+/* usually in <limits.h> */
+#ifndef UCHAR_MAX
+#define UCHAR_MAX 255
+#endif
+
+/* The terminfo source is assumed to be 7-bit ASCII */
+#define is7bits(c) ((unsigned)(c) < 128)
+
+/* Checks for isprint() should be done on 8-bit characters (non-wide) */
+#define is8bits(c) ((unsigned)(c) <= UCHAR_MAX)
+
+#ifndef min
+#define min(a,b) ((a) > (b) ? (b) : (a))
+#endif
+
+#ifndef max
+#define max(a,b) ((a) < (b) ? (b) : (a))
+#endif
+
+/* usually in <unistd.h> */
+#ifndef STDIN_FILENO
+#define STDIN_FILENO 0
+#endif
+
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+
+#ifndef R_OK
+#define R_OK 4 /* Test for read permission. */
+#endif
+#ifndef W_OK
+#define W_OK 2 /* Test for write permission. */
+#endif
+#ifndef X_OK
+#define X_OK 1 /* Test for execute permission. */
+#endif
+#ifndef F_OK
+#define F_OK 0 /* Test for existence. */
+#endif
+
+#if HAVE_FCNTL_H
+#include <fcntl.h> /* may define O_BINARY */
+#endif
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+#ifdef TRACE
+#define TRACE_OUTCHARS(n) _nc_outchars += (n);
+#else
+#define TRACE_OUTCHARS(n) /* nothing */
+#endif
+
+#define UChar(c) ((unsigned char)(c))
+#define ChCharOf(c) ((c) & (chtype)A_CHARTEXT)
+#define ChAttrOf(c) ((c) & (chtype)A_ATTRIBUTES)
+
+#ifndef MB_LEN_MAX
+#define MB_LEN_MAX 8 /* should be >= MB_CUR_MAX, but that may be a function */
+#endif
+
+#if USE_WIDEC_SUPPORT /* { */
+#define NulChar 0,0,0,0 /* FIXME: see CCHARW_MAX */
+#define CharOf(c) ((c).chars[0])
+#define AttrOf(c) ((c).attr)
+#define AddAttr(c,a) (c).attr |= a
+#define RemAttr(c,a) (c).attr &= ~(a)
+#define SetAttr(c,a) (c).attr = a
+#define NewChar(ch) { ChAttrOf(ch), { ChCharOf(ch), NulChar } }
+#define NewChar2(c,a) { a, { c, NulChar } }
+#define CharEq(a,b) (!memcmp(&a, &b, sizeof(a)))
+#define SetChar(ch,c,a) do { \
+ NCURSES_CH_T *_cp = &ch; \
+ memset(_cp,0,sizeof(ch)); _cp->chars[0] = c; _cp->attr = a; \
+ } while (0)
+#define CHREF(wch) (&wch)
+#define CHDEREF(wch) (*wch)
+#define ARG_CH_T NCURSES_CH_T *
+#define CARG_CH_T const NCURSES_CH_T *
+#define PUTC_DATA char PUTC_buf[MB_LEN_MAX]; int PUTC_i, PUTC_n; \
+ mbstate_t PUT_st; wchar_t PUTC_ch
+#define PUTC_INIT memset (&PUT_st, '\0', sizeof (PUT_st)); \
+ PUTC_i = 0
+#define PUTC(ch,b) do { if(!isnac(ch)) { \
+ if (Charable(ch)) { \
+ fputc(CharOf(ch), b); \
+ TRACE_OUTCHARS(1); \
+ } else { \
+ PUTC_INIT; \
+ do { \
+ PUTC_ch = PUTC_i < CCHARW_MAX ? \
+ (ch).chars[PUTC_i] : L'\0'; \
+ PUTC_n = wcrtomb(PUTC_buf, \
+ (ch).chars[PUTC_i], &PUT_st); \
+ if (PUTC_ch == L'\0') \
+ --PUTC_n; \
+ if (PUTC_n <= 0) \
+ break; \
+ fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b); \
+ ++PUTC_i; \
+ } while (PUTC_ch != L'\0'); \
+ TRACE_OUTCHARS(PUTC_i); \
+ } } } while (0)
+
+#define BLANK { WA_NORMAL, {' '} }
+#define ISBLANK(ch) ((ch).chars[0] == L' ' && (ch).chars[1] == L'\0')
+
+#define WA_NAC 1
+#define isnac(ch) (AttrOf(ch) & WA_NAC)
+#define if_WIDEC(code) code
+#define Charable(ch) ((SP != 0 && SP->_legacy_coding) \
+ || (AttrOf(ch) & A_ALTCHARSET) \
+ || (!isnac(ch) && \
+ (ch).chars[1] == L'\0' && \
+ _nc_is_charable(CharOf(ch))))
+
+#define L(ch) L ## ch
+#else /* }{ */
+#define CharOf(c) ChCharOf(c)
+#define AttrOf(c) ChAttrOf(c)
+#define AddAttr(c,a) c |= a
+#define RemAttr(c,a) c &= ~(a & A_ATTRIBUTES)
+#define SetAttr(c,a) c = (c & ~A_ATTRIBUTES) | a
+#define NewChar(ch) (ch)
+#define NewChar2(c,a) (c | a)
+#define CharEq(a,b) (a == b)
+#define SetChar(ch,c,a) ch = c | a
+#define CHREF(wch) wch
+#define CHDEREF(wch) wch
+#define ARG_CH_T NCURSES_CH_T
+#define CARG_CH_T NCURSES_CH_T
+#define PUTC_DATA int data = 0
+#define PUTC(a,b) do { data = CharOf(ch); putc(data,b); } while (0)
+
+#define BLANK (' '|A_NORMAL)
+#define ISBLANK(ch) (CharOf(ch) == ' ')
+
+#define isnac(ch) (0)
+#define if_WIDEC(code) /* nothing */
+
+#define L(ch) ch
+#endif /* } */
+
+#define AttrOfD(ch) AttrOf(CHDEREF(ch))
+#define CharOfD(ch) CharOf(CHDEREF(ch))
+#define SetChar2(wch,ch) SetChar(wch,ChCharOf(ch),ChAttrOf(ch))
+
+#define BLANK_ATTR A_NORMAL
+#define BLANK_TEXT L(' ')
+
+#define CHANGED -1
+
+#define CHANGED_CELL(line,col) \
+ if (line->firstchar == _NOCHANGE) \
+ line->firstchar = line->lastchar = col; \
+ else if ((col) < line->firstchar) \
+ line->firstchar = col; \
+ else if ((col) > line->lastchar) \
+ line->lastchar = col
+
+#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
+
+#define CHANGED_TO_EOL(line,start,end) \
+ if (line->firstchar == _NOCHANGE \
+ || line->firstchar > (start)) \
+ line->firstchar = start; \
+ line->lastchar = end
+
+#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
+
+#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 <nc_alloc.h>
+
+/*
+ * Prefixes for call/return points of library function traces. We use these to
+ * instrument the public functions so that the traces can be easily transformed
+ * into regression scripts.
+ */
+#define T_CALLED(fmt) "called {" fmt
+#define T_CREATE(fmt) "create :" fmt
+#define T_RETURN(fmt) "return }" fmt
+
+#ifdef TRACE
+
+#define START_TRACE() \
+ if ((_nc_tracing & TRACE_MAXIMUM) == 0) { \
+ int t = _nc_getenv_num("NCURSES_TRACE"); \
+ if (t >= 0) \
+ trace((unsigned) t); \
+ }
+
+#define TR(n, a) if (_nc_tracing & (n)) _tracef a
+#define T(a) TR(TRACE_CALLS, a)
+#define TPUTS_TRACE(s) _nc_tputs_trace = s;
+#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
+
+#define returnAttr(code) TRACE_RETURN(code,attr_t)
+#define returnChar(code) TRACE_RETURN(code,chtype)
+#define returnBool(code) TRACE_RETURN(code,bool)
+#define returnBits(code) TRACE_RETURN(code,unsigned)
+#define returnCode(code) TRACE_RETURN(code,int)
+#define returnPtr(code) TRACE_RETURN(code,ptr)
+#define returnSP(code) TRACE_RETURN(code,sp)
+#define returnVoid T((T_RETURN(""))); return
+#define returnWin(code) TRACE_RETURN(code,win)
+
+extern NCURSES_EXPORT(NCURSES_BOOL) _nc_retrace_bool (NCURSES_BOOL);
+extern NCURSES_EXPORT(SCREEN *) _nc_retrace_sp (SCREEN *);
+extern NCURSES_EXPORT(WINDOW *) _nc_retrace_win (WINDOW *);
+extern NCURSES_EXPORT(attr_t) _nc_retrace_attr_t (attr_t);
+extern NCURSES_EXPORT(char *) _nc_retrace_ptr (char *);
+extern NCURSES_EXPORT(char *) _nc_trace_ttymode(TTY *tty);
+extern NCURSES_EXPORT(char *) _nc_varargs (const char *, va_list);
+extern NCURSES_EXPORT(chtype) _nc_retrace_chtype (chtype);
+extern NCURSES_EXPORT(const char *) _nc_altcharset_name(attr_t, chtype);
+extern NCURSES_EXPORT(int) _nc_retrace_int (int);
+extern NCURSES_EXPORT(unsigned) _nc_retrace_unsigned (unsigned);
+extern NCURSES_EXPORT(void) _nc_fifo_dump (void);
+extern NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace;
+extern NCURSES_EXPORT_VAR(long) _nc_outchars;
+extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(const char *) _nc_viswbuf2 (int, const wchar_t *);
+extern NCURSES_EXPORT(const char *) _nc_viswbufn (const wchar_t *, int);
+extern NCURSES_EXPORT(const char *) _nc_viscbuf2 (int, const cchar_t *, int);
+extern NCURSES_EXPORT(const char *) _nc_viscbuf (const cchar_t *, int);
+#endif
+
+#else /* !TRACE */
+
+#define START_TRACE() /* nothing */
+
+#define T(a)
+#define TR(n, a)
+#define TPUTS_TRACE(s)
+
+#define returnAttr(code) return code
+#define returnBits(code) return code
+#define returnBool(code) return code
+#define returnChar(code) return code
+#define returnCode(code) return code
+#define returnPtr(code) return code
+#define returnSP(code) return code
+#define returnVoid return
+#define returnWin(code) return code
+
+#endif /* TRACE/!TRACE */
+
+extern NCURSES_EXPORT(const char *) _nc_visbuf2 (int, const char *);
+extern NCURSES_EXPORT(const char *) _nc_visbufn (const char *, int);
+
+#define empty_module(name) \
+extern NCURSES_EXPORT(void) name (void); \
+ NCURSES_EXPORT(void) name (void) { }
+
+#define ALL_BUT_COLOR ((chtype)~(A_COLOR))
+#define IGNORE_COLOR_OFF FALSE
+#define NONBLANK_ATTR (A_NORMAL|A_BOLD|A_DIM|A_BLINK)
+#define XMC_CHANGES(c) ((c) & SP->_xmc_suppress)
+
+#define toggle_attr_on(S,at) {\
+ if (PAIR_NUMBER(at) > 0)\
+ (S) = ((S) & ALL_BUT_COLOR) | (at);\
+ else\
+ (S) |= (at);\
+ TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
+
+
+#define toggle_attr_off(S,at) {\
+ if (IGNORE_COLOR_OFF == TRUE) {\
+ if (PAIR_NUMBER(at) == 0xff) /* turn off color */\
+ (S) &= ~(at);\
+ else /* leave color alone */\
+ (S) &= ~((at)&ALL_BUT_COLOR);\
+ } else {\
+ if (PAIR_NUMBER(at) > 0x00) /* turn off color */\
+ (S) &= ~(at|A_COLOR);\
+ else /* leave color alone */\
+ (S) &= ~(at);\
+ }\
+ TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
+
+#define DelCharCost(count) \
+ ((parm_dch != 0) \
+ ? SP->_dch_cost \
+ : ((delete_character != 0) \
+ ? (SP->_dch1_cost * count) \
+ : INFINITY))
+
+#define InsCharCost(count) \
+ ((parm_ich != 0) \
+ ? SP->_ich_cost \
+ : ((enter_insert_mode && exit_insert_mode) \
+ ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
+ : ((insert_character != 0) \
+ ? ((SP->_ich1_cost + SP->_ip_cost) * count) \
+ : INFINITY)))
+
+#if USE_XMC_SUPPORT
+#define UpdateAttrs(a) if (SP->_current_attr != (a)) { \
+ attr_t chg = SP->_current_attr; \
+ vidattr((a)); \
+ if (magic_cookie_glitch > 0 \
+ && XMC_CHANGES((chg ^ SP->_current_attr))) { \
+ T(("%s @%d before glitch %d,%d", \
+ __FILE__, __LINE__, \
+ SP->_cursrow, \
+ SP->_curscol)); \
+ _nc_do_xmc_glitch(chg); \
+ } \
+ }
+#else
+#define UpdateAttrs(a) if (SP->_current_attr != (a)) \
+ vidattr((a));
+#endif
+
+/*
+ * Macros to make additional parameter to implement wgetch_events()
+ */
+#ifdef NCURSES_WGETCH_EVENTS
+#define EVENTLIST_0th(param) param
+#define EVENTLIST_1st(param) param
+#define EVENTLIST_2nd(param) , param
+#else
+#define EVENTLIST_0th(param) void
+#define EVENTLIST_1st(param) /* nothing */
+#define EVENTLIST_2nd(param) /* nothing */
+#endif
+
+#if NCURSES_EXPANDED && NCURSES_EXT_FUNCS
+
+#undef toggle_attr_on
+#define toggle_attr_on(S,at) _nc_toggle_attr_on(&(S), at)
+extern NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *, attr_t);
+
+#undef toggle_attr_off
+#define toggle_attr_off(S,at) _nc_toggle_attr_off(&(S), at)
+extern NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *, attr_t);
+
+#undef DelCharCost
+#define DelCharCost(count) _nc_DelCharCost(count)
+extern NCURSES_EXPORT(int) _nc_DelCharCost (int);
+
+#undef InsCharCost
+#define InsCharCost(count) _nc_InsCharCost(count)
+extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
+
+#undef UpdateAttrs
+#define UpdateAttrs(c) _nc_UpdateAttrs(c)
+extern NCURSES_EXPORT(void) _nc_UpdateAttrs (chtype);
+
+#else
+
+extern NCURSES_EXPORT(void) _nc_expanded (void);
+
+#endif
+
+#if !HAVE_GETCWD
+#define getcwd(buf,len) getwd(buf)
+#endif
+
+/* charable.c */
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(bool) _nc_is_charable(wchar_t);
+extern NCURSES_EXPORT(int) _nc_to_char(wint_t);
+extern NCURSES_EXPORT(wint_t) _nc_to_widechar(int);
+#endif
+
+/* doupdate.c */
+#if USE_XMC_SUPPORT
+extern NCURSES_EXPORT(void) _nc_do_xmc_glitch (attr_t);
+#endif
+
+/* hardscroll.c */
+#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
+extern NCURSES_EXPORT(void) _nc_linedump (void);
+#endif
+
+/* lib_acs.c */
+extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
+extern NCURSES_EXPORT(int) _nc_msec_cost (const char *const, int); /* used by 'tack' program */
+
+/* lib_addstr.c */
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(int) _nc_wchstrlen(const cchar_t *);
+#endif
+
+/* lib_color.c */
+extern NCURSES_EXPORT(bool) _nc_reset_colors(void);
+
+/* lib_getch.c */
+extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *));
+
+/* lib_insch.c */
+extern NCURSES_EXPORT(void) _nc_insert_ch(WINDOW *, chtype);
+
+/* lib_mvcur.c */
+#define INFINITY 1000000 /* cost: too high to use */
+
+extern NCURSES_EXPORT(void) _nc_mvcur_init (void);
+extern NCURSES_EXPORT(void) _nc_mvcur_resume (void);
+extern NCURSES_EXPORT(void) _nc_mvcur_wrap (void);
+
+extern NCURSES_EXPORT(int) _nc_scrolln (int, int, int, int);
+
+extern NCURSES_EXPORT(void) _nc_screen_init (void);
+extern NCURSES_EXPORT(void) _nc_screen_resume (void);
+extern NCURSES_EXPORT(void) _nc_screen_wrap (void);
+
+/* lib_mouse.c */
+extern NCURSES_EXPORT(int) _nc_has_mouse (void);
+
+/* lib_mvcur.c */
+#define INFINITY 1000000 /* cost: too high to use */
+#define BAUDBYTE 9 /* 9 = 7 bits + 1 parity + 1 stop */
+
+/* lib_setup.c */
+extern NCURSES_EXPORT(char *) _nc_get_locale(void);
+extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
+extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(void);
+
+/* lib_wacs.c */
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(void) _nc_init_wacs(void);
+#endif
+
+typedef struct {
+ char *s_head; /* beginning of the string (may be null) */
+ char *s_tail; /* end of the string (may be null) */
+ size_t s_size; /* current remaining size available */
+ size_t s_init; /* total size available */
+} string_desc;
+
+/* strings.c */
+extern NCURSES_EXPORT(string_desc *) _nc_str_init (string_desc *, char *, size_t);
+extern NCURSES_EXPORT(string_desc *) _nc_str_null (string_desc *, size_t);
+extern NCURSES_EXPORT(string_desc *) _nc_str_copy (string_desc *, string_desc *);
+extern NCURSES_EXPORT(bool) _nc_safe_strcat (string_desc *, const char *);
+extern NCURSES_EXPORT(bool) _nc_safe_strcpy (string_desc *, const char *);
+
+extern NCURSES_EXPORT(void) _nc_mvcur_init (void);
+extern NCURSES_EXPORT(void) _nc_mvcur_resume (void);
+extern NCURSES_EXPORT(void) _nc_mvcur_wrap (void);
+
+extern NCURSES_EXPORT(int) _nc_scrolln (int, int, int, int);
+
+extern NCURSES_EXPORT(void) _nc_screen_init (void);
+extern NCURSES_EXPORT(void) _nc_screen_resume (void);
+extern NCURSES_EXPORT(void) _nc_screen_wrap (void);
+
+#if !HAVE_STRSTR
+#define strstr _nc_strstr
+extern NCURSES_EXPORT(char *) _nc_strstr (const char *, const char *);
+#endif
+
+/* safe_sprintf.c */
+extern NCURSES_EXPORT(char *) _nc_printf_string (const char *, va_list);
+
+/* tries.c */
+extern NCURSES_EXPORT(void) _nc_add_to_try (struct tries **, const char *, unsigned short);
+extern NCURSES_EXPORT(char *) _nc_expand_try (struct tries *, unsigned short, int *, size_t);
+extern NCURSES_EXPORT(int) _nc_remove_key (struct tries **, unsigned short);
+extern NCURSES_EXPORT(int) _nc_remove_string (struct tries **, const char *);
+
+/* elsewhere ... */
+extern NCURSES_EXPORT(NCURSES_CH_T) _nc_render (WINDOW *, NCURSES_CH_T);
+extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int);
+extern NCURSES_EXPORT(char *) _nc_home_terminfo (void);
+extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t);
+extern NCURSES_EXPORT(char *) _nc_trace_bufcat (int, const char *);
+extern NCURSES_EXPORT(int) _nc_access (const char *, int);
+extern NCURSES_EXPORT(int) _nc_baudrate (int);
+extern NCURSES_EXPORT(int) _nc_freewin (WINDOW *);
+extern NCURSES_EXPORT(int) _nc_getenv_num (const char *);
+extern NCURSES_EXPORT(int) _nc_keypad (bool);
+extern NCURSES_EXPORT(int) _nc_ospeed (int);
+extern NCURSES_EXPORT(int) _nc_outch (int);
+extern NCURSES_EXPORT(int) _nc_setupscreen (short, short const, FILE *);
+extern NCURSES_EXPORT(int) _nc_timed_wait(int, int, int * EVENTLIST_2nd(_nc_eventlist *));
+extern NCURSES_EXPORT(int) _nc_waddch_nosync (WINDOW *, const NCURSES_CH_T);
+extern NCURSES_EXPORT(void) _nc_do_color (int, int, bool, int (*)(int));
+extern NCURSES_EXPORT(void) _nc_flush (void);
+extern NCURSES_EXPORT(void) _nc_freeall (void);
+extern NCURSES_EXPORT(void) _nc_hash_map (void);
+extern NCURSES_EXPORT(void) _nc_init_keytry (void);
+extern NCURSES_EXPORT(void) _nc_keep_tic_dir (const char *);
+extern NCURSES_EXPORT(void) _nc_make_oldhash (int i);
+extern NCURSES_EXPORT(void) _nc_scroll_oldhash (int n, int top, int bot);
+extern NCURSES_EXPORT(void) _nc_scroll_optimize (void);
+extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, short const, short const, NCURSES_CH_T);
+extern NCURSES_EXPORT(void) _nc_set_buffer (FILE *, bool);
+extern NCURSES_EXPORT(void) _nc_signal_handler (bool);
+extern NCURSES_EXPORT(void) _nc_synchook (WINDOW *);
+extern NCURSES_EXPORT(void) _nc_trace_tries (struct tries *);
+
+#if USE_SIZECHANGE
+extern NCURSES_EXPORT(void) _nc_update_screensize (void);
+#endif
+
+#if HAVE_RESIZETERM
+extern NCURSES_EXPORT(void) _nc_resize_margins (WINDOW *);
+#else
+#define _nc_resize_margins(wp) /* nothing */
+#endif
+
+#ifdef NCURSES_WGETCH_EVENTS
+extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *);
+#else
+#define wgetch_events(win, evl) wgetch(win)
+#define wgetnstr_events(win, str, maxlen, evl) wgetnstr(win, str, maxlen)
+#endif
+
+/*
+ * Not everyone has vsscanf(), but we'd like to use it for scanw().
+ */
+#if !HAVE_VSSCANF
+extern int vsscanf(const char *str, const char *format, va_list __arg);
+#endif
+
+/* scroll indices */
+extern NCURSES_EXPORT_VAR(int *) _nc_oldnums;
+
+#define USE_SETBUF_0 0
+
+#define NC_BUFFERED(flag) _nc_set_buffer(SP->_ofp, flag)
+
+#define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout)
+
+/*
+ * On systems with a broken linker, define 'SP' as a function to force the
+ * linker to pull in the data-only module with 'SP'.
+ */
+#if BROKEN_LINKER
+#define SP _nc_screen()
+extern NCURSES_EXPORT(SCREEN *) _nc_screen (void);
+extern NCURSES_EXPORT(int) _nc_alloc_screen (void);
+extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *);
+#else
+/* current screen is private data; avoid possible linking conflicts too */
+extern NCURSES_EXPORT_VAR(SCREEN *) SP;
+#define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0)
+#define _nc_set_screen(sp) SP = sp
+#endif
+
+/*
+ * We don't want to use the lines or columns capabilities internally, because
+ * if the application is running multiple screens under X, it's quite possible
+ * they could all have type xterm but have different sizes! So...
+ */
+#define screen_lines SP->_lines
+#define screen_columns SP->_columns
+
+extern NCURSES_EXPORT_VAR(int) _nc_slk_format; /* != 0 if slk_init() called */
+extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
+
+/*
+ * Some constants related to SLK's
+ */
+#define MAX_SKEY_OLD 8 /* count of soft keys */
+#define MAX_SKEY_LEN_OLD 8 /* max length of soft key text */
+#define MAX_SKEY_PC 12 /* This is what most PC's have */
+#define MAX_SKEY_LEN_PC 5
+
+/* Macro to check whether or not we use a standard format */
+#define SLK_STDFMT(fmt) (fmt < 3)
+/* Macro to determine height of label window */
+#define SLK_LINES(fmt) (SLK_STDFMT(fmt) ? 1 : ((fmt) - 2))
+
+#define MAX_SKEY(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC)
+#define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC)
+
+extern NCURSES_EXPORT(int) _nc_ripoffline (int line, int (*init)(WINDOW *,int));
+
+/*
+ * Common error messages
+ */
+#define MSG_NO_MEMORY "Out of memory"
+#define MSG_NO_INPUTS "Premature EOF"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CURSES_PRIV_H */
diff --git a/Build/source/libs/ncurses/ncurses/fifo_defs.h b/Build/source/libs/ncurses/ncurses/fifo_defs.h
new file mode 100644
index 00000000000..67799577aea
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/fifo_defs.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * Copyright (c) 1998,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * Common macros for lib_getch.c, lib_ungetch.c
+ *
+ * $Id: fifo_defs.h,v 1.4 2002/03/16 20:47:50 tom Exp $
+ */
+
+#ifndef FIFO_DEFS_H
+#define FIFO_DEFS_H 1
+
+#define head SP->_fifohead
+#define tail SP->_fifotail
+/* peek points to next uninterpreted character */
+#define peek SP->_fifopeek
+
+#define h_inc() { head == FIFO_SIZE-1 ? head = 0 : head++; if (head == tail) head = -1, tail = 0;}
+#define h_dec() { head == 0 ? head = FIFO_SIZE-1 : head--; if (head == tail) tail = -1;}
+#define t_inc() { tail == FIFO_SIZE-1 ? tail = 0 : tail++; if (tail == head) tail = -1;}
+#define t_dec() { tail == 0 ? tail = FIFO_SIZE-1 : tail--; if (head == tail) fifo_clear();}
+#define p_inc() { peek == FIFO_SIZE-1 ? peek = 0 : peek++;}
+
+#define cooked_key_in_fifo() ((head != -1) && (peek != head))
+#define raw_key_in_fifo() ((head != -1) && (peek != tail))
+
+#undef HIDE_EINTR
+
+#endif /* FIFO_DEFS_H */
diff --git a/Build/source/libs/ncurses/ncurses/llib-lncurses b/Build/source/libs/ncurses/ncurses/llib-lncurses
new file mode 100644
index 00000000000..9ebdc234f42
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/llib-lncurses
@@ -0,0 +1,3080 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 1996-2003,2004 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tty/hardscroll.c */
+
+#include <curses.priv.h>
+
+#undef _nc_oldnums
+int *_nc_oldnums;
+
+#undef _nc_scroll_optimize
+void _nc_scroll_optimize(void)
+ { /* void */ }
+
+#undef _nc_linedump
+void _nc_linedump(void)
+ { /* void */ }
+
+/* ./tty/hashmap.c */
+
+#include <term.h>
+
+#undef _nc_hash_map
+void _nc_hash_map(void)
+ { /* void */ }
+
+#undef _nc_make_oldhash
+void _nc_make_oldhash(
+ int i)
+ { /* void */ }
+
+#undef _nc_scroll_oldhash
+void _nc_scroll_oldhash(
+ int n,
+ int top,
+ int bot)
+ { /* void */ }
+
+/* ./base/lib_addch.c */
+
+#include <ctype.h>
+
+#undef _nc_render
+chtype _nc_render(
+ WINDOW *win,
+ chtype ch)
+ { return(*(chtype *)0); }
+
+#undef _nc_waddch_nosync
+int _nc_waddch_nosync(
+ WINDOW *win,
+ const chtype c)
+ { return(*(int *)0); }
+
+#undef waddch
+int waddch(
+ WINDOW *win,
+ const chtype ch)
+ { return(*(int *)0); }
+
+#undef wechochar
+int wechochar(
+ WINDOW *win,
+ const chtype ch)
+ { return(*(int *)0); }
+
+/* ./base/lib_addstr.c */
+
+#undef waddnstr
+int waddnstr(
+ WINDOW *win,
+ const char *astr,
+ int n)
+ { return(*(int *)0); }
+
+#undef waddchnstr
+int waddchnstr(
+ WINDOW *win,
+ const chtype *astr,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_beep.c */
+
+#undef beep
+int beep(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_bkgd.c */
+
+#undef wbkgdset
+void wbkgdset(
+ WINDOW *win,
+ chtype ch)
+ { /* void */ }
+
+#undef wbkgd
+int wbkgd(
+ WINDOW *win,
+ chtype ch)
+ { return(*(int *)0); }
+
+/* ./base/lib_box.c */
+
+#undef wborder
+int wborder(
+ WINDOW *win,
+ chtype ls,
+ chtype rs,
+ chtype ts,
+ chtype bs,
+ chtype tl,
+ chtype tr,
+ chtype bl,
+ chtype br)
+ { return(*(int *)0); }
+
+/* ./base/lib_chgat.c */
+
+#undef wchgat
+int wchgat(
+ WINDOW *win,
+ int n,
+ attr_t attr,
+ short color,
+ const void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_clear.c */
+
+#undef wclear
+int wclear(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_clearok.c */
+
+#undef clearok
+int clearok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_clrbot.c */
+
+#undef wclrtobot
+int wclrtobot(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_clreol.c */
+
+#undef wclrtoeol
+int wclrtoeol(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_color.c */
+
+#include <tic.h>
+
+#undef COLOR_PAIRS
+int COLOR_PAIRS;
+#undef COLORS
+int COLORS;
+
+#undef _nc_reset_colors
+NCURSES_BOOL _nc_reset_colors(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef start_color
+int start_color(void)
+ { return(*(int *)0); }
+
+#undef init_pair
+int init_pair(
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
+#undef init_color
+int init_color(
+ short color,
+ short r,
+ short g,
+ short b)
+ { return(*(int *)0); }
+
+#undef can_change_color
+NCURSES_BOOL can_change_color(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_colors
+NCURSES_BOOL has_colors(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef color_content
+int color_content(
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
+#undef pair_content
+int pair_content(
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
+#undef _nc_do_color
+void _nc_do_color(
+ int old_pair,
+ int pair,
+ NCURSES_BOOL reverse,
+ int (*outc)(
+ int p1))
+ { /* void */ }
+
+/* ./base/lib_colorset.c */
+
+#undef wcolor_set
+int wcolor_set(
+ WINDOW *win,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_delch.c */
+
+#undef wdelch
+int wdelch(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_delwin.c */
+
+#undef delwin
+int delwin(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_echo.c */
+
+#undef echo
+int echo(void)
+ { return(*(int *)0); }
+
+#undef noecho
+int noecho(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_endwin.c */
+
+#undef endwin
+int endwin(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_erase.c */
+
+#undef werase
+int werase(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_flash.c */
+
+#undef flash
+int flash(void)
+ { return(*(int *)0); }
+
+/* ./lib_gen.c */
+
+#undef addch
+int addch(
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef addchnstr
+int addchnstr(
+ const chtype *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef addchstr
+int addchstr(
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef addnstr
+int addnstr(
+ const char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef addstr
+int addstr(
+ const char *z)
+ { return(*(int *)0); }
+
+#undef attroff
+int attroff(
+ NCURSES_ATTR_T z)
+ { return(*(int *)0); }
+
+#undef attron
+int attron(
+ NCURSES_ATTR_T z)
+ { return(*(int *)0); }
+
+#undef attrset
+int attrset(
+ NCURSES_ATTR_T z)
+ { return(*(int *)0); }
+
+#undef attr_get
+int attr_get(
+ attr_t *a1,
+ short *a2,
+ void *z)
+ { return(*(int *)0); }
+
+#undef attr_off
+int attr_off(
+ attr_t a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef attr_on
+int attr_on(
+ attr_t a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef attr_set
+int attr_set(
+ attr_t a1,
+ short a2,
+ void *z)
+ { return(*(int *)0); }
+
+#undef bkgd
+int bkgd(
+ chtype z)
+ { return(*(int *)0); }
+
+#undef bkgdset
+void bkgdset(
+ chtype z)
+ { /* void */ }
+
+#undef border
+int border(
+ chtype a1,
+ chtype a2,
+ chtype a3,
+ chtype a4,
+ chtype a5,
+ chtype a6,
+ chtype a7,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef box
+int box(
+ WINDOW *a1,
+ chtype a2,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef chgat
+int chgat(
+ int a1,
+ attr_t a2,
+ short a3,
+ const void *z)
+ { return(*(int *)0); }
+
+#undef clear
+int clear(void)
+ { return(*(int *)0); }
+
+#undef clrtobot
+int clrtobot(void)
+ { return(*(int *)0); }
+
+#undef clrtoeol
+int clrtoeol(void)
+ { return(*(int *)0); }
+
+#undef color_set
+int color_set(
+ short a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef COLOR_PAIR
+int COLOR_PAIR(
+ int z)
+ { return(*(int *)0); }
+
+#undef delch
+int delch(void)
+ { return(*(int *)0); }
+
+#undef deleteln
+int deleteln(void)
+ { return(*(int *)0); }
+
+#undef echochar
+int echochar(
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef erase
+int erase(void)
+ { return(*(int *)0); }
+
+#undef getbkgd
+chtype getbkgd(
+ WINDOW *z)
+ { return(*(chtype *)0); }
+
+#undef getch
+int getch(void)
+ { return(*(int *)0); }
+
+#undef getnstr
+int getnstr(
+ char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef getstr
+int getstr(
+ char *z)
+ { return(*(int *)0); }
+
+#undef hline
+int hline(
+ chtype a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef inch
+chtype inch(void)
+ { return(*(chtype *)0); }
+
+#undef inchnstr
+int inchnstr(
+ chtype *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef inchstr
+int inchstr(
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef innstr
+int innstr(
+ char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef insch
+int insch(
+ chtype z)
+ { return(*(int *)0); }
+
+#undef insdelln
+int insdelln(
+ int z)
+ { return(*(int *)0); }
+
+#undef insertln
+int insertln(void)
+ { return(*(int *)0); }
+
+#undef insnstr
+int insnstr(
+ const char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef insstr
+int insstr(
+ const char *z)
+ { return(*(int *)0); }
+
+#undef instr
+int instr(
+ char *z)
+ { return(*(int *)0); }
+
+#undef move
+int move(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddch
+int mvaddch(
+ int a1,
+ int a2,
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef mvaddchnstr
+int mvaddchnstr(
+ int a1,
+ int a2,
+ const chtype *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddchstr
+int mvaddchstr(
+ int a1,
+ int a2,
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef mvaddnstr
+int mvaddnstr(
+ int a1,
+ int a2,
+ const char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddstr
+int mvaddstr(
+ int a1,
+ int a2,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvchgat
+int mvchgat(
+ int a1,
+ int a2,
+ int a3,
+ attr_t a4,
+ short a5,
+ const void *z)
+ { return(*(int *)0); }
+
+#undef mvdelch
+int mvdelch(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvgetch
+int mvgetch(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvgetnstr
+int mvgetnstr(
+ int a1,
+ int a2,
+ char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvgetstr
+int mvgetstr(
+ int a1,
+ int a2,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvhline
+int mvhline(
+ int a1,
+ int a2,
+ chtype a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinch
+chtype mvinch(
+ int a1,
+ int z)
+ { return(*(chtype *)0); }
+
+#undef mvinchnstr
+int mvinchnstr(
+ int a1,
+ int a2,
+ chtype *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinchstr
+int mvinchstr(
+ int a1,
+ int a2,
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef mvinnstr
+int mvinnstr(
+ int a1,
+ int a2,
+ char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinsch
+int mvinsch(
+ int a1,
+ int a2,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef mvinsnstr
+int mvinsnstr(
+ int a1,
+ int a2,
+ const char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinsstr
+int mvinsstr(
+ int a1,
+ int a2,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvinstr
+int mvinstr(
+ int a1,
+ int a2,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvvline
+int mvvline(
+ int a1,
+ int a2,
+ chtype a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddch
+int mvwaddch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef mvwaddchnstr
+int mvwaddchnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const chtype *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddchstr
+int mvwaddchstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef mvwaddnstr
+int mvwaddnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddstr
+int mvwaddstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvwchgat
+int mvwchgat(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ int a4,
+ attr_t a5,
+ short a6,
+ const void *z)
+ { return(*(int *)0); }
+
+#undef mvwdelch
+int mvwdelch(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwgetch
+int mvwgetch(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwgetnstr
+int mvwgetnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwgetstr
+int mvwgetstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvwhline
+int mvwhline(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinch
+chtype mvwinch(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(chtype *)0); }
+
+#undef mvwinchnstr
+int mvwinchnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinchstr
+int mvwinchstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef mvwinnstr
+int mvwinnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinsch
+int mvwinsch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef mvwinsnstr
+int mvwinsnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinsstr
+int mvwinsstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvwinstr
+int mvwinstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvwvline
+int mvwvline(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef PAIR_NUMBER
+int PAIR_NUMBER(
+ int z)
+ { return(*(int *)0); }
+
+#undef redrawwin
+int redrawwin(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef refresh
+int refresh(void)
+ { return(*(int *)0); }
+
+#undef scrl
+int scrl(
+ int z)
+ { return(*(int *)0); }
+
+#undef scroll
+int scroll(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef setscrreg
+int setscrreg(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef standout
+int standout(void)
+ { return(*(int *)0); }
+
+#undef standend
+int standend(void)
+ { return(*(int *)0); }
+
+#undef timeout
+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)
+ { return(*(int *)0); }
+
+#undef vline
+int vline(
+ chtype a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef vw_printw
+int vw_printw(
+ WINDOW *a1,
+ const char *a2,
+ va_list z)
+ { return(*(int *)0); }
+
+#undef vw_scanw
+int vw_scanw(
+ WINDOW *a1,
+ char *a2,
+ va_list z)
+ { return(*(int *)0); }
+
+#undef waddchstr
+int waddchstr(
+ WINDOW *a1,
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef waddstr
+int waddstr(
+ WINDOW *a1,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef wattron
+int wattron(
+ WINDOW *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wattroff
+int wattroff(
+ WINDOW *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wattrset
+int wattrset(
+ WINDOW *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wattr_get
+int wattr_get(
+ WINDOW *a1,
+ attr_t *a2,
+ short *a3,
+ void *z)
+ { return(*(int *)0); }
+
+#undef wattr_set
+int wattr_set(
+ WINDOW *a1,
+ attr_t a2,
+ short a3,
+ void *z)
+ { return(*(int *)0); }
+
+#undef wdeleteln
+int wdeleteln(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef wgetstr
+int wgetstr(
+ WINDOW *a1,
+ char *z)
+ { return(*(int *)0); }
+
+#undef winchstr
+int winchstr(
+ WINDOW *a1,
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef winsertln
+int winsertln(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef winstr
+int winstr(
+ WINDOW *a1,
+ char *z)
+ { return(*(int *)0); }
+
+#undef wstandout
+int wstandout(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef wstandend
+int wstandend(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef mouse_trafo
+NCURSES_BOOL mouse_trafo(
+ int *a1,
+ int *a2,
+ NCURSES_BOOL z)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./base/lib_getch.c */
+
+#include <fifo_defs.h>
+
+#undef ESCDELAY
+int ESCDELAY;
+
+#undef _nc_wgetch
+int _nc_wgetch(
+ WINDOW *win,
+ unsigned long *result,
+ int use_meta)
+ { return(*(int *)0); }
+
+#undef wgetch
+int wgetch(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_getstr.c */
+
+#undef wgetnstr
+int wgetnstr(
+ WINDOW *win,
+ char *str,
+ int maxlen)
+ { return(*(int *)0); }
+
+/* ./base/lib_hline.c */
+
+#undef whline
+int whline(
+ WINDOW *win,
+ chtype ch,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_immedok.c */
+
+#undef immedok
+void immedok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+/* ./base/lib_inchstr.c */
+
+#undef winchnstr
+int winchnstr(
+ WINDOW *win,
+ chtype *str,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_initscr.c */
+
+#undef initscr
+WINDOW *initscr(void)
+ { return(*(WINDOW **)0); }
+
+/* ./base/lib_insch.c */
+
+#undef _nc_insert_ch
+void _nc_insert_ch(
+ WINDOW *win,
+ chtype ch)
+ { /* void */ }
+
+#undef winsch
+int winsch(
+ WINDOW *win,
+ chtype c)
+ { return(*(int *)0); }
+
+#undef winsstr
+int winsstr(
+ WINDOW *win,
+ const char *s)
+ { return(*(int *)0); }
+
+/* ./base/lib_insdel.c */
+
+#undef winsdelln
+int winsdelln(
+ WINDOW *win,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_insnstr.c */
+
+#undef winsnstr
+int winsnstr(
+ WINDOW *win,
+ const char *s,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_instr.c */
+
+#undef winnstr
+int winnstr(
+ WINDOW *win,
+ char *str,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_isendwin.c */
+
+#undef isendwin
+NCURSES_BOOL isendwin(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./base/lib_leaveok.c */
+
+#undef leaveok
+int leaveok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_mouse.c */
+
+#undef getmouse
+int getmouse(
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef ungetmouse
+int ungetmouse(
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef mousemask
+mmask_t mousemask(
+ mmask_t newmask,
+ mmask_t *oldmask)
+ { return(*(mmask_t *)0); }
+
+#undef wenclose
+NCURSES_BOOL wenclose(
+ const WINDOW *win,
+ int y,
+ int x)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef mouseinterval
+int mouseinterval(
+ int maxclick)
+ { return(*(int *)0); }
+
+#undef _nc_has_mouse
+int _nc_has_mouse(void)
+ { return(*(int *)0); }
+
+#undef wmouse_trafo
+NCURSES_BOOL wmouse_trafo(
+ const WINDOW *win,
+ int *pY,
+ int *pX,
+ NCURSES_BOOL to_screen)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./base/lib_move.c */
+
+#undef wmove
+int wmove(
+ WINDOW *win,
+ int y,
+ int x)
+ { return(*(int *)0); }
+
+/* ./tty/lib_mvcur.c */
+
+#undef _nc_msec_cost
+int _nc_msec_cost(
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur_resume
+void _nc_mvcur_resume(void)
+ { /* void */ }
+
+#undef _nc_mvcur_init
+void _nc_mvcur_init(void)
+ { /* void */ }
+
+#undef _nc_mvcur_wrap
+void _nc_mvcur_wrap(void)
+ { /* void */ }
+
+#undef mvcur
+int mvcur(
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#undef _nc_optimize_enable
+int _nc_optimize_enable;
+
+/* ./base/lib_mvwin.c */
+
+#undef mvwin
+int mvwin(
+ WINDOW *win,
+ int by,
+ int bx)
+ { return(*(int *)0); }
+
+/* ./base/lib_newterm.c */
+
+#undef filter
+void filter(void)
+ { /* void */ }
+
+#undef newterm
+SCREEN *newterm(
+ char *name,
+ FILE *ofp,
+ FILE *ifp)
+ { return(*(SCREEN **)0); }
+
+/* ./base/lib_newwin.c */
+
+#undef _nc_freewin
+int _nc_freewin(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef newwin
+WINDOW *newwin(
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
+#undef derwin
+WINDOW *derwin(
+ WINDOW *orig,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
+#undef subwin
+WINDOW *subwin(
+ WINDOW *w,
+ int l,
+ int c,
+ int y,
+ int x)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_makenew
+WINDOW *_nc_makenew(
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx,
+ int flags)
+ { return(*(WINDOW **)0); }
+
+/* ./base/lib_nl.c */
+
+#undef nl
+int nl(void)
+ { return(*(int *)0); }
+
+#undef nonl
+int nonl(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_overlay.c */
+
+#undef overlay
+int overlay(
+ const WINDOW *win1,
+ WINDOW *win2)
+ { return(*(int *)0); }
+
+#undef overwrite
+int overwrite(
+ const WINDOW *win1,
+ WINDOW *win2)
+ { return(*(int *)0); }
+
+#undef copywin
+int copywin(
+ const WINDOW *src,
+ WINDOW *dst,
+ int sminrow,
+ int smincol,
+ int dminrow,
+ int dmincol,
+ int dmaxrow,
+ int dmaxcol,
+ int over)
+ { return(*(int *)0); }
+
+/* ./base/lib_pad.c */
+
+#undef newpad
+WINDOW *newpad(
+ int l,
+ int c)
+ { return(*(WINDOW **)0); }
+
+#undef subpad
+WINDOW *subpad(
+ WINDOW *orig,
+ int l,
+ int c,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
+#undef prefresh
+int prefresh(
+ WINDOW *win,
+ int pminrow,
+ int pmincol,
+ int sminrow,
+ int smincol,
+ int smaxrow,
+ int smaxcol)
+ { return(*(int *)0); }
+
+#undef pnoutrefresh
+int pnoutrefresh(
+ WINDOW *win,
+ int pminrow,
+ int pmincol,
+ int sminrow,
+ int smincol,
+ int smaxrow,
+ int smaxcol)
+ { return(*(int *)0); }
+
+#undef pechochar
+int pechochar(
+ WINDOW *pad,
+ const chtype ch)
+ { return(*(int *)0); }
+
+/* ./base/lib_printw.c */
+
+#undef printw
+int printw(
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef wprintw
+int wprintw(
+ WINDOW *win,
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvprintw
+int mvprintw(
+ int y,
+ int x,
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvwprintw
+int mvwprintw(
+ WINDOW *win,
+ int y,
+ int x,
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef vwprintw
+int vwprintw(
+ WINDOW *win,
+ const char *fmt,
+ va_list argp)
+ { return(*(int *)0); }
+
+/* ./base/lib_redrawln.c */
+
+#undef wredrawln
+int wredrawln(
+ WINDOW *win,
+ int beg,
+ int num)
+ { return(*(int *)0); }
+
+/* ./base/lib_refresh.c */
+
+#undef wrefresh
+int wrefresh(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef wnoutrefresh
+int wnoutrefresh(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_restart.c */
+
+#undef restartterm
+int restartterm(
+ char *termp,
+ int filenum,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./base/lib_scanw.c */
+
+#undef vwscanw
+int vwscanw(
+ WINDOW *win,
+ char *fmt,
+ va_list argp)
+ { return(*(int *)0); }
+
+#undef scanw
+int scanw(
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef wscanw
+int wscanw(
+ WINDOW *win,
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvscanw
+int mvscanw(
+ int y,
+ int x,
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvwscanw
+int mvwscanw(
+ WINDOW *win,
+ int y,
+ int x,
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+/* ./base/lib_screen.c */
+
+#undef getwin
+WINDOW *getwin(
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
+#undef putwin
+int putwin(
+ WINDOW *win,
+ FILE *filep)
+ { return(*(int *)0); }
+
+#undef scr_restore
+int scr_restore(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_dump
+int scr_dump(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_init
+int scr_init(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_set
+int scr_set(
+ const char *file)
+ { return(*(int *)0); }
+
+/* ./base/lib_scroll.c */
+
+#undef _nc_scroll_window
+void _nc_scroll_window(
+ WINDOW *win,
+ int const n,
+ short const top,
+ short const bottom,
+ chtype blank)
+ { /* void */ }
+
+#undef wscrl
+int wscrl(
+ WINDOW *win,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_scrollok.c */
+
+#undef scrollok
+int scrollok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_scrreg.c */
+
+#undef wsetscrreg
+int wsetscrreg(
+ WINDOW *win,
+ int top,
+ int bottom)
+ { return(*(int *)0); }
+
+/* ./base/lib_set_term.c */
+
+#undef set_term
+SCREEN *set_term(
+ SCREEN *screenp)
+ { return(*(SCREEN **)0); }
+
+#undef delscreen
+void delscreen(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setupscreen
+int _nc_setupscreen(
+ short slines,
+ short const scolumns,
+ FILE *output)
+ { return(*(int *)0); }
+
+#undef _nc_ripoffline
+int _nc_ripoffline(
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
+#undef ripoffline
+int ripoffline(
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
+/* ./base/lib_slk.c */
+
+#undef _nc_slk_format
+int _nc_slk_format;
+
+#undef _nc_slk_initialize
+int _nc_slk_initialize(
+ WINDOW *stwin,
+ int cols)
+ { return(*(int *)0); }
+
+#undef slk_restore
+int slk_restore(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatr_set.c */
+
+#undef slk_attr_set
+int slk_attr_set(
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatrof.c */
+
+#undef slk_attroff
+int slk_attroff(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatron.c */
+
+#undef slk_attron
+int slk_attron(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatrset.c */
+
+#undef slk_attrset
+int slk_attrset(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkattr.c */
+
+#undef slk_attr
+attr_t slk_attr(void)
+ { return(*(attr_t *)0); }
+
+/* ./base/lib_slkclear.c */
+
+#undef slk_clear
+int slk_clear(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkcolor.c */
+
+#undef slk_color
+int slk_color(
+ short color_pair_number)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkinit.c */
+
+#undef slk_init
+int slk_init(
+ int format)
+ { return(*(int *)0); }
+
+/* ./base/lib_slklab.c */
+
+#undef slk_label
+char *slk_label(
+ int n)
+ { return(*(char **)0); }
+
+/* ./base/lib_slkrefr.c */
+
+#undef slk_noutrefresh
+int slk_noutrefresh(void)
+ { return(*(int *)0); }
+
+#undef slk_refresh
+int slk_refresh(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkset.c */
+
+#undef slk_set
+int slk_set(
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
+/* ./base/lib_slktouch.c */
+
+#undef slk_touch
+int slk_touch(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_touch.c */
+
+#undef is_linetouched
+NCURSES_BOOL is_linetouched(
+ WINDOW *win,
+ int line)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_wintouched
+NCURSES_BOOL is_wintouched(
+ WINDOW *win)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef wtouchln
+int wtouchln(
+ WINDOW *win,
+ int y,
+ int n,
+ int changed)
+ { return(*(int *)0); }
+
+/* ./trace/lib_traceatr.c */
+
+#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 _nc_altcharset_name
+const char *_nc_altcharset_name(
+ attr_t attr,
+ chtype ch)
+ { return(*(const char **)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+chtype _nc_retrace_chtype(
+ chtype code)
+ { return(*(chtype *)0); }
+
+/* ./trace/lib_tracedmp.c */
+
+#undef _tracedump
+void _tracedump(
+ const char *name,
+ WINDOW *win)
+ { /* void */ }
+
+/* ./trace/lib_tracemse.c */
+
+#undef _tracemouse
+char *_tracemouse(
+ MEVENT const *ep)
+ { return(*(char **)0); }
+
+/* ./tty/lib_tstp.c */
+
+#include <SigAction.h>
+
+#undef _nc_signal_handler
+void _nc_signal_handler(
+ NCURSES_BOOL enable)
+ { /* void */ }
+
+/* ./base/lib_ungetch.c */
+
+#undef _nc_fifo_dump
+void _nc_fifo_dump(void)
+ { /* void */ }
+
+#undef ungetch
+int ungetch(
+ int ch)
+ { return(*(int *)0); }
+
+/* ./tty/lib_vidattr.c */
+
+#undef vidputs
+int vidputs(
+ chtype newmode,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+#undef vidattr
+int vidattr(
+ chtype newmode)
+ { return(*(int *)0); }
+
+#undef termattrs
+chtype termattrs(void)
+ { return(*(chtype *)0); }
+
+/* ./base/lib_vline.c */
+
+#undef wvline
+int wvline(
+ WINDOW *win,
+ chtype ch,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_wattroff.c */
+
+#undef wattr_off
+int wattr_off(
+ WINDOW *win,
+ attr_t at,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_wattron.c */
+
+#undef wattr_on
+int wattr_on(
+ WINDOW *win,
+ attr_t at,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_winch.c */
+
+#undef winch
+chtype winch(
+ WINDOW *win)
+ { return(*(chtype *)0); }
+
+/* ./base/lib_window.c */
+
+#undef _nc_synchook
+void _nc_synchook(
+ WINDOW *win)
+ { /* void */ }
+
+#undef mvderwin
+int mvderwin(
+ WINDOW *win,
+ int y,
+ int x)
+ { return(*(int *)0); }
+
+#undef syncok
+int syncok(
+ WINDOW *win,
+ NCURSES_BOOL bf)
+ { return(*(int *)0); }
+
+#undef wsyncup
+void wsyncup(
+ WINDOW *win)
+ { /* void */ }
+
+#undef wsyncdown
+void wsyncdown(
+ WINDOW *win)
+ { /* void */ }
+
+#undef wcursyncup
+void wcursyncup(
+ WINDOW *win)
+ { /* void */ }
+
+#undef dupwin
+WINDOW *dupwin(
+ WINDOW *win)
+ { return(*(WINDOW **)0); }
+
+/* ./base/nc_panel.c */
+
+#undef _nc_panelhook
+struct panelhook *_nc_panelhook(void)
+ { return(*(struct panelhook **)0); }
+
+/* ./base/safe_sprintf.c */
+
+#undef _nc_printf_string
+char *_nc_printf_string(
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
+/* ./tty/tty_update.c */
+
+#include <sys/time.h>
+#include <sys/times.h>
+
+#undef doupdate
+int doupdate(void)
+ { return(*(int *)0); }
+
+#undef _nc_scrolln
+int _nc_scrolln(
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
+#undef _nc_screen_resume
+void _nc_screen_resume(void)
+ { /* void */ }
+
+#undef _nc_screen_init
+void _nc_screen_init(void)
+ { /* void */ }
+
+#undef _nc_screen_wrap
+void _nc_screen_wrap(void)
+ { /* void */ }
+
+#undef _nc_do_xmc_glitch
+void _nc_do_xmc_glitch(
+ attr_t previous)
+ { /* void */ }
+
+/* ./trace/varargs.c */
+
+#undef _nc_varargs
+char *_nc_varargs(
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
+/* ./base/memmove.c */
+
+#undef _nc_memmove
+void _nc_memmove(void)
+ { /* void */ }
+
+/* ./base/vsscanf.c */
+
+#undef _nc_vsscanf
+void _nc_vsscanf(void)
+ { /* void */ }
+
+/* ./base/lib_freeall.c */
+
+#include <term_entry.h>
+
+#undef _nc_freeall
+void _nc_freeall(void)
+ { /* void */ }
+
+/* ./base/define_key.c */
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./expanded.c */
+
+#undef _nc_toggle_attr_on
+void _nc_toggle_attr_on(
+ attr_t *S,
+ attr_t at)
+ { /* void */ }
+
+#undef _nc_toggle_attr_off
+void _nc_toggle_attr_off(
+ attr_t *S,
+ attr_t at)
+ { /* void */ }
+
+#undef _nc_DelCharCost
+int _nc_DelCharCost(
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_InsCharCost
+int _nc_InsCharCost(
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_UpdateAttrs
+void _nc_UpdateAttrs(
+ chtype c)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_dft_fgbg.c */
+
+#undef use_default_colors
+int use_default_colors(void)
+ { return(*(int *)0); }
+
+#undef assume_default_colors
+int assume_default_colors(
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_print.c */
+
+#undef mcprint
+int mcprint(
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
+/* ./base/resizeterm.c */
+
+#undef is_term_resized
+NCURSES_BOOL is_term_resized(
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef resize_term
+int resize_term(
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+#undef resizeterm
+int resizeterm(
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+/* ./trace/trace_xnames.c */
+
+#undef _nc_trace_xnames
+void _nc_trace_xnames(
+ TERMTYPE *tp)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ struct tries *tree,
+ unsigned short code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ struct tries **tree,
+ unsigned short code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ struct tries **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./base/wresize.c */
+
+#undef wresize
+int wresize(
+ WINDOW *win,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+/* ./tinfo/access.c */
+
+#undef _nc_rootname
+char *_nc_rootname(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_pathlast
+unsigned _nc_pathlast(
+ const char *path)
+ { return(*(unsigned *)0); }
+
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_access
+int _nc_access(
+ const char *path,
+ int mode)
+ { return(*(int *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+void _nc_add_to_try(
+ struct tries **tree,
+ const char *str,
+ unsigned short code)
+ { /* void */ }
+
+/* ./tinfo/alloc_entry.c */
+
+#undef _nc_init_entry
+void _nc_init_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_copy_entry
+ENTRY *_nc_copy_entry(
+ ENTRY *oldp)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_save_str
+char *_nc_save_str(
+ const char *const string)
+ { return(*(char **)0); }
+
+#undef _nc_wrap_entry
+void _nc_wrap_entry(
+ ENTRY *const ep,
+ NCURSES_BOOL copy_strings)
+ { /* void */ }
+
+#undef _nc_merge_entry
+void _nc_merge_entry(
+ TERMTYPE *const to,
+ TERMTYPE *const from)
+ { /* void */ }
+
+/* ./tinfo/alloc_ttype.c */
+
+#undef _nc_align_termtype
+void _nc_align_termtype(
+ TERMTYPE *to,
+ TERMTYPE *from)
+ { /* void */ }
+
+#undef _nc_copy_termtype
+void _nc_copy_termtype(
+ TERMTYPE *dst,
+ TERMTYPE *src)
+ { /* void */ }
+
+/* ./tinfo/captoinfo.c */
+
+#undef _nc_captoinfo
+char *_nc_captoinfo(
+ const char *cap,
+ const char *s,
+ int const parameterized)
+ { return(*(char **)0); }
+
+#undef _nc_infotocap
+char *_nc_infotocap(
+ const char *cap,
+ const char *str,
+ int const parameterized)
+ { return(*(char **)0); }
+
+/* ./codes.c */
+
+#undef boolcodes
+char *const boolcodes[] = {0};
+#undef numcodes
+char *const numcodes[] = {0};
+#undef strcodes
+char *const strcodes[] = {0};
+
+/* ./comp_captab.c */
+
+#include <ncurses_cfg.h>
+
+#undef _nc_info_hash_table
+const struct name_table_entry *const _nc_info_hash_table[995] = {0};
+#undef _nc_cap_hash_table
+const struct name_table_entry *const _nc_cap_hash_table[995] = {0};
+#undef _nc_capalias_table
+const struct alias _nc_capalias_table[] = {0};
+#undef _nc_infoalias_table
+const struct alias _nc_infoalias_table[] = {0};
+
+#undef _nc_get_table
+const struct name_table_entry *_nc_get_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+#undef _nc_get_hash_table
+const struct name_table_entry *const *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+/* ./tinfo/comp_error.c */
+
+#undef _nc_suppress_warnings
+NCURSES_BOOL _nc_suppress_warnings;
+#undef _nc_curr_line
+int _nc_curr_line;
+#undef _nc_curr_col
+int _nc_curr_col;
+
+#undef _nc_set_source
+void _nc_set_source(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_set_type
+void _nc_set_type(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_get_type
+void _nc_get_type(
+ char *name)
+ { /* void */ }
+
+#undef _nc_warning
+void _nc_warning(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_err_abort
+void _nc_err_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_syserr_abort
+void _nc_syserr_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+/* ./tinfo/comp_expand.c */
+
+#undef _nc_tic_expand
+char *_nc_tic_expand(
+ const char *srcp,
+ NCURSES_BOOL tic_format,
+ int numbers)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_hash.c */
+
+#include <hashsize.h>
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const struct name_table_entry *const *hash_table)
+ { return(*(struct name_table_entry const **)0); }
+
+#undef _nc_find_type_entry
+struct name_table_entry const *_nc_find_type_entry(
+ const char *string,
+ int type,
+ const struct name_table_entry *table)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/comp_parse.c */
+
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_entry_match
+NCURSES_BOOL _nc_entry_match(
+ char *n1,
+ char *n2)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_read_entry_source
+void _nc_read_entry_source(
+ FILE *fp,
+ char *buf,
+ int literal,
+ NCURSES_BOOL silent,
+ NCURSES_BOOL (*hook)(
+ ENTRY *p1))
+ { /* void */ }
+
+#undef _nc_resolve_uses
+int _nc_resolve_uses(
+ NCURSES_BOOL fullresolve)
+ { return(*(int *)0); }
+
+/* ./tinfo/comp_scan.c */
+
+#undef _nc_syntax
+int _nc_syntax;
+#undef _nc_curr_file_pos
+long _nc_curr_file_pos;
+#undef _nc_comment_start
+long _nc_comment_start;
+#undef _nc_comment_end
+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
+NCURSES_BOOL _nc_disable_period;
+
+#undef _nc_get_token
+int _nc_get_token(
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_trans_string
+int _nc_trans_string(
+ char *ptr,
+ char *last)
+ { return(*(int *)0); }
+
+#undef _nc_push_token
+void _nc_push_token(
+ int tokclass)
+ { /* void */ }
+
+#undef _nc_panic_mode
+void _nc_panic_mode(
+ char ch)
+ { /* void */ }
+
+#undef _nc_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./fallback.c */
+
+#undef _nc_fallback
+const TERMTYPE *_nc_fallback(
+ const char *name)
+ { return(*(const TERMTYPE **)0); }
+
+/* ./tinfo/free_ttype.c */
+
+#undef _nc_free_termtype
+void _nc_free_termtype(
+ TERMTYPE *ptr)
+ { /* void */ }
+
+#undef _nc_user_definable
+NCURSES_BOOL _nc_user_definable;
+
+#undef use_extended_names
+int use_extended_names(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/getenv_num.c */
+
+#undef _nc_getenv_num
+int _nc_getenv_num(
+ const char *name)
+ { return(*(int *)0); }
+
+/* ./tinfo/home_terminfo.c */
+
+#undef _nc_home_terminfo
+char *_nc_home_terminfo(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/init_keytry.c */
+
+#if 0
+
+#include <init_keytry.h>
+
+#undef _nc_tinfo_fkeys
+struct tinfo_fkeys _nc_tinfo_fkeys[];
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(void)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef acs_map
+chtype acs_map[128];
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef cur_term
+TERMINAL *cur_term;
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef stdscr
+WINDOW *stdscr;
+#undef curscr
+WINDOW *curscr;
+#undef newscr
+WINDOW *newscr;
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+#undef _nc_key_names
+const struct kn _nc_key_names[] = {0};
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#include <time.h>
+
+#undef napms
+int napms(
+ int ms)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_options.c */
+
+#undef idlok
+int idlok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef idcok
+void idcok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+#undef halfdelay
+int halfdelay(
+ int t)
+ { return(*(int *)0); }
+
+#undef nodelay
+int nodelay(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef notimeout
+int notimeout(
+ WINDOW *win,
+ NCURSES_BOOL f)
+ { return(*(int *)0); }
+
+#undef wtimeout
+void wtimeout(
+ WINDOW *win,
+ int delay)
+ { /* void */ }
+
+#undef keypad
+int keypad(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef meta
+int meta(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#undef ttytype
+char ttytype[256];
+#undef LINES
+int LINES;
+#undef COLS
+int COLS;
+#undef TABSIZE
+int TABSIZE;
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(void)
+ { /* void */ }
+
+#undef _nc_get_locale
+char *_nc_get_locale(void)
+ { return(*(char **)0); }
+
+#undef _nc_unicode_locale
+int _nc_unicode_locale(void)
+ { return(*(int *)0); }
+
+#undef _nc_locale_breaks_acs
+int _nc_locale_breaks_acs(void)
+ { return(*(int *)0); }
+
+#undef setupterm
+int setupterm(
+ char *tname,
+ int Filedes,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_termcap.c */
+
+#undef UP
+char *UP;
+#undef BC
+char *BC;
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
+#undef tgoto
+char *tgoto(
+ const char *string,
+ int x,
+ int y)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ti.c */
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr
+char *tigetstr(
+ char *str)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tparm.c */
+
+#undef _nc_tparm_err
+int _nc_tparm_err;
+
+#undef _nc_tparm_analyze
+int _nc_tparm_analyze(
+ const char *string,
+ char *p_is_s[9],
+ int *popcount)
+ { return(*(int *)0); }
+
+#undef tparm
+char *tparm(
+ char *string,
+ ...)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tputs.c */
+
+#undef PC
+char PC;
+#undef ospeed
+NCURSES_OSPEED ospeed;
+#undef _nc_nulls_sent
+int _nc_nulls_sent;
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs
+int tputs(
+ const char *string,
+ int affcnt,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+/* ./trace/lib_trace.c */
+
+#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(
+ const unsigned int tracelevel)
+ { /* void */ }
+
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_bool
+NCURSES_BOOL _nc_retrace_bool(
+ NCURSES_BOOL code)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_unsigned
+unsigned _nc_retrace_unsigned(
+ unsigned code)
+ { return(*(unsigned *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_sp
+SCREEN *_nc_retrace_sp(
+ SCREEN *code)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
+/* ./trace/lib_tracebits.c */
+
+#undef _nc_trace_ttymode
+char *_nc_trace_ttymode(
+ struct termios *tty)
+ { return(*(char **)0); }
+
+#undef _nc_tracebits
+char *_nc_tracebits(void)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracechr.c */
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode
+int _nc_set_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ int mode,
+ int milliseconds,
+ int *timeleft)
+ { return(*(int *)0); }
+
+/* ./tinfo/name_match.c */
+
+#undef _nc_first_name
+char *_nc_first_name(
+ const char *const sp)
+ { return(*(char **)0); }
+
+#undef _nc_name_match
+int _nc_name_match(
+ const char *const namelst,
+ const char *const name,
+ const char *const delim)
+ { return(*(int *)0); }
+
+/* ./names.c */
+
+#undef boolnames
+char *const boolnames[] = {0};
+#undef boolfnames
+char *const boolfnames[] = {0};
+#undef numnames
+char *const numnames[] = {0};
+#undef numfnames
+char *const numfnames[] = {0};
+#undef strnames
+char *const strnames[] = {0};
+#undef strfnames
+char *const strfnames[] = {0};
+
+/* ./tinfo/parse_entry.c */
+
+#undef _nc_parse_entry
+int _nc_parse_entry(
+ struct entry *entryp,
+ int literal,
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_capcmp
+int _nc_capcmp(
+ const char *s,
+ const char *t)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_entry.c */
+
+#undef _nc_tic_dir
+const char *_nc_tic_dir(
+ const char *path)
+ { return(*(const char **)0); }
+
+#undef _nc_keep_tic_dir
+void _nc_keep_tic_dir(
+ const char *path)
+ { /* void */ }
+
+#undef _nc_read_file_entry
+int _nc_read_file_entry(
+ const char *const filename,
+ TERMTYPE *ptr)
+ { return(*(int *)0); }
+
+#undef _nc_read_entry
+int _nc_read_entry(
+ const char *const tn,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#undef _nc_read_termcap_entry
+int _nc_read_termcap_entry(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/setbuf.c */
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ NCURSES_BOOL buffered)
+ { /* void */ }
+
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+NCURSES_BOOL _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_safe_strcpy
+NCURSES_BOOL _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./trace/trace_buf.c */
+
+#undef _nc_trace_buf
+char *_nc_trace_buf(
+ int bufnum,
+ size_t want)
+ { return(*(char **)0); }
+
+#undef _nc_trace_bufcat
+char *_nc_trace_bufcat(
+ int bufnum,
+ const char *value)
+ { return(*(char **)0); }
+
+/* ./trace/trace_tries.c */
+
+#undef _nc_trace_tries
+void _nc_trace_tries(
+ struct tries *tree)
+ { /* void */ }
+
+/* ./unctrl.c */
+
+#undef unctrl
+char *unctrl(
+ chtype ch)
+ { return(*(char **)0); }
+
+/* ./trace/visbuf.c */
+
+#undef _nc_visbuf2
+const char *_nc_visbuf2(
+ int bufnum,
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbuf
+const char *_nc_visbuf(
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbufn
+const char *_nc_visbufn(
+ const char *buf,
+ int len)
+ { return(*(const char **)0); }
+
+/* ./tinfo/write_entry.c */
+
+#undef _nc_set_writedir
+void _nc_set_writedir(
+ char *dir)
+ { /* void */ }
+
+#undef _nc_write_entry
+void _nc_write_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_tic_written
+int _nc_tic_written(void)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/Build/source/libs/ncurses/ncurses/llib-lncursesw b/Build/source/libs/ncurses/ncurses/llib-lncursesw
new file mode 100644
index 00000000000..a1868288d3f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/llib-lncursesw
@@ -0,0 +1,3844 @@
+/****************************************************************************
+ * Copyright (c) 2001-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 2001-2004 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tty/hardscroll.c */
+
+#include <curses.priv.h>
+
+#undef _nc_oldnums
+int *_nc_oldnums;
+
+#undef _nc_scroll_optimize
+void _nc_scroll_optimize(void)
+ { /* void */ }
+
+#undef _nc_linedump
+void _nc_linedump(void)
+ { /* void */ }
+
+/* ./tty/hashmap.c */
+
+#undef _nc_hash_map
+void _nc_hash_map(void)
+ { /* void */ }
+
+#undef _nc_make_oldhash
+void _nc_make_oldhash(
+ int i)
+ { /* void */ }
+
+#undef _nc_scroll_oldhash
+void _nc_scroll_oldhash(
+ int n,
+ int top,
+ int bot)
+ { /* void */ }
+
+/* ./base/lib_addch.c */
+
+#include <ctype.h>
+
+#undef _nc_render
+cchar_t _nc_render(
+ WINDOW *win,
+ cchar_t ch)
+ { return(*(cchar_t *)0); }
+
+#undef _nc_waddch_nosync
+int _nc_waddch_nosync(
+ WINDOW *win,
+ const cchar_t c)
+ { return(*(int *)0); }
+
+#undef waddch
+int waddch(
+ WINDOW *win,
+ const chtype ch)
+ { return(*(int *)0); }
+
+#undef wechochar
+int wechochar(
+ WINDOW *win,
+ const chtype ch)
+ { return(*(int *)0); }
+
+/* ./base/lib_addstr.c */
+
+#undef waddnstr
+int waddnstr(
+ WINDOW *win,
+ const char *astr,
+ int n)
+ { return(*(int *)0); }
+
+#undef waddchnstr
+int waddchnstr(
+ WINDOW *win,
+ const chtype *astr,
+ int n)
+ { return(*(int *)0); }
+
+#undef _nc_wchstrlen
+int _nc_wchstrlen(
+ const cchar_t *s)
+ { return(*(int *)0); }
+
+#undef wadd_wchnstr
+int wadd_wchnstr(
+ WINDOW *win,
+ const cchar_t *astr,
+ int n)
+ { return(*(int *)0); }
+
+#undef waddnwstr
+int waddnwstr(
+ WINDOW *win,
+ const wchar_t *str,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_beep.c */
+
+#undef beep
+int beep(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_bkgd.c */
+
+#undef wbkgrndset
+void wbkgrndset(
+ WINDOW *win,
+ const cchar_t *ch)
+ { /* void */ }
+
+#undef wbkgdset
+void wbkgdset(
+ WINDOW *win,
+ chtype ch)
+ { /* void */ }
+
+#undef wbkgrnd
+int wbkgrnd(
+ WINDOW *win,
+ const cchar_t *ch)
+ { return(*(int *)0); }
+
+#undef wbkgd
+int wbkgd(
+ WINDOW *win,
+ chtype ch)
+ { return(*(int *)0); }
+
+/* ./base/lib_box.c */
+
+#undef wborder
+int wborder(
+ WINDOW *win,
+ chtype ls,
+ chtype rs,
+ chtype ts,
+ chtype bs,
+ chtype tl,
+ chtype tr,
+ chtype bl,
+ chtype br)
+ { return(*(int *)0); }
+
+/* ./base/lib_chgat.c */
+
+#undef wchgat
+int wchgat(
+ WINDOW *win,
+ int n,
+ attr_t attr,
+ short color,
+ const void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_clear.c */
+
+#undef wclear
+int wclear(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_clearok.c */
+
+#undef clearok
+int clearok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_clrbot.c */
+
+#undef wclrtobot
+int wclrtobot(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_clreol.c */
+
+#undef wclrtoeol
+int wclrtoeol(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_color.c */
+
+#include <tic.h>
+
+#undef COLOR_PAIRS
+int COLOR_PAIRS;
+#undef COLORS
+int COLORS;
+
+#undef _nc_reset_colors
+NCURSES_BOOL _nc_reset_colors(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef start_color
+int start_color(void)
+ { return(*(int *)0); }
+
+#undef init_pair
+int init_pair(
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
+#undef init_color
+int init_color(
+ short color,
+ short r,
+ short g,
+ short b)
+ { return(*(int *)0); }
+
+#undef can_change_color
+NCURSES_BOOL can_change_color(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_colors
+NCURSES_BOOL has_colors(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef color_content
+int color_content(
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
+#undef pair_content
+int pair_content(
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
+#undef _nc_do_color
+void _nc_do_color(
+ int old_pair,
+ int pair,
+ NCURSES_BOOL reverse,
+ int (*outc)(
+ int p1))
+ { /* void */ }
+
+/* ./base/lib_colorset.c */
+
+#undef wcolor_set
+int wcolor_set(
+ WINDOW *win,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_delch.c */
+
+#undef wdelch
+int wdelch(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_delwin.c */
+
+#undef delwin
+int delwin(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_echo.c */
+
+#undef echo
+int echo(void)
+ { return(*(int *)0); }
+
+#undef noecho
+int noecho(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_endwin.c */
+
+#undef endwin
+int endwin(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_erase.c */
+
+#undef werase
+int werase(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_flash.c */
+
+#undef flash
+int flash(void)
+ { return(*(int *)0); }
+
+/* ./lib_gen.c */
+
+#undef addch
+int addch(
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef addchnstr
+int addchnstr(
+ const chtype *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef addchstr
+int addchstr(
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef addnstr
+int addnstr(
+ const char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef addstr
+int addstr(
+ const char *z)
+ { return(*(int *)0); }
+
+#undef attroff
+int attroff(
+ NCURSES_ATTR_T z)
+ { return(*(int *)0); }
+
+#undef attron
+int attron(
+ NCURSES_ATTR_T z)
+ { return(*(int *)0); }
+
+#undef attrset
+int attrset(
+ NCURSES_ATTR_T z)
+ { return(*(int *)0); }
+
+#undef attr_get
+int attr_get(
+ attr_t *a1,
+ short *a2,
+ void *z)
+ { return(*(int *)0); }
+
+#undef attr_off
+int attr_off(
+ attr_t a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef attr_on
+int attr_on(
+ attr_t a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef attr_set
+int attr_set(
+ attr_t a1,
+ short a2,
+ void *z)
+ { return(*(int *)0); }
+
+#undef bkgd
+int bkgd(
+ chtype z)
+ { return(*(int *)0); }
+
+#undef bkgdset
+void bkgdset(
+ chtype z)
+ { /* void */ }
+
+#undef border
+int border(
+ chtype a1,
+ chtype a2,
+ chtype a3,
+ chtype a4,
+ chtype a5,
+ chtype a6,
+ chtype a7,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef box
+int box(
+ WINDOW *a1,
+ chtype a2,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef chgat
+int chgat(
+ int a1,
+ attr_t a2,
+ short a3,
+ const void *z)
+ { return(*(int *)0); }
+
+#undef clear
+int clear(void)
+ { return(*(int *)0); }
+
+#undef clrtobot
+int clrtobot(void)
+ { return(*(int *)0); }
+
+#undef clrtoeol
+int clrtoeol(void)
+ { return(*(int *)0); }
+
+#undef color_set
+int color_set(
+ short a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef COLOR_PAIR
+int COLOR_PAIR(
+ int z)
+ { return(*(int *)0); }
+
+#undef delch
+int delch(void)
+ { return(*(int *)0); }
+
+#undef deleteln
+int deleteln(void)
+ { return(*(int *)0); }
+
+#undef echochar
+int echochar(
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef erase
+int erase(void)
+ { return(*(int *)0); }
+
+#undef getbkgd
+chtype getbkgd(
+ WINDOW *z)
+ { return(*(chtype *)0); }
+
+#undef getch
+int getch(void)
+ { return(*(int *)0); }
+
+#undef getnstr
+int getnstr(
+ char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef getstr
+int getstr(
+ char *z)
+ { return(*(int *)0); }
+
+#undef hline
+int hline(
+ chtype a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef inch
+chtype inch(void)
+ { return(*(chtype *)0); }
+
+#undef inchnstr
+int inchnstr(
+ chtype *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef inchstr
+int inchstr(
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef innstr
+int innstr(
+ char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef insch
+int insch(
+ chtype z)
+ { return(*(int *)0); }
+
+#undef insdelln
+int insdelln(
+ int z)
+ { return(*(int *)0); }
+
+#undef insertln
+int insertln(void)
+ { return(*(int *)0); }
+
+#undef insnstr
+int insnstr(
+ const char *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef insstr
+int insstr(
+ const char *z)
+ { return(*(int *)0); }
+
+#undef instr
+int instr(
+ char *z)
+ { return(*(int *)0); }
+
+#undef move
+int move(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddch
+int mvaddch(
+ int a1,
+ int a2,
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef mvaddchnstr
+int mvaddchnstr(
+ int a1,
+ int a2,
+ const chtype *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddchstr
+int mvaddchstr(
+ int a1,
+ int a2,
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef mvaddnstr
+int mvaddnstr(
+ int a1,
+ int a2,
+ const char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddstr
+int mvaddstr(
+ int a1,
+ int a2,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvchgat
+int mvchgat(
+ int a1,
+ int a2,
+ int a3,
+ attr_t a4,
+ short a5,
+ const void *z)
+ { return(*(int *)0); }
+
+#undef mvdelch
+int mvdelch(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvgetch
+int mvgetch(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvgetnstr
+int mvgetnstr(
+ int a1,
+ int a2,
+ char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvgetstr
+int mvgetstr(
+ int a1,
+ int a2,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvhline
+int mvhline(
+ int a1,
+ int a2,
+ chtype a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinch
+chtype mvinch(
+ int a1,
+ int z)
+ { return(*(chtype *)0); }
+
+#undef mvinchnstr
+int mvinchnstr(
+ int a1,
+ int a2,
+ chtype *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinchstr
+int mvinchstr(
+ int a1,
+ int a2,
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef mvinnstr
+int mvinnstr(
+ int a1,
+ int a2,
+ char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinsch
+int mvinsch(
+ int a1,
+ int a2,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef mvinsnstr
+int mvinsnstr(
+ int a1,
+ int a2,
+ const char *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvinsstr
+int mvinsstr(
+ int a1,
+ int a2,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvinstr
+int mvinstr(
+ int a1,
+ int a2,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvvline
+int mvvline(
+ int a1,
+ int a2,
+ chtype a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddch
+int mvwaddch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const chtype z)
+ { return(*(int *)0); }
+
+#undef mvwaddchnstr
+int mvwaddchnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const chtype *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddchstr
+int mvwaddchstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef mvwaddnstr
+int mvwaddnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddstr
+int mvwaddstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvwchgat
+int mvwchgat(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ int a4,
+ attr_t a5,
+ short a6,
+ const void *z)
+ { return(*(int *)0); }
+
+#undef mvwdelch
+int mvwdelch(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwgetch
+int mvwgetch(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwgetnstr
+int mvwgetnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwgetstr
+int mvwgetstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvwhline
+int mvwhline(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinch
+chtype mvwinch(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(chtype *)0); }
+
+#undef mvwinchnstr
+int mvwinchnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinchstr
+int mvwinchstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef mvwinnstr
+int mvwinnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinsch
+int mvwinsch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype z)
+ { return(*(int *)0); }
+
+#undef mvwinsnstr
+int mvwinsnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwinsstr
+int mvwinsstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef mvwinstr
+int mvwinstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ char *z)
+ { return(*(int *)0); }
+
+#undef mvwvline
+int mvwvline(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ chtype a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef PAIR_NUMBER
+int PAIR_NUMBER(
+ int z)
+ { return(*(int *)0); }
+
+#undef redrawwin
+int redrawwin(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef refresh
+int refresh(void)
+ { return(*(int *)0); }
+
+#undef scrl
+int scrl(
+ int z)
+ { return(*(int *)0); }
+
+#undef scroll
+int scroll(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef setscrreg
+int setscrreg(
+ int a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef slk_attr_off
+int slk_attr_off(
+ const attr_t a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef slk_attr_on
+int slk_attr_on(
+ attr_t a1,
+ void *z)
+ { return(*(int *)0); }
+
+#undef standout
+int standout(void)
+ { return(*(int *)0); }
+
+#undef standend
+int standend(void)
+ { return(*(int *)0); }
+
+#undef timeout
+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)
+ { return(*(int *)0); }
+
+#undef vline
+int vline(
+ chtype a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef vw_printw
+int vw_printw(
+ WINDOW *a1,
+ const char *a2,
+ va_list z)
+ { return(*(int *)0); }
+
+#undef vw_scanw
+int vw_scanw(
+ WINDOW *a1,
+ char *a2,
+ va_list z)
+ { return(*(int *)0); }
+
+#undef waddchstr
+int waddchstr(
+ WINDOW *a1,
+ const chtype *z)
+ { return(*(int *)0); }
+
+#undef waddstr
+int waddstr(
+ WINDOW *a1,
+ const char *z)
+ { return(*(int *)0); }
+
+#undef wattron
+int wattron(
+ WINDOW *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wattroff
+int wattroff(
+ WINDOW *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wattrset
+int wattrset(
+ WINDOW *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wattr_get
+int wattr_get(
+ WINDOW *a1,
+ attr_t *a2,
+ short *a3,
+ void *z)
+ { return(*(int *)0); }
+
+#undef wattr_set
+int wattr_set(
+ WINDOW *a1,
+ attr_t a2,
+ short a3,
+ void *z)
+ { return(*(int *)0); }
+
+#undef wdeleteln
+int wdeleteln(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef wgetstr
+int wgetstr(
+ WINDOW *a1,
+ char *z)
+ { return(*(int *)0); }
+
+#undef winchstr
+int winchstr(
+ WINDOW *a1,
+ chtype *z)
+ { return(*(int *)0); }
+
+#undef winsertln
+int winsertln(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef winstr
+int winstr(
+ WINDOW *a1,
+ char *z)
+ { return(*(int *)0); }
+
+#undef wstandout
+int wstandout(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef wstandend
+int wstandend(
+ WINDOW *z)
+ { return(*(int *)0); }
+
+#undef add_wch
+int add_wch(
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef add_wchnstr
+int add_wchnstr(
+ const cchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef add_wchstr
+int add_wchstr(
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef addnwstr
+int addnwstr(
+ const wchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef addwstr
+int addwstr(
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef bkgrnd
+int bkgrnd(
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef bkgrndset
+void bkgrndset(
+ const cchar_t *z)
+ { /* void */ }
+
+#undef border_set
+int border_set(
+ const cchar_t *a1,
+ const cchar_t *a2,
+ const cchar_t *a3,
+ const cchar_t *a4,
+ const cchar_t *a5,
+ const cchar_t *a6,
+ const cchar_t *a7,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef box_set
+int box_set(
+ WINDOW *a1,
+ const cchar_t *a2,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef echo_wchar
+int echo_wchar(
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef get_wch
+int get_wch(
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef get_wstr
+int get_wstr(
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef getbkgrnd
+int getbkgrnd(
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef getn_wstr
+int getn_wstr(
+ wint_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef hline_set
+int hline_set(
+ const cchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef in_wch
+int in_wch(
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef in_wchnstr
+int in_wchnstr(
+ cchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef in_wchstr
+int in_wchstr(
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef innwstr
+int innwstr(
+ wchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef ins_nwstr
+int ins_nwstr(
+ const wchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef ins_wch
+int ins_wch(
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef ins_wstr
+int ins_wstr(
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef inwstr
+int inwstr(
+ wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvadd_wch
+int mvadd_wch(
+ int a1,
+ int a2,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvadd_wchnstr
+int mvadd_wchnstr(
+ int a1,
+ int a2,
+ const cchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvadd_wchstr
+int mvadd_wchstr(
+ int a1,
+ int a2,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvaddnwstr
+int mvaddnwstr(
+ int a1,
+ int a2,
+ const wchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvaddwstr
+int mvaddwstr(
+ int a1,
+ int a2,
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvget_wch
+int mvget_wch(
+ int a1,
+ int a2,
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef mvget_wstr
+int mvget_wstr(
+ int a1,
+ int a2,
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef mvgetn_wstr
+int mvgetn_wstr(
+ int a1,
+ int a2,
+ wint_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvhline_set
+int mvhline_set(
+ int a1,
+ int a2,
+ const cchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvin_wch
+int mvin_wch(
+ int a1,
+ int a2,
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvin_wchnstr
+int mvin_wchnstr(
+ int a1,
+ int a2,
+ cchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvin_wchstr
+int mvin_wchstr(
+ int a1,
+ int a2,
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvinnwstr
+int mvinnwstr(
+ int a1,
+ int a2,
+ wchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvins_nwstr
+int mvins_nwstr(
+ int a1,
+ int a2,
+ const wchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvins_wch
+int mvins_wch(
+ int a1,
+ int a2,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvins_wstr
+int mvins_wstr(
+ int a1,
+ int a2,
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvinwstr
+int mvinwstr(
+ int a1,
+ int a2,
+ wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvvline_set
+int mvvline_set(
+ int a1,
+ int a2,
+ const cchar_t *a3,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwadd_wch
+int mvwadd_wch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwadd_wchnstr
+int mvwadd_wchnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const cchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwadd_wchstr
+int mvwadd_wchstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwaddnwstr
+int mvwaddnwstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const wchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwaddwstr
+int mvwaddwstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwget_wch
+int mvwget_wch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef mvwget_wstr
+int mvwget_wstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef mvwgetn_wstr
+int mvwgetn_wstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ wint_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwhline_set
+int mvwhline_set(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const cchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwin_wch
+int mvwin_wch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwin_wchnstr
+int mvwin_wchnstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ cchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwin_wchstr
+int mvwin_wchstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwinnwstr
+int mvwinnwstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ wchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwins_nwstr
+int mvwins_nwstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const wchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef mvwins_wch
+int mvwins_wch(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwins_wstr
+int mvwins_wstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwinwstr
+int mvwinwstr(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mvwvline_set
+int mvwvline_set(
+ WINDOW *a1,
+ int a2,
+ int a3,
+ const cchar_t *a4,
+ int z)
+ { return(*(int *)0); }
+
+#undef vline_set
+int vline_set(
+ const cchar_t *a1,
+ int z)
+ { return(*(int *)0); }
+
+#undef wadd_wchstr
+int wadd_wchstr(
+ WINDOW *a1,
+ const cchar_t *z)
+ { return(*(int *)0); }
+
+#undef waddwstr
+int waddwstr(
+ WINDOW *a1,
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef wget_wstr
+int wget_wstr(
+ WINDOW *a1,
+ wint_t *z)
+ { return(*(int *)0); }
+
+#undef win_wchstr
+int win_wchstr(
+ WINDOW *a1,
+ cchar_t *z)
+ { return(*(int *)0); }
+
+#undef wins_wstr
+int wins_wstr(
+ WINDOW *a1,
+ const wchar_t *z)
+ { return(*(int *)0); }
+
+#undef mouse_trafo
+NCURSES_BOOL mouse_trafo(
+ int *a1,
+ int *a2,
+ NCURSES_BOOL z)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./base/lib_getch.c */
+
+#include <fifo_defs.h>
+
+#undef ESCDELAY
+int ESCDELAY;
+
+#undef _nc_wgetch
+int _nc_wgetch(
+ WINDOW *win,
+ unsigned long *result,
+ int use_meta)
+ { return(*(int *)0); }
+
+#undef wgetch
+int wgetch(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_getstr.c */
+
+#undef wgetnstr
+int wgetnstr(
+ WINDOW *win,
+ char *str,
+ int maxlen)
+ { return(*(int *)0); }
+
+/* ./base/lib_hline.c */
+
+#undef whline
+int whline(
+ WINDOW *win,
+ chtype ch,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_immedok.c */
+
+#undef immedok
+void immedok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+/* ./base/lib_inchstr.c */
+
+#undef winchnstr
+int winchnstr(
+ WINDOW *win,
+ chtype *str,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_initscr.c */
+
+#undef initscr
+WINDOW *initscr(void)
+ { return(*(WINDOW **)0); }
+
+/* ./base/lib_insch.c */
+
+#undef _nc_insert_ch
+void _nc_insert_ch(
+ WINDOW *win,
+ chtype ch)
+ { /* void */ }
+
+#undef winsch
+int winsch(
+ WINDOW *win,
+ chtype c)
+ { return(*(int *)0); }
+
+#undef winsstr
+int winsstr(
+ WINDOW *win,
+ const char *s)
+ { return(*(int *)0); }
+
+/* ./base/lib_insdel.c */
+
+#undef winsdelln
+int winsdelln(
+ WINDOW *win,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_insnstr.c */
+
+#undef winsnstr
+int winsnstr(
+ WINDOW *win,
+ const char *s,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_instr.c */
+
+#undef winnstr
+int winnstr(
+ WINDOW *win,
+ char *str,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_isendwin.c */
+
+#undef isendwin
+NCURSES_BOOL isendwin(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./base/lib_leaveok.c */
+
+#undef leaveok
+int leaveok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_mouse.c */
+
+#undef getmouse
+int getmouse(
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef ungetmouse
+int ungetmouse(
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef mousemask
+mmask_t mousemask(
+ mmask_t newmask,
+ mmask_t *oldmask)
+ { return(*(mmask_t *)0); }
+
+#undef wenclose
+NCURSES_BOOL wenclose(
+ const WINDOW *win,
+ int y,
+ int x)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef mouseinterval
+int mouseinterval(
+ int maxclick)
+ { return(*(int *)0); }
+
+#undef _nc_has_mouse
+int _nc_has_mouse(void)
+ { return(*(int *)0); }
+
+#undef wmouse_trafo
+NCURSES_BOOL wmouse_trafo(
+ const WINDOW *win,
+ int *pY,
+ int *pX,
+ NCURSES_BOOL to_screen)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./base/lib_move.c */
+
+#undef wmove
+int wmove(
+ WINDOW *win,
+ int y,
+ int x)
+ { return(*(int *)0); }
+
+/* ./tty/lib_mvcur.c */
+
+#undef _nc_msec_cost
+int _nc_msec_cost(
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur_resume
+void _nc_mvcur_resume(void)
+ { /* void */ }
+
+#undef _nc_mvcur_init
+void _nc_mvcur_init(void)
+ { /* void */ }
+
+#undef _nc_mvcur_wrap
+void _nc_mvcur_wrap(void)
+ { /* void */ }
+
+#undef mvcur
+int mvcur(
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#undef _nc_optimize_enable
+int _nc_optimize_enable;
+
+/* ./base/lib_mvwin.c */
+
+#undef mvwin
+int mvwin(
+ WINDOW *win,
+ int by,
+ int bx)
+ { return(*(int *)0); }
+
+/* ./base/lib_newterm.c */
+
+#undef filter
+void filter(void)
+ { /* void */ }
+
+#undef newterm
+SCREEN *newterm(
+ char *name,
+ FILE *ofp,
+ FILE *ifp)
+ { return(*(SCREEN **)0); }
+
+/* ./base/lib_newwin.c */
+
+#undef _nc_freewin
+int _nc_freewin(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef newwin
+WINDOW *newwin(
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
+#undef derwin
+WINDOW *derwin(
+ WINDOW *orig,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
+#undef subwin
+WINDOW *subwin(
+ WINDOW *w,
+ int l,
+ int c,
+ int y,
+ int x)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_makenew
+WINDOW *_nc_makenew(
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx,
+ int flags)
+ { return(*(WINDOW **)0); }
+
+/* ./base/lib_nl.c */
+
+#undef nl
+int nl(void)
+ { return(*(int *)0); }
+
+#undef nonl
+int nonl(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_overlay.c */
+
+#undef overlay
+int overlay(
+ const WINDOW *win1,
+ WINDOW *win2)
+ { return(*(int *)0); }
+
+#undef overwrite
+int overwrite(
+ const WINDOW *win1,
+ WINDOW *win2)
+ { return(*(int *)0); }
+
+#undef copywin
+int copywin(
+ const WINDOW *src,
+ WINDOW *dst,
+ int sminrow,
+ int smincol,
+ int dminrow,
+ int dmincol,
+ int dmaxrow,
+ int dmaxcol,
+ int over)
+ { return(*(int *)0); }
+
+/* ./base/lib_pad.c */
+
+#undef newpad
+WINDOW *newpad(
+ int l,
+ int c)
+ { return(*(WINDOW **)0); }
+
+#undef subpad
+WINDOW *subpad(
+ WINDOW *orig,
+ int l,
+ int c,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
+#undef prefresh
+int prefresh(
+ WINDOW *win,
+ int pminrow,
+ int pmincol,
+ int sminrow,
+ int smincol,
+ int smaxrow,
+ int smaxcol)
+ { return(*(int *)0); }
+
+#undef pnoutrefresh
+int pnoutrefresh(
+ WINDOW *win,
+ int pminrow,
+ int pmincol,
+ int sminrow,
+ int smincol,
+ int smaxrow,
+ int smaxcol)
+ { return(*(int *)0); }
+
+#undef pechochar
+int pechochar(
+ WINDOW *pad,
+ const chtype ch)
+ { return(*(int *)0); }
+
+/* ./base/lib_printw.c */
+
+#undef printw
+int printw(
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef wprintw
+int wprintw(
+ WINDOW *win,
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvprintw
+int mvprintw(
+ int y,
+ int x,
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvwprintw
+int mvwprintw(
+ WINDOW *win,
+ int y,
+ int x,
+ const char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef vwprintw
+int vwprintw(
+ WINDOW *win,
+ const char *fmt,
+ va_list argp)
+ { return(*(int *)0); }
+
+/* ./base/lib_redrawln.c */
+
+#undef wredrawln
+int wredrawln(
+ WINDOW *win,
+ int beg,
+ int num)
+ { return(*(int *)0); }
+
+/* ./base/lib_refresh.c */
+
+#undef wrefresh
+int wrefresh(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef wnoutrefresh
+int wnoutrefresh(
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./base/lib_restart.c */
+
+#undef restartterm
+int restartterm(
+ char *termp,
+ int filenum,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./base/lib_scanw.c */
+
+#undef vwscanw
+int vwscanw(
+ WINDOW *win,
+ char *fmt,
+ va_list argp)
+ { return(*(int *)0); }
+
+#undef scanw
+int scanw(
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef wscanw
+int wscanw(
+ WINDOW *win,
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvscanw
+int mvscanw(
+ int y,
+ int x,
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+#undef mvwscanw
+int mvwscanw(
+ WINDOW *win,
+ int y,
+ int x,
+ char *fmt,
+ ...)
+ { return(*(int *)0); }
+
+/* ./base/lib_screen.c */
+
+#undef getwin
+WINDOW *getwin(
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
+#undef putwin
+int putwin(
+ WINDOW *win,
+ FILE *filep)
+ { return(*(int *)0); }
+
+#undef scr_restore
+int scr_restore(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_dump
+int scr_dump(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_init
+int scr_init(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_set
+int scr_set(
+ const char *file)
+ { return(*(int *)0); }
+
+/* ./base/lib_scroll.c */
+
+#undef _nc_scroll_window
+void _nc_scroll_window(
+ WINDOW *win,
+ int const n,
+ short const top,
+ short const bottom,
+ cchar_t blank)
+ { /* void */ }
+
+#undef wscrl
+int wscrl(
+ WINDOW *win,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_scrollok.c */
+
+#undef scrollok
+int scrollok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_scrreg.c */
+
+#undef wsetscrreg
+int wsetscrreg(
+ WINDOW *win,
+ int top,
+ int bottom)
+ { return(*(int *)0); }
+
+/* ./base/lib_set_term.c */
+
+#undef set_term
+SCREEN *set_term(
+ SCREEN *screenp)
+ { return(*(SCREEN **)0); }
+
+#undef delscreen
+void delscreen(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setupscreen
+int _nc_setupscreen(
+ short slines,
+ short const scolumns,
+ FILE *output)
+ { return(*(int *)0); }
+
+#undef _nc_ripoffline
+int _nc_ripoffline(
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
+#undef ripoffline
+int ripoffline(
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
+/* ./base/lib_slk.c */
+
+#undef _nc_slk_format
+int _nc_slk_format;
+
+#undef _nc_slk_initialize
+int _nc_slk_initialize(
+ WINDOW *stwin,
+ int cols)
+ { return(*(int *)0); }
+
+#undef slk_restore
+int slk_restore(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatr_set.c */
+
+#undef slk_attr_set
+int slk_attr_set(
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatrof.c */
+
+#undef slk_attroff
+int slk_attroff(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatron.c */
+
+#undef slk_attron
+int slk_attron(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatrset.c */
+
+#undef slk_attrset
+int slk_attrset(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkattr.c */
+
+#undef slk_attr
+attr_t slk_attr(void)
+ { return(*(attr_t *)0); }
+
+/* ./base/lib_slkclear.c */
+
+#undef slk_clear
+int slk_clear(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkcolor.c */
+
+#undef slk_color
+int slk_color(
+ short color_pair_number)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkinit.c */
+
+#undef slk_init
+int slk_init(
+ int format)
+ { return(*(int *)0); }
+
+/* ./base/lib_slklab.c */
+
+#undef slk_label
+char *slk_label(
+ int n)
+ { return(*(char **)0); }
+
+/* ./base/lib_slkrefr.c */
+
+#undef slk_noutrefresh
+int slk_noutrefresh(void)
+ { return(*(int *)0); }
+
+#undef slk_refresh
+int slk_refresh(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkset.c */
+
+#undef slk_set
+int slk_set(
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
+/* ./base/lib_slktouch.c */
+
+#undef slk_touch
+int slk_touch(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_touch.c */
+
+#undef is_linetouched
+NCURSES_BOOL is_linetouched(
+ WINDOW *win,
+ int line)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_wintouched
+NCURSES_BOOL is_wintouched(
+ WINDOW *win)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef wtouchln
+int wtouchln(
+ WINDOW *win,
+ int y,
+ int n,
+ int changed)
+ { return(*(int *)0); }
+
+/* ./trace/lib_traceatr.c */
+
+#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 _nc_altcharset_name
+const char *_nc_altcharset_name(
+ attr_t attr,
+ chtype ch)
+ { return(*(const char **)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+chtype _nc_retrace_chtype(
+ chtype code)
+ { return(*(chtype *)0); }
+
+#undef _tracecchar_t2
+char *_tracecchar_t2(
+ int bufnum,
+ const cchar_t *ch)
+ { return(*(char **)0); }
+
+#undef _tracecchar_t
+char *_tracecchar_t(
+ const cchar_t *ch)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracedmp.c */
+
+#undef _tracedump
+void _tracedump(
+ const char *name,
+ WINDOW *win)
+ { /* void */ }
+
+/* ./trace/lib_tracemse.c */
+
+#undef _tracemouse
+char *_tracemouse(
+ MEVENT const *ep)
+ { return(*(char **)0); }
+
+/* ./tty/lib_tstp.c */
+
+#include <SigAction.h>
+
+#undef _nc_signal_handler
+void _nc_signal_handler(
+ NCURSES_BOOL enable)
+ { /* void */ }
+
+/* ./base/lib_ungetch.c */
+
+#undef _nc_fifo_dump
+void _nc_fifo_dump(void)
+ { /* void */ }
+
+#undef ungetch
+int ungetch(
+ int ch)
+ { return(*(int *)0); }
+
+/* ./tty/lib_vidattr.c */
+
+#undef vidputs
+int vidputs(
+ chtype newmode,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+#undef vidattr
+int vidattr(
+ chtype newmode)
+ { return(*(int *)0); }
+
+#undef termattrs
+chtype termattrs(void)
+ { return(*(chtype *)0); }
+
+/* ./base/lib_vline.c */
+
+#undef wvline
+int wvline(
+ WINDOW *win,
+ chtype ch,
+ int n)
+ { return(*(int *)0); }
+
+/* ./base/lib_wattroff.c */
+
+#undef wattr_off
+int wattr_off(
+ WINDOW *win,
+ attr_t at,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_wattron.c */
+
+#undef wattr_on
+int wattr_on(
+ WINDOW *win,
+ attr_t at,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./base/lib_winch.c */
+
+#undef winch
+chtype winch(
+ WINDOW *win)
+ { return(*(chtype *)0); }
+
+/* ./base/lib_window.c */
+
+#undef _nc_synchook
+void _nc_synchook(
+ WINDOW *win)
+ { /* void */ }
+
+#undef mvderwin
+int mvderwin(
+ WINDOW *win,
+ int y,
+ int x)
+ { return(*(int *)0); }
+
+#undef syncok
+int syncok(
+ WINDOW *win,
+ NCURSES_BOOL bf)
+ { return(*(int *)0); }
+
+#undef wsyncup
+void wsyncup(
+ WINDOW *win)
+ { /* void */ }
+
+#undef wsyncdown
+void wsyncdown(
+ WINDOW *win)
+ { /* void */ }
+
+#undef wcursyncup
+void wcursyncup(
+ WINDOW *win)
+ { /* void */ }
+
+#undef dupwin
+WINDOW *dupwin(
+ WINDOW *win)
+ { return(*(WINDOW **)0); }
+
+/* ./base/nc_panel.c */
+
+#undef _nc_panelhook
+struct panelhook *_nc_panelhook(void)
+ { return(*(struct panelhook **)0); }
+
+/* ./base/safe_sprintf.c */
+
+#undef _nc_printf_string
+char *_nc_printf_string(
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
+/* ./tty/tty_update.c */
+
+#include <sys/time.h>
+#include <sys/times.h>
+
+#undef doupdate
+int doupdate(void)
+ { return(*(int *)0); }
+
+#undef _nc_scrolln
+int _nc_scrolln(
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
+#undef _nc_screen_resume
+void _nc_screen_resume(void)
+ { /* void */ }
+
+#undef _nc_screen_init
+void _nc_screen_init(void)
+ { /* void */ }
+
+#undef _nc_screen_wrap
+void _nc_screen_wrap(void)
+ { /* void */ }
+
+#undef _nc_do_xmc_glitch
+void _nc_do_xmc_glitch(
+ attr_t previous)
+ { /* void */ }
+
+/* ./trace/varargs.c */
+
+#undef _nc_varargs
+char *_nc_varargs(
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
+/* ./base/memmove.c */
+
+#undef _nc_memmove
+void _nc_memmove(void)
+ { /* void */ }
+
+/* ./base/vsscanf.c */
+
+#undef _nc_vsscanf
+void _nc_vsscanf(void)
+ { /* void */ }
+
+/* ./base/lib_freeall.c */
+
+#include <term_entry.h>
+
+#undef _nc_freeall
+void _nc_freeall(void)
+ { /* void */ }
+
+/* ./widechar/charable.c */
+
+#undef _nc_is_charable
+NCURSES_BOOL _nc_is_charable(
+ wchar_t ch)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_to_char
+int _nc_to_char(
+ wint_t ch)
+ { return(*(int *)0); }
+
+#undef _nc_to_widechar
+wint_t _nc_to_widechar(
+ int ch)
+ { return(*(wint_t *)0); }
+
+/* ./widechar/lib_add_wch.c */
+
+#undef wadd_wch
+int wadd_wch(
+ WINDOW *win,
+ const cchar_t *wch)
+ { return(*(int *)0); }
+
+#undef wecho_wchar
+int wecho_wchar(
+ WINDOW *win,
+ const cchar_t *wch)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_box_set.c */
+
+#undef wborder_set
+int wborder_set(
+ WINDOW *win,
+ const cchar_t *ls,
+ const cchar_t *rs,
+ const cchar_t *ts,
+ const cchar_t *bs,
+ const cchar_t *tl,
+ const cchar_t *tr,
+ const cchar_t *bl,
+ const cchar_t *br)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_cchar.c */
+
+#undef setcchar
+int setcchar(
+ cchar_t *wcval,
+ const wchar_t *wch,
+ const attr_t attrs,
+ short color_pair,
+ const void *opts)
+ { return(*(int *)0); }
+
+#undef getcchar
+int getcchar(
+ const cchar_t *wcval,
+ wchar_t *wch,
+ attr_t *attrs,
+ short *color_pair,
+ void *opts)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_get_wch.c */
+
+#undef wget_wch
+int wget_wch(
+ WINDOW *win,
+ wint_t *result)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_erasewchar.c */
+
+#undef erasewchar
+int erasewchar(
+ wchar_t *wch)
+ { return(*(int *)0); }
+
+#undef killwchar
+int killwchar(
+ wchar_t *wch)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_get_wstr.c */
+
+#undef wgetn_wstr
+int wgetn_wstr(
+ WINDOW *win,
+ wint_t *str,
+ int maxlen)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_hline_set.c */
+
+#undef whline_set
+int whline_set(
+ WINDOW *win,
+ const cchar_t *ch,
+ int n)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_in_wch.c */
+
+#undef win_wch
+int win_wch(
+ WINDOW *win,
+ cchar_t *wcval)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_in_wchnstr.c */
+
+#undef win_wchnstr
+int win_wchnstr(
+ WINDOW *win,
+ cchar_t *wchstr,
+ int n)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_ins_wch.c */
+
+#undef wins_wch
+int wins_wch(
+ WINDOW *win,
+ const cchar_t *wch)
+ { return(*(int *)0); }
+
+#undef wins_nwstr
+int wins_nwstr(
+ WINDOW *win,
+ const wchar_t *wstr,
+ int n)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_inwstr.c */
+
+#undef winnwstr
+int winnwstr(
+ WINDOW *win,
+ wchar_t *wstr,
+ int n)
+ { return(*(int *)0); }
+
+#undef winwstr
+int winwstr(
+ WINDOW *win,
+ wchar_t *wstr)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_pecho_wchar.c */
+
+#undef pecho_wchar
+int pecho_wchar(
+ WINDOW *pad,
+ const cchar_t *wch)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_slk_wset.c */
+
+#undef slk_wset
+int slk_wset(
+ int i,
+ const wchar_t *astr,
+ int format)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_unget_wch.c */
+
+#undef unget_wch
+int unget_wch(
+ const wchar_t wch)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_vid_attr.c */
+
+#undef vid_puts
+int vid_puts(
+ attr_t newmode,
+ short pair,
+ void *opts,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+#undef vid_attr
+int vid_attr(
+ attr_t newmode,
+ short pair,
+ void *opts)
+ { return(*(int *)0); }
+
+#undef term_attrs
+attr_t term_attrs(void)
+ { return(*(attr_t *)0); }
+
+/* ./widechar/lib_vline_set.c */
+
+#undef wvline_set
+int wvline_set(
+ WINDOW *win,
+ const cchar_t *ch,
+ int n)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_wacs.c */
+
+#undef _nc_wacs
+cchar_t *_nc_wacs;
+
+#undef _nc_init_wacs
+void _nc_init_wacs(void)
+ { /* void */ }
+
+/* ./widechar/lib_wunctrl.c */
+
+#undef wunctrl
+wchar_t *wunctrl(
+ cchar_t *wc)
+ { return(*(wchar_t **)0); }
+
+/* ./base/define_key.c */
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./expanded.c */
+
+#undef _nc_toggle_attr_on
+void _nc_toggle_attr_on(
+ attr_t *S,
+ attr_t at)
+ { /* void */ }
+
+#undef _nc_toggle_attr_off
+void _nc_toggle_attr_off(
+ attr_t *S,
+ attr_t at)
+ { /* void */ }
+
+#undef _nc_DelCharCost
+int _nc_DelCharCost(
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_InsCharCost
+int _nc_InsCharCost(
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_UpdateAttrs
+void _nc_UpdateAttrs(
+ chtype c)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/lib_dft_fgbg.c */
+
+#undef use_default_colors
+int use_default_colors(void)
+ { return(*(int *)0); }
+
+#undef assume_default_colors
+int assume_default_colors(
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_print.c */
+
+#undef mcprint
+int mcprint(
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
+/* ./base/resizeterm.c */
+
+#undef is_term_resized
+NCURSES_BOOL is_term_resized(
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef resize_term
+int resize_term(
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+#undef resizeterm
+int resizeterm(
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+/* ./trace/trace_xnames.c */
+
+#undef _nc_trace_xnames
+void _nc_trace_xnames(
+ TERMTYPE *tp)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ struct tries *tree,
+ unsigned short code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ struct tries **tree,
+ unsigned short code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ struct tries **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./base/wresize.c */
+
+#undef wresize
+int wresize(
+ WINDOW *win,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+/* ./tinfo/access.c */
+
+#undef _nc_rootname
+char *_nc_rootname(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_pathlast
+unsigned _nc_pathlast(
+ const char *path)
+ { return(*(unsigned *)0); }
+
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
+#undef _nc_access
+int _nc_access(
+ const char *path,
+ int mode)
+ { return(*(int *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+void _nc_add_to_try(
+ struct tries **tree,
+ const char *str,
+ unsigned short code)
+ { /* void */ }
+
+/* ./tinfo/alloc_entry.c */
+
+#undef _nc_init_entry
+void _nc_init_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_copy_entry
+ENTRY *_nc_copy_entry(
+ ENTRY *oldp)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_save_str
+char *_nc_save_str(
+ const char *const string)
+ { return(*(char **)0); }
+
+#undef _nc_wrap_entry
+void _nc_wrap_entry(
+ ENTRY *const ep,
+ NCURSES_BOOL copy_strings)
+ { /* void */ }
+
+#undef _nc_merge_entry
+void _nc_merge_entry(
+ TERMTYPE *const to,
+ TERMTYPE *const from)
+ { /* void */ }
+
+/* ./tinfo/alloc_ttype.c */
+
+#undef _nc_align_termtype
+void _nc_align_termtype(
+ TERMTYPE *to,
+ TERMTYPE *from)
+ { /* void */ }
+
+#undef _nc_copy_termtype
+void _nc_copy_termtype(
+ TERMTYPE *dst,
+ TERMTYPE *src)
+ { /* void */ }
+
+/* ./tinfo/captoinfo.c */
+
+#undef _nc_captoinfo
+char *_nc_captoinfo(
+ const char *cap,
+ const char *s,
+ int const parameterized)
+ { return(*(char **)0); }
+
+#undef _nc_infotocap
+char *_nc_infotocap(
+ const char *cap,
+ const char *str,
+ int const parameterized)
+ { return(*(char **)0); }
+
+/* ./codes.c */
+
+#undef boolcodes
+char *const boolcodes[] = {0};
+#undef numcodes
+char *const numcodes[] = {0};
+#undef strcodes
+char *const strcodes[] = {0};
+
+/* ./comp_captab.c */
+
+#include <ncurses_cfg.h>
+
+#undef _nc_info_hash_table
+const struct name_table_entry *const _nc_info_hash_table[995] = {0};
+#undef _nc_cap_hash_table
+const struct name_table_entry *const _nc_cap_hash_table[995] = {0};
+#undef _nc_capalias_table
+const struct alias _nc_capalias_table[] = {0};
+#undef _nc_infoalias_table
+const struct alias _nc_infoalias_table[] = {0};
+
+#undef _nc_get_table
+const struct name_table_entry *_nc_get_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+#undef _nc_get_hash_table
+const struct name_table_entry *const *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct name_table_entry **)0); }
+
+/* ./tinfo/comp_error.c */
+
+#undef _nc_suppress_warnings
+NCURSES_BOOL _nc_suppress_warnings;
+#undef _nc_curr_line
+int _nc_curr_line;
+#undef _nc_curr_col
+int _nc_curr_col;
+
+#undef _nc_set_source
+void _nc_set_source(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_set_type
+void _nc_set_type(
+ const char *const name)
+ { /* void */ }
+
+#undef _nc_get_type
+void _nc_get_type(
+ char *name)
+ { /* void */ }
+
+#undef _nc_warning
+void _nc_warning(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_err_abort
+void _nc_err_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_syserr_abort
+void _nc_syserr_abort(
+ const char *const fmt,
+ ...)
+ { /* void */ }
+
+/* ./tinfo/comp_expand.c */
+
+#undef _nc_tic_expand
+char *_nc_tic_expand(
+ const char *srcp,
+ NCURSES_BOOL tic_format,
+ int numbers)
+ { return(*(char **)0); }
+
+/* ./tinfo/comp_hash.c */
+
+#include <hashsize.h>
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const struct name_table_entry *const *hash_table)
+ { return(*(struct name_table_entry const **)0); }
+
+#undef _nc_find_type_entry
+struct name_table_entry const *_nc_find_type_entry(
+ const char *string,
+ int type,
+ const struct name_table_entry *table)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/comp_parse.c */
+
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_entry_match
+NCURSES_BOOL _nc_entry_match(
+ char *n1,
+ char *n2)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_read_entry_source
+void _nc_read_entry_source(
+ FILE *fp,
+ char *buf,
+ int literal,
+ NCURSES_BOOL silent,
+ NCURSES_BOOL (*hook)(
+ ENTRY *p1))
+ { /* void */ }
+
+#undef _nc_resolve_uses
+int _nc_resolve_uses(
+ NCURSES_BOOL fullresolve)
+ { return(*(int *)0); }
+
+/* ./tinfo/comp_scan.c */
+
+#undef _nc_syntax
+int _nc_syntax;
+#undef _nc_curr_file_pos
+long _nc_curr_file_pos;
+#undef _nc_comment_start
+long _nc_comment_start;
+#undef _nc_comment_end
+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
+NCURSES_BOOL _nc_disable_period;
+
+#undef _nc_get_token
+int _nc_get_token(
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_trans_string
+int _nc_trans_string(
+ char *ptr,
+ char *last)
+ { return(*(int *)0); }
+
+#undef _nc_push_token
+void _nc_push_token(
+ int tokclass)
+ { /* void */ }
+
+#undef _nc_panic_mode
+void _nc_panic_mode(
+ char ch)
+ { /* void */ }
+
+#undef _nc_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./fallback.c */
+
+#undef _nc_fallback
+const TERMTYPE *_nc_fallback(
+ const char *name)
+ { return(*(const TERMTYPE **)0); }
+
+/* ./tinfo/free_ttype.c */
+
+#undef _nc_free_termtype
+void _nc_free_termtype(
+ TERMTYPE *ptr)
+ { /* void */ }
+
+#undef _nc_user_definable
+NCURSES_BOOL _nc_user_definable;
+
+#undef use_extended_names
+int use_extended_names(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/getenv_num.c */
+
+#undef _nc_getenv_num
+int _nc_getenv_num(
+ const char *name)
+ { return(*(int *)0); }
+
+/* ./tinfo/home_terminfo.c */
+
+#undef _nc_home_terminfo
+char *_nc_home_terminfo(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/init_keytry.c */
+
+#if 0
+
+#include <init_keytry.h>
+
+#undef _nc_tinfo_fkeys
+struct tinfo_fkeys _nc_tinfo_fkeys[];
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(void)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef acs_map
+chtype acs_map[128];
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef cur_term
+TERMINAL *cur_term;
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef stdscr
+WINDOW *stdscr;
+#undef curscr
+WINDOW *curscr;
+#undef newscr
+WINDOW *newscr;
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+#undef _nc_key_names
+const struct kn _nc_key_names[] = {0};
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+#undef key_name
+char *key_name(
+ wchar_t c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#include <time.h>
+
+#undef napms
+int napms(
+ int ms)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_options.c */
+
+#undef idlok
+int idlok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef idcok
+void idcok(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { /* void */ }
+
+#undef halfdelay
+int halfdelay(
+ int t)
+ { return(*(int *)0); }
+
+#undef nodelay
+int nodelay(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef notimeout
+int notimeout(
+ WINDOW *win,
+ NCURSES_BOOL f)
+ { return(*(int *)0); }
+
+#undef wtimeout
+void wtimeout(
+ WINDOW *win,
+ int delay)
+ { /* void */ }
+
+#undef keypad
+int keypad(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef meta
+int meta(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#include <sys/ioctl.h>
+
+#undef ttytype
+char ttytype[256];
+#undef LINES
+int LINES;
+#undef COLS
+int COLS;
+#undef TABSIZE
+int TABSIZE;
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(void)
+ { /* void */ }
+
+#undef _nc_get_locale
+char *_nc_get_locale(void)
+ { return(*(char **)0); }
+
+#undef _nc_unicode_locale
+int _nc_unicode_locale(void)
+ { return(*(int *)0); }
+
+#undef _nc_locale_breaks_acs
+int _nc_locale_breaks_acs(void)
+ { return(*(int *)0); }
+
+#undef setupterm
+int setupterm(
+ char *tname,
+ int Filedes,
+ int *errret)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_termcap.c */
+
+#undef UP
+char *UP;
+#undef BC
+char *BC;
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
+#undef tgoto
+char *tgoto(
+ const char *string,
+ int x,
+ int y)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ti.c */
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr
+char *tigetstr(
+ char *str)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tparm.c */
+
+#undef _nc_tparm_err
+int _nc_tparm_err;
+
+#undef _nc_tparm_analyze
+int _nc_tparm_analyze(
+ const char *string,
+ char *p_is_s[9],
+ int *popcount)
+ { return(*(int *)0); }
+
+#undef tparm
+char *tparm(
+ char *string,
+ ...)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tputs.c */
+
+#undef PC
+char PC;
+#undef ospeed
+NCURSES_OSPEED ospeed;
+#undef _nc_nulls_sent
+int _nc_nulls_sent;
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs
+int tputs(
+ const char *string,
+ int affcnt,
+ int (*outc)(
+ int p1))
+ { return(*(int *)0); }
+
+/* ./trace/lib_trace.c */
+
+#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(
+ const unsigned int tracelevel)
+ { /* void */ }
+
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_bool
+NCURSES_BOOL _nc_retrace_bool(
+ NCURSES_BOOL code)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_unsigned
+unsigned _nc_retrace_unsigned(
+ unsigned code)
+ { return(*(unsigned *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_sp
+SCREEN *_nc_retrace_sp(
+ SCREEN *code)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
+/* ./trace/lib_tracebits.c */
+
+#undef _nc_trace_ttymode
+char *_nc_trace_ttymode(
+ struct termios *tty)
+ { return(*(char **)0); }
+
+#undef _nc_tracebits
+char *_nc_tracebits(void)
+ { return(*(char **)0); }
+
+/* ./trace/lib_tracechr.c */
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode
+int _nc_set_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ int mode,
+ int milliseconds,
+ int *timeleft)
+ { return(*(int *)0); }
+
+/* ./tinfo/name_match.c */
+
+#undef _nc_first_name
+char *_nc_first_name(
+ const char *const sp)
+ { return(*(char **)0); }
+
+#undef _nc_name_match
+int _nc_name_match(
+ const char *const namelst,
+ const char *const name,
+ const char *const delim)
+ { return(*(int *)0); }
+
+/* ./names.c */
+
+#undef boolnames
+char *const boolnames[] = {0};
+#undef boolfnames
+char *const boolfnames[] = {0};
+#undef numnames
+char *const numnames[] = {0};
+#undef numfnames
+char *const numfnames[] = {0};
+#undef strnames
+char *const strnames[] = {0};
+#undef strfnames
+char *const strfnames[] = {0};
+
+/* ./tinfo/parse_entry.c */
+
+#undef _nc_parse_entry
+int _nc_parse_entry(
+ struct entry *entryp,
+ int literal,
+ NCURSES_BOOL silent)
+ { return(*(int *)0); }
+
+#undef _nc_capcmp
+int _nc_capcmp(
+ const char *s,
+ const char *t)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_entry.c */
+
+#undef _nc_tic_dir
+const char *_nc_tic_dir(
+ const char *path)
+ { return(*(const char **)0); }
+
+#undef _nc_keep_tic_dir
+void _nc_keep_tic_dir(
+ const char *path)
+ { /* void */ }
+
+#undef _nc_read_file_entry
+int _nc_read_file_entry(
+ const char *const filename,
+ TERMTYPE *ptr)
+ { return(*(int *)0); }
+
+#undef _nc_read_entry
+int _nc_read_entry(
+ const char *const tn,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#undef _nc_read_termcap_entry
+int _nc_read_termcap_entry(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/setbuf.c */
+
+#undef _nc_set_buffer
+void _nc_set_buffer(
+ FILE *ofp,
+ NCURSES_BOOL buffered)
+ { /* void */ }
+
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+NCURSES_BOOL _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_safe_strcpy
+NCURSES_BOOL _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./trace/trace_buf.c */
+
+#undef _nc_trace_buf
+char *_nc_trace_buf(
+ int bufnum,
+ size_t want)
+ { return(*(char **)0); }
+
+#undef _nc_trace_bufcat
+char *_nc_trace_bufcat(
+ int bufnum,
+ const char *value)
+ { return(*(char **)0); }
+
+/* ./trace/trace_tries.c */
+
+#undef _nc_trace_tries
+void _nc_trace_tries(
+ struct tries *tree)
+ { /* void */ }
+
+/* ./unctrl.c */
+
+#undef unctrl
+char *unctrl(
+ chtype ch)
+ { return(*(char **)0); }
+
+/* ./trace/visbuf.c */
+
+#undef _nc_visbuf2
+const char *_nc_visbuf2(
+ int bufnum,
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbuf
+const char *_nc_visbuf(
+ const char *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_visbufn
+const char *_nc_visbufn(
+ const char *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbuf2
+const char *_nc_viswbuf2(
+ int bufnum,
+ const wchar_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbuf
+const char *_nc_viswbuf(
+ const wchar_t *buf)
+ { return(*(const char **)0); }
+
+#undef _nc_viswbufn
+const char *_nc_viswbufn(
+ const wchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf2
+const char *_nc_viscbuf2(
+ int bufnum,
+ const cchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+#undef _nc_viscbuf
+const char *_nc_viscbuf(
+ const cchar_t *buf,
+ int len)
+ { return(*(const char **)0); }
+
+/* ./tinfo/write_entry.c */
+
+#undef _nc_set_writedir
+void _nc_set_writedir(
+ char *dir)
+ { /* void */ }
+
+#undef _nc_write_entry
+void _nc_write_entry(
+ TERMTYPE *const tp)
+ { /* void */ }
+
+#undef _nc_tic_written
+int _nc_tic_written(void)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/Build/source/libs/ncurses/ncurses/modules b/Build/source/libs/ncurses/ncurses/modules
new file mode 100644
index 00000000000..e4d5c147b39
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/modules
@@ -0,0 +1,219 @@
+# $Id: modules,v 1.101 2004/02/29 01:18:06 tom Exp $
+##############################################################################
+# Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey <dickey@clark.net> 1996-1998, etc.
+#
+
+@ base
+# Library objects
+hardscroll lib $(serial)
+hashmap lib $(serial) ../include/term.h
+lib_addch lib $(base)
+lib_addstr lib $(base)
+lib_beep lib $(base) ../include/term.h
+lib_bkgd lib $(base)
+lib_box lib $(base)
+lib_chgat lib $(base)
+lib_clear lib $(base)
+lib_clearok lib $(base)
+lib_clrbot lib $(base)
+lib_clreol lib $(base)
+lib_color lib $(base) ../include/term.h
+lib_colorset lib $(base)
+lib_delch lib $(base)
+lib_delwin lib $(base)
+lib_echo lib $(base)
+lib_endwin lib $(base) ../include/term.h
+lib_erase lib $(base)
+lib_flash lib $(base) ../include/term.h
+lib_gen lib . ../include/curses.h
+lib_getch lib $(base)
+lib_getstr lib $(base) ../include/term.h
+lib_hline lib $(base)
+lib_immedok lib $(base)
+lib_inchstr lib $(base)
+lib_initscr lib $(base) $(INCDIR)/tic.h
+lib_insch lib $(base)
+lib_insdel lib $(base)
+lib_insnstr lib $(base)
+lib_instr lib $(base)
+lib_isendwin lib $(base)
+lib_leaveok lib $(base)
+lib_mouse lib $(base) ../include/term.h
+lib_move lib $(base)
+lib_mvcur lib $(serial) ../include/term.h $(INCDIR)/tic.h
+lib_mvwin lib $(base)
+lib_newterm lib $(base) ../include/term.h
+lib_newwin lib $(base)
+lib_nl lib $(base)
+lib_overlay lib $(base)
+lib_pad lib $(base)
+lib_printw lib $(base)
+lib_redrawln lib $(base)
+lib_refresh lib $(base)
+lib_restart lib $(base) ../include/term.h
+lib_scanw lib $(base)
+lib_screen lib $(base) ../include/term.h
+lib_scroll lib $(base)
+lib_scrollok lib $(base)
+lib_scrreg lib $(base)
+lib_set_term lib $(base) ../include/term.h
+lib_slk lib $(base) ../include/term.h
+lib_slkatr_set lib $(base)
+lib_slkatrof lib $(base)
+lib_slkatron lib $(base)
+lib_slkatrset lib $(base)
+lib_slkattr lib $(base)
+lib_slkclear lib $(base)
+lib_slkcolor lib $(base)
+lib_slkinit lib $(base)
+lib_slklab lib $(base)
+lib_slkrefr lib $(base) ../include/term.h
+lib_slkset lib $(base)
+lib_slktouch lib $(base)
+lib_touch lib $(base)
+lib_traceatr lib $(trace) ../include/term.h
+lib_tracedmp lib $(trace)
+lib_tracemse lib $(trace)
+lib_tstp lib $(serial) $(srcdir)/SigAction.h
+lib_ungetch lib $(base)
+lib_vidattr lib $(serial) ../include/term.h
+lib_vline lib $(base)
+lib_wattroff lib $(base)
+lib_wattron lib $(base)
+lib_winch lib $(base)
+lib_window lib $(base)
+link_test lib . ../include/curses.h
+nc_panel lib $(base)
+safe_sprintf lib $(base)
+tty_update lib $(serial) ../include/term.h
+varargs lib $(trace)
+
+# Modules for porting
+memmove lib $(base)
+vsscanf lib $(base)
+
+# actually an extension, but with its own configure option (--disable-leaks)
+lib_freeall lib $(base)
+
+# XSI extensions to the base library (wide-character)
+@ widechar
+charable lib $(wide)
+lib_add_wch lib $(wide)
+lib_box_set lib $(wide)
+lib_cchar lib $(wide)
+lib_get_wch lib $(wide)
+lib_erasewchar lib $(wide)
+lib_get_wstr lib $(wide)
+lib_hline_set lib $(wide)
+lib_in_wch lib $(wide)
+lib_in_wchnstr lib $(wide)
+lib_ins_wch lib $(wide)
+lib_inwstr lib $(wide)
+lib_pecho_wchar lib $(wide)
+lib_slk_wset lib $(wide)
+lib_unget_wch lib $(wide)
+lib_vid_attr lib $(wide) ../include/term.h
+lib_vline_set lib $(wide)
+lib_wacs lib $(wide)
+lib_wunctrl lib $(wide)
+
+# Extensions to the base library
+@ ext_funcs
+define_key lib $(base)
+expanded lib .
+key_defined lib $(base)
+keybound lib $(base)
+keyok lib $(base)
+lib_dft_fgbg lib $(base) ../include/term.h
+lib_print lib $(tinfo) ../include/term.h
+resizeterm lib $(base) ../include/term.h
+trace_xnames lib $(trace) ../include/term.h $(INCDIR)/term_entry.h
+tries lib $(base)
+wresize lib $(base) ../include/term.h
+
+# Support for termcap (and tic, etc.), which can be a separate library
+@ termlib
+access lib $(tinfo)
+add_tries lib $(tinfo)
+alloc_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
+alloc_ttype lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
+captoinfo lib $(tinfo) $(INCDIR)/tic.h
+codes lib .
+comp_captab lib . $(INCDIR)/tic.h ../include/term.h ../include/hashsize.h
+comp_error lib $(tinfo) $(INCDIR)/tic.h
+comp_expand lib $(tinfo) $(INCDIR)/tic.h
+comp_hash lib $(tinfo) ../include/term.h $(INCDIR)/tic.h ../include/hashsize.h
+comp_parse lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
+comp_scan lib $(tinfo) $(INCDIR)/tic.h
+doalloc lib $(tinfo)
+fallback lib . ../include/term.h $(INCDIR)/tic.h
+free_ttype lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
+getenv_num lib $(tinfo)
+home_terminfo lib $(tinfo)
+init_keytry lib $(tinfo) ../include/term.h $(INCDIR)/tic.h init_keytry.h
+lib_acs lib $(tinfo) ../include/term.h
+lib_baudrate lib $(tinfo) ../include/term.h
+lib_cur_term lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h
+lib_data lib $(tinfo)
+lib_has_cap lib $(tinfo) ../include/term.h
+lib_kernel lib $(tinfo) ../include/term.h
+lib_keyname lib . ../include/term.h
+lib_longname lib $(tinfo)
+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 $(INCDIR)/capdefaults.c
+lib_termname lib $(tinfo) $(INCDIR)/tic.h
+lib_tgoto lib $(tinfo) ../include/term.h $(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
+lib_tputs lib $(tinfo) ../include/term.h $(INCDIR)/tic.h
+lib_trace lib $(trace) $(INCDIR)/tic.h
+lib_tracebits lib $(trace) ../include/term.h
+lib_tracechr lib $(trace)
+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 $(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)
+strings lib $(tinfo)
+trace_buf lib $(trace)
+trace_tries lib $(trace)
+unctrl lib .
+visbuf lib $(trace) $(INCDIR)/tic.h
+write_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
+
+# Extensions to the termlib library
+@ ext_tinfo
+version lib $(base)
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/MKcaptab.awk b/Build/source/libs/ncurses/ncurses/tinfo/MKcaptab.awk
new file mode 100644
index 00000000000..ff9601ba62c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/MKcaptab.awk
@@ -0,0 +1,71 @@
+#!/bin/sh
+# $Id: MKcaptab.awk,v 1.12 2000/12/10 00:14:12 tom Exp $
+AWK=${1-awk}
+DATA=${2-../include/Caps}
+
+cat <<'EOF'
+/*
+ * comp_captab.c -- The names of the capabilities indexed via a hash
+ * table for the compiler.
+ *
+ */
+
+#include <ncurses_cfg.h>
+#include <curses.priv.h>
+#include <tic.h>
+#include <term.h>
+
+EOF
+
+./make_hash 1 info <$DATA
+./make_hash 3 cap <$DATA
+
+cat <<'EOF'
+const struct alias _nc_capalias_table[] =
+{
+EOF
+
+$AWK <$DATA '
+$1 == "capalias" {
+ if ($3 == "IGNORE")
+ to = "(char *)NULL";
+ else
+ to = "\"" $3 "\"";
+ printf "\t{\"%s\", %s, \"%s\"},\t /* %s */\n",
+ $2, to, $4, $5
+ }
+'
+
+cat <<'EOF'
+ {(char *)NULL, (char *)NULL, (char *)NULL}
+};
+
+const struct alias _nc_infoalias_table[] =
+{
+EOF
+
+$AWK <$DATA '
+$1 == "infoalias" {
+ if ($3 == "IGNORE")
+ to = "(char *)NULL";
+ else
+ to = "\"" $3 "\"";
+ printf "\t{\"%s\", %s, \"%s\"},\t /* %s */\n",
+ $2, to, $4, $5
+ }
+'
+
+cat <<'EOF'
+ {(char *)NULL, (char *)NULL, (char *)NULL}
+};
+
+NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool termcap)
+{
+ return termcap ? _nc_cap_table: _nc_info_table ;
+}
+
+NCURSES_EXPORT(const struct name_table_entry * const *) _nc_get_hash_table (bool termcap)
+{
+ return termcap ? _nc_cap_hash_table: _nc_info_hash_table ;
+}
+EOF
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/MKfallback.sh b/Build/source/libs/ncurses/ncurses/tinfo/MKfallback.sh
new file mode 100755
index 00000000000..d1abcd2eed3
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/MKfallback.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+# $Id: MKfallback.sh,v 1.11 2001/12/02 01:55:30 tom Exp $
+#
+# MKfallback.sh -- create fallback table for entry reads
+#
+# This script generates source code for a custom version of read_entry.c
+# that (instead of reading capabilities for an argument terminal type
+# from an on-disk terminfo tree) tries to match the type with one of a
+# specified list of types generated in.
+#
+
+terminfo_dir=$1
+shift
+
+terminfo_src=$1
+shift
+
+if test $# != 0 ; then
+ tmp_info=tmp_info
+ echo creating temporary terminfo directory... >&2
+
+ TERMINFO=`pwd`/$tmp_info
+ export TERMINFO
+
+ TERMINFO_DIRS=$TERMINFO:$terminfo_dir
+ export TERMINFO_DIRS
+
+ tic $terminfo_src >&2
+else
+ tmp_info=
+fi
+
+cat <<EOF
+/*
+ * DO NOT EDIT THIS FILE BY HAND! It is generated by MKfallback.sh.
+ */
+
+#include <curses.priv.h>
+#include <term.h>
+
+EOF
+
+if [ "$*" ]
+then
+ cat <<EOF
+#include <tic.h>
+
+/* fallback entries for: $* */
+EOF
+ for x in $*
+ do
+ echo "/* $x */"
+ infocmp -E $x
+ done
+
+ cat <<EOF
+static const TERMTYPE fallbacks[$#] =
+{
+EOF
+ comma=""
+ for x in $*
+ do
+ echo "$comma /* $x */"
+ infocmp -e $x
+ comma=","
+ done
+
+ cat <<EOF
+};
+
+EOF
+fi
+
+cat <<EOF
+NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *name GCC_UNUSED)
+{
+EOF
+
+if [ "$*" ]
+then
+ cat <<EOF
+ const TERMTYPE *tp;
+
+ for (tp = fallbacks;
+ tp < fallbacks + sizeof(fallbacks)/sizeof(TERMTYPE);
+ tp++)
+ if (_nc_name_match(tp->term_names, name, "|"))
+ return(tp);
+EOF
+else
+ echo " /* the fallback list is empty */";
+fi
+
+cat <<EOF
+ return((TERMTYPE *)0);
+}
+EOF
+
+if test -n "$tmp_info" ; then
+ echo removing temporary terminfo directory... >&2
+ rm -rf $tmp_info
+fi
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/MKkeys_list.sh b/Build/source/libs/ncurses/ncurses/tinfo/MKkeys_list.sh
new file mode 100755
index 00000000000..14017b01689
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/MKkeys_list.sh
@@ -0,0 +1,62 @@
+#! /bin/sh
+# $Id: MKkeys_list.sh,v 1.4 2003/10/25 16:19:54 tom Exp $
+##############################################################################
+# Copyright (c) 2001,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# 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. #
+##############################################################################
+#
+# MKkey_defs.sh -- generate list of function-keys for terminfo database
+#
+# Author: Thomas E. Dickey 2001
+#
+# Extract function-key names from the Caps file
+#
+: ${AWK-awk}
+DATA=${1-../../include/Caps}
+
+data=data$$
+trap 'rm -f $data' 0 1 2 5 15
+sed -e 's/[ ][ ]*/ /g' < $DATA >$data
+
+cat <<EOF
+# These definitions were generated by $0 $DATA
+KEY_BREAK
+KEY_SRESET
+KEY_RESET
+KEY_RESIZE
+EOF
+
+${AWK-awk} <$data '
+/^#/ {next;}
+/^capalias/ {next;}
+/^infoalias/ {next;}
+
+$5 != "-" {
+ if (substr($5, 1, 4) == "KEY_" ) {
+ printf "%s %s\n", $5, $1
+ }
+}
+'
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/MKnames.awk b/Build/source/libs/ncurses/ncurses/tinfo/MKnames.awk
new file mode 100644
index 00000000000..455efc01dea
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/MKnames.awk
@@ -0,0 +1,98 @@
+# $Id: MKnames.awk,v 1.11 2000/12/09 23:46:13 tom Exp $
+BEGIN {
+ print "/* This file was generated by MKnames.awk */" > "namehdr"
+ print "" > "namehdr"
+ print "#include <curses.priv.h>" > "namehdr"
+ print "" > "namehdr"
+ print "#define IT NCURSES_CONST char * const" > "namehdr"
+ print "" > "namehdr"
+ print "#if BROKEN_LINKER" > "namehdr"
+ print "#include <term.h>" > "namehdr"
+ print "#define DCL(it) static IT data##it[]" > "namehdr"
+ print "#else" > "namehdr"
+ print "#define DCL(it) NCURSES_EXPORT_VAR(IT) it[]" > "namehdr"
+ print "#endif" > "namehdr"
+ print "" > "namehdr"
+ print "/*" > "boolnames"
+ print " * names.c - Arrays of capability names and codes" > "boolnames"
+ print " *" > "boolnames"
+ print " */" > "boolnames"
+ print "" > "boolnames"
+ print "DCL(boolnames) = {" > "boolnames"
+ print "DCL(boolfnames) = {" > "boolfnames"
+ print "DCL(boolcodes) = {" > "boolcodes"
+ print "DCL(numnames) = {" > "numnames"
+ print "DCL(numfnames) = {" > "numfnames"
+ print "DCL(numcodes) = {" > "numcodes"
+ print "DCL(strnames) = {" > "strnames"
+ print "DCL(strfnames) = {" > "strfnames"
+ print "DCL(strcodes) = {" > "strcodes"
+ }
+
+$1 ~ /^#/ {next;}
+
+$1 == "SKIPWARN" {next;}
+
+$3 == "bool" {
+ printf "\t\t\"%s\",\n", $2 > "boolnames"
+ printf "\t\t\"%s\",\n", $1 > "boolfnames"
+ printf "\t\t\"%s\",\n", $4 > "boolcodes"
+ }
+
+$3 == "num" {
+ printf "\t\t\"%s\",\n", $2 > "numnames"
+ printf "\t\t\"%s\",\n", $1 > "numfnames"
+ printf "\t\t\"%s\",\n", $4 > "numcodes"
+ }
+
+$3 == "str" {
+ printf "\t\t\"%s\",\n", $2 > "strnames"
+ printf "\t\t\"%s\",\n", $1 > "strfnames"
+ printf "\t\t\"%s\",\n", $4 > "strcodes"
+ }
+
+END {
+ print "\t\t(NCURSES_CONST char *)0," > "boolnames"
+ print "};" > "boolnames"
+ print "" > "boolnames"
+ print "\t\t(NCURSES_CONST char *)0," > "boolfnames"
+ print "};" > "boolfnames"
+ print "" > "boolfnames"
+ print "\t\t(NCURSES_CONST char *)0," > "boolcodes"
+ print "};" > "boolcodes"
+ print "" > "boolcodes"
+ print "\t\t(NCURSES_CONST char *)0," > "numnames"
+ print "};" > "numnames"
+ print "" > "numnames"
+ print "\t\t(NCURSES_CONST char *)0," > "numfnames"
+ print "};" > "numfnames"
+ print "" > "numfnames"
+ print "\t\t(NCURSES_CONST char *)0," > "numcodes"
+ print "};" > "numcodes"
+ print "" > "numcodes"
+ print "\t\t(NCURSES_CONST char *)0," > "strnames"
+ print "};" > "strnames"
+ print "" > "strnames"
+ print "\t\t(NCURSES_CONST char *)0," > "strfnames"
+ print "};" > "strfnames"
+ print "" > "strfnames"
+ print "\t\t(NCURSES_CONST char *)0," > "strcodes"
+ print "};" > "strcodes"
+ print "" > "strcodes"
+ print "#if BROKEN_LINKER" > "nameftr"
+ print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }" > "nameftr"
+ print "FIX(boolnames)" > "nameftr"
+ print "FIX(boolfnames)" > "nameftr"
+ print "FIX(numnames)" > "nameftr"
+ print "FIX(numfnames)" > "nameftr"
+ print "FIX(strnames)" > "nameftr"
+ print "FIX(strfnames)" > "nameftr"
+ print "#endif /* BROKEN_LINKER */" > "nameftr"
+ print "" > "codeftr"
+ print "#if BROKEN_LINKER" > "codeftr"
+ print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }" > "codeftr"
+ print "FIX(boolcodes)" > "codeftr"
+ print "FIX(numcodes)" > "codeftr"
+ print "FIX(strcodes)" > "codeftr"
+ print "#endif /* BROKEN_LINKER */" > "codeftr"
+ }
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/README b/Build/source/libs/ncurses/ncurses/tinfo/README
new file mode 100644
index 00000000000..8b092c1ba41
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/README
@@ -0,0 +1,8 @@
+-- $Id: README,v 1.1 1998/11/07 22:59:07 tom Exp $
+
+The files in this directory (tinfo) are those that support the terminfo
+database and interfaces for ncurses. The terminfo library can be built
+separately, as a lower-level library for ncurses, but usually is bundled.
+
+In addition to the standard documented interfaces, ncurses uses internal
+functions which reside in tinfo to satisfy linkage requirements.
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/access.c b/Build/source/libs/ncurses/ncurses/tinfo/access.c
new file mode 100644
index 00000000000..44c7e1b2f5d
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/access.c
@@ -0,0 +1,132 @@
+/****************************************************************************
+ * Copyright (c) 1998,2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998,2000,2001 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <tic.h>
+#include <nc_alloc.h>
+
+MODULE_ID("$Id: access.c,v 1.10 2003/07/05 19:31:28 tom Exp $")
+
+#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
+
+NCURSES_EXPORT(char *)
+_nc_rootname(char *path)
+{
+ char *result = _nc_basename(path);
+#if !defined(MIXEDCASE_FILENAMES) || defined(PROG_EXT)
+ static char *temp;
+ char *s;
+
+ temp = strdup(result);
+ result = temp;
+#if !defined(MIXEDCASE_FILENAMES)
+ int n;
+ for (s = result; *s != '\0'; ++s) {
+ *s = LOWERCASE(*s);
+ }
+#endif
+#if defined(PROG_EXT)
+ if ((s = strrchr(result, '.')) != 0) {
+ if (!strcmp(s, PROG_EXT))
+ *s = '\0';
+ }
+#endif
+#endif
+ return result;
+}
+
+/*
+ * Return index of the basename
+ */
+NCURSES_EXPORT(unsigned)
+_nc_pathlast(const char *path)
+{
+ const char *test = strrchr(path, '/');
+#ifdef __EMX__
+ if (test == 0)
+ test = strrchr(path, '\\');
+#endif
+ if (test == 0)
+ test = path;
+ else
+ test++;
+ return (test - path);
+}
+
+NCURSES_EXPORT(char *)
+_nc_basename(char *path)
+{
+ return path + _nc_pathlast(path);
+}
+
+NCURSES_EXPORT(int)
+_nc_access(const char *path, int mode)
+{
+ if (access(path, mode) < 0) {
+ if ((mode & W_OK) != 0
+ && errno == ENOENT
+ && strlen(path) < PATH_MAX) {
+ char head[PATH_MAX];
+ char *leaf = _nc_basename(strcpy(head, path));
+
+ if (leaf == 0)
+ leaf = head;
+ *leaf = '\0';
+ if (head == leaf)
+ (void) strcpy(head, ".");
+
+ return access(head, R_OK | W_OK | X_OK);
+ }
+ return -1;
+ }
+ return 0;
+}
+
+#ifndef USE_ROOT_ENVIRON
+/*
+ * Returns true if we allow application to use environment variables that are
+ * used for searching lists of directories, etc.
+ */
+NCURSES_EXPORT(int)
+_nc_env_access(void)
+{
+#if HAVE_ISSETUGID
+ if (issetugid())
+ return FALSE;
+#elif HAVE_GETEUID && HAVE_GETEGID
+ if (getuid() != geteuid()
+ || getgid() != getegid())
+ return FALSE;
+#endif
+ return getuid() != 0 && geteuid() != 0; /* ...finally, disallow root */
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/add_tries.c b/Build/source/libs/ncurses/ncurses/tinfo/add_tries.c
new file mode 100644
index 00000000000..f83249ccf01
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/add_tries.c
@@ -0,0 +1,125 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ ****************************************************************************/
+
+/*
+** add_tries.c
+**
+** Add keycode/string to tries-tree.
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: add_tries.c,v 1.4 2000/12/10 02:55:07 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))
+
+NCURSES_EXPORT(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 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;
+ }
+
+ 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;
+ }
+
+ SET_TRY(ptr, txt);
+ ptr->value = 0;
+ }
+
+ /* at this point, we are adding to the try. ptr->child == 0 */
+
+ while (*txt) {
+ ptr->child = typeCalloc(struct tries, 1);
+
+ ptr = ptr->child;
+
+ if (ptr == 0) {
+ out_of_memory = TRUE;
+
+ while ((ptr = savedptr) != 0) {
+ savedptr = ptr->child;
+ free(ptr);
+ }
+
+ return;
+ }
+
+ SET_TRY(ptr, txt);
+ ptr->value = 0;
+ }
+
+ ptr->value = code;
+ return;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/alloc_entry.c b/Build/source/libs/ncurses/ncurses/tinfo/alloc_entry.c
new file mode 100644
index 00000000000..7e563cd5d36
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/alloc_entry.c
@@ -0,0 +1,266 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+ * alloc_entry.c -- allocation functions for terminfo entries
+ *
+ * _nc_copy_entry()
+ * _nc_init_entry()
+ * _nc_merge_entry()
+ * _nc_save_str()
+ * _nc_wrap_entry()
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: alloc_entry.c,v 1.41 2004/04/17 22:06:25 tom Exp $")
+
+#define ABSENT_OFFSET -1
+#define CANCELLED_OFFSET -2
+
+#define MAX_STRTAB 4096 /* documented maximum entry size */
+
+static char *stringbuf; /* buffer for string capabilities */
+static size_t next_free; /* next free character in stringbuf */
+
+NCURSES_EXPORT(void)
+_nc_init_entry(TERMTYPE * const tp)
+/* initialize a terminal type data block */
+{
+ unsigned i;
+
+#if NO_LEAKS
+ if (tp == 0) {
+ FreeAndNull(stringbuf);
+ return;
+ }
+#endif
+
+ if (stringbuf == 0)
+ stringbuf = (char *) malloc(MAX_STRTAB);
+
+#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;
+#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);
+
+ for_each_boolean(i, tp)
+ tp->Booleans[i] = FALSE;
+
+ for_each_number(i, tp)
+ tp->Numbers[i] = ABSENT_NUMERIC;
+
+ for_each_string(i, tp)
+ tp->Strings[i] = ABSENT_STRING;
+
+ next_free = 0;
+}
+
+NCURSES_EXPORT(ENTRY *)
+_nc_copy_entry(ENTRY * oldp)
+{
+ ENTRY *newp = typeCalloc(ENTRY, 1);
+
+ if (newp != 0) {
+ *newp = *oldp;
+ _nc_copy_termtype(&(newp->tterm), &(oldp->tterm));
+ }
+ return newp;
+}
+
+NCURSES_EXPORT(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);
+}
+
+NCURSES_EXPORT(void)
+_nc_wrap_entry(ENTRY * const ep, bool copy_strings)
+/* copy the string parts to allocated storage, preserving pointers to it */
+{
+ int offsets[MAX_ENTRY_SIZE / 2], useoffsets[MAX_USES];
+ unsigned i, n;
+ unsigned nuses = ep->nuses;
+ TERMTYPE *tp = &(ep->tterm);
+
+ if (copy_strings) {
+ next_free = 0; /* clear static storage */
+
+ /* copy term_names, Strings, uses */
+ tp->term_names = _nc_save_str(tp->term_names);
+ for_each_string(i, tp) {
+ if (tp->Strings[i] != ABSENT_STRING &&
+ tp->Strings[i] != CANCELLED_STRING) {
+ tp->Strings[i] = _nc_save_str(tp->Strings[i]);
+ }
+ }
+
+ for (i = 0; i < nuses; i++) {
+ if (ep->uses[i].name == 0) {
+ ep->uses[i].name = _nc_save_str(ep->uses[i].name);
+ }
+ }
+
+ free(tp->str_table);
+ }
+
+ 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 < 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(MSG_NO_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 (!copy_strings) {
+ 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(MSG_NO_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 < nuses; i++) {
+ if (useoffsets[i] == ABSENT_OFFSET)
+ ep->uses[i].name = 0;
+ else
+ ep->uses[i].name = (tp->str_table + useoffsets[i]);
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_merge_entry(TERMTYPE * const to, TERMTYPE * const from)
+/* merge capabilities from `from' entry into `to' entry */
+{
+ unsigned i;
+
+#if NCURSES_XNAMES
+ _nc_align_termtype(to, from);
+#endif
+ for_each_boolean(i, from) {
+ if (to->Booleans[i] != CANCELLED_BOOLEAN) {
+ int mergebool = from->Booleans[i];
+
+ if (mergebool == CANCELLED_BOOLEAN)
+ to->Booleans[i] = FALSE;
+ else if (mergebool == TRUE)
+ to->Booleans[i] = mergebool;
+ }
+ }
+
+ for_each_number(i, from) {
+ if (to->Numbers[i] != CANCELLED_NUMERIC) {
+ int mergenum = from->Numbers[i];
+
+ if (mergenum == CANCELLED_NUMERIC)
+ to->Numbers[i] = ABSENT_NUMERIC;
+ else if (mergenum != ABSENT_NUMERIC)
+ to->Numbers[i] = mergenum;
+ }
+ }
+
+ /*
+ * Note: the copies of strings this makes don't have their own
+ * storage. This is OK right now, but will be a problem if we
+ * we ever want to deallocate entries.
+ */
+ for_each_string(i, from) {
+ if (to->Strings[i] != CANCELLED_STRING) {
+ char *mergestring = from->Strings[i];
+
+ if (mergestring == CANCELLED_STRING)
+ to->Strings[i] = ABSENT_STRING;
+ else if (mergestring != ABSENT_STRING)
+ to->Strings[i] = mergestring;
+ }
+ }
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/alloc_ttype.c b/Build/source/libs/ncurses/ncurses/tinfo/alloc_ttype.c
new file mode 100644
index 00000000000..36747186e18
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/alloc_ttype.c
@@ -0,0 +1,491 @@
+/****************************************************************************
+ * Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1999 *
+ ****************************************************************************/
+
+/*
+ * align_ttype.c -- functions for TERMTYPE
+ *
+ * _nc_align_termtype()
+ * _nc_copy_termtype()
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: alloc_ttype.c,v 1.14 2003/05/24 21:10:28 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)
+{
+ int n = 0;
+ while (na > 0 && nb > 0) {
+ int cmp = strcmp(*a, *b);
+ if (cmp < 0) {
+ dst[n++] = *a++;
+ na--;
+ } else if (cmp > 0) {
+ dst[n++] = *b++;
+ nb--;
+ } else if (cmp == 0) {
+ dst[n++] = *a;
+ a++, b++;
+ na--, nb--;
+ }
+ }
+ while (na-- > 0) {
+ dst[n++] = *a++;
+ }
+ while (nb-- > 0) {
+ dst[n++] = *b++;
+ }
+ DEBUG(4, ("merge_names -> %d", n));
+ return n;
+}
+
+static bool
+find_name(char **table, int length, char *name)
+{
+ while (length-- > 0) {
+ if (!strcmp(*table++, name)) {
+ DEBUG(4, ("found name '%s'", name));
+ return TRUE;
+ }
+ }
+ DEBUG(4, ("did not find name '%s'", name));
+ return FALSE;
+}
+
+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);
+
+ 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--) {
+ if (find_name(to->ext_Names, limit, ext_Names[m])) {
+ to->Booleans[base + m] = to->Booleans[base + n--];
+ } else {
+ to->Booleans[base + m] = FALSE;
+ }
+ }
+ to->ext_Booleans = ext_Booleans;
+ }
+ 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])) {
+ to->Numbers[base + m] = to->Numbers[base + n--];
+ } else {
+ to->Numbers[base + m] = ABSENT_NUMERIC;
+ }
+ }
+ 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[base + m] = to->Strings[base + n--];
+ } else {
+ to->Strings[base + m] = ABSENT_STRING;
+ }
+ }
+ to->ext_Strings = ext_Strings;
+ }
+}
+
+/*
+ * Returns the first index in ext_Names[] for the given token-type
+ */
+static int
+_nc_first_ext_name(TERMTYPE * tp, int token_type)
+{
+ int first;
+
+ switch (token_type) {
+ case BOOLEAN:
+ first = 0;
+ break;
+ case NUMBER:
+ first = tp->ext_Booleans;
+ break;
+ case STRING:
+ first = tp->ext_Booleans + tp->ext_Numbers;
+ break;
+ default:
+ first = 0;
+ break;
+ }
+ return first;
+}
+
+/*
+ * Returns the last index in ext_Names[] for the given token-type
+ */
+static int
+_nc_last_ext_name(TERMTYPE * tp, int token_type)
+{
+ int last;
+
+ switch (token_type) {
+ case BOOLEAN:
+ last = tp->ext_Booleans;
+ break;
+ case NUMBER:
+ last = tp->ext_Booleans + tp->ext_Numbers;
+ break;
+ default:
+ case STRING:
+ last = NUM_EXT_NAMES(tp);
+ break;
+ }
+ return last;
+}
+
+/*
+ * Lookup an entry from extended-names, returning -1 if not found
+ */
+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);
+
+ for (j = first; j < last; j++) {
+ if (!strcmp(name, tp->ext_Names[j])) {
+ return j;
+ }
+ }
+ return -1;
+}
+
+/*
+ * 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)
+{
+ switch (token_type) {
+ case BOOLEAN:
+ n += (tp->num_Booleans - tp->ext_Booleans);
+ break;
+ case NUMBER:
+ n += (tp->num_Numbers - tp->ext_Numbers)
+ - (tp->ext_Booleans);
+ break;
+ default:
+ case STRING:
+ n += (tp->num_Strings - tp->ext_Strings)
+ - (tp->ext_Booleans + tp->ext_Numbers);
+ }
+ return n;
+}
+
+/*
+ * Adjust tables to remove (not free) an extended name and its corresponding
+ * data.
+ */
+static bool
+_nc_del_ext_name(TERMTYPE * tp, char *name, int token_type)
+{
+ int j;
+ int first, last;
+
+ 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];
+ }
+ 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->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->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->ext_Strings -= 1;
+ tp->num_Strings -= 1;
+ break;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/*
+ * 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)
+{
+ unsigned first = _nc_first_ext_name(tp, token_type);
+ unsigned last = _nc_last_ext_name(tp, token_type);
+ unsigned total = NUM_EXT_NAMES(tp) + 1;
+ unsigned j, k;
+
+ for (j = first; j < last; j++) {
+ int cmp = strcmp(name, tp->ext_Names[j]);
+ if (cmp == 0)
+ /* already present */
+ return _nc_ext_data_index(tp, (int) j, token_type);
+ if (cmp < 0) {
+ break;
+ }
+ }
+
+ 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];
+ tp->ext_Names[j] = name;
+ j = _nc_ext_data_index(tp, (int) j, token_type);
+
+ switch (token_type) {
+ case BOOLEAN:
+ 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];
+ 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];
+ 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];
+ break;
+ }
+ return j;
+}
+
+/*
+ * Look for strings that are marked cancelled, which happen to be the same name
+ * 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)
+{
+ int first = to->ext_Booleans + to->ext_Numbers;
+ int last = first + to->ext_Strings;
+ int j, k;
+
+ for (j = first; j < last;) {
+ char *name = to->ext_Names[j];
+ unsigned j_str = to->num_Strings - first - to->ext_Strings;
+
+ if (to->Strings[j + j_str] == CANCELLED_STRING) {
+ if ((k = _nc_find_ext_name(from, to->ext_Names[j], BOOLEAN)) >= 0) {
+ if (_nc_del_ext_name(to, name, STRING)
+ || _nc_del_ext_name(to, name, NUMBER)) {
+ k = _nc_ins_ext_name(to, name, BOOLEAN);
+ to->Booleans[k] = FALSE;
+ } else {
+ j++;
+ }
+ } else if ((k = _nc_find_ext_name(from, to->ext_Names[j],
+ NUMBER)) >= 0) {
+ if (_nc_del_ext_name(to, name, STRING)
+ || _nc_del_ext_name(to, name, BOOLEAN)) {
+ k = _nc_ins_ext_name(to, name, NUMBER);
+ to->Numbers[k] = CANCELLED_NUMERIC;
+ } else {
+ j++;
+ }
+ }
+ } else {
+ j++;
+ }
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_align_termtype(TERMTYPE * to, TERMTYPE * from)
+{
+ int na = NUM_EXT_NAMES(to);
+ int nb = NUM_EXT_NAMES(from);
+ int n;
+ bool same;
+ 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));
+
+ 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)) {
+ for (n = 0, same = TRUE; n < na; n++) {
+ if (strcmp(to->ext_Names[n], from->ext_Names[n])) {
+ same = FALSE;
+ break;
+ }
+ }
+ if (same)
+ return;
+ }
+ /*
+ * This is where we pay for having a simple extension representation.
+ * Allocate a new ext_Names array and merge the two ext_Names arrays
+ * 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);
+
+ if (to->ext_Strings && (from->ext_Booleans + from->ext_Numbers))
+ adjust_cancels(to, from);
+
+ if (from->ext_Strings && (to->ext_Booleans + to->ext_Numbers))
+ 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);
+ /*
+ * 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);
+ 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));
+ }
+ 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));
+ }
+ }
+}
+#endif
+
+NCURSES_EXPORT(void)
+_nc_copy_termtype(TERMTYPE * dst, TERMTYPE * src)
+{
+ unsigned 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));
+
+ /* FIXME: use memcpy for these and similar loops */
+ for_each_boolean(i, dst)
+ dst->Booleans[i] = src->Booleans[i];
+ for_each_number(i, dst)
+ dst->Numbers[i] = src->Numbers[i];
+ for_each_string(i, dst)
+ dst->Strings[i] = src->Strings[i];
+
+ /* FIXME: we probably should also copy str_table and ext_str_table,
+ * but tic and infocmp are not written to exploit that (yet).
+ */
+
+#if NCURSES_XNAMES
+ 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/Build/source/libs/ncurses/ncurses/tinfo/captoinfo.c b/Build/source/libs/ncurses/ncurses/tinfo/captoinfo.c
new file mode 100644
index 00000000000..e1d76a71554
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/captoinfo.c
@@ -0,0 +1,838 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+ * captoinfo.c --- conversion between termcap and terminfo formats
+ *
+ * The captoinfo() code was swiped from Ross Ridge's mytinfo package,
+ * adapted to fit ncurses by Eric S. Raymond <esr@snark.thyrsus.com>.
+ *
+ * There is just one entry point:
+ *
+ * char *_nc_captoinfo(n, s, parameterized)
+ *
+ * Convert value s for termcap string capability named n into terminfo
+ * format.
+ *
+ * This code recognizes all the standard 4.4BSD %-escapes:
+ *
+ * %% output `%'
+ * %d output value as in printf %d
+ * %2 output value as in printf %2d
+ * %3 output value as in printf %3d
+ * %. output value as in printf %c
+ * %+x add x to value, then do %.
+ * %>xy if value > x then add y, no output
+ * %r reverse order of two parameters, no output
+ * %i increment by one, no output
+ * %n exclusive-or all parameters with 0140 (Datamedia 2500)
+ * %B BCD (16*(value/10)) + (value%10), no output
+ * %D Reverse coding (value - 2*(value%16)), no output (Delta Data).
+ *
+ * Also, %02 and %03 are accepted as synonyms for %2 and %3.
+ *
+ * Besides all the standard termcap escapes, this translator understands
+ * the following extended escapes:
+ *
+ * used by GNU Emacs termcap libraries
+ * %a[+*-/=][cp]x GNU arithmetic.
+ * %m xor the first two parameters by 0177
+ * %b backup to previous parameter
+ * %f skip this parameter
+ *
+ * used by the University of Waterloo (MFCF) termcap libraries
+ * %-x subtract parameter FROM char x and output it as a char
+ * %ax add the character x to parameter
+ *
+ * If #define WATERLOO is on, also enable these translations:
+ *
+ * %sx subtract parameter FROM the character x
+ *
+ * By default, this Waterloo translations are not compiled in, because
+ * the Waterloo %s conflicts with the way terminfo uses %s in strings for
+ * function programming.
+ *
+ * Note the two definitions of %a: the GNU definition is translated if the
+ * characters after the 'a' are valid for it, otherwise the UW definition
+ * is translated.
+ */
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <tic.h>
+
+MODULE_ID("$Id: captoinfo.c,v 1.46 2004/08/28 18:08:50 tom Exp $")
+
+#define MAX_PUSHED 16 /* max # args we can push onto the stack */
+
+static int stack[MAX_PUSHED]; /* the stack */
+static int stackptr; /* the next empty place on the stack */
+static int onstack; /* the top of stack */
+static int seenm; /* seen a %m */
+static int seenn; /* seen a %n */
+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 size_t my_length;
+
+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(MSG_NO_MEMORY);
+
+ *my_string = '\0';
+ return my_string;
+}
+
+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(MSG_NO_MEMORY);
+ d = my_string + have;
+ }
+ (void) strcpy(d, s);
+ return d + strlen(d);
+}
+
+static inline char *
+save_char(char *s, int c)
+{
+ static char temp[2];
+ temp[0] = (char) c;
+ return save_string(s, temp);
+}
+
+static void
+push(void)
+/* push onstack on to the stack */
+{
+ if (stackptr > MAX_PUSHED)
+ _nc_warning("string too complex to convert");
+ else
+ stack[stackptr++] = onstack;
+}
+
+static void
+pop(void)
+/* pop the top of the stack into onstack */
+{
+ if (stackptr == 0) {
+ if (onstack == 0)
+ _nc_warning("I'm confused");
+ else
+ onstack = 0;
+ } else
+ onstack = stack[--stackptr];
+ param++;
+}
+
+static int
+cvtchar(register const char *sp)
+/* convert a character to a terminfo push */
+{
+ unsigned char c = 0;
+ int len;
+
+ switch (*sp) {
+ case '\\':
+ switch (*++sp) {
+ case '\'':
+ case '$':
+ case '\\':
+ case '%':
+ c = *sp;
+ len = 2;
+ break;
+ case '\0':
+ c = '\\';
+ len = 1;
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ len = 1;
+ while (isdigit(UChar(*sp))) {
+ c = 8 * c + (*sp++ - '0');
+ len++;
+ }
+ break;
+ default:
+ c = *sp;
+ len = 2;
+ break;
+ }
+ break;
+ case '^':
+ c = (*++sp & 0x1f);
+ len = 2;
+ break;
+ default:
+ c = *sp;
+ len = 1;
+ }
+ if (isgraph(c) && c != ',' && c != '\'' && c != '\\' && c != ':') {
+ dp = save_string(dp, "%\'");
+ dp = save_char(dp, c);
+ dp = save_char(dp, '\'');
+ } else {
+ dp = save_string(dp, "%{");
+ if (c > 99)
+ dp = save_char(dp, c / 100 + '0');
+ if (c > 9)
+ 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)
+/* 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 = save_string(dp, "%Pa");
+ while (n--) {
+ dp = save_string(dp, "%ga");
+ }
+ }
+ return;
+ }
+ if (onstack != 0)
+ push();
+
+ onstack = parm;
+
+ while (n--) {
+ dp = save_string(dp, "%p");
+ dp = save_char(dp, '0' + parm);
+ }
+
+ if (seenn && parm < 3) {
+ dp = save_string(dp, "%{96}%^");
+ }
+
+ if (seenm && parm < 3) {
+ dp = save_string(dp, "%{127}%^");
+ }
+}
+
+/*
+ * Convert a termcap string to terminfo format.
+ * 'cap' is the relevant terminfo capability index.
+ * 's' is the string value of the capability.
+ * 'parameterized' tells what type of translations to do:
+ * % translations if 1
+ * pad translations if >=0
+ */
+NCURSES_EXPORT(char *)
+_nc_captoinfo(const char *cap, const char *s, int const parameterized)
+{
+ const char *capstart;
+
+ stackptr = 0;
+ onstack = 0;
+ seenm = 0;
+ seenn = 0;
+ seenr = 0;
+ param = 1;
+
+ dp = init_string();
+
+ /* skip the initial padding (if we haven't been told not to) */
+ capstart = 0;
+ if (s == 0)
+ s = "";
+ if (parameterized >= 0 && isdigit(UChar(*s)))
+ for (capstart = s;; s++)
+ if (!(isdigit(UChar(*s)) || *s == '*' || *s == '.'))
+ break;
+
+ while (*s != '\0') {
+ switch (*s) {
+ case '%':
+ s++;
+ if (parameterized < 1) {
+ dp = save_char(dp, '%');
+ break;
+ }
+ switch (*s++) {
+ case '%':
+ dp = save_char(dp, '%');
+ break;
+ case 'r':
+ if (seenr++ == 1) {
+ _nc_warning("saw %%r twice in %s", cap);
+ }
+ break;
+ case 'm':
+ if (seenm++ == 1) {
+ _nc_warning("saw %%m twice in %s", cap);
+ }
+ break;
+ case 'n':
+ if (seenn++ == 1) {
+ _nc_warning("saw %%n twice in %s", cap);
+ }
+ break;
+ case 'i':
+ dp = save_string(dp, "%i");
+ break;
+ case '6':
+ case 'B':
+ 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);
+ dp = save_string(dp, "%{2}%*%-");
+ break;
+ case '>':
+ getparm(param, 2);
+ /* %?%{x}%>%t%{y}%+%; */
+ dp = save_string(dp, "%?");
+ s += cvtchar(s);
+ dp = save_string(dp, "%>%t");
+ s += cvtchar(s);
+ dp = save_string(dp, "%+%;");
+ break;
+ case 'a':
+ if ((*s == '=' || *s == '+' || *s == '-'
+ || *s == '*' || *s == '/')
+ && (s[1] == 'p' || s[1] == 'c')
+ && s[2] != '\0') {
+ int l;
+ l = 2;
+ if (*s != '=')
+ getparm(param, 1);
+ if (s[1] == 'p') {
+ getparm(param + s[2] - '@', 1);
+ if (param != onstack) {
+ pop();
+ param--;
+ }
+ l++;
+ } else
+ l += cvtchar(s + 2);
+ switch (*s) {
+ case '+':
+ dp = save_string(dp, "%+");
+ break;
+ case '-':
+ dp = save_string(dp, "%-");
+ break;
+ case '*':
+ dp = save_string(dp, "%*");
+ break;
+ case '/':
+ dp = save_string(dp, "%/");
+ break;
+ case '=':
+ if (seenr) {
+ if (param == 1)
+ onstack = 2;
+ else if (param == 2)
+ onstack = 1;
+ else
+ onstack = param;
+ } else
+ onstack = param;
+ break;
+ }
+ s += l;
+ break;
+ }
+ getparm(param, 1);
+ s += cvtchar(s);
+ dp = save_string(dp, "%+");
+ break;
+ case '+':
+ getparm(param, 1);
+ s += cvtchar(s);
+ dp = save_string(dp, "%+%c");
+ pop();
+ break;
+ case 's':
+#ifdef WATERLOO
+ s += cvtchar(s);
+ getparm(param, 1);
+ dp = save_string(dp, "%-");
+#else
+ getparm(param, 1);
+ dp = save_string(dp, "%s");
+ pop();
+#endif /* WATERLOO */
+ break;
+ case '-':
+ s += cvtchar(s);
+ getparm(param, 1);
+ dp = save_string(dp, "%-%c");
+ pop();
+ break;
+ case '.':
+ getparm(param, 1);
+ dp = save_string(dp, "%c");
+ pop();
+ break;
+ case '0': /* not clear any of the historical termcaps did this */
+ if (*s == '3')
+ goto see03;
+ else if (*s != '2')
+ goto invalid;
+ /* FALLTHRU */
+ case '2':
+ getparm(param, 1);
+ dp = save_string(dp, "%2d");
+ pop();
+ break;
+ case '3':
+ see03:
+ getparm(param, 1);
+ dp = save_string(dp, "%3d");
+ pop();
+ break;
+ case 'd':
+ getparm(param, 1);
+ dp = save_string(dp, "%d");
+ pop();
+ break;
+ case 'f':
+ param++;
+ break;
+ case 'b':
+ param--;
+ break;
+ case '\\':
+ dp = save_string(dp, "%\\");
+ break;
+ default:
+ invalid:
+ dp = save_char(dp, '%');
+ s--;
+ _nc_warning("unknown %% code %s (%#x) in %s",
+ unctrl((chtype) *s), UChar(*s), cap);
+ break;
+ }
+ break;
+#ifdef REVISIBILIZE
+ case '\\':
+ dp = save_char(dp, *s++);
+ dp = save_char(dp, *s++);
+ break;
+ case '\n':
+ dp = save_string(dp, "\\n");
+ s++;
+ break;
+ case '\t':
+ dp = save_string(dp, "\\t");
+ s++;
+ break;
+ case '\r':
+ dp = save_string(dp, "\\r");
+ s++;
+ break;
+ case '\200':
+ dp = save_string(dp, "\\0");
+ s++;
+ break;
+ case '\f':
+ dp = save_string(dp, "\\f");
+ s++;
+ break;
+ case '\b':
+ dp = save_string(dp, "\\b");
+ s++;
+ break;
+ case ' ':
+ dp = save_string(dp, "\\s");
+ s++;
+ break;
+ case '^':
+ dp = save_string(dp, "\\^");
+ s++;
+ break;
+ case ':':
+ dp = save_string(dp, "\\:");
+ s++;
+ break;
+ case ',':
+ dp = save_string(dp, "\\,");
+ s++;
+ break;
+ default:
+ if (*s == '\033') {
+ dp = save_string(dp, "\\E");
+ s++;
+ } else if (*s > 0 && *s < 32) {
+ dp = save_char(dp, '^');
+ dp = save_char(dp, *s + '@');
+ s++;
+ } else if (*s <= 0 || *s >= 127) {
+ 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 = save_char(dp, *s++);
+ break;
+#else
+ default:
+ dp = save_char(dp, *s++);
+ break;
+#endif
+ }
+ }
+
+ /*
+ * Now, if we stripped off some leading padding, add it at the end
+ * of the string as mandatory padding.
+ */
+ if (capstart) {
+ dp = save_string(dp, "$<");
+ for (s = capstart;; s++)
+ if (isdigit(UChar(*s)) || *s == '*' || *s == '.')
+ dp = save_char(dp, *s);
+ else
+ break;
+ 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(UChar(ch1))
+ && isdigit(UChar(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];
+
+ 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((chtype) 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;
+}
+
+/*
+ * Here are the capabilities infotocap assumes it can translate to:
+ *
+ * %% output `%'
+ * %d output value as in printf %d
+ * %2 output value as in printf %2d
+ * %3 output value as in printf %3d
+ * %. output value as in printf %c
+ * %+c add character c to value, then do %.
+ * %>xy if value > x then add y, no output
+ * %r reverse order of two parameters, no output
+ * %i increment by one, no output
+ * %n exclusive-or all parameters with 0140 (Datamedia 2500)
+ * %B BCD (16*(value/10)) + (value%10), no output
+ * %D Reverse coding (value - 2*(value%16)), no output (Delta Data).
+ * %m exclusive-or all parameters with 0177 (not in 4.4BSD)
+ */
+
+/*
+ * Convert a terminfo string to termcap format. Parameters are as in
+ * _nc_captoinfo().
+ */
+NCURSES_EXPORT(char *)
+_nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameterized)
+{
+ int seenone = 0, seentwo = 0, saw_m = 0, saw_n = 0;
+ const char *padding;
+ const char *trimmed = 0;
+ char ch1 = 0, ch2 = 0;
+ char *bufptr = init_string();
+ int len;
+ bool syntax_error = FALSE;
+
+ /* we may have to move some trailing mandatory padding up front */
+ padding = str + strlen(str) - 1;
+ if (padding > str && *padding == '>' && *--padding == '/') {
+ --padding;
+ while (isdigit(UChar(*padding)) || *padding == '.' || *padding == '*')
+ padding--;
+ if (padding > str && *padding == '<' && *--padding == '$')
+ trimmed = padding;
+ padding += 2;
+
+ while (isdigit(UChar(*padding)) || *padding == '.' || *padding == '*')
+ bufptr = save_char(bufptr, *padding++);
+ }
+
+ for (; *str && str != trimmed; str++) {
+ int c1, c2;
+ char *cp = 0;
+
+ if (str[0] == '\\' && (str[1] == '^' || str[1] == ',')) {
+ bufptr = save_char(bufptr, *++str);
+ } else if (str[0] == '$' && str[1] == '<') { /* discard padding */
+ str += 2;
+ while (isdigit(UChar(*str))
+ || *str == '.'
+ || *str == '*'
+ || *str == '/'
+ || *str == '>')
+ str++;
+ --str;
+ } else if (str[0] == '%' && str[1] == '%') { /* escaped '%' */
+ bufptr = save_string(bufptr, "%%");
+ ++str;
+ } else if (*str != '%' || (parameterized < 1)) {
+ bufptr = save_char(bufptr, *str);
+ } else if (sscanf(str, "%%?%%{%d}%%>%%t%%{%d}%%+%%;", &c1, &c2) == 2) {
+ str = strchr(str, ';');
+ bufptr = save_tc_inequality(bufptr, c1, c2);
+ } else if (sscanf(str, "%%?%%{%d}%%>%%t%%'%c'%%+%%;", &c1, &ch2) == 2) {
+ str = strchr(str, ';');
+ bufptr = save_tc_inequality(bufptr, c1, c2);
+ } else if (sscanf(str, "%%?%%'%c'%%>%%t%%{%d}%%+%%;", &ch1, &c2) == 2) {
+ str = strchr(str, ';');
+ bufptr = save_tc_inequality(bufptr, c1, c2);
+ } else if (sscanf(str, "%%?%%'%c'%%>%%t%%'%c'%%+%%;", &ch1, &ch2) == 2) {
+ str = 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_string(bufptr, "%+");
+
+ if (ch1)
+ c1 = ch1;
+ bufptr = save_tc_char(bufptr, c1);
+ }
+ /* FIXME: this "works" for 'delta' */
+ else if (strncmp(str, "%{2}%*%-", 8) == 0) {
+ str += 7;
+ bufptr = save_string(bufptr, "%D");
+ } else if (strncmp(str, "%{96}%^", 7) == 0) {
+ str += 6;
+ if (saw_m++ == 0) {
+ bufptr = save_string(bufptr, "%n");
+ }
+ } else if (strncmp(str, "%{127}%^", 8) == 0) {
+ str += 7;
+ if (saw_n++ == 0) {
+ bufptr = save_string(bufptr, "%m");
+ }
+ } else { /* cm-style format element */
+ str++;
+ switch (*str) {
+ case '%':
+ bufptr = save_char(bufptr, '%');
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ bufptr = save_char(bufptr, '%');
+ while (isdigit(UChar(*str)))
+ bufptr = save_char(bufptr, *str++);
+ if (strchr("doxX.", *str)) {
+ if (*str != 'd') /* termcap doesn't have octal, hex */
+ return 0;
+ }
+ break;
+
+ case 'd':
+ bufptr = save_string(bufptr, "%d");
+ break;
+
+ case 'c':
+ 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.
+ */
+ case 's':
+ bufptr = save_string(bufptr, "%s");
+ break;
+
+ case 'p':
+ str++;
+ if (*str == '1')
+ seenone = 1;
+ else if (*str == '2') {
+ if (!seenone && !seentwo) {
+ bufptr = save_string(bufptr, "%r");
+ seentwo++;
+ }
+ } else if (*str >= '3')
+ return (0);
+ break;
+
+ case 'i':
+ bufptr = save_string(bufptr, "%i");
+ break;
+
+ default:
+ bufptr = save_char(bufptr, *str);
+ syntax_error = TRUE;
+ break;
+ } /* endswitch (*str) */
+ } /* endelse (*str == '%') */
+
+ if (*str == '\0')
+ break;
+
+ } /* endwhile (*str) */
+
+ return (syntax_error ? NULL : my_string);
+}
+
+#ifdef MAIN
+
+int curr_line;
+
+int
+main(int argc, char *argv[])
+{
+ int c, tc = FALSE;
+
+ while ((c = getopt(argc, argv, "c")) != EOF)
+ switch (c) {
+ case 'c':
+ tc = TRUE;
+ break;
+ }
+
+ curr_line = 0;
+ for (;;) {
+ char buf[BUFSIZ];
+
+ ++curr_line;
+ if (fgets(buf, sizeof(buf), stdin) == 0)
+ break;
+ buf[strlen(buf) - 1] = '\0';
+ _nc_set_source(buf);
+
+ if (tc) {
+ char *cp = _nc_infotocap("to termcap", buf, 1);
+
+ if (cp)
+ (void) fputs(cp, stdout);
+ } else
+ (void) fputs(_nc_captoinfo("to terminfo", buf, 1), stdout);
+ (void) putchar('\n');
+ }
+ return (0);
+}
+#endif /* MAIN */
+
+/* captoinfo.c ends here */
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/comp_error.c b/Build/source/libs/ncurses/ncurses/tinfo/comp_error.c
new file mode 100644
index 00000000000..b6650091d5e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/comp_error.c
@@ -0,0 +1,146 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+ * comp_error.c -- Error message routines
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+
+MODULE_ID("$Id: comp_error.c,v 1.26 2004/04/17 22:20:06 tom Exp $")
+
+NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE;
+NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */
+NCURSES_EXPORT_VAR(int) _nc_curr_col = 0; /* current column # in input */
+
+static const char *sourcename;
+static char *termtype;
+
+NCURSES_EXPORT(void)
+_nc_set_source(const char *const name)
+{
+ sourcename = name;
+}
+
+NCURSES_EXPORT(void)
+_nc_set_type(const char *const name)
+{
+ if (termtype == 0)
+ termtype = typeMalloc(char, MAX_NAME_SIZE + 1);
+ if (termtype != 0) {
+ termtype[0] = '\0';
+ if (name)
+ strncat(termtype, name, MAX_NAME_SIZE);
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_get_type(char *name)
+{
+#if NO_LEAKS
+ if (name == 0) {
+ FreeAndNull(termtype);
+ return;
+ }
+#endif
+ strcpy(name, termtype != 0 ? termtype : "");
+}
+
+static inline void
+where_is_problem(void)
+{
+ fprintf(stderr, "\"%s\"", sourcename);
+ if (_nc_curr_line >= 0)
+ fprintf(stderr, ", line %d", _nc_curr_line);
+ if (_nc_curr_col >= 0)
+ fprintf(stderr, ", col %d", _nc_curr_col);
+ if (termtype != 0 && termtype[0] != '\0')
+ fprintf(stderr, ", terminal '%s'", termtype);
+ fputc(':', stderr);
+ fputc(' ', stderr);
+}
+
+NCURSES_EXPORT(void)
+_nc_warning(const char *const fmt,...)
+{
+ va_list argp;
+
+ if (_nc_suppress_warnings)
+ return;
+
+ where_is_problem();
+ va_start(argp, fmt);
+ vfprintf(stderr, fmt, argp);
+ fprintf(stderr, "\n");
+ va_end(argp);
+}
+
+NCURSES_EXPORT(void)
+_nc_err_abort(const char *const fmt,...)
+{
+ va_list argp;
+
+ where_is_problem();
+ va_start(argp, fmt);
+ vfprintf(stderr, fmt, argp);
+ fprintf(stderr, "\n");
+ va_end(argp);
+ exit(EXIT_FAILURE);
+}
+
+NCURSES_EXPORT(void)
+_nc_syserr_abort(const char *const fmt,...)
+{
+ va_list argp;
+
+ where_is_problem();
+ va_start(argp, fmt);
+ vfprintf(stderr, fmt, argp);
+ fprintf(stderr, "\n");
+ va_end(argp);
+
+ /* If we're debugging, try to show where the problem occurred - this
+ * will dump core.
+ */
+#if defined(TRACE) || !defined(NDEBUG)
+ abort();
+#else
+ /* Dumping core in production code is not a good idea.
+ */
+ exit(EXIT_FAILURE);
+#endif
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/comp_expand.c b/Build/source/libs/ncurses/ncurses/tinfo/comp_expand.c
new file mode 100644
index 00000000000..7ba438aff8e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/comp_expand.c
@@ -0,0 +1,184 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <tic.h>
+
+MODULE_ID("$Id: comp_expand.c,v 1.17 2001/09/22 19:16:52 tom Exp $")
+
+static int
+trailing_spaces(const char *src)
+{
+ while (*src == ' ')
+ src++;
+ return *src == 0;
+}
+
+/* this deals with differences over whether 0x7f and 0x80..0x9f are controls */
+#define REALCTL(s) (UChar(*(s)) < 127 && iscntrl(UChar(*(s))))
+#define REALPRINT(s) (UChar(*(s)) < 127 && isprint(UChar(*(s))))
+
+NCURSES_EXPORT(char *)
+_nc_tic_expand
+(const char *srcp, bool tic_format, int numbers)
+{
+ static char *buffer;
+ static size_t length;
+
+ int bufp;
+ const char *str = VALID_STRING(srcp) ? srcp : "";
+ bool islong = (strlen(str) > 3);
+ size_t need = (2 + strlen(str)) * 4;
+ int ch;
+
+ if (buffer == 0 || need > length) {
+ if ((buffer = typeRealloc(char, length = need, buffer)) == 0)
+ return 0;
+ }
+
+ bufp = 0;
+ while ((ch = UChar(*str)) != 0) {
+ if (ch == '%' && REALPRINT(str + 1)) {
+ buffer[bufp++] = *str++;
+ /*
+ * Though the character literals are more compact, most
+ * terminal descriptions use numbers and are not easy
+ * to read in character-literal form.
+ */
+ switch (numbers) {
+ case -1:
+ if (str[0] == S_QUOTE
+ && str[1] != '\\'
+ && REALPRINT(str + 1)
+ && str[2] == S_QUOTE) {
+ sprintf(buffer + bufp, "{%d}", str[1]);
+ bufp += strlen(buffer + bufp);
+ str += 2;
+ } else {
+ buffer[bufp++] = *str;
+ }
+ break;
+ /*
+ * If we have a "%{number}", try to translate it into
+ * a "%'char'" form, since that will run a little faster
+ * when we're interpreting it. Also, having one form
+ * for the constant makes it simpler to compare terminal
+ * descriptions.
+ */
+ case 1:
+ if (str[0] == L_BRACE
+ && isdigit(UChar(str[1]))) {
+ char *dst = 0;
+ long value = strtol(str + 1, &dst, 0);
+ if (dst != 0
+ && *dst == R_BRACE
+ && value < 127
+ && value != '\\' /* FIXME */
+ && isprint((int) value)) {
+ ch = (int) value;
+ buffer[bufp++] = S_QUOTE;
+ if (ch == '\\'
+ || ch == S_QUOTE)
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = ch;
+ buffer[bufp++] = S_QUOTE;
+ str = dst;
+ } else {
+ buffer[bufp++] = *str;
+ }
+ } else {
+ buffer[bufp++] = *str;
+ }
+ break;
+ default:
+ buffer[bufp++] = *str;
+ break;
+ }
+ } else if (ch == 128) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = '0';
+ } else if (ch == '\033') {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 'E';
+ } else if (ch == '\\' && tic_format && (str == srcp || str[-1] != '^')) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = '\\';
+ } else if (ch == ' ' && tic_format && (str == srcp ||
+ trailing_spaces(str))) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 's';
+ } else if ((ch == ',' || ch == ':' || ch == '^') && tic_format) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = ch;
+ } else if (REALPRINT(str)
+ && (ch != ','
+ && ch != ':'
+ && !(ch == '!' && !tic_format)
+ && ch != '^'))
+ buffer[bufp++] = ch;
+#if 0 /* FIXME: this would be more readable (in fact the whole 'islong' logic should be removed) */
+ else if (ch == '\b') {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 'b';
+ } else if (ch == '\f') {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 'f';
+ } else if (ch == '\t' && islong) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 't';
+ }
+#endif
+ else if (ch == '\r' && (islong || (strlen(srcp) > 2 && str[1] == '\0'))) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 'r';
+ } else if (ch == '\n' && islong) {
+ buffer[bufp++] = '\\';
+ buffer[bufp++] = 'n';
+ }
+#define UnCtl(c) ((c) + '@')
+ else if (REALCTL(str) && ch != '\\'
+ && (!islong || isdigit(UChar(str[1])))) {
+ (void) sprintf(&buffer[bufp], "^%c", UnCtl(ch));
+ bufp += 2;
+ } else {
+ (void) sprintf(&buffer[bufp], "\\%03o", ch);
+ bufp += 4;
+ }
+
+ str++;
+ }
+
+ buffer[bufp] = '\0';
+ return (buffer);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/comp_hash.c b/Build/source/libs/ncurses/ncurses/tinfo/comp_hash.c
new file mode 100644
index 00000000000..dabc0c55a0f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/comp_hash.c
@@ -0,0 +1,331 @@
+/****************************************************************************
+ * Copyright (c) 1998,2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * comp_hash.c --- Routines to deal with the hashtable of capability
+ * names.
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+#include <hashsize.h>
+
+#ifdef MAIN_PROGRAM
+#include <ctype.h>
+#undef DEBUG
+#define DEBUG(level, params) /*nothing */
+#endif
+
+MODULE_ID("$Id: comp_hash.c,v 1.26 2003/11/08 21:58:36 tom Exp $")
+
+static int hash_function(const char *);
+
+/*
+ * _nc_make_hash_table()
+ *
+ * Takes the entries in table[] and hashes them into hash_table[]
+ * by name. There are CAPTABSIZE entries in table[] and HASHTABSIZE
+ * slots in hash_table[].
+ *
+ */
+
+#ifdef MAIN_PROGRAM
+
+#undef MODULE_ID
+#define MODULE_ID(id) /*nothing */
+#include <tinfo/doalloc.c>
+
+static void
+_nc_make_hash_table(struct name_table_entry *table,
+ struct name_table_entry **hash_table)
+{
+ int i;
+ int hashvalue;
+ int collisions = 0;
+
+ for (i = 0; i < CAPTABSIZE; i++) {
+ hashvalue = hash_function(table[i].nte_name);
+
+ if (hash_table[hashvalue] != (struct name_table_entry *) 0)
+ collisions++;
+
+ if (hash_table[hashvalue] != 0)
+ table[i].nte_link = (short) (hash_table[hashvalue] - table);
+ hash_table[hashvalue] = &table[i];
+ }
+
+ DEBUG(4, ("Hash table complete: %d collisions out of %d entries",
+ collisions, CAPTABSIZE));
+}
+#endif
+
+/*
+ * int hash_function(string)
+ *
+ * Computes the hashing function on the given string.
+ *
+ * The current hash function is the sum of each consectutive pair
+ * of characters, taken as two-byte integers, mod HASHTABSIZE.
+ *
+ */
+
+static
+int
+hash_function(const char *string)
+{
+ long sum = 0;
+
+ DEBUG(9, ("hashing %s", string));
+ while (*string) {
+ sum += (long) (*string + (*(string + 1) << 8));
+ string++;
+ }
+
+ DEBUG(9, ("sum is %ld", sum));
+ return (int) (sum % HASHTABSIZE);
+}
+
+/*
+ * struct name_table_entry *
+ * find_entry(string)
+ *
+ * Finds the entry for the given string in the hash table if present.
+ * Returns a pointer to the entry in the table or 0 if not found.
+ *
+ */
+
+#ifndef MAIN_PROGRAM
+NCURSES_EXPORT(struct name_table_entry const *)
+_nc_find_entry
+(const char *string, const struct name_table_entry *const *hash_table)
+{
+ int hashvalue;
+ struct name_table_entry const *ptr;
+
+ hashvalue = hash_function(string);
+
+ if ((ptr = hash_table[hashvalue]) != 0) {
+ while (strcmp(ptr->nte_name, string) != 0) {
+ if (ptr->nte_link < 0)
+ return 0;
+ ptr = ptr->nte_link + hash_table[HASHTABSIZE];
+ }
+ }
+
+ return (ptr);
+}
+
+/*
+ * struct name_table_entry *
+ * find_type_entry(string, type, table)
+ *
+ * Finds the first entry for the given name with the given type in the
+ * given table if present (as distinct from find_entry, which finds the
+ * the last entry regardless of type). You can use this if you detect
+ * a name clash. It's slower, though. Returns a pointer to the entry
+ * in the table or 0 if not found.
+ */
+
+NCURSES_EXPORT(struct name_table_entry const *)
+_nc_find_type_entry
+(const char *string,
+ int type,
+ const struct name_table_entry *table)
+{
+ struct name_table_entry const *ptr;
+
+ for (ptr = table; ptr < table + CAPTABSIZE; ptr++) {
+ if (ptr->nte_type == type && strcmp(string, ptr->nte_name) == 0)
+ return (ptr);
+ }
+
+ return ((struct name_table_entry *) NULL);
+}
+#endif
+
+#ifdef MAIN_PROGRAM
+/*
+ * This filter reads from standard input a list of tab-delimited columns,
+ * (e.g., from Caps.filtered) computes the hash-value of a specified column and
+ * writes the hashed tables to standard output.
+ *
+ * By compiling the hash table at build time, we're able to make the entire
+ * set of terminfo and termcap tables readonly (and also provide some runtime
+ * performance enhancement).
+ */
+
+#define MAX_COLUMNS BUFSIZ /* this _has_ to be worst-case */
+
+static char **
+parse_columns(char *buffer)
+{
+ static char **list;
+
+ int col = 0;
+
+ if (list == 0 && (list = typeCalloc(char *, MAX_COLUMNS)) == 0)
+ return (0);
+
+ if (*buffer != '#') {
+ while (*buffer != '\0') {
+ char *s;
+ for (s = buffer; (*s != '\0') && !isspace(UChar(*s)); s++)
+ /*EMPTY */ ;
+ if (s != buffer) {
+ char mark = *s;
+ *s = '\0';
+ if ((s - buffer) > 1
+ && (*buffer == '"')
+ && (s[-1] == '"')) { /* strip the quotes */
+ buffer++;
+ s[-1] = '\0';
+ }
+ list[col] = buffer;
+ col++;
+ if (mark == '\0')
+ break;
+ while (*++s && isspace(UChar(*s)))
+ /*EMPTY */ ;
+ buffer = s;
+ } else
+ break;
+ }
+ }
+ return col ? list : 0;
+}
+
+int
+main(int argc, char **argv)
+{
+ struct name_table_entry *name_table = typeCalloc(struct
+ name_table_entry, CAPTABSIZE);
+ struct name_table_entry **hash_table = typeCalloc(struct name_table_entry
+ *, HASHTABSIZE);
+ const char *root_name = "";
+ int column = 0;
+ int n;
+ char buffer[BUFSIZ];
+
+ static const char *typenames[] =
+ {"BOOLEAN", "NUMBER", "STRING"};
+
+ short BoolCount = 0;
+ short NumCount = 0;
+ short StrCount = 0;
+
+ /* The first argument is the column-number (starting with 0).
+ * The second is the root name of the tables to generate.
+ */
+ if (argc <= 2
+ || (column = atoi(argv[1])) <= 0
+ || (column >= MAX_COLUMNS)
+ || *(root_name = argv[2]) == 0) {
+ fprintf(stderr, "usage: make_hash column root_name\n");
+ exit(EXIT_FAILURE);
+ }
+
+ /*
+ * Read the table into our arrays.
+ */
+ for (n = 0; (n < CAPTABSIZE) && fgets(buffer, BUFSIZ, stdin);) {
+ char **list, *nlp = strchr(buffer, '\n');
+ if (nlp)
+ *nlp = '\0';
+ list = parse_columns(buffer);
+ if (list == 0) /* blank or comment */
+ continue;
+ name_table[n].nte_link = -1; /* end-of-hash */
+ name_table[n].nte_name = strdup(list[column]);
+ if (!strcmp(list[2], "bool")) {
+ name_table[n].nte_type = BOOLEAN;
+ name_table[n].nte_index = BoolCount++;
+ } else if (!strcmp(list[2], "num")) {
+ name_table[n].nte_type = NUMBER;
+ name_table[n].nte_index = NumCount++;
+ } else if (!strcmp(list[2], "str")) {
+ name_table[n].nte_type = STRING;
+ name_table[n].nte_index = StrCount++;
+ } else {
+ fprintf(stderr, "Unknown type: %s\n", list[2]);
+ exit(EXIT_FAILURE);
+ }
+ n++;
+ }
+ _nc_make_hash_table(name_table, hash_table);
+
+ /*
+ * Write the compiled tables to standard output
+ */
+ printf("static struct name_table_entry const _nc_%s_table[] =\n",
+ root_name);
+ printf("{\n");
+ for (n = 0; n < CAPTABSIZE; n++) {
+ sprintf(buffer, "\"%s\"",
+ name_table[n].nte_name);
+ printf("\t{ %15s,\t%10s,\t%3d, %3d }%c\n",
+ buffer,
+ typenames[name_table[n].nte_type],
+ name_table[n].nte_index,
+ name_table[n].nte_link,
+ n < CAPTABSIZE - 1 ? ',' : ' ');
+ }
+ printf("};\n\n");
+
+ printf("const struct name_table_entry * const _nc_%s_hash_table[%d] =\n",
+ root_name,
+ HASHTABSIZE + 1);
+ printf("{\n");
+ for (n = 0; n < HASHTABSIZE; n++) {
+ if (hash_table[n] != 0) {
+ sprintf(buffer, "_nc_%s_table + %3ld",
+ root_name,
+ (long) (hash_table[n] - name_table));
+ } else {
+ strcpy(buffer, "0");
+ }
+ printf("\t%s,\n", buffer);
+ }
+ printf("\t_nc_%s_table\t/* base-of-table */\n", root_name);
+ printf("};\n\n");
+
+ printf("#if (BOOLCOUNT!=%d)||(NUMCOUNT!=%d)||(STRCOUNT!=%d)\n",
+ BoolCount, NumCount, StrCount);
+ printf("#error\t--> term.h and comp_captab.c disagree about the <--\n");
+ printf("#error\t--> numbers of booleans, numbers and/or strings <--\n");
+ printf("#endif\n\n");
+
+ return EXIT_SUCCESS;
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/comp_parse.c b/Build/source/libs/ncurses/ncurses/tinfo/comp_parse.c
new file mode 100644
index 00000000000..529e104f70f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/comp_parse.c
@@ -0,0 +1,500 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*
+ * comp_parse.c -- parser driver loop and use handling.
+ *
+ * _nc_read_entry_source(FILE *, literal, bool, bool (*hook)())
+ * _nc_resolve_uses2(void)
+ * _nc_free_entries(void)
+ *
+ * Use this code by calling _nc_read_entry_source() on as many source
+ * files as you like (either terminfo or termcap syntax). If you
+ * want use-resolution, call _nc_resolve_uses2(). To free the list
+ * storage, do _nc_free_entries().
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: comp_parse.c,v 1.59 2004/07/05 12:01:24 tom Exp $")
+
+static void sanity_check2(TERMTYPE *, bool);
+NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
+
+/* obsolete: 20040705 */
+static void sanity_check(TERMTYPE *);
+NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype) (TERMTYPE *) = sanity_check;
+
+/****************************************************************************
+ *
+ * Entry queue handling
+ *
+ ****************************************************************************/
+/*
+ * The entry list is a doubly linked list with NULLs terminating the lists:
+ *
+ * --------- --------- ---------
+ * | | | | | | offset
+ * |-------| |-------| |-------|
+ * | ----+-->| ----+-->| NULL | next
+ * |-------| |-------| |-------|
+ * | NULL |<--+---- |<--+---- | last
+ * --------- --------- ---------
+ * ^ ^
+ * | |
+ * | |
+ * _nc_head _nc_tail
+ */
+
+NCURSES_EXPORT_VAR(ENTRY *) _nc_head = 0;
+NCURSES_EXPORT_VAR(ENTRY *) _nc_tail = 0;
+
+static void
+enqueue(ENTRY * ep)
+/* add an entry to the in-core list */
+{
+ ENTRY *newp = _nc_copy_entry(ep);
+
+ if (newp == 0)
+ _nc_err_abort(MSG_NO_MEMORY);
+
+ newp->last = _nc_tail;
+ _nc_tail = newp;
+
+ newp->next = 0;
+ if (newp->last)
+ newp->last->next = newp;
+}
+
+NCURSES_EXPORT(void)
+_nc_free_entries(ENTRY * headp)
+/* free the allocated storage consumed by list entries */
+{
+ ENTRY *ep, *next;
+
+ for (ep = headp; ep; ep = next) {
+ _nc_free_termtype(&(ep->tterm));
+
+ next = ep->next;
+
+ free(ep);
+ if (ep == _nc_head)
+ _nc_head = 0;
+ if (ep == _nc_tail)
+ _nc_tail = 0;
+ }
+}
+
+static char *
+force_bar(char *dst, char *src)
+{
+ if (strchr(src, '|') == 0) {
+ size_t len = strlen(src);
+ if (len > MAX_NAME_SIZE)
+ len = MAX_NAME_SIZE;
+ (void) strncpy(dst, src, len);
+ (void) strcpy(dst + len, "|");
+ src = dst;
+ }
+ return src;
+}
+
+NCURSES_EXPORT(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 + 2], nc2[MAX_NAME_SIZE + 2];
+
+ n1 = force_bar(nc1, n1);
+ n2 = force_bar(nc2, 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);
+
+ return (FALSE);
+}
+
+/****************************************************************************
+ *
+ * Entry compiler and resolution logic
+ *
+ ****************************************************************************/
+
+NCURSES_EXPORT(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;
+
+ if (silent)
+ _nc_suppress_warnings = TRUE; /* shut the lexer up, too */
+
+ _nc_reset_input(fp, buf);
+ for (;;) {
+ memset(&thisentry, 0, sizeof(thisentry));
+ if (_nc_parse_entry(&thisentry, literal, silent) == ERR)
+ break;
+ if (!isalnum(UChar(thisentry.tterm.term_names[0])))
+ _nc_err_abort("terminal names must start with letter or digit");
+
+ /*
+ * This can be used for immediate compilation of entries with no
+ * 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)) {
+ immediate++;
+ } else {
+ enqueue(&thisentry);
+ FreeIfNeeded(thisentry.tterm.Booleans);
+ FreeIfNeeded(thisentry.tterm.Numbers);
+ FreeIfNeeded(thisentry.tterm.Strings);
+ }
+ }
+
+ if (_nc_tail) {
+ /* set up the head pointer */
+ for (_nc_head = _nc_tail; _nc_head->last; _nc_head = _nc_head->last)
+ continue;
+
+ DEBUG(1, ("head = %s", _nc_head->tterm.term_names));
+ DEBUG(1, ("tail = %s", _nc_tail->tterm.term_names));
+ }
+#ifdef TRACE
+ else if (!immediate)
+ DEBUG(1, ("no entries parsed"));
+#endif
+
+ _nc_suppress_warnings = oldsuppress;
+}
+
+NCURSES_EXPORT(int)
+_nc_resolve_uses2(bool fullresolve, bool literal)
+/* try to resolve all use capabilities */
+{
+ ENTRY *qp, *rp, *lastread = 0;
+ bool keepgoing;
+ int i, unresolved, total_unresolved, multiples;
+
+ DEBUG(2, ("RESOLUTION BEGINNING"));
+
+ /*
+ * Check for multiple occurrences of the same name.
+ */
+ multiples = 0;
+ 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));
+ }
+ }
+ if (matchcount >= 1)
+ (void) putc('\n', stderr);
+ }
+ if (multiples > 0)
+ return (FALSE);
+
+ DEBUG(2, ("NO MULTIPLE NAME OCCURRENCES"));
+
+ /*
+ * First resolution stage: compute link pointers corresponding to names.
+ */
+ total_unresolved = 0;
+ _nc_curr_col = -1;
+ 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 = qp->uses[i].name;
+ long lookline = qp->uses[i].line;
+
+ foundit = FALSE;
+
+ _nc_set_type(child);
+
+ /* 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));
+
+ 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];
+
+ memset(&thisterm, 0, sizeof(thisterm));
+ if (_nc_read_entry(lookfor, filename, &thisterm) == 1) {
+ DEBUG(2, ("%s: resolving use=%s (compiled)",
+ child, lookfor));
+
+ rp = typeMalloc(ENTRY, 1);
+ if (rp == 0)
+ _nc_err_abort(MSG_NO_MEMORY);
+ rp->tterm = thisterm;
+ rp->nuses = 0;
+ rp->next = lastread;
+ lastread = rp;
+
+ qp->uses[i].link = rp;
+ foundit = TRUE;
+ }
+ }
+
+ /* no good, mark this one unresolvable and complain */
+ if (!foundit) {
+ unresolved++;
+ total_unresolved++;
+
+ _nc_curr_line = lookline;
+ _nc_warning("resolution of use=%s failed", lookfor);
+ qp->uses[i].link = 0;
+ }
+ }
+ }
+ if (total_unresolved) {
+ /* free entries read in off disk */
+ _nc_free_entries(lastread);
+ return (FALSE);
+ }
+
+ DEBUG(2, ("NAME RESOLUTION COMPLETED OK"));
+
+ /*
+ * OK, at this point all (char *) references in `name' members
+ * have been successfully converted to (ENTRY *) pointers in
+ * `link' members. Time to do the actual merges.
+ */
+ 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;
+ _nc_wrap_entry(qp, TRUE);
+
+ /*
+ * We know every entry is resolvable because name resolution
+ * didn't bomb. So go back for another pass.
+ */
+ /* FALLTHRU */
+ incomplete:
+ keepgoing = TRUE;
+ }
+ }
+ } while
+ (keepgoing);
+
+ DEBUG(2, ("MERGES COMPLETED OK"));
+ }
+
+ /*
+ * We'd like to free entries read in off disk at this point, but can't.
+ * The merge_entry() code doesn't copy the strings in the use entries,
+ * it just aliases them. If this ever changes, do a
+ * free_entries(lastread) here.
+ */
+
+ DEBUG(2, ("RESOLUTION FINISHED"));
+
+ 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_termtype2(&qp->tterm, literal);
+ }
+ DEBUG(2, ("SANITY CHECK FINISHED"));
+ }
+
+ return (TRUE);
+}
+
+/* obsolete: 20040705 */
+NCURSES_EXPORT(int)
+_nc_resolve_uses(bool fullresolve)
+{
+ return _nc_resolve_uses2(fullresolve, FALSE);
+}
+
+/*
+ * This bit of legerdemain turns all the terminfo variable names into
+ * references to locations in the arrays Booleans, Numbers, and Strings ---
+ * precisely what's needed.
+ */
+
+#undef CUR
+#define CUR tp->
+
+static void
+sanity_check2(TERMTYPE *tp, bool literal)
+{
+ 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(enter_standout_mode)
+ || PRESENT(enter_underline_mode)
+ || PRESENT(enter_blink_mode)
+ || PRESENT(enter_bold_mode)
+ || PRESENT(enter_dim_mode)
+ || PRESENT(enter_secure_mode)
+ || PRESENT(enter_protected_mode)
+ || 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);
+ }
+
+ /* we do this check/fix in postprocess_termcap(), but some packagers
+ * prefer to bypass it...
+ */
+ if (!literal) {
+ if (acs_chars == 0
+ && enter_alt_charset_mode != 0
+ && exit_alt_charset_mode != 0)
+ acs_chars = strdup(VT_ACSC);
+ ANDMISSING(enter_alt_charset_mode, acs_chars);
+ ANDMISSING(exit_alt_charset_mode, acs_chars);
+ }
+
+ /* listed in structure-member order of first argument */
+ PAIRED(enter_alt_charset_mode, exit_alt_charset_mode);
+ 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);
+#ifdef remove_clock
+ PAIRED(display_clock, remove_clock);
+#endif
+ ANDMISSING(set_color_pair, initialize_pair);
+}
+
+/* obsolete: 20040705 */
+static void
+sanity_check(TERMTYPE *tp)
+{
+ sanity_check2(tp, FALSE);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/comp_scan.c b/Build/source/libs/ncurses/ncurses/tinfo/comp_scan.c
new file mode 100644
index 00000000000..177bc935307
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/comp_scan.c
@@ -0,0 +1,863 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996 on *
+ ****************************************************************************/
+
+/*
+ * comp_scan.c --- Lexical scanner for terminfo compiler.
+ *
+ * _nc_reset_input()
+ * _nc_get_token()
+ * _nc_panic_mode()
+ * int _nc_syntax;
+ * int _nc_curr_line;
+ * long _nc_curr_file_pos;
+ * long _nc_comment_start;
+ * long _nc_comment_end;
+ */
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <term_entry.h>
+#include <tic.h>
+
+MODULE_ID("$Id: comp_scan.c,v 1.68 2004/04/17 22:14:55 tom Exp $")
+
+/*
+ * Maximum length of string capability we'll accept before raising an error.
+ * Yes, there is a real capability in /etc/termcap this long, an "is".
+ */
+#define MAXCAPLEN 600
+
+#define iswhite(ch) (ch == ' ' || ch == '\t')
+
+NCURSES_EXPORT_VAR(int)
+_nc_syntax = 0; /* termcap or terminfo? */
+NCURSES_EXPORT_VAR(long)
+_nc_curr_file_pos = 0; /* file offset of current line */
+NCURSES_EXPORT_VAR(long)
+_nc_comment_start = 0; /* start of comment range before name */
+NCURSES_EXPORT_VAR(long)
+_nc_comment_end = 0; /* end of comment range before name */
+NCURSES_EXPORT_VAR(long)
+_nc_start_line = 0; /* start line of current entry */
+
+NCURSES_EXPORT_VAR(struct token)
+_nc_curr_token =
+{
+ 0, 0, 0
+};
+
+/*****************************************************************************
+ *
+ * Token-grabbing machinery
+ *
+ *****************************************************************************/
+
+static bool first_column; /* See 'next_char()' below */
+static bool had_newline;
+static char separator; /* capability separator */
+static int pushtype; /* type of pushback token */
+static char *pushname;
+
+#if NCURSES_EXT_FUNCS
+NCURSES_EXPORT_VAR(bool)
+_nc_disable_period = FALSE; /* used by tic -a option */
+#endif
+
+/*****************************************************************************
+ *
+ * Character-stream handling
+ *
+ *****************************************************************************/
+
+#define LEXBUFSIZ 1024
+
+static char *bufptr; /* otherwise, the input buffer pointer */
+static char *bufstart; /* start of buffer so we can compute offsets */
+static FILE *yyin; /* scanner's input file descriptor */
+
+/*
+ * _nc_reset_input()
+ *
+ * Resets the input-reading routines. Used on initialization,
+ * or after a seek has been done. Exactly one argument must be
+ * non-null.
+ */
+
+NCURSES_EXPORT(void)
+_nc_reset_input(FILE *fp, char *buf)
+{
+ pushtype = NO_PUSHBACK;
+ if (pushname != 0)
+ pushname[0] = '\0';
+ yyin = fp;
+ bufstart = bufptr = buf;
+ _nc_curr_file_pos = 0L;
+ if (fp != 0)
+ _nc_curr_line = 0;
+ _nc_curr_col = 0;
+}
+
+/*
+ * int last_char()
+ *
+ * Returns the final nonblank character on the current input buffer
+ */
+static int
+last_char(void)
+{
+ size_t len = strlen(bufptr);
+ while (len--) {
+ if (!isspace(UChar(bufptr[len])))
+ return bufptr[len];
+ }
+ return 0;
+}
+
+/*
+ * int next_char()
+ *
+ * Returns the next character in the input stream. Comments and leading
+ * white space are stripped.
+ *
+ * The global state variable 'firstcolumn' is set TRUE if the character
+ * returned is from the first column of the input line.
+ *
+ * The global variable _nc_curr_line is incremented for each new line.
+ * The global variable _nc_curr_file_pos is set to the file offset of the
+ * beginning of each line.
+ */
+
+static int
+next_char(void)
+{
+ static char *result;
+ static size_t allocated;
+ int the_char;
+
+ if (!yyin) {
+ if (result != 0) {
+ FreeAndNull(result);
+ FreeAndNull(pushname);
+ allocated = 0;
+ }
+ /*
+ * An string with an embedded null will truncate the input. This is
+ * intentional (we don't read binary files here).
+ */
+ if (bufptr == 0 || *bufptr == '\0')
+ return (EOF);
+ if (*bufptr == '\n') {
+ _nc_curr_line++;
+ _nc_curr_col = 0;
+ }
+ } 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 practice, this turns out to be
+ * quite hard to get completely right. Try it and see. If you
+ * succeed, don't forget to hack push_back() correspondingly.
+ */
+ size_t used;
+ size_t len;
+
+ do {
+ bufstart = 0;
+ used = 0;
+ do {
+ if (used + (LEXBUFSIZ / 4) >= allocated) {
+ allocated += (allocated + LEXBUFSIZ);
+ result = typeRealloc(char, allocated, result);
+ if (result == 0)
+ return (EOF);
+ }
+ if (used == 0)
+ _nc_curr_file_pos = ftell(yyin);
+
+ if (fgets(result + used, allocated - used, yyin) != 0) {
+ bufstart = result;
+ if (used == 0) {
+ _nc_curr_line++;
+ _nc_curr_col = 0;
+ }
+ } else {
+ if (used != 0)
+ strcat(result, "\n");
+ }
+ if ((bufptr = bufstart) != 0) {
+ used = strlen(bufptr);
+ while (iswhite(*bufptr))
+ bufptr++;
+
+ /*
+ * Treat a trailing <cr><lf> the same as a <newline> so we
+ * can read files on OS/2, etc.
+ */
+ if ((len = strlen(bufptr)) > 1) {
+ if (bufptr[len - 1] == '\n'
+ && bufptr[len - 2] == '\r') {
+ len--;
+ bufptr[len - 1] = '\n';
+ bufptr[len] = '\0';
+ }
+ }
+ } else {
+ return (EOF);
+ }
+ } while (bufptr[len - 1] != '\n'); /* complete a line */
+ } while (result[0] == '#'); /* ignore comments */
+ }
+
+ first_column = (bufptr == bufstart);
+ if (first_column)
+ had_newline = FALSE;
+
+ _nc_curr_col++;
+ the_char = *bufptr++;
+ return UChar(the_char);
+}
+
+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");
+ *--bufptr = c;
+}
+
+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)
+/* are we at end of input? */
+{
+ return ((yyin ? feof(yyin) : (bufptr && *bufptr == '\0'))
+ ? TRUE : FALSE);
+}
+
+/* Assume we may be looking at a termcap-style continuation */
+static inline int
+eat_escaped_newline(int ch)
+{
+ if (ch == '\\')
+ while ((ch = next_char()) == '\n' || iswhite(ch))
+ continue;
+ return ch;
+}
+
+/*
+ * int
+ * get_token()
+ *
+ * Scans the input for the next token, storing the specifics in the
+ * global structure 'curr_token' and returning one of the following:
+ *
+ * NAMES A line beginning in column 1. 'name'
+ * will be set to point to everything up to but
+ * not including the first separator on the line.
+ * BOOLEAN An entry consisting of a name followed by
+ * a separator. 'name' will be set to point to
+ * the name of the capability.
+ * NUMBER An entry of the form
+ * name#digits,
+ * 'name' will be set to point to the capability
+ * name and 'valnumber' to the number given.
+ * STRING An entry of the form
+ * name=characters,
+ * 'name' is set to the capability name and
+ * 'valstring' to the string of characters, with
+ * input translations done.
+ * CANCEL An entry of the form
+ * name@,
+ * 'name' is set to the capability name and
+ * 'valnumber' to -1.
+ * EOF The end of the file has been reached.
+ *
+ * A `separator' is either a comma or a semicolon, depending on whether
+ * we are in termcap or terminfo mode.
+ *
+ */
+
+NCURSES_EXPORT(int)
+_nc_get_token(bool silent)
+{
+ static const char terminfo_punct[] = "@%&*!#";
+ static char *buffer;
+
+ char *after_list;
+ char *after_name;
+ char *numchk;
+ char *ptr;
+ char *s;
+ char numbuf[80];
+ int ch;
+ int dot_flag = FALSE;
+ int type;
+ long number;
+ long token_start;
+ unsigned found;
+
+ if (pushtype != NO_PUSHBACK) {
+ int retval = pushtype;
+
+ _nc_set_type(pushname != 0 ? pushname : "");
+ DEBUG(3, ("pushed-back token: `%s', class %d",
+ _nc_curr_token.tk_name, pushtype));
+
+ pushtype = NO_PUSHBACK;
+ if (pushname != 0)
+ pushname[0] = '\0';
+
+ /* currtok wasn't altered by _nc_push_token() */
+ return (retval);
+ }
+
+ if (end_of_stream()) {
+ yyin = 0;
+ next_char(); /* frees its allocated memory */
+ if (buffer != 0) {
+ FreeAndNull(buffer);
+ }
+ return (EOF);
+ }
+
+ start_token:
+ token_start = stream_pos();
+ while ((ch = next_char()) == '\n' || iswhite(ch)) {
+ if (ch == '\n')
+ had_newline = TRUE;
+ continue;
+ }
+
+ ch = eat_escaped_newline(ch);
+
+ if (ch == EOF)
+ type = EOF;
+ else {
+ /* if this is a termcap entry, skip a leading separator */
+ if (separator == ':' && ch == ':')
+ ch = next_char();
+
+ if (ch == '.'
+#if NCURSES_EXT_FUNCS
+ && !_nc_disable_period
+#endif
+ ) {
+ dot_flag = TRUE;
+ DEBUG(8, ("dot-flag set"));
+
+ while ((ch = next_char()) == '.' || iswhite(ch))
+ continue;
+ }
+
+ if (ch == EOF) {
+ type = EOF;
+ goto end_of_token;
+ }
+
+ /* have to make some punctuation chars legal for terminfo */
+ if (!isalnum(UChar(ch))
+#if NCURSES_EXT_FUNCS
+ && !(ch == '.' && _nc_disable_period)
+#endif
+ && !strchr(terminfo_punct, (char) ch)) {
+ if (!silent)
+ _nc_warning("Illegal character (expected alphanumeric or %s) - %s",
+ terminfo_punct, unctrl((chtype) ch));
+ _nc_panic_mode(separator);
+ goto start_token;
+ }
+
+ if (buffer == 0)
+ buffer = typeMalloc(char, MAX_ENTRY_SIZE);
+
+ ptr = buffer;
+ *(ptr++) = ch;
+
+ if (first_column) {
+ _nc_comment_start = token_start;
+ _nc_comment_end = _nc_curr_file_pos;
+ _nc_start_line = _nc_curr_line;
+
+ _nc_syntax = ERR;
+ after_name = 0;
+ after_list = 0;
+ while ((ch = next_char()) != '\n') {
+ if (ch == EOF) {
+ _nc_err_abort(MSG_NO_MEMORY);
+ } else if (ch == '|') {
+ after_list = ptr;
+ if (after_name == 0)
+ after_name = ptr;
+ } else if (ch == ':' && last_char() != ',') {
+ _nc_syntax = SYN_TERMCAP;
+ separator = ':';
+ break;
+ } else if (ch == ',') {
+ _nc_syntax = SYN_TERMINFO;
+ separator = ',';
+ /*
+ * If we did not see a '|', then we found a name with no
+ * aliases or description.
+ */
+ if (after_name == 0)
+ break;
+ /*
+ * If we see a comma, we assume this is terminfo unless we
+ * subsequently run into a colon. But we don't stop
+ * looking for a colon until hitting a newline. This
+ * allows commas to be embedded in description fields of
+ * either syntax.
+ */
+ } 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';
+ }
+
+ /*
+ * This is the soonest we have the terminal name fetched. Set up
+ * for following warning messages. If there's no '|', then there
+ * is no description.
+ */
+ if (after_name != 0) {
+ ch = *after_name;
+ *after_name = '\0';
+ _nc_set_type(buffer);
+ *after_name = ch;
+ }
+
+ /*
+ * Compute the boundary between the aliases and the description
+ * field for syntax-checking purposes.
+ */
+ if (after_list != 0) {
+ if (!silent) {
+ if (*after_list == '\0')
+ _nc_warning("empty longname field");
+ else if (strchr(after_list, ' ') == 0)
+ _nc_warning("older tic versions may treat the description field as an alias");
+ }
+ } else {
+ after_list = buffer + strlen(buffer);
+ DEBUG(1, ("missing description"));
+ }
+
+ /*
+ * 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 (s = buffer; s < after_list; ++s) {
+ if (isspace(UChar(*s))) {
+ if (!silent)
+ _nc_warning("whitespace in name or alias field");
+ break;
+ } else if (*s == '/') {
+ if (!silent)
+ _nc_warning("slashes aren't allowed in names or aliases");
+ break;
+ } else if (strchr("$[]!*?", *s)) {
+ if (!silent)
+ _nc_warning("dubious character `%c' in name or alias field", *s);
+ break;
+ }
+ }
+
+ _nc_curr_token.tk_name = buffer;
+ type = NAMES;
+ } else {
+ if (had_newline && _nc_syntax == SYN_TERMCAP) {
+ _nc_warning("Missing backslash before newline");
+ had_newline = FALSE;
+ }
+ while ((ch = next_char()) != EOF) {
+ if (!isalnum(UChar(ch))) {
+ if (_nc_syntax == SYN_TERMINFO) {
+ if (ch != '_')
+ break;
+ } else { /* allow ';' for "k;" */
+ if (ch != ';')
+ break;
+ }
+ }
+ *(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 && !silent)
+ _nc_warning("Missing separator after `%s', have %s",
+ buffer, unctrl((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 (!silent) {
+ 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 + MAX_ENTRY_SIZE);
+ if (!silent && 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;
+ if (!silent)
+ _nc_warning("Illegal character - %s", unctrl((chtype) 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(silent);
+
+ DEBUG(3, ("token: `%s', class %d",
+ _nc_curr_token.tk_name != 0 ? _nc_curr_token.tk_name :
+ "<null>",
+ type));
+
+ return (type);
+}
+
+/*
+ * char
+ * trans_string(ptr)
+ *
+ * Reads characters using next_char() until encountering a separator, nl,
+ * or end-of-file. The returned value is the character which caused
+ * reading to stop. The following translations are done on the input:
+ *
+ * ^X goes to ctrl-X (i.e. X & 037)
+ * {\E,\n,\r,\b,\t,\f} go to
+ * {ESCAPE,newline,carriage-return,backspace,tab,formfeed}
+ * {\^,\\} go to {carat,backslash}
+ * \ddd (for ddd = up to three octal digits) goes to the character ddd
+ *
+ * \e == \E
+ * \0 == \200
+ *
+ */
+
+NCURSES_EXPORT(int)
+_nc_trans_string(char *ptr, char *last)
+{
+ int count = 0;
+ int number = 0;
+ 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(MSG_NO_INPUTS);
+
+ 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(MSG_NO_INPUTS);
+
+ if (ch >= '0' && ch <= '7') {
+ number = ch - '0';
+ for (i = 0; i < 2; i++) {
+ ch = c = next_char();
+ if (c == EOF)
+ _nc_err_abort(MSG_NO_INPUTS);
+
+ 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;
+
+ case 'a':
+ *(ptr++) = '\007';
+ break;
+
+ case 'l':
+ case 'n':
+ *(ptr++) = '\n';
+ break;
+
+ case 'r':
+ *(ptr++) = '\r';
+ break;
+
+ case 'b':
+ *(ptr++) = '\010';
+ break;
+
+ case 's':
+ *(ptr++) = ' ';
+ break;
+
+ case 'f':
+ *(ptr++) = '\014';
+ break;
+
+ case 't':
+ *(ptr++) = '\t';
+ break;
+
+ case '\\':
+ *(ptr++) = '\\';
+ break;
+
+ case '^':
+ *(ptr++) = '^';
+ break;
+
+ case ',':
+ *(ptr++) = ',';
+ break;
+
+ case ':':
+ *(ptr++) = ':';
+ break;
+
+ case '\n':
+ continue;
+
+ default:
+ _nc_warning("Illegal character %s in \\ sequence",
+ unctrl(ch));
+ /* FALLTHRU */
+ case '|':
+ *(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 (count > MAXCAPLEN && !long_warning) {
+ _nc_warning("Very long string found. Missing separator?");
+ long_warning = TRUE;
+ }
+ } /* end while */
+
+ *ptr = '\0';
+
+ return (ch);
+}
+
+/*
+ * _nc_push_token()
+ *
+ * Push a token of given type so that it will be reread by the next
+ * get_token() call.
+ */
+
+NCURSES_EXPORT(void)
+_nc_push_token(int tokclass)
+{
+ /*
+ * This implementation is kind of bogus, it will fail if we ever do more
+ * than one pushback at a time between get_token() calls. It relies on the
+ * fact that _nc_curr_token is static storage that nothing but
+ * _nc_get_token() touches.
+ */
+ pushtype = tokclass;
+ if (pushname == 0)
+ pushname = typeMalloc(char, MAX_NAME_SIZE + 1);
+ _nc_get_type(pushname);
+
+ DEBUG(3, ("pushing token: `%s', class %d",
+ _nc_curr_token.tk_name, pushtype));
+}
+
+/*
+ * Panic mode error recovery - skip everything until a "ch" is found.
+ */
+NCURSES_EXPORT(void)
+_nc_panic_mode(char ch)
+{
+ int c;
+
+ for (;;) {
+ c = next_char();
+ if (c == ch)
+ return;
+ if (c == EOF)
+ return;
+ }
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/doalloc.c b/Build/source/libs/ncurses/ncurses/tinfo/doalloc.c
new file mode 100644
index 00000000000..fe2a009d19b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/doalloc.c
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ ****************************************************************************/
+
+/*
+ * Wrapper for malloc/realloc. Standard implementations allow realloc with
+ * a null pointer, but older libraries may not (e.g., SunOS).
+ *
+ * Also if realloc fails, we discard the old memory to avoid leaks.
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: doalloc.c,v 1.8 2002/08/31 21:48:11 Philippe.Blain Exp $")
+
+NCURSES_EXPORT(void *)
+_nc_doalloc(void *oldp, size_t amount)
+{
+ void *newp;
+
+ if (oldp != 0) {
+ if ((newp = realloc(oldp, amount)) == 0) {
+ free(oldp);
+ errno = ENOMEM; /* just in case 'free' reset */
+ }
+ } else {
+ newp = malloc(amount);
+ }
+ return newp;
+}
+
+#if !HAVE_STRDUP
+NCURSES_EXPORT(char *)
+_nc_strdup(const char *src)
+{
+ char *dst;
+ if (src != 0) {
+ dst = typeMalloc(char, strlen(src) + 1);
+ if (dst != 0) {
+ (void) strcpy(dst, src);
+ }
+ } else {
+ dst = 0;
+ }
+ return dst;
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/free_ttype.c b/Build/source/libs/ncurses/ncurses/tinfo/free_ttype.c
new file mode 100644
index 00000000000..08dac4ec203
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/free_ttype.c
@@ -0,0 +1,106 @@
+/****************************************************************************
+ * Copyright (c) 1999-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1999 *
+ ****************************************************************************/
+
+/*
+ * free_ttype.c -- allocation functions for TERMTYPE
+ *
+ * _nc_free_termtype()
+ * use_extended_names()
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: free_ttype.c,v 1.10 2003/08/09 21:22:03 tom Exp $")
+
+NCURSES_EXPORT(void)
+_nc_free_termtype(TERMTYPE * ptr)
+{
+ T(("_nc_free_termtype(%s)", ptr->term_names));
+
+ if (ptr->str_table == 0
+ || (ptr->term_names < ptr->str_table
+ || ptr->term_names >= ptr->str_table + MAX_ENTRY_SIZE)) {
+ FreeIfNeeded(ptr->term_names);
+ }
+#if NO_LEAKS
+ else {
+ if (ptr->str_table != 0
+ && (ptr->term_names < ptr->str_table + MAX_ENTRY_SIZE)) {
+ int j;
+ char *last = ptr->str_table;
+ /*
+ * We should have saved the entry-size someplace. Too late,
+ * but this is useful for the memory-leak checking, though more
+ * work/time than should be in the normal library.
+ */
+ for (j = 0; j < NUM_STRINGS(ptr); j++) {
+ char *s = ptr->Strings[j];
+ if (VALID_STRING(s)) {
+ char *t = s + strlen(s) + 1;
+ if (t > last)
+ last = t;
+ }
+ }
+ if (last < ptr->term_names) {
+ FreeIfNeeded(ptr->term_names);
+ }
+ }
+ }
+#endif
+ FreeIfNeeded(ptr->str_table);
+ FreeIfNeeded(ptr->Booleans);
+ FreeIfNeeded(ptr->Numbers);
+ FreeIfNeeded(ptr->Strings);
+#if NCURSES_XNAMES
+ FreeIfNeeded(ptr->ext_str_table);
+ FreeIfNeeded(ptr->ext_Names);
+#endif
+ memset(ptr, 0, sizeof(TERMTYPE));
+}
+
+#if NCURSES_XNAMES
+NCURSES_EXPORT_VAR(bool) _nc_user_definable = TRUE;
+
+NCURSES_EXPORT(int)
+use_extended_names(bool flag)
+{
+ int oldflag = _nc_user_definable;
+
+ T((T_CALLED("use_extended_names(%d)"), flag));
+ _nc_user_definable = flag;
+ returnBool(oldflag);
+}
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/getenv_num.c b/Build/source/libs/ncurses/ncurses/tinfo/getenv_num.c
new file mode 100644
index 00000000000..a90cc08d297
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/getenv_num.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ ****************************************************************************/
+
+/*
+ * getenv_num.c -- obtain a number from the environment
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: getenv_num.c,v 1.3 2000/12/10 02:55:07 tom Exp $")
+
+NCURSES_EXPORT(int)
+_nc_getenv_num(const char *name)
+{
+ char *dst = 0;
+ char *src = getenv(name);
+ long value;
+
+ if ((src == 0)
+ || (value = strtol(src, &dst, 0)) < 0
+ || (dst == src)
+ || (*dst != '\0')
+ || (int) value < value)
+ value = -1;
+
+ return (int) value;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/home_terminfo.c b/Build/source/libs/ncurses/ncurses/tinfo/home_terminfo.c
new file mode 100644
index 00000000000..fac19bf5241
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/home_terminfo.c
@@ -0,0 +1,67 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 1998,2000,2004 *
+ ****************************************************************************/
+
+/*
+ * home_terminfo.c -- return the $HOME/.terminfo string, expanded
+ */
+
+#include <curses.priv.h>
+#include <tic.h>
+
+MODULE_ID("$Id: home_terminfo.c,v 1.8 2004/01/14 02:18:16 tom Exp $")
+
+#define my_length (strlen(home) + sizeof(PRIVATE_INFO))
+
+/* ncurses extension...fall back on user's private directory */
+
+NCURSES_EXPORT(char *)
+_nc_home_terminfo(void)
+{
+#ifdef USE_HOME_TERMINFO
+ char *home;
+ static char *temp = 0;
+
+ if (use_terminfo_vars()) {
+ if (temp == 0) {
+ if ((home = getenv("HOME")) != 0
+ && my_length <= PATH_MAX) {
+ temp = typeMalloc(char, my_length);
+ if (temp == 0)
+ _nc_err_abort(MSG_NO_MEMORY);
+ (void) sprintf(temp, PRIVATE_INFO, home);
+ }
+ }
+ return temp;
+ }
+#endif
+ return 0;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/init_keytry.c b/Build/source/libs/ncurses/ncurses/tinfo/init_keytry.c
new file mode 100644
index 00000000000..cf840e8e93b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/init_keytry.c
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * 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. *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <term.h> /* keypad_xmit, keypad_local, meta_on, meta_off */
+ /* cursor_visible,cursor_normal,cursor_invisible */
+#include <tic.h> /* struct tinfo_fkeys */
+
+MODULE_ID("$Id: init_keytry.c,v 1.5 2000/12/10 02:55:07 tom Exp $")
+
+/*
+** _nc_init_keytry()
+**
+** Construct the try for the current terminal's keypad keys.
+**
+*/
+
+#if BROKEN_LINKER
+#undef _nc_tinfo_fkeys
+#endif
+
+/* LINT_PREPRO
+#if 0*/
+#include <init_keytry.h>
+/* LINT_PREPRO
+#endif*/
+
+#if BROKEN_LINKER
+struct tinfo_fkeys *
+_nc_tinfo_fkeysf(void)
+{
+ return _nc_tinfo_fkeys;
+}
+#endif
+
+NCURSES_EXPORT(void)
+_nc_init_keytry(void)
+{
+ size_t n;
+
+ /* The SP->_keytry value is initialized in newterm(), where the SP
+ * structure is created, because we can not tell where keypad() or
+ * mouse_activate() (which will call keyok()) are first called.
+ */
+
+ for (n = 0; _nc_tinfo_fkeys[n].code; n++)
+ if (_nc_tinfo_fkeys[n].offset < STRCOUNT)
+ _nc_add_to_try(&(SP->_keytry),
+ CUR Strings[_nc_tinfo_fkeys[n].offset],
+ _nc_tinfo_fkeys[n].code);
+#ifdef TRACE
+ _nc_trace_tries(SP->_keytry);
+#endif
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_acs.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_acs.c
new file mode 100644
index 00000000000..745b055ec32
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_acs.c
@@ -0,0 +1,175 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h> /* ena_acs, acs_chars */
+
+MODULE_ID("$Id: lib_acs.c,v 1.27 2004/10/16 15:42:40 tom Exp $")
+
+#if BROKEN_LINKER
+NCURSES_EXPORT_VAR(chtype *)
+_nc_acs_map(void)
+{
+ static chtype *the_map = 0;
+ if (the_map == 0)
+ the_map = typeCalloc(chtype, ACS_LEN);
+ return the_map;
+}
+#else
+NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
+{
+ 0
+};
+#endif
+
+NCURSES_EXPORT(void)
+_nc_init_acs(void)
+{
+ chtype *fake_map = acs_map;
+ chtype *real_map = SP != 0 ? SP->_acs_map : fake_map;
+ int j;
+
+ T(("initializing ACS map"));
+
+ /*
+ * If we're using this from curses (rather than terminfo), we are storing
+ * the mapping information in the SCREEN struct so we can decide how to
+ * render it.
+ */
+ if (real_map != fake_map) {
+ for (j = 1; j < ACS_LEN; ++j) {
+ real_map[j] = 0;
+ fake_map[j] = A_ALTCHARSET | j;
+ SP->_screen_acs_map[j] = FALSE;
+ }
+ } else {
+ for (j = 1; j < ACS_LEN; ++j) {
+ real_map[j] = 0;
+ }
+ }
+
+ /*
+ * Initializations for a UNIX-like multi-terminal environment. Use
+ * ASCII chars and count on the terminfo description to do better.
+ */
+ real_map['l'] = '+'; /* should be upper left corner */
+ real_map['m'] = '+'; /* should be lower left corner */
+ real_map['k'] = '+'; /* should be upper right corner */
+ real_map['j'] = '+'; /* should be lower right corner */
+ real_map['u'] = '+'; /* should be tee pointing left */
+ real_map['t'] = '+'; /* should be tee pointing right */
+ real_map['v'] = '+'; /* should be tee pointing up */
+ real_map['w'] = '+'; /* should be tee pointing down */
+ real_map['q'] = '-'; /* should be horizontal line */
+ real_map['x'] = '|'; /* should be vertical line */
+ real_map['n'] = '+'; /* should be large plus or crossover */
+ real_map['o'] = '~'; /* should be scan line 1 */
+ real_map['s'] = '_'; /* should be scan line 9 */
+ real_map['`'] = '+'; /* should be diamond */
+ real_map['a'] = ':'; /* should be checker board (stipple) */
+ real_map['f'] = '\''; /* should be degree symbol */
+ real_map['g'] = '#'; /* should be plus/minus */
+ real_map['~'] = 'o'; /* should be bullet */
+ real_map[','] = '<'; /* should be arrow pointing left */
+ real_map['+'] = '>'; /* should be arrow pointing right */
+ real_map['.'] = 'v'; /* should be arrow pointing down */
+ real_map['-'] = '^'; /* should be arrow pointing up */
+ real_map['h'] = '#'; /* should be board of squares */
+ real_map['i'] = '#'; /* should be lantern symbol */
+ real_map['0'] = '#'; /* should be solid square block */
+ /* these defaults were invented for ncurses */
+ real_map['p'] = '-'; /* should be scan line 3 */
+ real_map['r'] = '-'; /* should be scan line 7 */
+ real_map['y'] = '<'; /* should be less-than-or-equal-to */
+ real_map['z'] = '>'; /* should be greater-than-or-equal-to */
+ real_map['{'] = '*'; /* should be greek pi */
+ real_map['|'] = '!'; /* should be not-equal */
+ real_map['}'] = 'f'; /* should be pound-sterling symbol */
+
+#if !USE_WIDEC_SUPPORT
+ if (_nc_unicode_locale() && _nc_locale_breaks_acs()) {
+ acs_chars = NULL;
+ ena_acs = NULL;
+ enter_alt_charset_mode = NULL;
+ exit_alt_charset_mode = NULL;
+ set_attributes = NULL;
+ }
+#endif
+
+ if (ena_acs != NULL) {
+ TPUTS_TRACE("ena_acs");
+ putp(ena_acs);
+ }
+
+ if (acs_chars != NULL) {
+ size_t i = 0;
+ size_t length = strlen(acs_chars);
+
+ while (i + 1 < length) {
+ if (acs_chars[i] != 0 && UChar(acs_chars[i]) < ACS_LEN) {
+ real_map[UChar(acs_chars[i])] = UChar(acs_chars[i + 1]) | A_ALTCHARSET;
+ if (SP != 0)
+ SP->_screen_acs_map[UChar(acs_chars[i])] = TRUE;
+ }
+ i += 2;
+ }
+ }
+#ifdef TRACE
+ /* Show the equivalent mapping, noting if it does not match the
+ * given attribute, whether by re-ordering or duplication.
+ */
+ if (_nc_tracing & TRACE_CALLS) {
+ size_t n, m;
+ char show[ACS_LEN + 1];
+ for (n = 1, m = 0; n < ACS_LEN; n++) {
+ if (real_map[n] != 0) {
+ show[m++] = (char) n;
+ show[m++] = ChCharOf(real_map[n]);
+ }
+ }
+ show[m] = 0;
+ if (acs_chars == NULL || strcmp(acs_chars, show))
+ _tracef("%s acs_chars %s",
+ (acs_chars == NULL) ? "NULL" : "READ",
+ _nc_visbuf(acs_chars));
+ _tracef("%s acs_chars %s",
+ (acs_chars == NULL)
+ ? "NULL"
+ : (strcmp(acs_chars, show)
+ ? "DIFF"
+ : "SAME"),
+ _nc_visbuf(show));
+ }
+#endif /* TRACE */
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_baudrate.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_baudrate.c
new file mode 100644
index 00000000000..52389241436
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_baudrate.c
@@ -0,0 +1,222 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_baudrate.c
+ *
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* cur_term, pad_char */
+#include <termcap.h> /* ospeed */
+
+/*
+ * These systems use similar header files, which define B1200 as 1200, etc.,
+ * but can be overridden by defining USE_OLD_TTY so B1200 is 9, which makes all
+ * of the indices up to B115200 fit nicely in a 'short', allowing us to retain
+ * ospeed's type for compatibility.
+ */
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#undef B0
+#undef B50
+#undef B75
+#undef B110
+#undef B134
+#undef B150
+#undef B200
+#undef B300
+#undef B600
+#undef B1200
+#undef B1800
+#undef B2400
+#undef B4800
+#undef B9600
+#undef B19200
+#undef EXTA
+#undef B38400
+#undef EXTB
+#undef B57600
+#undef B115200
+#undef B230400
+#undef B460800
+#undef B921600
+#define USE_OLD_TTY
+#include <sys/ttydev.h>
+#else
+#undef USE_OLD_TTY
+#endif /* USE_OLD_TTY */
+
+MODULE_ID("$Id: lib_baudrate.c,v 1.22 2002/01/19 23:07:53 Andrey.A.Chernov Exp $")
+
+/*
+ * int
+ * baudrate()
+ *
+ * Returns the current terminal's baud rate.
+ *
+ */
+
+struct speed {
+ int s; /* value for 'ospeed' is an index */
+ int sp; /* the actual speed */
+};
+
+static struct speed const speeds[] =
+{
+ {B0, 0},
+ {B50, 50},
+ {B75, 75},
+ {B110, 110},
+ {B134, 134},
+ {B150, 150},
+ {B200, 200},
+ {B300, 300},
+ {B600, 600},
+ {B1200, 1200},
+ {B1800, 1800},
+ {B2400, 2400},
+ {B4800, 4800},
+ {B9600, 9600},
+#ifdef B19200
+ {B19200, 19200},
+#else
+#ifdef EXTA
+ {EXTA, 19200},
+#endif
+#endif
+#ifdef B38400
+ {B38400, 38400},
+#else
+#ifdef EXTB
+ {EXTB, 38400},
+#endif
+#endif
+#ifdef B57600
+ {B57600, 57600},
+#endif
+#ifdef B115200
+ {B115200, 115200},
+#endif
+#ifdef B230400
+ {B230400, 230400},
+#endif
+#ifdef B460800
+ {B460800, 460800},
+#endif
+#ifdef B921600
+ {B921600, 921600},
+#endif
+};
+
+NCURSES_EXPORT(int)
+_nc_baudrate(int OSpeed)
+{
+ static int last_OSpeed;
+ static int last_baudrate;
+
+ int result;
+ unsigned i;
+
+ if (OSpeed == last_OSpeed) {
+ result = last_baudrate;
+ } else {
+ result = ERR;
+ if (OSpeed >= 0) {
+ for (i = 0; i < SIZEOF(speeds); i++) {
+ if (speeds[i].s == OSpeed) {
+ result = speeds[i].sp;
+ break;
+ }
+ }
+ }
+ last_baudrate = result;
+ }
+ return (result);
+}
+
+NCURSES_EXPORT(int)
+_nc_ospeed(int BaudRate)
+{
+ int result = 1;
+ unsigned i;
+
+ if (BaudRate >= 0) {
+ for (i = 0; i < SIZEOF(speeds); i++) {
+ if (speeds[i].sp == BaudRate) {
+ result = speeds[i].s;
+ break;
+ }
+ }
+ }
+ return (result);
+}
+
+NCURSES_EXPORT(int)
+baudrate(void)
+{
+ int result;
+
+ T((T_CALLED("baudrate()")));
+
+ /*
+ * In debugging, allow the environment symbol to override when we're
+ * redirecting to a file, so we can construct repeatable test-cases
+ * that take into account costs that depend on baudrate.
+ */
+#ifdef TRACE
+ if (SP && !isatty(fileno(SP->_ofp))
+ && getenv("BAUDRATE") != 0) {
+ int ret;
+ if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
+ ret = 9600;
+ ospeed = _nc_ospeed(ret);
+ returnCode(ret);
+ }
+#endif
+
+#ifdef USE_OLD_TTY
+ result = cfgetospeed(&cur_term->Nttyb);
+ ospeed = _nc_ospeed(result);
+#else /* !USE_OLD_TTY */
+#ifdef TERMIOS
+ ospeed = cfgetospeed(&cur_term->Nttyb);
+#else
+ ospeed = cur_term->Nttyb.sg_ospeed;
+#endif
+ result = _nc_baudrate(ospeed);
+#endif
+ if (cur_term != 0)
+ cur_term->_baudrate = result;
+
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_cur_term.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_cur_term.c
new file mode 100644
index 00000000000..8fccc2f88d0
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_cur_term.c
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+/*
+ * Module that "owns" the 'cur_term' variable:
+ *
+ * TERMINAL *set_curterm(TERMINAL *)
+ * int del_curterm(TERMINAL *)
+ */
+
+#include <curses.priv.h>
+#include <term_entry.h> /* TTY, cur_term */
+#include <termcap.h> /* ospeed */
+
+MODULE_ID("$Id: lib_cur_term.c,v 1.13 2003/12/27 18:21:30 tom Exp $")
+
+NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0;
+
+NCURSES_EXPORT(TERMINAL *)
+set_curterm(TERMINAL * termp)
+{
+ TERMINAL *oldterm = cur_term;
+
+ T((T_CALLED("set_curterm(%p)"), termp));
+
+ if ((cur_term = termp) != 0) {
+ ospeed = _nc_ospeed(cur_term->_baudrate);
+ PC = (pad_char != NULL) ? pad_char[0] : 0;
+ }
+ T((T_RETURN("%p"), oldterm));
+ return (oldterm);
+}
+
+NCURSES_EXPORT(int)
+del_curterm(TERMINAL * termp)
+{
+ T((T_CALLED("del_curterm(%p)"), termp));
+
+ if (termp != 0) {
+ _nc_free_termtype(&(termp->type));
+ FreeIfNeeded(termp->_termname);
+ free(termp);
+ if (termp == cur_term)
+ cur_term = 0;
+ returnCode(OK);
+ }
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_data.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_data.c
new file mode 100644
index 00000000000..87d60edf6ed
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_data.c
@@ -0,0 +1,91 @@
+/****************************************************************************
+ * 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"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_data.c
+**
+** Common data that may/may not be allocated, but is referenced globally
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_data.c,v 1.16 2000/12/10 02:55:07 tom Exp $")
+
+/*
+ * OS/2's native linker complains if we don't initialize public data when
+ * constructing a dll (reported by J.J.G.Ripoll).
+ */
+NCURSES_EXPORT_VAR(WINDOW *)
+stdscr = 0;
+NCURSES_EXPORT_VAR(WINDOW *)
+curscr = 0;
+NCURSES_EXPORT_VAR(WINDOW *)
+newscr = 0;
+
+NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain = 0;
+
+/*
+ * The variable 'SP' will be defined as a function on systems that cannot link
+ * data-only modules, since it is used in a lot of places within ncurses and we
+ * cannot guarantee that any application will use any particular function. We
+ * put the WINDOW variables in this module, because it appears that any
+ * application that uses them will also use 'SP'.
+ *
+ * This module intentionally does not reference other ncurses modules, to avoid
+ * module coupling that increases the size of the executable.
+ */
+#if BROKEN_LINKER
+ static SCREEN *my_screen;
+
+NCURSES_EXPORT(SCREEN *)
+_nc_screen(void)
+{
+ return my_screen;
+}
+
+NCURSES_EXPORT(int)
+_nc_alloc_screen(void)
+{
+ return ((my_screen = typeCalloc(SCREEN, 1)) != 0);
+}
+
+NCURSES_EXPORT(void)
+_nc_set_screen(SCREEN * sp)
+{
+ my_screen = sp;
+}
+
+#else
+NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_has_cap.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_has_cap.c
new file mode 100644
index 00000000000..0dc66bd9b91
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_has_cap.c
@@ -0,0 +1,65 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2003 *
+ ****************************************************************************/
+
+/*
+** lib_has_cap.c
+**
+** The routines to query terminal capabilities
+**
+*/
+
+#include <curses.priv.h>
+
+#include <term.h>
+
+MODULE_ID("$Id: lib_has_cap.c,v 1.4 2003/10/25 19:43:55 tom Exp $")
+
+NCURSES_EXPORT(bool)
+has_ic(void)
+{
+ T((T_CALLED("has_ic()")));
+ returnCode(cur_term &&
+ (insert_character || parm_ich
+ || (enter_insert_mode && exit_insert_mode))
+ && (delete_character || parm_dch));
+}
+
+NCURSES_EXPORT(bool)
+has_il(void)
+{
+ T((T_CALLED("has_il()")));
+ returnCode(cur_term
+ && (insert_line || parm_insert_line)
+ && (delete_line || parm_delete_line));
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_kernel.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_kernel.c
new file mode 100644
index 00000000000..89dc1e80ea8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_kernel.c
@@ -0,0 +1,154 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 2002 *
+ ****************************************************************************/
+
+/*
+ * lib_kernel.c
+ *
+ * Misc. low-level routines:
+ * erasechar()
+ * killchar()
+ * flushinp()
+ *
+ * The baudrate() and delay_output() functions could logically live here,
+ * but are in other modules to reduce the static-link size of programs
+ * that use only these facilities.
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* cur_term */
+
+MODULE_ID("$Id: lib_kernel.c,v 1.24 2004/05/08 17:11:21 tom Exp $")
+
+static int
+_nc_vdisable(void)
+{
+ int value = -1;
+#if defined(_POSIX_VDISABLE) && HAVE_UNISTD_H
+ value = _POSIX_VDISABLE;
+#endif
+#if defined(_PC_VDISABLE)
+ if (value == -1) {
+ value = fpathconf(0, _PC_VDISABLE);
+ if (value == -1) {
+ value = 0377;
+ }
+ }
+#elif defined(VDISABLE)
+ if (value == -1)
+ value = VDISABLE;
+#endif
+ return value;
+}
+
+/*
+ * erasechar()
+ *
+ * Return erase character as given in cur_term->Ottyb.
+ *
+ */
+
+NCURSES_EXPORT(char)
+erasechar(void)
+{
+ int result = ERR;
+ T((T_CALLED("erasechar()")));
+
+ if (cur_term != 0) {
+#ifdef TERMIOS
+ result = cur_term->Ottyb.c_cc[VERASE];
+ if (result == _nc_vdisable())
+ result = ERR;
+#else
+ result = cur_term->Ottyb.sg_erase;
+#endif
+ }
+ returnCode(result);
+}
+
+/*
+ * killchar()
+ *
+ * Return kill character as given in cur_term->Ottyb.
+ *
+ */
+
+NCURSES_EXPORT(char)
+killchar(void)
+{
+ int result = ERR;
+ T((T_CALLED("killchar()")));
+
+ if (cur_term != 0) {
+#ifdef TERMIOS
+ result = cur_term->Ottyb.c_cc[VKILL];
+ if (result == _nc_vdisable())
+ result = ERR;
+#else
+ result = cur_term->Ottyb.sg_kill;
+#endif
+ }
+ returnCode(result);
+}
+
+/*
+ * flushinp()
+ *
+ * Flush any input on cur_term->Filedes
+ *
+ */
+
+NCURSES_EXPORT(int)
+flushinp(void)
+{
+ T((T_CALLED("flushinp()")));
+
+ if (cur_term != 0) {
+#ifdef TERMIOS
+ tcflush(cur_term->Filedes, TCIFLUSH);
+#else
+ errno = 0;
+ do {
+ ioctl(cur_term->Filedes, TIOCFLUSH, 0);
+ } while
+ (errno == EINTR);
+#endif
+ if (SP) {
+ SP->_fifohead = -1;
+ SP->_fifotail = 0;
+ SP->_fifopeek = 0;
+ }
+ returnCode(OK);
+ }
+ returnCode(ERR);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_longname.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_longname.c
new file mode 100644
index 00000000000..1301ee51694
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_longname.c
@@ -0,0 +1,57 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_longname.c
+**
+** The routine longname().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_longname.c,v 1.9 2000/12/10 02:55:07 tom Exp $")
+
+NCURSES_EXPORT(char *)
+longname(void)
+{
+ char *ptr;
+
+ T((T_CALLED("longname()")));
+
+ for (ptr = ttytype + strlen(ttytype); ptr > ttytype; ptr--)
+ if (*ptr == '|')
+ returnPtr(ptr + 1);
+
+ returnPtr(ttytype);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_napms.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_napms.c
new file mode 100644
index 00000000000..1003fa411c2
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_napms.c
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_napms.c
+ *
+ * The routine napms.
+ *
+ * (This file was originally written by Eric Raymond; however except for
+ * comments, none of the original code remains - T.Dickey).
+ */
+
+#include <curses.priv.h>
+
+#if HAVE_NANOSLEEP
+#include <time.h>
+#if HAVE_SYS_TIME_H
+#include <sys/time.h> /* needed for MacOS X DP3 */
+#endif
+#endif
+
+MODULE_ID("$Id: lib_napms.c,v 1.14 2003/11/30 00:54:29 Philippe.Blain Exp $")
+
+NCURSES_EXPORT(int)
+napms(int ms)
+{
+ T((T_CALLED("napms(%d)"), ms));
+
+#if HAVE_NANOSLEEP
+ {
+ struct timespec request, remaining;
+ int err;
+ request.tv_sec = ms / 1000;
+ request.tv_nsec = (ms % 1000) * 1000000;
+ while ((err = nanosleep(&request, &remaining)) == -1
+ && errno == EINTR) {
+ request = remaining;
+ }
+ }
+#else
+ _nc_timed_wait(0, ms, (int *) 0 EVENTLIST_2nd(0));
+#endif
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_options.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_options.c
new file mode 100644
index 00000000000..0edf9d5a9a0
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_options.c
@@ -0,0 +1,267 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2003 *
+ ****************************************************************************/
+
+/*
+** lib_options.c
+**
+** The routines to handle option setting.
+**
+*/
+
+#include <curses.priv.h>
+
+#include <term.h>
+
+MODULE_ID("$Id: lib_options.c,v 1.47 2003/10/25 19:51:38 tom Exp $")
+
+NCURSES_EXPORT(int)
+idlok(WINDOW *win, bool flag)
+{
+ 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);
+}
+
+NCURSES_EXPORT(void)
+idcok(WINDOW *win, bool flag)
+{
+ T((T_CALLED("idcok(%p,%d)"), win, flag));
+
+ if (win)
+ _nc_idcok = win->_idcok = (flag && has_ic());
+
+ returnVoid;
+}
+
+NCURSES_EXPORT(int)
+halfdelay(int t)
+{
+ T((T_CALLED("halfdelay(%d)"), t));
+
+ if (t < 1 || t > 255 || SP == 0)
+ returnCode(ERR);
+
+ cbreak();
+ SP->_cbreak = t + 1;
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+nodelay(WINDOW *win, bool flag)
+{
+ T((T_CALLED("nodelay(%p,%d)"), win, flag));
+
+ if (win) {
+ if (flag == TRUE)
+ win->_delay = 0;
+ else
+ win->_delay = -1;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
+
+NCURSES_EXPORT(int)
+notimeout(WINDOW *win, bool f)
+{
+ T((T_CALLED("notimout(%p,%d)"), win, f));
+
+ if (win) {
+ win->_notimeout = f;
+ returnCode(OK);
+ } else
+ returnCode(ERR);
+}
+
+NCURSES_EXPORT(void)
+wtimeout(WINDOW *win, int delay)
+{
+ T((T_CALLED("wtimeout(%p,%d)"), win, delay));
+
+ if (win) {
+ win->_delay = delay;
+ }
+ returnVoid;
+}
+
+NCURSES_EXPORT(int)
+keypad(WINDOW *win, bool flag)
+{
+ T((T_CALLED("keypad(%p,%d)"), win, flag));
+
+ if (win) {
+ win->_use_keypad = flag;
+ returnCode(_nc_keypad(flag));
+ } else
+ returnCode(ERR);
+}
+
+NCURSES_EXPORT(int)
+meta(WINDOW *win GCC_UNUSED, bool flag)
+{
+ int result = ERR;
+
+ /* Ok, we stay relaxed and don't signal an error if win is NULL */
+ T((T_CALLED("meta(%p,%d)"), win, flag));
+
+ if (SP != 0) {
+ SP->_use_meta = flag;
+
+ if (flag && meta_on) {
+ TPUTS_TRACE("meta_on");
+ putp(meta_on);
+ } else if (!flag && meta_off) {
+ TPUTS_TRACE("meta_off");
+ putp(meta_off);
+ }
+ result = OK;
+ }
+ returnCode(result);
+}
+
+/* curs_set() moved here to narrow the kernel interface */
+
+NCURSES_EXPORT(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);
+}
+
+NCURSES_EXPORT(int)
+typeahead(int fd)
+{
+ T((T_CALLED("typeahead(%d)"), fd));
+ if (SP != 0) {
+ SP->_checkfd = fd;
+ returnCode(OK);
+ } else {
+ returnCode(ERR);
+ }
+}
+
+/*
+** has_key()
+**
+** Return TRUE if the current terminal has the given key
+**
+*/
+
+#if NCURSES_EXT_FUNCS
+static int
+has_key_internal(int keycode, struct tries *tp)
+{
+ if (tp == 0)
+ return (FALSE);
+ else if (tp->value == keycode)
+ return (TRUE);
+ else
+ return (has_key_internal(keycode, tp->child)
+ || has_key_internal(keycode, tp->sibling));
+}
+
+NCURSES_EXPORT(int)
+has_key(int keycode)
+{
+ T((T_CALLED("has_key(%d)"), keycode));
+ returnCode(SP != 0 ? has_key_internal(keycode, SP->_keytry) : FALSE);
+}
+#endif /* NCURSES_EXT_FUNCS */
+
+/* Turn the keypad on/off
+ *
+ * Note: we flush the output because changing this mode causes some terminals
+ * to emit different escape sequences for cursor and keypad keys. If we don't
+ * flush, then the next wgetch may get the escape sequence that corresponds to
+ * the terminal state _before_ switching modes.
+ */
+NCURSES_EXPORT(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 != 0 && !SP->_tried) {
+ _nc_init_keytry();
+ SP->_tried = TRUE;
+ }
+ SP->_keypad_on = flag;
+ return (OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_print.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_print.c
new file mode 100644
index 00000000000..3a98bc96a2f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_print.c
@@ -0,0 +1,92 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <term.h>
+
+MODULE_ID("$Id: lib_print.c,v 1.15 2002/08/17 23:41:34 tom Exp $")
+
+NCURSES_EXPORT(int)
+mcprint(char *data, int len)
+/* ship binary character data to the printer via mc4/mc5/mc5p */
+{
+ char *mybuf, *switchon;
+ size_t onsize, offsize, res;
+
+ errno = 0;
+ if (!cur_term || (!prtr_non && (!prtr_on || !prtr_off))) {
+ errno = ENODEV;
+ return (ERR);
+ }
+
+ if (prtr_non) {
+ switchon = tparm(prtr_non, len);
+ onsize = strlen(switchon);
+ offsize = 0;
+ } else {
+ switchon = prtr_on;
+ onsize = strlen(prtr_on);
+ offsize = strlen(prtr_off);
+ }
+
+ if (switchon == 0
+ || (mybuf = typeMalloc(char, onsize + len + offsize + 1)) == 0) {
+ errno = ENOMEM;
+ return (ERR);
+ }
+
+ (void) strcpy(mybuf, switchon);
+ memcpy(mybuf + onsize, data, (unsigned) len);
+ if (offsize)
+ (void) strcpy(mybuf + onsize + len, prtr_off);
+
+ /*
+ * We're relying on the atomicity of UNIX writes here. The
+ * danger is that output from a refresh() might get interspersed
+ * with the printer data after the write call returns but before the
+ * data has actually been shipped to the terminal. If the write(2)
+ * operation is truly atomic we're protected from this.
+ */
+ res = write(cur_term->Filedes, mybuf, onsize + len + offsize);
+
+ /*
+ * By giving up our scheduler slot here we increase the odds that the
+ * kernel will ship the contiguous clist items from the last write
+ * immediately.
+ */
+ (void) sleep(0);
+
+ free(mybuf);
+ return (res);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_raw.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_raw.c
new file mode 100644
index 00000000000..aa09f52c8c8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_raw.c
@@ -0,0 +1,296 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1998 on *
+ ****************************************************************************/
+
+/*
+ * raw.c
+ *
+ * Routines:
+ * raw()
+ * cbreak()
+ * noraw()
+ * nocbreak()
+ * qiflush()
+ * noqiflush()
+ * intrflush()
+ *
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* cur_term */
+
+MODULE_ID("$Id: lib_raw.c,v 1.13 2002/07/06 22:00:45 tom Exp $")
+
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
+#define _POSIX_SOURCE
+#endif
+
+#if HAVE_SYS_TERMIO_H
+#include <sys/termio.h> /* needed for ISC */
+#endif
+
+#ifdef __EMX__
+#include <io.h>
+#define _nc_setmode(mode) setmode(SP->_ifd, mode)
+#else
+#define _nc_setmode(mode) /* nothing */
+#endif
+
+#define COOKED_INPUT (IXON|BRKINT|PARMRK)
+
+#ifdef TRACE
+#define BEFORE(N) if (_nc_tracing&TRACE_BITS) _tracef("%s before bits: %s", N, _nc_tracebits())
+#define AFTER(N) if (_nc_tracing&TRACE_BITS) _tracef("%s after bits: %s", N, _nc_tracebits())
+#else
+#define BEFORE(s)
+#define AFTER(s)
+#endif /* TRACE */
+
+NCURSES_EXPORT(int)
+raw(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("raw()")));
+
+ if (SP != 0 && cur_term != 0) {
+ TTY buf;
+
+ BEFORE("raw");
+ _nc_setmode(O_BINARY);
+
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag &= ~(ICANON | ISIG | IEXTEN);
+ buf.c_iflag &= ~(COOKED_INPUT);
+ buf.c_cc[VMIN] = 1;
+ buf.c_cc[VTIME] = 0;
+#else
+ buf.sg_flags |= RAW;
+#endif
+ if ((result = _nc_set_tty_mode(&buf)) == OK) {
+ SP->_raw = TRUE;
+ SP->_cbreak = 1;
+ cur_term->Nttyb = buf;
+ }
+ AFTER("raw");
+ }
+ returnCode(result);
+}
+
+NCURSES_EXPORT(int)
+cbreak(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("cbreak()")));
+
+ if (SP != 0 && cur_term != 0) {
+ TTY buf;
+
+ BEFORE("cbreak");
+ _nc_setmode(O_BINARY);
+
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag &= ~ICANON;
+ buf.c_iflag &= ~ICRNL;
+ buf.c_lflag |= ISIG;
+ buf.c_cc[VMIN] = 1;
+ buf.c_cc[VTIME] = 0;
+#else
+ buf.sg_flags |= CBREAK;
+#endif
+ if ((result = _nc_set_tty_mode(&buf)) == OK) {
+ SP->_cbreak = 1;
+ cur_term->Nttyb = buf;
+ }
+ AFTER("cbreak");
+ }
+ returnCode(result);
+}
+
+/*
+ * Note:
+ * this implementation may be wrong. See the comment under intrflush().
+ */
+NCURSES_EXPORT(void)
+qiflush(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("qiflush()")));
+
+ if (cur_term != 0) {
+ TTY buf;
+
+ BEFORE("qiflush");
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag &= ~(NOFLSH);
+ result = _nc_set_tty_mode(&buf);
+#else
+ /* FIXME */
+#endif
+ if (result == OK)
+ cur_term->Nttyb = buf;
+ AFTER("qiflush");
+ }
+ returnVoid;
+}
+
+NCURSES_EXPORT(int)
+noraw(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("noraw()")));
+
+ if (SP != 0 && cur_term != 0) {
+ TTY buf;
+
+ BEFORE("noraw");
+ _nc_setmode(O_TEXT);
+
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag |= ISIG | ICANON |
+ (cur_term->Ottyb.c_lflag & IEXTEN);
+ buf.c_iflag |= COOKED_INPUT;
+#else
+ buf.sg_flags &= ~(RAW | CBREAK);
+#endif
+ if ((result = _nc_set_tty_mode(&buf)) == OK) {
+ SP->_raw = FALSE;
+ SP->_cbreak = 0;
+ cur_term->Nttyb = buf;
+ }
+ AFTER("noraw");
+ }
+ returnCode(result);
+}
+
+NCURSES_EXPORT(int)
+nocbreak(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("nocbreak()")));
+
+ if (SP != 0 && cur_term != 0) {
+ TTY buf;
+
+ BEFORE("nocbreak");
+ _nc_setmode(O_TEXT);
+
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag |= ICANON;
+ buf.c_iflag |= ICRNL;
+#else
+ buf.sg_flags &= ~CBREAK;
+#endif
+ if ((result = _nc_set_tty_mode(&buf)) == OK) {
+ SP->_cbreak = 0;
+ cur_term->Nttyb = buf;
+ }
+ AFTER("nocbreak");
+ }
+ returnCode(result);
+}
+
+/*
+ * Note:
+ * this implementation may be wrong. See the comment under intrflush().
+ */
+NCURSES_EXPORT(void)
+noqiflush(void)
+{
+ int result = ERR;
+
+ T((T_CALLED("noqiflush()")));
+
+ if (cur_term != 0) {
+ TTY buf;
+
+ BEFORE("noqiflush");
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ buf.c_lflag |= NOFLSH;
+ result = _nc_set_tty_mode(&buf);
+#else
+ /* FIXME */
+#endif
+ if (result == OK) {
+ cur_term->Nttyb = buf;
+ }
+ AFTER("noqiflush");
+ }
+ returnVoid;
+}
+
+/*
+ * 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.
+ */
+NCURSES_EXPORT(int)
+intrflush(WINDOW *win GCC_UNUSED, bool flag)
+{
+ int result = ERR;
+
+ T((T_CALLED("intrflush(%d)"), flag));
+
+ if (cur_term != 0) {
+ TTY buf;
+
+ BEFORE("intrflush");
+ buf = cur_term->Nttyb;
+#ifdef TERMIOS
+ if (flag)
+ buf.c_lflag &= ~(NOFLSH);
+ else
+ buf.c_lflag |= (NOFLSH);
+ result = _nc_set_tty_mode(&buf);
+#else
+ /* FIXME */
+#endif
+ if (result == OK) {
+ cur_term->Nttyb = buf;
+ }
+ AFTER("intrflush");
+ }
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_setup.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_setup.c
new file mode 100644
index 00000000000..50159940b45
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_setup.c
@@ -0,0 +1,548 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2003 *
+ ****************************************************************************/
+
+/*
+ * Terminal setup routines common to termcap and terminfo:
+ *
+ * use_env(bool)
+ * setupterm(char *, int, int *)
+ */
+
+#include <curses.priv.h>
+#include <tic.h> /* for MAX_NAME_SIZE */
+#include <term_entry.h>
+
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
+#define _POSIX_SOURCE
+#endif
+
+#if HAVE_LOCALE_H
+#include <locale.h>
+#endif
+
+#include <term.h> /* lines, columns, cur_term */
+
+MODULE_ID("$Id: lib_setup.c,v 1.86 2004/10/09 19:16:33 tom Exp $")
+
+/****************************************************************************
+ *
+ * Terminal size computation
+ *
+ ****************************************************************************/
+
+#if HAVE_SIZECHANGE
+# if !defined(sun) || !TERMIOS
+# if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+# endif
+# endif
+#endif
+
+#if NEED_PTEM_H
+ /* On SCO, they neglected to define struct winsize in termios.h -- it's only
+ * in termio.h and ptem.h (the former conflicts with other definitions).
+ */
+# include <sys/stream.h>
+# include <sys/ptem.h>
+#endif
+
+#if HAVE_LANGINFO_CODESET
+#include <langinfo.h>
+#endif
+
+/*
+ * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
+ * Solaris, IRIX) define TIOCGWINSZ and struct winsize.
+ */
+#ifdef TIOCGSIZE
+# define IOCTL_WINSIZE TIOCGSIZE
+# define STRUCT_WINSIZE struct ttysize
+# define WINSIZE_ROWS(n) (int)n.ts_lines
+# define WINSIZE_COLS(n) (int)n.ts_cols
+#else
+# ifdef TIOCGWINSZ
+# define IOCTL_WINSIZE TIOCGWINSZ
+# define STRUCT_WINSIZE struct winsize
+# define WINSIZE_ROWS(n) (int)n.ws_row
+# define WINSIZE_COLS(n) (int)n.ws_col
+# endif
+#endif
+
+NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
+NCURSES_EXPORT_VAR(int) LINES = 0;
+NCURSES_EXPORT_VAR(int) COLS = 0;
+NCURSES_EXPORT_VAR(int) TABSIZE = 0;
+
+static int _use_env = TRUE;
+
+NCURSES_EXPORT(void)
+use_env(bool f)
+{
+ T((T_CALLED("use_env()")));
+ _use_env = f;
+ returnVoid;
+}
+
+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));
+
+ if (!_use_env) {
+ *linep = (int) lines;
+ *colp = (int) columns;
+ } else { /* usually want to query LINES and COLUMNS from environment */
+ int value;
+
+ *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));
+
+#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));
+ }
+#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:;
+ }
+#endif /* HAVE_SIZECHANGE */
+
+ /* if we can't get dynamic info about the size, use static */
+ if (*linep <= 0) {
+ *linep = (int) lines;
+ }
+ if (*colp <= 0) {
+ *colp = (int) columns;
+ }
+
+ /* the ultimate fallback, assume fixed 24x80 size */
+ if (*linep <= 0) {
+ *linep = 24;
+ }
+ if (*colp <= 0) {
+ *colp = 80;
+ }
+
+ /*
+ * 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 (VALID_NUMERIC(init_tabs))
+ TABSIZE = (int) init_tabs;
+ else
+ TABSIZE = 8;
+ T(("TABSIZE = %d", TABSIZE));
+}
+
+#if USE_SIZECHANGE
+NCURSES_EXPORT(void)
+_nc_update_screensize(void)
+{
+ int old_lines = lines;
+ int new_lines;
+ int old_cols = columns;
+ int new_cols;
+
+ _nc_get_screensize(&new_lines, &new_cols);
+
+ /*
+ * See is_term_resized() and resizeterm().
+ * We're doing it this way because those functions belong to the upper
+ * ncurses library, while this resides in the lower terminfo library.
+ */
+ if (SP != 0
+ && SP->_resize != 0) {
+ if ((new_lines != old_lines) || (new_cols != old_cols))
+ SP->_resize(new_lines, new_cols);
+ SP->_sig_winch = FALSE;
+ }
+}
+#endif
+
+/****************************************************************************
+ *
+ * Terminal setup
+ *
+ ****************************************************************************/
+
+#define ret_error(code, fmt, arg) if (errret) {\
+ *errret = code;\
+ returnCode(ERR);\
+ } else {\
+ fprintf(stderr, fmt, arg);\
+ exit(EXIT_FAILURE);\
+ }
+
+#define ret_error0(code, msg) if (errret) {\
+ *errret = code;\
+ returnCode(ERR);\
+ } else {\
+ fprintf(stderr, msg);\
+ exit(EXIT_FAILURE);\
+ }
+
+#if USE_DATABASE || USE_TERMCAP
+static int
+grab_entry(const char *const tn, TERMTYPE *const tp)
+/* return 1 if entry found, 0 if not found, -1 if database not accessible */
+{
+#if USE_DATABASE
+ char filename[PATH_MAX];
+#endif
+ int status;
+
+ /*
+ * $TERM shouldn't contain pathname delimiters.
+ */
+ if (strchr(tn, '/'))
+ return 0;
+
+#if USE_DATABASE
+ if ((status = _nc_read_entry(tn, filename, tp)) != 1) {
+
+#if !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 */
+
+ }
+#else
+ status = _nc_read_termcap_entry(tn, tp);
+#endif
+
+ /*
+ * 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) {
+ unsigned 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
+
+/*
+** do_prototype()
+**
+** Take the real command character out of the CC environment variable
+** and substitute it in for the prototype given in 'command_character'.
+**
+*/
+static void
+do_prototype(void)
+{
+ int i;
+ char CC;
+ char proto;
+ char *tmp;
+
+ tmp = getenv("CC");
+ CC = *tmp;
+ proto = *command_character;
+
+ for_each_string(i, &(cur_term->type)) {
+ for (tmp = cur_term->type.Strings[i]; *tmp; tmp++) {
+ if (*tmp == proto)
+ *tmp = CC;
+ }
+ }
+}
+
+/*
+ * Find the locale which is in effect.
+ */
+NCURSES_EXPORT(char *)
+_nc_get_locale(void)
+{
+ char *env;
+#if HAVE_LOCALE_H
+ /*
+ * This is preferable to using getenv() since it ensures that we are using
+ * the locale which was actually initialized by the application.
+ */
+ env = setlocale(LC_CTYPE, 0);
+#else
+ if (((env = getenv("LC_ALL")) != 0 && *env != '\0')
+ || ((env = getenv("LC_CTYPE")) != 0 && *env != '\0')
+ || ((env = getenv("LANG")) != 0 && *env != '\0')) {
+ ;
+ }
+#endif
+ T(("_nc_get_locale %s", _nc_visbuf(env)));
+ return env;
+}
+
+/*
+ * Check if we are running in a UTF-8 locale.
+ */
+NCURSES_EXPORT(int)
+_nc_unicode_locale(void)
+{
+ int result = 0;
+#if HAVE_LANGINFO_CODESET
+ char *env = nl_langinfo(CODESET);
+ result = !strcmp(env, "UTF-8");
+ T(("_nc_unicode_locale(%s) ->%d", env, result));
+#else
+ char *env = _nc_get_locale();
+ if (env != 0) {
+ if (strstr(env, ".UTF-8") != 0) {
+ result = 1;
+ T(("_nc_unicode_locale(%s) ->%d", env, result));
+ }
+ }
+#endif
+ return result;
+}
+
+#define CONTROL_N(s) ((s) != 0 && strstr(s, "\016") != 0)
+#define CONTROL_O(s) ((s) != 0 && strstr(s, "\017") != 0)
+
+/*
+ * Check for known broken cases where a UTF-8 locale breaks the alternate
+ * character set.
+ */
+NCURSES_EXPORT(int)
+_nc_locale_breaks_acs(void)
+{
+ char *env = getenv("TERM");
+ if (env != 0) {
+ if (strstr(env, "linux"))
+ return 1; /* always broken */
+ if (strstr(env, "screen") != 0
+ && ((env = getenv("TERMCAP")) != 0
+ && strstr(env, "screen") != 0)
+ && strstr(env, "hhII00") != 0) {
+ if (CONTROL_N(enter_alt_charset_mode) ||
+ CONTROL_O(enter_alt_charset_mode) ||
+ CONTROL_N(set_attributes) ||
+ CONTROL_O(set_attributes))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+/*
+ * setupterm(termname, Filedes, errret)
+ *
+ * Find and read the appropriate object file for the terminal
+ * Make cur_term point to the structure.
+ *
+ */
+
+NCURSES_EXPORT(int)
+setupterm(NCURSES_CONST char *tname, int Filedes, int *errret)
+{
+ int status;
+
+ START_TRACE();
+ 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);
+ }
+
+ T(("your terminal name is %s", tname));
+
+ /*
+ * Allow output redirection. This is what SVr3 does. If stdout is
+ * directed to a file, screen updates go to standard error.
+ */
+ if (Filedes == STDOUT_FILENO && !isatty(Filedes))
+ Filedes = STDERR_FILENO;
+
+ /*
+ * Check if we have already initialized to use this terminal. If so, we
+ * do not need to re-read the terminfo entry, or obtain TTY settings.
+ *
+ * This is an improvement on SVr4 curses. If an application mixes curses
+ * and termcap calls, it may call both initscr and tgetent. This is not
+ * really a good thing to do, but can happen if someone tries using ncurses
+ * with the readline library. The problem we are fixing is that when
+ * tgetent calls setupterm, the resulting Ottyb struct in cur_term is
+ * zeroed. A subsequent call to endwin uses the zeroed terminal settings
+ * rather than the ones saved in initscr. So we check if cur_term appears
+ * to contain terminal settings for the same output file as our current
+ * call - and copy those terminal settings. (SVr4 curses does not do this,
+ * however applications that are working around the problem will still work
+ * properly with this feature).
+ */
+ if (cur_term != 0
+ && cur_term->Filedes == Filedes
+ && cur_term->_termname != 0
+ && !strcmp(cur_term->_termname, tname)
+ && _nc_name_match(cur_term->type.term_names, tname, "|")) {
+ T(("reusing existing terminal information and mode-settings"));
+ } else {
+ TERMINAL *term_ptr;
+
+ term_ptr = typeCalloc(TERMINAL, 1);
+
+ if (term_ptr == 0) {
+ ret_error0(-1,
+ "Not enough memory to create terminal structure.\n");
+ }
+#if USE_DATABASE || USE_TERMCAP
+ status = grab_entry(tname, &term_ptr->type);
+#else
+ 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 <= 0) {
+ del_curterm(term_ptr);
+ if (status == -1) {
+ ret_error0(-1, "terminals database is inaccessible\n");
+ } else if (status == 0) {
+ ret_error(0, "'%s': unknown terminal type.\n", tname);
+ }
+ }
+
+ set_curterm(term_ptr);
+
+ if (command_character && getenv("CC"))
+ do_prototype();
+
+ strncpy(ttytype, cur_term->type.term_names, NAMESIZE - 1);
+ ttytype[NAMESIZE - 1] = '\0';
+
+ cur_term->Filedes = Filedes;
+ cur_term->_termname = strdup(tname);
+
+ /*
+ * If an application calls setupterm() rather than initscr() or
+ * newterm(), we will not have the def_prog_mode() call in
+ * _nc_setupscreen(). Do it now anyway, so we can initialize the
+ * baudrate.
+ */
+ if (isatty(Filedes)) {
+ def_prog_mode();
+ baudrate();
+ }
+ }
+
+ /*
+ * We should always check the screensize, just in case.
+ */
+ _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);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_termcap.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_termcap.c
new file mode 100644
index 00000000000..1484c41d231
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_termcap.c
@@ -0,0 +1,381 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * *
+ * some of the code in here was contributed by: *
+ * Magnus Bengtsson, d6mbeng@dtek.chalmers.se (Nov'93) *
+ ****************************************************************************/
+
+#define __INTERNAL_CAPS_VISIBLE
+#include <curses.priv.h>
+
+#include <termcap.h>
+#include <tic.h>
+#include <ctype.h>
+
+#include <term_entry.h>
+
+MODULE_ID("$Id: lib_termcap.c,v 1.46 2004/09/25 19:21:27 tom Exp $")
+
+#define CSI 233
+#define ESC 033 /* ^[ */
+#define L_BRACK '['
+#define SHIFT_OUT 017 /* ^N */
+
+NCURSES_EXPORT_VAR(char *) UP = 0;
+NCURSES_EXPORT_VAR(char *) BC = 0;
+
+static char *fix_me = 0;
+
+static char *
+set_attribute_9(int flag)
+{
+ const char *result;
+
+ if ((result = tparm(set_attributes, 0, 0, 0, 0, 0, 0, 0, 0, flag)) == 0)
+ result = "";
+ return strdup(result);
+}
+
+static int
+is_csi(char *s)
+{
+ if (UChar(s[0]) == CSI)
+ return 1;
+ else if (s[0] == ESC && s[1] == L_BRACK)
+ return 2;
+ return 0;
+}
+
+static char *
+skip_zero(char *s)
+{
+ if (s[0] == '0') {
+ if (s[1] == ';')
+ s += 2;
+ else if (isalpha(UChar(s[1])))
+ s += 1;
+ }
+ return s;
+}
+
+static bool
+similar_sgr(char *a, char *b)
+{
+ bool result = FALSE;
+ int csi_a = is_csi(a);
+ int csi_b = is_csi(b);
+ unsigned len_a;
+ unsigned len_b;
+
+ TR(TRACE_DATABASE, ("similar_sgr:\n\t%s\n\t%s",
+ _nc_visbuf2(1, a),
+ _nc_visbuf2(2, b)));
+ if (csi_a != 0 && csi_b != 0 && csi_a == csi_b) {
+ a += csi_a;
+ b += csi_b;
+ if (*a != *b) {
+ a = skip_zero(a);
+ b = skip_zero(b);
+ }
+ }
+ len_a = strlen(a);
+ len_b = strlen(b);
+ if (len_a && len_b) {
+ if (len_a > len_b)
+ result = (strncmp(a, b, len_b) == 0);
+ else
+ result = (strncmp(a, b, len_a) == 0);
+ }
+ TR(TRACE_DATABASE, ("...similar_sgr: %d\n\t%s\n\t%s", result,
+ _nc_visbuf2(1, a),
+ _nc_visbuf2(2, b)));
+ return result;
+}
+
+static unsigned
+chop_out(char *string, unsigned i, unsigned j)
+{
+ TR(TRACE_DATABASE, ("chop_out %d..%d from %s", i, j, _nc_visbuf(string)));
+ while (string[j] != '\0') {
+ string[i++] = string[j++];
+ }
+ string[i] = '\0';
+ return i;
+}
+
+/***************************************************************************
+ *
+ * tgetent(bufp, term)
+ *
+ * In termcap, this function reads in the entry for terminal `term' into the
+ * buffer pointed to by bufp. It must be called before any of the functions
+ * below are called.
+ * In this terminfo emulation, tgetent() simply calls setupterm() (which
+ * does a bit more than tgetent() in termcap does), and returns its return
+ * value (1 if successful, 0 if no terminal with the given name could be
+ * found, or -1 if no terminal descriptions have been installed on the
+ * system). The bufp argument is ignored.
+ *
+ ***************************************************************************/
+
+NCURSES_EXPORT(int)
+tgetent(char *bufp GCC_UNUSED, const char *name)
+{
+ int errcode;
+
+ START_TRACE();
+ T((T_CALLED("tgetent()")));
+
+ setupterm((NCURSES_CONST char *) name, STDOUT_FILENO, &errcode);
+
+ PC = 0;
+ UP = 0;
+ BC = 0;
+ fix_me = 0;
+
+ if (errcode == 1) {
+
+ 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;
+
+ /*
+ * While 'sgr0' is the "same" as termcap 'me', there is a compatibility
+ * issue. The sgr/sgr0 capabilities include setting/clearing alternate
+ * character set mode. A termcap application cannot use sgr, so sgr0
+ * strings that reset alternate character set mode will be
+ * misinterpreted. Here, we remove those from the more common
+ * ISO/ANSI/VT100 entries, which have sgr0 agreeing with sgr.
+ */
+ if (exit_attribute_mode != 0
+ && set_attributes != 0) {
+ bool found = FALSE;
+ char *on = set_attribute_9(1);
+ char *off = set_attribute_9(0);
+ char *tmp;
+ size_t i, j, k;
+
+ TR(TRACE_DATABASE, ("checking if we can trim sgr0 based on sgr"));
+ TR(TRACE_DATABASE, ("sgr0 %s", _nc_visbuf(exit_attribute_mode)));
+ TR(TRACE_DATABASE, ("sgr(9:off) %s", _nc_visbuf(off)));
+ TR(TRACE_DATABASE, ("sgr(9:on) %s", _nc_visbuf(on)));
+ if (similar_sgr(off, exit_attribute_mode)
+ && !similar_sgr(off, on)) {
+ TR(TRACE_DATABASE, ("adjusting sgr0 : %s", _nc_visbuf(off)));
+ FreeIfNeeded(fix_me);
+ fix_me = off;
+ /*
+ * If rmacs is a substring of sgr(0), remove that chunk.
+ */
+ if (exit_alt_charset_mode != 0) {
+ j = strlen(off);
+ k = strlen(exit_alt_charset_mode);
+ if (j > k) {
+ for (i = 0; i <= (j - k); ++i) {
+ if (!memcmp(exit_alt_charset_mode, off + i, k)) {
+ found = TRUE;
+ chop_out(off, i, i + k);
+ break;
+ }
+ }
+ }
+ }
+ /*
+ * SGR 10 would reset to normal font.
+ */
+ if (!found) {
+ if ((i = is_csi(off)) != 0
+ && off[strlen(off) - 1] == 'm') {
+ TR(TRACE_DATABASE, ("looking for SGR 10 in %s",
+ _nc_visbuf(off)));
+ tmp = skip_zero(off + i);
+ if (tmp[0] == '1'
+ && skip_zero(tmp + 1) != tmp + 1) {
+ i = tmp - off;
+ if (off[i - 1] == ';')
+ i--;
+ j = skip_zero(tmp + 1) - off;
+ i = chop_out(off, i, j);
+ found = TRUE;
+ }
+ }
+ }
+ if (!found
+ && (tmp = strstr(exit_attribute_mode, off)) != 0) {
+ i = tmp - exit_attribute_mode;
+ j = strlen(off);
+ tmp = strdup(exit_attribute_mode);
+ chop_out(tmp, i, j);
+ free(off);
+ fix_me = tmp;
+ }
+ TR(TRACE_DATABASE, ("...adjusted sgr0 : %s", _nc_visbuf(fix_me)));
+ if (!strcmp(fix_me, exit_attribute_mode)) {
+ TR(TRACE_DATABASE, ("...same result, discard"));
+ free(fix_me);
+ fix_me = 0;
+ }
+ } else {
+ /*
+ * Either the sgr does not reference alternate character set,
+ * or it is incorrect. That's too hard to decide right now.
+ */
+ free(off);
+ }
+ free(on);
+ } else {
+ /*
+ * Possibly some applications are confused if sgr0 contains rmacs,
+ * but that would be a different bug report -TD
+ */
+ }
+
+ (void) baudrate(); /* sets ospeed as a side-effect */
+
+/* LINT_PREPRO
+#if 0*/
+#include <capdefaults.c>
+/* LINT_PREPRO
+#endif*/
+
+ }
+ returnCode(errcode);
+}
+
+/***************************************************************************
+ *
+ * tgetflag(str)
+ *
+ * Look up boolean termcap capability str and return its value (TRUE=1 if
+ * present, FALSE=0 if not).
+ *
+ ***************************************************************************/
+
+NCURSES_EXPORT(int)
+tgetflag(NCURSES_CONST char *id)
+{
+ unsigned 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 */
+}
+
+/***************************************************************************
+ *
+ * tgetnum(str)
+ *
+ * Look up numeric termcap capability str and return its value, or -1 if
+ * not given.
+ *
+ ***************************************************************************/
+
+NCURSES_EXPORT(int)
+tgetnum(NCURSES_CONST char *id)
+{
+ unsigned 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(ABSENT_NUMERIC);
+}
+
+/***************************************************************************
+ *
+ * tgetstr(str, area)
+ *
+ * Look up string termcap capability str and return a pointer to its value,
+ * or NULL if not given.
+ *
+ ***************************************************************************/
+
+NCURSES_EXPORT(char *)
+tgetstr(NCURSES_CONST char *id, char **area)
+{
+ unsigned i;
+ char *result = NULL;
+
+ 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)) {
+ result = tp->Strings[i];
+ TR(TRACE_DATABASE, ("found match : %s", _nc_visbuf(result)));
+ /* setupterm forces canceled strings to null */
+ if (VALID_STRING(result)) {
+ if (result == exit_attribute_mode
+ && fix_me != 0) {
+ result = fix_me;
+ TR(TRACE_DATABASE, ("altered to : %s", _nc_visbuf(result)));
+ }
+ if (area != 0
+ && *area != 0) {
+ (void) strcpy(*area, result);
+ *area += strlen(*area) + 1;
+ }
+ }
+ break;
+ }
+ }
+ }
+ returnPtr(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_termname.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_termname.c
new file mode 100644
index 00000000000..713d0be8c36
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_termname.c
@@ -0,0 +1,44 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_termname.c,v 1.8 2003/12/27 18:23:01 tom Exp $")
+
+NCURSES_EXPORT(char *)
+termname(void)
+{
+ char *name = 0;
+
+ T((T_CALLED("termname()")));
+
+ if (cur_term != 0)
+ name = cur_term->_termname;
+
+ returnPtr(name);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_tgoto.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_tgoto.c
new file mode 100644
index 00000000000..84d4a7f36d8
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_tgoto.c
@@ -0,0 +1,203 @@
+/****************************************************************************
+ * Copyright (c) 2000-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), 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 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <termcap.h>
+
+MODULE_ID("$Id: lib_tgoto.c,v 1.11 2003/11/30 00:22:18 Juha.Jarvi Exp $")
+
+#if !PURE_TERMINFO
+static bool
+is_termcap(const char *string)
+{
+ bool result = TRUE;
+
+ if (string == 0 || *string == '\0') {
+ result = FALSE; /* tparm() handles empty strings */
+ } else {
+ while ((*string != '\0') && result) {
+ if (*string == '%') {
+ switch (*++string) {
+ case 'p':
+ result = FALSE;
+ break;
+ case '\0':
+ string--;
+ break;
+ }
+ } else if (string[0] == '$' && string[1] == '<') {
+ result = FALSE;
+ }
+ string++;
+ }
+ }
+ return result;
+}
+
+static char *
+tgoto_internal(const char *string, int x, int y)
+{
+ static char *result;
+ static size_t length;
+
+ int swap_arg;
+ int param[3];
+ size_t used = 0;
+ size_t need = 10;
+ int *value = param;
+ bool need_BC = FALSE;
+
+ if (BC)
+ need += strlen(BC);
+
+ param[0] = y;
+ param[1] = x;
+ param[2] = 0;
+
+ while (*string != 0) {
+ if ((used + need) > length) {
+ length += (used + need);
+ if ((result = typeRealloc(char, length, result)) == 0) {
+ length = 0;
+ break;
+ }
+ }
+ if (*string == '%') {
+ const char *fmt = 0;
+
+ switch (*++string) {
+ case '\0':
+ string--;
+ break;
+ case 'd':
+ fmt = "%d";
+ break;
+ case '2':
+ fmt = "%02d";
+ *value %= 100;
+ break;
+ case '3':
+ fmt = "%03d";
+ *value %= 1000;
+ break;
+ case '+':
+ *value += UChar(*++string);
+ /* FALLTHRU */
+ case '.':
+ /*
+ * Guard against tputs() seeing a truncated string. The
+ * termcap documentation refers to a similar fixup for \n
+ * and \r, but I don't see that it could work -TD
+ */
+ if (*value == 0) {
+ if (BC != 0) {
+ *value += 1;
+ need_BC = TRUE;
+ } else {
+ *value = 0200; /* tputs will treat this as \0 */
+ }
+ }
+ result[used++] = *value++;
+ break;
+ case '%':
+ result[used++] = *string;
+ break;
+ case 'r':
+ swap_arg = param[0];
+ param[0] = param[1];
+ param[1] = swap_arg;
+ break;
+ case 'i':
+ param[0] += 1;
+ param[1] += 1;
+ break;
+ case '>':
+ if (*value > string[1])
+ *value += string[2];
+ string += 2;
+ break;
+ case 'n': /* Datamedia 2500 */
+ param[0] ^= 0140;
+ param[1] ^= 0140;
+ break;
+ case 'B': /* BCD */
+ *value = 16 * (*value / 10) + (*value % 10);
+ break;
+ case 'D': /* Reverse coding (Delta Data) */
+ *value -= 2 * (*value % 16);
+ break;
+ }
+ if (fmt != 0) {
+ sprintf(result + used, fmt, *value++);
+ used += strlen(result + used);
+ fmt = 0;
+ }
+ if (value - param > 2) {
+ value = param + 2;
+ *value = 0;
+ }
+ } else {
+ result[used++] = *string;
+ }
+ string++;
+ }
+ if (result != 0) {
+ if (need_BC) {
+ strcpy(result + used, BC);
+ used += strlen(BC);
+ }
+ result[used] = '\0';
+ }
+ return result;
+}
+#endif
+
+/*
+ * Retained solely for upward compatibility. Note the intentional reversing of
+ * the last two arguments when invoking tparm().
+ */
+NCURSES_EXPORT(char *)
+tgoto(const char *string, int x, int y)
+{
+ char *result;
+
+ T((T_CALLED("tgoto(%s, %d, %d)"), _nc_visbuf(string), x, y));
+#if !PURE_TERMINFO
+ if (is_termcap(string))
+ result = tgoto_internal(string, x, y);
+ else
+#endif
+ result = tparm((NCURSES_CONST char *) string, y, x);
+ returnPtr(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_ti.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_ti.c
new file mode 100644
index 00000000000..df460f953ea
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_ti.c
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <term_entry.h>
+#include <tic.h>
+
+MODULE_ID("$Id: lib_ti.c,v 1.23 2003/05/24 21:10:28 tom Exp $")
+
+NCURSES_EXPORT(int)
+tigetflag(NCURSES_CONST char *str)
+{
+ unsigned 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);
+}
+
+NCURSES_EXPORT(int)
+tigetnum(NCURSES_CONST char *str)
+{
+ unsigned 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 */
+}
+
+NCURSES_EXPORT(char *)
+tigetstr(NCURSES_CONST char *str)
+{
+ unsigned 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);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_tparm.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_tparm.c
new file mode 100644
index 00000000000..041667b4f7c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_tparm.c
@@ -0,0 +1,791 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey, 1996 on *
+ ****************************************************************************/
+
+/*
+ * tparm.c
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <term.h>
+#include <tic.h>
+
+MODULE_ID("$Id: lib_tparm.c,v 1.68 2004/02/07 20:52:51 tom Exp $")
+
+/*
+ * char *
+ * tparm(string, ...)
+ *
+ * Substitute the given parameters into the given string by the following
+ * rules (taken from terminfo(5)):
+ *
+ * Cursor addressing and other strings requiring parame-
+ * ters in the terminal are described by a parameterized string
+ * capability, with 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
+ *
+ * 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 `%'
+ * %c print pop() like %c in printf()
+ * %s print pop() like %s in printf()
+ * %[[:]flags][width[.precision]][doxXs]
+ * as in printf, flags are [-+#] and space
+ * The ':' is used to avoid making %+ or %-
+ * patterns (see below).
+ *
+ * %p[1-9] push ith 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
+ * %l push strlen(pop)
+ * %'c' push char constant c
+ * %{nn} push integer constant nn
+ *
+ * %+ %- %* %/ %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 parms (for ANSI terminals)
+ *
+ * %? expr %t thenpart %e elsepart %;
+ * if-then-else, %e elsepart is optional.
+ * else-if's are possible ala Algol 68:
+ * %? c1 %t b1 %e c2 %t b2 %e c3 %t b3 %e c4 %t b4 %e b5 %;
+ *
+ * For those of the above operators which are binary and not commutative,
+ * the stack works in the usual way, with
+ * %gx %gy %m
+ * resulting in x mod y, not the reverse.
+ */
+
+#define STACKSIZE 20
+
+typedef struct {
+ union {
+ int num;
+ char *str;
+ } data;
+ bool num_type;
+} stack_frame;
+
+NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
+
+static stack_frame stack[STACKSIZE];
+static int stack_ptr;
+static const char *tparam_base = "";
+
+#ifdef TRACE
+static const char *tname;
+#endif /* TRACE */
+
+static char *out_buff;
+static size_t out_size;
+static size_t out_used;
+
+static char *fmt_buff;
+static size_t fmt_size;
+
+#if NO_LEAKS
+NCURSES_EXPORT(void)
+_nc_free_tparm(void)
+{
+ if (out_buff != 0) {
+ FreeAndNull(out_buff);
+ out_size = 0;
+ out_used = 0;
+ FreeAndNull(fmt_buff);
+ fmt_size = 0;
+ }
+}
+#endif
+
+static inline void
+get_space(size_t need)
+{
+ need += out_used;
+ if (need > out_size) {
+ out_size = need * 2;
+ out_buff = typeRealloc(char, out_size, out_buff);
+ if (out_buff == 0)
+ _nc_err_abort(MSG_NO_MEMORY);
+ }
+}
+
+static inline void
+save_text(const char *fmt, const char *s, int len)
+{
+ size_t s_len = strlen(s);
+ if (len > (int) s_len)
+ s_len = len;
+
+ get_space(s_len + 1);
+
+ (void) sprintf(out_buff + out_used, fmt, s);
+ out_used += strlen(out_buff + out_used);
+}
+
+static inline void
+save_number(const char *fmt, int number, int len)
+{
+ if (len < 30)
+ len = 30; /* actually log10(MAX_INT)+1 */
+
+ get_space((unsigned) len + 1);
+
+ (void) sprintf(out_buff + out_used, fmt, number);
+ out_used += strlen(out_buff + out_used);
+}
+
+static inline void
+save_char(int c)
+{
+ if (c == 0)
+ c = 0200;
+ get_space(1);
+ out_buff[out_used++] = c;
+}
+
+static inline void
+npush(int x)
+{
+ if (stack_ptr < STACKSIZE) {
+ stack[stack_ptr].num_type = TRUE;
+ stack[stack_ptr].data.num = x;
+ stack_ptr++;
+ } else {
+ DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(tparam_base)));
+ _nc_tparm_err++;
+ }
+}
+
+static inline int
+npop(void)
+{
+ int result = 0;
+ if (stack_ptr > 0) {
+ stack_ptr--;
+ if (stack[stack_ptr].num_type)
+ result = stack[stack_ptr].data.num;
+ } else {
+ DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(tparam_base)));
+ _nc_tparm_err++;
+ }
+ return result;
+}
+
+static inline void
+spush(char *x)
+{
+ if (stack_ptr < STACKSIZE) {
+ stack[stack_ptr].num_type = FALSE;
+ stack[stack_ptr].data.str = x;
+ stack_ptr++;
+ } else {
+ DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(tparam_base)));
+ _nc_tparm_err++;
+ }
+}
+
+static inline char *
+spop(void)
+{
+ static char dummy[] = ""; /* avoid const-cast */
+ char *result = dummy;
+ if (stack_ptr > 0) {
+ stack_ptr--;
+ if (!stack[stack_ptr].num_type && stack[stack_ptr].data.str != 0)
+ result = stack[stack_ptr].data.str;
+ } else {
+ DEBUG(2, ("spop: stack underflow: %s", _nc_visbuf(tparam_base)));
+ _nc_tparm_err++;
+ }
+ return result;
+}
+
+static inline const char *
+parse_format(const char *s, char *format, int *len)
+{
+ *len = 0;
+ if (format != 0) {
+ bool done = FALSE;
+ bool allowminus = FALSE;
+ bool dot = FALSE;
+ bool err = FALSE;
+ char *fmt = format;
+ int my_width = 0;
+ int my_prec = 0;
+ int value = 0;
+
+ *len = 0;
+ *format++ = '%';
+ while (*s != '\0' && !done) {
+ switch (*s) {
+ case 'c': /* FALLTHRU */
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 's':
+ *format++ = *s;
+ done = TRUE;
+ break;
+ case '.':
+ *format++ = *s++;
+ if (dot) {
+ err = TRUE;
+ } else { /* value before '.' is the width */
+ dot = TRUE;
+ my_width = value;
+ }
+ value = 0;
+ break;
+ case '#':
+ *format++ = *s++;
+ break;
+ case ' ':
+ *format++ = *s++;
+ break;
+ case ':':
+ s++;
+ allowminus = TRUE;
+ break;
+ case '-':
+ if (allowminus) {
+ *format++ = *s++;
+ } else {
+ done = TRUE;
+ }
+ break;
+ default:
+ if (isdigit(UChar(*s))) {
+ value = (value * 10) + (*s - '0');
+ if (value > 10000)
+ err = TRUE;
+ *format++ = *s++;
+ } else {
+ done = TRUE;
+ }
+ }
+ }
+
+ /*
+ * If we found an error, ignore (and remove) the flags.
+ */
+ if (err) {
+ my_width = my_prec = value = 0;
+ format = fmt;
+ *format++ = '%';
+ *format++ = *s;
+ }
+
+ /*
+ * Any value after '.' is the precision. If we did not see '.', then
+ * the value is the width.
+ */
+ if (dot)
+ my_prec = value;
+ else
+ my_width = value;
+
+ *format = '\0';
+ /* return maximum string length in print */
+ *len = (my_width > my_prec) ? my_width : my_prec;
+ }
+ return s;
+}
+
+#define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
+#define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
+
+/*
+ * Analyze the string to see how many parameters we need from the varargs list,
+ * and what their types are. We will only accept string parameters if they
+ * appear as a %l or %s format following an explicit parameter reference (e.g.,
+ * %p2%s). All other parameters are numbers.
+ *
+ * 'number' counts coarsely the number of pop's we see in the string, and
+ * 'popcount' shows the highest parameter number in the string. We would like
+ * to simply use the latter count, but if we are reading termcap strings, there
+ * may be cases that we cannot see the explicit parameter numbers.
+ */
+NCURSES_EXPORT(int)
+_nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount)
+{
+ size_t len2;
+ int i;
+ int lastpop = -1;
+ int len;
+ int number = 0;
+ const char *cp = string;
+ static char dummy[] = "";
+
+ if (cp == 0)
+ return 0;
+
+ if ((len2 = strlen(cp)) > fmt_size) {
+ fmt_size = len2 + fmt_size + 2;
+ if ((fmt_buff = typeRealloc(char, fmt_size, fmt_buff)) == 0)
+ return 0;
+ }
+
+ memset(p_is_s, 0, sizeof(p_is_s[0]) * NUM_PARM);
+ *popcount = 0;
+
+ while ((cp - string) < (int) len2) {
+ if (*cp == '%') {
+ cp++;
+ cp = parse_format(cp, fmt_buff, &len);
+ switch (*cp) {
+ default:
+ break;
+
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 'c': /* FALLTHRU */
+ if (lastpop <= 0)
+ number++;
+ lastpop = -1;
+ break;
+
+ case 'l':
+ case 's':
+ if (lastpop > 0)
+ p_is_s[lastpop - 1] = dummy;
+ ++number;
+ break;
+
+ case 'p':
+ cp++;
+ i = (UChar(*cp) - '0');
+ if (i >= 0 && i <= NUM_PARM) {
+ lastpop = i;
+ if (lastpop > *popcount)
+ *popcount = lastpop;
+ }
+ break;
+
+ case 'P':
+ ++number;
+ ++cp;
+ break;
+
+ case 'g':
+ cp++;
+ break;
+
+ case S_QUOTE:
+ cp += 2;
+ lastpop = -1;
+ break;
+
+ case L_BRACE:
+ cp++;
+ while (isdigit(UChar(*cp))) {
+ cp++;
+ }
+ break;
+
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case 'm':
+ case 'A':
+ case 'O':
+ case '&':
+ case '|':
+ case '^':
+ case '=':
+ case '<':
+ case '>':
+ lastpop = -1;
+ number += 2;
+ break;
+
+ case '!':
+ case '~':
+ lastpop = -1;
+ ++number;
+ break;
+
+ case 'i':
+ /* will add 1 to first (usually two) parameters */
+ break;
+ }
+ }
+ if (*cp != '\0')
+ cp++;
+ }
+
+ if (number > NUM_PARM)
+ number = NUM_PARM;
+ return number;
+}
+
+static inline char *
+tparam_internal(const char *string, va_list ap)
+{
+#define NUM_VARS 26
+ char *p_is_s[NUM_PARM];
+ long param[NUM_PARM];
+ int popcount;
+ int number;
+ int len;
+ int level;
+ int x, y;
+ int i;
+ const char *cp = string;
+ size_t len2;
+ static int dynamic_var[NUM_VARS];
+ static int static_vars[NUM_VARS];
+
+ if (cp == NULL)
+ return NULL;
+
+ out_used = 0;
+ len2 = strlen(cp);
+
+ /*
+ * Find the highest parameter-number referred to in the format string.
+ * Use this value to limit the number of arguments copied from the
+ * variable-length argument list.
+ */
+ number = _nc_tparm_analyze(cp, p_is_s, &popcount);
+ if (fmt_buff == 0)
+ return NULL;
+
+ for (i = 0; i < max(popcount, number); i++) {
+ /*
+ * A few caps (such as plab_norm) have string-valued parms.
+ * We'll have to assume that the caller knows the difference, since
+ * a char* and an int may not be the same size on the stack. The
+ * normal prototype for this uses 9 long's, which is consistent with
+ * our va_arg() usage.
+ */
+ if (p_is_s[i] != 0) {
+ p_is_s[i] = va_arg(ap, char *);
+ } else {
+ param[i] = va_arg(ap, long int);
+ }
+ }
+
+ /*
+ * This is a termcap compatibility hack. If there are no explicit pop
+ * operations in the string, load the stack in such a way that
+ * successive pops will grab successive parameters. That will make
+ * the expansion of (for example) \E[%d;%dH work correctly in termcap
+ * style, which means tparam() will expand termcap strings OK.
+ */
+ stack_ptr = 0;
+ if (popcount == 0) {
+ popcount = number;
+ for (i = number - 1; i >= 0; i--)
+ npush(param[i]);
+ }
+#ifdef TRACE
+ if (_nc_tracing & TRACE_CALLS) {
+ for (i = 0; i < popcount; i++) {
+ if (p_is_s[i] != 0)
+ save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
+ else
+ save_number(", %d", param[i], 0);
+ }
+ _tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(cp), out_buff);
+ out_used = 0;
+ }
+#endif /* TRACE */
+
+ while ((cp - string) < (int) len2) {
+ if (*cp != '%') {
+ save_char(UChar(*cp));
+ } else {
+ tparam_base = cp++;
+ cp = parse_format(cp, fmt_buff, &len);
+ switch (*cp) {
+ default:
+ break;
+ case '%':
+ save_char('%');
+ break;
+
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ save_number(fmt_buff, npop(), len);
+ break;
+
+ case 'c': /* FALLTHRU */
+ save_char(npop());
+ break;
+
+ case 'l':
+ save_number("%d", (int) strlen(spop()), 0);
+ break;
+
+ case 's':
+ save_text(fmt_buff, spop(), len);
+ break;
+
+ case 'p':
+ cp++;
+ i = (UChar(*cp) - '1');
+ if (i >= 0 && i < NUM_PARM) {
+ if (p_is_s[i])
+ spush(p_is_s[i]);
+ else
+ npush(param[i]);
+ }
+ break;
+
+ case 'P':
+ cp++;
+ if (isUPPER(*cp)) {
+ i = (UChar(*cp) - 'A');
+ static_vars[i] = npop();
+ } else if (isLOWER(*cp)) {
+ i = (UChar(*cp) - 'a');
+ dynamic_var[i] = npop();
+ }
+ break;
+
+ case 'g':
+ cp++;
+ if (isUPPER(*cp)) {
+ i = (UChar(*cp) - 'A');
+ npush(static_vars[i]);
+ } else if (isLOWER(*cp)) {
+ i = (UChar(*cp) - 'a');
+ npush(dynamic_var[i]);
+ }
+ break;
+
+ case S_QUOTE:
+ cp++;
+ npush(UChar(*cp));
+ cp++;
+ break;
+
+ case L_BRACE:
+ number = 0;
+ cp++;
+ while (isdigit(UChar(*cp))) {
+ number = (number * 10) + (UChar(*cp) - '0');
+ cp++;
+ }
+ npush(number);
+ break;
+
+ case '+':
+ npush(npop() + npop());
+ break;
+
+ case '-':
+ y = npop();
+ x = npop();
+ npush(x - y);
+ break;
+
+ case '*':
+ npush(npop() * npop());
+ break;
+
+ case '/':
+ y = npop();
+ x = npop();
+ npush(y ? (x / y) : 0);
+ break;
+
+ case 'm':
+ y = npop();
+ x = npop();
+ npush(y ? (x % y) : 0);
+ break;
+
+ case 'A':
+ npush(npop() && npop());
+ break;
+
+ case 'O':
+ npush(npop() || npop());
+ break;
+
+ case '&':
+ npush(npop() & npop());
+ break;
+
+ case '|':
+ npush(npop() | npop());
+ break;
+
+ case '^':
+ npush(npop() ^ npop());
+ break;
+
+ case '=':
+ y = npop();
+ x = npop();
+ npush(x == y);
+ break;
+
+ case '<':
+ y = npop();
+ x = npop();
+ npush(x < y);
+ break;
+
+ case '>':
+ y = npop();
+ x = npop();
+ npush(x > y);
+ break;
+
+ case '!':
+ npush(!npop());
+ break;
+
+ case '~':
+ npush(~npop());
+ break;
+
+ case 'i':
+ if (p_is_s[0] == 0)
+ param[0]++;
+ if (p_is_s[1] == 0)
+ param[1]++;
+ break;
+
+ case '?':
+ break;
+
+ case 't':
+ x = npop();
+ if (!x) {
+ /* scan forward for %e or %; at level zero */
+ cp++;
+ level = 0;
+ while (*cp) {
+ if (*cp == '%') {
+ cp++;
+ if (*cp == '?')
+ level++;
+ else if (*cp == ';') {
+ if (level > 0)
+ level--;
+ else
+ break;
+ } else if (*cp == 'e' && level == 0)
+ break;
+ }
+
+ if (*cp)
+ cp++;
+ }
+ }
+ break;
+
+ case 'e':
+ /* scan forward for a %; at level zero */
+ cp++;
+ level = 0;
+ while (*cp) {
+ if (*cp == '%') {
+ cp++;
+ if (*cp == '?')
+ level++;
+ else if (*cp == ';') {
+ if (level > 0)
+ level--;
+ else
+ break;
+ }
+ }
+
+ if (*cp)
+ cp++;
+ }
+ break;
+
+ case ';':
+ break;
+
+ } /* endswitch (*cp) */
+ } /* endelse (*cp == '%') */
+
+ if (*cp == '\0')
+ break;
+
+ cp++;
+ } /* endwhile (*cp) */
+
+ get_space(1);
+ out_buff[out_used] = '\0';
+
+ T((T_RETURN("%s"), _nc_visbuf(out_buff)));
+ return (out_buff);
+}
+
+NCURSES_EXPORT(char *)
+tparm(NCURSES_CONST char *string,...)
+{
+ va_list ap;
+ char *result;
+
+ _nc_tparm_err = 0;
+ va_start(ap, string);
+#ifdef TRACE
+ tname = "tparm";
+#endif /* TRACE */
+ result = tparam_internal(string, ap);
+ va_end(ap);
+ return result;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_tputs.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_tputs.c
new file mode 100644
index 00000000000..3a18ffd7404
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_tputs.c
@@ -0,0 +1,257 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * tputs.c
+ * delay_output()
+ * _nc_outch()
+ * tputs()
+ *
+ */
+
+#include <curses.priv.h>
+#include <ctype.h>
+#include <term.h> /* padding_baud_rate, xon_xoff */
+#include <termcap.h> /* ospeed */
+#include <tic.h>
+
+MODULE_ID("$Id: lib_tputs.c,v 1.62 2003/08/23 21:39:20 tom Exp $")
+
+NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
+NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
+
+NCURSES_EXPORT_VAR(int) _nc_nulls_sent = 0; /* used by 'tack' program */
+
+static int (*my_outch) (int c) = _nc_outch;
+
+NCURSES_EXPORT(int)
+delay_output(int ms)
+{
+ T((T_CALLED("delay_output(%d)"), ms));
+
+ if (no_pad_char) {
+ _nc_flush();
+ napms(ms);
+ } else {
+ register int nullcount;
+
+ nullcount = (ms * _nc_baudrate(ospeed)) / (BAUDBYTE * 1000);
+ for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--)
+ my_outch(PC);
+ if (my_outch == _nc_outch)
+ _nc_flush();
+ }
+
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(void)
+_nc_flush(void)
+{
+ (void) fflush(NC_OUTPUT);
+}
+
+NCURSES_EXPORT(int)
+_nc_outch(int ch)
+{
+ TRACE_OUTCHARS(1);
+
+ 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;
+}
+
+NCURSES_EXPORT(int)
+putp(const char *string)
+{
+ return tputs(string, 1, _nc_outch);
+}
+
+NCURSES_EXPORT(int)
+tputs(const char *string, int affcnt, int (*outc) (int))
+{
+ bool always_delay;
+ bool normal_delay;
+ int number;
+#if BSD_TPUTS
+ 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) {
+ _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 NCURSES_NO_PADDING
+ && (SP == 0 || !(SP->_no_padding))
+#endif
+ && (_nc_baudrate(ospeed) >= padding_baud_rate);
+ }
+
+#if 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(UChar(*string))) {
+ while (isdigit(UChar(*string))) {
+ trailpad = trailpad * 10 + (*string - '0');
+ string++;
+ }
+ trailpad *= 10;
+ if (*string == '.') {
+ string++;
+ if (isdigit(UChar(*string))) {
+ trailpad += (*string - '0');
+ string++;
+ }
+ while (isdigit(UChar(*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(UChar(*string)) && *string != '.')
+ || !strchr(string, '>')) {
+ (*outc) ('$');
+ (*outc) ('<');
+ continue;
+ }
+
+ number = 0;
+ while (isdigit(UChar(*string))) {
+ number = number * 10 + (*string - '0');
+ string++;
+ }
+ number *= 10;
+ if (*string == '.') {
+ string++;
+ if (isdigit(UChar(*string))) {
+ number += (*string - '0');
+ string++;
+ }
+ while (isdigit(UChar(*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;
+
+ string++;
+ }
+
+#if BSD_TPUTS
+ /*
+ * 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;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/lib_ttyflags.c b/Build/source/libs/ncurses/ncurses/tinfo/lib_ttyflags.c
new file mode 100644
index 00000000000..ab9c004536a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/lib_ttyflags.c
@@ -0,0 +1,178 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+ * def_prog_mode()
+ * def_shell_mode()
+ * reset_prog_mode()
+ * reset_shell_mode()
+ * savetty()
+ * resetty()
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* cur_term */
+
+MODULE_ID("$Id: lib_ttyflags.c,v 1.11 2003/05/17 23:50:37 tom Exp $")
+
+#undef tabs
+
+#ifdef TAB3
+# define tabs TAB3
+#else
+# ifdef XTABS
+# define tabs XTABS
+# else
+# ifdef OXTABS
+# define tabs OXTABS
+# else
+# define tabs 0
+# endif
+# endif
+#endif
+
+NCURSES_EXPORT(int)
+_nc_get_tty_mode(TTY * buf)
+{
+ if (cur_term == 0
+ || GET_TTY(cur_term->Filedes, buf) != 0) {
+ memset(buf, 0, sizeof(*buf));
+ return (ERR);
+ }
+ TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
+ cur_term->Filedes, _nc_trace_ttymode(buf)));
+ return (OK);
+}
+
+NCURSES_EXPORT(int)
+_nc_set_tty_mode(TTY * buf)
+{
+ if (cur_term == 0
+ || SET_TTY(cur_term->Filedes, buf) != 0) {
+ if ((errno == ENOTTY) && (SP != 0))
+ SP->_notty = TRUE;
+ return (ERR);
+ }
+ TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
+ cur_term->Filedes, _nc_trace_ttymode(buf)));
+ return (OK);
+}
+
+NCURSES_EXPORT(int)
+def_shell_mode(void)
+{
+ T((T_CALLED("def_shell_mode()")));
+
+ /*
+ * Turn off the XTABS bit in the tty structure if it was on. If XTABS
+ * was on, remove the tab and backtab capabilities.
+ */
+
+ if (_nc_get_tty_mode(&cur_term->Ottyb) != OK)
+ returnCode(ERR);
+#ifdef TERMIOS
+ if (cur_term->Ottyb.c_oflag & tabs)
+ tab = back_tab = NULL;
+#else
+ if (cur_term->Ottyb.sg_flags & XTABS)
+ tab = back_tab = NULL;
+#endif
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+def_prog_mode(void)
+{
+ T((T_CALLED("def_prog_mode()")));
+
+ if (_nc_get_tty_mode(&cur_term->Nttyb) != OK)
+ returnCode(ERR);
+#ifdef TERMIOS
+ cur_term->Nttyb.c_oflag &= ~tabs;
+#else
+ cur_term->Nttyb.sg_flags &= ~XTABS;
+#endif
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+reset_prog_mode(void)
+{
+ T((T_CALLED("reset_prog_mode()")));
+
+ if (cur_term != 0) {
+ if (_nc_set_tty_mode(&cur_term->Nttyb) == OK) {
+ if (SP) {
+ if (SP->_keypad_on)
+ _nc_keypad(TRUE);
+ NC_BUFFERED(TRUE);
+ }
+ returnCode(OK);
+ }
+ }
+ returnCode(ERR);
+}
+
+NCURSES_EXPORT(int)
+reset_shell_mode(void)
+{
+ T((T_CALLED("reset_shell_mode()")));
+
+ if (cur_term != 0) {
+ if (SP) {
+ _nc_keypad(FALSE);
+ _nc_flush();
+ NC_BUFFERED(FALSE);
+ }
+ returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
+ }
+ returnCode(ERR);
+}
+
+/*
+** savetty() and resetty()
+**
+*/
+
+static TTY buf;
+
+NCURSES_EXPORT(int)
+savetty(void)
+{
+ T((T_CALLED("savetty()")));
+
+ returnCode(_nc_get_tty_mode(&buf));
+}
+
+NCURSES_EXPORT(int)
+resetty(void)
+{
+ T((T_CALLED("resetty()")));
+
+ returnCode(_nc_set_tty_mode(&buf));
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/make_keys.c b/Build/source/libs/ncurses/ncurses/tinfo/make_keys.c
new file mode 100644
index 00000000000..3c98da23e01
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/make_keys.c
@@ -0,0 +1,140 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+
+/*
+ * This replaces an awk script which translated keys.list into keys.tries by
+ * making the output show the indices into the TERMTYPE Strings array. Doing
+ * it that way lets us cut down on the size of the init_keytry() function.
+ */
+#include <curses.priv.h>
+
+MODULE_ID("$Id: make_keys.c,v 1.10 2000/12/10 02:55:08 tom Exp $")
+
+#include <names.c>
+
+#define UNKNOWN (SIZEOF(strnames) + SIZEOF(strfnames))
+
+static size_t
+lookup(const char *name)
+{
+ size_t n;
+ bool found = FALSE;
+ for (n = 0; strnames[n] != 0; n++) {
+ if (!strcmp(name, strnames[n])) {
+ found = TRUE;
+ break;
+ }
+ }
+ if (!found) {
+ for (n = 0; strfnames[n] != 0; n++) {
+ if (!strcmp(name, strfnames[n])) {
+ found = TRUE;
+ break;
+ }
+ }
+ }
+ return found ? n : UNKNOWN;
+}
+
+static void
+make_keys(FILE * ifp, FILE * ofp)
+{
+ char buffer[BUFSIZ];
+ char from[BUFSIZ];
+ char to[BUFSIZ];
+ int maxlen = 16;
+
+ while (fgets(buffer, sizeof(buffer), ifp) != 0) {
+ if (*buffer == '#')
+ continue;
+ if (sscanf(buffer, "%s %s", to, from) == 2) {
+ int code = lookup(from);
+ if (code == UNKNOWN)
+ continue;
+ if ((int) strlen(from) > maxlen)
+ maxlen = strlen(from);
+ fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n",
+ code,
+ maxlen, maxlen,
+ to,
+ from);
+ }
+ }
+}
+
+static void
+write_list(FILE * ofp, const char **list)
+{
+ while (*list != 0)
+ fprintf(ofp, "%s\n", *list++);
+}
+
+int
+main(int argc, char *argv[])
+{
+ static const char *prefix[] =
+ {
+ "#ifndef NCU_KEYS_H",
+ "#define NCU_KEYS_H 1",
+ "",
+ "/* This file was generated by MAKE_KEYS */",
+ "",
+ "#if BROKEN_LINKER",
+ "static",
+ "#endif",
+ "struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
+ 0
+ };
+ static const char *suffix[] =
+ {
+ "\t{ 0, 0} };",
+ "",
+ "#endif /* NCU_KEYS_H */",
+ 0
+ };
+
+ write_list(stdout, prefix);
+ if (argc > 1) {
+ int n;
+ for (n = 1; n < argc; n++) {
+ FILE *fp = fopen(argv[n], "r");
+ if (fp != 0) {
+ make_keys(fp, stdout);
+ fclose(fp);
+ }
+ }
+ } else {
+ make_keys(stdin, stdout);
+ }
+ write_list(stdout, suffix);
+ return EXIT_SUCCESS;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/name_match.c b/Build/source/libs/ncurses/ncurses/tinfo/name_match.c
new file mode 100644
index 00000000000..e51d0447602
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/name_match.c
@@ -0,0 +1,107 @@
+/****************************************************************************
+ * Copyright (c) 1999-2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 <dickey@clark.net> 1999 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h>
+#include <tic.h>
+
+MODULE_ID("$Id: name_match.c,v 1.13 2004/04/17 22:11:21 tom Exp $")
+
+/*
+ * _nc_first_name(char *names)
+ *
+ * Extract the primary name from a compiled entry.
+ */
+
+NCURSES_EXPORT(char *)
+_nc_first_name(const char *const sp)
+/* get the first name from the given name list */
+{
+ static char *buf;
+ register unsigned n;
+
+#if NO_LEAKS
+ if (sp == 0) {
+ FreeAndNull(buf); /* for leak-testing */
+ return 0;
+ }
+#endif
+
+ if (buf == 0)
+ buf = typeMalloc(char, MAX_NAME_SIZE + 1);
+ for (n = 0; n < MAX_NAME_SIZE; n++) {
+ if ((buf[n] = sp[n]) == '\0'
+ || (buf[n] == '|'))
+ break;
+ }
+ buf[n] = '\0';
+ return (buf);
+}
+
+/*
+ * int _nc_name_match(namelist, name, delim)
+ *
+ * Is the given name matched in namelist?
+ */
+
+NCURSES_EXPORT(int)
+_nc_name_match(const char *const namelst, const char *const name, const char *const delim)
+{
+ const char *s, *d, *t;
+ int code, found;
+
+ if ((s = namelst) != 0) {
+ while (*s != '\0') {
+ for (d = name; *d != '\0'; d++) {
+ if (*s != *d)
+ break;
+ s++;
+ }
+ found = FALSE;
+ for (code = TRUE; *s != '\0'; code = FALSE, s++) {
+ for (t = delim; *t != '\0'; t++) {
+ if (*s == *t) {
+ found = TRUE;
+ break;
+ }
+ }
+ if (found)
+ break;
+ }
+ if (code && *d == '\0')
+ return code;
+ if (*s++ == 0)
+ break;
+ }
+ }
+ return FALSE;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/parse_entry.c b/Build/source/libs/ncurses/ncurses/tinfo/parse_entry.c
new file mode 100644
index 00000000000..781a31b0185
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/parse_entry.c
@@ -0,0 +1,986 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-2004 *
+ ****************************************************************************/
+
+/*
+ * parse_entry.c -- compile one terminfo or termcap entry
+ *
+ * Get an exact in-core representation of an entry. Don't
+ * try to resolve use or tc capabilities, that is someone
+ * else's job. Depends on the lexical analyzer to get tokens
+ * from the input stream.
+ */
+
+#define __INTERNAL_CAPS_VISIBLE
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: parse_entry.c,v 1.61 2004/05/01 21:33:25 tom Exp $")
+
+#ifdef LINT
+static short const parametrized[] =
+{0};
+#else
+#include <parametrized.h>
+#endif
+
+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 temp;
+ TERMTYPE *tp = &(entryp->tterm);
+ unsigned offset = 0;
+ unsigned actual;
+ unsigned tindex;
+ unsigned first, last, n;
+ bool found;
+
+ switch (token_type) {
+ case BOOLEAN:
+ 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;
+ 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;
+ offset = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings;
+ tindex = tp->num_Strings;
+ break;
+ case CANCEL:
+ 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)) {
+ token_type = STRING;
+ } else if (n > tp->ext_Booleans) {
+ token_type = NUMBER;
+ } else {
+ token_type = BOOLEAN;
+ }
+ return _nc_extend_names(entryp, name, token_type);
+ }
+ }
+ /* Well, we are given a cancel for a name that we don't recognize */
+ return _nc_extend_names(entryp, name, STRING);
+ default:
+ return 0;
+ }
+
+ /* Adjust the 'offset' (insertion-point) to keep the lists of extended
+ * names sorted.
+ */
+ for (n = first, found = FALSE; n < last; n++) {
+ int cmp = strcmp(tp->ext_Names[n], name);
+ if (cmp == 0)
+ found = TRUE;
+ if (cmp >= 0) {
+ offset = n;
+ tindex = n - first;
+ switch (token_type) {
+ case BOOLEAN:
+ tindex += BOOLCOUNT;
+ break;
+ case NUMBER:
+ tindex += NUMCOUNT;
+ break;
+ case STRING:
+ tindex += STRCOUNT;
+ break;
+ }
+ break;
+ }
+ }
+ if (!found) {
+ switch (token_type) {
+ case BOOLEAN:
+ 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];
+ 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];
+ 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];
+ break;
+ }
+ actual = NUM_EXT_NAMES(tp);
+ tp->ext_Names = typeRealloc(char *, actual, tp->ext_Names);
+ while (--actual > offset)
+ 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_index = tindex;
+ temp.nte_link = -1;
+
+ return &temp;
+}
+#endif /* NCURSES_XNAMES */
+
+/*
+ * int
+ * _nc_parse_entry(entry, literal, silent)
+ *
+ * Compile one entry. Doesn't try to resolve use or tc capabilities.
+ *
+ * found-forward-use = FALSE
+ * re-initialise internal arrays
+ * get_token();
+ * if the token was not a name in column 1, complain and die
+ * save names in entry's string table
+ * while (get_token() is not EOF and not NAMES)
+ * check for existence and type-correctness
+ * enter cap into structure
+ * if STRING
+ * save string in entry's string table
+ * push back token
+ */
+
+#define BAD_TC_USAGE if (!bad_tc_usage) \
+ { bad_tc_usage = TRUE; \
+ _nc_warning("Legacy termcap allows only a trailing tc= clause"); }
+
+NCURSES_EXPORT(int)
+_nc_parse_entry(struct entry *entryp, int literal, bool silent)
+{
+ int token_type;
+ struct name_table_entry const *entry_ptr;
+ char *ptr, *base;
+ bool bad_tc_usage = FALSE;
+
+ token_type = _nc_get_token(silent);
+
+ if (token_type == EOF)
+ return (EOF);
+ if (token_type != NAMES)
+ _nc_err_abort("Entry does not start with terminal names in column one");
+
+ _nc_init_entry(&entryp->tterm);
+
+ entryp->cstart = _nc_comment_start;
+ entryp->cend = _nc_comment_end;
+ entryp->startline = _nc_start_line;
+ DEBUG(2, ("Comment range is %ld to %ld", entryp->cstart, entryp->cend));
+
+ /*
+ * Strip off the 2-character termcap name, if present. Originally termcap
+ * used that as an indexing aid. We can retain 2-character terminfo names,
+ * but note that they would be lost if we translate to/from termcap. This
+ * feature is supposedly obsolete since "newer" BSD implementations do not
+ * use it; however our reference for this feature is SunOS 4.x, which
+ * implemented it. Note that the resulting terminal type was never the
+ * 2-character name, but was instead the first alias after that.
+ */
+ ptr = _nc_curr_token.tk_name;
+ if (_nc_syntax == SYN_TERMCAP
+#if NCURSES_XNAMES
+ && !_nc_user_definable
+#endif
+ ) {
+ if (ptr[2] == '|') {
+ ptr += 3;
+ _nc_curr_token.tk_name[2] = '\0';
+ }
+ }
+
+ entryp->tterm.str_table = entryp->tterm.term_names = _nc_save_str(ptr);
+
+ DEBUG(1, ("Starting '%s'", ptr));
+
+ /*
+ * We do this because the one-token lookahead in the parse loop
+ * results in the terminal type getting prematurely set to correspond
+ * to that of the next entry.
+ */
+ _nc_set_type(_nc_first_name(entryp->tterm.term_names));
+
+ /* check for overly-long names and aliases */
+ for (base = entryp->tterm.term_names; (ptr = strchr(base, '|')) != 0;
+ base = ptr + 1) {
+ if (ptr - base > MAX_ALIAS) {
+ _nc_warning("%s `%.*s' may be too long",
+ (base == entryp->tterm.term_names)
+ ? "primary name"
+ : "alias",
+ (int) (ptr - base), base);
+ }
+ }
+
+ entryp->nuses = 0;
+
+ for (token_type = _nc_get_token(silent);
+ token_type != EOF && token_type != NAMES;
+ token_type = _nc_get_token(silent)) {
+ bool is_use = (strcmp(_nc_curr_token.tk_name, "use") == 0);
+ bool is_tc = !is_use && (strcmp(_nc_curr_token.tk_name, "tc") == 0);
+ if (is_use || is_tc) {
+ entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
+ entryp->uses[entryp->nuses].line = _nc_curr_line;
+ entryp->nuses++;
+ if (entryp->nuses > 1 && is_tc) {
+ BAD_TC_USAGE
+ }
+ } else {
+ /* normal token lookup */
+ entry_ptr = _nc_find_entry(_nc_curr_token.tk_name,
+ _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table);
+
+ /*
+ * Our kluge to handle aliasing. The reason it's done
+ * this ugly way, with a linear search, is so the hashing
+ * machinery doesn't have to be made really complicated
+ * (also we get better warnings this way). No point in
+ * making this case fast, aliased caps aren't common now
+ * and will get rarer.
+ */
+ if (entry_ptr == NOTFOUND) {
+ const struct alias *ap;
+
+ if (_nc_syntax == SYN_TERMCAP) {
+ if (entryp->nuses != 0) {
+ BAD_TC_USAGE
+ }
+ for (ap = _nc_capalias_table; ap->from; ap++)
+ if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
+ if (ap->to == (char *) 0) {
+ _nc_warning("%s (%s termcap extension) ignored",
+ 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);
+ break;
+ }
+ } 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) {
+ _nc_warning("%s (%s terminfo extension) ignored",
+ 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);
+ break;
+ }
+
+ if (entry_ptr == NOTFOUND) {
+ entry_ptr = lookup_fullname(_nc_curr_token.tk_name);
+ }
+ }
+ }
+#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) {
+ if (_nc_tracing >= DEBUG_LEVEL(1))
+ _nc_warning("extended capability '%s'", _nc_curr_token.tk_name);
+ }
+#endif /* NCURSES_XNAMES */
+
+ /* can't find this cap name, not even as an alias */
+ if (entry_ptr == NOTFOUND) {
+ if (!silent)
+ _nc_warning("unknown capability '%s'",
+ _nc_curr_token.tk_name);
+ continue;
+ }
+
+ /* deal with bad type/value combinations. */
+ 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
+ * finds the last instance in the capability table of a
+ * given name, regardless of type. find_type_entry looks
+ * for a first matching instance with given type. So as
+ * long as all ambiguous names occur in pairs of distinct
+ * type, this will do the job.
+ */
+
+ /* 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));
+
+ /* map terminfo's string MT to MT */
+ 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));
+
+ /* treat strings without following "=" as empty strings */
+ else if (token_type == BOOLEAN && entry_ptr->nte_type == STRING)
+ token_type = STRING;
+ /* we couldn't recover; skip this token */
+ else {
+ if (!silent) {
+ const char *type_name;
+ switch (entry_ptr->nte_type) {
+ case BOOLEAN:
+ type_name = "boolean";
+ break;
+ case STRING:
+ type_name = "string";
+ break;
+ case NUMBER:
+ type_name = "numeric";
+ break;
+ default:
+ type_name = "unknown";
+ break;
+ }
+ _nc_warning("wrong type used for %s capability '%s'",
+ type_name, _nc_curr_token.tk_name);
+ }
+ continue;
+ }
+ }
+
+ /* now we know that the type/value combination is OK */
+ switch (token_type) {
+ case CANCEL:
+ switch (entry_ptr->nte_type) {
+ case BOOLEAN:
+ entryp->tterm.Booleans[entry_ptr->nte_index] = CANCELLED_BOOLEAN;
+ break;
+
+ case NUMBER:
+ entryp->tterm.Numbers[entry_ptr->nte_index] = CANCELLED_NUMERIC;
+ break;
+
+ case STRING:
+ entryp->tterm.Strings[entry_ptr->nte_index] = CANCELLED_STRING;
+ break;
+ }
+ break;
+
+ case BOOLEAN:
+ entryp->tterm.Booleans[entry_ptr->nte_index] = TRUE;
+ break;
+
+ case NUMBER:
+ entryp->tterm.Numbers[entry_ptr->nte_index] =
+ _nc_curr_token.tk_valnumber;
+ break;
+
+ case STRING:
+ ptr = _nc_curr_token.tk_valstring;
+ if (_nc_syntax == SYN_TERMCAP)
+ ptr = _nc_captoinfo(_nc_curr_token.tk_name,
+ 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) ? ':' : ',');
+ continue;
+ }
+ } /* 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));
+
+ /*
+ * Try to deduce as much as possible from extension capabilities
+ * (this includes obsolete BSD capabilities). Sigh...it would be more
+ * space-efficient to call this after use resolution, but it has
+ * to be done before entry allocation is wrapped up.
+ */
+ if (!literal) {
+ if (_nc_syntax == SYN_TERMCAP) {
+ bool has_base_entry = FALSE;
+ int i;
+
+ /*
+ * Don't insert defaults if this is a `+' entry meant only
+ * for inclusion in other entries (not sure termcap ever
+ * had these, actually).
+ */
+ if (strchr(entryp->tterm.term_names, '+'))
+ has_base_entry = TRUE;
+ else
+ /*
+ * Otherwise, look for a base entry that will already
+ * have picked up defaults via translation.
+ */
+ for (i = 0; i < entryp->nuses; i++)
+ if (!strchr((char *) entryp->uses[i].name, '+'))
+ has_base_entry = TRUE;
+
+ postprocess_termcap(&entryp->tterm, has_base_entry);
+ } else
+ postprocess_terminfo(&entryp->tterm);
+ }
+ _nc_wrap_entry(entryp, FALSE);
+
+ return (OK);
+}
+
+NCURSES_EXPORT(int)
+_nc_capcmp(const char *s, const char *t)
+/* compare two string capabilities, stripping out padding */
+{
+ if (!s && !t)
+ return (0);
+ else if (!s || !t)
+ return (1);
+
+ for (;;) {
+ if (s[0] == '$' && s[1] == '<') {
+ for (s += 2;; s++)
+ if (!(isdigit(UChar(*s))
+ || *s == '.'
+ || *s == '*'
+ || *s == '/'
+ || *s == '>'))
+ break;
+ }
+
+ if (t[0] == '$' && t[1] == '<') {
+ for (t += 2;; t++)
+ if (!(isdigit(UChar(*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);
+
+ if (*s != *t)
+ return (*t - *s);
+
+ /* else *s == *t but one is not NUL, so continue */
+ s++, t++;
+ }
+}
+
+static void
+append_acs0(string_desc * dst, int code, int src)
+{
+ if (src != 0) {
+ char temp[3];
+ temp[0] = code;
+ temp[1] = src;
+ temp[2] = 0;
+ _nc_safe_strcat(dst, temp);
+ }
+}
+
+static void
+append_acs(string_desc * dst, int code, char *src)
+{
+ if (src != 0 && strlen(src) == 1) {
+ append_acs0(dst, code, *src);
+ }
+}
+
+/*
+ * The ko capability, if present, consists of a comma-separated capability
+ * 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;
+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},
+};
+
+/*
+ * This routine fills in string caps that either had defaults under
+ * termcap or can be manufactured from obsolete termcap capabilities.
+ * It was lifted from Ross Ridge's mytinfo package.
+ */
+
+static const char C_CR[] = "\r";
+static const char C_LF[] = "\n";
+static const char C_BS[] = "\b";
+static const char C_HT[] = "\t";
+
+/*
+ * Note that WANTED and PRESENT are not simple inverses! If a capability
+ * has been explicitly cancelled, it's not considered WANTED.
+ */
+#define WANTED(s) ((s) == ABSENT_STRING)
+#define PRESENT(s) (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
+
+/*
+ * This bit of legerdemain turns all the terminfo variable names into
+ * references to locations in the arrays Booleans, Numbers, and Strings ---
+ * precisely what's needed.
+ */
+
+#undef CUR
+#define CUR tp->
+
+static void
+postprocess_termcap(TERMTYPE * tp, bool has_base)
+{
+ char buf[MAX_LINE * 2 + 2];
+ string_desc result;
+
+ /*
+ * TERMCAP DEFAULTS AND OBSOLETE-CAPABILITY TRANSLATIONS
+ *
+ * This first part of the code is the functional inverse of the
+ * fragment in capdefaults.c.
+ * ----------------------------------------------------------------------
+ */
+
+ /* if there was a tc entry, assume we picked up defaults via that */
+ if (!has_base) {
+ if (WANTED(init_3string) && termcap_init2)
+ init_3string = _nc_save_str(termcap_init2);
+
+ if (WANTED(reset_2string) && termcap_reset)
+ reset_2string = _nc_save_str(termcap_reset);
+
+ if (WANTED(carriage_return)) {
+ if (carriage_return_delay > 0) {
+ sprintf(buf, "%s$<%d>", C_CR, carriage_return_delay);
+ carriage_return = _nc_save_str(buf);
+ } else
+ carriage_return = _nc_save_str(C_CR);
+ }
+ if (WANTED(cursor_left)) {
+ if (backspace_delay > 0) {
+ sprintf(buf, "%s$<%d>", C_BS, backspace_delay);
+ cursor_left = _nc_save_str(buf);
+ } else if (backspaces_with_bs == 1)
+ cursor_left = _nc_save_str(C_BS);
+ else if (PRESENT(backspace_if_not_bs))
+ cursor_left = backspace_if_not_bs;
+ }
+ /* vi doesn't use "do", but it does seems to use nl (or '\n') instead */
+ if (WANTED(cursor_down)) {
+ if (PRESENT(linefeed_if_not_lf))
+ cursor_down = linefeed_if_not_lf;
+ else if (linefeed_is_newline != 1) {
+ if (new_line_delay > 0) {
+ sprintf(buf, "%s$<%d>", C_LF, new_line_delay);
+ cursor_down = _nc_save_str(buf);
+ } else
+ cursor_down = _nc_save_str(C_LF);
+ }
+ }
+ if (WANTED(scroll_forward) && crt_no_scrolling != 1) {
+ if (PRESENT(linefeed_if_not_lf))
+ cursor_down = linefeed_if_not_lf;
+ else if (linefeed_is_newline != 1) {
+ if (new_line_delay > 0) {
+ sprintf(buf, "%s$<%d>", C_LF, new_line_delay);
+ scroll_forward = _nc_save_str(buf);
+ } else
+ scroll_forward = _nc_save_str(C_LF);
+ }
+ }
+ if (WANTED(newline)) {
+ if (linefeed_is_newline == 1) {
+ if (new_line_delay > 0) {
+ sprintf(buf, "%s$<%d>", C_LF, new_line_delay);
+ newline = _nc_save_str(buf);
+ } else
+ newline = _nc_save_str(C_LF);
+ } else if (PRESENT(carriage_return) && PRESENT(scroll_forward)) {
+ _nc_str_init(&result, buf, sizeof(buf));
+ if (_nc_safe_strcat(&result, carriage_return)
+ && _nc_safe_strcat(&result, scroll_forward))
+ newline = _nc_save_str(buf);
+ } else if (PRESENT(carriage_return) && PRESENT(cursor_down)) {
+ _nc_str_init(&result, buf, sizeof(buf));
+ if (_nc_safe_strcat(&result, carriage_return)
+ && _nc_safe_strcat(&result, cursor_down))
+ newline = _nc_save_str(buf);
+ }
+ }
+ }
+
+ /*
+ * Inverse of capdefaults.c code ends here.
+ * ----------------------------------------------------------------------
+ *
+ * TERMCAP-TO TERMINFO MAPPINGS FOR SOURCE TRANSLATION
+ *
+ * These translations will *not* be inverted by tgetent().
+ */
+
+ 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
+ * space allocated for it is wasted.
+ */
+ if (return_does_clr_eol == 1 || no_correctly_working_cr == 1)
+ carriage_return = ABSENT_STRING;
+
+ /*
+ * Supposedly most termcap entries have ta now and '\t' is no longer a
+ * default, but it doesn't seem to be true...
+ */
+ if (WANTED(tab)) {
+ if (horizontal_tab_delay > 0) {
+ sprintf(buf, "%s$<%d>", C_HT, horizontal_tab_delay);
+ tab = _nc_save_str(buf);
+ } else
+ tab = _nc_save_str(C_HT);
+ }
+ if (init_tabs == ABSENT_NUMERIC && has_hardware_tabs == TRUE)
+ init_tabs = 8;
+
+ /*
+ * Assume we can beep with ^G unless we're given bl@.
+ */
+ if (WANTED(bell))
+ bell = _nc_save_str("\007");
+ }
+
+ /*
+ * Translate the old termcap :pt: capability to it#8 + ht=\t
+ */
+ 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 {
+ if (tab && _nc_capcmp(tab, C_HT))
+ _nc_warning("hardware tabs with a non-^I tab string %s",
+ _nc_visbuf(tab));
+ else {
+ if (WANTED(tab))
+ tab = _nc_save_str(C_HT);
+ init_tabs = 8;
+ }
+ }
+ }
+ /*
+ * Now translate the ko capability, if there is one. This
+ * isn't from mytinfo...
+ */
+ if (PRESENT(other_non_function_keys)) {
+ char *base = other_non_function_keys;
+ char *bp, *cp, *dp;
+ 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');
+ foundim = (dp != 0) && (dp[1] == 'm');
+
+ /* look at each comma-separated capability in the ko string... */
+ for (base = other_non_function_keys;
+ (cp = strchr(base, ',')) != 0;
+ base = cp + 1) {
+ size_t len = cp - base;
+
+ for (ap = ko_xlate; ap->from; ap++)
+ if (len == strlen(ap->from)
+ && strncmp(ap->from, base, len) == 0)
+ break;
+ if (!ap->to) {
+ _nc_warning("unknown capability `%.*s' in ko string",
+ (int) len, base);
+ continue;
+ } 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);
+
+ 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])) {
+ _nc_warning("no value for ko capability %s", ap->from);
+ continue;
+ }
+
+ 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.
+ */
+ if (strcmp(
+ 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]));
+ continue;
+ }
+
+ /*
+ * The magic moment -- copy the mapped key string over,
+ * stripping out padding.
+ */
+ for (dp = buf2, bp = tp->Strings[from_ptr->nte_index]; *bp; bp++) {
+ if (bp[0] == '$' && bp[1] == '<') {
+ while (*bp && *bp != '>') {
+ ++bp;
+ }
+ } else
+ *dp++ = *bp;
+ }
+ *dp++ = '\0';
+
+ tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
+ }
+
+ /*
+ * Note: ko=im and ko=ic both want to grab the `Insert'
+ * keycap. There's a kich1 but no ksmir, so the ic capability
+ * 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) {
+ key_ic = key_sic;
+ key_sic = ABSENT_STRING;
+ }
+ }
+
+ if (!has_base) {
+ if (!hard_copy) {
+ if (WANTED(key_backspace))
+ key_backspace = _nc_save_str(C_BS);
+ if (WANTED(key_left))
+ key_left = _nc_save_str(C_BS);
+ if (WANTED(key_down))
+ key_down = _nc_save_str(C_LF);
+ }
+ }
+
+ /*
+ * Translate XENIX forms characters.
+ */
+ if (PRESENT(acs_ulcorner) ||
+ PRESENT(acs_llcorner) ||
+ PRESENT(acs_urcorner) ||
+ PRESENT(acs_lrcorner) ||
+ PRESENT(acs_ltee) ||
+ PRESENT(acs_rtee) ||
+ PRESENT(acs_btee) ||
+ PRESENT(acs_ttee) ||
+ PRESENT(acs_hline) ||
+ PRESENT(acs_vline) ||
+ PRESENT(acs_plus)) {
+ char buf2[MAX_TERMCAP_LENGTH];
+
+ _nc_str_init(&result, buf2, sizeof(buf2));
+ _nc_safe_strcat(&result, acs_chars);
+
+ append_acs(&result, 'j', acs_lrcorner);
+ append_acs(&result, 'k', acs_urcorner);
+ append_acs(&result, 'l', acs_ulcorner);
+ append_acs(&result, 'm', acs_llcorner);
+ append_acs(&result, 'n', acs_plus);
+ append_acs(&result, 'q', acs_hline);
+ append_acs(&result, 't', acs_ltee);
+ append_acs(&result, 'u', acs_rtee);
+ append_acs(&result, 'v', acs_btee);
+ append_acs(&result, 'w', acs_ttee);
+ append_acs(&result, 'x', acs_vline);
+
+ if (buf2[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(VT_ACSC);
+ }
+}
+
+static void
+postprocess_terminfo(TERMTYPE * tp)
+{
+ /*
+ * TERMINFO-TO-TERMINFO MAPPINGS FOR SOURCE TRANSLATION
+ * ----------------------------------------------------------------------
+ */
+
+ /*
+ * Translate AIX forms characters.
+ */
+ if (PRESENT(box_chars_1)) {
+ char buf2[MAX_TERMCAP_LENGTH];
+ string_desc result;
+
+ _nc_str_init(&result, buf2, sizeof(buf2));
+ _nc_safe_strcat(&result, acs_chars);
+
+ append_acs0(&result, 'l', box_chars_1[0]); /* ACS_ULCORNER */
+ append_acs0(&result, 'q', box_chars_1[1]); /* ACS_HLINE */
+ append_acs0(&result, 'k', box_chars_1[2]); /* ACS_URCORNER */
+ append_acs0(&result, 'x', box_chars_1[3]); /* ACS_VLINE */
+ append_acs0(&result, 'j', box_chars_1[4]); /* ACS_LRCORNER */
+ append_acs0(&result, 'm', box_chars_1[5]); /* ACS_LLCORNER */
+ append_acs0(&result, 'w', box_chars_1[6]); /* ACS_TTEE */
+ append_acs0(&result, 'u', box_chars_1[7]); /* ACS_RTEE */
+ append_acs0(&result, 'v', box_chars_1[8]); /* ACS_BTEE */
+ append_acs0(&result, 't', box_chars_1[9]); /* ACS_LTEE */
+ append_acs0(&result, 'n', box_chars_1[10]); /* ACS_PLUS */
+
+ if (buf2[0]) {
+ acs_chars = _nc_save_str(buf2);
+ _nc_warning("acsc string synthesized from AIX capabilities");
+ box_chars_1 = ABSENT_STRING;
+ }
+ }
+ /*
+ * ----------------------------------------------------------------------
+ */
+}
+
+/*
+ * Do a linear search through the terminfo tables to find a given full-name.
+ * We don't expect to do this often, so there's no hashing function.
+ *
+ * In effect, this scans through the 3 lists of full-names, and looks them
+ * up in _nc_info_table, which is organized so that the nte_index fields are
+ * sorted, but the nte_type fields are not necessarily grouped together.
+ */
+static struct name_table_entry const *
+lookup_fullname(const char *find)
+{
+ int state = -1;
+
+ for (;;) {
+ int count = 0;
+ NCURSES_CONST char *const *names;
+
+ switch (++state) {
+ case BOOLEAN:
+ names = boolfnames;
+ break;
+ case STRING:
+ names = strfnames;
+ break;
+ case NUMBER:
+ names = numfnames;
+ break;
+ default:
+ return NOTFOUND;
+ }
+
+ 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
+ || entry_ptr->nte_index != count)
+ entry_ptr++;
+ return entry_ptr;
+ }
+ }
+ }
+}
+
+/* parse_entry.c ends here */
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/read_entry.c b/Build/source/libs/ncurses/ncurses/tinfo/read_entry.c
new file mode 100644
index 00000000000..d237d005c44
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/read_entry.c
@@ -0,0 +1,517 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey *
+ ****************************************************************************/
+
+/*
+ * read_entry.c -- Routine for reading in a compiled terminfo file
+ *
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: read_entry.c,v 1.80 2004/09/25 23:00:25 tom Exp $")
+
+#if !HAVE_TELL
+#define tell(fd) lseek(fd, 0, SEEK_CUR) /* lseek() is POSIX, but not tell() */
+#endif
+
+#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
+
+/*
+ * int
+ * _nc_read_file_entry(filename, ptr)
+ *
+ * Read the compiled terminfo entry in the given file into the
+ * structure pointed to by ptr, allocating space for the string
+ * table.
+ */
+
+#undef BYTE
+#define BYTE(p,n) (unsigned char)((p)[n])
+
+#define IS_NEG1(p) ((BYTE(p,0) == 0377) && (BYTE(p,1) == 0377))
+#define IS_NEG2(p) ((BYTE(p,0) == 0376) && (BYTE(p,1) == 0377))
+#define LOW_MSB(p) (BYTE(p,0) + 256*BYTE(p,1))
+
+static bool have_tic_directory = FALSE;
+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.
+ */
+NCURSES_EXPORT(const char *)
+_nc_tic_dir(const char *path)
+{
+ static const char *result = TERMINFO;
+
+ if (!keep_tic_directory) {
+ if (path != 0) {
+ result = path;
+ have_tic_directory = TRUE;
+ } else if (!have_tic_directory && use_terminfo_vars()) {
+ char *envp;
+ if ((envp = getenv("TERMINFO")) != 0)
+ return _nc_tic_dir(envp);
+ }
+ }
+ return result;
+}
+
+/*
+ * Special fix to prevent the terminfo directory from being moved after tic
+ * 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.
+ */
+NCURSES_EXPORT(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)
+{
+ int i;
+ for (i = 0; i < count; i++) {
+ if (IS_NEG1(buf + 2 * i))
+ Numbers[i] = ABSENT_NUMERIC;
+ else if (IS_NEG2(buf + 2 * i))
+ Numbers[i] = CANCELLED_NUMERIC;
+ else
+ 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)
+{
+ int i;
+ char *p;
+
+ for (i = 0; i < count; i++) {
+ if (IS_NEG1(buf + 2 * i)) {
+ Strings[i] = ABSENT_STRING;
+ } else if (IS_NEG2(buf + 2 * i)) {
+ Strings[i] = CANCELLED_STRING;
+ } else if (LOW_MSB(buf + 2 * i) > size) {
+ Strings[i] = ABSENT_STRING;
+ } else {
+ 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 */
+ if (VALID_STRING(Strings[i])) {
+ for (p = Strings[i]; p <= table + size; p++)
+ if (*p == '\0')
+ break;
+ /* if there is no NUL, ignore the string */
+ if (p > table + size)
+ Strings[i] = ABSENT_STRING;
+ }
+ }
+}
+
+#define read_shorts(fd, buf, count) \
+ (read(fd, buf, (unsigned) (count)*2) == (int) (count)*2)
+
+#define even_boundary(value) \
+ if ((value) % 2 != 0) read(fd, buf, 1)
+
+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 + 1];
+ unsigned want, have;
+
+ TR(TRACE_DATABASE, ("READ termtype header @%ld", (long) tell(fd)));
+
+ memset(ptr, 0, sizeof(*ptr));
+
+ /* grab the header */
+ if (!read_shorts(fd, buf, 6)
+ || LOW_MSB(buf) != MAGIC) {
+ return (0);
+ }
+
+ 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);
+
+ 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);
+ }
+ } else {
+ str_count = 0;
+ }
+
+ /* grab the name (a null-terminated string) */
+ want = min(MAX_NAME_SIZE, (unsigned) name_size);
+ if ((have = read(fd, buf, want)) != want) {
+ memset(buf + have, 0, want - have);
+ }
+ buf[want] = '\0';
+ ptr->term_names = TYPE_CALLOC(char, strlen(buf) + 1);
+ if (ptr->term_names == NULL) {
+ return (0);
+ }
+ (void) strcpy(ptr->term_names, buf);
+ if (have > MAX_NAME_SIZE)
+ lseek(fd, (off_t) (have - MAX_NAME_SIZE), 1);
+
+ /* grab the booleans */
+ if ((ptr->Booleans = TYPE_CALLOC(char, max(BOOLCOUNT, bool_count))) == 0
+ || read(fd, ptr->Booleans, (unsigned) bool_count) < bool_count) {
+ return (0);
+ }
+
+ /*
+ * If booleans end on an odd byte, skip it. The machine they
+ * originally wrote terminfo on must have been a 16-bit
+ * word-oriented machine that would trap out if you tried a
+ * word access off a 2-byte boundary.
+ */
+ even_boundary(name_size + bool_count);
+
+ /* grab the numbers */
+ if ((ptr->Numbers = TYPE_CALLOC(short, max(NUMCOUNT, num_count))) == 0
+ || !read_shorts(fd, buf, num_count)) {
+ return (0);
+ }
+ convert_shorts(buf, ptr->Numbers, num_count);
+
+ if ((ptr->Strings = TYPE_CALLOC(char *, max(STRCOUNT, str_count))) == 0)
+ return (0);
+
+ if (str_count) {
+ /* grab the string offsets */
+ if (!read_shorts(fd, buf, str_count)) {
+ return (0);
+ }
+ /* finally, grab the string table itself */
+ 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;
+
+ /*
+ * Read extended entries, if any, after the normal end of terminfo data.
+ */
+ even_boundary(str_size);
+ TR(TRACE_DATABASE, ("READ extended_header @%ld", (long) tell(fd)));
+ if (_nc_user_definable && read_shorts(fd, buf, 5)) {
+ int ext_bool_count = LOW_MSB(buf + 0);
+ int ext_num_count = LOW_MSB(buf + 2);
+ int ext_str_count = LOW_MSB(buf + 4);
+ int ext_str_size = LOW_MSB(buf + 6);
+ int ext_str_limit = LOW_MSB(buf + 8);
+ unsigned need = (ext_bool_count + ext_num_count + ext_str_count);
+ int base = 0;
+
+ if (need >= 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);
+
+ ptr->num_Booleans = BOOLCOUNT + ext_bool_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->Numbers = typeRealloc(short, ptr->num_Numbers, ptr->Numbers);
+ ptr->Strings = typeRealloc(char *, ptr->num_Strings, ptr->Strings);
+
+ 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));
+
+ TR(TRACE_DATABASE, ("READ %d extended-booleans @%ld",
+ ext_bool_count, (long) tell(fd)));
+ if ((ptr->ext_Booleans = ext_bool_count) != 0) {
+ if (read(fd, ptr->Booleans + BOOLCOUNT, (unsigned)
+ ext_bool_count) != ext_bool_count)
+ return (0);
+ }
+ even_boundary(ext_bool_count);
+
+ TR(TRACE_DATABASE, ("READ %d extended-numbers @%ld",
+ ext_num_count, (long) tell(fd)));
+ if ((ptr->ext_Numbers = ext_num_count) != 0) {
+ if (!read_shorts(fd, buf, ext_num_count))
+ return (0);
+ TR(TRACE_DATABASE, ("Before converting extended-numbers"));
+ convert_shorts(buf, ptr->Numbers + NUMCOUNT, ext_num_count);
+ }
+
+ TR(TRACE_DATABASE, ("READ extended-offsets @%ld", (long) tell(fd)));
+ if ((ext_str_count || need)
+ && !read_shorts(fd, buf, ext_str_count + need))
+ return (0);
+
+ TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%ld",
+ ext_str_limit, (long) tell(fd)));
+
+ if (ext_str_limit) {
+ if ((ptr->ext_str_table = typeMalloc(char, ext_str_limit)) == 0)
+ return (0);
+ if (read(fd, ptr->ext_str_table, (unsigned) ext_str_limit) != ext_str_limit)
+ return (0);
+ TR(TRACE_DATABASE, ("first extended-string is %s", _nc_visbuf(ptr->ext_str_table)));
+ }
+
+ if ((ptr->ext_Strings = ext_str_count) != 0) {
+ 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 = TYPE_CALLOC(char *, need)) == 0)
+ 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,
+ (int) 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));
+
+ 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));
+#if NCURSES_XNAMES
+ TR(TRACE_DATABASE, ("normal: num_Booleans:%d", ptr->num_Booleans));
+#endif
+ }
+
+ for (i = bool_count; i < BOOLCOUNT; i++)
+ ptr->Booleans[i] = FALSE;
+ for (i = num_count; i < NUMCOUNT; i++)
+ ptr->Numbers[i] = ABSENT_NUMERIC;
+ for (i = str_count; i < STRCOUNT; i++)
+ ptr->Strings[i] = ABSENT_STRING;
+
+ return (1);
+}
+
+NCURSES_EXPORT(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) {
+ T(("cannot open terminfo %s (errno=%d)", filename, errno));
+ code = 0;
+ } else {
+ T(("read terminfo %s", filename));
+ if ((code = read_termtype(fd, ptr)) == 0)
+ _nc_free_termtype(ptr);
+ close(fd);
+ }
+
+ return (code);
+}
+
+/*
+ * 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)
+{
+ int need = 2 + strlen(dir) + strlen(ttn);
+
+ if (need > PATH_MAX)
+ 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)
+{
+ 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 == NCURSES_PATHSEP) {
+ *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);
+}
+
+/*
+ * _nc_read_entry(char *tn, char *filename, TERMTYPE *tp)
+ *
+ * Find and read the compiled entry for a given terminal type,
+ * if it exists. We take pains here to make sure no combination
+ * of environment variables and terminal type name can be used to
+ * overrun the file buffer.
+ */
+
+NCURSES_EXPORT(int)
+_nc_read_entry(const char *const tn, char *const filename, TERMTYPE *const tp)
+{
+ char *envp;
+ char ttn[PATH_MAX];
+
+ if (strlen(tn) == 0
+ || strcmp(tn, ".") == 0
+ || strcmp(tn, "..") == 0
+ || _nc_pathlast(tn) != 0) {
+ T(("illegal or missing entry name '%s'", tn));
+ return 0;
+ }
+
+ /* truncate the terminal name to prevent buffer overflow */
+ (void) sprintf(ttn, "%c/%.*s", *tn, (int) sizeof(ttn) - 3, tn);
+
+ /* This is System V behavior, in conjunction with our requirements for
+ * writing terminfo entries.
+ */
+ if (have_tic_directory
+ && _nc_read_tic_entry(filename, _nc_tic_dir(0), ttn, tp) == 1)
+ return 1;
+
+ if (use_terminfo_vars()) {
+ if ((envp = getenv("TERMINFO")) != 0
+ && _nc_read_tic_entry(filename, _nc_tic_dir(envp), ttn, tp) == 1)
+ return 1;
+
+ /* this is an ncurses extension */
+ 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);
+ }
+
+ /* 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);
+#else
+ return _nc_read_tic_entry(filename, TERMINFO, ttn, tp);
+#endif
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/read_termcap.c b/Build/source/libs/ncurses/ncurses/tinfo/read_termcap.c
new file mode 100644
index 00000000000..64844543ba0
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/read_termcap.c
@@ -0,0 +1,1168 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * Termcap compatibility support
+ *
+ * If your OS integrator didn't install a terminfo database, you can call
+ * _nc_read_termcap_entry() to support reading and translating capabilities
+ * from the system termcap file. This is a kludge; it will bulk up and slow
+ * down every program that uses ncurses, and translated termcap entries cannot
+ * use full terminfo capabilities. Don't use it unless you absolutely have to;
+ * instead, get your system people to run tic(1) from root on the terminfo
+ * master included with ncurses to translate it into a terminfo database.
+ *
+ * If USE_GETCAP is enabled, we use what is effectively a copy of the 4.4BSD
+ * getcap code to fetch entries. There are disadvantages to this; mainly that
+ * getcap(3) does its own resolution, meaning that entries read in in this way
+ * can't reference the terminfo tree. The only thing it buys is faster startup
+ * time, getcap(3) is much faster than our tic parser.
+ */
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <tic.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: read_termcap.c,v 1.66 2004/07/05 12:55:23 tom Exp $")
+
+#if !PURE_TERMINFO
+
+#if defined(__EMX__) || defined(__DJGPP__)
+#define is_pathname(s) ((((s) != 0) && ((s)[0] == '/')) \
+ || (((s)[0] != 0) && ((s)[1] == ':')))
+#else
+#define is_pathname(s) ((s) != 0 && (s)[0] == '/')
+#endif
+
+#define TC_SUCCESS 0
+#define TC_UNRESOLVED -1
+#define TC_NOT_FOUND -2
+#define TC_SYS_ERR -3
+#define TC_REF_LOOP -4
+
+static NCURSES_CONST char *
+get_termpath(void)
+{
+ NCURSES_CONST char *result;
+
+ if (!use_terminfo_vars() || (result = getenv("TERMPATH")) == 0)
+ result = TERMPATH;
+ T(("TERMPATH is %s", result));
+ return result;
+}
+
+#if USE_GETCAP
+
+#if HAVE_BSD_CGETENT
+#define _nc_cgetcap cgetcap
+#define _nc_cgetent(buf, oline, db_array, name) cgetent(buf, db_array, name)
+#define _nc_cgetmatch cgetmatch
+#define _nc_cgetset cgetset
+#else
+static int _nc_cgetmatch(char *, const char *);
+static int _nc_getent(char **, unsigned *, int *, int, char **, int, const char
+ *, int, char *);
+static int _nc_nfcmp(const char *, char *);
+
+/*-
+ * Copyright (c) 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Casey Leedom of Lawrence Livermore National Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94"; */
+
+#define BFRAG 1024
+#define BSIZE 1024
+#define MAX_RECURSION 32 /* maximum getent recursion */
+
+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
+ * database array, in effect "pushing" the buffer on top of the virtual
+ * database. 0 is returned on success, -1 on failure.
+ */
+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);
+ return (0);
+}
+
+/*
+ * Cgetcap searches the capability record buf for the capability cap with type
+ * `type'. A pointer to the value of cap is returned on success, 0 if the
+ * requested capability couldn't be found.
+ *
+ * Specifying a type of ':' means that nothing should follow cap (:cap:). In
+ * this case a pointer to the terminating ':' or NUL will be returned if cap is
+ * found.
+ *
+ * If (cap, '@') or (cap, terminator, '@') is found before (cap, terminator)
+ * return 0.
+ */
+static char *
+_nc_cgetcap(char *buf, const char *cap, int type)
+{
+ register const char *cp;
+ register char *bp;
+
+ 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 (;;) {
+ 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);
+ }
+ /* NOTREACHED */
+}
+
+/*
+ * Cgetent extracts the capability record name from the NULL terminated file
+ * array db_array and returns a pointer to a malloc'd copy of it in buf. Buf
+ * must be retained through all subsequent calls to cgetcap, cgetnum, cgetflag,
+ * and cgetstr, but may then be freed.
+ *
+ * Returns:
+ *
+ * positive # on success (i.e., the index in db_array)
+ * TC_UNRESOLVED if we had too many recurrences to resolve
+ * TC_NOT_FOUND if the requested record couldn't be found
+ * TC_SYS_ERR if a system error was encountered (e.g.,couldn't open a file)
+ * TC_REF_LOOP if a potential reference loop is detected
+ */
+static int
+_nc_cgetent(char **buf, int *oline, char **db_array, const char *name)
+{
+ unsigned dummy;
+
+ return (_nc_getent(buf, &dummy, oline, 0, db_array, -1, name, 0, 0));
+}
+
+/*
+ * Getent implements the functions of cgetent. If fd is non-negative,
+ * *db_array has already been opened and fd is the open file descriptor. We
+ * do this to save time and avoid using up file descriptors for tc=
+ * recursions.
+ *
+ * Getent returns the same success/failure codes as cgetent. On success, a
+ * pointer to a malloc'd capability record with all tc= capabilities fully
+ * expanded and its length (not including trailing ASCII NUL) are left in
+ * *cap and *len.
+ *
+ * Basic algorithm:
+ * + Allocate memory incrementally as needed in chunks of size BFRAG
+ * for capability buffer.
+ * + Recurse for each tc=name and interpolate result. Stop when all
+ * names interpolated, a name can't be found, or depth exceeds
+ * MAX_RECURSION.
+ */
+#define DOALLOC(size) typeRealloc(char, size, record)
+static int
+_nc_getent(
+ 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);
+
+ /*
+ * 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;
+
+ /*
+ * 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 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);
+ }
+
+ /*
+ * 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;
+
+ /*
+ * 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.
+ */
+ 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);
+}
+
+/*
+ * Cgetmatch will return 0 if name is one of the names of the capability
+ * record buf, -1 if not.
+ */
+static int
+_nc_cgetmatch(char *buf, const char *name)
+{
+ register const char *np;
+ register char *bp;
+
+ /*
+ * Start search at beginning of record.
+ */
+ bp = buf;
+ 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;
+ }
+ }
+
+ /*
+ * 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 */
+ }
+ }
+}
+
+/*
+ * Compare name field of record.
+ */
+static int
+_nc_nfcmp(const char *nf, char *rec)
+{
+ char *cp, tmp;
+ int ret;
+
+ for (cp = rec; *cp != ':'; cp++) ;
+
+ tmp = *(cp + 1);
+ *(cp + 1) = '\0';
+ ret = strcmp(nf, rec);
+ *(cp + 1) = tmp;
+
+ return (ret);
+}
+#endif /* HAVE_BSD_CGETENT */
+
+/*
+ * Since ncurses provides its own 'tgetent()', we cannot use the native one.
+ * So we reproduce the logic to get down to cgetent() -- or our cut-down
+ * version of that -- to circumvent the problem of configuring against the
+ * termcap library.
+ */
+#define USE_BSD_TGETENT 1
+
+#if USE_BSD_TGETENT
+/*
+ * Copyright (c) 1980, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93" */
+
+#define PBUFSIZ 512 /* max length of filename path */
+#define PVECSIZ 32 /* max number of names in path */
+#define TBUFSIZ (2048*2)
+
+static char *tbuf;
+
+/*
+ * On entry, srcp points to a non ':' character which is the beginning of the
+ * token, if any. We'll try to return a string that doesn't end with a ':'.
+ */
+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(UChar(*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(UChar(ch))) {
+ found = TRUE;
+ }
+ }
+
+ /* malformed entry may end without a ':' */
+ if (tok == 0 && found) {
+ tok = base;
+ }
+
+ return tok;
+}
+
+static char *
+copy_tc_token(char *dst, const char *src, size_t len)
+{
+ int ch;
+
+ while ((ch = *src++) != '\0') {
+ if (ch == '\\' && *src == '\n') {
+ while (isspace(UChar(*src)))
+ src++;
+ continue;
+ }
+ if (--len == 0) {
+ dst = 0;
+ break;
+ }
+ *dst++ = ch;
+ }
+ return dst;
+}
+
+/*
+ * Get an entry for terminal name in buffer bp from the termcap file.
+ */
+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 = NULL;
+ 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 */
+ NCURSES_CONST char *termpath;
+ string_desc desc;
+
+ fname = pathvec;
+ pvec = pathvec;
+ tbuf = bp;
+ p = pathbuf;
+ cp = use_terminfo_vars()? getenv("TERMCAP") : NULL;
+
+ /*
+ * 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.
+ */
+ _nc_str_init(&desc, pathbuf, sizeof(pathbuf));
+ if (cp == NULL) {
+ _nc_safe_strcpy(&desc, get_termpath());
+ } else if (!is_pathname(cp)) { /* TERMCAP holds an entry */
+ if ((termpath = get_termpath()) != 0) {
+ _nc_safe_strcat(&desc, termpath);
+ } else {
+ char temp[PBUFSIZ];
+ temp[0] = 0;
+ if ((home = getenv("HOME")) != 0 && *home != '\0'
+ && strchr(home, ' ') == 0
+ && strlen(home) < sizeof(temp) - 10) { /* setup path */
+ sprintf(temp, "%s/", home); /* $HOME first */
+ }
+ /* if no $HOME look in current directory */
+ strcat(temp, ".termcap");
+ _nc_safe_strcat(&desc, temp);
+ _nc_safe_strcat(&desc, " ");
+ _nc_safe_strcat(&desc, get_termpath());
+ }
+ } else { /* user-defined name in TERMCAP */
+ _nc_safe_strcat(&desc, cp); /* still can be tokenized */
+ }
+
+ *fname++ = pathbuf; /* tokenize path into vector of names */
+ while (*++p) {
+ if (*p == ' ' || *p == NCURSES_PATHSEP) {
+ *p = '\0';
+ while (*++p)
+ if (*p != ' ' && *p != NCURSES_PATHSEP)
+ 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);
+ }
+ }
+
+ 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);
+}
+#endif /* USE_BSD_TGETENT */
+#endif /* USE_GETCAP */
+
+#define MAXPATHS 32
+
+/*
+ * Add a filename to the list in 'termpaths[]', checking that we really have
+ * a right to open the file.
+ */
+#if !USE_GETCAP
+static int
+add_tc(char *termpaths[], char *path, int count)
+{
+ char *save = strchr(path, NCURSES_PATHSEP);
+ if (save != 0)
+ *save = '\0';
+ if (count < MAXPATHS
+ && _nc_access(path, R_OK) == 0) {
+ termpaths[count++] = path;
+ T(("Adding termpath %s", path));
+ }
+ termpaths[count] = 0;
+ if (save != 0)
+ *save = NCURSES_PATHSEP;
+ return count;
+}
+#define ADD_TC(path, count) filecount = add_tc(termpaths, path, count)
+#endif /* !USE_GETCAP */
+
+NCURSES_EXPORT(int)
+_nc_read_termcap_entry(const char *const tn, TERMTYPE *const tp)
+{
+ int found = FALSE;
+ ENTRY *ep;
+#if USE_GETCAP_CACHE
+ char cwd_buf[PATH_MAX];
+#endif
+#if USE_GETCAP
+ char *p, tc[TBUFSIZ];
+ static char *source;
+ static int lineno;
+
+ T(("read termcap entry for %s", tn));
+
+ if (strlen(tn) == 0
+ || strcmp(tn, ".") == 0
+ || strcmp(tn, "..") == 0
+ || _nc_pathlast(tn) != 0) {
+ T(("illegal or missing entry name '%s'", tn));
+ return 0;
+ }
+
+ if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0
+ && !is_pathname(p) && _nc_name_match(p, tn, "|:")) {
+ /* TERMCAP holds a termcap entry */
+ 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);
+
+ _nc_curr_line = lineno;
+ _nc_set_source(source);
+ }
+ _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;
+ int j, k;
+ bool use_buffer = FALSE;
+ bool normal = TRUE;
+ char tc_buf[1024];
+ char pathbuf[PATH_MAX];
+ char *copied = 0;
+ char *cp;
+ struct stat test_stat[MAXPATHS];
+
+ termpaths[filecount] = 0;
+ if (use_terminfo_vars() && (tc = getenv("TERMCAP")) != 0) {
+ if (is_pathname(tc)) { /* interpret as a filename */
+ ADD_TC(tc, 0);
+ normal = FALSE;
+ } 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);
+ normal = FALSE;
+ }
+ }
+
+ if (normal) { /* normal case */
+ char envhome[PATH_MAX], *h;
+
+ copied = strdup(get_termpath());
+ for (cp = copied; *cp; cp++) {
+ if (*cp == NCURSES_PATHSEP)
+ *cp = '\0';
+ else if (cp == copied || cp[-1] == '\0') {
+ ADD_TC(cp, filecount);
+ }
+ }
+
+#define PRIVATE_CAP "%s/.termcap"
+
+ if (use_terminfo_vars() && (h = getenv("HOME")) != NULL && *h != '\0'
+ && (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);
+ }
+ }
+
+ /*
+ * Probably /etc/termcap is a symlink to /usr/share/misc/termcap.
+ * Avoid reading the same file twice.
+ */
+#if HAVE_LINK
+ for (j = 0; j < filecount; j++) {
+ bool omit = FALSE;
+ if (stat(termpaths[j], &test_stat[j]) != 0
+ || (test_stat[j].st_mode & S_IFMT) != S_IFREG) {
+ omit = TRUE;
+ } else {
+ for (k = 0; k < j; k++) {
+ if (test_stat[k].st_dev == test_stat[j].st_dev
+ && test_stat[k].st_ino == test_stat[j].st_ino) {
+ omit = TRUE;
+ break;
+ }
+ }
+ }
+ if (omit) {
+ T(("Path %s is a duplicate", termpaths[j]));
+ for (k = j + 1; k < filecount; k++) {
+ termpaths[k - 1] = termpaths[k];
+ test_stat[k - 1] = test_stat[k];
+ }
+ --filecount;
+ --j;
+ }
+ }
+#endif
+
+ /* 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;
+
+ for (i = 0; i < filecount; i++) {
+
+ T(("Looking for %s in %s", tn, termpaths[i]));
+ if (_nc_access(termpaths[i], R_OK) == 0
+ && (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);
+
+ (void) fclose(fp);
+ }
+ }
+ }
+ if (copied != 0)
+ free(copied);
+#endif /* USE_GETCAP */
+
+ if (_nc_head == 0)
+ return (ERR);
+
+ /* resolve all use references */
+ _nc_resolve_uses2(TRUE, FALSE);
+
+ /* 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 */
+#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.
+ */
+#if USE_GETCAP_CACHE
+ (void) _nc_write_entry(tp);
+#endif
+ found = TRUE;
+ break;
+ }
+ }
+#if USE_GETCAP_CACHE
+ chdir(cwd_buf);
+ }
+#endif
+
+ _nc_free_entries(_nc_head);
+ return (found);
+}
+#else
+extern
+NCURSES_EXPORT(void)
+_nc_read_termcap(void);
+NCURSES_EXPORT(void)
+_nc_read_termcap(void)
+{
+}
+#endif /* PURE_TERMINFO */
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/setbuf.c b/Build/source/libs/ncurses/ncurses/tinfo/setbuf.c
new file mode 100644
index 00000000000..94bb6d3463c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/setbuf.c
@@ -0,0 +1,150 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** setbuf.c
+**
+** Support for set_term(), reset_shell_mode(), reset_prog_mode().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: setbuf.c,v 1.12 2003/11/15 23:55:34 tom Exp $")
+
+/*
+ * If the output file descriptor is connected to a tty (the typical case) it
+ * will probably be line-buffered. Keith Bostic pointed out that we don't want
+ * this; it hoses people running over networks by forcing out a bunch of small
+ * packets instead of one big one, so screen updates on ptys look jerky.
+ * Restore block buffering to prevent this minor lossage.
+ *
+ * The buffer size is a compromise. Ideally we'd like a buffer that can hold
+ * the maximum possible update size (the whole screen plus cup commands to
+ * change lines as it's painted). On a 66-line xterm this can become
+ * excessive. So we min it with the amount of data we think we can get through
+ * two Ethernet packets (maximum packet size - 100 for TCP/IP overhead).
+ *
+ * Why two ethernet packets? It used to be one, on the theory that said
+ * packets define the maximum size of atomic update. But that's less than the
+ * 2000 chars on a 25 x 80 screen, and we don't want local updates to flicker
+ * either. Two packet lengths will handle up to a 35 x 80 screen.
+ *
+ * The magic '6' is the estimated length of the end-of-line cup sequence to go
+ * to the next line. It's generous. We used to mess with the buffering in
+ * init_mvcur() after cost computation, but that lost the sequences emitted by
+ * init_acs() in setupscreen().
+ *
+ * "The setvbuf function may be used only after the stream pointed to by stream
+ * has been associated with an open file and before any other operation is
+ * performed on the stream." (ISO 7.9.5.6.)
+ *
+ * Grrrr...
+ *
+ * On a lighter note, many implementations do in fact allow an application to
+ * reset the buffering after it has been written to. We try to do this because
+ * otherwise we leave stdout in buffered mode after endwin() is called. (This
+ * also happens with SVr4 curses).
+ *
+ * There are pros/cons:
+ *
+ * con:
+ * There is no guarantee that we can reestablish buffering once we've
+ * dropped it.
+ *
+ * We _may_ lose data if the implementation does not coordinate this with
+ * fflush.
+ *
+ * pro:
+ * An implementation is more likely to refuse to change the buffering than
+ * to do it in one of the ways mentioned above.
+ *
+ * The alternative is to have the application try to change buffering
+ * itself, which is certainly no improvement.
+ *
+ * Just in case it does not work well on a particular system, the calls to
+ * change buffering are all via the macro NC_BUFFERED. Some implementations
+ * do indeed get confused by changing setbuf on/off, and will overrun the
+ * buffer. So we disable this by default (there may yet be a workaround).
+ */
+NCURSES_EXPORT(void)
+_nc_set_buffer(FILE *ofp, bool buffered)
+{
+ /* optional optimization hack -- do before any output to ofp */
+#if HAVE_SETVBUF || HAVE_SETBUFFER
+ if (SP->_buffered != (int)buffered) {
+ unsigned buf_len;
+ char *buf_ptr;
+
+ if (getenv("NCURSES_NO_SETBUF") != 0)
+ return;
+
+ fflush(ofp);
+#ifdef __DJGPP__
+ setmode(ofp, O_BINARY);
+#endif
+ if (buffered != 0) {
+ buf_len = min(LINES * (COLS + 6), 2800);
+ if ((buf_ptr = SP->_setbuf) == 0) {
+ if ((buf_ptr = typeMalloc(char, buf_len)) == NULL)
+ return;
+ SP->_setbuf = buf_ptr;
+ /* Don't try to free this! */
+ }
+#if !USE_SETBUF_0
+ else
+ return;
+#endif
+ } else {
+#if !USE_SETBUF_0
+ return;
+#else
+ buf_len = 0;
+ buf_ptr = 0;
+#endif
+ }
+
+#if HAVE_SETVBUF
+#ifdef SETVBUF_REVERSED /* pre-svr3? */
+ (void) setvbuf(ofp, buf_ptr, buf_len, buf_len ? _IOFBF : _IOLBF);
+#else
+ (void) setvbuf(ofp, buf_ptr, buf_len ? _IOFBF : _IOLBF, buf_len);
+#endif
+#elif HAVE_SETBUFFER
+ (void) setbuffer(ofp, buf_ptr, (int) buf_len);
+#endif
+
+ SP->_buffered = buffered;
+ }
+#endif /* HAVE_SETVBUF || HAVE_SETBUFFER */
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/strings.c b/Build/source/libs/ncurses/ncurses/tinfo/strings.c
new file mode 100644
index 00000000000..d5377fe07a5
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/strings.c
@@ -0,0 +1,142 @@
+/****************************************************************************
+ * Copyright (c) 2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 *
+ ****************************************************************************/
+
+/*
+** lib_mvcur.c
+**/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: strings.c,v 1.5 2003/08/16 23:46:00 tom Exp $")
+
+/****************************************************************************
+ * Useful string functions (especially for mvcur)
+ ****************************************************************************/
+
+#if !HAVE_STRSTR
+NCURSES_EXPORT(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++;
+ }
+ return result;
+}
+#endif
+
+/*
+ * Initialize the descriptor so we can append to it. Note that 'src' may
+ * be a null pointer (see _nc_str_null), so the corresponding strcat and
+ * strcpy calls have to allow for this.
+ */
+NCURSES_EXPORT(string_desc *)
+_nc_str_init(string_desc * dst, char *src, size_t len)
+{
+ if (dst != 0) {
+ dst->s_head = src;
+ dst->s_tail = src;
+ dst->s_size = len - 1;
+ dst->s_init = dst->s_size;
+ if (src != 0)
+ *src = 0;
+ }
+ return dst;
+}
+
+/*
+ * Initialize the descriptor for only tracking the amount of memory used.
+ */
+NCURSES_EXPORT(string_desc *)
+_nc_str_null(string_desc * dst, size_t len)
+{
+ return _nc_str_init(dst, 0, len);
+}
+
+/*
+ * Copy a descriptor
+ */
+NCURSES_EXPORT(string_desc *)
+_nc_str_copy(string_desc * dst, string_desc * src)
+{
+ *dst = *src;
+ return dst;
+}
+
+/*
+ * Replaces strcat into a fixed buffer, returning false on failure.
+ */
+NCURSES_EXPORT(bool)
+_nc_safe_strcat(string_desc * dst, const char *src)
+{
+ if (src != 0) {
+ size_t len = strlen(src);
+
+ if (len < dst->s_size) {
+ if (dst->s_tail != 0) {
+ strcpy(dst->s_tail, src);
+ dst->s_tail += len;
+ }
+ dst->s_size -= len;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/*
+ * Replaces strcpy into a fixed buffer, returning false on failure.
+ */
+NCURSES_EXPORT(bool)
+_nc_safe_strcpy(string_desc * dst, const char *src)
+{
+ if (src != 0) {
+ size_t len = strlen(src);
+
+ if (len < dst->s_size) {
+ if (dst->s_head != 0) {
+ strcpy(dst->s_head, src);
+ dst->s_tail = dst->s_head + len;
+ }
+ dst->s_size = dst->s_init - len;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tinfo/write_entry.c b/Build/source/libs/ncurses/ncurses/tinfo/write_entry.c
new file mode 100644
index 00000000000..9750dffd5ff
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tinfo/write_entry.c
@@ -0,0 +1,591 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * write_entry.c -- write a terminfo structure onto the file system
+ */
+
+#include <curses.priv.h>
+
+#include <sys/stat.h>
+
+#include <tic.h>
+#include <term_entry.h>
+
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR)
+#endif
+
+#if 0
+#define TRACE_OUT(p) DEBUG(2, p)
+#else
+#define TRACE_OUT(p) /*nothing */
+#endif
+
+MODULE_ID("$Id: write_entry.c,v 1.58 2002/04/21 20:35:08 tom Exp $")
+
+static int total_written;
+
+static int write_object(FILE *, TERMTYPE *);
+
+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));
+
+ if (write_object(fp, tp) == ERR) {
+ _nc_syserr_abort("error writing %s/%s", _nc_tic_dir(0), filename);
+ }
+ fclose(fp);
+}
+
+/*
+ * make_directory(char *path)
+ *
+ * Make a directory if it doesn't exist.
+ */
+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);
+ }
+
+ 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;
+}
+
+NCURSES_EXPORT(void)
+_nc_set_writedir(char *dir)
+/* set the write directory for compiled entries */
+{
+ const char *destination;
+ char actual[PATH_MAX];
+
+ if (dir == 0
+ && use_terminfo_vars())
+ dir = getenv("TERMINFO");
+
+ if (dir != 0)
+ (void) _nc_tic_dir(dir);
+
+ destination = _nc_tic_dir(0);
+ 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);
+ }
+ }
+
+ /*
+ * Note: because of this code, this logic should be exercised
+ * *once only* per run.
+ */
+ if (chdir(_nc_tic_dir(destination)) < 0
+ || getcwd(actual, sizeof(actual)) == 0)
+ _nc_err_abort("%s: not a directory", destination);
+ _nc_keep_tic_dir(strdup(actual));
+}
+
+/*
+ * check_writeable(char code)
+ *
+ * Miscellaneous initialisations
+ *
+ * Check for access rights to destination directories
+ * Create any directories which don't exist.
+ * Note: there's no reason to return the result of make_directory(), since
+ * this function is called only in instances where that has to succeed.
+ *
+ */
+
+static void
+check_writeable(int code)
+{
+ static const char dirnames[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+ static bool verified[sizeof(dirnames)];
+
+ char dir[2];
+ char *s = 0;
+
+ if (code == 0 || (s = strchr(dirnames, code)) == 0)
+ _nc_err_abort("Illegal terminfo subdirectory \"%c\"", code);
+
+ 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);
+ }
+
+ verified[s - dirnames] = TRUE;
+}
+
+/*
+ * _nc_write_entry()
+ *
+ * Save the compiled version of a description in the filesystem.
+ *
+ * make a copy of the name-list
+ * break it up into first-name and all-but-last-name
+ * creat(first-name)
+ * write object information to first-name
+ * close(first-name)
+ * for each name in all-but-last-name
+ * link to first-name
+ *
+ * Using 'time()' to obtain a reference for file timestamps is unreliable,
+ * e.g., with NFS, because the filesystem may have a different time
+ * reference. We check for pre-existence of links by latching the first
+ * timestamp from a file that we create.
+ *
+ * The _nc_warning() calls will report a correct line number only if
+ * _nc_curr_line is properly set before the write_entry() call.
+ */
+
+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];
+#if USE_SYMLINKS
+ char symlinkname[PATH_MAX];
+#if !HAVE_LINK
+#undef HAVE_LINK
+#define HAVE_LINK 1
+#endif
+#endif /* USE_SYMLINKS */
+ static int call_count;
+ static time_t start_time; /* time at start of writes */
+
+ if (call_count++ == 0) {
+ start_time = 0;
+ }
+
+ (void) strcpy(name_list, tp->term_names);
+ DEBUG(7, ("Name list = '%s'", name_list));
+
+ first_name = name_list;
+
+ ptr = &name_list[strlen(name_list) - 1];
+ other_names = ptr + 1;
+
+ while (ptr > name_list && *ptr != '|')
+ ptr--;
+
+ if (ptr != name_list) {
+ *ptr = '\0';
+
+ for (ptr = name_list; *ptr != '\0' && *ptr != '|'; ptr++)
+ continue;
+
+ 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));
+
+ _nc_set_type(first_name);
+
+ if (strlen(first_name) > sizeof(filename) - 3)
+ _nc_warning("terminal name too long.");
+
+ 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.");
+ }
+
+ 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++;
+
+ 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 HAVE_LINK
+ {
+ int code;
+#if USE_SYMLINKS
+ strcpy(symlinkname, "../");
+ strncat(symlinkname, filename, sizeof(symlinkname) - 4);
+ symlinkname[sizeof(symlinkname) - 1] = '\0';
+#endif /* USE_SYMLINKS */
+#if HAVE_REMOVE
+ code = remove(linkname);
+#else
+ code = unlink(linkname);
+#endif
+ if (code != 0 && errno == ENOENT)
+ code = 0;
+#if USE_SYMLINKS
+ if (symlink(symlinkname, linkname) < 0)
+#else
+ 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 || errno == ENOENT))
+ write_file(linkname, tp);
+ else {
+#if MIXEDCASE_FILENAMES
+ _nc_syserr_abort("can't link %s to %s", filename, linkname);
+#else
+ _nc_warning("can't link %s to %s (errno=%d)", filename,
+ linkname, errno);
+#endif
+ }
+ } else {
+ DEBUG(1, ("Linked %s", linkname));
+ }
+ }
+#else /* just make copies */
+ write_file(linkname, tp);
+#endif /* HAVE_LINK */
+ }
+}
+
+#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, unsigned strmax, short *offsets)
+{
+ size_t nextfree = 0;
+ unsigned i;
+
+ for (i = 0; i < strmax; i++) {
+ if (Strings[i] == ABSENT_STRING) {
+ offsets[i] = -1;
+ } else if (Strings[i] == CANCELLED_STRING) {
+ offsets[i] = -2;
+ } else {
+ offsets[i] = nextfree;
+ nextfree += strlen(Strings[i]) + 1;
+ TRACE_OUT(("put Strings[%d]=%s(%d)", i, _nc_visbuf(Strings[i]), nextfree));
+ }
+ }
+ return nextfree;
+}
+
+static void
+convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
+{
+ unsigned i;
+ for (i = 0; i < count; i++) {
+ 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]);
+ TRACE_OUT(("put Numbers[%d]=%d", i, Numbers[i]));
+ }
+ }
+}
+
+#define even_boundary(value) \
+ ((value) % 2 != 0 && fwrite(&zero, sizeof(char), 1, fp) != 1)
+
+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];
+ unsigned last_bool = BOOLWRITE;
+ unsigned last_num = NUMWRITE;
+ unsigned last_str = STRWRITE;
+
+#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
+
+ namelist = tp->term_names;
+ namelen = strlen(namelist) + 1;
+
+ boolmax = 0;
+ for (i = 0; i < last_bool; i++) {
+ if (tp->Booleans[i] == TRUE)
+ boolmax = i + 1;
+ }
+
+ nummax = 0;
+ for (i = 0; i < last_num; i++) {
+ if (tp->Numbers[i] != ABSENT_NUMERIC)
+ nummax = i + 1;
+ }
+
+ strmax = 0;
+ for (i = 0; i < last_str; i++) {
+ if (tp->Strings[i] != ABSENT_STRING)
+ strmax = i + 1;
+ }
+
+ nextfree = compute_offsets(tp->Strings, strmax, offsets);
+
+ /* 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);
+
+ /* 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);
+
+ 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);
+
+ if (even_boundary(namelen + boolmax))
+ return (ERR);
+
+ TRACE_OUT(("Numerics begin at %04lx", ftell(fp)));
+
+ /* the numerics */
+ convert_shorts(buf, tp->Numbers, nummax);
+ if (fwrite(buf, 2, nummax, fp) != nummax)
+ return (ERR);
+
+ TRACE_OUT(("String offsets begin at %04lx", ftell(fp)));
+
+ /* 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);
+ }
+
+ /*
+ * 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);
+}
+
+/*
+ * Returns the total number of entries written by this process
+ */
+NCURSES_EXPORT(int)
+_nc_tic_written(void)
+{
+ return total_written;
+}
diff --git a/Build/source/libs/ncurses/ncurses/trace/README b/Build/source/libs/ncurses/ncurses/trace/README
new file mode 100644
index 00000000000..a627a537a3d
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/README
@@ -0,0 +1,5 @@
+-- $Id: README,v 1.1 1998/11/08 00:11:01 tom Exp $
+
+The files in this directory (trace) support both the terminfo and ncurses
+libraries. Most of the functions are linked in only when the libraries
+are compiled with TRACE defined.
diff --git a/Build/source/libs/ncurses/ncurses/trace/lib_trace.c b/Build/source/libs/ncurses/ncurses/trace/lib_trace.c
new file mode 100644
index 00000000000..8a5d7e6a650
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/lib_trace.c
@@ -0,0 +1,197 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_trace.c - Tracing/Debugging routines
+ */
+
+#include <curses.priv.h>
+#include <tic.h>
+
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_trace.c,v 1.53 2003/11/23 00:39:30 tom Exp $")
+
+NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
+
+#ifdef TRACE
+NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace = "";
+NCURSES_EXPORT_VAR(long) _nc_outchars = 0;
+
+static FILE *tracefp = 0; /* default to writing to stderr */
+
+NCURSES_EXPORT(void)
+trace(const unsigned int tracelevel)
+{
+ static bool been_here = FALSE;
+ static char my_name[PATH_MAX];
+
+ if ((tracefp == 0) && tracelevel) {
+ const char *mode = been_here ? "ab" : "wb";
+
+ if (*my_name == '\0') {
+ if (getcwd(my_name, sizeof(my_name) - 10) == 0) {
+ perror("curses: Can't get working directory");
+ exit(EXIT_FAILURE);
+ }
+ strcat(my_name, "/trace");
+ }
+
+ been_here = TRUE;
+ _nc_tracing = tracelevel;
+ if (_nc_access(my_name, W_OK) < 0
+ || (tracefp = fopen(my_name, mode)) == 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 (tracelevel=%#x)",
+ NCURSES_VERSION,
+ NCURSES_VERSION_PATCH,
+ tracelevel);
+ } else if (tracelevel == 0) {
+ if (tracefp != 0) {
+ fclose(tracefp);
+ tracefp = 0;
+ }
+ _nc_tracing = tracelevel;
+ } else if (_nc_tracing != tracelevel) {
+ _nc_tracing = tracelevel;
+ _tracef("tracelevel=%#x", tracelevel);
+ }
+}
+
+NCURSES_EXPORT(void)
+_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;
+ }
+ }
+
+ 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 'bool' return-values */
+NCURSES_EXPORT(NCURSES_BOOL)
+_nc_retrace_bool(NCURSES_BOOL code)
+{
+ T((T_RETURN("%s"), code ? "TRUE" : "FALSE"));
+ return code;
+}
+
+/* Trace 'int' return-values */
+NCURSES_EXPORT(int)
+_nc_retrace_int(int code)
+{
+ T((T_RETURN("%d"), code));
+ return code;
+}
+
+/* Trace 'unsigned' return-values */
+NCURSES_EXPORT(unsigned)
+_nc_retrace_unsigned(unsigned code)
+{
+ T((T_RETURN("%#x"), code));
+ return code;
+}
+
+/* Trace 'char*' return-values */
+NCURSES_EXPORT(char *)
+_nc_retrace_ptr(char *code)
+{
+ T((T_RETURN("%s"), _nc_visbuf(code)));
+ return code;
+}
+
+/* Trace 'SCREEN *' return-values */
+NCURSES_EXPORT(SCREEN *)
+_nc_retrace_sp(SCREEN * code)
+{
+ T((T_RETURN("%p"), code));
+ return code;
+}
+
+/* Trace 'WINDOW *' return-values */
+NCURSES_EXPORT(WINDOW *)
+_nc_retrace_win(WINDOW *code)
+{
+ T((T_RETURN("%p"), code));
+ return code;
+}
+#endif /* TRACE */
diff --git a/Build/source/libs/ncurses/ncurses/trace/lib_traceatr.c b/Build/source/libs/ncurses/ncurses/trace/lib_traceatr.c
new file mode 100644
index 00000000000..c202f72626e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/lib_traceatr.c
@@ -0,0 +1,310 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas Dickey 1996-on *
+ * and: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_traceatr.c - Tracing/Debugging routines (attributes)
+ */
+
+#include <curses.priv.h>
+#include <term.h> /* acs_chars */
+
+MODULE_ID("$Id: lib_traceatr.c,v 1.49 2004/10/16 21:43:13 tom Exp $")
+
+#define COLOR_OF(c) (c < 0 || c > 7 ? "default" : colors[c].name)
+
+#ifdef TRACE
+
+static const char l_brace[] = {L_BRACE, 0};
+static const char r_brace[] = {R_BRACE, 0};
+
+NCURSES_EXPORT(char *)
+_traceattr2(int bufnum, attr_t newmode)
+{
+ char *buf = _nc_trace_buf(bufnum, BUFSIZ);
+ char temp[80];
+ static const struct {
+ unsigned int val;
+ const char *name;
+ } names[] =
+ {
+ /* *INDENT-OFF* */
+ { A_STANDOUT, "A_STANDOUT" },
+ { A_UNDERLINE, "A_UNDERLINE" },
+ { A_REVERSE, "A_REVERSE" },
+ { A_BLINK, "A_BLINK" },
+ { A_DIM, "A_DIM" },
+ { A_BOLD, "A_BOLD" },
+ { A_ALTCHARSET, "A_ALTCHARSET" },
+ { A_INVIS, "A_INVIS" },
+ { A_PROTECT, "A_PROTECT" },
+ { A_CHARTEXT, "A_CHARTEXT" },
+ { A_NORMAL, "A_NORMAL" },
+ { A_COLOR, "A_COLOR" },
+ /* *INDENT-ON* */
+
+ },
+ colors[] =
+ {
+ /* *INDENT-OFF* */
+ { COLOR_BLACK, "COLOR_BLACK" },
+ { COLOR_RED, "COLOR_RED" },
+ { COLOR_GREEN, "COLOR_GREEN" },
+ { COLOR_YELLOW, "COLOR_YELLOW" },
+ { COLOR_BLUE, "COLOR_BLUE" },
+ { COLOR_MAGENTA, "COLOR_MAGENTA" },
+ { COLOR_CYAN, "COLOR_CYAN" },
+ { COLOR_WHITE, "COLOR_WHITE" },
+ /* *INDENT-ON* */
+
+ };
+ size_t n;
+ unsigned save_nc_tracing = _nc_tracing;
+ _nc_tracing = 0;
+
+ strcpy(buf, l_brace);
+
+ for (n = 0; n < SIZEOF(names); n++) {
+ if ((newmode & names[n].val) != 0) {
+ if (buf[1] != '\0')
+ buf = _nc_trace_bufcat(bufnum, "|");
+ buf = _nc_trace_bufcat(bufnum, names[n].name);
+
+ if (names[n].val == A_COLOR) {
+ short pairnum = PAIR_NUMBER(newmode);
+ short fg, bg;
+
+ if (pair_content(pairnum, &fg, &bg) == OK) {
+ (void) sprintf(temp,
+ "{%d = {%s, %s}}",
+ pairnum,
+ COLOR_OF(fg),
+ COLOR_OF(bg));
+ } else {
+ (void) sprintf(temp, "{%d}", pairnum);
+ }
+ buf = _nc_trace_bufcat(bufnum, temp);
+ }
+ }
+ }
+ if (ChAttrOf(newmode) == A_NORMAL) {
+ if (buf[1] != '\0')
+ (void) _nc_trace_bufcat(bufnum, "|");
+ (void) _nc_trace_bufcat(bufnum, "A_NORMAL");
+ }
+
+ _nc_tracing = save_nc_tracing;
+ return (_nc_trace_bufcat(bufnum, r_brace));
+}
+
+NCURSES_EXPORT(char *)
+_traceattr(attr_t newmode)
+{
+ return _traceattr2(0, newmode);
+}
+
+/* Trace 'int' return-values */
+NCURSES_EXPORT(attr_t)
+_nc_retrace_attr_t(attr_t code)
+{
+ T((T_RETURN("%s"), _traceattr(code)));
+ return code;
+}
+
+const char *
+_nc_altcharset_name(attr_t attr, chtype ch)
+{
+ const char *result = 0;
+
+ if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
+ char *cp;
+ char *found = 0;
+ static const struct {
+ unsigned int val;
+ const char *name;
+ } names[] =
+ {
+ /* *INDENT-OFF* */
+ { 'l', "ACS_ULCORNER" }, /* upper left corner */
+ { 'm', "ACS_LLCORNER" }, /* lower left corner */
+ { 'k', "ACS_URCORNER" }, /* upper right corner */
+ { 'j', "ACS_LRCORNER" }, /* lower right corner */
+ { 't', "ACS_LTEE" }, /* tee pointing right */
+ { 'u', "ACS_RTEE" }, /* tee pointing left */
+ { 'v', "ACS_BTEE" }, /* tee pointing up */
+ { 'w', "ACS_TTEE" }, /* tee pointing down */
+ { 'q', "ACS_HLINE" }, /* horizontal line */
+ { 'x', "ACS_VLINE" }, /* vertical line */
+ { 'n', "ACS_PLUS" }, /* large plus or crossover */
+ { 'o', "ACS_S1" }, /* scan line 1 */
+ { 's', "ACS_S9" }, /* scan line 9 */
+ { '`', "ACS_DIAMOND" }, /* diamond */
+ { 'a', "ACS_CKBOARD" }, /* checker board (stipple) */
+ { 'f', "ACS_DEGREE" }, /* degree symbol */
+ { 'g', "ACS_PLMINUS" }, /* plus/minus */
+ { '~', "ACS_BULLET" }, /* bullet */
+ { ',', "ACS_LARROW" }, /* arrow pointing left */
+ { '+', "ACS_RARROW" }, /* arrow pointing right */
+ { '.', "ACS_DARROW" }, /* arrow pointing down */
+ { '-', "ACS_UARROW" }, /* arrow pointing up */
+ { 'h', "ACS_BOARD" }, /* board of squares */
+ { 'i', "ACS_LANTERN" }, /* lantern symbol */
+ { '0', "ACS_BLOCK" }, /* solid square block */
+ { 'p', "ACS_S3" }, /* scan line 3 */
+ { 'r', "ACS_S7" }, /* scan line 7 */
+ { 'y', "ACS_LEQUAL" }, /* less/equal */
+ { 'z', "ACS_GEQUAL" }, /* greater/equal */
+ { '{', "ACS_PI" }, /* Pi */
+ { '|', "ACS_NEQUAL" }, /* not equal */
+ { '}', "ACS_STERLING" }, /* UK pound sign */
+ { '\0', (char *) 0 }
+ /* *INDENT-OFF* */
+ },
+ *sp;
+
+ for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
+ if (ChCharOf(cp[1]) == ChCharOf(ch)) {
+ found = cp;
+ /* don't exit from loop - there may be redefinitions */
+ }
+ }
+
+ if (found != 0) {
+ ch = ChCharOf(*found);
+ for (sp = names; sp->val; sp++)
+ if (sp->val == ch) {
+ result = sp->name;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+NCURSES_EXPORT(char *)
+_tracechtype2(int bufnum, chtype ch)
+{
+ const char *found;
+
+ strcpy(_nc_trace_buf(bufnum, BUFSIZ), l_brace);
+ if ((found = _nc_altcharset_name(ChAttrOf(ch), ch)) != 0) {
+ (void) _nc_trace_bufcat(bufnum, found);
+ } else
+ (void) _nc_trace_bufcat(bufnum, _tracechar(ChCharOf(ch)));
+
+ if (ChAttrOf(ch) != A_NORMAL) {
+ (void) _nc_trace_bufcat(bufnum, " | ");
+ (void) _nc_trace_bufcat(bufnum,
+ _traceattr2(bufnum + 20, ChAttrOf(ch)));
+ }
+
+ return (_nc_trace_bufcat(bufnum, r_brace));
+}
+
+NCURSES_EXPORT(char *)
+_tracechtype (chtype ch)
+{
+ return _tracechtype2(0, ch);
+}
+
+/* Trace 'chtype' return-values */
+NCURSES_EXPORT(chtype)
+_nc_retrace_chtype (chtype code)
+{
+ T((T_RETURN("%s"), _tracechtype(code)));
+ return code;
+}
+
+#if USE_WIDEC_SUPPORT
+NCURSES_EXPORT(char *)
+_tracecchar_t2 (int bufnum, const cchar_t *ch)
+{
+ char *buf = _nc_trace_buf(bufnum, BUFSIZ);
+ attr_t attr;
+ const char *found;
+
+ strcpy(buf, l_brace);
+ if (ch != 0) {
+ attr = AttrOfD(ch);
+ if ((found = _nc_altcharset_name(attr, CharOfD(ch))) != 0) {
+ (void) _nc_trace_bufcat(bufnum, found);
+ attr &= ~A_ALTCHARSET;
+ } else if (isnac(CHDEREF(ch))) {
+ (void) _nc_trace_bufcat(bufnum, "{NAC}");
+ attr &= ~WA_NAC;
+ } else {
+ PUTC_DATA;
+ int n;
+
+ PUTC_INIT;
+ (void) _nc_trace_bufcat(bufnum, "{ ");
+ do {
+ PUTC_ch = PUTC_i < CCHARW_MAX ? ch->chars[PUTC_i] : L'\0';
+ PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
+ if (PUTC_ch == L'\0')
+ --PUTC_n;
+ if (PUTC_n <= 0) {
+ if (PUTC_ch != L'\0') {
+ /* it could not be a multibyte sequence */
+ (void) _nc_trace_bufcat(bufnum, _tracechar(UChar(ch->chars[PUTC_i])));
+ }
+ break;
+ }
+ for (n = 0; n < PUTC_n; n++) {
+ if (n)
+ (void) _nc_trace_bufcat(bufnum, ", ");
+ (void) _nc_trace_bufcat(bufnum, _tracechar(UChar(PUTC_buf[n])));
+ }
+ ++PUTC_i;
+ } while (PUTC_ch != L'\0');
+ (void) _nc_trace_bufcat(bufnum, " }");
+ }
+ if (attr != A_NORMAL) {
+ (void) _nc_trace_bufcat(bufnum, " | ");
+ (void) _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr));
+ }
+ }
+
+ return (_nc_trace_bufcat(bufnum, r_brace));
+}
+
+NCURSES_EXPORT(char *)
+_tracecchar_t (const cchar_t *ch)
+{
+ return _tracecchar_t2(0, ch);
+}
+#endif
+
+#else
+empty_module(_nc_lib_traceatr)
+#endif /* TRACE */
diff --git a/Build/source/libs/ncurses/ncurses/trace/lib_tracebits.c b/Build/source/libs/ncurses/ncurses/trace/lib_tracebits.c
new file mode 100644
index 00000000000..e681862649a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/lib_tracebits.c
@@ -0,0 +1,248 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h> /* cur_term */
+
+MODULE_ID("$Id: lib_tracebits.c,v 1.12 2002/05/25 14:35:07 tom Exp $")
+
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
+#define _POSIX_SOURCE
+#endif
+
+#if HAVE_SYS_TERMIO_H
+#include <sys/termio.h> /* needed for ISC */
+#endif
+
+#ifdef __EMX__
+#include <io.h>
+#endif
+
+/* may be undefined if we're using termio.h */
+#ifndef TOSTOP
+#define TOSTOP 0
+#endif
+#ifndef IEXTEN
+#define IEXTEN 0
+#endif
+
+#ifdef TRACE
+
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
+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, "} ");
+}
+
+NCURSES_EXPORT(char *)
+_nc_trace_ttymode(TTY * tty)
+/* describe the state of the terminal control bits exactly */
+{
+ char *buf;
+
+#ifdef TERMIOS
+ 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}
+#define ALLIN (BRKINT|IGNBRK|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IXOFF)
+ }, oflags[] =
+ {
+ {OPOST, "OPOST"},
+ {0, NULL}
+#define ALLOUT (OPOST)
+ }, cflags[] =
+ {
+ {CLOCAL, "CLOCAL"},
+ {CREAD, "CREAD"},
+ {CSTOPB, "CSTOPB"},
+#if !defined(CS5) || !defined(CS8)
+ {CSIZE, "CSIZE"},
+#endif
+ {HUPCL, "HUPCL"},
+ {PARENB, "PARENB"},
+ {PARODD | PARENB, "PARODD"}, /* concession to readability */
+ {0, NULL}
+#define ALLCTRL (CLOCAL|CREAD|CSIZE|CSTOPB|HUPCL|PARENB|PARODD)
+ }, 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}
+#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);
+
+ if (tty->c_iflag & ALLIN)
+ lookup_bits(buf, iflags, "iflags", tty->c_iflag);
+
+ if (tty->c_oflag & ALLOUT)
+ lookup_bits(buf, oflags, "oflags", tty->c_oflag);
+
+ if (tty->c_cflag & ALLCTRL)
+ lookup_bits(buf, cflags, "cflags", tty->c_cflag);
+
+#if defined(CS5) && defined(CS8)
+ {
+ static struct {
+ const char *name;
+ int value;
+ } csizes[] = {
+ {
+ "CS5 ", CS5
+ },
+#ifdef CS6
+ {
+ "CS6 ", CS6
+ },
+#endif
+#ifdef CS7
+ {
+ "CS7 ", CS7
+ },
+#endif
+ {
+ "CS8 ", CS8
+ },
+ };
+ const char *result = "CSIZE? ";
+ int value = (tty->c_cflag & CSIZE);
+ unsigned n;
+
+ if (value != 0) {
+ for (n = 0; n < SIZEOF(csizes); n++) {
+ if (csizes[n].value == value) {
+ result = csizes[n].name;
+ break;
+ }
+ }
+ }
+ strcat(buf, result);
+ }
+#endif
+
+ if (tty->c_lflag & ALLLOCAL)
+ lookup_bits(buf, lflags, "lflags", tty->c_lflag);
+
+#else
+ /* reference: ttcompat(4M) on SunOS 4.1 */
+#ifndef EVENP
+#define EVENP 0
+#endif
+#ifndef LCASE
+#define LCASE 0
+#endif
+#ifndef LLITOUT
+#define LLITOUT 0
+#endif
+#ifndef ODDP
+#define ODDP 0
+#endif
+#ifndef TANDEM
+#define TANDEM 0
+#endif
+
+ 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}
+#define ALLCTRL (CBREAK|CRMOD|ECHO|EVENP|LCASE|LLITOUT|ODDP|RAW|TANDEM|XTABS)
+ };
+
+ buf = _nc_trace_buf(0,
+ 8 + sizeof(cflags));
+
+ if (tty->sg_flags & ALLCTRL) {
+ lookup_bits(buf, cflags, "cflags", tty->sg_flags);
+ }
+#endif
+ return (buf);
+}
+
+NCURSES_EXPORT(char *)
+_nc_tracebits(void)
+{
+ return _nc_trace_ttymode(&(cur_term->Nttyb));
+}
+#else
+empty_module(_nc_tracebits)
+#endif /* TRACE */
diff --git a/Build/source/libs/ncurses/ncurses/trace/lib_tracechr.c b/Build/source/libs/ncurses/ncurses/trace/lib_tracechr.c
new file mode 100644
index 00000000000..e279b95c257
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/lib_tracechr.c
@@ -0,0 +1,72 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_tracechr.c - Tracing/Debugging routines
+ */
+#include <curses.priv.h>
+
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_tracechr.c,v 1.11 2004/04/03 22:45:03 tom Exp $")
+
+#ifdef TRACE
+NCURSES_EXPORT(char *)
+_tracechar(int ch)
+{
+ static char result[40];
+ NCURSES_CONST char *name;
+
+ if (ch > KEY_MIN || ch < 0) {
+ name = keyname(ch);
+ if (name == 0 || *name == '\0')
+ name = "NULL";
+ (void) sprintf(result, "'%.30s' = %#03o", name, ch);
+ } else if (!is8bits(ch) || !isprint(UChar(ch))) {
+ /*
+ * workaround for glibc bug:
+ * sprintf changes the result from unctrl() to an empty string if it
+ * does not correspond to a valid multibyte sequence.
+ */
+ (void) sprintf(result, "%#03o", ch);
+ } else {
+ name = unctrl(ch);
+ if (name == 0 || *name == 0)
+ name = "null"; /* shouldn't happen */
+ (void) sprintf(result, "'%.30s' = %#03o", name, ch);
+ }
+ return (result);
+}
+#else
+empty_module(_nc_lib_tracechr)
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/trace/lib_tracedmp.c b/Build/source/libs/ncurses/ncurses/trace/lib_tracedmp.c
new file mode 100644
index 00000000000..c63cb564a0e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/lib_tracedmp.c
@@ -0,0 +1,146 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 1996-2001 *
+ * and: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_tracedmp.c - Tracing/Debugging routines
+ */
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_tracedmp.c,v 1.25 2002/09/22 22:21:38 tom Exp $")
+
+#ifdef TRACE
+NCURSES_EXPORT(void)
+_tracedump(const char *name, WINDOW *win)
+{
+ static char *buf = 0;
+ static size_t used = 0;
+
+ int i, j, n, width;
+
+ /* compute narrowest possible display width */
+ for (width = i = 0; i <= win->_maxy; ++i) {
+ n = 0;
+ for (j = 0; j <= win->_maxx; ++j)
+ if (CharOf(win->_line[i].text[j]) != L(' ')
+ || AttrOf(win->_line[i].text[j]) != A_NORMAL)
+ n = j;
+
+ if (n > width)
+ width = n;
+ }
+ if (width < win->_maxx)
+ ++width;
+ if (++width + 1 > (int) used) {
+ used = 2 * (width + 1);
+ buf = typeRealloc(char, used, buf);
+ }
+
+ for (n = 0; n <= win->_maxy; ++n) {
+ char *ep = buf;
+ bool haveattrs, havecolors;
+
+ /*
+ * Dump A_CHARTEXT part. It is more important to make the grid line up
+ * in the trace file than to represent control- and wide-characters, so
+ * we map those to '.' and '?' respectively.
+ */
+ for (j = 0; j < width; ++j) {
+ chtype test = CharOf(win->_line[n].text[j]);
+ ep[j] = (UChar(test) == test
+#if USE_WIDEC_SUPPORT
+ && (win->_line[n].text[j].chars[1] == 0)
+#endif
+ )
+ ? (iscntrl(UChar(test))
+ ? '.'
+ : UChar(test))
+ : '?';
+ }
+ ep[j] = '\0';
+ _tracef("%s[%2d] %3d%3d ='%s'",
+ name, n,
+ win->_line[n].firstchar,
+ win->_line[n].lastchar,
+ ep);
+
+ /* dump A_COLOR part, will screw up if there are more than 96 */
+ havecolors = FALSE;
+ for (j = 0; j < width; ++j)
+ if (AttrOf(win->_line[n].text[j]) & A_COLOR) {
+ havecolors = TRUE;
+ break;
+ }
+ if (havecolors) {
+ ep = buf;
+ for (j = 0; j < width; ++j)
+ ep[j] = UChar(AttrOf(win->_line[n].text[j]) >>
+ NCURSES_ATTR_SHIFT) + ' ';
+ ep[j] = '\0';
+ _tracef("%*s[%2d]%*s='%s'", (int) strlen(name),
+ "colors", n, 8, " ", buf);
+ }
+
+ for (i = 0; i < 4; ++i) {
+ const char *hex = " 123456789ABCDEF";
+ attr_t mask = (0xf << ((i + 4) * 4));
+
+ haveattrs = FALSE;
+ for (j = 0; j < width; ++j)
+ if (AttrOf(win->_line[n].text[j]) & mask) {
+ haveattrs = TRUE;
+ break;
+ }
+ if (haveattrs) {
+ ep = buf;
+ for (j = 0; j < width; ++j)
+ ep[j] = hex[(AttrOf(win->_line[n].text[j]) & mask) >>
+ ((i + 4) * 4)];
+ ep[j] = '\0';
+ _tracef("%*s%d[%2d]%*s='%s'", (int) strlen(name) -
+ 1, "attrs", i, n, 8, " ", buf);
+ }
+ }
+ }
+#if NO_LEAKS
+ free(buf);
+ buf = 0;
+ used = 0;
+#endif
+}
+
+#else
+empty_module(_nc_lib_tracedmp)
+#endif /* TRACE */
diff --git a/Build/source/libs/ncurses/ncurses/trace/lib_tracemse.c b/Build/source/libs/ncurses/ncurses/trace/lib_tracemse.c
new file mode 100644
index 00000000000..f4a100b6eb4
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/lib_tracemse.c
@@ -0,0 +1,92 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000,2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * lib_tracemse.c - Tracing/Debugging routines (mouse events)
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_tracemse.c,v 1.10 2002/01/12 22:32:25 tom Exp $")
+
+#ifdef TRACE
+
+NCURSES_EXPORT(char *)
+_tracemouse(MEVENT const *ep)
+{
+ 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);
+
+#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(buf, s), ", ")
+ 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);
+}
+
+#else /* !TRACE */
+empty_module(_nc_lib_tracemouse)
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/trace/trace_buf.c b/Build/source/libs/ncurses/ncurses/trace/trace_buf.c
new file mode 100644
index 00000000000..85b4fbe682e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/trace_buf.c
@@ -0,0 +1,109 @@
+/****************************************************************************
+ * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ ****************************************************************************/
+/*
+ * trace_buf.c - Tracing/Debugging buffers (attributes)
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: trace_buf.c,v 1.12 2003/03/15 21:21:36 tom Exp $")
+
+typedef struct {
+ char *text;
+ size_t size;
+} LIST;
+
+static char *
+_nc_trace_alloc(int bufnum, size_t want)
+{
+ char *result = 0;
+ static LIST *list;
+ static size_t have;
+
+ if (bufnum >= 0) {
+ if ((size_t) (bufnum + 1) > have) {
+ size_t need = (bufnum + 1) * 2;
+ if ((list = typeRealloc(LIST, need, list)) == 0)
+ return (0);
+ while (need > have)
+ list[have++].text = 0;
+ }
+
+ if (list[bufnum].text == 0
+ || want > list[bufnum].size) {
+ if ((list[bufnum].text = typeRealloc(char, want, list[bufnum].text))
+ != 0)
+ list[bufnum].size = want;
+ }
+
+ result = list[bufnum].text;
+ }
+#if NO_LEAKS
+ else {
+ if (have) {
+ while (have--) {
+ if (list[have].text != 0)
+ free(list[have].text);
+ }
+ free(list);
+ }
+ }
+#endif
+ return result;
+}
+
+/*
+ * (re)Allocate a buffer big enough for the caller's wants.
+ */
+NCURSES_EXPORT(char *)
+_nc_trace_buf(int bufnum, size_t want)
+{
+ char *result = _nc_trace_alloc(bufnum, want);
+ if (result != 0)
+ *result = '\0';
+ return result;
+}
+
+/*
+ * Append a new string to an existing buffer.
+ */
+NCURSES_EXPORT(char *)
+_nc_trace_bufcat(int bufnum, const char *value)
+{
+ char *buffer = _nc_trace_alloc(bufnum, 0);
+ size_t have = strlen(buffer);
+
+ buffer = _nc_trace_alloc(bufnum, 1 + have + strlen(value));
+ (void) strcpy(buffer + have, value);
+
+ return buffer;
+}
diff --git a/Build/source/libs/ncurses/ncurses/trace/trace_tries.c b/Build/source/libs/ncurses/ncurses/trace/trace_tries.c
new file mode 100644
index 00000000000..d7033227e25
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/trace_tries.c
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * Copyright (c) 1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1999 *
+ ****************************************************************************/
+/*
+ * trace_tries.c - Tracing/Debugging buffers (keycode tries-trees)
+ */
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: trace_tries.c,v 1.10 2001/10/20 22:42:51 tom Exp $")
+
+#ifdef TRACE
+static unsigned char *buffer;
+static unsigned len;
+
+static void
+recur_tries(struct tries *tree, unsigned level)
+{
+ if (level > len)
+ buffer = (unsigned char *) realloc(buffer, len = (level + 1) * 4);
+
+ while (tree != 0) {
+ if ((buffer[level] = tree->ch) == 0)
+ buffer[level] = 128;
+ buffer[level + 1] = 0;
+ if (tree->value != 0) {
+ _tracef("%5d: %s (%s)", tree->value,
+ _nc_visbuf((char *) buffer), keyname(tree->value));
+ }
+ if (tree->child)
+ recur_tries(tree->child, level + 1);
+ tree = tree->sibling;
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_trace_tries(struct tries *tree)
+{
+ buffer = typeMalloc(unsigned char, len = 80);
+ _tracef("BEGIN tries %p", tree);
+ recur_tries(tree, 0);
+ _tracef(". . . tries %p", tree);
+ free(buffer);
+}
+
+#else
+empty_module(_nc_trace_tries)
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/trace/trace_xnames.c b/Build/source/libs/ncurses/ncurses/trace/trace_xnames.c
new file mode 100644
index 00000000000..9b0b5920d81
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/trace_xnames.c
@@ -0,0 +1,75 @@
+/****************************************************************************
+ * 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 <dickey@clark.net> 1999 *
+ ****************************************************************************/
+/*
+ * trace_xnames.c - Tracing/Debugging buffers (TERMTYPE extended names)
+ */
+
+#include <curses.priv.h>
+#include <term_entry.h>
+
+MODULE_ID("$Id: trace_xnames.c,v 1.5 2000/12/10 03:02:45 tom Exp $")
+
+NCURSES_EXPORT(void)
+_nc_trace_xnames(TERMTYPE * tp GCC_UNUSED)
+{
+#ifdef TRACE
+#if NCURSES_XNAMES
+ int limit = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings;
+ int n, m;
+ if (limit) {
+ int begin_num = tp->ext_Booleans;
+ int begin_str = tp->ext_Booleans + tp->ext_Numbers;
+
+ _tracef("extended names (%s) %d = %d+%d+%d of %d+%d+%d",
+ tp->term_names,
+ limit,
+ tp->ext_Booleans, tp->ext_Numbers, tp->ext_Strings,
+ tp->num_Booleans, tp->num_Numbers, tp->num_Strings);
+ for (n = 0; n < limit; n++) {
+ if ((m = n - begin_str) >= 0) {
+ _tracef("[%d] %s = %s", n,
+ tp->ext_Names[n],
+ _nc_visbuf(tp->Strings[tp->num_Strings + m - tp->ext_Strings]));
+ } else if ((m = n - begin_num) >= 0) {
+ _tracef("[%d] %s = %d (num)", n,
+ tp->ext_Names[n],
+ tp->Numbers[tp->num_Numbers + m - tp->ext_Numbers]);
+ } else {
+ _tracef("[%d] %s = %d (bool)", n,
+ tp->ext_Names[n],
+ tp->Booleans[tp->num_Booleans + n - tp->ext_Booleans]);
+ }
+ }
+ }
+#endif
+#endif
+}
diff --git a/Build/source/libs/ncurses/ncurses/trace/varargs.c b/Build/source/libs/ncurses/ncurses/trace/varargs.c
new file mode 100644
index 00000000000..aee2010546a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/varargs.c
@@ -0,0 +1,182 @@
+/****************************************************************************
+ * Copyright (c) 2001-2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2001 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+
+MODULE_ID("$Id: varargs.c,v 1.4 2003/05/24 21:10:28 tom Exp $")
+
+#ifdef TRACE
+
+#define MAX_PARMS 10
+
+typedef enum {
+ atUnknown = 0, atInteger, atFloat, atPoint, atString
+} ARGTYPE;
+
+#define VA_INT(type) ival = va_arg(ap, type)
+#define VA_FLT(type) fval = va_arg(ap, type)
+#define VA_PTR(type) pval = (char *)va_arg(ap, type)
+#define VA_STR(type) sval = va_arg(ap, type)
+
+/*
+ * Returns a string that represents the parameter list of a printf-style call.
+ */
+NCURSES_EXPORT(char *)
+_nc_varargs(const char *fmt, va_list ap)
+{
+ static char dummy[] = "";
+ static char *result_buf;
+ static size_t result_len;
+
+ char buffer[BUFSIZ];
+ const char *param;
+ int n;
+
+ if (fmt == 0 || *fmt == '\0')
+ return dummy;
+ if (result_len == 0)
+ result_buf = typeMalloc(char, result_len = BUFSIZ);
+ if (result_buf == 0)
+ return dummy;
+ *result_buf = '\0';
+
+ while (*fmt != '\0') {
+ if (*fmt == '%') {
+ char *pval = 0; /* avoid const-cast */
+ const char *sval = "";
+ double fval = 0.0;
+ int done = FALSE;
+ int ival = 0;
+ int type = 0;
+ ARGTYPE parm[MAX_PARMS];
+ int parms = 0;
+ ARGTYPE used = atUnknown;
+
+ while (*++fmt != '\0' && !done) {
+
+ if (*fmt == '*') {
+ VA_INT(int);
+ if (parms < MAX_PARMS)
+ parm[parms++] = atInteger;
+ } else if (isalpha(UChar(*fmt))) {
+ done = TRUE;
+ switch (*fmt) {
+ case 'Z': /* FALLTHRU */
+ case 'h': /* FALLTHRU */
+ case 'l': /* FALLTHRU */
+ done = FALSE;
+ type = *fmt;
+ break;
+ case 'i': /* FALLTHRU */
+ case 'd': /* FALLTHRU */
+ case 'u': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ if (type == 'l')
+ VA_INT(long);
+ else if (type == 'Z')
+ VA_INT(size_t);
+ else
+ VA_INT(int);
+ used = atInteger;
+ break;
+ case 'f': /* FALLTHRU */
+ case 'e': /* FALLTHRU */
+ case 'E': /* FALLTHRU */
+ case 'g': /* FALLTHRU */
+ case 'G': /* FALLTHRU */
+ VA_FLT(double);
+ used = atFloat;
+ break;
+ case 'c':
+ VA_INT(int);
+ used = atInteger;
+ break;
+ case 's':
+ VA_STR(const char *);
+ used = atString;
+ break;
+ case 'p':
+ VA_PTR(void *);
+ used = atPoint;
+ break;
+ case 'n':
+ VA_PTR(int *);
+ used = atPoint;
+ break;
+ default:
+ break;
+ }
+ } else if (*fmt == '%') {
+ done = TRUE;
+ }
+ if (used != atUnknown && parms < MAX_PARMS) {
+ parm[parms++] = used;
+ for (n = 0; n < parms; ++n) {
+ used = parm[n];
+ param = buffer;
+ switch (used) {
+ case atInteger:
+ sprintf(buffer, "%d", ival);
+ break;
+ case atFloat:
+ sprintf(buffer, "%f", fval);
+ break;
+ case atPoint:
+ sprintf(buffer, "%p", pval);
+ break;
+ case atString:
+ param = _nc_visbuf2(1, sval);
+ break;
+ default:
+ strcpy(buffer, "?");
+ break;
+ }
+ result_len += strlen(param) + 2;
+ result_buf = typeRealloc(char, result_len, result_buf);
+ sprintf(result_buf + strlen(result_buf), ", %s", param);
+ }
+ }
+ used = atUnknown;
+ }
+ } else {
+ fmt++;
+ }
+ }
+
+ return (result_buf);
+}
+#else
+empty_module(_nc_varargs)
+#endif
diff --git a/Build/source/libs/ncurses/ncurses/trace/visbuf.c b/Build/source/libs/ncurses/ncurses/trace/visbuf.c
new file mode 100644
index 00000000000..6488eb7426f
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/trace/visbuf.c
@@ -0,0 +1,290 @@
+/****************************************************************************
+ * Copyright (c) 2001-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 1996-2004 *
+ * and: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * visbuf.c - Tracing/Debugging support routines
+ */
+
+#include <curses.priv.h>
+
+#include <tic.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: visbuf.c,v 1.10 2004/09/25 20:56:22 tom Exp $")
+
+static char *
+_nc_vischar(char *tp, unsigned c)
+{
+ if (c == '"' || c == '\\') {
+ *tp++ = '\\';
+ *tp++ = c;
+ } 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(UChar(c))) {
+ *tp++ = '\\';
+ *tp++ = '^';
+ *tp++ = '@' + c;
+ } else {
+ sprintf(tp, "\\%03lo", ChCharOf(c));
+ tp += strlen(tp);
+ }
+ *tp = 0;
+ return tp;
+}
+
+static const char *
+_nc_visbuf2n(int bufnum, const char *buf, int len)
+{
+ char *vbuf;
+ char *tp;
+ int c;
+
+ if (buf == 0)
+ return ("(null)");
+ if (buf == CANCELLED_STRING)
+ return ("(cancelled)");
+
+ if (len < 0)
+ len = strlen(buf);
+
+#ifdef TRACE
+ tp = vbuf = _nc_trace_buf(bufnum, (unsigned) (len * 4) + 5);
+#else
+ {
+ static char *mybuf[2];
+ mybuf[bufnum] = typeRealloc(char, (unsigned) (len * 4) + 5, mybuf[bufnum]);
+ tp = vbuf = mybuf[bufnum];
+ }
+#endif
+ *tp++ = D_QUOTE;
+ while ((--len >= 0) && (c = *buf++) != '\0') {
+ tp = _nc_vischar(tp, UChar(c));
+ }
+ *tp++ = D_QUOTE;
+ *tp++ = '\0';
+ return (vbuf);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_visbuf2(int bufnum, const char *buf)
+{
+ return _nc_visbuf2n(bufnum, buf, -1);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_visbuf(const char *buf)
+{
+ return _nc_visbuf2(0, buf);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_visbufn(const char *buf, int len)
+{
+ return _nc_visbuf2n(0, buf, len);
+}
+
+#if USE_WIDEC_SUPPORT
+#ifdef TRACE
+static const char *
+_nc_viswbuf2n(int bufnum, const wchar_t * buf, int len)
+{
+ char *vbuf;
+ char *tp;
+ wchar_t c;
+
+ if (buf == 0)
+ return ("(null)");
+
+ if (len < 0)
+ len = wcslen(buf);
+
+#ifdef TRACE
+ tp = vbuf = _nc_trace_buf(bufnum, (unsigned) (len * 4) + 5);
+#else
+ {
+ static char *mybuf[2];
+ mybuf[bufnum] = typeRealloc(char, (unsigned) (len * 4) + 5, mybuf[bufnum]);
+ tp = vbuf = mybuf[bufnum];
+ }
+#endif
+ *tp++ = D_QUOTE;
+ while ((--len >= 0) && (c = *buf++) != '\0') {
+ char temp[CCHARW_MAX + 80];
+ int j = wctomb(temp, c), k;
+ if (j <= 0) {
+ sprintf(temp, "\\u%08X", (wint_t) c);
+ j = strlen(temp);
+ }
+ for (k = 0; k < j; ++k) {
+ tp = _nc_vischar(tp, temp[k]);
+ }
+ }
+ *tp++ = D_QUOTE;
+ *tp++ = '\0';
+ return (vbuf);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_viswbuf2(int bufnum, const wchar_t * buf)
+{
+ return _nc_viswbuf2n(bufnum, buf, -1);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_viswbuf(const wchar_t * buf)
+{
+ return _nc_viswbuf2(0, buf);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_viswbufn(const wchar_t * buf, int len)
+{
+ return _nc_viswbuf2n(0, buf, len);
+}
+
+/* this special case is used for wget_wstr() */
+NCURSES_EXPORT(const char *)
+_nc_viswibuf(const wint_t * buf)
+{
+ static wchar_t *mybuf;
+ static unsigned mylen;
+ unsigned n;
+
+ for (n = 0; buf[n] != 0; ++n) ;
+ if (mylen < ++n) {
+ mylen = n + 80;
+ if (mybuf != 0)
+ mybuf = typeRealloc(wchar_t, mylen, mybuf);
+ else
+ mybuf = typeMalloc(wchar_t, mylen);
+ }
+ for (n = 0; buf[n] != 0; ++n)
+ mybuf[n] = (wchar_t) buf[n];
+
+ return _nc_viswbuf2(0, mybuf);
+}
+
+NCURSES_EXPORT(const char *)
+_nc_viscbuf2(int bufnum, const cchar_t * buf, int len)
+{
+ char *result = _nc_trace_buf(bufnum, BUFSIZ);
+ int n;
+ bool same = TRUE;
+ attr_t attr = A_NORMAL;
+ const char *found;
+
+ if (len < 0)
+ len = _nc_wchstrlen(buf);
+
+ for (n = 1; n < len; n++) {
+ if (AttrOf(buf[n]) != AttrOf(buf[0])) {
+ same = FALSE;
+ break;
+ }
+ }
+
+ /*
+ * If the rendition is the same for the whole string, display it as a
+ * quoted string, followed by the rendition. Otherwise, use the more
+ * detailed trace function that displays each character separately.
+ */
+ if (same) {
+ static const char d_quote[] =
+ {D_QUOTE, 0};
+
+ result = _nc_trace_bufcat(bufnum, d_quote);
+ while (len-- > 0) {
+ if ((found = _nc_altcharset_name(attr, CharOfD(buf))) != 0) {
+ result = _nc_trace_bufcat(bufnum, found);
+ attr &= ~A_ALTCHARSET;
+ } else if (!isnac(CHDEREF(buf))) {
+ PUTC_DATA;
+
+ PUTC_INIT;
+ do {
+ PUTC_ch = PUTC_i < CCHARW_MAX ? buf->chars[PUTC_i] : L'\0';
+ PUTC_n = wcrtomb(PUTC_buf, buf->chars[PUTC_i], &PUT_st);
+ if (PUTC_ch == L'\0')
+ --PUTC_n;
+ if (PUTC_n <= 0)
+ break;
+ for (n = 0; n < PUTC_n; n++) {
+ char temp[80];
+ _nc_vischar(temp, UChar(PUTC_buf[n]));
+ result = _nc_trace_bufcat(bufnum, temp);
+ }
+ ++PUTC_i;
+ } while (PUTC_ch != L'\0');
+ }
+ buf++;
+ }
+ result = _nc_trace_bufcat(bufnum, d_quote);
+ if (attr != A_NORMAL) {
+ result = _nc_trace_bufcat(bufnum, " | ");
+ result = _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr));
+ }
+ } else {
+ static const char l_brace[] =
+ {L_BRACE, 0};
+ static const char r_brace[] =
+ {R_BRACE, 0};
+ strcpy(result, l_brace);
+ while (len-- > 0) {
+ result = _nc_trace_bufcat(bufnum,
+ _tracecchar_t2(bufnum + 20, buf++));
+ }
+ result = _nc_trace_bufcat(bufnum, r_brace);
+ }
+ return result;
+}
+
+NCURSES_EXPORT(const char *)
+_nc_viscbuf(const cchar_t * buf, int len)
+{
+ return _nc_viscbuf2(0, buf, len);
+}
+#endif /* TRACE */
+#endif /* USE_WIDEC_SUPPORT */
diff --git a/Build/source/libs/ncurses/ncurses/tty/MKexpanded.sh b/Build/source/libs/ncurses/ncurses/tty/MKexpanded.sh
new file mode 100755
index 00000000000..8e4a6c6c5f0
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/MKexpanded.sh
@@ -0,0 +1,99 @@
+#! /bin/sh
+##############################################################################
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey <dickey@clark.net> 1997
+#
+# $Id: MKexpanded.sh,v 1.10 2000/12/10 00:24:33 tom Exp $
+#
+# Script to generate 'expanded.c', a dummy source that contains functions
+# corresponding to complex macros used in this library. By making functions,
+# we simplify analysis and debugging.
+
+if test $# != 0; then
+preprocessor="$1"
+else
+preprocessor="cc -E"
+fi
+shift
+if test $# != 0 ; then
+ preprocessor="$preprocessor $*"
+else
+ preprocessor="$preprocessor -DHAVE_CONFIG_H -I. -I../include"
+fi
+
+TMP=gen$$.c
+trap "rm -f $TMP" 0 1 2 5 15
+
+cat <<EOF
+/* generated by MKexpanded.sh */
+#include <curses.priv.h>
+#include <term.h>
+#if NCURSES_EXPANDED
+EOF
+
+cat >$TMP <<EOF
+#include <ncurses_cfg.h>
+#undef NCURSES_EXPANDED /* this probably is set in ncurses_cfg.h */
+#include <curses.priv.h>
+/* these are names we'd like to see */
+#undef ALL_BUT_COLOR
+#undef PAIR_NUMBER
+#undef TRUE
+#undef FALSE
+/* this is a marker */
+IGNORE
+NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *S, attr_t at)
+{
+ toggle_attr_on(*S,at);
+}
+NCURSES_EXPORT(void) _nc_toggle_attr_off (attr_t *S, attr_t at)
+{
+ toggle_attr_off(*S,at);
+}
+NCURSES_EXPORT(int) _nc_DelCharCost (int count)
+{
+ return DelCharCost(count);
+}
+NCURSES_EXPORT(int) _nc_InsCharCost (int count)
+{
+ return InsCharCost(count);
+}
+NCURSES_EXPORT(void) _nc_UpdateAttrs (chtype c)
+{
+ UpdateAttrs(c);
+}
+EOF
+
+$preprocessor $TMP 2>/dev/null | sed -e '1,/^IGNORE$/d'
+
+cat <<EOF
+#else /* ! NCURSES_EXPANDED */
+NCURSES_EXPORT(void) _nc_expanded (void) { }
+#endif /* NCURSES_EXPANDED */
+EOF
diff --git a/Build/source/libs/ncurses/ncurses/tty/hardscroll.c b/Build/source/libs/ncurses/ncurses/tty/hardscroll.c
new file mode 100644
index 00000000000..7815db75ae3
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/hardscroll.c
@@ -0,0 +1,325 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/******************************************************************************
+
+NAME
+ hardscroll.c -- hardware-scrolling optimization for ncurses
+
+SYNOPSIS
+ void _nc_scroll_optimize(void)
+
+DESCRIPTION
+ OVERVIEW
+
+This algorithm for computes optimum hardware scrolling to transform an
+old screen (curscr) into a new screen (newscr) via vertical line moves.
+
+Because the screen has a `grain' (there are insert/delete/scroll line
+operations but no insert/delete/scroll column operations), it is efficient
+break the update algorithm into two pieces: a first stage that does only line
+moves, optimizing the end product of user-invoked insertions, deletions, and
+scrolls; and a second phase (corresponding to the present doupdate code in
+ncurses) that does only line transformations.
+
+The common case we want hardware scrolling for is to handle line insertions
+and deletions in screen-oriented text-editors. This two-stage approach will
+accomplish that at a low computation and code-size cost.
+
+ LINE-MOVE COMPUTATION
+
+Now, to a discussion of the line-move computation.
+
+For expository purposes, consider the screen lines to be represented by
+integers 0..23 (with the understanding that the value of 23 may vary).
+Let a new line introduced by insertion, scrolling, or at the bottom of
+the screen following a line delete be given the index -1.
+
+Assume that the real screen starts with lines 0..23. Now, we have
+the following possible line-oriented operations on the screen:
+
+Insertion: inserts a line at a given screen row, forcing all lines below
+to scroll forward. The last screen line is lost. For example, an insertion
+at line 5 would produce: 0..4 -1 5..23.
+
+Deletion: deletes a line at a given screen row, forcing all lines below
+to scroll forward. The last screen line is made new. For example, a deletion
+at line 7 would produce: 0..6 8..23 -1.
+
+Scroll up: move a range of lines up 1. The bottom line of the range
+becomes new. For example, scrolling up the region from 9 to 14 will
+produce 0..8 10..14 -1 15..23.
+
+Scroll down: move a range of lines down 1. The top line of the range
+becomes new. For example, scrolling down the region from 12 to 16 will produce
+0..11 -1 12..15 17..23.
+
+Now, an obvious property of all these operations is that they preserve the
+order of old lines, though not their position in the sequence.
+
+The key trick of this algorithm is that the original line indices described
+above are actually maintained as _line[].oldindex fields in the window
+structure, and stick to each line through scroll and insert/delete operations.
+
+Thus, it is possible at update time to look at the oldnum fields and compute
+an optimal set of il/dl/scroll operations that will take the real screen
+lines to the virtual screen lines. Once these vertical moves have been done,
+we can hand off to the second stage of the update algorithm, which does line
+transformations.
+
+Note that the move computation does not need to have the full generality
+of a diff algorithm (which it superficially resembles) because lines cannot
+be moved out of order.
+
+ THE ALGORITHM
+
+The scrolling is done in two passes. The first pass is from top to bottom
+scroling hunks UP. The second one is from bottom to top scrolling hunks DOWN.
+Obviously enough, no lines to be scrolled will be destroyed. (lav)
+
+HOW TO TEST THIS:
+
+Use the following production:
+
+hardscroll: hardscroll.c
+ $(CC) -g -DSCROLLDEBUG hardscroll.c -o hardscroll
+
+Then just type scramble vectors and watch. The following test loads are
+a representative sample of cases:
+
+----------------------------- CUT HERE ------------------------------------
+# No lines moved
+ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+#
+# A scroll up
+ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 -1
+#
+# A scroll down
+-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
+#
+# An insertion (after line 12)
+ 0 1 2 3 4 5 6 7 8 9 10 11 12 -1 13 14 15 16 17 18 19 20 21 22
+#
+# A simple deletion (line 10)
+ 0 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 20 21 22 23 -1
+#
+# A more complex case
+-1 -1 -1 -1 -1 3 4 5 6 7 -1 -1 8 9 10 11 12 13 14 15 16 17 -1 -1
+----------------------------- CUT HERE ------------------------------------
+
+AUTHOR
+ Eric S. Raymond <esr@snark.thyrsus.com>, November 1994
+ New algorithm by Alexander V. Lukyanov <lav@yars.free.net>, Aug 1997
+
+*****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: hardscroll.c,v 1.36 2001/01/14 00:17:28 tom Exp $")
+
+#if defined(SCROLLDEBUG) || defined(HASHDEBUG)
+
+# undef screen_lines
+# define screen_lines MAXLINES
+NCURSES_EXPORT_VAR(int)
+oldnums[MAXLINES];
+# define OLDNUM(n) oldnums[n]
+# define _tracef printf
+# undef TR
+# define TR(n, a) if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
+
+#else /* no debug */
+
+/* OLDNUM(n) indicates which line will be shifted to the position n.
+ if OLDNUM(n) == _NEWINDEX, then the line n in new, not shifted from
+ somewhere. */
+NCURSES_EXPORT_VAR(int *)
+_nc_oldnums = 0;
+
+# if USE_HASHMAP
+ static int oldnums_allocated = 0;
+# define oldnums _nc_oldnums
+# define OLDNUM(n) oldnums[n]
+# else /* !USE_HASHMAP */
+# define OLDNUM(n) newscr->_line[n].oldindex
+# endif /* !USE_HASHMAP */
+
+#endif /* defined(SCROLLDEBUG) || defined(HASHDEBUG) */
+
+NCURSES_EXPORT(void)
+_nc_scroll_optimize(void)
+/* scroll optimization to transform curscr to newscr */
+{
+ int i;
+ int start, end, shift;
+
+ TR(TRACE_ICALLS, ("_nc_scroll_optimize() begins"));
+
+#if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
+#if USE_HASHMAP
+ /* get enough storage */
+ if (oldnums_allocated < screen_lines) {
+ int *new_oldnums = typeRealloc(int, screen_lines, oldnums);
+ if (!new_oldnums)
+ return;
+ oldnums = new_oldnums;
+ oldnums_allocated = screen_lines;
+ }
+ /* calculate the indices */
+ _nc_hash_map();
+#endif
+#endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
+
+#ifdef TRACE
+ if (_nc_tracing & (TRACE_UPDATE | TRACE_MOVE))
+ _nc_linedump();
+#endif /* TRACE */
+
+ /* pass 1 - from top to bottom scrolling up */
+ for (i = 0; i < screen_lines;) {
+ while (i < screen_lines && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) <= i))
+ i++;
+ if (i >= screen_lines)
+ break;
+
+ shift = OLDNUM(i) - i; /* shift > 0 */
+ start = i;
+
+ i++;
+ while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
+ == shift)
+ i++;
+ end = i - 1 + shift;
+
+ TR(TRACE_UPDATE | TRACE_MOVE, ("scroll [%d, %d] by %d", start, end, shift));
+#if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
+ if (_nc_scrolln(shift, start, end, screen_lines - 1) == ERR) {
+ TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
+ continue;
+ }
+#endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
+ }
+
+ /* pass 2 - from bottom to top scrolling down */
+ for (i = screen_lines - 1; i >= 0;) {
+ while (i >= 0 && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) >= i))
+ i--;
+ if (i < 0)
+ break;
+
+ shift = OLDNUM(i) - i; /* shift < 0 */
+ end = i;
+
+ i--;
+ while (i >= 0 && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i == shift)
+ i--;
+ start = i + 1 - (-shift);
+
+ TR(TRACE_UPDATE | TRACE_MOVE, ("scroll [%d, %d] by %d", start, end, shift));
+#if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
+ if (_nc_scrolln(shift, start, end, screen_lines - 1) == ERR) {
+ TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
+ continue;
+ }
+#endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
+ }
+}
+
+#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
+NCURSES_EXPORT(void)
+_nc_linedump(void)
+/* dump the state of the real and virtual oldnum fields */
+{
+ static size_t have;
+ static char *buf;
+
+ int n;
+ size_t want = (screen_lines + 1) * 4;
+
+ if (have < want)
+ buf = typeMalloc(char, have = want);
+
+ (void) strcpy(buf, "virt");
+ for (n = 0; n < screen_lines; n++)
+ (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n));
+ TR(TRACE_UPDATE | TRACE_MOVE, (buf));
+#if NO_LEAKS
+ free(buf);
+ have = 0;
+#endif
+}
+#endif /* defined(TRACE) || defined(SCROLLDEBUG) */
+
+#ifdef SCROLLDEBUG
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ char line[BUFSIZ], *st;
+
+#ifdef TRACE
+ _nc_tracing = TRACE_MOVE;
+#endif
+ for (;;) {
+ int n;
+
+ for (n = 0; n < screen_lines; n++)
+ oldnums[n] = _NEWINDEX;
+
+ /* grab the test vector */
+ if (fgets(line, sizeof(line), stdin) == (char *) NULL)
+ exit(EXIT_SUCCESS);
+
+ /* parse it */
+ n = 0;
+ if (line[0] == '#') {
+ (void) fputs(line, stderr);
+ continue;
+ }
+ st = strtok(line, " ");
+ do {
+ oldnums[n++] = atoi(st);
+ } while
+ ((st = strtok((char *) NULL, " ")) != 0);
+
+ /* display it */
+ (void) fputs("Initial input:\n", stderr);
+ _nc_linedump();
+
+ _nc_scroll_optimize();
+ }
+}
+
+#endif /* SCROLLDEBUG */
+
+/* hardscroll.c ends here */
diff --git a/Build/source/libs/ncurses/ncurses/tty/hashmap.c b/Build/source/libs/ncurses/ncurses/tty/hashmap.c
new file mode 100644
index 00000000000..ba53786a534
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/hashmap.c
@@ -0,0 +1,538 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/******************************************************************************
+
+NAME
+ hashmap.c -- fill in scramble vector based on text hashes
+
+SYNOPSIS
+ void _nc_hash_map(void)
+
+DESCRIPTION:
+ This code attempts to recognize pairs of old and new lines in the physical
+and virtual screens. When a line pair is recognized, the old line index is
+placed in the oldindex member of the virtual screen line, to be used by the
+vertical-motion optimizer portion of the update logic (see hardscroll.c).
+
+ Line pairs are recognized by applying a modified Heckel's algorithm,
+sped up by hashing. If a line hash is unique in both screens, those
+lines must be a pair. Then if the lines just before or after the pair
+are the same or similar, they are a pair too.
+
+ We don't worry about false pairs produced by hash collisions, on the
+assumption that such cases are rare and will only make the latter stages
+of update less efficient, not introduce errors.
+
+HOW TO TEST THIS:
+
+Use the following production:
+
+hashmap: hashmap.c
+ $(CC) -g -DHASHDEBUG hashmap.c hardscroll.c ../objects/lib_trace.o -o hashmap
+
+AUTHOR
+ Eric S. Raymond <esr@snark.thyrsus.com>, May 1996
+ Bug fixes and improvements by Alexander V. Lukyanov <lav@yars.free.net>, 1997
+
+*****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h> /* for back_color_erase */
+
+MODULE_ID("$Id: hashmap.c,v 1.46 2002/09/07 18:13:15 tom Exp $")
+
+#ifdef HASHDEBUG
+
+# define _tracef printf
+# undef TR
+# define TR(n, a) if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
+# undef screen_lines
+# define screen_lines MAXLINES
+# define TEXTWIDTH 1
+int oldnums[MAXLINES], reallines[MAXLINES];
+static chtype oldtext[MAXLINES][TEXTWIDTH], newtext[MAXLINES][TEXTWIDTH];
+# define OLDNUM(n) oldnums[n]
+# define OLDTEXT(n) oldtext[n]
+# define NEWTEXT(m) newtext[m]
+# define PENDING(n) 1
+
+#else /* !HASHDEBUG */
+
+# define OLDNUM(n) _nc_oldnums[n]
+# define OLDTEXT(n) curscr->_line[n].text
+# define NEWTEXT(m) newscr->_line[m].text
+# define TEXTWIDTH (curscr->_maxx+1)
+# define PENDING(n) (newscr->_line[n].firstchar != _NOCHANGE)
+
+#endif /* !HASHDEBUG */
+
+#define oldhash (SP->oldhash)
+#define newhash (SP->newhash)
+#define hashtab (SP->hashtab)
+#define lines_alloc (SP->hashtab_len)
+
+#if USE_WIDEC_SUPPORT
+#define HASH_VAL(ch) (ch.chars[0])
+#else
+#define HASH_VAL(ch) (ch)
+#endif
+
+static inline unsigned long
+hash(NCURSES_CH_T * text)
+{
+ int i;
+ NCURSES_CH_T ch;
+ unsigned long result = 0;
+ for (i = TEXTWIDTH; i > 0; i--) {
+ ch = *text++;
+ result += (result << 5) + HASH_VAL(ch);
+ }
+ return result;
+}
+
+/* approximate update cost */
+static int
+update_cost(NCURSES_CH_T * from, NCURSES_CH_T * to)
+{
+ int cost = 0;
+ int i;
+
+ for (i = TEXTWIDTH; i > 0; i--)
+ if (!(CharEq(*from++, *to++)))
+ cost++;
+
+ return cost;
+}
+
+static int
+update_cost_from_blank(NCURSES_CH_T * to)
+{
+ int cost = 0;
+ int i;
+ NCURSES_CH_T blank = NewChar2(BLANK_TEXT, BLANK_ATTR);
+
+ if (back_color_erase)
+ AddAttr(blank, (AttrOf(stdscr->_nc_bkgd) & A_COLOR));
+
+ for (i = TEXTWIDTH; i > 0; i--)
+ if (!(CharEq(blank, *to++)))
+ cost++;
+
+ return cost;
+}
+
+/*
+ * Returns true when moving line 'from' to line 'to' seems to be cost
+ * effective. 'blank' indicates whether the line 'to' would become blank.
+ */
+static inline bool
+cost_effective(const int from, const int to, const bool blank)
+{
+ int new_from;
+
+ if (from == to)
+ return FALSE;
+
+ new_from = OLDNUM(from);
+ if (new_from == _NEWINDEX)
+ new_from = from;
+
+ /*
+ * On the left side of >= is the cost before moving;
+ * on the right side -- cost after moving.
+ */
+ return (((blank ? update_cost_from_blank(NEWTEXT(to))
+ : update_cost(OLDTEXT(to), NEWTEXT(to)))
+ + update_cost(OLDTEXT(new_from), NEWTEXT(from)))
+ >= ((new_from == from ? update_cost_from_blank(NEWTEXT(from))
+ : update_cost(OLDTEXT(new_from), NEWTEXT(from)))
+ + update_cost(OLDTEXT(from), NEWTEXT(to)))) ? TRUE : FALSE;
+}
+
+static void
+grow_hunks(void)
+{
+ int start, end, shift;
+ int back_limit, forward_limit; /* limits for cells to fill */
+ int back_ref_limit, forward_ref_limit; /* limits for refrences */
+ int i;
+ int next_hunk;
+
+ /*
+ * This is tricky part. We have unique pairs to use as anchors.
+ * Use these to deduce the presence of spans of identical lines.
+ */
+ back_limit = 0;
+ back_ref_limit = 0;
+
+ i = 0;
+ while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
+ i++;
+ for (; i < screen_lines; i = next_hunk) {
+ start = i;
+ shift = OLDNUM(i) - i;
+
+ /* get forward limit */
+ i = start + 1;
+ while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
+ == shift)
+ i++;
+ end = i;
+ while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
+ i++;
+ next_hunk = i;
+ forward_limit = i;
+ if (i >= screen_lines || OLDNUM(i) >= i)
+ forward_ref_limit = i;
+ else
+ forward_ref_limit = OLDNUM(i);
+
+ i = start - 1;
+ /* grow back */
+ if (shift < 0)
+ back_limit = back_ref_limit + (-shift);
+ while (i >= back_limit) {
+ if (newhash[i] == oldhash[i + shift]
+ || cost_effective(i + shift, i, shift < 0)) {
+ OLDNUM(i) = i + shift;
+ TR(TRACE_UPDATE | TRACE_MOVE,
+ ("connected new line %d to old line %d (backward continuation)",
+ i, i + shift));
+ } else {
+ TR(TRACE_UPDATE | TRACE_MOVE,
+ ("not connecting new line %d to old line %d (backward continuation)",
+ i, i + shift));
+ break;
+ }
+ i--;
+ }
+
+ i = end;
+ /* grow forward */
+ if (shift > 0)
+ forward_limit = forward_ref_limit - shift;
+ while (i < forward_limit) {
+ if (newhash[i] == oldhash[i + shift]
+ || cost_effective(i + shift, i, shift > 0)) {
+ OLDNUM(i) = i + shift;
+ TR(TRACE_UPDATE | TRACE_MOVE,
+ ("connected new line %d to old line %d (forward continuation)",
+ i, i + shift));
+ } else {
+ TR(TRACE_UPDATE | TRACE_MOVE,
+ ("not connecting new line %d to old line %d (forward continuation)",
+ i, i + shift));
+ break;
+ }
+ i++;
+ }
+
+ back_ref_limit = back_limit = i;
+ if (shift > 0)
+ back_ref_limit += shift;
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_hash_map(void)
+{
+ HASHMAP *sp;
+ register int i;
+ int start, shift, size;
+
+ if (screen_lines > lines_alloc) {
+ if (hashtab)
+ free(hashtab);
+ hashtab = typeMalloc(HASHMAP, (screen_lines + 1) * 2);
+ if (!hashtab) {
+ if (oldhash) {
+ FreeAndNull(oldhash);
+ }
+ lines_alloc = 0;
+ return;
+ }
+ lines_alloc = screen_lines;
+ }
+
+ if (oldhash && newhash) {
+ /* re-hash only changed lines */
+ for (i = 0; i < screen_lines; i++) {
+ if (PENDING(i))
+ newhash[i] = hash(NEWTEXT(i));
+ }
+ } else {
+ /* re-hash all */
+ if (oldhash == 0)
+ oldhash = typeCalloc(unsigned long, (unsigned) screen_lines);
+ if (newhash == 0)
+ newhash = typeCalloc(unsigned long, (unsigned) screen_lines);
+ if (!oldhash || !newhash)
+ return; /* malloc failure */
+ for (i = 0; i < screen_lines; i++) {
+ newhash[i] = hash(NEWTEXT(i));
+ oldhash[i] = hash(OLDTEXT(i));
+ }
+ }
+
+#ifdef HASH_VERIFY
+ for (i = 0; i < screen_lines; i++) {
+ if (newhash[i] != hash(NEWTEXT(i)))
+ fprintf(stderr, "error in newhash[%d]\n", i);
+ if (oldhash[i] != hash(OLDTEXT(i)))
+ fprintf(stderr, "error in oldhash[%d]\n", i);
+ }
+#endif
+
+ /*
+ * Set up and count line-hash values.
+ */
+ memset(hashtab, '\0', sizeof(*hashtab) * (screen_lines + 1) * 2);
+ for (i = 0; i < screen_lines; i++) {
+ unsigned long hashval = oldhash[i];
+
+ for (sp = hashtab; sp->hashval; sp++)
+ if (sp->hashval == hashval)
+ break;
+ sp->hashval = hashval; /* in case this is a new entry */
+ sp->oldcount++;
+ sp->oldindex = i;
+ }
+ for (i = 0; i < screen_lines; i++) {
+ unsigned long hashval = newhash[i];
+
+ for (sp = hashtab; sp->hashval; sp++)
+ if (sp->hashval == hashval)
+ break;
+ sp->hashval = hashval; /* in case this is a new entry */
+ sp->newcount++;
+ sp->newindex = i;
+
+ OLDNUM(i) = _NEWINDEX; /* initialize old indices array */
+ }
+
+ /*
+ * Mark line pairs corresponding to unique hash pairs.
+ *
+ * We don't mark lines with offset 0, because it can make fail
+ * extending hunks by cost_effective. Otherwise, it does not
+ * have any side effects.
+ */
+ for (sp = hashtab; sp->hashval; sp++)
+ if (sp->oldcount == 1 && sp->newcount == 1
+ && sp->oldindex != sp->newindex) {
+ TR(TRACE_UPDATE | TRACE_MOVE,
+ ("new line %d is hash-identical to old line %d (unique)",
+ sp->newindex, sp->oldindex));
+ OLDNUM(sp->newindex) = sp->oldindex;
+ }
+
+ grow_hunks();
+
+ /*
+ * Eliminate bad or impossible shifts -- this includes removing
+ * those hunks which could not grow because of conflicts, as well
+ * those which are to be moved too far, they are likely to destroy
+ * more than carry.
+ */
+ for (i = 0; i < screen_lines;) {
+ while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
+ i++;
+ if (i >= screen_lines)
+ break;
+ start = i;
+ shift = OLDNUM(i) - i;
+ i++;
+ while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
+ == shift)
+ i++;
+ size = i - start;
+ if (size < 3 || size + min(size / 8, 2) < abs(shift)) {
+ while (start < i) {
+ OLDNUM(start) = _NEWINDEX;
+ start++;
+ }
+ }
+ }
+
+ /* After clearing invalid hunks, try grow the rest. */
+ grow_hunks();
+}
+
+NCURSES_EXPORT(void)
+_nc_make_oldhash(int i)
+{
+ if (oldhash)
+ oldhash[i] = hash(OLDTEXT(i));
+}
+
+NCURSES_EXPORT(void)
+_nc_scroll_oldhash(int n, int top, int bot)
+{
+ size_t size;
+ int i;
+
+ if (!oldhash)
+ return;
+
+ size = sizeof(*oldhash) * (bot - top + 1 - abs(n));
+ if (n > 0) {
+ memmove(oldhash + top, oldhash + top + n, size);
+ for (i = bot; i > bot - n; i--)
+ oldhash[i] = hash(OLDTEXT(i));
+ } else {
+ memmove(oldhash + top - n, oldhash + top, size);
+ for (i = top; i < top - n; i++)
+ oldhash[i] = hash(OLDTEXT(i));
+ }
+}
+
+#ifdef HASHDEBUG
+static void
+usage(void)
+{
+ static const char *table[] =
+ {
+ "hashmap test-driver",
+ "",
+ "# comment",
+ "l get initial line number vector",
+ "n use following letters as text of new lines",
+ "o use following letters as text of old lines",
+ "d dump state of test arrays",
+ "h apply hash mapper and see scroll optimization",
+ "? this message"
+ };
+ size_t n;
+ for (n = 0; n < sizeof(table) / sizeof(table[0]); n++)
+ fprintf(stderr, "%s\n", table[n]);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ char line[BUFSIZ], *st;
+ int n;
+
+ SP = typeCalloc(SCREEN, 1);
+ for (n = 0; n < screen_lines; n++) {
+ reallines[n] = n;
+ oldnums[n] = _NEWINDEX;
+ oldtext[n][0] = newtext[n][0] = '.';
+ }
+
+ if (isatty(fileno(stdin)))
+ usage();
+
+#ifdef TRACE
+ _nc_tracing = TRACE_MOVE;
+#endif
+ for (;;) {
+ /* grab a test command */
+ if (fgets(line, sizeof(line), stdin) == (char *) NULL)
+ exit(EXIT_SUCCESS);
+
+ switch (line[0]) {
+ case '#': /* comment */
+ (void) fputs(line, stderr);
+ break;
+
+ case 'l': /* get initial line number vector */
+ for (n = 0; n < screen_lines; n++) {
+ reallines[n] = n;
+ oldnums[n] = _NEWINDEX;
+ }
+ n = 0;
+ st = strtok(line, " ");
+ do {
+ oldnums[n++] = atoi(st);
+ } while
+ ((st = strtok((char *) NULL, " ")) != 0);
+ break;
+
+ case 'n': /* use following letters as text of new lines */
+ for (n = 0; n < screen_lines; n++)
+ newtext[n][0] = '.';
+ for (n = 0; n < screen_lines; n++)
+ if (line[n + 1] == '\n')
+ break;
+ else
+ newtext[n][0] = line[n + 1];
+ break;
+
+ case 'o': /* use following letters as text of old lines */
+ for (n = 0; n < screen_lines; n++)
+ oldtext[n][0] = '.';
+ for (n = 0; n < screen_lines; n++)
+ if (line[n + 1] == '\n')
+ break;
+ else
+ oldtext[n][0] = line[n + 1];
+ break;
+
+ case 'd': /* dump state of test arrays */
+#ifdef TRACE
+ _nc_linedump();
+#endif
+ (void) fputs("Old lines: [", stdout);
+ for (n = 0; n < screen_lines; n++)
+ putchar(oldtext[n][0]);
+ putchar(']');
+ putchar('\n');
+ (void) fputs("New lines: [", stdout);
+ for (n = 0; n < screen_lines; n++)
+ putchar(newtext[n][0]);
+ putchar(']');
+ putchar('\n');
+ break;
+
+ case 'h': /* apply hash mapper and see scroll optimization */
+ _nc_hash_map();
+ (void) fputs("Result:\n", stderr);
+#ifdef TRACE
+ _nc_linedump();
+#endif
+ _nc_scroll_optimize();
+ (void) fputs("Done.\n", stderr);
+ break;
+ case '?':
+ usage();
+ break;
+ }
+ }
+ return EXIT_SUCCESS;
+}
+
+#endif /* HASHDEBUG */
+
+/* hashmap.c ends here */
diff --git a/Build/source/libs/ncurses/ncurses/tty/lib_mvcur.c b/Build/source/libs/ncurses/ncurses/tty/lib_mvcur.c
new file mode 100644
index 00000000000..637ae7e3432
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/lib_mvcur.c
@@ -0,0 +1,1236 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_mvcur.c
+**
+** The routines for moving the physical cursor and scrolling:
+**
+** void _nc_mvcur_init(void)
+**
+** void _nc_mvcur_resume(void)
+**
+** int mvcur(int old_y, int old_x, int new_y, int new_x)
+**
+** void _nc_mvcur_wrap(void)
+**
+** Comparisons with older movement optimizers:
+** SVr3 curses mvcur() can't use cursor_to_ll or auto_left_margin.
+** 4.4BSD curses can't use cuu/cud/cuf/cub/hpa/vpa/tab/cbt for local
+** motions. It doesn't use tactics based on auto_left_margin. Weirdly
+** enough, it doesn't use its own hardware-scrolling routine to scroll up
+** destination lines for out-of-bounds addresses!
+** old ncurses optimizer: less accurate cost computations (in fact,
+** it was broken and had to be commented out!).
+**
+** Compile with -DMAIN to build an interactive tester/timer for the movement
+** optimizer. You can use it to investigate the optimizer's behavior.
+** You can also use it for tuning the formulas used to determine whether
+** or not full optimization is attempted.
+**
+** This code has a nasty tendency to find bugs in terminfo entries, because it
+** exercises the non-cup movement capabilities heavily. If you think you've
+** found a bug, try deleting subsets of the following capabilities (arranged
+** in decreasing order of suspiciousness): it, tab, cbt, hpa, vpa, cuu, cud,
+** cuf, cub, cuu1, cud1, cuf1, cub1. It may be that one or more are wrong.
+**
+** Note: you should expect this code to look like a resource hog in a profile.
+** That's because it does a lot of I/O, through the tputs() calls. The I/O
+** cost swamps the computation overhead (and as machines get faster, this
+** will become even more true). Comments in the test exerciser at the end
+** go into detail about tuning and how you can gauge the optimizer's
+** effectiveness.
+**/
+
+/****************************************************************************
+ *
+ * Constants and macros for optimizer tuning.
+ *
+ ****************************************************************************/
+
+/*
+ * The average overhead of a full optimization computation in character
+ * transmission times. If it's too high, the algorithm will be a bit
+ * over-biased toward using cup rather than local motions; if it's too
+ * low, the algorithm may spend more time than is strictly optimal
+ * looking for non-cup motions. Profile the optimizer using the `t'
+ * command of the exerciser (see below), and round to the nearest integer.
+ *
+ * Yes, I (esr) thought about computing expected overhead dynamically, say
+ * by derivation from a running average of optimizer times. But the
+ * whole point of this optimization is to *decrease* the frequency of
+ * system calls. :-)
+ */
+#define COMPUTE_OVERHEAD 1 /* I use a 90MHz Pentium @ 9.6Kbps */
+
+/*
+ * LONG_DIST is the distance we consider to be just as costly to move over as a
+ * cup sequence is to emit. In other words, it's the length of a cup sequence
+ * adjusted for average computation overhead. The magic number is the length
+ * of "\033[yy;xxH", the typical cup sequence these days.
+ */
+#define LONG_DIST (8 - COMPUTE_OVERHEAD)
+
+/*
+ * Tell whether a motion is optimizable by local motions. Needs to be cheap to
+ * compute. In general, all the fast moves go to either the right or left edge
+ * of the screen. So any motion to a location that is (a) further away than
+ * LONG_DIST and (b) further inward from the right or left edge than LONG_DIST,
+ * we'll consider nonlocal.
+ */
+#define NOT_LOCAL(fy, fx, ty, tx) ((tx > LONG_DIST) \
+ && (tx < screen_columns - 1 - LONG_DIST) \
+ && (abs(ty-fy) + abs(tx-fx) > LONG_DIST))
+
+/****************************************************************************
+ *
+ * External interfaces
+ *
+ ****************************************************************************/
+
+/*
+ * For this code to work OK, the following components must live in the
+ * screen structure:
+ *
+ * int _char_padding; // cost of character put
+ * int _cr_cost; // cost of (carriage_return)
+ * int _cup_cost; // cost of (cursor_address)
+ * int _home_cost; // cost of (cursor_home)
+ * int _ll_cost; // cost of (cursor_to_ll)
+ *#if USE_HARD_TABS
+ * int _ht_cost; // cost of (tab)
+ * int _cbt_cost; // cost of (back_tab)
+ *#endif USE_HARD_TABS
+ * int _cub1_cost; // cost of (cursor_left)
+ * int _cuf1_cost; // cost of (cursor_right)
+ * int _cud1_cost; // cost of (cursor_down)
+ * int _cuu1_cost; // cost of (cursor_up)
+ * int _cub_cost; // cost of (parm_cursor_left)
+ * int _cuf_cost; // cost of (parm_cursor_right)
+ * int _cud_cost; // cost of (parm_cursor_down)
+ * int _cuu_cost; // cost of (parm_cursor_up)
+ * int _hpa_cost; // cost of (column_address)
+ * int _vpa_cost; // cost of (row_address)
+ * int _ech_cost; // cost of (erase_chars)
+ * int _rep_cost; // cost of (repeat_char)
+ *
+ * The USE_HARD_TABS switch controls whether it is reliable to use tab/backtabs
+ * for local motions. On many systems, it's not, due to uncertainties about
+ * tab delays and whether or not tabs will be expanded in raw mode. If you
+ * have parm_right_cursor, tab motions don't win you a lot anyhow.
+ */
+
+#include <curses.priv.h>
+#include <term.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_mvcur.c,v 1.98 2004/04/03 22:32:24 tom Exp $")
+
+#define WANT_CHAR(y, x) SP->_newscr->_line[y].text[x] /* desired state */
+#define BAUDRATE cur_term->_baudrate /* bits per second */
+
+#if defined(MAIN) || defined(NCURSES_TEST)
+#include <sys/time.h>
+
+static bool profiling = FALSE;
+static float diff;
+#endif /* MAIN */
+
+#define OPT_SIZE 512
+
+static int normalized_cost(const char *const cap, int affcnt);
+
+/****************************************************************************
+ *
+ * Initialization/wrapup (including cost pre-computation)
+ *
+ ****************************************************************************/
+
+#ifdef TRACE
+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 %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 %s", capname, result, _nc_visbuf(cap)));
+ return result;
+}
+#define NormalizedCost(cap,affcnt) trace_normalized_cost(#cap,cap,affcnt);
+
+#else
+
+#define CostOf(cap,affcnt) _nc_msec_cost(cap,affcnt);
+#define NormalizedCost(cap,affcnt) normalized_cost(cap,affcnt);
+
+#endif
+
+NCURSES_EXPORT(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.0;
+
+ for (cp = cap; *cp; cp++) {
+ /* extract padding, either mandatory or required */
+ if (cp[0] == '$' && cp[1] == '<' && strchr(cp, '>')) {
+ float number = 0.0;
+
+ for (cp += 2; *cp != '>'; cp++) {
+ if (isdigit(UChar(*cp)))
+ number = number * 10 + (*cp - '0');
+ else if (*cp == '*')
+ number *= affcnt;
+ else if (*cp == '.' && (*++cp != '>') && isdigit(UChar(*cp)))
+ number += (*cp - '0') / 10.0;
+ }
+
+#if NCURSES_NO_PADDING
+ if (!(SP->_no_padding))
+#endif
+ cum_cost += number * 10;
+ } else
+ cum_cost += SP->_char_padding;
+ }
+
+ return ((int) cum_cost);
+ }
+}
+
+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;
+}
+
+static void
+reset_scroll_region(void)
+/* Set the scroll-region to a known state (the default) */
+{
+ if (change_scroll_region) {
+ TPUTS_TRACE("change_scroll_region");
+ putp(tparm(change_scroll_region, 0, screen_lines - 1));
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_mvcur_resume(void)
+/* what to do at initialization time and after each shellout */
+{
+ /* initialize screen for cursor access */
+ if (enter_ca_mode) {
+ TPUTS_TRACE("enter_ca_mode");
+ putp(enter_ca_mode);
+ }
+
+ /*
+ * Doing this here rather than in _nc_mvcur_wrap() ensures that
+ * ncurses programs will see a reset scroll region even if a
+ * program that messed with it died ungracefully.
+ *
+ * This also undoes the effects of terminal init strings that assume
+ * they know the screen size. This is useful when you're running
+ * a vt100 emulation through xterm.
+ */
+ reset_scroll_region();
+ SP->_cursrow = SP->_curscol = -1;
+
+ /* restore cursor shape */
+ if (SP->_cursor != -1) {
+ int cursor = SP->_cursor;
+ SP->_cursor = -1;
+ curs_set(cursor);
+ }
+}
+
+NCURSES_EXPORT(void)
+_nc_mvcur_init(void)
+/* initialize the cost structure */
+{
+ if (isatty(fileno(SP->_ofp)))
+ SP->_char_padding = ((BAUDBYTE * 1000 * 10)
+ / (BAUDRATE > 0 ? BAUDRATE : 9600));
+ else
+ SP->_char_padding = 1; /* must be nonzero */
+ if (SP->_char_padding <= 0)
+ SP->_char_padding = 1; /* must be nonzero */
+ TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP->_char_padding));
+
+ /* non-parameterized local-motion strings */
+ SP->_cr_cost = CostOf(carriage_return, 0);
+ SP->_home_cost = CostOf(cursor_home, 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);
+#endif /* USE_HARD_TABS */
+ SP->_cub1_cost = CostOf(cursor_left, 0);
+ SP->_cuf1_cost = CostOf(cursor_right, 0);
+ SP->_cud1_cost = CostOf(cursor_down, 0);
+ SP->_cuu1_cost = CostOf(cursor_up, 0);
+
+ SP->_smir_cost = CostOf(enter_insert_mode, 0);
+ SP->_rmir_cost = CostOf(exit_insert_mode, 0);
+ SP->_ip_cost = 0;
+ if (insert_padding) {
+ SP->_ip_cost = CostOf(insert_padding, 0);
+ }
+
+ /*
+ * Assumption: if the terminal has memory_relative addressing, the
+ * initialization strings or smcup will set single-page mode so we
+ * can treat it like absolute screen addressing. This seems to be true
+ * for all cursor_mem_address terminal types in the terminfo database.
+ */
+ SP->_address_cursor = cursor_address ? cursor_address : cursor_mem_address;
+
+ /*
+ * Parametrized local-motion strings. This static cost computation
+ * depends on the following assumptions:
+ *
+ * (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
+ * capabilities).
+ *
+ * (2) The average case of cup has two two-digit parameters. Strictly,
+ * the average case for a 24 * 80 screen has ((10*10*(1 + 1)) +
+ * (14*10*(1 + 2)) + (10*70*(2 + 1)) + (14*70*4)) / (24*80) = 3.458
+ * digits of parameters. On a 25x80 screen the average is 3.6197.
+ * On larger screens the value gets much closer to 4.
+ *
+ * (3) The average case of cub/cuf/hpa/ech/rep has 2 digits of parameters
+ * (strictly, (((10 * 1) + (70 * 2)) / 80) = 1.8750).
+ *
+ * (4) The average case of cud/cuu/vpa has 2 digits of parameters
+ * (strictly, (((10 * 1) + (14 * 2)) / 24) = 1.5833).
+ *
+ * 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);
+
+ /* 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->_dch1_cost = NormalizedCost(delete_character, 1);
+ SP->_ich1_cost = NormalizedCost(insert_character, 1);
+
+ /*
+ * If this is a bce-terminal, we want to bias the choice so we use clr_eol
+ * rather than spaces at the end of a line.
+ */
+ if (back_color_erase)
+ SP->_el_cost = 0;
+
+ /* parameterized screen-update strings */
+ SP->_dch_cost = NormalizedCost(tparm(parm_dch, 23), 1);
+ SP->_ich_cost = NormalizedCost(tparm(parm_ich, 23), 1);
+ 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));
+
+ /*
+ * If save_cursor is used within enter_ca_mode, we should not use it for
+ * scrolling optimization, since the corresponding restore_cursor is not
+ * nested on the various terminals (vt100, xterm, etc.) which use this
+ * feature.
+ */
+ if (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;
+ }
+
+ /*
+ * A different, possibly better way to arrange this would be to set
+ * SP->_endwin = TRUE at window initialization time and let this be
+ * called by doupdate's return-from-shellout code.
+ */
+ _nc_mvcur_resume();
+}
+
+NCURSES_EXPORT(void)
+_nc_mvcur_wrap(void)
+/* wrap up cursor-addressing mode */
+{
+ /* leave cursor at screen bottom */
+ mvcur(-1, -1, screen_lines - 1, 0);
+
+ /* set cursor to normal mode */
+ if (SP->_cursor != -1)
+ curs_set(1);
+
+ if (exit_ca_mode) {
+ TPUTS_TRACE("exit_ca_mode");
+ putp(exit_ca_mode);
+ }
+ /*
+ * Reset terminal's tab counter. There's a long-time bug that
+ * if you exit a "curses" program such as vi or more, tab
+ * forward, and then backspace, the cursor doesn't go to the
+ * right place. The problem is that the kernel counts the
+ * escape sequences that reset things as column positions.
+ * Utter a \r to reset this invisibly.
+ */
+ _nc_outch('\r');
+}
+
+/****************************************************************************
+ *
+ * Optimized cursor movement
+ *
+ ****************************************************************************/
+
+/*
+ * Perform repeated-append, returning cost
+ */
+static inline int
+repeated_append(string_desc * target, int total, int num, int repeat, const char *src)
+{
+ size_t need = repeat * strlen(src);
+
+ if (need < target->s_size) {
+ while (repeat-- > 0) {
+ if (_nc_safe_strcat(target, src)) {
+ total += num;
+ } else {
+ total = INFINITY;
+ break;
+ }
+ }
+ } else {
+ total = INFINITY;
+ }
+ return total;
+}
+
+#ifndef NO_OPTIMIZE
+#define NEXTTAB(fr) (fr + init_tabs - (fr % init_tabs))
+
+/*
+ * Assume back_tab (CBT) does not wrap backwards at the left margin, return
+ * a negative value at that point to simplify the loop.
+ */
+#define LASTTAB(fr) ((fr > 0) ? ((fr - 1) / init_tabs) * init_tabs : -1)
+
+static int
+relative_move(string_desc * target, 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) */
+{
+ string_desc save;
+ int n, vcost = 0, hcost = 0;
+
+ (void) _nc_str_copy(&save, target);
+
+ if (to_y != from_y) {
+ vcost = INFINITY;
+
+ if (row_address != 0
+ && _nc_safe_strcat(target, tparm(row_address, to_y))) {
+ vcost = SP->_vpa_cost;
+ }
+
+ if (to_y > from_y) {
+ n = (to_y - from_y);
+
+ if (parm_down_cursor
+ && SP->_cud_cost < vcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_down_cursor, n))) {
+ vcost = SP->_cud_cost;
+ }
+
+ if (cursor_down
+ && (*cursor_down != '\n' || SP->_nl)
+ && (n * SP->_cud1_cost < vcost)) {
+ vcost = repeated_append(_nc_str_copy(target, &save), 0,
+ SP->_cud1_cost, n, cursor_down);
+ }
+ } else { /* (to_y < from_y) */
+ n = (from_y - to_y);
+
+ if (parm_up_cursor
+ && SP->_cuu_cost < vcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_up_cursor, n))) {
+ vcost = SP->_cuu_cost;
+ }
+
+ if (cursor_up && (n * SP->_cuu1_cost < vcost)) {
+ vcost = repeated_append(_nc_str_copy(target, &save), 0,
+ SP->_cuu1_cost, n, cursor_up);
+ }
+ }
+
+ if (vcost == INFINITY)
+ return (INFINITY);
+ }
+
+ save = *target;
+
+ if (to_x != from_x) {
+ char str[OPT_SIZE];
+ string_desc check;
+
+ hcost = INFINITY;
+
+ if (column_address
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(column_address, to_x))) {
+ hcost = SP->_hpa_cost;
+ }
+
+ if (to_x > from_x) {
+ n = to_x - from_x;
+
+ if (parm_right_cursor
+ && SP->_cuf_cost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_right_cursor, n))) {
+ hcost = SP->_cuf_cost;
+ }
+
+ if (cursor_right) {
+ int lhcost = 0;
+
+ (void) _nc_str_init(&check, str, sizeof(str));
+
+#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;
+
+ for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) {
+ lhcost = repeated_append(&check, lhcost,
+ SP->_ht_cost, 1, tab);
+ if (lhcost == INFINITY)
+ break;
+ }
+
+ n = to_x - fr;
+ from_x = fr;
+ }
+#endif /* USE_HARD_TABS */
+
+ if (n <= 0 || n >= (int) check.s_size)
+ ovw = FALSE;
+#if BSD_TPUTS
+ /*
+ * If we're allowing BSD-style padding in tputs, don't generate
+ * a string with a leading digit. Otherwise, that will be
+ * interpreted as a padding value rather than sent to the
+ * screen.
+ */
+ if (ovw
+ && n > 0
+ && n < (int) check.s_size
+ && vcost == 0
+ && str[0] == '\0') {
+ int wanted = CharOf(WANT_CHAR(to_y, from_x));
+ if (is8bits(wanted) && isdigit(wanted))
+ ovw = FALSE;
+ }
+#endif
+ /*
+ * If we have no attribute changes, overwrite is cheaper.
+ * Note: must suppress this by passing in ovw = FALSE whenever
+ * WANT_CHAR would return invalid data. In particular, this
+ * is true between the time a hardware scroll has been done
+ * and the time the structure WANT_CHAR would access has been
+ * updated.
+ */
+ if (ovw) {
+ int i;
+
+ for (i = 0; i < n; i++) {
+ NCURSES_CH_T ch = WANT_CHAR(to_y, from_x + i);
+ if (AttrOf(ch) != SP->_current_attr
+#if USE_WIDEC_SUPPORT
+ || !Charable(ch)
+#endif
+ ) {
+ ovw = FALSE;
+ break;
+ }
+ }
+ }
+ if (ovw) {
+ int i;
+
+ for (i = 0; i < n; i++)
+ *check.s_tail++ = CharOf(WANT_CHAR(to_y, from_x + i));
+ *check.s_tail = '\0';
+ check.s_size -= n;
+ lhcost += n * SP->_char_padding;
+ } else {
+ lhcost = repeated_append(&check, lhcost, SP->_cuf1_cost,
+ n, cursor_right);
+ }
+
+ if (lhcost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
+ hcost = lhcost;
+ }
+ }
+ } else { /* (to_x < from_x) */
+ n = from_x - to_x;
+
+ if (parm_left_cursor
+ && SP->_cub_cost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_left_cursor, n))) {
+ hcost = SP->_cub_cost;
+ }
+
+ if (cursor_left) {
+ int lhcost = 0;
+
+ (void) _nc_str_init(&check, str, sizeof(str));
+
+#if USE_HARD_TABS
+ if (init_tabs > 0 && back_tab) {
+ int nxt, fr;
+
+ for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) {
+ lhcost = repeated_append(&check, lhcost,
+ SP->_cbt_cost, 1, back_tab);
+ if (lhcost == INFINITY)
+ break;
+ }
+
+ n = fr - to_x;
+ }
+#endif /* USE_HARD_TABS */
+
+ lhcost = repeated_append(&check, lhcost, SP->_cub1_cost, n, cursor_left);
+
+ if (lhcost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
+ hcost = lhcost;
+ }
+ }
+ }
+
+ if (hcost == INFINITY)
+ return (INFINITY);
+ }
+
+ return (vcost + hcost);
+}
+#endif /* !NO_OPTIMIZE */
+
+/*
+ * With the machinery set up above, it's conceivable that
+ * onscreen_mvcur could be modified into a recursive function that does
+ * an alpha-beta search of motion space, as though it were a chess
+ * move tree, with the weight function being boolean and the search
+ * depth equated to length of string. However, this would jack up the
+ * computation cost a lot, especially on terminals without a cup
+ * capability constraining the search tree depth. So we settle for
+ * the simpler method below.
+ */
+
+static inline int
+onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
+/* onscreen move from (yold, xold) to (ynew, xnew) */
+{
+ string_desc result;
+ char buffer[OPT_SIZE];
+ int tactic = 0, newcost, usecost = INFINITY;
+ int t5_cr_cost;
+
+#if defined(MAIN) || defined(NCURSES_TEST)
+ struct timeval before, after;
+
+ gettimeofday(&before, NULL);
+#endif /* MAIN */
+
+#define NullResult _nc_str_null(&result, sizeof(buffer))
+#define InitResult _nc_str_init(&result, buffer, sizeof(buffer))
+
+ /* tactic #0: use direct cursor addressing */
+ if (_nc_safe_strcpy(InitResult, tparm(SP->_address_cursor, ynew, xnew))) {
+ tactic = 0;
+ usecost = SP->_cup_cost;
+
+#if defined(TRACE) || defined(NCURSES_TEST)
+ if (!(_nc_optimize_enable & OPTIMIZE_MVCUR))
+ goto nonlocal;
+#endif /* TRACE */
+
+ /*
+ * We may be able to tell in advance that the full optimization
+ * will probably not be worth its overhead. Also, don't try to
+ * use local movement if the current attribute is anything but
+ * A_NORMAL...there are just too many ways this can screw up
+ * (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 defined(MAIN) || defined(NCURSES_TEST)
+ if (!profiling) {
+ (void) fputs("nonlocal\n", stderr);
+ goto nonlocal; /* always run the optimizer if profiling */
+ }
+#else
+ goto nonlocal;
+#endif /* MAIN */
+ }
+ }
+#ifndef NO_OPTIMIZE
+ /* tactic #1: use local movement */
+ if (yold != -1 && xold != -1
+ && ((newcost = relative_move(NullResult, 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(NullResult, 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(NullResult, 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(NullResult, screen_lines - 1, 0, ynew,
+ xnew, ovw)) != INFINITY)
+ && SP->_ll_cost + newcost < usecost) {
+ tactic = 4;
+ usecost = SP->_ll_cost + newcost;
+ }
+
+ /*
+ * 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);
+ if (auto_left_margin && !eat_newline_glitch
+ && yold > 0 && cursor_left
+ && ((newcost = relative_move(NullResult, 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;
+ }
+
+ /*
+ * These cases are ordered by estimated relative frequency.
+ */
+ if (tactic)
+ InitResult;
+ switch (tactic) {
+ case 1:
+ (void) relative_move(&result, yold, xold, ynew, xnew, ovw);
+ break;
+ case 2:
+ (void) _nc_safe_strcpy(&result, carriage_return);
+ (void) relative_move(&result, yold, 0, ynew, xnew, ovw);
+ break;
+ case 3:
+ (void) _nc_safe_strcpy(&result, cursor_home);
+ (void) relative_move(&result, 0, 0, ynew, xnew, ovw);
+ break;
+ case 4:
+ (void) _nc_safe_strcpy(&result, cursor_to_ll);
+ (void) relative_move(&result, screen_lines - 1, 0, ynew, xnew, ovw);
+ break;
+ case 5:
+ if (xold > 0)
+ (void) _nc_safe_strcat(&result, carriage_return);
+ (void) _nc_safe_strcat(&result, cursor_left);
+ (void) relative_move(&result, yold - 1, screen_columns - 1, ynew,
+ xnew, ovw);
+ break;
+ }
+#endif /* !NO_OPTIMIZE */
+
+ nonlocal:
+#if defined(MAIN) || defined(NCURSES_TEST)
+ gettimeofday(&after, NULL);
+ diff = after.tv_usec - before.tv_usec
+ + (after.tv_sec - before.tv_sec) * 1000000;
+ if (!profiling)
+ (void) fprintf(stderr,
+ "onscreen: %d microsec, %f 28.8Kbps char-equivalents\n",
+ (int) diff, diff / 288);
+#endif /* MAIN */
+
+ if (usecost != INFINITY) {
+ TPUTS_TRACE("mvcur");
+ tputs(buffer, 1, _nc_outch);
+ SP->_cursrow = ynew;
+ SP->_curscol = xnew;
+ return (OK);
+ } else
+ return (ERR);
+}
+
+NCURSES_EXPORT(int)
+mvcur(int yold, int xold, int ynew, int xnew)
+/* optimized cursor move from (yold, xold) to (ynew, xnew) */
+{
+ attr_t oldattr;
+ int code;
+
+ TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"),
+ yold, xold, ynew, xnew));
+
+ if (SP == 0) {
+ code = ERR;
+ } else if (yold == ynew && xold == xnew) {
+ code = OK;
+ } else {
+
+ /*
+ * Most work here is rounding for terminal boundaries getting the
+ * column position implied by wraparound or the lack thereof and
+ * rolling up the screen to get ynew on the screen.
+ */
+ if (xnew >= screen_columns) {
+ ynew += xnew / screen_columns;
+ xnew %= screen_columns;
+ }
+
+ /*
+ * Force restore even if msgr is on when we're in an alternate
+ * character set -- these have a strong tendency to screw up the CR &
+ * LF used for local character motions!
+ */
+ oldattr = SP->_current_attr;
+ if ((oldattr & A_ALTCHARSET)
+ || (oldattr && !move_standout_mode)) {
+ TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move",
+ oldattr, _traceattr(oldattr)));
+ (void) vidattr(A_NORMAL);
+ }
+
+ if (xold >= screen_columns) {
+ int l;
+
+ if (SP->_nl) {
+ l = (xold + 1) / screen_columns;
+ yold += l;
+ if (yold >= screen_lines)
+ l -= (yold - screen_lines - 1);
+
+ if (l > 0) {
+ if (carriage_return) {
+ TPUTS_TRACE("carriage_return");
+ putp(carriage_return);
+ } else
+ _nc_outch('\r');
+ xold = 0;
+
+ while (l > 0) {
+ if (newline) {
+ TPUTS_TRACE("newline");
+ putp(newline);
+ } else
+ _nc_outch('\n');
+ l--;
+ }
+ }
+ } else {
+ /*
+ * If caller set nonl(), we cannot really use newlines to
+ * position to the next row.
+ */
+ xold = -1;
+ yold = -1;
+ }
+ }
+
+ if (yold > screen_lines - 1)
+ yold = screen_lines - 1;
+ if (ynew > screen_lines - 1)
+ ynew = screen_lines - 1;
+
+ /* destination location is on screen now */
+ code = onscreen_mvcur(yold, xold, ynew, xnew, TRUE);
+
+ /*
+ * Restore attributes if we disabled them before moving.
+ */
+ if (oldattr != SP->_current_attr) {
+ TR(TRACE_CHARPUT, ("turning on (%#lx) %s after move",
+ oldattr, _traceattr(oldattr)));
+ (void) vidattr(oldattr);
+ }
+ }
+ returnCode(code);
+}
+
+#if defined(TRACE) || defined(NCURSES_TEST)
+NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL;
+#endif
+
+#if defined(MAIN) || defined(NCURSES_TEST)
+/****************************************************************************
+ *
+ * Movement optimizer test code
+ *
+ ****************************************************************************/
+
+#include <tic.h>
+#include <dump_entry.h>
+
+NCURSES_EXPORT_VAR(const char *) _nc_progname = "mvcur";
+
+static unsigned long xmits;
+
+/* these override lib_tputs.c */
+NCURSES_EXPORT(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);
+}
+
+NCURSES_EXPORT(int)
+putp(const char *string)
+{
+ return (tputs(string, 1, _nc_outch));
+}
+
+NCURSES_EXPORT(int)
+_nc_outch(int ch)
+{
+ putc(ch, stdout);
+ return OK;
+}
+
+NCURSES_EXPORT(int)
+delay_output(int ms GCC_UNUSED)
+{
+ return OK;
+}
+
+static char tname[PATH_MAX];
+
+static void
+load_term(void)
+{
+ (void) setupterm(tname, STDOUT_FILENO, NULL);
+}
+
+static int
+roll(int n)
+{
+ int i, j;
+
+ i = (RAND_MAX / n) * n;
+ while ((j = rand()) >= i)
+ continue;
+ return (j % n);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ (void) strcpy(tname, termname());
+ load_term();
+ _nc_setupscreen(lines, columns, stdout);
+ baudrate();
+
+ _nc_mvcur_init();
+ NC_BUFFERED(FALSE);
+
+ (void) puts("The mvcur tester. Type ? for help");
+
+ fputs("smcup:", stdout);
+ putchar('\n');
+
+ 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] <term> -- load terminal info for type <term>");
+ (void) puts("d[elete] <cap> -- 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] <num> -- torture-test with <num> 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('"');
+
+ gettimeofday(&before, NULL);
+ mvcur(fy, fx, ty, tx);
+ 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) {
+ struct timeval before, after;
+
+ putchar('"');
+
+ gettimeofday(&before, NULL);
+ _nc_scrolln(fy, fx, ty, tx);
+ 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') {
+ (void) strcpy(tname, termname());
+ load_term();
+ } 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);
+
+ if (np == NULL)
+ (void) printf("No such capability as \"%s\"\n", capname);
+ 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);
+ break;
+
+ case NUMBER:
+ 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);
+ break;
+
+ case STRING:
+ cur_term->type.Strings[np->nte_index] = ABSENT_STRING;
+ (void) printf("String capability `%s' (%d) deleted.\n",
+ 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, 0, 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
+ * optimizer. Use iteration values in three digits or more.
+ * At above 5000 iterations the profile timing averages are stable
+ * to within a millisecond or three.
+ *
+ * The `overhead' field of the report will help you pick a
+ * COMPUTE_OVERHEAD figure appropriate for your processor and
+ * expected line speed. The `total estimated time' is
+ * computation time plus a character-transmission time
+ * estimate computed from the number of transmits and the baud
+ * rate.
+ *
+ * Use this together with the `o' command to get a read on the
+ * optimizer's effectiveness. Compare the total estimated times
+ * for `t' runs of the same length in both optimized and un-optimized
+ * modes. As long as the optimized times are less, the optimizer
+ * is winning.
+ */
+ else if (sscanf(buf, "t %d", &n) == 1) {
+ float cumtime = 0.0, perchar;
+ int speeds[] =
+ {2400, 9600, 14400, 19200, 28800, 38400, 0};
+
+ srand((unsigned) (getpid() + time((time_t *) 0)));
+ profiling = TRUE;
+ xmits = 0;
+ for (i = 0; i < n; i++) {
+ /*
+ * This does a move test between two random locations,
+ * Random moves probably short-change the optimizer,
+ * which will work better on the short moves probably
+ * typical of doupdate()'s usage pattern. Still,
+ * until we have better data...
+ */
+#ifdef FIND_COREDUMP
+ int from_y = roll(lines);
+ int to_y = roll(lines);
+ int from_x = roll(columns);
+ int to_x = roll(columns);
+
+ printf("(%d,%d) -> (%d,%d)\n", from_y, from_x, to_y, to_x);
+ mvcur(from_y, from_x, to_y, to_x);
+#else
+ mvcur(roll(lines), roll(columns), roll(lines), roll(columns));
+#endif /* FIND_COREDUMP */
+ if (diff)
+ cumtime += diff;
+ }
+ profiling = FALSE;
+
+ /*
+ * Average milliseconds per character optimization time.
+ * This is the key figure to watch when tuning the optimizer.
+ */
+ perchar = cumtime / n;
+
+ (void) printf("%d moves (%ld chars) in %d msec, %f msec each:\n",
+ n, xmits, (int) cumtime, perchar);
+
+ for (i = 0; speeds[i]; i++) {
+ /*
+ * Total estimated time for the moves, computation and
+ * transmission both. Transmission time is an estimate
+ * assuming 9 bits/char, 8 bits + 1 stop bit.
+ */
+ float totalest = cumtime + xmits * 9 * 1e6 / speeds[i];
+
+ /*
+ * Per-character optimization overhead in character transmits
+ * at the current speed. Round this to the nearest integer
+ * to figure COMPUTE_OVERHEAD for the speed.
+ */
+ 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);
+ }
+ } 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);
+ (void) printf("home cost: %d\n", SP->_home_cost);
+ (void) printf("ll cost: %d\n", SP->_ll_cost);
+#if USE_HARD_TABS
+ (void) printf("ht cost: %d\n", SP->_ht_cost);
+ (void) printf("cbt cost: %d\n", SP->_cbt_cost);
+#endif /* USE_HARD_TABS */
+ (void) printf("cub1 cost: %d\n", SP->_cub1_cost);
+ (void) printf("cuf1 cost: %d\n", SP->_cuf1_cost);
+ (void) printf("cud1 cost: %d\n", SP->_cud1_cost);
+ (void) printf("cuu1 cost: %d\n", SP->_cuu1_cost);
+ (void) printf("cub cost: %d\n", SP->_cub_cost);
+ (void) printf("cuf cost: %d\n", SP->_cuf_cost);
+ (void) printf("cud cost: %d\n", SP->_cud_cost);
+ (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')
+ break;
+ else
+ (void) puts("Invalid command.");
+ }
+
+ (void) fputs("rmcup:", stdout);
+ _nc_mvcur_wrap();
+ putchar('\n');
+
+ return (0);
+}
+
+#endif /* MAIN */
+
+/* lib_mvcur.c ends here */
diff --git a/Build/source/libs/ncurses/ncurses/tty/lib_tstp.c b/Build/source/libs/ncurses/ncurses/tty/lib_tstp.c
new file mode 100644
index 00000000000..c850e41da2c
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/lib_tstp.c
@@ -0,0 +1,399 @@
+/****************************************************************************
+ * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas Dickey 1995-2001 *
+ ****************************************************************************/
+
+/*
+** lib_tstp.c
+**
+** The routine _nc_signal_handler().
+**
+*/
+#include <curses.priv.h>
+
+#include <SigAction.h>
+
+#if SVR4_ACTION && !defined(_POSIX_SOURCE)
+#define _POSIX_SOURCE
+#endif
+
+MODULE_ID("$Id: lib_tstp.c,v 1.30 2002/05/18 19:55:38 tom Exp $")
+
+#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
+#define USE_SIGTSTP 1
+#else
+#define USE_SIGTSTP 0
+#endif
+
+#ifdef TRACE
+static const char *
+signal_name(int sig)
+{
+ switch (sig) {
+ case SIGALRM:
+ return "SIGALRM";
+#ifdef SIGCONT
+ case SIGCONT:
+ return "SIGCONT";
+#endif
+ case SIGINT:
+ return "SIGINT";
+ case SIGQUIT:
+ return "SIGQUIT";
+ case SIGTERM:
+ return "SIGTERM";
+#ifdef SIGTSTP
+ case SIGTSTP:
+ return "SIGTSTP";
+#endif
+#ifdef SIGTTOU
+ case SIGTTOU:
+ return "SIGTTOU";
+#endif
+#ifdef SIGWINCH
+ case SIGWINCH:
+ return "SIGWINCH";
+#endif
+ default:
+ return "unknown signal";
+ }
+}
+#endif
+
+/*
+ * Note: This code is fragile! Its problem is that different OSs
+ * handle restart of system calls interrupted by signals differently.
+ * The ncurses code needs signal-call restart to happen -- otherwise,
+ * interrupted wgetch() calls will return FAIL, probably making the
+ * application think the input stream has ended and it should
+ * terminate. In particular, you know you have this problem if, when
+ * you suspend an ncurses-using lynx with ^Z and resume, it dies
+ * immediately.
+ *
+ * Default behavior of POSIX sigaction(2) is not to restart
+ * interrupted system calls, but Linux's sigaction does it anyway (at
+ * least, on and after the 1.1.47 I (esr) use). Thus this code works
+ * OK under Linux. The 4.4BSD sigaction(2) supports a (non-portable)
+ * SA_RESTART flag that forces the right behavior. Thus, this code
+ * should work OK under BSD/OS, NetBSD, and FreeBSD (let us know if it
+ * does not).
+ *
+ * Stock System Vs (and anything else using a strict-POSIX
+ * sigaction(2) without SA_RESTART) may have a problem. Possible
+ * solutions:
+ *
+ * sigvec restarts by default (SV_INTERRUPT flag to not restart)
+ * signal restarts by default in SVr4 (assuming you link with -lucb)
+ * and BSD, but not SVr3.
+ * sigset restarts, but is only available under SVr4/Solaris.
+ *
+ * The signal(3) call is mandated by the ANSI standard, and its
+ * interaction with sigaction(2) is described in the POSIX standard
+ * (3.3.4.2, page 72,line 934). According to section 8.1, page 191,
+ * however, signal(3) itself is not required by POSIX.1. And POSIX is
+ * silent on whether it is required to restart signals.
+ *
+ * So. The present situation is, we use sigaction(2) with no
+ * guarantee of restart anywhere but on Linux and BSD. We could
+ * switch to signal(3) and collar Linux, BSD, and SVr4. Any way
+ * we slice it, System V UNIXes older than SVr4 will probably lose
+ * (this may include XENIX).
+ *
+ * This implementation will probably be changed to use signal(3) in
+ * the future. If nothing else, it's simpler...
+ */
+
+#if USE_SIGTSTP
+static void
+tstp(int dummy GCC_UNUSED)
+{
+ sigset_t mask, omask;
+ sigaction_t act, oact;
+
+#ifdef SIGTTOU
+ int sigttou_blocked;
+#endif
+
+ T(("tstp() called"));
+
+ /*
+ * The user may have changed the prog_mode tty bits, so save them.
+ *
+ * But first try to detect whether we still are in the foreground
+ * process group - if not, an interactive shell may already have
+ * taken ownership of the tty and modified the settings when our
+ * parent was stopped before us, and we would likely pick up the
+ * settings already modified by the shell.
+ */
+ if (SP != 0 && !SP->_endwin) /* don't do this if we're not in curses */
+#if HAVE_TCGETPGRP
+ if (tcgetpgrp(STDIN_FILENO) == getpgrp())
+#endif
+ def_prog_mode();
+
+ /*
+ * Block window change and timer signals. The latter
+ * is because applications use timers to decide when
+ * to repaint the screen.
+ */
+ (void) sigemptyset(&mask);
+ (void) sigaddset(&mask, SIGALRM);
+#if USE_SIGWINCH
+ (void) sigaddset(&mask, SIGWINCH);
+#endif
+ (void) sigprocmask(SIG_BLOCK, &mask, &omask);
+
+#ifdef SIGTTOU
+ sigttou_blocked = sigismember(&omask, SIGTTOU);
+ if (!sigttou_blocked) {
+ (void) sigemptyset(&mask);
+ (void) sigaddset(&mask, SIGTTOU);
+ (void) sigprocmask(SIG_BLOCK, &mask, NULL);
+ }
+#endif
+
+ /*
+ * End window mode, which also resets the terminal state to the
+ * original (pre-curses) modes.
+ */
+ endwin();
+
+ /* Unblock SIGTSTP. */
+ (void) sigemptyset(&mask);
+ (void) sigaddset(&mask, SIGTSTP);
+#ifdef SIGTTOU
+ if (!sigttou_blocked) {
+ /* Unblock this too if it wasn't blocked on entry */
+ (void) sigaddset(&mask, SIGTTOU);
+ }
+#endif
+ (void) sigprocmask(SIG_UNBLOCK, &mask, NULL);
+
+ /* Now we want to resend SIGSTP to this process and suspend it */
+ act.sa_handler = SIG_DFL;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+#ifdef SA_RESTART
+ act.sa_flags |= SA_RESTART;
+#endif /* SA_RESTART */
+ sigaction(SIGTSTP, &act, &oact);
+ kill(getpid(), SIGTSTP);
+
+ /* Process gets suspended...time passes...process resumes */
+
+ T(("SIGCONT received"));
+ sigaction(SIGTSTP, &oact, NULL);
+ flushinp();
+
+ /*
+ * If the user modified the tty state while suspended, he wants
+ * those changes to stick. So save the new "default" terminal state.
+ */
+ def_shell_mode();
+
+ /*
+ * This relies on the fact that doupdate() will restore the
+ * program-mode tty state, and issue enter_ca_mode if need be.
+ */
+ doupdate();
+
+ /* Reset the signals. */
+ (void) sigprocmask(SIG_SETMASK, &omask, NULL);
+}
+#endif /* USE_SIGTSTP */
+
+static void
+cleanup(int sig)
+{
+ static int nested;
+
+ /*
+ * Actually, doing any sort of I/O from within an signal handler is
+ * "unsafe". But we'll _try_ to clean up the screen and terminal
+ * settings on the way out.
+ */
+ if (!nested++
+ && (sig == SIGINT
+ || sig == SIGQUIT)) {
+#if HAVE_SIGACTION || HAVE_SIGVEC
+ sigaction_t act;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+ act.sa_handler = SIG_IGN;
+ if (sigaction(sig, &act, NULL) == 0)
+#else
+ if (signal(sig, SIG_IGN) != SIG_ERR)
+#endif
+ {
+ SCREEN *scan = _nc_screen_chain;
+ while (scan) {
+ if (SP != 0
+ && SP->_ofp != 0
+ && isatty(fileno(SP->_ofp))) {
+ SP->_cleanup = TRUE;
+ SP->_outch = _nc_outch;
+ }
+ set_term(scan);
+ endwin();
+ if (SP)
+ SP->_endwin = FALSE; /* in case we have an atexit! */
+ scan = scan->_next_screen;
+ }
+ }
+ }
+ exit(EXIT_FAILURE);
+}
+
+#if USE_SIGWINCH
+static void
+sigwinch(int sig GCC_UNUSED)
+{
+ SCREEN *scan = _nc_screen_chain;
+ while (scan) {
+ scan->_sig_winch = TRUE;
+ scan = scan->_next_screen;
+ }
+}
+#endif /* USE_SIGWINCH */
+
+/*
+ * If the given signal is still in its default state, set it to the given
+ * handler.
+ */
+static int
+CatchIfDefault(int sig, RETSIGTYPE (*handler) (int))
+{
+ int result;
+#if HAVE_SIGACTION || HAVE_SIGVEC
+ sigaction_t old_act;
+ sigaction_t new_act;
+
+ memset(&new_act, 0, sizeof(new_act));
+ sigemptyset(&new_act.sa_mask);
+#ifdef SA_RESTART
+#ifdef SIGWINCH
+ if (sig != SIGWINCH)
+#endif
+ new_act.sa_flags |= SA_RESTART;
+#endif /* SA_RESTART */
+ new_act.sa_handler = handler;
+
+ if (sigaction(sig, NULL, &old_act) == 0
+ && (old_act.sa_handler == SIG_DFL
+ || old_act.sa_handler == handler
+#if USE_SIGWINCH
+ || (sig == SIGWINCH && old_act.sa_handler == SIG_IGN)
+#endif
+ )) {
+ (void) sigaction(sig, &new_act, NULL);
+ result = TRUE;
+ } else {
+ result = FALSE;
+ }
+#else /* !HAVE_SIGACTION */
+ RETSIGTYPE (*ohandler) (int);
+
+ ohandler = signal(sig, SIG_IGN);
+ if (ohandler == SIG_DFL
+ || ohandler == handler
+#if USE_SIGWINCH
+ || (sig == SIGWINCH && ohandler == SIG_IGN)
+#endif
+ ) {
+ signal(sig, handler);
+ result = TRUE;
+ } else {
+ signal(sig, ohandler);
+ result = FALSE;
+ }
+#endif
+ T(("CatchIfDefault - will %scatch %s",
+ result ? "" : "not ", signal_name(sig)));
+ return result;
+}
+
+/*
+ * This is invoked once at the beginning (e.g., from 'initscr()'), to
+ * initialize the signal catchers, and thereafter when spawning a shell (and
+ * returning) to disable/enable the SIGTSTP (i.e., ^Z) catcher.
+ *
+ * If the application has already set one of the signals, we'll not modify it
+ * (during initialization).
+ *
+ * The XSI document implies that we shouldn't keep the SIGTSTP handler if
+ * the caller later changes its mind, but that doesn't seem correct.
+ */
+NCURSES_EXPORT(void)
+_nc_signal_handler(bool enable)
+{
+ static bool initialized = FALSE;
+
+ T((T_CALLED("_nc_signal_handler(%d)"), enable));
+#if USE_SIGTSTP /* Xenix 2.x doesn't have SIGTSTP, for example */
+ {
+ static bool ignore_tstp = FALSE;
+
+ if (!ignore_tstp) {
+ static sigaction_t act, oact;
+
+ if (!enable) {
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGTSTP, &act, &oact);
+ } else if (act.sa_handler != SIG_DFL) {
+ sigaction(SIGTSTP, &oact, NULL);
+ } else if (sigaction(SIGTSTP, NULL, &oact) == 0
+ && (oact.sa_handler == SIG_DFL)) {
+ sigemptyset(&act.sa_mask);
+#ifdef SA_RESTART
+ act.sa_flags |= SA_RESTART;
+#endif /* SA_RESTART */
+ act.sa_handler = tstp;
+ (void) sigaction(SIGTSTP, &act, NULL);
+ } else {
+ ignore_tstp = TRUE;
+ }
+ }
+ }
+#endif /* !USE_SIGTSTP */
+
+ if (!initialized) {
+ if (enable) {
+ CatchIfDefault(SIGINT, cleanup);
+ CatchIfDefault(SIGTERM, cleanup);
+#if USE_SIGWINCH
+ CatchIfDefault(SIGWINCH, sigwinch);
+#endif
+ initialized = TRUE;
+ }
+ }
+ returnVoid;
+}
diff --git a/Build/source/libs/ncurses/ncurses/tty/lib_twait.c b/Build/source/libs/ncurses/ncurses/tty/lib_twait.c
new file mode 100644
index 00000000000..2a3b7e2ff1b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/lib_twait.c
@@ -0,0 +1,447 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+** lib_twait.c
+**
+** The routine _nc_timed_wait().
+**
+** (This file was originally written by Eric Raymond; however except for
+** comments, none of the original code remains - T.Dickey).
+*/
+
+#include <curses.priv.h>
+
+#ifdef __BEOS__
+#undef false
+#undef true
+#include <OS.h>
+#endif
+
+#if USE_FUNC_POLL
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# endif
+#elif HAVE_SELECT
+# if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT
+# include <sys/time.h>
+# endif
+# if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# endif
+#endif
+
+MODULE_ID("$Id: lib_twait.c,v 1.50 2004/09/25 22:53:43 tom Exp $")
+
+static long
+_nc_gettime(bool first)
+{
+ long res;
+
+#if HAVE_GETTIMEOFDAY
+# define PRECISE_GETTIME 1
+ static struct timeval t0;
+ struct timeval t1;
+ gettimeofday(&t1, (struct timezone *) 0);
+ if (first) {
+ t0 = t1;
+ res = 0;
+ } else {
+ /* .tv_sec and .tv_usec are unsigned, be careful when subtracting */
+ if (t0.tv_usec > t1.tv_usec) { /* Convert 1s in 1e6 microsecs */
+ t1.tv_usec += 1000000;
+ t1.tv_sec--;
+ }
+ res = (t1.tv_sec - t0.tv_sec) * 1000
+ + (t1.tv_usec - t0.tv_usec) / 1000;
+ }
+#else
+# define PRECISE_GETTIME 0
+ static time_t t0;
+ time_t t1 = time((time_t *) 0);
+ if (first) {
+ t0 = t1;
+ }
+ res = (t1 - t0) * 1000;
+#endif
+ TR(TRACE_IEVENT, ("%s time: %ld msec", first ? "get" : "elapsed", res));
+ return res;
+}
+
+#ifdef NCURSES_WGETCH_EVENTS
+NCURSES_EXPORT(int)
+_nc_eventlist_timeout(_nc_eventlist * evl)
+{
+ _nc_event **ev, **last;
+ int event_delay = -1;
+
+ if (evl != 0) {
+
+ ev = evl->events;
+ last = ev + evl->count;
+
+ while (ev < last) {
+ if ((*ev)->type == _NC_EVENT_TIMEOUT_MSEC) {
+ event_delay = (*ev)->data.timeout_msec;
+ if (event_delay < 0)
+ event_delay = LONG_MAX; /* FIXME Is this defined? */
+ }
+ }
+ }
+ return event_delay;
+}
+#endif /* NCURSES_WGETCH_EVENTS */
+
+/*
+ * Wait a specified number of milliseconds, returning nonzero if the timer
+ * didn't expire before there is activity on the specified file descriptors.
+ * The file-descriptors are specified by the mode:
+ * 0 - none (absolute time)
+ * 1 - ncurses' normal input-descriptor
+ * 2 - mouse descriptor, if any
+ * 3 - either input or mouse.
+ *
+ * Experimental: if NCURSES_WGETCH_EVENTS is defined, (mode & 4) determines
+ * whether to pay attention to evl argument. If set, the smallest of
+ * millisecond and of timeout of evl is taken.
+ *
+ * We return a mask that corresponds to the mode (e.g., 2 for mouse activity).
+ *
+ * If the milliseconds given are -1, the wait blocks until activity on the
+ * descriptors.
+ */
+NCURSES_EXPORT(int)
+_nc_timed_wait(int mode,
+ int milliseconds,
+ int *timeleft
+ EVENTLIST_2nd(_nc_eventlist * evl))
+{
+ int fd;
+ int count;
+ int result;
+
+#ifdef NCURSES_WGETCH_EVENTS
+ int timeout_is_event = 0;
+#endif
+
+#if USE_FUNC_POLL
+ struct pollfd fd_list[2];
+ struct pollfd *fds = fd_list;
+#elif defined(__BEOS__)
+#elif HAVE_SELECT
+ static fd_set set;
+#endif
+
+ long starttime, returntime;
+
+ TR(TRACE_IEVENT, ("start twait: %d milliseconds, mode: %d",
+ milliseconds, mode));
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if (mode & 4) {
+ int event_delay = _nc_eventlist_timeout(evl);
+
+ if (event_delay >= 0
+ && (milliseconds >= event_delay || milliseconds < 0)) {
+ milliseconds = event_delay;
+ timeout_is_event = 1;
+ }
+ }
+#endif
+
+#if PRECISE_GETTIME
+ retry:
+#endif
+ starttime = _nc_gettime(TRUE);
+
+ count = 0;
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl)
+ evl->result_flags = 0;
+#endif
+
+#if USE_FUNC_POLL
+ memset(fd_list, 0, sizeof(fd_list));
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl)
+ fds = typeMalloc(struct pollfd, 2 + evl->count);
+#endif
+
+ if (mode & 1) {
+ fds[count].fd = SP->_ifd;
+ fds[count].events = POLLIN;
+ count++;
+ }
+ if ((mode & 2)
+ && (fd = SP->_mouse_fd) >= 0) {
+ fds[count].fd = fd;
+ fds[count].events = POLLIN;
+ count++;
+ }
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl) {
+ _nc_event **ev = evl->events;
+ _nc_event **last = ev + evl->count;
+
+ while (ev < last) {
+ if ((*ev)->type == _NC_EVENT_FILE
+ && ((*ev)->data.fev.flags & _NC_EVENT_FILE_READABLE)) {
+ fds[count].fd = (*ev)->data.fev.fd;
+ fds[count].events = POLLIN;
+ count++;
+ }
+ }
+ }
+#endif
+
+ result = poll(fds, (unsigned) count, milliseconds);
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl) {
+ _nc_event **ev = evl->events;
+ _nc_event **last = ev + evl->count;
+ int c;
+
+ if (!result)
+ count = 0;
+ while (ev < last) {
+ if ((*ev)->type == _NC_EVENT_FILE
+ && ((*ev)->data.fev.flags & _NC_EVENT_FILE_READABLE)) {
+ (*ev)->data.fev.result = 0;
+ for (c = 0; c < count; c++)
+ if (fds[c].fd == (*ev)->data.fev.fd
+ && fds[c].revents & POLLIN) {
+ (*ev)->data.fev.result |= _NC_EVENT_FILE_READABLE;
+ evl->result_flags |= _NC_EVENT_FILE_READABLE;
+ }
+ } else if ((*ev)->type == _NC_EVENT_TIMEOUT_MSEC
+ && !result && timeout_is_event) {
+ evl->result_flags |= _NC_EVENT_TIMEOUT_MSEC;
+ }
+ }
+ }
+
+ if (fds != fd_list)
+ free((char *) fds);
+
+#endif
+
+#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.
+ *
+ * FIXME: this assumes mode&1 if milliseconds < 0 (see lib_getch.c).
+ */
+ result = 0;
+ if (mode & 1) {
+ int step = (milliseconds < 0) ? 0 : 5000;
+ bigtime_t d;
+ bigtime_t useconds = milliseconds * 1000;
+ int n, howmany;
+
+ if (useconds <= 0) /* we're here to go _through_ the loop */
+ useconds = 1;
+
+ for (d = 0; d < useconds; d += step) {
+ n = 0;
+ howmany = ioctl(0, 'ichr', &n);
+ if (howmany >= 0 && n > 0) {
+ result = 1;
+ break;
+ }
+ if (useconds > 1 && step > 0) {
+ snooze(step);
+ milliseconds -= (step / 1000);
+ if (milliseconds <= 0) {
+ milliseconds = 0;
+ break;
+ }
+ }
+ }
+ } else if (milliseconds > 0) {
+ snooze(milliseconds * 1000);
+ milliseconds = 0;
+ }
+#elif HAVE_SELECT
+ /*
+ * select() modifies the fd_set arguments; do this in the
+ * loop.
+ */
+ FD_ZERO(&set);
+
+ if (mode & 1) {
+ FD_SET(SP->_ifd, &set);
+ count = SP->_ifd + 1;
+ }
+ if ((mode & 2)
+ && (fd = SP->_mouse_fd) >= 0) {
+ FD_SET(fd, &set);
+ count = max(fd, count) + 1;
+ }
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl) {
+ _nc_event **ev = evl->events;
+ _nc_event **last = ev + evl->count;
+
+ while (ev < last) {
+ if ((*ev)->type == _NC_EVENT_FILE
+ && ((*ev)->data.fev.flags & _NC_EVENT_FILE_READABLE)) {
+ FD_SET((*ev)->data.fev.fd, &set);
+ count = max((*ev)->data.fev.fd + 1, count);
+ }
+ }
+ }
+#endif
+
+ if (milliseconds >= 0) {
+ struct timeval ntimeout;
+ ntimeout.tv_sec = milliseconds / 1000;
+ ntimeout.tv_usec = (milliseconds % 1000) * 1000;
+ result = select(count, &set, NULL, NULL, &ntimeout);
+ } else {
+ result = select(count, &set, NULL, NULL, NULL);
+ }
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl) {
+ _nc_event **ev = evl->events;
+ _nc_event **last = ev + evl->count;
+
+ evl->result_flags = 0;
+ while (ev < last) {
+ if ((*ev)->type == _NC_EVENT_FILE
+ && ((*ev)->data.fev.flags & _NC_EVENT_FILE_READABLE)) {
+ (*ev)->data.fev.result = 0;
+ if (FD_ISSET((*ev)->data.fev.fd, &set)) {
+ (*ev)->data.fev.result |= _NC_EVENT_FILE_READABLE;
+ evl->result_flags |= _NC_EVENT_FILE_READABLE;
+ }
+ } else if ((*ev)->type == _NC_EVENT_TIMEOUT_MSEC
+ && !result && timeout_is_event)
+ evl->result_flags |= _NC_EVENT_TIMEOUT_MSEC;
+ }
+ }
+#endif
+
+#endif /* USE_FUNC_POLL, etc */
+
+ returntime = _nc_gettime(FALSE);
+
+ if (milliseconds >= 0)
+ milliseconds -= (returntime - starttime);
+
+#ifdef NCURSES_WGETCH_EVENTS
+ if (evl) {
+ _nc_event **ev = evl->events;
+ _nc_event **last = ev + evl->count;
+
+ evl->result_flags = 0;
+ while (ev < last) {
+ if ((*ev)->type == _NC_EVENT_TIMEOUT_MSEC) {
+ long diff = (returntime - starttime);
+ if ((*ev)->data.timeout_msec <= diff)
+ (*ev)->data.timeout_msec = 0;
+ else
+ (*ev)->data.timeout_msec -= diff;
+ }
+
+ }
+ }
+#endif
+
+#if PRECISE_GETTIME && HAVE_NANOSLEEP
+ /*
+ * If the timeout hasn't expired, and we've gotten no data,
+ * this is probably a system where 'select()' needs to be left
+ * alone so that it can complete. Make this process sleep,
+ * then come back for more.
+ */
+ if (result == 0 && milliseconds > 100) {
+ napms(100); /* FIXME: this won't be right if I recur! */
+ milliseconds -= 100;
+ goto retry;
+ }
+#endif
+
+ /* return approximate time left in milliseconds */
+ if (timeleft)
+ *timeleft = milliseconds;
+
+ TR(TRACE_IEVENT, ("end twait: returned %d (%d), remaining time %d msec",
+ result, errno, milliseconds));
+
+ /*
+ * Both 'poll()' and 'select()' return the number of file descriptors
+ * that are active. Translate this back to the mask that denotes which
+ * file-descriptors, so that we don't need all of this system-specific
+ * code everywhere.
+ */
+ if (result != 0) {
+ if (result > 0) {
+ result = 0;
+#if USE_FUNC_POLL
+ for (count = 0; count < 2; count++) {
+ if ((mode & (1 << count))
+ && (fds[count].revents & POLLIN)) {
+ result |= (1 << count);
+ }
+ }
+#elif defined(__BEOS__)
+ result = 1; /* redundant, but simple */
+#elif HAVE_SELECT
+ if ((mode & 2)
+ && (fd = SP->_mouse_fd) >= 0
+ && FD_ISSET(fd, &set))
+ result |= 2;
+ if ((mode & 1)
+ && FD_ISSET(SP->_ifd, &set))
+ result |= 1;
+#endif
+ } else
+ result = 0;
+ }
+#ifdef NCURSES_WGETCH_EVENTS
+ if ((mode & 4) && evl && evl->result_flags)
+ result |= 4;
+#endif
+
+ return (result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tty/lib_vidattr.c b/Build/source/libs/ncurses/ncurses/tty/lib_vidattr.c
new file mode 100644
index 00000000000..00611f4e150
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/lib_vidattr.c
@@ -0,0 +1,310 @@
+/****************************************************************************
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ ****************************************************************************/
+
+/*
+ * vidputs(newmode, outc)
+ *
+ * newmode is taken to be the logical 'or' of the symbols in curses.h
+ * representing graphic renditions. The terminal is set to be in all of
+ * the given modes, if possible.
+ *
+ * if the new attribute is normal
+ * if exit-alt-char-set exists
+ * emit it
+ * emit exit-attribute-mode
+ * else if set-attributes exists
+ * use it to set exactly what you want
+ * else
+ * if exit-attribute-mode exists
+ * turn off everything
+ * else
+ * turn off those which can be turned off and aren't in
+ * newmode.
+ * turn on each mode which should be on and isn't, one by one
+ *
+ * NOTE that this algorithm won't achieve the desired mix of attributes
+ * in some cases, but those are probably just those cases in which it is
+ * actually impossible, anyway, so...
+ *
+ * NOTE that we cannot assume that there's no interaction between color
+ * and other attribute resets. So each time we reset color (or other
+ * attributes) we'll have to be prepared to restore the other.
+ */
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_vidattr.c,v 1.39 2001/08/26 00:40:46 Philippe.Blain Exp $")
+
+#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
+
+#define TurnOn(mask,mode) \
+ if ((turn_on & mask) && mode) { doPut(mode); }
+
+#define TurnOff(mask,mode) \
+ if ((turn_off & mask) && mode) { doPut(mode); turn_off &= ~mask; }
+
+ /* if there is no current screen, assume we *can* do color */
+#define SetColorsIf(why,old_attr) \
+ if (can_color && (why)) { \
+ int old_pair = PAIR_NUMBER(old_attr); \
+ TR(TRACE_ATTRS, ("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(old_pair, pair, reverse, outc); \
+ } \
+ }
+
+NCURSES_EXPORT(int)
+vidputs
+(chtype newmode, int (*outc) (int))
+{
+ static attr_t previous_attr = A_NORMAL;
+ attr_t turn_on, turn_off;
+ int pair;
+ bool reverse = FALSE;
+ bool can_color = (SP == 0 || SP->_coloron);
+#if 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)));
+
+ /* this allows us to go on whether or not newterm() has been called */
+ if (SP)
+ previous_attr = SP->_current_attr;
+
+ TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(previous_attr)));
+
+#if !USE_XMC_SUPPORT
+ 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) != 0
+ || fix_pair0)
+ && (no_color_video > 0)) {
+ /*
+ * If we had chosen the A_xxx definitions to correspond to the
+ * no_color_video mask, we could simply shift it up and mask off the
+ * attributes. But we did not (actually copied Solaris' definitions).
+ * However, this is still simpler/faster than a lookup table.
+ *
+ * The 63 corresponds to A_STANDOUT, A_UNDERLINE, A_REVERSE, A_BLINK,
+ * A_DIM, A_BOLD which are 1:1 with no_color_video. The bits that
+ * correspond to A_INVIS, A_PROTECT (192) must be shifted up 1 and
+ * A_ALTCHARSET (256) down 2 to line up. We use the NCURSES_BITS
+ * macro so this will work properly for the wide-character layout.
+ */
+ unsigned value = no_color_video;
+ attr_t mask = NCURSES_BITS((value & 63)
+ | ((value & 192) << 1)
+ | ((value & 256) >> 2), 8);
+
+ if ((mask & A_REVERSE) != 0
+ && (newmode & A_REVERSE) != 0) {
+ reverse = TRUE;
+ mask &= ~A_REVERSE;
+ }
+ newmode &= ~mask;
+ }
+
+ if (newmode == previous_attr)
+ returnCode(OK);
+
+ pair = PAIR_NUMBER(newmode);
+
+ if (reverse) {
+ newmode &= ~A_REVERSE;
+ }
+
+ turn_off = (~newmode & previous_attr) & ALL_BUT_COLOR;
+ turn_on = (newmode & ~previous_attr) & ALL_BUT_COLOR;
+
+ 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) {
+ if (exit_attribute_mode) {
+ doPut(exit_attribute_mode);
+ } else {
+ if (!SP || SP->_use_rmul) {
+ TurnOff(A_UNDERLINE, exit_underline_mode);
+ }
+ if (!SP || SP->_use_rmso) {
+ TurnOff(A_STANDOUT, exit_standout_mode);
+ }
+ }
+ previous_attr &= ~A_COLOR;
+ }
+
+ SetColorsIf((pair != 0) || fix_pair0, previous_attr);
+ } else if (set_attributes) {
+ 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 {
+
+ TR(TRACE_ATTRS, ("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) || fix_pair0, previous_attr);
+
+ TR(TRACE_ATTRS, ("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);
+#ifdef enter_horizontal_hl_mode
+ TurnOn(A_HORIZONTAL, enter_horizontal_hl_mode);
+#endif
+#ifdef enter_left_hl_mode
+ TurnOn(A_LEFT, enter_left_hl_mode);
+#endif
+#ifdef enter_low_hl_mode
+ TurnOn(A_LOW, enter_low_hl_mode);
+#endif
+#ifdef enter_right_hl_mode
+ TurnOn(A_RIGHT, enter_right_hl_mode);
+#endif
+#ifdef enter_top_hl_mode
+ TurnOn(A_TOP, enter_top_hl_mode);
+#endif
+#ifdef enter_vertical_hl_mode
+ TurnOn(A_VERTICAL, enter_vertical_hl_mode);
+#endif
+ /* *INDENT-ON* */
+
+ }
+
+ if (reverse)
+ newmode |= A_REVERSE;
+
+ if (SP)
+ SP->_current_attr = newmode;
+ else
+ previous_attr = newmode;
+
+ returnCode(OK);
+}
+
+NCURSES_EXPORT(int)
+vidattr(chtype newmode)
+{
+ T((T_CALLED("vidattr(%s)"), _traceattr(newmode)));
+
+ returnCode(vidputs(newmode, _nc_outch));
+}
+
+NCURSES_EXPORT(chtype)
+termattrs(void)
+{
+ chtype attrs = A_NORMAL;
+
+ T((T_CALLED("termattrs()")));
+ if (enter_alt_charset_mode)
+ attrs |= A_ALTCHARSET;
+
+ if (enter_blink_mode)
+ attrs |= A_BLINK;
+
+ if (enter_bold_mode)
+ attrs |= A_BOLD;
+
+ if (enter_dim_mode)
+ attrs |= A_DIM;
+
+ if (enter_reverse_mode)
+ attrs |= A_REVERSE;
+
+ if (enter_standout_mode)
+ attrs |= A_STANDOUT;
+
+ if (enter_protected_mode)
+ attrs |= A_PROTECT;
+
+ if (enter_secure_mode)
+ attrs |= A_INVIS;
+
+ if (enter_underline_mode)
+ attrs |= A_UNDERLINE;
+
+ if (SP->_coloron)
+ attrs |= A_COLOR;
+
+ returnChar(attrs);
+}
diff --git a/Build/source/libs/ncurses/ncurses/tty/tty_display.h b/Build/source/libs/ncurses/ncurses/tty/tty_display.h
new file mode 100644
index 00000000000..3322f747ebb
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/tty_display.h
@@ -0,0 +1,140 @@
+/****************************************************************************
+ * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ************************************************************************** */
+
+#ifndef TTY_DISPLAY_H
+#define TTY_DISPLAY_H 1
+
+/*
+ * $Id: tty_display.h,v 1.5 2003/08/02 22:59:07 Philippe.Blain Exp $
+ */
+extern NCURSES_EXPORT(bool) _nc_tty_beep (void);
+extern NCURSES_EXPORT(bool) _nc_tty_check_resize (void);
+extern NCURSES_EXPORT(bool) _nc_tty_cursor (int);
+extern NCURSES_EXPORT(bool) _nc_tty_flash (void);
+extern NCURSES_EXPORT(bool) _nc_tty_init_color (int,int,int,int);
+extern NCURSES_EXPORT(bool) _nc_tty_init_pair (int,int,int);
+extern NCURSES_EXPORT(bool) _nc_tty_slk_hide (bool);
+extern NCURSES_EXPORT(bool) _nc_tty_slk_update (int,const char *);
+extern NCURSES_EXPORT(bool) _nc_tty_start_color (void);
+extern NCURSES_EXPORT(void) _nc_tty_display_resume (void);
+extern NCURSES_EXPORT(void) _nc_tty_display_suspend (void);
+extern NCURSES_EXPORT(void) _nc_tty_dispose (void); /* frees SP->_term */
+extern NCURSES_EXPORT(void) _nc_tty_switch_to (void);
+extern NCURSES_EXPORT(void) _nc_tty_update (void);
+
+struct tty_display_data {
+ int _fifohold; /* set if breakout marked */
+ unsigned long _current_attr; /* terminal attribute current set */
+ int _cursrow; /* physical cursor row (-1=unknown) */
+ int _curscol; /* physical cursor column */
+
+ /* cursor movement costs; units are 10ths of milliseconds */
+ int _char_padding; /* cost of character put */
+ int _cr_cost; /* cost of (carriage_return) */
+ int _cup_cost; /* cost of (cursor_address) */
+ int _home_cost; /* cost of (cursor_home) */
+ int _ll_cost; /* cost of (cursor_to_ll) */
+#if USE_HARD_TABS
+ int _ht_cost; /* cost of (tab) */
+ int _cbt_cost; /* cost of (backtab) */
+#endif /* USE_HARD_TABS */
+ int _cub1_cost; /* cost of (cursor_left) */
+ int _cuf1_cost; /* cost of (cursor_right) */
+ int _cud1_cost; /* cost of (cursor_down) */
+ int _cuu1_cost; /* cost of (cursor_up) */
+ int _cub_cost; /* cost of (parm_cursor_left) */
+ int _cuf_cost; /* cost of (parm_cursor_right) */
+ int _cud_cost; /* cost of (parm_cursor_down) */
+ 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 */
+ int _ed_cost; /* cost of (clr_eos) */
+ int _el_cost; /* cost of (clr_eol) */
+ int _el1_cost; /* cost of (clr_bol) */
+ int _dch1_cost; /* cost of (delete_character) */
+ int _ich1_cost; /* cost of (insert_character) */
+ int _dch_cost; /* cost of (parm_dch) */
+ int _ich_cost; /* cost of (parm_ich) */
+ int _ech_cost; /* cost of (erase_chars) */
+ int _rep_cost; /* cost of (repeat_char) */
+ int _hpa_ch_cost; /* cost of (column_address) */
+ int _cup_ch_cost; /* cost of (cursor_address) */
+ int _smir_cost; /* cost of (enter_insert_mode) */
+ int _rmir_cost; /* cost of (exit_insert_mode) */
+ int _ip_cost; /* cost of (insert_padding) */
+ /* used in lib_mvcur.c */
+ char * _address_cursor;
+ int _carriage_return_length;
+ int _cursor_home_length;
+ int _cursor_to_ll_length;
+
+ chtype _xmc_suppress; /* attributes to suppress if xmc */
+ chtype _xmc_triggers; /* attributes to process if xmc */
+
+ bool _sig_winch;
+};
+
+
+#define DelCharCost(count) \
+ ((parm_dch != 0) \
+ ? D->_dch_cost \
+ : ((delete_character != 0) \
+ ? (D->_dch1_cost * count) \
+ : INFINITY))
+
+#define InsCharCost(count) \
+ ((parm_ich != 0) \
+ ? D->_ich_cost \
+ : ((enter_insert_mode && exit_insert_mode) \
+ ? D->_smir_cost + D->_rmir_cost + (D->_ip_cost * count) \
+ : ((insert_character != 0) \
+ ? ((D->_ich1_cost + D->_ip_cost) * count) \
+ : INFINITY)))
+
+#if USE_XMC_SUPPORT
+#define UpdateAttrs(c) if (D->_current_attr != AttrOf(c)) { \
+ attr_t chg = D->_current_attr; \
+ vidattr(AttrOf(c)); \
+ if (magic_cookie_glitch > 0 \
+ && XMC_CHANGES((chg ^ D->_current_attr))) { \
+ T(("%s @%d before glitch %d,%d", \
+ __FILE__, __LINE__, \
+ D->_cursrow, \
+ D->_curscol)); \
+ _nc_do_xmc_glitch(chg); \
+ } \
+ }
+#else
+#define UpdateAttrs(c) if (D->_current_attr != AttrOf(c)) \
+ vidattr(AttrOf(c));
+#endif
+
+#define XMC_CHANGES(c) ((c) & D->_xmc_suppress)
+
+#endif /* TTY_DISPLAY_H */
diff --git a/Build/source/libs/ncurses/ncurses/tty/tty_input.h b/Build/source/libs/ncurses/ncurses/tty/tty_input.h
new file mode 100644
index 00000000000..e520793eea6
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/tty_input.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+ * $Id: tty_input.h,v 1.2 2000/12/10 02:26:51 tom Exp $
+ */
+
+#ifndef TTY_INPUT_H
+#define TTY_INPUT_H 1
+
+extern NCURSES_EXPORT(bool) _nc_tty_mouse_mask (mmask_t);
+extern NCURSES_EXPORT(bool) _nc_tty_pending (void);
+extern NCURSES_EXPORT(int) _nc_tty_next_event (int);
+extern NCURSES_EXPORT(void) _nc_tty_flags_changed (void);
+extern NCURSES_EXPORT(void) _nc_tty_flush (void);
+extern NCURSES_EXPORT(void) _nc_tty_input_resume (void);
+extern NCURSES_EXPORT(void) _nc_tty_input_suspend (void);
+
+struct tty_input_data {
+ int _ifd; /* input file ptr for screen */
+ int _keypad_xmit; /* current terminal state */
+ int _meta_on; /* current terminal state */
+
+ /*
+ * These are the data that support the mouse interface.
+ */
+ bool (*_mouse_event) (SCREEN *);
+ bool (*_mouse_inline)(SCREEN *);
+ bool (*_mouse_parse) (int);
+ void (*_mouse_resume)(SCREEN *);
+ void (*_mouse_wrap) (SCREEN *);
+ int _mouse_fd; /* file-descriptor, if any */
+ int mousetype;
+};
+
+#endif /* TTY_INPUT_H */
diff --git a/Build/source/libs/ncurses/ncurses/tty/tty_update.c b/Build/source/libs/ncurses/ncurses/tty/tty_update.c
new file mode 100644
index 00000000000..c012b08b0c2
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/tty/tty_update.c
@@ -0,0 +1,1896 @@
+/****************************************************************************
+ * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
+ * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ ****************************************************************************/
+
+/*-----------------------------------------------------------------
+ *
+ * lib_doupdate.c
+ *
+ * The routine doupdate() and its dependents.
+ * All physical output is concentrated here (except _nc_outch()
+ * in lib_tputs.c).
+ *
+ *-----------------------------------------------------------------*/
+
+#include <curses.priv.h>
+
+#ifdef __BEOS__
+#undef false
+#undef true
+#include <OS.h>
+#endif
+
+#if defined(TRACE) && HAVE_SYS_TIMES_H && HAVE_TIMES
+#define USE_TRACE_TIMES 1
+#else
+#define USE_TRACE_TIMES 0
+#endif
+
+#if HAVE_SYS_TIME_H && HAVE_SYS_TIME_SELECT
+#include <sys/time.h>
+#endif
+
+#if USE_TRACE_TIMES
+#include <sys/times.h>
+#endif
+
+#if USE_FUNC_POLL
+#elif HAVE_SELECT
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#endif
+
+#include <ctype.h>
+#include <term.h>
+
+MODULE_ID("$Id: tty_update.c,v 1.210 2004/10/16 16:01:40 tom Exp $")
+
+/*
+ * This define controls the line-breakout optimization. Every once in a
+ * while during screen refresh, we want to check for input and abort the
+ * update if there's some waiting. CHECK_INTERVAL controls the number of
+ * changed lines to be emitted between input checks.
+ *
+ * Note: Input-check-and-abort is no longer done if the screen is being
+ * updated from scratch. This is a feature, not a bug.
+ */
+#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
+ * work ONLY on ANSI-compatible terminals!
+ */
+/* #define POSITION_DEBUG */
+
+static inline NCURSES_CH_T ClrBlank(WINDOW *win);
+static int ClrBottom(int total);
+static void ClearScreen(NCURSES_CH_T blank);
+static void ClrUpdate(void);
+static void DelChar(int count);
+static void InsStr(NCURSES_CH_T * line, int count);
+static void TransformLine(int const lineno);
+
+#ifdef POSITION_DEBUG
+/****************************************************************************
+ *
+ * Debugging code. Only works on ANSI-standard terminals.
+ *
+ ****************************************************************************/
+
+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 *s;
+ int y, x;
+
+ if (!_nc_tracing || (expected_y < 0 && expected_x < 0))
+ return;
+
+ _nc_flush();
+ memset(buf, '\0', sizeof(buf));
+ putp("\033[6n"); /* only works on ANSI-compatibles */
+ _nc_flush();
+ *(s = buf) = 0;
+ do {
+ int ask = sizeof(buf) - 1 - (s - buf);
+ int got = read(0, s, ask);
+ if (got == 0)
+ break;
+ s += got;
+ } while (strchr(buf, 'R') == 0);
+ _tracef("probe returned %s", _nc_visbuf(buf));
+
+ /* try to interpret as a position report */
+ if (sscanf(buf, "\033[%d;%dR", &y, &x) != 2) {
+ _tracef("position probe failed in %s", legend);
+ } else {
+ if (expected_x < 0)
+ expected_x = x - 1;
+ if (expected_y < 0)
+ expected_y = y - 1;
+ if (y - 1 != expected_y || x - 1 != expected_x) {
+ beep();
+ tputs(tparm("\033[%d;%dH", expected_y + 1, expected_x + 1), 1, _nc_outch);
+ _tracef("position seen (%d, %d) doesn't match expected one (%d, %d) in %s",
+ 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 */
+#endif /* POSITION_DEBUG */
+
+/****************************************************************************
+ *
+ * Optimized update code
+ *
+ ****************************************************************************/
+
+static inline void
+GoTo(int const row, int const col)
+{
+ TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)",
+ row, col, SP->_cursrow, SP->_curscol));
+
+ position_check(SP->_cursrow, SP->_curscol, "GoTo");
+
+ mvcur(SP->_cursrow, SP->_curscol, row, col);
+ position_check(SP->_cursrow, SP->_curscol, "GoTo2");
+}
+
+static inline void
+PutAttrChar(CARG_CH_T ch)
+{
+ int chlen = 1;
+ NCURSES_CH_T my_ch;
+ PUTC_DATA;
+ NCURSES_CH_T tilde;
+ NCURSES_ATTR_T attr = AttrOfD(ch);
+
+ TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)",
+ _tracech_t(ch),
+ SP->_cursrow, SP->_curscol));
+#if USE_WIDEC_SUPPORT
+ /*
+ * If this is not a valid character, there is nothing more to do.
+ */
+ if (isnac(CHDEREF(ch)))
+ return;
+ /*
+ * Determine the number of character cells which the 'ch' value will use
+ * on the screen. It should be at least one.
+ */
+ if ((chlen = wcwidth(CharOf(CHDEREF(ch)))) <= 0) {
+ static NCURSES_CH_T blank = NewChar(BLANK_TEXT);
+
+ if (is8bits(CharOf(CHDEREF(ch)))
+ && (isprint(CharOf(CHDEREF(ch)))
+ || (SP->_legacy_coding && CharOf(CHDEREF(ch)) >= 160))) {
+ ;
+ } else {
+ ch = CHREF(blank);
+ TR(TRACE_CHARPUT, ("forced to blank"));
+ }
+ chlen = 1;
+ }
+#endif
+
+ if ((attr & A_ALTCHARSET)
+ && SP->_acs_map != 0
+ && CharOfD(ch) < ACS_LEN) {
+ my_ch = CHDEREF(ch); /* work around const param */
+#if USE_WIDEC_SUPPORT
+ /*
+ * This is crude & ugly, but works most of the time. It checks if the
+ * acs_chars string specified that we have a mapping for this
+ * character, and uses the wide-character mapping when we expect the
+ * normal one to be broken (by mis-design ;-).
+ */
+ if (SP->_screen_acs_fix
+ && SP->_screen_acs_map[CharOf(my_ch)]) {
+ attr &= ~(A_ALTCHARSET);
+ my_ch = _nc_wacs[CharOf(my_ch)];
+ }
+#endif
+ /*
+ * If we (still) have alternate character set, it is the normal 8bit
+ * flavor. The _screen_acs_map[] array tells if the character was
+ * really in acs_chars, needed because of the way wide/normal line
+ * drawing flavors are integrated.
+ */
+ if (attr & A_ALTCHARSET) {
+ int j = CharOfD(ch);
+ chtype temp = UChar(SP->_acs_map[j]);
+
+ if (!(SP->_screen_acs_map[j]))
+ attr &= ~(A_ALTCHARSET);
+ if (temp != 0)
+ SetChar(my_ch, temp, attr);
+ }
+ ch = CHREF(my_ch);
+ }
+ if (tilde_glitch && (CharOfD(ch) == L('~'))) {
+ SetChar(tilde, L('`'), attr);
+ ch = CHREF(tilde);
+ }
+
+ UpdateAttrs(attr);
+#if !USE_WIDEC_SUPPORT
+ /* FIXME - we do this special case for signal handling, should see how to
+ * make it work for wide characters.
+ */
+ if (SP->_outch != 0) {
+ SP->_outch(UChar(ch));
+ } else
+#endif
+ {
+ PUTC(CHDEREF(ch), SP->_ofp); /* macro's fastest... */
+ TRACE_OUTCHARS(1);
+ }
+ SP->_curscol += chlen;
+ if (char_padding) {
+ TPUTS_TRACE("char_padding");
+ putp(char_padding);
+ }
+}
+
+static bool
+check_pending(void)
+/* check for pending input */
+{
+ 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;
+
+ 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;
+ }
+#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;
+ }
+#elif HAVE_SELECT
+ fd_set fdset;
+ struct timeval ktimeout;
+
+ 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();
+ }
+ return FALSE;
+}
+
+/* put char at lower right corner */
+static void
+PutCharLR(const ARG_CH_T ch)
+{
+ if (!auto_right_margin) {
+ /* we can put the char directly */
+ PutAttrChar(ch);
+ } else if (enter_am_mode && exit_am_mode) {
+ /* we can suppress automargin */
+ TPUTS_TRACE("exit_am_mode");
+ putp(exit_am_mode);
+
+ PutAttrChar(ch);
+ SP->_curscol--;
+ position_check(SP->_cursrow, SP->_curscol, "exit_am_mode");
+
+ 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);
+ PutAttrChar(ch);
+ GoTo(screen_lines - 1, screen_columns - 2);
+ InsStr(newscr->_line[screen_lines - 1].text + screen_columns - 2, 1);
+ }
+}
+
+static void
+wrap_cursor(void)
+{
+ if (eat_newline_glitch) {
+ /*
+ * xenl can manifest two different ways. The vt100
+ * way is that, when you'd expect the cursor to wrap,
+ * it stays hung at the right margin (on top of the
+ * character just emitted) and doesn't wrap until the
+ * *next* graphic char is emitted. The c100 way is
+ * to ignore LF received just after an am wrap.
+ *
+ * An aggressive way to handle this would be to
+ * emit CR/LF after the char and then assume the wrap
+ * is done, you're on the first position of the next
+ * line, and the terminal out of its weird state.
+ * Here it's safe to just tell the code that the
+ * cursor is in hyperspace and let the next mvcur()
+ * call straighten things out.
+ */
+ SP->_curscol = -1;
+ SP->_cursrow = -1;
+ } else if (auto_right_margin) {
+ SP->_curscol = 0;
+ SP->_cursrow++;
+ } else {
+ SP->_curscol--;
+ }
+ position_check(SP->_cursrow, SP->_curscol, "wrap_cursor");
+}
+
+static inline void
+PutChar(const ARG_CH_T ch)
+/* insert character, handling automargin stuff */
+{
+ if (SP->_cursrow == screen_lines - 1 && SP->_curscol == screen_columns - 1)
+ PutCharLR(ch);
+ else
+ PutAttrChar(ch);
+
+ if (SP->_curscol >= screen_columns)
+ wrap_cursor();
+
+ 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(ARG_CH_T ch)
+{
+ if (!back_color_erase && SP->_coloron) {
+#if NCURSES_EXT_FUNCS
+ if (!SP->_default_color)
+ return FALSE;
+ if (SP->_default_fg != C_MASK || SP->_default_bg != C_MASK)
+ return FALSE;
+ if (AttrOfD(ch) & A_COLOR) {
+ short fg, bg;
+ pair_content(PAIR_NUMBER(AttrOfD(ch)), &fg, &bg);
+ if (fg != C_MASK || bg != C_MASK)
+ return FALSE;
+ }
+#else
+ if (AttrOfD(ch) & A_COLOR)
+ return FALSE;
+#endif
+ }
+ return (ISBLANK(CHDEREF(ch)) &&
+ (AttrOfD(ch) & ~(NONBLANK_ATTR | A_COLOR)) == BLANK_ATTR);
+}
+
+/*
+ * Issue a given span of characters from an array.
+ * Must be functionally equivalent to:
+ * for (i = 0; i < num; i++)
+ * PutChar(ntext[i]);
+ * but can leave the cursor positioned at the middle of the interval.
+ *
+ * Returns: 0 - cursor is at the end of interval
+ * 1 - cursor is somewhere in the middle
+ *
+ * This code is optimized using ech and rep.
+ */
+static int
+EmitRange(const NCURSES_CH_T * ntext, int num)
+{
+ int i;
+
+ if (erase_chars || repeat_char) {
+ while (num > 0) {
+ int runcount;
+ NCURSES_CH_T ntext0;
+
+ while (num > 1 && !CharEq(ntext[0], ntext[1])) {
+ PutChar(CHREF(ntext[0]));
+ ntext++;
+ num--;
+ }
+ ntext0 = ntext[0];
+ if (num == 1) {
+ PutChar(CHREF(ntext0));
+ return 0;
+ }
+ runcount = 2;
+
+ while (runcount < num && CharEq(ntext[runcount], ntext0))
+ runcount++;
+
+ /*
+ * The cost expression in the middle isn't exactly right.
+ * _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_ch_cost
+ && can_clear_with(CHREF(ntext0))) {
+ UpdateAttrs(AttrOf(ntext0));
+ putp(tparm(erase_chars, runcount));
+
+ /*
+ * If this is the last part of the given interval,
+ * don't bother moving cursor, since it can be the
+ * last update on the line.
+ */
+ if (runcount < num) {
+ GoTo(SP->_cursrow, SP->_curscol + runcount);
+ } else {
+ return 1; /* cursor stays in the middle */
+ }
+ } else if (repeat_char && runcount > SP->_rep_cost) {
+ bool wrap_possible = (SP->_curscol + runcount >= screen_columns);
+ int rep_count = runcount;
+
+ if (wrap_possible)
+ rep_count--;
+
+ UpdateAttrs(AttrOf(ntext0));
+ tputs(tparm(repeat_char, CharOf(ntext0), rep_count),
+ rep_count, _nc_outch);
+ SP->_curscol += rep_count;
+
+ if (wrap_possible)
+ PutChar(CHREF(ntext0));
+ } else {
+ for (i = 0; i < runcount; i++)
+ PutChar(CHREF(ntext[i]));
+ }
+ ntext += runcount;
+ num -= runcount;
+ }
+ return 0;
+ }
+
+ for (i = 0; i < num; i++)
+ PutChar(CHREF(ntext[i]));
+ return 0;
+}
+
+/*
+ * Output the line in the given range [first .. last]
+ *
+ * If there's a run of identical characters that's long enough to justify
+ * cursor movement, use that also.
+ *
+ * Returns: same as EmitRange
+ */
+static int
+PutRange(const NCURSES_CH_T * otext,
+ const NCURSES_CH_T * ntext,
+ int row,
+ int first, int last)
+{
+ int i, j, same;
+
+ TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)",
+ otext, ntext, row, first, last));
+
+ if (otext != ntext
+ && (last - first + 1) > SP->_inline_cost) {
+ for (j = first, same = 0; j <= last; j++) {
+ if (!same && isnac(otext[j]))
+ continue;
+ if (CharEq(otext[j], ntext[j])) {
+ same++;
+ } else {
+ if (same > SP->_inline_cost) {
+ EmitRange(ntext + first, j - same - first);
+ GoTo(row, first = j);
+ }
+ same = 0;
+ }
+ }
+ i = EmitRange(ntext + first, j - same - first);
+ /*
+ * Always return 1 for the next GoTo() after a PutRange() if we found
+ * identical characters at end of interval
+ */
+ return (same == 0 ? i : 1);
+ }
+ return EmitRange(ntext + first, last - first + 1);
+}
+
+/* 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)
+
+NCURSES_EXPORT(int)
+doupdate(void)
+{
+ int i;
+ int nonempty;
+#if USE_TRACE_TIMES
+ struct tms before, after;
+#endif /* USE_TRACE_TIMES */
+
+ 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);
+ }
+#endif /* TRACE */
+
+ _nc_signal_handler(FALSE);
+
+ 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();
+ }
+#endif
+
+ if (SP->_endwin) {
+
+ T(("coming back from shell mode"));
+ reset_prog_mode();
+
+ _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);
+#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.
+ */
+#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;
+ attr_t 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;
+ }
+
+ TR(TRACE_ATTRS, ("At (%d, %d): from %s...", i, j, _traceattr(rattr)));
+ TR(TRACE_ATTRS, ("...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) & (attr_t)~NONBLANK_ATTR))
+ if (ISBLANK(newscr->_line[i].text[j]) && SAFE(turnon)) {
+ RemAttr(newscr->_line[i].text[j], turnon);
+ continue;
+ }
+
+ /* check that there's enough room at start of span */
+ for (k = 1; k <= magic_cookie_glitch; k++) {
+ if (j - k < 0
+ || !ISBLANK(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;
+ TR(TRACE_ATTRS,
+ ("Range attributed with %s ends at (%d, %d)",
+ _traceattr(turnon), m, n));
+ goto foundit;
+ }
+ }
+ n = 0;
+ }
+ TR(TRACE_ATTRS,
+ ("Range attributed with %s ends offscreen",
+ _traceattr(turnon)));
+ foundit:;
+
+ if (end_onscreen) {
+ NCURSES_CH_T *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
+ && ISBLANK(lastline[n])
+ && SAFE(AttrOf(lastline[n])))
+ RemAttr(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
+ || !ISBLANK(lastline[n + k])
+ || !SAFE(AttrOf(lastline[n + k])))
+ failed = TRUE;
+ }
+ }
+
+ if (failed) {
+ int p, q = j;
+
+ TR(TRACE_ATTRS,
+ ("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;
+ RemAttr(newscr->_line[p].text[q], turnon);
+ }
+ q = 0;
+ }
+ foundend:;
+ } else {
+ TR(TRACE_ATTRS,
+ ("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++)
+ AddAttr(newscr->_line[i].text[j - k], turnon);
+ }
+
+ rattr = AttrOf(newscr->_line[i].text[j]);
+ }
+ }
+
+#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 = 0;
+ if (curscr->_clear || newscr->_clear) { /* force refresh ? */
+ TR(TRACE_UPDATE, ("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;
+
+ nonempty = min(screen_lines, newscr->_maxy + 1);
+
+ if (SP->_scrolling) {
+ _nc_scroll_optimize();
+ }
+
+ nonempty = ClrBottom(nonempty);
+
+ TR(TRACE_UPDATE, ("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);
+ }
+
+ if (!newscr->_leaveok) {
+ curscr->_curx = newscr->_curx;
+ curscr->_cury = newscr->_cury;
+
+ 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);
+
+ _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",
+ _nc_outchars,
+ (long) (after.tms_stime - before.tms_stime),
+ (long) (after.tms_utime - before.tms_utime)));
+#endif /* USE_TRACE_TIMES */
+
+ _nc_signal_handler(TRUE);
+
+ returnCode(OK);
+}
+
+/*
+ * ClrBlank(win)
+ *
+ * Returns the attributed character that corresponds to the "cleared"
+ * screen. If the terminal has the back-color-erase feature, this will be
+ * colored according to the wbkgd() call.
+ *
+ * We treat 'curscr' specially because it isn't supposed to be set directly
+ * in the wbkgd() call. Assume 'stdscr' for this case.
+ */
+#define BCE_ATTRS (A_NORMAL|A_COLOR)
+#define BCE_BKGD(win) (((win) == curscr ? stdscr : (win))->_nc_bkgd)
+
+static inline NCURSES_CH_T
+ClrBlank(WINDOW *win)
+{
+ NCURSES_CH_T blank = NewChar(BLANK_TEXT);
+ if (back_color_erase)
+ AddAttr(blank, (AttrOf(BCE_BKGD(win)) & BCE_ATTRS));
+ return blank;
+}
+
+/*
+** ClrUpdate()
+**
+** Update by clearing and redrawing the entire screen.
+**
+*/
+
+static void
+ClrUpdate(void)
+{
+ int i;
+ NCURSES_CH_T blank = ClrBlank(stdscr);
+ int nonempty = min(screen_lines, newscr->_maxy + 1);
+
+ TR(TRACE_UPDATE, ("ClrUpdate() called"));
+
+ ClearScreen(blank);
+
+ TR(TRACE_UPDATE, ("updating screen from scratch"));
+
+ nonempty = ClrBottom(nonempty);
+
+ for (i = 0; i < nonempty; i++)
+ TransformLine(i);
+}
+
+/*
+** ClrToEOL(blank)
+**
+** Clear to end of current line, starting at the cursor position
+*/
+
+static void
+ClrToEOL(NCURSES_CH_T blank, bool needclear)
+{
+ int j;
+
+ if (curscr != 0
+ && SP->_cursrow >= 0) {
+ for (j = SP->_curscol; j < screen_columns; j++) {
+ if (j >= 0) {
+ NCURSES_CH_T *cp = &(curscr->_line[SP->_cursrow].text[j]);
+
+ if (!CharEq(*cp, blank)) {
+ *cp = blank;
+ needclear = TRUE;
+ }
+ }
+ }
+ } else {
+ needclear = TRUE;
+ }
+
+ if (needclear) {
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("clr_eol");
+ if (clr_eol && SP->_el_cost <= (screen_columns - SP->_curscol)) {
+ putp(clr_eol);
+ } else {
+ int count = (screen_columns - SP->_curscol);
+ while (count-- > 0)
+ PutChar(CHREF(blank));
+ }
+ }
+}
+
+/*
+** ClrToEOS(blank)
+**
+** Clear to end of screen, starting at the cursor position
+*/
+
+static void
+ClrToEOS(NCURSES_CH_T blank)
+{
+ int row, col;
+
+ row = SP->_cursrow;
+ col = SP->_curscol;
+
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("clr_eos");
+ tputs(clr_eos, screen_lines - row, _nc_outch);
+
+ 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;
+ }
+}
+
+/*
+ * ClrBottom(total)
+ *
+ * Test if clearing the end of the screen would satisfy part of the
+ * 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)
+{
+ int row;
+ int col;
+ int top = total;
+ int last = min(screen_columns, newscr->_maxx + 1);
+ NCURSES_CH_T blank = newscr->_line[total - 1].text[last - 1];
+ bool ok;
+
+ if (clr_eos && can_clear_with(CHREF(blank))) {
+
+ for (row = total - 1; row >= 0; row--) {
+ for (col = 0, ok = TRUE; ok && col < last; col++) {
+ ok = (CharEq(newscr->_line[row].text[col], blank));
+ }
+ if (!ok)
+ break;
+
+ for (col = 0; ok && col < last; col++) {
+ ok = (CharEq(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) {
+ GoTo(top, 0);
+ ClrToEOS(blank);
+ if (SP->oldhash && SP->newhash) {
+ for (row = top; row < screen_lines; row++)
+ SP->oldhash[row] = SP->newhash[row];
+ }
+ }
+ }
+ return top;
+}
+
+#if USE_XMC_SUPPORT
+#if USE_WIDEC_SUPPORT
+static inline bool
+check_xmc_transition(NCURSES_CH_T * a, NCURSES_CH_T * b)
+{
+ if (((a->attr ^ b->attr) & ~(a->attr) & SP->_xmc_triggers) != 0) {
+ return TRUE;
+ }
+ return FALSE;
+}
+#define xmc_turn_on(a,b) check_xmc_transition(&(a), &(b))
+#else
+#define xmc_turn_on(a,b) ((((a)^(b)) & ~(a) & SP->_xmc_triggers) != 0)
+#endif
+
+#define xmc_new(r,c) newscr->_line[r].text[c]
+#define xmc_turn_off(a,b) xmc_turn_on(b,a)
+#endif /* USE_XMC_SUPPORT */
+
+/*
+** TransformLine(lineno)
+**
+** Transform the given line in curscr to the one in newscr, using
+** Insert/Delete Character if _nc_idcok && has_ic().
+**
+** firstChar = position of first different character in line
+** oLastChar = position of last different character in old line
+** nLastChar = position of last different character in new line
+**
+** move to firstChar
+** overwrite chars up to min(oLastChar, nLastChar)
+** if oLastChar < nLastChar
+** insert newLine[oLastChar+1..nLastChar]
+** else
+** delete oLastChar - nLastChar spaces
+*/
+
+static void
+TransformLine(int const lineno)
+{
+ int firstChar, oLastChar, nLastChar;
+ NCURSES_CH_T *newLine = newscr->_line[lineno].text;
+ NCURSES_CH_T *oldLine = curscr->_line[lineno].text;
+ int n;
+ bool attrchanged = FALSE;
+
+ TR(TRACE_UPDATE, ("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) (AttrOf(n) & A_COLOR)
+#define unColor(n) (AttrOf(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) {
+ attr_t oldColor;
+ attr_t newColor;
+ int oldPair;
+ int newPair;
+
+ for (n = 0; n < screen_columns; n++) {
+ if (!CharEq(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]) {
+ RemAttr(oldLine[n], A_COLOR);
+ AddAttr(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;
+ break;
+ }
+ firstChar++;
+ }
+ }
+
+ 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
+
+ /*
+ * This is a very simple loop to paint characters which may have the
+ * magic cookie glitch embedded. It doesn't know much about video
+ * attributes which are continued from one line to the next. It
+ * assumes that we have filtered out requests for attribute changes
+ * that do not get mapped to blank positions.
+ *
+ * FIXME: we are not keeping track of where we put the cookies, so this
+ * 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 (ISBLANK(newLine[n])
+ && ((n > 0
+ && xmc_turn_on(newLine[n - 1], newLine[n]))
+ || (n == 0
+ && lineno > 0
+ && xmc_turn_on(xmc_new(lineno - 1, screen_columns - 1),
+ newLine[n])))) {
+ n = m;
+ }
+
+ PutChar(CHREF(newLine[n]));
+
+ /* check for turn-off:
+ * If we are writing an attributed non-blank, where the
+ * next cell is blank, and not attributed.
+ */
+ if (!ISBLANK(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], xmc_new(lineno + 1, 0))))) {
+ n = m;
+ }
+
+ }
+#endif
+ } else {
+ NCURSES_CH_T blank;
+
+ /* it may be cheap to clear leading whitespace with clr_bol */
+ blank = newLine[0];
+ if (clr_bol && can_clear_with(CHREF(blank))) {
+ int oFirstChar, nFirstChar;
+
+ for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++)
+ if (!CharEq(oldLine[oFirstChar], blank))
+ break;
+ for (nFirstChar = 0; nFirstChar < screen_columns; nFirstChar++)
+ if (!CharEq(newLine[nFirstChar], blank))
+ break;
+
+ if (nFirstChar == oFirstChar) {
+ firstChar = nFirstChar;
+ /* find the first differing character */
+ while (firstChar < screen_columns
+ && CharEq(newLine[firstChar], oldLine[firstChar]))
+ firstChar++;
+ } else if (oFirstChar > nFirstChar) {
+ firstChar = nFirstChar;
+ } else { /* oFirstChar < nFirstChar */
+ firstChar = oFirstChar;
+ if (SP->_el1_cost < nFirstChar - oFirstChar) {
+ if (nFirstChar >= screen_columns
+ && SP->_el_cost <= SP->_el1_cost) {
+ GoTo(lineno, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("clr_eol");
+ putp(clr_eol);
+ } else {
+ GoTo(lineno, nFirstChar - 1);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("clr_bol");
+ putp(clr_bol);
+ }
+
+ while (firstChar < nFirstChar)
+ oldLine[firstChar++] = blank;
+ }
+ }
+ } else {
+ /* find the first differing character */
+ while (firstChar < screen_columns
+ && CharEq(newLine[firstChar], oldLine[firstChar]))
+ firstChar++;
+ }
+ /* if there wasn't one, we're done */
+ if (firstChar >= screen_columns)
+ return;
+
+ blank = newLine[screen_columns - 1];
+
+ if (!can_clear_with(CHREF(blank))) {
+ /* find the last differing character */
+ nLastChar = screen_columns - 1;
+
+ while (nLastChar > firstChar
+ && CharEq(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(NCURSES_CH_T));
+ }
+ return;
+ }
+
+ /* find last non-blank character on old line */
+ oLastChar = screen_columns - 1;
+ while (oLastChar > firstChar && CharEq(oldLine[oLastChar], blank))
+ oLastChar--;
+
+ /* find last non-blank character on new line */
+ nLastChar = screen_columns - 1;
+ while (nLastChar > firstChar && CharEq(newLine[nLastChar], blank))
+ nLastChar--;
+
+ if ((nLastChar == firstChar)
+ && (SP->_el_cost < (oLastChar - nLastChar))) {
+ GoTo(lineno, firstChar);
+ if (!CharEq(newLine[firstChar], blank))
+ PutChar(CHREF(newLine[firstChar]));
+ ClrToEOL(blank, FALSE);
+ } else if ((nLastChar != oLastChar)
+ && (!CharEq(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 */
+ /* can be -1 if no characters differ */
+ while (CharEq(newLine[nLastChar], oldLine[oLastChar])) {
+ /* don't split a wide char */
+ if (isnac(newLine[nLastChar]) &&
+ !CharEq(newLine[nLastChar - 1], oldLine[oLastChar - 1]))
+ break;
+ nLastChar--;
+ oLastChar--;
+ if (nLastChar == -1 || oLastChar == -1)
+ break;
+ }
+
+ 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, 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(AttrOf(blank));
+ DelChar(oLastChar - nLastChar);
+ }
+ }
+ }
+ }
+
+ /* update the code's internal representation */
+ if (screen_columns > firstChar)
+ memcpy(oldLine + firstChar,
+ newLine + firstChar,
+ (screen_columns - firstChar) * sizeof(NCURSES_CH_T));
+}
+
+/*
+** ClearScreen(blank)
+**
+** Clear the physical screen and put cursor at home
+**
+*/
+
+static void
+ClearScreen(NCURSES_CH_T blank)
+{
+ int i, j;
+ bool fast_clear = (clear_screen || clr_eos || clr_eol);
+
+ TR(TRACE_UPDATE, ("ClearScreen() called"));
+
+#if NCURSES_EXT_FUNCS
+ if (SP->_coloron
+ && !SP->_default_color) {
+ _nc_do_color((int) COLOR_PAIR(SP->_current_attr), 0, FALSE, _nc_outch);
+ if (!back_color_erase) {
+ fast_clear = FALSE;
+ }
+ }
+#endif
+
+ if (fast_clear) {
+ if (clear_screen) {
+ UpdateAttrs(AttrOf(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);
+
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("clr_eos");
+ tputs(clr_eos, screen_lines, _nc_outch);
+ } else if (clr_eol) {
+ SP->_cursrow = SP->_curscol = -1;
+
+ UpdateAttrs(AttrOf(blank));
+ for (i = 0; i < screen_lines; i++) {
+ GoTo(i, 0);
+ TPUTS_TRACE("clr_eol");
+ putp(clr_eol);
+ }
+ GoTo(0, 0);
+ }
+ } else {
+ UpdateAttrs(AttrOf(blank));
+ for (i = 0; i < screen_lines; i++) {
+ GoTo(i, 0);
+ for (j = 0; j < screen_columns; j++)
+ PutChar(CHREF(blank));
+ }
+ GoTo(0, 0);
+ }
+
+ for (i = 0; i < screen_lines; i++) {
+ for (j = 0; j < screen_columns; j++)
+ curscr->_line[i].text[j] = blank;
+ }
+
+ TR(TRACE_UPDATE, ("screen cleared"));
+}
+
+/*
+** InsStr(line, count)
+**
+** Insert the count characters pointed to by line.
+**
+*/
+
+static void
+InsStr(NCURSES_CH_T * line, int count)
+{
+ TR(TRACE_UPDATE, ("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(CHREF(*line));
+ line++;
+ count--;
+ }
+ } else if (enter_insert_mode && exit_insert_mode) {
+ TPUTS_TRACE("enter_insert_mode");
+ putp(enter_insert_mode);
+ while (count) {
+ PutAttrChar(CHREF(*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(CHREF(*line));
+ if (insert_padding) {
+ TPUTS_TRACE("insert_padding");
+ putp(insert_padding);
+ }
+ line++;
+ count--;
+ }
+ }
+ position_check(SP->_cursrow, SP->_curscol, "InsStr");
+}
+
+/*
+** DelChar(count)
+**
+** Delete count characters at current position
+**
+*/
+
+static void
+DelChar(int count)
+{
+ int n;
+
+ TR(TRACE_UPDATE, ("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);
+ }
+ }
+}
+
+/*
+ * Physical-scrolling support
+ *
+ * This code was adapted from Keith Bostic's hardware scrolling
+ * support for 4.4BSD curses. I (esr) translated it to use terminfo
+ * capabilities, narrowed the call interface slightly, and cleaned
+ * up some convoluted tests. I also added support for the memory_above
+ * memory_below, and non_dest_scroll_region capabilities.
+ *
+ * For this code to work, we must have either
+ * change_scroll_region and scroll forward/reverse commands, or
+ * insert and delete line capabilities.
+ * When the scrolling region has been set, the cursor has to
+ * be at the last line of the region to make the scroll up
+ * happen, or on the first line of region to scroll down.
+ *
+ * This code makes one aesthetic decision in the opposite way from
+ * BSD curses. BSD curses preferred pairs of il/dl operations
+ * over scrolls, allegedly because il/dl looked faster. We, on
+ * the other hand, prefer scrolls because (a) they're just as fast
+ * on many terminals and (b) using them avoids bouncing an
+ * unchanged bottom section of the screen up and down, which is
+ * visually nasty.
+ *
+ * (lav): added more cases, used dl/il when bot==maxy and in csr case.
+ *
+ * I used assumption that capabilities il/il1/dl/dl1 work inside
+ * changed scroll region not shifting screen contents outside of it.
+ * If there are any terminals behaving different way, it would be
+ * necessary to add some conditions to scroll_csr_forward/backward.
+ */
+
+/* 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, NCURSES_CH_T blank)
+{
+ int i;
+
+ if (n == 1 && scroll_forward && top == miny && bot == maxy) {
+ GoTo(bot, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("scroll_forward");
+ putp(scroll_forward);
+ } else if (n == 1 && delete_line && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("delete_line");
+ putp(delete_line);
+ } else if (parm_index && top == miny && bot == maxy) {
+ GoTo(bot, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("parm_index");
+ tputs(tparm(parm_index, n, 0), n, _nc_outch);
+ } else if (parm_delete_line && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("parm_delete_line");
+ tputs(tparm(parm_delete_line, n, 0), n, _nc_outch);
+ } else if (scroll_forward && top == miny && bot == maxy) {
+ GoTo(bot, 0);
+ UpdateAttrs(AttrOf(blank));
+ for (i = 0; i < n; i++) {
+ TPUTS_TRACE("scroll_forward");
+ putp(scroll_forward);
+ }
+ } else if (delete_line && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ for (i = 0; i < n; i++) {
+ TPUTS_TRACE("delete_line");
+ putp(delete_line);
+ }
+ } else
+ return ERR;
+
+#if NCURSES_EXT_FUNCS
+ if (FILL_BCE()) {
+ int j;
+ for (i = 0; i < n; i++) {
+ GoTo(bot - i, 0);
+ for (j = 0; j < screen_columns; j++)
+ PutChar(CHREF(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,
+ NCURSES_CH_T blank)
+{
+ int i;
+
+ if (n == 1 && scroll_reverse && top == miny && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("scroll_reverse");
+ putp(scroll_reverse);
+ } else if (n == 1 && insert_line && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("insert_line");
+ putp(insert_line);
+ } else if (parm_rindex && top == miny && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("parm_rindex");
+ tputs(tparm(parm_rindex, n, 0), n, _nc_outch);
+ } else if (parm_insert_line && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ TPUTS_TRACE("parm_insert_line");
+ tputs(tparm(parm_insert_line, n, 0), n, _nc_outch);
+ } else if (scroll_reverse && top == miny && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ for (i = 0; i < n; i++) {
+ TPUTS_TRACE("scroll_reverse");
+ putp(scroll_reverse);
+ }
+ } else if (insert_line && bot == maxy) {
+ GoTo(top, 0);
+ UpdateAttrs(AttrOf(blank));
+ for (i = 0; i < n; i++) {
+ TPUTS_TRACE("insert_line");
+ putp(insert_line);
+ }
+ } else
+ return ERR;
+
+#if NCURSES_EXT_FUNCS
+ if (FILL_BCE()) {
+ int j;
+ for (i = 0; i < n; i++) {
+ GoTo(top + i, 0);
+ for (j = 0; j < screen_columns; j++)
+ PutChar(CHREF(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, NCURSES_CH_T blank)
+{
+ int i;
+
+ if (!((parm_delete_line || delete_line) && (parm_insert_line || insert_line)))
+ return ERR;
+
+ GoTo(del, 0);
+ UpdateAttrs(AttrOf(blank));
+ if (n == 1 && delete_line) {
+ TPUTS_TRACE("delete_line");
+ putp(delete_line);
+ } else if (parm_delete_line) {
+ TPUTS_TRACE("parm_delete_line");
+ tputs(tparm(parm_delete_line, n, 0), n, _nc_outch);
+ } else { /* if (delete_line) */
+ for (i = 0; i < n; i++) {
+ TPUTS_TRACE("delete_line");
+ putp(delete_line);
+ }
+ }
+
+ GoTo(ins, 0);
+ UpdateAttrs(AttrOf(blank));
+ if (n == 1 && insert_line) {
+ TPUTS_TRACE("insert_line");
+ putp(insert_line);
+ } else if (parm_insert_line) {
+ TPUTS_TRACE("parm_insert_line");
+ tputs(tparm(parm_insert_line, n, 0), n, _nc_outch);
+ } else { /* if (insert_line) */
+ for (i = 0; i < n; i++) {
+ TPUTS_TRACE("insert_line");
+ putp(insert_line);
+ }
+ }
+
+ return OK;
+}
+
+/*
+ * Note: some terminals require the cursor to be within the scrolling margins
+ * before setting them. Generally, the cursor must be at the appropriate end
+ * of the scrolling margins when issuing an indexing operation (it is not
+ * apparent whether it must also be at the left margin; we do this just to be
+ * safe). To make the related cursor movement a little faster, we use the
+ * save/restore cursor capabilities if the terminal has them.
+ */
+NCURSES_EXPORT(int)
+_nc_scrolln(int n, int top, int bot, int maxy)
+/* scroll region from top to bot by n lines */
+{
+ NCURSES_CH_T blank = ClrBlank(stdscr);
+ int i;
+ bool cursor_saved = FALSE;
+ int res;
+
+ TR(TRACE_MOVE, ("mvcur_scrolln(%d, %d, %d, %d)", n, top, bot, maxy));
+
+#if USE_XMC_SUPPORT
+ /*
+ * If we scroll, we might remove a cookie.
+ */
+ if (magic_cookie_glitch > 0) {
+ return (ERR);
+ }
+#endif
+
+ if (n > 0) { /* scroll up (forward) */
+ /*
+ * Explicitly clear if stuff pushed off top of region might
+ * be saved by the terminal.
+ */
+ 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;
+ TPUTS_TRACE("save_cursor");
+ putp(save_cursor);
+ }
+ TPUTS_TRACE("change_scroll_region");
+ putp(tparm(change_scroll_region, top, bot));
+ if (cursor_saved) {
+ TPUTS_TRACE("restore_cursor");
+ putp(restore_cursor);
+ } else {
+ SP->_cursrow = SP->_curscol = -1;
+ }
+
+ res = scroll_csr_forward(n, top, bot, top, bot, blank);
+
+ TPUTS_TRACE("change_scroll_region");
+ putp(tparm(change_scroll_region, 0, maxy));
+ SP->_cursrow = SP->_curscol = -1;
+ }
+
+ if (res == ERR && _nc_idlok)
+ res = scroll_idl(n, top, bot - n + 1, blank);
+
+ /*
+ * Clear the newly shifted-in text.
+ */
+ if (res != ERR
+ && (non_dest_scroll_region || (memory_below && bot == maxy))) {
+ NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
+ if (bot == maxy && clr_eos) {
+ GoTo(bot - n + 1, 0);
+ ClrToEOS(blank2);
+ } else {
+ for (i = 0; i < n; i++) {
+ GoTo(bot - i, 0);
+ ClrToEOL(blank2, FALSE);
+ }
+ }
+ }
+
+ } else { /* (n < 0) - scroll down (backward) */
+ 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;
+ TPUTS_TRACE("save_cursor");
+ putp(save_cursor);
+ }
+ TPUTS_TRACE("change_scroll_region");
+ putp(tparm(change_scroll_region, top, bot));
+ if (cursor_saved) {
+ TPUTS_TRACE("restore_cursor");
+ putp(restore_cursor);
+ } else {
+ SP->_cursrow = SP->_curscol = -1;
+ }
+
+ res = scroll_csr_backward(-n, top, bot, top, bot, blank);
+
+ TPUTS_TRACE("change_scroll_region");
+ putp(tparm(change_scroll_region, 0, maxy));
+ SP->_cursrow = SP->_curscol = -1;
+ }
+
+ if (res == ERR && _nc_idlok)
+ res = scroll_idl(-n, bot + n + 1, top, blank);
+
+ /*
+ * Clear the newly shifted-in text.
+ */
+ if (res != ERR
+ && (non_dest_scroll_region || (memory_above && top == 0))) {
+ NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
+ for (i = 0; i < -n; i++) {
+ GoTo(i + top, 0);
+ ClrToEOL(blank2, FALSE);
+ }
+ }
+ }
+
+ if (res == 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);
+}
+
+NCURSES_EXPORT(void)
+_nc_screen_resume(void)
+{
+ /* make sure terminal is in a sane known state */
+ SP->_current_attr = A_NORMAL;
+ newscr->_clear = TRUE;
+
+ /* reset color pairs and definitions */
+ if (SP->_coloron || SP->_color_defs)
+ _nc_reset_colors();
+
+ /* restore user-defined colors, if any */
+ if (SP->_color_defs < 0) {
+ int n;
+ SP->_color_defs = -(SP->_color_defs);
+ for (n = 0; n < SP->_color_defs; ++n) {
+ if (SP->_color_table[n].init) {
+ init_color(n,
+ SP->_color_table[n].r,
+ SP->_color_table[n].g,
+ SP->_color_table[n].b);
+ }
+ }
+ }
+
+ if (exit_attribute_mode)
+ putp(exit_attribute_mode);
+ else {
+ /* turn off attributes */
+ if (exit_alt_charset_mode)
+ putp(exit_alt_charset_mode);
+ if (exit_standout_mode)
+ putp(exit_standout_mode);
+ if (exit_underline_mode)
+ putp(exit_underline_mode);
+ }
+ if (exit_insert_mode)
+ putp(exit_insert_mode);
+ if (enter_am_mode && exit_am_mode)
+ putp(auto_right_margin ? enter_am_mode : exit_am_mode);
+}
+
+NCURSES_EXPORT(void)
+_nc_screen_init(void)
+{
+ _nc_screen_resume();
+}
+
+/* wrap up screen handling */
+NCURSES_EXPORT(void)
+_nc_screen_wrap(void)
+{
+ UpdateAttrs(A_NORMAL);
+#if NCURSES_EXT_FUNCS
+ if (SP->_coloron
+ && !SP->_default_color) {
+ NCURSES_CH_T blank = NewChar(BLANK_TEXT);
+ 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);
+
+ ClrToEOL(blank, TRUE);
+ }
+#endif
+ if (SP->_color_defs) {
+ _nc_reset_colors();
+ }
+}
+
+#if USE_XMC_SUPPORT
+NCURSES_EXPORT(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();
+ TR(TRACE_UPDATE, ("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol));
+ }
+ chg >>= 1;
+ }
+}
+#endif /* USE_XMC_SUPPORT */
diff --git a/Build/source/libs/ncurses/ncurses/widechar/charable.c b/Build/source/libs/ncurses/ncurses/widechar/charable.c
new file mode 100644
index 00000000000..57e793efba6
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/charable.c
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * Copyright (c) 2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+** Support functions for wide/narrow conversion.
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: charable.c,v 1.3 2004/09/25 21:03:44 tom Exp $")
+
+NCURSES_EXPORT(bool) _nc_is_charable(wchar_t ch)
+{
+ bool result;
+#if HAVE_WCTOB
+ result = (wctob(ch) == ch);
+#else
+ result = (_nc_to_char(ch) >= 0);
+#endif
+ return result;
+}
+
+NCURSES_EXPORT(int) _nc_to_char(wint_t ch)
+{
+ int result;
+#if HAVE_WCTOB
+ result = wctob(ch);
+#elif HAVE_WCTOMB
+ char temp[MB_LEN_MAX];
+ result = wctomb(temp, ch);
+ if (strlen(temp) == 1)
+ result = UChar(temp[0]);
+ else
+ result = -1;
+#endif
+ return result;
+}
+
+NCURSES_EXPORT(wint_t) _nc_to_widechar(int ch)
+{
+ wint_t result;
+#if HAVE_BTOWC
+ result = btowc(ch);
+#elif HAVE_MBTOWC
+ wchar_t convert;
+ char temp[2];
+ temp[0] = ch;
+ temp[1] = '\0';
+ if (mbtowc(&convert, temp, 1) >= 0)
+ result = convert;
+ else
+ result = WEOF;
+#endif
+ return result;
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_add_wch.c b/Build/source/libs/ncurses/ncurses/widechar/lib_add_wch.c
new file mode 100644
index 00000000000..29dc5eb1378
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_add_wch.c
@@ -0,0 +1,109 @@
+/****************************************************************************
+ * Copyright (c) 2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+** lib_add_wch.c
+**
+** The routine wadd_wch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_add_wch.c,v 1.4 2004/09/19 00:33:51 tom Exp $")
+
+NCURSES_EXPORT(int)
+wadd_wch(WINDOW *win, const cchar_t * wch)
+{
+ PUTC_DATA;
+ int n;
+ int code = ERR;
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win,
+ _tracech_t(wch)));
+
+ if (win != 0) {
+ PUTC_INIT;
+ while (PUTC_i < CCHARW_MAX) {
+ if ((PUTC_ch = wch->chars[PUTC_i++]) == L'\0')
+ break;
+ if ((PUTC_n = wcrtomb(PUTC_buf, PUTC_ch, &PUT_st)) <= 0) {
+ code = ERR;
+ if (is8bits(PUTC_ch))
+ code = waddch(win, UChar(PUTC_ch) | wch->attr);
+ break;
+ }
+ for (n = 0; n < PUTC_n; n++) {
+ if ((code = waddch(win, UChar(PUTC_buf[n]) | wch->attr)) == ERR) {
+ break;
+ }
+ }
+ if (code == ERR)
+ break;
+ }
+ }
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+wecho_wchar(WINDOW *win, const cchar_t * wch)
+{
+ PUTC_DATA;
+ int n;
+ int code = ERR;
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wecho_wchar(%p, %s)"), win,
+ _tracech_t(wch)));
+
+ if (win != 0) {
+ PUTC_INIT;
+ while (PUTC_i < CCHARW_MAX) {
+ if ((PUTC_ch = wch->chars[PUTC_i++]) == L'\0')
+ break;
+ if ((PUTC_n = wcrtomb(PUTC_buf, PUTC_ch, &PUT_st)) <= 0) {
+ code = ERR;
+ if (is8bits(PUTC_ch))
+ code = waddch(win, UChar(PUTC_ch) | wch->attr);
+ break;
+ }
+ for (n = 0; n < PUTC_n; n++) {
+ if ((code = waddch(win, UChar(PUTC_buf[n]) | wch->attr)) == ERR) {
+ break;
+ }
+ }
+ if (code == ERR)
+ break;
+ }
+ wrefresh(win);
+ }
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_box_set.c b/Build/source/libs/ncurses/ncurses/widechar/lib_box_set.c
new file mode 100644
index 00000000000..35fce46d8d4
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_box_set.c
@@ -0,0 +1,113 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Authors: Sven Verdoolaege and Thomas Dickey 2001,2002 *
+ ****************************************************************************/
+
+/*
+** lib_box_set.c
+**
+** The routine wborder_set().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_box_set.c,v 1.4 2003/12/06 18:02:13 tom Exp $")
+
+NCURSES_EXPORT(int)
+wborder_set(WINDOW *win,
+ const ARG_CH_T ls, const ARG_CH_T rs,
+ const ARG_CH_T ts, const ARG_CH_T bs,
+ const ARG_CH_T tl, const ARG_CH_T tr,
+ const ARG_CH_T bl, const ARG_CH_T br)
+{
+ NCURSES_SIZE_T i;
+ NCURSES_SIZE_T endx, endy;
+ NCURSES_CH_T wls, wrs, wts, wbs, wtl, wtr, wbl, wbr;
+
+ T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"),
+ win,
+ _tracech_t2(1, ls),
+ _tracech_t2(2, rs),
+ _tracech_t2(3, ts),
+ _tracech_t2(4, bs),
+ _tracech_t2(5, tl),
+ _tracech_t2(6, tr),
+ _tracech_t2(7, bl),
+ _tracech_t2(8, br)));
+
+ if (!win)
+ returnCode(ERR);
+
+#define RENDER_WITH_DEFAULT(ch,def) w ##ch = _nc_render(win, (ch == 0) ? *(const ARG_CH_T)def : *ch)
+
+ RENDER_WITH_DEFAULT(ls, WACS_VLINE);
+ RENDER_WITH_DEFAULT(rs, WACS_VLINE);
+ RENDER_WITH_DEFAULT(ts, WACS_HLINE);
+ RENDER_WITH_DEFAULT(bs, WACS_HLINE);
+ RENDER_WITH_DEFAULT(tl, WACS_ULCORNER);
+ RENDER_WITH_DEFAULT(tr, WACS_URCORNER);
+ RENDER_WITH_DEFAULT(bl, WACS_LLCORNER);
+ RENDER_WITH_DEFAULT(br, WACS_LRCORNER);
+
+ T(("using %s, %s, %s, %s, %s, %s, %s, %s",
+ _tracech_t2(1, CHREF(wls)),
+ _tracech_t2(2, CHREF(wrs)),
+ _tracech_t2(3, CHREF(wts)),
+ _tracech_t2(4, CHREF(wbs)),
+ _tracech_t2(5, CHREF(wtl)),
+ _tracech_t2(6, CHREF(wtr)),
+ _tracech_t2(7, CHREF(wbl)),
+ _tracech_t2(8, CHREF(wbr))));
+
+ endx = win->_maxx;
+ endy = win->_maxy;
+
+ for (i = 0; i <= endx; i++) {
+ win->_line[0].text[i] = wts;
+ win->_line[endy].text[i] = wbs;
+ }
+ 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] = wls;
+ win->_line[i].text[endx] = wrs;
+ win->_line[i].firstchar = 0;
+ win->_line[i].lastchar = endx;
+ }
+ win->_line[0].text[0] = wtl;
+ win->_line[0].text[endx] = wtr;
+ win->_line[endy].text[0] = wbl;
+ win->_line[endy].text[endx] = wbr;
+
+ _nc_synchook(win);
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_cchar.c b/Build/source/libs/ncurses/ncurses/widechar/lib_cchar.c
new file mode 100644
index 00000000000..8ddb300b544
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_cchar.c
@@ -0,0 +1,127 @@
+/****************************************************************************
+ * Copyright (c) 2001-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+** lib_cchar.c
+**
+** The routines setcchar() and getcchar().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_cchar.c,v 1.10 2004/10/02 23:44:34 Marcin.Kowalczyk Exp $")
+
+/*
+ * The SuSv2 description leaves some room for interpretation. We'll assume wch
+ * points to a string which is L'\0' terminated, contains at least one
+ * character with strictly positive width, which must be the first, and
+ * contains no characters of negative width.
+ */
+NCURSES_EXPORT(int)
+setcchar(cchar_t *wcval,
+ const wchar_t *wch,
+ const attr_t attrs,
+ short color_pair,
+ const void *opts)
+{
+ int i;
+ int len;
+ int code = OK;
+
+ TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%ld,%d,%p)"),
+ wcval, _nc_viswbuf(wch), attrs, color_pair, opts));
+
+ len = wcslen(wch);
+ if (opts != NULL
+ || (len > 1 && wcwidth(wch[0]) < 0)) {
+ code = ERR;
+ } else {
+ if (len > CCHARW_MAX)
+ len = CCHARW_MAX;
+
+ /*
+ * If we have a following spacing-character, stop at that point. We
+ * are only interested in adding non-spacing characters.
+ */
+ for (i = 1; i < len; ++i) {
+ if (wcwidth(wch[i]) != 0) {
+ len = i;
+ break;
+ }
+ }
+
+ memset(wcval, 0, sizeof(*wcval));
+
+ if (len != 0) {
+ SetAttr(*wcval, attrs | COLOR_PAIR(color_pair));
+ memcpy(&wcval->chars, wch, len * sizeof(wchar_t));
+ TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len,
+ _tracecchar_t(wcval)));
+ }
+ }
+
+ TR(TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+getcchar(const cchar_t *wcval,
+ wchar_t *wch,
+ attr_t *attrs,
+ short *color_pair,
+ void *opts)
+{
+ wchar_t *wp;
+ int len;
+ int code = ERR;
+
+ TR(TRACE_CCALLS, (T_CALLED("getcchar(%p,%p,%p,%p,%p)"),
+ wcval, wch, attrs, color_pair, opts));
+
+ if (opts == NULL) {
+ len = (wp = wmemchr(wcval->chars, L'\0', CCHARW_MAX))
+ ? wp - wcval->chars
+ : CCHARW_MAX;
+
+ if (wch == NULL) {
+ code = len;
+ } else if (attrs == 0 || color_pair == 0) {
+ code = ERR;
+ } else if (len >= 0) {
+ *attrs = AttrOf(*wcval) & A_ATTRIBUTES;
+ *color_pair = PAIR_NUMBER(AttrOf(*wcval));
+ wmemcpy(wch, wcval->chars, (unsigned) len);
+ wch[len] = L'\0';
+ code = OK;
+ }
+ }
+
+ TR(TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_erasewchar.c b/Build/source/libs/ncurses/ncurses/widechar/lib_erasewchar.c
new file mode 100644
index 00000000000..7d6455370ff
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_erasewchar.c
@@ -0,0 +1,77 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2002 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_erasewchar.c,v 1.1 2002/05/11 20:38:06 tom Exp $")
+
+/*
+ * erasewchar()
+ *
+ * Return erase character as given in cur_term->Ottyb.
+ *
+ */
+
+NCURSES_EXPORT(int)
+erasewchar(wchar_t * wch)
+{
+ int value;
+ int result = ERR;
+
+ T((T_CALLED("erasewchar()")));
+ if ((value = erasechar()) != ERR) {
+ *wch = value;
+ result = OK;
+ }
+ returnCode(result);
+}
+
+/*
+ * killwchar()
+ *
+ * Return kill character as given in cur_term->Ottyb.
+ *
+ */
+
+NCURSES_EXPORT(int)
+killwchar(wchar_t * wch)
+{
+ int value;
+ int result = ERR;
+
+ T((T_CALLED("killwchar()")));
+ if ((value = killchar()) != ERR) {
+ *wch = value;
+ result = OK;
+ }
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_get_wch.c b/Build/source/libs/ncurses/ncurses/widechar/lib_get_wch.c
new file mode 100644
index 00000000000..c8abd7a2cdb
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_get_wch.c
@@ -0,0 +1,117 @@
+/****************************************************************************
+ * Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 2002,2004 *
+ ****************************************************************************/
+
+/*
+** lib_get_wch.c
+**
+** The routine get_wch().
+**
+*/
+
+#include <curses.priv.h>
+#include <ctype.h>
+
+MODULE_ID("$Id: lib_get_wch.c,v 1.9 2004/09/19 01:13:44 tom Exp $")
+
+#if HAVE_MBTOWC && HAVE_MBLEN
+#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
+#define count_mbytes(buffer,length,state) mblen(buffer,length)
+#define check_mbytes(wch,buffer,length,state) \
+ (int) mbtowc(&wch, buffer, length)
+#elif HAVE_MBRTOWC && HAVE_MBRLEN
+#define reset_mbytes(state) memset(&state, 0, sizeof(state))
+#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
+#define check_mbytes(wch,buffer,length,state) \
+ (int) mbrtowc(&wch, buffer, length, &state)
+#else
+make an error
+#endif
+
+NCURSES_EXPORT(int)
+wget_wch(WINDOW *win, wint_t * result)
+{
+ int code;
+ char buffer[(MB_LEN_MAX * 9) + 1]; /* allow some redundant shifts */
+ int status;
+ mbstate_t state;
+ size_t count = 0;
+ unsigned long value;
+ wchar_t wch;
+
+ T((T_CALLED("wget_wch(%p)"), win));
+ (void) state;
+
+ /*
+ * We can get a stream of single-byte characters and KEY_xxx codes from
+ * _nc_wgetch(), while we want to return a wide character or KEY_xxx code.
+ */
+ for (;;) {
+ T(("reading %d of %d", count + 1, sizeof(buffer)));
+ code = _nc_wgetch(win, &value, TRUE);
+ if (code == ERR) {
+ break;
+ } else if (code == KEY_CODE_YES) {
+ /*
+ * If we were processing an incomplete multibyte character, return
+ * an error since we have a KEY_xxx code which interrupts it. For
+ * some cases, we could improve this by writing a new version of
+ * lib_getch.c(!), but it is not clear whether the improvement
+ * would be worth the effort.
+ */
+ if (count != 0) {
+ ungetch(value);
+ code = ERR;
+ }
+ break;
+ } else if (count + 1 >= sizeof(buffer)) {
+ ungetch(value);
+ code = ERR;
+ break;
+ } else {
+ buffer[count++] = UChar(value);
+ reset_mbytes(state);
+ status = count_mbytes(buffer, count, state);
+ if (status >= 0) {
+ reset_mbytes(state);
+ if (check_mbytes(wch, buffer, count, state) != status) {
+ code = ERR; /* the two calls should match */
+ ungetch(value);
+ }
+ value = wch;
+ break;
+ }
+ }
+ }
+ *result = value;
+ T(("result %#lo", value));
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_get_wstr.c b/Build/source/libs/ncurses/ncurses/widechar/lib_get_wstr.c
new file mode 100644
index 00000000000..bf39aa1a188
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_get_wstr.c
@@ -0,0 +1,231 @@
+/****************************************************************************
+ * Copyright (c) 2002-2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey *
+ ****************************************************************************/
+
+/*
+** lib_get_wstr.c
+**
+** The routine wgetn_wstr().
+**
+*/
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_get_wstr.c,v 1.8 2004/10/16 21:55:36 tom Exp $")
+
+static int
+wadd_wint(WINDOW *win, wint_t *src)
+{
+ cchar_t tmp;
+ wchar_t wch[2];
+
+ wch[0] = *src;
+ wch[1] = 0;
+ setcchar(&tmp, wch, A_NORMAL, 0, NULL);
+ return wadd_wch(win, &tmp);
+}
+
+/*
+ * This wipes out the last character, no matter whether it was a tab, control
+ * or other character, and handles reverse wraparound.
+ */
+static wint_t *
+WipeOut(WINDOW *win, int y, int x, wint_t *first, wint_t *last, bool echoed)
+{
+ if (last > first) {
+ *--last = '\0';
+ if (echoed) {
+ int y1 = win->_cury;
+ int x1 = win->_curx;
+ int n;
+
+ wmove(win, y, x);
+ for (n = 0; first[n] != 0; ++n) {
+ wadd_wint(win, first + n);
+ }
+ getyx(win, y, x);
+ while (win->_cury < y1
+ || (win->_cury == y1 && win->_curx < x1))
+ waddch(win, (chtype) ' ');
+
+ wmove(win, y, x);
+ }
+ }
+ return last;
+}
+
+NCURSES_EXPORT(int)
+wgetn_wstr(WINDOW *win, wint_t *str, int maxlen)
+{
+ TTY buf;
+ bool oldnl, oldecho, oldraw, oldcbreak;
+ wint_t erasec;
+ wint_t killc;
+ wint_t *oldstr = str;
+ wint_t *tmpstr = str;
+ wint_t ch;
+ int y, x, code;
+
+ T((T_CALLED("wgetn_wstr(%p,%p, %d)"), win, str, maxlen));
+
+ if (!win)
+ returnCode(ERR);
+
+ _nc_get_tty_mode(&buf);
+
+ oldnl = SP->_nl;
+ oldecho = SP->_echo;
+ oldraw = SP->_raw;
+ oldcbreak = SP->_cbreak;
+ nl();
+ noecho();
+ noraw();
+ cbreak();
+
+ erasec = erasechar();
+ killc = killchar();
+
+ getyx(win, y, x);
+
+ if (is_wintouched(win) || (win->_flags & _HASMOVED))
+ wrefresh(win);
+
+ while ((code = wget_wch(win, &ch)) != ERR) {
+ /*
+ * Map special characters into key-codes.
+ */
+ if (ch == '\r')
+ ch = '\n';
+ if (ch == '\n') {
+ code = KEY_CODE_YES;
+ ch = KEY_ENTER;
+ }
+ if (ch < KEY_MIN) {
+ if (ch == erasec) {
+ ch = KEY_BACKSPACE;
+ code = KEY_CODE_YES;
+ }
+ if (ch == killc) {
+ ch = KEY_EOL;
+ code = KEY_CODE_YES;
+ }
+ }
+ if (code == KEY_CODE_YES) {
+ /*
+ * Some terminals (the Wyse-50 is the most common) generate a \n
+ * from the down-arrow key. With this logic, it's the user's
+ * choice whether to set kcud=\n for wget_wch(); terminating
+ * *getn_wstr() with \n should work either way.
+ */
+ if (ch == KEY_DOWN || ch == KEY_ENTER) {
+ if (oldecho == TRUE
+ && win->_cury == win->_maxy
+ && win->_scroll)
+ wechochar(win, (chtype) '\n');
+ break;
+ }
+ if (ch == KEY_LEFT || ch == KEY_BACKSPACE) {
+ if (tmpstr > oldstr) {
+ tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho);
+ }
+ } else if (ch == KEY_EOL) {
+ while (tmpstr > oldstr) {
+ tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho);
+ }
+ } else {
+ beep();
+ }
+ } else if (maxlen >= 0 && tmpstr - oldstr >= maxlen) {
+ beep();
+ } else {
+ *tmpstr++ = ch;
+ *tmpstr = 0;
+ if (oldecho == TRUE) {
+ int oldy = win->_cury;
+
+ if (wadd_wint(win, tmpstr - 1) == ERR) {
+ /*
+ * We can't really use the lower-right corner for input,
+ * since it'll mess up bookkeeping for erases.
+ */
+ win->_flags &= ~_WRAPPED;
+ waddch(win, (chtype) ' ');
+ tmpstr = WipeOut(win, y, x, oldstr, tmpstr, oldecho);
+ continue;
+ } else if (win->_flags & _WRAPPED) {
+ /*
+ * If the last waddch forced a wrap & scroll, adjust our
+ * reference point for erasures.
+ */
+ if (win->_scroll
+ && oldy == win->_maxy
+ && win->_cury == win->_maxy) {
+ if (--y <= 0) {
+ y = 0;
+ }
+ }
+ win->_flags &= ~_WRAPPED;
+ }
+ wrefresh(win);
+ }
+ }
+ }
+
+ win->_curx = 0;
+ win->_flags &= ~_WRAPPED;
+ if (win->_cury < win->_maxy)
+ win->_cury++;
+ wrefresh(win);
+
+ /* Restore with a single I/O call, to fix minor asymmetry between
+ * raw/noraw, etc.
+ */
+ SP->_nl = oldnl;
+ SP->_echo = oldecho;
+ SP->_raw = oldraw;
+ SP->_cbreak = oldcbreak;
+
+ (void) _nc_set_tty_mode(&buf);
+
+ *tmpstr = 0;
+ if (code == ERR) {
+ if (tmpstr == oldstr) {
+ *tmpstr++ = WEOF;
+ *tmpstr = 0;
+ }
+ returnCode(ERR);
+ }
+
+ T(("wgetn_wstr returns %s", _nc_viswibuf(oldstr)));
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_hline_set.c b/Build/source/libs/ncurses/ncurses/widechar/lib_hline_set.c
new file mode 100644
index 00000000000..43175de8346
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_hline_set.c
@@ -0,0 +1,79 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas Dickey 2002 *
+ ****************************************************************************/
+
+/*
+** lib_hline_set.c
+**
+** The routine whline_set().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_hline_set.c,v 1.2 2002/03/23 21:35:34 tom Exp $")
+
+NCURSES_EXPORT(int)
+whline_set(WINDOW *win, const cchar_t * ch, int n)
+{
+ int code = ERR;
+ NCURSES_SIZE_T start;
+ NCURSES_SIZE_T end;
+
+ T((T_CALLED("whline_set(%p,%s,%d)"), win, _tracecchar_t(ch), n));
+
+ if (win) {
+ struct ldat *line = &(win->_line[win->_cury]);
+ NCURSES_CH_T wch;
+
+ start = win->_curx;
+ end = start + n - 1;
+ if (end > win->_maxx)
+ end = win->_maxx;
+
+ CHANGED_RANGE(line, start, end);
+
+ if (ch == 0)
+ wch = *WACS_HLINE;
+ else
+ wch = *ch;
+ wch = _nc_render(win, wch);
+
+ while (end >= start) {
+ line->text[end] = wch;
+ end--;
+ }
+
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_in_wch.c b/Build/source/libs/ncurses/ncurses/widechar/lib_in_wch.c
new file mode 100644
index 00000000000..39af409d794
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_in_wch.c
@@ -0,0 +1,61 @@
+/****************************************************************************
+ * Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 Dickey 2002,2004 *
+ ****************************************************************************/
+
+/*
+** lib_in_wch.c
+**
+** The routine win_wch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_in_wch.c,v 1.3 2004/05/16 00:13:52 tom Exp $")
+
+NCURSES_EXPORT(int)
+win_wch(WINDOW *win, cchar_t * wcval)
+{
+ int row, col;
+ int code = OK;
+
+ TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), win, wcval));
+ if (win != 0
+ && wcval != 0) {
+ getyx(win, row, col);
+
+ *wcval = win->_line[row].text[col];
+ } else {
+ code = ERR;
+ }
+ TR(TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_in_wchnstr.c b/Build/source/libs/ncurses/ncurses/widechar/lib_in_wchnstr.c
new file mode 100644
index 00000000000..41ba18ccdf0
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_in_wchnstr.c
@@ -0,0 +1,68 @@
+/****************************************************************************
+ * Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "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 Dickey 2002,2004 *
+ ****************************************************************************/
+
+/*
+** lib_in_wchnstr.c
+**
+** The routine win_wchnstr().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_in_wchnstr.c,v 1.3 2004/05/16 00:12:30 tom Exp $")
+
+NCURSES_EXPORT(int)
+win_wchnstr(WINDOW *win, cchar_t * wchstr, int n)
+{
+ int code = OK;
+
+ TR(TRACE_CALLS, (T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
+ if (win != 0
+ && wchstr != 0) {
+ int row, col;
+ int j;
+
+ getyx(win, row, col);
+
+ if (n < 0) {
+ n = getmaxx(win) + 1 - getcurx(win);
+ }
+ for (j = 0; j < n; ++j) {
+ wchstr[j] = win->_line[row].text[col + j];
+ }
+ T(("result = %s", _nc_viscbuf(wchstr, n)));
+ } else {
+ code = ERR;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_ins_wch.c b/Build/source/libs/ncurses/ncurses/widechar/lib_ins_wch.c
new file mode 100644
index 00000000000..6417eea2ed7
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_ins_wch.c
@@ -0,0 +1,130 @@
+/****************************************************************************
+ * Copyright (c) 2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas Dickey 2002 *
+ ****************************************************************************/
+
+/*
+** lib_ins_wch.c
+**
+** The routine wins_wch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_ins_wch.c,v 1.3 2003/03/29 21:52:29 tom Exp $")
+
+/*
+ * Insert the given character, updating the current location to simplify
+ * inserting a string.
+ */
+static void
+_nc_insert_wch(WINDOW *win, const cchar_t * wch)
+{
+ if (win->_curx <= win->_maxx) {
+ struct ldat *line = &(win->_line[win->_cury]);
+ NCURSES_CH_T *end = &(line->text[win->_curx]);
+ NCURSES_CH_T *temp1 = &(line->text[win->_maxx]);
+ NCURSES_CH_T *temp2 = temp1 - 1;
+
+ CHANGED_TO_EOL(line, win->_curx, win->_maxx);
+ while (temp1 > end)
+ *temp1-- = *temp2--;
+
+ *temp1 = _nc_render(win, *wch);
+
+ win->_curx++;
+ }
+}
+
+NCURSES_EXPORT(int)
+wins_wch(WINDOW *win, const cchar_t * wch)
+{
+ NCURSES_SIZE_T oy;
+ NCURSES_SIZE_T ox;
+ int code = ERR;
+
+ T((T_CALLED("wins_wch(%p, %s)"), win, _tracecchar_t(wch)));
+
+ if (win != 0) {
+ oy = win->_cury;
+ ox = win->_curx;
+
+ _nc_insert_wch(win, wch);
+
+ win->_curx = ox;
+ win->_cury = oy;
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+wins_nwstr(WINDOW *win, const wchar_t * wstr, int n)
+{
+ int code = ERR;
+ NCURSES_SIZE_T oy;
+ NCURSES_SIZE_T ox;
+ const wchar_t *cp;
+
+ T((T_CALLED("wins_nwstr(%p,%s,%d)"), win, _nc_viswbufn(wstr, n), n));
+
+ if (win != 0
+ && wstr != 0) {
+ if (n < 1)
+ n = wcslen(wstr);
+ if (n > 0) {
+ oy = win->_cury;
+ ox = win->_curx;
+ for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
+ if (wcwidth(*cp) > 1) {
+ cchar_t tmp_cchar;
+ wchar_t tmp_wchar = *cp;
+ memset(&tmp_cchar, 0, sizeof(tmp_cchar));
+ (void) setcchar(&tmp_cchar,
+ &tmp_wchar,
+ WA_NORMAL,
+ 0,
+ (void *) 0);
+ _nc_insert_wch(win, &tmp_cchar);
+ } else {
+ _nc_insert_ch(win, *cp); /* tabs, other ASCII stuff */
+ }
+ }
+
+ win->_curx = ox;
+ win->_cury = oy;
+ _nc_synchook(win);
+ }
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_inwstr.c b/Build/source/libs/ncurses/ncurses/widechar/lib_inwstr.c
new file mode 100644
index 00000000000..91b1e0f1d2b
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_inwstr.c
@@ -0,0 +1,100 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas Dickey 2002 *
+ ****************************************************************************/
+
+/*
+** lib_inwstr.c
+**
+** The routines winnwstr() and winwstr().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_inwstr.c,v 1.3 2002/10/06 00:56:36 tom Exp $")
+
+NCURSES_EXPORT(int)
+winnwstr(WINDOW *win, wchar_t * wstr, int n)
+{
+ int row, col, inx;
+ int count = 0;
+ int last = 0;
+ cchar_t *text;
+ wchar_t wch;
+
+ T((T_CALLED("winnwstr(%p,%p,%d)"), win, wstr, n));
+ if (wstr != 0) {
+ if (win) {
+ getyx(win, row, col);
+
+ text = win->_line[row].text;
+ while (count < n && count != ERR) {
+ if (!isnac(text[col])) {
+ for (inx = 0; (inx < CCHARW_MAX)
+ && ((wch = text[col].chars[inx]) != 0);
+ ++inx) {
+ if (count + 1 > n) {
+ if ((count = last) == 0) {
+ count = ERR; /* error if we store nothing */
+ }
+ break;
+ }
+ wstr[count++] = wch;
+ }
+ }
+ last = count;
+ if (++col > win->_maxx) {
+ break;
+ }
+ }
+ }
+ if (count > 0) {
+ wstr[count] = '\0';
+ T(("winnwstr returns %s", _nc_viswbuf(wstr)));
+ }
+ }
+ returnCode(count);
+}
+
+/*
+ * X/Open says winwstr() returns OK if not ERR. If that is not a blunder, it
+ * must have a null termination on the string (see above). Unlike winnstr(),
+ * it does not define what happens for a negative count with winnwstr().
+ */
+NCURSES_EXPORT(int)
+winwstr(WINDOW *win, wchar_t * wstr)
+{
+ int result = OK;
+ T((T_CALLED("winwstr(%p,%p)"), win, wstr));
+ if (winnwstr(win, wstr, CCHARW_MAX * (win->_maxx - win->_curx + 1)) == ERR)
+ result = ERR;
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_pecho_wchar.c b/Build/source/libs/ncurses/ncurses/widechar/lib_pecho_wchar.c
new file mode 100644
index 00000000000..e6127757431
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_pecho_wchar.c
@@ -0,0 +1,57 @@
+/****************************************************************************
+ * Copyright (c) 2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_pecho_wchar.c,v 1.1 2004/01/03 21:42:01 tom Exp $")
+
+NCURSES_EXPORT(int)
+pecho_wchar(WINDOW *pad, const cchar_t * wch)
+{
+ T((T_CALLED("pecho_wchar(%p, %s)"), pad, _tracech_t(wch)));
+
+ if (pad == 0)
+ returnCode(ERR);
+
+ if (!(pad->_flags & _ISPAD))
+ returnCode(wecho_wchar(pad, wch));
+
+ wadd_wch(pad, wch);
+ prefresh(pad, pad->_pad._pad_y,
+ pad->_pad._pad_x,
+ pad->_pad._pad_top,
+ pad->_pad._pad_left,
+ pad->_pad._pad_bottom,
+ pad->_pad._pad_right);
+
+ returnCode(OK);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_slk_wset.c b/Build/source/libs/ncurses/ncurses/widechar/lib_slk_wset.c
new file mode 100644
index 00000000000..06fe85684a2
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_slk_wset.c
@@ -0,0 +1,149 @@
+/****************************************************************************
+ * Copyright (c) 2003,2004 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey, 2003 *
+ ****************************************************************************/
+
+/*
+ * lib_slk_wset.c
+ * Set soft label text.
+ */
+#include <curses.priv.h>
+
+#if HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+
+MODULE_ID("$Id: lib_slk_wset.c,v 1.7 2004/05/08 16:52:10 tom Exp $")
+
+NCURSES_EXPORT(int)
+slk_wset(int i, const wchar_t * astr, int format)
+{
+ static wchar_t empty[] =
+ {L'\0'};
+ int result = ERR;
+ SLK *slk = SP->_slk;
+ int offset;
+ size_t arglen;
+ const wchar_t *p;
+
+ T((T_CALLED("slk_wset(%d, %s, %d)"), i, _nc_viswbuf(astr), format));
+
+ if (astr == 0)
+ astr = empty;
+ arglen = wcslen(astr);
+ while (iswspace(*astr)) {
+ --arglen;
+ ++astr; /* skip over leading spaces */
+ }
+ p = astr;
+ while (iswprint(*p))
+ p++; /* The first non-print stops */
+
+ arglen = (size_t) (p - astr);
+
+ if (slk != NULL &&
+ i >= 1 &&
+ i <= slk->labcnt &&
+ format >= 0 &&
+ format <= 2) {
+ char *new_text;
+ size_t n;
+ size_t used = 0;
+ int mycols;
+ mbstate_t state;
+
+ --i; /* Adjust numbering of labels */
+
+ /*
+ * Reduce the actual number of columns to fit in the label field.
+ */
+ while (arglen != 0 && wcswidth(astr, arglen) > slk->maxlen) {
+ --arglen;
+ }
+ mycols = wcswidth(astr, arglen);
+
+ /*
+ * translate the wide-character string to multibyte form.
+ */
+ memset(&state, 0, sizeof(state));
+
+ if ((new_text = (char *) _nc_doalloc(0, MB_LEN_MAX * arglen)) == 0)
+ returnCode(ERR);
+
+ for (n = 0; n < arglen; ++n) {
+ used += wcrtomb(new_text + used, astr[n], &state);
+ }
+ new_text[used] = '\0';
+
+ if (used >= (size_t) (slk->maxlen + 1)) {
+ if ((slk->ent[i].ent_text = (char *) _nc_doalloc(slk->ent[i].ent_text,
+ used + 1)) == 0)
+ returnCode(ERR);
+ if ((slk->ent[i].form_text = (char *) _nc_doalloc(slk->ent[i].form_text,
+ used + 1)) == 0)
+ returnCode(ERR);
+ }
+
+ (void) strcpy(slk->ent[i].ent_text, new_text);
+ free(new_text);
+
+ sprintf(slk->ent[i].form_text, "%*s", (size_t) slk->maxlen, " ");
+
+ switch (format) {
+ default:
+ case 0: /* left-aligned */
+ offset = 0;
+ break;
+ case 1: /* centered */
+ offset = (slk->maxlen - mycols) / 2;
+ break;
+ case 2: /* right-aligned */
+ offset = slk->maxlen - mycols;
+ break;
+ }
+ if (offset < 0)
+ offset = 0;
+ strcpy(slk->ent[i].form_text + offset,
+ slk->ent[i].ent_text);
+ /*
+ * Pad the display with blanks on the right, unless it is already
+ * right-aligned.
+ */
+ if (format != 2 && mycols < slk->maxlen) {
+ sprintf(slk->ent[i].form_text + offset + used,
+ "%*s",
+ slk->maxlen - (mycols - offset),
+ " ");
+ }
+ slk->ent[i].dirty = TRUE;
+ result = OK;
+ }
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_unget_wch.c b/Build/source/libs/ncurses/ncurses/widechar/lib_unget_wch.c
new file mode 100644
index 00000000000..f4d0c518edf
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_unget_wch.c
@@ -0,0 +1,80 @@
+/****************************************************************************
+ * Copyright (c) 2002,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2002 *
+ ****************************************************************************/
+
+/*
+** lib_unget_wch.c
+**
+** The routine unget_wch().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_unget_wch.c,v 1.5 2003/07/05 19:46:51 tom Exp $")
+
+NCURSES_EXPORT(int)
+unget_wch(const wchar_t wch)
+{
+ int result = OK;
+ mbstate_t state;
+ size_t length;
+ int n;
+
+ T((T_CALLED("unget_wch(%#lx)"), (unsigned long) wch));
+
+ memset(&state, 0, sizeof(state));
+ length = wcrtomb(0, wch, &state);
+
+ if (length != (size_t) (-1)
+ && length != 0) {
+ char *string;
+
+ if ((string = (char *) malloc(length)) != 0) {
+ memset(&state, 0, sizeof(state));
+ wcrtomb(string, wch, &state);
+
+ for (n = (int) (length - 1); n >= 0; --n) {
+ if (ungetch(string[n]) != OK) {
+ result = ERR;
+ break;
+ }
+ }
+ free(string);
+ } else {
+ result = ERR;
+ }
+ } else {
+ result = ERR;
+ }
+
+ returnCode(result);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_vid_attr.c b/Build/source/libs/ncurses/ncurses/widechar/lib_vid_attr.c
new file mode 100644
index 00000000000..06e7880dd4d
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_vid_attr.c
@@ -0,0 +1,94 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2002 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_vid_attr.c,v 1.1 2002/05/11 20:55:26 tom Exp $")
+
+#define set_color(mode, pair) mode &= ~A_COLOR; mode |= COLOR_PAIR(pair)
+
+NCURSES_EXPORT(int)
+vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
+{
+ T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
+ set_color(newmode, pair);
+ returnCode(vidputs(newmode, outc));
+}
+
+#undef vid_attr
+NCURSES_EXPORT(int)
+vid_attr(attr_t newmode, short pair, void *opts GCC_UNUSED)
+{
+ T((T_CALLED("vid_attr(%s,%d)"), _traceattr(newmode), pair));
+ set_color(newmode, pair);
+ returnCode(vidputs(newmode, _nc_outch));
+}
+
+NCURSES_EXPORT(attr_t)
+term_attrs(void)
+{
+ attr_t attrs = WA_NORMAL;
+
+ T((T_CALLED("term_attrs()")));
+ if (enter_alt_charset_mode)
+ attrs |= WA_ALTCHARSET;
+
+ if (enter_blink_mode)
+ attrs |= WA_BLINK;
+
+ if (enter_bold_mode)
+ attrs |= WA_BOLD;
+
+ if (enter_dim_mode)
+ attrs |= WA_DIM;
+
+ if (enter_reverse_mode)
+ attrs |= WA_REVERSE;
+
+ if (enter_standout_mode)
+ attrs |= WA_STANDOUT;
+
+ if (enter_protected_mode)
+ attrs |= WA_PROTECT;
+
+ if (enter_secure_mode)
+ attrs |= WA_INVIS;
+
+ if (enter_underline_mode)
+ attrs |= WA_UNDERLINE;
+
+ if (SP->_coloron)
+ attrs |= A_COLOR;
+
+ returnAttr(attrs);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_vline_set.c b/Build/source/libs/ncurses/ncurses/widechar/lib_vline_set.c
new file mode 100644
index 00000000000..af42df1f24a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_vline_set.c
@@ -0,0 +1,78 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas Dickey 2002 *
+ ****************************************************************************/
+
+/*
+** lib_vline_set.c
+**
+** The routine wvline_set().
+**
+*/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_vline_set.c,v 1.2 2002/03/23 21:36:01 tom Exp $")
+
+NCURSES_EXPORT(int)
+wvline_set(WINDOW *win, const cchar_t * ch, int n)
+{
+ int code = ERR;
+ NCURSES_SIZE_T row, col;
+ NCURSES_SIZE_T end;
+
+ T((T_CALLED("wvline(%p,%s,%d)"), win, _tracecchar_t(ch), n));
+
+ if (win) {
+ NCURSES_CH_T wch;
+ row = win->_cury;
+ col = win->_curx;
+ end = row + n - 1;
+ if (end > win->_maxy)
+ end = win->_maxy;
+
+ if (ch == 0)
+ wch = *WACS_VLINE;
+ else
+ wch = *ch;
+ wch = _nc_render(win, wch);
+
+ while (end >= row) {
+ struct ldat *line = &(win->_line[end]);
+ line->text[col] = wch;
+ CHANGED_CELL(line, col);
+ end--;
+ }
+
+ _nc_synchook(win);
+ code = OK;
+ }
+ returnCode(code);
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_wacs.c b/Build/source/libs/ncurses/ncurses/widechar/lib_wacs.c
new file mode 100644
index 00000000000..c956cfdba7e
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_wacs.c
@@ -0,0 +1,114 @@
+/****************************************************************************
+ * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas Dickey 2002 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#include <term.h>
+
+MODULE_ID("$Id: lib_wacs.c,v 1.6 2002/12/21 12:30:19 tom Exp $")
+
+NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0;
+
+NCURSES_EXPORT(void)
+_nc_init_wacs(void)
+{
+ /* *INDENT-OFF* */
+ static const struct {
+ int map;
+ int value[2];
+ } table[] = {
+ /* VT100 symbols */
+ { 'l', { '+', 0x250c }}, /* upper left corner */
+ { 'm', { '+', 0x2514 }}, /* lower left corner */
+ { 'k', { '+', 0x2510 }}, /* upper right corner */
+ { 'j', { '+', 0x2518 }}, /* lower right corner */
+ { 't', { '+', 0x251c }}, /* tee pointing left */
+ { 'u', { '+', 0x2524 }}, /* tee pointing right */
+ { 'v', { '+', 0x2534 }}, /* tee pointing up */
+ { 'w', { '+', 0x252c }}, /* tee pointing down */
+ { 'q', { '-', 0x2500 }}, /* horizontal line */
+ { 'x', { '|', 0x2502 }}, /* vertical line */
+ { 'n', { '+', 0x253c }}, /* large plus or crossover */
+ { 'o', { '~', 0x23ba }}, /* scan line 1 */
+ { 's', { '_', 0x23bd }}, /* scan line 9 */
+ { '`', { '+', 0x25c6 }}, /* diamond */
+ { 'a', { ':', 0x2592 }}, /* checker board (stipple) */
+ { 'f', { '\'', 0x00b0 }}, /* degree symbol */
+ { 'g', { '#', 0x00b1 }}, /* plus/minus */
+ { '~', { 'o', 0x00b7 }}, /* bullet */
+ /* Teletype 5410v1 symbols */
+ { ',', { '<', 0x2190 }}, /* arrow pointing left */
+ { '+', { '>', 0x2192 }}, /* arrow pointing right */
+ { '.', { 'v', 0x2193 }}, /* arrow pointing down */
+ { '-', { '^', 0x2191 }}, /* arrow pointing up */
+ { 'h', { '#', 0x2592 }}, /* board of squares */
+ { 'i', { '#', 0x2603 }}, /* lantern symbol */
+ { '0', { '#', 0x25ae }}, /* solid square block */
+ /* these defaults were invented for ncurses */
+ { 'p', { '-', 0x23bb }}, /* scan line 3 */
+ { 'r', { '-', 0x23bc }}, /* scan line 7 */
+ { 'y', { '<', 0x2264 }}, /* less-than-or-equal-to */
+ { 'z', { '>', 0x2265 }}, /* greater-than-or-equal-to */
+ { '{', { '*', 0x03c0 }}, /* greek pi */
+ { '|', { '!', 0x2260 }}, /* not-equal */
+ { '}', { 'f', 0x00a3 }}, /* pound-sterling symbol */
+ };
+ /* *INDENT-ON* */
+
+ unsigned n, m;
+ int active = _nc_unicode_locale();
+
+ /*
+ * If we're running in a UTF-8 locale, will use the Unicode equivalents
+ * rather than the terminfo information. Actually the terminfo should
+ * be the rule, but there are people who are offended by the notion that
+ * a Unicode-capable terminal would have something resembling a mode.
+ * So the smacs/rmacs may be disabled -- sometime.
+ */
+ T(("initializing WIDE-ACS map (Unicode is%s active)",
+ active ? "" : " not"));
+
+ _nc_wacs = typeCalloc(cchar_t, ACS_LEN);
+ for (n = 0; n < SIZEOF(table); ++n) {
+ m = table[n].map;
+ if (active) {
+ SetChar(_nc_wacs[m], table[n].value[active], A_NORMAL);
+ } else if (acs_map[m] & A_ALTCHARSET) {
+ SetChar(_nc_wacs[m], m, A_ALTCHARSET);
+ } else {
+ SetChar(_nc_wacs[m], table[n].value[0], A_NORMAL);
+ }
+ T(("#%d, SetChar(%c, %#04x) = %s",
+ n, m,
+ table[n].value[active],
+ _tracecchar_t(&_nc_wacs[m])));
+ }
+}
diff --git a/Build/source/libs/ncurses/ncurses/widechar/lib_wunctrl.c b/Build/source/libs/ncurses/ncurses/widechar/lib_wunctrl.c
new file mode 100644
index 00000000000..89430e5681a
--- /dev/null
+++ b/Build/source/libs/ncurses/ncurses/widechar/lib_wunctrl.c
@@ -0,0 +1,56 @@
+/****************************************************************************
+ * Copyright (c) 2001,2003 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+** lib_wunctrl.c
+**
+** The routine wunctrl().
+**
+*/
+
+#include <curses.priv.h>
+
+#if USE_WIDEC_SUPPORT
+
+MODULE_ID("$Id: lib_wunctrl.c,v 1.7 2003/07/05 17:01:43 tom Exp $")
+
+NCURSES_EXPORT(wchar_t *)
+wunctrl(cchar_t * wc)
+{
+ static wchar_t str[5], *sp;
+
+ if (Charable(*wc)) {
+ const char *p;
+ for (p = unctrl(_nc_to_char(CharOf(*wc))), sp = str; *p;)
+ *sp++ = _nc_to_widechar(*p++);
+ return str;
+ } else
+ return wc->chars;
+}
+
+#endif
diff --git a/Build/source/libs/ncurses/tar-copy.sh b/Build/source/libs/ncurses/tar-copy.sh
new file mode 100755
index 00000000000..3df1bc11169
--- /dev/null
+++ b/Build/source/libs/ncurses/tar-copy.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+# $Id: tar-copy.sh,v 1.5 2003/10/25 14:40:07 tom Exp $
+##############################################################################
+# Copyright (c) 1998,2003 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey
+#
+# Copy a collection of files using 'tar', so that their dates and links are
+# preserved
+#
+# Parameters:
+# $1 = files to copy
+# $2 = source directory
+# $3 = destination directory
+#
+#DOIT=echo
+DOIT=eval
+
+if test $# != 3 ; then
+ echo "Usage: $0 files source target"
+ exit 1
+elif test ! -d "$2" ; then
+ echo "Source directory not found: $2"
+ exit 1
+elif test ! -d "$3" ; then
+ echo "Target directory not found: $3"
+ exit 1
+fi
+
+WD=`pwd`
+
+TMP=$WD/copy$$
+
+cd $2
+TEST=`ls -d $1 2>/dev/null`
+if test -z "$TEST"
+then
+ echo "... no match for \"$1\" in $2"
+else
+ echo "... installing files matching \"$1\" in $2"
+ trap "rm -f $TMP" 0 1 2 5 15
+ if ( tar cf $TMP $1 )
+ then
+ cd $3
+ LIST=`tar tf $TMP 2>&1`
+ $DOIT rm -rf $LIST 2>/dev/null
+ $DOIT tar xvf $TMP
+ else
+ echo "Cannot create tar of $1 files"
+ exit 1
+ fi
+fi
diff --git a/Build/source/libs/ncurses/withenable.ac b/Build/source/libs/ncurses/withenable.ac
new file mode 100644
index 00000000000..091a2155641
--- /dev/null
+++ b/Build/source/libs/ncurses/withenable.ac
@@ -0,0 +1,15 @@
+dnl withenable.ac: --with and --enable options.
+try_ncurses=no
+AC_ARG_WITH([system-ncurses],
+ [ --with-system-ncurses check for installed ncurses],
+ [test "$withval" = "yes" && try_ncurses=yes],
+ [try_ncurses=no])
+
+AC_ARG_WITH([ncurses_libdir],
+[ --with-ncurses-libdir=DIR
+ Specify directory where the ncurses library resides.])
+
+AC_ARG_WITH([ncurses_include],
+[ --with-ncurses-include=DIR
+ Specify the ncurses header files location.])
+