aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ANNOUNCE327
-rw-r--r--INSTALL219
-rw-r--r--MANIFEST86
-rw-r--r--Makefile.in15
-rw-r--r--NEWS1082
-rw-r--r--README.MinGW149
-rw-r--r--TO-DO41
-rw-r--r--aclocal.m41806
-rw-r--r--announce.html.in919
-rwxr-xr-xconfig.guess370
-rwxr-xr-xconfig.sub166
-rwxr-xr-xconfigure6827
-rw-r--r--configure.in452
-rw-r--r--dist.mk11
-rw-r--r--doc/html/announce.html919
-rw-r--r--doc/html/hackguide.html6
-rw-r--r--doc/html/ncurses-intro.html6
-rw-r--r--form/Makefile.in19
-rw-r--r--form/f_trace.c12
-rw-r--r--form/fld_arg.c8
-rw-r--r--form/fld_attr.c6
-rw-r--r--form/fld_current.c10
-rw-r--r--form/fld_def.c10
-rw-r--r--form/fld_dup.c8
-rw-r--r--form/fld_ftchoice.c11
-rw-r--r--form/fld_ftlink.c8
-rw-r--r--form/fld_info.c18
-rw-r--r--form/fld_just.c8
-rw-r--r--form/fld_link.c8
-rw-r--r--form/fld_max.c6
-rw-r--r--form/fld_move.c6
-rw-r--r--form/fld_newftyp.c28
-rw-r--r--form/fld_opts.c12
-rw-r--r--form/fld_pad.c8
-rw-r--r--form/fld_page.c8
-rw-r--r--form/fld_stat.c8
-rw-r--r--form/fld_type.c8
-rw-r--r--form/fld_user.c8
-rw-r--r--form/form.h81
-rw-r--r--form/form.priv.h61
-rw-r--r--form/frm_cursor.c6
-rw-r--r--form/frm_data.c8
-rw-r--r--form/frm_def.c67
-rw-r--r--form/frm_driver.c350
-rw-r--r--form/frm_hook.c6
-rw-r--r--form/frm_opts.c12
-rw-r--r--form/frm_page.c8
-rw-r--r--form/frm_post.c8
-rw-r--r--form/frm_req_name.c8
-rw-r--r--form/frm_scale.c9
-rw-r--r--form/frm_sub.c23
-rw-r--r--form/frm_user.c8
-rw-r--r--form/frm_win.c29
-rw-r--r--form/fty_alnum.c63
-rw-r--r--form/fty_alpha.c63
-rw-r--r--form/fty_enum.c160
-rw-r--r--form/fty_generic.c297
-rw-r--r--form/fty_int.c77
-rw-r--r--form/fty_ipv4.c25
-rw-r--r--form/fty_num.c83
-rw-r--r--form/fty_regex.c172
-rw-r--r--form/llib-lform51
-rw-r--r--form/llib-lformt777
-rw-r--r--form/llib-lformtw783
-rw-r--r--form/llib-lformw51
-rw-r--r--form/modules86
-rw-r--r--include/Caps10
-rw-r--r--include/Caps.aix410
-rw-r--r--include/Caps.hpux1110
-rw-r--r--include/Caps.keys10
-rw-r--r--include/Caps.osf1r510
-rw-r--r--include/Caps.uwin10
-rw-r--r--include/MKterm.h.awk.in56
-rw-r--r--include/Makefile.in20
-rw-r--r--include/capdefaults.c6
-rw-r--r--include/curses.h.in270
-rw-r--r--include/curses.tail32
-rw-r--r--include/curses.wide68
-rw-r--r--include/headers6
-rw-r--r--include/nc_alloc.h18
-rw-r--r--include/nc_mingw.h69
-rw-r--r--include/nc_panel.h35
-rw-r--r--include/nc_tparm.h12
-rw-r--r--include/ncurses_defs11
-rw-r--r--include/ncurses_dll.h.in (renamed from include/ncurses_dll.h)20
-rw-r--r--include/ncurses_mingw.h164
-rw-r--r--include/term_entry.h12
-rw-r--r--include/tic.h28
-rw-r--r--include/unctrl.h.in8
-rw-r--r--man/MKada_config.in57
-rw-r--r--man/MKncu_config.in98
-rw-r--r--man/Makefile.in11
-rw-r--r--man/captoinfo.1m59
-rw-r--r--man/clear.112
-rw-r--r--man/curs_add_wch.3x129
-rw-r--r--man/curs_add_wchstr.3x16
-rw-r--r--man/curs_addch.3x34
-rw-r--r--man/curs_addchstr.3x18
-rw-r--r--man/curs_addstr.3x18
-rw-r--r--man/curs_addwstr.3x16
-rw-r--r--man/curs_attr.3x24
-rw-r--r--man/curs_beep.3x12
-rw-r--r--man/curs_bkgd.3x14
-rw-r--r--man/curs_bkgrnd.3x10
-rw-r--r--man/curs_border.3x32
-rw-r--r--man/curs_border_set.3x31
-rw-r--r--man/curs_clear.3x17
-rw-r--r--man/curs_color.3x51
-rw-r--r--man/curs_delch.3x16
-rw-r--r--man/curs_deleteln.3x12
-rw-r--r--man/curs_extend.3x12
-rw-r--r--man/curs_get_wch.3x8
-rw-r--r--man/curs_get_wstr.3x14
-rw-r--r--man/curs_getcchar.3x45
-rw-r--r--man/curs_getch.3x34
-rw-r--r--man/curs_getstr.3x20
-rw-r--r--man/curs_getyx.3x14
-rw-r--r--man/curs_in_wch.3x16
-rw-r--r--man/curs_in_wchstr.3x14
-rw-r--r--man/curs_inch.3x20
-rw-r--r--man/curs_inchstr.3x18
-rw-r--r--man/curs_initscr.3x20
-rw-r--r--man/curs_inopts.3x14
-rw-r--r--man/curs_ins_wch.3x14
-rw-r--r--man/curs_ins_wstr.3x14
-rw-r--r--man/curs_insch.3x16
-rw-r--r--man/curs_insstr.3x16
-rw-r--r--man/curs_instr.3x16
-rw-r--r--man/curs_inwstr.3x14
-rw-r--r--man/curs_kernel.3x29
-rw-r--r--man/curs_legacy.3x21
-rw-r--r--man/curs_memleaks.3x14
-rw-r--r--man/curs_mouse.3x29
-rw-r--r--man/curs_move.3x12
-rw-r--r--man/curs_opaque.3x28
-rw-r--r--man/curs_outopts.3x26
-rw-r--r--man/curs_overlay.3x12
-rw-r--r--man/curs_pad.3x19
-rw-r--r--man/curs_print.3x12
-rw-r--r--man/curs_printw.3x16
-rw-r--r--man/curs_refresh.3x16
-rw-r--r--man/curs_scanw.3x16
-rw-r--r--man/curs_scr_dump.3x12
-rw-r--r--man/curs_scroll.3x12
-rw-r--r--man/curs_slk.3x111
-rw-r--r--man/curs_sp_funcs.3x353
-rw-r--r--man/curs_termattrs.3x12
-rw-r--r--man/curs_termcap.3x29
-rw-r--r--man/curs_terminfo.3x41
-rw-r--r--man/curs_threads.3x40
-rw-r--r--man/curs_touch.3x16
-rw-r--r--man/curs_trace.3x37
-rw-r--r--man/curs_util.3x59
-rw-r--r--man/curs_variables.3x135
-rw-r--r--man/curs_window.3x21
-rw-r--r--man/default_colors.3x22
-rw-r--r--man/define_key.3x16
-rw-r--r--man/form.3x16
-rw-r--r--man/form_cursor.3x12
-rw-r--r--man/form_data.3x12
-rw-r--r--man/form_driver.3x44
-rw-r--r--man/form_field.3x14
-rw-r--r--man/form_field_attributes.3x12
-rw-r--r--man/form_field_buffer.3x40
-rw-r--r--man/form_field_info.3x12
-rw-r--r--man/form_field_just.3x12
-rw-r--r--man/form_field_new.3x12
-rw-r--r--man/form_field_opts.3x13
-rw-r--r--man/form_field_userptr.3x12
-rw-r--r--man/form_field_validation.3x26
-rw-r--r--man/form_fieldtype.3x12
-rw-r--r--man/form_hook.3x12
-rw-r--r--man/form_new.3x12
-rw-r--r--man/form_new_page.3x12
-rw-r--r--man/form_opts.3x12
-rw-r--r--man/form_page.3x12
-rw-r--r--man/form_post.3x12
-rw-r--r--man/form_requestname.3x12
-rw-r--r--man/form_userptr.3x12
-rw-r--r--man/form_variables.3x82
-rw-r--r--man/form_win.3x16
-rw-r--r--man/infocmp.1m182
-rw-r--r--man/infotocap.1m45
-rw-r--r--man/key_defined.3x12
-rw-r--r--man/keybound.3x10
-rw-r--r--man/keyok.3x12
-rw-r--r--man/legacy_coding.3x10
-rw-r--r--man/man_db.renames20
-rw-r--r--man/menu.3x16
-rw-r--r--man/menu_attributes.3x12
-rw-r--r--man/menu_cursor.3x12
-rw-r--r--man/menu_driver.3x55
-rw-r--r--man/menu_format.3x12
-rw-r--r--man/menu_hook.3x12
-rw-r--r--man/menu_items.3x14
-rw-r--r--man/menu_mark.3x14
-rw-r--r--man/menu_new.3x12
-rw-r--r--man/menu_opts.3x12
-rw-r--r--man/menu_pattern.3x12
-rw-r--r--man/menu_post.3x12
-rw-r--r--man/menu_requestname.3x12
-rw-r--r--man/menu_spacing.3x52
-rw-r--r--man/menu_userptr.3x12
-rw-r--r--man/menu_win.3x16
-rw-r--r--man/mitem_current.3x14
-rw-r--r--man/mitem_name.3x12
-rw-r--r--man/mitem_new.3x12
-rw-r--r--man/mitem_opts.3x12
-rw-r--r--man/mitem_userptr.3x12
-rw-r--r--man/mitem_value.3x12
-rw-r--r--man/mitem_visible.3x12
-rw-r--r--man/ncurses.3x130
-rw-r--r--man/panel.3x19
-rw-r--r--man/resizeterm.3x13
-rw-r--r--man/tabs.1141
-rw-r--r--man/term.522
-rw-r--r--man/term.762
-rw-r--r--man/term_variables.3x153
-rw-r--r--man/terminfo.head34
-rw-r--r--man/terminfo.tail103
-rw-r--r--man/tic.1m180
-rw-r--r--man/toe.1m26
-rw-r--r--man/tput.156
-rw-r--r--man/tset.195
-rw-r--r--man/wresize.3x17
-rw-r--r--menu/Makefile.in19
-rw-r--r--menu/llib-lmenu12
-rw-r--r--menu/llib-lmenut551
-rw-r--r--menu/llib-lmenutw553
-rw-r--r--menu/llib-lmenuw12
-rw-r--r--menu/m_attribs.c11
-rw-r--r--menu/m_cursor.c8
-rw-r--r--menu/m_driver.c11
-rw-r--r--menu/m_format.c6
-rw-r--r--menu/m_global.c14
-rw-r--r--menu/m_hook.c6
-rw-r--r--menu/m_item_cur.c10
-rw-r--r--menu/m_item_nam.c8
-rw-r--r--menu/m_item_new.c15
-rw-r--r--menu/m_item_opt.c12
-rw-r--r--menu/m_item_top.c8
-rw-r--r--menu/m_item_use.c8
-rw-r--r--menu/m_item_val.c8
-rw-r--r--menu/m_item_vis.c6
-rw-r--r--menu/m_items.c10
-rw-r--r--menu/m_new.c42
-rw-r--r--menu/m_opts.c12
-rw-r--r--menu/m_pad.c12
-rw-r--r--menu/m_pattern.c8
-rw-r--r--menu/m_post.c14
-rw-r--r--menu/m_req_name.c6
-rw-r--r--menu/m_scale.c9
-rw-r--r--menu/m_spacing.c13
-rw-r--r--menu/m_sub.c28
-rw-r--r--menu/m_trace.c10
-rw-r--r--menu/m_userptr.c8
-rw-r--r--menu/m_win.c30
-rw-r--r--menu/menu.h8
-rw-r--r--menu/menu.priv.h10
-rw-r--r--menu/modules58
-rw-r--r--misc/Makefile.in38
-rw-r--r--misc/gen-pkgconfig.in139
-rwxr-xr-xmisc/jpf-indent119
-rwxr-xr-xmisc/ncu-indent132
-rw-r--r--misc/ncurses-config.in59
-rw-r--r--misc/run_tic.in90
-rw-r--r--misc/terminfo.src1084
-rw-r--r--mk-0th.awk16
-rw-r--r--mk-1st.awk39
-rw-r--r--mk-dlls.sh.in114
-rw-r--r--mk-hdr.awk6
-rw-r--r--mkdirs.sh51
-rw-r--r--ncurses/Makefile.in54
-rw-r--r--ncurses/README23
-rw-r--r--ncurses/base/MKkeyname.awk21
-rwxr-xr-xncurses/base/MKlib_gen.sh75
-rw-r--r--ncurses/base/MKunctrl.awk26
-rw-r--r--ncurses/base/define_key.c39
-rw-r--r--ncurses/base/key_defined.c20
-rw-r--r--ncurses/base/keybound.c23
-rw-r--r--ncurses/base/keyok.c39
-rw-r--r--ncurses/base/legacy_coding.c25
-rw-r--r--ncurses/base/lib_addch.c80
-rw-r--r--ncurses/base/lib_addstr.c19
-rw-r--r--ncurses/base/lib_beep.c27
-rw-r--r--ncurses/base/lib_bkgd.c16
-rw-r--r--ncurses/base/lib_box.c9
-rw-r--r--ncurses/base/lib_chgat.c8
-rw-r--r--ncurses/base/lib_clear.c6
-rw-r--r--ncurses/base/lib_clearok.c6
-rw-r--r--ncurses/base/lib_clrbot.c6
-rw-r--r--ncurses/base/lib_clreol.c6
-rw-r--r--ncurses/base/lib_color.c544
-rw-r--r--ncurses/base/lib_colorset.c19
-rw-r--r--ncurses/base/lib_delch.c6
-rw-r--r--ncurses/base/lib_delwin.c21
-rw-r--r--ncurses/base/lib_dft_fgbg.c70
-rw-r--r--ncurses/base/lib_driver.c143
-rw-r--r--ncurses/base/lib_echo.c36
-rw-r--r--ncurses/base/lib_endwin.c39
-rw-r--r--ncurses/base/lib_erase.c6
-rw-r--r--ncurses/base/lib_flash.c30
-rw-r--r--ncurses/base/lib_freeall.c62
-rw-r--r--ncurses/base/lib_getch.c181
-rw-r--r--ncurses/base/lib_getstr.c25
-rw-r--r--ncurses/base/lib_hline.c10
-rw-r--r--ncurses/base/lib_immedok.c6
-rw-r--r--ncurses/base/lib_inchstr.c11
-rw-r--r--ncurses/base/lib_initscr.c8
-rw-r--r--ncurses/base/lib_insch.c48
-rw-r--r--ncurses/base/lib_insdel.c6
-rw-r--r--ncurses/base/lib_insnstr.c10
-rw-r--r--ncurses/base/lib_instr.c30
-rw-r--r--ncurses/base/lib_isendwin.c20
-rw-r--r--ncurses/base/lib_leaveok.c6
-rw-r--r--ncurses/base/lib_mouse.c277
-rw-r--r--ncurses/base/lib_move.c6
-rw-r--r--ncurses/base/lib_mvwin.c20
-rw-r--r--ncurses/base/lib_newterm.c234
-rw-r--r--ncurses/base/lib_newwin.c154
-rw-r--r--ncurses/base/lib_nl.c46
-rw-r--r--ncurses/base/lib_overlay.c16
-rw-r--r--ncurses/base/lib_pad.c82
-rw-r--r--ncurses/base/lib_printw.c16
-rw-r--r--ncurses/base/lib_redrawln.c27
-rw-r--r--ncurses/base/lib_refresh.c69
-rw-r--r--ncurses/base/lib_restart.c78
-rw-r--r--ncurses/base/lib_scanw.c6
-rw-r--r--ncurses/base/lib_screen.c126
-rw-r--r--ncurses/base/lib_scroll.c10
-rw-r--r--ncurses/base/lib_scrollok.c6
-rw-r--r--ncurses/base/lib_scrreg.c6
-rw-r--r--ncurses/base/lib_set_term.c472
-rw-r--r--ncurses/base/lib_slk.c242
-rw-r--r--ncurses/base/lib_slkatr_set.c48
-rw-r--r--ncurses/base/lib_slkatrof.c26
-rw-r--r--ncurses/base/lib_slkatron.c26
-rw-r--r--ncurses/base/lib_slkatrset.c20
-rw-r--r--ncurses/base/lib_slkattr.c24
-rw-r--r--ncurses/base/lib_slkclear.c30
-rw-r--r--ncurses/base/lib_slkcolor.c40
-rw-r--r--ncurses/base/lib_slkinit.c39
-rw-r--r--ncurses/base/lib_slklab.c22
-rw-r--r--ncurses/base/lib_slkrefr.c91
-rw-r--r--ncurses/base/lib_slkset.c28
-rw-r--r--ncurses/base/lib_slktouch.c24
-rw-r--r--ncurses/base/lib_touch.c14
-rw-r--r--ncurses/base/lib_ungetch.c14
-rw-r--r--ncurses/base/lib_vline.c10
-rw-r--r--ncurses/base/lib_wattroff.c6
-rw-r--r--ncurses/base/lib_wattron.c8
-rw-r--r--ncurses/base/lib_winch.c12
-rw-r--r--ncurses/base/lib_window.c66
-rw-r--r--ncurses/base/nc_panel.c18
-rw-r--r--ncurses/base/resizeterm.c198
-rw-r--r--ncurses/base/safe_sprintf.c37
-rw-r--r--ncurses/base/tries.c12
-rw-r--r--ncurses/base/use_window.c6
-rw-r--r--ncurses/base/wresize.c33
-rw-r--r--ncurses/build.priv.h108
-rw-r--r--ncurses/curses.priv.h878
-rw-r--r--ncurses/llib-lncurses1026
-rw-r--r--ncurses/llib-lncursest1055
-rw-r--r--ncurses/llib-lncursestw5270
-rw-r--r--ncurses/llib-lncursesw1071
-rw-r--r--ncurses/modules370
-rw-r--r--ncurses/tinfo/MKcaptab.sh136
-rw-r--r--ncurses/tinfo/MKcodes.awk23
-rwxr-xr-xncurses/tinfo/MKfallback.sh18
-rw-r--r--ncurses/tinfo/MKnames.awk26
-rw-r--r--ncurses/tinfo/access.c7
-rw-r--r--ncurses/tinfo/add_tries.c11
-rw-r--r--ncurses/tinfo/alloc_entry.c19
-rw-r--r--ncurses/tinfo/alloc_ttype.c90
-rw-r--r--ncurses/tinfo/captoinfo.c49
-rw-r--r--ncurses/tinfo/comp_expand.c6
-rw-r--r--ncurses/tinfo/comp_hash.c334
-rw-r--r--ncurses/tinfo/comp_parse.c18
-rw-r--r--ncurses/tinfo/comp_scan.c94
-rw-r--r--ncurses/tinfo/db_iterator.c11
-rw-r--r--ncurses/tinfo/entries.c18
-rw-r--r--ncurses/tinfo/free_ttype.c6
-rw-r--r--ncurses/tinfo/hashed_db.c58
-rw-r--r--ncurses/tinfo/home_terminfo.c6
-rw-r--r--ncurses/tinfo/init_keytry.c20
-rw-r--r--ncurses/tinfo/lib_acs.c82
-rw-r--r--ncurses/tinfo/lib_baudrate.c32
-rw-r--r--ncurses/tinfo/lib_cur_term.c112
-rw-r--r--ncurses/tinfo/lib_data.c50
-rw-r--r--ncurses/tinfo/lib_has_cap.c53
-rw-r--r--ncurses/tinfo/lib_kernel.c82
-rw-r--r--ncurses/tinfo/lib_longname.c42
-rw-r--r--ncurses/tinfo/lib_napms.c21
-rw-r--r--ncurses/tinfo/lib_options.c277
-rw-r--r--ncurses/tinfo/lib_print.c39
-rw-r--r--ncurses/tinfo/lib_raw.c202
-rw-r--r--ncurses/tinfo/lib_setup.c401
-rw-r--r--ncurses/tinfo/lib_termcap.c227
-rw-r--r--ncurses/tinfo/lib_termname.c22
-rw-r--r--ncurses/tinfo/lib_ti.c162
-rw-r--r--ncurses/tinfo/lib_tparm.c49
-rw-r--r--ncurses/tinfo/lib_tputs.c168
-rw-r--r--ncurses/tinfo/lib_ttyflags.c207
-rw-r--r--ncurses/tinfo/make_hash.c294
-rw-r--r--ncurses/tinfo/make_keys.c24
-rw-r--r--ncurses/tinfo/name_match.c3
-rw-r--r--ncurses/tinfo/parse_entry.c55
-rw-r--r--ncurses/tinfo/read_entry.c71
-rw-r--r--ncurses/tinfo/read_termcap.c20
-rw-r--r--ncurses/tinfo/setbuf.c35
-rw-r--r--ncurses/tinfo/tinfo_driver.c1337
-rw-r--r--ncurses/tinfo/trim_sgr0.c38
-rw-r--r--ncurses/tinfo/use_screen.c8
-rw-r--r--ncurses/tinfo/write_entry.c82
-rw-r--r--ncurses/trace/lib_trace.c37
-rw-r--r--ncurses/trace/lib_traceatr.c55
-rw-r--r--ncurses/trace/lib_tracebits.c7
-rw-r--r--ncurses/trace/lib_tracechr.c10
-rw-r--r--ncurses/trace/lib_tracedmp.c12
-rw-r--r--ncurses/trace/lib_tracemse.c42
-rw-r--r--ncurses/trace/trace_buf.c11
-rw-r--r--ncurses/trace/trace_tries.c14
-rw-r--r--ncurses/trace/trace_xnames.c7
-rw-r--r--ncurses/trace/varargs.c4
-rw-r--r--ncurses/trace/visbuf.c57
-rwxr-xr-xncurses/tty/MKexpanded.sh61
-rw-r--r--ncurses/tty/hardscroll.c113
-rw-r--r--ncurses/tty/hashmap.c259
-rw-r--r--ncurses/tty/lib_mvcur.c504
-rw-r--r--ncurses/tty/lib_tstp.c45
-rw-r--r--ncurses/tty/lib_twait.c82
-rw-r--r--ncurses/tty/lib_vidattr.c133
-rw-r--r--ncurses/tty/tty_update.c1228
-rw-r--r--ncurses/wcwidth.h309
-rw-r--r--ncurses/widechar/lib_add_wch.c438
-rw-r--r--ncurses/widechar/lib_box_set.c6
-rw-r--r--ncurses/widechar/lib_cchar.c34
-rw-r--r--ncurses/widechar/lib_erasewchar.c8
-rw-r--r--ncurses/widechar/lib_get_wch.c33
-rw-r--r--ncurses/widechar/lib_get_wstr.c7
-rw-r--r--ncurses/widechar/lib_hline_set.c12
-rw-r--r--ncurses/widechar/lib_in_wch.c6
-rw-r--r--ncurses/widechar/lib_in_wchnstr.c6
-rw-r--r--ncurses/widechar/lib_ins_wch.c62
-rw-r--r--ncurses/widechar/lib_inwstr.c8
-rw-r--r--ncurses/widechar/lib_pecho_wchar.c8
-rw-r--r--ncurses/widechar/lib_unget_wch.c28
-rw-r--r--ncurses/widechar/lib_vid_attr.c124
-rw-r--r--ncurses/widechar/lib_vline_set.c12
-rw-r--r--ncurses/widechar/lib_wacs.c31
-rw-r--r--ncurses/widechar/lib_wunctrl.c26
-rw-r--r--ncurses/win32con/gettimeofday.c51
-rw-r--r--ncurses/win32con/wcwidth.c50
-rw-r--r--ncurses/win32con/win_driver.c1241
-rw-r--r--panel/Makefile.in19
-rw-r--r--panel/llib-lpanel21
-rw-r--r--panel/llib-lpanelt197
-rw-r--r--panel/llib-lpaneltw197
-rw-r--r--panel/llib-lpanelw21
-rw-r--r--panel/modules34
-rw-r--r--panel/p_above.c46
-rw-r--r--panel/p_below.c43
-rw-r--r--panel/p_bottom.c8
-rw-r--r--panel/p_delete.c14
-rw-r--r--panel/p_hidden.c18
-rw-r--r--panel/p_hide.c24
-rw-r--r--panel/p_move.c24
-rw-r--r--panel/p_new.c29
-rw-r--r--panel/p_replace.c26
-rw-r--r--panel/p_show.c39
-rw-r--r--panel/p_top.c6
-rw-r--r--panel/p_update.c43
-rw-r--r--panel/p_user.c8
-rw-r--r--panel/p_win.c6
-rw-r--r--panel/panel.c10
-rw-r--r--panel/panel.h12
-rw-r--r--panel/panel.priv.h59
-rw-r--r--progs/Makefile.in49
-rw-r--r--progs/dump_entry.c16
-rw-r--r--progs/infocmp.c24
-rw-r--r--progs/modules10
-rw-r--r--progs/tabs.c510
-rw-r--r--progs/tic.c207
-rw-r--r--progs/toe.c23
-rw-r--r--progs/tput.c60
-rw-r--r--progs/transform.c79
-rw-r--r--progs/tset.c38
-rwxr-xr-xtar-copy.sh77
488 files changed, 39798 insertions, 12592 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index e09e73177a45..11933c5f6d55 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,4 +1,4 @@
- Announcing ncurses 5.7
+ Announcing ncurses 5.9
The ncurses (new curses) library is a free software emulation of
curses in System V Release 4.0, and more. It uses terminfo format,
@@ -27,217 +27,30 @@
Release Notes
This release is designed to be upward compatible from ncurses 5.0
- through 5.6; very few applications will require recompilation,
+ through 5.8; very few applications will require recompilation,
depending on the platform. These are the highlights from the
- change-log since ncurses 5.6 release.
-
- Interface changes:
- * generate linkable stubs for some macros:
- getattrs
-
- New features and improvements:
- * library
- + new flavor of the ncurses library provides rudimentary
- support for POSIX threads. Several functions are reentrant,
- but most require either a window-level or screen-level mutex.
- (This is API-compatible, but not ABI-compatible with the
- normal library).
- + add NCURSES_OPAQUE symbol to curses.h, will use to make
- structs opaque in selected configurations.
- + add NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS symbols to
- curses.h to make it simpler to tell if the extended functions
- and/or colors are declared.
- + add wresize() to C++ binding
- + eliminate fixed-buffer vsprintf() calls in C++ binding.
- + add several functions to C++ binding which wrap C functions
- that pass a WINDOW* parameter.
- + adapt mouse-handling code from menu library in form-library
- + improve tracing for form library, showing created forms,
- fields, etc.
- + make $NCURSES_NO_PADDING feature work for termcap interface .
- + add check to trace-file open, if the given name is a
- directory, add ".log" to the name and try again.
- + several new manpages: curs_legacy.3x, curs_memleaks.3x,
- curs_opaque.3x and curs_threads.3x
- * programs:
- + modified three test-programs to demonstrate the threading
- support in this version: ditto, rain, worm.
- + several new test-programs: demo_panels, dots_mvcur,
- inch_wide, inchs, key_name, key_names, savescreen,
- savescreen.sh test_arrays, test_get_wstr, test_getstr,
- test_instr, test_inwstr and test_opaque.
- + add adacurses-config to the Ada95 install.
- + modify tic -f option to format spaces as \s to prevent them
- from being lost when that is read back in unformatted
- strings.
- + The tack program is now distributed separately from ncurses.
- * terminal database
- + added entries:
- o Eterm-256color, Eterm-88color and rxvt-88color
- o aterm
- o konsole-256color
- o mrxvt
- o screen.mlterm
- o screen.rxvt
- o teraterm4.59 is now the primary primary teraterm entry,
- renamed original to teraterm2.3
- o 9term terminal
- o Newbury Data entries
- + updated/improved entries:
- o gnome to version 2.22.3
- o h19, z100
- o konsole to version 1.6.6
- o mlterm, mlterm+pcfkeys
- o xterm, and building-blocks for function-keys to [3]xterm
- patch #230.
-
- Major bug fixes:
- * add logic to tic for cancelling strings in user-defined
- capabilities (this is needed for current konsole terminfo entry).
- * modify mk-1st.awk so the generated makefile rules for linking or
- installing shared libraries do not first remove the library, in
- case it is in use, e.g., libncurses.so by /bin/sh.
- * correct check for notimeout() in wgetch().
- * fix a sign-extension bug in infocmp's repair_acsc() function.
- * change winnstr() to stop at the end of the line.
- * make Ada95 demo_panels() example work.
- * fix for adding a non-spacing character at the beginning of a line.
- * fill in extended-color pair to make colors work for
- wide-characters using extended-colors.
- * improve refresh of window on top of multi-column characters,
- taking into account split characters on left/right window
- boundaries.
- * modify win_wchnstr() to ensure that only a base cell is returned
- for each multi-column character.
- * improve waddch() and winsch() handling of EILSEQ from mbrtowc() by
- using unctrl() to display illegal bytes rather than trying to
- append further bytes to make up a valid sequence.
- * restore curs_set() state after endwin()/refresh()
- * modify keyname() to use "^X" form only if meta() has been called,
- or if keyname() is called without initializing curses, e.g., via
- initscr() or newterm().
- * modify unctrl() to check codes in 128-255 range versus isprint().
- If they are not printable, and locale was set, use a "M-" or "~"
- sequence.
- * improve resizeterm() by moving ripped-off lines, and repainting
- the soft-keys.
- * modify form library to accept control characters such as newline
- in set_field_buffer(), which is compatible with Solaris.
- * use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc.,
- to make those work properly with the --enable-ext-mouse
- configuration
- * correct some functions in Ada95 binding which were using return
- value from C where none was returned.
- * reviewed/fixed issues reported by Coverity and Klocwork tools.
-
- Portability:
- * configure script:
- + new options:
-
- --disable-big-strings
- control whether static string tables are generated
- as single large strings (to improve startup
- performance), or as array of individual strings.
-
- --disable-relink
- control whether shared libraries are relinked
- (during install) when rpath is enabled.
-
- --disable-tic-depends
- make explicit whether tic library depends on
- ncurses/ncursesw library.
-
- --enable-mixed-case
- override the configure script's check if the
- filesystem supports mixed-case filenames. This
- allows one to control how the terminal database
- maps to the filesystem. For filesystems that do not
- support mixed-case, the library uses generate
- 2-character (hexadecimal) codes for the lower-level
- of the filesystem terminfo database
-
- --enable-reentrant
- builds a different flavor of the ncurses library
- (ncursest) which improves reentrant use of the
- library by reducing global and static variables
- (see the "--with-pthread" option for the threaded
- support).
-
- --enable-weak-symbols
- use weak-symbols for linking to the POSIX thread
- library, and use the same soname for the ncurses
- shared library as the normal library (caveat: the
- ABI is for the threaded library, which makes global
- data accessed via functions).
-
- --with-pthread
- build with the POSIX thread library (tested with
- AIX, Linux, FreeBSD, OpenBSD, HPUX, IRIX64,
- Solaris, Tru64).
-
- --with-ticlib
- build/install the tic-support functions in a
- separate library
-
- + improved options:
-
- --enable-ext-colors
- requires the wide-character configuration.
-
- --with-chtype
- ignore option value "unsigned" is always added to
- the type in curses.h; do the same for
- --with-mmask-t.
-
- --with-dmalloc
- build-fix for redefinition of strndup.
-
- --with-hashed-db
- accepts a parameter which is the install-prefix of
- a given Berkeley Database.
-
- --with-hashed-db
- the $LIBS environment variable overrides the search
- for the db library.
-
- --without-hashed-db
- assumed when "--disable-database" is used.
-
- * other configure/build issues:
- + build-fixes for LynxOS
- + modify shared-library rules to allow FreeBSD 3.x to use
- rpath.
- + build-fix for FreeBSD "contemporary" TTY interface.
- + build-fixes for AIX with libtool.
- + build-fixes for Darwin and libtool.
- + modify BeOS-specific ifdef's to build on Haiku.
- + corrected gcc options for building shared libraries on
- Solaris and IRIX64.
- + change shared-library configuration for OpenBSD, make rpath
- work.
- + build-fixes for using libutf8, e.g., on OpenBSD 3.7
- + add "-e" option in ncurses/Makefile.in when generating
- source-files to force earlier exit if the build environment
- fails unexpectedly.
- + add support for shared libraries for QNX.
- + change delimiter in MKlib_gen.sh from '%' to '@', to avoid
- substitution by IBM xlc to '#' as part of its extensions to
- digraphs.
- * library:
- + rewrite wrapper for wcrtomb(), making it work on Solaris.
- This is used in the form library to determine the length of
- the buffer needed by field_buffer.
- + add/use configure script macro CF_SIG_ATOMIC_T, use the
- corresponding type for data manipulated by signal handlers.
- + set locale in misc/ncurses-config.in since it uses a range
- + disable GPM mouse support when $TERM does not happen to
- contain "linux", since Gpm_Open() no longer limits its
- assertion to terminals that it might handle, e.g., within
- "screen" in xterm.
- + reset mouse file-descriptor when unloading GPM library.
- * test programs:
- + update test programs to build/work with various UNIX curses
- for comparisons.
+ change-log since ncurses 5.8 release.
+
+ This is a bug-fix release, correcting a small number of urgent
+ problems in the ncurses library from the 5.8 release.
+
+ It also improves the Ada95 binding:
+ * fixes a longstanding portability problem with its use of the
+ [3]set_field_type function. Because that function uses
+ variable-length argument lists, its interface with gnat does not
+ work with certain platforms.
+ * improves configurability and portability, particularly when built
+ separately from the main ncurses tree. The 5.8 release introduced
+ scripts which can be used to construct separate tarballs for the
+ Ada95 and ncurses examples.
+ Those were a proof of concept. For the 5.9 release, those scripts
+ are augmented with rpm- and dpkg-scripts used in test builds
+ against a variety of gnat- and system ncurses versions as old as
+ gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
+ [4]here.
+ * additional improvements were made for portability of the ncurses
+ examples, adding rpm- and dpkg-scripts for test-builds. See
+ [5]this page for snapshots and other information.
Features of Ncurses
@@ -274,15 +87,15 @@
* Support for mouse event reporting with X Window xterm and FreeBSD
and OS/2 console windows.
* Extended mouse support via Alessandro Rubini's gpm package.
- * The function wresize() allows you to resize windows, preserving
+ * The function wresize allows you to resize windows, preserving
their data.
- * The function use_default_colors() allows you to use the terminal's
+ * 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.
+ * 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 256-color terminals, such as modern xterm, when
configured using the --enable-ext-colors option.
* Support for 16-color terminals, such as aixterm and modern xterm.
@@ -293,7 +106,7 @@
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.
+ 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
@@ -356,55 +169,55 @@
cdk
Curses Development Kit
- [4]http://invisible-island.net/cdk/
- [5]http://www.vexus.ca/products/CDK/
+ [6]http://invisible-island.net/cdk/
+ [7]http://www.vexus.ca/products/CDK/
ded
directory-editor
- [6]http://invisible-island.net/ded/
+ [8]http://invisible-island.net/ded/
dialog
the underlying application used in Slackware's setup, and the
basis for similar applications on GNU/Linux.
- [7]http://invisible-island.net/dialog/
+ [9]http://invisible-island.net/dialog/
lynx
the character-screen WWW browser
- [8]http://lynx.isc.org/release/
+ [10]http://lynx.isc.org/release/
Midnight Commander
file manager
- [9]http://www.ibiblio.org/mc/
+ [11]http://www.midnight-commander.org/
mutt
mail utility
- [10]http://www.mutt.org/
+ [12]http://www.mutt.org/
ncftp
file-transfer utility
- [11]http://www.ncftp.com/
+ [13]http://www.ncftp.com/
nvi
New vi versions 1.50 are able to use ncurses versions 1.9.7 and
later.
- [12]http://www.bostic.com/vi/
+ [14]https://sites.google.com/a/bostic.com/keithbostic/nvi
pinfo
Lynx-like info browser.
- [13]https://alioth.debian.org/projects/pinfo/
+ [15]https://alioth.debian.org/projects/pinfo/
tin
- newsreader, supporting color, MIME [14]http://www.tin.org/
+ newsreader, supporting color, MIME [16]http://www.tin.org/
as well as some that use ncurses for the terminfo support alone:
minicom
terminal emulator
- [15]http://alioth.debian.org/projects/minicom/
+ [17]http://alioth.debian.org/projects/minicom/
vile
vi-like-emacs
- [16]http://invisible-island.net/vile/
+ [18]http://invisible-island.net/vile/
The ncurses distribution includes a selection of test programs
(including a few games).
@@ -412,11 +225,11 @@
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
+ Pavel Curtis. Eric S. Raymond continued development. Juergen 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
+ by [19]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.
+ Contact the current maintainers at [20]bug-ncurses@gnu.org.
To join the ncurses mailing list, please write email to
bug-ncurses-request@gnu.org containing the line:
@@ -426,7 +239,7 @@ Who's Who and What's What
and testing of this package.
Beta versions of ncurses and patches to the current release are made
- available at [19]ftp://invisible-island.net/ncurses/ .
+ available at [21]ftp://invisible-island.net/ncurses/ .
Future Plans
@@ -440,34 +253,36 @@ Future Plans
Other Related Resources
The distribution provides a newer version of the terminfo-format
- terminal description file once maintained by [20]Eric Raymond . Unlike
+ terminal description file once maintained by [22]Eric Raymond . Unlike
the older version, the termcap and terminfo data are provided in the
same file, and provides several user-definable extensions beyond the
X/Open specification.
You can find lots of information on terminal-related topics not
- covered in the terminfo file at [21]Richard Shuford's archive .
+ covered in the terminfo file at [23]Richard Shuford's archive .
References
1. ftp://ftp.gnu.org/gnu/ncurses/
2. ftp://invisible-island.net/ncurses/
- 3. http://invisible-island.net/xterm/xterm.log.html#xterm_230
- 4. http://invisible-island.net/cdk/
- 5. http://www.vexus.ca/products/CDK/
- 6. http://invisible-island.net/ded/
- 7. http://invisible-island.net/dialog/
- 8. http://lynx.isc.org/release/
- 9. http://www.ibiblio.org/mc/
- 10. http://www.mutt.org/
- 11. http://www.ncftp.com/
- 12. http://www.bostic.com/vi/
- 13. https://alioth.debian.org/projects/pinfo/
- 14. http://www.tin.org/
- 15. http://alioth.debian.org/projects/minicom/
- 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
+ 3. http://invisible-island.net/ncurses/man/form_fieldtype.3x
+ 4. http://invisible-island.net/ncurses/ncurses-Ada95.html
+ 5. http://invisible-island.net/ncurses/ncurses-examples.html
+ 6. http://invisible-island.net/cdk/
+ 7. http://www.vexus.ca/products/CDK/
+ 8. http://invisible-island.net/ded/
+ 9. http://invisible-island.net/dialog/
+ 10. http://lynx.isc.org/release/
+ 11. http://www.midnight-commander.org/
+ 12. http://www.mutt.org/
+ 13. http://www.ncftp.com/
+ 14. https://sites.google.com/a/bostic.com/keithbostic/nvi
+ 15. https://alioth.debian.org/projects/pinfo/
+ 16. http://www.tin.org/
+ 17. http://alioth.debian.org/projects/minicom/
+ 18. http://invisible-island.net/vile/
+ 19. mailto:dickey@invisible-island.net
+ 20. mailto:bug-ncurses@gnu.org
+ 21. ftp://invisible-island.net/ncurses/
+ 22. http://www.catb.org/~esr/terminfo/
+ 23. http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal
diff --git a/INSTALL b/INSTALL
index ab7dcd829959..eb26ab103ef8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $
+-- $Id: INSTALL,v 1.155 2011/03/31 08:27:24 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@@ -39,9 +39,8 @@ 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 a 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.
@@ -58,10 +57,6 @@ 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:
------------
@@ -86,14 +81,14 @@ INSTALLATION PROCEDURE:
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.
+ for systems where ncurses is normally installed as a system library (see
+ "IF YOU ARE A SYSTEM INTEGRATOR"). 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
+ reset, clear, tput, toe, tabs
In $(prefix)/lib: libncurses*.* libcurses.a
In $(prefix)/share/terminfo: compiled terminal descriptions
In $(prefix)/include: C header files
@@ -105,12 +100,12 @@ INSTALLATION PROCEDURE:
Do not use commands such as
- make install prefix=XXX
+ 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
+ make install DESTDIR=XXX
See also the discussion of --with-install-prefix.
@@ -147,7 +142,7 @@ INSTALLATION PROCEDURE:
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.
+ various systems using libiconv, sometimes requiring libutf8.
If you configure using the --with-pthread option, a "t" is appended to
the library names (e.g., libncursest.a, libncursestw.a).
@@ -170,8 +165,8 @@ INSTALLATION PROCEDURE:
./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
+ of host system and compiler. We've been testing shared libraries on
+ several systems, but more work needs to be done to make shared libraries
work on other systems.
If you have libtool installed, you can type
@@ -338,6 +333,17 @@ SUMMARY OF CONFIGURE OPTIONS:
--disable-largefile
Disable compiler flags needed to use large-file interfaces.
+ --disable-libtool-version
+ when using --with-libtool, control how the major/minor version numbers
+ are used for constructing the library name.
+
+ The default uses the -version-number feature of libtool, which makes
+ the library names compatible (though not identical) with the standard
+ build using --with-shared.
+
+ Use --disable-libtool-version to use the libtool -version-info feature.
+ This corresponds to the setting used before patch 20100515.
+
--disable-leaks
For testing, compile-in code that frees memory that normally would not
be freed, to simplify analysis of memory-leaks.
@@ -389,6 +395,12 @@ SUMMARY OF CONFIGURE OPTIONS:
application. These are (for example $TERMINFO) those that allow the
search path for the terminfo or termcap entry to be customized.
+ --disable-rpath-hack
+ Normally the configure script helps link libraries found in unusual
+ places by adding an rpath option to the link command. If you are
+ building packages, this feature may be redundant. Use this option
+ to suppress the feature.
+
--disable-scroll-hints
Compile without scroll-hints code. This option is ignored when
hashmap scrolling is configured, which is the default.
@@ -421,7 +433,7 @@ SUMMARY OF CONFIGURE OPTIONS:
changes several data references to functions to work around this
problem.
- NOTE: With ncurses 5.1, this may not be necessary, since we are
+ 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
@@ -450,7 +462,7 @@ SUMMARY OF CONFIGURE OPTIONS:
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
+ 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
@@ -471,7 +483,7 @@ SUMMARY OF CONFIGURE OPTIONS:
encoded. This applies only to the wide-character (--enable-widec)
configuration.
- NOTE: using this option will make libraries which are not binary-
+ NOTE: using this option will make libraries which are not binary-
compatible with libncursesw 5.4. None of the interfaces change, but
applications which have an array of cchar_t's must be recompiled.
@@ -480,7 +492,7 @@ SUMMARY OF CONFIGURE OPTIONS:
That allows one to use ncurses with a wheel mouse with xterm or
similar X terminal emulators.
- NOTE: using this option will make libraries which are not binary-
+ NOTE: using this option will make libraries which are not binary-
compatible with libncursesw 5.4. None of the interfaces change, but
applications which have mouse mask mmask_t's must be recompiled.
@@ -500,7 +512,7 @@ SUMMARY OF CONFIGURE OPTIONS:
--enable-getcap-cache
Cache translated termcaps under the directory $HOME/.terminfo
- NOTE: this sounds good - it makes ncurses run faster the second time.
+ 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
@@ -513,6 +525,10 @@ SUMMARY OF CONFIGURE OPTIONS:
may not be accurate, or that your stty settings have disabled the use
of tabs.
+ --enable-interop
+ Compile-in experimental interop bindings. These provide generic types
+ for the form-library.
+
--enable-mixed-case
Controls whether the filesystem on which the terminfo database resides
supports mixed-case filenames (normal for UNIX, but not on other
@@ -525,6 +541,15 @@ SUMMARY OF CONFIGURE OPTIONS:
terminfo entries. This is the default, unless you have disabled the
extended functions.
+ --enable-pc-files
+ If pkg-config is found (see --with-pkg-config), generate ".pc" files
+ for each of the libraries, and install them in pkg-config's library
+ directory.
+
+ --enable-pthreads-eintr
+ add logic in threaded configuration to ensure that a read(2) system
+ call can be interrupted for SIGWINCH.
+
--enable-reentrant
Compile experimental configuration which improves reentrant use of the
library by reducing global and static variables. This option is also
@@ -565,6 +590,11 @@ SUMMARY OF CONFIGURE OPTIONS:
is not strictly compatible. This option allows one to implement this
alteration without patching the source code.
+ --enable-sp-funcs
+ Compile-in support for extended functions which accept a SCREEN pointer,
+ reducing the need for juggling the global SP value with set_term() and
+ delscreen().
+
--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
@@ -576,6 +606,11 @@ SUMMARY OF CONFIGURE OPTIONS:
capabilities as user-defined strings. This option is the default,
unless you have disabled the extended functions.
+ --enable-term-driver
+ Enable experimental terminal-driver. This is currently used for the
+ MinGW port, by providing a way to substitute the low-level terminfo
+ library with different terminal drivers.
+
--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
@@ -630,12 +665,23 @@ SUMMARY OF CONFIGURE OPTIONS:
--with-ada-objects=DIR
Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib)
+ --with-ada-sharedlib
+ Build a shared library for Ada95 binding, if the compiler permits.
+
+ NOTE: You must also set the --with-shared option on some platforms
+ for a successful build. You need not use this option when you set
+ --with-shared, unless you want to use the Ada shared library.
+
--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-cpp=XXX
+ This option is provided by the same macro used for $BUILD_CC, etc.,
+ but is not directly used by ncurses.
+
--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.
@@ -682,12 +728,17 @@ SUMMARY OF CONFIGURE OPTIONS:
to use a terminfo database which is compatible with the native
applications.
+ --with-ccharw-max=XXX
+ Override the size of the wide-character array in cchar_t structures.
+ Changing this will alter the binary interface. This defaults to 5.
+
--with-chtype=TYPE
Override type of chtype, which stores the video attributes and (if
--enable-widec is not given) a character. Prior to ncurses 5.5, this
was always unsigned long, but with ncurses 5.5, it may be unsigned.
Use this option if you need to preserve compatibility with 64-bit
- executables.
+ executables, e.g., by setting "--with-chtype=long" (the configure
+ script supplies "unsigned").
--with-database=XXX
Specify the terminfo source file to install. Usually you will wish
@@ -719,7 +770,7 @@ SUMMARY OF CONFIGURE OPTIONS:
use Alessandro Rubini's GPM library to provide mouse support on the
Linux console. Prior to ncurses 5.5, this introduced a dependency on
the GPM library.
-
+
Currently ncurses uses the dlsym() function to bind to the library at
runtime, so it is only necessary that the library be present when
ncurses is built, to obtain the filename (or soname) used in the
@@ -736,7 +787,7 @@ SUMMARY OF CONFIGURE OPTIONS:
Use a hashed database for storing terminfo data rather than storing
each compiled entry in a separate binary file within a directory
tree.
-
+
In particular, this uses the Berkeley database 1.8.5 interface, as
provided by that and its successors db 2, 3, and 4. The actual
interface is slightly different in the successor versions of the
@@ -770,7 +821,7 @@ SUMMARY OF CONFIGURE OPTIONS:
make install DESTDIR=XXX
since the makefiles pass that variable to subordinate makes.
- NOTE: a few systems build shared libraries with fixed pathnames; this
+ NOTE: a few systems build shared libraries with fixed pathnames; this
option probably will not work for those configurations.
--with-libtool[=XXX]
@@ -807,9 +858,9 @@ SUMMARY OF CONFIGURE OPTIONS:
--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
+ installing. Currently the only distribution which does this is 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
@@ -850,6 +901,9 @@ SUMMARY OF CONFIGURE OPTIONS:
those using termcap, do not use the higher speeds. Your application
(or system, in general) may or may not.
+ --with-pkg-config=[DIR]
+ Check for pkg-config, optionally specifying its path.
+
--with-profile
Generate profile-libraries These are named by adding "_p" to the root,
e.g., libncurses_p.a
@@ -873,7 +927,7 @@ SUMMARY OF CONFIGURE OPTIONS:
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
+ NOTE: Unless you override the configure script by setting the $CFLAGS
environment variable, these will not be built with the -g debugging
option.
@@ -885,7 +939,11 @@ SUMMARY OF CONFIGURE OPTIONS:
loads the system's copy of the ncurses shared libraries. In that
case, using the misc/shlib script may be helpful, since it sets
$LD_LIBRARY_PATH to point to the build tree, e.g.,
- ./misc/shlib make install
+ ./misc/shlib make install
+
+ NOTE: If you use the --with-ada-sharedlib option, you should also
+ set this option, to ensure that C-language modules needed for the
+ Ada binding use appropriate compiler options.
--with-shlib-version=XXX
Specify whether to use the release or ABI version for shared libraries.
@@ -946,6 +1004,17 @@ SUMMARY OF CONFIGURE OPTIONS:
For testing, compile with debug option.
This also sets the --disable-leaks option.
+ --with-wrap-prefix=XXX
+ When using the --enable-reentrant option, ncurses redefines variables
+ that would be global in curses, e.g., LINES, as a macro that calls a
+ "wrapping" function which fetches the data from the current SCREEN
+ structure. Normally that function is named by prepending "_nc_" to the
+ variable's name. The function is technically private (since portable
+ applications would not refer directly to it). But according to one
+ line of reasoning, it is not the same type of "private" as functions
+ which applications should not call even via a macro. This configure
+ option lets you choose the prefix for these wrapped variables.
+
--without-ada
Suppress the configure script's check for Ada95, do not build the
Ada95 binding and related demo.
@@ -975,11 +1044,18 @@ SUMMARY OF CONFIGURE OPTIONS:
--without-dlsym
Do not use dlsym() to load GPM dynamically.
+ --without-manpages
+ Tell the configure script to suppress the install of ncurses' manpages.
+
--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-tests
+ Tell the configure script to suppress the build of ncurses' test
+ programs.
+
--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
@@ -1001,6 +1077,60 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
you may encounter when building a system with different versions of
ncurses:
+ 5.8 (Feb 26, 2011)
+ Interface changes:
+
+ + add an alternate library configuration, i.e., "terminal driver" to
+ support port to Windows, built with MinGW. There are two drivers
+ (terminfo and Windows console). The terminfo driver works on other
+ platforms.
+
+ + add a new set of functions which accept a SCREEN* parameter, in
+ contrast with the original set which use the global value "sp".
+ By default, these names end with "_sp", and are otherwise
+ functionally identical with the originals.
+
+ In addition to the "_sp" functions, there are a few new functions
+ associated with this feature: ceiling_panel, ground_panel,
+ new_prescr.
+
+ If the library is not built with the sp-funcs extension, there
+ are no related interface changes.
+
+ + add tiparm function based on review of X/Open Curses Issue 7.
+
+ + change internal _nc_has_mouse function to public has_mouse function
+
+ Added extensions:
+
+ + add a few more functions to support the NCURSES_OPAQUE feature:
+ get_escdelay, is_pad, is_subwin
+
+ Added internal functions (other than "_sp" variants):
+ _nc_curscr_of
+ _nc_format_slks
+ _nc_get_alias_table
+ _nc_get_hash_info
+ _nc_insert_wch
+ _nc_newscr_of
+ _nc_outc_wrapper
+ _nc_retrace_char
+ _nc_retrace_int_attr_t
+ _nc_retrace_mmask_t
+ _nc_setup_tinfo
+ _nc_stdscr_of
+ _nc_tinfo_cmdch
+
+ Removed internal functions:
+ _nc_makenew (some configurations replace by _nc_makenew_sp)
+
+ Modified internal functions:
+ _nc_UpdateAttrs
+ _nc_get_hash_table
+ _nc_has_mouse
+ _nc_insert_ch
+ _nc_wgetch
+
5.7 (November 2, 2008)
Interface changes:
@@ -1011,7 +1141,7 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
of the ncurses library used for the tic program as well as some
others such as tack. There is no API change, but makefiles would be
changed to use the tic-library built separately.
-
+
tack, distributed separately from ncurses, uses some of the internal
_nc_XXX functions, which are declared in the tic.h header file.
@@ -1158,7 +1288,7 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
still used in this release to allow compiling with not-so-old
compilers.
- + form and menu libraries now work with wide-character data.
+ + form and menu libraries now work with wide-character data.
Applications which bypassed the form library and manipulated the
FIELD.buf data directly will not work properly with libformw, since
that no longer points to an array of char. The set_field_buffer()
@@ -1438,8 +1568,8 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
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
+ We bumped to version 4.0 because the newly released Linux dynamic
+ loader (ld.so.1.8.5) 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.
@@ -1496,10 +1626,10 @@ IF YOU ARE A SYSTEM INTEGRATOR:
Configuration and Installation:
- On platforms where ncurses is assumed to be installed in /usr/lib,
+ 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
+ GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
For other platforms, the default is "/usr/local". See the discussion
of the "--disable-overwrite" option.
@@ -1562,7 +1692,7 @@ IF YOU ARE A SYSTEM INTEGRATOR:
bsdos -- BSD/OS
If you are responsible for integrating ncurses for one of these
- distribution, please either use the recommended name or get back
+ distributions, 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.
@@ -1584,7 +1714,8 @@ CONFIGURING FALLBACK ENTRIES:
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. This must be done on a machine which
- has ncurses' infocmp and terminfo database installed.
+ has ncurses' infocmp and terminfo database installed (as well as
+ ncurses' tic and infocmp programs).
These entries are checked by setupterm() only when the conventional
fetches from the terminfo tree and the termcap fallback (if configured)
@@ -1689,8 +1820,8 @@ USING NCURSES WITH AFS:
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
+ Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
+ which is used with 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 into the
@@ -1735,6 +1866,10 @@ BUILDING NCURSES WITH A CROSS-COMPILER
option), ncurses uses the development platform's tic to do the
"make install.data" portion.
+ The system's tic program is used to install the terminal database,
+ even for cross-compiles. For best results, the tic program should
+ be from the most current version of ncurses.
+
BUGS:
Send any feedback to the ncurses mailing list at
bug-ncurses@gnu.org. To subscribe send mail to
diff --git a/MANIFEST b/MANIFEST
index db3871f2e11e..421cc678cd6b 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3,6 +3,10 @@
./Ada95/Makefile.in
./Ada95/README
./Ada95/TODO
+./Ada95/aclocal.m4
+./Ada95/configure
+./Ada95/configure.in
+./Ada95/doc/Makefile.in
./Ada95/gen/Makefile.in
./Ada95/gen/adacurses-config.in
./Ada95/gen/gen.c
@@ -23,6 +27,21 @@
./Ada95/gen/terminal_interface-curses-trace.ads.m4
./Ada95/gen/terminal_interface-curses.adb.m4
./Ada95/gen/terminal_interface-curses.ads.m4
+./Ada95/include/MKncurses_def.sh
+./Ada95/include/Makefile.in
+./Ada95/include/ncurses_cfg.hin
+./Ada95/include/ncurses_defs
+./Ada95/make-tar.sh
+./Ada95/mk-1st.awk
+./Ada95/package/AdaCurses-doc.spec
+./Ada95/package/AdaCurses.spec
+./Ada95/package/debian/compat
+./Ada95/package/debian/control
+./Ada95/package/debian/copyright
+./Ada95/package/debian/docs
+./Ada95/package/debian/rules
+./Ada95/package/debian/source/format
+./Ada95/package/debian/watch
./Ada95/samples/Makefile.in
./Ada95/samples/README
./Ada95/samples/explain.txt
@@ -109,6 +128,11 @@
./Ada95/samples/tour.adb
./Ada95/samples/tour.ads
./Ada95/src/Makefile.in
+./Ada95/src/c_varargs_to_ada.c
+./Ada95/src/c_varargs_to_ada.h
+./Ada95/src/library.gpr
+./Ada95/src/modules
+./Ada95/src/ncurses_compat.c
./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
@@ -172,6 +196,7 @@
./Makefile.os2
./NEWS
./README
+./README.MinGW
./README.emx
./TO-DO
./aclocal.m4
@@ -311,6 +336,7 @@
./doc/html/announce.html
./doc/html/hackguide.html
./doc/html/index.html
+./doc/html/man/adacurses-config.1.html
./doc/html/man/captoinfo.1m.html
./doc/html/man/clear.1.html
./doc/html/man/curs_add_wch.3x.html
@@ -350,6 +376,7 @@
./doc/html/man/curs_inwstr.3x.html
./doc/html/man/curs_kernel.3x.html
./doc/html/man/curs_legacy.3x.html
+./doc/html/man/curs_memleaks.3x.html
./doc/html/man/curs_mouse.3x.html
./doc/html/man/curs_move.3x.html
./doc/html/man/curs_opaque.3x.html
@@ -363,6 +390,7 @@
./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_sp_funcs.3x.html
./doc/html/man/curs_termattrs.3x.html
./doc/html/man/curs_termcap.3x.html
./doc/html/man/curs_terminfo.3x.html
@@ -370,6 +398,7 @@
./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_variables.3x.html
./doc/html/man/curs_window.3x.html
./doc/html/man/default_colors.3x.html
./doc/html/man/define_key.3x.html
@@ -395,6 +424,7 @@
./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_variables.3x.html
./doc/html/man/form_win.3x.html
./doc/html/man/index.html
./doc/html/man/infocmp.1m.html
@@ -427,10 +457,13 @@
./doc/html/man/mitem_value.3x.html
./doc/html/man/mitem_visible.3x.html
./doc/html/man/ncurses.3x.html
+./doc/html/man/ncurses5-config.1.html
./doc/html/man/panel.3x.html
./doc/html/man/resizeterm.3x.html
+./doc/html/man/tabs.1.html
./doc/html/man/term.5.html
./doc/html/man/term.7.html
+./doc/html/man/term_variables.3x.html
./doc/html/man/terminfo.5.html
./doc/html/man/tic.1m.html
./doc/html/man/toe.1m.html
@@ -479,12 +512,15 @@
./form/fty_alnum.c
./form/fty_alpha.c
./form/fty_enum.c
+./form/fty_generic.c
./form/fty_int.c
./form/fty_ipv4.c
./form/fty_num.c
./form/fty_regex.c
./form/headers
./form/llib-lform
+./form/llib-lformt
+./form/llib-lformtw
./form/llib-lformw
./form/modules
./include/Caps
@@ -507,16 +543,20 @@
./include/hashed_db.h
./include/headers
./include/nc_alloc.h
+./include/nc_mingw.h
./include/nc_panel.h
./include/nc_tparm.h
./include/ncurses_cfg.hin
./include/ncurses_defs
-./include/ncurses_dll.h
+./include/ncurses_dll.h.in
+./include/ncurses_mingw.h
./include/term_entry.h
./include/termcap.h.in
./include/tic.h
./include/unctrl.h.in
./install-sh
+./man/MKada_config.in
+./man/MKncu_config.in
./man/MKterminfo.sh
./man/Makefile.in
./man/captoinfo.1m
@@ -572,6 +612,7 @@
./man/curs_scr_dump.3x
./man/curs_scroll.3x
./man/curs_slk.3x
+./man/curs_sp_funcs.3x
./man/curs_termattrs.3x
./man/curs_termcap.3x
./man/curs_terminfo.3x
@@ -579,6 +620,7 @@
./man/curs_touch.3x
./man/curs_trace.3x
./man/curs_util.3x
+./man/curs_variables.3x
./man/curs_window.3x
./man/default_colors.3x
./man/define_key.3x
@@ -604,6 +646,7 @@
./man/form_post.3x
./man/form_requestname.3x
./man/form_userptr.3x
+./man/form_variables.3x
./man/form_win.3x
./man/infocmp.1m
./man/infotocap.1m
@@ -640,8 +683,10 @@
./man/ncurses.3x
./man/panel.3x
./man/resizeterm.3x
+./man/tabs.1
./man/term.5
./man/term.7
+./man/term_variables.3x
./man/terminfo.head
./man/terminfo.tail
./man/tic.1m
@@ -654,6 +699,8 @@
./menu/eti.h
./menu/headers
./menu/llib-lmenu
+./menu/llib-lmenut
+./menu/llib-lmenutw
./menu/llib-lmenuw
./menu/m_attribs.c
./menu/m_cursor.c
@@ -694,13 +741,12 @@
./misc/emx.src
./misc/form.def
./misc/form.ref
+./misc/gen-pkgconfig.in
./misc/gen_edit.sh
-./misc/jpf-indent
./misc/makedef.cmd
./misc/makellib
./misc/menu.def
./misc/menu.ref
-./misc/ncu-indent
./misc/ncurses-config.in
./misc/ncurses.def
./misc/ncurses.ref
@@ -718,8 +764,8 @@
./mk-0th.awk
./mk-1st.awk
./mk-2nd.awk
+./mk-dlls.sh.in
./mk-hdr.awk
-./mkdirs.sh
./ncurses/Makefile.in
./ncurses/README
./ncurses/README.IZ
@@ -748,6 +794,7 @@
./ncurses/base/lib_delch.c
./ncurses/base/lib_delwin.c
./ncurses/base/lib_dft_fgbg.c
+./ncurses/base/lib_driver.c
./ncurses/base/lib_echo.c
./ncurses/base/lib_endwin.c
./ncurses/base/lib_erase.c
@@ -813,10 +860,12 @@
./ncurses/base/version.c
./ncurses/base/vsscanf.c
./ncurses/base/wresize.c
+./ncurses/build.priv.h
./ncurses/curses.priv.h
./ncurses/fifo_defs.h
./ncurses/llib-lncurses
./ncurses/llib-lncursest
+./ncurses/llib-lncursestw
./ncurses/llib-lncursesw
./ncurses/modules
./ncurses/tinfo/MKcaptab.awk
@@ -863,6 +912,7 @@
./ncurses/tinfo/lib_tparm.c
./ncurses/tinfo/lib_tputs.c
./ncurses/tinfo/lib_ttyflags.c
+./ncurses/tinfo/make_hash.c
./ncurses/tinfo/make_keys.c
./ncurses/tinfo/name_match.c
./ncurses/tinfo/parse_entry.c
@@ -870,6 +920,7 @@
./ncurses/tinfo/read_termcap.c
./ncurses/tinfo/setbuf.c
./ncurses/tinfo/strings.c
+./ncurses/tinfo/tinfo_driver.c
./ncurses/tinfo/trim_sgr0.c
./ncurses/tinfo/use_screen.c
./ncurses/tinfo/write_entry.c
@@ -895,6 +946,7 @@
./ncurses/tty/tty_display.h
./ncurses/tty/tty_input.h
./ncurses/tty/tty_update.c
+./ncurses/wcwidth.h
./ncurses/widechar/charable.c
./ncurses/widechar/lib_add_wch.c
./ncurses/widechar/lib_box_set.c
@@ -915,9 +967,14 @@
./ncurses/widechar/lib_vline_set.c
./ncurses/widechar/lib_wacs.c
./ncurses/widechar/lib_wunctrl.c
+./ncurses/win32con/gettimeofday.c
+./ncurses/win32con/wcwidth.c
+./ncurses/win32con/win_driver.c
./panel/Makefile.in
./panel/headers
./panel/llib-lpanel
+./panel/llib-lpanelt
+./panel/llib-lpaneltw
./panel/llib-lpanelw
./panel/modules
./panel/p_above.c
@@ -947,11 +1004,12 @@
./progs/infocmp.c
./progs/modules
./progs/progs.priv.h
+./progs/tabs.c
./progs/tic.c
./progs/toe.c
./progs/tput.c
+./progs/transform.c
./progs/tset.c
-./tar-copy.sh
./test/Makefile.in
./test/README
./test/aclocal.m4
@@ -963,6 +1021,7 @@
./test/cardfile.c
./test/cardfile.dat
./test/chgat.c
+./test/clip_printw.c
./test/color_set.c
./test/configure
./test/configure.in
@@ -973,6 +1032,7 @@
./test/demo_menus.c
./test/demo_panels.c
./test/demo_termcap.c
+./test/demo_terminfo.c
./test/ditto.c
./test/dots.c
./test/dots_mvcur.c
@@ -990,19 +1050,30 @@
./test/inch_wide.c
./test/inchs.c
./test/ins_wide.c
+./test/insdelln.c
./test/inserts.c
./test/key_names.c
./test/keynames.c
./test/knight.c
+./test/linedata.h
./test/linux-color.dat
./test/listused.sh
./test/lrtest.c
+./test/make-tar.sh
./test/mk-test.awk
./test/modules
./test/movewindow.c
./test/ncurses.c
./test/ncurses_tst.hin
./test/newdemo.c
+./test/package/debian/compat
+./test/package/debian/control
+./test/package/debian/copyright
+./test/package/debian/docs
+./test/package/debian/rules
+./test/package/debian/source/format
+./test/package/debian/watch
+./test/package/ncurses-examples.spec
./test/programs
./test/railroad.c
./test/rain.c
@@ -1011,6 +1082,10 @@
./test/savescreen.sh
./test/tclock.c
./test/test.priv.h
+./test/test_add_wchstr.c
+./test/test_addchstr.c
+./test/test_addstr.c
+./test/test_addwstr.c
./test/test_arrays.c
./test/test_get_wstr.c
./test/test_getstr.c
@@ -1026,4 +1101,5 @@
./test/worm.c
./test/xmas.c
./test/xterm-16color.dat
+./test/xterm-256color.dat
./test/xterm-88color.dat
diff --git a/Makefile.in b/Makefile.in
index cb8cd422cc49..d891e002fd83 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.24 2005/01/29 19:30:06 tom Exp $
+# $Id: Makefile.in,v 1.30 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -32,6 +32,7 @@
# Master Makefile for ncurses library.
SHELL = /bin/sh
+VPATH = @srcdir@
DESTDIR=@DESTDIR@
CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)"
@@ -42,6 +43,9 @@ NCURSES_MAJOR = @NCURSES_MAJOR@
NCURSES_MINOR = @NCURSES_MINOR@
NCURSES_PATCH = @NCURSES_PATCH@
+top_srcdir = @top_srcdir@
+srcdir = @srcdir@
+
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -83,6 +87,13 @@ preinstall :
fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \
echo '** Will overwrite non-ncurses curses.h'
+dlls: libs
+ $(SHELL) $(srcdir)/mk-dlls.sh
+
+distclean \
+realclean ::
+ -rm -f mk-dlls.sh mingw_arch
+
# Put the common rules here so that we can easily construct the list of
# directories to visit.
all \
diff --git a/NEWS b/NEWS
index a64450b30228..e8f9cefbabdd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
--- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $
+-- $Id: NEWS,v 1.1682 2011/04/04 00:02:42 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,1076 @@ See the AUTHORS file for the corresponding full names.
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20110404 5.9 release for upload to ftp.gnu.org
+
+20110402
+ + various build-fixes for the rpm/dpkg scripts.
+ + add "--enable-rpath-link" option to Ada95/configure, to allow
+ packages to suppress the rpath feature which is normally used for
+ the in-tree build of sample programs.
+ + corrected definition of libdir variable in Ada95/src/Makefile.in,
+ needed for rpm script.
+ + add "--with-shared" option to Ada95/configure script, to allow
+ making the C-language parts of the binding use appropriate compiler
+ options if building a shared library with gnat.
+
+20110329
+ > portability fixes for Ada95 binding:
+ + add configure check to ensure that SIGINT works with gnat. This is
+ needed for the "rain" sample program. If SIGINT does not work, omit
+ that sample program.
+ + correct typo in check of $PKG_CONFIG variable in Ada95/configure
+ + add ncurses_compat.c, to supply functions used in the Ada95 binding
+ which were added in 5.7 and later.
+ + modify sed expression in CF_NCURSES_ADDON to eliminate a dependency
+ upon GNU sed.
+
+20110326
+ + add special check in Ada95/configure script for ncurses6 reentrant
+ code.
+ + regen Ada html documentation.
+ + build-fix for Ada shared libraries versus the varargs workaround.
+ + add rpm and dpkg scripts for Ada95 and test directories, for test
+ builds.
+ + update test/configure macros CF_CURSES_LIBS, CF_XOPEN_SOURCE and
+ CF_X_ATHENA_LIBS.
+ + add configure check to determine if gnat's project feature supports
+ libraries, i.e., collections of .ali files.
+ + make all dereferences in Ada95 samples explicit.
+ + fix typo in comment in lib_add_wch.c (patch by Petr Pavlu).
+ + add configure check for, ifdef's for math.h which is in a separate
+ package on Solaris and potentially not installed (report by Petr
+ Pavlu).
+ > fixes for Ada95 binding (Nicolas Boulenguez):
+ + improve type-checking in Ada95 by eliminating a few warning-suppress
+ pragmas.
+ + suppress unreferenced warnings.
+ + make all dereferences in binding explicit.
+
+20110319
+ + regen Ada html documentation.
+ + change order of -I options from ncurses*-config script when the
+ --disable-overwrite option was used, so that the subdirectory include
+ is listed first.
+ + modify the make-tar.sh scripts to add a MANIFEST and NEWS file.
+ + modify configure script to provide value for HTML_DIR in
+ Ada95/gen/Makefile.in, which depends on whether the Ada95 binding is
+ distributed separately (report by Nicolas Boulenguez).
+ + modify configure script to add -g and/or -O3 to ADAFLAGS if the
+ CFLAGS for the build has these options.
+ + amend change from 20070324, to not add 1 to the result of getmaxx
+ and getmaxy in the Ada binding (report by Nicolas Boulenguez for
+ thread in comp.lang.ada).
+ + build-fix Ada95/samples for gnat 4.5
+ + spelling fixes for Ada95/samples/explain.txt
+ > fixes for Ada95 binding (Nicolas Boulenguez):
+ + add item in Trace_Attribute_Set corresponding to TRACE_ATTRS.
+ + add workaround for binding to set_field_type(), which uses varargs.
+ The original binding from 990220 relied on the prevalent
+ implementation of varargs which did not support or need va_copy().
+ + add dependency on gen/Makefile.in needed for *-panels.ads
+ + add Library_Options to library.gpr
+ + add Languages to library.gpr, for gprbuild
+
+20110307
+ + revert changes to limit-checks from 20110122 (Debian #616711).
+ > minor type-cleanup of Ada95 binding (Nicolas Boulenguez):
+ + corrected a minor sign error in a field of Low_Level_Field_Type, to
+ conform to form.h.
+ + replaced C_Int by Curses_Bool as return type for some callbacks, see
+ fieldtype(3FORM).
+ + modify samples/sample-explain.adb to provide explicit message when
+ explain.txt is not found.
+
+20110305
+ + improve makefiles for Ada95 tree (patch by Nicolas Boulenguez).
+ + fix an off-by-one error in _nc_slk_initialize() from 20100605 fixes
+ for compiler warnings (report by Nicolas Boulenguez).
+ + modify Ada95/gen/gen.c to declare unused bits in generated layouts,
+ needed to compile when chtype is 64-bits using gnat 4.4.5
+
+20110226 5.8 release for upload to ftp.gnu.org
+
+20110226
+ + update release notes, for 5.8.
+ + regenerated html manpages.
+ + change open() in _nc_read_file_entry() to fopen() for consistency
+ with write_file().
+ + modify misc/run_tic.in to create parent directory, in case this is
+ a new install of hashed database.
+ + fix typo in Ada95/mk-1st.awk which causes error with original awk.
+
+20110220
+ + configure script rpath fixes from xterm #269.
+ + workaround for cygwin's non-functional features.h, to force ncurses'
+ configure script to define _XOPEN_SOURCE_EXTENDED when building
+ wide-character configuration.
+ + build-fix in run_tic.sh for OS/2 EMX install
+ + add cons25-debian entry (patch by Brian M Carlson, Debian #607662).
+
+20110212
+ + regenerated html manpages.
+ + use _tracef() in show_where() function of tic, to work correctly with
+ special case of trace configuration.
+
+20110205
+ + add xterm-utf8 entry as a demo of the U8 feature -TD
+ + add U8 feature to denote entries for terminal emulators which do not
+ support VT100 SI/SO when processing UTF-8 encoding -TD
+ + improve the NCURSES_NO_UTF8_ACS feature by adding a check for an
+ extended terminfo capability U8 (prompted by mailing list
+ discussion).
+
+20110122
+ + start documenting interface changes for upcoming 5.8 release.
+ + correct limit-checks in derwin().
+ + correct limit-checks in newwin(), to ensure that windows have nonzero
+ size (report by Garrett Cooper).
+ + fix a missing "weak" declaration for pthread_kill (patch by Nicholas
+ Alcock).
+ + improve documentation of KEY_ENTER in curs_getch.3x manpage (prompted
+ by discussion with Kevin Martin).
+
+20110115
+ + modify Ada95/configure script to make the --with-curses-dir option
+ work without requiring the --with-ncurses option.
+ + modify test programs to allow them to be built with NetBSD curses.
+ + document thick- and double-line symbols in curs_add_wch.3x manpage.
+ + document WACS_xxx constants in curs_add_wch.3x manpage.
+ + fix some warnings for clang 2.6 "--analyze"
+ + modify Ada95 makefiles to make html-documentation with the project
+ file configuration if that is used.
+ + update config.guess, config.sub
+
+20110108
+ + regenerated html manpages.
+ + minor fixes to enable lint when trace is not enabled, e.g., with
+ clang --analyze.
+ + fix typo in man/default_colors.3x (patch by Tim van der Molen).
+ + update ncurses/llib-lncurses*
+
+20110101
+ + fix remaining strict compiler warnings in ncurses library ABI=5,
+ except those dealing with function pointers, etc.
+
+20101225
+ + modify nc_tparm.h, adding guards against repeated inclusion, and
+ allowing TPARM_ARG to be overridden.
+ + fix some strict compiler warnings in ncurses library.
+
+20101211
+ + suppress ncv in screen entry, allowing underline (patch by Alejandro
+ R Sedeno).
+ + also suppress ncv in konsole-base -TD
+ + fixes in wins_nwstr() and related functions to ensure that special
+ characters, i.e., control characters are handled properly with the
+ wide-character configuration.
+ + correct a comparison in wins_nwstr() (Redhat #661506).
+ + correct help-messages in some of the test-programs, which still
+ referred to quitting with 'q'.
+
+20101204
+ + add special case to _nc_infotocap() to recognize the setaf/setab
+ strings from xterm+256color and xterm+88color, and provide a reduced
+ version which works with termcap.
+ + remove obsolete emacs "Local Variables" section from documentation
+ (request by Sven Joachim).
+ + update doc/html/index.html to include NCURSES-Programming-HOWTO.html
+ (report by Sven Joachim).
+
+20101128
+ + modify test/configure and test/Makefile.in to handle this special
+ case of building within a build-tree (Debian #34182):
+ mkdir -p build && cd build && ../test/configure && make
+
+20101127
+ + miscellaneous build-fixes for Ada95 and test-directories when built
+ out-of-tree.
+ + use VPATH in makefiles to simplify out-of-tree builds (Debian #34182).
+ + fix typo in rmso for tek4106 entry -Goran Weinholt
+
+20101120
+ + improve checks in test/configure for X libraries, from xterm #267
+ changes.
+ + modify test/configure to allow it to use the build-tree's libraries
+ e.g., when using that to configure the test-programs without the
+ rpath feature (request by Sven Joachim).
+ + repurpose "gnome" terminfo entries as "vte", retaining "gnome" items
+ for compatibility, but generally deprecating those since the VTE
+ library is what actually defines the behavior of "gnome", etc.,
+ since 2003 -TD
+
+20101113
+ + compiler warning fixes for test programs.
+ + various build-fixes for test-programs with pdcurses.
+ + updated configure checks for X packages in test/configure from xterm
+ #267 changes.
+ + add configure check to gnatmake, to accommodate cygwin.
+
+20101106
+ + correct list of sub-directories needed in Ada95 tree for building as
+ a separate package.
+ + modify scripts in test-directory to improve builds as a separate
+ package.
+
+20101023
+ + correct parsing of relative tab-stops in tabs program (report by
+ Philip Ganchev).
+ + adjust configure script so that "t" is not added to library suffix
+ when weak-symbols are used, allowing the pthread configuration to
+ more closely match the non-thread naming (report by Werner Fink).
+ + modify configure check for tic program, used for fallbacks, to a
+ warning if not found. This makes it simpler to use additonal
+ scripts to bootstrap the fallbacks code using tic from the build
+ tree (report by Werner Fink).
+ + fix several places in configure script using ${variable-value} form.
+ + modify configure macro CF_LDFLAGS_STATIC to accommodate some loaders
+ which do not support selectively linking against static libraries
+ (report by John P. Hartmann)
+ + fix an unescaped dash in man/tset.1 (report by Sven Joachim).
+
+20101009
+ + correct comparison used for setting 16-colors in linux-16color
+ entry (Novell #644831) -TD
+ + improve linux-16color entry, using "dim" for color-8 which makes it
+ gray rather than black like color-0 -TD
+ + drop misc/ncu-indent and misc/jpf-indent; they are provided by an
+ external package "cindent".
+
+20101002
+ + improve linkages in html manpages, adding references to the newer
+ pages, e.g., *_variables, curs_sp_funcs, curs_threads.
+ + add checks in tic for inconsistent cursor-movement controls, and for
+ inconsistent printer-controls.
+ + fill in no-parameter forms of cursor-movement where a parameterized
+ form is available -TD
+ + fill in missing cursor controls where the form of the controls is
+ ANSI -TD
+ + fix inconsistent punctuation in form_variables manpage (patch by
+ Sven Joachim).
+ + add parameterized cursor-controls to linux-basic (report by Dae) -TD
+ > patch by Juergen Pfeifer:
+ + document how to build 32-bit libraries in README.MinGW
+ + fixes to filename computation in mk-dlls.sh.in
+ + use POSIX locale in mk-dlls.sh.in rather than en_US (report by Sven
+ Joachim).
+ + add a check in mk-dlls.sh.in to obtain the size of a pointer to
+ distinguish between 32-bit and 64-bit hosts. The result is stored
+ in mingw_arch
+
+20100925
+ + add "XT" capability to entries for terminals that support both
+ xterm-style mouse- and title-controls, for "screen" which
+ special-cases TERM beginning with "xterm" or "rxvt" -TD
+ > patch by Juergen Pfeifer:
+ + use 64-Bit MinGW toolchain (recommended package from TDM, see
+ README.MinGW).
+ + support pthreads when using the TDM MinGW toolchain
+
+20100918
+ + regenerated html manpages.
+ + minor fixes for symlinks to curs_legacy.3x and curs_slk.3x manpages.
+ + add manpage for sp-funcs.
+ + add sp-funcs to test/listused.sh, for documentation aids.
+
+20100911
+ + add manpages for summarizing public variables of curses-, terminfo-
+ and form-libraries.
+ + minor fixes to manpages for consistency (patch by Jason McIntyre).
+ + modify tic's -I/-C dump to reformat acsc strings into canonical form
+ (sorted, unique mapping) (cf: 971004).
+ + add configure check for pthread_kill(), needed for some old
+ platforms.
+
+20100904
+ + add configure option --without-tests, to suppress building test
+ programs (request by Frederic L W Meunier).
+
+20100828
+ + modify nsterm, xnuppc and tek4115 to make sgr/sgr0 consistent -TD
+ + add check in terminfo source-reader to provide more informative
+ message when someone attempts to run tic on a compiled terminal
+ description (prompted by Debian #593920).
+ + note in infotocap and captoinfo manpages that they read terminal
+ descriptions from text-files (Debian #593920).
+ + improve acsc string for vt52, show arrow keys (patch by Benjamin
+ Sittler).
+
+20100814
+ + document in manpages that "mv" functions first use wmove() to check
+ the window pointer and whether the position lies within the window
+ (suggested by Poul-Henning Kamp).
+ + fixes to curs_color.3x, curs_kernel.3x and wresize.3x manpages (patch
+ by Tim van der Molen).
+ + modify configure script to transform library names for tic- and
+ tinfo-libraries so that those build properly with Mac OS X shared
+ library configuration.
+ + modify configure script to ensure that it removes conftest.dSYM
+ directory leftover on checks with Mac OS X.
+ + modify configure script to cleanup after check for symbolic links.
+
+20100807
+ + correct a typo in mk-1st.awk (patch by Gabriele Balducci)
+ (cf: 20100724)
+ + improve configure checks for location of tic and infocmp programs
+ used for installing database and for generating fallback data,
+ e.g., for cross-compiling.
+ + add Markus Kuhn's wcwidth function for compiling MinGW
+ + add special case to CF_REGEX for cross-compiling to MinGW target.
+
+20100731
+ + modify initialization check for win32con driver to eliminate need for
+ special case for TERM "unknown", using terminal database if available
+ (prompted by discussion with Roumen Petrov).
+ + for MinGW port, ensure that terminal driver is setup if tgetent()
+ is called (patch by Roumen Petrov).
+ + document tabs "-0" and "-8" options in manpage.
+ + fix Debian "lintian" issues with manpages reported in
+ http://lintian.debian.org/full/csmall@debian.org.html#ncurses
+
+20100724
+ + add a check in tic for missing set_tab if clear_all_tabs given.
+ + improve use of symbolic links in makefiles by using "-f" option if
+ it is supported, to eliminate temporary removal of the target
+ (prompted by http://www.t2-project.org/packages/ncurses.html)
+ + minor improvement to test/ncurses.c, reset color pairs in 'd' test
+ after exit from 'm' main-menu command.
+ + improved ncu-indent, from mawk changes, allows more than one of
+ GCC_NORETURN, GCC_PRINTFLIKE and GCC_SCANFLIKE on a single line.
+
+20100717
+ + add hard-reset for rs2 to wsvt25 to help ensure that reset ends
+ the alternate character set (patch by Nicholas Marriott)
+ + remove tar-copy.sh and related configure/Makefile chunks, since the
+ Ada95 binding is now installed using rules in Ada95/src.
+
+20100703
+ + continue integrating changes to use gnatmake project files in Ada95
+ + add/use configure check to turn on project rules for Ada95/src.
+ + revert the vfork change from 20100130, since it does not work.
+
+20100626
+ + continue integrating changes to use gnatmake project files in Ada95
+ + old gnatmake (3.15) does not produce libraries using project-file;
+ work around by adding script to generate alternate makefile.
+
+20100619
+ + continue integrating changes to use gnatmake project files in Ada95
+ + add configure --with-ada-sharedlib option, for the test_make rule.
+ + move Ada95-related logic into aclocal.m4, since additional checks
+ will be needed to distinguish old/new implementations of gnat.
+
+20100612
+ + start integrating changes to use gnatmake project files in Ada95 tree
+ + add test_make / test_clean / test_install rules in Ada95/src
+ + change install-path for adainclude directory to /usr/share/ada (was
+ /usr/lib/ada).
+ + update Ada95/configure.
+ + add mlterm+256color entry, for mlterm 3.0.0 -TD
+ + modify test/configure to use macros to ensure consistent order
+ of updating LIBS variable.
+
+20100605
+ + change search order of options for Solaris in CF_SHARED_OPTS, to
+ work with 64-bit compiles.
+ + correct quoting of assignment in CF_SHARED_OPTS case for aix
+ (cf: 20081227)
+
+20100529
+ + regenerated html documentation.
+ + modify test/configure to support pkg-config for checking X libraries
+ used by PDCurses.
+ + add/use configure macro CF_ADD_LIB to force consistency of
+ assignments to $LIBS, etc.
+ + fix configure script for combining --with-pthread
+ and --enable-weak-symbols options.
+
+20100522
+ + correct cross-compiling configure check for CF_MKSTEMP macro, by
+ adding a check cache variable set by AC_CHECK_FUNC (report by
+ Pierre Labastie).
+ + simplify include-dependencies of make_hash and make_keys, to reduce
+ the need for setting BUILD_CPPFLAGS in cross-compiling when the
+ build- and target-machines differ.
+ + repair broken-linker configuration by restoring a definition of SP
+ variable to curses.priv.h, and adjusting for cases where sp-funcs
+ are used.
+ + improve configure macro CF_AR_FLAGS, allowing ARFLAGS environment
+ variable to override (prompted by report by Pablo Cazallas).
+
+20100515
+ + add configure option --enable-pthreads-eintr to control whether the
+ new EINTR feature is enabled.
+ + modify logic in pthread configuration to allow EINTR to interrupt
+ a read operation in wgetch() (Novell #540571, patch by Werner Fink).
+ + drop mkdirs.sh, use "mkdir -p".
+ + add configure option --disable-libtool-version, to use the
+ "-version-number" feature which was added in libtool 1.5 (report by
+ Peter Haering). The default value for the option uses the newer
+ feature, which makes libraries generated using libtool compatible
+ with the standard builds of ncurses.
+ + updated test/configure to match configure script macros.
+ + fixes for configure script from lynx changes:
+ + improve CF_FIND_LINKAGE logic for the case where a function is
+ found in predefined libraries.
+ + revert part of change to CF_HEADER (cf: 20100424)
+
+20100501
+ + correct limit-check in wredrawln, accounting for begy/begx values
+ (patch by David Benjamin).
+ + fix most compiler warnings from clang.
+ + amend build-fix for OpenSolaris, to ensure that a system header is
+ included in curses.h before testing feature symbols, since they
+ may be defined by that route.
+
+20100424
+ + fix some strict compiler warnings in ncurses library.
+ + modify configure macro CF_HEADER_PATH to not look for variations in
+ the predefined include directories.
+ + improve configure macros CF_GCC_VERSION and CF_GCC_WARNINGS to work
+ with gcc 4.x's c89 alias, which gives warning messages for cases
+ where older versions would produce an error.
+
+20100417
+ + modify _nc_capcmp() to work with cancelled strings.
+ + correct translation of "^" in _nc_infotocap(), used to transform
+ terminfo to termcap strings
+ + add configure --disable-rpath-hack, to allow disabling the feature
+ which adds rpath options for libraries in unusual places.
+ + improve CF_RPATH_HACK_2 by checking if the rpath option for a given
+ directory was already added.
+ + improve CF_RPATH_HACK_2 by using ldd to provide a standard list of
+ directories (which will be ignored).
+
+20100410
+ + improve win_driver.c handling of mouse:
+ + discard motion events
+ + avoid calling _nc_timed_wait when there is a mouse event
+ + handle 4th and "rightmost" buttons.
+ + quote substitutions in CF_RPATH_HACK_2 configure macro, needed for
+ cases where there are embedded blanks in the rpath option.
+
+20100403
+ + add configure check for exctags vs ctags, to work around pkgsrc.
+ + simplify logic in _nc_get_screensize() to make it easier to see how
+ environment variables may override system- and terminfo-values
+ (prompted by discussion with Igor Bujna).
+ + make debug-traces for COLOR_PAIR and PAIR_NUMBER less verbose.
+ + improve handling of color-pairs embedded in attributes for the
+ extended-colors configuration.
+ + modify MKlib_gen.sh to build link_test with sp-funcs.
+ + build-fixes for OpenSolaris aka Solaris 11, for wide-character
+ configuration as well as for rpath feature in *-config scripts.
+
+20100327
+ + refactor CF_SHARED_OPTS configure macro, making CF_RPATH_HACK more
+ reusable.
+ + improve configure CF_REGEX, similar fixes.
+ + improve configure CF_FIND_LINKAGE, adding add check between system
+ (default) and explicit paths, where we can find the entrypoint in the
+ given library.
+ + add check if Gpm_Open() returns a -2, e.g., for "xterm". This is
+ normally suppressed but can be overridden using $NCURSES_GPM_TERMS.
+ Ensure that Gpm_Close() is called in this case.
+
+20100320
+ + rename atari and st52 terminfo entries to atari-old, st52-old, use
+ newer entries from FreeMiNT by Guido Flohr (from patch/report by Alan
+ Hourihane).
+
+20100313
+ + modify install-rule for manpages so that *-config manpages will
+ install when building with --srcdir (report by Sven Joachim).
+ + modify CF_DISABLE_LEAKS configure macro so that the --enable-leaks
+ option is not the same as --disable-leaks (GenToo #305889).
+ + modify #define's for build-compiler to suppress cchar_t symbol from
+ compile of make_hash and make_keys, improving cross-compilation of
+ ncursesw (report by Bernhard Rosenkraenzer).
+ + modify CF_MAN_PAGES configure macro to replace all occurrences of
+ TPUT in tput.1's manpage (Debian #573597, report/analysis by Anders
+ Kaseorg).
+
+20100306
+ + generate manpages for the *-config scripts, adapted from help2man
+ (suggested by Sven Joachim).
+ + use va_copy() in _nc_printf_string() to avoid conflicting use of
+ va_list value in _nc_printf_length() (report by Wim Lewis).
+
+20100227
+ + add Ada95/configure script, to use in tar-file created by
+ Ada95/make-tar.sh
+ + fix typo in wresize.3x (patch by Tim van der Molen).
+ + modify screen-bce.XXX entries to exclude ech, since screen's color
+ model does not clear with color for that feature -TD
+
+20100220
+ + add make-tar.sh scripts to Ada95 and test subdirectories to help with
+ making those separately distributable.
+ + build-fix for static libraries without dlsym (Debian #556378).
+ + fix a syntax error in man/form_field_opts.3x (patch by Ingo
+ Schwarze).
+
+20100213
+ + add several screen-bce.XXX entries -TD
+
+20100206
+ + update mrxvt terminfo entry -TD
+ + modify win_driver.c to support mouse single-clicks.
+ + correct name for termlib in ncurses*-config, e.g., if it is renamed
+ to provide a single file for ncurses/ncursesw libraries (patch by
+ Miroslav Lichvar).
+
+20100130
+ + use vfork in test/ditto.c if available (request by Mike Frysinger).
+ + miscellaneous cleanup of manpages.
+ + fix typo in curs_bkgd.3x (patch by Tim van der Molen).
+ + build-fix for --srcdir (patch by Miroslav Lichvar).
+
+20100123
+ + for term-driver configuration, ensure that the driver pointer is
+ initialized in setupterm so that terminfo/termcap programs work.
+ + amend fix for Debian #542031 to ensure that wattrset() returns only
+ OK or ERR, rather than the attribute value (report by Miroslav
+ Lichvar).
+ + reorder WINDOWLIST to put WINDOW data after SCREEN pointer, making
+ _nc_screen_of() compatible between normal/wide libraries again (patch
+ by Miroslav Lichvar)
+ + review/fix include-dependencies in modules files (report by Miroslav
+ Lichvar).
+
+20100116
+ + modify win_driver.c to initialize acs_map for win32 console, so
+ that line-drawing works.
+ + modify win_driver.c to initialize TERMINAL struct so that programs
+ such as test/lrtest.c and test/ncurses.c which test string
+ capabilities can run.
+ + modify term-driver modules to eliminate forward-reference
+ declarations.
+
+20100109
+ + modify configure macro CF_XOPEN_SOURCE, etc., to use CF_ADD_CFLAGS
+ consistently to add new -D's while removing duplicates.
+ + modify a few configure macros to consistently put new options
+ before older in the list.
+ + add tiparm(), based on review of X/Open Curses Issue 7.
+ + minor documentation cleanup.
+ + update config.guess, config.sub from
+ http://savannah.gnu.org/projects/config
+ (caveat - its maintainer put 2010 copyright date on files dated 2009)
+
+20100102
+ + minor improvement to tic's checking of similar SGR's to allow for the
+ most common case of SGR 0.
+ + modify getmouse() to act as its documentation implied, returning on
+ each call the preceding event until none are left. When no more
+ events remain, it will return ERR.
+
+20091227
+ + change order of lookup in progs/tput.c, looking for terminfo data
+ first. This fixes a confusion between termcap "sg" and terminfo
+ "sgr" or "sgr0", originally from 990123 changes, but exposed by
+ 20091114 fixes for hashing. With this change, only "dl" and "ed" are
+ ambiguous (Mandriva #56272).
+
+20091226
+ + add bterm terminfo entry, based on bogl 0.1.18 -TD
+ + minor fix to rxvt+pcfkeys terminfo entry -TD
+ + build-fixes for Ada95 tree for gnat 4.4 "style".
+
+20091219
+ + remove old check in mvderwin() which prevented moving a derived
+ window whose origin happened to coincide with its parent's origin
+ (report by Katarina Machalkova).
+ + improve test/ncurses.c to put mouse droppings in the proper window.
+ + update minix terminfo entry -TD
+ + add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
+
+20091212
+ + correct transfer of multicolumn characters in multirow
+ field_buffer(), which stopped at the end of the first row due to
+ filling of unused entries in a cchar_t array with nulls.
+ + updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta)
+ + modify _nc_viscbuf2() and _tracecchar_t2() to show wide-character
+ nulls.
+ + use strdup() in set_menu_mark(), restore .marklen struct member on
+ failure.
+ + eliminate clause 3 from the UCB copyrights in read_termcap.c and
+ tset.c per
+ ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+ (patch by Nicholas Marriott).
+ + replace a malloc in tic.c with strdup, checking for failure (patch by
+ Nicholas Marriott).
+ + update config.guess, config.sub from
+ http://savannah.gnu.org/projects/config
+
+20091205
+ + correct layout of working window used to extract data in
+ wide-character configured by set_field_buffer (patch by Rafael
+ Garrido Fernandez)
+ + improve some limit-checks related to filename length in reading and
+ writing terminfo entries.
+ + ensure that filename is always filled in when attempting to read
+ a terminfo entry, so that infocmp can report the filename (patch
+ by Nicholas Marriott).
+
+20091128
+ + modify mk-1st.awk to allow tinfo library to be built when term-driver
+ is enabled.
+ + add error-check to configure script to ensure that sp-funcs is
+ enabled if term-driver is, since some internal interfaces rely upon
+ this.
+
+20091121
+ + fix case where progs/tput is used while sp-funcs is configure; this
+ requires save/restore of out-character function from _nc_prescreen
+ rather than the SCREEN structure (report by Charles Wilson).
+ + fix typo in man/curs_trace.3x which caused incorrect symbolic links
+ + improved configure macros CF_GCC_ATTRIBUTES, CF_PROG_LINT.
+
+20091114
+
+ + updated man/curs_trace.3x
+ + limit hashing for termcap-names to 2-characters (Ubuntu #481740).
+ + change a variable name in lib_newwin.c to make it clearer which
+ value is being freed on error (patch by Nicholas Marriott).
+
+20091107
+ + improve test/ncurses.c color-cycling test by reusing attribute-
+ and color-cycling logic from the video-attributes screen.
+ + add ifdef'd with NCURSES_INTEROP_FUNCS experimental bindings in form
+ library which help make it compatible with interop applications
+ (patch by Juergen Pfeifer).
+ + add configure option --enable-interop, for integrating changes
+ for generic/interop support to form-library by Juergen Pfeifer
+
+20091031
+ + modify use of $CC environment variable which is defined by X/Open
+ as a curses feature, to ignore it if it is not a single character
+ (prompted by discussion with Benjamin C W Sittler).
+ + add START_TRACE in slk_init
+ + fix a regression in _nc_ripoffline which made test/ncurses.c not show
+ soft-keys, broken in 20090927 merging.
+ + change initialization of "hidden" flag for soft-keys from true to
+ false, broken in 20090704 merging (Ubuntu #464274).
+ + update nsterm entries (patch by Benjamin C W Sittler, prompted by
+ discussion with Fabian Groffen in GenToo #206201).
+ + add test/xterm-256color.dat
+
+20091024
+ + quiet some pedantic gcc warnings.
+ + modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a
+ SIGWINCH, and discard that value, to avoid confusing application
+ (patch by Eygene Ryabinkin, FreeBSD bin/136223).
+
+20091017
+ + modify handling of $PKG_CONFIG_LIBDIR to use only the first item in
+ a possibly colon-separated list (Debian #550716).
+
+20091010
+ + supply a null-terminator to buffer in _nc_viswibuf().
+ + fix a sign-extension bug in unget_wch() (report by Mike Gran).
+ + minor fixes to error-returns in default function for tputs, as well
+ as in lib_screen.c
+
+20091003
+ + add WACS_xxx definitions to wide-character configuration for thick-
+ and double-lines (discussion with Slava Zanko).
+ + remove unnecessary kcan assignment to ^C from putty (Sven Joachim)
+ + add ccc and initc capabilities to xterm-16color -TD
+ > patch by Benjamin C W Sittler:
+ + add linux-16color
+ + correct initc capability of linux-c-nc end-of-range
+ + similar change for dg+ccc and dgunix+ccc
+
+20090927
+ + move leak-checking for comp_captab.c into _nc_leaks_tinfo() since
+ that module since 20090711 is in libtinfo.
+ + add configure option --enable-term-driver, to allow compiling with
+ terminal-driver. That is used in MinGW port, and (being somewhat
+ more complicated) is an experimental alternative to the conventional
+ termlib internals. Currently, it requires the sp-funcs feature to
+ be enabled.
+ + completed integrating "sp-funcs" by Juergen Pfeifer in ncurses
+ library (some work remains for forms library).
+
+20090919
+ + document return code from define_key (report by Mike Gran).
+ + make some symbolic links in the terminfo directory-tree shorter
+ (patch by Daniel Jacobowitz, forwarded by Sven Joachim).).
+ + fix some groff warnings in terminfo.5, etc., from recent Debian
+ changes.
+ + change ncv and op capabilities in sun-color terminfo entry to match
+ Sun's entry for this (report by Laszlo Peter).
+ + improve interix smso terminfo capability by using reverse rather than
+ bold (report by Kristof Zelechovski).
+
+20090912
+ + add some test programs (and make these use the same special keys
+ by sharing linedata.h functions):
+ test/test_addstr.c
+ test/test_addwstr.c
+ test/test_addchstr.c
+ test/test_add_wchstr.c
+ + correct internal _nc_insert_ch() to use _nc_insert_wch() when
+ inserting wide characters, since the wins_wch() function that it used
+ did not update the cursor position (report by Ciprian Craciun).
+
+20090906
+ + fix typo s/is_timeout/is_notimeout/ which made "man is_notimeout" not
+ work.
+ + add null-pointer checks to other opaque-functions.
+ + add is_pad() and is_subwin() functions for opaque access to WINDOW
+ (discussion with Mark Dickinson).
+ + correct merge to lib_newterm.c, which broke when sp-funcs was
+ enabled.
+
+20090905
+ + build-fix for building outside source-tree (report by Sven Joachim).
+ + fix Debian lintian warning for man/tabs.1 by making section number
+ agree with file-suffix (report by Sven Joachim).
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090829
+ + workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro on
+ amd64 (Debian #542031).
+ + fix typo in curs_mouse.3x (Debian #429198).
+
+20090822
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090815
+ + correct use of terminfo capabilities for initializing soft-keys,
+ broken in 20090509 merging.
+ + modify wgetch() to ensure it checks SIGWINCH when it gets an error
+ in non-blocking mode (patch by Clemens Ladisch).
+ + use PATH_SEPARATOR symbol when substituting into run_tic.sh, to
+ help with builds on non-Unix platforms such as OS/2 EMX.
+ + modify scripting for misc/run_tic.sh to test configure script's
+ $cross_compiling variable directly rather than comparing host/build
+ compiler names (prompted by comment in GenToo #249363).
+ + fix configure script option --with-database, which was coded as an
+ enable-type switch.
+ + build-fixes for --srcdir (report by Frederic L W Meunier).
+
+20090808
+ + separate _nc_find_entry() and _nc_find_type_entry() from
+ implementation details of hash function.
+
+20090803
+ + add tabs.1 to man/man_db.renames
+ + modify lib_addch.c to compensate for removal of wide-character test
+ from unctrl() in 20090704 (Debian #539735).
+
+20090801
+ + improve discussion in INSTALL for use of system's tic/infocmp for
+ cross-compiling and building fallbacks.
+ + modify test/demo_termcap.c to correspond better to options in
+ test/demo_terminfo.c
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+ + fix logic for 'V' in test/ncurses.c tests f/F.
+
+20090728
+ + correct logic in tigetnum(), which caused tput program to treat all
+ string capabilities as numeric (report by Rajeev V Pillai,
+ cf: 20090711).
+
+20090725
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090718
+ + fix a null-pointer check in _nc_format_slks() in lib_slk.c, from
+ 20070704 changes.
+ + modify _nc_find_type_entry() to use hashing.
+ + make CCHARW_MAX value configurable, noting that changing this would
+ change the size of cchar_t, and would be ABI-incompatible.
+ + modify test-programs, e.g,. test/view.c, to address subtle
+ differences between Tru64/Solaris and HPUX/AIX getcchar() return
+ values.
+ + modify length returned by getcchar() to count the trailing null
+ which is documented in X/Open (cf: 20020427).
+ + fixes for test programs to build/work on HPUX and AIX, etc.
+
+20090711
+ + improve performance of tigetstr, etc., by using hashing code from tic.
+ + minor fixes for memory-leak checking.
+ + add test/demo_terminfo, for comparison with demo_termcap
+
+20090704
+ + remove wide-character checks from unctrl() (patch by Clemens Ladisch).
+ + revise wadd_wch() and wecho_wchar() to eliminate dependency on
+ unctrl().
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090627
+ + update llib-lncurses[wt] to use sp-funcs.
+ + various code-fixes to build/work with --disable-macros configure
+ option.
+ + add several new files from Juergen Pfeifer which will be used when
+ integration of "sp-funcs" is complete. This includes a port to
+ MinGW.
+
+20090613
+ + move definition for NCURSES_WRAPPED_VAR back to ncurses_dll.h, to
+ make includes of term.h without curses.h work (report by "Nix").
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090607
+ + fix a regression in lib_tputs.c, from ongoing merges.
+
+20090606
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090530
+ + fix an infinite recursion when adding a legacy-coding 8-bit value
+ using insch() (report by Clemens Ladisch).
+ + free home-terminfo string in del_curterm() (patch by Dan Weber).
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090523
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090516
+ + work around antique BSD game's manipulation of stdscr, etc., versus
+ SCREEN's copy of the pointer (Debian #528411).
+ + add a cast to wattrset macro to avoid compiler warning when comparing
+ its result against ERR (adapted from patch by Matt Kraii, Debian
+ #528374).
+
+20090510
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090502
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+ + add vwmterm terminfo entry (patch by Bryan Christ).
+
+20090425
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090419
+ + build fix for _nc_free_and_exit() change in 20090418 (report by
+ Christian Ebert).
+
+20090418
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090411
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+ This change finishes merging for menu and panel libraries, does
+ part of the form library.
+
+20090404
+ + suppress configure check for static/dynamic linker flags for gcc on
+ Darwin (report by Nelson Beebe).
+
+20090328
+ + extend ansi.sys pfkey capability from kf1-kf10 to kf1-kf48, moving
+ function key definitions from emx-base for consistency -TD
+ + correct missing final 'p' in pfkey capability of ansi.sys-old (report
+ by Kalle Olavi Niemitalo).
+ + improve test/ncurses.c 'F' test, show combining characters in color.
+ + quiet a false report by cppcheck in c++/cursesw.cc by eliminating
+ a temporary variable.
+ + use _nc_doalloc() rather than realloc() in a few places in ncurses
+ library to avoid leak in out-of-memory condition (reports by William
+ Egert and Martin Ettl based on cppcheck tool).
+ + add --with-ncurses-wrap-prefix option to test/configure (discussion
+ with Charles Wilson).
+ + use ncurses*-config scripts if available for test/configure.
+ + update test/aclocal.m4 and test/configure
+ > patches by Charles Wilson:
+ + modify CF_WITH_LIBTOOL configure check to allow unreleased libtool
+ version numbers (e.g. which include alphabetic chars, as well as
+ digits, after the final '.').
+ + improve use of -no-undefined option for libtool by setting an
+ intermediate variable LT_UNDEF in the configure script, and then
+ using that in the libtool link-commands.
+ + fix an missing use of NCURSES_PUBLIC_VAR() in tinfo/MKcodes.awk
+ from 2009031 changes.
+ + improve mk-1st.awk script by writing separate cases for the
+ LIBTOOL_LINK command, depending on which library (ncurses, ticlib,
+ termlib) is to be linked.
+ + modify configure.in to allow broken-linker configurations, not just
+ enable-reentrant, to set public wrap prefix.
+
+20090321
+ + add TICS_LIST and SHLIB_LIST to allow libtool 2.2.6 on Cygwin to
+ build with tic and term libraries (patch by Charles Wilson).
+ + add -no-undefined option to libtool for Cygwin, MinGW, U/Win and AIX
+ (report by Charles Wilson).
+ + fix definition for c++/Makefile.in's SHLIB_LIST, which did not list
+ the form, menu or panel libraries (patch by Charles Wilson).
+ + add configure option --with-wrap-prefix to allow setting the prefix
+ for functions used to wrap global variables to something other than
+ "_nc_" (discussion with Charles Wilson).
+
+20090314
+ + modify scripts to generate ncurses*-config and pc-files to add
+ dependency for tinfo library (patch by Charles Wilson).
+ + improve comparison of program-names when checking for linked flavors
+ such as "reset" by ignoring the executable suffix (reports by Charles
+ Wilson, Samuel Thibault and Cedric Bretaudeau on Cygwin mailing
+ list).
+ + suppress configure check for static/dynamic linker flags for gcc on
+ Solaris 10, since gcc is confused by absence of static libc, and
+ does not switch back to dynamic mode before finishing the libraries
+ (reports by Joel Bertrand, Alan Pae).
+ + minor fixes to Intel compiler warning checks in configure script.
+ + modify _nc_leaks_tinfo() so leak-checking in test/railroad.c works.
+ + modify set_curterm() to make broken-linker configuration work with
+ changes from 20090228 (report by Charles Wilson).
+
+20090228
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+ + modify declaration of cur_term when broken-linker is used, but
+ enable-reentrant is not, to match pre-5.7 (report by Charles Wilson).
+
+20090221
+ + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
+
+20090214
+ + add configure script --enable-sp-funcs to enable the new set of
+ extended functions.
+ + start integrating patches by Juergen Pfeifer:
+ + add extended functions which specify the SCREEN pointer for several
+ curses functions which use the global SP (these are incomplete;
+ some internals work is needed to complete these).
+ + add special cases to configure script for MinGW port.
+
+20090207
+ + update several configure macros from lynx changes
+ + append (not prepend) to CFLAGS/CPPFLAGS
+ + change variable from PATHSEP to PATH_SEPARATOR
+ + improve install-rules for pc-files (patch by Miroslav Lichvar).
+ + make it work with $DESTDIR
+ + create the pkg-config library directory if needed.
+
+20090124
+ + modify init_pair() to allow caller to create extra color pairs beyond
+ the color_pairs limit, which use default colors (request by Emanuele
+ Giaquinta).
+ + add misc/terminfo.tmp and misc/*.pc to "sources" rule.
+ + fix typo "==" where "=" is needed in ncurses-config.in and
+ gen-pkgconfig.in files (Debian #512161).
+
+20090117
+ + add -shared option to MK_SHARED_LIB when -Bsharable is used, for
+ *BSD's, without which "main" might be one of the shared library's
+ dependencies (report/analysis by Ken Dickey).
+ + modify waddch_literal(), updating line-pointer after a multicolumn
+ character is found to not fit on the current row, and wrapping is
+ done. Since the line-pointer was not updated, the wrapped
+ multicolumn character was written to the beginning of the current row
+ (cf: 20041023, reported by "Nick" regarding problem with ncmpc
+ http://musicpd.org/mantis/bug_view_page.php?bug_id=1930).
+
+20090110
+ + add screen.Eterm terminfo entry (GenToo #124887) -TD
+ + modify adacurses-config to look for ".ali" files in the adalib
+ directory.
+ + correct install for Ada95, which omitted libAdaCurses.a used in
+ adacurses-config
+ + change install for adacurses-config to provide additional flavors
+ such as adacursesw-config, for ncursesw (GenToo #167849).
+
+20090105
+ + remove undeveloped feature in ncurses-config.in for setting
+ prefix variable.
+ + recent change to ncurses-config.in did not take into account the
+ --disable-overwrite option, which sets $includedir to the
+ subdirectory and using just that for a -I option does not work - fix
+ (report by Frederic L W Meunier).
+
+20090104
+ + modify gen-pkgconfig.in to eliminate a dependency on rpath when
+ deciding whether to add $LIBS to --libs output; that should be shown
+ for the ncurses and tinfo libraries without taking rpath into
+ account.
+ + fix an overlooked change from $AR_OPTS to $ARFLAGS in mk-1st.awk,
+ used in static libraries (report by Marty Jack).
+
+20090103
+ + add a configure-time check to pick a suitable value for
+ CC_SHARED_OPTS for Solaris (report by Dagobert Michelsen).
+ + add configure --with-pkg-config and --enable-pc-files options, along
+ with misc/gen-pkgconfig.in which can be used to generate ".pc" files
+ for pkg-config (request by Jan Engelhardt).
+ + use $includedir symbol in misc/ncurses-config.in, add --includedir
+ option.
+ + change makefiles to use $ARFLAGS rather than $AR_OPTS, provide a
+ configure check to detect whether a "-" is needed before "ar"
+ options.
+ + update config.guess, config.sub from
+ http://savannah.gnu.org/projects/config
+
+20081227
+ + modify mk-1st.awk to work with extra categories for tinfo library.
+ + modify configure script to allow building shared libraries with gcc
+ on AIX 5 or 6 (adapted from patch by Lital Natan).
+
+20081220
+ + modify to omit the opaque-functions from lib_gen.o when
+ --disable-ext-funcs is used.
+ + add test/clip_printw.c to illustrate how to use printw without
+ wrapping.
+ + modify ncurses 'F' test to demo wborder_set() with colored lines.
+ + modify ncurses 'f' test to demo wborder() with colored lines.
+
+20081213
+ + add check for failure to open hashed-database needed for db4.6
+ (GenToo #245370).
+ + corrected --without-manpages option; previous change only suppressed
+ the auxiliary rules install.man and uninstall.man
+ + add case for FreeMINT to configure macro CF_XOPEN_SOURCE (patch from
+ GenToo #250454).
+ + fixes from NetBSD port at
+ http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/ncurses/patches
+ patch-ac (build-fix for DragonFly)
+ patch-ae (use INSTALL_SCRIPT for installing misc/ncurses*-config).
+ + improve configure script macros CF_HEADER_PATH and CF_LIBRARY_PATH
+ by adding CFLAGS, CPPFLAGS and LDFLAGS, LIBS values to the
+ search-lists.
+ + correct title string for keybound manpage (patch by Frederic Culot,
+ OpenBSD documentation/6019),
+
+20081206
+ + move del_curterm() call from _nc_freeall() to _nc_leaks_tinfo() to
+ work for progs/clear, progs/tabs, etc.
+ + correct buffer-size after internal resizing of wide-character
+ set_field_buffer(), broken in 20081018 changes (report by Mike Gran).
+ + add "-i" option to test/filter.c to tell it to use initscr() rather
+ than newterm(), to investigate report on comp.unix.programmer that
+ ncurses would clear the screen in that case (it does not - the issue
+ was xterm's alternate screen feature).
+ + add check in mouse-driver to disable connection if GPM returns a
+ zero, indicating that the connection is closed (Debian #506717,
+ adapted from patch by Samuel Thibault).
+
+20081129
+ + improve a workaround in adding wide-characters, when a control
+ character is found. The library (cf: 20040207) uses unctrl() to
+ obtain a printable version of the control character, but was not
+ passing color or video attributes.
+ + improve test/ncurses.c 'a' test, using unctrl() more consistently to
+ display meta-characters.
+ + turn on _XOPEN_CURSES definition in curses.h
+ + add eterm-color entry (report by Vincent Lefevre) -TD
+ + correct use of key_name() in test/ncurses.c 'A' test, which only
+ displays wide-characters, not key-codes since 20070612 (report by
+ Ricardo Cantu).
+
+20081122
+ + change _nc_has_mouse() to has_mouse(), reflect its use in C++ and
+ Ada95 (patch by Juergen Pfeifer).
+ + document in TO-DO an issue with Cygwin's package for GNAT (report
+ by Mike Dennison).
+ + improve error-checking of command-line options in "tabs" program.
+
+20081115
+ + change several terminfo entries to make consistent use of ANSI
+ clear-all-tabs -TD
+ + add "tabs" program (prompted by Debian #502260).
+ + add configure --without-manpages option (request by Mike Frysinger).
+
20081102 5.7 release for upload to ftp.gnu.org
20081025
@@ -77,7 +1147,7 @@ it is not possible to add this information.
overlooked til now.
20081011
- + update html documentation.
+ + regenerated html documentation.
+ add -m and -s options to test/keynames.c and test/key_names.c to test
the meta() function with keyname() or key_name(), respectively.
+ correct return value of key_name() on error; it is null.
@@ -2204,7 +3274,7 @@ it is not possible to add this information.
(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
+ #define NCURSES_ENABLE_STDBOOL_H 0
#include <curses.h>
(discussion on XFree86 mailing list).
@@ -2784,7 +3854,7 @@ it is not possible to add this information.
20030208
+ add checking in tic for incomplete line-drawing character mapping.
- + update configure script to reflect fix for AC_PROG_GCC_TRADITIONAL,
+ + updated 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,
@@ -3503,7 +4573,7 @@ it is not possible to add this information.
+ 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
+ + updated 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)
diff --git a/README.MinGW b/README.MinGW
new file mode 100644
index 000000000000..d111b3877840
--- /dev/null
+++ b/README.MinGW
@@ -0,0 +1,149 @@
+-------------------------------------------------------------------------------
+-- Copyright (c) 2008-2010,2011 Free Software Foundation, Inc. --
+-- --
+-- Permission is hereby granted, free of charge, to any person obtaining a --
+-- copy of this software and associated documentation files (the --
+-- "Software"), to deal in the Software without restriction, including --
+-- without limitation the rights to use, copy, modify, merge, publish, --
+-- distribute, distribute with modifications, sublicense, and/or sell copies --
+-- of the Software, and to permit persons to whom the Software is furnished --
+-- to do so, subject to the following conditions: --
+-- --
+-- The above copyright notice and this permission notice shall be included --
+-- in all copies or substantial portions of the Software. --
+-- --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
+-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
+-- USE OR OTHER DEALINGS IN THE SOFTWARE. --
+-- --
+-- Except as contained in this notice, the name(s) of the above copyright --
+-- 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: README.MinGW,v 1.5 2011/02/26 16:57:17 tom Exp $
+-- Author: Juergen Pfeifer
+-------------------------------------------------------------------------------
+
+This is work in progress, but it's in an state where one can see it
+works at least on the Windows Console.
+
+You should install the MSYS package, so that you've a shell environment that
+allows you to run the scripts, especially configure etc. You can get that
+from http://www.mingw.org
+
+To build ncurses for native Windows, you need the MinGW toolchain. The
+original MinGW toolchain from the above site is only for 32-Bit Windows. As
+Windows Server - and also regular workstations - are moving to 64-Bit, it
+seems to be reasonable to have a toolchain that supports both architectures.
+I recommend to use the TDM gcc toolchain which you can find at
+http://tdm-gcc.tdragon.net/download. Go to the download section and select
+the bundle installer for tdm64 (MinGW-w64). This installs a multilib version
+of the gcc toolchain that can compile for native 32- and 64-Bit Windows
+versions. It also comes with a working pthread implementation.
+
+The latest config and build scripts we use for MinGW have only been tested
+for the gcc-4.4 compiler toolchain (or better).
+
+Using MinGW is a pragmatic decision, it's the easiest way to port this
+heavily UNIX based sourcebase to native Windows. The goal is of course
+to provide the includes, libraries and DLLs to be used with the more
+common traditional development environments on Windows, mainly with
+Microsoft Visual Studio.
+
+If you start a bash from the MSYS environment, please make sure that the
+Microsoft Development tools are in your PATH right after the MinGW
+tools. The LIB.EXE tool is the only one needed. You need this only if
+you want to build DLLs that work with native Windows programs. If you
+don't have any Microsoft Development tools on your machine, consider
+at least to get the free "Visual C++ 2010 Express Edition".
+It contains the LIB.EXE tool. You may also use this compiler to test
+writing native Windows programs using the ncurses DLLs without using
+MinGW then for writing apps.
+
+It is necessary to unset the TERM environment variable, to activate the
+Windows console-driver.
+
+Please also make sure that MSYS links to the correct directory containing
+your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
+CMD.EXE command shell go to the MSYS root directory (most probably
+C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw
+that points to the MinGW toolchain directory. If not, delete the mingw
+directory and use the mklink command (or the linkd.exe utility on older
+Windows) to create the junction point.
+
+This code requires WindowsNT 5.1 or better, which means on the client
+Windows XP or better, on the server Windows Server 2003 or better.
+
+In order to build ncurses for the planned interop layer with .NET, we
+recommend to use these options with configure
+
+ --disable-home-terminfo
+ --enable-reentrant
+ --enable-sp-funcs
+ --enable-term-driver
+ --enable-interop
+ --with-pthread (if using TDM toolchain as recommended)
+
+This is the configuration commandline as I'm using it at the moment:
+
+./configure \
+ --prefix=/mingw \
+ --without-cxx-binding \
+ --without-ada \
+ --enable-warnings \
+ --enable-assertions \
+ --enable-reentrant \
+ --with-debug \
+ --with-normal \
+ --disable-home-terminfo \
+ --enable-sp-funcs \
+ --enable-term-driver \
+ --enable-interop \
+ --with-pthread
+
+If you are on a 64-Bit Windows system and want to build a 32-Bit version
+of ncurses, you may use this commandline for configuration (when using
+the TDM toolchain):
+
+CC="gcc -m32" LD="ld -m32" ./configure \
+ --prefix=/mingw \
+ --without-cxx-binding \
+ --without-ada \
+ --enable-warnings \
+ --enable-assertions \
+ --enable-reentrant \
+ --with-debug \
+ --with-normal \
+ --disable-home-terminfo \
+ --enable-sp-funcs \
+ --enable-term-driver \
+ --enable-interop \
+ --with-pthread
+
+All the options above are - like the whole Windows support -
+experimental.
+
+In order to build the DLLs, after your regular make you must call
+
+ make dlls
+
+A lot is still TODO, e.g.:
+
+ - Wide Character support
+ The Win32Con driver should actually only use Unicode in the
+ future.
+ - Thread support (locking). If using TDM toolchain this is done by
+ configuring pthreads.
+ - A GUI console driver
+ - Support for Terminals attached via a serial port (via terminfo)
+ - Support for networked Terminal connections (via terminfo)
+ - Workarounds for MinGW's filesystem access are necessary to make infocmp
+ work (though tic works).
+
+To support terminfo, we need to have an ioctl() simulation for the
+serial and networked Terminals.
diff --git a/TO-DO b/TO-DO
index ca47d02d0ec8..5df7f47e722e 100644
--- a/TO-DO
+++ b/TO-DO
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
--- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: TO-DO,v 1.51 2008/10/11 19:22:27 tom Exp $
+-- $Id: TO-DO,v 1.57 2011/03/28 00:23:02 tom Exp $
-------------------------------------------------------------------------------
SHORT-TERM TO-DO ITEMS:
@@ -45,7 +45,7 @@ Known Problems:
+ 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.
++ 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.
@@ -58,7 +58,7 @@ Known Problems:
+ The window classes defined in the c++ subdirectory need documentation. Some
C++ programmer could earn a lot of good karma by doing this...
-+ vid_attr() should support the set_a_attributes (sgr1) string, but does not.
++ vid_attr() should support the set_a_attributes (sgr1) string, but does not.
There appear to be no terminals that require that functionality.
+ the configure --disable-ext-funcs option does not work for Ada95 tree.
@@ -72,27 +72,28 @@ Known Problems:
Building those with libtool does not work either. (This is a problem with
the BSD platforms).
++ more work is needed to make the MinGW port support ordinary terminals.
+
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 .
+ are using one of the 4.4BSD derivatives like such as, NetBSD, or BSDI, or
+ systems using that convention. 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 (and are deprecated by X/Open
- for that reason). 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 used 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
+ for that reason). Many newer systems do no have varargs.h, instead they have
+ only 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 used
+ the stdarg.h binding as well).
+
++ If you're using a system old enough not to have a native vsscanf(3) in its
+ library, vwscanw() will not work. If you want to fix this, add an
implementation to ncurses/vsscanf.c.
+ The C++ binding fails to build with a few C++ compilers.
@@ -122,7 +123,7 @@ supporting internationalization.
2. DOS port
Only a few of the files in the library depend on the terminfo format.
-It should be possible to further kernelize the package, then rewrite
+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.
@@ -195,10 +196,10 @@ F. Unused VDT capabilities:
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,
+ 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,
+ enter_scancode_mode, exit_scancode_mode, pc_term_options,
scancode_escape, alt_scancode_esc.
These are the potentially important ones for ncurses. Notes:
diff --git a/aclocal.m4 b/aclocal.m4
index 4c8e818f2403..9a828559d4ab 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: aclocal.m4,v 1.470 2008/10/25 22:15:32 tom Exp $
+dnl $Id: aclocal.m4,v 1.553 2011/03/31 23:35:38 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@@ -62,13 +62,13 @@ AC_DEFUN([AM_LANGINFO_CODESET],
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADA_INCLUDE_DIRS version: 5 updated: 2006/10/14 15:23:15
+dnl CF_ADA_INCLUDE_DIRS version: 6 updated: 2010/02/26 19:52:07
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"
+ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
if test "$srcdir" != "."; then
ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
fi
@@ -86,7 +86,15 @@ fi
AC_SUBST(ACPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30
+dnl CF_ADD_ADAFLAGS version: 1 updated: 2010/06/19 15:22:18
+dnl ---------------
+dnl Add to $ADAFLAGS, which is substituted into makefile and scripts.
+AC_DEFUN([CF_ADD_ADAFLAGS],[
+ ADAFLAGS="$ADAFLAGS $1"
+ AC_SUBST(ADAFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
dnl The second parameter if given makes this macro verbose.
@@ -112,8 +120,8 @@ no)
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
+ && 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"
@@ -128,6 +136,12 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+ CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -143,24 +157,24 @@ yes)
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
+ && 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)])
+ 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"
+ ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
- ifelse($2,,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
+ ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
@@ -168,7 +182,7 @@ AC_SUBST(EXTRA_CPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_INCDIR version: 9 updated: 2008/02/09 13:15:34
+dnl CF_ADD_INCDIR version: 13 updated: 2010/05/26 16:44:57
dnl -------------
dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
@@ -195,7 +209,7 @@ if test -n "$1" ; then
fi
if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
@@ -211,11 +225,11 @@ if test -n "$1" ; then
if test "$cf_have_incdir" = no ; then
CF_VERBOSE(adding $cf_add_incdir to include-path)
- ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
+ ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
else
break
fi
@@ -225,7 +239,15 @@ if test -n "$1" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_LIBDIR version: 6 updated: 2008/02/09 13:15:34
+dnl CF_ADD_LIB version: 2 updated: 2010/06/02 05:03:05
+dnl ----------
+dnl Add a library, used to enforce consistency.
+dnl
+dnl $1 = library to add, without the "-l"
+dnl $2 = variable to update (default $LIBS)
+AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_LIBDIR version: 9 updated: 2010/05/26 16:44:57
dnl -------------
dnl Adds to the library-path
dnl
@@ -254,14 +276,22 @@ if test -n "$1" ; then
fi
if test "$cf_have_libdir" = no ; then
CF_VERBOSE(adding $cf_add_libdir to library-path)
- ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"
+ ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])"
fi
fi
done
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_SUBDIR_PATH version: 2 updated: 2007/07/29 10:12:59
+dnl CF_ADD_LIBS version: 1 updated: 2010/06/02 05:03:05
+dnl -----------
+dnl Add one or more libraries, used to enforce consistency.
+dnl
+dnl $1 = libraries to add, with the "-l", etc.
+dnl $2 = variable to update (default $LIBS)
+AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12
dnl ------------------
dnl Append to a search-list for a nonstandard header/lib-file
dnl $1 = the variable to return as result
@@ -273,7 +303,7 @@ AC_DEFUN([CF_ADD_SUBDIR_PATH],
[
test "$4" != "$5" && \
test -d "$4" && \
-ifelse([$5],NONE,,[(test $5 = NONE || test -d $5) &&]) {
+ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
test -n "$verbose" && echo " ... testing for $3-directories under $4"
test -d $4/$3 && $1="[$]$1 $4/$3"
test -d $4/$3/$2 && $1="[$]$1 $4/$3/$2"
@@ -283,13 +313,13 @@ ifelse([$5],NONE,,[(test $5 = NONE || test -d $5) &&]) {
}
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34
+dnl CF_ANSI_CC_CHECK version: 10 updated: 2010/10/23 15:52:32
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,[
+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"
@@ -353,7 +383,89 @@ You have the following choices:
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_AWK_BIG_PRINTF version: 2 updated: 2008/10/04 17:16:18
+dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
+dnl --------------
+dnl Allow user to disable a normally-on option.
+AC_DEFUN([CF_ARG_DISABLE],
+[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42
+dnl -------------
+dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
+dnl values.
+dnl
+dnl Parameters:
+dnl $1 = option name
+dnl $2 = help-string
+dnl $3 = action to perform if option is not default
+dnl $4 = action if perform if option is default
+dnl $5 = default option value (either 'yes' or 'no')
+AC_DEFUN([CF_ARG_OPTION],
+[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
+ if test "$enableval" != "$5" ; then
+ifelse([$3],,[ :]dnl
+,[ $3]) ifelse([$4],,,[
+ else
+ $4])
+ fi],[enableval=$5 ifelse([$4],,,[
+ $4
+])dnl
+ ])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_AR_FLAGS version: 5 updated: 2010/05/20 20:24:29
+dnl -----------
+dnl Check for suitable "ar" (archiver) options for updating an archive.
+AC_DEFUN([CF_AR_FLAGS],[
+AC_REQUIRE([CF_PROG_AR])
+
+AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
+ cf_cv_ar_flags=unknown
+ for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+ if test "x$ARFLAGS" != "x" ; then
+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
+ cf_cv_ar_flags=
+ break
+ fi
+ fi
+
+ rm -f conftest.$ac_cv_objext
+ 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
+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&AC_FD_CC
+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null
+ if test -f conftest.a ; then
+ cf_cv_ar_flags=$cf_ar_flags
+ break
+ fi
+ else
+ CF_VERBOSE(cannot compile test-program)
+ break
+ fi
+ done
+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+])
+
+if test -n "$ARFLAGS" ; then
+ if test -n "$cf_cv_ar_flags" ; then
+ ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
+ fi
+else
+ ARFLAGS=$cf_cv_ar_flags
+fi
+
+AC_SUBST(ARFLAGS)
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_AWK_BIG_PRINTF version: 3 updated: 2008/12/27 12:30:03
dnl -----------------
dnl Check if awk can handle big strings using printf. Some older versions of
dnl awk choke on large strings passed via "%s".
@@ -362,19 +474,19 @@ dnl $1 = desired string size
dnl $2 = variable to set with result
AC_DEFUN([CF_AWK_BIG_PRINTF],
[
- case x$AWK in #(vi
- x)
- eval $2=no
- ;;
- *) #(vi
- if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \
- | $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
- eval $2=yes
- else
- eval $2=no
- fi
- ;;
- esac
+ case x$AWK in #(vi
+ x)
+ eval $2=no
+ ;;
+ *) #(vi
+ if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < $1) { xx = xx "x"; }; printf("%s\n", xx); }' \
+ | $AWK '{ printf "%d\n", length([$]0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ([$]0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
+ eval $2=yes
+ else
+ eval $2=no
+ fi
+ ;;
+ esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18
@@ -695,7 +807,7 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CHECK_ERRNO version: 10 updated: 2008/08/22 16:33:22
+dnl CF_CHECK_ERRNO version: 11 updated: 2010/05/26 05:38:42
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
@@ -713,7 +825,7 @@ AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[
#include <stdio.h>
#include <sys/types.h>
#include <errno.h> ],
- ifelse($2,,int,$2) x = (ifelse($2,,int,$2)) $1,
+ ifelse([$2],,int,[$2]) x = (ifelse([$2],,int,[$2])) $1,
[cf_cv_dcl_$1=yes],
[cf_cv_dcl_$1=no])
])
@@ -724,7 +836,7 @@ if test "$cf_cv_dcl_$1" = no ; then
fi
# It's possible (for near-UNIX clones) that the data doesn't exist
-CF_CHECK_EXTERN_DATA($1,ifelse($2,,int,$2))
+CF_CHECK_EXTERN_DATA($1,ifelse([$2],,int,[$2]))
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_CHECK_EXTERN_DATA version: 3 updated: 2001/12/30 18:03:23
@@ -752,7 +864,7 @@ fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CHECK_GPM_WGETCH version: 1 updated: 2007/04/28 14:38:06
+dnl CF_CHECK_GPM_WGETCH version: 2 updated: 2010/08/14 18:25:37
dnl -------------------
dnl Check if GPM is already linked with curses. If so - and if the linkage
dnl is not "weak" - warn about this because it can create problems linking
@@ -786,7 +898,7 @@ CF_EOF
test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
fi
fi
- rm -f conftest*
+ rm -rf conftest*
LIBS="$cf_save_LIBS"
fi
])
@@ -887,7 +999,7 @@ fi
test "$cf_cv_cpp_static_cast" = yes && AC_DEFINE(CPP_HAS_STATIC_CAST)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_C_INLINE version: 2 updated: 2007/08/11 14:09:50
+dnl CF_C_INLINE version: 3 updated: 2010/05/01 15:14:41
dnl -----------
dnl Check if the C compiler supports "inline".
dnl $1 is the name of a shell variable to set if inline is supported
@@ -902,7 +1014,7 @@ if test "$ac_cv_c_inline" != no ; then
:
elif test "$GCC" = yes
then
- AC_CACHE_CHECK(if gcc supports options to tune inlining,cf_cv_gcc_inline,[
+ AC_CACHE_CHECK(if $CC supports options to tune inlining,cf_cv_gcc_inline,[
cf_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS --param max-inline-insns-single=$2"
AC_TRY_COMPILE([inline int foo(void) { return 1; }],
@@ -945,7 +1057,7 @@ done
AC_SUBST(DIRS_TO_MAKE)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_DISABLE_LEAKS version: 4 updated: 2006/12/16 15:10:42
+dnl CF_DISABLE_LEAKS version: 6 updated: 2010/07/23 04:14:32
dnl ----------------
dnl Combine no-leak checks with the libraries or tools that are used for the
dnl checks.
@@ -958,27 +1070,71 @@ AC_REQUIRE([CF_WITH_VALGRIND])
AC_MSG_CHECKING(if you want to perform memory-leak testing)
AC_ARG_ENABLE(leaks,
[ --disable-leaks test: free permanent memory, analyze leaks],
- [with_no_leaks=yes],
+ [if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi],
: ${with_no_leaks:=no})
AC_MSG_RESULT($with_no_leaks)
if test "$with_no_leaks" = yes ; then
AC_DEFINE(NO_LEAKS)
+ AC_DEFINE(YY_NO_LEAKS)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ENABLE_RPATH version: 1 updated: 2008/09/13 10:22:30
+dnl CF_DISABLE_LIBTOOL_VERSION version: 1 updated: 2010/05/15 15:45:59
+dnl --------------------------
+dnl Check if we should use the libtool 1.5 feature "-version-number" instead of
+dnl the older "-version-info" feature. The newer feature allows us to use
+dnl version numbering on shared libraries which make them compatible with
+dnl various systems.
+AC_DEFUN([CF_DISABLE_LIBTOOL_VERSION],
+[
+AC_MSG_CHECKING(if libtool -version-number should be used)
+CF_ARG_DISABLE(libtool-version,
+ [ --disable-libtool-version enable to use libtool's incompatible naming scheme],
+ [cf_libtool_version=no],
+ [cf_libtool_version=yes])
+AC_MSG_RESULT($cf_libtool_version)
+
+if test "$cf_libtool_version" = yes ; then
+ LIBTOOL_VERSION="-version-number"
+else
+ LIBTOOL_VERSION="-version-info"
+fi
+
+AC_SUBST(LIBTOOL_VERSION)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_RPATH_HACK version: 2 updated: 2011/02/13 13:31:33
+dnl ---------------------
+dnl The rpath-hack makes it simpler to build programs, particularly with the
+dnl *BSD ports which may have essential libraries in unusual places. But it
+dnl can interfere with building an executable for the base system. Use this
+dnl option in that case.
+AC_DEFUN([CF_DISABLE_RPATH_HACK],
+[
+AC_MSG_CHECKING(if rpath-hack should be disabled)
+CF_ARG_DISABLE(rpath-hack,
+ [ --disable-rpath-hack don't add rpath options for additional libraries],
+ [cf_disable_rpath_hack=yes],
+ [cf_disable_rpath_hack=no])
+AC_MSG_RESULT($cf_disable_rpath_hack)
+if test "$cf_disable_rpath_hack" = no ; then
+ CF_RPATH_HACK
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42
dnl ---------------
dnl Check if the rpath option should be used, setting cache variable
-dnl cf_cv_ld_rpath if so.
+dnl cf_cv_enable_rpath if so.
AC_DEFUN([CF_ENABLE_RPATH],
[
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_cv_enable_rpath=$enableval],
+[cf_cv_enable_rpath=no])
+AC_MSG_RESULT($cf_cv_enable_rpath)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ERRNO version: 5 updated: 1997/11/30 12:44:39
@@ -1019,7 +1175,7 @@ AC_MSG_RESULT($cf_result)
CXXFLAGS="$cf_save_CXXFLAGS"
])
dnl ---------------------------------------------------------------------------
-dnl CF_FIND_LINKAGE version: 12 updated: 2007/07/29 20:13:53
+dnl CF_FIND_LINKAGE version: 19 updated: 2010/05/29 16:31:02
dnl ---------------
dnl Find a library (specifically the linkage used in the code fragment),
dnl searching for it if it is not already in the library path.
@@ -1048,10 +1204,26 @@ cf_cv_library_path_$3=
CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)])
-AC_TRY_LINK([$1],[$2],
- cf_cv_find_linkage_$3=yes,[
- cf_cv_find_linkage_$3=no
+cf_save_LIBS="$LIBS"
+
+AC_TRY_LINK([$1],[$2],[
+ cf_cv_find_linkage_$3=yes
+ cf_cv_header_path_$3=/usr/include
+ cf_cv_library_path_$3=/usr/lib
+],[
+
+LIBS="-l$3 $7 $cf_save_LIBS"
+AC_TRY_LINK([$1],[$2],[
+ cf_cv_find_linkage_$3=yes
+ cf_cv_header_path_$3=/usr/include
+ cf_cv_library_path_$3=/usr/lib
+ cf_cv_library_file_$3="-l$3"
+],[
+ cf_cv_find_linkage_$3=no
+ LIBS="$cf_save_LIBS"
+
+ CF_VERBOSE(find linkage for $3 library)
CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
cf_save_CPPFLAGS="$CPPFLAGS"
@@ -1110,7 +1282,6 @@ AC_TRY_LINK([$1],[$2],
])
fi
done
- LIBS="$cf_save_LIBS"
CPPFLAGS="$cf_save_CPPFLAGS"
LDFLAGS="$cf_save_LDFLAGS"
fi
@@ -1119,19 +1290,22 @@ AC_TRY_LINK([$1],[$2],
cf_cv_find_linkage_$3=no
fi
],$7)
+])
+
+LIBS="$cf_save_LIBS"
if test "$cf_cv_find_linkage_$3" = yes ; then
ifelse([$4],,[
- CF_ADD_INCDIR($cf_cv_header_path_$3)
- CF_ADD_LIBDIR($cf_cv_library_path_$3)
- LIBS="-l$3 $LIBS"
+ CF_ADD_INCDIR($cf_cv_header_path_$3)
+ CF_ADD_LIBDIR($cf_cv_library_path_$3)
+ CF_ADD_LIB($3)
],[$4])
else
ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_DLSYM version: 1 updated: 2004/06/16 20:52:45
+dnl CF_FUNC_DLSYM version: 2 updated: 2010/05/29 16:31:02
dnl -------------
dnl Test for dlsym() and related functions, as well as libdl.
dnl
@@ -1148,7 +1322,7 @@ AC_CHECK_LIB(dl,dlsym,[
cf_have_libdl=yes])])
if test "$cf_have_dlsym" = yes ; then
- test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
+ test "$cf_have_libdl" = yes && CF_ADD_LIB(dl)
AC_MSG_CHECKING(whether able to link to dl*() functions)
AC_TRY_LINK([#include <dlfcn.h>],[
@@ -1231,7 +1405,7 @@ int main() {
test "$cf_cv_func_nanosleep" = "yes" && AC_DEFINE(HAVE_NANOSLEEP)
])
dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_OPENPTY version: 2 updated: 2008/04/12 19:49:01
+dnl CF_FUNC_OPENPTY version: 3 updated: 2010/05/29 16:31:02
dnl ---------------
dnl Check for openpty() function, along with <pty.h> header. It may need the
dnl "util" library as well.
@@ -1240,7 +1414,7 @@ AC_DEFUN([CF_FUNC_OPENPTY],
AC_CHECK_LIB(util,openpty,cf_cv_lib_util=yes,cf_cv_lib_util=no)
AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[
cf_save_LIBS="$LIBS"
- test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
+ test $cf_cv_lib_util = yes && CF_ADD_LIB(util)
for cf_header in pty.h libutil.h util.h
do
AC_TRY_LINK([
@@ -1362,7 +1536,7 @@ esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_ATTRIBUTES version: 11 updated: 2007/07/29 09:55:12
+dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@@ -1389,7 +1563,7 @@ if test "$GCC" = yes
then
AC_CHECKING([for $CC __attribute__ directives])
cat > conftest.$ac_ext <<EOF
-#line __oline__ "${as_me-configure}"
+#line __oline__ "${as_me:-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -1408,26 +1582,61 @@ 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
+ cf_printf_attribute=no
+ cf_scanf_attribute=no
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
+
+ case $cf_attribute in #(vi
+ printf) #(vi
+ cf_printf_attribute=yes
+ cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
;;
- *)
- cat >conftest.h <<EOF
+ scanf) #(vi
+ cf_scanf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ *) #(vi
+ 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
+ case $cf_attribute in #(vi
+ printf) #(vi
+ if test "$cf_printf_attribute" = no ; then
+ cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+EOF
+ else
+ cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+EOF
+ fi
+ ;;
+ scanf) #(vi
+ if test "$cf_scanf_attribute" = no ; then
+ cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) /* nothing */
+EOF
+ else
+ cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+EOF
+ fi
+ ;;
+ esac
fi
done
else
@@ -1437,7 +1646,7 @@ rm -rf conftest*
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_VERSION version: 4 updated: 2005/08/27 09:53:42
+dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
dnl --------------
dnl Find version of gcc
AC_DEFUN([CF_GCC_VERSION],[
@@ -1445,13 +1654,13 @@ 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/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -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: 23 updated: 2008/07/26 17:54:02
+dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
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:
@@ -1476,7 +1685,7 @@ AC_REQUIRE([CF_GCC_VERSION])
CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
cat > conftest.$ac_ext <<EOF
-#line __oline__ "${as_me-configure}"
+#line __oline__ "${as_me:-configure}"
int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
EOF
@@ -1484,7 +1693,6 @@ if test "$INTEL_COMPILER" = yes
then
# The "-wdXXX" options suppress warnings:
# remark #1419: external declaration in primary source file
-# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
# remark #193: zero used for undefined preprocessing identifier
@@ -1492,19 +1700,18 @@ then
# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
# remark #869: parameter "tw" was never referenced
# remark #981: operands are evaluated in unspecified order
-# warning #269: invalid format string conversion
+# warning #279: controlling expression is constant
AC_CHECKING([for $CC warning options])
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
for cf_opt in \
wd1419 \
- wd1682 \
wd1683 \
wd1684 \
wd193 \
- wd279 \
wd593 \
+ wd279 \
wd810 \
wd869 \
wd981
@@ -1521,10 +1728,10 @@ elif test "$GCC" = yes
then
AC_CHECKING([for $CC warning options])
cf_save_CFLAGS="$CFLAGS"
- EXTRA_CFLAGS="-W -Wall"
+ EXTRA_CFLAGS=
cf_warn_CONST=""
test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
- for cf_opt in \
+ for cf_opt in W Wall \
Wbad-function-cast \
Wcast-align \
Wcast-qual \
@@ -1557,12 +1764,225 @@ then
done
CFLAGS="$cf_save_CFLAGS"
fi
-rm -f conftest*
+rm -rf conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_TRY_LINK version: 1 updated: 2004/08/21 19:02:08
+dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41
+dnl ----------------
+AC_DEFUN([CF_GNAT_GENERICS],
+[
+AC_REQUIRE([CF_GNAT_VERSION])
+
+AC_MSG_CHECKING(if GNAT supports generics)
+case $cf_gnat_version in #(vi
+3.[[1-9]]*|[[4-9]].*) #(vi
+ cf_gnat_generics=yes
+ ;;
+*)
+ cf_gnat_generics=no
+ ;;
+esac
+AC_MSG_RESULT($cf_gnat_generics)
+
+if test "$cf_gnat_generics" = yes
+then
+ cf_compile_generics=generics
+ cf_generic_objects="\${GENOBJS}"
+else
+ cf_compile_generics=
+ cf_generic_objects=
+fi
+
+AC_SUBST(cf_compile_generics)
+AC_SUBST(cf_generic_objects)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
+dnl --------------------
+dnl Check if the gnat pragma "Unreferenced" works.
+AC_DEFUN([CF_GNAT_PRAGMA_UNREF],[
+AC_CACHE_CHECK(if GNAT pragma Unreferenced works,cf_cv_pragma_unreferenced,[
+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])])
+
+# 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_SUBST(PRAGMA_UNREF)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41
+dnl ----------------
+dnl GNAT projects are configured with ".gpr" project files.
+dnl GNAT libraries are a further development, using the project feature.
+AC_DEFUN([CF_GNAT_PROJECTS],
+[
+AC_REQUIRE([CF_GNAT_VERSION])
+
+cf_gnat_libraries=no
+cf_gnat_projects=no
+
+AC_MSG_CHECKING(if GNAT supports project files)
+case $cf_gnat_version in #(vi
+3.[[0-9]]*) #(vi
+ ;;
+*)
+ case $cf_cv_system_name in #(vi
+ cygwin*) #(vi
+ ;;
+ *)
+ mkdir conftest.src conftest.bin conftest.lib
+ cd conftest.src
+ rm -rf conftest* *~conftest*
+ cat >>library.gpr <<CF_EOF
+project Library is
+ Kind := External ("LIB_KIND");
+ for Library_Name use "ConfTest";
+ for Object_Dir use ".";
+ for Library_ALI_Dir use External("LIBRARY_DIR");
+ for Library_Version use External ("SONAME");
+ for Library_Kind use Kind;
+ for Library_Dir use External("BUILD_DIR");
+ Source_Dir := External ("SOURCE_DIR");
+ for Source_Dirs use (Source_Dir);
+ package Compiler is
+ for Default_Switches ("Ada") use
+ ("-g",
+ "-O2",
+ "-gnatafno",
+ "-gnatVa", -- All validity checks
+ "-gnatwa"); -- Activate all optional errors
+ end Compiler;
+end Library;
+CF_EOF
+ cat >>confpackage.ads <<CF_EOF
+package ConfPackage is
+ procedure conftest;
+end ConfPackage;
+CF_EOF
+ cat >>confpackage.adb <<CF_EOF
+with Text_IO;
+package body ConfPackage is
+ procedure conftest is
+ begin
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ end conftest;
+end ConfPackage;
+CF_EOF
+ if ( $cf_ada_make $ADAFLAGS \
+ -Plibrary.gpr \
+ -XBUILD_DIR=`cd ../conftest.bin;pwd` \
+ -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
+ -XSOURCE_DIR=`pwd` \
+ -XSONAME=libConfTest.so.1 \
+ -XLIB_KIND=static 1>&AC_FD_CC 2>&1 ) ; then
+ cf_gnat_projects=yes
+ fi
+ cd ..
+ if test -f conftest.lib/confpackage.ali
+ then
+ cf_gnat_libraries=yes
+ fi
+ rm -rf conftest* *~conftest*
+ ;;
+ esac
+ ;;
+esac
+AC_MSG_RESULT($cf_gnat_projects)
+
+if test $cf_gnat_projects = yes
+then
+ AC_MSG_CHECKING(if GNAT supports libraries)
+ AC_MSG_RESULT($cf_gnat_libraries)
+fi
+
+if test "$cf_gnat_projects" = yes
+then
+ USE_OLD_MAKERULES="#"
+ USE_GNAT_PROJECTS=""
+else
+ USE_OLD_MAKERULES=""
+ USE_GNAT_PROJECTS="#"
+fi
+
+if test "$cf_gnat_libraries" = yes
+then
+ USE_GNAT_LIBRARIES=""
+else
+ USE_GNAT_LIBRARIES="#"
+fi
+
+AC_SUBST(USE_OLD_MAKERULES)
+AC_SUBST(USE_GNAT_PROJECTS)
+AC_SUBST(USE_GNAT_LIBRARIES)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
+dnl --------------
+dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it
+dnl is noted that gnat may compile a tasking unit even for configurations which
+dnl fail at runtime.
+AC_DEFUN([CF_GNAT_SIGINT],[
+AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[
+CF_GNAT_TRY_LINK([with Ada.Interrupts.Names;
+
+package ConfTest is
+
+ pragma Warnings (Off); -- the next pragma exists since 3.11p
+ pragma Unreserve_All_Interrupts;
+ pragma Warnings (On);
+
+ protected Process is
+ procedure Stop;
+ function Continue return Boolean;
+ pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
+ private
+ Done : Boolean := False;
+ end Process;
+
+end ConfTest;],
+[package body ConfTest is
+ protected body Process is
+ procedure Stop is
+ begin
+ Done := True;
+ end Stop;
+ function Continue return Boolean is
+ begin
+ return not Done;
+ end Continue;
+ end Process;
+end ConfTest;],
+ [cf_cv_gnat_sigint=yes],
+ [cf_cv_gnat_sigint=no])])
+
+if test $cf_cv_gnat_sigint = yes ; then
+ USE_GNAT_SIGINT=""
+else
+ USE_GNAT_SIGINT="#"
+fi
+AC_SUBST(USE_GNAT_SIGINT)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45
dnl ----------------
dnl Verify that a test program compiles/links with GNAT.
dnl $cf_ada_make is set to the program that compiles/links
@@ -1574,7 +1994,7 @@ 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*
+rm -rf conftest* *~conftest*
cat >>conftest.ads <<CF_EOF
$1
CF_EOF
@@ -1586,10 +2006,10 @@ ifelse($3,, :,[ $3])
ifelse($4,,,[else
$4])
fi
-rm -f conftest*
+rm -rf conftest* *~conftest*
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_TRY_RUN version: 3 updated: 2004/08/21 19:02:08
+dnl CF_GNAT_TRY_RUN version: 5 updated: 2011/03/19 14:47:45
dnl ---------------
dnl Verify that a test program compiles and runs with GNAT
dnl $cf_ada_make is set to the program that compiles/links
@@ -1601,7 +2021,7 @@ 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*
+rm -rf conftest* *~conftest*
cat >>conftest.ads <<CF_EOF
$1
CF_EOF
@@ -1617,35 +2037,28 @@ ifelse($4,,,[ else
ifelse($4,,,[else
$4])
fi
-rm -f conftest*
+rm -rf conftest* *~conftest*
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_VERSION version: 12 updated: 2006/10/14 15:23:15
+dnl CF_GNAT_VERSION version: 17 updated: 2011/03/23 20:24:41
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/ .*//'`
+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=
- ;;
+case $cf_gnat_version in #(vi
+3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi
+ cf_cv_prog_gnat_correct=yes
+ ;;
+*)
+ AC_MSG_WARN(Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding.)
+ cf_cv_prog_gnat_correct=no
+ ;;
esac
])
dnl ---------------------------------------------------------------------------
@@ -1679,7 +2092,7 @@ make an error
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:46
+dnl CF_GPP_LIBRARY version: 10 updated: 2010/05/29 16:31:02
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
@@ -1698,13 +2111,13 @@ esac
if test "$GXX" = yes; then
AC_MSG_CHECKING([for lib$cf_gpp_libname])
cf_save="$LIBS"
- LIBS="$LIBS -l$cf_gpp_libname"
+ CF_ADD_LIB($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"
+ CF_ADD_LIB($cf_gpp_libname,CXXLIBS)
if test "$cf_gpp_libname" = cpp ; then
AC_DEFINE(HAVE_GPP_BUILTIN_H)
else
@@ -1715,7 +2128,7 @@ if test "$GXX" = yes; then
],
[two_arg_error_handler_t foo2 = lib_error_handler],
[cf_cxx_library=yes
- CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ CF_ADD_LIB($cf_gpp_libname,CXXLIBS)
AC_DEFINE(HAVE_BUILTIN_H)],
[cf_cxx_library=no])])
LIBS="$cf_save"
@@ -1723,7 +2136,7 @@ if test "$GXX" = yes; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GXX_VERSION version: 5 updated: 2005/08/27 09:53:42
+dnl CF_GXX_VERSION version: 6 updated: 2010/10/23 15:44:18
dnl --------------
dnl Check for version of g++
AC_DEFUN([CF_GXX_VERSION],[
@@ -1731,13 +2144,13 @@ 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' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+ GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
test -z "$GXX_VERSION" && GXX_VERSION=unknown
AC_MSG_RESULT($GXX_VERSION)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GXX_WARNINGS version: 5 updated: 2005/08/13 14:54:38
+dnl CF_GXX_WARNINGS version: 6 updated: 2010/08/14 18:25:37
dnl ---------------
dnl Check if the compiler supports useful warning options.
dnl
@@ -1848,12 +2261,12 @@ then
CXXFLAGS="$cf_save_CXXFLAGS"
fi
-rm -f conftest*
+rm -rf conftest*
AC_LANG_RESTORE
AC_SUBST(EXTRA_CXXFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_HASHED_DB version: 3 updated: 2007/11/24 17:43:37
+dnl CF_HASHED_DB version: 4 updated: 2010/05/29 16:31:02
dnl ------------
dnl Look for an instance of the Berkeley hashed database.
dnl
@@ -1880,7 +2293,7 @@ else
if test "$cf_cv_hashed_db_libs" = unknown ; then
AC_MSG_ERROR(Cannot determine library for db)
elif test "$cf_cv_hashed_db_libs" != default ; then
- LIBS="-l$cf_cv_hashed_db_libs $LIBS"
+ CF_ADD_LIB($cf_cv_hashed_db_libs)
fi
fi
],[
@@ -1888,7 +2301,7 @@ fi
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_HASHED_DB_LIBS version: 8 updated: 2008/08/04 06:18:06
+dnl CF_HASHED_DB_LIBS version: 9 updated: 2010/05/29 16:31:02
dnl -----------------
dnl Given that we have the header and version for hashed database, find the
dnl library information.
@@ -1900,7 +2313,7 @@ for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db '
do
cf_save_libs="$LIBS"
if test -n "$cf_db_libs"; then
- LIBS="-l$cf_db_libs $LIBS"
+ CF_ADD_LIB($cf_db_libs)
fi
CF_MSG_LOG(checking for library "$cf_db_libs")
AC_TRY_LINK([
@@ -1998,11 +2411,35 @@ done
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59
+dnl CF_HEADER_PATH version: 12 updated: 2010/05/05 05:22:40
dnl --------------
-dnl Construct a search-list for a nonstandard header-file
+dnl Construct a search-list of directories for a nonstandard header-file
+dnl
+dnl Parameters
+dnl $1 = the variable to return as result
+dnl $2 = the package name
AC_DEFUN([CF_HEADER_PATH],
-[CF_SUBDIR_PATH($1,$2,include)
+[
+$1=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in #(vi
+ -I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+ CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE)
+ cf_header_path_list="$cf_header_path_list [$]$1"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+CF_SUBDIR_PATH($1,$2,include)
+
test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
test -d "$includedir" && {
@@ -2017,6 +2454,7 @@ test -d "$oldincludedir" && {
test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"
}
+$1="[$]$1 $cf_header_path_list"
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
@@ -2026,7 +2464,7 @@ AC_DEFUN([CF_HELP_MESSAGE],
[AC_DIVERT_HELP([$1])dnl
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INCLUDE_DIRS version: 5 updated: 2006/10/14 15:23:15
+dnl CF_INCLUDE_DIRS version: 6 updated: 2009/01/06 19:37:40
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
@@ -2034,9 +2472,9 @@ 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"
+CPPFLAGS="$CPPFLAGS -I. -I../include"
if test "$srcdir" != "."; then
- CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
fi
if test "$GCC" != yes; then
CPPFLAGS="$CPPFLAGS -I\${includedir}"
@@ -2052,7 +2490,7 @@ fi
AC_SUBST(CPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 3 updated: 2005/08/06 18:37:29
+dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@@ -2066,24 +2504,24 @@ dnl $1 = GCC (default) or GXX
dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
dnl $3 = CFLAGS (default) or CXXFLAGS
AC_DEFUN([CF_INTEL_COMPILER],[
-ifelse($2,,INTEL_COMPILER,[$2])=no
+ifelse([$2],,INTEL_COMPILER,[$2])=no
-if test "$ifelse($1,,[$1],GCC)" = yes ; then
+if test "$ifelse([$1],,[$1],GCC)" = yes ; then
case $host_os in
linux*|gnu*)
- AC_MSG_CHECKING(if this is really Intel ifelse($1,GXX,C++,C) compiler)
- cf_save_CFLAGS="$ifelse($3,,CFLAGS,[$3])"
- ifelse($3,,CFLAGS,[$3])="$ifelse($3,,CFLAGS,[$3]) -no-gcc"
+ AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
+ cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
+ ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
AC_TRY_COMPILE([],[
#ifdef __INTEL_COMPILER
#else
make an error
#endif
-],[ifelse($2,,INTEL_COMPILER,[$2])=yes
+],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
],[])
- ifelse($3,,CFLAGS,[$3])="$cf_save_CFLAGS"
- AC_MSG_RESULT($ifelse($2,,INTEL_COMPILER,[$2]))
+ ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
+ AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
;;
esac
fi
@@ -2143,7 +2581,7 @@ ifdef([AC_FUNC_FSEEKO],[
])
])
dnl ---------------------------------------------------------------------------
-dnl CF_LDFLAGS_STATIC version: 4 updated: 2008/10/18 17:58:20
+dnl CF_LDFLAGS_STATIC version: 8 updated: 2010/10/23 14:39:56
dnl -----------------
dnl Check for compiler/linker flags used to temporarily force usage of static
dnl libraries. This depends on the compiler and platform. Use this to help
@@ -2153,7 +2591,7 @@ AC_DEFUN([CF_LDFLAGS_STATIC],[
if test "$GCC" = yes ; then
case $cf_cv_system_name in #(
- OS/2*|os2*|aix[[45]]*) #( vi
+ OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]]|darwin*) #( vi
LDFLAGS_STATIC=
LDFLAGS_SHARED=
;;
@@ -2164,7 +2602,7 @@ if test "$GCC" = yes ; then
esac
else
case $cf_cv_system_name in #(
- aix[[45]]*) #( from ld manpage
+ aix[[456]]*) #( from ld manpage
LDFLAGS_STATIC=-bstatic
LDFLAGS_SHARED=-bdynamic
;;
@@ -2179,7 +2617,7 @@ else
;;
osf[[45]]*) #( from ld manpage osf4.0d, osf5.1
# alternative "-oldstyle_liblookup" (not in cc manpage)
- LDFLAGS_STATIC=-noso
+ LDFLAGS_STATIC=-noso
LDFLAGS_SHARED=-so_archive
;;
solaris2*)
@@ -2189,15 +2627,134 @@ else
esac
fi
+if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
+then
+ AC_MSG_CHECKING(if linker supports switching between static/dynamic)
+
+ rm -f libconftest.a
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+#include <stdio.h>
+int cf_ldflags_static(FILE *fp) { return fflush(fp); }
+EOF
+ if AC_TRY_EVAL(ac_compile) ; then
+ ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&AC_FD_CC 1>/dev/null
+ ( eval $RANLIB libconftest.a ) 2>&AC_FD_CC >/dev/null
+ fi
+ rm -f conftest.*
+
+ cf_save_LIBS="$LIBS"
+
+ LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
+ AC_TRY_LINK([
+#line __oline__ "configure"
+#include <stdio.h>
+int cf_ldflags_static(FILE *fp);
+],[
+ return cf_ldflags_static(stdin);
+],[cf_ldflags_static=yes],[cf_ldflags_static=no])
+
+ rm -f libconftest.*
+ LIBS="$cf_save_LIBS"
+
+ AC_MSG_RESULT($cf_ldflags_static)
+
+ if test $cf_ldflags_static != yes
+ then
+ LDFLAGS_STATIC=
+ LDFLAGS_SHARED=
+ fi
+else
+ LDFLAGS_STATIC=
+ LDFLAGS_SHARED=
+fi
+
AC_SUBST(LDFLAGS_STATIC)
AC_SUBST(LDFLAGS_SHARED)
])
dnl ---------------------------------------------------------------------------
-dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59
+dnl CF_LD_RPATH_OPT version: 3 updated: 2010/06/02 05:03:05
dnl ---------------
-dnl Construct a search-list for a nonstandard library-file
+dnl For the given system and compiler, find the compiler flags to pass to the
+dnl loader to use the "rpath" feature.
+AC_DEFUN([CF_LD_RPATH_OPT],
+[
+AC_REQUIRE([CF_CHECK_CACHE])
+
+LD_RPATH_OPT=
+AC_MSG_CHECKING(for an rpath option)
+case $cf_cv_system_name in #(vi
+irix*) #(vi
+ if test "$GCC" = yes; then
+ LD_RPATH_OPT="-Wl,-rpath,"
+ else
+ LD_RPATH_OPT="-rpath "
+ fi
+ ;;
+linux*|gnu*|k*bsd*-gnu) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+openbsd[[2-9]].*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+freebsd*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+netbsd*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+osf*|mls+*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+solaris2*) #(vi
+ LD_RPATH_OPT="-R"
+ ;;
+*)
+ ;;
+esac
+AC_MSG_RESULT($LD_RPATH_OPT)
+
+case "x$LD_RPATH_OPT" in #(vi
+x-R*)
+ AC_MSG_CHECKING(if we need a space after rpath option)
+ cf_save_LIBS="$LIBS"
+ CF_ADD_LIBS(${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 && LD_RPATH_OPT="$LD_RPATH_OPT "
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_LIBRARY_PATH version: 9 updated: 2010/03/28 12:52:50
+dnl ---------------
+dnl Construct a search-list of directories for a nonstandard library-file
+dnl
+dnl Parameters
+dnl $1 = the variable to return as result
+dnl $2 = the package name
AC_DEFUN([CF_LIBRARY_PATH],
-[CF_SUBDIR_PATH($1,$2,lib)])dnl
+[
+$1=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in #(vi
+ -L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+ CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE)
+ cf_library_path_list="$cf_library_path_list [$]$1"
+ ;;
+ esac
+ done
+fi
+
+CF_SUBDIR_PATH($1,$2,lib)
+
+$1="$cf_library_path_list [$]$1"
+])dnl
dnl ---------------------------------------------------------------------------
dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
dnl -------------
@@ -2216,7 +2773,7 @@ ifelse($1,,,[$1=$LIB_PREFIX])
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 53 updated: 2008/09/20 19:51:59
+dnl CF_LIB_RULES version: 61 updated: 2010/10/23 16:10:30
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
@@ -2239,6 +2796,23 @@ if test $cf_cv_shlib_version = cygdll ; then
TINFO_SUFFIX=.dll
fi
+if test -n "$TINFO_SUFFIX" ; then
+ case $TINFO_SUFFIX in
+ tw*)
+ TINFO_NAME="${TINFO_NAME}tw"
+ TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
+ ;;
+ t*)
+ TINFO_NAME="${TINFO_NAME}t"
+ TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
+ ;;
+ w*)
+ TINFO_NAME="${TINFO_NAME}w"
+ TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
+ ;;
+ esac
+fi
+
for cf_dir in $SRC_SUBDIRS
do
if test ! -d $srcdir/$cf_dir ; then
@@ -2257,6 +2831,14 @@ do
case "$cf_cv_system_name" in #(vi
darwin*)
case .${LIB_SUFFIX} in
+ .tw*)
+ cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+ cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
+ ;;
+ .t*)
+ cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+ cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
+ ;;
.w*)
cf_suffix=`echo $cf_suffix | sed 's/^w//'`
cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
@@ -2273,6 +2855,14 @@ do
case "$cf_cv_system_name" in #(vi
darwin*)
case .${LIB_SUFFIX} in
+ .tw*)
+ cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+ cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
+ ;;
+ .t*)
+ cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+ cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
+ ;;
.w*)
cf_suffix=`echo $cf_suffix | sed 's/^w//'`
cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
@@ -2393,6 +2983,16 @@ do
if test "$cf_cv_shlib_version_infix" = yes ; then
if test -n "$LIB_SUFFIX" ; then
case $LIB_SUFFIX in
+ tw*)
+ cf_libname=`echo $cf_libname | sed 's/tw$//'`
+ cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+ cf_dir_suffix=tw
+ ;;
+ t*)
+ cf_libname=`echo $cf_libname | sed 's/t$//'`
+ cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+ cf_dir_suffix=t
+ ;;
w*)
cf_libname=`echo $cf_libname | sed 's/w$//'`
cf_suffix=`echo $cf_suffix | sed 's/^w//'`
@@ -2410,17 +3010,19 @@ do
prefix=$cf_prefix \
suffix=$cf_suffix \
subset=$cf_subset \
+ SymLink="$LN_S" \
TermlibRoot=$TINFO_NAME \
TermlibSuffix=$TINFO_SUFFIX \
ShlibVer=$cf_cv_shlib_version \
ShlibVerInfix=$cf_cv_shlib_version_infix \
- ReLink=${cf_cv_do_relink-no} \
+ ReLink=${cf_cv_do_relink:-no} \
DoLinks=$cf_cv_do_symlinks \
rmSoLocs=$cf_cv_rm_so_locs \
ldconfig="$LDCONFIG" \
overwrite=$WITH_OVERWRITE \
depend="$cf_depend" \
host="$host" \
+ libtool_version="$LIBTOOL_VERSION" \
$srcdir/$cf_dir/modules >>$cf_dir/Makefile
cf_suffix="$old_cf_suffix"
@@ -2504,18 +3106,28 @@ cat >> Makefile <<CF_EOF
install.libs uninstall.libs \\
install.data uninstall.data ::
$MAKE_TERMINFO cd misc && \${MAKE} \${CF_MFLAGS} \[$]@
+CF_EOF
+
+if test "x$cf_with_manpages" = xyes; then
+cat >> Makefile <<CF_EOF
install.man \\
uninstall.man ::
cd man && \${MAKE} \${CF_MFLAGS} \[$]@
+CF_EOF
+fi
+
+cat >> Makefile <<CF_EOF
distclean ::
rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
rm -f headers.sh headers.sed mk_shared_lib.sh
+ rm -f edit_man.* man_alias.*
rm -rf \${DIRS_TO_MAKE}
CF_EOF
# Special case: tack's manpage lives in its own directory.
+if test "x$cf_with_manpages" = xyes; then
if test -d tack ; then
if test -f $srcdir/$tack.h; then
cat >> Makefile <<CF_EOF
@@ -2526,6 +3138,7 @@ uninstall.man ::
CF_EOF
fi
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
@@ -2551,8 +3164,8 @@ done
DST=\[$]1
REF=\[$]2
SRC=\[$]3
-TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
-TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
+TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
echo installing \$SRC in \$DST
CF_EOF
@@ -2639,10 +3252,10 @@ CF_EOF
fi
fi
done
-
+AC_SUBST(LIBS_TO_MAKE)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_SONAME version: 3 updated: 2006/12/16 15:55:46
+dnl CF_LIB_SONAME version: 5 updated: 2010/08/14 18:25:37
dnl -------------
dnl Find the and soname for the given shared library. Set the cache variable
dnl cf_cv_$3_soname to this, unless it is not found. Then set the cache
@@ -2666,20 +3279,20 @@ $2
}
CF_EOF
cf_save_LIBS="$LIBS"
- LIBS="-l$3 $LIBS"
+ CF_ADD_LIB($3)
if AC_TRY_EVAL(ac_compile) ; then
if AC_TRY_EVAL(ac_link) ; then
cf_cv_$3_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep lib$3.`
test -z "$cf_cv_$3_soname" && cf_cv_$3_soname=unknown
fi
fi
-rm -f conftest*
+rm -rf conftest*
LIBS="$cf_save_LIBS"
fi
])
])
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_SUFFIX version: 15 updated: 2008/09/13 11:54:48
+dnl CF_LIB_SUFFIX version: 16 updated: 2008/12/27 12:30:03
dnl -------------
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
@@ -2689,40 +3302,44 @@ 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)
+ case $1 in #(vi
+ libtool) #(vi
$2='.la'
$3=[$]$2
;;
- normal)
+ normal) #(vi
$2='.a'
$3=[$]$2
;;
- debug)
+ debug) #(vi
$2='_g.a'
$3=[$]$2
;;
- profile)
+ profile) #(vi
$2='_p.a'
$3=[$]$2
;;
- shared)
+ shared) #(vi
case $cf_cv_system_name in
- cygwin*)
+ aix[[56]]*) #(vi
+ $2='.a'
+ $3=[$]$2
+ ;;
+ cygwin*) #(vi
$2='.dll'
$3='.dll.a'
;;
- darwin*)
+ darwin*) #(vi
$2='.dylib'
$3=[$]$2
;;
- hpux*)
+ hpux*) #(vi
case $target in
- ia64*)
+ ia64*) #(vi
$2='.so'
$3=[$]$2
;;
- *)
+ *) #(vi
$2='.sl'
$3=[$]$2
;;
@@ -2755,7 +3372,7 @@ AC_DEFUN([CF_LIB_TYPE],
test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LINK_DATAONLY version: 8 updated: 2006/12/16 12:33:30
+dnl CF_LINK_DATAONLY version: 9 updated: 2009/01/01 20:21:38
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
@@ -2772,7 +3389,7 @@ int testdata[[3]] = { 123, 456, 789 };
EOF
if AC_TRY_EVAL(ac_compile) ; then
mv conftest.o data.o && \
- ( $AR $AR_OPTS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
+ ( $AR $ARFLAGS conftest.a data.o ) 2>&AC_FD_CC 1>/dev/null
fi
rm -f conftest.$ac_ext data.o
cat >conftest.$ac_ext <<EOF
@@ -2791,7 +3408,7 @@ int testfunc()
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
+ ( $AR $ARFLAGS 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
@@ -2887,7 +3504,7 @@ AC_DEFUN([CF_MAIN_RETURN],
cf_cv_main_return=return
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MAKEFLAGS version: 12 updated: 2006/10/21 08:27:03
+dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
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.
@@ -2904,10 +3521,10 @@ SHELL = /bin/sh
all :
@ echo '.$cf_option'
CF_EOF
- cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[[ ]]*$,,'`
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'`
case "$cf_result" in
.*k)
- cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
case "$cf_result" in
.*CC=*) cf_cv_makeflags=
;;
@@ -2927,16 +3544,20 @@ CF_EOF
AC_SUBST(cf_cv_makeflags)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40
+dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32
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)
+
+AC_CHECK_PROGS(CTAGS, exctags ctags)
+AC_CHECK_PROGS(ETAGS, exetags etags)
+
+AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no)
if test "$cf_cv_mixedcase" = yes ; then
- AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)
+ AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no)
else
MAKE_UPPER_TAGS=no
fi
@@ -2946,17 +3567,21 @@ if test "$MAKE_UPPER_TAGS" = yes ; then
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(CTAGS)
+AC_SUBST(ETAGS)
+
+AC_SUBST(MAKE_UPPER_TAGS)
AC_SUBST(MAKE_LOWER_TAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MANPAGE_FORMAT version: 7 updated: 2003/12/20 19:30:34
+dnl CF_MANPAGE_FORMAT version: 9 updated: 2010/10/23 16:10:30
dnl -----------------
dnl Option to allow user to override automatic configuration of manpage format.
dnl There are several special cases:
@@ -2998,7 +3623,7 @@ unknown)
cf_catonly=yes
cf_example=date
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
+ IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
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
@@ -3112,7 +3737,7 @@ 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 CF_MANPAGE_SYMLINKS version: 5 updated: 2010/07/24 17:12:40
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
@@ -3128,11 +3753,14 @@ AC_ARG_WITH(manpage-aliases,
AC_MSG_RESULT($MANPAGE_ALIASES)
-if test "$LN_S" = "ln -s"; then
+case "x$LN_S" in #(vi
+xln*) #(vi
cf_use_symlinks=yes
-else
+ ;;
+*)
cf_use_symlinks=no
-fi
+ ;;
+esac
MANPAGE_SYMLINKS=no
if test "$MANPAGE_ALIASES" = yes ; then
@@ -3171,7 +3799,7 @@ AC_ARG_WITH(manpage-tbl,
AC_MSG_RESULT($MANPAGE_TBL)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MAN_PAGES version: 35 updated: 2007/03/31 11:47:29
+dnl CF_MAN_PAGES version: 39 updated: 2010/10/23 15:44:18
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
@@ -3214,7 +3842,7 @@ case "$MANPAGE_FORMAT" in #(vi
cf_so_strip="Z"
cf_compress=compress
;;
-*gzip*) #(vi
+*gzip*)
cf_so_strip="gz"
cf_compress=gzip
;;
@@ -3237,14 +3865,12 @@ NCURSES_PATCH="$NCURSES_PATCH"
NCURSES_OSPEED="$NCURSES_OSPEED"
TERMINFO="$TERMINFO"
-MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
-
INSTALL="$INSTALL"
INSTALL_DATA="$INSTALL_DATA"
transform="$program_transform_name"
-TMP=\${TMPDIR-/tmp}/man\$\$
+TMP=\${TMPDIR:=/tmp}/man\$\$
trap "rm -f \$TMP" 0 1 2 5 15
form=\[$]1
@@ -3282,7 +3908,7 @@ case \$i in #(vi
section=\`expr "\$i" : '.*\\.\\([[0-9]]\\)[[xm]]*'\`;
if test \$verb = installing ; then
if test ! -d \$cf_subdir\${section} ; then
- \$MKDIRS \$cf_subdir\$section
+ mkdir -p \$cf_subdir\$section
fi
fi
@@ -3302,7 +3928,7 @@ CF_EOF
cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
cf_name=`echo $cf_name|sed "$program_transform_name"`
cat >>$cf_edit_man <<-CF_EOF
- s,@$cf_NAME@,$cf_name,
+ s,@$cf_NAME@,$cf_name,g
CF_EOF
done
])
@@ -3431,8 +4057,21 @@ cat >>$cf_edit_man <<CF_EOF
fi
fi
echo .. \$verb alias \$cf_alias\${suffix}
+CF_EOF
+case "x$LN_S" in #(vi
+*-f) #(vi
+cat >>$cf_edit_man <<CF_EOF
+ $LN_S \$cf_target \$cf_alias\${suffix}
+CF_EOF
+ ;;
+*)
+cat >>$cf_edit_man <<CF_EOF
rm -f \$cf_alias\${suffix}
$LN_S \$cf_target \$cf_alias\${suffix}
+CF_EOF
+ ;;
+esac
+cat >>$cf_edit_man <<CF_EOF
elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
echo ".so \$cf_source" >\$TMP
CF_EOF
@@ -3491,7 +4130,7 @@ chmod 755 $cf_edit_man
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MATH_LIB version: 5 updated: 2000/05/28 01:39:10
+dnl CF_MATH_LIB version: 8 updated: 2010/05/29 16:31:02
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
@@ -3504,13 +4143,13 @@ AC_CACHE_CHECK(if -lm needed for math functions,
#include <stdio.h>
#include <math.h>
],
- [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)],
+ [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"
+ CF_ADD_LIB(m)
],[$1=-lm])
fi
])
@@ -3545,13 +4184,13 @@ fi
test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MKSTEMP version: 5 updated: 2006/12/16 12:33:30
+dnl CF_MKSTEMP version: 7 updated: 2010/08/14 18:25:37
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*
+rm -rf conftest*
AC_TRY_RUN([
#include <sys/types.h>
#include <stdlib.h>
@@ -3590,17 +4229,17 @@ int main()
],[AC_CHECK_FUNC(mkstemp)
])
])
-if test "$cf_cv_func_mkstemp" = yes ; then
+if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
AC_DEFINE(HAVE_MKSTEMP)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12
+dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32
dnl ----------
dnl Write a debug message to config.log, along with the line number in the
dnl configure script.
AC_DEFUN([CF_MSG_LOG],[
-echo "${as_me-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
+echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_NCURSES_ABI_6 version: 1 updated: 2005/09/17 18:42:49
@@ -3687,20 +4326,20 @@ AC_DEFUN([CF_OBJ_SUBDIR],
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:53
+dnl CF_PATHSEP version: 5 updated: 2010/05/26 05:38:42
dnl ----------
dnl Provide a value for the $PATH and similar separator
AC_DEFUN([CF_PATHSEP],
[
case $cf_cv_system_name in
- os2*) PATHSEP=';' ;;
- *) PATHSEP=':' ;;
+ os2*) PATH_SEPARATOR=';' ;;
+ *) PATH_SEPARATOR=':' ;;
esac
-ifelse($1,,,[$1=$PATHSEP])
- AC_SUBST(PATHSEP)
+ifelse([$1],,,[$1=$PATH_SEPARATOR])
+ AC_SUBST(PATH_SEPARATOR)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATH_SYNTAX version: 12 updated: 2008/03/23 14:45:59
+dnl CF_PATH_SYNTAX version: 13 updated: 2010/05/26 05:38:42
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
@@ -3732,12 +4371,44 @@ case ".[$]$1" in #(vi
$1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- ifelse($2,,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
+ ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_POSIX_C_SOURCE version: 6 updated: 2005/07/14 20:25:10
+dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24
+dnl -------------
+dnl Check for the package-config program, unless disabled by command-line.
+AC_DEFUN([CF_PKG_CONFIG],
+[
+AC_MSG_CHECKING(if you want to use pkg-config)
+AC_ARG_WITH(pkg-config,
+ [ --with-pkg-config{=path} enable/disable use of pkg-config],
+ [cf_pkg_config=$withval],
+ [cf_pkg_config=yes])
+AC_MSG_RESULT($cf_pkg_config)
+
+case $cf_pkg_config in #(vi
+no) #(vi
+ PKG_CONFIG=none
+ ;;
+yes) #(vi
+ AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
+ ;;
+*)
+ PKG_CONFIG=$withval
+ ;;
+esac
+
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
+ CF_PATH_SYNTAX(PKG_CONFIG)
+fi
+
+AC_SUBST(PKG_CONFIG)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42
dnl -----------------
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
dnl
@@ -3753,7 +4424,7 @@ dnl Parameters:
dnl $1 is the nominal value for _POSIX_C_SOURCE
AC_DEFUN([CF_POSIX_C_SOURCE],
[
-cf_POSIX_C_SOURCE=ifelse($1,,199506L,$1)
+cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1])
cf_save_CFLAGS="$CFLAGS"
cf_save_CPPFLAGS="$CPPFLAGS"
@@ -3805,17 +4476,12 @@ make an error
if test "$cf_cv_posix_c_source" != no ; then
CFLAGS="$cf_trim_CFLAGS"
CPPFLAGS="$cf_trim_CPPFLAGS"
- if test "$cf_cv_cc_u_d_options" = yes ; then
- cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
- sed -e 's/-D/-U/g' -e 's/=[[^ ]]*//g'`
- CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
- fi
- CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
+ CF_ADD_CFLAGS($cf_cv_posix_c_source)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PREDEFINE version: 1 updated: 2003/07/26 17:53:56
+dnl CF_PREDEFINE version: 2 updated: 2010/05/26 16:44:57
dnl ------------
dnl Add definitions to CPPFLAGS to ensure they're predefined for all compiles.
dnl
@@ -3832,7 +4498,7 @@ make an error
AC_MSG_RESULT($cf_result)
if test "$cf_result" = yes ; then
- CPPFLAGS="$CPPFLAGS ifelse($2,,-D$1,[-D$1=$2])"
+ 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>
@@ -3872,6 +4538,13 @@ done
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22
+dnl ----------
+dnl Check for archiver "ar".
+AC_DEFUN([CF_PROG_AR],[
+AC_CHECK_TOOL(AR, ar, ar)
+])
+dnl ---------------------------------------------------------------------------
dnl CF_PROG_AWK version: 1 updated: 2006/09/16 11:40:59
dnl -----------
dnl Check for awk, ensure that the check found something.
@@ -3881,7 +4554,7 @@ AC_PROG_AWK
test -z "$AWK" && AC_MSG_ERROR(No awk program found)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_CC_C_O version: 2 updated: 2006/12/16 15:55:46
+dnl CF_PROG_CC_C_O version: 3 updated: 2010/08/14 18:25:37
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
@@ -3911,7 +4584,7 @@ then
else
eval cf_cv_prog_$1_c_o=no
fi
-rm -f conftest*
+rm -rf conftest*
])dnl
if test $cf_cv_prog_$1_c_o = yes; then
AC_MSG_RESULT([yes])
@@ -3985,6 +4658,39 @@ AC_SUBST(PROG_EXT)
test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_PROG_GNAT version: 1 updated: 2010/06/19 15:22:18
+dnl ------------
+dnl Check for gnatmake, ensure that it is complete.
+AC_DEFUN([CF_PROG_GNAT],[
+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
+
+AC_SUBST(cf_ada_make)
+])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
@@ -4003,7 +4709,7 @@ case $INSTALL in
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_LDCONFIG version: 1 updated: 2003/09/20 17:07:55
+dnl CF_PROG_LDCONFIG version: 2 updated: 2008/12/13 14:08:40
dnl ----------------
dnl Check for ldconfig, needed to fixup shared libraries that would be built
dnl and then used in the install.
@@ -4012,7 +4718,7 @@ if test "$cross_compiling" = yes ; then
LDCONFIG=:
else
case "$cf_cv_system_name" in #(vi
-freebsd*) #(vi
+dragonfly*|freebsd*) #(vi
test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
;;
*) LDPATH=$PATH:/sbin:/usr/sbin
@@ -4023,49 +4729,117 @@ fi
AC_SUBST(LDCONFIG)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_LINT version: 1 updated: 2006/09/16 11:40:59
+dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
dnl ------------
AC_DEFUN([CF_PROG_LINT],
[
-AC_CHECK_PROGS(LINT, tdlint lint alint)
+AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
AC_SUBST(LINT_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_REGEX version: 3 updated: 1997/11/01 14:26:01
+dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37
+dnl ------------
+dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f"
+dnl option if it is supported.
+AC_DEFUN([CF_PROG_LN_S],[
+AC_PROG_LN_S
+AC_MSG_CHECKING(if $LN_S -f options work)
+
+rm -f conf$$.src conf$$dst
+echo >conf$$.dst
+echo first >conf$$.src
+if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
+ cf_prog_ln_sf=yes
+else
+ cf_prog_ln_sf=no
+fi
+rm -f conf$$.dst conf$$src
+AC_MSG_RESULT($cf_prog_ln_sf)
+
+test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_REGEX version: 8 updated: 2010/08/07 14:09:44
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("", "", "");
+
+cf_regex_func=no
+
+cf_regex_libs="regex re"
+case $host_os in #(vi
+mingw*)
+ cf_regex_libs="regex.dll $cf_regex_libs"
+ ;;
+esac
+
+AC_CHECK_FUNC(regcomp,[cf_regex_func=regcomp],[
+ for cf_regex_lib in $cf_regex_libs
+ do
+ AC_CHECK_LIB($cf_regex_lib,regcomp,[
+ CF_ADD_LIB($cf_regex_lib)
+ cf_regex_func=regcomp
+ break])
+ done
+])
+
+if test "$cf_regex_func" = no ; then
+ AC_CHECK_FUNC(compile,[cf_regex_func=compile],[
+ AC_CHECK_LIB(gen,compile,[
+ CF_ADD_LIB(gen)
+ cf_regex_func=compile])])
+fi
+
+if test "$cf_regex_func" = no ; then
+ AC_MSG_WARN(cannot find regular expression library)
+fi
+
+AC_CACHE_CHECK(for regular-expression headers,cf_cv_regex_hdrs,[
+
+cf_cv_regex_hdrs=no
+case $cf_regex_func in #(vi
+compile) #(vi
+ for cf_regex_hdr in regexp.h regexpr.h
+ do
+ AC_TRY_LINK([#include <$cf_regex_hdr>],[
+ char *p = compile("", "", "", 0);
int x = step("", "");
- ],[cf_cv_regex="regexpr.h"],[LIBS="$cf_save_LIBS"])])])
+ ],[
+ cf_cv_regex_hdrs=$cf_regex_hdr
+ break
+ ])
+ done
+ ;;
+*)
+ for cf_regex_hdr in regex.h
+ do
+ AC_TRY_LINK([#include <sys/types.h>
+#include <$cf_regex_hdr>],[
+ regex_t *p;
+ int x = regcomp(p, "", 0);
+ int y = regexec(p, "", 0, 0, 0);
+ regfree(p);
+ ],[
+ cf_cv_regex_hdrs=$cf_regex_hdr
+ break
+ ])
+ done
+ ;;
+esac
+
])
-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) ;;
+
+case $cf_cv_regex_hdrs in #(vi
+ no) AC_MSG_WARN(no regular expression header found) ;; #(vi
+ regex.h) AC_DEFINE(HAVE_REGEX_H_FUNCS) ;; #(vi
+ regexp.h) AC_DEFINE(HAVE_REGEXP_H_FUNCS) ;; #(vi
+ regexpr.h) AC_DEFINE(HAVE_REGEXPR_H_FUNCS) ;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_REMOVE_DEFINE version: 2 updated: 2005/07/09 16:12:18
+dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
dnl ----------------
dnl Remove all -U and -D options that refer to the given symbol from a list
dnl of C compiler options. This works around the problem that not all
@@ -4077,10 +4851,9 @@ dnl $2 = source (including '$')
dnl $3 = symbol to remove
define([CF_REMOVE_DEFINE],
[
-# remove $3 symbol from $2
$1=`echo "$2" | \
- sed -e 's/-[[UD]]$3\(=[[^ ]]*\)\?[[ ]]/ /g' \
- -e 's/-[[UD]]$3\(=[[^ ]]*\)\?[$]//g'`
+ sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \
+ -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_REMOVE_LIB version: 1 updated: 2007/02/17 14:11:52
@@ -4096,58 +4869,122 @@ define([CF_REMOVE_LIB],
$1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_RPATH_HACK version: 4 updated: 2008/09/13 12:53:26
+dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33
dnl -------------
AC_DEFUN([CF_RPATH_HACK],
[
-AC_REQUIRE([CF_SHARED_OPTS])
+AC_REQUIRE([CF_LD_RPATH_OPT])
AC_MSG_CHECKING(for updated LDFLAGS)
-if test -n "$LDFLAGS" ; then
-AC_MSG_RESULT(maybe)
-CF_VERBOSE(...checking LDFLAGS $LDFLAGS)
-CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
-case "$EXTRA_LDFLAGS" in #(vi
--Wl,-rpath,*) #(vi
- cf_rpath_hack="-Wl,-rpath,"
- ;;
--R\ *)
- cf_rpath_hack="-R "
- ;;
--R*)
- cf_rpath_hack="-R"
- ;;
-*)
- cf_rpath_hack=
- ;;
-esac
-if test -n "$cf_rpath_hack" ; then
- cf_rpath_dst=
- for cf_rpath_src in $LDFLAGS
- do
- CF_VERBOSE(Filtering $cf_rpath_src)
- case $cf_rpath_src in #(vi
- -L*) #(vi
- if test "$cf_rpath_hack" = "-R " ; then
- cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
- else
- cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
- fi
- CF_VERBOSE(...Filter $cf_rpath_tmp)
- EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
- ;;
- esac
- cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
- done
- LDFLAGS=$cf_rpath_dst
- CF_VERBOSE(...checked LDFLAGS $LDFLAGS)
+if test -n "$LD_RPATH_OPT" ; then
+ AC_MSG_RESULT(maybe)
+
+ AC_CHECK_PROGS(cf_ldd_prog,ldd,no)
+ cf_rpath_list="/usr/lib /lib"
+ if test "$cf_ldd_prog" != no
+ then
+ cf_rpath_oops=
+
+AC_TRY_LINK([#include <stdio.h>],
+ [printf("Hello");],
+ [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
+ cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`])
+
+ # If we passed the link-test, but get a "not found" on a given library,
+ # this could be due to inept reconfiguration of gcc to make it only
+ # partly honor /usr/local/lib (or whatever). Sometimes this behavior
+ # is intentional, e.g., installing gcc in /usr/bin and suppressing the
+ # /usr/local libraries.
+ if test -n "$cf_rpath_oops"
+ then
+ for cf_rpath_src in $cf_rpath_oops
+ do
+ for cf_rpath_dir in \
+ /usr/local \
+ /usr/pkg \
+ /opt/sfw
+ do
+ if test -f $cf_rpath_dir/lib/$cf_rpath_src
+ then
+ CF_VERBOSE(...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src)
+ LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
+ break
+ fi
+ done
+ done
+ fi
+ fi
+
+ CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
+
+ CF_RPATH_HACK_2(LDFLAGS)
+ CF_RPATH_HACK_2(LIBS)
+
CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
fi
-else
-AC_MSG_RESULT(no)
-fi
+AC_SUBST(EXTRA_LDFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_RPATH_HACK_2 version: 6 updated: 2010/04/17 16:31:24
+dnl ---------------
+dnl Do one set of substitutions for CF_RPATH_HACK, adding an rpath option to
+dnl EXTRA_LDFLAGS for each -L option found.
+dnl
+dnl $cf_rpath_list contains a list of directories to ignore.
+dnl
+dnl $1 = variable name to update. The LDFLAGS variable should be the only one,
+dnl but LIBS often has misplaced -L options.
+AC_DEFUN([CF_RPATH_HACK_2],
+[
+CF_VERBOSE(...checking $1 [$]$1)
+
+cf_rpath_dst=
+for cf_rpath_src in [$]$1
+do
+ case $cf_rpath_src in #(vi
+ -L*) #(vi
+
+ # check if this refers to a directory which we will ignore
+ cf_rpath_skip=no
+ if test -n "$cf_rpath_list"
+ then
+ for cf_rpath_item in $cf_rpath_list
+ do
+ if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
+ then
+ cf_rpath_skip=yes
+ break
+ fi
+ done
+ fi
+
+ if test "$cf_rpath_skip" = no
+ then
+ # transform the option
+ if test "$LD_RPATH_OPT" = "-R " ; then
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
+ else
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
+ fi
+
+ # if we have not already added this, add it now
+ cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
+ if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
+ then
+ CF_VERBOSE(...Filter $cf_rpath_src ->$cf_rpath_tmp)
+ EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ fi
+ fi
+ ;;
+ esac
+ cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
+done
+$1=$cf_rpath_dst
+
+CF_VERBOSE(...checked $1 [$]$1)
+AC_SUBST(EXTRA_LDFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 53 updated: 2008/10/25 18:14:20
+dnl CF_SHARED_OPTS version: 64 updated: 2010/06/05 16:51:16
dnl --------------
dnl --------------
dnl Attempt to determine the appropriate CC/LD options for creating a shared
@@ -4174,12 +5011,15 @@ 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])
+ AC_REQUIRE([CF_LD_RPATH_OPT])
LOCAL_LDFLAGS=
LOCAL_LDFLAGS2=
LD_SHARED_OPTS=
INSTALL_LIB="-m 644"
cf_cv_do_symlinks=no
+ cf_ld_rpath_opt=
+ test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
AC_MSG_CHECKING(if release/abi version should be used for shared libs)
AC_ARG_WITH(shlib-version,
@@ -4218,11 +5058,17 @@ AC_DEFUN([CF_SHARED_OPTS],
cf_cv_shlib_version_infix=no
- case $cf_cv_system_name in
- beos*)
+ case $cf_cv_system_name in #(vi
+ aix[[56]]*) #(vi
+ if test "$GCC" = yes; then
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='$(CC) -shared'
+ fi
+ ;;
+ beos*) #(vi
MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
;;
- cygwin*)
+ cygwin*) #(vi
CC_SHARED_OPTS=
MK_SHARED_LIB='sh ../mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
cf_cv_shlib_version=cygdll
@@ -4239,9 +5085,9 @@ AC_DEFUN([CF_SHARED_OPTS],
EOF
exec \[$]* -shared -Wl,--out-implib=../lib/\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\[$]{SHARED_LIB}
CF_EOF
- chmod +x mk_shared_lib.sh
+ chmod +x mk_shared_lib.sh
;;
- darwin*)
+ darwin*) #(vi
EXTRA_CFLAGS="-no-cpp-precomp"
CC_SHARED_OPTS="-dynamic"
MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
@@ -4256,7 +5102,7 @@ CF_EOF
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
fi
;;
- hpux*)
+ hpux*) #(vi
# (tested with gcc 2.7.2 -- I don't have c89)
if test "$GCC" = yes; then
LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
@@ -4269,15 +5115,9 @@ CF_EOF
# readonly to exploit a quirk in the memory manager.
INSTALL_LIB="-m 555"
;;
- irix*)
- if test "$cf_cv_ld_rpath" = yes ; then
- if test "$GCC" = yes; then
- cf_ld_rpath_opt="-Wl,-rpath,"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- else
- cf_ld_rpath_opt="-rpath "
- EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
- fi
+ irix*) #(vi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
# tested with IRIX 5.2 and 'cc'.
if test "$GCC" != yes; then
@@ -4288,54 +5128,50 @@ CF_EOF
fi
cf_cv_rm_so_locs=yes
;;
- linux*|gnu*|k*bsd*-gnu)
+ linux*|gnu*|k*bsd*-gnu) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then
- LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
- if test "$cf_cv_ld_rpath" = yes ; then
- cf_ld_rpath_opt="-Wl,-rpath,"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
CF_SHARED_SONAME
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
- openbsd[[2-9]].*)
+ openbsd[[2-9]].*) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then
- LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
- if test "$cf_cv_ld_rpath" = yes ; then
- cf_ld_rpath_opt="-Wl,-rpath,"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
CF_SHARED_SONAME
- MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
- nto-qnx*|openbsd*|freebsd[[12]].*)
+ nto-qnx*|openbsd*|freebsd[[12]].*) #(vi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- freebsd*)
+ freebsd*) #(vi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
- if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
- LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
- LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
- cf_ld_rpath_opt="-rpath "
- EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
CF_SHARED_SONAME
- MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $[@]` -o $[@]'
+ MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
;;
- netbsd*)
+ netbsd*) #(vi
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,\$(LOCAL_LIBDIR)"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
if test "$cf_cv_shlib_version" = auto; then
if test -f /usr/libexec/ld.elf_so; then
cf_cv_shlib_version=abi
@@ -4346,37 +5182,33 @@ CF_EOF
CF_SHARED_SONAME
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
else
- MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ MK_SHARED_LIB='${LD} -shared -Bshareable -o $[@]'
fi
;;
- osf*|mls+*)
+ osf*|mls+*) #(vi
# 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
+ case $host_os in #(vi
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,\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
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
+ 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
+ if test "$cf_cv_enable_rpath" = yes ; then
# only way is to set LD_RUN_PATH but no switch for it
RUN_PATH=$libdir
fi
@@ -4384,7 +5216,7 @@ CF_EOF
LINK_PROGS='LD_RUN_PATH=${libdir}'
LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
;;
- sunos4*)
+ sunos4*) #(vi
# tested with SunOS 4.1.1 and gcc 2.7.0
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
@@ -4392,26 +5224,32 @@ CF_EOF
MK_SHARED_LIB='${LD} -assert pure-text -o $[@]'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- solaris2*)
+ solaris2*) #(vi
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${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"
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
fi
CF_SHARED_SONAME
if test "$GCC" != yes; then
- CC_SHARED_OPTS='-xcode=pic32'
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
+ do
+ CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break])
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ CC_SHARED_OPTS=$cf_shared_opts
MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
else
MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
fi
;;
- sysv5uw7*|unix_sv*)
+ sysv5uw7*|unix_sv*) #(vi
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
@@ -4428,7 +5266,7 @@ CF_EOF
case "$cf_cv_shlib_version" in #(vi
rel|abi)
case "$MK_SHARED_LIB" in #(vi
- *'-o $[@]')
+ *'-o $[@]') #(vi
test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
;;
*)
@@ -4439,17 +5277,11 @@ CF_EOF
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_RPATH_OPT)
AC_SUBST(LD_SHARED_OPTS)
AC_SUBST(MK_SHARED_LIB)
AC_SUBST(LINK_PROGS)
@@ -4642,7 +5474,7 @@ if test "$cf_cv_sizechange" != no ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SRC_MODULES version: 18 updated: 2005/05/28 12:58:54
+dnl CF_SRC_MODULES version: 21 updated: 2010/09/04 17:37:40
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
@@ -4717,19 +5549,28 @@ AC_SUBST(TEST_DEPS)
AC_SUBST(TEST_ARG2)
AC_SUBST(TEST_DEP2)
-SRC_SUBDIRS="man include"
+SRC_SUBDIRS=
+if test "x$cf_with_manpages" != xno ; then
+ SRC_SUBDIRS="$SRC_SUBDIRS man"
+fi
+SRC_SUBDIRS="$SRC_SUBDIRS include"
for cf_dir in $cf_cv_src_modules
do
SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
done
-SRC_SUBDIRS="$SRC_SUBDIRS test"
+if test "x$cf_with_tests" != "xno" ; then
+ SRC_SUBDIRS="$SRC_SUBDIRS test"
+fi
test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
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"
+ SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
+ ADA_SUBDIRS="gen src"
+ if test "x$cf_with_tests" != "xno" ; then
+ ADA_SUBDIRS="$ADA_SUBDIRS samples"
+ fi
fi
SUB_MAKEFILES=
@@ -4739,15 +5580,15 @@ do
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)
+ 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 CF_STDCPP_LIBRARY version: 7 updated: 2010/05/29 16:31:02
dnl -----------------
dnl Check for -lstdc++, which is GNU's standard C++ library.
AC_DEFUN([CF_STDCPP_LIBRARY],
@@ -4763,7 +5604,7 @@ os2*) #(vi
esac
AC_CACHE_CHECK(for library $cf_stdcpp_libname,cf_cv_libstdcpp,[
cf_save="$LIBS"
- LIBS="$LIBS -l$cf_stdcpp_libname"
+ CF_ADD_LIB($cf_stdcpp_libname)
AC_TRY_LINK([
#include <strstream.h>],[
char buf[80];
@@ -4773,7 +5614,7 @@ strstreambuf foo(buf, sizeof(buf))
[cf_cv_libstdcpp=no])
LIBS="$cf_save"
])
-test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
+test "$cf_cv_libstdcpp" = yes && CF_ADD_LIB($cf_stdcpp_libname,CXXLIBS)
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -4846,14 +5687,15 @@ if test "$ac_cv_header_termios_h" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SUBDIR_PATH version: 5 updated: 2007/07/29 09:55:12
+dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50
dnl --------------
dnl Construct a search-list for a nonstandard header/lib-file
dnl $1 = the variable to return as result
dnl $2 = the package name
dnl $3 = the subdirectory, e.g., bin, include or lib
AC_DEFUN([CF_SUBDIR_PATH],
-[$1=""
+[
+$1=
CF_ADD_SUBDIR_PATH($1,$2,$3,/usr,$prefix)
CF_ADD_SUBDIR_PATH($1,$2,$3,$prefix,NONE)
@@ -5048,7 +5890,7 @@ AC_DEFUN([CF_UPPER],
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_UTF8_LIB version: 5 updated: 2008/10/17 19:37:52
+dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28
dnl -----------
dnl Check for multibyte support, and if not found, utf8 compatibility library
AC_DEFUN([CF_UTF8_LIB],
@@ -5070,10 +5912,40 @@ if test "$cf_cv_utf8_lib" = "add-on" ; then
AC_DEFINE(HAVE_LIBUTF8_H)
CF_ADD_INCDIR($cf_cv_header_path_utf8)
CF_ADD_LIBDIR($cf_cv_library_path_utf8)
- LIBS="-lutf8 $LIBS"
+ CF_ADD_LIBS($cf_cv_library_file_utf8)
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_VA_COPY version: 2 updated: 2010/03/04 05:37:29
+dnl ----------
+dnl check for va_copy, part of stdarg.h
+dnl Also, workaround for glibc's __va_copy, by checking for both.
+AC_DEFUN([CF_VA_COPY],[
+AC_CACHE_CHECK(for va_copy, cf_cv_have_va_copy,[
+AC_TRY_LINK([
+#include <stdarg.h>
+],[
+ static va_list dst;
+ static va_list src;
+ va_copy(dst, src)],
+ cf_cv_have_va_copy=yes,
+ cf_cv_have_va_copy=no)])
+
+test "$cf_cv_have_va_copy" = yes && AC_DEFINE(HAVE_VA_COPY)
+
+AC_CACHE_CHECK(for __va_copy, cf_cv_have___va_copy,[
+AC_TRY_LINK([
+#include <stdarg.h>
+],[
+ static va_list dst;
+ static va_list src;
+ __va_copy(dst, src)],
+ cf_cv_have___va_copy=yes,
+ cf_cv_have___va_copy=no)])
+
+test "$cf_cv_have___va_copy" = yes && AC_DEFINE(HAVE___VA_COPY)
+])
+dnl ---------------------------------------------------------------------------
dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
dnl ----------
dnl Use AC_VERBOSE w/o the warnings
@@ -5082,7 +5954,7 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WCHAR_TYPE version: 2 updated: 2004/01/17 19:18:20
+dnl CF_WCHAR_TYPE version: 3 updated: 2010/05/26 16:44:57
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
@@ -5118,7 +5990,7 @@ if test "$cf_cv_$1" = yes ; then
NEED_WCHAR_H=1
fi
-ifelse($2,,,[
+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
@@ -5178,7 +6050,76 @@ $1_ABI=$cf_cv_abi_version
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_DBMALLOC version: 6 updated: 2006/12/16 14:24:05
+dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58
+dnl --------------------
+dnl Command-line option to specify the Ada95 compiler.
+AC_DEFUN([CF_WITH_ADA_COMPILER],[
+AC_MSG_CHECKING(for ada-compiler)
+AC_ARG_WITH(ada-compiler,
+ [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
+ [cf_ada_compiler=$withval],
+ [cf_ada_compiler=gnatmake])
+AC_SUBST(cf_ada_compiler)
+AC_MSG_RESULT($cf_ada_compiler)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58
+dnl -------------------
+dnl Command-line option to specify where Ada includes will install.
+AC_DEFUN([CF_WITH_ADA_INCLUDE],[
+AC_MSG_CHECKING(for ada-include)
+CF_WITH_PATH(ada-include,
+ [ --with-ada-include=DIR Ada includes are in DIR],
+ ADA_INCLUDE,
+ PREFIX/share/ada/adainclude,
+ [$]prefix/share/ada/adainclude)
+AC_SUBST(ADA_INCLUDE)
+AC_MSG_RESULT($ADA_INCLUDE)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58
+dnl -------------------
+dnl Command-line option to specify where Ada objects will install.
+AC_DEFUN([CF_WITH_ADA_OBJECTS],[
+AC_MSG_CHECKING(for ada-objects)
+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)
+AC_MSG_RESULT($ADA_OBJECTS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ADA_SHAREDLIB version: 2 updated: 2010/06/26 17:35:58
+dnl ---------------------
+dnl Command-line option to specify if an Ada95 shared-library should be built,
+dnl and optionally what its soname should be.
+AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[
+AC_MSG_CHECKING(if an Ada95 shared-library should be built)
+AC_ARG_WITH(ada-sharedlib,
+ [ --with-ada-sharedlib=XX build Ada95 shared-library],
+ [with_ada_sharedlib=$withval],
+ [with_ada_sharedlib=no])
+AC_MSG_RESULT($with_ada_sharedlib)
+
+ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
+MAKE_ADA_SHAREDLIB="#"
+
+if test "x$with_ada_sharedlib" != xno
+then
+ MAKE_ADA_SHAREDLIB=
+ if test "x$with_ada_sharedlib" != xyes
+ then
+ ADA_SHAREDLIB="$with_ada_sharedlib"
+ fi
+fi
+
+AC_SUBST(ADA_SHAREDLIB)
+AC_SUBST(MAKE_ADA_SHAREDLIB)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47
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.
@@ -5189,11 +6130,11 @@ CF_NO_LEAKS_OPTION(dbmalloc,
if test "$with_dbmalloc" = yes ; then
AC_CHECK_HEADER(dbmalloc.h,
- [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))])
+ [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_DMALLOC version: 6 updated: 2006/12/16 14:24:05
+dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47
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.
@@ -5204,7 +6145,7 @@ CF_NO_LEAKS_OPTION(dmalloc,
if test "$with_dmalloc" = yes ; then
AC_CHECK_HEADER(dmalloc.h,
- [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))])
+ [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))])
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -5241,7 +6182,7 @@ if test "$with_gpm" != no ; then
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 19 updated: 2008/03/29 15:46:43
+dnl CF_WITH_LIBTOOL version: 26 updated: 2010/10/23 15:55:24
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
@@ -5261,22 +6202,23 @@ dnl elif test ! -f $ACLOCAL/libtool.m4 ; then
dnl echo cannot find libtool.m4 file
dnl exit 1
dnl fi
-dnl
+dnl
dnl LOCAL=aclocal.m4
dnl ORIG=aclocal.m4.orig
-dnl
+dnl
dnl trap "mv $ORIG $LOCAL" 0 1 2 5 15
dnl rm -f $ORIG
dnl mv $LOCAL $ORIG
-dnl
+dnl
dnl # sed the LIBTOOL= assignment to omit the current directory?
-dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
+dnl sed -e 's/^LIBTOOL=.*/LIBTOOL=${LIBTOOL:-libtool}/' $ACLOCAL/libtool.m4 >>$LOCAL
dnl cat $ORIG >>$LOCAL
-dnl
+dnl
dnl autoconf-257 $*
dnl
AC_DEFUN([CF_WITH_LIBTOOL],
[
+AC_REQUIRE([CF_DISABLE_LIBTOOL_VERSION])
ifdef([AC_PROG_LIBTOOL],,[
LIBTOOL=
])
@@ -5306,17 +6248,17 @@ ifdef([AC_PROG_LIBTOOL],[
AC_PROG_LIBTOOL
# missing_content_AC_PROG_LIBTOOL}}
],[
- if test "$with_libtool" != "yes" ; then
+ 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
+ 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` ${LIBTOOL_OPTS} -o'
+ LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
LIB_OBJECT='${OBJECTS:.o=.lo}'
LIB_SUFFIX=.la
LIB_CLEAN='${LIBTOOL} --mode=clean'
@@ -5331,16 +6273,25 @@ ifdef([AC_PROG_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.
+ # bug reports it might be useful to have the original string. "("
cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |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 GNU libtool)
fi
+ # special hack to add -no-undefined (which libtool should do for itself)
+ LT_UNDEF=
+ case "$cf_cv_system_name" in #(vi
+ cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
+ LT_UNDEF=-no-undefined
+ ;;
+ esac
+ AC_SUBST([LT_UNDEF])
+
# special hack to add --tag option for C++ compiler
- case $cf_cv_libtool_version in
- 1.[[5-9]]*|[[2-9]]*)
+ case $cf_cv_libtool_version in #(vi
+ 1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi
LIBTOOL_CXX="$LIBTOOL --tag=CXX"
LIBTOOL="$LIBTOOL --tag=CC"
;;
@@ -5372,7 +6323,7 @@ AC_SUBST(LIB_UNINSTALL)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PATH version: 8 updated: 2007/05/13 13:16:35
+dnl CF_WITH_PATH version: 10 updated: 2010/10/23 15:44:18
dnl ------------
dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just
dnl defaulting to yes/no.
@@ -5384,16 +6335,16 @@ 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
-if ifelse($5,,true,[test -n "$5"]) ; then
+[AC_ARG_WITH($1,[$2 ](default: ifelse([$4],,empty,[$4])),,
+ifelse([$4],,[withval="${$3}"],[withval="${$3:-ifelse([$5],,[$4],[$5])}"]))dnl
+if ifelse([$5],,true,[test -n "$5"]) ; then
CF_PATH_SYNTAX(withval)
fi
$3="$withval"
AC_SUBST($3)dnl
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PATHLIST version: 5 updated: 2001/12/10 01:28:30
+dnl CF_WITH_PATHLIST version: 7 updated: 2010/10/23 16:10:30
dnl ----------------
dnl Process an option specifying a list of colon-separated paths.
dnl
@@ -5407,9 +6358,9 @@ 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
+ifelse($4,,[withval=${$3}],[withval=${$3:-ifelse($5,,$4,$5)}]))dnl
-IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
+IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
cf_dst_path=
for cf_src_path in $withval
do
@@ -5435,7 +6386,7 @@ AC_SUBST($3)dnl
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PTHREAD version: 2 updated: 2008/08/23 18:26:05
+dnl CF_WITH_PTHREAD version: 3 updated: 2010/05/29 16:31:02
dnl ---------------
dnl Check for POSIX thread library.
AC_DEFUN([CF_WITH_PTHREAD],
@@ -5453,7 +6404,7 @@ if test "$with_pthread" != no ; then
AC_MSG_CHECKING(if we can link with the pthread library)
cf_save_LIBS="$LIBS"
- LIBS="-lpthread $LIBS"
+ CF_ADD_LIB(pthread)
AC_TRY_LINK([
#include <pthread.h>
],[
@@ -5463,7 +6414,7 @@ if test "$with_pthread" != no ; then
AC_MSG_RESULT($with_pthread)
if test "$with_pthread" = yes ; then
- LIBS="-lpthread $LIBS"
+ CF_ADD_LIB(pthread)
AC_DEFINE(HAVE_LIBPTHREADS)
else
AC_MSG_ERROR(Cannot link with pthread library)
@@ -5535,7 +6486,7 @@ CF_NO_LEAKS_OPTION(valgrind,
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 26 updated: 2008/07/27 11:26:57
+dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
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,
@@ -5546,14 +6497,22 @@ dnl $1 is the nominal value for _XOPEN_SOURCE
dnl $2 is the nominal value for _POSIX_C_SOURCE
AC_DEFUN([CF_XOPEN_SOURCE],[
-AC_REQUIRE([CF_PROG_CC_U_D])
-
-cf_XOPEN_SOURCE=ifelse($1,,500,$1)
-cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
+cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
+cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
+cf_xopen_source=
case $host_os in #(vi
-aix[[45]]*) #(vi
- CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+aix[[456]]*) #(vi
+ cf_xopen_source="-D_ALL_SOURCE"
+ ;;
+cygwin) #(vi
+ cf_XOPEN_SOURCE=600
+ ;;
+darwin[[0-8]].*) #(vi
+ cf_xopen_source="-D_APPLE_C_SOURCE"
+ ;;
+darwin*) #(vi
+ cf_xopen_source="-D_DARWIN_C_SOURCE"
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -5561,15 +6520,18 @@ freebsd*|dragonfly*) #(vi
# _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
cf_POSIX_C_SOURCE=200112L
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"
+ cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+hpux11*) #(vi
+ cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
;;
hpux*) #(vi
- CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+ cf_xopen_source="-D_HPUX_SOURCE"
;;
irix[[56]].*) #(vi
- CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+ cf_xopen_source="-D_SGI_SOURCE"
;;
-linux*|gnu*|k*bsd*-gnu) #(vi
+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
CF_GNU_SOURCE
;;
mirbsd*) #(vi
@@ -5582,16 +6544,19 @@ openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
osf[[45]]*) #(vi
- CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+ cf_xopen_source="-D_OSF_SOURCE"
;;
nto-qnx*) #(vi
- CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
+ cf_xopen_source="-D_QNX_SOURCE"
;;
sco*) #(vi
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris*) #(vi
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+solaris2.1[[0-9]]) #(vi
+ cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+solaris2.[[1-9]]) #(vi
+ cf_xopen_source="-D__EXTENSIONS__"
;;
*)
AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
@@ -5614,11 +6579,14 @@ make an error
if test "$cf_cv_xopen_source" != no ; then
CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
- test "$cf_cv_cc_u_d_options" = yes && \
- CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ CF_ADD_CFLAGS($cf_temp_xopen_source)
fi
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
;;
esac
+
+if test -n "$cf_xopen_source" ; then
+ CF_ADD_CFLAGS($cf_xopen_source)
+fi
])
diff --git a/announce.html.in b/announce.html.in
index 1d4121ee4ff1..e385204de503 100644
--- a/announce.html.in
+++ b/announce.html.in
@@ -1,8 +1,8 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
- $Id: announce.html.in,v 1.70 2008/11/02 01:03:05 tom Exp $
+ $Id: announce.html.in,v 1.85 2011/04/04 00:05:34 tom Exp $
****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,560 +29,361 @@
* authorization. *
****************************************************************************
-->
-<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 encouraged 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 through 5.6;
-very few applications will require recompilation, depending on the platform.
-These are the highlights from the change-log since ncurses 5.6 release.
-<p>
-Interface changes:
-<ul>
- <li>generate linkable stubs for some macros:
- <br>
- getattrs
-
-</ul>
-New features and improvements:
-<ul>
- <li>library
- <ul>
- <li>new flavor of the ncurses library provides rudimentary
- support for POSIX threads. Several functions are
- reentrant, but most require either a window-level or
- screen-level mutex.<br>
- (This is <em>API</em>-compatible,
- but not <em>ABI</em>-compatible with the normal library).
-
- <li>add <code>NCURSES_OPAQUE</code> symbol to curses.h, will
- use to make structs opaque in selected configurations.
-
- <li>add <code>NCURSES_EXT_FUNCS</code> and
- <code>NCURSES_EXT_COLORS</code> symbols to curses.h to make
- it simpler to tell if the extended functions and/or colors
- are declared.
-
- <li>add wresize() to C++ binding
-
- <li>eliminate fixed-buffer vsprintf() calls in C++ binding.
-
- <li>add several functions to C++ binding which wrap C functions
- that pass a WINDOW* parameter.
-
- <li>adapt mouse-handling code from menu library in form-library
-
- <li>improve tracing for form library, showing created forms,
- fields, etc.
-
- <li>make $NCURSES_NO_PADDING feature work for termcap interface .
-
- <li>add check to trace-file open, if the given name is a
- directory, add ".log" to the name and try again.
-
- <li>several new manpages: curs_legacy.3x, curs_memleaks.3x,
- curs_opaque.3x and curs_threads.3x
- </ul>
-
- <li>programs:
- <ul>
- <li>modified three test-programs to demonstrate the threading
- support in this version: ditto, rain, worm.
-
- <li>several new test-programs: demo_panels, dots_mvcur,
- inch_wide, inchs, key_name, key_names, savescreen,
- savescreen.sh test_arrays, test_get_wstr, test_getstr,
- test_instr, test_inwstr and test_opaque.
-
- <li>add <code>adacurses-config</code> to the Ada95 install.
-
- <li>modify tic <code>-f</code> option to format spaces as
- <code>\s</code> to prevent them from being lost when that
- is read back in unformatted strings.
-
- <li>The <code>tack</code> program is now distributed separately
- from ncurses.
- </ul>
-
- <li>terminal database
- <ul>
- <li>added entries:
- <ul>
- <li><code>Eterm-256color</code>,
- <code>Eterm-88color</code> and
- <code>rxvt-88color</code>
- <li><code>aterm</code>
- <li><code>konsole-256color</code>
- <li><code>mrxvt</code>
- <li><code>screen.mlterm</code>
- <li><code>screen.rxvt</code>
- <li><code>teraterm4.59</code> is now the primary primary
- teraterm entry, renamed original to
- <code>teraterm2.3</code>
- <li><code>9term</code> terminal
- <li>Newbury Data entries
- </ul>
- <li>updated/improved entries:
- <ul>
- <li><code>gnome</code> to version 2.22.3
- <li><code>h19</code>, <code>z100</code>
- <li><code>konsole</code> to version 1.6.6
- <li><code>mlterm</code>, <code>mlterm+pcfkeys</code>
- <li><code>xterm</code>, and building-blocks for function-keys
- to <a href="http://invisible-island.net/xterm/xterm.log.html#xterm_230">xterm patch #230</a>.
- </ul>
- </ul>
-</ul>
-Major bug fixes:
-<ul>
- <li>add logic to tic for cancelling strings in user-defined
- capabilities
- (this is <em>needed</em> for
- current <code>konsole</code> terminfo entry).
-
- <li>modify <code>mk-1st.awk</code> so the generated makefile rules for
- linking or installing shared libraries do not first remove the
- library, in case it is in use, e.g., <code>libncurses.so</code> by
- <code>/bin/sh</code>.
-
- <li>correct check for notimeout() in wgetch().
-
- <li>fix a sign-extension bug in infocmp's repair_acsc() function.
-
- <li>change winnstr() to stop at the end of the line.
-
- <li>make Ada95 demo_panels() example work.
-
- <li>fix for adding a non-spacing character at the beginning of a line.
-
- <li>fill in extended-color pair to make colors work
- for wide-characters using extended-colors.
-
- <li>improve refresh of window on top of multi-column characters,
- taking into account split characters on left/right window
- boundaries.
-
- <li>modify <code>win_wchnstr()</code> to ensure that only a base cell
- is returned for each multi-column character.
-
- <li>improve <code>waddch()</code> and <code>winsch()</code> handling of
- EILSEQ from <code>mbrtowc()</code> by using <code>unctrl()</code>
- to display illegal bytes rather than trying to append further bytes
- to make up a valid sequence.
-
- <li>restore <code>curs_set()</code> state after
- <code>endwin()</code>/<code>refresh()</code>
-
- <li>modify <code>keyname()</code> to use "^X" form only if
- <code>meta()</code> has been called, or if <code>keyname()</code>
- is called without initializing curses, e.g., via
- <code>initscr()</code> or <code>newterm()</code>.
-
- <li>modify <code>unctrl()</code> to check codes in 128-255 range versus
- <code>isprint()</code>.
- If they are not printable, and locale was set, use a "M-" or "~"
- sequence.
-
- <li>improve <code>resizeterm()</code> by moving ripped-off lines, and
- repainting the soft-keys.
-
- <li>modify form library to accept control characters such as newline
- in set_field_buffer(), which is compatible with Solaris.
-
- <li>use <code>NCURSES_MOUSE_MASK()</code> in definition of
- <code>BUTTON_RELEASE()</code>, etc., to make those work properly
- with the <code>--enable-ext-mouse</code> configuration
-
- <li>correct some functions in Ada95 binding which were using return
- value from C where none was returned.
-
- <li>reviewed/fixed issues reported by Coverity and Klocwork tools.
-</ul>
-
-Portability:
-<ul>
- <li>configure script:
- <ul>
- <li>new options:
- <dl>
-
- <dt>--disable-big-strings
- <dd>control whether static string tables are generated as single
- large strings (to improve startup performance), or as array
- of individual strings.
-
- <dt>--disable-relink
- <dd>control whether shared libraries are relinked (during install)
- when rpath is enabled.
-
- <dt>--disable-tic-depends
- <dd>make explicit whether tic library depends on ncurses/ncursesw
- library.
-
- <dt>--enable-mixed-case
- <dd>override the configure script's check if the filesystem
- supports mixed-case filenames.
- This allows one to control how the terminal database
- maps to the filesystem.
- For filesystems that do not support mixed-case, the library
- uses generate 2-character (hexadecimal) codes for the
- lower-level of the filesystem terminfo database
-
- <dt>--enable-reentrant
- <dd>builds a different flavor of the ncurses library (ncursest)
- which improves reentrant use of the
- library by reducing global and static variables
- (see the "--with-pthread" option for the threaded support).
-
- <dt>--enable-weak-symbols
- <dd>use weak-symbols for linking to the POSIX thread library,
- and use the same soname for the ncurses shared library
- as the normal library (caveat: the ABI is for the threaded
- library, which makes global data accessed via functions).
-
- <dt>--with-pthread
- <dd>build with the POSIX thread library (tested with AIX,
- Linux, FreeBSD, OpenBSD, HPUX, IRIX64, Solaris, Tru64).
-
- <dt>--with-ticlib
- <dd>build/install the tic-support functions in a separate library
-
- </dl>
-
- <li>improved options:
- <dl>
-
- <dt>--enable-ext-colors
- <dd>requires the wide-character configuration.
-
- <dt>--with-chtype
- <dd>ignore option value "unsigned" is always added to
- the type in curses.h; do the same for --with-mmask-t.
-
- <dt>--with-dmalloc
- <dd>build-fix for redefinition of <code>strndup</code>.
-
- <dt>--with-hashed-db
- <dd>accepts a parameter which is the install-prefix of a given
- Berkeley Database.
-
- <dt>--with-hashed-db
- <dd>the $LIBS environment variable overrides the search for the db
- library.
-
- <dt>--without-hashed-db
- <dd>assumed when "--disable-database" is used.
-
- </dl>
-
- </ul>
-
- <li>other configure/build issues:
- <ul>
- <li>build-fixes for LynxOS
- <li>modify shared-library rules to allow FreeBSD 3.x to use rpath.
- <li>build-fix for FreeBSD "contemporary" TTY interface.
- <li>build-fixes for AIX with libtool.
- <li>build-fixes for Darwin and libtool.
- <li>modify BeOS-specific ifdef's to build on Haiku.
- <li>corrected gcc options for building shared libraries on Solaris
- and IRIX64.
- <li>change shared-library configuration for OpenBSD, make rpath work.
- <li>build-fixes for using libutf8, e.g., on OpenBSD 3.7
- <li>add "-e" option in ncurses/Makefile.in when generating source-files
- to force earlier exit if the build environment fails unexpectedly.
- <li>add support for shared libraries for QNX.
- <li>change delimiter in <code>MKlib_gen.sh</code> from '%' to '@', to
- avoid substitution by IBM xlc to '#' as part of its extensions to
- digraphs.
- </ul>
-
- <li>library:
- <ul>
- <li>rewrite wrapper for <code>wcrtomb()</code>, making it work on
- Solaris. This is used in the form library to determine the length
- of the buffer needed by <code>field_buffer</code>.
- <li>add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding
- type for data manipulated by signal handlers.
- <li>set locale in misc/ncurses-config.in since it uses a range
- <li>disable GPM mouse support when $TERM does not happen to contain
- "linux", since Gpm_Open() no longer limits its assertion to terminals
- that it might handle, e.g., within "screen" in xterm.
- <li>reset mouse file-descriptor when unloading GPM library.
- </ul>
-
- <li>test programs:
- <ul>
- <li>update test programs to build/work with various UNIX curses for
- comparisons.
- </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,
-and most EXTENDED features).
-It includes 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 FreeBSD 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 256-color terminals, such as modern xterm, when configured
-using the <code>--enable-ext-colors</code> option.
-<LI>Support for 16-color terminals, such as aixterm and modern 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="https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</A>
-<DT> tin
-<DD> newsreader, supporting color, MIME
-<A HREF="http://www.tin.org/">http://www.tin.org/</A>
-</DL>
-as well as some that use ncurses for the terminfo support alone:
-<DL>
-<DT> minicom
-<DD> terminal emulator
-<br>
-<A HREF="http://alioth.debian.org/projects/minicom/">
-http://alioth.debian.org/projects/minicom/</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>
+
+<html>
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
+
+ <title>Announcing ncurses @VERSION@</title>
+ <link rev="made" href="mailto:bug-ncurses@gnu.org">
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii">
+</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 encouraged the
+ keepers of Unix releases such as BSD/OS, FreeBSD and NetBSD to
+ switch over to ncurses.</p>
+
+ <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>
+
+ <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>
+
+ <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;.</p>
+
+ <h1>Release Notes</h1>This release is designed to be upward
+ compatible from ncurses 5.0 through 5.8; very few applications
+ will require recompilation, depending on the platform. These are
+ the highlights from the change-log since ncurses 5.8 release.
+ <p>
+ This is a bug-fix release, correcting a small number of urgent problems
+ in the ncurses library from the 5.8 release.
+ <p>
+ It also improves the Ada95 binding:
+ <ul>
+ <li>fixes a longstanding portability problem with its use of the
+ <a href="http://invisible-island.net/ncurses/man/form_fieldtype.3x">set_field_type</a>
+ function. Because that function uses variable-length argument lists,
+ its interface with gnat does not work with certain platforms.
+ <li>improves configurability and portability, particularly when built
+ separately from the main ncurses tree. The 5.8 release introduced
+ scripts which can be used to construct separate tarballs for the
+ Ada95 and ncurses examples.
+ <p>Those were a proof of concept. For the 5.9 release, those
+ scripts are augmented with rpm- and dpkg-scripts used in test builds
+ against a variety of gnat- and system ncurses versions as old as
+ gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
+ <a href="http://invisible-island.net/ncurses/ncurses-Ada95.html">here</a>.
+ <li>additional improvements were made for portability of the
+ ncurses examples, adding rpm- and dpkg-scripts for test-builds.
+ See
+ <a href="http://invisible-island.net/ncurses/ncurses-examples.html">this page</a>
+ for snapshots and other information.
+ </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>
+
+ <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>
+
+ <li>An emulation of the SVr4 panels library, supporting a stack
+ of windows with backing store, is included.</li>
+
+ <li>An emulation of the SVr4 menus library, supporting a
+ uniform but flexible interface for menu programming, is
+ included.</li>
+
+ <li>An emulation of the SVr4 form library, supporting data
+ collection through on-screen forms, is included.</li>
+
+ <li>Binary terminfo entries generated by the ncurses tic(1)
+ implementation are bit-for-bit-compatible with the entry format
+ SVr4 curses uses.</li>
+
+ <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.</li>
+ </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, and most EXTENDED features). It
+ includes many function calls not supported under SVr4 curses
+ (but portability of all calls is documented so you can use the
+ SVr4 subset only).</li>
+
+ <li>Unlike SVr3 curses, ncurses can write to the
+ rightmost-bottommost corner of the screen if your terminal has
+ an insert-character capability.</li>
+
+ <li>Ada95 and C++ bindings.</li>
+
+ <li>Support for mouse event reporting with X Window xterm and
+ FreeBSD and OS/2 console windows.</li>
+
+ <li>Extended mouse support via Alessandro Rubini's gpm
+ package.</li>
+
+ <li>The function <code>wresize</code> allows you to resize
+ windows, preserving their data.</li>
+
+ <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>
+
+ <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>
+
+ <li>Support for 256-color terminals, such as modern xterm, when
+ configured using the <code>--enable-ext-colors</code>
+ option.</li>
+
+ <li>Support for 16-color terminals, such as <em>aixterm</em>
+ and <em>modern xterm</em>.</li>
+
+ <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>
+
+ <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 <code>quickch</code>
+ routine.</li>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <li>A BSD-like tset(1) utility is provided.</li>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <li>An HTML "Introduction to Programming with NCURSES" document
+ provides a narrative introduction to the curses programming
+ interface.</li>
+ </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):</p>
+
+ <dl>
+ <dt>cdk</dt>
+
+ <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></dd>
+
+ <dt>ded</dt>
+
+ <dd>directory-editor<br>
+ <a href=
+ "http://invisible-island.net/ded/">http://invisible-island.net/ded/</a></dd>
+
+ <dt>dialog</dt>
+
+ <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></dd>
+
+ <dt>lynx</dt>
+
+ <dd>the character-screen WWW browser<br>
+ <a href=
+ "http://lynx.isc.org/release/">http://lynx.isc.org/release/</a></dd>
+
+ <dt>Midnight Commander</dt>
+
+ <dd>file manager<br>
+ <a href=
+ "http://www.midnight-commander.org/">http://www.midnight-commander.org/</a></dd>
+
+ <dt>mutt</dt>
+
+ <dd>mail utility<br>
+ <a href="http://www.mutt.org/">http://www.mutt.org/</a></dd>
+
+ <dt>ncftp</dt>
+
+ <dd>file-transfer utility<br>
+ <a href="http://www.ncftp.com/">http://www.ncftp.com/</a></dd>
+
+ <dt>nvi</dt>
+
+ <dd>New vi versions 1.50 are able to use ncurses versions 1.9.7
+ and later.<br>
+ <a href=
+ "https://sites.google.com/a/bostic.com/keithbostic/nvi">https://sites.google.com/a/bostic.com/keithbostic/nvi</a><br>
+ </dd>
+
+ <dt>pinfo</dt>
+
+ <dd>Lynx-like info browser. <a href=
+ "https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</a></dd>
+
+ <dt>tin</dt>
+
+ <dd>newsreader, supporting color, MIME <a href=
+ "http://www.tin.org/">http://www.tin.org/</a></dd>
+ </dl>as well as some that use ncurses for the terminfo support
+ alone:
+
+ <dl>
+ <dt>minicom</dt>
+
+ <dd>terminal emulator<br>
+ <a href=
+ "http://alioth.debian.org/projects/minicom/">http://alioth.debian.org/projects/minicom/</a></dd>
+
+ <dt>vile</dt>
+
+ <dd>vi-like-emacs<br>
+ <a href=
+ "http://invisible-island.net/vile/">http://invisible-island.net/vile/</a></dd>
+ </dl>
+
+ <p>The ncurses distribution includes a selection of test programs
+ (including a few games).</p>
+
+ <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:</p>
+ <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 once 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, and provides several user-definable extensions
-beyond the X/Open specification.<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:
--->
+</pre>
+
+ <p>This list is open to anyone interested in helping with the
+ development and testing of this package.</p>
+
+ <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;.</p>
+
+ <h2>Future Plans</h2>
+
+ <ul>
+ <li>Extended-level XPG4 conformance, with internationalization
+ support.</li>
+
+ <li>Ports to more systems, including DOS and Windows.</li>
+ </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 once
+ 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, and provides several
+ user-definable extensions beyond the X/Open specification.
+
+ <p>You can find lots of information on terminal-related topics
+ not covered in the terminfo file at <a href=
+ "http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal">
+ Richard Shuford's archive</a>&nbsp;.</p>
+</body>
+</html>
diff --git a/config.guess b/config.guess
index c7607c74f1b8..bec935b96fca 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
#! /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, 2006, 2007, 2008
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2008-04-14'
+timestamp='2010-09-24'
# 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
@@ -27,16 +27,16 @@ timestamp='2008-04-14'
# 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.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a 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.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,8 +56,9 @@ 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, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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."
@@ -91,7 +92,7 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
# 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
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
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 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -180,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
fi
;;
*)
- os=netbsd
+ os=netbsd
;;
esac
# The OS release
@@ -219,11 +220,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
- *4.0)
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -295,7 +296,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
@@ -324,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
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:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -375,23 +395,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# 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}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -461,8 +481,8 @@ EOF
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # 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 ] || \
@@ -532,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
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
@@ -575,8 +595,8 @@ EOF
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
+ 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
@@ -640,7 +660,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -711,22 +731,22 @@ EOF
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -750,14 +770,14 @@ EOF
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 ;;
+ 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}"
+ 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}
@@ -785,27 +805,30 @@ EOF
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T | authenticamd)
+ authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-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
@@ -835,10 +858,24 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
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 -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null | \
+ grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
@@ -855,7 +892,18 @@ EOF
echo crisv32-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo frv-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -866,75 +914,34 @@ EOF
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 | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
+ mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef mips64
- #undef mips64el
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ 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}
+ echo or32-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -943,14 +950,17 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -958,6 +968,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-tilera-linux-gnu
+ exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
@@ -965,68 +978,8 @@ EOF
echo x86_64-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-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 ;;
- "")
- # 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
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- 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
@@ -1034,11 +987,11 @@ EOF
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,
+ # 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.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1055,7 +1008,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1070,7 +1023,7 @@ EOF
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1098,10 +1051,13 @@ EOF
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 ;;
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@@ -1136,8 +1092,18 @@ EOF
/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; } ;;
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ 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; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1150,7 +1116,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1171,9 +1137,9 @@ EOF
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 ;;
+ # 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
@@ -1203,7 +1169,7 @@ EOF
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1243,6 +1209,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1250,14 +1226,17 @@ EOF
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@@ -1303,13 +1282,13 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ 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`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1324,6 +1303,9 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/config.sub b/config.sub
index a649350a6ca7..de11910f0b15 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2008-06-16'
+timestamp='2010-09-11'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2008-06-16'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU 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.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
# 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.
@@ -72,8 +75,9 @@ 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, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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."
@@ -120,8 +124,10 @@ esac
# 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-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +154,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -249,6 +258,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
@@ -270,28 +280,41 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | moxie \
| mt \
| msp430 \
+ | nds32 | nds32le | nds32be\
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
+ | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
+ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
+ | z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@@ -306,8 +329,8 @@ case $basic_machine in
# 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
- ;;
+ basic_machine=$basic_machine-pc
+ ;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
@@ -322,7 +345,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -331,9 +354,10 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -355,27 +379,30 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| 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-* | sheb-* | shbe-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
| tron-* \
+ | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
@@ -397,7 +424,7 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
- abacus)
+ abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@@ -443,6 +470,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -459,11 +490,24 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
- cegcc)
+ cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
@@ -711,6 +755,9 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -815,6 +862,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -1049,17 +1102,10 @@ case $basic_machine in
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
+ # This must be matched before tile*.
+ tilegx*)
+ basic_machine=tilegx-unknown
+ os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
@@ -1140,6 +1186,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
none)
basic_machine=none-none
os=-none
@@ -1178,7 +1228,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1225,9 +1275,12 @@ esac
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # First match some system type aliases
+ # that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1248,10 +1301,11 @@ case $os in
# 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* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1262,7 +1316,8 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1270,7 +1325,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1309,7 +1364,7 @@ case $os in
-opened*)
os=-openedition
;;
- -os400*)
+ -os400*)
os=-os400
;;
-wince*)
@@ -1358,7 +1413,7 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
+ -tpf*)
os=-tpf
;;
-triton*)
@@ -1403,6 +1458,8 @@ case $os in
-dicos*)
os=-dicos
;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1425,10 +1482,10 @@ else
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
+ score-*)
os=-elf
;;
- spu-*)
+ spu-*)
os=-elf
;;
*-acorn)
@@ -1440,8 +1497,17 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1468,7 +1534,7 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
- mep-*)
+ mep-*)
os=-elf
;;
mips*-cisco)
@@ -1495,7 +1561,7 @@ case $basic_machine in
*-ibm)
os=-aix
;;
- *-knuth)
+ *-knuth)
os=-mmixware
;;
*-wec)
@@ -1600,7 +1666,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)
diff --git a/configure b/configure
index 1342387ce63e..639b790dc3ac 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.in Revision: 1.454 .
+# From configure.in Revision: 1.520 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20080325.
+# Generated by Autoconf 2.52.20101002.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -697,8 +697,12 @@ Optional Features:
--without-cxx do not adjust ncurses bool to match C++
--without-cxx-binding do not build C++ binding and demo
--without-ada suppress check for Ada95, don't build demo
+ --without-manpages suppress install of manpages
--without-progs suppress build with programs (e.g., tic)
+ --without-tests suppress build with test-programs
--without-curses-h install curses.h as ncurses.h only
+ --with-pkg-config{=path} enable/disable use of pkg-config
+ --enable-pc-files generate and install .pc files for pkg-config
--enable-mixed-case tic should assume mixed-case filenames
--with-install-prefix prefixes actual install-location ($DESTDIR)
Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
@@ -709,6 +713,7 @@ Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
--with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
--with-build-libs=XXX the build libraries (${BUILD_LIBS})
Options to Specify the Libraries Built/Used:
+ --disable-libtool-version enable to use libtool's incompatible naming scheme
--with-libtool generate libraries with libtool
--with-shared generate shared-libraries
--with-normal generate normal-libraries (default)
@@ -722,6 +727,7 @@ Options to Specify the Libraries Built/Used:
--enable-rpath use rpath option when generating shared libraries
--disable-relink relink shared libraries during install
--with-shlib-version=X Specify rel or abi version for shared libs
+ --disable-rpath-hack don't add rpath options for additional libraries
Fine-Tuning Your Configuration:
--disable-overwrite leave out the link to -lcurses
--disable-database do not use terminfo, only fallbacks/termcap
@@ -752,6 +758,7 @@ Fine-Tuning Your Configuration:
--with-chtype=TYPE override type of chtype
--with-ospeed=TYPE override type of ospeed variable
--with-mmask-t=TYPE override type of mmask_t
+ --with-ccharw-max=XXX override size CCHARW_MAX
--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
@@ -762,6 +769,8 @@ Options to Specify How Manpages are Installed:
--with-manpage-tbl specify manpage processing with tbl
Extensions:
--disable-ext-funcs disable function-extensions
+ --enable-sp-funcs enable experimental SCREEN-extensions
+ --enable-term-driver enable experimental terminal-driver
--enable-const compile with extra/non-standard const
--enable-ext-colors compile for 256-color support
--enable-ext-mouse compile for extended mouse-encoding
@@ -776,10 +785,13 @@ Development Code:
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-colorfgbg compile-in experimental $COLORFGBG code
+ --enable-interop compile-in experimental interop bindings
--with-pthread use POSIX thread library
+ --enable-pthreads-eintr enable EINTR in wgetch with pthreads
--enable-weak-symbols enable weak-symbols for pthreads
--enable-reentrant compile with experimental reentrant code
+ --with-wrap-prefix=XXX override prefix used for public variables
--enable-safe-sprintf compile with experimental safe-sprintf code
--disable-scroll-hints compile without scroll-hints code
--enable-wgetch-events compile with experimental wgetch-events code
@@ -796,8 +808,9 @@ Testing/development Options:
--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-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
--with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
+ --with-ada-sharedlib=XX build Ada95 shared-library
Some influential environment variables:
CC C compiler command
@@ -870,7 +883,7 @@ 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.20080325. Invocation command line was
+generated by GNU Autoconf 2.52.20101002. Invocation command line was
$ $0 $@
@@ -994,7 +1007,7 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- { echo "$as_me:997: loading site script $ac_site_file" >&5
+ { echo "$as_me:1010: 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"
@@ -1005,7 +1018,7 @@ 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:1008: loading cache $cache_file" >&5
+ { echo "$as_me:1021: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -1013,7 +1026,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { echo "$as_me:1016: creating cache $cache_file" >&5
+ { echo "$as_me:1029: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -1029,21 +1042,21 @@ for ac_var in `(set) 2>&1 |
eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:1032: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+ { echo "$as_me:1045: 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:1036: error: \`$ac_var' was not set in the previous run" >&5
+ { echo "$as_me:1049: 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:1042: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:1055: 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:1044: former value: $ac_old_val" >&5
+ { echo "$as_me:1057: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:1046: current value: $ac_new_val" >&5
+ { echo "$as_me:1059: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
@@ -1062,9 +1075,9 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:1065: error: changes in the environment can compromise the build" >&5
+ { echo "$as_me:1078: 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:1067: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+ { { echo "$as_me:1080: 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
@@ -1085,10 +1098,10 @@ esac
echo "#! $SHELL" >conftest.sh
echo "exit 0" >>conftest.sh
chmod +x conftest.sh
-if { (echo "$as_me:1088: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
(PATH=".;."; conftest.sh) 2>&5
ac_status=$?
- echo "$as_me:1091: \$? = $ac_status" >&5
+ echo "$as_me:1104: \$? = $ac_status" >&5
(exit $ac_status); }; then
ac_path_separator=';'
else
@@ -1101,7 +1114,7 @@ ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.
top_builddir=`pwd`
-echo "$as_me:1104: checking for egrep" >&5
+echo "$as_me:1117: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1111,11 +1124,11 @@ else
else ac_cv_prog_egrep='egrep'
fi
fi
-echo "$as_me:1114: result: $ac_cv_prog_egrep" >&5
+echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
EGREP=$ac_cv_prog_egrep
-test -z "$EGREP" && { { echo "$as_me:1118: error: No egrep program found" >&5
+test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
echo "$as_me: error: No egrep program found" >&2;}
{ (exit 1); exit 1; }; }
@@ -1125,7 +1138,7 @@ NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -
cf_cv_abi_version=${NCURSES_MAJOR}
cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
cf_cv_timestamp=`date`
-echo "$as_me:1128: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
+echo "$as_me:1141: 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
@@ -1133,7 +1146,7 @@ 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:1136: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
+ { echo "$as_me:1149: 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;
@@ -1146,13 +1159,13 @@ if test -n "$NCURSES_MAJOR" ; then
[0-9]*) #(vi
;;
*)
- { { echo "$as_me:1149: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
+ { { echo "$as_me:1162: 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:1155: error: Release major-version value is empty" >&5
+ { { echo "$as_me:1168: error: Release major-version value is empty" >&5
echo "$as_me: error: Release major-version value is empty" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1162,13 +1175,13 @@ if test -n "$NCURSES_MINOR" ; then
[0-9]*) #(vi
;;
*)
- { { echo "$as_me:1165: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
+ { { echo "$as_me:1178: 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:1171: error: Release minor-version value is empty" >&5
+ { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
echo "$as_me: error: Release minor-version value is empty" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1178,7 +1191,7 @@ 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:1181: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
+ { echo "$as_me:1194: 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;
@@ -1188,13 +1201,13 @@ if test -n "$cf_cv_abi_version" ; then
[0-9]*) #(vi
;;
*)
- { { echo "$as_me:1191: error: ABI version is not a number: $cf_cv_abi_version" >&5
+ { { echo "$as_me:1204: 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:1197: error: ABI version value is empty" >&5
+ { { echo "$as_me:1210: error: ABI version value is empty" >&5
echo "$as_me: error: ABI version value is empty" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1216,7 +1229,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:1219: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+ { { echo "$as_me:1232: 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
@@ -1226,11 +1239,11 @@ 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:1229: error: cannot run $ac_config_sub" >&5
+ { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:1233: checking build system type" >&5
+echo "$as_me:1246: 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
@@ -1239,23 +1252,23 @@ else
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:1242: error: cannot guess build type; you must specify one" >&5
+ { { echo "$as_me:1255: 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:1246: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+ { { echo "$as_me:1259: 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:1251: result: $ac_cv_build" >&5
+echo "$as_me:1264: 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:1258: checking host system type" >&5
+echo "$as_me:1271: 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
@@ -1264,12 +1277,12 @@ else
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:1267: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+ { { echo "$as_me:1280: 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:1272: result: $ac_cv_host" >&5
+echo "$as_me:1285: 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/'`
@@ -1277,7 +1290,7 @@ 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:1280: checking target system type" >&5
+ echo "$as_me:1293: 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
@@ -1286,12 +1299,12 @@ else
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:1289: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+ { { echo "$as_me:1302: 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:1294: result: $ac_cv_target" >&5
+echo "$as_me:1307: 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/'`
@@ -1322,13 +1335,13 @@ else
fi
test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:1325: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:1338: 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:1329: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+ echo "$as_me:1342: 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:1331: error: \"Please remove config.cache and try again.\"" >&5
+ { { echo "$as_me:1344: 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
@@ -1336,7 +1349,7 @@ 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:1339: WARNING: overriding system type to $withval" >&5
+ { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
echo "$as_me: WARNING: overriding system type to $withval" >&2;}
cf_cv_system_name=$withval
fi;
@@ -1346,7 +1359,7 @@ cf_user_CFLAGS="$CFLAGS"
### Default install-location
-echo "$as_me:1349: checking for prefix" >&5
+echo "$as_me:1362: 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
@@ -1358,11 +1371,11 @@ if test "x$prefix" = "xNONE" ; then
;;
esac
fi
-echo "$as_me:1361: result: $prefix" >&5
+echo "$as_me:1374: result: $prefix" >&5
echo "${ECHO_T}$prefix" >&6
if test "x$prefix" = "xNONE" ; then
-echo "$as_me:1365: checking for default include-directory" >&5
+echo "$as_me:1378: 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 \
@@ -1385,7 +1398,7 @@ do
fi
test -n "$verbose" && echo " tested $cf_dir" 1>&6
done
-echo "$as_me:1388: result: $includedir" >&5
+echo "$as_me:1401: result: $includedir" >&5
echo "${ECHO_T}$includedir" >&6
fi
@@ -1399,7 +1412,7 @@ ac_main_return=return
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:1402: checking for $ac_word" >&5
+echo "$as_me:1415: 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
@@ -1414,7 +1427,7 @@ for ac_dir in $ac_dummy; do
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:1417: found $ac_dir/$ac_word" >&5
+echo "$as_me:1430: found $ac_dir/$ac_word" >&5
break
done
@@ -1422,10 +1435,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1425: result: $CC" >&5
+ echo "$as_me:1438: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1428: result: no" >&5
+ echo "$as_me:1441: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1434,7 +1447,7 @@ 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:1437: checking for $ac_word" >&5
+echo "$as_me:1450: 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
@@ -1449,7 +1462,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1452: found $ac_dir/$ac_word" >&5
+echo "$as_me:1465: found $ac_dir/$ac_word" >&5
break
done
@@ -1457,10 +1470,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1460: result: $ac_ct_CC" >&5
+ echo "$as_me:1473: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1463: result: no" >&5
+ echo "$as_me:1476: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1473,7 +1486,7 @@ 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:1476: checking for $ac_word" >&5
+echo "$as_me:1489: 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
@@ -1488,7 +1501,7 @@ for ac_dir in $ac_dummy; do
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:1491: found $ac_dir/$ac_word" >&5
+echo "$as_me:1504: found $ac_dir/$ac_word" >&5
break
done
@@ -1496,10 +1509,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1499: result: $CC" >&5
+ echo "$as_me:1512: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1502: result: no" >&5
+ echo "$as_me:1515: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1508,7 +1521,7 @@ 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:1511: checking for $ac_word" >&5
+echo "$as_me:1524: 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
@@ -1523,7 +1536,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1526: found $ac_dir/$ac_word" >&5
+echo "$as_me:1539: found $ac_dir/$ac_word" >&5
break
done
@@ -1531,10 +1544,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1534: result: $ac_ct_CC" >&5
+ echo "$as_me:1547: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1537: result: no" >&5
+ echo "$as_me:1550: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1547,7 +1560,7 @@ 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:1550: checking for $ac_word" >&5
+echo "$as_me:1563: 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
@@ -1567,7 +1580,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
continue
fi
ac_cv_prog_CC="cc"
-echo "$as_me:1570: found $ac_dir/$ac_word" >&5
+echo "$as_me:1583: found $ac_dir/$ac_word" >&5
break
done
@@ -1589,10 +1602,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1592: result: $CC" >&5
+ echo "$as_me:1605: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1595: result: no" >&5
+ echo "$as_me:1608: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1603,7 +1616,7 @@ if test -z "$CC"; then
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:1606: checking for $ac_word" >&5
+echo "$as_me:1619: 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
@@ -1618,7 +1631,7 @@ for ac_dir in $ac_dummy; do
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:1621: found $ac_dir/$ac_word" >&5
+echo "$as_me:1634: found $ac_dir/$ac_word" >&5
break
done
@@ -1626,10 +1639,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1629: result: $CC" >&5
+ echo "$as_me:1642: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1632: result: no" >&5
+ echo "$as_me:1645: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1642,7 +1655,7 @@ if test -z "$CC"; then
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:1645: checking for $ac_word" >&5
+echo "$as_me:1658: 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
@@ -1657,7 +1670,7 @@ for ac_dir in $ac_dummy; do
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:1660: found $ac_dir/$ac_word" >&5
+echo "$as_me:1673: found $ac_dir/$ac_word" >&5
break
done
@@ -1665,10 +1678,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1668: result: $ac_ct_CC" >&5
+ echo "$as_me:1681: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1671: result: no" >&5
+ echo "$as_me:1684: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1680,32 +1693,32 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:1683: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1696: 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:1688:" \
+echo "$as_me:1701:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1691: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1694: \$? = $ac_status" >&5
+ echo "$as_me:1707: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1696: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1699: \$? = $ac_status" >&5
+ echo "$as_me:1712: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1701: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1704: \$? = $ac_status" >&5
+ echo "$as_me:1717: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line 1708 "configure"
+#line 1721 "configure"
#include "confdefs.h"
int
@@ -1721,13 +1734,13 @@ 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:1724: checking for C compiler default output" >&5
+echo "$as_me:1737: 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:1727: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
- echo "$as_me:1730: \$? = $ac_status" >&5
+ echo "$as_me:1743: \$? = $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
@@ -1736,7 +1749,7 @@ 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 ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
a.out ) # We found the default executable, but exeext='' is most
# certainly right.
break;;
@@ -1750,34 +1763,34 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1753: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1766: 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:1759: result: $ac_file" >&5
+echo "$as_me:1772: 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:1764: checking whether the C compiler works" >&5
+echo "$as_me:1777: 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:1770: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1783: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1773: \$? = $ac_status" >&5
+ echo "$as_me:1786: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:1780: error: cannot run C compiled programs.
+ { { echo "$as_me:1793: 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;}
@@ -1785,24 +1798,24 @@ If you meant to cross compile, use \`--host'." >&2;}
fi
fi
fi
-echo "$as_me:1788: result: yes" >&5
+echo "$as_me:1801: 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:1795: checking whether we are cross compiling" >&5
+echo "$as_me:1808: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1797: result: $cross_compiling" >&5
+echo "$as_me:1810: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
-echo "$as_me:1800: checking for executable suffix" >&5
+echo "$as_me:1813: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1802: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:1805: \$? = $ac_status" >&5
+ echo "$as_me:1818: \$? = $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
@@ -1810,7 +1823,7 @@ if { (eval echo "$as_me:1802: \"$ac_link\"") >&5
# `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_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
@@ -1818,25 +1831,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { echo "$as_me:1821: error: cannot compute EXEEXT: cannot compile and link" >&5
+ { { echo "$as_me:1834: 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:1827: result: $ac_cv_exeext" >&5
+echo "$as_me:1840: 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:1833: checking for object suffix" >&5
+echo "$as_me:1846: 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 1839 "configure"
+#line 1852 "configure"
#include "confdefs.h"
int
@@ -1848,14 +1861,14 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1851: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1854: \$? = $ac_status" >&5
+ echo "$as_me:1867: \$? = $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_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
@@ -1863,24 +1876,24 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1866: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1879: 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:1873: result: $ac_cv_objext" >&5
+echo "$as_me:1886: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:1877: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1890: 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 1883 "configure"
+#line 1896 "configure"
#include "confdefs.h"
int
@@ -1895,16 +1908,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1901: \$? = $ac_status" >&5
+ echo "$as_me:1914: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1904: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1917: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1907: \$? = $ac_status" >&5
+ echo "$as_me:1920: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
@@ -1916,19 +1929,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:1919: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1932: 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:1925: checking whether $CC accepts -g" >&5
+echo "$as_me:1938: 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 1931 "configure"
+#line 1944 "configure"
#include "confdefs.h"
int
@@ -1940,16 +1953,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1943: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1946: \$? = $ac_status" >&5
+ echo "$as_me:1959: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1949: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1962: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1952: \$? = $ac_status" >&5
+ echo "$as_me:1965: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
@@ -1959,7 +1972,7 @@ ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:1962: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1975: 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
@@ -1986,16 +1999,16 @@ cat >conftest.$ac_ext <<_ACEOF
#endif
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1992: \$? = $ac_status" >&5
+ echo "$as_me:2005: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1995: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2008: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1998: \$? = $ac_status" >&5
+ echo "$as_me:2011: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
@@ -2007,7 +2020,7 @@ if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 2010 "configure"
+#line 2023 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
@@ -2020,16 +2033,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2026: \$? = $ac_status" >&5
+ echo "$as_me:2039: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2029: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2042: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2032: \$? = $ac_status" >&5
+ echo "$as_me:2045: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -2039,7 +2052,7 @@ continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 2042 "configure"
+#line 2055 "configure"
#include "confdefs.h"
$ac_declaration
int
@@ -2051,16 +2064,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2054: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2057: \$? = $ac_status" >&5
+ echo "$as_me:2070: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2060: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2073: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2063: \$? = $ac_status" >&5
+ echo "$as_me:2076: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -2069,7 +2082,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
-rm -f conftest*
+rm -rf conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
@@ -2090,11 +2103,11 @@ ac_main_return=return
GCC_VERSION=none
if test "$GCC" = yes ; then
- echo "$as_me:2093: checking version of $CC" >&5
+ echo "$as_me:2106: 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/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
test -z "$GCC_VERSION" && GCC_VERSION=unknown
- echo "$as_me:2097: result: $GCC_VERSION" >&5
+ echo "$as_me:2110: result: $GCC_VERSION" >&5
echo "${ECHO_T}$GCC_VERSION" >&6
fi
@@ -2104,7 +2117,7 @@ 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
ac_main_return=return
-echo "$as_me:2107: checking how to run the C preprocessor" >&5
+echo "$as_me:2120: 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
@@ -2125,18 +2138,18 @@ do
# 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 2128 "configure"
+#line 2141 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:2133: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2146: \"$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:2139: \$? = $ac_status" >&5
+ echo "$as_me:2152: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2159,17 +2172,17 @@ 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 2162 "configure"
+#line 2175 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2179: \"$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:2172: \$? = $ac_status" >&5
+ echo "$as_me:2185: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2206,7 +2219,7 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:2209: result: $CPP" >&5
+echo "$as_me:2222: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
@@ -2216,18 +2229,18 @@ do
# 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 2219 "configure"
+#line 2232 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:2224: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2237: \"$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:2230: \$? = $ac_status" >&5
+ echo "$as_me:2243: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2250,17 +2263,17 @@ 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 2253 "configure"
+#line 2266 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2270: \"$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:2263: \$? = $ac_status" >&5
+ echo "$as_me:2276: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2288,7 +2301,7 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:2291: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2301,14 +2314,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
if test $ac_cv_c_compiler_gnu = yes; then
- echo "$as_me:2304: checking whether $CC needs -traditional" >&5
+ echo "$as_me:2317: 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 2311 "configure"
+#line 2324 "configure"
#include "confdefs.h"
#include <sgtty.h>
int Autoconf = TIOCGETP;
@@ -2319,11 +2332,11 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_prog_gcc_traditional=no
fi
-rm -f conftest*
+rm -rf conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat >conftest.$ac_ext <<_ACEOF
-#line 2326 "configure"
+#line 2339 "configure"
#include "confdefs.h"
#include <termio.h>
int Autoconf = TCGETA;
@@ -2332,18 +2345,18 @@ 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*
+rm -rf conftest*
fi
fi
-echo "$as_me:2339: result: $ac_cv_prog_gcc_traditional" >&5
+echo "$as_me:2352: 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:2346: checking whether $CC understands -c and -o together" >&5
+echo "$as_me:2359: 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
@@ -2359,38 +2372,38 @@ 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:2362: \"$ac_try\"") >&5
+if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2365: \$? = $ac_status" >&5
+ echo "$as_me:2378: \$? = $ac_status" >&5
(exit $ac_status); } &&
- test -f conftest2.$ac_objext && { (eval echo "$as_me:2367: \"$ac_try\"") >&5
+ test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2370: \$? = $ac_status" >&5
+ echo "$as_me:2383: \$? = $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*
+rm -rf conftest*
fi
if test $cf_cv_prog_CC_c_o = yes; then
- echo "$as_me:2381: result: yes" >&5
+ echo "$as_me:2394: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:2384: result: no" >&5
+ echo "$as_me:2397: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:2388: checking for POSIXized ISC" >&5
+echo "$as_me:2401: 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:2393: result: yes" >&5
+ echo "$as_me:2406: result: yes" >&5
echo "${ECHO_T}yes" >&6
ISC=yes # If later tests want to check for ISC.
@@ -2404,13 +2417,13 @@ EOF
CC="$CC -Xp"
fi
else
- echo "$as_me:2407: result: no" >&5
+ echo "$as_me:2420: result: no" >&5
echo "${ECHO_T}no" >&6
ISC=
fi
-echo "$as_me:2412: 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
+echo "$as_me:2425: 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
@@ -2450,8 +2463,8 @@ no)
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
+ && 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"
@@ -2466,6 +2479,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -2481,8 +2504,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -2494,7 +2517,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -2503,7 +2526,7 @@ if test -n "$cf_new_extra_cppflags" ; then
fi
cat >conftest.$ac_ext <<_ACEOF
-#line 2506 "configure"
+#line 2529 "configure"
#include "confdefs.h"
#ifndef CC_HAS_PROTOS
@@ -2524,16 +2547,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2527: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2550: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2530: \$? = $ac_status" >&5
+ echo "$as_me:2553: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2533: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2556: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2536: \$? = $ac_status" >&5
+ echo "$as_me:2559: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ansi_cc="$cf_arg"; break
else
@@ -2546,7 +2569,7 @@ CFLAGS="$cf_save_CFLAGS"
CPPFLAGS="$cf_save_CPPFLAGS"
fi
-echo "$as_me:2549: result: $cf_cv_ansi_cc" >&5
+echo "$as_me:2572: result: $cf_cv_ansi_cc" >&5
echo "${ECHO_T}$cf_cv_ansi_cc" >&6
if test "$cf_cv_ansi_cc" != "no"; then
@@ -2568,8 +2591,8 @@ no)
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
+ && 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"
@@ -2584,6 +2607,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -2599,8 +2632,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -2612,7 +2645,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -2629,7 +2662,7 @@ fi
fi
if test "$cf_cv_ansi_cc" = "no"; then
- { { echo "$as_me:2632: error: Your compiler does not appear to recognize prototypes.
+ { { echo "$as_me:2665: 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
@@ -2663,13 +2696,13 @@ if test "$cross_compiling" = yes ; then
LDCONFIG=:
else
case "$cf_cv_system_name" in #(vi
-freebsd*) #(vi
+dragonfly*|freebsd*) #(vi
test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
;;
*) LDPATH=$PATH:/sbin:/usr/sbin
# Extract the first word of "ldconfig", so it can be a program name with args.
set dummy ldconfig; ac_word=$2
-echo "$as_me:2672: checking for $ac_word" >&5
+echo "$as_me:2705: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_LDCONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2686,7 +2719,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
- echo "$as_me:2689: found $ac_dir/$ac_word" >&5
+ echo "$as_me:2722: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -2697,10 +2730,10 @@ fi
LDCONFIG=$ac_cv_path_LDCONFIG
if test -n "$LDCONFIG"; then
- echo "$as_me:2700: result: $LDCONFIG" >&5
+ echo "$as_me:2733: result: $LDCONFIG" >&5
echo "${ECHO_T}$LDCONFIG" >&6
else
- echo "$as_me:2703: result: no" >&5
+ echo "$as_me:2736: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2708,7 +2741,7 @@ fi
esac
fi
-echo "$as_me:2711: checking if you want to ensure bool is consistent with C++" >&5
+echo "$as_me:2744: checking if you want to ensure bool is consistent with C++" >&5
echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
# Check whether --with-cxx or --without-cxx was given.
@@ -2718,7 +2751,7 @@ if test "${with_cxx+set}" = set; then
else
cf_with_cxx=yes
fi;
-echo "$as_me:2721: result: $cf_with_cxx" >&5
+echo "$as_me:2754: result: $cf_with_cxx" >&5
echo "${ECHO_T}$cf_with_cxx" >&6
if test "X$cf_with_cxx" = Xno ; then
CXX=""
@@ -2736,7 +2769,7 @@ if test -n "$ac_tool_prefix"; then
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:2739: checking for $ac_word" >&5
+echo "$as_me:2772: 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
@@ -2751,7 +2784,7 @@ for ac_dir in $ac_dummy; do
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:2754: found $ac_dir/$ac_word" >&5
+echo "$as_me:2787: found $ac_dir/$ac_word" >&5
break
done
@@ -2759,10 +2792,10 @@ fi
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
- echo "$as_me:2762: result: $CXX" >&5
+ echo "$as_me:2795: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
- echo "$as_me:2765: result: no" >&5
+ echo "$as_me:2798: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2775,7 +2808,7 @@ if test -z "$CXX"; then
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:2778: checking for $ac_word" >&5
+echo "$as_me:2811: 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
@@ -2790,7 +2823,7 @@ for ac_dir in $ac_dummy; do
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:2793: found $ac_dir/$ac_word" >&5
+echo "$as_me:2826: found $ac_dir/$ac_word" >&5
break
done
@@ -2798,10 +2831,10 @@ fi
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
- echo "$as_me:2801: result: $ac_ct_CXX" >&5
+ echo "$as_me:2834: result: $ac_ct_CXX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6
else
- echo "$as_me:2804: result: no" >&5
+ echo "$as_me:2837: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2813,32 +2846,32 @@ test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
fi
# Provide some information about the compiler.
-echo "$as_me:2816:" \
+echo "$as_me:2849:" \
"checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:2819: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2852: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:2822: \$? = $ac_status" >&5
+ echo "$as_me:2855: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:2824: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2857: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:2827: \$? = $ac_status" >&5
+ echo "$as_me:2860: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:2829: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:2862: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:2832: \$? = $ac_status" >&5
+ echo "$as_me:2865: \$? = $ac_status" >&5
(exit $ac_status); }
-echo "$as_me:2835: checking whether we are using the GNU C++ compiler" >&5
+echo "$as_me:2868: 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 2841 "configure"
+#line 2874 "configure"
#include "confdefs.h"
int
@@ -2853,16 +2886,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2856: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2889: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2859: \$? = $ac_status" >&5
+ echo "$as_me:2892: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2862: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2895: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2865: \$? = $ac_status" >&5
+ echo "$as_me:2898: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
@@ -2874,19 +2907,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:2877: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "$as_me:2910: 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:2883: checking whether $CXX accepts -g" >&5
+echo "$as_me:2916: 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 2889 "configure"
+#line 2922 "configure"
#include "confdefs.h"
int
@@ -2898,16 +2931,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2901: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2934: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2904: \$? = $ac_status" >&5
+ echo "$as_me:2937: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2907: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2940: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2910: \$? = $ac_status" >&5
+ echo "$as_me:2943: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cxx_g=yes
else
@@ -2917,7 +2950,7 @@ ac_cv_prog_cxx_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:2920: result: $ac_cv_prog_cxx_g" >&5
+echo "$as_me:2953: 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
@@ -2944,7 +2977,7 @@ for ac_declaration in \
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 2947 "configure"
+#line 2980 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
@@ -2957,16 +2990,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2963: \$? = $ac_status" >&5
+ echo "$as_me:2996: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2966: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2999: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2969: \$? = $ac_status" >&5
+ echo "$as_me:3002: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -2976,7 +3009,7 @@ continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 2979 "configure"
+#line 3012 "configure"
#include "confdefs.h"
$ac_declaration
int
@@ -2988,16 +3021,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3024: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2994: \$? = $ac_status" >&5
+ echo "$as_me:3027: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2997: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3030: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3000: \$? = $ac_status" >&5
+ echo "$as_me:3033: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -3006,7 +3039,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
-rm -f conftest*
+rm -rf conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
@@ -3024,7 +3057,7 @@ ac_main_return=return
if test "$CXX" = "g++" ; then
# Extract the first word of "g++", so it can be a program name with args.
set dummy g++; ac_word=$2
-echo "$as_me:3027: checking for $ac_word" >&5
+echo "$as_me:3060: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_path_CXX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3041,7 +3074,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if $as_executable_p "$ac_dir/$ac_word"; then
ac_cv_path_CXX="$ac_dir/$ac_word"
- echo "$as_me:3044: found $ac_dir/$ac_word" >&5
+ echo "$as_me:3077: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -3052,16 +3085,16 @@ fi
CXX=$ac_cv_path_CXX
if test -n "$CXX"; then
- echo "$as_me:3055: result: $CXX" >&5
+ echo "$as_me:3088: result: $CXX" >&5
echo "${ECHO_T}$CXX" >&6
else
- echo "$as_me:3058: result: no" >&5
+ echo "$as_me:3091: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test "$CXX" = "g++" ; then
- { echo "$as_me:3064: WARNING: ignoring hardcoded g++" >&5
+ { echo "$as_me:3097: WARNING: ignoring hardcoded g++" >&5
echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
cf_with_cxx=no; CXX=""; GXX="";
fi
@@ -3069,11 +3102,11 @@ fi
GXX_VERSION=none
if test "$GXX" = yes; then
- echo "$as_me:3072: checking version of g++" >&5
+ echo "$as_me:3105: checking version of g++" >&5
echo $ECHO_N "checking version of g++... $ECHO_C" >&6
- GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+ GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
test -z "$GXX_VERSION" && GXX_VERSION=unknown
- echo "$as_me:3076: result: $GXX_VERSION" >&5
+ echo "$as_me:3109: result: $GXX_VERSION" >&5
echo "${ECHO_T}$GXX_VERSION" >&6
fi
@@ -3081,12 +3114,12 @@ case $GXX_VERSION in
1*|2.[0-6]*)
# GXX=""; CXX=""; ac_cv_prog_gxx=no
# cf_cxx_library=no
- { echo "$as_me:3084: WARNING: templates do not work" >&5
+ { echo "$as_me:3117: WARNING: templates do not work" >&5
echo "$as_me: WARNING: templates do not work" >&2;}
;;
esac
-echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
+echo "$as_me:3122: checking if you want to build C++ binding and demo" >&5
echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
# Check whether --with-cxx-binding or --without-cxx-binding was given.
@@ -3096,10 +3129,10 @@ if test "${with_cxx_binding+set}" = set; then
else
cf_with_cxx_binding=$cf_with_cxx
fi;
-echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
+echo "$as_me:3132: result: $cf_with_cxx_binding" >&5
echo "${ECHO_T}$cf_with_cxx_binding" >&6
-echo "$as_me:3102: checking if you want to build with Ada95" >&5
+echo "$as_me:3135: checking if you want to build with Ada95" >&5
echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
# Check whether --with-ada or --without-ada was given.
@@ -3109,10 +3142,23 @@ if test "${with_ada+set}" = set; then
else
cf_with_ada=yes
fi;
-echo "$as_me:3112: result: $cf_with_ada" >&5
+echo "$as_me:3145: result: $cf_with_ada" >&5
echo "${ECHO_T}$cf_with_ada" >&6
-echo "$as_me:3115: checking if you want to build programs such as tic" >&5
+echo "$as_me:3148: checking if you want to install manpages" >&5
+echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
+
+# Check whether --with-manpages or --without-manpages was given.
+if test "${with_manpages+set}" = set; then
+ withval="$with_manpages"
+ cf_with_manpages=$withval
+else
+ cf_with_manpages=yes
+fi;
+echo "$as_me:3158: result: $cf_with_manpages" >&5
+echo "${ECHO_T}$cf_with_manpages" >&6
+
+echo "$as_me:3161: 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.
@@ -3122,10 +3168,23 @@ if test "${with_progs+set}" = set; then
else
cf_with_progs=yes
fi;
-echo "$as_me:3125: result: $cf_with_progs" >&5
+echo "$as_me:3171: result: $cf_with_progs" >&5
echo "${ECHO_T}$cf_with_progs" >&6
-echo "$as_me:3128: checking if you wish to install curses.h" >&5
+echo "$as_me:3174: checking if you want to build test-programs" >&5
+echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
+
+# Check whether --with-tests or --without-tests was given.
+if test "${with_tests+set}" = set; then
+ withval="$with_tests"
+ cf_with_tests=$withval
+else
+ cf_with_tests=yes
+fi;
+echo "$as_me:3184: result: $cf_with_tests" >&5
+echo "${ECHO_T}$cf_with_tests" >&6
+
+echo "$as_me:3187: 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.
@@ -3135,7 +3194,7 @@ if test "${with_curses_h+set}" = set; then
else
with_curses_h=yes
fi;
-echo "$as_me:3138: result: $with_curses_h" >&5
+echo "$as_me:3197: result: $with_curses_h" >&5
echo "${ECHO_T}$with_curses_h" >&6
modules_to_build="ncurses"
@@ -3161,7 +3220,7 @@ 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:3164: checking for $ac_word" >&5
+echo "$as_me:3223: 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
@@ -3176,7 +3235,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AWK="$ac_prog"
-echo "$as_me:3179: found $ac_dir/$ac_word" >&5
+echo "$as_me:3238: found $ac_dir/$ac_word" >&5
break
done
@@ -3184,21 +3243,21 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$as_me:3187: result: $AWK" >&5
+ echo "$as_me:3246: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
- echo "$as_me:3190: result: no" >&5
+ echo "$as_me:3249: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$AWK" && break
done
-test -z "$AWK" && { { echo "$as_me:3197: error: No awk program found" >&5
+test -z "$AWK" && { { echo "$as_me:3256: error: No awk program found" >&5
echo "$as_me: error: No awk program found" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:3201: checking for egrep" >&5
+echo "$as_me:3260: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -3208,11 +3267,11 @@ else
else ac_cv_prog_egrep='egrep'
fi
fi
-echo "$as_me:3211: result: $ac_cv_prog_egrep" >&5
+echo "$as_me:3270: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
EGREP=$ac_cv_prog_egrep
-test -z "$EGREP" && { { echo "$as_me:3215: error: No egrep program found" >&5
+test -z "$EGREP" && { { echo "$as_me:3274: error: No egrep program found" >&5
echo "$as_me: error: No egrep program found" >&2;}
{ (exit 1); exit 1; }; }
@@ -3228,7 +3287,7 @@ echo "$as_me: error: No egrep program found" >&2;}
# 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:3231: checking for a BSD compatible install" >&5
+echo "$as_me:3290: 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
@@ -3277,7 +3336,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:3280: result: $INSTALL" >&5
+echo "$as_me:3339: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -3298,11 +3357,11 @@ case $INSTALL in
;;
esac
-for ac_prog in tdlint lint alint
+for ac_prog in tdlint lint alint splint lclint
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:3305: checking for $ac_word" >&5
+echo "$as_me:3364: 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
@@ -3317,7 +3376,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_LINT="$ac_prog"
-echo "$as_me:3320: found $ac_dir/$ac_word" >&5
+echo "$as_me:3379: found $ac_dir/$ac_word" >&5
break
done
@@ -3325,28 +3384,45 @@ fi
fi
LINT=$ac_cv_prog_LINT
if test -n "$LINT"; then
- echo "$as_me:3328: result: $LINT" >&5
+ echo "$as_me:3387: result: $LINT" >&5
echo "${ECHO_T}$LINT" >&6
else
- echo "$as_me:3331: result: no" >&5
+ echo "$as_me:3390: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$LINT" && break
done
-echo "$as_me:3338: checking whether ln -s works" >&5
+echo "$as_me:3397: 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:3342: result: yes" >&5
+ echo "$as_me:3401: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:3345: result: no, using $LN_S" >&5
+ echo "$as_me:3404: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo "$as_me:3349: checking for long file names" >&5
+echo "$as_me:3408: checking if $LN_S -f options work" >&5
+echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
+
+rm -f conf$$.src conf$$dst
+echo >conf$$.dst
+echo first >conf$$.src
+if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
+ cf_prog_ln_sf=yes
+else
+ cf_prog_ln_sf=no
+fi
+rm -f conf$$.dst conf$$src
+echo "$as_me:3420: result: $cf_prog_ln_sf" >&5
+echo "${ECHO_T}$cf_prog_ln_sf" >&6
+
+test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+
+echo "$as_me:3425: 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
@@ -3385,7 +3461,7 @@ for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
rm -rf $ac_xdir 2>/dev/null
done
fi
-echo "$as_me:3388: result: $ac_cv_sys_long_file_names" >&5
+echo "$as_me:3464: 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
@@ -3395,7 +3471,182 @@ EOF
fi
-echo "$as_me:3398: checking if we should assume mixed-case filenames" >&5
+# if we find pkg-config, check if we should install the ".pc" files.
+
+echo "$as_me:3476: checking if you want to use pkg-config" >&5
+echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
+
+# Check whether --with-pkg-config or --without-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then
+ withval="$with_pkg_config"
+ cf_pkg_config=$withval
+else
+ cf_pkg_config=yes
+fi;
+echo "$as_me:3486: result: $cf_pkg_config" >&5
+echo "${ECHO_T}$cf_pkg_config" >&6
+
+case $cf_pkg_config in #(vi
+no) #(vi
+ PKG_CONFIG=none
+ ;;
+yes) #(vi
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+echo "$as_me:3497: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_PKG_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:3514: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+ echo "$as_me:3525: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+ echo "$as_me:3528: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:3537: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:3554: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+
+if test -n "$ac_pt_PKG_CONFIG"; then
+ echo "$as_me:3566: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+else
+ echo "$as_me:3569: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+ ;;
+*)
+ PKG_CONFIG=$withval
+ ;;
+esac
+
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$PKG_CONFIG" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval PKG_CONFIG="$PKG_CONFIG"
+ case ".$PKG_CONFIG" in #(vi
+ .NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;; #(vi
+.no|.NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+*)
+ { { echo "$as_me:3612: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+fi
+
+if test "$PKG_CONFIG" != no ; then
+ echo "$as_me:3621: checking if we should install .pc files for $PKG_CONFIG" >&5
+echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
+
+ # Leave this as something that can be overridden in the environment.
+ if test -z "$PKG_CONFIG_LIBDIR" ; then
+ PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
+ fi
+ PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
+ if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
+
+# Check whether --enable-pc-files or --disable-pc-files was given.
+if test "${enable_pc_files+set}" = set; then
+ enableval="$enable_pc_files"
+ enable_pc_files=$enableval
+else
+ enable_pc_files=no
+fi;
+ echo "$as_me:3638: result: $enable_pc_files" >&5
+echo "${ECHO_T}$enable_pc_files" >&6
+ else
+ echo "$as_me:3641: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
+echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
+ enable_pc_files=no
+ fi
+fi
+
+echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5
echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
# Check whether --enable-mixed-case or --disable-mixed-case was given.
@@ -3405,11 +3656,11 @@ if test "${enable_mixed_case+set}" = set; then
else
enable_mixedcase=auto
fi;
-echo "$as_me:3408: result: $enable_mixedcase" >&5
+echo "$as_me:3659: result: $enable_mixedcase" >&5
echo "${ECHO_T}$enable_mixedcase" >&6
if test "$enable_mixedcase" = "auto" ; then
-echo "$as_me:3412: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:3663: 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
@@ -3436,7 +3687,7 @@ else
fi
fi
-echo "$as_me:3439: result: $cf_cv_mixedcase" >&5
+echo "$as_me:3690: 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
@@ -3453,7 +3704,7 @@ EOF
fi
# do this after mixed-case option (tags/TAGS is not as important as tic).
-echo "$as_me:3456: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:3707: 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
@@ -3473,18 +3724,92 @@ fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:3476: result: yes" >&5
+ echo "$as_me:3727: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$as_me:3480: result: no" >&5
+ echo "$as_me:3731: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
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:3487: checking for $ac_word" >&5
+for ac_prog in exctags ctags
+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:3740: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CTAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CTAGS"; then
+ ac_cv_prog_CTAGS="$CTAGS" # 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_CTAGS="$ac_prog"
+echo "$as_me:3755: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+CTAGS=$ac_cv_prog_CTAGS
+if test -n "$CTAGS"; then
+ echo "$as_me:3763: result: $CTAGS" >&5
+echo "${ECHO_T}$CTAGS" >&6
+else
+ echo "$as_me:3766: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CTAGS" && break
+done
+
+for ac_prog in exetags etags
+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:3777: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ETAGS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ETAGS"; then
+ ac_cv_prog_ETAGS="$ETAGS" # 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_ETAGS="$ac_prog"
+echo "$as_me:3792: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ETAGS=$ac_cv_prog_ETAGS
+if test -n "$ETAGS"; then
+ echo "$as_me:3800: result: $ETAGS" >&5
+echo "${ECHO_T}$ETAGS" >&6
+else
+ echo "$as_me:3803: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ETAGS" && break
+done
+
+# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
+set dummy ${CTAGS:-ctags}; ac_word=$2
+echo "$as_me:3812: 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
@@ -3499,7 +3824,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_LOWER_TAGS="yes"
-echo "$as_me:3502: found $ac_dir/$ac_word" >&5
+echo "$as_me:3827: found $ac_dir/$ac_word" >&5
break
done
@@ -3508,17 +3833,17 @@ fi
fi
MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
if test -n "$MAKE_LOWER_TAGS"; then
- echo "$as_me:3511: result: $MAKE_LOWER_TAGS" >&5
+ echo "$as_me:3836: result: $MAKE_LOWER_TAGS" >&5
echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
else
- echo "$as_me:3514: result: no" >&5
+ echo "$as_me:3839: 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:3521: checking for $ac_word" >&5
+ # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
+set dummy ${ETAGS:-etags}; ac_word=$2
+echo "$as_me:3846: 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
@@ -3533,7 +3858,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_UPPER_TAGS="yes"
-echo "$as_me:3536: found $ac_dir/$ac_word" >&5
+echo "$as_me:3861: found $ac_dir/$ac_word" >&5
break
done
@@ -3542,10 +3867,10 @@ fi
fi
MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
if test -n "$MAKE_UPPER_TAGS"; then
- echo "$as_me:3545: result: $MAKE_UPPER_TAGS" >&5
+ echo "$as_me:3870: result: $MAKE_UPPER_TAGS" >&5
echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
else
- echo "$as_me:3548: result: no" >&5
+ echo "$as_me:3873: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3565,7 +3890,7 @@ else
MAKE_LOWER_TAGS="#"
fi
-echo "$as_me:3568: checking for makeflags variable" >&5
+echo "$as_me:3893: 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
@@ -3579,10 +3904,10 @@ SHELL = /bin/sh
all :
@ echo '.$cf_option'
CF_EOF
- cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[ ]*$,,'`
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
case "$cf_result" in
.*k)
- cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
case "$cf_result" in
.*CC=*) cf_cv_makeflags=
;;
@@ -3599,13 +3924,13 @@ CF_EOF
rm -f cf_makeflags.tmp
fi
-echo "$as_me:3602: result: $cf_cv_makeflags" >&5
+echo "$as_me:3927: result: $cf_cv_makeflags" >&5
echo "${ECHO_T}$cf_cv_makeflags" >&6
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:3608: checking for $ac_word" >&5
+echo "$as_me:3933: 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
@@ -3620,7 +3945,7 @@ for ac_dir in $ac_dummy; do
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:3623: found $ac_dir/$ac_word" >&5
+echo "$as_me:3948: found $ac_dir/$ac_word" >&5
break
done
@@ -3628,10 +3953,10 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:3631: result: $RANLIB" >&5
+ echo "$as_me:3956: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
- echo "$as_me:3634: result: no" >&5
+ echo "$as_me:3959: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3640,7 +3965,7 @@ 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:3643: checking for $ac_word" >&5
+echo "$as_me:3968: 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
@@ -3655,7 +3980,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_RANLIB="ranlib"
-echo "$as_me:3658: found $ac_dir/$ac_word" >&5
+echo "$as_me:3983: found $ac_dir/$ac_word" >&5
break
done
@@ -3664,10 +3989,10 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
+ echo "$as_me:3992: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$as_me:3670: result: no" >&5
+ echo "$as_me:3995: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3679,7 +4004,7 @@ 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:3682: checking for $ac_word" >&5
+echo "$as_me:4007: 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
@@ -3694,7 +4019,7 @@ for ac_dir in $ac_dummy; do
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:3697: found $ac_dir/$ac_word" >&5
+echo "$as_me:4022: found $ac_dir/$ac_word" >&5
break
done
@@ -3702,10 +4027,10 @@ fi
fi
LD=$ac_cv_prog_LD
if test -n "$LD"; then
- echo "$as_me:3705: result: $LD" >&5
+ echo "$as_me:4030: result: $LD" >&5
echo "${ECHO_T}$LD" >&6
else
- echo "$as_me:3708: result: no" >&5
+ echo "$as_me:4033: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3714,7 +4039,7 @@ 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:3717: checking for $ac_word" >&5
+echo "$as_me:4042: 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
@@ -3729,7 +4054,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_LD="ld"
-echo "$as_me:3732: found $ac_dir/$ac_word" >&5
+echo "$as_me:4057: found $ac_dir/$ac_word" >&5
break
done
@@ -3738,10 +4063,10 @@ fi
fi
ac_ct_LD=$ac_cv_prog_ac_ct_LD
if test -n "$ac_ct_LD"; then
- echo "$as_me:3741: result: $ac_ct_LD" >&5
+ echo "$as_me:4066: result: $ac_ct_LD" >&5
echo "${ECHO_T}$ac_ct_LD" >&6
else
- echo "$as_me:3744: result: no" >&5
+ echo "$as_me:4069: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3753,7 +4078,7 @@ 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:3756: checking for $ac_word" >&5
+echo "$as_me:4081: 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
@@ -3768,7 +4093,7 @@ for ac_dir in $ac_dummy; do
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:3771: found $ac_dir/$ac_word" >&5
+echo "$as_me:4096: found $ac_dir/$ac_word" >&5
break
done
@@ -3776,10 +4101,10 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:3779: result: $AR" >&5
+ echo "$as_me:4104: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
- echo "$as_me:3782: result: no" >&5
+ echo "$as_me:4107: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3788,7 +4113,7 @@ 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:3791: checking for $ac_word" >&5
+echo "$as_me:4116: 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
@@ -3803,7 +4128,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_AR="ar"
-echo "$as_me:3806: found $ac_dir/$ac_word" >&5
+echo "$as_me:4131: found $ac_dir/$ac_word" >&5
break
done
@@ -3812,10 +4137,10 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:3815: result: $ac_ct_AR" >&5
+ echo "$as_me:4140: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
- echo "$as_me:3818: result: no" >&5
+ echo "$as_me:4143: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3824,25 +4149,140 @@ else
AR="$ac_cv_prog_AR"
fi
-if test "${cf_cv_subst_AR_OPTS+set}" = set; then
+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:4155: 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:4170: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:4178: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:4181: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
-echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
+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:4190: 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:4205: found $ac_dir/$ac_word" >&5
+break
+done
-if test -z "$AR_OPTS" ; then
- AR_OPTS=rv
+ 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:4214: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:4217: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
fi
-cf_cv_subst_AR_OPTS=$AR_OPTS
-echo "$as_me:3840: result: $AR_OPTS" >&5
-echo "${ECHO_T}$AR_OPTS" >&6
+echo "$as_me:4226: checking for options to update archives" >&5
+echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
+if test "${cf_cv_ar_flags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_ar_flags=unknown
+ for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+ if test "x$ARFLAGS" != "x" ; then
+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
+ cf_cv_ar_flags=
+ break
+ fi
+ fi
+
+ rm -f conftest.$ac_cv_objext
+ rm -f conftest.a
+
+ cat >conftest.$ac_ext <<EOF
+#line 4249 "configure"
+int testdata[3] = { 123, 456, 789 };
+EOF
+ if { (eval echo "$as_me:4252: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:4255: \$? = $ac_status" >&5
+ (exit $ac_status); } ; then
+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
+ if test -f conftest.a ; then
+ cf_cv_ar_flags=$cf_ar_flags
+ break
+ fi
+ else
+ test -n "$verbose" && echo " cannot compile test-program" 1>&6
+
+echo "${as_me:-configure}:4266: testing cannot compile test-program ..." 1>&5
+
+ break
+ fi
+ done
+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
fi
+echo "$as_me:4274: result: $cf_cv_ar_flags" >&5
+echo "${ECHO_T}$cf_cv_ar_flags" >&6
-echo "$as_me:3845: checking if you have specified an install-prefix" >&5
+if test -n "$ARFLAGS" ; then
+ if test -n "$cf_cv_ar_flags" ; then
+ ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
+ fi
+else
+ ARFLAGS=$cf_cv_ar_flags
+fi
+
+echo "$as_me:4285: 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.
@@ -3855,7 +4295,7 @@ if test "${with_install_prefix+set}" = set; then
;;
esac
fi;
-echo "$as_me:3858: result: $DESTDIR" >&5
+echo "$as_me:4298: result: $DESTDIR" >&5
echo "${ECHO_T}$DESTDIR" >&6
###############################################################################
@@ -3883,7 +4323,7 @@ else
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:3886: checking for $ac_word" >&5
+echo "$as_me:4326: 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
@@ -3898,7 +4338,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_BUILD_CC="$ac_prog"
-echo "$as_me:3901: found $ac_dir/$ac_word" >&5
+echo "$as_me:4341: found $ac_dir/$ac_word" >&5
break
done
@@ -3906,10 +4346,10 @@ fi
fi
BUILD_CC=$ac_cv_prog_BUILD_CC
if test -n "$BUILD_CC"; then
- echo "$as_me:3909: result: $BUILD_CC" >&5
+ echo "$as_me:4349: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6
else
- echo "$as_me:3912: result: no" >&5
+ echo "$as_me:4352: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -3917,12 +4357,12 @@ fi
done
fi;
- echo "$as_me:3920: checking for native build C compiler" >&5
+ echo "$as_me:4360: checking for native build C compiler" >&5
echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
- echo "$as_me:3922: result: $BUILD_CC" >&5
+ echo "$as_me:4362: result: $BUILD_CC" >&5
echo "${ECHO_T}$BUILD_CC" >&6
- echo "$as_me:3925: checking for native build C preprocessor" >&5
+ echo "$as_me:4365: checking for native build C preprocessor" >&5
echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
# Check whether --with-build-cpp or --without-build-cpp was given.
@@ -3932,10 +4372,10 @@ if test "${with_build_cpp+set}" = set; then
else
BUILD_CPP='${BUILD_CC} -E'
fi;
- echo "$as_me:3935: result: $BUILD_CPP" >&5
+ echo "$as_me:4375: result: $BUILD_CPP" >&5
echo "${ECHO_T}$BUILD_CPP" >&6
- echo "$as_me:3938: checking for native build C flags" >&5
+ echo "$as_me:4378: checking for native build C flags" >&5
echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
# Check whether --with-build-cflags or --without-build-cflags was given.
@@ -3943,10 +4383,10 @@ if test "${with_build_cflags+set}" = set; then
withval="$with_build_cflags"
BUILD_CFLAGS="$withval"
fi;
- echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
+ echo "$as_me:4386: result: $BUILD_CFLAGS" >&5
echo "${ECHO_T}$BUILD_CFLAGS" >&6
- echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
+ echo "$as_me:4389: checking for native build C preprocessor-flags" >&5
echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
# Check whether --with-build-cppflags or --without-build-cppflags was given.
@@ -3954,10 +4394,10 @@ if test "${with_build_cppflags+set}" = set; then
withval="$with_build_cppflags"
BUILD_CPPFLAGS="$withval"
fi;
- echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
+ echo "$as_me:4397: result: $BUILD_CPPFLAGS" >&5
echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
- echo "$as_me:3960: checking for native build linker-flags" >&5
+ echo "$as_me:4400: checking for native build linker-flags" >&5
echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
# Check whether --with-build-ldflags or --without-build-ldflags was given.
@@ -3965,10 +4405,10 @@ if test "${with_build_ldflags+set}" = set; then
withval="$with_build_ldflags"
BUILD_LDFLAGS="$withval"
fi;
- echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
+ echo "$as_me:4408: result: $BUILD_LDFLAGS" >&5
echo "${ECHO_T}$BUILD_LDFLAGS" >&6
- echo "$as_me:3971: checking for native build linker-libraries" >&5
+ echo "$as_me:4411: checking for native build linker-libraries" >&5
echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
# Check whether --with-build-libs or --without-build-libs was given.
@@ -3976,7 +4416,7 @@ if test "${with_build_libs+set}" = set; then
withval="$with_build_libs"
BUILD_LIBS="$withval"
fi;
- echo "$as_me:3979: result: $BUILD_LIBS" >&5
+ echo "$as_me:4419: result: $BUILD_LIBS" >&5
echo "${ECHO_T}$BUILD_LIBS" >&6
# this assumes we're on Unix.
@@ -3986,7 +4426,7 @@ echo "${ECHO_T}$BUILD_LIBS" >&6
: ${BUILD_CC:='${CC}'}
if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
- { { echo "$as_me:3989: error: Cross-build requires two compilers.
+ { { echo "$as_me:4429: error: Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." >&5
echo "$as_me: error: Cross-build requires two compilers.
Use --with-build-cc to specify the native compiler." >&2;}
@@ -4011,6 +4451,32 @@ fi
### shared, for example.
cf_list_models=""
+echo "$as_me:4454: checking if libtool -version-number should be used" >&5
+echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
+
+# Check whether --enable-libtool-version or --disable-libtool-version was given.
+if test "${enable_libtool_version+set}" = set; then
+ enableval="$enable_libtool_version"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
+ cf_libtool_version=no
+ else
+ cf_libtool_version=yes
+ fi
+else
+ enableval=yes
+ cf_libtool_version=yes
+
+fi;
+echo "$as_me:4471: result: $cf_libtool_version" >&5
+echo "${ECHO_T}$cf_libtool_version" >&6
+
+if test "$cf_libtool_version" = yes ; then
+ LIBTOOL_VERSION="-version-number"
+else
+ LIBTOOL_VERSION="-version-info"
+fi
+
LIBTOOL=
# common library maintenance symbols that are convenient for libtool scripts:
@@ -4027,7 +4493,7 @@ LIB_LINK='${CC}'
LIB_INSTALL=
LIB_UNINSTALL=
-echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
+echo "$as_me:4496: 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.
@@ -4037,11 +4503,11 @@ if test "${with_libtool+set}" = set; then
else
with_libtool=no
fi;
-echo "$as_me:4040: result: $with_libtool" >&5
+echo "$as_me:4506: result: $with_libtool" >&5
echo "${ECHO_T}$with_libtool" >&6
if test "$with_libtool" != "no"; then
- if test "$with_libtool" != "yes" ; then
+ if test "$with_libtool" != "yes" ; then
if test "x$prefix" != xNONE; then
cf_path_syntax="$prefix"
@@ -4068,7 +4534,7 @@ case ".$with_libtool" in #(vi
with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
+ { { echo "$as_me:4537: error: expected a pathname, not \"$with_libtool\"" >&5
echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -4076,9 +4542,9 @@ esac
LIBTOOL=$with_libtool
else
- # Extract the first word of "libtool", so it can be a program name with args.
+ # Extract the first word of "libtool", so it can be a program name with args.
set dummy libtool; ac_word=$2
-echo "$as_me:4081: checking for $ac_word" >&5
+echo "$as_me:4547: 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
@@ -4095,7 +4561,7 @@ for ac_dir in $ac_dummy; do
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:4098: found $ac_dir/$ac_word" >&5
+ echo "$as_me:4564: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -4106,20 +4572,20 @@ fi
LIBTOOL=$ac_cv_path_LIBTOOL
if test -n "$LIBTOOL"; then
- echo "$as_me:4109: result: $LIBTOOL" >&5
+ echo "$as_me:4575: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6
else
- echo "$as_me:4112: result: no" >&5
+ echo "$as_me:4578: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- fi
- if test -z "$LIBTOOL" ; then
- { { echo "$as_me:4118: error: Cannot find libtool" >&5
+ fi
+ if test -z "$LIBTOOL" ; then
+ { { echo "$as_me:4584: 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` ${LIBTOOL_OPTS} -o'
+ fi
+ LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
LIB_OBJECT='${OBJECTS:.o=.lo}'
LIB_SUFFIX=.la
LIB_CLEAN='${LIBTOOL} --mode=clean'
@@ -4130,24 +4596,32 @@ echo "$as_me: error: Cannot find libtool" >&2;}
LIB_PREP=:
# Show the version of libtool
- echo "$as_me:4133: checking version of libtool" >&5
+ echo "$as_me:4599: 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.
+ # bug reports it might be useful to have the original string. "("
cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
- echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
+ echo "$as_me:4606: 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:4143: error: This is not GNU libtool" >&5
+ { { echo "$as_me:4609: error: This is not GNU libtool" >&5
echo "$as_me: error: This is not GNU libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
+ # special hack to add -no-undefined (which libtool should do for itself)
+ LT_UNDEF=
+ case "$cf_cv_system_name" in #(vi
+ cygwin*|mingw32*|uwin*|aix[456]) #(vi
+ LT_UNDEF=-no-undefined
+ ;;
+ esac
+
# special hack to add --tag option for C++ compiler
- case $cf_cv_libtool_version in
- 1.[5-9]*|[2-9]*)
+ case $cf_cv_libtool_version in #(vi
+ 1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
LIBTOOL_CXX="$LIBTOOL --tag=CXX"
LIBTOOL="$LIBTOOL --tag=CC"
;;
@@ -4168,7 +4642,7 @@ cf_list_models="$cf_list_models libtool"
else
-echo "$as_me:4171: checking if you want to build shared libraries" >&5
+echo "$as_me:4645: 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.
@@ -4178,11 +4652,11 @@ if test "${with_shared+set}" = set; then
else
with_shared=no
fi;
-echo "$as_me:4181: result: $with_shared" >&5
+echo "$as_me:4655: result: $with_shared" >&5
echo "${ECHO_T}$with_shared" >&6
test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
-echo "$as_me:4185: checking if you want to build static libraries" >&5
+echo "$as_me:4659: 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.
@@ -4192,11 +4666,11 @@ if test "${with_normal+set}" = set; then
else
with_normal=yes
fi;
-echo "$as_me:4195: result: $with_normal" >&5
+echo "$as_me:4669: result: $with_normal" >&5
echo "${ECHO_T}$with_normal" >&6
test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
-echo "$as_me:4199: checking if you want to build debug libraries" >&5
+echo "$as_me:4673: 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.
@@ -4206,11 +4680,11 @@ if test "${with_debug+set}" = set; then
else
with_debug=yes
fi;
-echo "$as_me:4209: result: $with_debug" >&5
+echo "$as_me:4683: result: $with_debug" >&5
echo "${ECHO_T}$with_debug" >&6
test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
-echo "$as_me:4213: checking if you want to build profiling libraries" >&5
+echo "$as_me:4687: 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.
@@ -4220,7 +4694,7 @@ if test "${with_profile+set}" = set; then
else
with_profile=no
fi;
-echo "$as_me:4223: result: $with_profile" >&5
+echo "$as_me:4697: result: $with_profile" >&5
echo "${ECHO_T}$with_profile" >&6
test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
@@ -4228,19 +4702,19 @@ fi
###############################################################################
-echo "$as_me:4231: checking for specified models" >&5
+echo "$as_me:4705: 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:4235: result: $cf_list_models" >&5
+echo "$as_me:4709: 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:4240: checking for default model" >&5
+echo "$as_me:4714: 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:4243: result: $DFT_LWR_MODEL" >&5
+echo "$as_me:4717: result: $DFT_LWR_MODEL" >&5
echo "${ECHO_T}$DFT_LWR_MODEL" >&6
DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
@@ -4269,7 +4743,7 @@ LIB_SUFFIX=
###############################################################################
-echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
+echo "$as_me:4746: 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.
@@ -4279,10 +4753,10 @@ if test "${with_termlib+set}" = set; then
else
with_termlib=no
fi;
-echo "$as_me:4282: result: $with_termlib" >&5
+echo "$as_me:4756: result: $with_termlib" >&5
echo "${ECHO_T}$with_termlib" >&6
-echo "$as_me:4285: checking if you want to build a separate tic library" >&5
+echo "$as_me:4759: checking if you want to build a separate tic library" >&5
echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
# Check whether --with-ticlib or --without-ticlib was given.
@@ -4292,13 +4766,13 @@ if test "${with_ticlib+set}" = set; then
else
with_ticlib=no
fi;
-echo "$as_me:4295: result: $with_ticlib" >&5
+echo "$as_me:4769: result: $with_ticlib" >&5
echo "${ECHO_T}$with_ticlib" >&6
### Checks for special libraries, must be done up-front.
SHLIB_LIST=""
-echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
+echo "$as_me:4775: 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.
@@ -4308,27 +4782,27 @@ if test "${with_gpm+set}" = set; then
else
with_gpm=maybe
fi;
-echo "$as_me:4311: result: $with_gpm" >&5
+echo "$as_me:4785: result: $with_gpm" >&5
echo "${ECHO_T}$with_gpm" >&6
if test "$with_gpm" != no ; then
- echo "$as_me:4315: checking for gpm.h" >&5
+ echo "$as_me:4789: 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 4321 "configure"
+#line 4795 "configure"
#include "confdefs.h"
#include <gpm.h>
_ACEOF
-if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4799: \"$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:4331: \$? = $ac_status" >&5
+ echo "$as_me:4805: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4347,7 +4821,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
+echo "$as_me:4824: 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
@@ -4358,14 +4832,14 @@ EOF
if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
test -n "$verbose" && echo " assuming we really have GPM library" 1>&6
-echo "${as_me-configure}:4361: testing assuming we really have GPM library ..." 1>&5
+echo "${as_me:-configure}:4835: testing assuming we really have GPM library ..." 1>&5
cat >>confdefs.h <<\EOF
#define HAVE_LIBGPM 1
EOF
else
- echo "$as_me:4368: checking for Gpm_Open in -lgpm" >&5
+ echo "$as_me:4842: 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
@@ -4373,7 +4847,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4376 "configure"
+#line 4850 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4392,16 +4866,16 @@ Gpm_Open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4869: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4398: \$? = $ac_status" >&5
+ echo "$as_me:4872: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4401: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4875: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4404: \$? = $ac_status" >&5
+ echo "$as_me:4878: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Open=yes
else
@@ -4412,13 +4886,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:4889: 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
:
else
- { { echo "$as_me:4421: error: Cannot link with GPM library" >&5
+ { { echo "$as_me:4895: error: Cannot link with GPM library" >&5
echo "$as_me: error: Cannot link with GPM library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4428,7 +4902,7 @@ fi
else
- test "$with_gpm" != maybe && { echo "$as_me:4431: WARNING: Cannot find GPM header" >&5
+ test "$with_gpm" != maybe && { echo "$as_me:4905: WARNING: Cannot find GPM header" >&5
echo "$as_me: WARNING: Cannot find GPM header" >&2;}
with_gpm=no
@@ -4437,7 +4911,7 @@ fi
fi
if test "$with_gpm" != no ; then
- echo "$as_me:4440: checking if you want to load GPM dynamically" >&5
+ echo "$as_me:4914: checking if you want to load GPM dynamically" >&5
echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
# Check whether --with-dlsym or --without-dlsym was given.
@@ -4447,18 +4921,18 @@ if test "${with_dlsym+set}" = set; then
else
with_dlsym=yes
fi;
- echo "$as_me:4450: result: $with_dlsym" >&5
+ echo "$as_me:4924: result: $with_dlsym" >&5
echo "${ECHO_T}$with_dlsym" >&6
if test "$with_dlsym" = yes ; then
cf_have_dlsym=no
-echo "$as_me:4455: checking for dlsym" >&5
+echo "$as_me:4929: 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 4461 "configure"
+#line 4935 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlsym (); below. */
@@ -4489,16 +4963,16 @@ f = dlsym;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4492: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4966: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4495: \$? = $ac_status" >&5
+ echo "$as_me:4969: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4498: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4972: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4501: \$? = $ac_status" >&5
+ echo "$as_me:4975: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_dlsym=yes
else
@@ -4508,14 +4982,14 @@ ac_cv_func_dlsym=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:4511: result: $ac_cv_func_dlsym" >&5
+echo "$as_me:4985: 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:4518: checking for dlsym in -ldl" >&5
+echo "$as_me:4992: 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
@@ -4523,7 +4997,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4526 "configure"
+#line 5000 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4542,16 +5016,16 @@ dlsym ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4545: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5019: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4548: \$? = $ac_status" >&5
+ echo "$as_me:5022: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4551: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5025: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4554: \$? = $ac_status" >&5
+ echo "$as_me:5028: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dl_dlsym=yes
else
@@ -4562,7 +5036,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4565: result: $ac_cv_lib_dl_dlsym" >&5
+echo "$as_me:5039: 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
@@ -4575,10 +5049,10 @@ fi
if test "$cf_have_dlsym" = yes ; then
test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
- echo "$as_me:4578: checking whether able to link to dl*() functions" >&5
+ echo "$as_me:5052: 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 4581 "configure"
+#line 5055 "configure"
#include "confdefs.h"
#include <dlfcn.h>
int
@@ -4596,16 +5070,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4599: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5073: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4602: \$? = $ac_status" >&5
+ echo "$as_me:5076: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4605: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5079: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4608: \$? = $ac_status" >&5
+ echo "$as_me:5082: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\EOF
@@ -4616,15 +5090,15 @@ else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- { { echo "$as_me:4619: error: Cannot link test program for libdl" >&5
+ { { echo "$as_me:5093: 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:4624: result: ok" >&5
+ echo "$as_me:5098: result: ok" >&5
echo "${ECHO_T}ok" >&6
else
- { { echo "$as_me:4627: error: Cannot find dlsym function" >&5
+ { { echo "$as_me:5101: error: Cannot find dlsym function" >&5
echo "$as_me: error: Cannot find dlsym function" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4632,12 +5106,12 @@ fi
if test "$with_gpm" != yes ; then
test -n "$verbose" && echo " assuming soname for gpm is $with_gpm" 1>&6
-echo "${as_me-configure}:4635: testing assuming soname for gpm is $with_gpm ..." 1>&5
+echo "${as_me:-configure}:5109: testing assuming soname for gpm is $with_gpm ..." 1>&5
cf_cv_gpm_soname="$with_gpm"
else
-echo "$as_me:4640: checking for soname of gpm library" >&5
+echo "$as_me:5114: checking for soname of gpm library" >&5
echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
if test "${cf_cv_gpm_soname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4655,26 +5129,26 @@ if (Gpm_Open(0,0)) Gpm_Close();
CF_EOF
cf_save_LIBS="$LIBS"
LIBS="-lgpm $LIBS"
- if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4661: \$? = $ac_status" >&5
+ echo "$as_me:5135: \$? = $ac_status" >&5
(exit $ac_status); } ; then
- if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
+ if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4666: \$? = $ac_status" >&5
+ echo "$as_me:5140: \$? = $ac_status" >&5
(exit $ac_status); } ; then
cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
fi
fi
-rm -f conftest*
+rm -rf conftest*
LIBS="$cf_save_LIBS"
fi
fi
-echo "$as_me:4677: result: $cf_cv_gpm_soname" >&5
+echo "$as_me:5151: result: $cf_cv_gpm_soname" >&5
echo "${ECHO_T}$cf_cv_gpm_soname" >&6
fi
@@ -4685,12 +5159,13 @@ EOF
SHLIB_LIST="-ldl $SHLIB_LIST"
else
SHLIB_LIST="-lgpm $SHLIB_LIST"
+ TEST_LIBS="-lgpm $TEST_LIBS"
fi
cat >>confdefs.h <<\EOF
#define HAVE_LIBGPM 1
EOF
-echo "$as_me:4693: checking for Gpm_Wgetch in -lgpm" >&5
+echo "$as_me:5168: 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
@@ -4698,7 +5173,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 4701 "configure"
+#line 5176 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -4717,16 +5192,16 @@ Gpm_Wgetch ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4720: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5195: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4723: \$? = $ac_status" >&5
+ echo "$as_me:5198: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4726: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5201: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4729: \$? = $ac_status" >&5
+ echo "$as_me:5204: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Wgetch=yes
else
@@ -4737,11 +5212,11 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:4740: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
+echo "$as_me:5215: 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:4744: checking if GPM is weakly bound to curses library" >&5
+echo "$as_me:5219: checking if GPM is weakly bound to curses library" >&5
echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
if test "${cf_cv_check_gpm_wgetch+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4765,31 +5240,31 @@ CF_EOF
# to rely on the static library, noting that some packagers may not
# include it.
LIBS="-static -lgpm -dynamic $LIBS"
- if { (eval echo "$as_me:4768: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:5243: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4771: \$? = $ac_status" >&5
+ echo "$as_me:5246: \$? = $ac_status" >&5
(exit $ac_status); } ; then
- if { (eval echo "$as_me:4773: \"$ac_link\"") >&5
+ if { (eval echo "$as_me:5248: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4776: \$? = $ac_status" >&5
+ echo "$as_me:5251: \$? = $ac_status" >&5
(exit $ac_status); } ; then
cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
fi
fi
- rm -f conftest*
+ rm -rf conftest*
LIBS="$cf_save_LIBS"
fi
fi
-echo "$as_me:4788: result: $cf_cv_check_gpm_wgetch" >&5
+echo "$as_me:5263: result: $cf_cv_check_gpm_wgetch" >&5
echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
if test "$cf_cv_check_gpm_wgetch" != yes ; then
- { echo "$as_me:4792: WARNING: GPM library is already linked with curses - read the FAQ" >&5
+ { echo "$as_me:5267: 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
@@ -4799,7 +5274,7 @@ fi
# not everyone has "test -c"
if test -c /dev/sysmouse 2>/dev/null ; then
-echo "$as_me:4802: checking if you want to use sysmouse" >&5
+echo "$as_me:5277: 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.
@@ -4811,7 +5286,7 @@ else
fi;
if test "$cf_with_sysmouse" != no ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 4814 "configure"
+#line 5289 "configure"
#include "confdefs.h"
#include <osreldate.h>
@@ -4834,16 +5309,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5312: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4840: \$? = $ac_status" >&5
+ echo "$as_me:5315: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4843: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5318: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4846: \$? = $ac_status" >&5
+ echo "$as_me:5321: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_with_sysmouse=yes
else
@@ -4853,7 +5328,7 @@ cf_with_sysmouse=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4856: result: $cf_with_sysmouse" >&5
+echo "$as_me:5331: 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
@@ -4871,7 +5346,7 @@ if test X"$CXX_G_OPT" = X"" ; then
test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
fi
-echo "$as_me:4874: checking for default loader flags" >&5
+echo "$as_me:5349: 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='' ;;
@@ -4880,26 +5355,26 @@ debug) LD_MODEL=$CC_G_OPT ;;
profile) LD_MODEL='-pg';;
shared) LD_MODEL='' ;;
esac
-echo "$as_me:4883: result: $LD_MODEL" >&5
+echo "$as_me:5358: result: $LD_MODEL" >&5
echo "${ECHO_T}$LD_MODEL" >&6
case $DFT_LWR_MODEL in
shared)
-echo "$as_me:4889: checking if rpath option should be used" >&5
+echo "$as_me:5364: 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
+ cf_cv_enable_rpath=$enableval
else
- cf_cv_ld_rpath=no
+ cf_cv_enable_rpath=no
fi;
-echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
-echo "${ECHO_T}$cf_cv_ld_rpath" >&6
+echo "$as_me:5374: result: $cf_cv_enable_rpath" >&5
+echo "${ECHO_T}$cf_cv_enable_rpath" >&6
-echo "$as_me:4902: checking if shared libraries should be relinked during install" >&5
+echo "$as_me:5377: checking if shared libraries should be relinked during install" >&5
echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
# Check whether --enable-relink or --disable-relink was given.
@@ -4909,19 +5384,100 @@ if test "${enable_relink+set}" = set; then
else
cf_cv_do_relink=yes
fi;
-echo "$as_me:4912: result: $cf_cv_do_relink" >&5
+echo "$as_me:5387: result: $cf_cv_do_relink" >&5
echo "${ECHO_T}$cf_cv_do_relink" >&6
;;
esac
+LD_RPATH_OPT=
+echo "$as_me:5393: checking for an rpath option" >&5
+echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
+case $cf_cv_system_name in #(vi
+irix*) #(vi
+ if test "$GCC" = yes; then
+ LD_RPATH_OPT="-Wl,-rpath,"
+ else
+ LD_RPATH_OPT="-rpath "
+ fi
+ ;;
+linux*|gnu*|k*bsd*-gnu) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+openbsd[2-9].*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+freebsd*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+netbsd*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+osf*|mls+*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+solaris2*) #(vi
+ LD_RPATH_OPT="-R"
+ ;;
+*)
+ ;;
+esac
+echo "$as_me:5424: result: $LD_RPATH_OPT" >&5
+echo "${ECHO_T}$LD_RPATH_OPT" >&6
+
+case "x$LD_RPATH_OPT" in #(vi
+x-R*)
+ echo "$as_me:5429: 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="${LD_RPATH_OPT}$libdir $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5434 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:5449: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:5452: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5455: \$? = $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:5465: result: $cf_rpath_space" >&5
+echo "${ECHO_T}$cf_rpath_space" >&6
+ test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ ;;
+esac
+
LOCAL_LDFLAGS=
LOCAL_LDFLAGS2=
LD_SHARED_OPTS=
INSTALL_LIB="-m 644"
cf_cv_do_symlinks=no
+ cf_ld_rpath_opt=
+ test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
- echo "$as_me:4924: checking if release/abi version should be used for shared libs" >&5
+ echo "$as_me:5480: 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.
@@ -4936,7 +5492,7 @@ if test "${with_shlib_version+set}" = set; then
cf_cv_shlib_version=$withval
;;
*)
- { { echo "$as_me:4939: error: option value must be one of: rel, abi, auto or no" >&5
+ { { echo "$as_me:5495: 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; }; }
;;
@@ -4945,7 +5501,7 @@ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
else
cf_cv_shlib_version=auto
fi;
- echo "$as_me:4948: result: $cf_cv_shlib_version" >&5
+ echo "$as_me:5504: result: $cf_cv_shlib_version" >&5
echo "${ECHO_T}$cf_cv_shlib_version" >&6
cf_cv_rm_so_locs=no
@@ -4954,14 +5510,14 @@ echo "${ECHO_T}$cf_cv_shlib_version" >&6
CC_SHARED_OPTS=
if test "$GCC" = yes
then
- echo "$as_me:4957: checking which $CC option to use" >&5
+ echo "$as_me:5513: 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 4964 "configure"
+#line 5520 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -4973,16 +5529,16 @@ int x = 1
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4976: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5532: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4979: \$? = $ac_status" >&5
+ echo "$as_me:5535: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4982: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5538: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4985: \$? = $ac_status" >&5
+ echo "$as_me:5541: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4991,18 +5547,24 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
- echo "$as_me:4994: result: $CC_SHARED_OPTS" >&5
+ echo "$as_me:5550: 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*)
+ case $cf_cv_system_name in #(vi
+ aix[56]*) #(vi
+ if test "$GCC" = yes; then
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='$(CC) -shared'
+ fi
+ ;;
+ beos*) #(vi
MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
;;
- cygwin*)
+ cygwin*) #(vi
CC_SHARED_OPTS=
MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
cf_cv_shlib_version=cygdll
@@ -5021,13 +5583,13 @@ EOF
CF_EOF
chmod +x mk_shared_lib.sh
;;
- darwin*)
+ darwin*) #(vi
EXTRA_CFLAGS="-no-cpp-precomp"
CC_SHARED_OPTS="-dynamic"
MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${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
- echo "$as_me:5030: checking if ld -search_paths_first works" >&5
+ echo "$as_me:5592: checking if ld -search_paths_first works" >&5
echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5036,7 +5598,7 @@ else
cf_save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
cat >conftest.$ac_ext <<_ACEOF
-#line 5039 "configure"
+#line 5601 "configure"
#include "confdefs.h"
int
@@ -5048,16 +5610,16 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5613: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5054: \$? = $ac_status" >&5
+ echo "$as_me:5616: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5057: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5619: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5060: \$? = $ac_status" >&5
+ echo "$as_me:5622: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ldflags_search_paths_first=yes
else
@@ -5068,13 +5630,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$cf_save_LDFLAGS
fi
-echo "$as_me:5071: result: $cf_cv_ldflags_search_paths_first" >&5
+echo "$as_me:5633: result: $cf_cv_ldflags_search_paths_first" >&5
echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
if test $cf_cv_ldflags_search_paths_first = yes; then
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
fi
;;
- hpux*)
+ hpux*) #(vi
# (tested with gcc 2.7.2 -- I don't have c89)
if test "$GCC" = yes; then
LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
@@ -5087,15 +5649,9 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
# readonly to exploit a quirk in the memory manager.
INSTALL_LIB="-m 555"
;;
- irix*)
- if test "$cf_cv_ld_rpath" = yes ; then
- if test "$GCC" = yes; then
- cf_ld_rpath_opt="-Wl,-rpath,"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
- else
- cf_ld_rpath_opt="-rpath "
- EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
- fi
+ irix*) #(vi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
# tested with IRIX 5.2 and 'cc'.
if test "$GCC" != yes; then
@@ -5106,14 +5662,13 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
fi
cf_cv_rm_so_locs=yes
;;
- linux*|gnu*|k*bsd*-gnu)
+ linux*|gnu*|k*bsd*-gnu) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then
- LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
- if test "$cf_cv_ld_rpath" = yes ; then
- cf_ld_rpath_opt="-Wl,-rpath,"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
@@ -5125,14 +5680,13 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
;;
- openbsd[2-9].*)
+ openbsd[2-9].*) #(vi
if test "$DFT_LWR_MODEL" = "shared" ; then
- LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
- if test "$cf_cv_ld_rpath" = yes ; then
- cf_ld_rpath_opt="-Wl,-rpath,"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
@@ -5143,20 +5697,19 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
;;
- nto-qnx*|openbsd*|freebsd[12].*)
+ nto-qnx*|openbsd*|freebsd[12].*) #(vi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='${LD} -Bshareable -o $@'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- freebsd*)
+ freebsd*) #(vi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
- if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
- LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
- LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
- cf_ld_rpath_opt="-rpath "
- EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
fi
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
@@ -5166,15 +5719,14 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
+ MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
;;
- netbsd*)
+ netbsd*) #(vi
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,\$(LOCAL_LIBDIR)"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
- EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
if test "$cf_cv_shlib_version" = auto; then
if test -f /usr/libexec/ld.elf_so; then
cf_cv_shlib_version=abi
@@ -5192,37 +5744,33 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
else
- MK_SHARED_LIB='${LD} -Bshareable -o $@'
+ MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
fi
;;
- osf*|mls+*)
+ osf*|mls+*) #(vi
# 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
+ case $host_os in #(vi
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,\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
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
+ 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
+ if test "$cf_cv_enable_rpath" = yes ; then
# only way is to set LD_RUN_PATH but no switch for it
RUN_PATH=$libdir
fi
@@ -5230,7 +5778,7 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
LINK_PROGS='LD_RUN_PATH=${libdir}'
LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
;;
- sunos4*)
+ sunos4*) #(vi
# tested with SunOS 4.1.1 and gcc 2.7.0
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
@@ -5238,16 +5786,15 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
MK_SHARED_LIB='${LD} -assert pure-text -o $@'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- solaris2*)
+ solaris2*) #(vi
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${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"
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
fi
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
@@ -5258,13 +5805,49 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
fi
if test "$GCC" != yes; then
- CC_SHARED_OPTS='-xcode=pic32'
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
+ do
+ CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5813 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello\n");
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:5825: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:5828: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:5831: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:5834: \$? = $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
+ CFLAGS="$cf_save_CFLAGS"
+ CC_SHARED_OPTS=$cf_shared_opts
MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
else
MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
fi
;;
- sysv5uw7*|unix_sv*)
+ sysv5uw7*|unix_sv*) #(vi
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
@@ -5281,11 +5864,11 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
case "$cf_cv_shlib_version" in #(vi
rel|abi)
case "$MK_SHARED_LIB" in #(vi
- *'-o $@')
+ *'-o $@') #(vi
test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
;;
*)
- { echo "$as_me:5288: WARNING: ignored --with-shlib-version" >&5
+ { echo "$as_me:5871: WARNING: ignored --with-shlib-version" >&5
echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
;;
esac
@@ -5293,62 +5876,278 @@ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
esac
if test -n "$cf_ld_rpath_opt" ; then
- echo "$as_me:5296: 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 5301 "configure"
-#include "confdefs.h"
+ 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:5885: 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
+
+### If we're building with rpath, try to link non-standard libs that way too.
+if test "$DFT_LWR_MODEL" = "shared"; then
+
+echo "$as_me:5895: checking if rpath-hack should be disabled" >&5
+echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
+
+# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
+if test "${enable_rpath_hack+set}" = set; then
+ enableval="$enable_rpath_hack"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
+ cf_disable_rpath_hack=yes
+ else
+ cf_disable_rpath_hack=no
+ fi
+else
+ enableval=yes
+ cf_disable_rpath_hack=no
+
+fi;
+echo "$as_me:5912: result: $cf_disable_rpath_hack" >&5
+echo "${ECHO_T}$cf_disable_rpath_hack" >&6
+if test "$cf_disable_rpath_hack" = no ; then
+
+echo "$as_me:5916: checking for updated LDFLAGS" >&5
+echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
+if test -n "$LD_RPATH_OPT" ; then
+ echo "$as_me:5919: result: maybe" >&5
+echo "${ECHO_T}maybe" >&6
+
+ for ac_prog in ldd
+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:5926: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$cf_ldd_prog"; then
+ ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # 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_cf_ldd_prog="$ac_prog"
+echo "$as_me:5941: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
+if test -n "$cf_ldd_prog"; then
+ echo "$as_me:5949: result: $cf_ldd_prog" >&5
+echo "${ECHO_T}$cf_ldd_prog" >&6
+else
+ echo "$as_me:5952: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ test -n "$cf_ldd_prog" && break
+done
+test -n "$cf_ldd_prog" || cf_ldd_prog="no"
+
+ cf_rpath_list="/usr/lib /lib"
+ if test "$cf_ldd_prog" != no
+ then
+ cf_rpath_oops=
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 5966 "configure"
+#include "confdefs.h"
+#include <stdio.h>
int
main ()
{
-
+printf("Hello");
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5978: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5316: \$? = $ac_status" >&5
+ echo "$as_me:5981: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5319: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5984: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5322: \$? = $ac_status" >&5
+ echo "$as_me:5987: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_rpath_space=no
+ cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
+ cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
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:5332: 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}"
+
+ # If we passed the link-test, but get a "not found" on a given library,
+ # this could be due to inept reconfiguration of gcc to make it only
+ # partly honor /usr/local/lib (or whatever). Sometimes this behavior
+ # is intentional, e.g., installing gcc in /usr/bin and suppressing the
+ # /usr/local libraries.
+ if test -n "$cf_rpath_oops"
+ then
+ for cf_rpath_src in $cf_rpath_oops
+ do
+ for cf_rpath_dir in \
+ /usr/local \
+ /usr/pkg \
+ /opt/sfw
+ do
+ if test -f $cf_rpath_dir/lib/$cf_rpath_src
+ then
+ test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
+
+echo "${as_me:-configure}:6015: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+
+ LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
+ break
+ fi
+ done
+ done
+ fi
fi
-if test "$CC_SHARED_OPTS" = "unknown"; then
- for model in $cf_list_models; do
- if test "$model" = "shared"; then
- { { echo "$as_me:5341: 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; }; }
+ test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:6027: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+
+test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:6031: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+
+cf_rpath_dst=
+for cf_rpath_src in $LDFLAGS
+do
+ case $cf_rpath_src in #(vi
+ -L*) #(vi
+
+ # check if this refers to a directory which we will ignore
+ cf_rpath_skip=no
+ if test -n "$cf_rpath_list"
+ then
+ for cf_rpath_item in $cf_rpath_list
+ do
+ if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
+ then
+ cf_rpath_skip=yes
+ break
+ fi
+ done
fi
- done
+
+ if test "$cf_rpath_skip" = no
+ then
+ # transform the option
+ if test "$LD_RPATH_OPT" = "-R " ; then
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
+ else
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
+ fi
+
+ # if we have not already added this, add it now
+ cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
+ if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
+ then
+ test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
+
+echo "${as_me:-configure}:6068: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+
+ EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ fi
+ fi
+ ;;
+ esac
+ cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
+done
+LDFLAGS=$cf_rpath_dst
+
+test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:6081: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+
+test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
+
+echo "${as_me:-configure}:6085: testing ...checking LIBS $LIBS ..." 1>&5
+
+cf_rpath_dst=
+for cf_rpath_src in $LIBS
+do
+ case $cf_rpath_src in #(vi
+ -L*) #(vi
+
+ # check if this refers to a directory which we will ignore
+ cf_rpath_skip=no
+ if test -n "$cf_rpath_list"
+ then
+ for cf_rpath_item in $cf_rpath_list
+ do
+ if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
+ then
+ cf_rpath_skip=yes
+ break
+ fi
+ done
+ fi
+
+ if test "$cf_rpath_skip" = no
+ then
+ # transform the option
+ if test "$LD_RPATH_OPT" = "-R " ; then
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
+ else
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
+ fi
+
+ # if we have not already added this, add it now
+ cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
+ if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
+ then
+ test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
+
+echo "${as_me:-configure}:6122: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+
+ EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ fi
+ fi
+ ;;
+ esac
+ cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
+done
+LIBS=$cf_rpath_dst
+
+test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
+
+echo "${as_me:-configure}:6135: testing ...checked LIBS $LIBS ..." 1>&5
+
+ test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:6139: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+
+fi
+
+fi
+
fi
###############################################################################
### use option --disable-overwrite to leave out the link to -lcurses
-echo "$as_me:5351: checking if you wish to install ncurses overwriting curses" >&5
+echo "$as_me:6150: 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.
@@ -5358,10 +6157,10 @@ if test "${enable_overwrite+set}" = set; then
else
if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
fi;
-echo "$as_me:5361: result: $with_overwrite" >&5
+echo "$as_me:6160: result: $with_overwrite" >&5
echo "${ECHO_T}$with_overwrite" >&6
-echo "$as_me:5364: checking if external terminfo-database is used" >&5
+echo "$as_me:6163: 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.
@@ -5371,7 +6170,7 @@ if test "${enable_database+set}" = set; then
else
use_database=yes
fi;
-echo "$as_me:5374: result: $use_database" >&5
+echo "$as_me:6173: result: $use_database" >&5
echo "${ECHO_T}$use_database" >&6
case $host_os in #(vi
@@ -5384,8 +6183,8 @@ os2*) #(vi
esac
case $cf_cv_system_name in
- os2*) PATHSEP=';' ;;
- *) PATHSEP=':' ;;
+ os2*) PATH_SEPARATOR=';' ;;
+ *) PATH_SEPARATOR=':' ;;
esac
if test "$use_database" != no ; then
@@ -5393,18 +6192,18 @@ if test "$use_database" != no ; then
#define USE_DATABASE 1
EOF
- echo "$as_me:5396: checking which terminfo source-file will be installed" >&5
+ echo "$as_me:6195: 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"
+# Check whether --with-database or --without-database was given.
+if test "${with_database+set}" = set; then
+ withval="$with_database"
TERMINFO_SRC=$withval
fi;
- echo "$as_me:5404: result: $TERMINFO_SRC" >&5
+ echo "$as_me:6203: result: $TERMINFO_SRC" >&5
echo "${ECHO_T}$TERMINFO_SRC" >&6
- echo "$as_me:5407: checking whether to use hashed database instead of directory/tree" >&5
+ echo "$as_me:6206: checking whether to use hashed database instead of directory/tree" >&5
echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
# Check whether --with-hashed-db or --without-hashed-db was given.
@@ -5414,13 +6213,13 @@ if test "${with_hashed_db+set}" = set; then
else
with_hashed_db=no
fi;
- echo "$as_me:5417: result: $with_hashed_db" >&5
+ echo "$as_me:6216: result: $with_hashed_db" >&5
echo "${ECHO_T}$with_hashed_db" >&6
else
with_hashed_db=no
fi
-echo "$as_me:5423: checking for list of fallback descriptions" >&5
+echo "$as_me:6222: 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.
@@ -5430,11 +6229,11 @@ if test "${with_fallbacks+set}" = set; then
else
with_fallback=
fi;
-echo "$as_me:5433: result: $with_fallback" >&5
+echo "$as_me:6232: result: $with_fallback" >&5
echo "${ECHO_T}$with_fallback" >&6
FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
-echo "$as_me:5437: checking if you want modern xterm or antique" >&5
+echo "$as_me:6236: 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.
@@ -5448,7 +6247,7 @@ case $with_xterm_new in
no) with_xterm_new=xterm-old;;
*) with_xterm_new=xterm-new;;
esac
-echo "$as_me:5451: result: $with_xterm_new" >&5
+echo "$as_me:6250: result: $with_xterm_new" >&5
echo "${ECHO_T}$with_xterm_new" >&6
WHICH_XTERM=$with_xterm_new
@@ -5458,7 +6257,7 @@ if test "$use_database" = no ; then
MAKE_TERMINFO="#"
else
-echo "$as_me:5461: checking for list of terminfo directories" >&5
+echo "$as_me:6260: 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.
@@ -5466,9 +6265,9 @@ if test "${with_terminfo_dirs+set}" = set; then
withval="$with_terminfo_dirs"
else
- withval=${TERMINFO_DIRS-${datadir}/terminfo}
+ withval=${TERMINFO_DIRS:-${datadir}/terminfo}
fi;
-IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
+IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
cf_dst_path=
for cf_src_path in $withval
do
@@ -5498,7 +6297,7 @@ case ".$cf_src_path" in #(vi
cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:5501: error: expected a pathname, not \"$cf_src_path\"" >&5
+ { { echo "$as_me:6300: 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; }; }
;;
@@ -5511,13 +6310,13 @@ IFS="$ac_save_ifs"
eval 'TERMINFO_DIRS="$cf_dst_path"'
-echo "$as_me:5514: result: $TERMINFO_DIRS" >&5
+echo "$as_me:6313: 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:5520: checking for default terminfo directory" >&5
+echo "$as_me:6319: 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.
@@ -5525,7 +6324,7 @@ if test "${with_default_terminfo_dir+set}" = set; then
withval="$with_default_terminfo_dir"
else
- withval="${TERMINFO-${datadir}/terminfo}"
+ withval="${TERMINFO:-${datadir}/terminfo}"
fi; if test -n "${datadir}/terminfo" ; then
if test "x$prefix" != xNONE; then
@@ -5553,7 +6352,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:5556: error: expected a pathname, not \"$withval\"" >&5
+ { { echo "$as_me:6355: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -5562,7 +6361,7 @@ esac
fi
TERMINFO="$withval"
-echo "$as_me:5565: result: $TERMINFO" >&5
+echo "$as_me:6364: result: $TERMINFO" >&5
echo "${ECHO_T}$TERMINFO" >&6
cat >>confdefs.h <<EOF
#define TERMINFO "$TERMINFO"
@@ -5572,7 +6371,7 @@ fi
### use option --disable-big-core to make tic run on small machines
### We need 4Mb, check if we can allocate 50% more than that.
-echo "$as_me:5575: checking if big-core option selected" >&5
+echo "$as_me:6374: 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.
@@ -5584,7 +6383,7 @@ else
with_big_core=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5587 "configure"
+#line 6386 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5598,15 +6397,15 @@ int main() {
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5601: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6400: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5604: \$? = $ac_status" >&5
+ echo "$as_me:6403: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5606: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6405: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5609: \$? = $ac_status" >&5
+ echo "$as_me:6408: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
with_big_core=yes
else
@@ -5618,7 +6417,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi;
-echo "$as_me:5621: result: $with_big_core" >&5
+echo "$as_me:6420: 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
@@ -5627,7 +6426,7 @@ EOF
### ISO C only guarantees 512-char strings, we have tables which load faster
### when constructed using "big" strings. More than the C compiler, the awk
### program is a limit on most vendor UNIX systems. Check that we can build.
-echo "$as_me:5630: checking if big-strings option selected" >&5
+echo "$as_me:6429: checking if big-strings option selected" >&5
echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
# Check whether --enable-big-strings or --disable-big-strings was given.
@@ -5636,29 +6435,29 @@ if test "${enable_big_strings+set}" = set; then
with_big_strings=$enableval
else
- case x$AWK in #(vi
- x)
- eval with_big_strings=no
- ;;
- *) #(vi
- if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
- | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
- eval with_big_strings=yes
- else
- eval with_big_strings=no
- fi
- ;;
- esac
+ case x$AWK in #(vi
+ x)
+ eval with_big_strings=no
+ ;;
+ *) #(vi
+ if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
+ | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
+ eval with_big_strings=yes
+ else
+ eval with_big_strings=no
+ fi
+ ;;
+ esac
fi;
-echo "$as_me:5654: result: $with_big_strings" >&5
+echo "$as_me:6453: result: $with_big_strings" >&5
echo "${ECHO_T}$with_big_strings" >&6
USE_BIG_STRINGS=0
test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
### use option --enable-termcap to compile in the termcap fallback support
-echo "$as_me:5661: checking if you want termcap-fallback support" >&5
+echo "$as_me:6460: 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.
@@ -5668,13 +6467,13 @@ if test "${enable_termcap+set}" = set; then
else
with_termcap=no
fi;
-echo "$as_me:5671: result: $with_termcap" >&5
+echo "$as_me:6470: 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:5677: error: You have disabled the database w/o specifying fallbacks" >&5
+ { { echo "$as_me:6476: 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
@@ -5686,7 +6485,7 @@ EOF
else
if test "$with_ticlib" != no ; then
- { { echo "$as_me:5689: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
+ { { echo "$as_me:6488: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5695,7 +6494,7 @@ cat >>confdefs.h <<\EOF
#define USE_TERMCAP 1
EOF
-echo "$as_me:5698: checking for list of termcap files" >&5
+echo "$as_me:6497: 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.
@@ -5703,9 +6502,9 @@ if test "${with_termpath+set}" = set; then
withval="$with_termpath"
else
- withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
+ withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
fi;
-IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
+IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
cf_dst_path=
for cf_src_path in $withval
do
@@ -5735,7 +6534,7 @@ case ".$cf_src_path" in #(vi
cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:5738: error: expected a pathname, not \"$cf_src_path\"" >&5
+ { { echo "$as_me:6537: 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; }; }
;;
@@ -5748,14 +6547,14 @@ IFS="$ac_save_ifs"
eval 'TERMPATH="$cf_dst_path"'
-echo "$as_me:5751: result: $TERMPATH" >&5
+echo "$as_me:6550: 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:5758: checking if fast termcap-loader is needed" >&5
+echo "$as_me:6557: 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.
@@ -5765,13 +6564,13 @@ if test "${enable_getcap+set}" = set; then
else
with_getcap=no
fi;
-echo "$as_me:5768: result: $with_getcap" >&5
+echo "$as_me:6567: 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:5774: checking if translated termcaps will be cached in ~/.terminfo" >&5
+echo "$as_me:6573: 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.
@@ -5781,7 +6580,7 @@ if test "${enable_getcap_cache+set}" = set; then
else
with_getcap_cache=no
fi;
-echo "$as_me:5784: result: $with_getcap_cache" >&5
+echo "$as_me:6583: 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
@@ -5790,7 +6589,7 @@ EOF
fi
### Use option --disable-home-terminfo to completely remove ~/.terminfo
-echo "$as_me:5793: checking if ~/.terminfo is wanted" >&5
+echo "$as_me:6592: 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.
@@ -5800,13 +6599,13 @@ if test "${enable_home_terminfo+set}" = set; then
else
with_home_terminfo=yes
fi;
-echo "$as_me:5803: result: $with_home_terminfo" >&5
+echo "$as_me:6602: result: $with_home_terminfo" >&5
echo "${ECHO_T}$with_home_terminfo" >&6
test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
#define USE_HOME_TERMINFO 1
EOF
-echo "$as_me:5809: checking if you want to use restricted environment when running as root" >&5
+echo "$as_me:6608: checking if you want to use restricted environment when running as root" >&5
echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
# Check whether --enable-root-environ or --disable-root-environ was given.
@@ -5816,7 +6615,7 @@ if test "${enable_root_environ+set}" = set; then
else
with_root_environ=yes
fi;
-echo "$as_me:5819: result: $with_root_environ" >&5
+echo "$as_me:6618: 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
@@ -5830,13 +6629,13 @@ for ac_func in \
unlink
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5833: checking for $ac_func" >&5
+echo "$as_me:6632: 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 5839 "configure"
+#line 6638 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5867,16 +6666,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6669: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5873: \$? = $ac_status" >&5
+ echo "$as_me:6672: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5876: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6675: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5879: \$? = $ac_status" >&5
+ echo "$as_me:6678: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5886,7 +6685,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5889: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6688: 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
@@ -5903,13 +6702,13 @@ for ac_func in \
symlink
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5906: checking for $ac_func" >&5
+echo "$as_me:6705: 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 5912 "configure"
+#line 6711 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5940,16 +6739,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5943: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6742: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5946: \$? = $ac_status" >&5
+ echo "$as_me:6745: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5949: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6748: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5952: \$? = $ac_status" >&5
+ echo "$as_me:6751: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5959,7 +6758,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5962: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6761: 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
@@ -5970,7 +6769,7 @@ fi
done
else
- echo "$as_me:5973: checking if link/symlink functions work" >&5
+ echo "$as_me:6772: 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
@@ -5983,7 +6782,7 @@ else
eval 'ac_cv_func_'$cf_func'=error'
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5986 "configure"
+#line 6785 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -6013,15 +6812,15 @@ int main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6815: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6019: \$? = $ac_status" >&5
+ echo "$as_me:6818: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:6021: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6820: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6024: \$? = $ac_status" >&5
+ echo "$as_me:6823: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
@@ -6039,7 +6838,7 @@ fi
test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
fi
-echo "$as_me:6042: result: $cf_cv_link_funcs" >&5
+echo "$as_me:6841: 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
@@ -6057,7 +6856,7 @@ with_symlinks=no
# soft links (symbolic links) are useful for some systems where hard links do
# not work, or to make it simpler to copy terminfo trees around.
if test "$ac_cv_func_symlink" = yes ; then
- echo "$as_me:6060: checking if tic should use symbolic links" >&5
+ echo "$as_me:6859: 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.
@@ -6067,21 +6866,21 @@ if test "${enable_symlinks+set}" = set; then
else
with_symlinks=no
fi;
- echo "$as_me:6070: result: $with_symlinks" >&5
+ echo "$as_me:6869: result: $with_symlinks" >&5
echo "${ECHO_T}$with_symlinks" >&6
fi
# If we have hard links and did not choose to use soft links instead, there is
# no reason to make this choice optional - use the hard links.
if test "$with_symlinks" = no ; then
- echo "$as_me:6077: checking if tic should use hard links" >&5
+ echo "$as_me:6876: 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:6084: result: $with_links" >&5
+ echo "$as_me:6883: result: $with_links" >&5
echo "${ECHO_T}$with_links" >&6
fi
@@ -6094,7 +6893,7 @@ test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
EOF
### use option --enable-broken-linker to force on use of broken-linker support
-echo "$as_me:6097: checking if you want broken-linker support code" >&5
+echo "$as_me:6896: 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.
@@ -6102,9 +6901,9 @@ if test "${enable_broken_linker+set}" = set; then
enableval="$enable_broken_linker"
with_broken_linker=$enableval
else
- with_broken_linker=${BROKEN_LINKER-no}
+ with_broken_linker=${BROKEN_LINKER:-no}
fi;
-echo "$as_me:6107: result: $with_broken_linker" >&5
+echo "$as_me:6906: result: $with_broken_linker" >&5
echo "${ECHO_T}$with_broken_linker" >&6
BROKEN_LINKER=0
@@ -6124,14 +6923,14 @@ EOF
BROKEN_LINKER=1
test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
-echo "${as_me-configure}:6127: testing cygwin linker is broken anyway ..." 1>&5
+echo "${as_me:-configure}:6926: testing cygwin linker is broken anyway ..." 1>&5
;;
esac
fi
### use option --enable-bsdpad to have tputs process BSD-style prefix padding
-echo "$as_me:6134: checking if tputs should process BSD-style prefix padding" >&5
+echo "$as_me:6933: 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.
@@ -6141,7 +6940,7 @@ if test "${enable_bsdpad+set}" = set; then
else
with_bsdpad=no
fi;
-echo "$as_me:6144: result: $with_bsdpad" >&5
+echo "$as_me:6943: result: $with_bsdpad" >&5
echo "${ECHO_T}$with_bsdpad" >&6
test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
#define BSD_TPUTS 1
@@ -6158,66 +6957,22 @@ NCURSES_WINT_T=0
# Check to define _XOPEN_SOURCE "automatically"
-echo "$as_me:6161: checking if $CC -U and -D options work together" >&5
-echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
-if test "${cf_cv_cc_u_d_options+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cf_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
- cat >conftest.$ac_ext <<_ACEOF
-#line 6170 "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-
-#ifndef U_D_OPTIONS
-make an undefined-error
-#endif
-#ifdef D_U_OPTIONS
-make a defined-error
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6189: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:6192: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6195: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:6198: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- cf_cv_cc_u_d_options=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-
- cf_cv_cc_u_d_options=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- CPPFLAGS="$cf_save_CPPFLAGS"
-
-fi
-echo "$as_me:6212: result: $cf_cv_cc_u_d_options" >&5
-echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
-
cf_XOPEN_SOURCE=500
cf_POSIX_C_SOURCE=199506L
+cf_xopen_source=
case $host_os in #(vi
-aix[45]*) #(vi
- CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
+aix[456]*) #(vi
+ cf_xopen_source="-D_ALL_SOURCE"
+ ;;
+cygwin) #(vi
+ cf_XOPEN_SOURCE=600
+ ;;
+darwin[0-8].*) #(vi
+ cf_xopen_source="-D_APPLE_C_SOURCE"
+ ;;
+darwin*) #(vi
+ cf_xopen_source="-D_DARWIN_C_SOURCE"
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -6225,24 +6980,27 @@ freebsd*|dragonfly*) #(vi
# _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
cf_POSIX_C_SOURCE=200112L
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"
+ cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+hpux11*) #(vi
+ cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
;;
hpux*) #(vi
- CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
+ cf_xopen_source="-D_HPUX_SOURCE"
;;
irix[56].*) #(vi
- CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
+ cf_xopen_source="-D_SGI_SOURCE"
;;
-linux*|gnu*|k*bsd*-gnu) #(vi
+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
-echo "$as_me:6238: checking if we must define _GNU_SOURCE" >&5
+echo "$as_me:6996: 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 6245 "configure"
+#line 7003 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6257,16 +7015,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7018: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6263: \$? = $ac_status" >&5
+ echo "$as_me:7021: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6266: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7024: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6269: \$? = $ac_status" >&5
+ echo "$as_me:7027: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -6275,7 +7033,7 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 6278 "configure"
+#line 7036 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6290,16 +7048,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6293: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7051: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6296: \$? = $ac_status" >&5
+ echo "$as_me:7054: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6299: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7057: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6302: \$? = $ac_status" >&5
+ echo "$as_me:7060: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -6314,7 +7072,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6317: result: $cf_cv_gnu_source" >&5
+echo "$as_me:7075: 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"
@@ -6329,26 +7087,29 @@ openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
osf[45]*) #(vi
- CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
+ cf_xopen_source="-D_OSF_SOURCE"
;;
nto-qnx*) #(vi
- CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
+ cf_xopen_source="-D_QNX_SOURCE"
;;
sco*) #(vi
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris*) #(vi
- CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
+solaris2.1[0-9]) #(vi
+ cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ ;;
+solaris2.[1-9]) #(vi
+ cf_xopen_source="-D__EXTENSIONS__"
;;
*)
- echo "$as_me:6344: checking if we should define _XOPEN_SOURCE" >&5
+ echo "$as_me:7105: 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 6351 "configure"
+#line 7112 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6363,16 +7124,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6366: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7127: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6369: \$? = $ac_status" >&5
+ echo "$as_me:7130: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6372: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7133: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6375: \$? = $ac_status" >&5
+ echo "$as_me:7136: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -6381,7 +7142,7 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 6384 "configure"
+#line 7145 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6396,16 +7157,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6399: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7160: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6402: \$? = $ac_status" >&5
+ echo "$as_me:7163: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6405: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7166: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6408: \$? = $ac_status" >&5
+ echo "$as_me:7169: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -6420,23 +7181,98 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6423: result: $cf_cv_xopen_source" >&5
+echo "$as_me:7184: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6
if test "$cf_cv_xopen_source" != no ; then
-# remove _XOPEN_SOURCE symbol from $CFLAGS
CFLAGS=`echo "$CFLAGS" | \
- sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
-# remove _XOPEN_SOURCE symbol from $CPPFLAGS
CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_temp_xopen_source
+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
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ 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="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
- test "$cf_cv_cc_u_d_options" = yes && \
- CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
fi
cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
@@ -6444,26 +7280,24 @@ cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
cf_save_CFLAGS="$CFLAGS"
cf_save_CPPFLAGS="$CPPFLAGS"
-# remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
- sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-# remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
- sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-echo "$as_me:6457: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:7291: 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_posix_c_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-echo "${as_me-configure}:6463: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:7297: testing if the symbol is already defined go no further ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 6466 "configure"
+#line 7300 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6478,16 +7312,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7315: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6484: \$? = $ac_status" >&5
+ echo "$as_me:7318: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6487: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7321: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6490: \$? = $ac_status" >&5
+ echo "$as_me:7324: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_posix_c_source=no
else
@@ -6508,7 +7342,7 @@ cf_want_posix_source=no
esac
if test "$cf_want_posix_source" = yes ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 6511 "configure"
+#line 7345 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6523,16 +7357,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7360: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6529: \$? = $ac_status" >&5
+ echo "$as_me:7363: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6532: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7366: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6535: \$? = $ac_status" >&5
+ echo "$as_me:7369: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6543,15 +7377,15 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "${as_me-configure}:6546: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:7380: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
CFLAGS="$cf_trim_CFLAGS"
CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
-echo "${as_me-configure}:6551: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:7385: testing if the second compile does not leave our definition intact error ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 6554 "configure"
+#line 7388 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -6566,16 +7400,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7403: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6572: \$? = $ac_status" >&5
+ echo "$as_me:7406: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6575: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7409: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6578: \$? = $ac_status" >&5
+ echo "$as_me:7412: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6591,33 +7425,188 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6594: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:7428: result: $cf_cv_posix_c_source" >&5
echo "${ECHO_T}$cf_cv_posix_c_source" >&6
if test "$cf_cv_posix_c_source" != no ; then
CFLAGS="$cf_trim_CFLAGS"
CPPFLAGS="$cf_trim_CPPFLAGS"
- if test "$cf_cv_cc_u_d_options" = yes ; then
- cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
- sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
- CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
- fi
- CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_posix_c_source
+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
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ 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="$CPPFLAGS $cf_new_cppflags"
fi
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
+ ;;
+esac
+
+if test -n "$cf_xopen_source" ; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_xopen_source
+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
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ 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="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
# Work around breakage on OS X
-echo "$as_me:6613: checking if SIGWINCH is defined" >&5
+echo "$as_me:7602: checking if SIGWINCH is defined" >&5
echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
if test "${cf_cv_define_sigwinch+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6620 "configure"
+#line 7609 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -6632,23 +7621,23 @@ int x = SIGWINCH
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6635: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7624: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6638: \$? = $ac_status" >&5
+ echo "$as_me:7627: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6641: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7630: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6644: \$? = $ac_status" >&5
+ echo "$as_me:7633: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_define_sigwinch=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 6651 "configure"
+#line 7640 "configure"
#include "confdefs.h"
#undef _XOPEN_SOURCE
@@ -6666,16 +7655,16 @@ int x = SIGWINCH
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6669: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7658: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6672: \$? = $ac_status" >&5
+ echo "$as_me:7661: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6675: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7664: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6678: \$? = $ac_status" >&5
+ echo "$as_me:7667: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_define_sigwinch=maybe
else
@@ -6689,11 +7678,11 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6692: result: $cf_cv_define_sigwinch" >&5
+echo "$as_me:7681: result: $cf_cv_define_sigwinch" >&5
echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
if test "$cf_cv_define_sigwinch" = maybe ; then
-echo "$as_me:6696: checking for actual SIGWINCH definition" >&5
+echo "$as_me:7685: checking for actual SIGWINCH definition" >&5
echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
if test "${cf_cv_fixup_sigwinch+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6704,7 +7693,7 @@ cf_sigwinch=32
while test $cf_sigwinch != 1
do
cat >conftest.$ac_ext <<_ACEOF
-#line 6707 "configure"
+#line 7696 "configure"
#include "confdefs.h"
#undef _XOPEN_SOURCE
@@ -6726,16 +7715,16 @@ int x = SIGWINCH
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6729: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7718: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6732: \$? = $ac_status" >&5
+ echo "$as_me:7721: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6735: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7724: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6738: \$? = $ac_status" >&5
+ echo "$as_me:7727: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_fixup_sigwinch=$cf_sigwinch
break
@@ -6749,7 +7738,7 @@ cf_sigwinch=`expr $cf_sigwinch - 1`
done
fi
-echo "$as_me:6752: result: $cf_cv_fixup_sigwinch" >&5
+echo "$as_me:7741: result: $cf_cv_fixup_sigwinch" >&5
echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
if test "$cf_cv_fixup_sigwinch" != unknown ; then
@@ -6759,13 +7748,13 @@ fi
# Checks for CODESET support.
- echo "$as_me:6762: checking for nl_langinfo and CODESET" >&5
+ echo "$as_me:7751: 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 6768 "configure"
+#line 7757 "configure"
#include "confdefs.h"
#include <langinfo.h>
int
@@ -6777,16 +7766,16 @@ char* cs = nl_langinfo(CODESET);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6780: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7769: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6783: \$? = $ac_status" >&5
+ echo "$as_me:7772: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6786: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7775: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6789: \$? = $ac_status" >&5
+ echo "$as_me:7778: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_langinfo_codeset=yes
else
@@ -6797,7 +7786,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6800: result: $am_cv_langinfo_codeset" >&5
+echo "$as_me:7789: result: $am_cv_langinfo_codeset" >&5
echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
if test $am_cv_langinfo_codeset = yes; then
@@ -6811,7 +7800,7 @@ EOF
NCURSES_OK_WCHAR_T=
NCURSES_OK_WINT_T=
-echo "$as_me:6814: checking if you want wide-character code" >&5
+echo "$as_me:7803: 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.
@@ -6821,7 +7810,7 @@ if test "${enable_widec+set}" = set; then
else
with_widec=no
fi;
-echo "$as_me:6824: result: $with_widec" >&5
+echo "$as_me:7813: result: $with_widec" >&5
echo "${ECHO_T}$with_widec" >&6
if test "$with_widec" = yes ; then
LIB_SUFFIX="w${LIB_SUFFIX}"
@@ -6829,10 +7818,15 @@ if test "$with_widec" = yes ; then
#define USE_WIDEC_SUPPORT 1
EOF
-echo "$as_me:6832: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+ case "$CFLAGS $CPPFLAGS" in #(vi
+ *-D_XOPEN_SOURCE=500) #(vi
+ ;;
+ *)
+
+echo "$as_me:7826: 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 6835 "configure"
+#line 7829 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -6848,16 +7842,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6851: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7845: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6854: \$? = $ac_status" >&5
+ echo "$as_me:7848: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6857: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7851: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6860: \$? = $ac_status" >&5
+ echo "$as_me:7854: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=no
else
@@ -6866,16 +7860,16 @@ cat conftest.$ac_ext >&5
cf_result=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:6869: result: $cf_result" >&5
+echo "$as_me:7863: 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:6875: checking checking for compatible value versus " >&5
+ echo "$as_me:7869: 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 6878 "configure"
+#line 7872 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -6891,16 +7885,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6894: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7888: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6897: \$? = $ac_status" >&5
+ echo "$as_me:7891: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6900: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7894: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6903: \$? = $ac_status" >&5
+ echo "$as_me:7897: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -6909,7 +7903,7 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:6912: result: $cf_result" >&5
+ echo "$as_me:7906: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test "$cf_result" = no ; then
# perhaps we can override it - try...
@@ -6917,19 +7911,22 @@ echo "${ECHO_T}$cf_result" >&6
fi
fi
+ ;;
+ esac
+
# with_overwrite=no
NCURSES_CH_T=cchar_t
for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6926: checking for $ac_func" >&5
+echo "$as_me:7923: 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 6932 "configure"
+#line 7929 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -6960,16 +7957,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6963: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7960: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6966: \$? = $ac_status" >&5
+ echo "$as_me:7963: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6969: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7966: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6972: \$? = $ac_status" >&5
+ echo "$as_me:7969: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -6979,7 +7976,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6982: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:7979: 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
@@ -6991,7 +7988,7 @@ done
if test "$ac_cv_func_putwc" != yes ; then
-echo "$as_me:6994: checking for multibyte character support" >&5
+echo "$as_me:7991: checking for multibyte character support" >&5
echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
if test "${cf_cv_utf8_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6999,7 +7996,7 @@ else
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7002 "configure"
+#line 7999 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7012,16 +8009,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7015: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8012: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7018: \$? = $ac_status" >&5
+ echo "$as_me:8015: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7021: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8018: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7024: \$? = $ac_status" >&5
+ echo "$as_me:8021: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_utf8_lib=yes
else
@@ -7033,10 +8030,12 @@ cat conftest.$ac_ext >&5
cf_cv_header_path_utf8=
cf_cv_library_path_utf8=
-echo "${as_me-configure}:7036: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:8033: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+
+cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7039 "configure"
+#line 8038 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7049,34 +8048,110 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7052: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8051: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7055: \$? = $ac_status" >&5
+ echo "$as_me:8054: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7058: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8057: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7061: \$? = $ac_status" >&5
+ echo "$as_me:8060: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_find_linkage_utf8=yes
+
+ cf_cv_find_linkage_utf8=yes
+ cf_cv_header_path_utf8=/usr/include
+ cf_cv_library_path_utf8=/usr/lib
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+LIBS="-lutf8 $cf_save_LIBS"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 8074 "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:8087: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:8090: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:8093: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:8096: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_find_linkage_utf8=yes
+ cf_cv_header_path_utf8=/usr/include
+ cf_cv_library_path_utf8=/usr/lib
+ cf_cv_library_file_utf8="-lutf8"
+
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- cf_cv_find_linkage_utf8=no
+ cf_cv_find_linkage_utf8=no
+ LIBS="$cf_save_LIBS"
+
+ test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
+
+echo "${as_me:-configure}:8113: testing find linkage for utf8 library ..." 1>&5
-echo "${as_me-configure}:7070: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:8115: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
- cf_search=""
+cf_search=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in #(vi
+ -I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+
+test "$cf_header_path" != "NONE" && \
+test -d "$cf_header_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
+ test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
+ test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
+ test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
+ test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
+ test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
+}
+
+ cf_header_path_list="$cf_header_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+
+cf_search=
test "/usr" != "$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "/usr" != "$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr"
test -d /usr/include && cf_search="$cf_search /usr/include"
test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
@@ -7098,7 +8173,7 @@ test -d "$prefix" && \
test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "/usr/local" != "$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
@@ -7109,7 +8184,7 @@ test -d "/usr/local" && \
test "/opt" != "$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "/opt" != "$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /opt"
test -d /opt/include && cf_search="$cf_search /opt/include"
test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
@@ -7120,7 +8195,7 @@ test -d "/opt" && \
test "$HOME" != "$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "$HOME" != "$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under $HOME"
test -d $HOME/include && cf_search="$cf_search $HOME/include"
test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
@@ -7143,16 +8218,18 @@ test -d "$oldincludedir" && {
test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
}
+cf_search="$cf_search $cf_header_path_list"
+
for cf_cv_header_path_utf8 in $cf_search
do
if test -d $cf_cv_header_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
-echo "${as_me-configure}:7151: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:8228: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 7155 "configure"
+#line 8232 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7165,21 +8242,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8245: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7171: \$? = $ac_status" >&5
+ echo "$as_me:8248: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7174: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8251: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7177: \$? = $ac_status" >&5
+ echo "$as_me:8254: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
-echo "${as_me-configure}:7182: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:8259: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7197,17 +8274,44 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_utf8" = maybe ; then
-echo "${as_me-configure}:7200: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:8277: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
if test "$cf_cv_find_linkage_utf8" != yes ; then
- cf_search=""
+
+cf_search=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in #(vi
+ -L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+
+test "$cf_library_path" != "NONE" && \
+test -d "$cf_library_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
+ test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
+ test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
+ test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
+ test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
+ test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
+}
+
+ cf_library_path_list="$cf_library_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+cf_search=
test "/usr" != "$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "/usr" != "$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr"
test -d /usr/lib && cf_search="$cf_search /usr/lib"
test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
@@ -7229,7 +8333,7 @@ test -d "$prefix" && \
test "/usr/local" != "$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "/usr/local" != "$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
@@ -7240,7 +8344,7 @@ test -d "/usr/local" && \
test "/opt" != "$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "/opt" != "$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /opt"
test -d /opt/lib && cf_search="$cf_search /opt/lib"
test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
@@ -7251,7 +8355,7 @@ test -d "/opt" && \
test "$HOME" != "$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test -d $prefix) && {
+(test $prefix = NONE || test "$HOME" != "$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
@@ -7260,18 +8364,20 @@ test -d "$HOME" && \
test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
}
+cf_search="$cf_library_path_list $cf_search"
+
for cf_cv_library_path_utf8 in $cf_search
do
if test -d $cf_cv_library_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
-echo "${as_me-configure}:7268: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:8374: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-lutf8 $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 7274 "configure"
+#line 8380 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7284,21 +8390,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8393: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7290: \$? = $ac_status" >&5
+ echo "$as_me:8396: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7293: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8399: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7296: \$? = $ac_status" >&5
+ echo "$as_me:8402: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
-echo "${as_me-configure}:7301: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:8407: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=yes
cf_cv_library_file_utf8="-lutf8"
@@ -7315,7 +8421,6 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
done
- LIBS="$cf_save_LIBS"
CPPFLAGS="$cf_save_CPPFLAGS"
LDFLAGS="$cf_save_LDFLAGS"
fi
@@ -7327,6 +8432,11 @@ 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
+
+LIBS="$cf_save_LIBS"
+
if test "$cf_cv_find_linkage_utf8" = yes ; then
cf_cv_utf8_lib=add-on
else
@@ -7336,7 +8446,7 @@ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7339: result: $cf_cv_utf8_lib" >&5
+echo "$as_me:8449: result: $cf_cv_utf8_lib" >&5
echo "${ECHO_T}$cf_cv_utf8_lib" >&6
# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
@@ -7364,13 +8474,13 @@ if test -n "$cf_cv_header_path_utf8" ; then
fi
if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 7373 "configure"
+#line 8483 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -7382,16 +8492,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7385: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8495: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7388: \$? = $ac_status" >&5
+ echo "$as_me:8498: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7391: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8501: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7394: \$? = $ac_status" >&5
+ echo "$as_me:8504: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -7408,13 +8518,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me-configure}:7411: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:8521: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
else
break
fi
@@ -7442,7 +8552,7 @@ if test -n "$cf_cv_library_path_utf8" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me-configure}:7445: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:8555: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -7450,7 +8560,7 @@ echo "${as_me-configure}:7445: testing adding $cf_add_libdir to library-path ...
done
fi
- LIBS="-lutf8 $LIBS"
+ LIBS="$cf_cv_library_file_utf8 $LIBS"
fi
if test "$cf_cv_utf8_lib" != no ; then
@@ -7459,14 +8569,14 @@ fi
fi
# This is needed on Tru64 5.0 to declare mbstate_t
-echo "$as_me:7462: checking if we must include wchar.h to declare mbstate_t" >&5
+echo "$as_me:8572: 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 7469 "configure"
+#line 8579 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7484,23 +8594,23 @@ mbstate_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7487: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7490: \$? = $ac_status" >&5
+ echo "$as_me:8600: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7493: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8603: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7496: \$? = $ac_status" >&5
+ echo "$as_me:8606: \$? = $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 7503 "configure"
+#line 8613 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7519,16 +8629,16 @@ mbstate_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7522: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8632: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7525: \$? = $ac_status" >&5
+ echo "$as_me:8635: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7528: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8638: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7531: \$? = $ac_status" >&5
+ echo "$as_me:8641: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=yes
else
@@ -7540,7 +8650,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:7543: result: $cf_cv_mbstate_t" >&5
+echo "$as_me:8653: result: $cf_cv_mbstate_t" >&5
echo "${ECHO_T}$cf_cv_mbstate_t" >&6
if test "$cf_cv_mbstate_t" = yes ; then
@@ -7557,14 +8667,14 @@ if test "$cf_cv_mbstate_t" = unknown ; then
fi
# This is needed on Tru64 5.0 to declare wchar_t
-echo "$as_me:7560: checking if we must include wchar.h to declare wchar_t" >&5
+echo "$as_me:8670: 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 7567 "configure"
+#line 8677 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7582,23 +8692,23 @@ wchar_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7585: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8695: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7588: \$? = $ac_status" >&5
+ echo "$as_me:8698: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7591: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8701: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7594: \$? = $ac_status" >&5
+ echo "$as_me:8704: \$? = $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 7601 "configure"
+#line 8711 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7617,16 +8727,16 @@ wchar_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7620: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7623: \$? = $ac_status" >&5
+ echo "$as_me:8733: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7626: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8736: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7629: \$? = $ac_status" >&5
+ echo "$as_me:8739: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_wchar_t=yes
else
@@ -7638,7 +8748,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:7641: result: $cf_cv_wchar_t" >&5
+echo "$as_me:8751: result: $cf_cv_wchar_t" >&5
echo "${ECHO_T}$cf_cv_wchar_t" >&6
if test "$cf_cv_wchar_t" = yes ; then
@@ -7660,14 +8770,14 @@ if test "$cf_cv_wchar_t" != unknown ; then
fi
# This is needed on Tru64 5.0 to declare wint_t
-echo "$as_me:7663: checking if we must include wchar.h to declare wint_t" >&5
+echo "$as_me:8773: 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 7670 "configure"
+#line 8780 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7685,23 +8795,23 @@ wint_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7688: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8798: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7691: \$? = $ac_status" >&5
+ echo "$as_me:8801: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7694: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8804: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7697: \$? = $ac_status" >&5
+ echo "$as_me:8807: \$? = $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 7704 "configure"
+#line 8814 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7720,16 +8830,16 @@ wint_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7723: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7726: \$? = $ac_status" >&5
+ echo "$as_me:8836: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7729: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8839: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7732: \$? = $ac_status" >&5
+ echo "$as_me:8842: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_wint_t=yes
else
@@ -7741,7 +8851,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:7744: result: $cf_cv_wint_t" >&5
+echo "$as_me:8854: result: $cf_cv_wint_t" >&5
echo "${ECHO_T}$cf_cv_wint_t" >&6
if test "$cf_cv_wint_t" = yes ; then
@@ -7780,7 +8890,7 @@ case $cf_cv_abi_version in
;;
esac
-echo "$as_me:7783: checking whether to enable _LP64 definition in curses.h" >&5
+echo "$as_me:8893: checking whether to enable _LP64 definition in curses.h" >&5
echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
# Check whether --enable-lp64 or --disable-lp64 was given.
@@ -7790,7 +8900,7 @@ if test "${enable_lp64+set}" = set; then
else
with_lp64=$default_with_lp64
fi;
-echo "$as_me:7793: result: $with_lp64" >&5
+echo "$as_me:8903: result: $with_lp64" >&5
echo "${ECHO_T}$with_lp64" >&6
if test "$with_lp64" = yes ; then
@@ -7806,7 +8916,7 @@ if test "${enable_largefile+set}" = set; then
fi;
if test "$enable_largefile" != no; then
- echo "$as_me:7809: checking for special C compiler options needed for large files" >&5
+ echo "$as_me:8919: checking for special C compiler options needed for large files" >&5
echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7818,7 +8928,7 @@ else
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
-#line 7821 "configure"
+#line 8931 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -7838,16 +8948,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8951: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7844: \$? = $ac_status" >&5
+ echo "$as_me:8954: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7847: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8957: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7850: \$? = $ac_status" >&5
+ echo "$as_me:8960: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -7857,16 +8967,16 @@ fi
rm -f conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8970: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7863: \$? = $ac_status" >&5
+ echo "$as_me:8973: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7866: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8976: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7869: \$? = $ac_status" >&5
+ echo "$as_me:8979: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_CC=' -n32'; break
else
@@ -7880,13 +8990,13 @@ rm -f conftest.$ac_objext
rm -f conftest.$ac_ext
fi
fi
-echo "$as_me:7883: result: $ac_cv_sys_largefile_CC" >&5
+echo "$as_me:8993: result: $ac_cv_sys_largefile_CC" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- echo "$as_me:7889: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ echo "$as_me:8999: checking for _FILE_OFFSET_BITS value needed for large files" >&5
echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7894,7 +9004,7 @@ else
while :; do
ac_cv_sys_file_offset_bits=no
cat >conftest.$ac_ext <<_ACEOF
-#line 7897 "configure"
+#line 9007 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -7914,16 +9024,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9027: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7920: \$? = $ac_status" >&5
+ echo "$as_me:9030: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7923: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9033: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7926: \$? = $ac_status" >&5
+ echo "$as_me:9036: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -7932,7 +9042,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 7935 "configure"
+#line 9045 "configure"
#include "confdefs.h"
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
@@ -7953,16 +9063,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9066: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7959: \$? = $ac_status" >&5
+ echo "$as_me:9069: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7962: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9072: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7965: \$? = $ac_status" >&5
+ echo "$as_me:9075: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_file_offset_bits=64; break
else
@@ -7973,7 +9083,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:7976: result: $ac_cv_sys_file_offset_bits" >&5
+echo "$as_me:9086: result: $ac_cv_sys_file_offset_bits" >&5
echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
if test "$ac_cv_sys_file_offset_bits" != no; then
@@ -7982,8 +9092,8 @@ cat >>confdefs.h <<EOF
EOF
fi
-rm -f conftest*
- echo "$as_me:7986: checking for _LARGE_FILES value needed for large files" >&5
+rm -rf conftest*
+ echo "$as_me:9096: checking for _LARGE_FILES value needed for large files" >&5
echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_large_files+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7991,7 +9101,7 @@ else
while :; do
ac_cv_sys_large_files=no
cat >conftest.$ac_ext <<_ACEOF
-#line 7994 "configure"
+#line 9104 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -8011,16 +9121,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9124: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8017: \$? = $ac_status" >&5
+ echo "$as_me:9127: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8020: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9130: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8023: \$? = $ac_status" >&5
+ echo "$as_me:9133: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -8029,7 +9139,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 8032 "configure"
+#line 9142 "configure"
#include "confdefs.h"
#define _LARGE_FILES 1
#include <sys/types.h>
@@ -8050,16 +9160,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9163: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8056: \$? = $ac_status" >&5
+ echo "$as_me:9166: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8059: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9169: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8062: \$? = $ac_status" >&5
+ echo "$as_me:9172: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_large_files=1; break
else
@@ -8070,7 +9180,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:8073: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:9183: result: $ac_cv_sys_large_files" >&5
echo "${ECHO_T}$ac_cv_sys_large_files" >&6
if test "$ac_cv_sys_large_files" != no; then
@@ -8079,11 +9189,11 @@ cat >>confdefs.h <<EOF
EOF
fi
-rm -f conftest*
+rm -rf conftest*
fi
if test "$enable_largefile" != no ; then
- echo "$as_me:8086: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ echo "$as_me:9196: checking for _LARGEFILE_SOURCE value needed for large files" >&5
echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8091,7 +9201,7 @@ else
while :; do
ac_cv_sys_largefile_source=no
cat >conftest.$ac_ext <<_ACEOF
-#line 8094 "configure"
+#line 9204 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -8103,16 +9213,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9216: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8109: \$? = $ac_status" >&5
+ echo "$as_me:9219: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8112: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9222: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8115: \$? = $ac_status" >&5
+ echo "$as_me:9225: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -8121,7 +9231,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 8124 "configure"
+#line 9234 "configure"
#include "confdefs.h"
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
@@ -8134,16 +9244,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9247: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8140: \$? = $ac_status" >&5
+ echo "$as_me:9250: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8143: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9253: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8146: \$? = $ac_status" >&5
+ echo "$as_me:9256: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_source=1; break
else
@@ -8154,7 +9264,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:8157: result: $ac_cv_sys_largefile_source" >&5
+echo "$as_me:9267: result: $ac_cv_sys_largefile_source" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
if test "$ac_cv_sys_largefile_source" != no; then
@@ -8163,18 +9273,18 @@ cat >>confdefs.h <<EOF
EOF
fi
-rm -f conftest*
+rm -rf conftest*
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
-echo "$as_me:8171: checking for fseeko" >&5
+echo "$as_me:9281: checking for fseeko" >&5
echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
if test "${ac_cv_func_fseeko+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8177 "configure"
+#line 9287 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -8186,16 +9296,16 @@ return fseeko && fseeko (stdin, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8189: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9299: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8192: \$? = $ac_status" >&5
+ echo "$as_me:9302: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8195: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9305: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8198: \$? = $ac_status" >&5
+ echo "$as_me:9308: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_fseeko=yes
else
@@ -8205,7 +9315,7 @@ ac_cv_func_fseeko=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:8208: result: $ac_cv_func_fseeko" >&5
+echo "$as_me:9318: result: $ac_cv_func_fseeko" >&5
echo "${ECHO_T}$ac_cv_func_fseeko" >&6
if test $ac_cv_func_fseeko = yes; then
@@ -8226,14 +9336,14 @@ fi
test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
- echo "$as_me:8229: checking whether to use struct dirent64" >&5
+ echo "$as_me:9339: checking whether to use struct dirent64" >&5
echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
if test "${cf_cv_struct_dirent64+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8236 "configure"
+#line 9346 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -8254,16 +9364,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8260: \$? = $ac_status" >&5
+ echo "$as_me:9370: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8263: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9373: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8266: \$? = $ac_status" >&5
+ echo "$as_me:9376: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_struct_dirent64=yes
else
@@ -8274,7 +9384,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:8277: result: $cf_cv_struct_dirent64" >&5
+echo "$as_me:9387: result: $cf_cv_struct_dirent64" >&5
echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
@@ -8283,7 +9393,7 @@ EOF
fi
### use option --disable-tparm-varargs to make tparm() conform to X/Open
-echo "$as_me:8286: checking if you want tparm not to use X/Open fixed-parameter list" >&5
+echo "$as_me:9396: checking if you want tparm not to use X/Open fixed-parameter list" >&5
echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
@@ -8293,14 +9403,14 @@ if test "${enable_tparm_varargs+set}" = set; then
else
with_tparm_varargs=yes
fi;
-echo "$as_me:8296: result: $with_tparm_varargs" >&5
+echo "$as_me:9406: result: $with_tparm_varargs" >&5
echo "${ECHO_T}$with_tparm_varargs" >&6
NCURSES_TPARM_VARARGS=0
test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
if test "$with_ticlib" != no ; then
-echo "$as_me:8303: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
+echo "$as_me:9413: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
# Check whether --enable-tic-depends or --disable-tic-depends was given.
@@ -8310,14 +9420,14 @@ if test "${enable_tic_depends+set}" = set; then
else
with_tic_depends=yes
fi;
-echo "$as_me:8313: result: $with_tic_depends" >&5
+echo "$as_me:9423: result: $with_tic_depends" >&5
echo "${ECHO_T}$with_tic_depends" >&6
else
with_tic_depends=no
fi
### use option --with-bool to override bool's type
-echo "$as_me:8320: checking for type of bool" >&5
+echo "$as_me:9430: 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.
@@ -8327,10 +9437,10 @@ if test "${with_bool+set}" = set; then
else
NCURSES_BOOL=auto
fi;
-echo "$as_me:8330: result: $NCURSES_BOOL" >&5
+echo "$as_me:9440: result: $NCURSES_BOOL" >&5
echo "${ECHO_T}$NCURSES_BOOL" >&6
-echo "$as_me:8333: checking for alternate terminal capabilities file" >&5
+echo "$as_me:9443: 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.
@@ -8341,11 +9451,11 @@ else
TERMINFO_CAPS=Caps
fi;
test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
-echo "$as_me:8344: result: $TERMINFO_CAPS" >&5
+echo "$as_me:9454: result: $TERMINFO_CAPS" >&5
echo "${ECHO_T}$TERMINFO_CAPS" >&6
### use option --with-chtype to override chtype's type
-echo "$as_me:8348: checking for type of chtype" >&5
+echo "$as_me:9458: checking for type of chtype" >&5
echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
# Check whether --with-chtype or --without-chtype was given.
@@ -8355,11 +9465,11 @@ if test "${with_chtype+set}" = set; then
else
NCURSES_CHTYPE=auto
fi;
-echo "$as_me:8358: result: $NCURSES_CHTYPE" >&5
+echo "$as_me:9468: result: $NCURSES_CHTYPE" >&5
echo "${ECHO_T}$NCURSES_CHTYPE" >&6
### use option --with-ospeed to override ospeed's type
-echo "$as_me:8362: checking for type of ospeed" >&5
+echo "$as_me:9472: 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.
@@ -8369,11 +9479,11 @@ if test "${with_ospeed+set}" = set; then
else
NCURSES_OSPEED=short
fi;
-echo "$as_me:8372: result: $NCURSES_OSPEED" >&5
+echo "$as_me:9482: result: $NCURSES_OSPEED" >&5
echo "${ECHO_T}$NCURSES_OSPEED" >&6
### use option --with-mmask-t to override mmask_t's type
-echo "$as_me:8376: checking for type of mmask_t" >&5
+echo "$as_me:9486: checking for type of mmask_t" >&5
echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
# Check whether --with-mmask-t or --without-mmask-t was given.
@@ -8383,11 +9493,25 @@ if test "${with_mmask_t+set}" = set; then
else
NCURSES_MMASK_T=auto
fi;
-echo "$as_me:8386: result: $NCURSES_MMASK_T" >&5
+echo "$as_me:9496: result: $NCURSES_MMASK_T" >&5
echo "${ECHO_T}$NCURSES_MMASK_T" >&6
+### use option --with-ccharw-max to override CCHARW_MAX size
+echo "$as_me:9500: checking for size CCHARW_MAX" >&5
+echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
+
+# Check whether --with-ccharw-max or --without-ccharw-max was given.
+if test "${with_ccharw_max+set}" = set; then
+ withval="$with_ccharw_max"
+ NCURSES_CCHARW_MAX="$withval"
+else
+ NCURSES_CCHARW_MAX=5
+fi;
+echo "$as_me:9510: result: $NCURSES_CCHARW_MAX" >&5
+echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
+
### Enable compiling-in rcs id's
-echo "$as_me:8390: checking if RCS identifiers should be compiled-in" >&5
+echo "$as_me:9514: 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.
@@ -8397,7 +9521,7 @@ if test "${with_rcs_ids+set}" = set; then
else
with_rcs_ids=no
fi;
-echo "$as_me:8400: result: $with_rcs_ids" >&5
+echo "$as_me:9524: 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
@@ -8405,7 +9529,7 @@ EOF
###############################################################################
-echo "$as_me:8408: checking format of man-pages" >&5
+echo "$as_me:9532: 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.
@@ -8433,7 +9557,7 @@ unknown)
cf_catonly=yes
cf_example=date
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
+ IFS="${IFS:- }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
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
@@ -8494,14 +9618,14 @@ unknown)
;;
esac
-echo "$as_me:8497: result: $MANPAGE_FORMAT" >&5
+echo "$as_me:9621: result: $MANPAGE_FORMAT" >&5
echo "${ECHO_T}$MANPAGE_FORMAT" >&6
if test -n "$cf_unknown" ; then
- { echo "$as_me:8500: WARNING: Unexpected manpage-format $cf_unknown" >&5
+ { echo "$as_me:9624: WARNING: Unexpected manpage-format $cf_unknown" >&5
echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
fi
-echo "$as_me:8504: checking for manpage renaming" >&5
+echo "$as_me:9628: 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.
@@ -8529,7 +9653,7 @@ 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:8532: error: not a filename: $MANPAGE_RENAMES" >&5
+ { { echo "$as_me:9656: error: not a filename: $MANPAGE_RENAMES" >&5
echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -8543,10 +9667,10 @@ echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
fi
fi
-echo "$as_me:8546: result: $MANPAGE_RENAMES" >&5
+echo "$as_me:9670: result: $MANPAGE_RENAMES" >&5
echo "${ECHO_T}$MANPAGE_RENAMES" >&6
-echo "$as_me:8549: checking if manpage aliases will be installed" >&5
+echo "$as_me:9673: 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.
@@ -8557,18 +9681,21 @@ else
MANPAGE_ALIASES=yes
fi;
-echo "$as_me:8560: result: $MANPAGE_ALIASES" >&5
+echo "$as_me:9684: result: $MANPAGE_ALIASES" >&5
echo "${ECHO_T}$MANPAGE_ALIASES" >&6
-if test "$LN_S" = "ln -s"; then
+case "x$LN_S" in #(vi
+xln*) #(vi
cf_use_symlinks=yes
-else
+ ;;
+*)
cf_use_symlinks=no
-fi
+ ;;
+esac
MANPAGE_SYMLINKS=no
if test "$MANPAGE_ALIASES" = yes ; then
-echo "$as_me:8571: checking if manpage symlinks should be used" >&5
+echo "$as_me:9698: 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.
@@ -8581,17 +9708,17 @@ fi;
if test "$$cf_use_symlinks" = no; then
if test "$MANPAGE_SYMLINKS" = yes ; then
- { echo "$as_me:8584: WARNING: cannot make symlinks" >&5
+ { echo "$as_me:9711: WARNING: cannot make symlinks" >&5
echo "$as_me: WARNING: cannot make symlinks" >&2;}
MANPAGE_SYMLINKS=no
fi
fi
-echo "$as_me:8590: result: $MANPAGE_SYMLINKS" >&5
+echo "$as_me:9717: result: $MANPAGE_SYMLINKS" >&5
echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
fi
-echo "$as_me:8594: checking for manpage tbl" >&5
+echo "$as_me:9721: 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.
@@ -8602,7 +9729,7 @@ else
MANPAGE_TBL=no
fi;
-echo "$as_me:8605: result: $MANPAGE_TBL" >&5
+echo "$as_me:9732: result: $MANPAGE_TBL" >&5
echo "${ECHO_T}$MANPAGE_TBL" >&6
if test "$prefix" = "NONE" ; then
@@ -8635,7 +9762,7 @@ case "$MANPAGE_FORMAT" in #(vi
cf_so_strip="Z"
cf_compress=compress
;;
-*gzip*) #(vi
+*gzip*)
cf_so_strip="gz"
cf_compress=gzip
;;
@@ -8658,14 +9785,12 @@ NCURSES_PATCH="$NCURSES_PATCH"
NCURSES_OSPEED="$NCURSES_OSPEED"
TERMINFO="$TERMINFO"
-MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
-
INSTALL="$INSTALL"
INSTALL_DATA="$INSTALL_DATA"
transform="$program_transform_name"
-TMP=\${TMPDIR-/tmp}/man\$\$
+TMP=\${TMPDIR:=/tmp}/man\$\$
trap "rm -f \$TMP" 0 1 2 5 15
form=\$1
@@ -8703,7 +9828,7 @@ case \$i in #(vi
section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
if test \$verb = installing ; then
if test ! -d \$cf_subdir\${section} ; then
- \$MKDIRS \$cf_subdir\$section
+ mkdir -p \$cf_subdir\$section
fi
fi
@@ -8718,12 +9843,12 @@ cat >>$cf_man_alias <<-CF_EOF2
s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
CF_EOF
- for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ for cf_name in captoinfo clear infocmp infotocap tabs tic toe tput tset
do
cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
cf_name=`echo $cf_name|sed "$program_transform_name"`
cat >>$cf_edit_man <<-CF_EOF
- s,@$cf_NAME@,$cf_name,
+ s,@$cf_NAME@,$cf_name,g
CF_EOF
done
@@ -8852,8 +9977,21 @@ cat >>$cf_edit_man <<CF_EOF
fi
fi
echo .. \$verb alias \$cf_alias\${suffix}
+CF_EOF
+case "x$LN_S" in #(vi
+*-f) #(vi
+cat >>$cf_edit_man <<CF_EOF
+ $LN_S \$cf_target \$cf_alias\${suffix}
+CF_EOF
+ ;;
+*)
+cat >>$cf_edit_man <<CF_EOF
rm -f \$cf_alias\${suffix}
$LN_S \$cf_target \$cf_alias\${suffix}
+CF_EOF
+ ;;
+esac
+cat >>$cf_edit_man <<CF_EOF
elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
echo ".so \$cf_source" >\$TMP
CF_EOF
@@ -8913,7 +10051,7 @@ chmod 755 $cf_edit_man
###############################################################################
### Note that some functions (such as const) are normally disabled anyway.
-echo "$as_me:8916: checking if you want to build with function extensions" >&5
+echo "$as_me:10054: 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.
@@ -8923,7 +10061,7 @@ if test "${enable_ext_funcs+set}" = set; then
else
with_ext_funcs=yes
fi;
-echo "$as_me:8926: result: $with_ext_funcs" >&5
+echo "$as_me:10064: result: $with_ext_funcs" >&5
echo "${ECHO_T}$with_ext_funcs" >&6
if test "$with_ext_funcs" = yes ; then
NCURSES_EXT_FUNCS=1
@@ -8944,6 +10082,10 @@ EOF
EOF
cat >>confdefs.h <<\EOF
+#define HAVE_TERM_ENTRY_H 1
+EOF
+
+ cat >>confdefs.h <<\EOF
#define HAVE_USE_DEFAULT_COLORS 1
EOF
@@ -8955,12 +10097,62 @@ EOF
#define NCURSES_EXT_FUNCS 1
EOF
+ GENERATED_EXT_FUNCS=generated
else
NCURSES_EXT_FUNCS=0
+ GENERATED_EXT_FUNCS=
+fi
+
+echo "$as_me:10106: checking if you want to build with experimental SCREEN extensions" >&5
+echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
+
+# Check whether --enable-sp-funcs or --disable-sp-funcs was given.
+if test "${enable_sp_funcs+set}" = set; then
+ enableval="$enable_sp_funcs"
+ with_sp_funcs=$enableval
+else
+ with_sp_funcs=no
+fi;
+echo "$as_me:10116: result: $with_sp_funcs" >&5
+echo "${ECHO_T}$with_sp_funcs" >&6
+if test "$with_sp_funcs" = yes ; then
+ NCURSES_SP_FUNCS=1
+ cat >>confdefs.h <<\EOF
+#define NCURSES_SP_FUNCS 1
+EOF
+
+ GENERATED_SP_FUNCS=generated
+else
+ NCURSES_SP_FUNCS=0
+ GENERATED_SP_FUNCS=
+fi
+
+echo "$as_me:10130: checking if you want to build with experimental terminal-driver" >&5
+echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
+
+# Check whether --enable-term-driver or --disable-term-driver was given.
+if test "${enable_term_driver+set}" = set; then
+ enableval="$enable_term_driver"
+ with_term_driver=$enableval
+else
+ with_term_driver=no
+fi;
+echo "$as_me:10140: result: $with_term_driver" >&5
+echo "${ECHO_T}$with_term_driver" >&6
+if test "$with_term_driver" = yes ; then
+ cat >>confdefs.h <<\EOF
+#define USE_TERM_DRIVER 1
+EOF
+
+ if test "$with_sp_funcs" != yes ; then
+ { { echo "$as_me:10148: error: The term-driver option relies upon sp-funcs" >&5
+echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
### use option --enable-const to turn on use of const beyond that in XSI.
-echo "$as_me:8963: checking for extended use of const keyword" >&5
+echo "$as_me:10155: 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.
@@ -8970,7 +10162,7 @@ if test "${enable_const+set}" = set; then
else
with_ext_const=no
fi;
-echo "$as_me:8973: result: $with_ext_const" >&5
+echo "$as_me:10165: result: $with_ext_const" >&5
echo "${ECHO_T}$with_ext_const" >&6
NCURSES_CONST='/*nothing*/'
if test "$with_ext_const" = yes ; then
@@ -8978,7 +10170,7 @@ if test "$with_ext_const" = yes ; then
fi
### use option --enable-ext-colors to turn on use of colors beyond 16.
-echo "$as_me:8981: checking if you want to use extended colors" >&5
+echo "$as_me:10173: checking if you want to use extended colors" >&5
echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
# Check whether --enable-ext-colors or --disable-ext-colors was given.
@@ -8988,12 +10180,12 @@ if test "${enable_ext_colors+set}" = set; then
else
with_ext_colors=no
fi;
-echo "$as_me:8991: result: $with_ext_colors" >&5
+echo "$as_me:10183: result: $with_ext_colors" >&5
echo "${ECHO_T}$with_ext_colors" >&6
NCURSES_EXT_COLORS=0
if test "$with_ext_colors" = yes ; then
if test "$with_widec" != yes ; then
- { { echo "$as_me:8996: error: This option applies only to wide-character library" >&5
+ { { echo "$as_me:10188: error: This option applies only to wide-character library" >&5
echo "$as_me: error: This option applies only to wide-character library" >&2;}
{ (exit 1); exit 1; }; }
else
@@ -9004,7 +10196,7 @@ if test "${with_abi_version+set}" != set; then
5.*)
cf_cv_rel_version=6.0
cf_cv_abi_version=6
- { echo "$as_me:9007: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
+ { echo "$as_me:10199: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
;;
esac
@@ -9019,7 +10211,7 @@ EOF
fi
### use option --enable-ext-mouse to modify coding to support 5-button mice
-echo "$as_me:9022: checking if you want to use extended mouse encoding" >&5
+echo "$as_me:10214: checking if you want to use extended mouse encoding" >&5
echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
@@ -9029,7 +10221,7 @@ if test "${enable_ext_mouse+set}" = set; then
else
with_ext_mouse=no
fi;
-echo "$as_me:9032: result: $with_ext_mouse" >&5
+echo "$as_me:10224: result: $with_ext_mouse" >&5
echo "${ECHO_T}$with_ext_mouse" >&6
NCURSES_MOUSE_VERSION=1
if test "$with_ext_mouse" = yes ; then
@@ -9040,7 +10232,7 @@ if test "${with_abi_version+set}" != set; then
5.*)
cf_cv_rel_version=6.0
cf_cv_abi_version=6
- { echo "$as_me:9043: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
+ { echo "$as_me:10235: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
;;
esac
@@ -9048,7 +10240,7 @@ fi
fi
-echo "$as_me:9051: checking if you want \$NCURSES_NO_PADDING code" >&5
+echo "$as_me:10243: 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.
@@ -9058,19 +10250,19 @@ if test "${enable_no_padding+set}" = set; then
else
with_no_padding=$with_ext_funcs
fi;
-echo "$as_me:9061: result: $with_no_padding" >&5
+echo "$as_me:10253: 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
-echo "$as_me:9067: checking for ANSI C header files" >&5
+echo "$as_me:10259: 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 9073 "configure"
+#line 10265 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -9078,13 +10270,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:9081: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10273: \"$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:9087: \$? = $ac_status" >&5
+ echo "$as_me:10279: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -9106,7 +10298,7 @@ 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 9109 "configure"
+#line 10301 "configure"
#include "confdefs.h"
#include <string.h>
@@ -9117,14 +10309,14 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -rf 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 9127 "configure"
+#line 10319 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -9135,7 +10327,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
@@ -9145,7 +10337,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9148 "configure"
+#line 10340 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -9171,15 +10363,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10366: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9177: \$? = $ac_status" >&5
+ echo "$as_me:10369: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:9179: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10371: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9182: \$? = $ac_status" >&5
+ echo "$as_me:10374: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -9192,7 +10384,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:9195: result: $ac_cv_header_stdc" >&5
+echo "$as_me:10387: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -9208,28 +10400,28 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:9211: checking for $ac_header" >&5
+echo "$as_me:10403: 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 9217 "configure"
+#line 10409 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10415: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9226: \$? = $ac_status" >&5
+ echo "$as_me:10418: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9229: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10421: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9232: \$? = $ac_status" >&5
+ echo "$as_me:10424: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -9239,7 +10431,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:9242: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:10434: 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
@@ -9249,13 +10441,13 @@ EOF
fi
done
-echo "$as_me:9252: checking for signed char" >&5
+echo "$as_me:10444: checking for signed char" >&5
echo $ECHO_N "checking for signed char... $ECHO_C" >&6
if test "${ac_cv_type_signed_char+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9258 "configure"
+#line 10450 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -9270,16 +10462,16 @@ if (sizeof (signed char))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9276: \$? = $ac_status" >&5
+ echo "$as_me:10468: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9279: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10471: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9282: \$? = $ac_status" >&5
+ echo "$as_me:10474: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_signed_char=yes
else
@@ -9289,10 +10481,10 @@ ac_cv_type_signed_char=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:9292: result: $ac_cv_type_signed_char" >&5
+echo "$as_me:10484: result: $ac_cv_type_signed_char" >&5
echo "${ECHO_T}$ac_cv_type_signed_char" >&6
-echo "$as_me:9295: checking size of signed char" >&5
+echo "$as_me:10487: checking size of signed char" >&5
echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
if test "${ac_cv_sizeof_signed_char+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9301,7 +10493,7 @@ else
if test "$cross_compiling" = yes; then
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
-#line 9304 "configure"
+#line 10496 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -9313,21 +10505,21 @@ int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9316: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10508: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9319: \$? = $ac_status" >&5
+ echo "$as_me:10511: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9322: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10514: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9325: \$? = $ac_status" >&5
+ echo "$as_me:10517: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_lo=0 ac_mid=0
while :; do
cat >conftest.$ac_ext <<_ACEOF
-#line 9330 "configure"
+#line 10522 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -9339,16 +10531,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10534: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9345: \$? = $ac_status" >&5
+ echo "$as_me:10537: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9348: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10540: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9351: \$? = $ac_status" >&5
+ echo "$as_me:10543: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_hi=$ac_mid; break
else
@@ -9364,7 +10556,7 @@ cat conftest.$ac_ext >&5
ac_hi=-1 ac_mid=-1
while :; do
cat >conftest.$ac_ext <<_ACEOF
-#line 9367 "configure"
+#line 10559 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -9376,16 +10568,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9379: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10571: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9382: \$? = $ac_status" >&5
+ echo "$as_me:10574: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9385: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10577: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9388: \$? = $ac_status" >&5
+ echo "$as_me:10580: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_lo=$ac_mid; break
else
@@ -9401,7 +10593,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line 9404 "configure"
+#line 10596 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -9413,16 +10605,16 @@ int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9419: \$? = $ac_status" >&5
+ echo "$as_me:10611: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9422: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10614: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9425: \$? = $ac_status" >&5
+ echo "$as_me:10617: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_hi=$ac_mid
else
@@ -9435,12 +10627,12 @@ done
ac_cv_sizeof_signed_char=$ac_lo
else
if test "$cross_compiling" = yes; then
- { { echo "$as_me:9438: error: cannot run test program while cross compiling" >&5
+ { { echo "$as_me:10630: 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 9443 "configure"
+#line 10635 "configure"
#include "confdefs.h"
$ac_includes_default
int
@@ -9456,15 +10648,15 @@ fclose (f);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10651: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9462: \$? = $ac_status" >&5
+ echo "$as_me:10654: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:9464: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10656: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9467: \$? = $ac_status" >&5
+ echo "$as_me:10659: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sizeof_signed_char=`cat conftest.val`
else
@@ -9480,7 +10672,7 @@ else
ac_cv_sizeof_signed_char=0
fi
fi
-echo "$as_me:9483: result: $ac_cv_sizeof_signed_char" >&5
+echo "$as_me:10675: result: $ac_cv_sizeof_signed_char" >&5
echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
cat >>confdefs.h <<EOF
#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
@@ -9491,7 +10683,7 @@ if test "$ac_cv_sizeof_signed_char" = 1 ; then
else
NCURSES_SBOOL="char"
fi
-echo "$as_me:9494: checking if you want to use signed Boolean array in term.h" >&5
+echo "$as_me:10686: checking if you want to use signed Boolean array in term.h" >&5
echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
# Check whether --enable-signed-char or --disable-signed-char was given.
@@ -9501,12 +10693,12 @@ if test "${enable_signed_char+set}" = set; then
else
with_signed_char=no
fi;
-echo "$as_me:9504: result: $with_signed_char" >&5
+echo "$as_me:10696: result: $with_signed_char" >&5
echo "${ECHO_T}$with_signed_char" >&6
test "$with_signed_char" != yes && NCURSES_SBOOL="char"
### use option --enable-sigwinch to turn on use of SIGWINCH logic
-echo "$as_me:9509: checking if you want SIGWINCH handler" >&5
+echo "$as_me:10701: 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.
@@ -9516,14 +10708,14 @@ if test "${enable_sigwinch+set}" = set; then
else
with_sigwinch=$with_ext_funcs
fi;
-echo "$as_me:9519: result: $with_sigwinch" >&5
+echo "$as_me:10711: 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:9526: checking if you want user-definable terminal capabilities like termcap" >&5
+echo "$as_me:10718: 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.
@@ -9533,7 +10725,7 @@ if test "${enable_tcap_names+set}" = set; then
else
with_tcap_names=$with_ext_funcs
fi;
-echo "$as_me:9536: result: $with_tcap_names" >&5
+echo "$as_me:10728: result: $with_tcap_names" >&5
echo "${ECHO_T}$with_tcap_names" >&6
NCURSES_XNAMES=0
test "$with_tcap_names" = yes && NCURSES_XNAMES=1
@@ -9541,7 +10733,7 @@ test "$with_tcap_names" = yes && NCURSES_XNAMES=1
###############################################################################
# These options are relatively safe to experiment with.
-echo "$as_me:9544: checking if you want all development code" >&5
+echo "$as_me:10736: 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.
@@ -9551,11 +10743,11 @@ if test "${with_develop+set}" = set; then
else
with_develop=no
fi;
-echo "$as_me:9554: result: $with_develop" >&5
+echo "$as_me:10746: 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:9558: checking if you want hard-tabs code" >&5
+echo "$as_me:10750: 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.
@@ -9565,14 +10757,14 @@ if test "${enable_hard_tabs+set}" = set; then
else
enable_hard_tabs=$with_develop
fi;
-echo "$as_me:9568: result: $enable_hard_tabs" >&5
+echo "$as_me:10760: result: $enable_hard_tabs" >&5
echo "${ECHO_T}$enable_hard_tabs" >&6
test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
#define USE_HARD_TABS 1
EOF
### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
-echo "$as_me:9575: checking if you want limited support for xmc" >&5
+echo "$as_me:10767: 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.
@@ -9582,7 +10774,7 @@ if test "${enable_xmc_glitch+set}" = set; then
else
enable_xmc_glitch=$with_develop
fi;
-echo "$as_me:9585: result: $enable_xmc_glitch" >&5
+echo "$as_me:10777: result: $enable_xmc_glitch" >&5
echo "${ECHO_T}$enable_xmc_glitch" >&6
test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
#define USE_XMC_SUPPORT 1
@@ -9591,7 +10783,7 @@ EOF
###############################################################################
# These are just experimental, probably should not be in a package:
-echo "$as_me:9594: checking if you do not want to assume colors are white-on-black" >&5
+echo "$as_me:10786: 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.
@@ -9601,14 +10793,14 @@ if test "${enable_assumed_color+set}" = set; then
else
with_assumed_color=yes
fi;
-echo "$as_me:9604: result: $with_assumed_color" >&5
+echo "$as_me:10796: 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:9611: checking if you want hashmap scrolling-optimization code" >&5
+echo "$as_me:10803: 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.
@@ -9618,14 +10810,14 @@ if test "${enable_hashmap+set}" = set; then
else
with_hashmap=yes
fi;
-echo "$as_me:9621: result: $with_hashmap" >&5
+echo "$as_me:10813: 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:9628: checking if you want colorfgbg code" >&5
+echo "$as_me:10820: 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.
@@ -9635,16 +10827,33 @@ if test "${enable_colorfgbg+set}" = set; then
else
with_colorfgbg=no
fi;
-echo "$as_me:9638: result: $with_colorfgbg" >&5
+echo "$as_me:10830: result: $with_colorfgbg" >&5
echo "${ECHO_T}$with_colorfgbg" >&6
test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
#define USE_COLORFGBG 1
EOF
+### use option --enable-interop to turn on use of bindings used for interop
+echo "$as_me:10837: checking if you want interop bindings" >&5
+echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
+
+# Check whether --enable-interop or --disable-interop was given.
+if test "${enable_interop+set}" = set; then
+ enableval="$enable_interop"
+ with_exp_interop=$enableval
+else
+ with_exp_interop=no
+fi;
+echo "$as_me:10847: result: $with_exp_interop" >&5
+echo "${ECHO_T}$with_exp_interop" >&6
+
+NCURSES_INTEROP_FUNCS=0
+test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
+
# This is still experimental (20080329), but should ultimately be moved to
# the script-block --with-normal, etc.
-echo "$as_me:9647: checking if you want to link with the pthread library" >&5
+echo "$as_me:10856: checking if you want to link with the pthread library" >&5
echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
# Check whether --with-pthread or --without-pthread was given.
@@ -9654,27 +10863,27 @@ if test "${with_pthread+set}" = set; then
else
with_pthread=no
fi;
-echo "$as_me:9657: result: $with_pthread" >&5
+echo "$as_me:10866: result: $with_pthread" >&5
echo "${ECHO_T}$with_pthread" >&6
if test "$with_pthread" != no ; then
- echo "$as_me:9661: checking for pthread.h" >&5
+ echo "$as_me:10870: checking for pthread.h" >&5
echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
if test "${ac_cv_header_pthread_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9667 "configure"
+#line 10876 "configure"
#include "confdefs.h"
#include <pthread.h>
_ACEOF
-if { (eval echo "$as_me:9671: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:10880: \"$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:9677: \$? = $ac_status" >&5
+ echo "$as_me:10886: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -9693,7 +10902,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:9696: result: $ac_cv_header_pthread_h" >&5
+echo "$as_me:10905: result: $ac_cv_header_pthread_h" >&5
echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
if test $ac_cv_header_pthread_h = yes; then
@@ -9701,12 +10910,12 @@ if test $ac_cv_header_pthread_h = yes; then
#define HAVE_PTHREADS_H 1
EOF
- echo "$as_me:9704: checking if we can link with the pthread library" >&5
+ echo "$as_me:10913: checking if we can link with the pthread library" >&5
echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
cf_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9709 "configure"
+#line 10918 "configure"
#include "confdefs.h"
#include <pthread.h>
@@ -9722,16 +10931,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9725: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10934: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9728: \$? = $ac_status" >&5
+ echo "$as_me:10937: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9731: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10940: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9734: \$? = $ac_status" >&5
+ echo "$as_me:10943: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
with_pthread=yes
else
@@ -9741,7 +10950,7 @@ with_pthread=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$cf_save_LIBS"
- echo "$as_me:9744: result: $with_pthread" >&5
+ echo "$as_me:10953: result: $with_pthread" >&5
echo "${ECHO_T}$with_pthread" >&6
if test "$with_pthread" = yes ; then
@@ -9751,7 +10960,7 @@ echo "${ECHO_T}$with_pthread" >&6
EOF
else
- { { echo "$as_me:9754: error: Cannot link with pthread library" >&5
+ { { echo "$as_me:10963: error: Cannot link with pthread library" >&5
echo "$as_me: error: Cannot link with pthread library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9760,28 +10969,109 @@ fi
fi
-echo "$as_me:9763: checking if you want to use weak-symbols for pthreads" >&5
+if test "x$with_pthread" != xno; then
+ echo "$as_me:10973: checking for pthread_kill" >&5
+echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
+if test "${ac_cv_func_pthread_kill+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 10979 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char pthread_kill (); 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 pthread_kill ();
+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_pthread_kill) || defined (__stub___pthread_kill)
+choke me
+#else
+f = pthread_kill;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:11010: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:11013: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:11016: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11019: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_pthread_kill=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_pthread_kill=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:11029: result: $ac_cv_func_pthread_kill" >&5
+echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
+if test $ac_cv_func_pthread_kill = yes; then
+
+ echo "$as_me:11033: checking if you want to allow EINTR in wgetch with pthreads" >&5
+echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
+
+# Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
+if test "${enable_pthreads_eintr+set}" = set; then
+ enableval="$enable_pthreads_eintr"
+ use_pthreads_eintr=$enableval
+else
+ use_pthreads_eintr=no
+fi;
+ echo "$as_me:11043: result: $use_pthreads_eintr" >&5
+echo "${ECHO_T}$use_pthreads_eintr" >&6
+ if test $use_pthreads_eintr = yes ; then
+ cat >>confdefs.h <<\EOF
+#define USE_PTHREADS_EINTR 1
+EOF
+
+ fi
+fi
+
+ echo "$as_me:11053: checking if you want to use weak-symbols for pthreads" >&5
echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
# Check whether --enable-weak-symbols or --disable-weak-symbols was given.
if test "${enable_weak_symbols+set}" = set; then
enableval="$enable_weak_symbols"
- use_weak_symbols=$withval
+ use_weak_symbols=$enableval
else
use_weak_symbols=no
fi;
-echo "$as_me:9773: result: $use_weak_symbols" >&5
+ echo "$as_me:11063: result: $use_weak_symbols" >&5
echo "${ECHO_T}$use_weak_symbols" >&6
-if test "$use_weak_symbols" = yes ; then
+ if test "$use_weak_symbols" = yes ; then
-echo "$as_me:9777: checking if $CC supports weak symbols" >&5
+echo "$as_me:11067: checking if $CC supports weak symbols" >&5
echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
if test "${cf_cv_weak_symbols+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9784 "configure"
+#line 11074 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -9807,16 +11097,16 @@ weak_symbol(fopen);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11100: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9813: \$? = $ac_status" >&5
+ echo "$as_me:11103: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9816: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11106: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9819: \$? = $ac_status" >&5
+ echo "$as_me:11109: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_weak_symbols=yes
else
@@ -9827,18 +11117,19 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:9830: result: $cf_cv_weak_symbols" >&5
+echo "$as_me:11120: result: $cf_cv_weak_symbols" >&5
echo "${ECHO_T}$cf_cv_weak_symbols" >&6
-else
- cf_cv_weak_symbols=no
-fi
+ else
+ cf_cv_weak_symbols=no
+ fi
-if test $cf_cv_weak_symbols = yes ; then
- cat >>confdefs.h <<\EOF
+ if test $cf_cv_weak_symbols = yes ; then
+ cat >>confdefs.h <<\EOF
#define USE_WEAK_SYMBOLS 1
EOF
+ fi
fi
PTHREAD=
@@ -9857,7 +11148,7 @@ fi
# opaque outside of that, so there is no --enable-opaque option. We can use
# this option without --with-pthreads, but this will be always set for
# pthreads.
-echo "$as_me:9860: checking if you want experimental reentrant code" >&5
+echo "$as_me:11151: checking if you want experimental reentrant code" >&5
echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
# Check whether --enable-reentrant or --disable-reentrant was given.
@@ -9867,21 +11158,23 @@ if test "${enable_reentrant+set}" = set; then
else
with_reentrant=no
fi;
-echo "$as_me:9870: result: $with_reentrant" >&5
+echo "$as_me:11161: result: $with_reentrant" >&5
echo "${ECHO_T}$with_reentrant" >&6
if test "$with_reentrant" = yes ; then
cf_cv_enable_reentrant=1
cf_cv_enable_opaque="NCURSES_INTERNALS"
NCURSES_OPAQUE=1
NCURSES_SIZE_T=int
- if test $cf_cv_weak_symbols = yes ; then
+ if test $cf_cv_weak_symbols = yes ; then
# remove pthread library from $LIBS
LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
- else
- LIB_SUFFIX="t${LIB_SUFFIX}"
- fi
+ TEST_LIBS="-lpthread $TEST_LIBS"
+ TEST_LIBS2="-lpthread $TEST_LIBS2"
+ else
+ LIB_SUFFIX="t${LIB_SUFFIX}"
+ fi
cat >>confdefs.h <<\EOF
#define USE_REENTRANT 1
EOF
@@ -9891,7 +11184,7 @@ if test "${with_abi_version+set}" != set; then
5.*)
cf_cv_rel_version=6.0
cf_cv_abi_version=6
- { echo "$as_me:9894: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
+ { echo "$as_me:11187: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
;;
esac
@@ -9904,7 +11197,29 @@ else
NCURSES_SIZE_T=short
fi
-echo "$as_me:9907: checking if you want experimental safe-sprintf code" >&5
+### Allow using a different wrap-prefix
+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
+ echo "$as_me:11202: checking for prefix used to wrap public variables" >&5
+echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
+
+# Check whether --with-wrap-prefix or --without-wrap-prefix was given.
+if test "${with_wrap_prefix+set}" = set; then
+ withval="$with_wrap_prefix"
+ NCURSES_WRAP_PREFIX=$withval
+else
+ NCURSES_WRAP_PREFIX=_nc_
+fi;
+ echo "$as_me:11212: result: $NCURSES_WRAP_PREFIX" >&5
+echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
+else
+ NCURSES_WRAP_PREFIX=_nc_
+fi
+
+cat >>confdefs.h <<EOF
+#define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
+EOF
+
+echo "$as_me:11222: 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.
@@ -9914,7 +11229,7 @@ if test "${enable_safe_sprintf+set}" = set; then
else
with_safe_sprintf=no
fi;
-echo "$as_me:9917: result: $with_safe_sprintf" >&5
+echo "$as_me:11232: 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
@@ -9923,7 +11238,7 @@ 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:9926: checking if you want to experiment without scrolling-hints code" >&5
+echo "$as_me:11241: 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.
@@ -9933,7 +11248,7 @@ if test "${enable_scroll_hints+set}" = set; then
else
with_scroll_hints=yes
fi;
-echo "$as_me:9936: result: $with_scroll_hints" >&5
+echo "$as_me:11251: 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
@@ -9941,7 +11256,7 @@ EOF
fi
-echo "$as_me:9944: checking if you want experimental wgetch-events code" >&5
+echo "$as_me:11259: checking if you want experimental wgetch-events code" >&5
echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
@@ -9951,7 +11266,7 @@ if test "${enable_wgetch_events+set}" = set; then
else
with_wgetch_events=no
fi;
-echo "$as_me:9954: result: $with_wgetch_events" >&5
+echo "$as_me:11269: result: $with_wgetch_events" >&5
echo "${ECHO_T}$with_wgetch_events" >&6
test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
#define NCURSES_WGETCH_EVENTS 1
@@ -9960,7 +11275,7 @@ EOF
###############################################################################
### use option --disable-echo to suppress full display compiling commands
-echo "$as_me:9963: checking if you want to display full commands during build" >&5
+echo "$as_me:11278: 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.
@@ -9977,11 +11292,11 @@ else
test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
fi
-echo "$as_me:9980: result: $with_echo" >&5
+echo "$as_me:11295: result: $with_echo" >&5
echo "${ECHO_T}$with_echo" >&6
### use option --enable-warnings to turn on all gcc warnings
-echo "$as_me:9984: checking if you want to see compiler warnings" >&5
+echo "$as_me:11299: 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.
@@ -9989,10 +11304,11 @@ if test "${enable_warnings+set}" = set; then
enableval="$enable_warnings"
with_warnings=$enableval
fi;
-echo "$as_me:9992: result: $with_warnings" >&5
+echo "$as_me:11307: result: $with_warnings" >&5
echo "${ECHO_T}$with_warnings" >&6
if test "x$with_warnings" = "xyes"; then
+
ADAFLAGS="$ADAFLAGS -gnatg"
INTEL_COMPILER=no
@@ -10000,12 +11316,12 @@ INTEL_COMPILER=no
if test "$GCC" = yes ; then
case $host_os in
linux*|gnu*)
- echo "$as_me:10003: checking if this is really Intel C compiler" >&5
+ echo "$as_me:11319: checking if this is really Intel C compiler" >&5
echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
cf_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -no-gcc"
cat >conftest.$ac_ext <<_ACEOF
-#line 10008 "configure"
+#line 11324 "configure"
#include "confdefs.h"
int
@@ -10022,16 +11338,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10025: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11341: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10028: \$? = $ac_status" >&5
+ echo "$as_me:11344: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10031: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11347: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10034: \$? = $ac_status" >&5
+ echo "$as_me:11350: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
INTEL_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
@@ -10042,14 +11358,14 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"
- echo "$as_me:10045: result: $INTEL_COMPILER" >&5
+ echo "$as_me:11361: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
;;
esac
fi
cat > conftest.$ac_ext <<EOF
-#line 10052 "${as_me-configure}"
+#line 11368 "${as_me:-configure}"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
@@ -10057,7 +11373,6 @@ if test "$INTEL_COMPILER" = yes
then
# The "-wdXXX" options suppress warnings:
# remark #1419: external declaration in primary source file
-# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
# remark #193: zero used for undefined preprocessing identifier
@@ -10065,31 +11380,30 @@ then
# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
# remark #869: parameter "tw" was never referenced
# remark #981: operands are evaluated in unspecified order
-# warning #269: invalid format string conversion
+# warning #279: controlling expression is constant
- { echo "$as_me:10070: checking for $CC warning options..." >&5
+ { echo "$as_me:11385: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
for cf_opt in \
wd1419 \
- wd1682 \
wd1683 \
wd1684 \
wd193 \
- wd279 \
wd593 \
+ wd279 \
wd810 \
wd869 \
wd981
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10090: \$? = $ac_status" >&5
+ echo "$as_me:11404: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:10092: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:11406: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
fi
@@ -10098,13 +11412,13 @@ echo "${ECHO_T}... -$cf_opt" >&6
elif test "$GCC" = yes
then
- { echo "$as_me:10101: checking for $CC warning options..." >&5
+ { echo "$as_me:11415: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
- EXTRA_CFLAGS="-W -Wall"
+ EXTRA_CFLAGS=
cf_warn_CONST=""
test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
- for cf_opt in \
+ for cf_opt in W Wall \
Wbad-function-cast \
Wcast-align \
Wcast-qual \
@@ -10118,12 +11432,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:10121: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:11435: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10124: \$? = $ac_status" >&5
+ echo "$as_me:11438: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:10126: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:11440: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
case $cf_opt in #(vi
Wcast-qual) #(vi
@@ -10134,7 +11448,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
[34].*)
test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
-echo "${as_me-configure}:10137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:11451: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
continue;;
esac
@@ -10145,7 +11459,7 @@ echo "${as_me-configure}:10137: testing feature is broken in gcc $GCC_VERSION ..
done
CFLAGS="$cf_save_CFLAGS"
fi
-rm -f conftest*
+rm -rf conftest*
if test "$cf_with_cxx" = yes ; then
@@ -10154,12 +11468,12 @@ INTEL_CPLUSPLUS=no
if test "$GCC" = yes ; then
case $host_os in
linux*|gnu*)
- echo "$as_me:10157: checking if this is really Intel C++ compiler" >&5
+ echo "$as_me:11471: checking if this is really Intel C++ compiler" >&5
echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
cf_save_CFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -no-gcc"
cat >conftest.$ac_ext <<_ACEOF
-#line 10162 "configure"
+#line 11476 "configure"
#include "confdefs.h"
int
@@ -10176,16 +11490,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11493: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10182: \$? = $ac_status" >&5
+ echo "$as_me:11496: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10185: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11499: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10188: \$? = $ac_status" >&5
+ echo "$as_me:11502: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
INTEL_CPLUSPLUS=yes
cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
@@ -10196,7 +11510,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CXXFLAGS="$cf_save_CFLAGS"
- echo "$as_me:10199: result: $INTEL_CPLUSPLUS" >&5
+ echo "$as_me:11513: result: $INTEL_CPLUSPLUS" >&5
echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
;;
esac
@@ -10210,7 +11524,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_main_return=return
cat > conftest.$ac_ext <<EOF
-#line 10213 "configure"
+#line 11527 "configure"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
@@ -10228,7 +11542,7 @@ then
# remark #981: operands are evaluated in unspecified order
# warning #269: invalid format string conversion
- { echo "$as_me:10231: checking for $CC warning options..." >&5
+ { echo "$as_me:11545: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CXXFLAGS="$CXXFLAGS"
EXTRA_CXXFLAGS="-Wall"
@@ -10245,12 +11559,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
wd981
do
CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
- if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:11562: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10251: \$? = $ac_status" >&5
+ echo "$as_me:11565: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:10253: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:11567: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
fi
@@ -10259,7 +11573,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
elif test "$GXX" = yes
then
- { echo "$as_me:10262: checking for $CXX warning options..." >&5
+ { echo "$as_me:11576: checking for $CXX warning options..." >&5
echo "$as_me: checking for $CXX warning options..." >&6;}
cf_save_CXXFLAGS="$CXXFLAGS"
EXTRA_CXXFLAGS="-W -Wall"
@@ -10288,23 +11602,23 @@ echo "$as_me: checking for $CXX warning options..." >&6;}
Wundef $cf_gxx_extra_warnings Wno-unused
do
CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
- if { (eval echo "$as_me:10291: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10294: \$? = $ac_status" >&5
+ echo "$as_me:11608: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:10296: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:11610: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
else
- test -n "$verbose" && echo "$as_me:10300: result: ... no -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:11614: result: ... no -$cf_opt" >&5
echo "${ECHO_T}... no -$cf_opt" >&6
fi
done
CXXFLAGS="$cf_save_CXXFLAGS"
fi
-rm -f conftest*
+rm -rf conftest*
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -10333,10 +11647,10 @@ cat > conftest.i <<EOF
EOF
if test "$GCC" = yes
then
- { echo "$as_me:10336: checking for $CC __attribute__ directives..." >&5
+ { echo "$as_me:11650: checking for $CC __attribute__ directives..." >&5
echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > conftest.$ac_ext <<EOF
-#line 10339 "${as_me-configure}"
+#line 11653 "${as_me:-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -10355,6 +11669,8 @@ 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
+ cf_printf_attribute=no
+ cf_scanf_attribute=no
for cf_attribute in scanf printf unused noreturn
do
@@ -10362,26 +11678,59 @@ cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFG
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&5
- case $cf_attribute in
- scanf|printf)
- cat >conftest.h <<EOF
+
+ case $cf_attribute in #(vi
+ printf) #(vi
+ cf_printf_attribute=yes
+ cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
;;
- *)
- cat >conftest.h <<EOF
+ scanf) #(vi
+ cf_scanf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ *) #(vi
+ cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE $cf_directive
EOF
;;
esac
- if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
+
+ if { (eval echo "$as_me:11702: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10380: \$? = $ac_status" >&5
+ echo "$as_me:11705: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:10382: result: ... $cf_attribute" >&5
+ test -n "$verbose" && echo "$as_me:11707: result: ... $cf_attribute" >&5
echo "${ECHO_T}... $cf_attribute" >&6
cat conftest.h >>confdefs.h
+ case $cf_attribute in #(vi
+ printf) #(vi
+ if test "$cf_printf_attribute" = no ; then
+ cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+EOF
+ else
+ cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+EOF
+ fi
+ ;;
+ scanf) #(vi
+ if test "$cf_scanf_attribute" = no ; then
+ cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) /* nothing */
+EOF
+ else
+ cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+EOF
+ fi
+ ;;
+ esac
fi
done
else
@@ -10391,7 +11740,7 @@ rm -rf conftest*
fi
### use option --enable-assertions to turn on generation of assertion code
-echo "$as_me:10394: checking if you want to enable runtime assertions" >&5
+echo "$as_me:11743: 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.
@@ -10401,7 +11750,7 @@ if test "${enable_assertions+set}" = set; then
else
with_assertions=no
fi;
-echo "$as_me:10404: result: $with_assertions" >&5
+echo "$as_me:11753: result: $with_assertions" >&5
echo "${ECHO_T}$with_assertions" >&6
if test -n "$GCC"
then
@@ -10413,13 +11762,15 @@ EOF
CPPFLAGS="$CPPFLAGS -DNDEBUG"
else
- ADAFLAGS="$ADAFLAGS -gnata"
+
+ ADAFLAGS="$ADAFLAGS -gnata"
+
fi
fi
### use option --disable-leaks to suppress "permanent" leaks, for testing
-echo "$as_me:10422: checking if you want to use dmalloc for testing" >&5
+echo "$as_me:11773: checking if you want to use dmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
# Check whether --with-dmalloc or --without-dmalloc was given.
@@ -10435,7 +11786,7 @@ EOF
else
with_dmalloc=
fi;
-echo "$as_me:10438: result: ${with_dmalloc:-no}" >&5
+echo "$as_me:11789: result: ${with_dmalloc:-no}" >&5
echo "${ECHO_T}${with_dmalloc:-no}" >&6
case .$with_cflags in #(vi
@@ -10461,8 +11812,8 @@ no)
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
+ && 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"
@@ -10477,6 +11828,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -10492,8 +11853,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -10505,7 +11866,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -10519,23 +11880,23 @@ fi
esac
if test "$with_dmalloc" = yes ; then
- echo "$as_me:10522: checking for dmalloc.h" >&5
+ echo "$as_me:11883: 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 10528 "configure"
+#line 11889 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
-if { (eval echo "$as_me:10532: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11893: \"$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:10538: \$? = $ac_status" >&5
+ echo "$as_me:11899: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -10554,11 +11915,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:10557: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:11918: 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:10561: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:11922: 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
@@ -10566,7 +11927,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10569 "configure"
+#line 11930 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10585,16 +11946,16 @@ dmalloc_debug ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11949: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10591: \$? = $ac_status" >&5
+ echo "$as_me:11952: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10594: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11955: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10597: \$? = $ac_status" >&5
+ echo "$as_me:11958: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dmalloc_dmalloc_debug=yes
else
@@ -10605,7 +11966,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10608: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:11969: 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
@@ -10620,7 +11981,7 @@ fi
fi
-echo "$as_me:10623: checking if you want to use dbmalloc for testing" >&5
+echo "$as_me:11984: checking if you want to use dbmalloc for testing" >&5
echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
# Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -10636,7 +11997,7 @@ EOF
else
with_dbmalloc=
fi;
-echo "$as_me:10639: result: ${with_dbmalloc:-no}" >&5
+echo "$as_me:12000: result: ${with_dbmalloc:-no}" >&5
echo "${ECHO_T}${with_dbmalloc:-no}" >&6
case .$with_cflags in #(vi
@@ -10662,8 +12023,8 @@ no)
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
+ && 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"
@@ -10678,6 +12039,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -10693,8 +12064,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -10706,7 +12077,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -10720,23 +12091,23 @@ fi
esac
if test "$with_dbmalloc" = yes ; then
- echo "$as_me:10723: checking for dbmalloc.h" >&5
+ echo "$as_me:12094: 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 10729 "configure"
+#line 12100 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
-if { (eval echo "$as_me:10733: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12104: \"$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:10739: \$? = $ac_status" >&5
+ echo "$as_me:12110: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -10755,11 +12126,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:10758: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:12129: 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:10762: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:12133: 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
@@ -10767,7 +12138,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldbmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10770 "configure"
+#line 12141 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10786,16 +12157,16 @@ debug_malloc ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10789: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12160: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10792: \$? = $ac_status" >&5
+ echo "$as_me:12163: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10795: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12166: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10798: \$? = $ac_status" >&5
+ echo "$as_me:12169: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dbmalloc_debug_malloc=yes
else
@@ -10806,7 +12177,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10809: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:12180: 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
@@ -10821,7 +12192,7 @@ fi
fi
-echo "$as_me:10824: checking if you want to use valgrind for testing" >&5
+echo "$as_me:12195: checking if you want to use valgrind for testing" >&5
echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
# Check whether --with-valgrind or --without-valgrind was given.
@@ -10837,7 +12208,7 @@ EOF
else
with_valgrind=
fi;
-echo "$as_me:10840: result: ${with_valgrind:-no}" >&5
+echo "$as_me:12211: result: ${with_valgrind:-no}" >&5
echo "${ECHO_T}${with_valgrind:-no}" >&6
case .$with_cflags in #(vi
@@ -10863,8 +12234,8 @@ no)
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
+ && 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"
@@ -10879,6 +12250,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -10894,8 +12275,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -10907,7 +12288,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -10920,17 +12301,17 @@ fi
;;
esac
-echo "$as_me:10923: checking if you want to perform memory-leak testing" >&5
+echo "$as_me:12304: checking if you want to perform memory-leak testing" >&5
echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
# Check whether --enable-leaks or --disable-leaks was given.
if test "${enable_leaks+set}" = set; then
enableval="$enable_leaks"
- with_no_leaks=yes
+ if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
else
: ${with_no_leaks:=no}
fi;
-echo "$as_me:10933: result: $with_no_leaks" >&5
+echo "$as_me:12314: result: $with_no_leaks" >&5
echo "${ECHO_T}$with_no_leaks" >&6
if test "$with_no_leaks" = yes ; then
@@ -10938,6 +12319,10 @@ if test "$with_no_leaks" = yes ; then
#define NO_LEAKS 1
EOF
+ cat >>confdefs.h <<\EOF
+#define YY_NO_LEAKS 1
+EOF
+
fi
cat >>confdefs.h <<\EOF
@@ -10975,7 +12360,7 @@ case "$CFLAGS $CPPFLAGS" in
;;
esac
-echo "$as_me:10978: checking whether to add trace feature to all models" >&5
+echo "$as_me:12363: 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.
@@ -10985,7 +12370,7 @@ if test "${with_trace+set}" = set; then
else
cf_with_trace=$cf_all_traces
fi;
-echo "$as_me:10988: result: $cf_with_trace" >&5
+echo "$as_me:12373: result: $cf_with_trace" >&5
echo "${ECHO_T}$cf_with_trace" >&6
if test "$cf_with_trace" = yes ; then
@@ -11008,8 +12393,8 @@ no)
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
+ && 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"
@@ -11024,6 +12409,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -11039,8 +12434,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -11052,7 +12447,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -11066,13 +12461,17 @@ else
fi
### Checks for libraries.
-echo "$as_me:11069: checking for gettimeofday" >&5
+case $cf_cv_system_name in #(vi
+*mingw32*) #(vi
+ ;;
+*)
+echo "$as_me:12468: 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 11075 "configure"
+#line 12474 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gettimeofday (); below. */
@@ -11103,16 +12502,16 @@ f = gettimeofday;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11106: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12505: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11109: \$? = $ac_status" >&5
+ echo "$as_me:12508: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11112: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12511: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11115: \$? = $ac_status" >&5
+ echo "$as_me:12514: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gettimeofday=yes
else
@@ -11122,7 +12521,7 @@ ac_cv_func_gettimeofday=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11125: result: $ac_cv_func_gettimeofday" >&5
+echo "$as_me:12524: 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
@@ -11131,7 +12530,7 @@ EOF
else
-echo "$as_me:11134: checking for gettimeofday in -lbsd" >&5
+echo "$as_me:12533: 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
@@ -11139,7 +12538,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11142 "configure"
+#line 12541 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11158,16 +12557,16 @@ gettimeofday ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11164: \$? = $ac_status" >&5
+ echo "$as_me:12563: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11167: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12566: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11170: \$? = $ac_status" >&5
+ echo "$as_me:12569: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_bsd_gettimeofday=yes
else
@@ -11178,26 +12577,28 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11181: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "$as_me:12580: 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"
+ LIBS="-lbsd $LIBS"
fi
fi
+ ;;
+esac
-echo "$as_me:11193: checking if -lm needed for math functions" >&5
+echo "$as_me:12594: 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 11200 "configure"
+#line 12601 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -11212,16 +12613,16 @@ double x = rand(); printf("result = %g\n", sin(x))
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11215: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12616: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11218: \$? = $ac_status" >&5
+ echo "$as_me:12619: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11221: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12622: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11224: \$? = $ac_status" >&5
+ echo "$as_me:12625: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_libm=no
else
@@ -11231,7 +12632,7 @@ cf_cv_need_libm=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11234: result: $cf_cv_need_libm" >&5
+echo "$as_me:12635: result: $cf_cv_need_libm" >&5
echo "${ECHO_T}$cf_cv_need_libm" >&6
if test "$cf_cv_need_libm" = yes
then
@@ -11239,13 +12640,13 @@ MATH_LIB=-lm
fi
### Checks for header files.
-echo "$as_me:11242: checking for ANSI C header files" >&5
+echo "$as_me:12643: 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 11248 "configure"
+#line 12649 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -11253,13 +12654,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:11256: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12657: \"$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:11262: \$? = $ac_status" >&5
+ echo "$as_me:12663: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -11281,7 +12682,7 @@ 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 11284 "configure"
+#line 12685 "configure"
#include "confdefs.h"
#include <string.h>
@@ -11292,14 +12693,14 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -rf 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 11302 "configure"
+#line 12703 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -11310,7 +12711,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -rf conftest*
fi
@@ -11320,7 +12721,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11323 "configure"
+#line 12724 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -11346,15 +12747,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12750: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11352: \$? = $ac_status" >&5
+ echo "$as_me:12753: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:11354: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12755: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11357: \$? = $ac_status" >&5
+ echo "$as_me:12758: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11367,7 +12768,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:11370: result: $ac_cv_header_stdc" >&5
+echo "$as_me:12771: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -11380,13 +12781,13 @@ 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:11383: checking for $ac_hdr that defines DIR" >&5
+echo "$as_me:12784: 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 11389 "configure"
+#line 12790 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -11401,16 +12802,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12805: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11407: \$? = $ac_status" >&5
+ echo "$as_me:12808: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11410: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12811: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11413: \$? = $ac_status" >&5
+ echo "$as_me:12814: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -11420,7 +12821,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:11423: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12824: 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
@@ -11433,7 +12834,7 @@ 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:11436: checking for opendir in -ldir" >&5
+ echo "$as_me:12837: 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
@@ -11441,7 +12842,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11444 "configure"
+#line 12845 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11460,16 +12861,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11463: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12864: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11466: \$? = $ac_status" >&5
+ echo "$as_me:12867: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11469: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12870: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11472: \$? = $ac_status" >&5
+ echo "$as_me:12873: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dir_opendir=yes
else
@@ -11480,14 +12881,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11483: result: $ac_cv_lib_dir_opendir" >&5
+echo "$as_me:12884: 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:11490: checking for opendir in -lx" >&5
+ echo "$as_me:12891: 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
@@ -11495,7 +12896,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lx $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11498 "configure"
+#line 12899 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11514,16 +12915,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11517: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11520: \$? = $ac_status" >&5
+ echo "$as_me:12921: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11523: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12924: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11526: \$? = $ac_status" >&5
+ echo "$as_me:12927: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_x_opendir=yes
else
@@ -11534,7 +12935,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11537: result: $ac_cv_lib_x_opendir" >&5
+echo "$as_me:12938: 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"
@@ -11542,13 +12943,13 @@ fi
fi
-echo "$as_me:11545: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:12946: 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 11551 "configure"
+#line 12952 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -11564,16 +12965,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12968: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11570: \$? = $ac_status" >&5
+ echo "$as_me:12971: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11573: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12974: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11576: \$? = $ac_status" >&5
+ echo "$as_me:12977: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_time=yes
else
@@ -11583,7 +12984,7 @@ ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:11586: result: $ac_cv_header_time" >&5
+echo "$as_me:12987: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
@@ -11593,90 +12994,287 @@ EOF
fi
-echo "$as_me:11596: 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
+cf_regex_func=no
+
+cf_regex_libs="regex re"
+case $host_os in #(vi
+mingw*)
+ cf_regex_libs="regex.dll $cf_regex_libs"
+ ;;
+esac
+
+echo "$as_me:13006: checking for regcomp" >&5
+echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
+if test "${ac_cv_func_regcomp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-cat >conftest.$ac_ext <<_ACEOF
-#line 11603 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13012 "configure"
#include "confdefs.h"
-#include <sys/types.h>
-#include <regex.h>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char regcomp (); 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 regcomp ();
+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_regcomp) || defined (__stub___regcomp)
+choke me
+#else
+f = regcomp;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13043: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13046: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13049: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13052: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_regcomp=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_regcomp=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:13062: result: $ac_cv_func_regcomp" >&5
+echo "${ECHO_T}$ac_cv_func_regcomp" >&6
+if test $ac_cv_func_regcomp = yes; then
+ cf_regex_func=regcomp
+else
- regex_t *p;
- int x = regcomp(p, "", 0);
- int y = regexec(p, "", 0, 0, 0);
- regfree(p);
+ for cf_regex_lib in $cf_regex_libs
+ do
+ as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
+echo "$as_me:13071: checking for regcomp in -l$cf_regex_lib" >&5
+echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$cf_regex_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 13079 "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 regcomp ();
+int
+main ()
+{
+regcomp ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13098: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11624: \$? = $ac_status" >&5
+ echo "$as_me:13101: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11627: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13104: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11630: \$? = $ac_status" >&5
+ echo "$as_me:13107: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_regex="regex.h"
+ eval "$as_ac_Lib=yes"
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:13118: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
- cat >conftest.$ac_ext <<_ACEOF
-#line 11638 "configure"
+ LIBS="-l$cf_regex_lib $LIBS"
+ cf_regex_func=regcomp
+ break
+fi
+
+ done
+
+fi
+
+if test "$cf_regex_func" = no ; then
+ echo "$as_me:13132: checking for compile" >&5
+echo $ECHO_N "checking for compile... $ECHO_C" >&6
+if test "${ac_cv_func_compile+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13138 "configure"
#include "confdefs.h"
-#include <regexp.h>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char compile (); 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 compile ();
+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_compile) || defined (__stub___compile)
+choke me
+#else
+f = compile;
+#endif
- char *p = compile("", "", "", 0);
- int x = step("", "");
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13169: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13172: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13175: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13178: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_compile=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_compile=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:13188: result: $ac_cv_func_compile" >&5
+echo "${ECHO_T}$ac_cv_func_compile" >&6
+if test $ac_cv_func_compile = yes; then
+ cf_regex_func=compile
+else
+
+ echo "$as_me:13194: checking for compile in -lgen" >&5
+echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
+if test "${ac_cv_lib_gen_compile+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 13202 "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 compile ();
+int
+main ()
+{
+compile ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11653: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13221: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11656: \$? = $ac_status" >&5
+ echo "$as_me:13224: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11659: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13227: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11662: \$? = $ac_status" >&5
+ echo "$as_me:13230: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_regex="regexp.h"
+ ac_cv_lib_gen_compile=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
+ac_cv_lib_gen_compile=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:13241: result: $ac_cv_lib_gen_compile" >&5
+echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
+if test $ac_cv_lib_gen_compile = yes; then
+
+ LIBS="-lgen $LIBS"
+ cf_regex_func=compile
+fi
+
+fi
- cf_save_LIBS="$LIBS"
- LIBS="-lgen $LIBS"
+fi
+
+if test "$cf_regex_func" = no ; then
+ { echo "$as_me:13254: WARNING: cannot find regular expression library" >&5
+echo "$as_me: WARNING: cannot find regular expression library" >&2;}
+fi
+
+echo "$as_me:13258: checking for regular-expression headers" >&5
+echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
+if test "${cf_cv_regex_hdrs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_regex_hdrs=no
+case $cf_regex_func in #(vi
+compile) #(vi
+ for cf_regex_hdr in regexp.h regexpr.h
+ do
cat >conftest.$ac_ext <<_ACEOF
-#line 11672 "configure"
+#line 13270 "configure"
#include "confdefs.h"
-#include <regexpr.h>
+#include <$cf_regex_hdr>
int
main ()
{
- char *p = compile("", "", "");
+ char *p = compile("", "", "", 0);
int x = step("", "");
;
@@ -11684,43 +13282,90 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11687: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13285: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11690: \$? = $ac_status" >&5
+ echo "$as_me:13288: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11693: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13291: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11696: \$? = $ac_status" >&5
+ echo "$as_me:13294: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_regex="regexpr.h"
+
+ cf_cv_regex_hdrs=$cf_regex_hdr
+ break
+
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
+ done
+ ;;
+*)
+ for cf_regex_hdr in regex.h
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13311 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$cf_regex_hdr>
+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:13329: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13332: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13335: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13338: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_regex_hdrs=$cf_regex_hdr
+ break
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+ ;;
+esac
fi
+echo "$as_me:13354: result: $cf_cv_regex_hdrs" >&5
+echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
-echo "$as_me:11712: result: $cf_cv_regex" >&5
-echo "${ECHO_T}$cf_cv_regex" >&6
-case $cf_cv_regex in
- regex.h) cat >>confdefs.h <<\EOF
+case $cf_cv_regex_hdrs in #(vi
+ no) { echo "$as_me:13358: WARNING: no regular expression header found" >&5
+echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
+ regex.h) cat >>confdefs.h <<\EOF
#define HAVE_REGEX_H_FUNCS 1
EOF
- ;;
- regexp.h) cat >>confdefs.h <<\EOF
+ ;; #(vi
+ regexp.h) cat >>confdefs.h <<\EOF
#define HAVE_REGEXP_H_FUNCS 1
EOF
- ;;
- regexpr.h) cat >>confdefs.h <<\EOF
+ ;; #(vi
+ regexpr.h) cat >>confdefs.h <<\EOF
#define HAVE_REGEXPR_H_FUNCS 1
EOF
;;
@@ -11731,6 +13376,7 @@ fcntl.h \
getopt.h \
limits.h \
locale.h \
+math.h \
poll.h \
sys/bsdtypes.h \
sys/ioctl.h \
@@ -11745,23 +13391,23 @@ wctype.h \
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:11748: checking for $ac_header" >&5
+echo "$as_me:13394: 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 11754 "configure"
+#line 13400 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:11758: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:13404: \"$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:11764: \$? = $ac_status" >&5
+ echo "$as_me:13410: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -11780,7 +13426,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:11783: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:13429: 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
@@ -11794,7 +13440,7 @@ done
# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
if test "$ISC" = yes ; then
-echo "$as_me:11797: checking for main in -lcposix" >&5
+echo "$as_me:13443: 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
@@ -11802,7 +13448,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcposix $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11805 "configure"
+#line 13451 "configure"
#include "confdefs.h"
int
@@ -11814,16 +13460,16 @@ main ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11817: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13463: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11820: \$? = $ac_status" >&5
+ echo "$as_me:13466: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11823: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13469: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11826: \$? = $ac_status" >&5
+ echo "$as_me:13472: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_cposix_main=yes
else
@@ -11834,7 +13480,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11837: result: $ac_cv_lib_cposix_main" >&5
+echo "$as_me:13483: 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
@@ -11845,7 +13491,7 @@ EOF
fi
- echo "$as_me:11848: checking for bzero in -linet" >&5
+ echo "$as_me:13494: 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
@@ -11853,7 +13499,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-linet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11856 "configure"
+#line 13502 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11872,16 +13518,16 @@ bzero ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13521: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11878: \$? = $ac_status" >&5
+ echo "$as_me:13524: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11881: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13527: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11884: \$? = $ac_status" >&5
+ echo "$as_me:13530: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_inet_bzero=yes
else
@@ -11892,21 +13538,21 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11895: result: $ac_cv_lib_inet_bzero" >&5
+echo "$as_me:13541: 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"
+ LIBS="-linet $LIBS"
fi
fi
-echo "$as_me:11902: checking if sys/time.h works with sys/select.h" >&5
+echo "$as_me:13548: 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 11909 "configure"
+#line 13555 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -11926,16 +13572,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11929: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13575: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11932: \$? = $ac_status" >&5
+ echo "$as_me:13578: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11935: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13581: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11938: \$? = $ac_status" >&5
+ echo "$as_me:13584: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_sys_time_select=yes
else
@@ -11947,7 +13593,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:11950: result: $cf_cv_sys_time_select" >&5
+echo "$as_me:13596: 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
@@ -11961,7 +13607,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
-echo "$as_me:11964: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:13610: 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
@@ -11969,7 +13615,7 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line 11972 "configure"
+#line 13618 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -12018,16 +13664,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12021: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13667: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12024: \$? = $ac_status" >&5
+ echo "$as_me:13670: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12027: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13673: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12030: \$? = $ac_status" >&5
+ echo "$as_me:13676: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
@@ -12044,21 +13690,21 @@ fi
case "x$ac_cv_prog_cc_stdc" in
x|xno)
- echo "$as_me:12047: result: none needed" >&5
+ echo "$as_me:13693: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
*)
- echo "$as_me:12050: result: $ac_cv_prog_cc_stdc" >&5
+ echo "$as_me:13696: 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:12055: checking for an ANSI C-conforming const" >&5
+echo "$as_me:13701: 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 12061 "configure"
+#line 13707 "configure"
#include "confdefs.h"
int
@@ -12116,16 +13762,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12119: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13765: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12122: \$? = $ac_status" >&5
+ echo "$as_me:13768: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12125: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13771: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12128: \$? = $ac_status" >&5
+ echo "$as_me:13774: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_const=yes
else
@@ -12135,7 +13781,7 @@ ac_cv_c_const=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12138: result: $ac_cv_c_const" >&5
+echo "$as_me:13784: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
@@ -12145,7 +13791,7 @@ EOF
fi
-echo "$as_me:12148: checking for inline" >&5
+echo "$as_me:13794: 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
@@ -12153,7 +13799,7 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
-#line 12156 "configure"
+#line 13802 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
@@ -12162,16 +13808,16 @@ $ac_kw int foo () {return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12165: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13811: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12168: \$? = $ac_status" >&5
+ echo "$as_me:13814: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12171: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13817: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12174: \$? = $ac_status" >&5
+ echo "$as_me:13820: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
@@ -12182,7 +13828,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:12185: result: $ac_cv_c_inline" >&5
+echo "$as_me:13831: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
inline | yes) ;;
@@ -12205,8 +13851,8 @@ if test "$ac_cv_c_inline" != no ; then
:
elif test "$GCC" = yes
then
- echo "$as_me:12208: checking if gcc supports options to tune inlining" >&5
-echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
+ echo "$as_me:13854: checking if $CC supports options to tune inlining" >&5
+echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
if test "${cf_cv_gcc_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -12214,7 +13860,7 @@ else
cf_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
cat >conftest.$ac_ext <<_ACEOF
-#line 12217 "configure"
+#line 13863 "configure"
#include "confdefs.h"
inline int foo(void) { return 1; }
int
@@ -12226,16 +13872,16 @@ ${cf_cv_main_return:-return} foo()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13875: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12232: \$? = $ac_status" >&5
+ echo "$as_me:13878: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12235: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13881: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12238: \$? = $ac_status" >&5
+ echo "$as_me:13884: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gcc_inline=yes
else
@@ -12247,7 +13893,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS=$cf_save_CFLAGS
fi
-echo "$as_me:12250: result: $cf_cv_gcc_inline" >&5
+echo "$as_me:13896: result: $cf_cv_gcc_inline" >&5
echo "${ECHO_T}$cf_cv_gcc_inline" >&6
if test "$cf_cv_gcc_inline" = yes ; then
@@ -12267,8 +13913,8 @@ no)
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
+ && 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"
@@ -12283,6 +13929,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -12298,8 +13954,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -12311,7 +13967,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -12323,7 +13979,7 @@ fi
fi
fi
-echo "$as_me:12326: checking for signal global datatype" >&5
+echo "$as_me:13982: checking for signal global datatype" >&5
echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
if test "${cf_cv_sig_atomic_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12335,7 +13991,7 @@ else
"int"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12338 "configure"
+#line 13994 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -12358,16 +14014,16 @@ signal(SIGINT, handler);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12361: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12364: \$? = $ac_status" >&5
+ echo "$as_me:14020: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12367: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14023: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12370: \$? = $ac_status" >&5
+ echo "$as_me:14026: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_sig_atomic_t=$cf_type
else
@@ -12381,7 +14037,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12384: result: $cf_cv_sig_atomic_t" >&5
+echo "$as_me:14040: result: $cf_cv_sig_atomic_t" >&5
echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
@@ -12389,7 +14045,7 @@ EOF
if test $NCURSES_CHTYPE = auto ; then
-echo "$as_me:12392: checking for type of chtype" >&5
+echo "$as_me:14048: 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
@@ -12399,7 +14055,7 @@ else
cf_cv_typeof_chtype=long
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12402 "configure"
+#line 14058 "configure"
#include "confdefs.h"
#define WANT_BITS 31
@@ -12434,15 +14090,15 @@ int main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12437: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12440: \$? = $ac_status" >&5
+ echo "$as_me:14096: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12442: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14098: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12445: \$? = $ac_status" >&5
+ echo "$as_me:14101: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_typeof_chtype=`cat cf_test.out`
else
@@ -12457,7 +14113,7 @@ fi
fi
-echo "$as_me:12460: result: $cf_cv_typeof_chtype" >&5
+echo "$as_me:14116: result: $cf_cv_typeof_chtype" >&5
echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
cat >>confdefs.h <<EOF
@@ -12469,14 +14125,14 @@ else
fi
test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
-echo "$as_me:12472: checking if unsigned literals are legal" >&5
+echo "$as_me:14128: 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 12479 "configure"
+#line 14135 "configure"
#include "confdefs.h"
int
@@ -12488,16 +14144,16 @@ long x = 1L + 1UL + 1U + 1
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12491: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14147: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12494: \$? = $ac_status" >&5
+ echo "$as_me:14150: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12497: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14153: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12500: \$? = $ac_status" >&5
+ echo "$as_me:14156: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_unsigned_literals=yes
else
@@ -12509,7 +14165,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12512: result: $cf_cv_unsigned_literals" >&5
+echo "$as_me:14168: result: $cf_cv_unsigned_literals" >&5
echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
cf_cv_1UL="1"
@@ -12525,14 +14181,14 @@ test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
### Checks for external-data
-echo "$as_me:12528: checking if external errno is declared" >&5
+echo "$as_me:14184: 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 12535 "configure"
+#line 14191 "configure"
#include "confdefs.h"
#ifdef HAVE_STDLIB_H
@@ -12550,16 +14206,16 @@ int x = (int) errno
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14209: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12556: \$? = $ac_status" >&5
+ echo "$as_me:14212: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12559: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14215: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12562: \$? = $ac_status" >&5
+ echo "$as_me:14218: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_dcl_errno=yes
else
@@ -12570,7 +14226,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12573: result: $cf_cv_dcl_errno" >&5
+echo "$as_me:14229: result: $cf_cv_dcl_errno" >&5
echo "${ECHO_T}$cf_cv_dcl_errno" >&6
if test "$cf_cv_dcl_errno" = no ; then
@@ -12585,14 +14241,14 @@ fi
# It's possible (for near-UNIX clones) that the data doesn't exist
-echo "$as_me:12588: checking if external errno exists" >&5
+echo "$as_me:14244: 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 12595 "configure"
+#line 14251 "configure"
#include "confdefs.h"
#undef errno
@@ -12607,16 +14263,16 @@ errno = 2
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14266: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12613: \$? = $ac_status" >&5
+ echo "$as_me:14269: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12616: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14272: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12619: \$? = $ac_status" >&5
+ echo "$as_me:14275: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_have_errno=yes
else
@@ -12627,7 +14283,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12630: result: $cf_cv_have_errno" >&5
+echo "$as_me:14286: result: $cf_cv_have_errno" >&5
echo "${ECHO_T}$cf_cv_have_errno" >&6
if test "$cf_cv_have_errno" = yes ; then
@@ -12640,7 +14296,7 @@ EOF
fi
-echo "$as_me:12643: checking if data-only library module links" >&5
+echo "$as_me:14299: 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
@@ -12648,20 +14304,20 @@ else
rm -f conftest.a
cat >conftest.$ac_ext <<EOF
-#line 12651 "configure"
+#line 14307 "configure"
int testdata[3] = { 123, 456, 789 };
EOF
- if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:14310: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12657: \$? = $ac_status" >&5
+ echo "$as_me:14313: \$? = $ac_status" >&5
(exit $ac_status); } ; then
mv conftest.o data.o && \
- ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
+ ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
fi
rm -f conftest.$ac_ext data.o
cat >conftest.$ac_ext <<EOF
-#line 12664 "configure"
+#line 14320 "configure"
int testfunc()
{
#if defined(NeXT)
@@ -12674,13 +14330,13 @@ int testfunc()
#endif
}
EOF
- if { (eval echo "$as_me:12677: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:14333: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12680: \$? = $ac_status" >&5
+ echo "$as_me:14336: \$? = $ac_status" >&5
(exit $ac_status); }; then
mv conftest.o func.o && \
- ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
+ ( $AR $ARFLAGS 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
@@ -12690,7 +14346,7 @@ EOF
cf_cv_link_dataonly=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12693 "configure"
+#line 14349 "configure"
#include "confdefs.h"
int main()
@@ -12701,15 +14357,15 @@ else
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12704: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14360: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12707: \$? = $ac_status" >&5
+ echo "$as_me:14363: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12709: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14365: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12712: \$? = $ac_status" >&5
+ echo "$as_me:14368: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_link_dataonly=yes
else
@@ -12724,7 +14380,7 @@ fi
fi
-echo "$as_me:12727: result: $cf_cv_link_dataonly" >&5
+echo "$as_me:14383: result: $cf_cv_link_dataonly" >&5
echo "${ECHO_T}$cf_cv_link_dataonly" >&6
if test "$cf_cv_link_dataonly" = no ; then
@@ -12759,13 +14415,13 @@ vsnprintf \
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:12762: checking for $ac_func" >&5
+echo "$as_me:14418: 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 12768 "configure"
+#line 14424 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -12796,16 +14452,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12799: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14455: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12802: \$? = $ac_status" >&5
+ echo "$as_me:14458: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12805: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14461: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12808: \$? = $ac_status" >&5
+ echo "$as_me:14464: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -12815,7 +14471,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12818: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:14474: 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
@@ -12827,14 +14483,14 @@ done
if test "$with_getcap" = "yes" ; then
-echo "$as_me:12830: checking for terminal-capability database functions" >&5
+echo "$as_me:14486: 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 12837 "configure"
+#line 14493 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -12854,16 +14510,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12857: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14513: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12860: \$? = $ac_status" >&5
+ echo "$as_me:14516: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12863: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14519: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12866: \$? = $ac_status" >&5
+ echo "$as_me:14522: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_cgetent=yes
else
@@ -12875,7 +14531,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12878: result: $cf_cv_cgetent" >&5
+echo "$as_me:14534: 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
@@ -12883,14 +14539,14 @@ EOF
fi
-echo "$as_me:12886: checking for isascii" >&5
+echo "$as_me:14542: 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 12893 "configure"
+#line 14549 "configure"
#include "confdefs.h"
#include <ctype.h>
int
@@ -12902,16 +14558,16 @@ int x = isascii(' ')
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14561: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12908: \$? = $ac_status" >&5
+ echo "$as_me:14564: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12911: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14567: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12914: \$? = $ac_status" >&5
+ echo "$as_me:14570: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_have_isascii=yes
else
@@ -12922,17 +14578,17 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12925: result: $cf_cv_have_isascii" >&5
+echo "$as_me:14581: 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:12932: checking whether sigaction needs _POSIX_SOURCE" >&5
+echo "$as_me:14588: 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 12935 "configure"
+#line 14591 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -12946,16 +14602,16 @@ struct sigaction act
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12949: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14605: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12952: \$? = $ac_status" >&5
+ echo "$as_me:14608: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12955: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14611: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12958: \$? = $ac_status" >&5
+ echo "$as_me:14614: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
sigact_bad=no
else
@@ -12963,7 +14619,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 12966 "configure"
+#line 14622 "configure"
#include "confdefs.h"
#define _POSIX_SOURCE
@@ -12978,16 +14634,16 @@ struct sigaction act
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14637: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12984: \$? = $ac_status" >&5
+ echo "$as_me:14640: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12987: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14643: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12990: \$? = $ac_status" >&5
+ echo "$as_me:14646: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
sigact_bad=yes
cat >>confdefs.h <<\EOF
@@ -13002,11 +14658,11 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:13005: result: $sigact_bad" >&5
+echo "$as_me:14661: result: $sigact_bad" >&5
echo "${ECHO_T}$sigact_bad" >&6
fi
-echo "$as_me:13009: checking if nanosleep really works" >&5
+echo "$as_me:14665: checking if nanosleep really works" >&5
echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
if test "${cf_cv_func_nanosleep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13016,7 +14672,7 @@ if test "$cross_compiling" = yes; then
cf_cv_func_nanosleep=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13019 "configure"
+#line 14675 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -13041,15 +14697,15 @@ int main() {
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14700: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13047: \$? = $ac_status" >&5
+ echo "$as_me:14703: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13049: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14705: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13052: \$? = $ac_status" >&5
+ echo "$as_me:14708: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_nanosleep=yes
else
@@ -13061,7 +14717,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:13064: result: $cf_cv_func_nanosleep" >&5
+echo "$as_me:14720: result: $cf_cv_func_nanosleep" >&5
echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
@@ -13075,23 +14731,23 @@ unistd.h \
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13078: checking for $ac_header" >&5
+echo "$as_me:14734: 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 13084 "configure"
+#line 14740 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13088: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:14744: \"$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:13094: \$? = $ac_status" >&5
+ echo "$as_me:14750: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13110,7 +14766,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13113: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:14769: 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
@@ -13125,23 +14781,23 @@ 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:13128: checking for $ac_header" >&5
+echo "$as_me:14784: 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 13134 "configure"
+#line 14790 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:13138: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:14794: \"$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:13144: \$? = $ac_status" >&5
+ echo "$as_me:14800: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13160,7 +14816,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:13163: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:14819: 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
@@ -13178,10 +14834,10 @@ if test "$ac_cv_header_termios_h" = yes ; then
*) termios_bad=maybe ;;
esac
if test "$termios_bad" = maybe ; then
- echo "$as_me:13181: checking whether termios.h needs _POSIX_SOURCE" >&5
+ echo "$as_me:14837: 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 13184 "configure"
+#line 14840 "configure"
#include "confdefs.h"
#include <termios.h>
int
@@ -13193,16 +14849,16 @@ struct termios foo; int x = foo.c_iflag
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14852: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13199: \$? = $ac_status" >&5
+ echo "$as_me:14855: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13202: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14858: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13205: \$? = $ac_status" >&5
+ echo "$as_me:14861: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
termios_bad=no
else
@@ -13210,7 +14866,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13213 "configure"
+#line 14869 "configure"
#include "confdefs.h"
#define _POSIX_SOURCE
@@ -13224,16 +14880,16 @@ struct termios foo; int x = foo.c_iflag
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13227: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14883: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13230: \$? = $ac_status" >&5
+ echo "$as_me:14886: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13233: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14889: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13236: \$? = $ac_status" >&5
+ echo "$as_me:14892: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
termios_bad=unknown
else
@@ -13248,19 +14904,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:13251: result: $termios_bad" >&5
+ echo "$as_me:14907: result: $termios_bad" >&5
echo "${ECHO_T}$termios_bad" >&6
fi
fi
-echo "$as_me:13256: checking for tcgetattr" >&5
+echo "$as_me:14912: 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 13263 "configure"
+#line 14919 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -13288,16 +14944,16 @@ tcgetattr(1, &foo);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13291: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14947: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13294: \$? = $ac_status" >&5
+ echo "$as_me:14950: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13297: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14953: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13300: \$? = $ac_status" >&5
+ echo "$as_me:14956: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_have_tcgetattr=yes
else
@@ -13307,20 +14963,20 @@ cf_cv_have_tcgetattr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13310: result: $cf_cv_have_tcgetattr" >&5
+echo "$as_me:14966: 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:13316: checking for vsscanf function or workaround" >&5
+echo "$as_me:14972: 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 13323 "configure"
+#line 14979 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -13336,16 +14992,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14995: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13342: \$? = $ac_status" >&5
+ echo "$as_me:14998: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13345: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15001: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13348: \$? = $ac_status" >&5
+ echo "$as_me:15004: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_vsscanf=vsscanf
else
@@ -13353,7 +15009,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13356 "configure"
+#line 15012 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -13375,16 +15031,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13378: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15034: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13381: \$? = $ac_status" >&5
+ echo "$as_me:15037: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13384: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15040: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13387: \$? = $ac_status" >&5
+ echo "$as_me:15043: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_vsscanf=vfscanf
else
@@ -13392,7 +15048,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13395 "configure"
+#line 15051 "configure"
#include "confdefs.h"
#include <stdarg.h>
@@ -13414,16 +15070,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13417: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15073: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13420: \$? = $ac_status" >&5
+ echo "$as_me:15076: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13423: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15079: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13426: \$? = $ac_status" >&5
+ echo "$as_me:15082: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_vsscanf=_doscan
else
@@ -13438,7 +15094,7 @@ 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:13441: result: $cf_cv_func_vsscanf" >&5
+echo "$as_me:15097: result: $cf_cv_func_vsscanf" >&5
echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
case $cf_cv_func_vsscanf in #(vi
@@ -13456,21 +15112,21 @@ EOF
;;
esac
-echo "$as_me:13459: checking for working mkstemp" >&5
+echo "$as_me:15115: 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*
+rm -rf conftest*
if test "$cross_compiling" = yes; then
- echo "$as_me:13467: checking for mkstemp" >&5
+ echo "$as_me:15123: 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 13473 "configure"
+#line 15129 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mkstemp (); below. */
@@ -13501,16 +15157,16 @@ f = mkstemp;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13504: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13507: \$? = $ac_status" >&5
+ echo "$as_me:15163: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13510: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15166: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13513: \$? = $ac_status" >&5
+ echo "$as_me:15169: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_mkstemp=yes
else
@@ -13520,12 +15176,12 @@ ac_cv_func_mkstemp=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13523: result: $ac_cv_func_mkstemp" >&5
+echo "$as_me:15179: result: $ac_cv_func_mkstemp" >&5
echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13528 "configure"
+#line 15184 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -13563,15 +15219,15 @@ int main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15222: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13569: \$? = $ac_status" >&5
+ echo "$as_me:15225: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13571: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15227: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13574: \$? = $ac_status" >&5
+ echo "$as_me:15230: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_mkstemp=yes
@@ -13586,9 +15242,9 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:13589: result: $cf_cv_func_mkstemp" >&5
+echo "$as_me:15245: result: $cf_cv_func_mkstemp" >&5
echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
-if test "$cf_cv_func_mkstemp" = yes ; then
+if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
cat >>confdefs.h <<\EOF
#define HAVE_MKSTEMP 1
EOF
@@ -13604,21 +15260,21 @@ else
fi
if test "$cross_compiling" = yes ; then
- { echo "$as_me:13607: WARNING: cross compiling: assume setvbuf params not reversed" >&5
+ { echo "$as_me:15263: 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:13610: checking whether setvbuf arguments are reversed" >&5
+ echo "$as_me:15266: 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:13616: error: cannot run test program while cross compiling" >&5
+ { { echo "$as_me:15272: 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 13621 "configure"
+#line 15277 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
@@ -13635,15 +15291,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15294: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13641: \$? = $ac_status" >&5
+ echo "$as_me:15297: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13643: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15299: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13646: \$? = $ac_status" >&5
+ echo "$as_me:15302: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_setvbuf_reversed=yes
else
@@ -13656,7 +15312,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core core.* *.core
fi
-echo "$as_me:13659: result: $ac_cv_func_setvbuf_reversed" >&5
+echo "$as_me:15315: 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
@@ -13667,13 +15323,13 @@ EOF
fi
fi
-echo "$as_me:13670: checking return type of signal handlers" >&5
+echo "$as_me:15326: 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 13676 "configure"
+#line 15332 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -13695,16 +15351,16 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13698: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15354: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13701: \$? = $ac_status" >&5
+ echo "$as_me:15357: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13704: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15360: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13707: \$? = $ac_status" >&5
+ echo "$as_me:15363: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_signal=void
else
@@ -13714,21 +15370,21 @@ ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13717: result: $ac_cv_type_signal" >&5
+echo "$as_me:15373: 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:13724: checking for type sigaction_t" >&5
+echo "$as_me:15380: 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 13731 "configure"
+#line 15387 "configure"
#include "confdefs.h"
#include <signal.h>
@@ -13741,16 +15397,16 @@ sigaction_t x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15400: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13747: \$? = $ac_status" >&5
+ echo "$as_me:15403: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13750: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15406: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13753: \$? = $ac_status" >&5
+ echo "$as_me:15409: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_sigaction=yes
else
@@ -13761,13 +15417,13 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13764: result: $cf_cv_type_sigaction" >&5
+echo "$as_me:15420: 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:13770: checking declaration of size-change" >&5
+echo "$as_me:15426: 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
@@ -13782,7 +15438,7 @@ do
CPPFLAGS="$cf_save_CPPFLAGS"
test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
cat >conftest.$ac_ext <<_ACEOF
-#line 13785 "configure"
+#line 15441 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TERMIOS_H
@@ -13826,16 +15482,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13829: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:15485: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13832: \$? = $ac_status" >&5
+ echo "$as_me:15488: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13835: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15491: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13838: \$? = $ac_status" >&5
+ echo "$as_me:15494: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_sizechange=yes
else
@@ -13854,7 +15510,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:13857: result: $cf_cv_sizechange" >&5
+echo "$as_me:15513: result: $cf_cv_sizechange" >&5
echo "${ECHO_T}$cf_cv_sizechange" >&6
if test "$cf_cv_sizechange" != no ; then
cat >>confdefs.h <<\EOF
@@ -13871,13 +15527,13 @@ EOF
esac
fi
-echo "$as_me:13874: checking for memmove" >&5
+echo "$as_me:15530: 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 13880 "configure"
+#line 15536 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char memmove (); below. */
@@ -13908,16 +15564,16 @@ f = memmove;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15567: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13914: \$? = $ac_status" >&5
+ echo "$as_me:15570: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13917: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15573: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13920: \$? = $ac_status" >&5
+ echo "$as_me:15576: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_memmove=yes
else
@@ -13927,19 +15583,19 @@ ac_cv_func_memmove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13930: result: $ac_cv_func_memmove" >&5
+echo "$as_me:15586: 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:13936: checking for bcopy" >&5
+echo "$as_me:15592: 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 13942 "configure"
+#line 15598 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char bcopy (); below. */
@@ -13970,16 +15626,16 @@ f = bcopy;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15629: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13976: \$? = $ac_status" >&5
+ echo "$as_me:15632: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13979: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15635: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13982: \$? = $ac_status" >&5
+ echo "$as_me:15638: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_bcopy=yes
else
@@ -13989,11 +15645,11 @@ ac_cv_func_bcopy=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13992: result: $ac_cv_func_bcopy" >&5
+echo "$as_me:15648: 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:13996: checking if bcopy does overlapping moves" >&5
+ echo "$as_me:15652: 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
@@ -14003,7 +15659,7 @@ else
cf_cv_good_bcopy=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14006 "configure"
+#line 15662 "configure"
#include "confdefs.h"
int main() {
@@ -14017,15 +15673,15 @@ int main() {
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15676: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14023: \$? = $ac_status" >&5
+ echo "$as_me:15679: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14025: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15681: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14028: \$? = $ac_status" >&5
+ echo "$as_me:15684: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_good_bcopy=yes
else
@@ -14038,7 +15694,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14041: result: $cf_cv_good_bcopy" >&5
+echo "$as_me:15697: result: $cf_cv_good_bcopy" >&5
echo "${ECHO_T}$cf_cv_good_bcopy" >&6
else
@@ -14059,7 +15715,7 @@ EOF
fi
-echo "$as_me:14062: checking if poll really works" >&5
+echo "$as_me:15718: 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
@@ -14069,7 +15725,7 @@ if test "$cross_compiling" = yes; then
cf_cv_working_poll=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14072 "configure"
+#line 15728 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -14090,15 +15746,15 @@ int main() {
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15749: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14096: \$? = $ac_status" >&5
+ echo "$as_me:15752: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14098: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15754: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14101: \$? = $ac_status" >&5
+ echo "$as_me:15757: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_working_poll=yes
else
@@ -14110,15 +15766,505 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:14113: result: $cf_cv_working_poll" >&5
+echo "$as_me:15769: 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
+echo "$as_me:15775: checking for va_copy" >&5
+echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
+if test "${cf_cv_have_va_copy+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 15782 "configure"
+#include "confdefs.h"
+
+#include <stdarg.h>
+
+int
+main ()
+{
+
+ static va_list dst;
+ static va_list src;
+ va_copy(dst, src)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15799: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15802: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15805: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15808: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_have_va_copy=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_have_va_copy=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:15818: result: $cf_cv_have_va_copy" >&5
+echo "${ECHO_T}$cf_cv_have_va_copy" >&6
+
+test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
+#define HAVE_VA_COPY 1
+EOF
+
+echo "$as_me:15825: checking for __va_copy" >&5
+echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
+if test "${cf_cv_have___va_copy+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 15832 "configure"
+#include "confdefs.h"
+
+#include <stdarg.h>
+
+int
+main ()
+{
+
+ static va_list dst;
+ static va_list src;
+ __va_copy(dst, src)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15849: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15852: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15855: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15858: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_have___va_copy=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_have___va_copy=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:15868: result: $cf_cv_have___va_copy" >&5
+echo "${ECHO_T}$cf_cv_have___va_copy" >&6
+
+test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
+#define HAVE___VA_COPY 1
+EOF
+
+echo "$as_me:15875: checking for pid_t" >&5
+echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
+if test "${ac_cv_type_pid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15881 "configure"
+#include "confdefs.h"
+$ac_includes_default
+int
+main ()
+{
+if ((pid_t *) 0)
+ return 0;
+if (sizeof (pid_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15896: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15899: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15902: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15905: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_pid_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_pid_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:15915: result: $ac_cv_type_pid_t" >&5
+echo "${ECHO_T}$ac_cv_type_pid_t" >&6
+if test $ac_cv_type_pid_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<EOF
+#define pid_t int
+EOF
+
+fi
+
+for ac_header in unistd.h vfork.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:15930: 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 15936 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:15940: \"$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:15946: \$? = $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:15965: 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
+
+for ac_func in fork vfork
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:15978: 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 15984 "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:16015: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16018: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:16021: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16024: \$? = $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:16034: 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
+
+ac_cv_func_fork_works=$ac_cv_func_fork
+if test "x$ac_cv_func_fork" = xyes; then
+ echo "$as_me:16046: checking for working fork" >&5
+echo $ECHO_N "checking for working fork... $ECHO_C" >&6
+if test "${ac_cv_func_fork_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_fork_works=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* By Rüdiger Kuhlmann. */
+ #include <sys/types.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+ /* Some systems only have a dummy stub for fork() */
+ int main ()
+ {
+ if (fork() < 0)
+ $ac_main_return (1);
+ $ac_main_return (0);
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:16069: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16072: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:16074: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16077: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_fork_works=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_fork_works=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:16089: result: $ac_cv_func_fork_works" >&5
+echo "${ECHO_T}$ac_cv_func_fork_works" >&6
+
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp*)
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ { echo "$as_me:16103: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
+echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ echo "$as_me:16108: checking for working vfork" >&5
+echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
+if test "${ac_cv_func_vfork_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_vfork_works=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16117 "configure"
+#include "confdefs.h"
+/* Thanks to Paul Eggert for this test. */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#if HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+ argument registers are propagated back to the parent. The compiler
+ is told about this with #include <vfork.h>, but some compilers
+ (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
+ static variable whose address is put into a register that is
+ clobbered by the vfork. */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+ static pid_t child;
+ if (!child) {
+ child = vfork ();
+ if (child < 0) {
+ perror ("vfork");
+ _exit(2);
+ }
+ if (!child) {
+ arg = getpid();
+ write(-1, "", 0);
+ _exit (arg);
+ }
+ }
+}
+
+int
+main ()
+{
+ pid_t parent = getpid ();
+ pid_t child;
+
+ sparc_address_test ();
+
+ child = vfork ();
+
+ if (child == 0) {
+ /* Here is another test for sparc vfork register problems. This
+ test uses lots of local variables, at least as many local
+ variables as main has allocated so far including compiler
+ temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
+ 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
+ reuse the register of parent for one of the local variables,
+ since it will think that parent can't possibly be used any more
+ in this routine. Assigning to the local variable will thus
+ munge parent in the parent process. */
+ pid_t
+ p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+ p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+ /* Convince the compiler that p..p7 are live; otherwise, it might
+ use the same hardware register for all 8 local variables. */
+ if (p != p1 || p != p2 || p != p3 || p != p4
+ || p != p5 || p != p6 || p != p7)
+ _exit(1);
+
+ /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+ from child file descriptors. If the child closes a descriptor
+ before it execs or exits, this munges the parent's descriptor
+ as well. Test for this by closing stdout in the child. */
+ _exit(close(fileno(stdout)) != 0);
+ } else {
+ int status;
+ struct stat st;
+
+ while (wait(&status) != child)
+ ;
+ $ac_main_return(
+ /* Was there some problem with vforking? */
+ child < 0
+
+ /* Did the child fail? (This shouldn't happen.) */
+ || status
+
+ /* Did the vfork/compiler bug occur? */
+ || parent != getpid()
+
+ /* Did the file descriptor bug occur? */
+ || fstat(fileno(stdout), &st) != 0
+ );
+ }
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:16214: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16217: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:16219: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16222: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_vfork_works=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_vfork_works=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:16234: result: $ac_cv_func_vfork_works" >&5
+echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=ac_cv_func_vfork
+ { echo "$as_me:16240: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
+echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_WORKING_VFORK 1
+EOF
+
+else
+
+cat >>confdefs.h <<\EOF
+#define vfork fork
+EOF
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_WORKING_FORK 1
+EOF
+
+fi
+
# special check for test/ditto.c
-echo "$as_me:14121: checking for openpty in -lutil" >&5
+echo "$as_me:16267: checking for openpty in -lutil" >&5
echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
if test "${ac_cv_lib_util_openpty+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14126,7 +16272,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lutil $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 14129 "configure"
+#line 16275 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -14145,16 +16291,16 @@ openpty ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14148: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16294: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14151: \$? = $ac_status" >&5
+ echo "$as_me:16297: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14154: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16300: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14157: \$? = $ac_status" >&5
+ echo "$as_me:16303: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_util_openpty=yes
else
@@ -14165,7 +16311,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:14168: result: $ac_cv_lib_util_openpty" >&5
+echo "$as_me:16314: result: $ac_cv_lib_util_openpty" >&5
echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
if test $ac_cv_lib_util_openpty = yes; then
cf_cv_lib_util=yes
@@ -14173,7 +16319,7 @@ else
cf_cv_lib_util=no
fi
-echo "$as_me:14176: checking for openpty header" >&5
+echo "$as_me:16322: checking for openpty header" >&5
echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
if test "${cf_cv_func_openpty+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14184,7 +16330,7 @@ else
for cf_header in pty.h libutil.h util.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14187 "configure"
+#line 16333 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -14201,16 +16347,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16350: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14207: \$? = $ac_status" >&5
+ echo "$as_me:16353: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14210: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16356: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14213: \$? = $ac_status" >&5
+ echo "$as_me:16359: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_openpty=$cf_header
@@ -14228,7 +16374,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$cf_save_LIBS"
fi
-echo "$as_me:14231: result: $cf_cv_func_openpty" >&5
+echo "$as_me:16377: result: $cf_cv_func_openpty" >&5
echo "${ECHO_T}$cf_cv_func_openpty" >&6
if test "$cf_cv_func_openpty" != no ; then
@@ -14274,13 +16420,13 @@ if test -n "$with_hashed_db/include" ; then
fi
if test "$cf_have_incdir" = no ; then
- if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 14283 "configure"
+#line 16429 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -14292,16 +16438,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14295: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16441: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14298: \$? = $ac_status" >&5
+ echo "$as_me:16444: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14301: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16447: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14304: \$? = $ac_status" >&5
+ echo "$as_me:16450: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -14318,13 +16464,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me-configure}:14321: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:16467: testing adding $cf_add_incdir to include-path ..." 1>&5
- CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
- cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
- test "$cf_top_incdir" = "$cf_add_incdir" && break
- cf_add_incdir="$cf_top_incdir"
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
else
break
fi
@@ -14352,7 +16498,7 @@ if test -n "$with_hashed_db/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me-configure}:14355: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:16501: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -14363,23 +16509,23 @@ fi
fi
esac
-echo "$as_me:14366: checking for db.h" >&5
+echo "$as_me:16512: checking for db.h" >&5
echo $ECHO_N "checking for db.h... $ECHO_C" >&6
if test "${ac_cv_header_db_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14372 "configure"
+#line 16518 "configure"
#include "confdefs.h"
#include <db.h>
_ACEOF
-if { (eval echo "$as_me:14376: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:16522: \"$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:14382: \$? = $ac_status" >&5
+ echo "$as_me:16528: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -14398,11 +16544,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:14401: result: $ac_cv_header_db_h" >&5
+echo "$as_me:16547: result: $ac_cv_header_db_h" >&5
echo "${ECHO_T}$ac_cv_header_db_h" >&6
if test $ac_cv_header_db_h = yes; then
-echo "$as_me:14405: checking for version of db" >&5
+echo "$as_me:16551: checking for version of db" >&5
echo $ECHO_N "checking for version of db... $ECHO_C" >&6
if test "${cf_cv_hashed_db_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14413,10 +16559,10 @@ cf_cv_hashed_db_version=unknown
for cf_db_version in 1 2 3 4 5
do
-echo "${as_me-configure}:14416: testing checking for db version $cf_db_version ..." 1>&5
+echo "${as_me:-configure}:16562: testing checking for db version $cf_db_version ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14419 "configure"
+#line 16565 "configure"
#include "confdefs.h"
$ac_includes_default
@@ -14446,16 +16592,16 @@ DBT *foo = 0
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14449: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16595: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14452: \$? = $ac_status" >&5
+ echo "$as_me:16598: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14455: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16601: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14458: \$? = $ac_status" >&5
+ echo "$as_me:16604: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_hashed_db_version=$cf_db_version
@@ -14469,16 +16615,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:14472: result: $cf_cv_hashed_db_version" >&5
+echo "$as_me:16618: result: $cf_cv_hashed_db_version" >&5
echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
if test "$cf_cv_hashed_db_version" = unknown ; then
- { { echo "$as_me:14476: error: Cannot determine version of db" >&5
+ { { echo "$as_me:16622: error: Cannot determine version of db" >&5
echo "$as_me: error: Cannot determine version of db" >&2;}
{ (exit 1); exit 1; }; }
else
-echo "$as_me:14481: checking for db libraries" >&5
+echo "$as_me:16627: checking for db libraries" >&5
echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
if test "${cf_cv_hashed_db_libs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14492,10 +16638,10 @@ do
LIBS="-l$cf_db_libs $LIBS"
fi
-echo "${as_me-configure}:14495: testing checking for library "$cf_db_libs" ..." 1>&5
+echo "${as_me:-configure}:16641: testing checking for library "$cf_db_libs" ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14498 "configure"
+#line 16644 "configure"
#include "confdefs.h"
$ac_includes_default
@@ -14550,16 +16696,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16699: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14556: \$? = $ac_status" >&5
+ echo "$as_me:16702: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14559: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16705: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14562: \$? = $ac_status" >&5
+ echo "$as_me:16708: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if test -n "$cf_db_libs" ; then
@@ -14579,11 +16725,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
fi
-echo "$as_me:14582: result: $cf_cv_hashed_db_libs" >&5
+echo "$as_me:16728: result: $cf_cv_hashed_db_libs" >&5
echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
if test "$cf_cv_hashed_db_libs" = unknown ; then
- { { echo "$as_me:14586: error: Cannot determine library for db" >&5
+ { { echo "$as_me:16732: error: Cannot determine library for db" >&5
echo "$as_me: error: Cannot determine library for db" >&2;}
{ (exit 1); exit 1; }; }
elif test "$cf_cv_hashed_db_libs" != default ; then
@@ -14593,7 +16739,7 @@ fi
else
- { { echo "$as_me:14596: error: Cannot find db.h" >&5
+ { { echo "$as_me:16742: error: Cannot find db.h" >&5
echo "$as_me: error: Cannot find db.h" >&2;}
{ (exit 1); exit 1; }; }
@@ -14608,7 +16754,7 @@ fi
# Just in case, check if the C compiler has a bool type.
-echo "$as_me:14611: checking if we should include stdbool.h" >&5
+echo "$as_me:16757: 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
@@ -14616,7 +16762,7 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14619 "configure"
+#line 16765 "configure"
#include "confdefs.h"
int
@@ -14628,23 +16774,23 @@ bool foo = false
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14631: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16777: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14634: \$? = $ac_status" >&5
+ echo "$as_me:16780: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14637: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16783: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14640: \$? = $ac_status" >&5
+ echo "$as_me:16786: \$? = $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 14647 "configure"
+#line 16793 "configure"
#include "confdefs.h"
#ifndef __BEOS__
@@ -14660,16 +16806,16 @@ bool foo = false
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14666: \$? = $ac_status" >&5
+ echo "$as_me:16812: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14669: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16815: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14672: \$? = $ac_status" >&5
+ echo "$as_me:16818: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_header_stdbool_h=1
else
@@ -14683,13 +16829,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test "$cf_cv_header_stdbool_h" = 1
-then echo "$as_me:14686: result: yes" >&5
+then echo "$as_me:16832: result: yes" >&5
echo "${ECHO_T}yes" >&6
-else echo "$as_me:14688: result: no" >&5
+else echo "$as_me:16834: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:14692: checking for builtin bool type" >&5
+echo "$as_me:16838: 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
@@ -14697,7 +16843,7 @@ if test "${cf_cv_cc_bool_type+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14700 "configure"
+#line 16846 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -14712,16 +16858,16 @@ bool x = false
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16861: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14718: \$? = $ac_status" >&5
+ echo "$as_me:16864: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14721: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16867: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14724: \$? = $ac_status" >&5
+ echo "$as_me:16870: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_cc_bool_type=1
else
@@ -14734,9 +16880,9 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test "$cf_cv_cc_bool_type" = 1
-then echo "$as_me:14737: result: yes" >&5
+then echo "$as_me:16883: result: yes" >&5
echo "${ECHO_T}yes" >&6
-else echo "$as_me:14739: result: no" >&5
+else echo "$as_me:16885: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -14758,16 +16904,16 @@ os2*) #(vi
cf_stdcpp_libname=stdc++
;;
esac
-echo "$as_me:14761: checking for library $cf_stdcpp_libname" >&5
+echo "$as_me:16907: 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"
+ LIBS="-l$cf_stdcpp_libname $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 14770 "configure"
+#line 16916 "configure"
#include "confdefs.h"
#include <strstream.h>
@@ -14783,16 +16929,16 @@ strstreambuf foo(buf, sizeof(buf))
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16932: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14789: \$? = $ac_status" >&5
+ echo "$as_me:16935: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14792: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16938: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14795: \$? = $ac_status" >&5
+ echo "$as_me:16941: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_libstdcpp=yes
else
@@ -14804,12 +16950,12 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$cf_save"
fi
-echo "$as_me:14807: result: $cf_cv_libstdcpp" >&5
+echo "$as_me:16953: result: $cf_cv_libstdcpp" >&5
echo "${ECHO_T}$cf_cv_libstdcpp" >&6
-test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
+test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
fi
- echo "$as_me:14812: checking whether $CXX understands -c and -o together" >&5
+ echo "$as_me:16958: 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
@@ -14825,29 +16971,29 @@ 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:14828: \"$ac_try\"") >&5
+if { (eval echo "$as_me:16974: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14831: \$? = $ac_status" >&5
+ echo "$as_me:16977: \$? = $ac_status" >&5
(exit $ac_status); } &&
- test -f conftest2.$ac_objext && { (eval echo "$as_me:14833: \"$ac_try\"") >&5
+ test -f conftest2.$ac_objext && { (eval echo "$as_me:16979: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14836: \$? = $ac_status" >&5
+ echo "$as_me:16982: \$? = $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*
+rm -rf conftest*
fi
if test $cf_cv_prog_CXX_c_o = yes; then
- echo "$as_me:14847: result: yes" >&5
+ echo "$as_me:16993: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:14850: result: no" >&5
+ echo "$as_me:16996: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -14867,12 +17013,12 @@ os2*) #(vi
;;
esac
if test "$GXX" = yes; then
- echo "$as_me:14870: checking for lib$cf_gpp_libname" >&5
+ echo "$as_me:17016: 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"
+ LIBS="-l$cf_gpp_libname $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 14875 "configure"
+#line 17021 "configure"
#include "confdefs.h"
#include <$cf_gpp_libname/builtin.h>
@@ -14886,19 +17032,19 @@ two_arg_error_handler_t foo2 = lib_error_handler
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14889: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17035: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14892: \$? = $ac_status" >&5
+ echo "$as_me:17038: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14895: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17041: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14898: \$? = $ac_status" >&5
+ echo "$as_me:17044: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cxx_library=yes
- CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
if test "$cf_gpp_libname" = cpp ; then
cat >>confdefs.h <<\EOF
#define HAVE_GPP_BUILTIN_H 1
@@ -14914,7 +17060,7 @@ else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14917 "configure"
+#line 17063 "configure"
#include "confdefs.h"
#include <builtin.h>
@@ -14928,19 +17074,19 @@ two_arg_error_handler_t foo2 = lib_error_handler
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17077: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14934: \$? = $ac_status" >&5
+ echo "$as_me:17080: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14937: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17083: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14940: \$? = $ac_status" >&5
+ echo "$as_me:17086: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cxx_library=yes
- CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
+ CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
cat >>confdefs.h <<\EOF
#define HAVE_BUILTIN_H 1
EOF
@@ -14954,7 +17100,7 @@ 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:14957: result: $cf_cxx_library" >&5
+ echo "$as_me:17103: result: $cf_cxx_library" >&5
echo "${ECHO_T}$cf_cxx_library" >&6
fi
@@ -14970,7 +17116,7 @@ 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_main_return=return
-echo "$as_me:14973: checking how to run the C++ preprocessor" >&5
+echo "$as_me:17119: 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
@@ -14987,18 +17133,18 @@ do
# 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 14990 "configure"
+#line 17136 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:14995: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:17141: \"$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:15001: \$? = $ac_status" >&5
+ echo "$as_me:17147: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -15021,17 +17167,17 @@ 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 15024 "configure"
+#line 17170 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:15028: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:17174: \"$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:15034: \$? = $ac_status" >&5
+ echo "$as_me:17180: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -15068,7 +17214,7 @@ fi
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
-echo "$as_me:15071: result: $CXXCPP" >&5
+echo "$as_me:17217: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
@@ -15078,18 +17224,18 @@ do
# 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 15081 "configure"
+#line 17227 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:15086: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:17232: \"$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:15092: \$? = $ac_status" >&5
+ echo "$as_me:17238: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -15112,17 +17258,17 @@ 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 15115 "configure"
+#line 17261 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:15119: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:17265: \"$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:15125: \$? = $ac_status" >&5
+ echo "$as_me:17271: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -15150,7 +17296,7 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:15153: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
+ { { echo "$as_me:17299: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -15165,23 +17311,23 @@ ac_main_return=return
for ac_header in iostream typeinfo
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:15168: checking for $ac_header" >&5
+echo "$as_me:17314: 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 15174 "configure"
+#line 17320 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:17324: \"$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:15184: \$? = $ac_status" >&5
+ echo "$as_me:17330: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
@@ -15200,7 +17346,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:17349: 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
@@ -15211,10 +17357,10 @@ fi
done
if test x"$ac_cv_header_iostream" = xyes ; then
- echo "$as_me:15214: checking if iostream uses std-namespace" >&5
+ echo "$as_me:17360: checking if iostream uses std-namespace" >&5
echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 15217 "configure"
+#line 17363 "configure"
#include "confdefs.h"
#include <iostream>
@@ -15231,16 +17377,16 @@ cerr << "testing" << endl;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15234: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17380: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15237: \$? = $ac_status" >&5
+ echo "$as_me:17383: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15240: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17386: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15243: \$? = $ac_status" >&5
+ echo "$as_me:17389: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_iostream_namespace=yes
else
@@ -15249,7 +17395,7 @@ cat conftest.$ac_ext >&5
cf_iostream_namespace=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:15252: result: $cf_iostream_namespace" >&5
+ echo "$as_me:17398: result: $cf_iostream_namespace" >&5
echo "${ECHO_T}$cf_iostream_namespace" >&6
if test "$cf_iostream_namespace" = yes ; then
cat >>confdefs.h <<\EOF
@@ -15259,7 +17405,7 @@ EOF
fi
fi
-echo "$as_me:15262: checking if we should include stdbool.h" >&5
+echo "$as_me:17408: 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
@@ -15267,7 +17413,7 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15270 "configure"
+#line 17416 "configure"
#include "confdefs.h"
int
@@ -15279,23 +17425,23 @@ bool foo = false
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17428: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15285: \$? = $ac_status" >&5
+ echo "$as_me:17431: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15288: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17434: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15291: \$? = $ac_status" >&5
+ echo "$as_me:17437: \$? = $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 15298 "configure"
+#line 17444 "configure"
#include "confdefs.h"
#ifndef __BEOS__
@@ -15311,16 +17457,16 @@ bool foo = false
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17460: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15317: \$? = $ac_status" >&5
+ echo "$as_me:17463: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15320: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17466: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15323: \$? = $ac_status" >&5
+ echo "$as_me:17469: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_header_stdbool_h=1
else
@@ -15334,13 +17480,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test "$cf_cv_header_stdbool_h" = 1
-then echo "$as_me:15337: result: yes" >&5
+then echo "$as_me:17483: result: yes" >&5
echo "${ECHO_T}yes" >&6
-else echo "$as_me:15339: result: no" >&5
+else echo "$as_me:17485: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:15343: checking for builtin bool type" >&5
+echo "$as_me:17489: 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
@@ -15348,7 +17494,7 @@ if test "${cf_cv_builtin_bool+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15351 "configure"
+#line 17497 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -15363,16 +17509,16 @@ bool x = false
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17512: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15369: \$? = $ac_status" >&5
+ echo "$as_me:17515: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15372: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17518: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15375: \$? = $ac_status" >&5
+ echo "$as_me:17521: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_builtin_bool=1
else
@@ -15385,13 +17531,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
if test "$cf_cv_builtin_bool" = 1
-then echo "$as_me:15388: result: yes" >&5
+then echo "$as_me:17534: result: yes" >&5
echo "${ECHO_T}yes" >&6
-else echo "$as_me:15390: result: no" >&5
+else echo "$as_me:17536: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:15394: checking for size of bool" >&5
+echo "$as_me:17540: 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
@@ -15402,7 +17548,7 @@ else
cf_cv_type_of_bool=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15405 "configure"
+#line 17551 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -15444,15 +17590,15 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17593: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15450: \$? = $ac_status" >&5
+ echo "$as_me:17596: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:15452: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17598: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15455: \$? = $ac_status" >&5
+ echo "$as_me:17601: \$? = $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
@@ -15470,18 +17616,18 @@ fi
fi
rm -f cf_test.out
-echo "$as_me:15473: result: $cf_cv_type_of_bool" >&5
+echo "$as_me:17619: 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:15479: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+ { echo "$as_me:17625: 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:15484: checking for special defines needed for etip.h" >&5
+echo "$as_me:17630: 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"
@@ -15493,7 +17639,7 @@ do
test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
cat >conftest.$ac_ext <<_ACEOF
-#line 15496 "configure"
+#line 17642 "configure"
#include "confdefs.h"
#include <etip.h.in>
@@ -15507,16 +17653,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15510: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17656: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15513: \$? = $ac_status" >&5
+ echo "$as_me:17659: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15516: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17662: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15519: \$? = $ac_status" >&5
+ echo "$as_me:17665: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$cf_math" && cat >>confdefs.h <<EOF
@@ -15537,12 +17683,12 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
done
-echo "$as_me:15540: result: $cf_result" >&5
+echo "$as_me:17686: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
CXXFLAGS="$cf_save_CXXFLAGS"
if test -n "$CXX"; then
-echo "$as_me:15545: checking if $CXX accepts parameter initialization" >&5
+echo "$as_me:17691: 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
@@ -15559,7 +17705,7 @@ ac_main_return=return
cf_cv_cpp_param_init=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15562 "configure"
+#line 17708 "configure"
#include "confdefs.h"
class TEST {
@@ -15578,15 +17724,15 @@ void main() { }
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17727: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15584: \$? = $ac_status" >&5
+ echo "$as_me:17730: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:15586: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17732: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15589: \$? = $ac_status" >&5
+ echo "$as_me:17735: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_cpp_param_init=yes
else
@@ -15605,7 +17751,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_main_return=return
fi
-echo "$as_me:15608: result: $cf_cv_cpp_param_init" >&5
+echo "$as_me:17754: 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
@@ -15614,7 +17760,7 @@ EOF
if test -n "$CXX"; then
-echo "$as_me:15617: checking if $CXX accepts static_cast" >&5
+echo "$as_me:17763: checking if $CXX accepts static_cast" >&5
echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
if test "${cf_cv_cpp_static_cast+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15628,7 +17774,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_main_return=return
cat >conftest.$ac_ext <<_ACEOF
-#line 15631 "configure"
+#line 17777 "configure"
#include "confdefs.h"
class NCursesPanel
@@ -15672,16 +17818,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15675: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17821: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15678: \$? = $ac_status" >&5
+ echo "$as_me:17824: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15681: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17827: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15684: \$? = $ac_status" >&5
+ echo "$as_me:17830: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_cpp_static_cast=yes
else
@@ -15699,7 +17845,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_main_return=return
fi
-echo "$as_me:15702: result: $cf_cv_cpp_static_cast" >&5
+echo "$as_me:17848: result: $cf_cv_cpp_static_cast" >&5
echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
fi
@@ -15709,12 +17855,12 @@ test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
EOF
CXX_AR='$(AR)'
- CXX_AR_OPTS='$(AR_OPTS)'
+ CXX_ARFLAGS='$(ARFLAGS)'
case $cf_cv_system_name in #(vi
irix*) #(vi
if test "$GXX" != yes ; then
CXX_AR='$(CXX)'
- CXX_AR_OPTS='-ar -o'
+ CXX_ARFLAGS='-ar -o'
fi
;;
sco3.2v5*) #(vi
@@ -15723,7 +17869,7 @@ EOF
solaris2*)
if test "$GXX" != yes ; then
CXX_AR='$(CXX)'
- CXX_AR_OPTS='-xar -o'
+ CXX_ARFLAGS='-xar -o'
fi
;;
esac
@@ -15747,7 +17893,7 @@ else
else
if test "$cf_cv_header_stdbool_h" = 1 ; then
-echo "$as_me:15750: checking for size of bool" >&5
+echo "$as_me:17896: 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
@@ -15758,7 +17904,7 @@ else
cf_cv_type_of_bool=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15761 "configure"
+#line 17907 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -15800,15 +17946,15 @@ main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17949: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15806: \$? = $ac_status" >&5
+ echo "$as_me:17952: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:15808: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17954: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15811: \$? = $ac_status" >&5
+ echo "$as_me:17957: \$? = $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
@@ -15826,25 +17972,25 @@ fi
fi
rm -f cf_test.out
-echo "$as_me:15829: result: $cf_cv_type_of_bool" >&5
+echo "$as_me:17975: 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:15835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
+ { echo "$as_me:17981: 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:15841: checking for fallback type of bool" >&5
+ echo "$as_me:17987: 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:15847: result: $cf_cv_type_of_bool" >&5
+ echo "$as_me:17993: result: $cf_cv_type_of_bool" >&5
echo "${ECHO_T}$cf_cv_type_of_bool" >&6
fi
fi
@@ -15871,19 +18017,20 @@ fi
if test -f "${srcdir}/Ada95/Makefile.in" ; then
-if test "$cf_with_ada" != "no" ; then
- if test "$with_libtool" != "no"; then
- { echo "$as_me:15876: WARNING: libtool does not support Ada - disabling feature" >&5
+ if test "$cf_with_ada" != "no" ; then
+ if test "$with_libtool" != "no"; then
+ { echo "$as_me:18022: WARNING: libtool does not support Ada - disabling feature" >&5
echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
- cf_with_ada=no
- fi
-fi
+ cf_with_ada=no
+ fi
+ fi
+
+ if test "$cf_with_ada" != "no" ; then
-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:15886: checking for $ac_word" >&5
+echo "$as_me:18033: 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
@@ -15898,7 +18045,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_gnat_exists="yes"
-echo "$as_me:15901: found $ac_dir/$ac_word" >&5
+echo "$as_me:18048: found $ac_dir/$ac_word" >&5
break
done
@@ -15907,10 +18054,10 @@ fi
fi
gnat_exists=$ac_cv_prog_gnat_exists
if test -n "$gnat_exists"; then
- echo "$as_me:15910: result: $gnat_exists" >&5
+ echo "$as_me:18057: result: $gnat_exists" >&5
echo "${ECHO_T}$gnat_exists" >&6
else
- echo "$as_me:15913: result: no" >&5
+ echo "$as_me:18060: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -15918,34 +18065,28 @@ if test "$ac_cv_prog_gnat_exists" = no; then
cf_ada_make=
else
-echo "$as_me:15921: checking for gnat version" >&5
+echo "$as_me:18068: 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:15925: result: $cf_gnat_version" >&5
+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:18073: 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=
- ;;
+case $cf_gnat_version in #(vi
+3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
+ cf_cv_prog_gnat_correct=yes
+ ;;
+*)
+ { echo "$as_me:18081: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
+echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
+ cf_cv_prog_gnat_correct=no
+ ;;
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:15948: checking for $ac_word" >&5
+echo "$as_me:18089: 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
@@ -15960,7 +18101,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_M4_exists="yes"
-echo "$as_me:15963: found $ac_dir/$ac_word" >&5
+echo "$as_me:18104: found $ac_dir/$ac_word" >&5
break
done
@@ -15969,10 +18110,10 @@ fi
fi
M4_exists=$ac_cv_prog_M4_exists
if test -n "$M4_exists"; then
- echo "$as_me:15972: result: $M4_exists" >&5
+ echo "$as_me:18113: result: $M4_exists" >&5
echo "${ECHO_T}$M4_exists" >&6
else
- echo "$as_me:15975: result: no" >&5
+ echo "$as_me:18116: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -15981,10 +18122,10 @@ fi
echo Ada95 binding required program m4 not found. Ada95 binding disabled.
fi
if test "$cf_cv_prog_gnat_correct" = yes; then
- echo "$as_me:15984: checking if GNAT works" >&5
+ echo "$as_me:18125: checking if GNAT works" >&5
echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
-rm -f conftest*
+rm -rf conftest* *~conftest*
cat >>conftest.ads <<CF_EOF
procedure conftest;
CF_EOF
@@ -16007,19 +18148,119 @@ if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
else
cf_cv_prog_gnat_correct=no
fi
-rm -f conftest*
+rm -rf conftest* *~conftest*
- echo "$as_me:16012: result: $cf_cv_prog_gnat_correct" >&5
+ echo "$as_me:18153: 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:16019: checking if GNAT pragma Unreferenced works" >&5
+ if test "$cf_cv_prog_gnat_correct" = yes; then
+
+ ADAFLAGS="$ADAFLAGS -gnatpn"
+
+ # make ADAFLAGS consistent with CFLAGS
+ case "$CFLAGS" in
+ *-g*)
+
+ ADAFLAGS="$ADAFLAGS -g"
+
+ ;;
+ esac
+ case "$CFLAGS" in
+ *-O*)
+
+ ADAFLAGS="$ADAFLAGS -O3"
+
+ ;;
+ esac
+
+echo "$as_me:18178: checking if GNAT supports generics" >&5
+echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
+case $cf_gnat_version in #(vi
+3.[1-9]*|[4-9].*) #(vi
+ cf_gnat_generics=yes
+ ;;
+*)
+ cf_gnat_generics=no
+ ;;
+esac
+echo "$as_me:18188: result: $cf_gnat_generics" >&5
+echo "${ECHO_T}$cf_gnat_generics" >&6
+
+if test "$cf_gnat_generics" = yes
+then
+ cf_compile_generics=generics
+ cf_generic_objects="\${GENOBJS}"
+else
+ cf_compile_generics=
+ cf_generic_objects=
+fi
+
+echo "$as_me:18200: checking if GNAT supports SIGINT" >&5
+echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
+if test "${cf_cv_gnat_sigint+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+rm -rf conftest* *~conftest*
+cat >>conftest.ads <<CF_EOF
+with Ada.Interrupts.Names;
+
+package ConfTest is
+
+ pragma Warnings (Off); -- the next pragma exists since 3.11p
+ pragma Unreserve_All_Interrupts;
+ pragma Warnings (On);
+
+ protected Process is
+ procedure Stop;
+ function Continue return Boolean;
+ pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
+ private
+ Done : Boolean := False;
+ end Process;
+
+end ConfTest;
+CF_EOF
+cat >>conftest.adb <<CF_EOF
+package body ConfTest is
+ protected body Process is
+ procedure Stop is
+ begin
+ Done := True;
+ end Stop;
+ function Continue return Boolean is
+ begin
+ return not Done;
+ end Continue;
+ end Process;
+end ConfTest;
+CF_EOF
+if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
+ cf_cv_gnat_sigint=yes
+else
+ cf_cv_gnat_sigint=no
+fi
+rm -rf conftest* *~conftest*
+
+fi
+echo "$as_me:18248: result: $cf_cv_gnat_sigint" >&5
+echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
+
+if test $cf_cv_gnat_sigint = yes ; then
+ USE_GNAT_SIGINT=""
+else
+ USE_GNAT_SIGINT="#"
+fi
+
+echo "$as_me:18257: checking if GNAT pragma Unreferenced works" >&5
echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
+if test "${cf_cv_pragma_unreferenced+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
-rm -f conftest*
+rm -rf conftest* *~conftest*
cat >>conftest.ads <<CF_EOF
procedure conftest;
CF_EOF
@@ -16041,17 +18282,119 @@ if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
else
cf_cv_pragma_unreferenced=no
fi
-rm -f conftest*
+rm -rf conftest* *~conftest*
- echo "$as_me:16046: result: $cf_cv_pragma_unreferenced" >&5
+fi
+echo "$as_me:18288: 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
+# 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
+
+cf_gnat_libraries=no
+cf_gnat_projects=no
+
+echo "$as_me:18301: checking if GNAT supports project files" >&5
+echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
+case $cf_gnat_version in #(vi
+3.[0-9]*) #(vi
+ ;;
+*)
+ case $cf_cv_system_name in #(vi
+ cygwin*) #(vi
+ ;;
+ *)
+ mkdir conftest.src conftest.bin conftest.lib
+ cd conftest.src
+ rm -rf conftest* *~conftest*
+ cat >>library.gpr <<CF_EOF
+project Library is
+ Kind := External ("LIB_KIND");
+ for Library_Name use "ConfTest";
+ for Object_Dir use ".";
+ for Library_ALI_Dir use External("LIBRARY_DIR");
+ for Library_Version use External ("SONAME");
+ for Library_Kind use Kind;
+ for Library_Dir use External("BUILD_DIR");
+ Source_Dir := External ("SOURCE_DIR");
+ for Source_Dirs use (Source_Dir);
+ package Compiler is
+ for Default_Switches ("Ada") use
+ ("-g",
+ "-O2",
+ "-gnatafno",
+ "-gnatVa", -- All validity checks
+ "-gnatwa"); -- Activate all optional errors
+ end Compiler;
+end Library;
+CF_EOF
+ cat >>confpackage.ads <<CF_EOF
+package ConfPackage is
+ procedure conftest;
+end ConfPackage;
+CF_EOF
+ cat >>confpackage.adb <<CF_EOF
+with Text_IO;
+package body ConfPackage is
+ procedure conftest is
+ begin
+ Text_IO.Put ("Hello World");
+ Text_IO.New_Line;
+ end conftest;
+end ConfPackage;
+CF_EOF
+ if ( $cf_ada_make $ADAFLAGS \
+ -Plibrary.gpr \
+ -XBUILD_DIR=`cd ../conftest.bin;pwd` \
+ -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
+ -XSOURCE_DIR=`pwd` \
+ -XSONAME=libConfTest.so.1 \
+ -XLIB_KIND=static 1>&5 2>&1 ) ; then
+ cf_gnat_projects=yes
+ fi
+ cd ..
+ if test -f conftest.lib/confpackage.ali
+ then
+ cf_gnat_libraries=yes
+ fi
+ rm -rf conftest* *~conftest*
+ ;;
+ esac
+ ;;
+esac
+echo "$as_me:18369: result: $cf_gnat_projects" >&5
+echo "${ECHO_T}$cf_gnat_projects" >&6
+
+if test $cf_gnat_projects = yes
+then
+ echo "$as_me:18374: checking if GNAT supports libraries" >&5
+echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
+ echo "$as_me:18376: result: $cf_gnat_libraries" >&5
+echo "${ECHO_T}$cf_gnat_libraries" >&6
+fi
+
+if test "$cf_gnat_projects" = yes
+then
+ USE_OLD_MAKERULES="#"
+ USE_GNAT_PROJECTS=""
+else
+ USE_OLD_MAKERULES=""
+ USE_GNAT_PROJECTS="#"
+fi
+
+if test "$cf_gnat_libraries" = yes
+then
+ USE_GNAT_LIBRARIES=""
+else
+ USE_GNAT_LIBRARIES="#"
+fi
+
+echo "$as_me:18396: checking for ada-compiler" >&5
+echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
# Check whether --with-ada-compiler or --without-ada-compiler was given.
if test "${with_ada_compiler+set}" = set; then
@@ -16061,15 +18404,21 @@ else
cf_ada_compiler=gnatmake
fi;
- cf_ada_package=terminal_interface
+echo "$as_me:18407: result: $cf_ada_compiler" >&5
+echo "${ECHO_T}$cf_ada_compiler" >&6
+
+ cf_ada_package=terminal_interface
+
+echo "$as_me:18412: checking for ada-include" >&5
+echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
# 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; if test -n "$prefix/lib/ada/adainclude" ; then
+ withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
+fi; if test -n "$prefix/share/ada/adainclude" ; then
if test "x$prefix" != xNONE; then
cf_path_syntax="$prefix"
@@ -16096,7 +18445,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:16099: error: expected a pathname, not \"$withval\"" >&5
+ { { echo "$as_me:18448: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -16105,12 +18454,18 @@ esac
fi
ADA_INCLUDE="$withval"
+echo "$as_me:18457: result: $ADA_INCLUDE" >&5
+echo "${ECHO_T}$ADA_INCLUDE" >&6
+
+echo "$as_me:18460: checking for ada-objects" >&5
+echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
+
# 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}"
+ withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
fi; if test -n "$prefix/lib/ada/adalib" ; then
if test "x$prefix" != xNONE; then
@@ -16138,7 +18493,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:16141: error: expected a pathname, not \"$withval\"" >&5
+ { { echo "$as_me:18496: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -16147,10 +18502,38 @@ esac
fi
ADA_OBJECTS="$withval"
+echo "$as_me:18505: result: $ADA_OBJECTS" >&5
+echo "${ECHO_T}$ADA_OBJECTS" >&6
+
+echo "$as_me:18508: checking if an Ada95 shared-library should be built" >&5
+echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
+
+# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
+if test "${with_ada_sharedlib+set}" = set; then
+ withval="$with_ada_sharedlib"
+ with_ada_sharedlib=$withval
+else
+ with_ada_sharedlib=no
+fi;
+echo "$as_me:18518: result: $with_ada_sharedlib" >&5
+echo "${ECHO_T}$with_ada_sharedlib" >&6
+
+ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
+MAKE_ADA_SHAREDLIB="#"
+
+if test "x$with_ada_sharedlib" != xno
+then
+ MAKE_ADA_SHAREDLIB=
+ if test "x$with_ada_sharedlib" != xyes
+ then
+ ADA_SHAREDLIB="$with_ada_sharedlib"
+ fi
fi
-fi
+
+ fi
+ fi
else
- cf_with_ada=no
+ cf_with_ada=no
fi
### Construct the ncurses library-subsets, if any, from this set of keywords:
@@ -16163,7 +18546,7 @@ fi
### chooses to split module lists into libraries.
###
### (see CF_LIB_RULES).
-echo "$as_me:16166: checking for library subsets" >&5
+echo "$as_me:18549: checking for library subsets" >&5
echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
LIB_SUBSETS=
@@ -16178,6 +18561,7 @@ fi
LIB_SUBSETS="${LIB_SUBSETS}termlib"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
+
if test "$with_termlib" != no ; then
LIB_SUBSETS="${LIB_SUBSETS} "
else
@@ -16185,17 +18569,32 @@ else
fi
LIB_SUBSETS="${LIB_SUBSETS}base"
+
+# Most term-driver calls are to tinfo, but some like init_pair are to the
+# base library (so it resides in base).
+if test "$with_term_driver" != no ; then
+ LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
+ case $cf_cv_system_name in #(vi
+ *mingw32*) #(vi
+ LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
+ ;;
+ *) #(vi
+ LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
+ ;;
+ esac
+fi
+
test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
-echo "$as_me:16191: result: $LIB_SUBSETS" >&5
+echo "$as_me:18590: result: $LIB_SUBSETS" >&5
echo "${ECHO_T}$LIB_SUBSETS" >&6
### Construct the list of include-directories to be generated
-CPPFLAGS="-I. -I../include $CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -I. -I../include"
if test "$srcdir" != "."; then
- CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
fi
if test "$GCC" != yes; then
CPPFLAGS="$CPPFLAGS -I\${includedir}"
@@ -16209,7 +18608,7 @@ elif test "$includedir" != "/usr/include"; then
fi
fi
-ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
+ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
if test "$srcdir" != "."; then
ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
fi
@@ -16226,7 +18625,7 @@ elif test "$includedir" != "/usr/include"; then
fi
### Build up pieces for makefile rules
-echo "$as_me:16229: checking default library suffix" >&5
+echo "$as_me:18628: checking default library suffix" >&5
echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
case $DFT_LWR_MODEL in
@@ -16237,46 +18636,50 @@ echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
shared) DFT_ARG_SUFFIX='' ;;
esac
test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
-echo "$as_me:16240: result: $DFT_ARG_SUFFIX" >&5
+echo "$as_me:18639: result: $DFT_ARG_SUFFIX" >&5
echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
-echo "$as_me:16243: checking default library-dependency suffix" >&5
+echo "$as_me:18642: checking default library-dependency suffix" >&5
echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
- case $DFT_LWR_MODEL in
- libtool)
+ case $DFT_LWR_MODEL in #(vi
+ libtool) #(vi
DFT_LIB_SUFFIX='.la'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- normal)
+ normal) #(vi
DFT_LIB_SUFFIX='.a'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- debug)
+ debug) #(vi
DFT_LIB_SUFFIX='_g.a'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- profile)
+ profile) #(vi
DFT_LIB_SUFFIX='_p.a'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- shared)
+ shared) #(vi
case $cf_cv_system_name in
- cygwin*)
+ aix[56]*) #(vi
+ DFT_LIB_SUFFIX='.a'
+ DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
+ ;;
+ cygwin*) #(vi
DFT_LIB_SUFFIX='.dll'
DFT_DEP_SUFFIX='.dll.a'
;;
- darwin*)
+ darwin*) #(vi
DFT_LIB_SUFFIX='.dylib'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- hpux*)
+ hpux*) #(vi
case $target in
- ia64*)
+ ia64*) #(vi
DFT_LIB_SUFFIX='.so'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- *)
+ *) #(vi
DFT_LIB_SUFFIX='.sl'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
@@ -16289,10 +18692,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
esac
test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
-echo "$as_me:16292: result: $DFT_DEP_SUFFIX" >&5
+echo "$as_me:18695: result: $DFT_DEP_SUFFIX" >&5
echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
-echo "$as_me:16295: checking default object directory" >&5
+echo "$as_me:18698: checking default object directory" >&5
echo $ECHO_N "checking default object directory... $ECHO_C" >&6
case $DFT_LWR_MODEL in
@@ -16308,51 +18711,55 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
DFT_OBJ_SUBDIR='obj_s' ;;
esac
esac
-echo "$as_me:16311: result: $DFT_OBJ_SUBDIR" >&5
+echo "$as_me:18714: 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:16316: checking c++ library-dependency suffix" >&5
+echo "$as_me:18719: 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)
+ case normal in #(vi
+ libtool) #(vi
CXX_LIB_SUFFIX='.la'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
- normal)
+ normal) #(vi
CXX_LIB_SUFFIX='.a'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
- debug)
+ debug) #(vi
CXX_LIB_SUFFIX='_g.a'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
- profile)
+ profile) #(vi
CXX_LIB_SUFFIX='_p.a'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
- shared)
+ shared) #(vi
case $cf_cv_system_name in
- cygwin*)
+ aix[56]*) #(vi
+ CXX_LIB_SUFFIX='.a'
+ CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
+ ;;
+ cygwin*) #(vi
CXX_LIB_SUFFIX='.dll'
CXX_DEP_SUFFIX='.dll.a'
;;
- darwin*)
+ darwin*) #(vi
CXX_LIB_SUFFIX='.dylib'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
- hpux*)
+ hpux*) #(vi
case $target in
- ia64*)
+ ia64*) #(vi
CXX_LIB_SUFFIX='.so'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
- *)
+ *) #(vi
CXX_LIB_SUFFIX='.sl'
CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
;;
@@ -16366,7 +18773,7 @@ else
test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
fi
-echo "$as_me:16369: result: $CXX_LIB_SUFFIX" >&5
+echo "$as_me:18776: result: $CXX_LIB_SUFFIX" >&5
echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
fi
@@ -16431,6 +18838,8 @@ if test "$with_termlib" != no ; then
TEST_ARGS="${TEST_DEPS}"
TEST_ARG2="${TEST_DEP2}"
TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
+ TICS_LIST="$SHLIB_LIST $TEST_ARGS"
+ SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
else
TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
@@ -16480,7 +18889,7 @@ normal|debug|profile)
if test "$GCC" = yes ; then
case $cf_cv_system_name in #(
- OS/2*|os2*|aix[45]*) #( vi
+ OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*) #( vi
LDFLAGS_STATIC=
LDFLAGS_SHARED=
;;
@@ -16491,7 +18900,7 @@ if test "$GCC" = yes ; then
esac
else
case $cf_cv_system_name in #(
- aix[45]*) #( from ld manpage
+ aix[456]*) #( from ld manpage
LDFLAGS_STATIC=-bstatic
LDFLAGS_SHARED=-bdynamic
;;
@@ -16516,15 +18925,93 @@ else
esac
fi
+if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
+then
+ echo "$as_me:18930: checking if linker supports switching between static/dynamic" >&5
+echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
+
+ rm -f libconftest.a
+ cat >conftest.$ac_ext <<EOF
+#line 18935 "configure"
+#include <stdio.h>
+int cf_ldflags_static(FILE *fp) { return fflush(fp); }
+EOF
+ if { (eval echo "$as_me:18939: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:18942: \$? = $ac_status" >&5
+ (exit $ac_status); } ; then
+ ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
+ ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
+ fi
+ rm -f conftest.*
+
+ cf_save_LIBS="$LIBS"
+
+ LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 18953 "configure"
+#include "confdefs.h"
+
+#line 18956 "configure"
+#include <stdio.h>
+int cf_ldflags_static(FILE *fp);
+
+int
+main ()
+{
+
+ return cf_ldflags_static(stdin);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18971: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18974: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18977: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18980: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_ldflags_static=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_ldflags_static=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+ rm -f libconftest.*
+ LIBS="$cf_save_LIBS"
+
+ echo "$as_me:18993: result: $cf_ldflags_static" >&5
+echo "${ECHO_T}$cf_ldflags_static" >&6
+
+ if test $cf_ldflags_static != yes
+ then
+ LDFLAGS_STATIC=
+ LDFLAGS_SHARED=
+ fi
+else
+ LDFLAGS_STATIC=
+ LDFLAGS_SHARED=
+fi
+
;;
esac
-echo "$as_me:16522: checking where we will install curses.h" >&5
+echo "$as_me:19009: 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:16527: result: $includedir" >&5
+echo "$as_me:19014: result: $includedir" >&5
echo "${ECHO_T}$includedir" >&6
### Resolve a conflict between normal and wide-curses by forcing applications
@@ -16532,10 +19019,11 @@ echo "${ECHO_T}$includedir" >&6
if test "$with_overwrite" != no ; then
if test "$NCURSES_LIBUTF8" = 1 ; then
NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
- { echo "$as_me:16535: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
+ { echo "$as_me:19022: 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
+WITH_OVERWRITE=$with_overwrite
# used to separate tack out of the tree
NCURSES_TREE=
@@ -16548,7 +19036,7 @@ EOF
### Construct the list of subdirectories for which we'll customize makefiles
### with the appropriate compile-rules.
-echo "$as_me:16551: checking for src modules" >&5
+echo "$as_me:19039: checking for src modules" >&5
echo $ECHO_N "checking for src modules... $ECHO_C" >&6
# dependencies and linker-arguments for test-programs
@@ -16611,25 +19099,34 @@ EOF
fi
fi
done
-echo "$as_me:16614: result: $cf_cv_src_modules" >&5
+echo "$as_me:19102: result: $cf_cv_src_modules" >&5
echo "${ECHO_T}$cf_cv_src_modules" >&6
TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
-SRC_SUBDIRS="man include"
+SRC_SUBDIRS=
+if test "x$cf_with_manpages" != xno ; then
+ SRC_SUBDIRS="$SRC_SUBDIRS man"
+fi
+SRC_SUBDIRS="$SRC_SUBDIRS include"
for cf_dir in $cf_cv_src_modules
do
SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
done
-SRC_SUBDIRS="$SRC_SUBDIRS test"
+if test "x$cf_with_tests" != "xno" ; then
+ SRC_SUBDIRS="$SRC_SUBDIRS test"
+fi
test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
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"
+ SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
+ ADA_SUBDIRS="gen src"
+ if test "x$cf_with_tests" != "xno" ; then
+ ADA_SUBDIRS="$ADA_SUBDIRS samples"
+ fi
fi
SUB_MAKEFILES=
@@ -16639,15 +19136,16 @@ do
done
if test -n "$ADA_SUBDIRS"; then
- for cf_dir in $ADA_SUBDIRS
- do
- SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
- done
+ for cf_dir in $ADA_SUBDIRS
+ do
+ SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
+ done
fi
if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
- SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
+ SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
+ SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
fi
DIRS_TO_MAKE="lib"
@@ -16679,8 +19177,12 @@ do
test ! -d $cf_dir && mkdir $cf_dir
done
+# symbols that differ when compiling Ada95 by itself.
+NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
+
+# values to use as strings
cat >>confdefs.h <<EOF
-#define NCURSES_PATHSEP '$PATHSEP'
+#define NCURSES_PATHSEP '$PATH_SEPARATOR'
EOF
cat >>confdefs.h <<EOF
@@ -16705,8 +19207,8 @@ no)
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
+ && 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"
@@ -16721,6 +19223,16 @@ no)
*$cf_add_cflags) #(vi
;;
*) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
;;
esac
@@ -16736,8 +19248,8 @@ yes)
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
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
done
@@ -16749,7 +19261,7 @@ fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
if test -n "$cf_new_extra_cppflags" ; then
@@ -16757,77 +19269,6 @@ if test -n "$cf_new_extra_cppflags" ; then
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
-### If we're building with rpath, try to link non-standard libs that way too.
-if test "$DFT_LWR_MODEL" = "shared"; then
-
-echo "$as_me:16763: checking for updated LDFLAGS" >&5
-echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
-if test -n "$LDFLAGS" ; then
-echo "$as_me:16766: result: maybe" >&5
-echo "${ECHO_T}maybe" >&6
-test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
-
-echo "${as_me-configure}:16770: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
-
-test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-
-echo "${as_me-configure}:16774: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
-
-case "$EXTRA_LDFLAGS" in #(vi
--Wl,-rpath,*) #(vi
- cf_rpath_hack="-Wl,-rpath,"
- ;;
--R\ *)
- cf_rpath_hack="-R "
- ;;
--R*)
- cf_rpath_hack="-R"
- ;;
-*)
- cf_rpath_hack=
- ;;
-esac
-if test -n "$cf_rpath_hack" ; then
- cf_rpath_dst=
- for cf_rpath_src in $LDFLAGS
- do
- test -n "$verbose" && echo " Filtering $cf_rpath_src" 1>&6
-
-echo "${as_me-configure}:16796: testing Filtering $cf_rpath_src ..." 1>&5
-
- case $cf_rpath_src in #(vi
- -L*) #(vi
- if test "$cf_rpath_hack" = "-R " ; then
- cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
- else
- cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
- fi
- test -n "$verbose" && echo " ...Filter $cf_rpath_tmp" 1>&6
-
-echo "${as_me-configure}:16807: testing ...Filter $cf_rpath_tmp ..." 1>&5
-
- EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
- ;;
- esac
- cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
- done
- LDFLAGS=$cf_rpath_dst
- test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
-
-echo "${as_me-configure}:16817: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
-
- test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-
-echo "${as_me-configure}:16821: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
-
-fi
-else
-echo "$as_me:16825: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-
### Define substitutions for header files to avoid name-pollution
if test "$cf_cv_have_tcgetattr" = yes ; then
@@ -16849,9 +19290,82 @@ else
fi
################################################################################
-test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
+test "$use_database" = yes && \
+SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
+
SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
-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"
+SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
+
+if test x"$enable_pc_files" = xyes ; then \
+SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
+MAKE_PC_FILES=
+else
+MAKE_PC_FILES="#"
+fi
+
+# Extract the first word of "tic", so it can be a program name with args.
+set dummy tic; ac_word=$2
+echo "$as_me:19308: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TIC_PATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $TIC_PATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH:/usr/local/ncurses/bin"
+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_TIC_PATH="$ac_dir/$ac_word"
+ echo "$as_me:19325: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
+ ;;
+esac
+fi
+TIC_PATH=$ac_cv_path_TIC_PATH
+
+if test -n "$TIC_PATH"; then
+ echo "$as_me:19337: result: $TIC_PATH" >&5
+echo "${ECHO_T}$TIC_PATH" >&6
+else
+ echo "$as_me:19340: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test -n "$FALLBACK_LIST"
+then
+ if test "$TIC_PATH" = unknown
+ then
+ { echo "$as_me:19348: WARNING: no tic program found for fallbacks" >&5
+echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
+ fi
+fi
+
+if test "x$cf_with_tests" != xno ; then
+ MAKE_TESTS=
+else
+ MAKE_TESTS="#"
+fi
+
+ADAHTML_DIR=../../doc/html/ada
+
+SUB_SCRIPTS=
+case $cf_cv_system_name in #(vi
+*mingw32*) #(vi
+ SUB_SCRIPTS="mk-dlls.sh"
+ ;;
+esac
+
+ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $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
@@ -16932,7 +19446,7 @@ 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:16935: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:19449: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -17058,13 +19572,13 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <dickey@invisible-island.net>."
EOF
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.52.20080325,
+configured by $0, generated by GNU Autoconf 2.52.20101002,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -17108,7 +19622,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:17111: error: ambiguous option: $1
+ { { echo "$as_me:19625: 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;}
@@ -17127,7 +19641,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:17130: error: unrecognized option: $1
+ -*) { { echo "$as_me:19644: 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;}
@@ -17146,7 +19660,7 @@ cat >&5 << _ACEOF
## Running config.status. ##
## ----------------------- ##
-This file was extended by $as_me 2.52.20080325, executed with
+This file was extended by $as_me 2.52.20101002, executed with
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
@@ -17170,10 +19684,12 @@ DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
DFT_LWR_MODEL="$DFT_LWR_MODEL"
ECHO_LINK="$ECHO_LINK"
LDCONFIG="$LDCONFIG"
+LIBTOOL_VERSION="$LIBTOOL_VERSION"
LIB_NAME="$LIB_NAME"
LIB_SUBSETS="$LIB_SUBSETS"
LIB_SUFFIX="$LIB_SUFFIX"
LIB_TRACING="$LIB_TRACING"
+LN_S="$LN_S"
MAKE_TERMINFO="$MAKE_TERMINFO"
NCURSES_MAJOR="$NCURSES_MAJOR"
NCURSES_MINOR="$NCURSES_MINOR"
@@ -17181,13 +19697,15 @@ NCURSES_OSPEED="$NCURSES_OSPEED"
NCURSES_PATCH="$NCURSES_PATCH"
SRC_SUBDIRS="$SRC_SUBDIRS"
TERMINFO="$TERMINFO"
+TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
+TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
+TICS_NAME="$TICS_NAME"
+TIC_PATH="$TIC_PATH"
TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
TINFO_NAME="$TINFO_NAME"
TINFO_SUFFIX="$TINFO_SUFFIX"
-TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
-TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
-TICS_NAME="$TICS_NAME"
+USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
WITH_CURSES_H="$with_curses_h"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
@@ -17205,7 +19723,10 @@ cf_cv_shared_soname='$cf_cv_shared_soname'
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_ada="$cf_with_ada"
cf_with_cxx_binding="$cf_with_cxx_binding"
+cf_with_manpages="$cf_with_manpages"
+cf_with_tests="$cf_with_tests"
host="$host"
target="$target"
@@ -17218,13 +19739,15 @@ do
# 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/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
"include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
"include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
+ "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
"$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:17227: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:19750: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -17349,7 +19872,12 @@ s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LINT@,$LINT,;t t
s,@LINT_OPTS@,$LINT_OPTS,;t t
s,@LN_S@,$LN_S,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
+s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
+s,@CTAGS@,$CTAGS,;t t
+s,@ETAGS@,$ETAGS,;t t
s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
@@ -17359,7 +19887,7 @@ 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,@ARFLAGS@,$ARFLAGS,;t t
s,@DESTDIR@,$DESTDIR,;t t
s,@BUILD_CC@,$BUILD_CC,;t t
s,@BUILD_CPP@,$BUILD_CPP,;t t
@@ -17370,7 +19898,9 @@ 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_VERSION@,$LIBTOOL_VERSION,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
+s,@LT_UNDEF@,$LT_UNDEF,;t t
s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
s,@LIB_CREATE@,$LIB_CREATE,;t t
@@ -17392,6 +19922,7 @@ 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_RPATH_OPT@,$LD_RPATH_OPT,;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
@@ -17400,8 +19931,8 @@ 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,@cf_ldd_prog@,$cf_ldd_prog,;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
@@ -17423,19 +19954,26 @@ s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
+s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
+s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
+s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
+s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
s,@NCURSES_CONST@,$NCURSES_CONST,;t t
s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
+s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
s,@PTHREAD@,$PTHREAD,;t t
s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
+s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
s,@ECHO_LINK@,$ECHO_LINK,;t t
+s,@ADAFLAGS@,$ADAFLAGS,;t t
s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
s,@ADA_TRACE@,$ADA_TRACE,;t t
@@ -17446,23 +19984,29 @@ s,@cf_cv_1UL@,$cf_cv_1UL,;t t
s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
s,@TEST_LIBS@,$TEST_LIBS,;t t
+s,@TEST_LIBS2@,$TEST_LIBS2,;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,@CXX_ARFLAGS@,$CXX_ARFLAGS,;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,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
+s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
+s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
+s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
+s,@cf_ada_compiler@,$cf_ada_compiler,;t t
+s,@cf_ada_package@,$cf_ada_package,;t t
s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
+s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
+s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;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
@@ -17490,9 +20034,15 @@ s,@TEST_ARG2@,$TEST_ARG2,;t t
s,@TEST_DEP2@,$TEST_DEP2,;t t
s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
+s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
+s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
+s,@cross_compiling@,$cross_compiling,;t t
+s,@TIC_PATH@,$TIC_PATH,;t t
+s,@MAKE_TESTS@,$MAKE_TESTS,;t t
+s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
CEOF
EOF
@@ -17607,7 +20157,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:17610: creating $ac_file" >&5
+ { echo "$as_me:20160: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -17625,7 +20175,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:17628: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:20178: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -17638,7 +20188,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:17641: error: cannot find input file: $f" >&5
+ { { echo "$as_me:20191: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -17704,7 +20254,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:17707: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:20257: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -17715,7 +20265,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:17718: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:20268: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -17728,7 +20278,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:17731: error: cannot find input file: $f" >&5
+ { { echo "$as_me:20281: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -17786,7 +20336,7 @@ cat >>$CONFIG_STATUS <<\EOF
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:17789: $ac_file is unchanged" >&5
+ { echo "$as_me:20339: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -17828,7 +20378,6 @@ done; }
done
EOF
cat >>$CONFIG_STATUS <<\EOF
-
#
# CONFIG_COMMANDS section.
#
@@ -17838,16 +20387,19 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
case $ac_dest in
default )
+if test "x$cf_with_tests" != xno ; then
for cf_dir in test
do
if test ! -d $srcdir/$cf_dir; then
continue
elif test -f $srcdir/$cf_dir/programs; then
- $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
+ $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
fi
done
+fi
+
case $cf_cv_system_name in #(vi
OS/2*|os2*) #(vi
LIB_PREFIX=''
@@ -17862,6 +20414,23 @@ if test $cf_cv_shlib_version = cygdll ; then
TINFO_SUFFIX=.dll
fi
+if test -n "$TINFO_SUFFIX" ; then
+ case $TINFO_SUFFIX in
+ tw*)
+ TINFO_NAME="${TINFO_NAME}tw"
+ TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
+ ;;
+ t*)
+ TINFO_NAME="${TINFO_NAME}t"
+ TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
+ ;;
+ w*)
+ TINFO_NAME="${TINFO_NAME}w"
+ TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
+ ;;
+ esac
+fi
+
for cf_dir in $SRC_SUBDIRS
do
if test ! -d $srcdir/$cf_dir ; then
@@ -17873,40 +20442,44 @@ do
for cf_item in $cf_LIST_MODELS
do
- case $cf_item in
- libtool)
+ case $cf_item in #(vi
+ libtool) #(vi
cf_suffix='.la'
cf_depsuf=$cf_suffix
;;
- normal)
+ normal) #(vi
cf_suffix='.a'
cf_depsuf=$cf_suffix
;;
- debug)
+ debug) #(vi
cf_suffix='_g.a'
cf_depsuf=$cf_suffix
;;
- profile)
+ profile) #(vi
cf_suffix='_p.a'
cf_depsuf=$cf_suffix
;;
- shared)
+ shared) #(vi
case $cf_cv_system_name in
- cygwin*)
+ aix[56]*) #(vi
+ cf_suffix='.a'
+ cf_depsuf=$cf_suffix
+ ;;
+ cygwin*) #(vi
cf_suffix='.dll'
cf_depsuf='.dll.a'
;;
- darwin*)
+ darwin*) #(vi
cf_suffix='.dylib'
cf_depsuf=$cf_suffix
;;
- hpux*)
+ hpux*) #(vi
case $target in
- ia64*)
+ ia64*) #(vi
cf_suffix='.so'
cf_depsuf=$cf_suffix
;;
- *)
+ *) #(vi
cf_suffix='.sl'
cf_depsuf=$cf_suffix
;;
@@ -17927,6 +20500,14 @@ do
case "$cf_cv_system_name" in #(vi
darwin*)
case .${LIB_SUFFIX} in
+ .tw*)
+ cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+ cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
+ ;;
+ .t*)
+ cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+ cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
+ ;;
.w*)
cf_suffix=`echo $cf_suffix | sed 's/^w//'`
cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
@@ -17943,6 +20524,14 @@ do
case "$cf_cv_system_name" in #(vi
darwin*)
case .${LIB_SUFFIX} in
+ .tw*)
+ cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+ cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
+ ;;
+ .t*)
+ cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+ cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
+ ;;
.w*)
cf_suffix=`echo $cf_suffix | sed 's/^w//'`
cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
@@ -18020,40 +20609,44 @@ do
cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- case $cf_item in
- libtool)
+ case $cf_item in #(vi
+ libtool) #(vi
cf_suffix='.la'
cf_depsuf=$cf_suffix
;;
- normal)
+ normal) #(vi
cf_suffix='.a'
cf_depsuf=$cf_suffix
;;
- debug)
+ debug) #(vi
cf_suffix='_g.a'
cf_depsuf=$cf_suffix
;;
- profile)
+ profile) #(vi
cf_suffix='_p.a'
cf_depsuf=$cf_suffix
;;
- shared)
+ shared) #(vi
case $cf_cv_system_name in
- cygwin*)
+ aix[56]*) #(vi
+ cf_suffix='.a'
+ cf_depsuf=$cf_suffix
+ ;;
+ cygwin*) #(vi
cf_suffix='.dll'
cf_depsuf='.dll.a'
;;
- darwin*)
+ darwin*) #(vi
cf_suffix='.dylib'
cf_depsuf=$cf_suffix
;;
- hpux*)
+ hpux*) #(vi
case $target in
- ia64*)
+ ia64*) #(vi
cf_suffix='.so'
cf_depsuf=$cf_suffix
;;
- *)
+ *) #(vi
cf_suffix='.sl'
cf_depsuf=$cf_suffix
;;
@@ -18123,6 +20716,16 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
if test "$cf_cv_shlib_version_infix" = yes ; then
if test -n "$LIB_SUFFIX" ; then
case $LIB_SUFFIX in
+ tw*)
+ cf_libname=`echo $cf_libname | sed 's/tw$//'`
+ cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
+ cf_dir_suffix=tw
+ ;;
+ t*)
+ cf_libname=`echo $cf_libname | sed 's/t$//'`
+ cf_suffix=`echo $cf_suffix | sed 's/^t//'`
+ cf_dir_suffix=t
+ ;;
w*)
cf_libname=`echo $cf_libname | sed 's/w$//'`
cf_suffix=`echo $cf_suffix | sed 's/^w//'`
@@ -18140,17 +20743,19 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
prefix=$cf_prefix \
suffix=$cf_suffix \
subset=$cf_subset \
+ SymLink="$LN_S" \
TermlibRoot=$TINFO_NAME \
TermlibSuffix=$TINFO_SUFFIX \
ShlibVer=$cf_cv_shlib_version \
ShlibVerInfix=$cf_cv_shlib_version_infix \
- ReLink=${cf_cv_do_relink-no} \
+ ReLink=${cf_cv_do_relink:-no} \
DoLinks=$cf_cv_do_symlinks \
rmSoLocs=$cf_cv_rm_so_locs \
ldconfig="$LDCONFIG" \
overwrite=$WITH_OVERWRITE \
depend="$cf_depend" \
host="$host" \
+ libtool_version="$LIBTOOL_VERSION" \
$srcdir/$cf_dir/modules >>$cf_dir/Makefile
cf_suffix="$old_cf_suffix"
@@ -18234,18 +20839,28 @@ cat >> Makefile <<CF_EOF
install.libs uninstall.libs \\
install.data uninstall.data ::
$MAKE_TERMINFO cd misc && \${MAKE} \${CF_MFLAGS} \$@
+CF_EOF
+
+if test "x$cf_with_manpages" = xyes; then
+cat >> Makefile <<CF_EOF
install.man \\
uninstall.man ::
cd man && \${MAKE} \${CF_MFLAGS} \$@
+CF_EOF
+fi
+
+cat >> Makefile <<CF_EOF
distclean ::
rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
rm -f headers.sh headers.sed mk_shared_lib.sh
+ rm -f edit_man.* man_alias.*
rm -rf \${DIRS_TO_MAKE}
CF_EOF
# Special case: tack's manpage lives in its own directory.
+if test "x$cf_with_manpages" = xyes; then
if test -d tack ; then
if test -f $srcdir/$tack.h; then
cat >> Makefile <<CF_EOF
@@ -18256,6 +20871,7 @@ uninstall.man ::
CF_EOF
fi
fi
+fi
rm -f headers.sed headers.sh
@@ -18274,8 +20890,8 @@ done
DST=\$1
REF=\$2
SRC=\$3
-TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
-TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
+TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
echo installing \$SRC in \$DST
CF_EOF
@@ -18363,6 +20979,11 @@ CF_EOF
fi
done
+if test "x$cf_with_ada" != xno ; then
+if test -z "$USE_OLD_MAKERULES" ; then
+ $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
+fi
+fi
;;
esac
done
@@ -18392,4 +21013,4 @@ if test "$no_create" != yes; then
# would make configure fail if this is the last instruction.
$ac_cs_success || { (exit 1); exit 1; }
fi
-${MAKE-make} preinstall
+${MAKE:-make} preinstall
diff --git a/configure.in b/configure.in
index 2b4422a439d2..d5bc841e9b04 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
@@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.454 2008/10/18 14:53:32 tom Exp $
+dnl $Id: configure.in,v 1.520 2011/03/28 00:22:26 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.454 $)
+AC_REVISION($Revision: 1.520 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@@ -122,6 +122,13 @@ AC_ARG_WITH(ada,
[cf_with_ada=yes])
AC_MSG_RESULT($cf_with_ada)
+AC_MSG_CHECKING(if you want to install manpages)
+AC_ARG_WITH(manpages,
+ [ --without-manpages suppress install of manpages],
+ [cf_with_manpages=$withval],
+ [cf_with_manpages=yes])
+AC_MSG_RESULT($cf_with_manpages)
+
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)],
@@ -129,6 +136,13 @@ AC_ARG_WITH(progs,
[cf_with_progs=yes])
AC_MSG_RESULT($cf_with_progs)
+AC_MSG_CHECKING(if you want to build test-programs)
+AC_ARG_WITH(tests,
+ [ --without-tests suppress build with test-programs],
+ [cf_with_tests=$withval],
+ [cf_with_tests=yes])
+AC_MSG_RESULT($cf_with_tests)
+
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],
@@ -148,10 +162,35 @@ CF_PROG_AWK
CF_PROG_EGREP
CF_PROG_INSTALL
CF_PROG_LINT
-AC_PROG_LN_S
+CF_PROG_LN_S
AC_SYS_LONG_FILE_NAMES
+# if we find pkg-config, check if we should install the ".pc" files.
+CF_PKG_CONFIG
+
+if test "$PKG_CONFIG" != no ; then
+ AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
+
+ # Leave this as something that can be overridden in the environment.
+ if test -z "$PKG_CONFIG_LIBDIR" ; then
+ PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
+ fi
+ PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
+ if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
+ AC_ARG_ENABLE(pc-files,
+ [ --enable-pc-files generate and install .pc files for pkg-config],
+ [enable_pc_files=$enableval],
+ [enable_pc_files=no])
+ AC_MSG_RESULT($enable_pc_files)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
+ enable_pc_files=no
+ fi
+fi
+AC_SUBST(PKG_CONFIG_LIBDIR)
+
AC_MSG_CHECKING(if we should assume mixed-case filenames)
AC_ARG_ENABLE(mixed-case,
[ --enable-mixed-case tic should assume mixed-case filenames],
@@ -176,7 +215,7 @@ 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_AR_FLAGS
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
@@ -327,6 +366,7 @@ if test "$with_gpm" != no ; then
SHLIB_LIST="-ldl $SHLIB_LIST"
else
SHLIB_LIST="-lgpm $SHLIB_LIST"
+ CF_ADD_LIB(gpm,TEST_LIBS)
fi
AC_DEFINE(HAVE_LIBGPM)
CF_CHECK_GPM_WGETCH
@@ -380,6 +420,11 @@ if test "$CC_SHARED_OPTS" = "unknown"; then
done
fi
+### If we're building with rpath, try to link non-standard libs that way too.
+if test "$DFT_LWR_MODEL" = "shared"; then
+ CF_DISABLE_RPATH_HACK
+fi
+
###############################################################################
CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
@@ -413,7 +458,7 @@ if test "$use_database" != no ; then
AC_DEFINE(USE_DATABASE)
AC_MSG_CHECKING(which terminfo source-file will be installed)
- AC_ARG_ENABLE(database,
+ AC_ARG_WITH(database,
[ --with-database=XXX specify terminfo source to install],
[TERMINFO_SRC=$withval])
AC_MSG_RESULT($TERMINFO_SRC)
@@ -618,7 +663,7 @@ 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}])
+ [with_broken_linker=${BROKEN_LINKER:-no}])
AC_MSG_RESULT($with_broken_linker)
BROKEN_LINKER=0
@@ -655,7 +700,7 @@ NCURSES_WCHAR_T=0
NCURSES_WINT_T=0
# Check to define _XOPEN_SOURCE "automatically"
-CF_XOPEN_SOURCE
+CF_XOPEN_SOURCE(500)
# Work around breakage on OS X
CF_SIGWINCH
@@ -676,7 +721,15 @@ 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_EXTENDED)
+
+ case "$CFLAGS $CPPFLAGS" in #(vi
+ *-D_XOPEN_SOURCE=500) #(vi
+ ;;
+ *)
+ CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
+ ;;
+ esac
+
# with_overwrite=no
NCURSES_CH_T=cchar_t
AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs)
@@ -797,6 +850,15 @@ AC_ARG_WITH(mmask-t,
[NCURSES_MMASK_T=auto])
AC_MSG_RESULT($NCURSES_MMASK_T)
+### use option --with-ccharw-max to override CCHARW_MAX size
+AC_MSG_CHECKING(for size CCHARW_MAX)
+AC_ARG_WITH(ccharw-max,
+ [ --with-ccharw-max=XXX override size CCHARW_MAX],
+ [NCURSES_CCHARW_MAX="$withval"],
+ [NCURSES_CCHARW_MAX=5])
+AC_MSG_RESULT($NCURSES_CCHARW_MAX)
+AC_SUBST(NCURSES_CCHARW_MAX)
+
### Enable compiling-in rcs id's
AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
AC_ARG_WITH(rcs-ids,
@@ -807,7 +869,7 @@ 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_MAN_PAGES([ captoinfo clear infocmp infotocap tabs tic toe tput tset ])
###############################################################################
CF_HELP_MESSAGE(Extensions:)
@@ -825,13 +887,47 @@ if test "$with_ext_funcs" = yes ; then
AC_DEFINE(HAVE_HAS_KEY)
AC_DEFINE(HAVE_RESIZETERM)
AC_DEFINE(HAVE_RESIZE_TERM)
+ AC_DEFINE(HAVE_TERM_ENTRY_H)
AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
AC_DEFINE(HAVE_WRESIZE)
AC_DEFINE(NCURSES_EXT_FUNCS)
+ GENERATED_EXT_FUNCS=generated
else
NCURSES_EXT_FUNCS=0
+ GENERATED_EXT_FUNCS=
fi
AC_SUBST(NCURSES_EXT_FUNCS)
+AC_SUBST(GENERATED_EXT_FUNCS)
+
+AC_MSG_CHECKING(if you want to build with experimental SCREEN extensions)
+AC_ARG_ENABLE(sp-funcs,
+ [ --enable-sp-funcs enable experimental SCREEN-extensions],
+ [with_sp_funcs=$enableval],
+ [with_sp_funcs=no])
+AC_MSG_RESULT($with_sp_funcs)
+if test "$with_sp_funcs" = yes ; then
+ NCURSES_SP_FUNCS=1
+ AC_DEFINE(NCURSES_SP_FUNCS)
+ GENERATED_SP_FUNCS=generated
+else
+ NCURSES_SP_FUNCS=0
+ GENERATED_SP_FUNCS=
+fi
+AC_SUBST(NCURSES_SP_FUNCS)
+AC_SUBST(GENERATED_SP_FUNCS)
+
+AC_MSG_CHECKING(if you want to build with experimental terminal-driver)
+AC_ARG_ENABLE(term-driver,
+ [ --enable-term-driver enable experimental terminal-driver],
+ [with_term_driver=$enableval],
+ [with_term_driver=no])
+AC_MSG_RESULT($with_term_driver)
+if test "$with_term_driver" = yes ; then
+ AC_DEFINE(USE_TERM_DRIVER)
+ if test "$with_sp_funcs" != yes ; then
+ AC_MSG_ERROR(The term-driver option relies upon sp-funcs)
+ fi
+fi
### use option --enable-const to turn on use of const beyond that in XSI.
AC_MSG_CHECKING(for extended use of const keyword)
@@ -973,30 +1069,55 @@ 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],
+ [ --enable-colorfgbg compile-in experimental $COLORFGBG code],
[with_colorfgbg=$enableval],
[with_colorfgbg=no])
AC_MSG_RESULT($with_colorfgbg)
test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
+### use option --enable-interop to turn on use of bindings used for interop
+AC_MSG_CHECKING(if you want interop bindings)
+AC_ARG_ENABLE(interop,
+ [ --enable-interop compile-in experimental interop bindings],
+ [with_exp_interop=$enableval],
+ [with_exp_interop=no])
+AC_MSG_RESULT($with_exp_interop)
+
+NCURSES_INTEROP_FUNCS=0
+test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
+AC_SUBST(NCURSES_INTEROP_FUNCS)
+
# This is still experimental (20080329), but should ultimately be moved to
# the script-block --with-normal, etc.
CF_WITH_PTHREAD
-AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
-AC_ARG_ENABLE(weak-symbols,
- [ --enable-weak-symbols enable weak-symbols for pthreads],
- [use_weak_symbols=$withval],
- [use_weak_symbols=no])
-AC_MSG_RESULT($use_weak_symbols)
-if test "$use_weak_symbols" = yes ; then
- CF_WEAK_SYMBOLS
-else
- cf_cv_weak_symbols=no
-fi
+if test "x$with_pthread" != xno; then
+ AC_CHECK_FUNC(pthread_kill,[
+ AC_MSG_CHECKING(if you want to allow EINTR in wgetch with pthreads)
+ AC_ARG_ENABLE(pthreads-eintr,
+ [ --enable-pthreads-eintr enable EINTR in wgetch with pthreads],
+ [use_pthreads_eintr=$enableval],
+ [use_pthreads_eintr=no])
+ AC_MSG_RESULT($use_pthreads_eintr)
+ if test $use_pthreads_eintr = yes ; then
+ AC_DEFINE(USE_PTHREADS_EINTR)
+ fi])
+
+ AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
+ AC_ARG_ENABLE(weak-symbols,
+ [ --enable-weak-symbols enable weak-symbols for pthreads],
+ [use_weak_symbols=$enableval],
+ [use_weak_symbols=no])
+ AC_MSG_RESULT($use_weak_symbols)
+ if test "$use_weak_symbols" = yes ; then
+ CF_WEAK_SYMBOLS
+ else
+ cf_cv_weak_symbols=no
+ fi
-if test $cf_cv_weak_symbols = yes ; then
- AC_DEFINE(USE_WEAK_SYMBOLS)
+ if test $cf_cv_weak_symbols = yes ; then
+ AC_DEFINE(USE_WEAK_SYMBOLS)
+ fi
fi
PTHREAD=
@@ -1024,11 +1145,13 @@ if test "$with_reentrant" = yes ; then
cf_cv_enable_opaque="NCURSES_INTERNALS"
NCURSES_OPAQUE=1
NCURSES_SIZE_T=int
- if test $cf_cv_weak_symbols = yes ; then
- CF_REMOVE_LIB(LIBS,$LIBS,pthread)
- else
- LIB_SUFFIX="t${LIB_SUFFIX}"
- fi
+ if test $cf_cv_weak_symbols = yes ; then
+ CF_REMOVE_LIB(LIBS,$LIBS,pthread)
+ CF_ADD_LIB(pthread,TEST_LIBS)
+ CF_ADD_LIB(pthread,TEST_LIBS2)
+ else
+ LIB_SUFFIX="t${LIB_SUFFIX}"
+ fi
AC_DEFINE(USE_REENTRANT)
CF_NCURSES_ABI_6
else
@@ -1042,6 +1165,20 @@ AC_SUBST(cf_cv_enable_opaque)
AC_SUBST(NCURSES_OPAQUE)
AC_SUBST(NCURSES_SIZE_T)
+### Allow using a different wrap-prefix
+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
+ AC_MSG_CHECKING(for prefix used to wrap public variables)
+ AC_ARG_WITH(wrap-prefix,
+ [ --with-wrap-prefix=XXX override prefix used for public variables],
+ [NCURSES_WRAP_PREFIX=$withval],
+ [NCURSES_WRAP_PREFIX=_nc_])
+ AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
+else
+ NCURSES_WRAP_PREFIX=_nc_
+fi
+AC_SUBST(NCURSES_WRAP_PREFIX)
+AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX")
+
AC_MSG_CHECKING(if you want experimental safe-sprintf code)
AC_ARG_ENABLE(safe-sprintf,
[ --enable-safe-sprintf compile with experimental safe-sprintf code],
@@ -1097,7 +1234,7 @@ AC_ARG_ENABLE(warnings,
AC_MSG_RESULT($with_warnings)
if test "x$with_warnings" = "xyes"; then
- ADAFLAGS="$ADAFLAGS -gnatg"
+ CF_ADD_ADAFLAGS(-gnatg)
CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
if test "$cf_with_cxx" = yes ; then
CF_GXX_WARNINGS(Wno-unused)
@@ -1119,7 +1256,7 @@ then
AC_DEFINE(NDEBUG)
CPPFLAGS="$CPPFLAGS -DNDEBUG"
else
- ADAFLAGS="$ADAFLAGS -gnata"
+ CF_ADD_ADAFLAGS(-gnata)
fi
fi
@@ -1165,12 +1302,18 @@ fi
AC_SUBST(ADA_TRACE)
### Checks for libraries.
+case $cf_cv_system_name in #(vi
+*mingw32*) #(vi
+ ;;
+*)
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_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday
+ ;;
+esac
CF_MATH_LIB(MATH_LIB,sin(x))
AC_SUBST(MATH_LIB)
@@ -1187,6 +1330,7 @@ fcntl.h \
getopt.h \
limits.h \
locale.h \
+math.h \
poll.h \
sys/bsdtypes.h \
sys/ioctl.h \
@@ -1204,7 +1348,7 @@ wctype.h \
# 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()'
+ AC_CHECK_LIB(inet,bzero,CF_ADD_LIB(inet))dnl also 'select()'
fi
CF_SYS_TIME_SELECT
@@ -1287,6 +1431,8 @@ CF_TYPE_SIGACTION
CF_SIZECHANGE
CF_FUNC_MEMMOVE
CF_FUNC_POLL
+CF_VA_COPY
+AC_FUNC_VFORK
# special check for test/ditto.c
CF_FUNC_OPENPTY
@@ -1294,10 +1440,11 @@ if test "$cf_cv_func_openpty" != no ; then
AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>)
AC_DEFINE(USE_XTERM_PTY)
if test "$cf_cv_lib_util" = yes ; then
- TEST_LIBS="-lutil $TEST_LIBS"
+ CF_ADD_LIB(util,TEST_LIBS)
fi
fi
AC_SUBST(TEST_LIBS)
+AC_SUBST(TEST_LIBS2)
if test "$with_hashed_db" != no ; then
AC_DEFINE(USE_HASHED_DB)
@@ -1354,12 +1501,12 @@ cerr << "testing" << endl;
CF_CPP_STATIC_CAST
CXX_AR='$(AR)'
- CXX_AR_OPTS='$(AR_OPTS)'
+ CXX_ARFLAGS='$(ARFLAGS)'
case $cf_cv_system_name in #(vi
irix*) #(vi
if test "$GXX" != yes ; then
CXX_AR='$(CXX)'
- CXX_AR_OPTS='-ar -o'
+ CXX_ARFLAGS='-ar -o'
fi
;;
sco3.2v5*) #(vi
@@ -1368,13 +1515,13 @@ cerr << "testing" << endl;
solaris2*)
if test "$GXX" != yes ; then
CXX_AR='$(CXX)'
- CXX_AR_OPTS='-xar -o'
+ CXX_ARFLAGS='-xar -o'
fi
;;
esac
AC_SUBST(CXXLDFLAGS)
AC_SUBST(CXX_AR)
- AC_SUBST(CXX_AR_OPTS)
+ AC_SUBST(CXX_ARFLAGS)
else
cf_cxx_library=no
cf_cv_builtin_bool=1
@@ -1435,99 +1582,49 @@ if test -f "${srcdir}/Ada95/Makefile.in" ; then
dnl libtool does not know anything about GNAT, though a change made in 1998
dnl provided for it "someday". Disable the ada subtree if we are using
dnl libtool -TD 20070714
-if test "$cf_with_ada" != "no" ; then
- if test "$with_libtool" != "no"; then
- AC_MSG_WARN(libtool does not support Ada - disabling feature)
- cf_with_ada=no
- fi
-fi
+ if test "$cf_with_ada" != "no" ; then
+ if test "$with_libtool" != "no"; then
+ AC_MSG_WARN(libtool does not support Ada - disabling feature)
+ cf_with_ada=no
+ fi
+ fi
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)
+ if test "$cf_with_ada" != "no" ; then
+ CF_PROG_GNAT
+ if test "$cf_cv_prog_gnat_correct" = yes; then
+ CF_ADD_ADAFLAGS(-gnatpn)
+
+ # make ADAFLAGS consistent with CFLAGS
+ case "$CFLAGS" in
+ *-g*)
+ CF_ADD_ADAFLAGS(-g)
+ ;;
+ esac
+ case "$CFLAGS" in
+ *-O*)
+ CF_ADD_ADAFLAGS(-O3)
+ ;;
+ esac
-fi
-fi
+ CF_GNAT_GENERICS
+ CF_GNAT_SIGINT
+ CF_GNAT_PRAGMA_UNREF
+ CF_GNAT_PROJECTS
+
+ CF_WITH_ADA_COMPILER
+
+ cf_ada_package=terminal_interface
+ AC_SUBST(cf_ada_package)
+
+ CF_WITH_ADA_INCLUDE
+ CF_WITH_ADA_OBJECTS
+ CF_WITH_ADA_SHAREDLIB
+ fi
+ fi
else
- cf_with_ada=no
+ cf_with_ada=no
fi
### Construct the ncurses library-subsets, if any, from this set of keywords:
@@ -1554,6 +1651,7 @@ fi
LIB_SUBSETS="${LIB_SUBSETS}termlib"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
+
if test "$with_termlib" != no ; then
LIB_SUBSETS="${LIB_SUBSETS} "
else
@@ -1561,6 +1659,21 @@ else
fi
LIB_SUBSETS="${LIB_SUBSETS}base"
+
+# Most term-driver calls are to tinfo, but some like init_pair are to the
+# base library (so it resides in base).
+if test "$with_term_driver" != no ; then
+ LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
+ case $cf_cv_system_name in #(vi
+ *mingw32*) #(vi
+ LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
+ ;;
+ *) #(vi
+ LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
+ ;;
+ esac
+fi
+
test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
@@ -1656,6 +1769,8 @@ if test "$with_termlib" != no ; then
TEST_ARGS="${TEST_DEPS}"
TEST_ARG2="${TEST_DEP2}"
TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
+ TICS_LIST="$SHLIB_LIST $TEST_ARGS"
+ SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
else
TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
@@ -1723,6 +1838,7 @@ if test "$NCURSES_LIBUTF8" = 1 ; then
AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h)
fi
fi
+WITH_OVERWRITE=$with_overwrite
AC_SUBST(WITH_OVERWRITE)
AC_SUBST(TICS_LIST)
@@ -1742,40 +1858,91 @@ AC_DEFINE(HAVE_SLK_COLOR)
CF_SRC_MODULES($modules_to_build)
if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
- SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
+ SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
+ SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
fi
CF_DIRS_TO_MAKE
-AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
+# symbols that differ when compiling Ada95 by itself.
+NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
+AC_SUBST(NCURSES_SHLIB2)
+
+# values to use as strings
+AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR')
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)
-### If we're building with rpath, try to link non-standard libs that way too.
-if test "$DFT_LWR_MODEL" = "shared"; then
- CF_RPATH_HACK
-fi
-
### Define substitutions for header files to avoid name-pollution
CF_SUBST_IF(["$cf_cv_have_tcgetattr" = yes], HAVE_TCGETATTR, 1, 0)
CF_SUBST_IF(["$ac_cv_header_termio_h" = yes], HAVE_TERMIO_H, 1, 0)
CF_SUBST_IF(["$ac_cv_header_termios_h" = yes], HAVE_TERMIOS_H, 1, 0)
################################################################################
-test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
+test "$use_database" = yes && \
+SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
+
SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
+SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
+
+if test x"$enable_pc_files" = xyes ; then \
+SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
+MAKE_PC_FILES=
+else
+MAKE_PC_FILES="#"
+fi
+AC_SUBST(MAKE_PC_FILES)
+AC_SUBST(cross_compiling)
+
+AC_PATH_PROG(TIC_PATH,tic,unknown,$PATH:/usr/local/ncurses/bin)
+if test -n "$FALLBACK_LIST"
+then
+ if test "$TIC_PATH" = unknown
+ then
+ AC_MSG_WARN(no tic program found for fallbacks)
+ fi
+fi
+AC_SUBST(TIC_PATH)
+
+if test "x$cf_with_tests" != xno ; then
+ MAKE_TESTS=
+else
+ MAKE_TESTS="#"
+fi
+AC_SUBST(MAKE_TESTS)
+
+ADAHTML_DIR=../../doc/html/ada
+AC_SUBST(ADAHTML_DIR)
+
+SUB_SCRIPTS=
+case $cf_cv_system_name in #(vi
+*mingw32*) #(vi
+ SUB_SCRIPTS="mk-dlls.sh"
+ ;;
+esac
+
AC_OUTPUT( \
include/MKterm.h.awk \
include/curses.head:include/curses.h.in \
+ include/ncurses_dll.h \
include/termcap.h \
include/unctrl.h \
+ $SUB_SCRIPTS \
$SUB_MAKEFILES \
Makefile,[
-CF_PRG_RULES([$srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK"], test)
+if test "x$cf_with_tests" != xno ; then
+ CF_PRG_RULES([$srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK"], test)
+fi
CF_LIB_RULES($SRC_SUBDIRS)
+
+if test "x$cf_with_ada" != xno ; then
+if test -z "$USE_OLD_MAKERULES" ; then
+ $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
+fi
+fi
],[
### Special initialization commands, used to pass information from the
### configuration-run into config.status
@@ -1785,10 +1952,12 @@ DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
DFT_LWR_MODEL="$DFT_LWR_MODEL"
ECHO_LINK="$ECHO_LINK"
LDCONFIG="$LDCONFIG"
+LIBTOOL_VERSION="$LIBTOOL_VERSION"
LIB_NAME="$LIB_NAME"
LIB_SUBSETS="$LIB_SUBSETS"
LIB_SUFFIX="$LIB_SUFFIX"
LIB_TRACING="$LIB_TRACING"
+LN_S="$LN_S"
MAKE_TERMINFO="$MAKE_TERMINFO"
NCURSES_MAJOR="$NCURSES_MAJOR"
NCURSES_MINOR="$NCURSES_MINOR"
@@ -1796,13 +1965,15 @@ NCURSES_OSPEED="$NCURSES_OSPEED"
NCURSES_PATCH="$NCURSES_PATCH"
SRC_SUBDIRS="$SRC_SUBDIRS"
TERMINFO="$TERMINFO"
+TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
+TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
+TICS_NAME="$TICS_NAME"
+TIC_PATH="$TIC_PATH"
TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
TINFO_NAME="$TINFO_NAME"
TINFO_SUFFIX="$TINFO_SUFFIX"
-TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
-TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
-TICS_NAME="$TICS_NAME"
+USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
WITH_CURSES_H="$with_curses_h"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
@@ -1820,9 +1991,12 @@ cf_cv_shared_soname='$cf_cv_shared_soname'
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_ada="$cf_with_ada"
cf_with_cxx_binding="$cf_with_cxx_binding"
+cf_with_manpages="$cf_with_manpages"
+cf_with_tests="$cf_with_tests"
host="$host"
target="$target"
],cat)dnl
-${MAKE-make} preinstall
+${MAKE:-make} preinstall
diff --git a/dist.mk b/dist.mk
index 551d773313f3..371f0043b3fa 100644
--- a/dist.mk
+++ b/dist.mk
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.671 2008/11/02 00:58:38 tom Exp $
+# $Id: dist.mk,v 1.810 2011/04/04 22:42:20 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@@ -36,8 +36,8 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
-NCURSES_MINOR = 7
-NCURSES_PATCH = 20081102
+NCURSES_MINOR = 9
+NCURSES_PATCH = 20110404
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@@ -57,8 +57,7 @@ GNATHTML= `type -p gnathtml || type -p gnathtml.pl`
# 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).
+# versions of 'man' 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
diff --git a/doc/html/announce.html b/doc/html/announce.html
index 234c703145a7..961e7571cf61 100644
--- a/doc/html/announce.html
+++ b/doc/html/announce.html
@@ -1,8 +1,8 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
- $Id: announce.html,v 1.52 2008/11/02 01:05:08 tom Exp $
+ $Id: announce.html,v 1.55 2011/04/04 09:46:33 tom Exp $
****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,560 +29,361 @@
* authorization. *
****************************************************************************
-->
-<HTML>
-<HEAD>
-<TITLE>Announcing ncurses 5.7</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 5.7</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 encouraged 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 through 5.6;
-very few applications will require recompilation, depending on the platform.
-These are the highlights from the change-log since ncurses 5.6 release.
-<p>
-Interface changes:
-<ul>
- <li>generate linkable stubs for some macros:
- <br>
- getattrs
-
-</ul>
-New features and improvements:
-<ul>
- <li>library
- <ul>
- <li>new flavor of the ncurses library provides rudimentary
- support for POSIX threads. Several functions are
- reentrant, but most require either a window-level or
- screen-level mutex.<br>
- (This is <em>API</em>-compatible,
- but not <em>ABI</em>-compatible with the normal library).
-
- <li>add <code>NCURSES_OPAQUE</code> symbol to curses.h, will
- use to make structs opaque in selected configurations.
-
- <li>add <code>NCURSES_EXT_FUNCS</code> and
- <code>NCURSES_EXT_COLORS</code> symbols to curses.h to make
- it simpler to tell if the extended functions and/or colors
- are declared.
-
- <li>add wresize() to C++ binding
-
- <li>eliminate fixed-buffer vsprintf() calls in C++ binding.
-
- <li>add several functions to C++ binding which wrap C functions
- that pass a WINDOW* parameter.
-
- <li>adapt mouse-handling code from menu library in form-library
-
- <li>improve tracing for form library, showing created forms,
- fields, etc.
-
- <li>make $NCURSES_NO_PADDING feature work for termcap interface .
-
- <li>add check to trace-file open, if the given name is a
- directory, add ".log" to the name and try again.
-
- <li>several new manpages: curs_legacy.3x, curs_memleaks.3x,
- curs_opaque.3x and curs_threads.3x
- </ul>
-
- <li>programs:
- <ul>
- <li>modified three test-programs to demonstrate the threading
- support in this version: ditto, rain, worm.
-
- <li>several new test-programs: demo_panels, dots_mvcur,
- inch_wide, inchs, key_name, key_names, savescreen,
- savescreen.sh test_arrays, test_get_wstr, test_getstr,
- test_instr, test_inwstr and test_opaque.
-
- <li>add <code>adacurses-config</code> to the Ada95 install.
-
- <li>modify tic <code>-f</code> option to format spaces as
- <code>\s</code> to prevent them from being lost when that
- is read back in unformatted strings.
-
- <li>The <code>tack</code> program is now distributed separately
- from ncurses.
- </ul>
-
- <li>terminal database
- <ul>
- <li>added entries:
- <ul>
- <li><code>Eterm-256color</code>,
- <code>Eterm-88color</code> and
- <code>rxvt-88color</code>
- <li><code>aterm</code>
- <li><code>konsole-256color</code>
- <li><code>mrxvt</code>
- <li><code>screen.mlterm</code>
- <li><code>screen.rxvt</code>
- <li><code>teraterm4.59</code> is now the primary primary
- teraterm entry, renamed original to
- <code>teraterm2.3</code>
- <li><code>9term</code> terminal
- <li>Newbury Data entries
- </ul>
- <li>updated/improved entries:
- <ul>
- <li><code>gnome</code> to version 2.22.3
- <li><code>h19</code>, <code>z100</code>
- <li><code>konsole</code> to version 1.6.6
- <li><code>mlterm</code>, <code>mlterm+pcfkeys</code>
- <li><code>xterm</code>, and building-blocks for function-keys
- to <a href="http://invisible-island.net/xterm/xterm.log.html#xterm_230">xterm patch #230</a>.
- </ul>
- </ul>
-</ul>
-Major bug fixes:
-<ul>
- <li>add logic to tic for cancelling strings in user-defined
- capabilities
- (this is <em>needed</em> for
- current <code>konsole</code> terminfo entry).
-
- <li>modify <code>mk-1st.awk</code> so the generated makefile rules for
- linking or installing shared libraries do not first remove the
- library, in case it is in use, e.g., <code>libncurses.so</code> by
- <code>/bin/sh</code>.
-
- <li>correct check for notimeout() in wgetch().
-
- <li>fix a sign-extension bug in infocmp's repair_acsc() function.
-
- <li>change winnstr() to stop at the end of the line.
-
- <li>make Ada95 demo_panels() example work.
-
- <li>fix for adding a non-spacing character at the beginning of a line.
-
- <li>fill in extended-color pair to make colors work
- for wide-characters using extended-colors.
-
- <li>improve refresh of window on top of multi-column characters,
- taking into account split characters on left/right window
- boundaries.
-
- <li>modify <code>win_wchnstr()</code> to ensure that only a base cell
- is returned for each multi-column character.
-
- <li>improve <code>waddch()</code> and <code>winsch()</code> handling of
- EILSEQ from <code>mbrtowc()</code> by using <code>unctrl()</code>
- to display illegal bytes rather than trying to append further bytes
- to make up a valid sequence.
-
- <li>restore <code>curs_set()</code> state after
- <code>endwin()</code>/<code>refresh()</code>
-
- <li>modify <code>keyname()</code> to use "^X" form only if
- <code>meta()</code> has been called, or if <code>keyname()</code>
- is called without initializing curses, e.g., via
- <code>initscr()</code> or <code>newterm()</code>.
-
- <li>modify <code>unctrl()</code> to check codes in 128-255 range versus
- <code>isprint()</code>.
- If they are not printable, and locale was set, use a "M-" or "~"
- sequence.
-
- <li>improve <code>resizeterm()</code> by moving ripped-off lines, and
- repainting the soft-keys.
-
- <li>modify form library to accept control characters such as newline
- in set_field_buffer(), which is compatible with Solaris.
-
- <li>use <code>NCURSES_MOUSE_MASK()</code> in definition of
- <code>BUTTON_RELEASE()</code>, etc., to make those work properly
- with the <code>--enable-ext-mouse</code> configuration
-
- <li>correct some functions in Ada95 binding which were using return
- value from C where none was returned.
-
- <li>reviewed/fixed issues reported by Coverity and Klocwork tools.
-</ul>
-
-Portability:
-<ul>
- <li>configure script:
- <ul>
- <li>new options:
- <dl>
-
- <dt>--disable-big-strings
- <dd>control whether static string tables are generated as single
- large strings (to improve startup performance), or as array
- of individual strings.
-
- <dt>--disable-relink
- <dd>control whether shared libraries are relinked (during install)
- when rpath is enabled.
-
- <dt>--disable-tic-depends
- <dd>make explicit whether tic library depends on ncurses/ncursesw
- library.
-
- <dt>--enable-mixed-case
- <dd>override the configure script's check if the filesystem
- supports mixed-case filenames.
- This allows one to control how the terminal database
- maps to the filesystem.
- For filesystems that do not support mixed-case, the library
- uses generate 2-character (hexadecimal) codes for the
- lower-level of the filesystem terminfo database
-
- <dt>--enable-reentrant
- <dd>builds a different flavor of the ncurses library (ncursest)
- which improves reentrant use of the
- library by reducing global and static variables
- (see the "--with-pthread" option for the threaded support).
-
- <dt>--enable-weak-symbols
- <dd>use weak-symbols for linking to the POSIX thread library,
- and use the same soname for the ncurses shared library
- as the normal library (caveat: the ABI is for the threaded
- library, which makes global data accessed via functions).
-
- <dt>--with-pthread
- <dd>build with the POSIX thread library (tested with AIX,
- Linux, FreeBSD, OpenBSD, HPUX, IRIX64, Solaris, Tru64).
-
- <dt>--with-ticlib
- <dd>build/install the tic-support functions in a separate library
-
- </dl>
-
- <li>improved options:
- <dl>
-
- <dt>--enable-ext-colors
- <dd>requires the wide-character configuration.
-
- <dt>--with-chtype
- <dd>ignore option value "unsigned" is always added to
- the type in curses.h; do the same for --with-mmask-t.
-
- <dt>--with-dmalloc
- <dd>build-fix for redefinition of <code>strndup</code>.
-
- <dt>--with-hashed-db
- <dd>accepts a parameter which is the install-prefix of a given
- Berkeley Database.
-
- <dt>--with-hashed-db
- <dd>the $LIBS environment variable overrides the search for the db
- library.
-
- <dt>--without-hashed-db
- <dd>assumed when "--disable-database" is used.
-
- </dl>
-
- </ul>
-
- <li>other configure/build issues:
- <ul>
- <li>build-fixes for LynxOS
- <li>modify shared-library rules to allow FreeBSD 3.x to use rpath.
- <li>build-fix for FreeBSD "contemporary" TTY interface.
- <li>build-fixes for AIX with libtool.
- <li>build-fixes for Darwin and libtool.
- <li>modify BeOS-specific ifdef's to build on Haiku.
- <li>corrected gcc options for building shared libraries on Solaris
- and IRIX64.
- <li>change shared-library configuration for OpenBSD, make rpath work.
- <li>build-fixes for using libutf8, e.g., on OpenBSD 3.7
- <li>add "-e" option in ncurses/Makefile.in when generating source-files
- to force earlier exit if the build environment fails unexpectedly.
- <li>add support for shared libraries for QNX.
- <li>change delimiter in <code>MKlib_gen.sh</code> from '%' to '@', to
- avoid substitution by IBM xlc to '#' as part of its extensions to
- digraphs.
- </ul>
-
- <li>library:
- <ul>
- <li>rewrite wrapper for <code>wcrtomb()</code>, making it work on
- Solaris. This is used in the form library to determine the length
- of the buffer needed by <code>field_buffer</code>.
- <li>add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding
- type for data manipulated by signal handlers.
- <li>set locale in misc/ncurses-config.in since it uses a range
- <li>disable GPM mouse support when $TERM does not happen to contain
- "linux", since Gpm_Open() no longer limits its assertion to terminals
- that it might handle, e.g., within "screen" in xterm.
- <li>reset mouse file-descriptor when unloading GPM library.
- </ul>
-
- <li>test programs:
- <ul>
- <li>update test programs to build/work with various UNIX curses for
- comparisons.
- </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,
-and most EXTENDED features).
-It includes 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 FreeBSD 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 256-color terminals, such as modern xterm, when configured
-using the <code>--enable-ext-colors</code> option.
-<LI>Support for 16-color terminals, such as aixterm and modern 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="https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</A>
-<DT> tin
-<DD> newsreader, supporting color, MIME
-<A HREF="http://www.tin.org/">http://www.tin.org/</A>
-</DL>
-as well as some that use ncurses for the terminfo support alone:
-<DL>
-<DT> minicom
-<DD> terminal emulator
-<br>
-<A HREF="http://alioth.debian.org/projects/minicom/">
-http://alioth.debian.org/projects/minicom/</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>
+
+<html>
+<head>
+ <meta name="generator" content=
+ "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
+
+ <title>Announcing ncurses 5.9</title>
+ <link rev="made" href="mailto:bug-ncurses@gnu.org">
+ <meta http-equiv="Content-Type" content=
+ "text/html; charset=us-ascii">
+</head>
+
+<body>
+ <h1>Announcing ncurses 5.9</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 encouraged the
+ keepers of Unix releases such as BSD/OS, FreeBSD and NetBSD to
+ switch over to ncurses.</p>
+
+ <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>
+
+ <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>
+
+ <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;.</p>
+
+ <h1>Release Notes</h1>This release is designed to be upward
+ compatible from ncurses 5.0 through 5.8; very few applications
+ will require recompilation, depending on the platform. These are
+ the highlights from the change-log since ncurses 5.8 release.
+ <p>
+ This is a bug-fix release, correcting a small number of urgent problems
+ in the ncurses library from the 5.8 release.
+ <p>
+ It also improves the Ada95 binding:
+ <ul>
+ <li>fixes a longstanding portability problem with its use of the
+ <a href="http://invisible-island.net/ncurses/man/form_fieldtype.3x">set_field_type</a>
+ function. Because that function uses variable-length argument lists,
+ its interface with gnat does not work with certain platforms.
+ <li>improves configurability and portability, particularly when built
+ separately from the main ncurses tree. The 5.8 release introduced
+ scripts which can be used to construct separate tarballs for the
+ Ada95 and ncurses examples.
+ <p>Those were a proof of concept. For the 5.9 release, those
+ scripts are augmented with rpm- and dpkg-scripts used in test builds
+ against a variety of gnat- and system ncurses versions as old as
+ gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
+ <a href="http://invisible-island.net/ncurses/ncurses-Ada95.html">here</a>.
+ <li>additional improvements were made for portability of the
+ ncurses examples, adding rpm- and dpkg-scripts for test-builds.
+ See
+ <a href="http://invisible-island.net/ncurses/ncurses-examples.html">this page</a>
+ for snapshots and other information.
+ </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>
+
+ <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>
+
+ <li>An emulation of the SVr4 panels library, supporting a stack
+ of windows with backing store, is included.</li>
+
+ <li>An emulation of the SVr4 menus library, supporting a
+ uniform but flexible interface for menu programming, is
+ included.</li>
+
+ <li>An emulation of the SVr4 form library, supporting data
+ collection through on-screen forms, is included.</li>
+
+ <li>Binary terminfo entries generated by the ncurses tic(1)
+ implementation are bit-for-bit-compatible with the entry format
+ SVr4 curses uses.</li>
+
+ <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.</li>
+ </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, and most EXTENDED features). It
+ includes many function calls not supported under SVr4 curses
+ (but portability of all calls is documented so you can use the
+ SVr4 subset only).</li>
+
+ <li>Unlike SVr3 curses, ncurses can write to the
+ rightmost-bottommost corner of the screen if your terminal has
+ an insert-character capability.</li>
+
+ <li>Ada95 and C++ bindings.</li>
+
+ <li>Support for mouse event reporting with X Window xterm and
+ FreeBSD and OS/2 console windows.</li>
+
+ <li>Extended mouse support via Alessandro Rubini's gpm
+ package.</li>
+
+ <li>The function <code>wresize</code> allows you to resize
+ windows, preserving their data.</li>
+
+ <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>
+
+ <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>
+
+ <li>Support for 256-color terminals, such as modern xterm, when
+ configured using the <code>--enable-ext-colors</code>
+ option.</li>
+
+ <li>Support for 16-color terminals, such as <em>aixterm</em>
+ and <em>modern xterm</em>.</li>
+
+ <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>
+
+ <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 <code>quickch</code>
+ routine.</li>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <li>A BSD-like tset(1) utility is provided.</li>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <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>
+
+ <li>An HTML "Introduction to Programming with NCURSES" document
+ provides a narrative introduction to the curses programming
+ interface.</li>
+ </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):</p>
+
+ <dl>
+ <dt>cdk</dt>
+
+ <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></dd>
+
+ <dt>ded</dt>
+
+ <dd>directory-editor<br>
+ <a href=
+ "http://invisible-island.net/ded/">http://invisible-island.net/ded/</a></dd>
+
+ <dt>dialog</dt>
+
+ <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></dd>
+
+ <dt>lynx</dt>
+
+ <dd>the character-screen WWW browser<br>
+ <a href=
+ "http://lynx.isc.org/release/">http://lynx.isc.org/release/</a></dd>
+
+ <dt>Midnight Commander</dt>
+
+ <dd>file manager<br>
+ <a href=
+ "http://www.midnight-commander.org/">http://www.midnight-commander.org/</a></dd>
+
+ <dt>mutt</dt>
+
+ <dd>mail utility<br>
+ <a href="http://www.mutt.org/">http://www.mutt.org/</a></dd>
+
+ <dt>ncftp</dt>
+
+ <dd>file-transfer utility<br>
+ <a href="http://www.ncftp.com/">http://www.ncftp.com/</a></dd>
+
+ <dt>nvi</dt>
+
+ <dd>New vi versions 1.50 are able to use ncurses versions 1.9.7
+ and later.<br>
+ <a href=
+ "https://sites.google.com/a/bostic.com/keithbostic/nvi">https://sites.google.com/a/bostic.com/keithbostic/nvi</a><br>
+ </dd>
+
+ <dt>pinfo</dt>
+
+ <dd>Lynx-like info browser. <a href=
+ "https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</a></dd>
+
+ <dt>tin</dt>
+
+ <dd>newsreader, supporting color, MIME <a href=
+ "http://www.tin.org/">http://www.tin.org/</a></dd>
+ </dl>as well as some that use ncurses for the terminfo support
+ alone:
+
+ <dl>
+ <dt>minicom</dt>
+
+ <dd>terminal emulator<br>
+ <a href=
+ "http://alioth.debian.org/projects/minicom/">http://alioth.debian.org/projects/minicom/</a></dd>
+
+ <dt>vile</dt>
+
+ <dd>vi-like-emacs<br>
+ <a href=
+ "http://invisible-island.net/vile/">http://invisible-island.net/vile/</a></dd>
+ </dl>
+
+ <p>The ncurses distribution includes a selection of test programs
+ (including a few games).</p>
+
+ <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:</p>
+ <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 once 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, and provides several user-definable extensions
-beyond the X/Open specification.<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:
--->
+</pre>
+
+ <p>This list is open to anyone interested in helping with the
+ development and testing of this package.</p>
+
+ <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;.</p>
+
+ <h2>Future Plans</h2>
+
+ <ul>
+ <li>Extended-level XPG4 conformance, with internationalization
+ support.</li>
+
+ <li>Ports to more systems, including DOS and Windows.</li>
+ </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 once
+ 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, and provides several
+ user-definable extensions beyond the X/Open specification.
+
+ <p>You can find lots of information on terminal-related topics
+ not covered in the terminfo file at <a href=
+ "http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal">
+ Richard Shuford's archive</a>&nbsp;.</p>
+</body>
+</html>
diff --git a/doc/html/hackguide.html b/doc/html/hackguide.html
index 97d1369170c1..417f4c9855e3 100644
--- a/doc/html/hackguide.html
+++ b/doc/html/hackguide.html
@@ -1,8 +1,8 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
- $Id: hackguide.html,v 1.27 2005/12/24 15:37:13 tom Exp $
+ $Id: hackguide.html,v 1.28 2010/12/04 16:44:21 tom Exp $
****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
diff --git a/doc/html/ncurses-intro.html b/doc/html/ncurses-intro.html
index 451e7ab4d32d..fc529f293e23 100644
--- a/doc/html/ncurses-intro.html
+++ b/doc/html/ncurses-intro.html
@@ -1,8 +1,8 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
- $Id: ncurses-intro.html,v 1.43 2007/03/03 19:31:50 tom Exp $
+ $Id: ncurses-intro.html,v 1.44 2010/12/04 16:46:22 tom Exp $
****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
diff --git a/form/Makefile.in b/form/Makefile.in
index 2bf31e15f347..1a07e140d3e9 100644
--- a/form/Makefile.in
+++ b/form/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.47 2007/04/28 14:56:11 tom Exp $
+# $Id: Makefile.in,v 1.53 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -43,6 +43,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
x = @EXEEXT@
@@ -63,6 +64,7 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@@ -70,11 +72,14 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
-AR_OPTS = @AR_OPTS@
+ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -124,7 +129,7 @@ sources : $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
# make copies to simplify include-paths while still keeping form's include
# file in this directory.
@@ -132,7 +137,7 @@ $(DESTDIR)$(libdir) :
-rm -f $@
cp $(srcdir)/form.h $@
-FORM_PRIV_H = \
+HEADER_DEPS = \
$(srcdir)/form.priv.h \
$(srcdir)/form.h \
../include/mf_common.h \
@@ -140,10 +145,10 @@ FORM_PRIV_H = \
../include/eti.h
tags:
- ctags *.[ch]
+ $(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
diff --git a/form/f_trace.c b/form/f_trace.c
index 3bb4ccd9d772..6044e03c6e3a 100644
--- a/form/f_trace.c
+++ b/form/f_trace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004 Free Software Foundation, Inc. *
+ * Copyright (c) 2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,33 +32,33 @@
#include "form.priv.h"
-MODULE_ID("$Id: f_trace.c,v 1.1 2004/12/25 23:28:49 tom Exp $")
+MODULE_ID("$Id: f_trace.c,v 1.2 2010/01/23 21:14:36 tom Exp $")
NCURSES_EXPORT(FIELD **)
_nc_retrace_field_ptr(FIELD **code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FIELD *)
_nc_retrace_field(FIELD *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FIELDTYPE *)
_nc_retrace_field_type(FIELDTYPE *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FORM *)
_nc_retrace_form(FORM *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
diff --git a/form/fld_arg.c b/form/fld_arg.c
index f79a157aa5fc..a07bdb195900 100644
--- a/form/fld_arg.c
+++ b/form/fld_arg.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_arg.c,v 1.11 2004/12/25 22:20:18 tom Exp $")
+MODULE_ID("$Id: fld_arg.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -67,7 +67,7 @@ set_fieldtype_arg(FIELDTYPE *typ,
void (*const free_arg) (void *))
{
T((T_CALLED("set_fieldtype_arg(%p,%p,%p,%p)"),
- typ, make_arg, copy_arg, free_arg));
+ (void *)typ, make_arg, copy_arg, free_arg));
if (typ != 0 && make_arg != (void *)0)
{
@@ -91,7 +91,7 @@ set_fieldtype_arg(FIELDTYPE *typ,
NCURSES_EXPORT(void *)
field_arg(const FIELD *field)
{
- T((T_CALLED("field_arg(%p)"), field));
+ T((T_CALLED("field_arg(%p)"), (const void *)field));
returnVoidPtr(Normalize_Field(field)->arg);
}
diff --git a/form/fld_attr.c b/form/fld_attr.c
index c9c08384bc7f..0112f009ecd4 100644
--- a/form/fld_attr.c
+++ b/form/fld_attr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_attr.c,v 1.10 2004/12/11 21:33:15 tom Exp $")
+MODULE_ID("$Id: fld_attr.c,v 1.11 2010/01/23 21:12:08 tom Exp $")
/*----------------------------------------------------------------------------
Field-Attribute manipulation routines
@@ -66,7 +66,7 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
#define GEN_FIELD_ATTR_GET_FCT( name ) \
NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
{\
- T((T_CALLED("field_" #name "(%p)"), field));\
+ T((T_CALLED("field_" #name "(%p)"), (const void *) field));\
returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\
}
diff --git a/form/fld_current.c b/form/fld_current.c
index 7c3a90af511d..ef9ec007ecaf 100644
--- a/form/fld_current.c
+++ b/form/fld_current.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_current.c,v 1.11 2004/12/25 22:40:13 tom Exp $")
+MODULE_ID("$Id: fld_current.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -52,7 +52,7 @@ set_current_field(FORM *form, FIELD *field)
{
int err = E_OK;
- T((T_CALLED("set_current_field(%p,%p)"), form, field));
+ T((T_CALLED("set_current_field(%p,%p)"), (void *)form, (void *)field));
if (form == 0 || field == 0)
{
RETURN(E_BAD_ARGUMENT);
@@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field)
NCURSES_EXPORT(FIELD *)
current_field(const FORM *form)
{
- T((T_CALLED("current_field(%p)"), form));
+ T((T_CALLED("current_field(%p)"), (const void *)form));
returnField(Normalize_Form(form)->current);
}
@@ -130,7 +130,7 @@ current_field(const FORM *form)
NCURSES_EXPORT(int)
field_index(const FIELD *field)
{
- T((T_CALLED("field_index(%p)"), field));
+ T((T_CALLED("field_index(%p)"), (const void *)field));
returnCode((field != 0 && field->form != 0) ? (int)field->index : -1);
}
diff --git a/form/fld_def.c b/form/fld_def.c
index 3559ba67241c..6d7bd34a16ca 100644
--- a/form/fld_def.c
+++ b/form/fld_def.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_def.c,v 1.36 2007/10/13 19:29:58 tom Exp $")
+MODULE_ID("$Id: fld_def.c,v 1.38 2010/01/23 21:14:35 tom Exp $")
/* this can't be readonly */
static FIELD default_field =
@@ -252,8 +252,8 @@ _nc_Free_Type(FIELD *field)
if (field->type != 0)
{
field->type->ref--;
+ _nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
}
- _nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
}
/*---------------------------------------------------------------------------
@@ -291,7 +291,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */
(New_Field = typeMalloc(FIELD, 1)) != 0)
{
- T((T_CREATE("field %p"), New_Field));
+ T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = default_field;
New_Field->rows = rows;
New_Field->cols = cols;
@@ -355,7 +355,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
NCURSES_EXPORT(int)
free_field(FIELD *field)
{
- T((T_CALLED("free_field(%p)"), field));
+ T((T_CALLED("free_field(%p)"), (void *)field));
if (!field)
{
RETURN(E_BAD_ARGUMENT);
diff --git a/form/fld_dup.c b/form/fld_dup.c
index bbc38a3eb715..b8e501b38329 100644
--- a/form/fld_dup.c
+++ b/form/fld_dup.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_dup.c,v 1.12 2007/10/13 19:30:21 tom Exp $")
+MODULE_ID("$Id: fld_dup.c,v 1.13 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -53,12 +53,12 @@ dup_field(FIELD *field, int frow, int fcol)
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
- T((T_CALLED("dup_field(%p,%d,%d)"), field, frow, fcol));
+ T((T_CALLED("dup_field(%p,%d,%d)"), (void *)field, frow, fcol));
if (field && (frow >= 0) && (fcol >= 0) &&
((err = E_SYSTEM_ERROR) != 0) && /* trick : this resets the default error */
(New_Field = typeMalloc(FIELD, 1)))
{
- T((T_CREATE("field %p"), New_Field));
+ T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = *_nc_Default_Field;
New_Field->frow = frow;
New_Field->fcol = fcol;
diff --git a/form/fld_ftchoice.c b/form/fld_ftchoice.c
index 9237f96d1d0c..3aac5be2b158 100644
--- a/form/fld_ftchoice.c
+++ b/form/fld_ftchoice.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_ftchoice.c,v 1.9 2004/12/11 21:44:57 tom Exp $")
+MODULE_ID("$Id: fld_ftchoice.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -51,14 +51,19 @@ set_fieldtype_choice(FIELDTYPE *typ,
bool (*const next_choice) (FIELD *, const void *),
bool (*const prev_choice) (FIELD *, const void *))
{
- T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), typ, next_choice, prev_choice));
+ T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), (void *)typ, next_choice, prev_choice));
if (!typ || !next_choice || !prev_choice)
RETURN(E_BAD_ARGUMENT);
typ->status |= _HAS_CHOICE;
+#if NCURSES_INTEROP_FUNCS
+ typ->enum_next.onext = next_choice;
+ typ->enum_prev.oprev = prev_choice;
+#else
typ->next = next_choice;
typ->prev = prev_choice;
+#endif
RETURN(E_OK);
}
diff --git a/form/fld_ftlink.c b/form/fld_ftlink.c
index 4ed2219262aa..c2cd251f42a7 100644
--- a/form/fld_ftlink.c
+++ b/form/fld_ftlink.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_ftlink.c,v 1.13 2007/10/13 19:30:35 tom Exp $")
+MODULE_ID("$Id: fld_ftlink.c,v 1.14 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -53,14 +53,14 @@ link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2)
{
FIELDTYPE *nftyp = (FIELDTYPE *)0;
- T((T_CALLED("link_fieldtype(%p,%p)"), type1, type2));
+ T((T_CALLED("link_fieldtype(%p,%p)"), (void *)type1, (void *)type2));
if (type1 && type2)
{
nftyp = typeMalloc(FIELDTYPE, 1);
if (nftyp)
{
- T((T_CREATE("fieldtype %p"), nftyp));
+ T((T_CREATE("fieldtype %p"), (void *)nftyp));
*nftyp = *_nc_Default_FieldType;
nftyp->status |= _LINKED_TYPE;
if ((type1->status & _HAS_ARGS) || (type2->status & _HAS_ARGS))
diff --git a/form/fld_info.c b/form/fld_info.c
index 324198c42bae..13fe8e72a03c 100644
--- a/form/fld_info.c
+++ b/form/fld_info.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_info.c,v 1.10 2004/12/11 22:24:57 tom Exp $")
+MODULE_ID("$Id: fld_info.c,v 1.11 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -53,10 +53,10 @@ field_info(const FIELD *field,
int *nrow, int *nbuf)
{
T((T_CALLED("field_info(%p,%p,%p,%p,%p,%p,%p)"),
- field,
- rows, cols,
- frow, fcol,
- nrow, nbuf));
+ (const void *)field,
+ (void *)rows, (void *)cols,
+ (void *)frow, (void *)fcol,
+ (void *)nrow, (void *)nbuf));
if (!field)
RETURN(E_BAD_ARGUMENT);
@@ -91,7 +91,11 @@ field_info(const FIELD *field,
NCURSES_EXPORT(int)
dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow)
{
- T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), field, drows, dcols, maxgrow));
+ T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"),
+ (const void *)field,
+ (void *)drows,
+ (void *)dcols,
+ (void *)maxgrow));
if (!field)
RETURN(E_BAD_ARGUMENT);
diff --git a/form/fld_just.c b/form/fld_just.c
index e021fb1cfb92..58a1750cc092 100644
--- a/form/fld_just.c
+++ b/form/fld_just.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_just.c,v 1.11 2004/12/11 22:55:48 tom Exp $")
+MODULE_ID("$Id: fld_just.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -49,7 +49,7 @@ set_field_just(FIELD *field, int just)
{
int res = E_BAD_ARGUMENT;
- T((T_CALLED("set_field_just(%p,%d)"), field, just));
+ T((T_CALLED("set_field_just(%p,%d)"), (void *)field, just));
if ((just == NO_JUSTIFICATION) ||
(just == JUSTIFY_LEFT) ||
@@ -79,7 +79,7 @@ set_field_just(FIELD *field, int just)
NCURSES_EXPORT(int)
field_just(const FIELD *field)
{
- T((T_CALLED("field_just(%p)"), field));
+ T((T_CALLED("field_just(%p)"), (const void *)field));
returnCode(Normalize_Field(field)->just);
}
diff --git a/form/fld_link.c b/form/fld_link.c
index 0aac7db78d12..18103bee1910 100644
--- a/form/fld_link.c
+++ b/form/fld_link.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_link.c,v 1.11 2007/10/13 19:30:43 tom Exp $")
+MODULE_ID("$Id: fld_link.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -54,12 +54,12 @@ link_field(FIELD *field, int frow, int fcol)
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
- T((T_CALLED("link_field(%p,%d,%d)"), field, frow, fcol));
+ T((T_CALLED("link_field(%p,%d,%d)"), (void *)field, frow, fcol));
if (field && (frow >= 0) && (fcol >= 0) &&
((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */
(New_Field = typeMalloc(FIELD, 1)))
{
- T((T_CREATE("field %p"), New_Field));
+ T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = *_nc_Default_Field;
New_Field->frow = frow;
New_Field->fcol = fcol;
diff --git a/form/fld_max.c b/form/fld_max.c
index 7f5352e00d6e..5ce918e4e079 100644
--- a/form/fld_max.c
+++ b/form/fld_max.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_max.c,v 1.9 2004/12/11 21:51:54 tom Exp $")
+MODULE_ID("$Id: fld_max.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_max.c,v 1.9 2004/12/11 21:51:54 tom Exp $")
NCURSES_EXPORT(int)
set_max_field(FIELD *field, int maxgrow)
{
- T((T_CALLED("set_max_field(%p,%d)"), field, maxgrow));
+ T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow));
if (!field || (maxgrow < 0))
RETURN(E_BAD_ARGUMENT);
diff --git a/form/fld_move.c b/form/fld_move.c
index d9ceaaec2c9c..dfba22d72aaa 100644
--- a/form/fld_move.c
+++ b/form/fld_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_move.c,v 1.9 2004/12/11 21:52:44 tom Exp $")
+MODULE_ID("$Id: fld_move.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_move.c,v 1.9 2004/12/11 21:52:44 tom Exp $")
NCURSES_EXPORT(int)
move_field(FIELD *field, int frow, int fcol)
{
- T((T_CALLED("move_field(%p,%d,%d)"), field, frow, fcol));
+ T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol));
if (!field || (frow < 0) || (fcol < 0))
RETURN(E_BAD_ARGUMENT);
diff --git a/form/fld_newftyp.c b/form/fld_newftyp.c
index c2984b10e3c7..4351aed6b3c8 100644
--- a/form/fld_newftyp.c
+++ b/form/fld_newftyp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,9 +32,9 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_newftyp.c,v 1.15 2007/10/13 19:30:55 tom Exp $")
+MODULE_ID("$Id: fld_newftyp.c,v 1.19 2010/01/23 21:14:36 tom Exp $")
-static FIELDTYPE const default_fieldtype =
+static FIELDTYPE default_fieldtype =
{
0, /* status */
0L, /* reference count */
@@ -43,13 +43,16 @@ static FIELDTYPE const default_fieldtype =
NULL, /* makearg function */
NULL, /* copyarg function */
NULL, /* freearg function */
- NULL, /* field validation function */
- NULL, /* Character check function */
- NULL, /* enumerate next function */
- NULL /* enumerate previous function */
+ INIT_FT_FUNC(NULL), /* field validation function */
+ INIT_FT_FUNC(NULL), /* Character check function */
+ INIT_FT_FUNC(NULL), /* enumerate next function */
+ INIT_FT_FUNC(NULL), /* enumerate previous function */
+#if NCURSES_INTEROP_FUNCS
+ NULL /* generic callback alternative to makearg */
+#endif
};
-NCURSES_EXPORT_VAR(const FIELDTYPE *)
+NCURSES_EXPORT_VAR(FIELDTYPE *)
_nc_Default_FieldType = &default_fieldtype;
/*---------------------------------------------------------------------------
@@ -80,10 +83,15 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
if (nftyp)
{
- T((T_CREATE("fieldtype %p"), nftyp));
+ T((T_CREATE("fieldtype %p"), (void *)nftyp));
*nftyp = default_fieldtype;
+#if NCURSES_INTEROP_FUNCS
+ nftyp->fieldcheck.ofcheck = field_check;
+ nftyp->charcheck.occheck = char_check;
+#else
nftyp->fcheck = field_check;
nftyp->ccheck = char_check;
+#endif
}
else
{
@@ -110,7 +118,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
NCURSES_EXPORT(int)
free_fieldtype(FIELDTYPE *typ)
{
- T((T_CALLED("free_fieldtype(%p)"), typ));
+ T((T_CALLED("free_fieldtype(%p)"), (void *)typ));
if (!typ)
RETURN(E_BAD_ARGUMENT);
diff --git a/form/fld_opts.c b/form/fld_opts.c
index 3c881acf081a..a52f1e2ad88f 100644
--- a/form/fld_opts.c
+++ b/form/fld_opts.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_opts.c,v 1.11 2004/12/11 21:55:46 tom Exp $")
+MODULE_ID("$Id: fld_opts.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
/*----------------------------------------------------------------------------
Field-Options manipulation routines
@@ -55,7 +55,7 @@ set_field_opts(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
- T((T_CALLED("set_field_opts(%p,%d)"), field, opts));
+ T((T_CALLED("set_field_opts(%p,%d)"), (void *)field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
@@ -74,7 +74,7 @@ set_field_opts(FIELD *field, Field_Options opts)
NCURSES_EXPORT(Field_Options)
field_opts(const FIELD *field)
{
- T((T_CALLED("field_opts(%p)"), field));
+ T((T_CALLED("field_opts(%p)"), (const void *)field));
returnCode(ALL_FIELD_OPTS & Normalize_Field(field)->opts);
}
@@ -96,7 +96,7 @@ field_opts_on(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
- T((T_CALLED("field_opts_on(%p,%d)"), field, opts));
+ T((T_CALLED("field_opts_on(%p,%d)"), (void *)field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
@@ -124,7 +124,7 @@ field_opts_off(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
- T((T_CALLED("field_opts_off(%p,%d)"), field, opts));
+ T((T_CALLED("field_opts_off(%p,%d)"), (void *)field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
diff --git a/form/fld_pad.c b/form/fld_pad.c
index 63d8ad1cdbfa..4f8ff1f54f04 100644
--- a/form/fld_pad.c
+++ b/form/fld_pad.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_pad.c,v 1.9 2004/12/11 21:56:49 tom Exp $")
+MODULE_ID("$Id: fld_pad.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -50,7 +50,7 @@ set_field_pad(FIELD *field, int ch)
{
int res = E_BAD_ARGUMENT;
- T((T_CALLED("set_field_pad(%p,%d)"), field, ch));
+ T((T_CALLED("set_field_pad(%p,%d)"), (void *)field, ch));
Normalize_Field(field);
if (isprint(UChar(ch)))
@@ -77,7 +77,7 @@ set_field_pad(FIELD *field, int ch)
NCURSES_EXPORT(int)
field_pad(const FIELD *field)
{
- T((T_CALLED("field_pad(%p)"), field));
+ T((T_CALLED("field_pad(%p)"), (const void *)field));
returnCode(Normalize_Field(field)->pad);
}
diff --git a/form/fld_page.c b/form/fld_page.c
index e1af4962b148..e4d18c556be6 100644
--- a/form/fld_page.c
+++ b/form/fld_page.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_page.c,v 1.9 2004/12/11 21:58:19 tom Exp $")
+MODULE_ID("$Id: fld_page.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_page.c,v 1.9 2004/12/11 21:58:19 tom Exp $")
NCURSES_EXPORT(int)
set_new_page(FIELD *field, bool new_page_flag)
{
- T((T_CALLED("set_new_page(%p,%d)"), field, new_page_flag));
+ T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag));
Normalize_Field(field);
if (field->form)
@@ -74,7 +74,7 @@ set_new_page(FIELD *field, bool new_page_flag)
NCURSES_EXPORT(bool)
new_page(const FIELD *field)
{
- T((T_CALLED("new_page(%p)"), field));
+ T((T_CALLED("new_page(%p)"), (const void *)field));
returnBool((Normalize_Field(field)->status & _NEWPAGE) ? TRUE : FALSE);
}
diff --git a/form/fld_stat.c b/form/fld_stat.c
index b85b4d55f244..46f89e674836 100644
--- a/form/fld_stat.c
+++ b/form/fld_stat.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $")
+MODULE_ID("$Id: fld_stat.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $")
NCURSES_EXPORT(int)
set_field_status(FIELD *field, bool status)
{
- T((T_CALLED("set_field_status(%p,%d)"), field, status));
+ T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
Normalize_Field(field);
@@ -71,7 +71,7 @@ set_field_status(FIELD *field, bool status)
NCURSES_EXPORT(bool)
field_status(const FIELD *field)
{
- T((T_CALLED("field_status(%p)"), field));
+ T((T_CALLED("field_status(%p)"), (const void *)field));
returnBool((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE);
}
diff --git a/form/fld_type.c b/form/fld_type.c
index c9a3fbe5c804..0b35b7eb9e56 100644
--- a/form/fld_type.c
+++ b/form/fld_type.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_type.c,v 1.15 2004/12/25 22:24:10 tom Exp $")
+MODULE_ID("$Id: fld_type.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -52,7 +52,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
int res = E_SYSTEM_ERROR;
int err = 0;
- T((T_CALLED("set_field_type(%p,%p)"), field, type));
+ T((T_CALLED("set_field_type(%p,%p)"), (void *)field, (void *)type));
va_start(ap, type);
@@ -90,7 +90,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
NCURSES_EXPORT(FIELDTYPE *)
field_type(const FIELD *field)
{
- T((T_CALLED("field_type(%p)"), field));
+ T((T_CALLED("field_type(%p)"), (const void *)field));
returnFieldType(Normalize_Field(field)->type);
}
diff --git a/form/fld_user.c b/form/fld_user.c
index 323622c7b379..30bcf7a415d4 100644
--- a/form/fld_user.c
+++ b/form/fld_user.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_user.c,v 1.15 2004/12/25 22:24:50 tom Exp $")
+MODULE_ID("$Id: fld_user.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_user.c,v 1.15 2004/12/25 22:24:50 tom Exp $")
NCURSES_EXPORT(int)
set_field_userptr(FIELD *field, void *usrptr)
{
- T((T_CALLED("set_field_userptr(%p,%p)"), field, usrptr));
+ T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr));
Normalize_Field(field)->usrptr = usrptr;
RETURN(E_OK);
@@ -65,7 +65,7 @@ set_field_userptr(FIELD *field, void *usrptr)
NCURSES_EXPORT(void *)
field_userptr(const FIELD *field)
{
- T((T_CALLED("field_userptr(%p)"), field));
+ T((T_CALLED("field_userptr(%p)"), (const void *)field));
returnVoidPtr(Normalize_Field(field)->usrptr);
}
diff --git a/form/form.h b/form/form.h
index a4691a86e8e7..f52893b952d6 100644
--- a/form/form.h
+++ b/form/form.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
-/* $Id: form.h,v 0.20 2004/12/04 22:22:10 tom Exp $ */
+/* $Id: form.h,v 0.21 2009/11/07 19:31:11 tom Exp $ */
#ifndef FORM_H
#define FORM_H
@@ -105,34 +105,13 @@ typedef struct fieldnode {
NCURSES_FIELD_INTERNALS
} FIELD;
- /**************
- * FIELDTYPE *
- **************/
-
-typedef struct typenode {
- unsigned short status; /* flags */
- long ref; /* reference count */
- struct typenode * left; /* ptr to operand for | */
- struct typenode * right; /* ptr to operand for | */
-
- void* (*makearg)(va_list *); /* make fieldtype arg */
- void* (*copyarg)(const void *); /* copy fieldtype arg */
- void (*freearg)(void *); /* free fieldtype arg */
-
- bool (*fcheck)(FIELD *,const void *); /* field validation */
- bool (*ccheck)(int,const void *); /* character validation */
-
- bool (*next)(FIELD *,const void *); /* enumerate next value */
- bool (*prev)(FIELD *,const void *); /* enumerate prev value */
-
-} FIELDTYPE;
/*********
* FORM *
*********/
typedef struct formnode {
- unsigned short status; /* flags */
+ unsigned short status; /* flags */
short rows; /* size in rows */
short cols; /* size in cols */
int currow; /* current row in field window */
@@ -158,6 +137,49 @@ typedef struct formnode {
} FORM;
+
+ /**************
+ * FIELDTYPE *
+ **************/
+
+typedef struct typenode {
+ unsigned short status; /* flags */
+ long ref; /* reference count */
+ struct typenode * left; /* ptr to operand for | */
+ struct typenode * right; /* ptr to operand for | */
+
+ void* (*makearg)(va_list *); /* make fieldtype arg */
+ void* (*copyarg)(const void *); /* copy fieldtype arg */
+ void (*freearg)(void *); /* free fieldtype arg */
+
+#if NCURSES_INTEROP_FUNCS
+ union {
+ bool (*ofcheck)(FIELD *,const void *); /* field validation */
+ bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */
+ } fieldcheck;
+ union {
+ bool (*occheck)(int,const void *); /* character validation */
+ bool (*gccheck)(int,FORM*,
+ FIELD*,const void*); /* generic char validation */
+ } charcheck;
+ union {
+ bool (*onext)(FIELD *,const void *); /* enumerate next value */
+ bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */
+ } enum_next;
+ union {
+ bool (*oprev)(FIELD *,const void *); /* enumerate prev value */
+ bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */
+ } enum_prev;
+ void* (*genericarg)(void*); /* Alternate Arg method */
+#else
+ bool (*fcheck)(FIELD *,const void *); /* field validation */
+ bool (*ccheck)(int,const void *); /* character validation */
+
+ bool (*next)(FIELD *,const void *); /* enumerate next value */
+ bool (*prev)(FIELD *,const void *); /* enumerate prev value */
+#endif
+} FIELDTYPE;
+
typedef void (*Form_Hook)(FORM *);
/***************************
@@ -279,13 +301,6 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
/***********************
- * Default objects *
- ***********************/
-extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form;
-extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field;
-
-
- /***********************
* FIELDTYPE routines *
***********************/
extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype (
@@ -396,6 +411,10 @@ extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *);
extern NCURSES_EXPORT(bool) data_ahead (const FORM *);
extern NCURSES_EXPORT(bool) data_behind (const FORM *);
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/form/form.priv.h b/form/form.priv.h
index fea627d30d7d..49250b4e5b3b 100644
--- a/form/form.priv.h
+++ b/form/form.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
-/* $Id: form.priv.h,v 0.27 2008/09/08 20:29:05 tom Exp $ */
+/* $Id: form.priv.h,v 0.32 2009/11/07 21:26:43 tom Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
@@ -62,6 +62,13 @@
#include "form.h"
+ /***********************
+ * Default objects *
+ ***********************/
+extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form;
+extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field;
+extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
+
/* form status values */
#define _OVLMODE (0x04U) /* Form is in overlay mode */
#define _WINDOW_MODIFIED (0x10U) /* Current field window has been modified */
@@ -78,6 +85,7 @@
#define _HAS_ARGS (0x02U) /* Type has arguments */
#define _HAS_CHOICE (0x04U) /* Type has choice methods */
#define _RESIDENT (0x08U) /* Type is built-in */
+#define _GENERIC (0x10U) /* A generic field type */
/* This are the field options required to be a selectable field in field
navigation requests */
@@ -91,9 +99,20 @@
#define Normalize_Field(field) \
((field) = (field != 0) ? (field) : _nc_Default_Field)
+#if NCURSES_SP_FUNCS
+#define Get_Form_Screen(form) \
+ ((form)->win ? _nc_screen_of((form->win)):CURRENT_SCREEN)
+#else
+#define Get_Form_Screen(form) CURRENT_SCREEN
+#endif
+
/* Retrieve forms window */
#define Get_Form_Window(form) \
- ((form)->sub?(form)->sub:((form)->win?(form)->win:stdscr))
+ ((form)->sub \
+ ? (form)->sub \
+ : ((form)->win \
+ ? (form)->win \
+ : StdScreen(Get_Form_Screen(form))))
/* Calculate the size for a single buffer for this field */
#define Buffer_Length(field) ((field)->drows * (field)->dcols)
@@ -144,8 +163,6 @@ TypeArgument;
#define C_ZEROS '\0'
-extern NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType;
-
extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
@@ -161,6 +178,36 @@ extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*);
extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
+#if NCURSES_INTEROP_FUNCS
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void);
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void);
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void);
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void);
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
+extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
+
+extern NCURSES_EXPORT(FIELDTYPE *)
+_nc_generic_fieldtype(bool (*const field_check) (FORM*,
+ FIELD *,
+ const void *),
+ bool (*const char_check) (int,
+ FORM*,
+ FIELD*,
+ const void *),
+ bool (*const next)(FORM*,FIELD*,const void*),
+ bool (*const prev)(FORM*,FIELD*,const void*),
+ void (*freecallback)(void*));
+extern NCURSES_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**));
+extern NCURSES_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* );
+
+#define INIT_FT_FUNC(func) {func}
+#else
+#define INIT_FT_FUNC(func) func
+#endif
+
+extern NCURSES_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*);
+
#if USE_WIDEC_SUPPORT
extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
#endif
@@ -176,8 +223,8 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **);
extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *);
-extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *);
-extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook);
+extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *);
+extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook);
#else /* !TRACE */
diff --git a/form/frm_cursor.c b/form/frm_cursor.c
index 18dabab20889..7a4cd16116fc 100644
--- a/form/frm_cursor.c
+++ b/form/frm_cursor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_cursor.c,v 1.9 2004/12/11 22:01:03 tom Exp $")
+MODULE_ID("$Id: frm_cursor.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -53,7 +53,7 @@ pos_form_cursor(FORM *form)
{
int res;
- T((T_CALLED("pos_form_cursor(%p)"), form));
+ T((T_CALLED("pos_form_cursor(%p)"), (void *)form));
if (!form)
res = E_BAD_ARGUMENT;
diff --git a/form/frm_data.c b/form/frm_data.c
index 787a17919f04..93917d5bbea1 100644
--- a/form/frm_data.c
+++ b/form/frm_data.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_data.c,v 1.14 2005/11/26 15:34:01 tom Exp $")
+MODULE_ID("$Id: frm_data.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -49,7 +49,7 @@ data_behind(const FORM *form)
{
bool result = FALSE;
- T((T_CALLED("data_behind(%p)"), form));
+ T((T_CALLED("data_behind(%p)"), (const void *)form));
if (form && (form->status & _POSTED) && form->current)
{
@@ -136,7 +136,7 @@ data_ahead(const FORM *form)
{
bool result = FALSE;
- T((T_CALLED("data_ahead(%p)"), form));
+ T((T_CALLED("data_ahead(%p)"), (const void *)form));
if (form && (form->status & _POSTED) && form->current)
{
diff --git a/form/frm_def.c b/form/frm_def.c
index e6897514ffdd..86500f239863 100644
--- a/form/frm_def.c
+++ b/form/frm_def.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_def.c,v 1.23 2008/08/04 00:07:55 tom Exp $")
+MODULE_ID("$Id: frm_def.c,v 1.25 2010/01/23 21:14:36 tom Exp $")
/* this can't be readonly */
static FORM default_form =
@@ -160,7 +160,7 @@ Connect_Fields(FORM *form, FIELD **fields)
int maximum_row_in_field, maximum_col_in_field;
_PAGE *pg;
- T((T_CALLED("Connect_Fields(%p,%p)"), form, fields));
+ T((T_CALLED("Connect_Fields(%p,%p)"), (void *)form, (void *)fields));
assert(form);
@@ -188,7 +188,7 @@ Connect_Fields(FORM *form, FIELD **fields)
/* allocate page structures */
if ((pg = typeMalloc(_PAGE, page_nr)) != (_PAGE *) 0)
{
- T((T_CREATE("_PAGE %p"), pg));
+ T((T_CREATE("_PAGE %p"), (void *)pg));
form->page = pg;
}
else
@@ -283,7 +283,7 @@ Associate_Fields(FORM *form, FIELD **fields)
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : FORM *new_form( FIELD **fields )
+| Function : FORM *new_form_sp(SCREEN* sp, FIELD** fields )
|
| Description : Create new form with given array of fields.
|
@@ -295,21 +295,31 @@ Associate_Fields(FORM *form, FIELD **fields)
| E_SYSTEM_ERROR - not enough memory
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FORM *)
-new_form(FIELD **fields)
+NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
{
int err = E_SYSTEM_ERROR;
+ FORM *form = (FORM *)0;
- FORM *form = typeMalloc(FORM, 1);
+ T((T_CALLED("new_form(%p,%p)"), (void *)SP_PARM, (void *)fields));
- T((T_CALLED("new_form(%p)"), fields));
- if (form)
+ if (IsValidScreen(SP_PARM))
{
- T((T_CREATE("form %p"), form));
- *form = *_nc_Default_Form;
- if ((err = Associate_Fields(form, fields)) != E_OK)
+ form = typeMalloc(FORM, 1);
+
+ if (form)
{
- free_form(form);
- form = (FORM *)0;
+ T((T_CREATE("form %p"), (void *)form));
+ *form = *_nc_Default_Form;
+ /* This ensures win and sub are always non-null,
+ so we can derive always the SCREEN that this form is
+ running on. */
+ form->win = StdScreen(SP_PARM);
+ form->sub = StdScreen(SP_PARM);
+ if ((err = Associate_Fields(form, fields)) != E_OK)
+ {
+ free_form(form);
+ form = (FORM *)0;
+ }
}
}
@@ -321,6 +331,27 @@ new_form(FIELD **fields)
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : FORM* new_form(FIELD** fields )
+|
+| Description : Create new form with given array of fields.
+|
+| Return Values : Pointer to form. NULL if error occurred.
+! Set errno:
+| E_OK - success
+| E_BAD_ARGUMENT - Invalid form pointer or field array
+| E_CONNECTED - a field is already connected
+| E_SYSTEM_ERROR - not enough memory
++--------------------------------------------------------------------------*/
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(FORM *)
+new_form(FIELD **fields)
+{
+ return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields);
+}
+#endif
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : int free_form( FORM *form )
|
| Description : Release internal memory associated with form.
@@ -332,7 +363,7 @@ new_form(FIELD **fields)
NCURSES_EXPORT(int)
free_form(FORM *form)
{
- T((T_CALLED("free_form(%p)"), form));
+ T((T_CALLED("free_form(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
@@ -366,7 +397,7 @@ set_form_fields(FORM *form, FIELD **fields)
FIELD **old;
int res;
- T((T_CALLED("set_form_fields(%p,%p)"), form, fields));
+ T((T_CALLED("set_form_fields(%p,%p)"), (void *)form, (void *)fields));
if (!form)
RETURN(E_BAD_ARGUMENT);
@@ -394,7 +425,7 @@ set_form_fields(FORM *form, FIELD **fields)
NCURSES_EXPORT(FIELD **)
form_fields(const FORM *form)
{
- T((T_CALLED("form_field(%p)"), form));
+ T((T_CALLED("form_field(%p)"), (const void *)form));
returnFieldPtr(Normalize_Form(form)->field);
}
@@ -409,7 +440,7 @@ form_fields(const FORM *form)
NCURSES_EXPORT(int)
field_count(const FORM *form)
{
- T((T_CALLED("field_count(%p)"), form));
+ T((T_CALLED("field_count(%p)"), (const void *)form));
returnCode(Normalize_Form(form)->maxfield);
}
diff --git a/form/frm_driver.c b/form/frm_driver.c
index 94323ed27788..e0892bf8d4f2 100644
--- a/form/frm_driver.c
+++ b/form/frm_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.98 2010/05/01 21:11:43 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@@ -188,7 +188,7 @@ static int FE_Delete_Previous(FORM *);
/* Macro to set the attributes for a fields window */
#define Set_Field_Window_Attributes(field,win) \
( wbkgdset((win),(chtype)((field)->pad | (field)->back)), \
- wattrset((win),(field)->fore) )
+ (void) wattrset((win),(field)->fore) )
/* Logic to decide whether or not a field really appears on the form */
#define Field_Really_Appears(field) \
@@ -512,9 +512,10 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void Window_To_Buffer(
+| Function : void _nc_get_fieldbuffer(
| WINDOW * win,
-| FIELD * field)
+| FIELD * field,
+| FIELD_CELL * buf)
|
| Description : Copy the content of the window into the buffer.
| The multiple lines of a window are simply
@@ -523,18 +524,22 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-static void
-Window_To_Buffer(WINDOW *win, FIELD *field)
+NCURSES_EXPORT(void)
+_nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf)
{
int pad;
int len = 0;
FIELD_CELL *p;
int row, height;
+ WINDOW *win;
- assert(win && field && field->buf);
+ assert(form && field && buf);
+
+ win = form->w;
+ assert(win);
pad = field->pad;
- p = field->buf;
+ p = buf;
height = getmaxy(win);
for (row = 0; (row < height) && (row < field->drows); row++)
@@ -563,6 +568,25 @@ Window_To_Buffer(WINDOW *win, FIELD *field)
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void Window_To_Buffer(
+| FORM * form,
+| FIELD * field)
+|
+| Description : Copy the content of the window into the buffer.
+| The multiple lines of a window are simply
+| concatenated into the buffer. Pad characters in
+| the window will be replaced by blanks in the buffer.
+|
+| Return Values : -
++--------------------------------------------------------------------------*/
+static void
+Window_To_Buffer(FORM *form, FIELD *field)
+{
+ _nc_get_fieldbuffer(form, field, field->buf);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void Synchronize_Buffer(FORM * form)
|
| Description : If there was a change, copy the content of the
@@ -579,7 +603,7 @@ Synchronize_Buffer(FORM *form)
{
form->status &= ~_WINDOW_MODIFIED;
form->status |= _FCHECK_REQUIRED;
- Window_To_Buffer(form->w, form->current);
+ Window_To_Buffer(form, form->current);
wmove(form->w, form->currow, form->curcol);
}
}
@@ -663,7 +687,7 @@ Field_Grown(FIELD *field, int amount)
result = TRUE; /* allow sharing of recovery on failure */
- T((T_CREATE("fieldcell %p"), newbuf));
+ T((T_CREATE("fieldcell %p"), (void *)newbuf));
field->buf = newbuf;
for (i = 0; i <= field->nbuf; i++)
{
@@ -752,7 +776,7 @@ Field_Grown(FIELD *field, int amount)
static int
Field_encloses(FIELD *field, int ry, int rx)
{
- T((T_CALLED("Field_encloses(%p)"), field));
+ T((T_CALLED("Field_encloses(%p)"), (void *)field));
if (field != 0
&& field->frow <= ry
&& (field->frow + field->rows) > ry
@@ -825,7 +849,7 @@ _nc_Refresh_Current_Field(FORM *form)
WINDOW *formwin;
FIELD *field;
- T((T_CALLED("_nc_Refresh_Current_Field(%p)"), form));
+ T((T_CALLED("_nc_Refresh_Current_Field(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
@@ -1010,7 +1034,8 @@ Undo_Justification(FIELD *field, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static bool Check_Char(
+| Function : static bool Check_Char(FORM *form,
+| FIELD *field,
| FIELDTYPE * typ,
| int ch,
| TypeArgument *argp)
@@ -1022,7 +1047,11 @@ Undo_Justification(FIELD *field, WINDOW *win)
| FALSE - Character is invalid
+--------------------------------------------------------------------------*/
static bool
-Check_Char(FIELDTYPE *typ, int ch, TypeArgument *argp)
+Check_Char(FORM *form,
+ FIELD *field,
+ FIELDTYPE *typ,
+ int ch,
+ TypeArgument *argp)
{
if (typ)
{
@@ -1030,13 +1059,23 @@ Check_Char(FIELDTYPE *typ, int ch, TypeArgument *argp)
{
assert(argp);
return (
- Check_Char(typ->left, ch, argp->left) ||
- Check_Char(typ->right, ch, argp->right));
+ Check_Char(form, field, typ->left, ch, argp->left) ||
+ Check_Char(form, field, typ->right, ch, argp->right));
}
else
{
+#if NCURSES_INTEROP_FUNCS
+ if (typ->charcheck.occheck)
+ {
+ if (typ->status & _GENERIC)
+ return typ->charcheck.gccheck(ch, form, field, (void *)argp);
+ else
+ return typ->charcheck.occheck(ch, (void *)argp);
+ }
+#else
if (typ->ccheck)
return typ->ccheck(ch, (void *)argp);
+#endif
}
}
return (!iscntrl(UChar(ch)) ? TRUE : FALSE);
@@ -1073,9 +1112,13 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag)
else
{
if (field->opts & O_VISIBLE)
- Set_Field_Window_Attributes(field, win);
+ {
+ Set_Field_Window_Attributes(field, win);
+ }
else
- wattrset(win, WINDOW_ATTRS(fwin));
+ {
+ (void)wattrset(win, WINDOW_ATTRS(fwin));
+ }
werase(win);
}
@@ -1197,7 +1240,7 @@ _nc_Synchronize_Attributes(FIELD *field)
int res = E_OK;
WINDOW *formwin;
- T((T_CALLED("_nc_Synchronize_Attributes(%p)"), field));
+ T((T_CALLED("_nc_Synchronize_Attributes(%p)"), (void *)field));
if (!field)
returnCode(E_BAD_ARGUMENT);
@@ -1264,7 +1307,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
FORM *form;
int res = E_OK;
- T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), field, newopts));
+ T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), (void *)field, newopts));
if (!field)
returnCode(E_BAD_ARGUMENT);
@@ -1276,14 +1319,13 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
if (form)
{
- if (form->current == field)
- {
- field->opts = oldopts;
- returnCode(E_CURRENT);
- }
-
if (form->status & _POSTED)
{
+ if (form->current == field)
+ {
+ field->opts = oldopts;
+ returnCode(E_CURRENT);
+ }
if ((form->curpage == field->page))
{
if (changed_opts & O_VISIBLE)
@@ -1365,7 +1407,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
FIELD *field;
WINDOW *new_window;
- T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), form, newfield));
+ T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), (void *)form, (void *)newfield));
if (!form || !newfield || !form->current || (newfield->form != form))
returnCode(E_BAD_ARGUMENT);
@@ -1399,7 +1441,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
{
if (Justification_Allowed(field))
{
- Window_To_Buffer(form->w, field);
+ Window_To_Buffer(form, field);
werase(form->w);
Perform_Justification(field, form->w);
wsyncup(form->w);
@@ -1472,7 +1514,7 @@ IFN_Next_Character(FORM *form)
FIELD *field = form->current;
int step = myWCWIDTH(form->w, form->currow, form->curcol);
- T((T_CALLED("IFN_Next_Character(%p)"), form));
+ T((T_CALLED("IFN_Next_Character(%p)"), (void *)form));
if ((form->curcol += step) == field->dcols)
{
if ((++(form->currow)) == field->drows)
@@ -1514,7 +1556,7 @@ IFN_Previous_Character(FORM *form)
int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1);
int oldcol = form->curcol;
- T((T_CALLED("IFN_Previous_Character(%p)"), form));
+ T((T_CALLED("IFN_Previous_Character(%p)"), (void *)form));
if ((form->curcol -= amount) < 0)
{
if ((--(form->currow)) < 0)
@@ -1542,7 +1584,7 @@ IFN_Next_Line(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("IFN_Next_Line(%p)"), form));
+ T((T_CALLED("IFN_Next_Line(%p)"), (void *)form));
if ((++(form->currow)) == field->drows)
{
#if GROW_IF_NAVIGATE
@@ -1568,7 +1610,7 @@ IFN_Next_Line(FORM *form)
static int
IFN_Previous_Line(FORM *form)
{
- T((T_CALLED("IFN_Previous_Line(%p)"), form));
+ T((T_CALLED("IFN_Previous_Line(%p)"), (void *)form));
if ((--(form->currow)) < 0)
{
form->currow++;
@@ -1595,7 +1637,7 @@ IFN_Next_Word(FORM *form)
FIELD_CELL *s;
FIELD_CELL *t;
- T((T_CALLED("IFN_Next_Word(%p)"), form));
+ T((T_CALLED("IFN_Next_Word(%p)"), (void *)form));
/* We really need access to the data, so we have to synchronize */
Synchronize_Buffer(form);
@@ -1638,7 +1680,7 @@ IFN_Previous_Word(FORM *form)
FIELD_CELL *t;
bool again = FALSE;
- T((T_CALLED("IFN_Previous_Word(%p)"), form));
+ T((T_CALLED("IFN_Previous_Word(%p)"), (void *)form));
/* We really need access to the data, so we have to synchronize */
Synchronize_Buffer(form);
@@ -1688,7 +1730,7 @@ IFN_Beginning_Of_Field(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("IFN_Beginning_Of_Field(%p)"), form));
+ T((T_CALLED("IFN_Beginning_Of_Field(%p)"), (void *)form));
Synchronize_Buffer(form);
Adjust_Cursor_Position(form,
Get_Start_Of_Data(field->buf, Buffer_Length(field)));
@@ -1712,7 +1754,7 @@ IFN_End_Of_Field(FORM *form)
FIELD *field = form->current;
FIELD_CELL *pos;
- T((T_CALLED("IFN_End_Of_Field(%p)"), form));
+ T((T_CALLED("IFN_End_Of_Field(%p)"), (void *)form));
Synchronize_Buffer(form);
pos = After_End_Of_Data(field->buf, Buffer_Length(field));
if (pos == (field->buf + Buffer_Length(field)))
@@ -1735,7 +1777,7 @@ IFN_Beginning_Of_Line(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("IFN_Beginning_Of_Line(%p)"), form));
+ T((T_CALLED("IFN_Beginning_Of_Line(%p)"), (void *)form));
Synchronize_Buffer(form);
Adjust_Cursor_Position(form,
Get_Start_Of_Data(Address_Of_Current_Row_In_Buffer(form),
@@ -1761,7 +1803,7 @@ IFN_End_Of_Line(FORM *form)
FIELD_CELL *pos;
FIELD_CELL *bp;
- T((T_CALLED("IFN_End_Of_Line(%p)"), form));
+ T((T_CALLED("IFN_End_Of_Line(%p)"), (void *)form));
Synchronize_Buffer(form);
bp = Address_Of_Current_Row_In_Buffer(form);
pos = After_End_Of_Data(bp, field->dcols);
@@ -1787,7 +1829,7 @@ IFN_Left_Character(FORM *form)
int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1);
int oldcol = form->curcol;
- T((T_CALLED("IFN_Left_Character(%p)"), form));
+ T((T_CALLED("IFN_Left_Character(%p)"), (void *)form));
if ((form->curcol -= amount) < 0)
{
form->curcol = oldcol;
@@ -1812,7 +1854,7 @@ IFN_Right_Character(FORM *form)
int amount = myWCWIDTH(form->w, form->currow, form->curcol);
int oldcol = form->curcol;
- T((T_CALLED("IFN_Right_Character(%p)"), form));
+ T((T_CALLED("IFN_Right_Character(%p)"), (void *)form));
if ((form->curcol += amount) >= form->current->dcols)
{
#if GROW_IF_NAVIGATE
@@ -1840,7 +1882,7 @@ IFN_Right_Character(FORM *form)
static int
IFN_Up_Character(FORM *form)
{
- T((T_CALLED("IFN_Up_Character(%p)"), form));
+ T((T_CALLED("IFN_Up_Character(%p)"), (void *)form));
if ((--(form->currow)) < 0)
{
form->currow++;
@@ -1864,7 +1906,7 @@ IFN_Down_Character(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("IFN_Down_Character(%p)"), form));
+ T((T_CALLED("IFN_Down_Character(%p)"), (void *)form));
if ((++(form->currow)) == field->drows)
{
#if GROW_IF_NAVIGATE
@@ -1973,7 +2015,7 @@ Vertical_Scrolling(int (*const fct) (FORM *), FORM *form)
static int
VSC_Scroll_Line_Forward(FORM *form)
{
- T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), form));
+ T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), (void *)form));
returnCode(VSC_Generic(form, 1));
}
@@ -1989,7 +2031,7 @@ VSC_Scroll_Line_Forward(FORM *form)
static int
VSC_Scroll_Line_Backward(FORM *form)
{
- T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), form));
+ T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), (void *)form));
returnCode(VSC_Generic(form, -1));
}
@@ -2005,7 +2047,7 @@ VSC_Scroll_Line_Backward(FORM *form)
static int
VSC_Scroll_Page_Forward(FORM *form)
{
- T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), form));
+ T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), (void *)form));
returnCode(VSC_Generic(form, form->current->rows));
}
@@ -2021,7 +2063,7 @@ VSC_Scroll_Page_Forward(FORM *form)
static int
VSC_Scroll_Half_Page_Forward(FORM *form)
{
- T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), form));
+ T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), (void *)form));
returnCode(VSC_Generic(form, (form->current->rows + 1) / 2));
}
@@ -2037,7 +2079,7 @@ VSC_Scroll_Half_Page_Forward(FORM *form)
static int
VSC_Scroll_Page_Backward(FORM *form)
{
- T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), form));
+ T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), (void *)form));
returnCode(VSC_Generic(form, -(form->current->rows)));
}
@@ -2053,7 +2095,7 @@ VSC_Scroll_Page_Backward(FORM *form)
static int
VSC_Scroll_Half_Page_Backward(FORM *form)
{
- T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), form));
+ T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), (void *)form));
returnCode(VSC_Generic(form, -((form->current->rows + 1) / 2)));
}
/*----------------------------------------------------------------------------
@@ -2147,7 +2189,7 @@ Horizontal_Scrolling(int (*const fct) (FORM *), FORM *form)
static int
HSC_Scroll_Char_Forward(FORM *form)
{
- T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), form));
+ T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), (void *)form));
returnCode(HSC_Generic(form, 1));
}
@@ -2163,7 +2205,7 @@ HSC_Scroll_Char_Forward(FORM *form)
static int
HSC_Scroll_Char_Backward(FORM *form)
{
- T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), form));
+ T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), (void *)form));
returnCode(HSC_Generic(form, -1));
}
@@ -2179,7 +2221,7 @@ HSC_Scroll_Char_Backward(FORM *form)
static int
HSC_Horizontal_Line_Forward(FORM *form)
{
- T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), form));
+ T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), (void *)form));
returnCode(HSC_Generic(form, form->current->cols));
}
@@ -2195,7 +2237,7 @@ HSC_Horizontal_Line_Forward(FORM *form)
static int
HSC_Horizontal_Half_Line_Forward(FORM *form)
{
- T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), form));
+ T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), (void *)form));
returnCode(HSC_Generic(form, (form->current->cols + 1) / 2));
}
@@ -2211,7 +2253,7 @@ HSC_Horizontal_Half_Line_Forward(FORM *form)
static int
HSC_Horizontal_Line_Backward(FORM *form)
{
- T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), form));
+ T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), (void *)form));
returnCode(HSC_Generic(form, -(form->current->cols)));
}
@@ -2227,7 +2269,7 @@ HSC_Horizontal_Line_Backward(FORM *form)
static int
HSC_Horizontal_Half_Line_Backward(FORM *form)
{
- T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), form));
+ T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), (void *)form));
returnCode(HSC_Generic(form, -((form->current->cols + 1) / 2)));
}
@@ -2406,7 +2448,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form)
return E_SYSTEM_ERROR;
}
bp = Address_Of_Current_Row_In_Buffer(form);
- Window_To_Buffer(form->w, field);
+ Window_To_Buffer(form, field);
split = After_Last_Whitespace_Character(bp, field->dcols);
/* split points to the first character of the sequence to be brought
on the next line */
@@ -2432,7 +2474,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form)
if (result != E_OK)
{
DeleteChar(form);
- Window_To_Buffer(form->w, field);
+ Window_To_Buffer(form, field);
result = E_REQUEST_DENIED;
}
}
@@ -2523,7 +2565,7 @@ FE_New_Line(FORM *form)
FIELD_CELL *bp, *t;
bool Last_Row = ((field->drows - 1) == form->currow);
- T((T_CALLED("FE_New_Line(%p)"), form));
+ T((T_CALLED("FE_New_Line(%p)"), (void *)form));
if (form->status & _OVLMODE)
{
if (Last_Row &&
@@ -2606,8 +2648,9 @@ FE_Insert_Character(FORM *form)
FIELD *field = form->current;
int result = E_REQUEST_DENIED;
- T((T_CALLED("FE_Insert_Character(%p)"), form));
- if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
+ T((T_CALLED("FE_Insert_Character(%p)"), (void *)form));
+ if (Check_Char(form, field, field->type, (int)C_BLANK,
+ (TypeArgument *)(field->arg)))
{
bool There_Is_Room = Is_There_Room_For_A_Char_In_Line(form);
@@ -2641,8 +2684,9 @@ FE_Insert_Line(FORM *form)
FIELD *field = form->current;
int result = E_REQUEST_DENIED;
- T((T_CALLED("FE_Insert_Line(%p)"), form));
- if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
+ T((T_CALLED("FE_Insert_Line(%p)"), (void *)form));
+ if (Check_Char(form, field,
+ field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
{
bool Maybe_Done = (form->currow != (field->drows - 1)) &&
Is_There_Room_For_A_Line(form);
@@ -2674,7 +2718,7 @@ FE_Insert_Line(FORM *form)
static int
FE_Delete_Character(FORM *form)
{
- T((T_CALLED("FE_Delete_Character(%p)"), form));
+ T((T_CALLED("FE_Delete_Character(%p)"), (void *)form));
DeleteChar(form);
returnCode(E_OK);
}
@@ -2697,7 +2741,7 @@ FE_Delete_Previous(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("FE_Delete_Previous(%p)"), form));
+ T((T_CALLED("FE_Delete_Previous(%p)"), (void *)form));
if (First_Position_In_Current_Field(form))
returnCode(E_REQUEST_DENIED);
@@ -2765,7 +2809,7 @@ FE_Delete_Previous(FORM *form)
static int
FE_Delete_Line(FORM *form)
{
- T((T_CALLED("FE_Delete_Line(%p)"), form));
+ T((T_CALLED("FE_Delete_Line(%p)"), (void *)form));
form->curcol = 0;
wdeleteln(form->w);
returnCode(E_OK);
@@ -2789,7 +2833,7 @@ FE_Delete_Word(FORM *form)
FIELD_CELL *cp = bp + form->curcol;
FIELD_CELL *s;
- T((T_CALLED("FE_Delete_Word(%p)"), form));
+ T((T_CALLED("FE_Delete_Word(%p)"), (void *)form));
Synchronize_Buffer(form);
if (ISBLANK(*cp))
returnCode(E_REQUEST_DENIED); /* not in word */
@@ -2823,7 +2867,7 @@ FE_Delete_Word(FORM *form)
static int
FE_Clear_To_End_Of_Line(FORM *form)
{
- T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), form));
+ T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), (void *)form));
wmove(form->w, form->currow, form->curcol);
wclrtoeol(form->w);
returnCode(E_OK);
@@ -2840,7 +2884,7 @@ FE_Clear_To_End_Of_Line(FORM *form)
static int
FE_Clear_To_End_Of_Field(FORM *form)
{
- T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), form));
+ T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), (void *)form));
wmove(form->w, form->currow, form->curcol);
wclrtobot(form->w);
returnCode(E_OK);
@@ -2857,7 +2901,7 @@ FE_Clear_To_End_Of_Field(FORM *form)
static int
FE_Clear_Field(FORM *form)
{
- T((T_CALLED("FE_Clear_Field(%p)"), form));
+ T((T_CALLED("FE_Clear_Field(%p)"), (void *)form));
form->currow = form->curcol = 0;
werase(form->w);
returnCode(E_OK);
@@ -2881,7 +2925,7 @@ FE_Clear_Field(FORM *form)
static int
EM_Overlay_Mode(FORM *form)
{
- T((T_CALLED("EM_Overlay_Mode(%p)"), form));
+ T((T_CALLED("EM_Overlay_Mode(%p)"), (void *)form));
form->status |= _OVLMODE;
returnCode(E_OK);
}
@@ -2897,7 +2941,7 @@ EM_Overlay_Mode(FORM *form)
static int
EM_Insert_Mode(FORM *form)
{
- T((T_CALLED("EM_Insert_Mode(%p)"), form));
+ T((T_CALLED("EM_Insert_Mode(%p)"), (void *)form));
form->status &= ~_OVLMODE;
returnCode(E_OK);
}
@@ -2912,7 +2956,7 @@ EM_Insert_Mode(FORM *form)
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static bool Next_Choice(
+| Function : static bool Next_Choice(FORM * form,
| FIELDTYPE * typ,
| FIELD * field,
| TypeArgument *argp)
@@ -2924,7 +2968,7 @@ EM_Insert_Mode(FORM *form)
| FALSE - couldn't retrieve next choice
+--------------------------------------------------------------------------*/
static bool
-Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
+Next_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (!typ || !(typ->status & _HAS_CHOICE))
return FALSE;
@@ -2933,19 +2977,27 @@ Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
assert(argp);
return (
- Next_Choice(typ->left, field, argp->left) ||
- Next_Choice(typ->right, field, argp->right));
+ Next_Choice(form, typ->left, field, argp->left) ||
+ Next_Choice(form, typ->right, field, argp->right));
}
else
{
+#if NCURSES_INTEROP_FUNCS
+ assert(typ->enum_next.onext);
+ if (typ->status & _GENERIC)
+ return typ->enum_next.gnext(form, field, (void *)argp);
+ else
+ return typ->enum_next.onext(field, (void *)argp);
+#else
assert(typ->next);
return typ->next(field, (void *)argp);
+#endif
}
}
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static bool Previous_Choice(
+| Function : static bool Previous_Choice(FORM * form,
| FIELDTYPE * typ,
| FIELD * field,
| TypeArgument *argp)
@@ -2957,7 +3009,7 @@ Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
| FALSE - couldn't retrieve previous choice
+--------------------------------------------------------------------------*/
static bool
-Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
+Previous_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (!typ || !(typ->status & _HAS_CHOICE))
return FALSE;
@@ -2966,13 +3018,21 @@ Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
assert(argp);
return (
- Previous_Choice(typ->left, field, argp->left) ||
- Previous_Choice(typ->right, field, argp->right));
+ Previous_Choice(form, typ->left, field, argp->left) ||
+ Previous_Choice(form, typ->right, field, argp->right));
}
else
{
+#if NCURSES_INTEROP_FUNCS
+ assert(typ->enum_prev.oprev);
+ if (typ->status & _GENERIC)
+ return typ->enum_prev.gprev(form, field, (void *)argp);
+ else
+ return typ->enum_prev.oprev(field, (void *)argp);
+#else
assert(typ->prev);
return typ->prev(field, (void *)argp);
+#endif
}
}
/*----------------------------------------------------------------------------
@@ -2997,9 +3057,9 @@ CR_Next_Choice(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("CR_Next_Choice(%p)"), form));
+ T((T_CALLED("CR_Next_Choice(%p)"), (void *)form));
Synchronize_Buffer(form);
- returnCode((Next_Choice(field->type, field, (TypeArgument *)(field->arg)))
+ returnCode((Next_Choice(form, field->type, field, (TypeArgument *)(field->arg)))
? E_OK
: E_REQUEST_DENIED);
}
@@ -3018,9 +3078,9 @@ CR_Previous_Choice(FORM *form)
{
FIELD *field = form->current;
- T((T_CALLED("CR_Previous_Choice(%p)"), form));
+ T((T_CALLED("CR_Previous_Choice(%p)"), (void *)form));
Synchronize_Buffer(form);
- returnCode((Previous_Choice(field->type, field, (TypeArgument *)(field->arg)))
+ returnCode((Previous_Choice(form, field->type, field, (TypeArgument *)(field->arg)))
? E_OK
: E_REQUEST_DENIED);
}
@@ -3034,7 +3094,7 @@ CR_Previous_Choice(FORM *form)
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static bool Check_Field(
+| Function : static bool Check_Field(FORM* form,
| FIELDTYPE * typ,
| FIELD * field,
| TypeArgument * argp)
@@ -3047,7 +3107,7 @@ CR_Previous_Choice(FORM *form)
| FALSE - field is invalid.
+--------------------------------------------------------------------------*/
static bool
-Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
+Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (typ)
{
@@ -3068,13 +3128,23 @@ Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
assert(argp);
return (
- Check_Field(typ->left, field, argp->left) ||
- Check_Field(typ->right, field, argp->right));
+ Check_Field(form, typ->left, field, argp->left) ||
+ Check_Field(form, typ->right, field, argp->right));
}
else
{
+#if NCURSES_INTEROP_FUNCS
+ if (typ->fieldcheck.ofcheck)
+ {
+ if (typ->status & _GENERIC)
+ return typ->fieldcheck.gfcheck(form, field, (void *)argp);
+ else
+ return typ->fieldcheck.ofcheck(field, (void *)argp);
+ }
+#else
if (typ->fcheck)
return typ->fcheck(field, (void *)argp);
+#endif
}
}
return TRUE;
@@ -3100,7 +3170,7 @@ _nc_Internal_Validation(FORM *form)
if ((form->status & _FCHECK_REQUIRED) ||
(!(field->opts & O_PASSOK)))
{
- if (!Check_Field(field->type, field, (TypeArgument *)(field->arg)))
+ if (!Check_Field(form, field->type, field, (TypeArgument *)(field->arg)))
return FALSE;
form->status &= ~_FCHECK_REQUIRED;
field->status |= _CHANGED;
@@ -3128,7 +3198,7 @@ _nc_Internal_Validation(FORM *form)
static int
FV_Validation(FORM *form)
{
- T((T_CALLED("FV_Validation(%p)"), form));
+ T((T_CALLED("FV_Validation(%p)"), (void *)form));
if (_nc_Internal_Validation(form))
returnCode(E_OK);
else
@@ -3506,7 +3576,7 @@ Inter_Field_Navigation(int (*const fct) (FORM *), FORM *form)
static int
FN_Next_Field(FORM *form)
{
- T((T_CALLED("FN_Next_Field(%p)"), form));
+ T((T_CALLED("FN_Next_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Next_Field_On_Page(form->current)));
}
@@ -3524,7 +3594,7 @@ FN_Next_Field(FORM *form)
static int
FN_Previous_Field(FORM *form)
{
- T((T_CALLED("FN_Previous_Field(%p)"), form));
+ T((T_CALLED("FN_Previous_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Previous_Field_On_Page(form->current)));
}
@@ -3541,7 +3611,7 @@ FN_Previous_Field(FORM *form)
static int
FN_First_Field(FORM *form)
{
- T((T_CALLED("FN_First_Field(%p)"), form));
+ T((T_CALLED("FN_First_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Next_Field_On_Page(form->field[form->page[form->curpage].pmax])));
}
@@ -3558,7 +3628,7 @@ FN_First_Field(FORM *form)
static int
FN_Last_Field(FORM *form)
{
- T((T_CALLED("FN_Last_Field(%p)"), form));
+ T((T_CALLED("FN_Last_Field(%p)"), (void *)form));
returnCode(
_nc_Set_Current_Field(form,
Previous_Field_On_Page(form->field[form->page[form->curpage].pmin])));
@@ -3577,7 +3647,7 @@ FN_Last_Field(FORM *form)
static int
FN_Sorted_Next_Field(FORM *form)
{
- T((T_CALLED("FN_Sorted_Next_Field(%p)"), form));
+ T((T_CALLED("FN_Sorted_Next_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Next_Field(form->current)));
}
@@ -3595,7 +3665,7 @@ FN_Sorted_Next_Field(FORM *form)
static int
FN_Sorted_Previous_Field(FORM *form)
{
- T((T_CALLED("FN_Sorted_Previous_Field(%p)"), form));
+ T((T_CALLED("FN_Sorted_Previous_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Previous_Field(form->current)));
}
@@ -3613,7 +3683,7 @@ FN_Sorted_Previous_Field(FORM *form)
static int
FN_Sorted_First_Field(FORM *form)
{
- T((T_CALLED("FN_Sorted_First_Field(%p)"), form));
+ T((T_CALLED("FN_Sorted_First_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Next_Field(form->field[form->page[form->curpage].smax])));
}
@@ -3631,7 +3701,7 @@ FN_Sorted_First_Field(FORM *form)
static int
FN_Sorted_Last_Field(FORM *form)
{
- T((T_CALLED("FN_Sorted_Last_Field(%p)"), form));
+ T((T_CALLED("FN_Sorted_Last_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Previous_Field(form->field[form->page[form->curpage].smin])));
}
@@ -3649,7 +3719,7 @@ FN_Sorted_Last_Field(FORM *form)
static int
FN_Left_Field(FORM *form)
{
- T((T_CALLED("FN_Left_Field(%p)"), form));
+ T((T_CALLED("FN_Left_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Left_Neighbor_Field(form->current)));
}
@@ -3667,7 +3737,7 @@ FN_Left_Field(FORM *form)
static int
FN_Right_Field(FORM *form)
{
- T((T_CALLED("FN_Right_Field(%p)"), form));
+ T((T_CALLED("FN_Right_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Right_Neighbor_Field(form->current)));
}
@@ -3687,7 +3757,7 @@ FN_Right_Field(FORM *form)
static int
FN_Up_Field(FORM *form)
{
- T((T_CALLED("FN_Up_Field(%p)"), form));
+ T((T_CALLED("FN_Up_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Upper_Neighbor_Field(form->current)));
}
@@ -3707,7 +3777,7 @@ FN_Up_Field(FORM *form)
static int
FN_Down_Field(FORM *form)
{
- T((T_CALLED("FN_Down_Field(%p)"), form));
+ T((T_CALLED("FN_Down_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Down_Neighbor_Field(form->current)));
}
@@ -3851,7 +3921,7 @@ Page_Navigation(int (*const fct) (FORM *), FORM *form)
static int
PN_Next_Page(FORM *form)
{
- T((T_CALLED("PN_Next_Page(%p)"), form));
+ T((T_CALLED("PN_Next_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, Next_Page_Number(form), (FIELD *)0));
}
@@ -3867,7 +3937,7 @@ PN_Next_Page(FORM *form)
static int
PN_Previous_Page(FORM *form)
{
- T((T_CALLED("PN_Previous_Page(%p)"), form));
+ T((T_CALLED("PN_Previous_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, Previous_Page_Number(form), (FIELD *)0));
}
@@ -3883,7 +3953,7 @@ PN_Previous_Page(FORM *form)
static int
PN_First_Page(FORM *form)
{
- T((T_CALLED("PN_First_Page(%p)"), form));
+ T((T_CALLED("PN_First_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, 0, (FIELD *)0));
}
@@ -3899,7 +3969,7 @@ PN_First_Page(FORM *form)
static int
PN_Last_Page(FORM *form)
{
- T((T_CALLED("PN_Last_Page(%p)"), form));
+ T((T_CALLED("PN_Last_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, form->maxpage - 1, (FIELD *)0));
}
@@ -3928,7 +3998,7 @@ Data_Entry(FORM *form, int c)
FIELD *field = form->current;
int result = E_REQUEST_DENIED;
- T((T_CALLED("Data_Entry(%p,%s)"), form, _tracechtype((chtype)c)));
+ T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
if ((field->opts & O_EDIT)
#if FIX_FORM_INACTIVE_BUG
&& (field->opts & O_ACTIVE)
@@ -4129,7 +4199,7 @@ form_driver(FORM *form, int c)
const Binding_Info *BI = (Binding_Info *) 0;
int res = E_UNKNOWN_COMMAND;
- T((T_CALLED("form_driver(%p,%d)"), form, c));
+ T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
if (!form)
RETURN(E_BAD_ARGUMENT);
@@ -4194,7 +4264,7 @@ form_driver(FORM *form, int c)
else if (KEY_MOUSE == c)
{
MEVENT event;
- WINDOW *win = form->win ? form->win : stdscr;
+ WINDOW *win = form->win ? form->win : StdScreen(Get_Form_Screen(form));
WINDOW *sub = form->sub ? form->sub : win;
getmouse(&event);
@@ -4281,7 +4351,7 @@ form_driver(FORM *form, int c)
if (!iscntrl(UChar(c)))
#else
if (isprint(UChar(c)) &&
- Check_Char(form->current->type, c,
+ Check_Char(form, form->current, form->current->type, c,
(TypeArgument *)(form->current->arg)))
#endif
res = Data_Entry(form, c);
@@ -4326,7 +4396,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
FIELD_CELL *widevalue = 0;
#endif
- T((T_CALLED("set_field_buffer(%p,%d,%s)"), field, buffer, _nc_visbuf(value)));
+ T((T_CALLED("set_field_buffer(%p,%d,%s)"), (void *)field, buffer, _nc_visbuf(value)));
if (!field || !value || ((buffer < 0) || (buffer > field->nbuf)))
RETURN(E_BAD_ARGUMENT);
@@ -4347,7 +4417,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
* field->cols))))
RETURN(E_SYSTEM_ERROR);
+#if !USE_WIDEC_SUPPORT
len = vlen;
+#endif
}
}
@@ -4360,14 +4432,15 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
* and other special cases that we really do not want to handle here.
*/
#if NCURSES_EXT_FUNCS
- if (wresize(field->working, field->drows, field->dcols) == ERR)
+ if (wresize(field->working, 1, Buffer_Length(field) + 1) == ERR)
#endif
{
delwin(field->working);
- field->working = newpad(field->drows, field->dcols);
+ field->working = newpad(1, Buffer_Length(field) + 1);
}
+ len = Buffer_Length(field);
wclear(field->working);
- mvwaddstr(field->working, 0, 0, value);
+ (void)mvwaddstr(field->working, 0, 0, value);
if ((widevalue = typeCalloc(FIELD_CELL, len + 1)) == 0)
{
@@ -4377,9 +4450,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
{
for (i = 0; i < (unsigned)field->drows; ++i)
{
- mvwin_wchnstr(field->working, i, 0,
- widevalue + (i * field->dcols),
- field->dcols);
+ (void)mvwin_wchnstr(field->working, 0, i * field->dcols,
+ widevalue + (i * field->dcols),
+ field->dcols);
}
for (i = 0; i < len; ++i)
{
@@ -4433,7 +4506,7 @@ field_buffer(const FIELD *field, int buffer)
{
char *result = 0;
- T((T_CALLED("field_buffer(%p,%d)"), field, buffer));
+ T((T_CALLED("field_buffer(%p,%d)"), (const void *)field, buffer));
if (field && (buffer >= 0) && (buffer <= field->nbuf))
{
@@ -4446,7 +4519,7 @@ field_buffer(const FIELD *field, int buffer)
/* determine the number of bytes needed to store the expanded string */
for (n = 0; n < size; ++n)
{
- if (!isWidecExt(data[n]))
+ if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0')
{
mbstate_t state;
size_t next;
@@ -4463,12 +4536,25 @@ field_buffer(const FIELD *field, int buffer)
free(field->expanded[buffer]);
field->expanded[buffer] = typeMalloc(char, need + 1);
- /* expand the multibyte data */
+ /*
+ * Expand the multibyte data.
+ *
+ * It may also be multi-column data. In that case, the data for a row
+ * may be null-padded to align to the dcols/drows layout (or it may
+ * contain embedded wide-character extensions). Change the null-padding
+ * to blanks as needed.
+ */
if ((result = field->expanded[buffer]) != 0)
{
wclear(field->working);
- mvwadd_wchnstr(field->working, 0, 0, data, size);
- mvwinnstr(field->working, 0, 0, result, (int)need);
+ wmove(field->working, 0, 0);
+ for (n = 0; n < size; ++n)
+ {
+ if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0')
+ wadd_wch(field->working, &data[n]);
+ }
+ wmove(field->working, 0, 0);
+ winnstr(field->working, result, (int)need);
}
#else
result = Address_Of_Nth_Buffer(field, buffer);
@@ -4479,22 +4565,6 @@ field_buffer(const FIELD *field, int buffer)
#if USE_WIDEC_SUPPORT
-/* FIXME: see lib_get_wch.c */
-#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 trans_mbytes(wch,buffer,length,state) \
- (int) mbtowc(&wch, buffer, length)
-#elif HAVE_MBRTOWC && HAVE_MBRLEN
-#define NEED_STATE
-#define reset_mbytes(state) init_mb(state)
-#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
-#define trans_mbytes(wch,buffer,length,state) \
- (int) mbrtowc(&wch, buffer, length, &state)
-#else
-make an error
-#endif
-
/*---------------------------------------------------------------------------
| Convert a multibyte string to a wide-character string. The result must be
| freed by the caller.
@@ -4509,7 +4579,7 @@ _nc_Widen_String(char *source, int *lengthp)
int pass;
int status;
-#ifdef NEED_STATE
+#ifndef state_unused
mbstate_t state;
#endif
@@ -4528,8 +4598,8 @@ _nc_Widen_String(char *source, int *lengthp)
source[passed + tries] = 0;
reset_mbytes(state);
- status = trans_mbytes(wch, source + passed, tries, state);
- source[passed + tries] = save;
+ status = check_mbytes(wch, source + passed, tries, state);
+ source[passed + tries] = (char)save;
if (status > 0)
{
diff --git a/form/frm_hook.c b/form/frm_hook.c
index 18e6d71f31ab..7daa396b704a 100644
--- a/form/frm_hook.c
+++ b/form/frm_hook.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_hook.c,v 1.14 2004/12/25 22:37:27 tom Exp $")
+MODULE_ID("$Id: frm_hook.c,v 1.15 2010/01/23 21:12:08 tom Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
@@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\
{\
- T((T_CALLED(#typ "_" #name "(%p)"), form));\
+ T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\
returnFormHook( Normalize_Form( form ) -> typ ## name );\
}
diff --git a/form/frm_opts.c b/form/frm_opts.c
index d36d618a5343..3557fcd7ff04 100644
--- a/form/frm_opts.c
+++ b/form/frm_opts.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_opts.c,v 1.14 2005/04/16 16:59:18 tom Exp $")
+MODULE_ID("$Id: frm_opts.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_opts.c,v 1.14 2005/04/16 16:59:18 tom Exp $")
NCURSES_EXPORT(int)
set_form_opts(FORM *form, Form_Options opts)
{
- T((T_CALLED("set_form_opts(%p,%d)"), form, opts));
+ T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts));
opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
@@ -70,7 +70,7 @@ set_form_opts(FORM *form, Form_Options opts)
NCURSES_EXPORT(Form_Options)
form_opts(const FORM *form)
{
- T((T_CALLED("form_opts(%p)"), form));
+ T((T_CALLED("form_opts(%p)"), (const void *)form));
returnCode((int)(Normalize_Form(form)->opts & ALL_FORM_OPTS));
}
@@ -87,7 +87,7 @@ form_opts(const FORM *form)
NCURSES_EXPORT(int)
form_opts_on(FORM *form, Form_Options opts)
{
- T((T_CALLED("form_opts_on(%p,%d)"), form, opts));
+ T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts));
opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
@@ -112,7 +112,7 @@ form_opts_on(FORM *form, Form_Options opts)
NCURSES_EXPORT(int)
form_opts_off(FORM *form, Form_Options opts)
{
- T((T_CALLED("form_opts_off(%p,%d)"), form, opts));
+ T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts));
opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
diff --git a/form/frm_page.c b/form/frm_page.c
index a371838d950e..5a76ca995793 100644
--- a/form/frm_page.c
+++ b/form/frm_page.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_page.c,v 1.10 2004/12/11 22:08:21 tom Exp $")
+MODULE_ID("$Id: frm_page.c,v 1.11 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -51,7 +51,7 @@ set_form_page(FORM *form, int page)
{
int err = E_OK;
- T((T_CALLED("set_form_page(%p,%d)"), form, page));
+ T((T_CALLED("set_form_page(%p,%d)"), (void *)form, page));
if (!form || (page < 0) || (page >= form->maxpage))
RETURN(E_BAD_ARGUMENT);
@@ -98,7 +98,7 @@ set_form_page(FORM *form, int page)
NCURSES_EXPORT(int)
form_page(const FORM *form)
{
- T((T_CALLED("form_page(%p)"), form));
+ T((T_CALLED("form_page(%p)"), (const void *)form));
returnCode(Normalize_Form(form)->curpage);
}
diff --git a/form/frm_post.c b/form/frm_post.c
index 28937e91b0b2..8e29aff5f62a 100644
--- a/form/frm_post.c
+++ b/form/frm_post.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_post.c,v 1.9 2004/12/11 22:19:06 tom Exp $")
+MODULE_ID("$Id: frm_post.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -54,7 +54,7 @@ post_form(FORM *form)
int err;
int page;
- T((T_CALLED("post_form(%p)"), form));
+ T((T_CALLED("post_form(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
@@ -100,7 +100,7 @@ post_form(FORM *form)
NCURSES_EXPORT(int)
unpost_form(FORM *form)
{
- T((T_CALLED("unpost_form(%p)"), form));
+ T((T_CALLED("unpost_form(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
diff --git a/form/frm_req_name.c b/form/frm_req_name.c
index 7ac9abe6e299..99abd7e3c1d9 100644
--- a/form/frm_req_name.c
+++ b/form/frm_req_name.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_req_name.c,v 1.16 2008/07/05 23:22:08 tom Exp $")
+MODULE_ID("$Id: frm_req_name.c,v 1.17 2009/10/10 16:17:01 tom Exp $")
static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
{
@@ -154,14 +154,14 @@ form_request_by_name(const char *str)
strncpy(buf, str, sizeof(buf));
while ((i < sizeof(buf)) && (buf[i] != '\0'))
{
- buf[i] = toupper(UChar(buf[i]));
+ buf[i] = (char)toupper(UChar(buf[i]));
i++;
}
for (i = 0; i < A_SIZE; i++)
{
if (strncmp(request_names[i], buf, sizeof(buf)) == 0)
- returnCode(MIN_FORM_COMMAND + (int) i);
+ returnCode(MIN_FORM_COMMAND + (int)i);
}
}
RETURN(E_NO_MATCH);
diff --git a/form/frm_scale.c b/form/frm_scale.c
index 2ebf72d06c67..27e154e243ee 100644
--- a/form/frm_scale.c
+++ b/form/frm_scale.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_scale.c,v 1.9 2004/12/11 22:12:34 tom Exp $")
+MODULE_ID("$Id: frm_scale.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -47,7 +47,10 @@ MODULE_ID("$Id: frm_scale.c,v 1.9 2004/12/11 22:12:34 tom Exp $")
NCURSES_EXPORT(int)
scale_form(const FORM *form, int *rows, int *cols)
{
- T((T_CALLED("scale_form(%p,%p,%p)"), form, rows, cols));
+ T((T_CALLED("scale_form(%p,%p,%p)"),
+ (const void *)form,
+ (void *)rows,
+ (void *)cols));
if (!form)
RETURN(E_BAD_ARGUMENT);
diff --git a/form/frm_sub.c b/form/frm_sub.c
index 6db0023db1ab..1ab131a593c8 100644
--- a/form/frm_sub.c
+++ b/form/frm_sub.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,12 +27,12 @@
****************************************************************************/
/****************************************************************************
- * Author: Juergen Pfeifer, 1995,1997 *
+ * Author: Juergen Pfeifer, 1995-1997,2009 *
****************************************************************************/
#include "form.priv.h"
-MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $")
+MODULE_ID("$Id: frm_sub.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,13 +46,22 @@ MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $")
NCURSES_EXPORT(int)
set_form_sub(FORM *form, WINDOW *win)
{
- T((T_CALLED("set_form_sub(%p,%p)"), form, win));
+ T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win));
if (form && (form->status & _POSTED))
RETURN(E_POSTED);
+ else
+ {
+#if NCURSES_SP_FUNCS
+ FORM *f = Normalize_Form(form);
- Normalize_Form(form)->sub = win;
- RETURN(E_OK);
+ f->sub = win ? win : StdScreen(Get_Form_Screen(f));
+ RETURN(E_OK);
+#else
+ Normalize_Form(form)->sub = win;
+ RETURN(E_OK);
+#endif
+ }
}
/*---------------------------------------------------------------------------
@@ -68,7 +77,7 @@ form_sub(const FORM *form)
{
const FORM *f;
- T((T_CALLED("form_sub(%p)"), form));
+ T((T_CALLED("form_sub(%p)"), (const void *)form));
f = Normalize_Form(form);
returnWin(Get_Form_Window(f));
diff --git a/form/frm_user.c b/form/frm_user.c
index 4d5e0e463a43..1375b5e90af6 100644
--- a/form/frm_user.c
+++ b/form/frm_user.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_user.c,v 1.14 2004/12/25 22:37:56 tom Exp $")
+MODULE_ID("$Id: frm_user.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,7 +46,7 @@ MODULE_ID("$Id: frm_user.c,v 1.14 2004/12/25 22:37:56 tom Exp $")
NCURSES_EXPORT(int)
set_form_userptr(FORM *form, void *usrptr)
{
- T((T_CALLED("set_form_userptr(%p,%p)"), form, usrptr));
+ T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr));
Normalize_Form(form)->usrptr = usrptr;
RETURN(E_OK);
@@ -65,7 +65,7 @@ set_form_userptr(FORM *form, void *usrptr)
NCURSES_EXPORT(void *)
form_userptr(const FORM *form)
{
- T((T_CALLED("form_userptr(%p)"), form));
+ T((T_CALLED("form_userptr(%p)"), (const void *)form));
returnVoidPtr(Normalize_Form(form)->usrptr);
}
diff --git a/form/frm_win.c b/form/frm_win.c
index 2258f0a6195b..a65cc59f843d 100644
--- a/form/frm_win.c
+++ b/form/frm_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $")
+MODULE_ID("$Id: frm_win.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,13 +46,22 @@ MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $")
NCURSES_EXPORT(int)
set_form_win(FORM *form, WINDOW *win)
{
- T((T_CALLED("set_form_win(%p,%p)"), form, win));
+ T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win));
if (form && (form->status & _POSTED))
RETURN(E_POSTED);
+ else
+ {
+#if NCURSES_SP_FUNCS
+ FORM *f = Normalize_Form(form);
- Normalize_Form(form)->win = win;
- RETURN(E_OK);
+ f->win = win ? win : StdScreen(Get_Form_Screen(f));
+ RETURN(E_OK);
+#else
+ Normalize_Form(form)->win = win;
+ RETURN(E_OK);
+#endif
+ }
}
/*---------------------------------------------------------------------------
@@ -66,12 +75,18 @@ set_form_win(FORM *form, WINDOW *win)
NCURSES_EXPORT(WINDOW *)
form_win(const FORM *form)
{
+ WINDOW *result;
const FORM *f;
- T((T_CALLED("form_win(%p)"), form));
+ T((T_CALLED("form_win(%p)"), (const void *)form));
f = Normalize_Form(form);
- returnWin(f->win ? f->win : stdscr);
+#if NCURSES_SP_FUNCS
+ result = (f->win ? f->win : StdScreen(Get_Form_Screen(f)));
+#else
+ result = (f->win ? f->win : stdscr);
+#endif
+ returnWin(result);
}
/* frm_win.c ends here */
diff --git a/form/fty_alnum.c b/form/fty_alnum.c
index 59dd2736e8ab..cda23dc2b653 100644
--- a/form/fty_alnum.c
+++ b/form/fty_alnum.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_alnum.c,v 1.21 2007/10/13 19:31:52 tom Exp $")
+MODULE_ID("$Id: fty_alnum.c,v 1.24 2010/01/23 21:14:36 tom Exp $")
#define thisARG alnumARG
@@ -46,28 +46,48 @@ thisARG;
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void *Make_This_Type(va_list *ap)
+| Function : static void *Generic_This_Type(void *arg)
|
| Description : Allocate structure for alphanumeric type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
-Make_This_Type(va_list *ap)
+Generic_This_Type(void *arg)
{
- thisARG *argp = typeMalloc(thisARG, 1);
+ thisARG *argp = (thisARG *) 0;
- if (argp)
+ if (arg)
{
- T((T_CREATE("thisARG %p"), argp));
- argp->width = va_arg(*ap, int);
- }
+ argp = typeMalloc(thisARG, 1);
+ if (argp)
+ {
+ T((T_CREATE("thisARG %p"), (void *)argp));
+ argp->width = *((int *)arg);
+ }
+ }
return ((void *)argp);
}
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void *Make_This_Type(va_list *ap)
+|
+| Description : Allocate structure for alphanumeric type argument.
+|
+| Return Values : Pointer to argument structure or NULL on error
++--------------------------------------------------------------------------*/
+static void *
+Make_This_Type(va_list *ap)
+{
+ int w = va_arg(*ap, int);
+
+ return Generic_This_Type((void *)&w);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void *Copy_ThisType(const void *argp)
|
| Description : Copy structure for alphanumeric type argument.
@@ -82,7 +102,7 @@ Copy_This_Type(const void *argp)
if (result)
{
- T((T_CREATE("thisARG %p"), result));
+ T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
@@ -156,12 +176,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
- Check_This_Field,
- Check_This_Character,
- NULL,
- NULL
+ INIT_FT_FUNC(Check_This_Field),
+ INIT_FT_FUNC(Check_This_Character),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
+ Generic_This_Type
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_ALNUM(void)
+{
+ return TYPE_ALNUM;
+}
+#endif
+
/* fty_alnum.c ends here */
diff --git a/form/fty_alpha.c b/form/fty_alpha.c
index bd49544ffdb5..917a9e0ea0a4 100644
--- a/form/fty_alpha.c
+++ b/form/fty_alpha.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_alpha.c,v 1.23 2007/10/13 19:32:09 tom Exp $")
+MODULE_ID("$Id: fty_alpha.c,v 1.26 2010/01/23 21:14:36 tom Exp $")
#define thisARG alphaARG
@@ -46,28 +46,48 @@ thisARG;
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void *Make_This_Type(va_list *ap)
+| Function : static void *Generic_This_Type(va_list *ap)
|
| Description : Allocate structure for alpha type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
-Make_This_Type(va_list *ap)
+Generic_This_Type(void *arg)
{
- thisARG *argp = typeMalloc(thisARG, 1);
+ thisARG *argp = (thisARG *) 0;
- if (argp)
+ if (arg)
{
- T((T_CREATE("thisARG %p"), argp));
- argp->width = va_arg(*ap, int);
- }
+ argp = typeMalloc(thisARG, 1);
+ if (argp)
+ {
+ T((T_CREATE("thisARG %p"), (void *)argp));
+ argp->width = *((int *)arg);
+ }
+ }
return ((void *)argp);
}
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void *Make_This_Type(va_list *ap)
+|
+| Description : Allocate structure for alpha type argument.
+|
+| Return Values : Pointer to argument structure or NULL on error
++--------------------------------------------------------------------------*/
+static void *
+Make_This_Type(va_list *ap)
+{
+ int w = va_arg(*ap, int);
+
+ return Generic_This_Type((void *)&w);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void *Copy_This_Type(const void * argp)
|
| Description : Copy structure for alpha type argument.
@@ -82,7 +102,7 @@ Copy_This_Type(const void *argp)
if (result)
{
- T((T_CREATE("thisARG %p"), result));
+ T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
@@ -156,12 +176,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
- Check_This_Field,
- Check_This_Character,
- NULL,
- NULL
+ INIT_FT_FUNC(Check_This_Field),
+ INIT_FT_FUNC(Check_This_Character),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
+ Generic_This_Type
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_ALPHA(void)
+{
+ return TYPE_ALPHA;
+}
+#endif
+
/* fty_alpha.c ends here */
diff --git a/form/fty_enum.c b/form/fty_enum.c
index c96a080db09d..d3351644ef18 100644
--- a/form/fty_enum.c
+++ b/form/fty_enum.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_enum.c,v 1.22 2007/10/13 19:32:26 tom Exp $")
+MODULE_ID("$Id: fty_enum.c,v 1.26 2010/05/01 21:11:07 tom Exp $")
typedef struct
{
@@ -45,43 +45,99 @@ typedef struct
}
enumARG;
+typedef struct
+ {
+ char **kwds;
+ int ccase;
+ int cunique;
+ }
+enumParams;
+
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void *Make_Enum_Type( va_list * ap )
+| Function : static void *Generic_Enum_Type(void * arg)
|
| Description : Allocate structure for enumeration type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
-Make_Enum_Type(va_list *ap)
+Generic_Enum_Type(void *arg)
{
- enumARG *argp = typeMalloc(enumARG, 1);
+ enumARG *argp = (enumARG *)0;
+ enumParams *params = (enumParams *) arg;
- if (argp)
+ if (params)
{
- int cnt = 0;
- char **kp = (char **)0;
- int ccase, cunique;
-
- T((T_CREATE("enumARG %p"), argp));
- argp->kwds = va_arg(*ap, char **);
- ccase = va_arg(*ap, int);
- cunique = va_arg(*ap, int);
-
- argp->checkcase = ccase ? TRUE : FALSE;
- argp->checkunique = cunique ? TRUE : FALSE;
-
- kp = argp->kwds;
- while (kp && (*kp++))
- cnt++;
- argp->count = cnt;
+ argp = typeMalloc(enumARG, 1);
+
+ if (argp)
+ {
+ int cnt = 0;
+ char **kp = (char **)0;
+ char **kwds = (char **)0;
+ char **kptarget;
+ int ccase, cunique;
+
+ T((T_CREATE("enumARG %p"), (void *)argp));
+ kwds = params->kwds;
+ ccase = params->ccase;
+ cunique = params->cunique;
+
+ argp->checkcase = ccase ? TRUE : FALSE;
+ argp->checkunique = cunique ? TRUE : FALSE;
+ argp->kwds = (char **)0;
+
+ kp = kwds;
+ while (kp && (*kp++))
+ cnt++;
+ argp->count = cnt;
+
+ if (cnt > 0)
+ {
+ /* We copy the keywords, because we can't rely on the fact
+ that the caller doesn't relocate or free the memory used
+ for the keywords (maybe he has GC)
+ */
+ argp->kwds = typeMalloc(char *, cnt + 1);
+
+ kp = kwds;
+ if ((kptarget = argp->kwds) != 0)
+ {
+ while (kp && (*kp))
+ {
+ (*kptarget++) = strdup(*kp++);
+ }
+ *kptarget = (char *)0;
+ }
+ }
+ }
}
return (void *)argp;
}
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void *Make_Enum_Type( va_list * ap )
+|
+| Description : Allocate structure for enumeration type argument.
+|
+| Return Values : Pointer to argument structure or NULL on error
++--------------------------------------------------------------------------*/
+static void *
+Make_Enum_Type(va_list *ap)
+{
+ enumParams params;
+
+ params.kwds = va_arg(*ap, char **);
+ params.ccase = va_arg(*ap, int);
+ params.cunique = va_arg(*ap, int);
+
+ return Generic_Enum_Type((void *)&params);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void *Copy_Enum_Type( const void * argp )
|
| Description : Copy structure for enumeration type argument.
@@ -101,8 +157,24 @@ Copy_Enum_Type(const void *argp)
if (result)
{
- T((T_CREATE("enumARG %p"), result));
+ T((T_CREATE("enumARG %p"), (void *)result));
*result = *ap;
+
+ if (ap->count > 0)
+ {
+ char **kptarget;
+ char **kp = ap->kwds;
+ result->kwds = typeMalloc(char *, 1 + ap->count);
+
+ if ((kptarget = result->kwds) != 0)
+ {
+ while (kp && (*kp))
+ {
+ (*kptarget++) = strdup(*kp++);
+ }
+ *kptarget = (char *)0;
+ }
+ }
}
}
return (void *)result;
@@ -120,7 +192,24 @@ static void
Free_Enum_Type(void *argp)
{
if (argp)
- free(argp);
+ {
+ const enumARG *ap = (const enumARG *)argp;
+
+ if (ap->kwds && ap->count > 0)
+ {
+ char **kp = ap->kwds;
+ int cnt = 0;
+
+ while (kp && (*kp))
+ {
+ free(*kp++);
+ cnt++;
+ }
+ assert(cnt == ap->count);
+ free(ap->kwds);
+ }
+ free(argp);
+ }
}
#define SKIP_SPACE(x) while(((*(x))!='\0') && (is_blank(*(x)))) (x)++
@@ -326,13 +415,28 @@ static FIELDTYPE typeENUM =
Make_Enum_Type,
Copy_Enum_Type,
Free_Enum_Type,
- Check_Enum_Field,
- NULL,
- Next_Enum,
- Previous_Enum
+ INIT_FT_FUNC(Check_Enum_Field),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(Next_Enum),
+ INIT_FT_FUNC(Previous_Enum),
+#if NCURSES_INTEROP_FUNCS
+ Generic_Enum_Type
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE *)
TYPE_ENUM = &typeENUM;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_ENUM(void)
+{
+ return TYPE_ENUM;
+}
+#endif
+
/* fty_enum.c ends here */
diff --git a/form/fty_generic.c b/form/fty_generic.c
new file mode 100644
index 000000000000..3e7a575a2623
--- /dev/null
+++ b/form/fty_generic.c
@@ -0,0 +1,297 @@
+/****************************************************************************
+ * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 *
+* *
+***************************************************************************/
+
+#include "form.priv.h"
+
+MODULE_ID("$Id: fty_generic.c,v 1.5 2010/01/23 21:14:36 tom Exp $")
+
+/*
+ * This is not a full implementation of a field type, but adds some
+ * support for higher level languages with some restrictions to interop
+ * with C language. Especially the collection of arguments for the
+ * various fieldtypes is not based on the vararg C mechanism, but on a
+ * iterator based callback mechanism that allowes the high level language
+ * to provide the arguments as a structure. Most languages have mechanisms
+ * to layout structures so that they can be passed to C.
+ * The languages can register a new generic fieldtype dynamically and store
+ * a handle (key) to the calling object as an argument. Together with that
+ * it can register a freearg callback, so that the high level language
+ * remains in control of the memory management of the arguments they pass.
+ * The design idea is, that the high-level language - typically a OO
+ * language like C# or Java, uses it's own dispatching mechanisms
+ * (polymorphism) to call the proper check routines responsible for the
+ * argument type. So these language implement typically only one generic
+ * fieldtype they register with the forms library using this call.
+ *
+ * For that purpose we have extended the fieldtype struc by a new element
+ * that gets the arguments from a single struct passed by the caller.
+ *
+ */
+#if NCURSES_INTEROP_FUNCS
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
+| Function : static void *Generic_This_Type( void * arg )
+|
+| Description : We interpret the passed arg just as a handle the
+| calling language uses to keep track of its allocated
+| argument structures. We can simply copy it back.
+|
+| Return Values : Pointer to argument structure
++--------------------------------------------------------------------------*/
+static void *
+Generic_This_Type(void *arg)
+{
+ return (arg);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
+| Function : FIELDTYPE *_nc_generic_fieldtype(
+| bool (* const field_check)(FIELD *,const void *),
+| bool (* const char_check) (int, const void *),
+| bool (*const next)(FORM*,FIELD*,const void*),
+| bool (*const prev)(FORM*,FIELD*,const void*),
+| void (*freecallback)(void*))
+|
+| Description : Create a new fieldtype. The application programmer must
+| write a field_check and a char_check function and give
+| them as input to this call. A callback to allow the
+| release of the allocated memory must also be provided.
+| For generic field types, we provide some more
+| information about the field as parameters.
+|
+| If an error occurs, errno is set to
+| E_BAD_ARGUMENT - invalid arguments
+| E_SYSTEM_ERROR - system error (no memory)
+|
+| Return Values : Fieldtype pointer or NULL if error occurred
++--------------------------------------------------------------------------*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
+ bool (*const char_check) (int, FORM *, FIELD *, const
+ void *),
+ bool (*const next) (FORM *, FIELD *, const void *),
+ bool (*const prev) (FORM *, FIELD *, const void *),
+ void (*freecallback) (void *))
+{
+ int code = E_SYSTEM_ERROR;
+ FIELDTYPE *res = (FIELDTYPE *)0;
+
+ T((T_CALLED("_nc_generic_fieldtype(%p,%p,%p,%p,%p)"),
+ field_check, char_check, next, prev, freecallback));
+
+ if (field_check || char_check)
+ {
+ res = typeMalloc(FIELDTYPE, 1);
+
+ if (res)
+ {
+ *res = *_nc_Default_FieldType;
+ res->status |= (_HAS_ARGS | _GENERIC);
+ res->fieldcheck.gfcheck = field_check;
+ res->charcheck.gccheck = char_check;
+ res->genericarg = Generic_This_Type;
+ res->freearg = freecallback;
+ res->enum_next.gnext = next;
+ res->enum_prev.gprev = prev;
+ code = E_OK;
+ }
+ }
+ else
+ code = E_BAD_ARGUMENT;
+
+ if (E_OK != code)
+ SET_ERROR(code);
+
+ returnFieldType(res);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
+| Function : static TypeArgument *GenericArgument(
+| const FIELDTYPE* typ,
+| int (*argiterator)(void**),
+| int* err)
+|
+| Description : The iterator callback must browse through all fieldtype
+| parameters that have an argument associated with the
+| type. The iterator returns 1 if the operation to get
+| the next element was successfull, 0 otherwise. If the
+| iterator could move to the next argument, it fills
+| the void* pointer representing the argument into the
+| location provided as argument to the iterator.
+| The err reference is used to keep track of errors.
+|
+| Return Values : Pointer to argument structure
++--------------------------------------------------------------------------*/
+static TypeArgument *
+GenericArgument(const FIELDTYPE *typ,
+ int (*argiterator) (void **), int *err)
+{
+ TypeArgument *res = (TypeArgument *)0;
+
+ if (typ != 0 && (typ->status & _HAS_ARGS) != 0 && err != 0 && argiterator != 0)
+ {
+ if (typ->status & _LINKED_TYPE)
+ {
+ /* Composite fieldtypes keep track internally of their own memory */
+ TypeArgument *p = typeMalloc(TypeArgument, 1);
+
+ if (p)
+ {
+ p->left = GenericArgument(typ->left, argiterator, err);
+ p->right = GenericArgument(typ->right, argiterator, err);
+ return p;
+ }
+ else
+ *err += 1;
+ }
+ else
+ {
+ assert(typ->genericarg != (void *)0);
+ if (typ->genericarg == 0)
+ *err += 1;
+ else
+ {
+ void *argp;
+ int valid = argiterator(&argp);
+
+ if (valid == 0 || argp == 0 ||
+ !(res = (TypeArgument *)typ->genericarg(argp)))
+ {
+ *err += 1;
+ }
+ }
+ }
+ }
+ return res;
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
+| Function : int _nc_set_generic_fieldtype(
+| FIELD* field,
+| FIELDTYPE* ftyp,
+| int (*argiterator)(void**))
+|
+| Description : Assign the fieldtype to the field and use the iterator
+| mechanism to get the arguments when a check is
+| performed.
+|
+| Return Values : E_OK if all went well
+| E_SYSTEM_ERROR if an error occurred
++--------------------------------------------------------------------------*/
+NCURSES_EXPORT(int)
+_nc_set_generic_fieldtype(FIELD *field,
+ FIELDTYPE *ftyp,
+ int (*argiterator) (void **))
+{
+ int code = E_SYSTEM_ERROR;
+ int err = 0;
+
+ if (field)
+ {
+ if (field && field->type)
+ _nc_Free_Type(field);
+
+ field->type = ftyp;
+ if (ftyp)
+ {
+ if (argiterator)
+ {
+ /* The precondition is that the iterator is reset */
+ field->arg = (void *)GenericArgument(field->type, argiterator, &err);
+
+ if (err)
+ {
+ _nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
+ field->type = (FIELDTYPE *)0;
+ field->arg = (void *)0;
+ }
+ else
+ {
+ code = E_OK;
+ if (field->type)
+ field->type->ref++;
+ }
+ }
+ }
+ else
+ {
+ field->arg = (void *)0;
+ code = E_OK;
+ }
+ }
+ return code;
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
+| Function : WINDOW* _nc_form_cursor(
+| FORM* form,
+| int *pRow, int *pCol)
+|
+| Description : Get the current position of the form cursor position
+| We also return the field window
+|
+| Return Values : The fields Window or NULL on error
++--------------------------------------------------------------------------*/
+NCURSES_EXPORT(WINDOW *)
+_nc_form_cursor(const FORM *form, int *pRow, int *pCol)
+{
+ int code = E_SYSTEM_ERROR;
+ WINDOW *res = (WINDOW *)0;
+
+ if (!(form == 0 || pRow == 0 || pCol == 0))
+ {
+ *pRow = form->currow;
+ *pCol = form->curcol;
+ res = form->w;
+ code = E_OK;
+ }
+ if (code != E_OK)
+ SET_ERROR(code);
+ return res;
+}
+
+#else
+extern void _nc_fty_generic(void);
+void
+_nc_fty_generic(void)
+{
+}
+#endif
+
+/* fty_generic.c ends here */
diff --git a/form/fty_int.c b/form/fty_int.c
index 8a5367f74084..e643ad975fc5 100644
--- a/form/fty_int.c
+++ b/form/fty_int.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_int.c,v 1.22 2007/10/13 19:32:40 tom Exp $")
+MODULE_ID("$Id: fty_int.c,v 1.25 2010/01/23 21:14:36 tom Exp $")
#if USE_WIDEC_SUPPORT
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
@@ -52,31 +52,63 @@ typedef struct
}
thisARG;
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerPARM;
+
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void *Make_This_Type( va_list * ap )
+| Function : static void *Generic_This_Type( void * arg )
|
| Description : Allocate structure for integer type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
-Make_This_Type(va_list *ap)
+Generic_This_Type(void *arg)
{
- thisARG *argp = typeMalloc(thisARG, 1);
+ thisARG *argp = (thisARG *) 0;
+ thisARG *param = (thisARG *) arg;
- if (argp)
+ if (param)
{
- T((T_CREATE("thisARG %p"), argp));
- argp->precision = va_arg(*ap, int);
- argp->low = va_arg(*ap, long);
- argp->high = va_arg(*ap, long);
+ argp = typeMalloc(thisARG, 1);
+
+ if (argp)
+ {
+ T((T_CREATE("thisARG %p"), (void *)argp));
+ *argp = *param;
+ }
}
return (void *)argp;
}
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void *Make_This_Type( va_list * ap )
+|
+| Description : Allocate structure for integer type argument.
+|
+| Return Values : Pointer to argument structure or NULL on error
++--------------------------------------------------------------------------*/
+static void *
+Make_This_Type(va_list *ap)
+{
+ thisARG arg;
+
+ arg.precision = va_arg(*ap, int);
+ arg.low = va_arg(*ap, long);
+ arg.high = va_arg(*ap, long);
+
+ return Generic_This_Type((void *)&arg);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void *Copy_This_Type(const void * argp)
|
| Description : Copy structure for integer type argument.
@@ -94,7 +126,7 @@ Copy_This_Type(const void *argp)
result = typeMalloc(thisARG, 1);
if (result)
{
- T((T_CREATE("thisARG %p"), result));
+ T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
}
@@ -235,12 +267,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
- Check_This_Field,
- Check_This_Character,
- NULL,
- NULL
+ INIT_FT_FUNC(Check_This_Field),
+ INIT_FT_FUNC(Check_This_Character),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
+ Generic_This_Type
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_INTEGER(void)
+{
+ return TYPE_INTEGER;
+}
+#endif
+
/* fty_int.c ends here */
diff --git a/form/fty_ipv4.c b/form/fty_ipv4.c
index 5d1a2098ef94..8dc04f8c5345 100644
--- a/form/fty_ipv4.c
+++ b/form/fty_ipv4.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_ipv4.c,v 1.8 2006/12/02 19:33:02 tom Exp $")
+MODULE_ID("$Id: fty_ipv4.c,v 1.10 2009/11/07 20:17:58 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -94,12 +94,27 @@ static FIELDTYPE typeIPV4 =
NULL,
NULL,
NULL,
- Check_IPV4_Field,
- Check_IPV4_Character,
- NULL,
+ INIT_FT_FUNC(Check_IPV4_Field),
+ INIT_FT_FUNC(Check_IPV4_Character),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
NULL
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_IPV4(void)
+{
+ return TYPE_IPV4;
+}
+#endif
+
/* fty_ipv4.c ends here */
diff --git a/form/fty_num.c b/form/fty_num.c
index e74e8e36fe25..4bd71321d66a 100644
--- a/form/fty_num.c
+++ b/form/fty_num.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_num.c,v 1.25 2007/10/13 19:32:54 tom Exp $")
+MODULE_ID("$Id: fty_num.c,v 1.28 2010/01/23 21:14:36 tom Exp $")
#if HAVE_LOCALE_H
#include <locale.h>
@@ -63,37 +63,71 @@ typedef struct
}
thisARG;
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ }
+thisPARM;
+
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void *Make_This_Type(va_list * ap)
+| Function : static void *Generic_This_Type(void * arg)
|
| Description : Allocate structure for numeric type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
-Make_This_Type(va_list *ap)
+Generic_This_Type(void *arg)
{
- thisARG *argn = typeMalloc(thisARG, 1);
+ thisARG *argn = (thisARG *) 0;
+ thisPARM *args = (thisPARM *) arg;
- if (argn)
+ if (args)
{
- T((T_CREATE("thisARG %p"), argn));
- argn->precision = va_arg(*ap, int);
- argn->low = va_arg(*ap, double);
- argn->high = va_arg(*ap, double);
+ argn = typeMalloc(thisARG, 1);
+
+ if (argn)
+ {
+ T((T_CREATE("thisARG %p"), (void *)argn));
+ argn->precision = args->precision;
+ argn->low = args->low;
+ argn->high = args->high;
#if HAVE_LOCALE_H
- argn->L = localeconv();
+ argn->L = localeconv();
#else
- argn->L = NULL;
+ argn->L = NULL;
#endif
+ }
}
return (void *)argn;
}
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void *Make_This_Type(va_list * ap)
+|
+| Description : Allocate structure for numeric type argument.
+|
+| Return Values : Pointer to argument structure or NULL on error
++--------------------------------------------------------------------------*/
+static void *
+Make_This_Type(va_list *ap)
+{
+ thisPARM arg;
+
+ arg.precision = va_arg(*ap, int);
+ arg.low = va_arg(*ap, double);
+ arg.high = va_arg(*ap, double);
+
+ return Generic_This_Type((void *)&arg);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void *Copy_This_Type(const void * argp)
|
| Description : Copy structure for numeric type argument.
@@ -111,7 +145,7 @@ Copy_This_Type(const void *argp)
result = typeMalloc(thisARG, 1);
if (result)
{
- T((T_CREATE("thisARG %p"), result));
+ T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
}
@@ -279,12 +313,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
- Check_This_Field,
- Check_This_Character,
- NULL,
- NULL
+ INIT_FT_FUNC(Check_This_Field),
+ INIT_FT_FUNC(Check_This_Character),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
+ Generic_This_Type
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_NUMERIC(void)
+{
+ return TYPE_NUMERIC;
+}
+#endif
+
/* fty_num.c ends here */
diff --git a/form/fty_regex.c b/form/fty_regex.c
index 247779f28c1d..2c0a4caa6bb3 100644
--- a/form/fty_regex.c
+++ b/form/fty_regex.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_regex.c,v 1.21 2007/10/13 19:33:50 tom Exp $")
+MODULE_ID("$Id: fty_regex.c,v 1.24 2010/01/23 21:14:37 tom Exp $")
#if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */
#include <regex.h>
@@ -90,97 +90,109 @@ RegExp_Arg;
#endif
+#if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
+# define MAYBE_UNUSED
+#else
+# define MAYBE_UNUSED GCC_UNUSED
+#endif
+
/*---------------------------------------------------------------------------
| Facility : libnform
-| Function : static void *Make_RegularExpression_Type(va_list * ap)
+| Function : static void *Generic_RegularExpression_Type(void * arg)
|
| Description : Allocate structure for regex type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
-Make_RegularExpression_Type(va_list *ap)
+Generic_RegularExpression_Type(void *arg MAYBE_UNUSED)
{
#if HAVE_REGEX_H_FUNCS
- char *rx = va_arg(*ap, char *);
- RegExp_Arg *preg;
+ char *rx = (char *)arg;
+ RegExp_Arg *preg = (RegExp_Arg *)0;
- preg = typeMalloc(RegExp_Arg, 1);
-
- if (preg)
+ if (rx)
{
- T((T_CREATE("RegExp_Arg %p"), preg));
- if (((preg->pRegExp = typeMalloc(regex_t, 1)) != 0)
- && !regcomp(preg->pRegExp, rx,
- (REG_EXTENDED | REG_NOSUB | REG_NEWLINE)))
- {
- T((T_CREATE("regex_t %p"), preg->pRegExp));
- preg->refCount = typeMalloc(unsigned long, 1);
+ preg = typeMalloc(RegExp_Arg, 1);
- *(preg->refCount) = 1;
- }
- else
+ if (preg)
{
- if (preg->pRegExp)
- free(preg->pRegExp);
- free(preg);
- preg = (RegExp_Arg *)0;
+ T((T_CREATE("RegExp_Arg %p"), (void *)preg));
+ if (((preg->pRegExp = typeMalloc(regex_t, 1)) != 0)
+ && !regcomp(preg->pRegExp, rx,
+ (REG_EXTENDED | REG_NOSUB | REG_NEWLINE)))
+ {
+ T((T_CREATE("regex_t %p"), (void *)preg->pRegExp));
+ preg->refCount = typeMalloc(unsigned long, 1);
+
+ *(preg->refCount) = 1;
+ }
+ else
+ {
+ if (preg->pRegExp)
+ free(preg->pRegExp);
+ free(preg);
+ preg = (RegExp_Arg *)0;
+ }
}
}
return ((void *)preg);
#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
- char *rx = va_arg(*ap, char *);
- RegExp_Arg *pArg;
+ char *rx = (char *)arg;
+ RegExp_Arg *pArg = (RegExp_Arg *)0;
- pArg = typeMalloc(RegExp_Arg, 1);
-
- if (pArg)
+ if (rx)
{
- int blen = RX_INCREMENT;
+ pArg = typeMalloc(RegExp_Arg, 1);
- T((T_CREATE("RegExp_Arg %p"), pArg));
- pArg->compiled_expression = NULL;
- pArg->refCount = typeMalloc(unsigned long, 1);
+ if (pArg)
+ {
+ int blen = RX_INCREMENT;
- *(pArg->refCount) = 1;
+ T((T_CREATE("RegExp_Arg %p"), pArg));
+ pArg->compiled_expression = NULL;
+ pArg->refCount = typeMalloc(unsigned long, 1);
- do
- {
- char *buf = typeMalloc(char, blen);
+ *(pArg->refCount) = 1;
- if (buf)
+ do
{
+ char *buf = typeMalloc(char, blen);
+
+ if (buf)
+ {
#if HAVE_REGEXP_H_FUNCS
- char *last_pos = compile(rx, buf, &buf[blen], '\0');
+ char *last_pos = compile(rx, buf, &buf[blen], '\0');
#else /* HAVE_REGEXPR_H_FUNCS */
- char *last_pos = compile(rx, buf, &buf[blen]);
+ char *last_pos = compile(rx, buf, &buf[blen]);
#endif
- if (reg_errno)
- {
- free(buf);
- if (reg_errno == 50)
- blen += RX_INCREMENT;
+ if (reg_errno)
+ {
+ free(buf);
+ if (reg_errno == 50)
+ blen += RX_INCREMENT;
+ else
+ {
+ free(pArg);
+ pArg = NULL;
+ break;
+ }
+ }
else
{
- free(pArg);
- pArg = NULL;
+ pArg->compiled_expression = buf;
break;
}
}
- else
- {
- pArg->compiled_expression = buf;
- break;
- }
}
+ while (blen <= MAX_RX_LEN);
+ }
+ if (pArg && !pArg->compiled_expression)
+ {
+ free(pArg);
+ pArg = NULL;
}
- while (blen <= MAX_RX_LEN);
- }
- if (pArg && !pArg->compiled_expression)
- {
- free(pArg);
- pArg = NULL;
}
return (void *)pArg;
#else
@@ -190,6 +202,22 @@ Make_RegularExpression_Type(va_list *ap)
/*---------------------------------------------------------------------------
| Facility : libnform
+| Function : static void *Make_RegularExpression_Type(va_list * ap)
+|
+| Description : Allocate structure for regex type argument.
+|
+| Return Values : Pointer to argument structure or NULL on error
++--------------------------------------------------------------------------*/
+static void *
+Make_RegularExpression_Type(va_list *ap)
+{
+ char *rx = va_arg(*ap, char *);
+
+ return Generic_RegularExpression_Type((void *)rx);
+}
+
+/*---------------------------------------------------------------------------
+| Facility : libnform
| Function : static void *Copy_RegularExpression_Type(
| const void * argp)
|
@@ -198,7 +226,7 @@ Make_RegularExpression_Type(va_list *ap)
| Return Values : Pointer to argument structure or NULL on error.
+--------------------------------------------------------------------------*/
static void *
-Copy_RegularExpression_Type(const void *argp)
+Copy_RegularExpression_Type(const void *argp MAYBE_UNUSED)
{
#if (HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS)
const RegExp_Arg *ap = (const RegExp_Arg *)argp;
@@ -224,7 +252,7 @@ Copy_RegularExpression_Type(const void *argp)
| Return Values : -
+--------------------------------------------------------------------------*/
static void
-Free_RegularExpression_Type(void *argp)
+Free_RegularExpression_Type(void *argp MAYBE_UNUSED)
{
#if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
RegExp_Arg *ap = (RegExp_Arg *)argp;
@@ -264,7 +292,8 @@ Free_RegularExpression_Type(void *argp)
| FALSE - field is invalid
+--------------------------------------------------------------------------*/
static bool
-Check_RegularExpression_Field(FIELD *field, const void *argp)
+Check_RegularExpression_Field(FIELD *field MAYBE_UNUSED,
+ const void *argp MAYBE_UNUSED)
{
bool match = FALSE;
@@ -295,12 +324,27 @@ static FIELDTYPE typeREGEXP =
Make_RegularExpression_Type,
Copy_RegularExpression_Type,
Free_RegularExpression_Type,
- Check_RegularExpression_Field,
- NULL,
- NULL,
- NULL
+ INIT_FT_FUNC(Check_RegularExpression_Field),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+ INIT_FT_FUNC(NULL),
+#if NCURSES_INTEROP_FUNCS
+ Generic_RegularExpression_Type
+#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP;
+#if NCURSES_INTEROP_FUNCS
+/* The next routines are to simplify the use of ncurses from
+ programming languages with restictions on interop with C level
+ constructs (e.g. variable access or va_list + ellipsis constructs)
+*/
+NCURSES_EXPORT(FIELDTYPE *)
+_nc_TYPE_REGEXP(void)
+{
+ return TYPE_REGEXP;
+}
+#endif
+
/* fty_regex.c ends here */
diff --git a/form/llib-lform b/form/llib-lform
index bd7c3a4f1d87..2b6abdcd7c99 100644
--- a/form/llib-lform
+++ b/form/llib-lform
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1996,1997,2002,2005 *
+ * Author: Thomas E. Dickey 1996-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./f_trace.c */
-#include "form.priv.h"
+#include <form.priv.h>
#undef _nc_retrace_field_ptr
FIELD **_nc_retrace_field_ptr(
@@ -264,7 +264,7 @@ int move_field(
/* ./fld_newftyp.c */
#undef _nc_Default_FieldType
-const FIELDTYPE *_nc_Default_FieldType = {0};
+FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
@@ -396,6 +396,12 @@ NCURSES_BOOL data_ahead(
#undef _nc_Default_Form
FORM *_nc_Default_Form;
+#undef new_form_sp
+FORM *new_form_sp(
+ SCREEN *sp,
+ FIELD **fields)
+ { return(*(FORM **)0); }
+
#undef new_form
FORM *new_form(
FIELD **fields)
@@ -424,6 +430,13 @@ int field_count(
/* ./frm_driver.c */
+#undef _nc_get_fieldbuffer
+void _nc_get_fieldbuffer(
+ FORM *form,
+ FIELD *field,
+ char *buf)
+ { /* void */ }
+
#undef _nc_Position_Form_Cursor
int _nc_Position_Form_Cursor(
FORM *form)
@@ -683,9 +696,23 @@ typedef struct
}
enumARG;
+typedef struct
+ {
+ char **kwds;
+ int ccase;
+ int cunique;
+ }
+enumParams;
+
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
+/* ./fty_generic.c */
+
+#undef _nc_fty_generic
+void _nc_fty_generic(void)
+ { /* void */ }
+
/* ./fty_int.c */
typedef struct
@@ -696,6 +723,14 @@ typedef struct
}
integerARG;
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerPARM;
+
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
@@ -716,6 +751,14 @@ typedef struct
}
numericARG;
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ }
+thisPARM;
+
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
diff --git a/form/llib-lformt b/form/llib-lformt
new file mode 100644
index 000000000000..33de63cde975
--- /dev/null
+++ b/form/llib-lformt
@@ -0,0 +1,777 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./f_trace.c */
+
+#include <form.priv.h>
+
+#undef _nc_retrace_field_ptr
+FIELD **_nc_retrace_field_ptr(
+ FIELD **code)
+ { return(*(FIELD ***)0); }
+
+#undef _nc_retrace_field
+FIELD *_nc_retrace_field(
+ FIELD *code)
+ { return(*(FIELD **)0); }
+
+#undef _nc_retrace_field_type
+FIELDTYPE *_nc_retrace_field_type(
+ FIELDTYPE *code)
+ { return(*(FIELDTYPE **)0); }
+
+#undef _nc_retrace_form
+FORM *_nc_retrace_form(
+ FORM *code)
+ { return(*(FORM **)0); }
+
+#undef _nc_retrace_form_hook
+Form_Hook _nc_retrace_form_hook(
+ Form_Hook code)
+ { return(*(Form_Hook *)0); }
+
+/* ./fld_arg.c */
+
+#undef set_fieldtype_arg
+int set_fieldtype_arg(
+ FIELDTYPE *typ,
+ void *(*const make_arg)(
+ va_list *p1),
+ void *(*const copy_arg)(
+ const void *p1),
+ void (*const free_arg)(
+ void *p1))
+ { return(*(int *)0); }
+
+#undef field_arg
+void *field_arg(
+ const FIELD *field)
+ { return(*(void **)0); }
+
+/* ./fld_attr.c */
+
+#undef set_field_fore
+int set_field_fore(
+ FIELD *field,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef field_fore
+chtype field_fore(
+ const FIELD *field)
+ { return(*(chtype *)0); }
+
+#undef set_field_back
+int set_field_back(
+ FIELD *field,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef field_back
+chtype field_back(
+ const FIELD *field)
+ { return(*(chtype *)0); }
+
+/* ./fld_current.c */
+
+#undef set_current_field
+int set_current_field(
+ FORM *form,
+ FIELD *field)
+ { return(*(int *)0); }
+
+#undef current_field
+FIELD *current_field(
+ const FORM *form)
+ { return(*(FIELD **)0); }
+
+#undef field_index
+int field_index(
+ const FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_def.c */
+
+#undef _nc_Default_Field
+FIELD *_nc_Default_Field;
+
+#undef _nc_Make_Argument
+TypeArgument *_nc_Make_Argument(
+ const FIELDTYPE *typ,
+ va_list *ap,
+ int *err)
+ { return(*(TypeArgument **)0); }
+
+#undef _nc_Copy_Argument
+TypeArgument *_nc_Copy_Argument(
+ const FIELDTYPE *typ,
+ const TypeArgument *argp,
+ int *err)
+ { return(*(TypeArgument **)0); }
+
+#undef _nc_Free_Argument
+void _nc_Free_Argument(
+ const FIELDTYPE *typ,
+ TypeArgument *argp)
+ { /* void */ }
+
+#undef _nc_Copy_Type
+NCURSES_BOOL _nc_Copy_Type(
+ FIELD *dst,
+ FIELD const *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_Free_Type
+void _nc_Free_Type(
+ FIELD *field)
+ { /* void */ }
+
+#undef new_field
+FIELD *new_field(
+ int rows,
+ int cols,
+ int frow,
+ int fcol,
+ int nrow,
+ int nbuf)
+ { return(*(FIELD **)0); }
+
+#undef free_field
+int free_field(
+ FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_dup.c */
+
+#undef dup_field
+FIELD *dup_field(
+ FIELD *field,
+ int frow,
+ int fcol)
+ { return(*(FIELD **)0); }
+
+/* ./fld_ftchoice.c */
+
+#undef set_fieldtype_choice
+int set_fieldtype_choice(
+ FIELDTYPE *typ,
+ NCURSES_BOOL (*const next_choice)(
+ FIELD *p1,
+ const void *p2),
+ NCURSES_BOOL (*const prev_choice)(
+ FIELD *p1,
+ const void *p2))
+ { return(*(int *)0); }
+
+/* ./fld_ftlink.c */
+
+#undef link_fieldtype
+FIELDTYPE *link_fieldtype(
+ FIELDTYPE *type1,
+ FIELDTYPE *type2)
+ { return(*(FIELDTYPE **)0); }
+
+/* ./fld_info.c */
+
+#undef field_info
+int field_info(
+ const FIELD *field,
+ int *rows,
+ int *cols,
+ int *frow,
+ int *fcol,
+ int *nrow,
+ int *nbuf)
+ { return(*(int *)0); }
+
+#undef dynamic_field_info
+int dynamic_field_info(
+ const FIELD *field,
+ int *drows,
+ int *dcols,
+ int *maxgrow)
+ { return(*(int *)0); }
+
+/* ./fld_just.c */
+
+#undef set_field_just
+int set_field_just(
+ FIELD *field,
+ int just)
+ { return(*(int *)0); }
+
+#undef field_just
+int field_just(
+ const FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_link.c */
+
+#undef link_field
+FIELD *link_field(
+ FIELD *field,
+ int frow,
+ int fcol)
+ { return(*(FIELD **)0); }
+
+/* ./fld_max.c */
+
+#undef set_max_field
+int set_max_field(
+ FIELD *field,
+ int maxgrow)
+ { return(*(int *)0); }
+
+/* ./fld_move.c */
+
+#undef move_field
+int move_field(
+ FIELD *field,
+ int frow,
+ int fcol)
+ { return(*(int *)0); }
+
+/* ./fld_newftyp.c */
+
+#undef _nc_Default_FieldType
+FIELDTYPE *_nc_Default_FieldType;
+
+#undef new_fieldtype
+FIELDTYPE *new_fieldtype(
+ NCURSES_BOOL (*const field_check)(
+ FIELD *p1,
+ const void *p2),
+ NCURSES_BOOL (*const char_check)(
+ int p1,
+ const void *p2))
+ { return(*(FIELDTYPE **)0); }
+
+#undef free_fieldtype
+int free_fieldtype(
+ FIELDTYPE *typ)
+ { return(*(int *)0); }
+
+/* ./fld_opts.c */
+
+#undef set_field_opts
+int set_field_opts(
+ FIELD *field,
+ Field_Options opts)
+ { return(*(int *)0); }
+
+#undef field_opts
+Field_Options field_opts(
+ const FIELD *field)
+ { return(*(Field_Options *)0); }
+
+#undef field_opts_on
+int field_opts_on(
+ FIELD *field,
+ Field_Options opts)
+ { return(*(int *)0); }
+
+#undef field_opts_off
+int field_opts_off(
+ FIELD *field,
+ Field_Options opts)
+ { return(*(int *)0); }
+
+/* ./fld_pad.c */
+
+#undef set_field_pad
+int set_field_pad(
+ FIELD *field,
+ int ch)
+ { return(*(int *)0); }
+
+#undef field_pad
+int field_pad(
+ const FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_page.c */
+
+#undef set_new_page
+int set_new_page(
+ FIELD *field,
+ NCURSES_BOOL new_page_flag)
+ { return(*(int *)0); }
+
+#undef new_page
+NCURSES_BOOL new_page(
+ const FIELD *field)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./fld_stat.c */
+
+#undef set_field_status
+int set_field_status(
+ FIELD *field,
+ NCURSES_BOOL status)
+ { return(*(int *)0); }
+
+#undef field_status
+NCURSES_BOOL field_status(
+ const FIELD *field)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./fld_type.c */
+
+#undef set_field_type
+int set_field_type(
+ FIELD *field,
+ FIELDTYPE *type,
+ ...)
+ { return(*(int *)0); }
+
+#undef field_type
+FIELDTYPE *field_type(
+ const FIELD *field)
+ { return(*(FIELDTYPE **)0); }
+
+/* ./fld_user.c */
+
+#undef set_field_userptr
+int set_field_userptr(
+ FIELD *field,
+ void *usrptr)
+ { return(*(int *)0); }
+
+#undef field_userptr
+void *field_userptr(
+ const FIELD *field)
+ { return(*(void **)0); }
+
+/* ./frm_cursor.c */
+
+#undef pos_form_cursor
+int pos_form_cursor(
+ FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_data.c */
+
+#undef data_behind
+NCURSES_BOOL data_behind(
+ const FORM *form)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef data_ahead
+NCURSES_BOOL data_ahead(
+ const FORM *form)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./frm_def.c */
+
+#undef _nc_Default_Form
+FORM *_nc_Default_Form;
+
+#undef new_form_sp
+FORM *new_form_sp(
+ SCREEN *sp,
+ FIELD **fields)
+ { return(*(FORM **)0); }
+
+#undef new_form
+FORM *new_form(
+ FIELD **fields)
+ { return(*(FORM **)0); }
+
+#undef free_form
+int free_form(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef set_form_fields
+int set_form_fields(
+ FORM *form,
+ FIELD **fields)
+ { return(*(int *)0); }
+
+#undef form_fields
+FIELD **form_fields(
+ const FORM *form)
+ { return(*(FIELD ***)0); }
+
+#undef field_count
+int field_count(
+ const FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_driver.c */
+
+#undef _nc_get_fieldbuffer
+void _nc_get_fieldbuffer(
+ FORM *form,
+ FIELD *field,
+ char *buf)
+ { /* void */ }
+
+#undef _nc_Position_Form_Cursor
+int _nc_Position_Form_Cursor(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef _nc_Refresh_Current_Field
+int _nc_Refresh_Current_Field(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef _nc_Synchronize_Attributes
+int _nc_Synchronize_Attributes(
+ FIELD *field)
+ { return(*(int *)0); }
+
+#undef _nc_Synchronize_Options
+int _nc_Synchronize_Options(
+ FIELD *field,
+ Field_Options newopts)
+ { return(*(int *)0); }
+
+#undef _nc_Set_Current_Field
+int _nc_Set_Current_Field(
+ FORM *form,
+ FIELD *newfield)
+ { return(*(int *)0); }
+
+#undef _nc_Internal_Validation
+NCURSES_BOOL _nc_Internal_Validation(
+ FORM *form)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_First_Active_Field
+FIELD *_nc_First_Active_Field(
+ FORM *form)
+ { return(*(FIELD **)0); }
+
+#undef _nc_Set_Form_Page
+int _nc_Set_Form_Page(
+ FORM *form,
+ int page,
+ FIELD *field)
+ { return(*(int *)0); }
+
+typedef struct
+{
+ int keycode;
+ int (*cmd) (FORM *);
+}
+Binding_Info;
+
+#undef form_driver
+int form_driver(
+ FORM *form,
+ int c)
+ { return(*(int *)0); }
+
+#undef set_field_buffer
+int set_field_buffer(
+ FIELD *field,
+ int buffer,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef field_buffer
+char *field_buffer(
+ const FIELD *field,
+ int buffer)
+ { return(*(char **)0); }
+
+/* ./frm_hook.c */
+
+#undef set_field_init
+int set_field_init(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef field_init
+Form_Hook field_init(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+#undef set_field_term
+int set_field_term(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef field_term
+Form_Hook field_term(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+#undef set_form_init
+int set_form_init(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef form_init
+Form_Hook form_init(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+#undef set_form_term
+int set_form_term(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef form_term
+Form_Hook form_term(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+/* ./frm_opts.c */
+
+#undef set_form_opts
+int set_form_opts(
+ FORM *form,
+ Form_Options opts)
+ { return(*(int *)0); }
+
+#undef form_opts
+Form_Options form_opts(
+ const FORM *form)
+ { return(*(Form_Options *)0); }
+
+#undef form_opts_on
+int form_opts_on(
+ FORM *form,
+ Form_Options opts)
+ { return(*(int *)0); }
+
+#undef form_opts_off
+int form_opts_off(
+ FORM *form,
+ Form_Options opts)
+ { return(*(int *)0); }
+
+/* ./frm_page.c */
+
+#undef set_form_page
+int set_form_page(
+ FORM *form,
+ int page)
+ { return(*(int *)0); }
+
+#undef form_page
+int form_page(
+ const FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_post.c */
+
+#undef post_form
+int post_form(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef unpost_form
+int unpost_form(
+ FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_req_name.c */
+
+#undef form_request_name
+const char *form_request_name(
+ int request)
+ { return(*(const char **)0); }
+
+#undef form_request_by_name
+int form_request_by_name(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./frm_scale.c */
+
+#undef scale_form
+int scale_form(
+ const FORM *form,
+ int *rows,
+ int *cols)
+ { return(*(int *)0); }
+
+/* ./frm_sub.c */
+
+#undef set_form_sub
+int set_form_sub(
+ FORM *form,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef form_sub
+WINDOW *form_sub(
+ const FORM *form)
+ { return(*(WINDOW **)0); }
+
+/* ./frm_user.c */
+
+#undef set_form_userptr
+int set_form_userptr(
+ FORM *form,
+ void *usrptr)
+ { return(*(int *)0); }
+
+#undef form_userptr
+void *form_userptr(
+ const FORM *form)
+ { return(*(void **)0); }
+
+/* ./frm_win.c */
+
+#undef set_form_win
+int set_form_win(
+ FORM *form,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef form_win
+WINDOW *form_win(
+ const FORM *form)
+ { return(*(WINDOW **)0); }
+
+/* ./fty_alnum.c */
+
+typedef struct
+ {
+ int width;
+ }
+alnumARG;
+
+#undef TYPE_ALNUM
+FIELDTYPE *TYPE_ALNUM;
+
+/* ./fty_alpha.c */
+
+typedef struct
+ {
+ int width;
+ }
+alphaARG;
+
+#undef TYPE_ALPHA
+FIELDTYPE *TYPE_ALPHA;
+
+/* ./fty_enum.c */
+
+typedef struct
+ {
+ char **kwds;
+ int count;
+ NCURSES_BOOL checkcase;
+ NCURSES_BOOL checkunique;
+ }
+enumARG;
+
+typedef struct
+ {
+ char **kwds;
+ int ccase;
+ int cunique;
+ }
+enumParams;
+
+#undef TYPE_ENUM
+FIELDTYPE *TYPE_ENUM;
+
+/* ./fty_generic.c */
+
+#undef _nc_fty_generic
+void _nc_fty_generic(void)
+ { /* void */ }
+
+/* ./fty_int.c */
+
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerARG;
+
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerPARM;
+
+#undef TYPE_INTEGER
+FIELDTYPE *TYPE_INTEGER;
+
+/* ./fty_ipv4.c */
+#undef TYPE_IPV4
+FIELDTYPE *TYPE_IPV4;
+
+/* ./fty_num.c */
+
+#include <locale.h>
+
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ struct lconv *L;
+ }
+numericARG;
+
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ }
+thisPARM;
+
+#undef TYPE_NUMERIC
+FIELDTYPE *TYPE_NUMERIC;
+
+/* ./fty_regex.c */
+
+#include <regex.h>
+
+typedef struct
+ {
+ regex_t *pRegExp;
+ unsigned long *refCount;
+ }
+RegExp_Arg;
+
+#undef TYPE_REGEXP
+FIELDTYPE *TYPE_REGEXP;
diff --git a/form/llib-lformtw b/form/llib-lformtw
new file mode 100644
index 000000000000..10639490e399
--- /dev/null
+++ b/form/llib-lformtw
@@ -0,0 +1,783 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./f_trace.c */
+
+#include <form.priv.h>
+
+#undef _nc_retrace_field_ptr
+FIELD **_nc_retrace_field_ptr(
+ FIELD **code)
+ { return(*(FIELD ***)0); }
+
+#undef _nc_retrace_field
+FIELD *_nc_retrace_field(
+ FIELD *code)
+ { return(*(FIELD **)0); }
+
+#undef _nc_retrace_field_type
+FIELDTYPE *_nc_retrace_field_type(
+ FIELDTYPE *code)
+ { return(*(FIELDTYPE **)0); }
+
+#undef _nc_retrace_form
+FORM *_nc_retrace_form(
+ FORM *code)
+ { return(*(FORM **)0); }
+
+#undef _nc_retrace_form_hook
+Form_Hook _nc_retrace_form_hook(
+ Form_Hook code)
+ { return(*(Form_Hook *)0); }
+
+/* ./fld_arg.c */
+
+#undef set_fieldtype_arg
+int set_fieldtype_arg(
+ FIELDTYPE *typ,
+ void *(*const make_arg)(
+ va_list *p1),
+ void *(*const copy_arg)(
+ const void *p1),
+ void (*const free_arg)(
+ void *p1))
+ { return(*(int *)0); }
+
+#undef field_arg
+void *field_arg(
+ const FIELD *field)
+ { return(*(void **)0); }
+
+/* ./fld_attr.c */
+
+#undef set_field_fore
+int set_field_fore(
+ FIELD *field,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef field_fore
+chtype field_fore(
+ const FIELD *field)
+ { return(*(chtype *)0); }
+
+#undef set_field_back
+int set_field_back(
+ FIELD *field,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef field_back
+chtype field_back(
+ const FIELD *field)
+ { return(*(chtype *)0); }
+
+/* ./fld_current.c */
+
+#undef set_current_field
+int set_current_field(
+ FORM *form,
+ FIELD *field)
+ { return(*(int *)0); }
+
+#undef current_field
+FIELD *current_field(
+ const FORM *form)
+ { return(*(FIELD **)0); }
+
+#undef field_index
+int field_index(
+ const FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_def.c */
+
+#undef _nc_Default_Field
+FIELD *_nc_Default_Field;
+
+#undef _nc_Make_Argument
+TypeArgument *_nc_Make_Argument(
+ const FIELDTYPE *typ,
+ va_list *ap,
+ int *err)
+ { return(*(TypeArgument **)0); }
+
+#undef _nc_Copy_Argument
+TypeArgument *_nc_Copy_Argument(
+ const FIELDTYPE *typ,
+ const TypeArgument *argp,
+ int *err)
+ { return(*(TypeArgument **)0); }
+
+#undef _nc_Free_Argument
+void _nc_Free_Argument(
+ const FIELDTYPE *typ,
+ TypeArgument *argp)
+ { /* void */ }
+
+#undef _nc_Copy_Type
+NCURSES_BOOL _nc_Copy_Type(
+ FIELD *dst,
+ FIELD const *src)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_Free_Type
+void _nc_Free_Type(
+ FIELD *field)
+ { /* void */ }
+
+#undef new_field
+FIELD *new_field(
+ int rows,
+ int cols,
+ int frow,
+ int fcol,
+ int nrow,
+ int nbuf)
+ { return(*(FIELD **)0); }
+
+#undef free_field
+int free_field(
+ FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_dup.c */
+
+#undef dup_field
+FIELD *dup_field(
+ FIELD *field,
+ int frow,
+ int fcol)
+ { return(*(FIELD **)0); }
+
+/* ./fld_ftchoice.c */
+
+#undef set_fieldtype_choice
+int set_fieldtype_choice(
+ FIELDTYPE *typ,
+ NCURSES_BOOL (*const next_choice)(
+ FIELD *p1,
+ const void *p2),
+ NCURSES_BOOL (*const prev_choice)(
+ FIELD *p1,
+ const void *p2))
+ { return(*(int *)0); }
+
+/* ./fld_ftlink.c */
+
+#undef link_fieldtype
+FIELDTYPE *link_fieldtype(
+ FIELDTYPE *type1,
+ FIELDTYPE *type2)
+ { return(*(FIELDTYPE **)0); }
+
+/* ./fld_info.c */
+
+#undef field_info
+int field_info(
+ const FIELD *field,
+ int *rows,
+ int *cols,
+ int *frow,
+ int *fcol,
+ int *nrow,
+ int *nbuf)
+ { return(*(int *)0); }
+
+#undef dynamic_field_info
+int dynamic_field_info(
+ const FIELD *field,
+ int *drows,
+ int *dcols,
+ int *maxgrow)
+ { return(*(int *)0); }
+
+/* ./fld_just.c */
+
+#undef set_field_just
+int set_field_just(
+ FIELD *field,
+ int just)
+ { return(*(int *)0); }
+
+#undef field_just
+int field_just(
+ const FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_link.c */
+
+#undef link_field
+FIELD *link_field(
+ FIELD *field,
+ int frow,
+ int fcol)
+ { return(*(FIELD **)0); }
+
+/* ./fld_max.c */
+
+#undef set_max_field
+int set_max_field(
+ FIELD *field,
+ int maxgrow)
+ { return(*(int *)0); }
+
+/* ./fld_move.c */
+
+#undef move_field
+int move_field(
+ FIELD *field,
+ int frow,
+ int fcol)
+ { return(*(int *)0); }
+
+/* ./fld_newftyp.c */
+
+#undef _nc_Default_FieldType
+FIELDTYPE *_nc_Default_FieldType;
+
+#undef new_fieldtype
+FIELDTYPE *new_fieldtype(
+ NCURSES_BOOL (*const field_check)(
+ FIELD *p1,
+ const void *p2),
+ NCURSES_BOOL (*const char_check)(
+ int p1,
+ const void *p2))
+ { return(*(FIELDTYPE **)0); }
+
+#undef free_fieldtype
+int free_fieldtype(
+ FIELDTYPE *typ)
+ { return(*(int *)0); }
+
+/* ./fld_opts.c */
+
+#undef set_field_opts
+int set_field_opts(
+ FIELD *field,
+ Field_Options opts)
+ { return(*(int *)0); }
+
+#undef field_opts
+Field_Options field_opts(
+ const FIELD *field)
+ { return(*(Field_Options *)0); }
+
+#undef field_opts_on
+int field_opts_on(
+ FIELD *field,
+ Field_Options opts)
+ { return(*(int *)0); }
+
+#undef field_opts_off
+int field_opts_off(
+ FIELD *field,
+ Field_Options opts)
+ { return(*(int *)0); }
+
+/* ./fld_pad.c */
+
+#undef set_field_pad
+int set_field_pad(
+ FIELD *field,
+ int ch)
+ { return(*(int *)0); }
+
+#undef field_pad
+int field_pad(
+ const FIELD *field)
+ { return(*(int *)0); }
+
+/* ./fld_page.c */
+
+#undef set_new_page
+int set_new_page(
+ FIELD *field,
+ NCURSES_BOOL new_page_flag)
+ { return(*(int *)0); }
+
+#undef new_page
+NCURSES_BOOL new_page(
+ const FIELD *field)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./fld_stat.c */
+
+#undef set_field_status
+int set_field_status(
+ FIELD *field,
+ NCURSES_BOOL status)
+ { return(*(int *)0); }
+
+#undef field_status
+NCURSES_BOOL field_status(
+ const FIELD *field)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./fld_type.c */
+
+#undef set_field_type
+int set_field_type(
+ FIELD *field,
+ FIELDTYPE *type,
+ ...)
+ { return(*(int *)0); }
+
+#undef field_type
+FIELDTYPE *field_type(
+ const FIELD *field)
+ { return(*(FIELDTYPE **)0); }
+
+/* ./fld_user.c */
+
+#undef set_field_userptr
+int set_field_userptr(
+ FIELD *field,
+ void *usrptr)
+ { return(*(int *)0); }
+
+#undef field_userptr
+void *field_userptr(
+ const FIELD *field)
+ { return(*(void **)0); }
+
+/* ./frm_cursor.c */
+
+#undef pos_form_cursor
+int pos_form_cursor(
+ FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_data.c */
+
+#undef data_behind
+NCURSES_BOOL data_behind(
+ const FORM *form)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef data_ahead
+NCURSES_BOOL data_ahead(
+ const FORM *form)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./frm_def.c */
+
+#undef _nc_Default_Form
+FORM *_nc_Default_Form;
+
+#undef new_form_sp
+FORM *new_form_sp(
+ SCREEN *sp,
+ FIELD **fields)
+ { return(*(FORM **)0); }
+
+#undef new_form
+FORM *new_form(
+ FIELD **fields)
+ { return(*(FORM **)0); }
+
+#undef free_form
+int free_form(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef set_form_fields
+int set_form_fields(
+ FORM *form,
+ FIELD **fields)
+ { return(*(int *)0); }
+
+#undef form_fields
+FIELD **form_fields(
+ const FORM *form)
+ { return(*(FIELD ***)0); }
+
+#undef field_count
+int field_count(
+ const FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_driver.c */
+
+#undef _nc_get_fieldbuffer
+void _nc_get_fieldbuffer(
+ FORM *form,
+ FIELD *field,
+ cchar_t *buf)
+ { /* void */ }
+
+#undef _nc_Position_Form_Cursor
+int _nc_Position_Form_Cursor(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef _nc_Refresh_Current_Field
+int _nc_Refresh_Current_Field(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef _nc_Synchronize_Attributes
+int _nc_Synchronize_Attributes(
+ FIELD *field)
+ { return(*(int *)0); }
+
+#undef _nc_Synchronize_Options
+int _nc_Synchronize_Options(
+ FIELD *field,
+ Field_Options newopts)
+ { return(*(int *)0); }
+
+#undef _nc_Set_Current_Field
+int _nc_Set_Current_Field(
+ FORM *form,
+ FIELD *newfield)
+ { return(*(int *)0); }
+
+#undef _nc_Internal_Validation
+NCURSES_BOOL _nc_Internal_Validation(
+ FORM *form)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_First_Active_Field
+FIELD *_nc_First_Active_Field(
+ FORM *form)
+ { return(*(FIELD **)0); }
+
+#undef _nc_Set_Form_Page
+int _nc_Set_Form_Page(
+ FORM *form,
+ int page,
+ FIELD *field)
+ { return(*(int *)0); }
+
+typedef struct
+{
+ int keycode;
+ int (*cmd) (FORM *);
+}
+Binding_Info;
+
+#undef form_driver
+int form_driver(
+ FORM *form,
+ int c)
+ { return(*(int *)0); }
+
+#undef set_field_buffer
+int set_field_buffer(
+ FIELD *field,
+ int buffer,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef field_buffer
+char *field_buffer(
+ const FIELD *field,
+ int buffer)
+ { return(*(char **)0); }
+
+#undef _nc_Widen_String
+wchar_t *_nc_Widen_String(
+ char *source,
+ int *lengthp)
+ { return(*(wchar_t **)0); }
+
+/* ./frm_hook.c */
+
+#undef set_field_init
+int set_field_init(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef field_init
+Form_Hook field_init(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+#undef set_field_term
+int set_field_term(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef field_term
+Form_Hook field_term(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+#undef set_form_init
+int set_form_init(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef form_init
+Form_Hook form_init(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+#undef set_form_term
+int set_form_term(
+ FORM *form,
+ Form_Hook func)
+ { return(*(int *)0); }
+
+#undef form_term
+Form_Hook form_term(
+ const FORM *form)
+ { return(*(Form_Hook *)0); }
+
+/* ./frm_opts.c */
+
+#undef set_form_opts
+int set_form_opts(
+ FORM *form,
+ Form_Options opts)
+ { return(*(int *)0); }
+
+#undef form_opts
+Form_Options form_opts(
+ const FORM *form)
+ { return(*(Form_Options *)0); }
+
+#undef form_opts_on
+int form_opts_on(
+ FORM *form,
+ Form_Options opts)
+ { return(*(int *)0); }
+
+#undef form_opts_off
+int form_opts_off(
+ FORM *form,
+ Form_Options opts)
+ { return(*(int *)0); }
+
+/* ./frm_page.c */
+
+#undef set_form_page
+int set_form_page(
+ FORM *form,
+ int page)
+ { return(*(int *)0); }
+
+#undef form_page
+int form_page(
+ const FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_post.c */
+
+#undef post_form
+int post_form(
+ FORM *form)
+ { return(*(int *)0); }
+
+#undef unpost_form
+int unpost_form(
+ FORM *form)
+ { return(*(int *)0); }
+
+/* ./frm_req_name.c */
+
+#undef form_request_name
+const char *form_request_name(
+ int request)
+ { return(*(const char **)0); }
+
+#undef form_request_by_name
+int form_request_by_name(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./frm_scale.c */
+
+#undef scale_form
+int scale_form(
+ const FORM *form,
+ int *rows,
+ int *cols)
+ { return(*(int *)0); }
+
+/* ./frm_sub.c */
+
+#undef set_form_sub
+int set_form_sub(
+ FORM *form,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef form_sub
+WINDOW *form_sub(
+ const FORM *form)
+ { return(*(WINDOW **)0); }
+
+/* ./frm_user.c */
+
+#undef set_form_userptr
+int set_form_userptr(
+ FORM *form,
+ void *usrptr)
+ { return(*(int *)0); }
+
+#undef form_userptr
+void *form_userptr(
+ const FORM *form)
+ { return(*(void **)0); }
+
+/* ./frm_win.c */
+
+#undef set_form_win
+int set_form_win(
+ FORM *form,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef form_win
+WINDOW *form_win(
+ const FORM *form)
+ { return(*(WINDOW **)0); }
+
+/* ./fty_alnum.c */
+
+typedef struct
+ {
+ int width;
+ }
+alnumARG;
+
+#undef TYPE_ALNUM
+FIELDTYPE *TYPE_ALNUM;
+
+/* ./fty_alpha.c */
+
+typedef struct
+ {
+ int width;
+ }
+alphaARG;
+
+#undef TYPE_ALPHA
+FIELDTYPE *TYPE_ALPHA;
+
+/* ./fty_enum.c */
+
+typedef struct
+ {
+ char **kwds;
+ int count;
+ NCURSES_BOOL checkcase;
+ NCURSES_BOOL checkunique;
+ }
+enumARG;
+
+typedef struct
+ {
+ char **kwds;
+ int ccase;
+ int cunique;
+ }
+enumParams;
+
+#undef TYPE_ENUM
+FIELDTYPE *TYPE_ENUM;
+
+/* ./fty_generic.c */
+
+#undef _nc_fty_generic
+void _nc_fty_generic(void)
+ { /* void */ }
+
+/* ./fty_int.c */
+
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerARG;
+
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerPARM;
+
+#undef TYPE_INTEGER
+FIELDTYPE *TYPE_INTEGER;
+
+/* ./fty_ipv4.c */
+#undef TYPE_IPV4
+FIELDTYPE *TYPE_IPV4;
+
+/* ./fty_num.c */
+
+#include <locale.h>
+
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ struct lconv *L;
+ }
+numericARG;
+
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ }
+thisPARM;
+
+#undef TYPE_NUMERIC
+FIELDTYPE *TYPE_NUMERIC;
+
+/* ./fty_regex.c */
+
+#include <regex.h>
+
+typedef struct
+ {
+ regex_t *pRegExp;
+ unsigned long *refCount;
+ }
+RegExp_Arg;
+
+#undef TYPE_REGEXP
+FIELDTYPE *TYPE_REGEXP;
diff --git a/form/llib-lformw b/form/llib-lformw
index 7690c5b0bd88..30c24b56029e 100644
--- a/form/llib-lformw
+++ b/form/llib-lformw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2002,2005 *
+ * Author: Thomas E. Dickey 2002-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./f_trace.c */
-#include "form.priv.h"
+#include <form.priv.h>
#undef _nc_retrace_field_ptr
FIELD **_nc_retrace_field_ptr(
@@ -264,7 +264,7 @@ int move_field(
/* ./fld_newftyp.c */
#undef _nc_Default_FieldType
-const FIELDTYPE *_nc_Default_FieldType = {0};
+FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
@@ -396,6 +396,12 @@ NCURSES_BOOL data_ahead(
#undef _nc_Default_Form
FORM *_nc_Default_Form;
+#undef new_form_sp
+FORM *new_form_sp(
+ SCREEN *sp,
+ FIELD **fields)
+ { return(*(FORM **)0); }
+
#undef new_form
FORM *new_form(
FIELD **fields)
@@ -424,6 +430,13 @@ int field_count(
/* ./frm_driver.c */
+#undef _nc_get_fieldbuffer
+void _nc_get_fieldbuffer(
+ FORM *form,
+ FIELD *field,
+ cchar_t *buf)
+ { /* void */ }
+
#undef _nc_Position_Form_Cursor
int _nc_Position_Form_Cursor(
FORM *form)
@@ -689,9 +702,23 @@ typedef struct
}
enumARG;
+typedef struct
+ {
+ char **kwds;
+ int ccase;
+ int cunique;
+ }
+enumParams;
+
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
+/* ./fty_generic.c */
+
+#undef _nc_fty_generic
+void _nc_fty_generic(void)
+ { /* void */ }
+
/* ./fty_int.c */
typedef struct
@@ -702,6 +729,14 @@ typedef struct
}
integerARG;
+typedef struct
+ {
+ int precision;
+ long low;
+ long high;
+ }
+integerPARM;
+
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
@@ -722,6 +757,14 @@ typedef struct
}
numericARG;
+typedef struct
+ {
+ int precision;
+ double low;
+ double high;
+ }
+thisPARM;
+
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
diff --git a/form/modules b/form/modules
index 89f9f9f54346..205356bba554 100644
--- a/form/modules
+++ b/form/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.15 2006/12/24 00:52:58 tom Exp $
+# $Id: modules,v 1.17 2010/01/23 16:26:37 tom Exp $
##############################################################################
-# Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,49 +28,51 @@
##############################################################################
#
# Author: Thomas E. Dickey 1995-on
+# and: Juergen Pfeifer 2008
#
@ base
# Library objects
-f_trace lib $(srcdir) $(FORM_PRIV_H)
-fld_arg lib $(srcdir) $(FORM_PRIV_H)
-fld_attr lib $(srcdir) $(FORM_PRIV_H)
-fld_current lib $(srcdir) $(FORM_PRIV_H)
-fld_def lib $(srcdir) $(FORM_PRIV_H)
-fld_dup lib $(srcdir) $(FORM_PRIV_H)
-fld_ftchoice lib $(srcdir) $(FORM_PRIV_H)
-fld_ftlink lib $(srcdir) $(FORM_PRIV_H)
-fld_info lib $(srcdir) $(FORM_PRIV_H)
-fld_just lib $(srcdir) $(FORM_PRIV_H)
-fld_link lib $(srcdir) $(FORM_PRIV_H)
-fld_max lib $(srcdir) $(FORM_PRIV_H)
-fld_move lib $(srcdir) $(FORM_PRIV_H)
-fld_newftyp lib $(srcdir) $(FORM_PRIV_H)
-fld_opts lib $(srcdir) $(FORM_PRIV_H)
-fld_pad lib $(srcdir) $(FORM_PRIV_H)
-fld_page lib $(srcdir) $(FORM_PRIV_H)
-fld_stat lib $(srcdir) $(FORM_PRIV_H)
-fld_type lib $(srcdir) $(FORM_PRIV_H)
-fld_user lib $(srcdir) $(FORM_PRIV_H)
-frm_cursor lib $(srcdir) $(FORM_PRIV_H)
-frm_data lib $(srcdir) $(FORM_PRIV_H)
-frm_def lib $(srcdir) $(FORM_PRIV_H)
-frm_driver lib $(srcdir) $(FORM_PRIV_H)
-frm_hook lib $(srcdir) $(FORM_PRIV_H)
-frm_opts lib $(srcdir) $(FORM_PRIV_H)
-frm_page lib $(srcdir) $(FORM_PRIV_H)
-frm_post lib $(srcdir) $(FORM_PRIV_H)
-frm_req_name lib $(srcdir) $(FORM_PRIV_H)
-frm_scale lib $(srcdir) $(FORM_PRIV_H)
-frm_sub lib $(srcdir) $(FORM_PRIV_H)
-frm_user lib $(srcdir) $(FORM_PRIV_H)
-frm_win lib $(srcdir) $(FORM_PRIV_H)
-fty_alnum lib $(srcdir) $(FORM_PRIV_H)
-fty_alpha lib $(srcdir) $(FORM_PRIV_H)
-fty_enum lib $(srcdir) $(FORM_PRIV_H)
-fty_int lib $(srcdir) $(FORM_PRIV_H)
-fty_ipv4 lib $(srcdir) $(FORM_PRIV_H)
-fty_num lib $(srcdir) $(FORM_PRIV_H)
-fty_regex lib $(srcdir) $(FORM_PRIV_H)
+f_trace lib $(srcdir) $(HEADER_DEPS)
+fld_arg lib $(srcdir) $(HEADER_DEPS)
+fld_attr lib $(srcdir) $(HEADER_DEPS)
+fld_current lib $(srcdir) $(HEADER_DEPS)
+fld_def lib $(srcdir) $(HEADER_DEPS)
+fld_dup lib $(srcdir) $(HEADER_DEPS)
+fld_ftchoice lib $(srcdir) $(HEADER_DEPS)
+fld_ftlink lib $(srcdir) $(HEADER_DEPS)
+fld_info lib $(srcdir) $(HEADER_DEPS)
+fld_just lib $(srcdir) $(HEADER_DEPS)
+fld_link lib $(srcdir) $(HEADER_DEPS)
+fld_max lib $(srcdir) $(HEADER_DEPS)
+fld_move lib $(srcdir) $(HEADER_DEPS)
+fld_newftyp lib $(srcdir) $(HEADER_DEPS)
+fld_opts lib $(srcdir) $(HEADER_DEPS)
+fld_pad lib $(srcdir) $(HEADER_DEPS)
+fld_page lib $(srcdir) $(HEADER_DEPS)
+fld_stat lib $(srcdir) $(HEADER_DEPS)
+fld_type lib $(srcdir) $(HEADER_DEPS)
+fld_user lib $(srcdir) $(HEADER_DEPS)
+frm_cursor lib $(srcdir) $(HEADER_DEPS)
+frm_data lib $(srcdir) $(HEADER_DEPS)
+frm_def lib $(srcdir) $(HEADER_DEPS)
+frm_driver lib $(srcdir) $(HEADER_DEPS)
+frm_hook lib $(srcdir) $(HEADER_DEPS)
+frm_opts lib $(srcdir) $(HEADER_DEPS)
+frm_page lib $(srcdir) $(HEADER_DEPS)
+frm_post lib $(srcdir) $(HEADER_DEPS)
+frm_req_name lib $(srcdir) $(HEADER_DEPS)
+frm_scale lib $(srcdir) $(HEADER_DEPS)
+frm_sub lib $(srcdir) $(HEADER_DEPS)
+frm_user lib $(srcdir) $(HEADER_DEPS)
+frm_win lib $(srcdir) $(HEADER_DEPS)
+fty_alnum lib $(srcdir) $(HEADER_DEPS)
+fty_alpha lib $(srcdir) $(HEADER_DEPS)
+fty_enum lib $(srcdir) $(HEADER_DEPS)
+fty_generic lib $(srcdir) $(HEADER_DEPS)
+fty_int lib $(srcdir) $(HEADER_DEPS)
+fty_ipv4 lib $(srcdir) $(HEADER_DEPS)
+fty_num lib $(srcdir) $(HEADER_DEPS)
+fty_regex lib $(srcdir) $(HEADER_DEPS)
# vile:makemode
diff --git a/include/Caps b/include/Caps
index 7c63c7f039a5..f9a8ebd32aac 100644
--- a/include/Caps
+++ b/include/Caps
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -29,7 +29,7 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
-# $Id: Caps,v 1.36 2006/05/27 15:33:04 tom Exp $
+# $Id: Caps,v 1.37 2010/12/04 18:47:13 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@@ -1256,9 +1256,3 @@ infoalias ksel kslt IBM key_select
# 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/include/Caps.aix4 b/include/Caps.aix4
index 75913dc6e9a4..5864d7b7afe6 100644
--- a/include/Caps.aix4
+++ b/include/Caps.aix4
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. #
+# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.aix4,v 1.7 2006/05/27 15:33:04 tom Exp $
+# $Id: Caps.aix4,v 1.8 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
@@ -1247,9 +1247,3 @@ infoalias ksel kslt IBM key_select
# 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/include/Caps.hpux11 b/include/Caps.hpux11
index b74acdb44b70..8dbe656cd617 100644
--- a/include/Caps.hpux11
+++ b/include/Caps.hpux11
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2002-2003,2006 Free Software Foundation, Inc. #
+# Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.hpux11,v 1.4 2006/05/27 15:33:04 tom Exp $
+# $Id: Caps.hpux11,v 1.5 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
@@ -1270,9 +1270,3 @@ infoalias ksel kslt IBM key_select
# 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/include/Caps.keys b/include/Caps.keys
index 6841ae5c1d5b..4d4fe30b8130 100644
--- a/include/Caps.keys
+++ b/include/Caps.keys
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. #
+# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -29,7 +29,7 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
-# $Id: Caps.keys,v 1.3 2006/05/27 15:33:04 tom Exp $
+# $Id: Caps.keys,v 1.4 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
@@ -1346,9 +1346,3 @@ infoalias ksel kslt IBM key_select
# 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/include/Caps.osf1r5 b/include/Caps.osf1r5
index d9ea5646ff5a..79dbf50fd3db 100644
--- a/include/Caps.osf1r5
+++ b/include/Caps.osf1r5
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2002,2006 Free Software Foundation, Inc. #
+# Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.osf1r5,v 1.4 2006/05/27 15:33:04 tom Exp $
+# $Id: Caps.osf1r5,v 1.5 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
@@ -1266,9 +1266,3 @@ infoalias ksel kslt IBM key_select
# 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/include/Caps.uwin b/include/Caps.uwin
index 450eaeb6ae58..31020cd0700a 100644
--- a/include/Caps.uwin
+++ b/include/Caps.uwin
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. #
+# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
-# $Id: Caps.uwin,v 1.4 2006/05/27 15:33:04 tom Exp $
+# $Id: Caps.uwin,v 1.5 2010/12/04 18:49:20 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
@@ -1082,9 +1082,3 @@ infoalias ksel kslt IBM key_select
# 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/include/MKterm.h.awk.in b/include/MKterm.h.awk.in
index 5fc20529b11b..261c40d75619 100644
--- a/include/MKterm.h.awk.in
+++ b/include/MKterm.h.awk.in
@@ -1,7 +1,7 @@
# vile:awkmode
BEGIN {
print "/****************************************************************************"
- print " * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *"
+ print " * Copyright (c) 1998-2009,2010 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 *"
@@ -34,7 +34,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
- print "/* $Id: MKterm.h.awk.in,v 1.50 2008/05/24 23:13:59 tom Exp $ */"
+ print "/* $Id: MKterm.h.awk.in,v 1.58 2010/01/09 19:53:26 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@@ -130,11 +130,15 @@ BEGIN {
print ""
print "#else /* !HAVE_TERMIO_H */"
print ""
+ print "#if __MINGW32__"
+ print "# include <ncurses_mingw.h>"
+ print "# define TTY struct termios"
+ print "#else"
print "#undef TERMIOS"
print "#include <sgtty.h>"
print "#include <sys/ioctl.h>"
print "#define TTY struct sgttyb"
- print ""
+ print "#endif /* MINGW32 */"
print "#endif /* HAVE_TERMIO_H */"
print ""
print "#endif /* HAVE_TERMIOS_H */"
@@ -228,8 +232,16 @@ END {
print " char * _termname; /* used for termname() */"
print "} TERMINAL;"
print ""
- print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
+ print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
+ print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
+ print "#elif @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
+ print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
+ print "#else"
+ print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
+ print "#endif"
+ print ""
+ print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
@@ -240,7 +252,6 @@ END {
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
print ""
- print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
@@ -253,8 +264,6 @@ END {
print ""
print "#else"
print ""
- print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
- 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[];"
@@ -300,6 +309,8 @@ END {
print "extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */"
print "#endif"
print ""
+ print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
+ print ""
print "#endif /* __NCURSES_H */"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
@@ -312,6 +323,37 @@ END {
print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
print "#endif /* NCURSES_TERMCAP_H_incl */"
print ""
+ print "/*"
+ print " * Include curses.h before term.h to enable these extensions."
+ print " */"
+ print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
+ print ""
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);"
+ print ""
+ print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
+ print "#else"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
+ print "#endif"
+ print ""
+ print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);"
+ print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
+ print ""
+ print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
+ print ""
+ print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
+ print "#endif /* NCURSES_SP_FUNCS */"
+ print ""
print "#ifdef __cplusplus"
print "}"
print "#endif"
diff --git a/include/Makefile.in b/include/Makefile.in
index 1a48a1700a86..e2a2f8a22866 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.35 2001/12/08 18:50:06 tom Exp $
+# $Id: Makefile.in,v 1.40 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -40,6 +40,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
DESTDIR = @DESTDIR@
@@ -54,6 +55,9 @@ INSTALL_DATA = @INSTALL_DATA@
AWK = @AWK@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
VERSION = @cf_cv_rel_version@
# The "Caps" file specifies the terminfo database format, as well as the list
@@ -64,6 +68,7 @@ TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@
CONFIG_SRC = \
MKterm.h.awk \
curses.head \
+ ncurses_dll.h \
termcap.h \
unctrl.h
@@ -73,6 +78,7 @@ AUTO_SRC = \
hashsize.h \
ncurses_def.h \
parametrized.h \
+ config.h \
term.h
################################################################################
@@ -104,11 +110,15 @@ ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
parametrized.h: $(TERMINFO_CAPS) $(srcdir)/MKparametrized.sh
AWK=$(AWK) sh $(srcdir)/MKparametrized.sh $(TERMINFO_CAPS) >$@
+# This is required by pthread.h on MinGW
+config.h:
+ touch $@
+
tags:
- ctags *.[ch]
+ $(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
@@ -117,7 +127,7 @@ clean :: mostlyclean
-rm -f $(AUTO_SRC)
distclean :: clean
- -rm -f Makefile $(CONFIG_SRC)
+ -rm -f Makefile $(CONFIG_SRC) config.h
realclean :: distclean
diff --git a/include/capdefaults.c b/include/capdefaults.c
index 33f2fe8f0299..da76cc1d7a57 100644
--- a/include/capdefaults.c
+++ b/include/capdefaults.c
@@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: capdefaults.c,v 1.13 2008/08/04 12:33:42 tom Exp $ */
+/* $Id: capdefaults.c,v 1.14 2008/11/16 00:19:59 juergen Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file is
@@ -44,11 +44,11 @@
* postprocess_termcap().
*/
{
- char *sp;
+ char *strp;
short capval;
#define EXTRACT_DELAY(str) \
- (short) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0)
+ (short) (strp = strchr(str, '*'), strp ? atoi(strp+1) : 0)
/* current (4.4BSD) capabilities marked obsolete */
if (VALID_STRING(carriage_return)
diff --git a/include/curses.h.in b/include/curses.h.in
index 53da9a564fe5..5774154e8538 100644
--- a/include/curses.h.in
+++ b/include/curses.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: curses.h.in,v 1.187 2008/08/30 20:11:29 tom Exp $ */
+/* $Id: curses.h.in,v 1.220 2011/01/22 19:47:20 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@@ -40,12 +40,6 @@
#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@
@@ -110,6 +104,19 @@
#endif
/*
+ * The reentrant code relies on the opaque setting, but adds features.
+ */
+#ifndef NCURSES_REENTRANT
+#define NCURSES_REENTRANT @cf_cv_enable_reentrant@
+#endif
+
+/*
+ * Control whether bindings for interop support are added.
+ */
+#undef NCURSES_INTEROP_FUNCS
+#define NCURSES_INTEROP_FUNCS @NCURSES_INTEROP_FUNCS@
+
+/*
* The internal type used for window dimensions.
*/
#undef NCURSES_SIZE_T
@@ -137,12 +144,24 @@ typedef unsigned @cf_cv_typeof_chtype@ chtype;
typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
#endif
+/*
+ * We need FILE, etc. Include this before checking any feature symbols.
+ */
#include <stdio.h>
-#include <unctrl.h>
+
+/*
+ * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or
+ * conflicting) when _XOPEN_SOURCE is 500 or greater.
+ */
+#undef NCURSES_WIDECHAR
+#if defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5)
+#define NCURSES_WIDECHAR
+#endif
+
#include <stdarg.h> /* we need va_list */
-#ifdef _XOPEN_SOURCE_EXTENDED
+#ifdef NCURSES_WIDECHAR
#include <stddef.h> /* we want wchar_t */
-#endif /* _XOPEN_SOURCE_EXTENDED */
+#endif
/* X/Open 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
@@ -224,9 +243,9 @@ extern "C" {
/* line graphics */
-#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@
+#if @BROKEN_LINKER@ || NCURSES_REENTRANT
NCURSES_WRAPPED_VAR(chtype*, acs_map);
-#define acs_map (_nc_acs_map())
+#define acs_map NCURSES_PUBLIC_VAR(acs_map())
#else
extern NCURSES_EXPORT_VAR(chtype) acs_map[];
#endif
@@ -323,7 +342,7 @@ typedef struct _win_st WINDOW;
typedef chtype attr_t; /* ...must be at least as wide as chtype */
-#ifdef _XOPEN_SOURCE_EXTENDED
+#ifdef NCURSES_WIDECHAR
#if @NCURSES_LIBUTF8@
#ifdef mblen /* libutf8.h defines it w/o undefining first */
@@ -344,7 +363,13 @@ typedef unsigned short wchar_t@NCURSES_OK_WCHAR_T@;
typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
#endif
-#define CCHARW_MAX 5
+/*
+ * cchar_t stores an array of CCHARW_MAX wide characters. The first is
+ * normally a spacing character. The others are non-spacing. If those
+ * (spacing and nonspacing) do not fill the array, a null L'\0' follows.
+ * Otherwise, a null is assumed to follow when extracting via getcchar().
+ */
+#define CCHARW_MAX @NCURSES_CCHARW_MAX@
typedef struct
{
attr_t attr;
@@ -357,7 +382,7 @@ typedef struct
}
cchar_t;
-#endif /* _XOPEN_SOURCE_EXTENDED */
+#endif /* NCURSES_WIDECHAR */
#if !NCURSES_OPAQUE
struct ldat;
@@ -409,7 +434,7 @@ struct _win_st
NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */
-#ifdef _XOPEN_SOURCE_EXTENDED
+#ifdef NCURSES_WIDECHAR
cchar_t _bkgrnd; /* current background char/attribute pair */
#if @NCURSES_EXT_COLORS@
int _color; /* current color-pair for non-space character */
@@ -461,8 +486,8 @@ typedef struct
_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 */
+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 */
@@ -511,6 +536,12 @@ extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *);
#endif
/*
+ * Curses uses a helper function. Define our type for this to simplify
+ * extending it for the sp-funcs feature.
+ */
+typedef int (*NCURSES_OUTC)(int);
+
+/*
* Function prototypes. This is the complete X/Open 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
@@ -646,7 +677,7 @@ extern NCURSES_EXPORT(int) mvwinchstr (WINDOW *, int, int, chtype *); /* genera
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) 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);
@@ -654,9 +685,9 @@ extern NCURSES_EXPORT(int) mvwscanw (WINDOW *,int,int, NCURSES_CONST char *,...)
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(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(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 */
@@ -710,7 +741,7 @@ 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) 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 */
@@ -727,7 +758,7 @@ 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) vidputs (chtype, NCURSES_OUTC); /* 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 */
@@ -805,6 +836,8 @@ extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,l
extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */
#endif
+extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
+
/*
* These functions are not in X/Open, but we use them in macro definitions:
*/
@@ -821,7 +854,7 @@ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */
/*
* vid_attr() was implemented originally based on a draft of X/Open curses.
*/
-#ifndef _XOPEN_SOURCE_EXTENDED
+#ifndef NCURSES_WIDECHAR
#define vid_attr(a,pair,opts) vidattr(a)
#endif
@@ -838,6 +871,7 @@ 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) get_escdelay (void);
extern NCURSES_EXPORT(int) key_defined (const char *);
extern NCURSES_EXPORT(int) keyok (int, bool);
extern NCURSES_EXPORT(int) resize_term (int, int);
@@ -856,23 +890,135 @@ extern NCURSES_EXPORT(void) nofilter(void);
* These extensions provide access to information stored in the WINDOW even
* when NCURSES_OPAQUE is set:
*/
-extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* generated */
-extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generated */
+extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
+extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
#else
#define curses_version() NCURSES_VERSION
#endif
+/*
+ * Extra extension-functions, which pass a SCREEN pointer rather than using
+ * a global variable SP.
+ */
+#if @NCURSES_SP_FUNCS@
+#undef NCURSES_SP_FUNCS
+#define NCURSES_SP_FUNCS @NCURSES_PATCH@
+#define NCURSES_SP_NAME(name) name##_sp
+
+/* Define the sp-funcs helper function */
+#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
+typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
+
+extern NCURSES_EXPORT(SCREEN *) new_prescr (void); /* implemented:SP_FUNC */
+
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(baudrate) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, short, short*, short*, short*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_shell_mode) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(delay_output) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(doupdate) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented:SP_FUNC */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_color) (SCREEN*, short, short, short, short); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, short, short, short); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(intrflush) (SCREEN*, WINDOW*, bool); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(isendwin) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(keyname) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(char) NCURSES_SP_NAME(killchar) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noraw) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(pair_content) (SCREEN*, short, short*, short*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(qiflush) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attrset) (SCREEN*, const chtype); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(slk_attr) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attr_set) (SCREEN*, const attr_t, short, void*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_clear) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_color) (SCREEN*, short); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_init) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(slk_label) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_noutrefresh) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_refresh) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_restore) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_set) (SCREEN*, int, const char *, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_touch) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(start_color) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(termattrs) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
+#if @NCURSES_EXT_FUNCS@
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_default_colors) (SCREEN*); /* implemented:EXT_SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
+#endif
+#else
+#undef NCURSES_SP_FUNCS
+#define NCURSES_SP_FUNCS 0
+#define NCURSES_SP_NAME(name) name
+#define NCURSES_SP_OUTC NCURSES_OUTC
+#endif
+
/* attributes */
#define NCURSES_ATTR_SHIFT 8
@@ -951,7 +1097,7 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
/* It seems older SYSV curses versions define these */
#if !NCURSES_OPAQUE
-#define getattrs(win) ((win) ? (win)->_attrs : A_NORMAL)
+#define getattrs(win) NCURSES_CAST(int, (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)
@@ -969,11 +1115,17 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
#if !NCURSES_OPAQUE
-#if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
-#define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \
- (win)->_attrs = (at))
+#if defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
+#define wattrset(win,at) ((win) \
+ ? ((win)->_color = PAIR_NUMBER(at), \
+ (win)->_attrs = NCURSES_CAST(attr_t, at), \
+ OK) \
+ : ERR)
#else
-#define wattrset(win,at) ((win)->_attrs = (at))
+#define wattrset(win,at) ((win) \
+ ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
+ OK) \
+ : ERR)
#endif
#endif /* NCURSES_OPAQUE */
@@ -1003,7 +1155,7 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
* These apply to the first 256 color pairs.
*/
#define COLOR_PAIR(n) NCURSES_BITS(n, 0)
-#define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
+#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
/*
* pseudo functions for standard screen
@@ -1111,17 +1263,17 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
#if !NCURSES_OPAQUE
-#if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
+#if defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
#define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_COLOR), \
(win)->_color = (p), \
OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
- (void)((p) != (void *)0 && (*(p) = (win)->_color)), \
+ (void)((p) != (void *)0 && (*(p) = (short)(win)->_color)), \
OK)
#else
-#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
+#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p)), OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
- (void)((p) != (void *)0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \
+ (void)((p) != (void *)0 && (*(p) = (short)PAIR_NUMBER((win)->_attrs))), \
OK)
#endif
#endif /* NCURSES_OPAQUE */
@@ -1148,16 +1300,18 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
*/
#if @NCURSES_EXT_FUNCS@
#if !NCURSES_OPAQUE
-#define is_cleared(win) ((win)->_clear)
-#define is_idcok(win) ((win)->_idcok)
-#define is_idlok(win) ((win)->_idlok)
-#define is_immedok(win) ((win)->_immed)
-#define is_keypad(win) ((win)->_use_keypad)
-#define is_leaveok(win) ((win)->_leaveok)
-#define is_nodelay(win) ((win)->_delay == 0)
-#define is_notimeout(win) ((win)->_notimeout)
-#define is_scrollok(win) ((win)->_scroll)
-#define is_syncok(win) ((win)->_sync)
+#define is_cleared(win) ((win) ? (win)->_clear : FALSE)
+#define is_idcok(win) ((win) ? (win)->_idcok : FALSE)
+#define is_idlok(win) ((win) ? (win)->_idlok : FALSE)
+#define is_immedok(win) ((win) ? (win)->_immed : FALSE)
+#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE)
+#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE)
+#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE)
+#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE)
+#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
+#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE)
+#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
+#define is_syncok(win) ((win) ? (win)->_sync : FALSE)
#define wgetparent(win) ((win) ? (win)->_parent : 0)
#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#endif
@@ -1173,7 +1327,7 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
* It gives the ESC expire time in milliseconds.
* b. ttytype is needed for backward compatibility
*/
-#if @cf_cv_enable_reentrant@
+#if NCURSES_REENTRANT
NCURSES_WRAPPED_VAR(WINDOW *, curscr);
NCURSES_WRAPPED_VAR(WINDOW *, newscr);
diff --git a/include/curses.tail b/include/curses.tail
index aef7c378d5d5..098c898ed571 100644
--- a/include/curses.tail
+++ b/include/curses.tail
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */
+/* $Id: curses.tail,v 1.20 2010/03/28 19:10:55 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@@ -94,13 +94,22 @@ typedef struct
}
MEVENT;
-extern NCURSES_EXPORT(int) getmouse (MEVENT *);
-extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
+extern NCURSES_EXPORT(bool) has_mouse(void);
+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*, int*, int*, bool);
-extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
+extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int);
+extern NCURSES_EXPORT(int) mouseinterval (int);
+extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool);
+extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
+
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_mouse) (SCREEN*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *);
+extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
+#endif
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
@@ -109,6 +118,11 @@ extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* gene
extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */
extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */
+#endif
+
/* Debugging : use with libncurses_g.a */
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
@@ -119,7 +133,7 @@ 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
+#ifdef NCURSES_WIDECHAR
#define _tracech_t _tracecchar_t
extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *);
#define _tracech_t2 _tracecchar_t2
@@ -160,6 +174,8 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */
#endif
+#include <unctrl.h>
+
#ifdef __cplusplus
#ifndef NCURSES_NOMACROS
diff --git a/include/curses.wide b/include/curses.wide
index 0c799e4f395c..44135eecb9d2 100644
--- a/include/curses.wide
+++ b/include/curses.wide
@@ -1,10 +1,12 @@
-/* $Id: curses.wide,v 1.34 2007/03/10 17:52:23 tom Exp $ */
+/* $Id: curses.wide,v 1.42 2010/03/30 00:39:41 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
* (see that file for the relevant copyright).
*/
-#ifdef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_CURSES 1
+
+#ifdef NCURSES_WIDECHAR
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
@@ -60,6 +62,56 @@ extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */
#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */
+ /* double lines */
+#define WACS_BDDB NCURSES_WACS('C')
+#define WACS_DDBB NCURSES_WACS('D')
+#define WACS_BBDD NCURSES_WACS('B')
+#define WACS_DBBD NCURSES_WACS('A')
+#define WACS_DBDD NCURSES_WACS('G')
+#define WACS_DDDB NCURSES_WACS('F')
+#define WACS_DDBD NCURSES_WACS('H')
+#define WACS_BDDD NCURSES_WACS('I')
+#define WACS_BDBD NCURSES_WACS('R')
+#define WACS_DBDB NCURSES_WACS('Y')
+#define WACS_DDDD NCURSES_WACS('E')
+
+#define WACS_D_ULCORNER WACS_BDDB
+#define WACS_D_LLCORNER WACS_DDBB
+#define WACS_D_URCORNER WACS_BBDD
+#define WACS_D_LRCORNER WACS_DBBD
+#define WACS_D_RTEE WACS_DBDD
+#define WACS_D_LTEE WACS_DDDB
+#define WACS_D_BTEE WACS_DDBD
+#define WACS_D_TTEE WACS_BDDD
+#define WACS_D_HLINE WACS_BDBD
+#define WACS_D_VLINE WACS_DBDB
+#define WACS_D_PLUS WACS_DDDD
+
+ /* thick lines */
+#define WACS_BTTB NCURSES_WACS('L')
+#define WACS_TTBB NCURSES_WACS('M')
+#define WACS_BBTT NCURSES_WACS('K')
+#define WACS_TBBT NCURSES_WACS('J')
+#define WACS_TBTT NCURSES_WACS('U')
+#define WACS_TTTB NCURSES_WACS('T')
+#define WACS_TTBT NCURSES_WACS('V')
+#define WACS_BTTT NCURSES_WACS('W')
+#define WACS_BTBT NCURSES_WACS('Q')
+#define WACS_TBTB NCURSES_WACS('X')
+#define WACS_TTTT NCURSES_WACS('N')
+
+#define WACS_T_ULCORNER WACS_BTTB
+#define WACS_T_LLCORNER WACS_TTBB
+#define WACS_T_URCORNER WACS_BBTT
+#define WACS_T_LRCORNER WACS_TBBT
+#define WACS_T_RTEE WACS_TBTT
+#define WACS_T_LTEE WACS_TTTB
+#define WACS_T_BTEE WACS_TTBT
+#define WACS_T_TTEE WACS_BTTT
+#define WACS_T_HLINE WACS_BTBT
+#define WACS_T_VLINE WACS_TBTB
+#define WACS_T_PLUS WACS_TTTT
+
/*
* Function prototypes for wide-character operations.
*
@@ -138,7 +190,7 @@ 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) vid_puts (attr_t, short, void *, NCURSES_OUTC); /* 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 */
@@ -165,6 +217,14 @@ 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 */
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, short, void *); /* implemented:SP_FUNC */
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
+#endif
+
#ifndef NCURSES_NOMACROS
/*
@@ -249,4 +309,4 @@ extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
#endif
-#endif /* _XOPEN_SOURCE_EXTENDED */
+#endif /* NCURSES_WIDECHAR */
diff --git a/include/headers b/include/headers
index a24bd90923ff..6c367950c9f4 100644
--- a/include/headers
+++ b/include/headers
@@ -1,6 +1,6 @@
-# $Id: headers,v 1.9 2007/01/20 19:57:04 Miroslav.Lichvar Exp $
+# $Id: headers,v 1.10 2009/09/05 17:46:30 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -33,7 +33,7 @@ term.h
curses.h
unctrl.h
termcap.h
-$(srcdir)/ncurses_dll.h
+ncurses_dll.h
@ ticlib
$(srcdir)/tic.h
$(srcdir)/term_entry.h
diff --git a/include/nc_alloc.h b/include/nc_alloc.h
index f521bffe9f0a..da70906f552f 100644
--- a/include/nc_alloc.h
+++ b/include/nc_alloc.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: nc_alloc.h,v 1.16 2008/09/27 22:30:33 tom Exp $ */
+/* $Id: nc_alloc.h,v 1.18 2010/11/20 22:59:49 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
@@ -38,7 +38,7 @@
extern "C" {
#endif
-#if HAVE_LIBDMALLOC
+#if defined(HAVE_LIBDMALLOC) && HAVE_LIBDMALLOC
#include <string.h>
#undef strndup /* workaround for #define in GLIBC 2.7 */
#include <dmalloc.h> /* Gray Watson's library */
@@ -47,14 +47,14 @@ extern "C" {
#define HAVE_LIBDMALLOC 0
#endif
-#if HAVE_LIBDBMALLOC
+#if defined(HAVE_LIBDBMALLOC) && HAVE_LIBDBMALLOC
#include <dbmalloc.h> /* Conor Cahill's library */
#else
#undef HAVE_LIBDBMALLOC
#define HAVE_LIBDBMALLOC 0
#endif
-#if HAVE_LIBMPATROL
+#if defined(HAVE_LIBMPATROL) && HAVE_LIBMPATROL
#include <mpatrol.h> /* Memory-Patrol library */
#else
#undef HAVE_LIBMPATROL
@@ -74,9 +74,15 @@ extern NCURSES_EXPORT(void) _nc_free_tic(int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_tparm(void);
extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
-#define ExitProgram(code) _nc_free_and_exit(code)
+
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
#endif
+#define ExitProgram(code) _nc_free_and_exit(code)
+
+#endif /* NO_LEAKS, etc */
+
#ifndef HAVE_NC_FREEALL
#define HAVE_NC_FREEALL 0
#endif
diff --git a/include/nc_mingw.h b/include/nc_mingw.h
new file mode 100644
index 000000000000..32470034df34
--- /dev/null
+++ b/include/nc_mingw.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+ * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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, 2008-on *
+ * *
+ ****************************************************************************/
+
+/* $Id: nc_mingw.h,v 1.3 2010/09/25 22:16:12 juergen Exp $ */
+
+#ifndef NC_MINGW_H
+#define NC_MINGW_H 1
+
+#ifdef WINVER
+# if WINVER < 0x0501
+# error WINVER must at least be 0x0501
+# endif
+#else
+# define WINVER 0x0501
+#endif
+#include <windows.h>
+
+#undef sleep
+#define sleep(n) Sleep((n) * 1000)
+
+#undef gettimeofday
+#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
+
+#include <sys/time.h> /* for struct timeval */
+
+extern int _nc_gettimeofday(struct timeval *, void *);
+
+#undef HAVE_GETTIMEOFDAY
+#define HAVE_GETTIMEOFDAY 1
+
+#define SIGHUP 1
+#define SIGKILL 9
+#define getlogin() "username"
+
+#undef wcwidth
+#define wcwidth(ucs) _nc_wcwidth(ucs)
+extern int _nc_wcwidth(wchar_t);
+
+#endif /* NC_MINGW_H */
diff --git a/include/nc_panel.h b/include/nc_panel.h
index 6578577ee988..6a9ffea39687 100644
--- a/include/nc_panel.h
+++ b/include/nc_panel.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,9 +31,8 @@
* and: Thomas E. Dickey *
****************************************************************************/
-
/*
- * $Id: nc_panel.h,v 1.5 2008/08/04 18:26:46 tom Exp $
+ * $Id: nc_panel.h,v 1.7 2009/07/04 18:20:02 tom Exp $
*
* nc_panel.h
*
@@ -45,25 +44,33 @@
#define NC_PANEL_H 1
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-struct panel; /* Forward Declaration */
+ struct panel; /* Forward Declaration */
-struct panelhook {
- struct panel* top_panel;
- struct panel* bottom_panel;
- struct panel* stdscr_pseudo_panel;
+ struct panelhook
+ {
+ struct panel *top_panel;
+ struct panel *bottom_panel;
+ struct panel *stdscr_pseudo_panel;
#if NO_LEAKS
- int (*destroy)(struct panel *);
+ int (*destroy) (struct panel *);
#endif
-};
+ };
-/* Retrieve the panelhook of the current screen */
-extern NCURSES_EXPORT(struct panelhook*) _nc_panelhook (void);
+ struct screen; /* Forward declaration */
+/* Retrieve the panelhook of the specified screen */
+ extern NCURSES_EXPORT(struct panelhook *)
+ _nc_panelhook (void);
+#if NCURSES_SP_FUNCS
+ extern NCURSES_EXPORT(struct panelhook *)
+ NCURSES_SP_NAME(_nc_panelhook) (SCREEN *);
+#endif
#ifdef __cplusplus
}
#endif
-#endif /* NC_PANEL_H */
+#endif /* NC_PANEL_H */
diff --git a/include/nc_tparm.h b/include/nc_tparm.h
index d1d769be9a27..a8dbcacb1e31 100644
--- a/include/nc_tparm.h
+++ b/include/nc_tparm.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2006,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,13 +30,19 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
-/* $Id: nc_tparm.h,v 1.4 2006/11/26 00:49:25 tom Exp $ */
+/* $Id: nc_tparm.h,v 1.5 2010/12/25 20:27:22 tom Exp $ */
+
+#ifndef NC_TPARM_included
+#define NC_TPARM_included 1
/*
* Cast parameters past the formatting-string for tparm() to match the
* assumption of the varargs code.
*/
+#ifndef TPARM_ARG
#define TPARM_ARG long
+#endif
+
#define TPARM_N(n) (TPARM_ARG)(n)
#define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j))
@@ -63,3 +69,5 @@
#define TPARM_1(a,b) TPARM_2(a,b,0)
#define TPARM_0(a) TPARM_1(a,0)
#endif
+
+#endif /* NC_TPARM_included */
diff --git a/include/ncurses_defs b/include/ncurses_defs
index 97a377dc5270..42d5908457cc 100644
--- a/include/ncurses_defs
+++ b/include/ncurses_defs
@@ -1,6 +1,6 @@
-# $Id: ncurses_defs,v 1.40 2008/09/06 15:57:41 tom Exp $
+# $Id: ncurses_defs,v 1.46 2011/03/22 09:17:59 tom Exp $
##############################################################################
-# Copyright (c) 2000-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 2000-2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -85,6 +85,7 @@ HAVE_LIMITS_H
HAVE_LINK
HAVE_LOCALE_H
HAVE_LONG_FILE_NAMES
+HAVE_MATH_H
HAVE_MBLEN
HAVE_MBRLEN
HAVE_MBRTOWC
@@ -110,11 +111,13 @@ HAVE_REMOVE
HAVE_RESIZETERM
HAVE_RESIZE_TERM
HAVE_RIPOFFLINE 1
+HAVE_SCR_DUMP 1
HAVE_SELECT
HAVE_SETBUF
HAVE_SETBUFFER
HAVE_SETUPTERM 1
HAVE_SETVBUF
+HAVE_SGTTY_H
HAVE_SIGACTION
HAVE_SIGVEC
HAVE_SIZECHANGE
@@ -139,6 +142,7 @@ HAVE_TERMATTRS 1
HAVE_TERMIOS_H
HAVE_TERMIO_H
HAVE_TERMNAME 1
+HAVE_TERM_ENTRY_H 1
HAVE_TERM_H 1
HAVE_TGETENT 1
HAVE_TIGETNUM 1
@@ -163,6 +167,7 @@ HAVE_WCTYPE_H
HAVE_WINSSTR 1
HAVE_WORKING_POLL
HAVE_WRESIZE
+HAVE_WSYNCDOWN 1
HAVE__DOSCAN
MIXEDCASE_FILENAMES
NCURSES_CHAR_EQ
@@ -171,7 +176,6 @@ NCURSES_EXT_COLORS
NCURSES_EXT_FUNCS
NCURSES_NO_PADDING
NCURSES_PATHSEP ':'
-NDEBUG
NEED_PTEM_H
NO_LEAKS
PURE_TERMINFO
@@ -195,6 +199,7 @@ USE_HOME_TERMINFO
USE_LINKS
USE_MY_MEMMOVE
USE_OK_BCOPY
+USE_PTHREADS_EINTR
USE_RCS_IDS
USE_REENTRANT
USE_SAFE_SPRINTF
diff --git a/include/ncurses_dll.h b/include/ncurses_dll.h.in
index e24feee2051d..82c9b85ca542 100644
--- a/include/ncurses_dll.h
+++ b/include/ncurses_dll.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -25,11 +25,18 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
-/* $Id: ncurses_dll.h,v 1.6 2007/03/10 19:21:49 tom Exp $ */
+/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
+/*
+ * For reentrant code, we map the various global variables into SCREEN by
+ * using functions to access them.
+ */
+#define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name
+#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void)
+
/* 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 */
@@ -37,7 +44,7 @@
#undef NCURSES_DLL
#define NCURSES_STATIC
-#if defined(__CYGWIN__)
+#if defined(__CYGWIN__) || defined(__MINGW32__)
# if defined(NCURSES_DLL)
# if defined(NCURSES_STATIC)
# undef NCURSES_STATIC
@@ -76,11 +83,4 @@
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
#endif
-/*
- * For reentrant code, we map the various global variables into SCREEN by
- * using functions to access them.
- */
-#define NCURSES_PUBLIC_VAR(name) _nc_##name
-#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void)
-
#endif /* NCURSES_DLL_H_incl */
diff --git a/include/ncurses_mingw.h b/include/ncurses_mingw.h
new file mode 100644
index 000000000000..4ea1dad53737
--- /dev/null
+++ b/include/ncurses_mingw.h
@@ -0,0 +1,164 @@
+/****************************************************************************
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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, 2008-on *
+ * *
+ ****************************************************************************/
+
+/* $Id: ncurses_mingw.h,v 1.1 2008/12/14 19:22:16 juergen Exp $ */
+
+/*
+ * This is a placholder up to now and describes what needs to be implemented
+ * to support I/O to external terminals with ncurses on the Windows OS.
+ */
+
+#if __MINGW32__
+#ifndef _NC_MINGWH
+#define _NC_MINGWH
+
+#define USE_CONSOLE_DRIVER 1
+
+#undef TERMIOS
+#define TERMIOS 1
+
+#define InvalidHandle ((TERM_HANDLE)-1)
+#define InvalidConsoleHandle(s) ((s)==InvalidHandle)
+
+typedef unsigned char cc_t;
+typedef unsigned int speed_t;
+typedef unsigned int tcflag_t;
+
+#define NCCS 32
+struct termios
+{
+ tcflag_t c_iflag; /* input mode */
+ tcflag_t c_oflag; /* output mode */
+ tcflag_t c_cflag; /* control mode */
+ tcflag_t c_lflag; /* local mode */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[NCCS]; /* control characters */
+ speed_t c_ispeed; /* input speed */
+ speed_t c_ospeed; /* c_ospeed */
+};
+
+/* c_cc chars */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VTIME 5
+#define VMIN 6
+
+/* c_iflag bits */
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define BRKINT 0000002
+#define PARMRK 0000010
+#define IXON 0002000
+#define IGNBRK 0000001
+#define IGNPAR 0000004
+#define INPCK 0000020
+#define IXOFF 0010000
+
+/* c_oflag bits */
+#define OPOST 0000001
+
+/* c_cflag bit meaning */
+#define CBAUD 0010017
+#define CSIZE 0000060
+#define CS8 0000060
+#define B0 0000000
+#define B50 0000001
+#define B75 0000002
+#define B110 0000003
+#define B134 0000004
+#define B150 0000005
+#define B200 0000006
+#define B300 0000007
+#define B600 0000010
+#define B1200 0000011
+#define B1800 0000012
+#define B2400 0000013
+#define B4800 0000014
+#define B9600 0000015
+#define CLOCAL 0004000
+#define CREAD 0000200
+#define CSTOPB 0000100
+#define HUPCL 0002000
+#define PARENB 0000400
+#define PARODD 0001000
+
+/* c_lflag bits */
+#define ECHO 0000010
+#define ECHONL 0000100
+#define ISIG 0000001
+#define IEXTEN 0100000
+#define ICANON 0000002
+#define NOFLSH 0000200
+#define ECHOE 0000020
+#define ECHOK 0000040
+
+/* tcflush() */
+#define TCIFLUSH 0
+
+/* tcsetattr uses these */
+#define TCSADRAIN 1
+
+/* ioctls */
+#define TCGETA 0x5405
+#define TCFLSH 0x540B
+#define TIOCGWINSZ 0x5413
+
+extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg);
+extern void _nc_set_term_driver(void* term);
+
+#ifndef cfgetospeed
+#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
+#endif
+
+#ifndef tcsetattr
+#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg)
+#endif
+
+#ifndef tcgetattr
+#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg)
+#endif
+
+#ifndef tcflush
+#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg)
+#endif
+
+#undef ttyname
+#define ttyname(fd) NULL
+
+#endif
+#endif
diff --git a/include/term_entry.h b/include/term_entry.h
index fb875407276f..4770f8659c48 100644
--- a/include/term_entry.h
+++ b/include/term_entry.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
-/* $Id: term_entry.h,v 1.35 2008/08/16 16:16:03 tom Exp $ */
+/* $Id: term_entry.h,v 1.37 2009/07/11 16:52:29 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@@ -81,12 +81,18 @@ ENTRY;
#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 NUM_EXT_NAMES(tp) (unsigned) ((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++)
+#if NCURSES_XNAMES
+#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; n < NUM_BOOLEANS(tp); n++)
+#define for_each_ext_number(n,tp) for(n = NUMCOUNT; n < NUM_NUMBERS(tp); n++)
+#define for_each_ext_string(n,tp) for(n = STRCOUNT; n < NUM_STRINGS(tp); n++)
+#endif
+
#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)
diff --git a/include/tic.h b/include/tic.h
index 4e10399356c1..4f3a21c22b3f 100644
--- a/include/tic.h
+++ b/include/tic.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,7 +33,7 @@
****************************************************************************/
/*
- * $Id: tic.h,v 1.62 2007/08/11 16:12:43 tom Exp $
+ * $Id: tic.h,v 1.65 2009/08/08 17:52:46 tom Exp $
* tic.h - Global variables and structures for the terminfo
* compiler.
*/
@@ -183,6 +183,8 @@ extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
#endif
+typedef short HashValue;
+
/*
* The file comp_captab.c contains an array of these structures, one
* per possible capability. These are indexed by a hash table array of
@@ -193,10 +195,21 @@ 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 */
+ HashValue nte_index; /* index of associated variable in its array */
+ HashValue nte_link; /* index in table of next hash, or -1 */
};
+ /*
+ * Use this structure to hide differences between terminfo and termcap
+ * tables.
+ */
+typedef struct {
+ unsigned table_size;
+ const HashValue *table_data;
+ HashValue (*hash_of)(const char *);
+ int (*compare_names)(const char *, const char *);
+} HashData;
+
struct alias
{
const char *from;
@@ -205,7 +218,8 @@ struct alias
};
extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
-extern NCURSES_EXPORT(const short *) _nc_get_hash_table (bool);
+extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
+extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#define NOTFOUND ((struct name_table_entry *) 0)
@@ -244,9 +258,9 @@ 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 short *);
+ (const char *, const HashValue *);
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
- (const char *, int, const struct name_table_entry *);
+ (const char *, int, bool);
/* comp_scan.c: lexical analysis */
extern NCURSES_EXPORT(int) _nc_get_token (bool);
diff --git a/include/unctrl.h.in b/include/unctrl.h.in
index 70d74b7714b1..e08bc813881d 100644
--- a/include/unctrl.h.in
+++ b/include/unctrl.h.in
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
* as ^?. Printable characters are displayed as is.
*/
-/* $Id: unctrl.h.in,v 1.10 2001/03/24 21:53:25 tom Exp $ */
+/* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */
#ifndef NCURSES_UNCTRL_H_incl
#define NCURSES_UNCTRL_H_incl 1
@@ -56,6 +56,10 @@ extern "C" {
#undef unctrl
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
+#if @NCURSES_SP_FUNCS@
+NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/man/MKada_config.in b/man/MKada_config.in
new file mode 100644
index 000000000000..2be3c419ec8f
--- /dev/null
+++ b/man/MKada_config.in
@@ -0,0 +1,57 @@
+.\"***************************************************************************
+.\" Copyright (c) 2010,2011 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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: MKada_config.in,v 1.5 2011/03/26 14:44:51 tom Exp $
+.TH ADACURSES "1" "" "" "User Commands"
+.SH NAME
+adacurses\-config \- helper script for AdaCurses libraries
+.SH SYNOPSIS
+.B adacurses\-config
+[\fIoptions\fR]
+.SH DESCRIPTION
+This is a shell script which simplifies configuring an application to use
+the AdaCurses library binding to ncurses.
+.SH OPTIONS
+.TP
+\fB\-\-cflags\fR
+echos the gnat (Ada compiler) flags needed to compile with AdaCurses.
+.TP
+\fB\-\-libs\fR
+echos the gnat libraries needed to link with AdaCurses.
+.TP
+\fB\-\-version\fR
+echos the release+patchdate version of the ncurses libraries used
+to configure and build AdaCurses.
+.TP
+\fB\-\-help\fR
+prints a list of the \fBadacurses\-config\fP script's options.
+.SH "SEE ALSO"
+\fBcurses\fR(3X)
+.PP
+This describes \fBncurses\fR
+version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
diff --git a/man/MKncu_config.in b/man/MKncu_config.in
new file mode 100644
index 000000000000..3de772c98e1f
--- /dev/null
+++ b/man/MKncu_config.in
@@ -0,0 +1,98 @@
+.\"***************************************************************************
+.\" Copyright (c) 2010 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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: MKncu_config.in,v 1.3 2010/03/06 22:29:17 tom Exp $
+.TH @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config 1 ""
+.SH NAME
+@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \- helper script for ncurses libraries
+.SH SYNOPSIS
+.B @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config
+[\fIoptions\fR]
+.SH DESCRIPTION
+This is a shell script which simplifies configuring applications against
+a particular set of ncurses libraries.
+.SH OPTIONS
+.TP
+\fB\-\-prefix\fR
+echos the package\-prefix of ncurses
+.TP
+\fB\-\-exec\-prefix\fR
+echos the executable\-prefix of ncurses
+.TP
+\fB\-\-cflags\fR
+echos the C compiler flags needed to compile with ncurses
+.TP
+\fB\-\-libs\fR
+echos the libraries needed to link with ncurses
+.TP
+\fB\-\-version\fR
+echos the release+patchdate version of ncurses
+.TP
+\fB\-\-abi\-version\fR
+echos the ABI version of ncurses
+.TP
+\fB\-\-mouse\-version\fR
+echos the mouse\-interface version of ncurses
+.TP
+\fB\-\-bindir\fR
+echos the directory containing ncurses programs
+.TP
+\fB\-\-datadir\fR
+echos the directory containing ncurses data
+.TP
+\fB\-\-includedir\fR
+echos the directory containing ncurses header files
+.TP
+\fB\-\-libdir\fR
+echos the directory containing ncurses libraries
+.TP
+\fB\-\-mandir\fR
+echos the directory containing ncurses manpages
+.TP
+\fB\-\-terminfo\fR
+echos the $TERMINFO terminfo database path, e.g.,
+.RS
+@TERMINFO@
+.RE
+.TP
+\fB\-\-terminfo\-dirs\fR
+echos the $TERMINFO_DIRS directory list, e.g.,
+.RS
+@TERMINFO_DIRS@
+.RE
+.TP
+\fB\-\-termpath\fR
+echos the $TERMPATH termcap list, if support for termcap is configured.
+.TP
+\fB\-\-help\fR
+prints this message
+.SH "SEE ALSO"
+\fBcurses\fR(3X)
+.PP
+This describes \fBncurses\fR
+version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
diff --git a/man/Makefile.in b/man/Makefile.in
index c04f7c9eea57..82a67065c322 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.41 2007/03/31 15:54:06 tom Exp $
+# $Id: Makefile.in,v 1.45 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -35,6 +35,7 @@
# the top-level MANIFEST and any man/*.renames files!
SHELL = /bin/sh
+VPATH = @srcdir@
DESTDIR = @DESTDIR@
srcdir = @srcdir@
@@ -52,9 +53,9 @@ depend :
tags :
$(DESTDIR)$(mandir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
-EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]*
+EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 *-config.1 $(srcdir)/*.[0-9]*
install install.man : terminfo.5 $(DESTDIR)$(mandir)
sh ../edit_man.sh normal installing $(EDITARGS)
@@ -77,4 +78,4 @@ clean: mostlyclean
sh $(srcdir)/make_sed.sh @MANPAGE_RENAMES@ >../edit_man.sed
distclean realclean: clean
- rm -f Makefile ../edit_man.* ../man_alias.*
+ rm -f Makefile *-config.1 ../edit_man.* ../man_alias.*
diff --git a/man/captoinfo.1m b/man/captoinfo.1m
index de57a27cf0f4..c7a33643f706 100644
--- a/man/captoinfo.1m
+++ b/man/captoinfo.1m
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,38 +27,44 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: captoinfo.1m,v 1.22 2007/06/02 20:40:07 tom Exp $
+.\" $Id: captoinfo.1m,v 1.25 2010/12/04 18:36:44 tom Exp $
.TH @CAPTOINFO@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
-\fB@CAPTOINFO@\fR - convert a \fItermcap\fR description into a \fIterminfo\fR description
+\fB@CAPTOINFO@\fR \- convert a \fItermcap\fR description into a \fIterminfo\fR description
.SH SYNOPSIS
-\fB@CAPTOINFO@\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . .
+\fB@CAPTOINFO@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . .
.SH DESCRIPTION
-\fB@CAPTOINFO@\fR looks in \fIfile\fR for \fBtermcap\fR descriptions. For each
+\fB@CAPTOINFO@\fR looks in each given text
+\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
+output.
+Termcap \fBtc\fR capabilities are translated directly to terminfo
\fBuse\fR capabilities.
.PP
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
+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
+extracted from that file.
+If the environment variable \fBTERMCAP\fR is not
set, then the file \fB\*d\fR is read.
.TP 5
-\fB-v\fR
+\fB\-v\fR
print out tracing information on standard error as the program runs.
.TP 5
-\fB-V\fR
+\fB\-V\fR
print out the version of the program in use on standard error and exit.
.TP 5
-\fB-1\fR
-cause the fields to print out one to a line. Otherwise, the fields
+\fB\-1\fR
+cause the fields to print out one to a line.
+Otherwise, the fields
will be printed several to a line to a maximum width of 60
characters.
.TP 5
-\fB-w\fR
+\fB\-w\fR
change the output to \fIwidth\fR characters.
.SH FILES
.TP 20
@@ -112,7 +118,8 @@ HS mh Iris enter_dim_mode
.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:
+high-half graphics.
+They were as follows:
.PP
.TS H
c c
@@ -145,11 +152,13 @@ GG acs magic cookie count
.TE
.PP
If the single-line capabilities occur in an entry, they will automatically
-be composed into an \fIacsc\fR string. The double-line capabilities and
+be composed into an \fIacsc\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
+with the SVr4 format.
+The following AIX extensions are automatically
translated:
.TS
c c
@@ -171,11 +180,12 @@ Hewlett-Packard's terminfo library supports two nonstandard terminfo
capabilities \fImeml\fR (memory lock) and \fImemu\fR (memory unlock).
These will be discarded with a warning message.
.SH NOTES
-This utility is actually a link to \fB@TIC@\fR(1M), running in \fI-I\fR mode.
-You can use other \fB@TIC@\fR options such as \fB-f\fR and \fB-x\fR.
+This utility is actually a link to \fB@TIC@\fR(1M), running in \fI\-I\fR mode.
+You can use other \fB@TIC@\fR options such as \fB\-f\fR and \fB\-x\fR.
.PP
-The trace option is not identical to SVr4's. Under SVr4, instead of following
-the \fB-v\fR with a trace level n, you repeat it n times.
+The trace option is not 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
\fB@INFOCMP@\fR(1M),
\fBcurses\fR(3X),
@@ -185,9 +195,6 @@ This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.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:
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
diff --git a/man/clear.1 b/man/clear.1
index 31d0f93e05b9..b70d37e80c09 100644
--- a/man/clear.1
+++ b/man/clear.1
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,11 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: clear.1,v 1.6 2006/12/24 18:07:53 tom Exp $
+.\" $Id: clear.1,v 1.8 2010/12/04 18:36:44 tom Exp $
.TH @CLEAR@ 1 ""
.ds n 5
.SH NAME
-\fB@CLEAR@\fR - clear the terminal screen
+\fB@CLEAR@\fR \- clear the terminal screen
.SH SYNOPSIS
\fB@CLEAR@\fR
.br
@@ -45,9 +45,3 @@ figure out how to clear the screen.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_add_wch.3x b/man/curs_add_wch.3x
index 51ac1a4b5c35..26319a8ef909 100644
--- a/man/curs_add_wch.3x
+++ b/man/curs_add_wch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2001-2010,2011 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,15 +26,18 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_add_wch.3x,v 1.6 2006/12/24 15:22:22 tom Exp $
+.\" $Id: curs_add_wch.3x,v 1.14 2011/01/15 15:27:43 tom Exp $
.TH curs_add_wch 3X ""
+.de bP
+.IP \(bu 4
+..
.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
+\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
@@ -63,23 +66,20 @@ window at its current position,
which is then advanced.
These functions perform
wrapping and special-character processing as follows:
-.TP 5
--
+.bP
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
--
+.bP
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
--
+.bP
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 were called.
@@ -99,9 +99,90 @@ 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.
+.SS Line Graphics
+Like \fBaddch\fP(3X),
+\fBaddch_wch\fP accepts symbols which make it simple to draw lines and other
+frequently used special characters.
+These symbols correspond to the same VT100 line-drawing set as
+\fBaddch\fP(3X).
+.PP
+.TS
+l l l l
+_ _ _ _
+lw(1.5i) lw7 lw7 lw20.
+\fIName\fR \fIUnicode\fP \fIDefault\fR \fIDescription\fR
+WACS_BLOCK 0x25ae # solid square block
+WACS_BOARD 0x2592 # board of squares
+WACS_BTEE 0x2534 + bottom tee
+WACS_BULLET 0x00b7 o bullet
+WACS_CKBOARD 0x2592 : checker board (stipple)
+WACS_DARROW 0x2193 v arrow pointing down
+WACS_DEGREE 0x00b0 ' degree symbol
+WACS_DIAMOND 0x25c6 + diamond
+WACS_GEQUAL 0x2265 > greater-than-or-equal-to
+WACS_HLINE 0x2500 \- horizontal line
+WACS_LANTERN 0x2603 # lantern symbol
+WACS_LARROW 0x2190 < arrow pointing left
+WACS_LEQUAL 0x2264 < less-than-or-equal-to
+WACS_LLCORNER 0x2514 + lower left-hand corner
+WACS_LRCORNER 0x2518 + lower right-hand corner
+WACS_LTEE 0x2524 + left tee
+WACS_NEQUAL 0x2260 ! not-equal
+WACS_PI 0x03c0 * greek pi
+WACS_PLMINUS 0x00b1 # plus/minus
+WACS_PLUS 0x253c + plus
+WACS_RARROW 0x2192 > arrow pointing right
+WACS_RTEE 0x251c + right tee
+WACS_S1 0x23ba \- scan line 1
+WACS_S3 0x23bb \- scan line 3
+WACS_S7 0x23bc \- scan line 7
+WACS_S9 0x23bd \&_ scan line 9
+WACS_STERLING 0x00a3 f pound-sterling symbol
+WACS_TTEE 0x252c + top tee
+WACS_UARROW 0x2191 ^ arrow pointing up
+WACS_ULCORNER 0x250c + upper left-hand corner
+WACS_URCORNER 0x2510 + upper right-hand corner
+WACS_VLINE 0x2502 | vertical line
+.TE
+.PP
+The wide-character configuration of ncurses also defines symbols
+for thick- and double-lines:
+.PP
+.TS
+l l l l
+_ _ _ _
+lw(1.5i) lw7 lw7 lw20.
+\fIName\fR \fIUnicode\fP \fIDefault\fR \fIDescription\fR
+WACS_T_ULCORNER 0x250f + thick upper left corner
+WACS_T_LLCORNER 0x2517 + thick lower left corner
+WACS_T_URCORNER 0x2513 + thick upper right corner
+WACS_T_LRCORNER 0x251b + thick lower right corner
+WACS_T_LTEE 0x252b + thick tee pointing right
+WACS_T_RTEE 0x2523 + thick tee pointing left
+WACS_T_BTEE 0x253b + thick tee pointing up
+WACS_T_TTEE 0x2533 + thick tee pointing down
+WACS_T_HLINE 0x2501 - thick horizontal line
+WACS_T_VLINE 0x2503 | thick vertical line
+WACS_T_PLUS 0x254b + thick large plus or crossover
+WACS_D_ULCORNER 0x2554 + double upper left corner
+WACS_D_LLCORNER 0x255a + double lower left corner
+WACS_D_URCORNER 0x2557 + double upper right corner
+WACS_D_LRCORNER 0x255d + double lower right corner
+WACS_D_RTEE 0x2563 + double tee pointing left
+WACS_D_LTEE 0x2560 + double tee pointing right
+WACS_D_BTEE 0x2569 + double tee pointing up
+WACS_D_TTEE 0x2566 + double tee pointing down
+WACS_D_HLINE 0x2550 - double horizontal line
+WACS_D_VLINE 0x2551 | double vertical line
+WACS_D_PLUS 0x256c + double large plus or crossover
+.TE
.SH RETURN VALUES
.PP
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
.PP
Note that
@@ -112,12 +193,26 @@ Note that
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.
+All of these functions are described in the XSI Curses standard, Issue 4.
+The defaults specified for line-drawing characters apply in the POSIX locale.
+.PP
+X/Open Curses makes it clear that the WACS_ symbols should be defined as
+a pointer to \fBcchar_t\fP data, e.g., in the discussion of \fBborder_set\fR.
+A few implementations are problematic:
+.bP
+NetBSD curses defines the symbols as a \fBwchar_t\fP within a \fBcchar_t\fP.
+.bP
+HPUX curses equates some of the \fIACS_\fP symbols
+to the analogous \fIWACS_\fP symbols as if the \fIACS_\fP symbols were
+wide characters.
+The misdefined symbols are the arrows
+and other symbols which are not used for line-drawing.
.PP
-XSI documents constants beginning with \fBWACS_\fP which are used for
-line-drawing.
-Those are not currently implemented in \fBncurses\fP.
+X/Open Curses does not define symbols for thick- or double-lines.
+SVr4 curses implementations defined their line-drawing symbols in
+terms of intermediate symbols.
+This implementation extends those symbols, providing new definitions
+which are not in the SVr4 implementations.
.SH SEE ALSO
.PP
\fBcurses\fR(3X),
@@ -127,9 +222,3 @@ Those are not currently implemented in \fBncurses\fP.
\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/man/curs_add_wchstr.3x b/man/curs_add_wchstr.3x
index f84c2cb98c24..957adc025724 100644
--- a/man/curs_add_wchstr.3x
+++ b/man/curs_add_wchstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2004,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_add_wchstr.3x,v 1.6 2005/01/02 01:28:49 tom Exp $
+.\" $Id: curs_add_wchstr.3x,v 1.9 2010/12/04 18:36:44 tom Exp $
.TH curs_add_wchstr 3X ""
.SH NAME
\fBadd_wchstr\fR,
@@ -62,7 +62,7 @@ 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,
+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.
@@ -83,15 +83,13 @@ the remaining columns are filled with the background character and rendition.
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.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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/man/curs_addch.3x b/man/curs_addch.3x
index 73918b88b954..1ad071a8a8a0 100644
--- a/man/curs_addch.3x
+++ b/man/curs_addch.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,12 +27,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addch.3x,v 1.27 2007/06/02 20:40:07 tom Exp $
+.\" $Id: curs_addch.3x,v 1.32 2011/01/15 14:15:10 tom Exp $
.TH curs_addch 3X ""
.SH NAME
-\fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR,
+\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
+\fBwechochar\fR \- add a character (with attributes) to a \fBcurses\fR window, then advance the cursor
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
@@ -105,7 +108,7 @@ 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_HLINE \- horizontal line
ACS_LANTERN # lantern symbol
ACS_LARROW < arrow pointing left
ACS_LEQUAL < less-than-or-equal-to
@@ -118,9 +121,9 @@ 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_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
@@ -134,6 +137,10 @@ 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.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
\fBechochar\fR may be macros.
@@ -141,6 +148,10 @@ Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
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
+X/Open Curses states that the \fIACS_\fP definitions are \fBchar\fP constants.
+For the wide-character implementation (see \fBcurs_add_wch\fP),
+there are analogous \fIWACS_\fP definitions which are \fBcchar_t\fP constants.
+.LP
Some ACS symbols
(ACS_S3,
ACS_S7,
@@ -168,14 +179,9 @@ This is true of other implementations, but is not documented.
\fBcurs_inch\fR(3X),
\fBcurs_outopts\fR(3X),
\fBcurs_refresh\fR(3X),
+\fBcurs_variables\fR(3X),
\fBputc\fR(3).
.PP
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_add_wch\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_addchstr.3x b/man/curs_addchstr.3x
index ac1b040021e5..1547219f8309 100644
--- a/man/curs_addchstr.3x
+++ b/man/curs_addchstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addchstr.3x,v 1.12 2006/12/02 17:02:45 tom Exp $
+.\" $Id: curs_addchstr.3x,v 1.15 2010/12/04 18:36:44 tom Exp $
.TH curs_addchstr 3X ""
.na
.hy 0
@@ -38,7 +38,7 @@
\fBmvaddchstr\fR,
\fBmvaddchnstr\fR,
\fBmvwaddchstr\fR,
-\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window
+\fBmvwaddchnstr\fR \- add a string of characters (and attributes) to a \fBcurses\fR window
.ad
.hy
.SH SYNOPSIS
@@ -63,7 +63,7 @@
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
+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
@@ -81,6 +81,10 @@ descriptions.
X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all routines except \fBwaddchnstr\fR may be macros.
.SH PORTABILITY
@@ -91,9 +95,3 @@ These entry points are described in the XSI Curses standard, Issue 4.
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_add_wchstr\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_addstr.3x b/man/curs_addstr.3x
index 488b9dd8e752..a52619ea7f2a 100644
--- a/man/curs_addstr.3x
+++ b/man/curs_addstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addstr.3x,v 1.13 2005/05/15 16:17:14 tom Exp $
+.\" $Id: curs_addstr.3x,v 1.16 2010/12/04 18:36:44 tom Exp $
.TH curs_addstr 3X ""
.na
.hy 0
@@ -38,7 +38,7 @@
\fBmvaddstr\fR,
\fBmvaddnstr\fR,
\fBmvwaddstr\fR,
-\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor
+\fBmvwaddnstr\fR \- add a string of characters to a \fBcurses\fR window and advance cursor
.ad
.hy
.SH SYNOPSIS
@@ -67,7 +67,7 @@ These routines write the characters of the (null-terminated) character string
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,
+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
@@ -80,6 +80,10 @@ This implementation returns an error
if the window pointer is null or
if the string pointer is null or
if the corresponding calls to \fBwaddch\fP return an error.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all of these routines except \fBwaddstr\fR and \fBwaddnstr\fR may be
macros.
@@ -89,9 +93,3 @@ 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/man/curs_addwstr.3x b/man/curs_addwstr.3x
index 63d274608cc7..4e10d304fd61 100644
--- a/man/curs_addwstr.3x
+++ b/man/curs_addwstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addwstr.3x,v 1.7 2006/02/25 20:59:08 tom Exp $
+.\" $Id: curs_addwstr.3x,v 1.10 2010/12/04 18:36:44 tom Exp $
.TH curs_addwstr 3X ""
.na
.hy 0
@@ -74,11 +74,15 @@ 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,
+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.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all of these routines except \fBwaddnwstr\fR may be macros.
.SH PORTABILITY
@@ -86,9 +90,3 @@ All these entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\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/man/curs_attr.3x b/man/curs_attr.3x
index cf58affee13d..67740f9e2a72 100644
--- a/man/curs_attr.3x
+++ b/man/curs_attr.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_attr.3x,v 1.31 2007/03/17 20:30:33 tom Exp $
+.\" $Id: curs_attr.3x,v 1.36 2010/12/04 18:36:44 tom Exp $
.TH curs_attr 3X ""
.na
.hy 0
@@ -56,7 +56,7 @@
\fBwchgat\fR,
\fBmvchgat\fR,
\fBmvwchgat\fR,
-\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines
+\fBPAIR_NUMBER\fR \- \fBcurses\fR character and window attribute control routines
.ad
.hy
.SH SYNOPSIS
@@ -152,7 +152,7 @@ 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
+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
@@ -223,6 +223,7 @@ Older versions of this library did not force an update of the screen
when changing the attributes.
Use \fBtouchwin\fR to force the screen to match the updated attributes.
.PP
+.ne 9
.TS
center ;
l l .
@@ -252,19 +253,18 @@ X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
The \fBwcolor_set\fP function returns an error if the color pair parameter
-is outside the range 0..COLOR_PAIRS-1.
+is outside the range 0..COLOR_PAIRS\-1.
This implementation also provides
\fBgetattrs\fR
for compatibility with older versions of curses.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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:
+\fBcurs_printw\fR(3X),
+\fBcurs_variables\fR(3X)
diff --git a/man/curs_beep.3x b/man/curs_beep.3x
index 49e57619de3c..c6af6f09e647 100644
--- a/man/curs_beep.3x
+++ b/man/curs_beep.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_beep.3x,v 1.10 2005/01/08 17:55:51 tom Exp $
+.\" $Id: curs_beep.3x,v 1.12 2010/12/04 18:36:44 tom Exp $
.TH curs_beep 3X ""
.SH NAME
-\fBbeep\fR, \fBflash\fR - \fBcurses\fR bell and screen flash routines
+\fBbeep\fR, \fBflash\fR \- \fBcurses\fR bell and screen flash routines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
@@ -55,9 +55,3 @@ These functions are described 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/man/curs_bkgd.3x b/man/curs_bkgd.3x
index b2d768a441d9..67e2ab8fc54a 100644
--- a/man/curs_bkgd.3x
+++ b/man/curs_bkgd.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2003,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,12 +26,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_bkgd.3x,v 1.19 2003/12/27 18:50:40 tom Exp $
+.\" $Id: curs_bkgd.3x,v 1.22 2010/12/04 18:36:44 tom Exp $
.TH curs_bkgd 3X ""
.SH NAME
\fBbkgdset\fR, \fBwbkgdset\fR,
\fBbkgd\fR, \fBwbkgd\fR,
-\fBgetbkgd\fR - \fBcurses\fR window background manipulation routines
+\fBgetbkgd\fR \- \fBcurses\fR window background manipulation routines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
@@ -83,16 +83,10 @@ but this appears to be an error.
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.
+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/man/curs_bkgrnd.3x b/man/curs_bkgrnd.3x
index 8c6f6afff6f4..43112a79ab79 100644
--- a/man/curs_bkgrnd.3x
+++ b/man/curs_bkgrnd.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_bkgrnd.3x,v 1.3 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_bkgrnd.3x,v 1.4 2010/12/04 18:49:20 tom Exp $
.TH curs_bkgrnd 3X ""
.SH NAME
\fBbkgrnd\fR,
@@ -98,9 +98,3 @@ 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/man/curs_border.3x b/man/curs_border.3x
index 09f9a4c221f9..5a58e9db5583 100644
--- a/man/curs_border.3x
+++ b/man/curs_border.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_border.3x,v 1.19 2007/02/24 16:15:38 tom Exp $
+.\" $Id: curs_border.3x,v 1.22 2010/12/04 18:36:44 tom Exp $
.TH curs_border 3X ""
.na
.hy 0
@@ -41,7 +41,7 @@
\fBmvhline\fR,
\fBmvwhline\fR,
\fBmvvline\fR,
-\fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines
+\fBmvwvline\fR \- create \fBcurses\fR borders, horizontal and vertical lines
.ad
.hy
.SH SYNOPSIS
@@ -78,21 +78,21 @@ draw a box around the edges of a window.
Other than the window, each argument is a character with attributes:
.sp
.RS
-\fIls\fR - left side,
+\fIls\fR \- left side,
.br
-\fIrs\fR - right side,
+\fIrs\fR \- right side,
.br
-\fIts\fR - top side,
+\fIts\fR \- top side,
.br
-\fIbs\fR - bottom side,
+\fIbs\fR \- bottom side,
.br
-\fItl\fR - top left-hand corner,
+\fItl\fR \- top left-hand corner,
.br
-\fItr\fR - top right-hand corner,
+\fItr\fR \- top right-hand corner,
.br
-\fIbl\fR - bottom left-hand corner, and
+\fIbl\fR \- bottom left-hand corner, and
.br
-\fIbr\fR - bottom right-hand corner.
+\fIbr\fR \- bottom right-hand corner.
.RE
.PP
If any of these arguments is zero, then the corresponding
@@ -136,6 +136,10 @@ non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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).
@@ -147,9 +151,3 @@ 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/man/curs_border_set.3x b/man/curs_border_set.3x
index dbf865385b78..8f831dd9b4cc 100644
--- a/man/curs_border_set.3x
+++ b/man/curs_border_set.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2004,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2010,2011 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_border_set.3x,v 1.6 2005/05/15 16:17:37 tom Exp $
+.\" $Id: curs_border_set.3x,v 1.10 2011/01/15 12:56:18 tom Exp $
.TH curs_border_set 3X ""
.na
.hy 0
@@ -110,21 +110,21 @@ 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,
+\fIls\fR \- left side,
.br
-\fIrs\fR - right side,
+\fIrs\fR \- right side,
.br
-\fIts\fR - top side,
+\fIts\fR \- top side,
.br
-\fIbs\fR - bottom side,
+\fIbs\fR \- bottom side,
.br
-\fItl\fR - top left-hand corner,
+\fItl\fR \- top left-hand corner,
.br
-\fItr\fR - top right-hand corner,
+\fItr\fR \- top right-hand corner,
.br
-\fIbl\fR - bottom left-hand corner, and
+\fIbl\fR \- bottom left-hand corner, and
.br
-\fIbr\fR - bottom right-hand corner.
+\fIbr\fR \- bottom right-hand corner.
.RE
.PP
If any of these arguments is zero, then the corresponding
@@ -195,13 +195,12 @@ Otherwise, they return
\fBERR\fR.
.PP
Functions using a window parameter return an error if it is null.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH SEE ALSO
\fBncurses\fR(3X),
+\fBcurs_add_wch\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/man/curs_clear.3x b/man/curs_clear.3x
index adbfd2cc001d..305c608a49ca 100644
--- a/man/curs_clear.3x
+++ b/man/curs_clear.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_clear.3x,v 1.11 2007/12/29 15:58:38 tom Exp $
+.\" $Id: curs_clear.3x,v 1.14 2010/12/04 18:36:44 tom Exp $
.TH curs_clear 3X ""
.na
.hy 0
@@ -38,7 +38,7 @@
\fBclrtobot\fR,
\fBwclrtobot\fR,
\fBclrtoeol\fR,
-\fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
+\fBwclrtoeol\fR \- clear all or part of a \fBcurses\fR window
.ad
.hy
.SH SYNOPSIS
@@ -112,10 +112,7 @@ even for a subwindow or derived window.
If you do not want to clear the screen during the next \fBwrefresh\fP,
use \fBwerase\fP instead.
.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:
+\fBcurses\fR(3X),
+\fBcurs_outopts\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_variables\fR(3X)
diff --git a/man/curs_color.3x b/man/curs_color.3x
index 99e63eff136e..2f63c848bc1a 100644
--- a/man/curs_color.3x
+++ b/man/curs_color.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,8 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_color.3x,v 1.28 2005/12/18 00:00:37 tom Exp $
+.\" $Id: curs_color.3x,v 1.35 2010/12/20 00:50:58 tom Exp $
.TH curs_color 3X ""
+.de bP
+.IP \(bu 4
+..
.na
.hy 0
.SH NAME
@@ -38,12 +41,12 @@
\fBcan_change_color\fR,
\fBcolor_content\fR,
\fBpair_content\fR,
-\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines
+\fBCOLOR_PAIR\fR \- \fBcurses\fR color manipulation routines
.ad
.hy
.SH SYNOPSIS
\fB# include <curses.h>\fR
-.br
+.sp
\fBint start_color(void);\fR
.br
\fBint init_pair(short pair, short f, short b);\fR
@@ -93,12 +96,13 @@ 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
--
+.bP
The value of the first argument
-must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR.
-.TP 5
--
+must be between \fB1\fR and \fBCOLOR_PAIRS\-1\fR,
+except that if default colors are used (see \fBuse_default_colors\fP)
+the upper limit is adjusted to allow for extra pairs which use
+a default color in foreground and/or background.
+.bP
The value of the second and
third arguments must be between 0 and \fBCOLORS\fR.
Color pair 0 is assumed to be white on black,
@@ -111,7 +115,7 @@ are changed to the new definition.
.PP
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
+default colors (color number \fB\-1\fR) if you first invoke the
\fBuse_default_colors\fR routine.
.PP
The \fBinit_color\fR routine changes the definition of a color. It takes four
@@ -147,7 +151,7 @@ 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
+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
@@ -174,15 +178,15 @@ completion.
.PP
X/Open defines no error conditions.
This implementation will return \fBERR\fR on attempts to
-use color values outside the range 0 to COLORS-1
+use color values outside the range 0 to COLORS\-1
(except for the default colors extension),
-or use color pairs outside the range 0 to COLOR_PAIR-1.
+or use color pairs outside the range 0 to COLOR_PAIRS\-1.
Color values used in \fBinit_color\fP must be in the range 0 to 1000.
An error is returned from all functions
if the terminal has not been initialized.
An error is returned from secondary functions such as \fBinit_pair\fP
if \fBstart_color\fP was not called.
-.RS
+.RS 3
.TP 5
\fBinit_color\fP
returns an error if the terminal does not support
@@ -190,8 +194,7 @@ this feature, e.g., if the \fIinitialize_color\fP capability is absent
from the terminal description.
.TP 5
\fBstart_color\fP
-returns an error
-If the color table cannot be allocated.
+returns an error if the color table cannot be allocated.
.RE
.SH NOTES
In the \fIncurses\fR implementation, there is a separate color activation flag,
@@ -206,18 +209,15 @@ the background color used when parts of a window are blanked by erasing or
scrolling operations, see \fBcurs_bkgd\fR(3X).
.PP
Several caveats apply on 386 and 486 machines with VGA-compatible graphics:
-.TP 5
--
+.bP
COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with
the \fBA_BOLD\fR attribute.
-.TP 5
--
+.bP
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
--
+.bP
Color RGB values are not settable.
.SH PORTABILITY
This implementation satisfies XSI Curses's minimum maximums
@@ -239,10 +239,5 @@ and will treat those as optional parameters when null.
\fBcurses\fR(3X),
\fBcurs_initscr\fR(3X),
\fBcurs_attr\fR(3X),
+\fBcurs_variables\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/man/curs_delch.3x b/man/curs_delch.3x
index 70266678d7c6..6dfc0a05896d 100644
--- a/man/curs_delch.3x
+++ b/man/curs_delch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_delch.3x,v 1.8 2006/02/25 21:42:57 tom Exp $
+.\" $Id: curs_delch.3x,v 1.11 2010/12/04 18:36:44 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
+\fBmvwdelch\fR \- delete character under the cursor in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -54,6 +54,10 @@ imply use of the hardware delete character feature.)
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.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that \fBdelch\fR, \fBmvdelch\fR, and \fBmvwdelch\fR may be macros.
.SH PORTABILITY
@@ -62,9 +66,3 @@ 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/man/curs_deleteln.3x b/man/curs_deleteln.3x
index fc7b16a96d07..83cbdec7e9a8 100644
--- a/man/curs_deleteln.3x
+++ b/man/curs_deleteln.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_deleteln.3x,v 1.11 2007/06/02 20:40:07 tom Exp $
+.\" $Id: curs_deleteln.3x,v 1.13 2010/12/04 18:36:44 tom Exp $
.TH curs_deleteln 3X ""
.SH NAME
\fBdeleteln\fR,
@@ -34,7 +34,7 @@
\fBinsdelln\fR,
\fBwinsdelln\fR,
\fBinsertln\fR,
-\fBwinsertln\fR - delete and insert lines in a \fBcurses\fR window
+\fBwinsertln\fR \- delete and insert lines in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -83,9 +83,3 @@ terminal. In fact, they will not 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/man/curs_extend.3x b/man/curs_extend.3x
index 3092253fff0b..9a52f93080f4 100644
--- a/man/curs_extend.3x
+++ b/man/curs_extend.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1999-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1999-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey 1999-on
.\"
-.\" $Id: curs_extend.3x,v 1.17 2006/12/24 18:01:48 tom Exp $
+.\" $Id: curs_extend.3x,v 1.19 2010/12/04 18:36:44 tom Exp $
.TH curs_extend 3X ""
.SH NAME
\fBcurses_version\fP,
@@ -56,7 +56,7 @@ 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 \fB@TIC@\fP to compile
+is made by using the \fB\-x\fP option of \fB@TIC@\fP to compile
extended terminal definitions.
However you can disable this feature
to ensure compatibility with other implementations of curses.
@@ -77,9 +77,3 @@ any code depending on them be conditioned using NCURSES_VERSION.
\fBwresize\fR(3X).
.SH AUTHOR
Thomas Dickey.
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_get_wch.3x b/man/curs_get_wch.3x
index 6ecff799b5d6..fe49849a2ecd 100644
--- a/man/curs_get_wch.3x
+++ b/man/curs_get_wch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_get_wch.3x,v 1.6 2006/02/25 21:47:06 tom Exp $
+.\" $Id: curs_get_wch.3x,v 1.7 2010/08/14 23:31:42 tom Exp $
.TH curs_get_wch 3X ""
.SH NAME
\fBget_wch\fR,
@@ -152,6 +152,10 @@ returns
\fBOK\fR.
Otherwise, the function returns
\fBERR\fR.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_getch\fR(3X),
diff --git a/man/curs_get_wstr.3x b/man/curs_get_wstr.3x
index 4286c78b0d2a..9beb1773ca61 100644
--- a/man/curs_get_wstr.3x
+++ b/man/curs_get_wstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_get_wstr.3x,v 1.6 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_get_wstr.3x,v 1.8 2010/12/04 18:36:44 tom Exp $
.TH curs_get_wstr 3X ""
.na
.hy 0
@@ -154,6 +154,10 @@ Functions using a window parameter return an error if it is null.
\fBwgetn_wstr\fP
returns an error if the associated call to \fBwget_wch\fP failed.
.RE
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH PORTABILITY
These functions are described in The Single Unix Specification, Version 2.
No error conditions are defined.
@@ -170,9 +174,3 @@ 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/man/curs_getcchar.3x b/man/curs_getcchar.3x
index cb02f5d2aef3..1b878f313c2d 100644
--- a/man/curs_getcchar.3x
+++ b/man/curs_getcchar.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2001-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 2001-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,8 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getcchar.3x,v 1.11 2008/05/17 19:37:05 tom Exp $
+.\" $Id: curs_getcchar.3x,v 1.15 2010/12/04 18:36:44 tom Exp $
.TH curs_getcchar 3X ""
+.de bP
+.IP \(bu 4
+..
.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
@@ -63,17 +66,13 @@ 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
--
+.bP
Extracts information from a \fBcchar_t\fP value \fIwcval\fP
-.TP 5
--
+.bP
Stores the character attributes in the location pointed to by \fIattrs\fP
-.TP 5
--
+.bP
Stores the color-pair in the location pointed to by \fIcolor_pair\fP
-.TP 5
--
+.bP
Stores the wide-character string,
characters referenced by \fIwcval\fP, into the array pointed to by \fIwch\fP.
.PP
@@ -82,11 +81,9 @@ When
is a null pointer, the
\fBgetcchar\fP
function does the following:
-.TP 5
--
+.bP
Obtains the number of wide characters pointed to by \fIwcval\fP
-.TP 5
--
+.bP
Does not change the data referenced by
\fIattrs\fP
or
@@ -94,22 +91,19 @@ or
.PP
The \fBsetcchar\fP function initializes the location pointed to by \fIwcval\fP
by using:
-.TP 5
--
+.bP
The character attributes in
\fIattrs\fP
-.TP 5
--
+.bP
The color pair in
\fIcolor_pair\fP
-.TP 5
--
+.bP
The wide-character string pointed to by \fIwch\fP.
The string must be L'\\0' terminated,
contain at most one spacing character,
which must be the first.
.IP
-Up to \fBCCHARW_MAX\fP-1 nonspacing characters may follow.
+Up to \fBCCHARW_MAX\fP\-1 nonspacing characters may follow.
Additional nonspacing characters are ignored.
.IP
The string may contain a single control character instead.
@@ -126,7 +120,8 @@ If \fIwcval\fP is constructed by any other means, the effect is unspecified.
.PP
When \fIwch\fP is a null pointer,
\fBgetcchar\fP returns the number of wide characters referenced by
-\fIwcval\fP.
+\fIwcval\fP,
+including one for a trailing null.
.PP
When \fIwch\fP is not a null pointer,
\fBgetcchar\fP returns \fBOK\fP upon successful completion,
@@ -141,9 +136,3 @@ Functions:
\fBcurs_color\fR(3X),
\fBcurses\fR(3X),
\fBwcwidth\fR(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_getch.3x b/man/curs_getch.3x
index 71fed5f7b60d..2d5d6fda785f 100644
--- a/man/curs_getch.3x
+++ b/man/curs_getch.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getch.3x,v 1.30 2006/12/02 17:02:53 tom Exp $
+.\" $Id: curs_getch.3x,v 1.36 2011/01/22 19:38:51 tom Exp $
.TH curs_getch 3X ""
.na
.hy 0
+.de bP
+.IP \(bu 4
+..
.SH NAME
\fBgetch\fR,
\fBwgetch\fR,
@@ -71,7 +74,7 @@ specified timeout has been reached.
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,
+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
@@ -245,6 +248,10 @@ returns an error
if the window pointer is null, or
if its timeout expires without having any data.
.RE
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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
@@ -260,6 +267,20 @@ If it says that \fBKEY_ENTER\fP is control/M,
\fBgetch\fR will return \fBKEY_ENTER\fP
when you press control/M.
.PP
+Generally, \fBKEY_ENTER\fP denotes the character(s) sent by the \fIEnter\fP
+key on the numeric keypad:
+.bP
+the terminal description lists the most useful keys,
+.bP
+the \fIEnter\fP key on the regular keyboard is already handled by
+the standard ASCII characters for carriage-return and line-feed,
+.bP
+depending on whether \fBnl\fP or \fBnonl\fP was called,
+pressing "Enter" on the regular keyboard may return either a carriage-return
+or line-feed, and finally
+.bP
+"Enter or send" is the standard description for this key.
+.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.
@@ -312,6 +333,7 @@ any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_inopts\fR(3X),
+\fBcurs_outopts\fR(3X),
\fBcurs_mouse\fR(3X),
\fBcurs_move\fR(3X),
\fBcurs_refresh\fR(3X),
@@ -320,9 +342,3 @@ any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro.
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_get_wch\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_getstr.3x b/man/curs_getstr.3x
index f131765043a1..e548cf145c25 100644
--- a/man/curs_getstr.3x
+++ b/man/curs_getstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getstr.3x,v 1.15 2006/01/12 00:30:58 tom Exp $
+.\" $Id: curs_getstr.3x,v 1.19 2010/12/04 18:36:44 tom Exp $
.TH curs_getstr 3X ""
.na
.hy 0
@@ -38,7 +38,7 @@
\fBmvgetstr\fR,
\fBmvgetnstr\fR,
\fBmvwgetstr\fR,
-\fBmvwgetnstr\fR - accept character strings from \fBcurses\fR terminal keyboard
+\fBmvwgetnstr\fR \- accept character strings from \fBcurses\fR terminal keyboard
.ad
.hy
.SH SYNOPSIS
@@ -94,6 +94,10 @@ if its timeout expires without having any data.
This implementation provides an extension as well.
If a SIGWINCH interrupts the function, it will return \fBKEY_RESIZE\fP
rather than \fBOK\fP or \fBERR\fP.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros.
.SH PORTABILITY
@@ -113,10 +117,6 @@ string by those implementations was predictable but not useful
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:
+\fBcurses\fR(3X),
+\fBcurs_getch\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_getyx.3x b/man/curs_getyx.3x
index 2581253d7c78..980968e40032 100644
--- a/man/curs_getyx.3x
+++ b/man/curs_getyx.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getyx.3x,v 1.16 2007/05/12 16:34:49 tom Exp $
+.\" $Id: curs_getyx.3x,v 1.18 2010/12/04 18:36:44 tom Exp $
.TH curs_getyx 3X ""
.SH NAME
\fBgetyx\fR,
\fBgetparyx\fR,
\fBgetbegyx\fR,
-\fBgetmaxyx\fR - get \fBcurses\fR cursor and window coordinates
+\fBgetmaxyx\fR \- get \fBcurses\fR cursor and window coordinates
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -51,7 +51,7 @@ 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.
+Otherwise, \fB\-1\fR is placed into \fIy\fR and \fIx\fR.
.PP
Like \fBgetyx\fR, the \fBgetbegyx\fR and \fBgetmaxyx\fR macros store
the current beginning coordinates and size of the specified window.
@@ -98,9 +98,3 @@ The difference is hidden by means of the macro \fBgetmaxyx\fP.
\fBcurses\fR(3X),
\fBcurs_legacy\fR(3X),
\fBcurs_opaque\fR(3X)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_in_wch.3x b/man/curs_in_wch.3x
index 8709d130f180..5f50e5a89fde 100644
--- a/man/curs_in_wch.3x
+++ b/man/curs_in_wch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_in_wch.3x,v 1.2 2006/02/25 21:42:22 tom Exp $
+.\" $Id: curs_in_wch.3x,v 1.5 2010/12/04 18:36:44 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
+\fBwin_wch\fR \- extract a complex character and rendition from a window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -53,6 +53,10 @@ 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
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all of these routines may be macros.
.SH PORTABILITY
@@ -60,9 +64,3 @@ 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/man/curs_in_wchstr.3x b/man/curs_in_wchstr.3x
index b04a1f54cd76..042abfd6051d 100644
--- a/man/curs_in_wchstr.3x
+++ b/man/curs_in_wchstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_in_wchstr.3x,v 1.6 2006/12/02 17:03:07 tom Exp $
+.\" $Id: curs_in_wchstr.3x,v 1.8 2010/12/04 18:36:44 tom Exp $
.TH curs_in_wchstr 3X ""
.na
.hy 0
@@ -103,6 +103,10 @@ Upon successful completion, these functions return
\fBOK\fR.
Otherwise, they return
\fBERR\fR.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH PORTABILITY
The XSI Curses defines no error conditions.
This implementation checks for null pointers,
@@ -114,9 +118,3 @@ Functions:
\fBcurs_instr\fR(3X),
\fBcurs_inwstr\fR(3X)
\fBcurs_inchstr\fR(3X)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_inch.3x b/man/curs_inch.3x
index 3091b9c0e6ae..7e1e3b439177 100644
--- a/man/curs_inch.3x
+++ b/man/curs_inch.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,11 +27,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inch.3x,v 1.13 2006/12/02 16:58:55 tom Exp $
+.\" $Id: curs_inch.3x,v 1.17 2010/12/04 18:36:44 tom 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
+\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
.sp
@@ -59,6 +61,10 @@ l l .
\fBA_ATTRIBUTES\fR Bit-mask to extract attributes
\fBA_COLOR\fR Bit-mask to extract color-pair field information
.TE
+.SH RETURN VALUE
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all of these routines may be macros.
.SH PORTABILITY
@@ -69,9 +75,3 @@ These functions are described in the XSI Curses standard, Issue 4.
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_in_wch\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_inchstr.3x b/man/curs_inchstr.3x
index 18c21dc3190d..2dc7673c3768 100644
--- a/man/curs_inchstr.3x
+++ b/man/curs_inchstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inchstr.3x,v 1.12 2006/12/02 17:00:58 tom Exp $
+.\" $Id: curs_inchstr.3x,v 1.15 2010/12/04 18:36:44 tom Exp $
.TH curs_inchstr 3X ""
.na
.hy 0
@@ -38,7 +38,7 @@
\fBmvinchstr\fR,
\fBmvinchnstr\fR,
\fBmvwinchstr\fR,
-\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBcurses\fR window
+\fBmvwinchnstr\fR \- get a string of characters (and attributes) from a \fBcurses\fR window
.ad
.hy
.SH SYNOPSIS
@@ -78,9 +78,13 @@ No error conditions are defined.
If the \fIchstr\fP parameter is null,
no data is returned,
and the return value is zero.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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
+document whether the result string is zero-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
@@ -93,9 +97,3 @@ that the successful return of the functions is \fBOK\fR.
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_in_wchstr\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x
index 1a865f94ec08..83a01eafb4e9 100644
--- a/man/curs_initscr.3x
+++ b/man/curs_initscr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_initscr.3x,v 1.14 2005/05/15 16:18:01 tom Exp $
+.\" $Id: curs_initscr.3x,v 1.17 2010/12/04 18:36:58 tom Exp $
.TH curs_initscr 3X ""
.na
.hy 0
@@ -36,7 +36,7 @@
\fBendwin\fR,
\fBisendwin\fR,
\fBset_term\fR,
-\fBdelscreen\fR - \fBcurses\fR screen initialization and manipulation routines
+\fBdelscreen\fR \- \fBcurses\fR screen initialization and manipulation routines
.ad
.hy
.SH SYNOPSIS
@@ -122,11 +122,9 @@ 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:
+\fBcurses\fR(3X),
+\fBcurs_kernel\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_slk\fR(3X),
+\fBcurs_util\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_inopts.3x b/man/curs_inopts.3x
index 7b5a17b8f125..aecb2e3714f8 100644
--- a/man/curs_inopts.3x
+++ b/man/curs_inopts.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inopts.3x,v 1.13 2005/05/15 16:18:07 tom Exp $
+.\" $Id: curs_inopts.3x,v 1.15 2010/12/04 18:40:45 tom Exp $
.TH curs_inopts 3X ""
.na
.hy 0
@@ -47,7 +47,7 @@
\fBqiflush\fR,
\fBtimeout\fR,
\fBwtimeout\fR,
-\fBtypeahead\fR - \fBcurses\fR input options
+\fBtypeahead\fR \- \fBcurses\fR input options
.ad
.hy
.SH SYNOPSIS
@@ -197,7 +197,7 @@ 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.
+\-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
@@ -234,9 +234,3 @@ 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/man/curs_ins_wch.3x b/man/curs_ins_wch.3x
index bb8a9a34afa9..4c6a925e9963 100644
--- a/man/curs_ins_wch.3x
+++ b/man/curs_ins_wch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_ins_wch.3x,v 1.3 2006/02/25 21:42:22 tom Exp $
+.\" $Id: curs_ins_wch.3x,v 1.5 2010/12/04 18:38:55 tom Exp $
.TH curs_ins_wch 3X ""
.SH NAME
\fBins_wch\fR,
@@ -52,14 +52,12 @@ The insertion operation does not change the cursor position.
.SH RETURN VALUE
If successful, these functions return OK.
If not, they return ERR.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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/man/curs_ins_wstr.3x b/man/curs_ins_wstr.3x
index 0c153c4c67e4..d01654533f73 100644
--- a/man/curs_ins_wstr.3x
+++ b/man/curs_ins_wstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_ins_wstr.3x,v 1.4 2005/05/15 17:02:54 tom Exp $
+.\" $Id: curs_ins_wstr.3x,v 1.6 2010/12/04 18:38:55 tom Exp $
.TH curs_ins_wstr 3X ""
.na
.hy 0
@@ -95,14 +95,12 @@ a control character.
.SH RETURN VALUES
Upon successful completion, these functions return OK.
Otherwise, they return ERR.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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/man/curs_insch.3x b/man/curs_insch.3x
index 78ab5a59c89b..77e92ec0bed7 100644
--- a/man/curs_insch.3x
+++ b/man/curs_insch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_insch.3x,v 1.10 2006/12/02 17:01:50 tom Exp $
+.\" $Id: curs_insch.3x,v 1.13 2010/12/04 18:38:55 tom Exp $
.TH curs_insch 3X ""
.SH NAME
\fBinsch\fR,
\fBwinsch\fR,
\fBmvinsch\fR,
-\fBmvwinsch\fR - insert a character before cursor in a \fBcurses\fR window
+\fBmvwinsch\fR \- insert a character before cursor in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -53,6 +53,10 @@ The insertion operation does not change the cursor position.
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.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
These routines do not necessarily imply use of a hardware insert character
feature.
@@ -66,9 +70,3 @@ These functions are described in the XSI Curses standard, Issue 4.
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_ins_wch\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_insstr.3x b/man/curs_insstr.3x
index 1536ea293a5a..3e38a531d5fb 100644
--- a/man/curs_insstr.3x
+++ b/man/curs_insstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_insstr.3x,v 1.18 2006/12/24 14:59:30 tom Exp $
+.\" $Id: curs_insstr.3x,v 1.21 2010/12/04 18:38:55 tom Exp $
.TH curs_insstr 3X ""
.SH NAME
\fBinsstr\fR,
@@ -36,7 +36,7 @@
\fBmvinsstr\fR,
\fBmvinsnstr\fR,
\fBmvwinsstr\fR,
-\fBmvwinsnstr\fR - insert string before cursor in a \fBcurses\fR window
+\fBmvwinsnstr\fR \- insert string before cursor in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
@@ -78,6 +78,10 @@ X/Open defines no error conditions.
In this implementation,
if the window parameter is null or the str parameter is null,
an error is returned.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all but \fBwinsnstr\fR may be macros.
.SH PORTABILITY
@@ -93,9 +97,3 @@ Also, no implementation of curses documents this inconsistency.
\fBcurs_util\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/man/curs_instr.3x b/man/curs_instr.3x
index a93de2728322..1b17db952d11 100644
--- a/man/curs_instr.3x
+++ b/man/curs_instr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_instr.3x,v 1.13 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_instr.3x,v 1.16 2010/12/04 18:38:55 tom Exp $
.TH curs_instr 3X ""
.SH NAME
\fBinstr\fR,
@@ -36,7 +36,7 @@
\fBmvinstr\fR,
\fBmvinnstr\fR,
\fBmvwinstr\fR,
-\fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window
+\fBmvwinnstr\fR \- get a string of characters from a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -70,6 +70,10 @@ X/Open defines no error conditions.
In this implementation,
if the window parameter is null or the str parameter is null,
a zero is returned.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
Note that all routines except \fBwinnstr\fR may be macros.
.SH PORTABILITY
@@ -81,9 +85,3 @@ 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/man/curs_inwstr.3x b/man/curs_inwstr.3x
index 990789cb9b32..966c7b4f7de9 100644
--- a/man/curs_inwstr.3x
+++ b/man/curs_inwstr.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2002-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inwstr.3x,v 1.5 2006/02/25 21:20:20 tom Exp $
+.\" $Id: curs_inwstr.3x,v 1.7 2010/12/04 18:38:55 tom Exp $
.TH curs_inwstr 3X ""
.SH NAME
\fBinwstr\fR,
@@ -81,13 +81,11 @@ routines return
\fBOK\fR, and the *\fBinnwstr\fR
routines return the
number of characters read into the string.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH SEE ALSO
\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/man/curs_kernel.3x b/man/curs_kernel.3x
index 9403973840e4..d81b134b8d81 100644
--- a/man/curs_kernel.3x
+++ b/man/curs_kernel.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2001,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_kernel.3x,v 1.15 2005/05/15 16:18:13 tom Exp $
+.\" $Id: curs_kernel.3x,v 1.19 2010/12/04 18:38:55 tom Exp $
.TH curs_kernel 3X ""
.na
.hy 0
@@ -41,7 +41,7 @@
\fBsetsyx\fR,
\fBripoffline\fR,
\fBcurs_set\fR,
-\fBnapms\fR - low-level \fBcurses\fR routines
+\fBnapms\fR \- low-level \fBcurses\fR routines
.ad
.hy
.SH SYNOPSIS
@@ -71,7 +71,7 @@
.br
.SH DESCRIPTION
The following routines give low-level access to various \fBcurses\fR
-capabilities. Theses routines typically are used inside library
+capabilities. These routines typically are used inside library
routines.
.PP
The \fBdef_prog_mode\fR and \fBdef_shell_mode\fR routines save the
@@ -94,13 +94,13 @@ last call to \fBsavetty\fR.
.PP
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
+\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.
.PP
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
+\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
@@ -127,7 +127,7 @@ routine.
\fBripoffline\fR can be called up to five times before calling \fBinitscr\fR or
\fBnewterm\fR.
.PP
-The \fBcurs_set\fR routine sets the cursor state is set to invisible,
+The \fBcurs_set\fR routine sets the cursor state 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
@@ -176,11 +176,10 @@ 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:
+\fBcurses\fR(3X),
+\fBcurs_initscr\fR(3X),
+\fBcurs_outopts\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_scr_dump\fR(3X),
+\fBcurs_slk\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x
index 251ae496b851..febaf294174f 100644
--- a/man/curs_legacy.3x
+++ b/man/curs_legacy.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,20 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_legacy.3x,v 1.1 2007/04/07 23:54:29 tom Exp $
+.\" $Id: curs_legacy.3x,v 1.5 2010/12/04 18:38:55 tom Exp $
.TH curs_legacy 3X ""
.SH NAME
-\fBgetbegx\fR,
-\fBgetbegy\fR,
-\fBgetcurx\fR,
-\fBgetcury\fR,
-\fBgetmaxx\fR,
-\fBgetmaxy\fR,
-\fBgetparx\fR,
-\fBgetpary\fR - get \fBcurses\fR cursor and window coordinates
+getattrs \- get \fBcurses\fR cursor and window coordinates, attributes
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
+\fBint getattrs(WINDOW *win);\fR
+.br
\fBint getbegx(WINDOW *win);\fR
.br
\fBint getbegy(WINDOW *win);\fR
@@ -85,9 +80,3 @@ These functions were supported on Version 7, BSD or System V implementations.
\fBcurses\fR(3X),
\fBcurs_getyx\fR(3X),
\fBcurs_opaque\fR(3X)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_memleaks.3x b/man/curs_memleaks.3x
index a8a455257f2d..5ebc0d066fa5 100644
--- a/man/curs_memleaks.3x
+++ b/man/curs_memleaks.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_memleaks.3x,v 1.1 2008/10/25 23:38:13 tom Exp $
+.\" $Id: curs_memleaks.3x,v 1.3 2010/12/04 18:40:45 tom Exp $
.TH curs_memleaks 3X ""
.na
.hy 0
.SH NAME
\fB_nc_freeall\fP
-\fB_nc_free_and_exit\fP - \fBcurses\fR memory-leak checking
+\fB_nc_free_and_exit\fP \- \fBcurses\fR memory-leak checking
.ad
.hy
.SH SYNOPSIS
@@ -45,7 +45,7 @@
These functions are used to simplify analysis of memory leaks in the ncurses
library.
They are normally not available; they must be configured into the library
-at build time using the \fB--disable-leaks\fP option.
+at build time using the \fB\-\-disable-leaks\fP option.
That compiles-in code that frees memory that normally would not be freed.
.PP
Any implementation of curses must not free the memory associated with
@@ -67,9 +67,3 @@ These functions do not return a value.
These functions are not part of the XSI interface.
.SH SEE ALSO
\fBcurses\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x
index 23f9f9c6d7d0..01dc68297623 100644
--- a/man/curs_mouse.3x
+++ b/man/curs_mouse.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,15 +27,16 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_mouse.3x,v 1.30 2006/12/30 23:43:34 tom Exp $
+.\" $Id: curs_mouse.3x,v 1.38 2010/12/04 18:38:55 tom Exp $
.TH curs_mouse 3X ""
.na
.hy 0
.SH NAME
+\fBhas_mouse\fR,
\fBgetmouse\fR, \fBungetmouse\fR,
\fBmousemask\fR, \fBwenclose\fR,
\fBmouse_trafo\fR, \fBwmouse_trafo\fR,
-\fBmouseinterval\fR - mouse interface through curses
+\fBmouseinterval\fR \- mouse interface through curses
.ad
.hy
.SH SYNOPSIS
@@ -53,6 +54,8 @@ typedef struct
MEVENT;\fR
.fi
.br
+\fBbool has_mouse(void);\fR
+.br
\fBint getmouse(MEVENT *event);\fR
.br
\fBint ungetmouse(MEVENT *event);\fR
@@ -146,6 +149,9 @@ x in the event structure coordinates will be screen-relative character-cell
coordinates.
The returned state mask will have exactly one bit set to
indicate the event type.
+The corresponding data in the queue is marked invalid.
+A subsequent call to \fBgetmouse\fP will retrieve the next older
+item from the queue.
.PP
The \fBungetmouse\fR function behaves analogously to \fBungetch\fR.
It pushes
@@ -194,9 +200,12 @@ second) that can elapse between press and release events for them to
be recognized as a click.
Use \fBmouseinterval(0)\fR to disable click resolution.
This function returns the previous interval value.
-Use \fBmouseinterval(-1)\fR to obtain the interval without altering it.
+Use \fBmouseinterval(\-1)\fR to obtain the interval without altering it.
The default is one sixth of a second.
.PP
+The \fBhas_mouse\fP function returns TRUE if the mouse driver has been
+successfully initialized.
+.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
@@ -211,6 +220,7 @@ upon successful completion.
returns an error.
If no mouse driver was initialized, or
if the mask parameter is zero,
+it also returns an error if no more events remain in the queue.
.TP 5
\fBungetmouse\fP
returns an error if the FIFO is full.
@@ -256,7 +266,7 @@ 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.
+Alessandro Rubini's gpm server
.br
FreeBSD sysmouse
.br
@@ -301,10 +311,5 @@ the terminal description, then the terminal may send mouse events.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_kernel\fR(3X),
-\fBcurs_slk\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
+\fBcurs_slk\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_move.3x b/man/curs_move.3x
index 804637792be5..226595cca6d7 100644
--- a/man/curs_move.3x
+++ b/man/curs_move.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_move.3x,v 1.12 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_move.3x,v 1.14 2010/12/04 18:40:45 tom Exp $
.TH curs_move 3X ""
.na
.hy 0
.SH NAME
\fBmove\fR,
-\fBwmove\fR - move \fBcurses\fR window cursor
+\fBwmove\fR \- move \fBcurses\fR window cursor
.ad
.hy
.SH SYNOPSIS
@@ -61,9 +61,3 @@ Note that \fBmove\fR may be a macro.
These functions are described in the XSI Curses standard, Issue 4.
.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/man/curs_opaque.3x b/man/curs_opaque.3x
index 6c9cfaa18a35..f3ad22e1482e 100644
--- a/man/curs_opaque.3x
+++ b/man/curs_opaque.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 2007-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_opaque.3x,v 1.6 2007/09/08 18:49:13 tom Exp $
+.\" $Id: curs_opaque.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH curs_opaque 3X ""
.na
.hy 0
@@ -38,9 +38,11 @@
\fBis_keypad\fR,
\fBis_leaveok\fR,
\fBis_nodelay\fR,
-\fBis_timeout\fR,
+\fBis_notimeout\fR,
+\fBis_pad\fR,
\fBis_scrollok\fR,
-\fBis_syncok\fR - \fBcurses\fR window properties
+\fBis_subwin\fR,
+\fBis_syncok\fR \- \fBcurses\fR window properties
.ad
.hy
.SH SYNOPSIS
@@ -62,8 +64,12 @@
.br
\fBbool is_notimeout(const WINDOW *win);\fR
.br
+\fBbool is_pad(const WINDOW *win);\fR
+.br
\fBbool is_scrollok(const WINDOW *win);\fR
.br
+\fBbool is_subwin(const WINDOW *win);\fR
+.br
\fBbool is_syncok(const WINDOW *win);\fR
.br
\fBWINDOW * wgetparent(const WINDOW *win);\fR
@@ -99,9 +105,17 @@ returns the value set in \fBnodelay\fR
\fBis_notimeout\fR
returns the value set in \fBnotimeout\fR
.TP 5
+\fBis_pad\fR
+returns TRUE if the window is a pad
+i.e., created by \fBnewpad\fP
+.TP 5
\fBis_scrollok\fR
returns the value set in \fBscrollok\fR
.TP 5
+\fBis_subwin\fR
+returns TRUE if the window is a subwindow,
+i.e., created by \fBsubwin\fP or \fBderwin\fP
+.TP 5
\fBis_syncok\fR
returns the value set in \fBsyncok\fR
.TP 5
@@ -125,9 +139,3 @@ be conditioned using NCURSES_VERSION.
\fBcurs_inopts\fR(3X),
\fBcurs_outopts\fR(3X),
\fBcurs_window\fR(3X)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_outopts.3x b/man/curs_outopts.3x
index 3fd437a312bb..52c04cddcf03 100644
--- a/man/curs_outopts.3x
+++ b/man/curs_outopts.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_outopts.3x,v 1.21 2007/06/02 20:40:07 tom Exp $
+.\" $Id: curs_outopts.3x,v 1.25 2010/12/04 18:38:55 tom Exp $
.TH curs_outopts 3X ""
.na
.hy 0
@@ -40,7 +40,7 @@
\fBwsetscrreg\fR,
\fBscrollok\fR,
\fBnl\fR,
-\fBnonl\fR - \fBcurses\fR output options
+\fBnonl\fR \- \fBcurses\fR output options
.ad
.hy
.SH SYNOPSIS
@@ -118,8 +118,9 @@ the cursor is not used, since it reduces the need for cursor motions.
.PP
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
+The \fItop\fR and
+\fIbot\fR parameters
+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
@@ -212,11 +213,10 @@ Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR,
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:
+\fBcurses\fR(3X),
+\fBcurs_addch\fR(3X),
+\fBcurs_clear\fR(3X),
+\fBcurs_initscr\fR(3X),
+\fBcurs_scroll\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_overlay.3x b/man/curs_overlay.3x
index 066c3a4a50f6..cea734e4a97c 100644
--- a/man/curs_overlay.3x
+++ b/man/curs_overlay.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_overlay.3x,v 1.14 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_overlay.3x,v 1.16 2010/12/04 18:40:45 tom Exp $
.TH curs_overlay 3X ""
.na
.hy 0
.SH NAME
\fBoverlay\fR,
\fBoverwrite\fR,
-\fBcopywin\fR - overlay and manipulate overlapped \fBcurses\fR windows
+\fBcopywin\fR \- overlay and manipulate overlapped \fBcurses\fR windows
.ad
.hy
.SH SYNOPSIS
@@ -79,9 +79,3 @@ 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/man/curs_pad.3x b/man/curs_pad.3x
index c7222074ebeb..6ce640b7f691 100644
--- a/man/curs_pad.3x
+++ b/man/curs_pad.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_pad.3x,v 1.14 2005/05/15 16:18:43 tom Exp $
+.\" $Id: curs_pad.3x,v 1.17 2010/12/04 18:41:07 tom Exp $
.TH curs_pad 3X ""
.na
.hy 0
@@ -36,7 +36,7 @@
\fBprefresh\fR,
\fBpnoutrefresh\fR,
\fBpechochar\fR,
-\fBpecho_wchar\fR - create and display \fBcurses\fR pads
+\fBpecho_wchar\fR \- create and display \fBcurses\fR pads
.ad
.hy
.SH SYNOPSIS
@@ -90,10 +90,11 @@ The \fBprefresh\fR and \fBpnoutrefresh\fR routines are analogous to
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
+The \fIpminrow\fR and \fIpmincol\fR parameters 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
+The \fIsminrow\fR,
+\fIsmincol\fR, \fIsmaxrow\fR, and \fIsmaxcol\fR
+parameters 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,
@@ -154,9 +155,3 @@ Note that \fBpechochar\fR may be a macro.
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/man/curs_print.3x b/man/curs_print.3x
index 92b9ca2dafcc..31a453565059 100644
--- a/man/curs_print.3x
+++ b/man/curs_print.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_print.3x,v 1.8 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_print.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH curs_print 3X ""
.SH NAME
-\fBmcprint\fR - ship binary data to printer
+\fBmcprint\fR \- ship binary data to printer
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -66,9 +66,3 @@ 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/man/curs_printw.3x b/man/curs_printw.3x
index ead0f183dc09..9918f9df9a71 100644
--- a/man/curs_printw.3x
+++ b/man/curs_printw.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_printw.3x,v 1.17 2006/12/24 16:05:17 tom Exp $
+.\" $Id: curs_printw.3x,v 1.20 2010/12/04 18:40:45 tom Exp $
.TH curs_printw 3X ""
.na
.hy 0
@@ -35,7 +35,7 @@
\fBwprintw\fR,
\fBmvprintw\fR,
\fBmvwprintw\fR,
-\fBvwprintw\fR, \fBvw_printw\fR - print formatted output in \fBcurses\fR windows
+\fBvwprintw\fR, \fBvw_printw\fR \- print formatted output in \fBcurses\fR windows
.ad
.hy
.SH SYNOPSIS
@@ -74,6 +74,10 @@ In this implementation,
an error may be returned if it cannot allocate enough memory for the
buffer used to format the results.
It will return an error if the window pointer is null.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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
@@ -86,9 +90,3 @@ 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(3), \fBvprintf(3)\fR
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_refresh.3x b/man/curs_refresh.3x
index 5ce06903d83d..e1552c37cb48 100644
--- a/man/curs_refresh.3x
+++ b/man/curs_refresh.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2001,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_refresh.3x,v 1.12 2005/05/15 16:18:49 tom Exp $
+.\" $Id: curs_refresh.3x,v 1.15 2010/12/04 18:38:55 tom Exp $
.TH curs_refresh 3X ""
.na
.hy 0
@@ -36,7 +36,7 @@
\fBrefresh\fR,
\fBwnoutrefresh\fR,
\fBwredrawln\fR,
-\fBwrefresh\fR - refresh \fBcurses\fR windows and lines
+\fBwrefresh\fR \- refresh \fBcurses\fR windows and lines
.ad
.hy
.SH SYNOPSIS
@@ -135,10 +135,6 @@ 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:
+\fBcurses\fR(3X),
+\fBcurs_outopts\fR(3X)
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_scanw.3x b/man/curs_scanw.3x
index 71ba9eeb4ddf..a3208f5627c8 100644
--- a/man/curs_scanw.3x
+++ b/man/curs_scanw.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_scanw.3x,v 1.14 2006/12/24 16:05:49 tom Exp $
+.\" $Id: curs_scanw.3x,v 1.17 2010/12/04 18:40:45 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
+\fBvwscanw\fR, \fBvw_scanw\fR \- convert formatted input from a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -66,6 +66,10 @@ 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.
+.PP
+Functions with a "mv" prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.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
@@ -89,9 +93,3 @@ 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(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_scr_dump.3x b/man/curs_scr_dump.3x
index 7884f6aa0648..df3e79c1ffee 100644
--- a/man/curs_scr_dump.3x
+++ b/man/curs_scr_dump.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_scr_dump.3x,v 1.7 2006/12/24 16:05:49 tom Exp $
+.\" $Id: curs_scr_dump.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH curs_scr_dump 3X ""
.na
.hy 0
@@ -34,7 +34,7 @@
\fBscr_dump\fR,
\fBscr_restore\fR,
\fBscr_init\fR,
-\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file
+\fBscr_set\fR \- read (write) a \fBcurses\fR screen from (to) a file
.ad
.hy
.SH SYNOPSIS
@@ -94,9 +94,3 @@ considered invalid "if the time-stamp of the tty is old" but do not define
.SH SEE ALSO
\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_refresh\fR(3X),
\fBcurs_util\fR(3X), \fBsystem\fR(3)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_scroll.3x b/man/curs_scroll.3x
index 754b71499841..2cb152d865c7 100644
--- a/man/curs_scroll.3x
+++ b/man/curs_scroll.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_scroll.3x,v 1.13 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_scroll.3x,v 1.15 2010/12/04 18:40:45 tom Exp $
.TH curs_scroll 3X ""
.na
.hy 0
.SH NAME
\fBscroll\fR,
\fBscrl\fR,
-\fBwscrl\fR - scroll a \fBcurses\fR window
+\fBwscrl\fR \- scroll a \fBcurses\fR window
.ad
.hy
.SH SYNOPSIS
@@ -88,9 +88,3 @@ Under this implementation it is.
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/man/curs_slk.3x b/man/curs_slk.3x
index 6361268b19d9..e8f7afbdbfd9 100644
--- a/man/curs_slk.3x
+++ b/man/curs_slk.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_slk.3x,v 1.16 2007/06/02 20:40:07 tom Exp $
+.\" $Id: curs_slk.3x,v 1.22 2010/12/04 18:38:55 tom Exp $
.TH curs_slk 3X ""
.na
.hy 0
.SH NAME
\fBslk_init\fR,
\fBslk_set\fR,
+\fBslk_wset\fR,
\fBslk_refresh\fR,
\fBslk_noutrefresh\fR,
\fBslk_label\fR,
@@ -46,7 +47,7 @@
\fBslk_attr_set\fR,
\fBslk_attr_off\fR,
\fBslk_attr\fR,
-\fBslk_color\fR - \fBcurses\fR soft label routines
+\fBslk_color\fR \- \fBcurses\fR soft label routines
.ad
.hy
.SH SYNOPSIS
@@ -78,42 +79,76 @@
.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
+\fBint slk_attr_set(const attr_t attrs, short color_pair, void* opts);\fR
.br
\fBattr_t slk_attr(void);\fR
.br
-\fBint slk_color(short color_pair_number);\fR
+\fBint slk_color(short color_pair);\fR
+.br
+\fBint slk_wset(int labnum, const wchar_t *label, int fmt);\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,
+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
+\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 does not try to use any hardware support for this
+characters each.
+This is useful for today's PC-like enduser devices.
+ncurses simulates this mode by taking over up to two lines at
+the bottom of the screen;
+it does not try to use any hardware support for this
mode.
.PP
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
+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:
+.RS
+.TP 3
+.B 0
+indicates a 3\-2\-3 arrangement of
+the labels.
+.TP 3
+.B 1
+indicates a 4\-4 arrangement
+.TP 3
+.B 2
+indicates the PC-like 4\-4\-4 mode.
+.TP 3
+.B 3
+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.
+.RE
.PP
-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
+The \fBslk_set\fR routine
+(and the \fBslk_wset\fR routine for the wide-character library)
+has three parameters:
+.RS
+.TP 5
+.I labnum
+is the label number, from \fB1\fR to \fB8\fR
+(12 for \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP);
+.TP
+.I label
+is be the string to put on the label,
+up to eight
+(five for \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP)
+characters in length.
+A null string or a null pointer sets up a blank label.
+.TP
+.I fmt
+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.
+.RE
.PP
The \fBslk_refresh\fR and \fBslk_noutrefresh\fR routines correspond to
the \fBwrefresh\fR and \fBwnoutrefresh\fR routines.
@@ -132,10 +167,12 @@ the next time a \fBslk_noutrefresh\fR is performed.
The \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR and \fBslk_attr\fR
routines correspond to \fBattron\fR, \fBattrset\fR, \fBattroff\fR and \fBattr_get\fR.
They have an effect only if soft labels are simulated on the bottom line of
-the screen. The default highlight for soft keys is A_STANDOUT (as in
+the screen.
+The default highlight for soft keys is A_STANDOUT (as in
System V curses, which does not document this fact).
.PP
-The \fBslk_color\fR routine corresponds to \fBcolor_set\fR. It has an effect only
+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
@@ -164,13 +201,13 @@ if the terminal or the softkeys were not initialized.
\fBslk_attr_set\fP
returns an error
if the terminal or the softkeys were not initialized, or
-the color pair is outside the range 0..COLOR_PAIRS-1,
+the color pair is outside the range 0..COLOR_PAIRS\-1,
or opts is not null.
.TP 5
\fBslk_color\fP
returns an error
if the terminal or the softkeys were not initialized, or
-the color pair is outside the range 0..COLOR_PAIRS-1.
+the color pair is outside the range 0..COLOR_PAIRS\-1.
.TP 5
\fBslk_init\fR
returns an error
@@ -190,16 +227,16 @@ memory for the labels cannot be allocated.
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
+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
+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:
+\fBcurses\fR(3X),
+\fBcurs_attr\fR(3X),
+\fBcurs_initscr\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_sp_funcs.3x b/man/curs_sp_funcs.3x
new file mode 100644
index 000000000000..020e5c115aab
--- /dev/null
+++ b/man/curs_sp_funcs.3x
@@ -0,0 +1,353 @@
+.\"***************************************************************************
+.\" Copyright (c) 2010 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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_sp_funcs.3x,v 1.5 2010/12/04 18:38:55 tom Exp $
+.TH curs_sp_funcs 3X ""
+.na
+.hy 0
+.SH NAME
+new_prescr \- \fBcurses\fR screen-pointer extension
+.ad
+.hy
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.nf
+.sp
+\fBint assume_default_colors_sp(SCREEN*, int, int);\fR
+.br
+\fBint baudrate_sp(SCREEN*);\fR
+.br
+\fBint beep_sp(SCREEN*);\fR
+.br
+\fBbool can_change_color_sp(SCREEN*);\fR
+.br
+\fBint cbreak_sp(SCREEN*);\fR
+.br
+\fBint color_content_sp(SCREEN*, short, short*, short*, short*);\fR
+.br
+\fBint curs_set_sp(SCREEN*, int);\fR
+.br
+\fBint define_key_sp(SCREEN*, const char *, int);\fR
+.br
+\fBint def_prog_mode_sp(SCREEN*);\fR
+.br
+\fBint def_shell_mode_sp(SCREEN*);\fR
+.br
+\fBint delay_output_sp(SCREEN*, int);\fR
+.br
+\fBint doupdate_sp(SCREEN*);\fR
+.br
+\fBint echo_sp(SCREEN*);\fR
+.br
+\fBint endwin_sp(SCREEN*);\fR
+.br
+\fBint erasechar_sp(SCREEN*);\fR
+.br
+\fBint filter_sp(SCREEN*);\fR
+.br
+\fBint flash_sp(SCREEN*);\fR
+.br
+\fBint flushinp_sp(SCREEN*);\fR
+.br
+\fBint get_escdelay_sp(SCREEN*);\fR
+.br
+\fBint getmouse_sp(SCREEN*, MEVENT*);\fR
+.br
+\fBWINDOW* getwin_sp(SCREEN*, FILE*);\fR
+.br
+\fBint halfdelay_sp(SCREEN*);\fR
+.br
+\fBbool has_colors_sp(SCREEN*);\fR
+.br
+\fBbool has_ic_sp(SCREEN*);\fR
+.br
+\fBbool has_il_sp(SCREEN*);\fR
+.br
+\fBint has_key_sp(SCREEN*, int);\fR
+.br
+\fBbool has_mouse_sp(SCREEN*);\fR
+.br
+\fBint init_color_sp(SCREEN*, short, short, short, short);\fR
+.br
+\fBint init_pair_sp(SCREEN*, short, short, short);\fR
+.br
+\fBint intrflush_sp(SCREEN*, WINDOW*, bool);\fR
+.br
+\fBbool isendwin_sp(SCREEN*);\fR
+.br
+\fBbool is_term_resized_sp(SCREEN*, int, int);\fR
+.br
+\fBchar* keybound_sp(SCREEN*, int, int);\fR
+.br
+\fBint key_defined_sp(SCREEN*, const char *);\fR
+.br
+\fBNCURSES_CONST char * keyname_sp(SCREEN*, int);\fR
+.br
+\fBint keyok_sp(SCREEN*, int, bool);\fR
+.br
+\fBchar killchar_sp(SCREEN*);\fR
+.br
+\fBint mcprint_sp(SCREEN*, char *, int);\fR
+.br
+\fBint mouseinterval_sp(SCREEN*, int);\fR
+.br
+\fBmmask_t mousemask_sp(SCREEN*, mmask_t, mmask_t *);\fR
+.br
+\fBint mvcur_sp(SCREEN*, int, int, int, int);\fR
+.br
+\fBint napms_sp(SCREEN*, int);\fR
+.br
+\fBWINDOW* newpad_sp(SCREEN*, int, int);\fR
+.br
+\fBSCREEN* new_prescr(void);\fR
+.br
+\fBSCREEN* newterm_sp(SCREEN*, NCURSES_CONST char *, FILE *, FILE *);\fR
+.br
+\fBWINDOW* newwin_sp(SCREEN*, int, int, int, int);\fR
+.br
+\fBint nl_sp(SCREEN*);\fR
+.br
+\fBint nocbreak_sp(SCREEN*);\fR
+.br
+\fBint noecho_sp(SCREEN*);\fR
+.br
+\fBint nofilter_sp(SCREEN*);\fR
+.br
+\fBint nonl_sp(SCREEN*);\fR
+.br
+\fBvoid noqiflush_sp(SCREEN*);\fR
+.br
+\fBint noraw_sp(SCREEN*);\fR
+.br
+\fBint pair_content_sp(SCREEN*, short, short*, short*);\fR
+.br
+\fBvoid qiflush_sp(SCREEN*);\fR
+.br
+\fBint raw_sp(SCREEN*);\fR
+.br
+\fBint reset_prog_mode_sp(SCREEN*);\fR
+.br
+\fBint reset_shell_mode_sp(SCREEN*);\fR
+.br
+\fBint resetty_sp(SCREEN*);\fR
+.br
+\fBint resize_term_sp(SCREEN*, int, int);\fR
+.br
+\fBint resizeterm_sp(SCREEN*, int, int);\fR
+.br
+\fBint restartterm_sp(SCREEN*, NCURSES_CONST char*, int, int *);\fR
+.br
+\fBint ripoffline_sp(SCREEN*, int, int (*)(WINDOW*, int));\fR
+.br
+\fBint savetty_sp(SCREEN*);\fR
+.br
+\fBint scr_init_sp(SCREEN*, const char *);\fR
+.br
+\fBint scr_restore_sp(SCREEN*, const char *);\fR
+.br
+\fBint scr_set_sp(SCREEN*, const char *);\fR
+.br
+\fBTERMINAL* set_curterm_sp(SCREEN*, TERMINAL*);\fR
+.br
+\fBint set_escdelay_sp(SCREEN*, int);\fR
+.br
+\fBint set_tabsize_sp(SCREEN*, int);\fR
+.br
+\fBint slk_attroff_sp(SCREEN*, const chtype);\fR
+.br
+\fBint slk_attron_sp(SCREEN*, const chtype);\fR
+.br
+\fBint slk_attr_set_sp(SCREEN*, const attr_t, short, void*);\fR
+.br
+\fBint slk_attrset_sp(SCREEN*, const chtype);\fR
+.br
+\fBint slk_attr_sp((SCREEN*);\fR
+.br
+\fBint slk_clear_sp(SCREEN*);\fR
+.br
+\fBint slk_color_sp(SCREEN*, short);\fR
+.br
+\fBint slk_init_sp(SCREEN*, int);\fR
+.br
+\fBint slk_label_sp(SCREEN*, int);\fR
+.br
+\fBint slk_noutrefresh_sp(SCREEN*);\fR
+.br
+\fBint slk_refresh_sp(SCREEN*);\fR
+.br
+\fBint slk_restore_sp(SCREEN*);\fR
+.br
+\fBint slk_set_sp(SCREEN*, int, const char *, int);\fR
+.br
+\fBint slk_touch_sp(SCREEN*);\fR
+.br
+\fBint start_color_sp(SCREEN*);\fR
+.br
+\fBattr_t term_attrs_sp(SCREEN*);\fR
+.br
+\fBchtype termattrs_sp(SCREEN*);\fR
+.br
+\fBchar* termname_sp(SCREEN*);\fR
+.br
+\fBint typeahead_sp(SCREEN*, int);\fR
+.br
+\fBNCURSES_CONST char* unctrl_sp(SCREEN*, chtype);\fR
+.br
+\fBint ungetch_sp(SCREEN*, int);\fR
+.br
+\fBint ungetmouse_sp(SCREEN*,MEVENT *);\fR
+.br
+\fBint unget_wch_sp(SCREEN*, const wchar_t);\fR
+.br
+\fBint use_default_colors_sp(SCREEN*);\fR
+.br
+\fBvoid use_env_sp(SCREEN*, bool);\fR
+.br
+\fBint use_legacy_coding_sp(SCREEN*, int);\fR
+.br
+\fBint vid_attr_sp(SCREEN*, attr_t, short, void *);\fR
+.br
+\fBint vidattr_sp(SCREEN*, chtype);\fR
+.br
+\fBint vid_puts_sp(SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);\fR
+.br
+\fBint vidputs_sp(SCREEN*, chtype, NCURSES_SP_OUTC);\fR
+.br
+\fBwchar_t* wunctrl_sp(SCREEN*, cchar_t *);\fR
+.sp
+\fB#include <form.h>\fR
+.sp
+\fBint new_form_sp(SCREEN*, FIELD **);\fR
+.sp
+\fB#include <menu.h>\fR
+.sp
+\fBint new_menu_sp(SCREEN*, ITEM **);\fR
+.sp
+\fB#include <panel.h>\fR
+.sp
+\fBint ceiling_panel(SCREEN*);\fR
+.br
+\fBPANEL* ground_panel(SCREEN*);\fR
+.br
+\fBint update_panels_sp(SCREEN*);\fR
+.sp
+\fB#include <term.h>\fR
+.sp
+\fBint del_curterm_sp(SCREEN*, TERMINAL *);\fR
+.br
+\fBint putp_sp(SCREEN*, const char *);\fR
+.br
+\fBint tgetflag_sp(SCREEN*, char *, const char *);\fR
+.br
+\fBint tgetent_sp(SCREEN*, char *, const char *);\fR
+.br
+\fBint tgetnum_sp(SCREEN*, NCURSES_CONST char *);\fR
+.br
+\fBchar* tgetstr_sp(SCREEN*, NCURSES_CONST char *, char **);\fR
+.br
+\fBint tigetflag_sp(SCREEN*, NCURSES_CONST char *);\fR
+.br
+\fBint tigetnum_sp(SCREEN*, NCURSES_CONST char *);\fR
+.br
+\fBchar* tigetstr_sp(SCREEN*, NCURSES_CONST char *);\fR
+.br
+\fBint tputs_sp(SCREEN*, const char *, int, NCURSES_SP_OUTC);\fR
+.ad
+.br
+.SH DESCRIPTION
+This implementation can be configured to provide a set of functions which
+improve the ability to manage multiple screens.
+This feature can be added to any of the configurations supported by ncurses;
+it adds new entrypoints
+without changing the meaning of any of the existing ones.
+.PP
+.\" ***************************************************************************
+.SS IMPROVED FUNCTIONS
+Most of the functions are new versions of existing functions.
+A parameter is added at the front of the parameter list.
+It is a SCREEN pointer.
+.PP
+The existing functions all use the current screen,
+which is a static variable.
+The extended functions use the specified screen,
+thereby reducing the number of variables which must be modified
+to update multiple screens.
+.\" ***************************************************************************
+.SS NEW FUNCTIONS
+Here are the new functions:
+.TP 5
+ceiling_panel
+this returns a pointer to the topmost panel in the given screen.
+.TP 5
+ground_panel
+this returns a pointer to the lowest panel in the given screen.
+.TP 5
+new_prescr
+when creating a new screen, the library uses static variables which
+have been preset, e.g., by \fBuse_env\fP(3X), \fBfilter\fP(3X), etc.
+With the screen-pointer extension,
+there are situations where it must create a current screen before
+the unextended library does.
+The \fBnew_prescr\fP function is used internally to handle these cases.
+It is also provided as an entrypoint to allow applications to customize
+the library initialization.
+.\" ***************************************************************************
+.SH NOTES
+This extension introduces some new names:
+.TP 5
+NCURSES_SP_FUNCS
+This is set to the library patch-level number.
+In the unextended library, this is zero (0),
+to make it useful for checking if the extension is provided.
+.TP 5
+NCURSES_SP_NAME
+The new functions are named using the macro \fINCURSES_SP_NAME\fP,
+which hides the actual implementation.
+Currently this adds a "_sp" suffix to the name of the unextended function.
+This manual page indexes the extensions showing the full name.
+However the proper usage of these functions uses the macro,
+to provide for the possibility of changing the naming convention
+for specific library configurations.
+.TP 5
+NCURSES_SP_OUTC
+This is a new function-pointer type to use in the screen-pointer functions
+where an \fINCURSES_OUTC\fP is used in the unextended library.
+.TP 5
+NCURSES_OUTC
+This is a function-pointer type used for the cases where a function passes
+characters to the output stream, e.g., \fBvidputs\fP(3X).
+.PP
+.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 ncurses extensions
+be conditioned using \fINCURSES_SP_FUNCS\fP.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_opaque\fR(3X),
+\fBcurs_threads\fR(3X).
diff --git a/man/curs_termattrs.3x b/man/curs_termattrs.3x
index 1e07307d19c0..0f0294cd5696 100644
--- a/man/curs_termattrs.3x
+++ b/man/curs_termattrs.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_termattrs.3x,v 1.10 2007/06/02 20:40:07 tom Exp $
+.\" $Id: curs_termattrs.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH curs_termattrs 3X ""
.SH NAME
\fBbaudrate\fR,
@@ -39,7 +39,7 @@
\fBlongname\fR,
\fBterm_attrs\fR,
\fBtermattrs\fR,
-\fBtermname\fR - \fBcurses\fR environment query routines
+\fBtermname\fR \- \fBcurses\fR environment query routines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
@@ -126,9 +126,3 @@ 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/man/curs_termcap.3x b/man/curs_termcap.3x
index 93ac2fb146d1..70a6710ad648 100644
--- a/man/curs_termcap.3x
+++ b/man/curs_termcap.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,16 +26,24 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_termcap.3x,v 1.22 2007/06/02 20:40:07 tom Exp $
+.\" $Id: curs_termcap.3x,v 1.26 2010/12/04 18:38:55 tom Exp $
.TH curs_termcap 3X ""
+.na
+.hy 0
.ds n 5
.SH NAME
+\fBPC\fR,
+\fBUP\fR,
+\fBBC\fR,
+\fBospeed\fR,
\fBtgetent\fR,
\fBtgetflag\fR,
\fBtgetnum\fR,
\fBtgetstr\fR,
\fBtgoto\fR,
-\fBtputs\fR - direct \fBcurses\fR interface to the terminfo capability database
+\fBtputs\fR \- direct \fBcurses\fR interface to the terminfo capability database
+.ad
+.hy
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
@@ -69,7 +77,7 @@ can only be used to query the capabilities of entries for which a
terminfo entry has been compiled.
.PP
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
+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.
.PP
@@ -77,7 +85,7 @@ The \fBtgetflag\fR routine gets the boolean entry for \fIid\fR,
or zero if it is not available.
.PP
The \fBtgetnum\fR routine gets the numeric entry for \fIid\fR,
-or -1 if it is not available.
+or \-1 if it is not available.
.PP
The \fBtgetstr\fR routine returns the string entry for \fIid\fR,
or zero if it is not available.
@@ -158,10 +166,7 @@ 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(3).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
+\fBcurses\fR(3X),
+\fBterminfo\fR(\*n),
+\fBterm_variables\fR(3X),
+\fBputc\fR(3).
diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x
index 4412a6a69c35..0e95d1c2248d 100644
--- a/man/curs_terminfo.3x
+++ b/man/curs_terminfo.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1999-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_terminfo.3x,v 1.30 2008/08/16 20:53:27 tom Exp $
+.\" $Id: curs_terminfo.3x,v 1.35 2010/12/04 18:38:55 tom Exp $
.TH curs_terminfo 3X ""
.ds n 5
.na
@@ -42,12 +42,13 @@
\fBtigetflag\fR,
\fBtigetnum\fR,
\fBtigetstr\fR,
+\fBtiparm\fR,
\fBtparm\fR,
\fBtputs\fR,
\fBvid_attr\fR,
\fBvid_puts\fR,
\fBvidattr\fR,
-\fBvidputs\fR - \fBcurses\fR interfaces to terminfo database
+\fBvidputs\fR \- \fBcurses\fR interfaces to terminfo database
.ad
.hy
.SH SYNOPSIS
@@ -88,6 +89,8 @@
.br
\fBchar *tigetstr(char *\fR\fIcapname\fR\fB);\fR
.br
+\fBchar *tiparm(const char *\fR\fIstr\fR\fB, ...);\fR
+.br
.fi
.SH DESCRIPTION
These low-level routines must be called by programs that have to deal
@@ -153,7 +156,7 @@ 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
+.B \-1
means that the \fBterminfo\fR database could not be found.
.RE
.PP
@@ -196,6 +199,10 @@ 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
+\fBtiparm\fP is a newer form of \fBtparm\fP which uses \fI<stdarg.h>\fP
+rather than a fixed-parameter list.
+Its numeric parameters are integers (int) rather than longs.
+.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
@@ -233,15 +240,15 @@ 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
+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
+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.
+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
+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
@@ -319,10 +326,14 @@ That returns the length of the string, and does no error-checking.
.PP
X/Open Curses prototypes \fBtparm\fR with a fixed number of parameters,
rather than a variable argument list.
-This implementation uses a variable argument list.
+This implementation uses a variable argument list, but can be
+configured to use the fixed-parameter list.
Portable applications should provide 9 parameters after the format;
zeroes are fine for this purpose.
.PP
+In response to comments by Thomas E. Dickey,
+X/Open Curses Issue 7 proposed the \fBtiparam\fP function in mid-2009.
+.PP
X/Open 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.
@@ -332,21 +343,17 @@ So though it is documented as a terminfo function,
\fBmvcur\fR is really a curses function which is not well specified.
.PP
X/Open states that the old location must be given for \fBmvcur\fP.
-This implementation allows the caller to use -1's for the old ordinates.
+This implementation allows the caller to use \-1's for the old ordinates.
In that case, the old location is unknown.
.PP
-Extended terminal capability names, e.g., as defined by \fBtic\ -x\fP,
+Extended terminal capability names, e.g., as defined by \fBtic\ \-x\fP,
are not stored in the arrays described in this section.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_initscr\fR(3X),
\fBcurs_kernel\fR(3X),
\fBcurs_termcap\fR(3X),
+\fBcurs_variables\fR(3X),
+\fBterm_variables\fR(3X),
\fBputc\fR(3),
\fBterminfo\fR(\*n)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_threads.3x b/man/curs_threads.3x
index 17dabdb7b40a..4baa2a1f4917 100644
--- a/man/curs_threads.3x
+++ b/man/curs_threads.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,21 +26,27 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_threads.3x,v 1.12 2008/04/12 18:22:51 tom Exp $
+.\" $Id: curs_threads.3x,v 1.18 2010/12/04 18:38:55 tom Exp $
.TH curs_threads 3X ""
+.de bP
+.IP \(bu 4
+..
.na
.hy 0
.SH NAME
\fBuse_screen\fR,
-\fBuse_window\fR - \fBcurses\fR thread support
+\fBuse_window\fR \- \fBcurses\fR thread support
.ad
.hy
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
\fBtypedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);\fR
+.br
\fBtypedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);\fR
.br
+\fBint get_escdelay(void);\fR
+.br
\fBint set_escdelay(int size);\fR
.br
\fBint set_tabsize(int size);\fR
@@ -89,6 +95,8 @@ To modify them in any configuration,
use the \fBset_escdelay\fP or \fBset_tabsize\fP functions.
Other global variables are not modifiable.
.PP
+The \fBget_escdelay\fP function returns the value for ESCDELAY.
+.PP
The \fBuse_window\fP and \fBuse_screen\fP functions provide coarse
granularity mutexes for their respective \fBWINDOW\fP and \fBSCREEN\fP
parameters, and call a user-supplied function,
@@ -100,26 +108,21 @@ All of the ncurses library functions assume that the locale is not
altered during operation.
In addition,
they use data which is maintained within a hierarchy of scopes.
-.RS
-.TP 3
--
+.RS 3
+.bP
global data, e.g., used in the low-level terminfo or termcap interfaces.
-.TP 3
--
+.bP
terminal data, e.g., associated with a call to \fIset_curterm\fP.
The terminal data are initialized when screens are created.
-.TP 3
--
+.bP
screen data, e.g., associated with a call to \fInewterm\fP or \fIinitscr\fP.
-.TP 3
--
+.bP
window data, e.g., associated with a call to \fInewwin\fP or \fIsubwin\fP.
Windows are associated with screens.
Pads are not necessarily associated with a particular screen.
.IP
Most curses applications operate on one or more windows within a single screen.
-.TP 3
--
+.bP
reentrant, i.e., it uses only the data passed as parameters.
.RE
.PP
@@ -594,10 +597,5 @@ It is recommended that any code depending on ncurses extensions
be conditioned using NCURSES_VERSION.
.SH SEE ALSO
\fBcurses\fR(3X),
-\fBcurs_opaque\fR(3X)
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
+\fBcurs_opaque\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_touch.3x b/man/curs_touch.3x
index a7d07bc3ffbe..9fa6d370b9a2 100644
--- a/man/curs_touch.3x
+++ b/man/curs_touch.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_touch.3x,v 1.11 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_touch.3x,v 1.14 2010/12/04 18:38:55 tom Exp $
.TH curs_touch 3X ""
.na
.hy 0
@@ -36,7 +36,7 @@
\fBuntouchwin\fR,
\fBwtouchln\fR,
\fBis_linetouched\fR,
-\fBis_wintouched\fR - \fBcurses\fR refresh control routines
+\fBis_wintouched\fR \- \fBcurses\fR refresh control routines
.ad
.hy
.SH SYNOPSIS
@@ -107,10 +107,6 @@ 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:
+\fBcurses\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_variables\fR(3X).
diff --git a/man/curs_trace.3x b/man/curs_trace.3x
index ca7495272d33..ef784165e168 100644
--- a/man/curs_trace.3x
+++ b/man/curs_trace.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2000-2005,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 2000-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_trace.3x,v 1.8 2007/02/24 17:33:49 tom Exp $
+.\" $Id: curs_trace.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH curs_trace 3X ""
.na
.hy 0
@@ -36,11 +36,13 @@
\fB_traceattr\fR,
\fB_traceattr2\fR,
\fB_nc_tracebits\fR,
+\fB_tracecchar_t\fR,
+\fB_tracecchar_t2\fR,
\fB_tracechar\fR,
\fB_tracechtype\fR,
\fB_tracechtype2\fR,
\fB_tracemouse\fR,
-\fBtrace\fR - \fBcurses\fR debugging routines
+\fBtrace\fR \- \fBcurses\fR debugging routines
.ad
.hy
.SH SYNOPSIS
@@ -56,7 +58,11 @@
.br
\fBchar *_nc_tracebits(void);\fR
.br
-\fBchar *_tracechar(int);\fR
+\fBchar * _tracecchar_t(const cchar_t *string);\fR
+.br
+\fBchar * _tracecchar_t2(int buffer, const cchar_t *string);\fR
+.br
+\fBchar *_tracechar(int ch);\fR
.br
\fBchar *_tracechtype(chtype ch);\fR
.br
@@ -71,6 +77,8 @@ 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.
+Additionally, some functions are only available with the wide-character
+configuration of the libraries.
.PP
The principal parts of this interface are the \fBtrace\fR routine which
selectively enables different tracing features, and the \fB_tracef\fR
@@ -135,6 +143,21 @@ 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.
+.PP
+These functions check the \fBNCURSES_TRACE\fP environment variable,
+to set the tracing feature as if \fBtrace\fP was called:
+.RS
+filter,
+initscr,
+new_prescr,
+newterm,
+nofilter,
+ripoffline,
+setupterm,
+slk_init,
+tgetent
+.RE
+
.SH RETURN VALUE
Routines which return a value are designed to be used as parameters
to the \fB_tracef\fR routine.
@@ -145,9 +168,3 @@ have similar, undocumented features,
but they are not compatible with ncurses.
.SH SEE ALSO
\fBcurses\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_util.3x b/man/curs_util.3x
index 18e2b320cac1..fb912b65f328 100644
--- a/man/curs_util.3x
+++ b/man/curs_util.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,8 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_util.3x,v 1.27 2008/10/25 23:45:41 tom Exp $
+.\" $Id: curs_util.3x,v 1.32 2010/12/04 18:38:55 tom Exp $
.TH curs_util 3X ""
+.de bP
+.IP \(bu 4
+..
.na
.hy 0
.SH NAME
@@ -41,7 +44,7 @@
\fBputwin\fR,
\fBunctrl\fR,
\fBuse_env\fR,
-\fBwunctrl\fR - miscellaneous \fBcurses\fR utility routines
+\fBwunctrl\fR \- miscellaneous \fBcurses\fR utility routines
.ad
.hy
.SH SYNOPSIS
@@ -75,33 +78,27 @@ 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.
+a wide character.
.PP
The \fBkeyname\fR routine returns a character string corresponding to the key \fIc\fR:
.RS 3
-.TP 3
--
+.bP
Printable characters are displayed as themselves, e.g., a one-character string containing the key.
-.TP 3
--
+.bP
Control characters are displayed in the \fB^\fR\fIX\fR notation.
-.TP 3
--
+.bP
DEL (character 127) is displayed as \fB^?\fP.
-.TP 3
--
+.bP
Values above 128 are either meta characters
(if the screen has not been initialized,
or if \fBmeta\fP has been called with a TRUE parameter),
-shown in the \fBM-\fR\fIX\fR notation,
+shown in the \fBM\-\fR\fIX\fR notation,
or are displayed as themselves.
In the latter case, the values may not be printable;
this follows the X/Open specification.
-.TP 3
--
+.bP
Values above 256 may be the names of the names of function keys.
-.TP 3
--
+.bP
Otherwise (if there is no corresponding name) the function returns null,
to denote an error.
X/Open also lists an "UNKNOWN KEY" return value, which some implementations
@@ -177,14 +174,12 @@ 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.
This implementation checks for three cases:
-.RS
-.TP 5
--
-the parameter is a 7-bit US-ASCII code.
+.RS 3
+.bP
+the parameter is a 7-bit US\-ASCII code.
This is the case that X/Open Curses documented.
-.TP 5
--
-the parameter is in the range 128-159, i.e., a C1 control code.
+.bP
+the parameter is in the range 128\-159, i.e., a C1 control code.
If \fBuse_legacy_coding\fP has been called with a \fB2\fP parameter,
\fBunctrl\fP returns the parameter, i.e., a one-character string with
the parameter as the first character.
@@ -194,8 +189,7 @@ X/Open Curses does not document whether \fBunctrl\fP can be called before
initializing curses.
This implementation permits that,
and returns the ``~@'', etc., values in that case.
-.TP 5
--
+.bP
parameter values outside the 0 to 255 range.
\fBunctrl\fP returns a null pointer.
.RE
@@ -219,17 +213,17 @@ change the output of \fBunctrl\fP.
.PP
Likewise, the \fBmeta\fP function allows the caller to change the
output of \fBkeyname\fP, i.e.,
-it determines whether to use the `M-' prefix
+it determines whether to use the `M\-' prefix
for ``meta'' keys (codes in the range 128 to 255).
Both \fBuse_legacy_coding\fP and \fBmeta\fP succeed only after
curses is initialized.
X/Open Curses does not document the treatment of codes 128 to 159.
When treating them as ``meta'' keys
(or if \fBkeyname\fP is called before initializing curses),
-this implementation returns strings ``M-^@'', ``M-^A'', etc.
+this implementation returns strings ``M\-^@'', ``M\-^A'', etc.
.PP
The \fBkeyname\fP function may return the names of user-defined
-string capabilities which are defined in the terminfo entry via the \fB-x\fP
+string capabilities which are defined in the terminfo entry via the \fB\-x\fP
option of \fBtic\fP.
This implementation automatically assigns at run-time keycodes to
user-defined strings which begin with "k".
@@ -249,10 +243,5 @@ be conditioned using NCURSES_VERSION.
\fBcurs_initscr\fR(3X),
\fBcurs_kernel\fR(3X),
\fBcurs_scr_dump\fR(3X),
+\fBcurs_variables\fR(3X),
\fBlegacy_coding\fR(3X).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/curs_variables.3x b/man/curs_variables.3x
new file mode 100644
index 000000000000..8cfee5290e5c
--- /dev/null
+++ b/man/curs_variables.3x
@@ -0,0 +1,135 @@
+.\"***************************************************************************
+.\" Copyright (c) 2010 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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_variables.3x,v 1.4 2010/12/04 18:38:55 tom Exp $
+.TH curs_variables 3X ""
+.de bP
+.IP \(bu 4
+..
+.ds n 5
+.na
+.hy 0
+.SH NAME
+\fBCOLORS\fR,
+\fBCOLOR_PAIRS\fR,
+\fBCOLS\fR,
+\fBESCDELAY\fR,
+\fBLINES\fR,
+\fBTABSIZE\fR,
+\fBcurscr\fR,
+\fBnewscr\fR,
+\fBstdscr\fR
+\- \fBcurses\fR global variables
+.ad
+.hy
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+.PP
+\fBint COLOR_PAIRS;\fR
+.br
+\fBint COLORS;\fR
+.br
+\fBint COLS;\fR
+.br
+\fBint ESCDELAY;\fR
+.br
+\fBint LINES;\fR
+.br
+\fBint TABSIZE;\fR
+.br
+\fBWINDOW * curscr;\fR
+.br
+\fBWINDOW * newscr;\fR
+.br
+\fBWINDOW * stdscr;\fR
+.fi
+.SH DESCRIPTION
+This page summarizes variables provided by the \fBcurses\fP library.
+A more complete description is given in the \fBcurses\fP(3X) manual page.
+.PP
+Depending on the configuration, these may be actual variables,
+or macros (see \fBcurs_threads\fR(3X))
+which provide read-only access to \fIcurses\fP's state.
+In either case, applications should treat them as read-only to avoid
+confusing the library.
+.SS COLOR_PAIRS
+After initializing curses, this variable contains the number of color pairs
+which the terminal can support.
+Usually the number of color pairs will be the product \fBCOLORS\fP*\fBCOLORS\fP,
+however this is not always true:
+.bP
+a few terminals use HLS colors, which do not follow this rule
+.bP
+terminals supporting a large number of colors are limited by the number
+of color pairs that can be represented in a \fIsigned short\fP value.
+.SS COLORS
+After initializing curses, this variable contains the number of colors
+which the terminal can support.
+.SS COLS
+After initializing curses, this variable contains the width of the screen,
+i.e., the number of columns.
+.SS ESCDELAY
+This variable holds the number of milliseconds to wait after reading an
+escape character,
+to distinguish between an individual escape character entered on the
+keyboard from escape sequences sent by cursor- and function-keys
+(see curses(3X).
+.SS LINES
+After initializing curses, this variable contains the height of the screen,
+i.e., the number of lines.
+.SS TABSIZE
+This variable holds the number of columns used by the \fIcurses\fP library
+when converting a tab character to spaces as it adds the tab to a window
+(see curs_addch(3X).
+.SS The Current Screen
+This implementation of curses uses a special window \fBcurscr\fP to
+record its updates to the terminal screen.
+.SS The New Screen
+This implementation of curses uses a special window \fBnewscr\fP to
+hold updates to the terminal screen before applying them to \fBcurscr\fP.
+.SS The Standard Screen
+Upon initializing curses,
+a default window called \fBstdscr\fP,
+which is the size of the terminal screen, is created.
+Many curses functions use this window.
+.SH NOTES
+The curses library is initialized using either \fBinitscr\fR(3X),
+or \fBnewterm\fR(3X).
+.PP
+If \fBcurses\fP is configured to use separate curses/terminfo libraries,
+most of these variables reside in the curses library.
+.SH PORTABILITY
+ESCDELAY and TABSIZE are extensions,
+not provided in most other implementations of curses.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_threads\fR(3X),
+\fBterm_variables\fR(3X),
+\fBterminfo\fR(3X),
+\fBterminfo\fR(\*n).
diff --git a/man/curs_window.3x b/man/curs_window.3x
index 552862e9e253..9ef41ff523d1 100644
--- a/man/curs_window.3x
+++ b/man/curs_window.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_window.3x,v 1.14 2006/02/25 21:49:19 tom Exp $
+.\" $Id: curs_window.3x,v 1.17 2010/12/04 18:38:55 tom Exp $
.TH curs_window 3X ""
.na
.hy 0
@@ -41,7 +41,7 @@
\fBwsyncup\fR,
\fBsyncok\fR,
\fBwcursyncup\fR,
-\fBwsyncdown\fR - create \fBcurses\fR windows
+\fBwsyncdown\fR \- create \fBcurses\fR windows
.ad
.hy
.SH SYNOPSIS
@@ -76,8 +76,8 @@
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
+\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.
.PP
Calling \fBdelwin\fR deletes the named window, freeing all memory
@@ -179,10 +179,7 @@ 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:
+\fBcurses\fR(3X),
+\fBcurs_refresh\fR(3X),
+\fBcurs_touch\fR(3X),
+\fBcurs_variables\fR(3X)
diff --git a/man/default_colors.3x b/man/default_colors.3x
index 32518ba9d9cf..0b85598eea45 100644
--- a/man/default_colors.3x
+++ b/man/default_colors.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey 1997,1999,2000,2005
.\"
-.\" $Id: default_colors.3x,v 1.20 2006/12/24 15:02:53 tom Exp $
+.\" $Id: default_colors.3x,v 1.23 2011/01/03 21:52:27 Tim.van.der.Molen Exp $
.TH default_colors 3X ""
.SH NAME
\fBuse_default_colors\fR,
@@ -64,14 +64,14 @@ visual effects.
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
+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,
+This function recognizes a special color number \-1,
which denotes the default terminal color.
.PP
The following are equivalent:
@@ -79,12 +79,12 @@ The following are equivalent:
.br
.I use_default_colors();
.br
-.I assume_default_colors(-1,-1);
+.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
+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.
@@ -101,7 +101,7 @@ for color pair 0.
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
+If the \fIinitialize_pair\fP capability is not found, this causes an
error as well.
.SH NOTES
Associated with this extension, the \fBinit_pair\fR function accepts
@@ -136,9 +136,3 @@ any code depending on them be conditioned using NCURSES_VERSION.
.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/man/define_key.3x b/man/define_key.3x
index 216a3cbce4b6..18eaff87cb11 100644
--- a/man/define_key.3x
+++ b/man/define_key.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey 1997
.\"
-.\" $Id: define_key.3x,v 1.12 2006/02/25 21:49:19 tom Exp $
+.\" $Id: define_key.3x,v 1.14 2010/12/04 18:49:20 tom Exp $
.TH define_key 3X ""
.SH NAME
\fBdefine_key\fP \- define a keycode
@@ -47,7 +47,11 @@ 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.
+The keycode must be greater than zero, and the string non-null,
+otherwise ERR is returned.
+ERR may also be returned if there is insufficient memory to allocate the
+data to store the definition.
+If no error is detected, OK 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
@@ -57,9 +61,3 @@ any code depending on them be conditioned using NCURSES_VERSION.
\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/man/form.3x b/man/form.3x
index dcba19b3353e..775c8331c958 100644
--- a/man/form.3x
+++ b/man/form.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form.3x,v 1.22 2008/10/11 20:48:11 tom Exp $
+.\" $Id: form.3x,v 1.24 2010/12/04 18:40:45 tom Exp $
.TH form 3X ""
.SH NAME
-\fBform\fR - curses extension for programming forms
+\fBform\fR \- curses extension for programming forms
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -43,7 +43,7 @@ user.
.PP
The \fBform\fR library uses the \fBcurses\fR libraries.
To use the \fBform\fR library, link with the options
-\fB-lform -lcurses\fR.
+\fB\-lform \-lcurses\fR.
.PP
Your program should set up the locale, e.g.,
.sp
@@ -197,7 +197,7 @@ The header file \fB<form.h>\fR automatically includes the header files
\fB<curses.h>\fR and \fB<eti.h>\fR.
.PP
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
+you want to say `\-lform \-lncurses', not the other way around (which would
give you a link error using most linkers).
.SH PORTABILITY
These routines emulate the System V forms library. They were not supported on
@@ -208,9 +208,3 @@ S. Raymond.
.SH SEE ALSO
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/form_cursor.3x b/man/form_cursor.3x
index bf9f28d6c61e..ed4b420d29ee 100644
--- a/man/form_cursor.3x
+++ b/man/form_cursor.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_cursor.3x,v 1.6 2006/11/04 18:50:24 tom Exp $
+.\" $Id: form_cursor.3x,v 1.8 2010/12/04 18:40:45 tom Exp $
.TH form_cursor 3X ""
.SH NAME
-\fBform_cursor\fR - position a form window cursor
+\fBform_cursor\fR \- position a form window cursor
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -67,9 +67,3 @@ 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/man/form_data.3x b/man/form_data.3x
index 2ba004c3387e..ed39bf5a3ed5 100644
--- a/man/form_data.3x
+++ b/man/form_data.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_data.3x,v 1.8 2006/02/25 21:38:26 tom Exp $
+.\" $Id: form_data.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH form_data 3X ""
.SH NAME
-\fBform_data\fR - test for off-screen data in given forms
+\fBform_data\fR \- test for off-screen data in given forms
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -55,9 +55,3 @@ 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/man/form_driver.3x b/man/form_driver.3x
index 4b0576f042e0..67a986b006ba 100644
--- a/man/form_driver.3x
+++ b/man/form_driver.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_driver.3x,v 1.16 2008/06/21 21:55:39 tom Exp $
+.\" $Id: form_driver.3x,v 1.22 2010/12/04 18:38:55 tom Exp $
.TH form_driver 3X ""
+.de bP
+.IP \(bu 4
+..
.SH NAME
-\fBform_driver\fR - command-processing loop of the form system
+\fBform_driver\fR \- command-processing loop of the form system
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -38,18 +41,15 @@ int form_driver(FORM *form, int c);
.SH DESCRIPTION
Once a form has been posted (displayed), you should funnel input events to it
through \fBform_driver\fR. This routine has three major input cases:
-.TP 3
--
+.bP
The input is a form navigation request.
Navigation request codes are constants defined in \fB<form.h>\fP,
which are distinct from the key- and character codes returned by \fBwgetch\fP.
-.TP 3
--
+.bP
The input is a printable character.
Printable characters (which must be positive, less than 256) are
checked according to the program's locale settings.
-.TP 3
--
+.bP
The input is the KEY_MOUSE special key associated with an mouse event.
.PP
The form driver requests are as follows:
@@ -238,11 +238,11 @@ requests listed above, that request is executed.
.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 form display
+Currently only clicks in the user window (e.g., inside the form display
area or the decoration window) are handled.
.PP
If you click above the display region of the form:
-.RS
+.RS 3
.TP
a REQ_PREV_FIELD is generated for a single click,
.TP
@@ -252,7 +252,7 @@ a REQ_FIRST_FIELD is generated for a triple-click.
.RE
.PP
If you click below the display region of the form:
-.RS
+.RS 3
.TP
a REQ_NEXT_FIELD is generated for a single click,
.TP
@@ -262,12 +262,10 @@ a REQ_LAST_FIELD is generated for a triple-click.
.RE
.PP
If you click at an field inside the display area of the form:
-.RS
-.TP 3
--
+.RS 3
+.bP
the form cursor is positioned to that field.
-.TP 3
--
+.bP
If you double-click a field,
the form cursor is positioned to that field
and \fBE_UNKNOWN_COMMAND\fR is returned.
@@ -276,8 +274,7 @@ because a double click usually means that an field-specific action should
be returned.
It is exactly the purpose of this return value to signal that an
application specific command should be executed.
-.TP 3
--
+.bP
If a translation
into a request was done, \fBform_driver\fR returns the result of this request.
.RE
@@ -321,7 +318,8 @@ The form driver code saw an unknown request code.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBform\fR(3X),
-\fBwgetch\fR(3X).
+\fBform_variables\fR(3X),
+\fBgetch\fR(3X).
.SH NOTES
The header file \fB<form.h>\fR automatically includes the header files
\fB<curses.h>\fR.
@@ -331,9 +329,3 @@ 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/man/form_field.3x b/man/form_field.3x
index f3a26c57dac0..7a39a0ccc839 100644
--- a/man/form_field.3x
+++ b/man/form_field.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field.3x,v 1.8 2006/11/04 18:01:38 tom Exp $
+.\" $Id: form_field.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH form_field 3X ""
.SH NAME
-\fBform_field\fR - make and break connections between fields and forms
+\fBform_field\fR \- make and break connections between fields and forms
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -86,13 +86,7 @@ These routines emulate the System V forms library. They were not supported on
Version 7 or BSD versions.
.PP
The SVr4 forms library documentation specifies the \fBfield_count\fR error value
-as -1 (which is the value of \fBERR\fR).
+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/man/form_field_attributes.3x b/man/form_field_attributes.3x
index 90dc0f31b63b..da3ad793876b 100644
--- a/man/form_field_attributes.3x
+++ b/man/form_field_attributes.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_attributes.3x,v 1.10 2006/11/04 18:51:26 tom Exp $
+.\" $Id: form_field_attributes.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH form_field_attributes 3X ""
.SH NAME
-\fBform_field_attributes\fR - color and attribute control for form fields
+\fBform_field_attributes\fR \- color and attribute control for form fields
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -84,9 +84,3 @@ 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/man/form_field_buffer.3x b/man/form_field_buffer.3x
index 566072f55ddb..b4ff8cb7665d 100644
--- a/man/form_field_buffer.3x
+++ b/man/form_field_buffer.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,13 +27,16 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_buffer.3x,v 1.15 2008/10/18 18:35:17 tom Exp $
+.\" $Id: form_field_buffer.3x,v 1.19 2010/12/04 18:38:55 tom Exp $
.TH form_field_buffer 3X ""
+.de bP
+.IP \(bu 4
+..
.SH NAME
-\fBform_field_buffer\fR - field buffer control
+\fBform_field_buffer\fR \- field buffer control
.SH SYNOPSIS
\fB#include <form.h>\fR
-.br
+.sp
int set_field_buffer(FIELD *field, int buf, const char *value);
.br
char *field_buffer(const FIELD *field, int buffer);
@@ -48,11 +51,9 @@ int set_max_field(FIELD *field, int max);
The function \fBset_field_buffer\fR sets the numbered buffer of the given field
to contain a given string:
.RS 3
-.TP 3
--
+.bP
Buffer 0 is the displayed value of the field.
-.TP 3
--
+.bP
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.
@@ -61,28 +62,23 @@ but are not manipulated by the forms library.
The function \fBfield_buffer\fR returns a pointer to
the contents of the given numbered buffer:
.RS 3
-.TP 3
--
+.bP
The buffer contents always have the same length,
and are padded with trailing spaces
as needed to ensure this length is the same.
-.TP 3
--
+.bP
The buffer may contain leading spaces, depending on how it was set.
-.TP 3
--
+.bP
The buffer contents are set with \fBset_field_buffer\fP,
or as a side effect of any editing operations on the corresponding field.
-.TP 3
--
+.bP
Editing operations are based on the \fIwindow\fP which displays the field,
rather than a \fIstring\fP.
The window contains only printable characters, and is filled with blanks.
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.
-.TP 3
--
+.bP
Because editing operations change the content of the buffer to
correspond to the window, you should not rely on using buffers
for long-term storage of form data.
@@ -122,7 +118,7 @@ descriptions of the entry points.
.SH NOTES
The header file \fB<form.h>\fR automatically includes the header file
.PP
-When configured for wide-characters, \fBfield_buffer\fP returns a pointer
+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
@@ -134,9 +130,3 @@ 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/man/form_field_info.3x b/man/form_field_info.3x
index bde312856951..6a1af6c3139b 100644
--- a/man/form_field_info.3x
+++ b/man/form_field_info.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_info.3x,v 1.10 2006/11/04 17:14:31 tom Exp $
+.\" $Id: form_field_info.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH form_field_info 3X ""
.SH NAME
-\fBform_field_info\fR - retrieve field characteristics
+\fBform_field_info\fR \- retrieve field characteristics
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -77,9 +77,3 @@ 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/man/form_field_just.3x b/man/form_field_just.3x
index 15d6cb254df1..2f223e91e7bf 100644
--- a/man/form_field_just.3x
+++ b/man/form_field_just.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_just.3x,v 1.9 2006/11/04 17:12:00 tom Exp $
+.\" $Id: form_field_just.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH form_field_just 3X ""
.SH NAME
-\fBform_field_just\fR - retrieve field characteristics
+\fBform_field_just\fR \- retrieve field characteristics
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -70,9 +70,3 @@ 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/man/form_field_new.3x b/man/form_field_new.3x
index 6095de1ccbb2..23a351663688 100644
--- a/man/form_field_new.3x
+++ b/man/form_field_new.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_new.3x,v 1.16 2007/06/02 20:40:07 tom Exp $
+.\" $Id: form_field_new.3x,v 1.18 2010/12/04 18:40:45 tom Exp $
.TH form_field_new 3X ""
.SH NAME
-\fBform_field_new\fR - create and destroy form fields
+\fBform_field_new\fR \- create and destroy form fields
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -98,9 +98,3 @@ not very explicit about what gets copied and what 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/man/form_field_opts.3x b/man/form_field_opts.3x
index d505279ceb20..a33a0414d3e0 100644
--- a/man/form_field_opts.3x
+++ b/man/form_field_opts.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_opts.3x,v 1.13 2007/02/24 17:34:27 tom Exp $
+.\" $Id: form_field_opts.3x,v 1.16 2010/12/04 18:41:07 tom Exp $
.TH form_field_opts 3X ""
.SH NAME
-\fBform_field_opts\fR - set and get field options
+\fBform_field_opts\fR \- set and get field options
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -106,7 +106,6 @@ The field is the current field.
System error occurred (see \fBerrno\fR).
.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.
@@ -116,9 +115,3 @@ 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/man/form_field_userptr.3x b/man/form_field_userptr.3x
index 47b9ed424d19..898da976f971 100644
--- a/man/form_field_userptr.3x
+++ b/man/form_field_userptr.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_userptr.3x,v 1.8 2006/11/04 18:04:37 tom Exp $
+.\" $Id: form_field_userptr.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH form_field_userptr 3X ""
.SH NAME
-\fBform_field_userptr\fR - associate application data with a form field
+\fBform_field_userptr\fR \- associate application data with a form field
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -61,9 +61,3 @@ We chose not to 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/man/form_field_validation.3x b/man/form_field_validation.3x
index 2da52efd2e36..3505fdb231b8 100644
--- a/man/form_field_validation.3x
+++ b/man/form_field_validation.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_field_validation.3x,v 1.16 2006/12/24 16:08:08 tom Exp $
+.\" $Id: form_field_validation.3x,v 1.20 2010/12/04 18:38:55 tom Exp $
.TH form_field_validation 3X ""
.SH NAME
-\fBform_field_validation\fR - data type validation for fields
+\fBform_field_validation\fR \- data type validation for fields
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -70,9 +70,7 @@ 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.
+that the string list is copied. So you may use 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
@@ -101,10 +99,10 @@ Regular expression data. Requires a regular expression \fB(char *)\fR third arg
the data is valid if the regular expression matches it. Regular expressions
are in the format of \fBregcomp\fR and \fBregexec\fR. 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
+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
+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
@@ -126,7 +124,9 @@ The routine succeeded.
.B E_SYSTEM_ERROR
System error occurred (see \fBerrno\fR).
.SH SEE ALSO
-\fBcurses\fR(3X), \fBform\fR(3X).
+\fBcurses\fR(3X),
+\fBform\fR(3X),
+\fBform_variables\fR(3X).
.SH NOTES
The header file \fB<form.h>\fR automatically includes the header file
\fB<curses.h>\fR.
@@ -136,9 +136,3 @@ 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/man/form_fieldtype.3x b/man/form_fieldtype.3x
index 0d42faed6cc2..028e9b0befcc 100644
--- a/man/form_fieldtype.3x
+++ b/man/form_fieldtype.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_fieldtype.3x,v 1.14 2006/11/04 17:12:00 tom Exp $
+.\" $Id: form_fieldtype.3x,v 1.16 2010/12/04 18:40:45 tom Exp $
.TH form_fieldtype 3X ""
.SH NAME
-\fBform_fieldtype\fR - define validation-field types
+\fBform_fieldtype\fR \- define validation-field types
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -140,9 +140,3 @@ 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/man/form_hook.3x b/man/form_hook.3x
index cd47a24a59c8..2943b8804993 100644
--- a/man/form_hook.3x
+++ b/man/form_hook.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_hook.3x,v 1.9 2007/02/24 17:34:18 tom Exp $
+.\" $Id: form_hook.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH form_hook 3X ""
.SH NAME
-\fBform_hook\fR - set hooks for automatic invocation by applications
+\fBform_hook\fR \- set hooks for automatic invocation by applications
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -92,9 +92,3 @@ 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/man/form_new.3x b/man/form_new.3x
index cac4f508b38b..b69f642b0a91 100644
--- a/man/form_new.3x
+++ b/man/form_new.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_new.3x,v 1.7 2006/11/04 17:12:00 tom Exp $
+.\" $Id: form_new.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH form_new 3X ""
.SH NAME
-\fBform_new\fR - create and destroy forms
+\fBform_new\fR \- create and destroy forms
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -81,9 +81,3 @@ 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/man/form_new_page.3x b/man/form_new_page.3x
index 5b7f58d4a46a..635822df2115 100644
--- a/man/form_new_page.3x
+++ b/man/form_new_page.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_new_page.3x,v 1.8 2006/11/04 17:12:00 tom Exp $
+.\" $Id: form_new_page.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH form_new_page 3X ""
.SH NAME
-\fBform_new_page\fR - form pagination functions
+\fBform_new_page\fR \- form pagination functions
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -69,9 +69,3 @@ 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/man/form_opts.3x b/man/form_opts.3x
index 0caaae7c8837..f02cec6d93f3 100644
--- a/man/form_opts.3x
+++ b/man/form_opts.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_opts.3x,v 1.9 2007/02/24 17:34:36 tom Exp $
+.\" $Id: form_opts.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH form_opts 3X ""
.SH NAME
-\fBform_opts\fR - set and get form options
+\fBform_opts\fR \- set and get form options
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -82,9 +82,3 @@ 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/man/form_page.3x b/man/form_page.3x
index 50ed54db4cc5..2211216d8155 100644
--- a/man/form_page.3x
+++ b/man/form_page.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_page.3x,v 1.10 2006/11/04 18:52:32 tom Exp $
+.\" $Id: form_page.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH form_page 3X ""
.SH NAME
-\fBform_page\fR - set and get form page number
+\fBform_page\fR \- set and get form page number
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -88,9 +88,3 @@ 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/man/form_post.3x b/man/form_post.3x
index 6bf1607799c6..4799d9d1d324 100644
--- a/man/form_post.3x
+++ b/man/form_post.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_post.3x,v 1.7 2006/11/04 18:53:20 tom Exp $
+.\" $Id: form_post.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH form_post 3X ""
.SH NAME
-\fBform_post\fR - write or erase forms from associated subwindows
+\fBform_post\fR \- write or erase forms from associated subwindows
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -83,9 +83,3 @@ 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/man/form_requestname.3x b/man/form_requestname.3x
index a172f857b1e3..4a4e7eb033e3 100644
--- a/man/form_requestname.3x
+++ b/man/form_requestname.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_requestname.3x,v 1.7 2006/11/04 17:57:49 tom Exp $
+.\" $Id: form_requestname.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH form_requestname 3X ""
.SH NAME
-\fBform_requestname\fR - handle printable form request names
+\fBform_requestname\fR \- handle printable form request names
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -62,9 +62,3 @@ 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/man/form_userptr.3x b/man/form_userptr.3x
index 7be0bf860480..bd29b542c85b 100644
--- a/man/form_userptr.3x
+++ b/man/form_userptr.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_userptr.3x,v 1.11 2006/11/04 18:43:24 tom Exp $
+.\" $Id: form_userptr.3x,v 1.13 2010/12/04 18:40:45 tom Exp $
.TH form_userptr 3X ""
.SH NAME
-\fBform_userptr\fR - associate application data with a form item
+\fBform_userptr\fR \- associate application data with a form item
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -61,9 +61,3 @@ We chose not to 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/man/form_variables.3x b/man/form_variables.3x
new file mode 100644
index 000000000000..49f28762082d
--- /dev/null
+++ b/man/form_variables.3x
@@ -0,0 +1,82 @@
+.\"***************************************************************************
+.\" Copyright (c) 2010 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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_variables.3x,v 1.3 2010/12/04 18:38:55 tom Exp $
+.TH form_variables 3X ""
+.ds n 5
+.na
+.hy 0
+.SH NAME
+\fBTYPE_ALNUM\fR,
+\fBTYPE_ALPHA\fR,
+\fBTYPE_ENUM\fR,
+\fBTYPE_INTEGER\fR,
+\fBTYPE_IPV4\fR,
+\fBTYPE_NUMERIC\fR,
+\fBTYPE_REGEXP\fR
+\- form system global variables
+.ad
+.hy
+.SH SYNOPSIS
+.nf
+\fB#include <form.h>\fR
+.br
+.PP
+\fBFIELDTYPE * TYPE_ALNUM;\fR
+\fBFIELDTYPE * TYPE_ALPHA;\fR
+\fBFIELDTYPE * TYPE_ENUM;\fR
+\fBFIELDTYPE * TYPE_INTEGER;\fR
+\fBFIELDTYPE * TYPE_IPV4;\fR
+\fBFIELDTYPE * TYPE_NUMERIC;\fR
+\fBFIELDTYPE * TYPE_REGEXP;\fR
+.br
+.fi
+.SH DESCRIPTION
+These are building blocks for the form library,
+defining fields that can be created using \fBset_fieldtype\fP(3X).
+Each provides functions for field- and character-validation,
+according to the given datatype.
+.SS TYPE_ALNUM
+This holds alphanumeric data.
+.SS TYPE_ALPHA
+This holds alphabetic data.
+.SS TYPE_ENUM
+This holds an enumerated type.
+.SS TYPE_INTEGER
+This holds a decimal integer.
+.SS TYPE_IPV4
+This holds an IPv4 internet address, e.g., "127.0.0.1".
+.SS TYPE_NUMERIC
+This holds a decimal number, with optional sign and decimal point.
+.SS TYPE_REGEXP
+This holds a regular expression.
+.SH PORTABILITY
+The \fBTYPE_IPV4\fP variable is an extension not provided by older
+implementations of the form library.
+.SH SEE ALSO
+\fBform\fR(3X).
diff --git a/man/form_win.3x b/man/form_win.3x
index c8f64f2e04ad..32af49b68040 100644
--- a/man/form_win.3x
+++ b/man/form_win.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_win.3x,v 1.10 2006/11/04 17:12:00 tom Exp $
+.\" $Id: form_win.3x,v 1.13 2010/12/04 18:38:55 tom Exp $
.TH form_win 3X ""
.SH NAME
-\fBform_win\fR - make and break form window and subwindow associations
+\fBform_win\fR \- make and break form window and subwindow associations
.SH SYNOPSIS
\fB#include <form.h>\fR
.br
@@ -77,7 +77,9 @@ The form has already been posted.
.B E_NOT_CONNECTED
No items are connected to the form.
.SH SEE ALSO
-\fBcurses\fR(3X), \fBform\fR(3X).
+\fBcurses\fR(3X),
+\fBcurs_variables\fR(3X),
+\fBform\fR(3X).
.SH NOTES
The header file \fB<form.h>\fR automatically includes the header file
\fB<curses.h>\fR.
@@ -87,9 +89,3 @@ 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/man/infocmp.1m b/man/infocmp.1m
index b1a88e76723b..bfc3cc315c14 100644
--- a/man/infocmp.1m
+++ b/man/infocmp.1m
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,14 +27,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: infocmp.1m,v 1.44 2006/12/24 18:16:31 tom Exp $
+.\" $Id: infocmp.1m,v 1.46 2010/12/04 18:40:45 tom Exp $
.TH @INFOCMP@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
-\fB@INFOCMP@\fR - compare or print out \fIterminfo\fR descriptions
+\fB@INFOCMP@\fR \- compare or print out \fIterminfo\fR descriptions
.SH SYNOPSIS
-\fB@INFOCMP@\fR [\fB-\
+\fB@INFOCMP@\fR [\fB\-\
1\
C\
E\
@@ -60,9 +60,9 @@ u\
x\
\fR]
.br
- [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB-R \fR\fBsubset\fR]
+ [\fB\-v\fR \fIn\fR] [\fB\-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR] [\fB\-R \fR\fBsubset\fR]
.br
- [\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR]
+ [\fB\-w\fR\ \fIwidth\fR] [\fB\-A\fR\ \fIdirectory\fR] [\fB\-B\fR\ \fIdirectory\fR]
.br
[\fItermname\fR...]
.SH DESCRIPTION
@@ -74,45 +74,45 @@ fields will be printed first, followed by the numeric fields, followed by the
string fields.
.SS Default Options
If no options are specified and zero or one \fItermnames\fR are specified, the
-\fB-I\fR option will be assumed. If more than one \fItermname\fR is specified,
-the \fB-d\fR option will be assumed.
-.SS Comparison Options [-d] [-c] [-n]
+\fB\-I\fR option will be assumed. If more than one \fItermname\fR is specified,
+the \fB\-d\fR option will be assumed.
+.SS Comparison Options [\-d] [\-c] [\-n]
\fB@INFOCMP@\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
+\fBF\fR for boolean variables, \fB\-1\fR for integer variables, and \fBNULL\fR
for string variables.
.PP
-The \fB-d\fR option produces a list of each capability that is different
+The \fB\-d\fR option produces a list of each capability that is different
between two entries. This option is useful to show the difference between two
entries, created by different people, for the same or similar terminals.
.PP
-The \fB-c\fR option produces a list of each capability that is common between
+The \fB\-c\fR option produces a list of each capability that is common between
two entries. Capabilities that are not set are ignored. This option can be
-used as a quick check to see if the \fB-u\fR option is worth using.
+used as a quick check to see if the \fB\-u\fR option is worth using.
.PP
-The \fB-n\fR option produces a list of each capability that is in neither
+The \fB\-n\fR option produces a list of each capability that is in neither
entry. If no \fItermnames\fR are given, the environment variable \fBTERM\fR
will be used for both of the \fItermnames\fR. This can be used as a quick
check to see if anything was left out of a description.
-.SS Source Listing Options [-I] [-L] [-C] [-r]
-The \fB-I\fR, \fB-L\fR, and \fB-C\fR options will produce a source listing for
+.SS Source Listing Options [\-I] [\-L] [\-C] [\-r]
+The \fB\-I\fR, \fB\-L\fR, and \fB\-C\fR options will produce a source listing for
each terminal named.
.
.TS
center tab(/) ;
l l .
-\fB-I\fR/use the \fBterminfo\fR names
-\fB-L\fR/use the long C variable name listed in <\fBterm.h\fR>
-\fB-C\fR/use the \fBtermcap\fR names
-\fB-r\fR/when using \fB-C\fR, put out all capabilities in \fBtermcap\fR form
+\fB\-I\fR/use the \fBterminfo\fR names
+\fB\-L\fR/use the long C variable name listed in <\fBterm.h\fR>
+\fB\-C\fR/use the \fBtermcap\fR names
+\fB\-r\fR/when using \fB\-C\fR, put out all capabilities in \fBtermcap\fR form
.TE
.PP
If no \fItermnames\fR are given, the environment variable \fBTERM\fR will be
used for the terminal name.
.PP
-The source produced by the \fB-C\fR option may be used directly as a
+The source produced by the \fB\-C\fR option may be used directly as a
\fBtermcap\fR entry, but not all parameterized strings can be changed to
the \fBtermcap\fR format. \fB@INFOCMP@\fR will attempt to convert most of the
parameterized information, and anything not converted will be plainly marked in
@@ -125,7 +125,7 @@ padding (padding information with a trailing '/') will become optional.
All \fBtermcap\fR variables no longer supported by \fBterminfo\fR, but which
are derivable from other \fBterminfo\fR variables, will be output. Not all
\fBterminfo\fR capabilities will be translated; only those variables which were
-part of \fBtermcap\fR will normally be output. Specifying the \fB-r\fR option
+part of \fBtermcap\fR will normally be output. Specifying the \fB\-r\fR option
will take off this restriction, allowing all capabilities to be output in
\fItermcap\fR form.
.PP
@@ -153,8 +153,8 @@ l l l.
\fB%p1%?%'x'%>%t%p1%'y'%+%;/%>xy\fR/concept
\fB%p2\fR is printed before \fB%p1/%r\fR/hp
.TE
-.SS Use= Option [-u]
-The \fB-u\fR option produces a \fBterminfo\fR source description of the first
+.SS Use= Option [\-u]
+The \fB\-u\fR option produces a \fBterminfo\fR source description of the first
terminal \fItermname\fR which is relative to the sum of the descriptions given
by the entries for the other terminals \fItermnames\fR. It does this by
analyzing the differences between the first \fItermname\fR and the other
@@ -189,29 +189,29 @@ Another error that does not cause incorrect compiled files, but will slow down
the compilation time, is specifying extra \fBuse=\fR fields that are
superfluous. \fB@INFOCMP@\fR will flag any other \fItermname use=\fR fields that
were not needed.
-.SS Changing Databases [-A \fIdirectory\fR] [-B \fIdirectory\fR]
+.SS Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR]
The location of the compiled \fBterminfo\fR database is taken from the
environment variable \fBTERMINFO\fR . If the variable is not defined, or the
terminal is not found in that location, the system \fBterminfo\fR database,
-in \fB@TERMINFO@\fR, will be used. The options \fB-A\fR
-and \fB-B\fR may be used to override this location. The \fB-A\fR option will
-set \fBTERMINFO\fR for the first \fItermname\fR and the \fB-B\fR option will
+in \fB@TERMINFO@\fR, will be used. The options \fB\-A\fR
+and \fB\-B\fR may be used to override this location. The \fB\-A\fR option will
+set \fBTERMINFO\fR for the first \fItermname\fR and the \fB\-B\fR option will
set \fBTERMINFO\fR for the other \fItermnames\fR. With this, it is possible to
compare descriptions for a terminal with the same name located in two different
databases. This is useful for comparing descriptions for the same terminal
created by different people.
.SS Other Options
.TP 5
-\fB-1\fR
+\fB\-1\fR
causes the fields to be printed out one to a line. Otherwise,
the fields will be printed several to a line to a maximum width
of 60 characters.
.TP
-\fB-a\fR
+\fB\-a\fR
tells \fB@INFOCMP@\fP to retain commented-out capabilities rather than discarding
them. Capabilities are commented by prefixing them with a period.
.TP 5
-\fB-E\fR
+\fB\-E\fR
Dump the capabilities of the given terminal as tables, needed in
the C initializer for a
TERMTYPE structure (the terminal capability structure in the \fB<term.h>\fR).
@@ -220,17 +220,17 @@ for a given terminal type.
The tables are all declared static, and are named according to the type
and the name of the corresponding terminal entry.
.sp
-Before ncurses 5.0, the split between the \fB-e\fP and \fB-E\fP
+Before ncurses 5.0, the split between the \fB\-e\fP and \fB\-E\fP
options was not needed; but support for extended names required making
the arrays of terminal capabilities separate from the TERMTYPE structure.
.TP 5
-\fB-e\fR
+\fB\-e\fR
Dump the capabilities of the given terminal as a C initializer for a
TERMTYPE structure (the terminal capability structure in the \fB<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
+\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.
@@ -239,25 +239,25 @@ the other file, and entries with more than one match. For entries
with exactly one match it includes a difference report. Normally,
to reduce the volume of the report, use references are
not resolved before looking for differences, but resolution can be forced
-by also specifying \fB-r\fR.
+by also specifying \fB\-r\fR.
.TP 5
-\fB-f\fR
+\fB\-f\fR
Display complex terminfo strings which contain if/then/else/endif expressions
indented for readability.
.TP 5
-\fB-G\fR
+\fB\-G\fR
Display constant literals in decimal form
rather than their character equivalents.
.TP 5
-\fB-g\fR
+\fB\-g\fR
Display constant character literals in quoted form
rather than their decimal equivalents.
.TP 5
-\fB-i\fR
+\fB\-i\fR
Analyze the initialization (\fBis1\fR, \fBis2\fR, \fBis3\fR), and reset
(\fBrs1\fR, \fBrs2\fR, \fBrs3\fR), strings in the entry. For each string, the
code tries to analyze it into actions in terms of the other capabilities in the
-entry, certain X3.64/ISO 6429/ECMA-48 capabilities, and certain DEC VT-series
+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
@@ -291,38 +291,38 @@ 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
+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
+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).
+REVERSE. All but NORMAL may be prefixed with `+' (turn on) or `\-' (turn off).
.PP
An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}).
.TP 5
-\fB-l\fR
+\fB\-l\fR
Set output format to terminfo.
.TP 5
-\fB-p\fR
+\fB\-p\fR
Ignore padding specifications when comparing strings.
.TP 5
-\fB-q\fR
+\fB\-q\fR
Make the comparison listing shorter by omitting subheadings, and using
-"-" for absent capabilities, "@" for canceled rather than "NULL".
+"\-" for absent capabilities, "@" for canceled rather than "NULL".
.TP 5
-\fB-R\fR\fIsubset\fR
+\fB\-R\fR\fIsubset\fR
Restrict output to a given subset. This option is for use with archaic
versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
the full set of SVR4/XSI Curses terminfo; and variants such as AIX
@@ -331,8 +331,8 @@ subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for
details. You can also choose the subset "BSD" which selects only capabilities
with termcap equivalents recognized by 4.4BSD.
.TP
-\fB-s \fR\fI[d|i|l|c]\fR
-The \fB-s\fR option sorts the fields within each type according to the argument
+\fB\-s \fR\fI[d|i|l|c]\fR
+The \fB\-s\fR option sorts the fields within each type according to the argument
below:
.br
.RS 5
@@ -350,70 +350,70 @@ sort by the long C variable name.
sort by the \fItermcap\fR name.
.RE
.IP
-If the \fB-s\fR option is not given, the fields printed out will be
+If the \fB\-s\fR option is not given, the fields printed out will be
sorted alphabetically by the \fBterminfo\fR name within each type,
-except in the case of the \fB-C\fR or the \fB-L\fR options, which cause the
+except in the case of the \fB\-C\fR or the \fB\-L\fR options, which cause the
sorting to be done by the \fBtermcap\fR name or the long C variable
name, respectively.
.TP 5
-\fB-T\fR
+\fB\-T\fR
eliminates size-restrictions on the generated text.
This is mainly useful for testing and analysis, since the compiled
descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
.TP
-\fB-t\fR
+\fB\-t\fR
tells \fBtic\fP to discard commented-out capabilities.
Normally when translating from terminfo to termcap,
untranslatable capabilities are commented-out.
.TP 5
-\fB-U\fR
+\fB\-U\fR
tells \fB@INFOCMP@\fP to not post-process the data after parsing the source file.
This feature helps when comparing the actual contents of two source files,
since it excludes the inferences that \fB@INFOCMP@\fP makes to fill in missing
data.
.TP 5
-\fB-V\fR
+\fB\-V\fR
reports the version of ncurses which was used in this program, and exits.
.TP 5
-\fB-v\fR \fIn\fR
+\fB\-v\fR \fIn\fR
prints out tracing information on standard error as the program runs.
Higher values of n induce greater verbosity.
.TP 5
-\fB-w\fR \fIwidth\fR
+\fB\-w\fR \fIwidth\fR
changes the output to \fIwidth\fR characters.
.TP
-\fB-x\fR
+\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.
+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
+\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.
.PP
-The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's.
+The \fB\-r\fR option's notion of `termcap' capabilities is System V Release 4's.
Actual BSD curses versions will have a more restricted set. To see only the
-4.4BSD set, use \fB-r\fR \fB-RBSD\fR.
+4.4BSD set, use \fB\-r\fR \fB\-RBSD\fR.
.SH BUGS
-The \fB-F\fR option of \fB@INFOCMP@\fR(1M) should be a \fB@TOE@\fR(1M) mode.
+The \fB\-F\fR option of \fB@INFOCMP@\fR(1M) should be a \fB@TOE@\fR(1M) mode.
.SH SEE ALSO
\fB@CAPTOINFO@\fR(1M),
\fB@INFOTOCAP@\fR(1M),
@@ -429,9 +429,3 @@ 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/man/infotocap.1m b/man/infotocap.1m
index 19160b449561..d9b44f0e25b9 100644
--- a/man/infotocap.1m
+++ b/man/infotocap.1m
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1999-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1999-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,40 +27,42 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: infotocap.1m,v 1.8 2006/12/24 20:13:56 tom Exp $
+.\" $Id: infotocap.1m,v 1.11 2010/12/04 18:38:55 tom Exp $
.TH @INFOTOCAP@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
-\fB@INFOTOCAP@\fR - convert a \fIterminfo\fR description into a \fItermcap\fR description
+\fB@INFOTOCAP@\fR \- convert a \fIterminfo\fR description into a \fItermcap\fR description
.SH SYNOPSIS
-\fB@INFOTOCAP@\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . .
+\fB@INFOTOCAP@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . .
.SH DESCRIPTION
-\fB@INFOTOCAP@\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
+\fB@INFOTOCAP@\fR looks in each given text
+\fIfile\fR for \fBterminfo\fR descriptions.
+For each terminfo description found,
+an equivalent \fBtermcap\fR description is written to standard output.
+Terminfo \fBuse\fR capabilities are translated directly to termcap
\fBtc\fR capabilities.
.TP 5
-\fB-v\fR
+\fB\-v\fR
print out tracing information on standard error as the program runs.
.TP 5
-\fB-V\fR
+\fB\-V\fR
print out the version of the program in use on standard error and exit.
.TP 5
-\fB-1\fR
-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.
+\fB\-1\fR
+cause the fields to print out one to a line.
+Otherwise, the fields
+will be printed several to a line to a maximum width of 60 characters.
.TP 5
-\fB-w\fR
+\fB\-w\fR
change the output to \fIwidth\fR characters.
.SH FILES
.TP 20
\*d
Compiled terminal description database.
.SH NOTES
-This utility is actually a link to \fI@TIC@\fR, running in \fI-C\fR mode.
-You can use other \fI@TIC@\fR options such as \fB-f\fR and \fB-x\fR.
+This utility is actually a link to \fI@TIC@\fR, running in \fI\-C\fR mode.
+You can use other \fI@TIC@\fR options such as \fB\-f\fR and \fB\-x\fR.
.SH SEE ALSO
\fBcurses\fR(3X),
\fB@TIC@\fR(1M),
@@ -69,9 +71,8 @@ You can use other \fI@TIC@\fR options such as \fB-f\fR and \fB-x\fR.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
diff --git a/man/key_defined.3x b/man/key_defined.3x
index d7413da6fe35..db6c531af0e3 100644
--- a/man/key_defined.3x
+++ b/man/key_defined.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2003-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2003-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey 2003
.\"
-.\" $Id: key_defined.3x,v 1.4 2006/02/25 21:50:01 tom Exp $
+.\" $Id: key_defined.3x,v 1.6 2010/12/04 18:40:45 tom Exp $
.TH key_defined 3X ""
.SH NAME
\fBkey_defined\fP \- check if a keycode is defined
@@ -43,7 +43,7 @@ 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.
+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
@@ -52,9 +52,3 @@ any code depending on them be conditioned using NCURSES_VERSION.
\fBdefine_key\fR(3X).
.SH AUTHOR
Thomas Dickey.
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/keybound.3x b/man/keybound.3x
index 53c941bd62a3..5dd083afe1ab 100644
--- a/man/keybound.3x
+++ b/man/keybound.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1999-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey 1999
.\"
-.\" $Id: keybound.3x,v 1.7 2008/12/13 18:19:07 Frederic.Culot Exp $
+.\" $Id: keybound.3x,v 1.8 2010/12/04 18:49:20 tom Exp $
.TH keybound 3X ""
.SH NAME
\fBkeybound\fP \- return definition of keycode
@@ -56,9 +56,3 @@ any code depending on them be conditioned using NCURSES_VERSION.
\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/man/keyok.3x b/man/keyok.3x
index 08c2a27778ea..8eaf9a3c99cf 100644
--- a/man/keyok.3x
+++ b/man/keyok.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey 1997
.\"
-.\" $Id: keyok.3x,v 1.9 2006/02/25 21:47:06 tom Exp $
+.\" $Id: keyok.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH keyok 3X ""
.SH NAME
\fBkeyok\fP \- enable or disable a keycode
@@ -40,7 +40,7 @@
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.
+Keys that have been disabled can be re-enabled.
.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.
@@ -55,9 +55,3 @@ any code depending on them be conditioned using NCURSES_VERSION.
\fBdefine_key\fR(3X).
.SH AUTHOR
Thomas Dickey.
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/legacy_coding.3x b/man/legacy_coding.3x
index 42c49fe5e96c..fabb607a572e 100644
--- a/man/legacy_coding.3x
+++ b/man/legacy_coding.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 2005-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
.\"
.\" Author: Thomas E. Dickey
.\"
-.\" $Id: legacy_coding.3x,v 1.3 2006/12/24 15:12:55 tom Exp $
+.\" $Id: legacy_coding.3x,v 1.4 2010/12/04 18:49:20 tom Exp $
.TH legacy_coding 3X ""
.SH NAME
\fBuse_legacy_coding\fR \- use terminal's default colors
@@ -74,9 +74,3 @@ be conditioned using NCURSES_VERSION.
\fBunctrl\fR.
.SH AUTHOR
Thomas Dickey (to support lynx's font-switching feature).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/man_db.renames b/man/man_db.renames
index ff91eecc4e22..e98fd69d6251 100644
--- a/man/man_db.renames
+++ b/man/man_db.renames
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: man_db.renames,v 0.41 2008/10/25 23:24:03 tom Exp $
+# $Id: man_db.renames,v 1.47 2010/09/18 15:43:20 tom Exp $
# Manual-page renamings for the man_db program
#
# Files:
@@ -82,6 +82,7 @@ curs_scanw.3x scanw.3ncurses
curs_scr_dump.3x scr_dump.3ncurses
curs_scroll.3x scroll.3ncurses
curs_slk.3x slk.3ncurses
+curs_sp_funcs.3x sp_funcs.3ncurses
curs_termattrs.3x termattrs.3ncurses
curs_termcap.3x termcap.3ncurses
curs_terminfo.3x terminfo.3ncurses
@@ -89,6 +90,7 @@ curs_threads.3x threads.3ncurses
curs_touch.3x touch.3ncurses
curs_trace.3x trace.3ncurses
curs_util.3x util.3ncurses
+curs_variables.3x curses_variables.3ncurses
curs_window.3x window.3ncurses
curses.3x ncurses.3ncurses
default_colors.3x default_colors.3ncurses
@@ -115,6 +117,7 @@ form_page.3x page.3form
form_post.3x post.3form
form_requestname.3x requestname.3form
form_userptr.3x userptr.3form
+form_variables.3x form_variables.3form
form_win.3x win.3form
infocmp.1m infocmp.1
infotocap.1m infotocap.1
@@ -152,8 +155,10 @@ putc.3s putc.3
resizeterm.3x resizeterm.3ncurses
scanf.3s scanf.3
system.3s system.3
+tabs.1 tabs.1
term.5 term.5
term.7 term.7
+term_variables.3x terminfo_variables.3ncurses
terminfo.5 terminfo.5
terminfo.\\\*n terminfo.5
tic.1m tic.1
@@ -174,4 +179,15 @@ system.3 system.3
regcomp.3x regcomp.3
regexec.3x regexec.3
#
+# Generated:
+adacurses-config.1 adacurses-config.1
+#
+ncurses5-config.1 ncurses5-config.1
+ncursesw5-config.1 ncursesw5-config.1
+#
+ncurses6-config.1 ncurses6-config.1
+ncursesw6-config.1 ncursesw6-config.1
+ncursest6-config.1 ncursest6-config.1
+ncurseswt6-config.1 ncurseswt6-config.1
+#
# vile:cfgmode
diff --git a/man/menu.3x b/man/menu.3x
index 17d6fc120cba..ff3a19c04333 100644
--- a/man/menu.3x
+++ b/man/menu.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu.3x,v 1.19 2006/11/04 18:38:29 tom Exp $
+.\" $Id: menu.3x,v 1.21 2010/12/04 18:40:45 tom Exp $
.TH menu 3X ""
.SH NAME
-\fBmenu\fR - curses extension for programming menus
+\fBmenu\fR \- curses extension for programming menus
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -43,7 +43,7 @@ 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.
+\fB\-lmenu \-lcurses\fR.
.
.SS Current Default Values for Item Attributes
.
@@ -174,7 +174,7 @@ The header file \fB<menu.h>\fR automatically includes the header files
\fB<curses.h>\fR and \fB<eti.h>\fR.
.PP
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
+you want to say `\-lmenu \-lncurses', not the other way around (which would
usually give a link-error).
.SH PORTABILITY
These routines emulate the System V menu library. They were not supported on
@@ -185,9 +185,3 @@ S. Raymond.
.SH SEE ALSO
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/menu_attributes.3x b/man/menu_attributes.3x
index 505edbcd4dc0..c33059b9948f 100644
--- a/man/menu_attributes.3x
+++ b/man/menu_attributes.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_attributes.3x,v 1.10 2008/08/23 18:24:23 tom Exp $
+.\" $Id: menu_attributes.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH menu_attributes 3X ""
.SH NAME
-\fBmenu_attributes\fR - color and attribute control for menus
+\fBmenu_attributes\fR \- color and attribute control for menus
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -92,9 +92,3 @@ 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/man/menu_cursor.3x b/man/menu_cursor.3x
index 4ade0bf96269..66a835be58c8 100644
--- a/man/menu_cursor.3x
+++ b/man/menu_cursor.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_cursor.3x,v 1.6 2006/11/04 17:13:57 tom Exp $
+.\" $Id: menu_cursor.3x,v 1.8 2010/12/04 18:40:45 tom Exp $
.TH menu_cursor 3X ""
.SH NAME
-\fBmenu_cursor\fR - position a menu's cursor
+\fBmenu_cursor\fR \- position a menu's cursor
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -65,9 +65,3 @@ 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/man/menu_driver.3x b/man/menu_driver.3x
index 5366040c18af..1fe5001fec05 100644
--- a/man/menu_driver.3x
+++ b/man/menu_driver.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_driver.3x,v 1.15 2008/06/21 21:55:30 tom Exp $
+.\" $Id: menu_driver.3x,v 1.20 2010/12/04 18:38:55 tom Exp $
.TH menu_driver 3X ""
+.de bP
+.IP \(bu 4
+..
.SH NAME
-\fBmenu_driver\fR - command-processing loop of the menu system
+\fBmenu_driver\fR \- command-processing loop of the menu system
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -38,18 +41,15 @@ int menu_driver(MENU *menu, int c);
.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:
-.TP 3
--
+.bP
The input is a form navigation request.
Navigation request codes are constants defined in \fB<form.h>\fP,
which are distinct from the key- and character codes returned by \fBwgetch\fP.
-.TP 3
--
+.bP
The input is a printable character.
Printable characters (which must be positive, less than 256) are
checked according to the program's locale settings.
-.TP 3
--
+.bP
The input is the KEY_MOUSE special key associated with an mouse event.
.PP
The menu driver requests are as follows:
@@ -116,36 +116,29 @@ 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
+Currently only clicks in the user window (e.g., inside the menu display
area or the decoration window) are handled.
.PP
If you click above the display region of the menu:
-.RS
-.TP
+.bP
a REQ_SCR_ULINE is generated for a single click,
-.TP
+.bP
a REQ_SCR_UPAGE is generated for a double-click and
-.TP
+.bP
a REQ_FIRST_ITEM is generated for a triple-click.
-.RE
.PP
If you click below the display region of the menu:
-.RS
-.TP
+.bP
a REQ_SCR_DLINE is generated for a single click,
-.TP
+.bP
a REQ_SCR_DPAGE is generated for a double-click and
-.TP
+.bP
a REQ_LAST_ITEM is generated for a triple-click.
-.RE
.PP
If you click at an item inside the display area of the menu:
-.RS
-.TP 3
--
+.bP
the menu cursor is positioned to that item.
-.TP 3
--
+.bP
If you double-click an item a REQ_TOGGLE_ITEM
is generated and \fBE_UNKNOWN_COMMAND\fR is returned.
This return value makes sense,
@@ -153,11 +146,9 @@ because a double click usually means that an item-specific action should
be returned.
It is exactly the purpose of this return value to signal that an
application specific command should be executed.
-.TP 3
--
+.bP
If a translation
into a request was done, \fBmenu_driver\fR returns the result of this request.
-.RE
.PP
If you clicked outside the user window or the mouse event could not be translated
into a menu request an \fBE_REQUEST_DENIED\fR is returned.
@@ -197,7 +188,7 @@ The menu driver could not process the request.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBmenu\fR(3X),
-\fBwgetch\fR(3X).
+\fBgetch\fR(3X).
.SH NOTES
The header file \fB<menu.h>\fR automatically includes the header files
\fB<curses.h>\fR.
@@ -207,9 +198,3 @@ 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/man/menu_format.3x b/man/menu_format.3x
index f4d456f6f960..b9a572b01774 100644
--- a/man/menu_format.3x
+++ b/man/menu_format.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_format.3x,v 1.10 2006/11/04 17:12:00 tom Exp $
+.\" $Id: menu_format.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH menu_format 3X ""
.SH NAME
-\fBmenu_format\fR - set and get menu sizes
+\fBmenu_format\fR \- set and get menu sizes
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -79,9 +79,3 @@ 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/man/menu_hook.3x b/man/menu_hook.3x
index 204e1ec41500..1fd74de77935 100644
--- a/man/menu_hook.3x
+++ b/man/menu_hook.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_hook.3x,v 1.9 2007/02/24 17:34:08 tom Exp $
+.\" $Id: menu_hook.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH menu_hook 3X ""
.SH NAME
-\fBmenu_hook\fR - set hooks for automatic invocation by applications
+\fBmenu_hook\fR \- set hooks for automatic invocation by applications
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -93,9 +93,3 @@ 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/man/menu_items.3x b/man/menu_items.3x
index 091534385368..a9c578346485 100644
--- a/man/menu_items.3x
+++ b/man/menu_items.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_items.3x,v 1.7 2006/11/04 18:35:31 tom Exp $
+.\" $Id: menu_items.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH menu_items 3X ""
.SH NAME
-\fBmenu_items\fR - make and break connections between items and menus
+\fBmenu_items\fR \- make and break connections between items and menus
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -81,13 +81,7 @@ These routines emulate the System V menu library. They were not supported on
Version 7 or BSD versions.
.PP
The SVr4 menu library documentation specifies the \fBitem_count\fR error value
-as -1 (which is the value of \fBERR\fR).
+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/man/menu_mark.3x b/man/menu_mark.3x
index 1db2b3ee1974..1425154b8dc4 100644
--- a/man/menu_mark.3x
+++ b/man/menu_mark.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_mark.3x,v 1.9 2006/11/04 18:33:18 tom Exp $
+.\" $Id: menu_mark.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH menu_mark 3X ""
.SH NAME
-\fBmenu_mark\fR - get and set the menu mark string
+\fBmenu_mark\fR \- get and set the menu mark string
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -48,7 +48,7 @@ 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.
.PP
-The default string is "-" (a dash). Calling \fBset_menu_mark\fR with
+The default string is "\-" (a dash). Calling \fBset_menu_mark\fR with
a non-\fBNULL\fR menu argument will change this default.
.PP
The function \fBmenu_mark\fR returns the menu's mark string (or \fBNULL\fR if
@@ -78,9 +78,3 @@ 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/man/menu_new.3x b/man/menu_new.3x
index c2b98e499055..11976547fc75 100644
--- a/man/menu_new.3x
+++ b/man/menu_new.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_new.3x,v 1.9 2006/11/04 18:31:37 tom Exp $
+.\" $Id: menu_new.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH menu_new 3X ""
.SH NAME
-\fBmenu_new\fR - create and destroy menus
+\fBmenu_new\fR \- create and destroy menus
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -78,9 +78,3 @@ 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/man/menu_opts.3x b/man/menu_opts.3x
index dc927c47700c..5f4cb0806b3e 100644
--- a/man/menu_opts.3x
+++ b/man/menu_opts.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_opts.3x,v 1.10 2007/02/24 17:33:59 tom Exp $
+.\" $Id: menu_opts.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH menu_opts 3X ""
.SH NAME
-\fBmenu_opts\fR - set and get menu options
+\fBmenu_opts\fR \- set and get menu options
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -96,9 +96,3 @@ 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/man/menu_pattern.3x b/man/menu_pattern.3x
index 3cde165b78c5..e63a9f73d84c 100644
--- a/man/menu_pattern.3x
+++ b/man/menu_pattern.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_pattern.3x,v 1.11 2008/06/21 21:58:20 tom Exp $
+.\" $Id: menu_pattern.3x,v 1.13 2010/12/04 18:40:45 tom Exp $
.TH menu_pattern 3X ""
.SH NAME
-\fBmenu_pattern\fR - get and set a menu's pattern buffer
+\fBmenu_pattern\fR \- get and set a menu's pattern buffer
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -83,9 +83,3 @@ 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/man/menu_post.3x b/man/menu_post.3x
index e47facc9e4d9..d09d0ca4fe88 100644
--- a/man/menu_post.3x
+++ b/man/menu_post.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_post.3x,v 1.9 2006/11/04 17:12:00 tom Exp $
+.\" $Id: menu_post.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH menu_post 3X ""
.SH NAME
-\fBmenu_post\fR - write or erase menus from associated subwindows
+\fBmenu_post\fR \- write or erase menus from associated subwindows
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -83,9 +83,3 @@ 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/man/menu_requestname.3x b/man/menu_requestname.3x
index 1345aa784851..d1957a2f1cd5 100644
--- a/man/menu_requestname.3x
+++ b/man/menu_requestname.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_requestname.3x,v 1.7 2006/11/04 17:56:09 tom Exp $
+.\" $Id: menu_requestname.3x,v 1.9 2010/12/04 18:40:45 tom Exp $
.TH menu_requestname 3X ""
.SH NAME
-\fBmenu_requestname\fR - handle printable menu request names
+\fBmenu_requestname\fR \- handle printable menu request names
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -63,9 +63,3 @@ 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/man/menu_spacing.3x b/man/menu_spacing.3x
index dfe03a8a55b1..9e7c3eabfe92 100644
--- a/man/menu_spacing.3x
+++ b/man/menu_spacing.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2001,2004 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_spacing.3x,v 1.8 2004/12/11 23:39:07 tom Exp $
+.\" $Id: menu_spacing.3x,v 1.12 2010/12/04 18:38:55 tom Exp $
.TH menu_spacing 3X ""
.SH NAME
-\fBmenu_spacing\fR - Control spacing between menu items.
+\fBmenu_spacing\fR \- Control spacing between menu items.
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -45,40 +45,44 @@ int menu_spacing(const MENU *menu,
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
+The function \fBset_menu_spacing\fR sets the spacing information for the menu.
+Its parameter \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 the blank lines between item rows, these lines
+The \fBspc_rows\fR parameter controls the number of rows that are used for an item.
+It must not be larger than 3.
+The menu system inserts the 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.
+The \fBspc_columns\fR parameter 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
+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
+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).
+\fBcurses\fR(3X),
+\fBcurs_variables\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
+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:
+Juergen Pfeifer.
+Manual pages and adaptation for new curses by Eric S. Raymond.
diff --git a/man/menu_userptr.3x b/man/menu_userptr.3x
index b7be2adcd8d0..0455fe3a0380 100644
--- a/man/menu_userptr.3x
+++ b/man/menu_userptr.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_userptr.3x,v 1.8 2006/11/04 18:21:03 tom Exp $
+.\" $Id: menu_userptr.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH menu_userptr 3X ""
.SH NAME
-\fBmenu_userptr\fR - associate application data with a menu item
+\fBmenu_userptr\fR \- associate application data with a menu item
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -61,9 +61,3 @@ We chose not to 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/man/menu_win.3x b/man/menu_win.3x
index aa356e18de7e..774eafa9fdf5 100644
--- a/man/menu_win.3x
+++ b/man/menu_win.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu_win.3x,v 1.8 2006/11/04 17:12:00 tom Exp $
+.\" $Id: menu_win.3x,v 1.11 2010/12/04 18:38:55 tom Exp $
.TH menu_win 3X ""
.SH NAME
-\fBmenu_win\fR - make and break menu window and subwindow associations
+\fBmenu_win\fR \- make and break menu window and subwindow associations
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -77,7 +77,9 @@ The menu has already been posted.
.B E_NOT_CONNECTED
No items are connected to the menu.
.SH SEE ALSO
-\fBcurses\fR(3X), \fBmenu\fR(3X).
+\fBcurses\fR(3X),
+\fBcurs_variables\fR(3X),
+\fBmenu\fR(3X).
.SH NOTES
The header file \fB<menu.h>\fR automatically includes the header file
\fB<curses.h>\fR.
@@ -87,9 +89,3 @@ 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/man/mitem_current.3x b/man/mitem_current.3x
index 979f401341fe..86c9b4775eaa 100644
--- a/man/mitem_current.3x
+++ b/man/mitem_current.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_current.3x,v 1.11 2006/11/04 18:18:19 tom Exp $
+.\" $Id: mitem_current.3x,v 1.13 2010/12/04 18:40:45 tom Exp $
.TH mitem_current 3X ""
.SH NAME
-\fBmitem_current\fR - set and get current_menu_item
+\fBmitem_current\fR \- set and get current_menu_item
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -90,13 +90,7 @@ These routines emulate the System V menu library. They were not supported on
Version 7 or BSD versions.
.PP
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).
+\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/man/mitem_name.3x b/man/mitem_name.3x
index 12009edace35..ff879e669776 100644
--- a/man/mitem_name.3x
+++ b/man/mitem_name.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_name.3x,v 1.6 2006/11/04 17:53:40 tom Exp $
+.\" $Id: mitem_name.3x,v 1.8 2010/12/04 18:40:45 tom Exp $
.TH mitem_name 3X ""
.SH NAME
-\fBmitem_name\fR - get menu item name and description fields
+\fBmitem_name\fR \- get menu item name and description fields
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -57,9 +57,3 @@ 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/man/mitem_new.3x b/man/mitem_new.3x
index c0fa6edcf64a..8e2449e2e208 100644
--- a/man/mitem_new.3x
+++ b/man/mitem_new.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_new.3x,v 1.10 2006/11/04 18:16:36 tom Exp $
+.\" $Id: mitem_new.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
.TH mitem_new 3X ""
.SH NAME
-\fBmitem_new\fR - create and destroy menu items
+\fBmitem_new\fR \- create and destroy menu items
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -82,9 +82,3 @@ 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/man/mitem_opts.3x b/man/mitem_opts.3x
index 2459dabfbae6..37ea552328f6 100644
--- a/man/mitem_opts.3x
+++ b/man/mitem_opts.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_opts.3x,v 1.9 2007/02/24 17:33:32 tom Exp $
+.\" $Id: mitem_opts.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH mitem_opts 3X ""
.SH NAME
-\fBmitem_opts\fR - set and get menu item options
+\fBmitem_opts\fR \- set and get menu item options
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -76,9 +76,3 @@ 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/man/mitem_userptr.3x b/man/mitem_userptr.3x
index 58951930244c..7b51ec50a655 100644
--- a/man/mitem_userptr.3x
+++ b/man/mitem_userptr.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_userptr.3x,v 1.9 2006/11/04 18:21:03 tom Exp $
+.\" $Id: mitem_userptr.3x,v 1.11 2010/12/04 18:40:45 tom Exp $
.TH mitem_userptr 3X ""
.SH NAME
-\fBmitem_userptr\fR - associate application data with a menu item
+\fBmitem_userptr\fR \- associate application data with a menu item
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -62,9 +62,3 @@ We chose not to 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/man/mitem_value.3x b/man/mitem_value.3x
index 748fd528675c..57cfc536750f 100644
--- a/man/mitem_value.3x
+++ b/man/mitem_value.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_value.3x,v 1.8 2006/11/04 17:12:00 tom Exp $
+.\" $Id: mitem_value.3x,v 1.10 2010/12/04 18:40:45 tom Exp $
.TH mitem_value 3X ""
.SH NAME
-\fBmitem_value\fR - set and get menu item values
+\fBmitem_value\fR \- set and get menu item values
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -68,9 +68,3 @@ 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/man/mitem_visible.3x b/man/mitem_visible.3x
index 8f9039c2f6db..4ff9405483c9 100644
--- a/man/mitem_visible.3x
+++ b/man/mitem_visible.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: mitem_visible.3x,v 1.5 1998/11/29 01:12:55 Rick.Ohnemus Exp $
+.\" $Id: mitem_visible.3x,v 1.7 2010/12/04 18:40:45 tom Exp $
.TH mitem_visible 3X ""
.SH NAME
-\fBmitem_visible\fR - check visibility of a menu item
+\fBmitem_visible\fR \- check visibility of a menu item
.SH SYNOPSIS
\fB#include <menu.h>\fR
.br
@@ -51,9 +51,3 @@ 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/man/ncurses.3x b/man/ncurses.3x
index 703a239abfde..4acfc050101a 100644
--- a/man/ncurses.3x
+++ b/man/ncurses.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,13 +27,16 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: ncurses.3x,v 1.92 2008/10/25 23:31:45 tom Exp $
+.\" $Id: ncurses.3x,v 1.103 2011/02/05 23:21:29 tom Exp $
.hy 0
.TH ncurses 3X ""
+.de bP
+.IP \(bu 4
+..
.ds n 5
.ds d @TERMINFO@
.SH NAME
-\fBncurses\fR - CRT screen handling and optimization package
+\fBncurses\fR \- CRT screen handling and optimization package
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
@@ -46,7 +49,7 @@ is the approved replacement for
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.PP
-The \fBncurses\fR library emulates the \fBcurses\fR(3X) library of
+The \fBncurses\fR library emulates the curses library of
System V Release 4 UNIX,
and XPG4 (X/Open Portability Guide) curses (also known as XSI curses).
XSI stands for X/Open System Interfaces Extension.
@@ -60,10 +63,10 @@ The \fBncurses\fR library also provides many useful extensions,
i.e., features which cannot be implemented by a simple add-on library
but which require access to the internals of the library.
.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.
+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 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.
See also the section on \fBALTERNATE CONFIGURATIONS\fP.
@@ -80,7 +83,7 @@ That is normally done with \fBsetlocale\fP:
\fBsetlocale(LC_ALL, "");\fP
.sp
If the locale is not initialized,
-the library assumes that characters are printable as in ISO-8859-1,
+the library assumes that characters are printable as in ISO\-8859\-1,
to work with certain legacy programs.
You should initialize the locale and not rely on specific details of
the library when the locale has not been setup.
@@ -246,7 +249,7 @@ Each cell (row and column) in a \fBWINDOW\fP is stored as a \fBchtype\fP.
.TP 5
ncursesw
the so-called "wide" library, which handles multibyte characters
-(See the section on \fBALTERNATE CONFIGURATIONS\fP).
+(see the section on \fBALTERNATE CONFIGURATIONS\fP).
The "wide" library includes all of the calls from the "normal" library.
It adds about one third more calls using data types which store
multibyte characters:
@@ -256,7 +259,7 @@ multibyte characters:
corresponds to \fBchtype\fP.
However it is a structure, because more data is stored than can fit into
an integer.
-The characters are large enough to require a full integer value - and there
+The characters are large enough to require a full integer value \- and there
may be more than one character per cell.
The video attributes and color are stored in separate fields of the structure.
.IP
@@ -267,7 +270,7 @@ stores a "wide" character.
Like \fBchtype\fP, this may be an integer.
.TP 5
.B wint_t
-stores a \fBwchar_t\fP or \fBWEOF\fP - not the same, though both may have
+stores a \fBwchar_t\fP or \fBWEOF\fP \- not the same, though both may have
the same size.
.RE
.IP
@@ -756,6 +759,10 @@ 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.
+.IP
+Because this name is also used in development environments to represent
+the C compiler's name, \fBncurses\fR ignores it if it does not happen to
+be a single character.
.TP 5
COLUMNS
Specify the width of the screen in characters.
@@ -831,7 +838,7 @@ platforms:
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.
+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
@@ -841,7 +848,7 @@ terminal's default colors are white-on-black
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".
+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
@@ -911,7 +918,7 @@ During initialization, the \fBncurses\fR library
checks for special cases where VT100 line-drawing (and the corresponding
alternate character set capabilities) described in the terminfo are known
to be missing.
-Specifically, when running in a UTF-8 locale,
+Specifically, when running in a UTF\-8 locale,
the Linux console emulator and the GNU screen program ignore these.
Ncurses checks the TERM environment variable for these.
For other special cases, you should set this environment variable.
@@ -922,7 +929,29 @@ and is likely to work for terminal emulators.
.IP
When setting this variable, you should set it to a nonzero value.
Setting it to zero (or to a nonnumber)
-disables the special check for Linux and screen.
+disables the special check for "linux" and "screen".
+.IP
+As an alternative to the environment variable,
+ncurses checks for an extended terminfo capability \fBU8\fP.
+This is a numeric capability which can be compiled using \fBtic\ \-x\fP.
+For example
+.RS 5
+.sp
+.nf
+# linux console, if patched to provide working
+# VT100 shift-in/shift-out, with corresponding font.
+linux-vt100|linux console with VT100 line-graphics,
+ U8#0, use=linux,
+.sp
+# uxterm with vt100Graphics resource set to false
+xterm-utf8|xterm relying on UTF-8 line-graphics,
+ U8#1, use=xterm,
+.fi
+.RE
+.IP
+The name "U8" is chosen to be two characters,
+to permit it to be used by applications that use ncurses'
+termcap interface.
.TP 5
NCURSES_TRACE
During initialization, the \fBncurses\fR debugging library
@@ -956,20 +985,15 @@ 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
--
+.bP
the last directory to which \fBncurses\fR wrote, if any, is searched first
-.TP 3
--
+.bP
the directory specified by the TERMINFO symbol
-.TP 3
--
+.bP
$HOME/.terminfo
-.TP 3
--
+.bP
directories listed in the TERMINFO_DIRS symbol
-.TP 3
--
+.bP
one or more directories whose names are configured and compiled into the
ncurses library, e.g.,
@TERMINFO@
@@ -998,7 +1022,7 @@ depending on the configure script options used when building \fBncurses\fP.
There are a few main options whose effects are visible to the applications
developer using \fBncurses\fP:
.TP 5
---disable-overwrite
+\-\-disable\-overwrite
The standard include for \fBncurses\fP is as noted in \fBSYNOPSIS\fP:
.RS
.sp
@@ -1014,23 +1038,23 @@ a subdirectory, e.g.,
\fB#include <ncurses/curses.h>\fR
.RE
.IP
-It also omits a symbolic link which would allow you to use \fB-lcurses\fP
+It also omits a symbolic link which would allow you to use \fB\-lcurses\fP
to build executables.
.TP 5
---enable-widec
-The configure script renames the library and (if the \fB--disable-overwrite\fP
+\-\-enable\-widec
+The configure script renames the library and (if the \fB\-\-disable\-overwrite\fP
option is used) puts the header files in a different subdirectory.
All of the library names have a "w" appended to them,
i.e., instead of
.RS
.sp
-\fB-lncurses\fR
+\fB\-lncurses\fR
.RE
.IP
you link with
.RS
.sp
-\fB-lncursesw\fR
+\fB\-lncursesw\fR
.RE
.IP
You must also define \fB_XOPEN_SOURCE_EXTENDED\fP when compiling for the
@@ -1044,20 +1068,20 @@ the wide-character library's headers should be installed last,
to allow applications to be built using either library
from the same set of headers.
.TP 5
---with-shared
+\-\-with\-shared
.TP
---with-normal
+\-\-with\-normal
.TP
---with-debug
+\-\-with\-debug
.TP
---with-profile
+\-\-with\-profile
The shared and normal (static) library names differ by their suffixes,
e.g., \fBlibncurses.so\fP and \fBlibncurses.a\fP.
The debug and profiling libraries add a "_g" and a "_p" to the root
names respectively,
e.g., \fBlibncurses_g.a\fP and \fBlibncurses_p.a\fP.
.TP 5
---with-trace
+\-\-with\-trace
The \fBtrace\fP function normally resides in the debug library,
but it is sometimes useful to configure this in the shared library.
Configure scripts should check for the function's existence rather
@@ -1071,8 +1095,10 @@ terminal capability database
.SH SEE ALSO
\fBterminfo\fR(\*n) and related pages whose names begin "curs_" for detailed routine
descriptions.
+.br
+\fBcurs_variables\fR(3X)
.SH EXTENSIONS
-The \fBncurses\fR library can be compiled with an option (\fB-DUSE_GETCAP\fR)
+The \fBncurses\fR library can be compiled with an option (\fB\-DUSE_GETCAP\fR)
that falls back to the old-style /etc/termcap file if the terminal setup code
cannot find a terminfo entry corresponding to \fBTERM\fR.
Use of this feature
@@ -1098,7 +1124,7 @@ See the \fBdefine_key\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
+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
@@ -1119,29 +1145,35 @@ the XSI Curses and \fBncurses\fR calls) are described in \fBPORTABILITY\fR
sections of the library man pages.
.PP
This implementation also contains several extensions:
-.RS 5
-.PP
+.bP
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
+.bP
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
+.bP
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
+.bP
The routine \fBmcprint\fR was not present in any previous curses implementation.
See the \fBcurs_print\fR(3X) manual page for details.
-.PP
+.bP
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
+.bP
The WINDOW structure's internal details can be hidden from application
programs.
See \fBcurs_opaque\fR(3X) for the discussion of \fBis_scrollok\fR, etc.
-.RE
+.bP
+This implementation can be configured to provide rudimentary support
+for multi-threaded applications.
+See \fBcurs_threads\fR(3X) for details.
+.bP
+This implementation can also be configured to provide a set of functions which
+improve the ability to manage multiple screens.
+See \fBcurs_sp_funcs\fR(3X) 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
@@ -1160,9 +1192,3 @@ 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/man/panel.3x b/man/panel.3x
index 719a9e636bc5..25e2348e878d 100644
--- a/man/panel.3x
+++ b/man/panel.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,16 +26,16 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: panel.3x,v 1.14 2007/05/12 20:45:20 tom Exp $
+.\" $Id: panel.3x,v 1.17 2010/10/02 23:22:44 tom Exp $
.TH panel 3X ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
-panel - panel stack extension for curses
+panel \- panel stack extension for curses
.SH SYNOPSIS
\fB#include <panel.h>\fR
.P
-\fBcc [flags] sourcefiles -lpanel -lncurses\fR
+\fBcc [flags] sourcefiles \-lpanel \-lncurses\fR
.P
\fBPANEL *new_panel(WINDOW *win)\fR
.br
@@ -93,8 +93,10 @@ pointer to the new panel.
.B update_panels()
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
+physical screen.
+Use this function and not \fBwrefresh\fP or \fBwnoutrefresh\fP.
+.B 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
@@ -170,7 +172,7 @@ 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
+you want to say `\-lpanel \-lncurses', not the other way around (which would
usually give a link-error).
.SH FILES
.P
@@ -180,7 +182,8 @@ interface for the panels library
libpanel.a
the panels library itself
.SH SEE ALSO
-\fBcurses\fR(3X)
+\fBcurses\fR(3X),
+\fBcurs_variables\fR(3X),
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
diff --git a/man/resizeterm.3x b/man/resizeterm.3x
index 888eaaf318d1..ddb47e76bf92 100644
--- a/man/resizeterm.3x
+++ b/man/resizeterm.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,12 +28,12 @@
.\"
.\" Author: Thomas E. Dickey 1996-2005
.\"
-.\" $Id: resizeterm.3x,v 1.11 2005/06/25 22:19:42 tom Exp $
+.\" $Id: resizeterm.3x,v 1.14 2010/12/04 18:38:55 tom Exp $
.TH resizeterm 3X ""
.SH NAME
\fBis_term_resized\fR,
\fBresize_term\fR,
-\fBresizeterm\fR - change the curses terminal size
+\fBresizeterm\fR \- change the curses terminal size
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
@@ -89,12 +89,7 @@ no screen size change may be recorded.
In that case, no \fBKEY_RESIZE\fP is queued for the next call to \fBgetch\fP;
an \fBERR\fP will be returned instead.
.SH SEE ALSO
+\fBcurs_variables\fR(3X),
\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/man/tabs.1 b/man/tabs.1
new file mode 100644
index 000000000000..c867db511667
--- /dev/null
+++ b/man/tabs.1
@@ -0,0 +1,141 @@
+.\"***************************************************************************
+.\" Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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: tabs.1,v 1.8 2010/12/04 18:40:45 tom Exp $
+.TH @TABS@ 1 ""
+.ds n 5
+.SH NAME
+\fBtabs\fR \- set tabs on a terminal
+.SH SYNOPSIS
+\fBtabs\fR [\fB\-v\fR[\fIn\fR]] [\fB\-ahuUV\fR] \fIfile...\fR
+.br
+.SH DESCRIPTION
+.PP
+The \fBtabs\fP program clears and sets tab-stops on the terminal.
+This uses the terminfo \fIclear_all_tabs\fP and \fIset_tab\fP capabilities.
+If either is absent, \fBtabs\fP is unable to clear/set tab-stops.
+The terminal should be configured to use hard tabs, e.g.,
+.sp
+.RS
+stty tab0
+.RE
+.SH OPTIONS
+.SS General Options
+.TP 5
+.BI \-T "name"
+Tell \fBtabs\fP which terminal type to use.
+If this option is not given, \fBtabs\fP will use the \fB$TERM\fP
+environment variable.
+If that is not set, it will use the \fIansi+tabs\fP entry.
+.TP 5
+.B \-d
+The debugging option shows a ruler line, followed by two data lines.
+The first data line shows the expected tab-stops marked with asterisks.
+The second data line shows the actual tab-stops, marked with asterisks.
+.TP 5
+.B \-n
+This option tells \fBtabs\fP to check the options and run any debugging
+option, but not to modify the terminal settings.
+.PP
+The \fBtabs\fP program processes a single list of tab stops.
+The last option to be processed which defines a list is the one that
+determines the list to be processed.
+.SS Implicit Lists
+Use a single number as an option, e.g., "\fB\-5\fP" to set tabs at the given
+interval (in this case 1, 6, 11, 16, 21, etc.). Tabs are repeated up to
+the right margin of the screen.
+.PP
+Use "\fB\-0\fP" to clear all tabs.
+.PP
+Use "\fB\-8\fP" to set tabs to the standard interval.
+.SS Explicit Lists
+An explicit list can be defined after the options (this does not use a "\-").
+The values in the list must be in increasing numeric order, and greater than
+zero. They are separated by a comma or a blank, for example,
+.sp
+.RS
+tabs 1,6,11,16,21
+.br
+tabs 1 6 11 16 21
+.RE
+Use a '+' to treat a number as an increment relative to the previous value,
+e.g.,
+.sp
+.RS
+tabs 1,+5,+5,+5,+5
+.RE
+which is equivalent to the 1,6,11,16,21 example.
+.SS Predefined Tab-Stops
+X/Open defines several predefined lists of tab stops.
+.TP 5
+.B \-a
+Assembler, IBM S/370, first format
+.TP 5
+.B \-a2
+Assembler, IBM S/370, second format
+.TP 5
+.B \-c
+COBOL, normal format
+.TP 5
+.B \-c2
+COBOL compact format
+.TP 5
+.B \-c3
+COBOL compact format extended
+.TP 5
+.B \-f
+FORTRAN
+.TP 5
+.B \-p
+PL/I
+.TP 5
+.B \-s
+SNOBOL
+.TP 5
+.B \-u
+UNIVAC 1100 Assembler
+.SH PORTABILITY
+.PP
+X/Open describes a \fB+m\fP option, to set a terminal's left-margin.
+Very few of the entries in the terminal database provide this capability.
+.PP
+The \fB\-d\fP (debug) and \fB\-n\fP (no-op) options are extensions not provided
+by other implementations.
+.PP
+Documentation for other implementations states that there is a limit on the
+number of tab stops. While some terminals may not accept an arbitrary number
+of tab stops, this implementation will attempt to set tab stops up to the
+right margin of the screen, if the given list happens to be that long.
+.SH SEE ALSO
+\fB@TSET@\fR(1),
+\fB@INFOCMP@\fR(1M),
+\fBcurses\fR(3X),
+\fBterminfo\fR(\*n).
+.PP
+This describes \fBncurses\fR
+version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
diff --git a/man/term.5 b/man/term.5
index 19af62a350ed..a8055e9a63aa 100644
--- a/man/term.5
+++ b/man/term.5
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: term.5,v 1.19 2006/12/24 18:12:38 tom Exp $
+.\" $Id: term.5,v 1.21 2010/12/04 18:40:45 tom Exp $
.TH term 5
.ds n 5
.ds d @TERMINFO@
@@ -109,7 +109,7 @@ 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
+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
@@ -130,7 +130,7 @@ The capabilities are in the same order as the file <term.h>.
Between the boolean section and the number section,
a null byte will be inserted, if necessary,
to ensure that the number section begins on an even byte (this is a
-relic of the PDP-11's word-addressed architecture, originally
+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.
@@ -138,11 +138,11 @@ All short integers are aligned on a short word boundary.
The numbers section is similar to the flags section.
Each capability takes up two bytes,
and is stored as a little-endian short integer.
-If the value represented is -1, the capability is taken to be missing.
+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.
+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
@@ -217,14 +217,14 @@ of boolean, number, and string capabilities.
Despite the consistent use of little-endian for numbers and the otherwise
self-describing format, it is not wise to count on portability of binary
terminfo entries between commercial UNIX versions. The problem is that there
-are at least three versions of terminfo (under HP-UX, AIX, and OSF/1) which
+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.
.SH EXAMPLE
As an example, here is a hex dump of the description for the Lear-Siegler
-ADM-3, a popular though rather stupid early terminal:
+ADM\-3, a popular though rather stupid early terminal:
.nf
.sp
adm3a|lsi adm3a,
@@ -275,9 +275,3 @@ extended terminfo format for ncurses 5.0
hashed database support for ncurses 5.6
.sp
Eric S. Raymond
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/term.7 b/man/term.7
index 7eda6fbd5870..78aa095a8829 100644
--- a/man/term.7
+++ b/man/term.7
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: term.7,v 1.18 2007/06/02 20:40:07 tom Exp $
+.\" $Id: term.7,v 1.22 2010/12/04 18:41:07 tom Exp $
.TH term 7
.ds n 5
.ds d @TERMINFO@
@@ -39,9 +39,9 @@ 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.
+\fB/etc/inittab\fR (e.g., 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
@@ -73,9 +73,9 @@ retrieval speed (unlike the old text-based \fBtermcap\fR format they replace);
to examine an entry, you must use the \fB@INFOCMP@\fR(1M) command.
Invoke it as follows:
.sp
- @INFOCMP@ \fIentry-name\fR
+ @INFOCMP@ \fIentry_name\fR
.sp
-where \fIentry-name\fR is the name of the type you wish to examine (and the
+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).
@@ -114,14 +114,14 @@ 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
+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 does not 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).
+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.
@@ -135,52 +135,52 @@ 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
+\-am
Enable auto-margin (right-margin wraparound).
.TP 5
--m
-Mono mode - suppress color support.
+\-m
+Mono mode \- suppress color support.
.TP 5
--na
-No arrow keys - termcap ignores arrow keys which are actually there on the
+\-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.
+\-nam
+No auto-margin \- suppress am capability.
.TP 5
--nl
-No labels - suppress soft labels.
+\-nl
+No labels \- suppress soft labels.
.TP 5
--nsl
-No status line - suppress status line.
+\-nsl
+No status line \- suppress status line.
.TP 5
--pp
+\-pp
Has a printer port which is used.
.TP 5
--rv
+\-rv
Terminal in reverse video mode (black on white).
.TP 5
--s
+\-s
Enable status line.
.TP 5
--vb
+\-vb
Use visible bell (flash) rather than beep.
.TP 5
--w
+\-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').
+\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
+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.
+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.
@@ -196,9 +196,3 @@ tty line initialization (AT&T-like UNIXes)
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/man/term_variables.3x b/man/term_variables.3x
new file mode 100644
index 000000000000..58b7cfea2df3
--- /dev/null
+++ b/man/term_variables.3x
@@ -0,0 +1,153 @@
+.\"***************************************************************************
+.\" Copyright (c) 2010 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" 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_variables.3x,v 1.2 2010/12/04 18:38:55 tom Exp $
+.TH term_variables 3X ""
+.ds n 5
+.na
+.hy 0
+.SH NAME
+\fBSP\fP,
+\fBacs_map\fP,
+\fBboolcodes\fP,
+\fBboolfnames\fP,
+\fBboolnames\fP,
+\fBcur_term\fP,
+\fBnumcodes\fP,
+\fBnumfnames\fP,
+\fBnumnames\fP,
+\fBstrcodes\fP,
+\fBstrfnames\fP,
+\fBstrnames\fP,
+\fBttytype\fP
+\- \fBcurses\fR terminfo global variables
+.ad
+.hy
+.SH SYNOPSIS
+.nf
+\fB#include <curses.h>\fR
+.br
+\fB#include <term.h>\fR
+.PP
+\fBchtype acs_map[];\fR
+.br
+\fBNCURSES_CONST char * const * boolcodes;\fR
+.br
+\fBNCURSES_CONST char * const * boolfnames;\fR
+.br
+\fBNCURSES_CONST char * const * boolnames;\fR
+.br
+\fBTERMINAL * cur_term;\fR
+.br
+\fBNCURSES_CONST char * const * numcodes;\fR
+.br
+\fBNCURSES_CONST char * const * numfnames;\fR
+.br
+\fBNCURSES_CONST char * const * numnames;\fR
+.br
+\fBNCURSES_CONST char * const * strcodes;\fR
+.br
+\fBNCURSES_CONST char * const * strfnames;\fR
+.br
+\fBNCURSES_CONST char * const * strnames;\fR
+.br
+\fBchar ttytype[];\fR
+.br
+.fi
+.SH DESCRIPTION
+This page summarizes variables provided by the \fBcurses\fP library's
+low-level terminfo interface.
+A more complete description is given in the \fBcurs_terminfo\fP(3X) manual page.
+.PP
+Depending on the configuration, these may be actual variables,
+or macros (see \fBcurs_threads\fR(3X))
+which provide read-only access to \fIcurses\fP's state.
+In either case, applications should treat them as read-only to avoid
+confusing the library.
+.SS Alternate Character Set Mapping
+After initializing the curses or terminfo interfaces,
+the \fBacs_map\fP array holds information used to translate cells
+with the \fBA_ALTCHARSET\fP video attribute into line-drawing characters.
+.PP
+The encoding of the information in this array has changed periodically.
+Application developers need only know that it is used for the "ACS_"
+constants in <curses.h>.
+.PP
+The comparable data for the wide-character library is a private variable.
+.SS Current Terminal Data
+After initializing the curses or terminfo interfaces,
+the \fBcur_term\fP contains data describing the current terminal.
+This variable is also set as a side-effect of \fBset_term\fP(3X)
+and \fBdelscreen\fP(3X).
+.PP
+It is possible to save a value of \fBcur_term\fP for subsequent
+use as a parameter to \fBset_term\fP, for switching between screens.
+Alternatively, one can save the return value from \fBnewterm\fP
+or \fBsetupterm\fP to reuse in \fBset_term\fP.
+.SS Terminfo Names
+The \fBtic\fP(1) and \fBinfocmp\fP(1) programs use lookup tables for
+the long and short names of terminfo capabilities,
+as well as the corresponding names for termcap capabilities.
+These are available to other applications,
+though the hash-tables are not available.
+.PP
+The long terminfo capability names use a "l" (ell) in their names:
+boolfnames
+numfnames
+strfnames
+.PP
+These are the short names for terminfo capabilities:
+boolnames,
+numnames, and
+strnames.
+.PP
+These are the corresponding names used for termcap descriptions:
+boolcodes,
+numcodes, and
+strcodes.
+.SS Terminal Type
+On initialization of the curses or terminfo interfaces,
+\fBsetupterm\fP copies the terminal name to the array \fBttytype\fP.
+.SH NOTES
+The low-level terminfo interface is initialized using \fBsetupterm\fR(3X).
+The upper-level curses interface uses the low-level terminfo interface,
+internally.
+.SH PORTABILITY
+X/Open Curses does not describe any of these except for \fBcur_term\fP.
+(The inclusion of \fBcur_term\fP appears to be an oversight,
+since other comparable low-level information is omitted by X/Open).
+.PP
+Other implementations may have comparable variables.
+Some implementations provide the variables in their libraries,
+but omit them from the header files.
+.SH SEE ALSO
+\fBcurses\fR(3X),
+\fBcurs_terminfo\fR(3X),
+\fBcurs_threads\fR(3X),
+\fBterminfo\fR(3X),
+\fBterminfo\fR(\*n).
diff --git a/man/terminfo.head b/man/terminfo.head
index 7455675ab953..da8284c2f63b 100644
--- a/man/terminfo.head
+++ b/man/terminfo.head
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: terminfo.head,v 1.16 2007/03/04 00:09:46 tom Exp $
+.\" $Id: terminfo.head,v 1.18 2010/07/31 16:08:48 tom Exp $
.TH terminfo 5 "" "" "File Formats"
.ds n 5
.ds d @TERMINFO@
@@ -68,7 +68,7 @@ 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 \fB@INFOCMP@\ -f\fP option relies on this to format if-then-else expressions:
+The \fB@INFOCMP@\ \-f\fP option relies on this to format if-then-else expressions:
the result can be read by \fB@TIC@\fP.
.PP
Terminal names (except for the last, verbose entry) should
@@ -78,7 +78,7 @@ 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.
+Thus, a vt100 in 132 column mode would be vt100\-w.
The following suffixes should be used where possible:
.PP
.TS
@@ -86,19 +86,19 @@ 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
+\-\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.
diff --git a/man/terminfo.tail b/man/terminfo.tail
index d06d3a963a63..4b56e91be314 100644
--- a/man/terminfo.tail
+++ b/man/terminfo.tail
@@ -1,4 +1,4 @@
-.\" $Id: terminfo.tail,v 1.49 2008/02/16 20:57:43 tom Exp $
+.\" $Id: terminfo.tail,v 1.53 2010/12/04 18:38:55 tom Exp $
.\" Beginning of terminfo.tail file
.\" This file is part of ncurses.
.\" See "terminfo.head" for copyright.
@@ -25,7 +25,7 @@ of what a \fBterminfo\fR entry for a modern terminal typically looks like.
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,
+ 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,
@@ -325,9 +325,9 @@ The \fB%\fR encodings have the following meanings:
outputs `%'
.TP
%\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP
-as in \fBprintf\fP, flags are [-+#] and space.
-Use a `:' to allow the next character to be a `-' flag,
-avoiding interpreting "%-" as an operator.
+as in \fBprintf\fP, flags are [\-+#] and space.
+Use a `:' to allow the next character to be a `\-' flag,
+avoiding interpreting "%\-" as an operator.
.TP
%c
print pop() like %c in \fBprintf\fP
@@ -335,20 +335,20 @@ print pop() like %c in \fBprintf\fP
%s
print pop() like %s in \fBprintf\fP
.TP
-%p[1-9]
+%p[1\-9]
push \fIi\fP'th parameter
.TP
-%P[a-z]
-set dynamic variable [a-z] to pop()
+%P[a\-z]
+set dynamic variable [a\-z] to pop()
.TP
-%g[a-z]
-get dynamic variable [a-z] and push it
+%g[a\-z]
+get dynamic variable [a\-z] and push it
.TP
-%P[A-Z]
-set static variable [a-z] to pop()
+%P[A\-Z]
+set static variable [a\-z] to pop()
.TP
-%g[A-Z]
-get static variable [a-z] and push it
+%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,
@@ -365,7 +365,7 @@ integer constant \fInn\fP
%l
push strlen(pop)
.TP
-%+ %- %* %/ %m
+%+ %\- %* %/ %m
arithmetic (%m is mod): push(pop() op pop())
.TP
%& %| %^
@@ -397,14 +397,14 @@ It is possible to form else-if's a la Algol 68:
.IP
where c\di\u are conditions, b\di\u are bodies.
.IP
-Use the \fB-f\fP option of \fBtic\fP or \fB@INFOCMP@\fP to see
-the structure of if-the-else's.
+Use the \fB\-f\fP option of \fBtic\fP or \fB@INFOCMP@\fP to see
+the structure of if-then-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.
+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}%-".
+That is, to get x\-5 one would use "%gx%{5}%-".
%P and %g variables are
persistent across escape-string evaluations.
.PP
@@ -542,7 +542,7 @@ 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
+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
@@ -759,9 +759,9 @@ For example, the DEC vt220 supports most of the modes:
.PP
.TS
center;
-l c c
-l c c
-lw28 lw6 lw2 lw20.
+l l l
+l l l
+lw18 lw14 lw18.
\fBtparm parameter attribute escape sequence\fP
none none \\E[0m
@@ -794,9 +794,9 @@ Writing out the above sequences, along with their dependencies yields
.PP
.TS
center;
-l c c
-l c c
-lw28 lw6 lw2 lw20.
+l l l
+l l l
+lw18 lw14 lw18.
\fBsequence when to output terminfo translation\fP
\\E[0 always \\E[0
@@ -1174,9 +1174,9 @@ 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.
+l l l l
+l l l l
+lw25 lw10 lw6 lw6.
.\".TH
\fBGlyph ACS Ascii VT100\fR
\fBName Name Default Name\fR
@@ -1184,7 +1184,7 @@ 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 ^ -
+arrow pointing up ACS_UARROW ^ \-
board of squares ACS_BOARD # h
bullet ACS_BULLET o ~
checker board (stipple) ACS_CKBOARD : a
@@ -1192,7 +1192,7 @@ 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
+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
@@ -1201,8 +1201,8 @@ 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 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
@@ -1227,7 +1227,7 @@ 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.
+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.
@@ -1312,7 +1312,7 @@ which color pair is current.
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
+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.
@@ -1324,7 +1324,7 @@ terminal-dependent.
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
+\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.
@@ -1525,9 +1525,9 @@ 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,
+ 2621\-nl, smkx@, rmkx@, use=2621,
.PP
-defines a 2621-nl that does not have the \fBsmkx\fR or \fBrmkx\fR capabilities,
+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.
@@ -1544,7 +1544,7 @@ The man pages for 4.3BSD and older versions of \fBtgetent()\fP instruct the user
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.
+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.
@@ -1612,16 +1612,16 @@ If it is too long even before
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
+When in \-C (translate to termcap) mode, the \fBncurses\fR implementation of
\fB@TIC@\fR(1M) issues warning messages when the pre-tc length of a termcap
translation is too long.
-The -c (check) option also checks resolved (after tc
+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
+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
@@ -1657,30 +1657,30 @@ 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 --
+\fBSVR4, Solaris, ncurses\fR \-\-
These support all SVr4 capabilities.
.PP
-\fBSGI\fR --
+\fBSGI\fR \-\-
Supports the SVr4 set, adds one undocumented extended string
capability (\fBset_pglen\fR).
.PP
-\fBSVr1, Ultrix\fR --
+\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 --
+\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 --
+\fBAIX\fR \-\-
Supports the SVr1 subset, plus function keys 11 through 63, plus a number
of incompatible string table extensions.
.PP
-\fBOSF\fR --
+\fBOSF\fR \-\-
Supports both the SVr4 set and the AIX extensions.
.SH FILES
.TP 25
@@ -1692,12 +1692,7 @@ files containing terminal descriptions
\fBcurses\fR(3X),
\fBprintf\fR(3),
\fBterm\fR(\*n).
+\fBterm_variables\fR(3X).
.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/man/tic.1m b/man/tic.1m
index 343ec323140d..cf4147fc110f 100644
--- a/man/tic.1m
+++ b/man/tic.1m
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,15 +26,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tic.1m,v 1.44 2006/12/24 17:59:11 tom Exp $
+.\" $Id: tic.1m,v 1.47 2010/12/04 18:38:55 tom Exp $
.TH @TIC@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
-\fBtic\fR - the \fIterminfo\fR entry-description compiler
+\fBtic\fR \- the \fIterminfo\fR entry-description compiler
.SH SYNOPSIS
\fBtic\fR
-[\fB-\
+[\fB\-\
1\
C\
G\
@@ -53,20 +53,22 @@ s\
t\
x\
\fR]
-[\fB-e\fR \fInames\fR]
-[\fB-o\fR \fIdir\fR]
-[\fB-R\fR \fIsubset\fR]
-[\fB-v\fR[\fIn\fR]]
-[\fB-w\fR[\fIn\fR]]
+[\fB\-e\fR \fInames\fR]
+[\fB\-o\fR \fIdir\fR]
+[\fB\-R\fR \fIsubset\fR]
+[\fB\-v\fR[\fIn\fR]]
+[\fB\-w\fR[\fIn\fR]]
\fIfile\fR
.br
.SH DESCRIPTION
The command \fBtic\fR translates a \fBterminfo\fR file from source
-format into compiled format. The compiled format is necessary for use with
+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.
+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.
@@ -79,33 +81,38 @@ Libraries that read terminfo entries are expected to check for a TERMINFO
directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and
finally look in \fI\*d\fR.
.TP
-\fB-1\fR
+\fB\-1\fR
restricts the output to a single column
.TP
-\fB-a\fR
+\fB\-a\fR
tells \fBtic\fP to retain commented-out capabilities rather than discarding
-them. Capabilities are commented by prefixing them with a period.
-This sets the \fB-x\fR option, because it treats the commented-out
+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
+\fB\-C\fR
+Force source translation to termcap format.
+Note: this differs from the \fB\-C\fR
option of \fB@INFOCMP@\fR(1M) in that it does not merely translate capability
-names, but also translates terminfo strings to termcap format. Capabilities
+names, but also translates terminfo strings to termcap format.
+Capabilities
that are not translatable are left in the entry under their terminfo names
but commented out with two preceding dots.
.TP
-\fB-c\fR
+\fB\-c\fR
tells \fBtic\fP to only check \fIfile\fR for errors, including syntax problems and
-bad use links. If you specify \fB-C\fR (\fB-I\fR) with this option, the code
+bad use links.
+If you specify \fB\-C\fR (\fB\-I\fR) with this option, the code
will print warnings about entries which, after use resolution, are more than
-1023 (4096) bytes long. Due to a fixed buffer length in older termcap
+1023 (4096) bytes long.
+Due to a fixed buffer length in older termcap
libraries (and a documented limit in terminfo), these entries may cause core
dumps.
.TP
-\fB-e \fR\fInames\fR
+\fB\-e \fR\fInames\fR
Limit writes and translations to the following comma-separated list of
terminals.
If any name or alias of a terminal matches one of the names in
@@ -113,80 +120,85 @@ 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.)
+(Note: depending on how tic was compiled, this option may require \fB\-I\fR or \fB\-C\fR.)
.TP
-\fB-f\fR
+\fB\-f\fR
Display complex terminfo strings which contain if/then/else/endif expressions
indented for readability.
.TP
-\fB-G\fR
+\fB\-G\fR
Display constant literals in decimal form
rather than their character equivalents.
.TP
-\fB-g\fR
+\fB\-g\fR
Display constant character literals in quoted form
rather than their decimal equivalents.
.TP
-\fB-I\fR
+\fB\-I\fR
Force source translation to terminfo format.
.TP
-\fB-L\fR
+\fB\-L\fR
Force source translation to terminfo format
using the long C variable names listed in <\fBterm.h\fR>
.TP
-\fB-N\fR
-Disable smart defaults.
+\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
+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
+\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
+\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
+that have their own extensions incompatible with SVr4/XSI.
+Available subsets
are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see \fBterminfo\fR(\*n) for details.
.TP
-\fB-r\fR
+\fB\-r\fR
Force entry resolution (so there are no remaining tc capabilities) even
-when doing translation to termcap format. This may be needed if you are
+when doing translation to termcap format.
+This may be needed if you are
preparing a termcap file for a termcap library (such as GNU termcap through
version 1.3 or BSD termcap through 4.3BSD) that does not handle multiple
tc capabilities per entry.
.TP
-\fB-s\fR
+\fB\-s\fR
Summarize the compile by showing the directory into which entries
are written, and the number of entries which are compiled.
.TP
-\fB-T\fR
+\fB\-T\fR
eliminates size-restrictions on the generated text.
This is mainly useful for testing and analysis, since the compiled
descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
.TP
-\fB-t\fR
+\fB\-t\fR
tells \fBtic\fP to discard commented-out capabilities.
Normally when translating from terminfo to termcap,
untranslatable capabilities are commented-out.
.TP 5
-\fB-U\fR
+\fB\-U\fR
tells \fBtic\fP to not post-process the data after parsing the source file.
Normally, it infers data which is commonly missing in older terminfo data,
or in termcaps.
.TP
-\fB-V\fR
+\fB\-V\fR
reports the version of ncurses which was used in this program, and exits.
.TP
-\fB-v\fR\fIn\fR
+\fB\-v\fR\fIn\fR
specifies that (verbose) output be written to standard error trace
information showing \fBtic\fR's progress.
The optional parameter \fIn\fR is a number from 1 to 10, inclusive,
@@ -195,12 +207,12 @@ If \fIn\fR is omitted, the default level is 1.
If \fIn\fR is specified and greater than 1, the level of
detail is increased.
.TP
-\fB-w\fR\fIn\fR
+\fB\-w\fR\fIn\fR
specifies the width of the output.
The parameter is optional.
If it is omitted, it defaults to 60.
.TP
-\fB-x\fR
+\fB\-x\fR
Treat unknown capabilities as user-defined.
That is, if you supply a capability name which \fBtic\fP does not recognize,
it will infer its type (boolean, number or string) from the syntax and
@@ -210,7 +222,8 @@ whose name begins with ``k'' are treated as function keys.
.TP
\fIfile\fR
contains one or more \fBterminfo\fR terminal descriptions in source
-format [see \fBterminfo\fR(\*n)]. Each description in the file
+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:
@@ -239,15 +252,18 @@ All values computed in construction of the hash table
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.
+in \fBterminfo\fR(\*n).
+The exception is the \fBuse\fR capability.
.PP
-When a \fBuse\fR=\fIentry\fR-\fIname\fR field is discovered in a
+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
+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
+\fIentry\fR\-\fIname\fR for the current entry, with the exception of
those capabilities that explicitly are defined in the current entry.
.PP
When an entry, e.g., \fBentry_name_1\fR, contains a
@@ -259,20 +275,25 @@ 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.
.PP
-Total compiled entries cannot exceed 4096 bytes. The name field cannot
-exceed 512 bytes. Terminal names exceeding the maximum alias length
+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
+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
+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.
.PP
The SVr4 manual pages are not clear on the resolution rules for \fBuse\fR
@@ -287,25 +308,25 @@ The error messages from this \fBtic\fR have the same format as GNU C
error messages, and can be parsed by GNU Emacs's compile facility.
.PP
The
-\fB-C\fR,
-\fB-G\fR,
-\fB-I\fR,
-\fB-N\fR,
-\fB-R\fR,
-\fB-T\fR,
-\fB-V\fR,
-\fB-a\fR,
-\fB-e\fR,
-\fB-f\fR,
-\fB-g\fR,
-\fB-o\fR,
-\fB-r\fR,
-\fB-s\fR,
-\fB-t\fR and
-\fB-x\fR
+\fB\-C\fR,
+\fB\-G\fR,
+\fB\-I\fR,
+\fB\-N\fR,
+\fB\-R\fR,
+\fB\-T\fR,
+\fB\-V\fR,
+\fB\-a\fR,
+\fB\-e\fR,
+\fB\-f\fR,
+\fB\-g\fR,
+\fB\-o\fR,
+\fB\-r\fR,
+\fB\-s\fR,
+\fB\-t\fR and
+\fB\-x\fR
options
are not supported under SVr4.
-The SVr4 \fB-c\fR mode does not report bad use links.
+The SVr4 \fB\-c\fR mode does not report bad use links.
.PP
System V does not compile entries to or read entries from your
\fI$HOME/.terminfo\fR directory unless TERMINFO is explicitly set to it.
@@ -323,9 +344,8 @@ Compiled terminal description database.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>
+and
+.br
+Thomas E. Dickey <dickey@invisible-island.net>
diff --git a/man/toe.1m b/man/toe.1m
index 15303541dddc..c8eb4812aca6 100644
--- a/man/toe.1m
+++ b/man/toe.1m
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: toe.1m,v 1.21 2008/01/05 20:57:16 tom Exp $
+.\" $Id: toe.1m,v 1.23 2010/12/04 18:40:45 tom Exp $
.TH @TOE@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
-\fBtoe\fR - table of (terminfo) entries
+\fBtoe\fR \- table of (terminfo) entries
.SH SYNOPSIS
-\fBtoe\fR [\fB-v\fR[\fIn\fR]] [\fB-ahuUV\fR] \fIfile...\fR
+\fBtoe\fR [\fB\-v\fR[\fIn\fR]] [\fB\-ahuUV\fR] \fIfile...\fR
.br
.SH DESCRIPTION
.PP
@@ -43,17 +43,17 @@ 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,
+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-a\fR
+\fB\-a\fR
report on all of the terminal databases which ncurses would search,
rather than only the first one that it finds.
.TP
-\fB-u\fR \fIfile\fR
+\fB\-u\fR \fIfile\fR
says to write a report to the standard output,
listing dependencies in the given terminfo/termcap source file.
The report condenses the `use' relation:
@@ -65,7 +65,7 @@ whitespace-separated primary names of all terminals which occur in those use
capabilities,
followed by a newline
.TP
-\fB-U\fR \fIfile\fR
+\fB\-U\fR \fIfile\fR
says to write a report to the standard output,
listing reverse dependencies in the given terminfo/termcap source file.
The report reverses the `use' relation:
@@ -76,13 +76,13 @@ followed by the
whitespace-separated primary names of all terminals which depend on it,
followed by a newline.
.TP
-\fB-v\fR\fIn\fR
+\fB\-v\fR\fIn\fR
specifies that (verbose) output be written to standard error,
showing \fBtoe\fR's progress.
The optional parameter \fIn\fR is a number from 1 to 10,
interpreted as for \fB@TIC@\fR(1M).
.TP
-\fB-V\fR
+\fB\-V\fR
reports the version of ncurses which was used in this program,
and exits.
.SH FILES
@@ -99,9 +99,3 @@ Compiled terminal description database.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/tput.1 b/man/tput.1
index bada0b1595ed..665c71199d28 100644
--- a/man/tput.1
+++ b/man/tput.1
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,24 +27,24 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tput.1,v 1.27 2006/12/24 18:11:31 tom Exp $
+.\" $Id: tput.1,v 1.29 2010/12/04 18:41:07 tom Exp $
.TH @TPUT@ 1 ""
.ds d @TERMINFO@
.ds n 1
.SH NAME
-\fB@TPUT@\fR, \fBreset\fR - initialize a terminal or query terminfo database
+\fB@TPUT@\fR, \fBreset\fR \- initialize a terminal or query terminfo database
.SH SYNOPSIS
-\fB@TPUT@\fR [\fB-T\fR\fItype\fR] \fIcapname\fR [\fIparms\fR ... ]
+\fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fIcapname\fR [\fIparms\fR ... ]
.br
-\fB@TPUT@\fR [\fB-T\fR\fItype\fR] \fBinit\fR
+\fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fBinit\fR
.br
-\fB@TPUT@\fR [\fB-T\fR\fItype\fR] \fBreset\fR
+\fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fBreset\fR
.br
-\fB@TPUT@\fR [\fB-T\fR\fItype\fR] \fBlongname\fR
+\fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fBlongname\fR
.br
-\fB@TPUT@ -S\fR \fB<<\fR
+\fB@TPUT@ \-S\fR \fB<<\fR
.br
-\fB@TPUT@ -V\fR
+\fB@TPUT@ \-V\fR
.br
.SH DESCRIPTION
The \fB@TPUT@\fR utility uses the \fBterminfo\fR database to make the
@@ -76,10 +76,10 @@ the application should test the exit code
For a complete list of capabilities
and the \fIcapname\fR associated with each, see \fBterminfo\fR(5).
.TP
-\fB-T\fR\fItype\fR
+\fB\-T\fR\fItype\fR
indicates the \fItype\fR of terminal. Normally this option is
unnecessary, because the default is taken from the environment
-variable \fBTERM\fR. If \fB-T\fR is specified, then the shell
+variable \fBTERM\fR. If \fB\-T\fR is specified, then the shell
variables \fBLINES\fR and \fBCOLUMNS\fR will be ignored,and the
operating system will not be queried for the actual screen size.
.TP
@@ -99,12 +99,12 @@ Normally \fB@TPUT@\fR uses \fBtparm\fR (3X) to perform the substitution.
If no parameters are given for the capability,
\fB@TPUT@\fR writes the string without performing the substitution.
.TP
-\fB-S\fR
+\fB\-S\fR
allows more than one capability per invocation of \fB@TPUT@\fR. The
capabilities must be passed to \fB@TPUT@\fR from the standard input
instead of from the command line (see example).
Only one \fIcapname\fR is allowed per line.
-The \fB-S\fR option changes the
+The \fB\-S\fR option changes the
meaning of the \fB0\fR and \fB1\fR boolean and string exit codes (see the
EXIT CODES section).
.IP
@@ -112,12 +112,12 @@ Again, \fB@TPUT@\fR uses a table and the presence of parameters in its input
to decide whether to use \fBtparm\fR (3X),
and how to interpret the parameters.
.TP
-\fB-V\fR
+\fB\-V\fR
reports the version of ncurses which was used in this program, and exits.
.TP
\fBinit\fR
If the \fBterminfo\fR database is present and an entry for the user's
-terminal exists (see \fB-T\fR\fItype\fR, above), the following will
+terminal exists (see \fB\-T\fR\fItype\fR, above), the following will
occur:
.RS
.TP
@@ -152,7 +152,7 @@ Otherwise, \fBreset\fR acts identically to \fBinit\fR.
.TP
\fBlongname\fR
If the \fBterminfo\fR database is present and an entry for the
-user's terminal exists (see \fB-T\fR\fItype\fR above), then the long name
+user's terminal exists (see \fB\-T\fR\fItype\fR above), then the long name
of the terminal will be put out. The long name is the last
name in the first line of the terminal's description in the
\fBterminfo\fR database [see \fBterm\fR(5)].
@@ -169,7 +169,7 @@ command should be included in everyone's .profile after
the environmental variable \fBTERM\fR has been exported, as
illustrated on the \fBprofile\fR(5) manual page.
.TP 5
-\fB@TPUT@ -T5620 reset\fR
+\fB@TPUT@ \-T5620 reset\fR
Reset an AT&T 5620 terminal, overriding the type of
terminal in the environmental variable \fBTERM\fR.
.TP 5
@@ -184,7 +184,7 @@ Echo the clear-screen sequence for the current terminal.
\fB@TPUT@ cols\fR
Print the number of columns for the current terminal.
.TP 5
-\fB@TPUT@ -T450 cols\fR
+\fB@TPUT@ \-T450 cols\fR
Print the number of columns for the 450 terminal.
.TP 5
\fBbold=`@TPUT@ smso` offbold=`@TPUT@ rmso`\fR
@@ -208,7 +208,7 @@ type of terminal specified in the environmental
variable \fBTERM\fR.
.PP
.RS 5
-\fB@TPUT@ -S <<!\fR
+\fB@TPUT@ \-S <<!\fR
.br
\fB> clear\fR
.br
@@ -237,7 +237,7 @@ sequences that set margins and tabs); for more
information, see the "Tabs and Initialization"
section of \fBterminfo\fR(5)
.SH EXIT CODES
-If the \fB-S\fR option is used,
+If the \fB\-S\fR option is used,
\fB@TPUT@\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.
@@ -245,7 +245,7 @@ If no errors are found, the exit code is \fB0\fR.
No indication of which line failed can be given so
exit code \fB1\fR will never appear. Exit codes \fB2\fR, \fB3\fR, and
\fB4\fR retain their usual interpretation.
-If the \fB-S\fR option is not used,
+If the \fB\-S\fR option is not used,
the exit code depends on the type of \fIcapname\fR:
.RS 5
.TP
@@ -265,7 +265,7 @@ a value of \fB0\fR is always set,
whether or not \fIcapname\fR is defined for this terminal \fItype\fR.
To determine if \fIcapname\fR is defined for this terminal \fItype\fR,
the user must test the value written to standard output.
-A value of \fB-1\fR
+A value of \fB\-1\fR
means that \fIcapname\fR is not defined for this terminal \fItype\fR.
.TP
.I other
@@ -286,18 +286,18 @@ exit code error message
\fB0\fR T{
(\fIcapname\fR is a numeric variable that is not specified in the
\fBterminfo\fR(5) database for this terminal type, e.g.
-\fB@TPUT@ -T450 lines\fR and \fB@TPUT@ -T2621 xmc\fR)
+\fB@TPUT@ \-T450 lines\fR and \fB@TPUT@ \-T2621 xmc\fR)
T}
\fB1\fR no error message is printed, see the \fBEXIT CODES\fR section.
\fB2\fR usage error
\fB3\fR unknown terminal \fItype\fR or no \fBterminfo\fR database
\fB4\fR unknown \fBterminfo\fR capability \fIcapname\fR
-\fB>4\fR error occurred in -S
+\fB>4\fR error occurred in \-S
=
.TE
.SH PORTABILITY
.PP
-The \fBlongname\fR and \fB-S\fR options, and the parameter-substitution
+The \fBlongname\fR and \fB\-S\fR options, and the parameter-substitution
features used in the \fBcup\fR example, are not supported in BSD curses or in
AT&T/USL curses before SVr4.
.PP
@@ -317,9 +317,3 @@ than terminfo capability names in their respective \fBtput\fP commands.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/tset.1 b/man/tset.1
index e023064c08b7..9743f5b5a7c8 100644
--- a/man/tset.1
+++ b/man/tset.1
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tset.1,v 1.19 2006/12/24 15:00:30 tom Exp $
-.TH tset 1 ""
+.\" $Id: tset.1,v 1.25 2010/12/04 18:38:55 tom Exp $
+.TH @TSET@ 1 ""
.SH NAME
-\fBtset\fR, \fBreset\fR - terminal initialization
+\fBtset\fR, \fBreset\fR \- terminal initialization
.SH SYNOPSIS
-\fBtset\fR [\fB-IQVcqrsw\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]
+\fBtset\fR [\fB\-IQVcqrsw\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
-\fBreset\fR [\fB-IQVcqrsw\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]
+\fBreset\fR [\fB\-IQVcqrsw\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.
@@ -44,13 +44,14 @@ This determination is done as follows, using the first terminal type found.
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
+error output device in the \fI/etc/ttys\fR file.
+(On System\-V-like UNIXes and systems using that convention,
+\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
+If the terminal type was not specified on the command-line, the \fB\-m\fR
option mappings are then applied (see the section
.B TERMINAL TYPE MAPPING
for more information).
@@ -67,7 +68,7 @@ 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.
-Use the \fB-c\fP or \fB-w\fP option to select only the window sizing
+Use the \fB\-c\fP or \fB\-w\fP option to select only the window sizing
versus the other initialization.
If neither option is given, both are assumed.
.PP
@@ -86,64 +87,64 @@ Also, the terminal will often not echo the command.
.PP
The options are as follows:
.TP 5
-.B -c
+.B \-c
Set control characters and modes.
-.B -e
+.B \-e
Set the erase character to \fIch\fR.
.TP
-.B -I
+.B \-I
Do not send the terminal or tab initialization strings to the terminal.
.TP
-.B -i
+.B \-i
Set the interrupt character to \fIch\fR.
.TP
-.B -k
+.B \-k
Set the line kill character to \fIch\fR.
.TP
-.B -m
+.B \-m
Specify a mapping from a port type to a terminal.
See the section
.B TERMINAL TYPE MAPPING
for more information.
.TP
-.B -Q
+.B \-Q
Do not display any values for the erase, interrupt and line kill characters.
Normally \fBtset\fR displays the values for control characters which
differ from the system's default values.
.TP
-.B -q
+.B \-q
The terminal type is displayed to the standard output, and the terminal is
-not initialized in any way. The option `-' by itself is equivalent but
+not initialized in any way. The option `\-' by itself is equivalent but
archaic.
.TP
-.B -r
+.B \-r
Print the terminal type to the standard error output.
.TP
-.B -s
+.B \-s
Print the sequence of shell commands to initialize the environment variable
\fBTERM\fR to the standard output.
See the section
.B SETTING THE ENVIRONMENT
for details.
.TP
-.B -V
+.B \-V
reports the version of ncurses which was used in this program, and exits.
.TP
-.B -w
+.B \-w
Resize the window to match the size deduced via \fBsetupterm\fP.
Normally this has no effect,
unless \fBsetupterm\fP is not able to detect the window size.
.PP
-The arguments for the \fB-e\fR, \fB-i\fR, and \fB-k\fR
+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''.
+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.
+This is done using the \fB\-s\fR option.
.PP
-When the \fB-s\fR option is specified, the commands to enter the information
+When the \fB\-s\fR option is specified, the commands to enter the information
into the shell's environment are written to the standard output. If
the \fBSHELL\fR environmental variable ends in ``csh'', the commands
are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
@@ -151,7 +152,7 @@ Note, the \fBcsh\fR commands set and unset the shell variable
\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR
or \fB.profile\fR files will initialize the environment correctly:
.sp
- eval \`tset -s options ... \`
+ eval \`tset \-s options ... \`
.
.SH TERMINAL TYPE MAPPING
When the terminal is not hardwired into the system (or the current
@@ -161,13 +162,13 @@ something generic like \fBnetwork\fR, \fBdialup\fR, or \fBunknown\fR.
When \fBtset\fR is used in a startup script it is often desirable to
provide information about the type of terminal used on such ports.
.PP
-The purpose of the \fB-m\fR option is to map
+The purpose of the \fB\-m\fR option is to map
from some set of conditions to a terminal type, that is, to
tell \fBtset\fR
``If I'm on this port at a particular speed, guess that I'm on that
kind of terminal''.
.PP
-The argument to the \fB-m\fR option consists of an optional port type, an
+The argument to the \fB\-m\fR option consists of an optional port type, an
optional operator, an optional baud rate specification, an optional
colon (``:'') character and a terminal type. The port type is a
string (delimited by either the operator or the colon character). The
@@ -178,7 +179,7 @@ The baud rate is specified as a number and is compared with the speed
of the standard error output (which should be the control terminal).
The terminal type is a string.
.PP
-If the terminal type is not specified on the command line, the \fB-m\fR
+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
@@ -193,16 +194,16 @@ and the baud rate is greater than 9600 baud, a terminal type of
.PP
If no baud rate is specified, the terminal type will match any baud rate.
If no port type is specified, the terminal type will match any port type.
-For example, \fB-m dialup:vt100 -m :?xterm\fR
+For example, \fB\-m dialup:vt100 \-m :?xterm\fR
will cause any dialup port, regardless of baud rate, to match the terminal
type vt100, and any non-dialup port type to match the terminal type ?xterm.
Note, because of the leading question mark, the user will be
queried on a default port as to whether they are actually using an xterm
terminal.
.PP
-No whitespace characters are permitted in the \fB-m\fR option argument.
+No whitespace characters are permitted in the \fB\-m\fR option argument.
Also, to avoid problems with meta-characters, it is suggested that the
-entire \fB-m\fR option argument be placed within single quote characters,
+entire \fB\-m\fR option argument be placed within single quote characters,
and that \fBcsh\fR users insert a backslash character (``\e'') before
any exclamation marks (``!'').
.SH HISTORY
@@ -216,34 +217,34 @@ 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
+The \fB\-S\fR option of BSD tset no longer works; it prints an error message to stderr
+and dies. The \fB\-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these
changes are because the \fBTERMCAP\fR variable is no longer supported under
-terminfo-based \fBncurses\fR, which makes \fBtset -S\fR useless (we made it die
+terminfo-based \fBncurses\fR, which makes \fBtset \-S\fR useless (we made it die
noisily rather than silently induce lossage).
.PP
There was an undocumented 4.4BSD feature that invoking tset via a link named
`TSET` (or via any other name beginning with an upper-case letter) set the
terminal to use upper-case only. This feature has been omitted.
.PP
-The \fB-A\fR, \fB-E\fR, \fB-h\fR, \fB-u\fR and \fB-v\fR
+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
+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
+three options be changed to use the \fB\-m\fR option instead. The
+\fB\-n\fP 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
+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
+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 these environment variables:
@@ -280,9 +281,3 @@ environ(7)
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
-.\"#
-.\"# The following sets edit modes for GNU EMACS
-.\"# Local Variables:
-.\"# mode:nroff
-.\"# fill-column:79
-.\"# End:
diff --git a/man/wresize.3x b/man/wresize.3x
index 4d05d3ee7069..0832450fa321 100644
--- a/man/wresize.3x
+++ b/man/wresize.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998-2003,2006 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -28,20 +28,21 @@
.\"
.\" Author: Thomas E. Dickey 1996
.\"
-.\" $Id: wresize.3x,v 1.9 2006/02/25 21:47:06 tom Exp $
+.\" $Id: wresize.3x,v 1.13 2010/12/04 18:40:45 tom Exp $
.TH wresize 3X ""
.SH NAME
-\fBwresize\fR - resize a curses window
+\fBwresize\fR \- resize a curses window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
\fBint wresize(WINDOW *win, int lines, int columns);\fR
.SH DESCRIPTION
-The \fBwresize\fR function reallocates storage for an \fBncurses\fR
+This is an extension to the curses library.
+It 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.
+(as set by \fBwbkgdset\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,
@@ -56,9 +57,3 @@ actual screen dimensions.
\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/menu/Makefile.in b/menu/Makefile.in
index fc33dc7d64e8..253ff4f64194 100644
--- a/menu/Makefile.in
+++ b/menu/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.48 2007/04/28 14:56:11 tom Exp $
+# $Id: Makefile.in,v 1.54 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -43,6 +43,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
x = @EXEEXT@
@@ -63,6 +64,7 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@@ -70,11 +72,14 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
-AR_OPTS = @AR_OPTS@
+ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -126,7 +131,7 @@ sources : $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
# make copies to simplify include-paths while still keeping menu's include
# file in this directory.
@@ -140,16 +145,16 @@ $(DESTDIR)$(libdir) :
-rm -f $@
cp $(srcdir)/mf_common.h $@
-MENU_PRIV_H = \
+HEADER_DEPS = \
$(srcdir)/menu.priv.h \
$(AUTO_SRC) \
../include/curses.h
tags:
- ctags *.[ch]
+ $(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
diff --git a/menu/llib-lmenu b/menu/llib-lmenu
index fc17cc364d42..13ecaf8bdd79 100644
--- a/menu/llib-lmenu
+++ b/menu/llib-lmenu
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1996-2002,2005 *
+ * Author: Thomas E. Dickey 1996-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./m_attribs.c */
-#include "menu.priv.h"
+#include <menu.priv.h>
#undef set_menu_fore
int set_menu_fore(
@@ -350,6 +350,12 @@ int item_count(
/* ./m_new.c */
+#undef new_menu_sp
+MENU *new_menu_sp(
+ SCREEN *sp,
+ ITEM **items)
+ { return(*(MENU **)0); }
+
#undef new_menu
MENU *new_menu(
ITEM **items)
diff --git a/menu/llib-lmenut b/menu/llib-lmenut
new file mode 100644
index 000000000000..951719f41e6e
--- /dev/null
+++ b/menu/llib-lmenut
@@ -0,0 +1,551 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./m_attribs.c */
+
+#include <menu.priv.h>
+
+#undef set_menu_fore
+int set_menu_fore(
+ MENU *menu,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef menu_fore
+chtype menu_fore(
+ const MENU *menu)
+ { return(*(chtype *)0); }
+
+#undef set_menu_back
+int set_menu_back(
+ MENU *menu,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef menu_back
+chtype menu_back(
+ const MENU *menu)
+ { return(*(chtype *)0); }
+
+#undef set_menu_grey
+int set_menu_grey(
+ MENU *menu,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef menu_grey
+chtype menu_grey(
+ const MENU *menu)
+ { return(*(chtype *)0); }
+
+/* ./m_cursor.c */
+
+#undef _nc_menu_cursor_pos
+int _nc_menu_cursor_pos(
+ const MENU *menu,
+ const ITEM *item,
+ int *pY,
+ int *pX)
+ { return(*(int *)0); }
+
+#undef pos_menu_cursor
+int pos_menu_cursor(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_driver.c */
+
+#undef _nc_Match_Next_Character_In_Item_Name
+int _nc_Match_Next_Character_In_Item_Name(
+ MENU *menu,
+ int ch,
+ ITEM **item)
+ { return(*(int *)0); }
+
+#undef menu_driver
+int menu_driver(
+ MENU *menu,
+ int c)
+ { return(*(int *)0); }
+
+/* ./m_format.c */
+
+#undef set_menu_format
+int set_menu_format(
+ MENU *menu,
+ int rows,
+ int cols)
+ { return(*(int *)0); }
+
+#undef menu_format
+void menu_format(
+ const MENU *menu,
+ int *rows,
+ int *cols)
+ { /* void */ }
+
+/* ./m_global.c */
+
+#undef _nc_Default_Menu
+MENU _nc_Default_Menu;
+#undef _nc_Default_Item
+ITEM _nc_Default_Item;
+
+#undef _nc_Connect_Items
+NCURSES_BOOL _nc_Connect_Items(
+ MENU *menu,
+ ITEM **items)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_Disconnect_Items
+void _nc_Disconnect_Items(
+ MENU *menu)
+ { /* void */ }
+
+#undef _nc_Calculate_Text_Width
+int _nc_Calculate_Text_Width(
+ const TEXT *item)
+ { return(*(int *)0); }
+
+#undef _nc_Calculate_Item_Length_and_Width
+void _nc_Calculate_Item_Length_and_Width(
+ MENU *menu)
+ { /* void */ }
+
+#undef _nc_Link_Items
+void _nc_Link_Items(
+ MENU *menu)
+ { /* void */ }
+
+#undef _nc_Show_Menu
+void _nc_Show_Menu(
+ const MENU *menu)
+ { /* void */ }
+
+#undef _nc_New_TopRow_and_CurrentItem
+void _nc_New_TopRow_and_CurrentItem(
+ MENU *menu,
+ int new_toprow,
+ ITEM *new_current_item)
+ { /* void */ }
+
+/* ./m_hook.c */
+
+#undef set_menu_init
+int set_menu_init(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef menu_init
+Menu_Hook menu_init(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+#undef set_menu_term
+int set_menu_term(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef menu_term
+Menu_Hook menu_term(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+#undef set_item_init
+int set_item_init(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef item_init
+Menu_Hook item_init(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+#undef set_item_term
+int set_item_term(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef item_term
+Menu_Hook item_term(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+/* ./m_item_cur.c */
+
+#undef set_current_item
+int set_current_item(
+ MENU *menu,
+ ITEM *item)
+ { return(*(int *)0); }
+
+#undef current_item
+ITEM *current_item(
+ const MENU *menu)
+ { return(*(ITEM **)0); }
+
+#undef item_index
+int item_index(
+ const ITEM *item)
+ { return(*(int *)0); }
+
+/* ./m_item_nam.c */
+
+#undef item_name
+const char *item_name(
+ const ITEM *item)
+ { return(*(const char **)0); }
+
+#undef item_description
+const char *item_description(
+ const ITEM *item)
+ { return(*(const char **)0); }
+
+/* ./m_item_new.c */
+
+#undef new_item
+ITEM *new_item(
+ const char *name,
+ const char *description)
+ { return(*(ITEM **)0); }
+
+#undef free_item
+int free_item(
+ ITEM *item)
+ { return(*(int *)0); }
+
+#undef set_menu_mark
+int set_menu_mark(
+ MENU *menu,
+ const char *mark)
+ { return(*(int *)0); }
+
+#undef menu_mark
+const char *menu_mark(
+ const MENU *menu)
+ { return(*(const char **)0); }
+
+/* ./m_item_opt.c */
+
+#undef set_item_opts
+int set_item_opts(
+ ITEM *item,
+ Item_Options opts)
+ { return(*(int *)0); }
+
+#undef item_opts_off
+int item_opts_off(
+ ITEM *item,
+ Item_Options opts)
+ { return(*(int *)0); }
+
+#undef item_opts_on
+int item_opts_on(
+ ITEM *item,
+ Item_Options opts)
+ { return(*(int *)0); }
+
+#undef item_opts
+Item_Options item_opts(
+ const ITEM *item)
+ { return(*(Item_Options *)0); }
+
+/* ./m_item_top.c */
+
+#undef set_top_row
+int set_top_row(
+ MENU *menu,
+ int row)
+ { return(*(int *)0); }
+
+#undef top_row
+int top_row(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_item_use.c */
+
+#undef set_item_userptr
+int set_item_userptr(
+ ITEM *item,
+ void *userptr)
+ { return(*(int *)0); }
+
+#undef item_userptr
+void *item_userptr(
+ const ITEM *item)
+ { return(*(void **)0); }
+
+/* ./m_item_val.c */
+
+#undef set_item_value
+int set_item_value(
+ ITEM *item,
+ NCURSES_BOOL value)
+ { return(*(int *)0); }
+
+#undef item_value
+NCURSES_BOOL item_value(
+ const ITEM *item)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./m_item_vis.c */
+
+#undef item_visible
+NCURSES_BOOL item_visible(
+ const ITEM *item)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./m_items.c */
+
+#undef set_menu_items
+int set_menu_items(
+ MENU *menu,
+ ITEM **items)
+ { return(*(int *)0); }
+
+#undef menu_items
+ITEM **menu_items(
+ const MENU *menu)
+ { return(*(ITEM ***)0); }
+
+#undef item_count
+int item_count(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_new.c */
+
+#undef new_menu_sp
+MENU *new_menu_sp(
+ SCREEN *sp,
+ ITEM **items)
+ { return(*(MENU **)0); }
+
+#undef new_menu
+MENU *new_menu(
+ ITEM **items)
+ { return(*(MENU **)0); }
+
+#undef free_menu
+int free_menu(
+ MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_opts.c */
+
+#undef set_menu_opts
+int set_menu_opts(
+ MENU *menu,
+ Menu_Options opts)
+ { return(*(int *)0); }
+
+#undef menu_opts_off
+int menu_opts_off(
+ MENU *menu,
+ Menu_Options opts)
+ { return(*(int *)0); }
+
+#undef menu_opts_on
+int menu_opts_on(
+ MENU *menu,
+ Menu_Options opts)
+ { return(*(int *)0); }
+
+#undef menu_opts
+Menu_Options menu_opts(
+ const MENU *menu)
+ { return(*(Menu_Options *)0); }
+
+/* ./m_pad.c */
+
+#undef set_menu_pad
+int set_menu_pad(
+ MENU *menu,
+ int pad)
+ { return(*(int *)0); }
+
+#undef menu_pad
+int menu_pad(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_pattern.c */
+
+#undef menu_pattern
+char *menu_pattern(
+ const MENU *menu)
+ { return(*(char **)0); }
+
+#undef set_menu_pattern
+int set_menu_pattern(
+ MENU *menu,
+ const char *p)
+ { return(*(int *)0); }
+
+/* ./m_post.c */
+
+#undef _nc_Post_Item
+void _nc_Post_Item(
+ const MENU *menu,
+ const ITEM *item)
+ { /* void */ }
+
+#undef _nc_Draw_Menu
+void _nc_Draw_Menu(
+ const MENU *menu)
+ { /* void */ }
+
+#undef post_menu
+int post_menu(
+ MENU *menu)
+ { return(*(int *)0); }
+
+#undef unpost_menu
+int unpost_menu(
+ MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_req_name.c */
+
+#undef menu_request_name
+const char *menu_request_name(
+ int request)
+ { return(*(const char **)0); }
+
+#undef menu_request_by_name
+int menu_request_by_name(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./m_scale.c */
+
+#undef scale_menu
+int scale_menu(
+ const MENU *menu,
+ int *rows,
+ int *cols)
+ { return(*(int *)0); }
+
+/* ./m_spacing.c */
+
+#undef set_menu_spacing
+int set_menu_spacing(
+ MENU *menu,
+ int s_desc,
+ int s_row,
+ int s_col)
+ { return(*(int *)0); }
+
+#undef menu_spacing
+int menu_spacing(
+ const MENU *menu,
+ int *s_desc,
+ int *s_row,
+ int *s_col)
+ { return(*(int *)0); }
+
+/* ./m_sub.c */
+
+#undef set_menu_sub
+int set_menu_sub(
+ MENU *menu,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef menu_sub
+WINDOW *menu_sub(
+ const MENU *menu)
+ { return(*(WINDOW **)0); }
+
+/* ./m_trace.c */
+
+#undef _nc_retrace_item
+ITEM *_nc_retrace_item(
+ ITEM *code)
+ { return(*(ITEM **)0); }
+
+#undef _nc_retrace_item_ptr
+ITEM **_nc_retrace_item_ptr(
+ ITEM **code)
+ { return(*(ITEM ***)0); }
+
+#undef _nc_retrace_item_opts
+Item_Options _nc_retrace_item_opts(
+ Item_Options code)
+ { return(*(Item_Options *)0); }
+
+#undef _nc_retrace_menu
+MENU *_nc_retrace_menu(
+ MENU *code)
+ { return(*(MENU **)0); }
+
+#undef _nc_retrace_menu_hook
+Menu_Hook _nc_retrace_menu_hook(
+ Menu_Hook code)
+ { return(*(Menu_Hook *)0); }
+
+#undef _nc_retrace_menu_opts
+Menu_Options _nc_retrace_menu_opts(
+ Menu_Options code)
+ { return(*(Menu_Options *)0); }
+
+/* ./m_userptr.c */
+
+#undef set_menu_userptr
+int set_menu_userptr(
+ MENU *menu,
+ void *userptr)
+ { return(*(int *)0); }
+
+#undef menu_userptr
+void *menu_userptr(
+ const MENU *menu)
+ { return(*(void **)0); }
+
+/* ./m_win.c */
+
+#undef set_menu_win
+int set_menu_win(
+ MENU *menu,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef menu_win
+WINDOW *menu_win(
+ const MENU *menu)
+ { return(*(WINDOW **)0); }
diff --git a/menu/llib-lmenutw b/menu/llib-lmenutw
new file mode 100644
index 000000000000..0cd559ebd269
--- /dev/null
+++ b/menu/llib-lmenutw
@@ -0,0 +1,553 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./m_attribs.c */
+
+#include <menu.priv.h>
+
+#undef set_menu_fore
+int set_menu_fore(
+ MENU *menu,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef menu_fore
+chtype menu_fore(
+ const MENU *menu)
+ { return(*(chtype *)0); }
+
+#undef set_menu_back
+int set_menu_back(
+ MENU *menu,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef menu_back
+chtype menu_back(
+ const MENU *menu)
+ { return(*(chtype *)0); }
+
+#undef set_menu_grey
+int set_menu_grey(
+ MENU *menu,
+ chtype attr)
+ { return(*(int *)0); }
+
+#undef menu_grey
+chtype menu_grey(
+ const MENU *menu)
+ { return(*(chtype *)0); }
+
+/* ./m_cursor.c */
+
+#undef _nc_menu_cursor_pos
+int _nc_menu_cursor_pos(
+ const MENU *menu,
+ const ITEM *item,
+ int *pY,
+ int *pX)
+ { return(*(int *)0); }
+
+#undef pos_menu_cursor
+int pos_menu_cursor(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_driver.c */
+
+#undef _nc_Match_Next_Character_In_Item_Name
+int _nc_Match_Next_Character_In_Item_Name(
+ MENU *menu,
+ int ch,
+ ITEM **item)
+ { return(*(int *)0); }
+
+#undef menu_driver
+int menu_driver(
+ MENU *menu,
+ int c)
+ { return(*(int *)0); }
+
+/* ./m_format.c */
+
+#undef set_menu_format
+int set_menu_format(
+ MENU *menu,
+ int rows,
+ int cols)
+ { return(*(int *)0); }
+
+#undef menu_format
+void menu_format(
+ const MENU *menu,
+ int *rows,
+ int *cols)
+ { /* void */ }
+
+/* ./m_global.c */
+
+#undef _nc_Default_Menu
+MENU _nc_Default_Menu;
+#undef _nc_Default_Item
+ITEM _nc_Default_Item;
+
+#undef _nc_Connect_Items
+NCURSES_BOOL _nc_Connect_Items(
+ MENU *menu,
+ ITEM **items)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_Disconnect_Items
+void _nc_Disconnect_Items(
+ MENU *menu)
+ { /* void */ }
+
+#undef _nc_Calculate_Text_Width
+int _nc_Calculate_Text_Width(
+ const TEXT *item)
+ { return(*(int *)0); }
+
+#undef _nc_Calculate_Item_Length_and_Width
+void _nc_Calculate_Item_Length_and_Width(
+ MENU *menu)
+ { /* void */ }
+
+#undef _nc_Link_Items
+void _nc_Link_Items(
+ MENU *menu)
+ { /* void */ }
+
+#undef _nc_Show_Menu
+void _nc_Show_Menu(
+ const MENU *menu)
+ { /* void */ }
+
+#undef _nc_New_TopRow_and_CurrentItem
+void _nc_New_TopRow_and_CurrentItem(
+ MENU *menu,
+ int new_toprow,
+ ITEM *new_current_item)
+ { /* void */ }
+
+/* ./m_hook.c */
+
+#undef set_menu_init
+int set_menu_init(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef menu_init
+Menu_Hook menu_init(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+#undef set_menu_term
+int set_menu_term(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef menu_term
+Menu_Hook menu_term(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+#undef set_item_init
+int set_item_init(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef item_init
+Menu_Hook item_init(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+#undef set_item_term
+int set_item_term(
+ MENU *menu,
+ Menu_Hook func)
+ { return(*(int *)0); }
+
+#undef item_term
+Menu_Hook item_term(
+ const MENU *menu)
+ { return(*(Menu_Hook *)0); }
+
+/* ./m_item_cur.c */
+
+#undef set_current_item
+int set_current_item(
+ MENU *menu,
+ ITEM *item)
+ { return(*(int *)0); }
+
+#undef current_item
+ITEM *current_item(
+ const MENU *menu)
+ { return(*(ITEM **)0); }
+
+#undef item_index
+int item_index(
+ const ITEM *item)
+ { return(*(int *)0); }
+
+/* ./m_item_nam.c */
+
+#undef item_name
+const char *item_name(
+ const ITEM *item)
+ { return(*(const char **)0); }
+
+#undef item_description
+const char *item_description(
+ const ITEM *item)
+ { return(*(const char **)0); }
+
+/* ./m_item_new.c */
+
+#include <wctype.h>
+
+#undef new_item
+ITEM *new_item(
+ const char *name,
+ const char *description)
+ { return(*(ITEM **)0); }
+
+#undef free_item
+int free_item(
+ ITEM *item)
+ { return(*(int *)0); }
+
+#undef set_menu_mark
+int set_menu_mark(
+ MENU *menu,
+ const char *mark)
+ { return(*(int *)0); }
+
+#undef menu_mark
+const char *menu_mark(
+ const MENU *menu)
+ { return(*(const char **)0); }
+
+/* ./m_item_opt.c */
+
+#undef set_item_opts
+int set_item_opts(
+ ITEM *item,
+ Item_Options opts)
+ { return(*(int *)0); }
+
+#undef item_opts_off
+int item_opts_off(
+ ITEM *item,
+ Item_Options opts)
+ { return(*(int *)0); }
+
+#undef item_opts_on
+int item_opts_on(
+ ITEM *item,
+ Item_Options opts)
+ { return(*(int *)0); }
+
+#undef item_opts
+Item_Options item_opts(
+ const ITEM *item)
+ { return(*(Item_Options *)0); }
+
+/* ./m_item_top.c */
+
+#undef set_top_row
+int set_top_row(
+ MENU *menu,
+ int row)
+ { return(*(int *)0); }
+
+#undef top_row
+int top_row(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_item_use.c */
+
+#undef set_item_userptr
+int set_item_userptr(
+ ITEM *item,
+ void *userptr)
+ { return(*(int *)0); }
+
+#undef item_userptr
+void *item_userptr(
+ const ITEM *item)
+ { return(*(void **)0); }
+
+/* ./m_item_val.c */
+
+#undef set_item_value
+int set_item_value(
+ ITEM *item,
+ NCURSES_BOOL value)
+ { return(*(int *)0); }
+
+#undef item_value
+NCURSES_BOOL item_value(
+ const ITEM *item)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./m_item_vis.c */
+
+#undef item_visible
+NCURSES_BOOL item_visible(
+ const ITEM *item)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./m_items.c */
+
+#undef set_menu_items
+int set_menu_items(
+ MENU *menu,
+ ITEM **items)
+ { return(*(int *)0); }
+
+#undef menu_items
+ITEM **menu_items(
+ const MENU *menu)
+ { return(*(ITEM ***)0); }
+
+#undef item_count
+int item_count(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_new.c */
+
+#undef new_menu_sp
+MENU *new_menu_sp(
+ SCREEN *sp,
+ ITEM **items)
+ { return(*(MENU **)0); }
+
+#undef new_menu
+MENU *new_menu(
+ ITEM **items)
+ { return(*(MENU **)0); }
+
+#undef free_menu
+int free_menu(
+ MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_opts.c */
+
+#undef set_menu_opts
+int set_menu_opts(
+ MENU *menu,
+ Menu_Options opts)
+ { return(*(int *)0); }
+
+#undef menu_opts_off
+int menu_opts_off(
+ MENU *menu,
+ Menu_Options opts)
+ { return(*(int *)0); }
+
+#undef menu_opts_on
+int menu_opts_on(
+ MENU *menu,
+ Menu_Options opts)
+ { return(*(int *)0); }
+
+#undef menu_opts
+Menu_Options menu_opts(
+ const MENU *menu)
+ { return(*(Menu_Options *)0); }
+
+/* ./m_pad.c */
+
+#undef set_menu_pad
+int set_menu_pad(
+ MENU *menu,
+ int pad)
+ { return(*(int *)0); }
+
+#undef menu_pad
+int menu_pad(
+ const MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_pattern.c */
+
+#undef menu_pattern
+char *menu_pattern(
+ const MENU *menu)
+ { return(*(char **)0); }
+
+#undef set_menu_pattern
+int set_menu_pattern(
+ MENU *menu,
+ const char *p)
+ { return(*(int *)0); }
+
+/* ./m_post.c */
+
+#undef _nc_Post_Item
+void _nc_Post_Item(
+ const MENU *menu,
+ const ITEM *item)
+ { /* void */ }
+
+#undef _nc_Draw_Menu
+void _nc_Draw_Menu(
+ const MENU *menu)
+ { /* void */ }
+
+#undef post_menu
+int post_menu(
+ MENU *menu)
+ { return(*(int *)0); }
+
+#undef unpost_menu
+int unpost_menu(
+ MENU *menu)
+ { return(*(int *)0); }
+
+/* ./m_req_name.c */
+
+#undef menu_request_name
+const char *menu_request_name(
+ int request)
+ { return(*(const char **)0); }
+
+#undef menu_request_by_name
+int menu_request_by_name(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./m_scale.c */
+
+#undef scale_menu
+int scale_menu(
+ const MENU *menu,
+ int *rows,
+ int *cols)
+ { return(*(int *)0); }
+
+/* ./m_spacing.c */
+
+#undef set_menu_spacing
+int set_menu_spacing(
+ MENU *menu,
+ int s_desc,
+ int s_row,
+ int s_col)
+ { return(*(int *)0); }
+
+#undef menu_spacing
+int menu_spacing(
+ const MENU *menu,
+ int *s_desc,
+ int *s_row,
+ int *s_col)
+ { return(*(int *)0); }
+
+/* ./m_sub.c */
+
+#undef set_menu_sub
+int set_menu_sub(
+ MENU *menu,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef menu_sub
+WINDOW *menu_sub(
+ const MENU *menu)
+ { return(*(WINDOW **)0); }
+
+/* ./m_trace.c */
+
+#undef _nc_retrace_item
+ITEM *_nc_retrace_item(
+ ITEM *code)
+ { return(*(ITEM **)0); }
+
+#undef _nc_retrace_item_ptr
+ITEM **_nc_retrace_item_ptr(
+ ITEM **code)
+ { return(*(ITEM ***)0); }
+
+#undef _nc_retrace_item_opts
+Item_Options _nc_retrace_item_opts(
+ Item_Options code)
+ { return(*(Item_Options *)0); }
+
+#undef _nc_retrace_menu
+MENU *_nc_retrace_menu(
+ MENU *code)
+ { return(*(MENU **)0); }
+
+#undef _nc_retrace_menu_hook
+Menu_Hook _nc_retrace_menu_hook(
+ Menu_Hook code)
+ { return(*(Menu_Hook *)0); }
+
+#undef _nc_retrace_menu_opts
+Menu_Options _nc_retrace_menu_opts(
+ Menu_Options code)
+ { return(*(Menu_Options *)0); }
+
+/* ./m_userptr.c */
+
+#undef set_menu_userptr
+int set_menu_userptr(
+ MENU *menu,
+ void *userptr)
+ { return(*(int *)0); }
+
+#undef menu_userptr
+void *menu_userptr(
+ const MENU *menu)
+ { return(*(void **)0); }
+
+/* ./m_win.c */
+
+#undef set_menu_win
+int set_menu_win(
+ MENU *menu,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+#undef menu_win
+WINDOW *menu_win(
+ const MENU *menu)
+ { return(*(WINDOW **)0); }
diff --git a/menu/llib-lmenuw b/menu/llib-lmenuw
index d21fb9488499..0998f9b0b866 100644
--- a/menu/llib-lmenuw
+++ b/menu/llib-lmenuw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2002,2005 *
+ * Author: Thomas E. Dickey 2002-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./m_attribs.c */
-#include "menu.priv.h"
+#include <menu.priv.h>
#undef set_menu_fore
int set_menu_fore(
@@ -352,6 +352,12 @@ int item_count(
/* ./m_new.c */
+#undef new_menu_sp
+MENU *new_menu_sp(
+ SCREEN *sp,
+ ITEM **items)
+ { return(*(MENU **)0); }
+
#undef new_menu
MENU *new_menu(
ITEM **items)
diff --git a/menu/m_attribs.c b/menu/m_attribs.c
index 1126ffb84f5a..c41d558ec994 100644
--- a/menu/m_attribs.c
+++ b/menu/m_attribs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_attribs.c,v 1.14 2004/12/11 23:29:12 tom Exp $")
+MODULE_ID("$Id: m_attribs.c,v 1.16 2010/01/23 21:16:54 tom Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
@@ -49,9 +49,9 @@ MODULE_ID("$Id: m_attribs.c,v 1.14 2004/12/11 23:29:12 tom Exp $")
/* "Template" macro to generate a function to set a menus attribute */
#define GEN_MENU_ATTR_SET_FCT( name ) \
-NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\
+NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
{\
- T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr)));\
+ T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr))); \
if (!(attr==A_NORMAL || (attr & A_ATTRIBUTES)==attr))\
RETURN(E_BAD_ARGUMENT);\
if (menu && ( menu -> name != attr))\
@@ -67,7 +67,7 @@ NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\
#define GEN_MENU_ATTR_GET_FCT( name ) \
NCURSES_IMPEXP chtype NCURSES_API menu_ ## name (const MENU * menu)\
{\
- T((T_CALLED("menu_" #name "(%p)"), menu));\
+ T((T_CALLED("menu_" #name "(%p)"), (const void *) menu));\
returnAttr(Normalize_Menu( menu ) -> name);\
}
@@ -140,4 +140,5 @@ GEN_MENU_ATTR_SET_FCT(grey)
| Return Values : Attribute value
+--------------------------------------------------------------------------*/
GEN_MENU_ATTR_GET_FCT(grey)
+
/* m_attribs.c ends here */
diff --git a/menu/m_cursor.c b/menu/m_cursor.c
index 0293f9073c32..9891de4a9450 100644
--- a/menu/m_cursor.c
+++ b/menu/m_cursor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_cursor.c,v 1.20 2005/10/22 23:03:32 tom Exp $")
+MODULE_ID("$Id: m_cursor.c,v 1.22 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -86,11 +86,11 @@ pos_menu_cursor(const MENU * menu)
int x = 0, y = 0;
int err = _nc_menu_cursor_pos(menu, (ITEM *) 0, &y, &x);
- T((T_CALLED("pos_menu_cursor(%p)"), menu));
+ T((T_CALLED("pos_menu_cursor(%p)"), (const void *)menu));
if (E_OK == err)
{
- win = menu->userwin ? menu->userwin : stdscr;
+ win = Get_Menu_UserWin(menu);
sub = menu->usersub ? menu->usersub : win;
assert(win && sub);
diff --git a/menu/m_driver.c b/menu/m_driver.c
index d418e6a22557..deeff4710c08 100644
--- a/menu/m_driver.c
+++ b/menu/m_driver.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_driver.c,v 1.27 2008/08/03 22:08:22 tom Exp $")
+MODULE_ID("$Id: m_driver.c,v 1.29 2010/01/23 21:20:10 tom Exp $")
/* Macros */
@@ -121,7 +121,8 @@ _nc_Match_Next_Character_In_Item_Name
bool found = FALSE, passed = FALSE;
int idx, last;
- T((T_CALLED("_nc_Match_Next_Character(%p,%d,%p)"), menu, ch, item));
+ T((T_CALLED("_nc_Match_Next_Character(%p,%d,%p)"),
+ (void *)menu, ch, (void *)item));
assert(menu && item && *item);
idx = (*item)->index;
@@ -197,7 +198,7 @@ _nc_Match_Next_Character_In_Item_Name
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int menu_driver(MENU *menu, int c)
+| Function : int menu_driver(MENU* menu, int c)
|
| Description : Central dispatcher for the menu. Translates the logical
| request 'c' into a menu action.
@@ -220,7 +221,7 @@ menu_driver(MENU * menu, int c)
ITEM *item;
int my_top_row, rdiff;
- T((T_CALLED("menu_driver(%p,%d)"), menu, c));
+ T((T_CALLED("menu_driver(%p,%d)"), (void *)menu, c));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_format.c b/menu/m_format.c
index 773cb27e774f..8e68a036ee2e 100644
--- a/menu/m_format.c
+++ b/menu/m_format.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_format.c,v 1.15 2004/12/11 23:11:21 tom Exp $")
+MODULE_ID("$Id: m_format.c,v 1.16 2010/01/23 21:20:10 tom Exp $")
#define minimum(a,b) ((a)<(b) ? (a): (b))
@@ -60,7 +60,7 @@ set_menu_format(MENU * menu, int rows, int cols)
{
int total_rows, total_cols;
- T((T_CALLED("set_menu_format(%p,%d,%d)"), menu, rows, cols));
+ T((T_CALLED("set_menu_format(%p,%d,%d)"), (void *)menu, rows, cols));
if (rows < 0 || cols < 0)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_global.c b/menu/m_global.c
index 28e836dd644e..90f6f25925b7 100644
--- a/menu/m_global.c
+++ b/menu/m_global.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_global.c,v 1.23 2005/12/31 21:51:52 tom Exp $")
+MODULE_ID("$Id: m_global.c,v 1.25 2010/01/23 21:20:10 tom Exp $")
static char mark[] = "-";
/* *INDENT-OFF* */
@@ -253,7 +253,7 @@ _nc_Calculate_Text_Width(const TEXT * item /*FIXME: limit length */ )
#if USE_WIDEC_SUPPORT
int result = item->length;
- T((T_CALLED("_nc_menu_text_width(%p)"), item));
+ T((T_CALLED("_nc_menu_text_width(%p)"), (const void *)item));
if (result != 0 && item->str != 0)
{
int count = mbstowcs(0, item->str, 0);
@@ -496,7 +496,7 @@ _nc_Link_Items(MENU * menu)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : void _nc_Show_Menu(const MENU *menu)
+| Function : void _nc_Show_Menu(const MENU* menu)
|
| Description : Update the window that is associated with the menu
|
@@ -543,8 +543,10 @@ _nc_Show_Menu(const MENU * menu)
| Return Values : -
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void)
- _nc_New_TopRow_and_CurrentItem
- (MENU * menu, int new_toprow, ITEM * new_current_item)
+_nc_New_TopRow_and_CurrentItem(
+ MENU * menu,
+ int new_toprow,
+ ITEM * new_current_item)
{
ITEM *cur_item;
bool mterm_called = FALSE;
diff --git a/menu/m_hook.c b/menu/m_hook.c
index 8d768a303ffc..6125d052e7a2 100644
--- a/menu/m_hook.c
+++ b/menu/m_hook.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_hook.c,v 1.14 2004/12/25 21:39:52 tom Exp $")
+MODULE_ID("$Id: m_hook.c,v 1.15 2010/01/23 21:16:54 tom Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
@@ -52,7 +52,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (MENU *menu, Menu_Hook f
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
NCURSES_IMPEXP Menu_Hook NCURSES_API typ ## _ ## name ( const MENU *menu )\
{\
- T((T_CALLED(#typ "_" #name "(%p)"), menu));\
+ T((T_CALLED(#typ "_" #name "(%p)"), (const void *) menu));\
returnMenuHook(Normalize_Menu(menu) -> typ ## name);\
}
diff --git a/menu/m_item_cur.c b/menu/m_item_cur.c
index dac12ed91c5e..18b1a2726af6 100644
--- a/menu/m_item_cur.c
+++ b/menu/m_item_cur.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_cur.c,v 1.17 2004/12/25 21:57:38 tom Exp $")
+MODULE_ID("$Id: m_item_cur.c,v 1.18 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_cur.c,v 1.17 2004/12/25 21:57:38 tom Exp $")
NCURSES_EXPORT(int)
set_current_item(MENU * menu, ITEM * item)
{
- T((T_CALLED("set_current_item(%p,%p)"), menu, item));
+ T((T_CALLED("set_current_item(%p,%p)"), (void *)menu, (void *)item));
if (menu && item && (item->imenu == menu))
{
@@ -91,7 +91,7 @@ set_current_item(MENU * menu, ITEM * item)
NCURSES_EXPORT(ITEM *)
current_item(const MENU * menu)
{
- T((T_CALLED("current_item(%p)"), menu));
+ T((T_CALLED("current_item(%p)"), (const void *)menu));
returnItem((menu && menu->items) ? menu->curitem : (ITEM *) 0);
}
@@ -106,7 +106,7 @@ current_item(const MENU * menu)
NCURSES_EXPORT(int)
item_index(const ITEM * item)
{
- T((T_CALLED("item_index(%p)"), item));
+ T((T_CALLED("item_index(%p)"), (const void *)item));
returnCode((item && item->imenu) ? item->index : ERR);
}
diff --git a/menu/m_item_nam.c b/menu/m_item_nam.c
index 05a169340b45..3ed1d37668a2 100644
--- a/menu/m_item_nam.c
+++ b/menu/m_item_nam.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_nam.c,v 1.14 2004/12/25 21:41:54 tom Exp $")
+MODULE_ID("$Id: m_item_nam.c,v 1.15 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -50,7 +50,7 @@ MODULE_ID("$Id: m_item_nam.c,v 1.14 2004/12/25 21:41:54 tom Exp $")
NCURSES_EXPORT(const char *)
item_name(const ITEM * item)
{
- T((T_CALLED("item_name(%p)"), item));
+ T((T_CALLED("item_name(%p)"), (const void *)item));
returnCPtr((item) ? item->name.str : (char *)0);
}
@@ -65,7 +65,7 @@ item_name(const ITEM * item)
NCURSES_EXPORT(const char *)
item_description(const ITEM * item)
{
- T((T_CALLED("item_description(%p)"), item));
+ T((T_CALLED("item_description(%p)"), (const void *)item));
returnCPtr((item) ? item->description.str : (char *)0);
}
diff --git a/menu/m_item_new.c b/menu/m_item_new.c
index d7fe1f8542c2..1debc2b34401 100644
--- a/menu/m_item_new.c
+++ b/menu/m_item_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,7 +44,7 @@
#endif
#endif
-MODULE_ID("$Id: m_item_new.c,v 1.27 2006/12/17 19:47:09 tom Exp $")
+MODULE_ID("$Id: m_item_new.c,v 1.30 2010/01/23 21:20:11 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -122,7 +122,7 @@ new_item(const char *name, const char *description)
}
else
{
- item = (ITEM *) calloc(1, sizeof(ITEM));
+ item = typeCalloc(ITEM, 1);
if (item)
{
*item = _nc_Default_Item; /* hope we have struct assignment */
@@ -162,7 +162,7 @@ new_item(const char *name, const char *description)
NCURSES_EXPORT(int)
free_item(ITEM * item)
{
- T((T_CALLED("free_item(%p)"), item));
+ T((T_CALLED("free_item(%p)"), (void *)item));
if (!item)
RETURN(E_BAD_ARGUMENT);
@@ -197,7 +197,7 @@ set_menu_mark(MENU * menu, const char *mark)
{
unsigned l;
- T((T_CALLED("set_menu_mark(%p,%s)"), menu, _nc_visbuf(mark)));
+ T((T_CALLED("set_menu_mark(%p,%s)"), (void *)menu, _nc_visbuf(mark)));
if (mark && (*mark != '\0') && Is_Printable_String(mark))
l = strlen(mark);
@@ -219,7 +219,7 @@ set_menu_mark(MENU * menu, const char *mark)
menu->marklen = l;
if (l)
{
- menu->mark = (char *)malloc(l + 1);
+ menu->mark = strdup(mark);
if (menu->mark)
{
strcpy(menu->mark, mark);
@@ -229,6 +229,7 @@ set_menu_mark(MENU * menu, const char *mark)
else
{
menu->mark = old_mark;
+ menu->marklen = (old_mark != 0) ? strlen(old_mark) : 0;
RETURN(E_SYSTEM_ERROR);
}
}
@@ -267,7 +268,7 @@ set_menu_mark(MENU * menu, const char *mark)
NCURSES_EXPORT(const char *)
menu_mark(const MENU * menu)
{
- T((T_CALLED("menu_mark(%p)"), menu));
+ T((T_CALLED("menu_mark(%p)"), (const void *)menu));
returnPtr(Normalize_Menu(menu)->mark);
}
diff --git a/menu/m_item_opt.c b/menu/m_item_opt.c
index cfe7b75db392..91385da1217c 100644
--- a/menu/m_item_opt.c
+++ b/menu/m_item_opt.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_opt.c,v 1.17 2004/12/25 21:32:54 tom Exp $")
+MODULE_ID("$Id: m_item_opt.c,v 1.18 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -53,7 +53,7 @@ MODULE_ID("$Id: m_item_opt.c,v 1.17 2004/12/25 21:32:54 tom Exp $")
NCURSES_EXPORT(int)
set_item_opts(ITEM * item, Item_Options opts)
{
- T((T_CALLED("set_menu_opts(%p,%d)"), item, opts));
+ T((T_CALLED("set_menu_opts(%p,%d)"), (void *)item, opts));
opts &= ALL_ITEM_OPTS;
@@ -100,7 +100,7 @@ item_opts_off(ITEM * item, Item_Options opts)
NULL item itself to adjust its behavior */
- T((T_CALLED("item_opts_off(%p,%d)"), item, opts));
+ T((T_CALLED("item_opts_off(%p,%d)"), (void *)item, opts));
if (opts & ~ALL_ITEM_OPTS)
RETURN(E_BAD_ARGUMENT);
@@ -128,7 +128,7 @@ item_opts_on(ITEM * item, Item_Options opts)
NULL item itself to adjust its behavior */
- T((T_CALLED("item_opts_on(%p,%d)"), item, opts));
+ T((T_CALLED("item_opts_on(%p,%d)"), (void *)item, opts));
opts &= ALL_ITEM_OPTS;
if (opts & ~ALL_ITEM_OPTS)
@@ -152,7 +152,7 @@ item_opts_on(ITEM * item, Item_Options opts)
NCURSES_EXPORT(Item_Options)
item_opts(const ITEM * item)
{
- T((T_CALLED("item_opts(%p)"), item));
+ T((T_CALLED("item_opts(%p)"), (const void *)item));
returnItemOpts(ALL_ITEM_OPTS & Normalize_Item(item)->opt);
}
diff --git a/menu/m_item_top.c b/menu/m_item_top.c
index 7268a0e49f15..752e20d9edbb 100644
--- a/menu/m_item_top.c
+++ b/menu/m_item_top.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_top.c,v 1.10 2004/12/11 23:29:34 tom Exp $")
+MODULE_ID("$Id: m_item_top.c,v 1.11 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -54,7 +54,7 @@ set_top_row(MENU * menu, int row)
{
ITEM *item;
- T((T_CALLED("set_top_row(%p,%d)"), menu, row));
+ T((T_CALLED("set_top_row(%p,%d)"), (void *)menu, row));
if (menu)
{
@@ -94,7 +94,7 @@ set_top_row(MENU * menu, int row)
NCURSES_EXPORT(int)
top_row(const MENU * menu)
{
- T((T_CALLED("top_row(%p)"), menu));
+ T((T_CALLED("top_row(%p)"), (const void *)menu));
if (menu && menu->items && *(menu->items))
{
assert((menu->toprow >= 0) && (menu->toprow < menu->rows));
diff --git a/menu/m_item_use.c b/menu/m_item_use.c
index 06a5baf984e8..8cf294bc29e3 100644
--- a/menu/m_item_use.c
+++ b/menu/m_item_use.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_use.c,v 1.16 2004/12/25 21:33:31 tom Exp $")
+MODULE_ID("$Id: m_item_use.c,v 1.17 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_item_use.c,v 1.16 2004/12/25 21:33:31 tom Exp $")
NCURSES_EXPORT(int)
set_item_userptr(ITEM * item, void *userptr)
{
- T((T_CALLED("set_item_userptr(%p,%p)"), item, userptr));
+ T((T_CALLED("set_item_userptr(%p,%p)"), (void *)item, (void *)userptr));
Normalize_Item(item)->userptr = userptr;
RETURN(E_OK);
}
@@ -69,7 +69,7 @@ set_item_userptr(ITEM * item, void *userptr)
NCURSES_EXPORT(void *)
item_userptr(const ITEM * item)
{
- T((T_CALLED("item_userptr(%p)"), item));
+ T((T_CALLED("item_userptr(%p)"), (const void *)item));
returnVoidPtr(Normalize_Item(item)->userptr);
}
diff --git a/menu/m_item_val.c b/menu/m_item_val.c
index cebf693fbd34..337dbfcc6808 100644
--- a/menu/m_item_val.c
+++ b/menu/m_item_val.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_val.c,v 1.14 2004/12/11 23:29:34 tom Exp $")
+MODULE_ID("$Id: m_item_val.c,v 1.15 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -57,7 +57,7 @@ set_item_value(ITEM * item, bool value)
{
MENU *menu;
- T((T_CALLED("set_item_value(%p,%d)"), item, value));
+ T((T_CALLED("set_item_value(%p,%d)"), (void *)item, value));
if (item)
{
menu = item->imenu;
@@ -97,7 +97,7 @@ set_item_value(ITEM * item, bool value)
NCURSES_EXPORT(bool)
item_value(const ITEM * item)
{
- T((T_CALLED("item_value(%p)"), item));
+ T((T_CALLED("item_value(%p)"), (const void *)item));
returnBool((Normalize_Item(item)->value) ? TRUE : FALSE);
}
diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c
index f8fb97f028cb..ff8474054370 100644
--- a/menu/m_item_vis.c
+++ b/menu/m_item_vis.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_item_vis.c,v 1.15 2004/12/25 21:40:09 tom Exp $")
+MODULE_ID("$Id: m_item_vis.c,v 1.16 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -54,7 +54,7 @@ item_visible(const ITEM * item)
{
MENU *menu;
- T((T_CALLED("item_visible(%p)"), item));
+ T((T_CALLED("item_visible(%p)"), (const void *)item));
if (item &&
(menu = item->imenu) &&
(menu->status & _POSTED) &&
diff --git a/menu/m_items.c b/menu/m_items.c
index 3e8f70b0fa7d..539768551d80 100644
--- a/menu/m_items.c
+++ b/menu/m_items.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_items.c,v 1.16 2005/01/16 01:02:23 tom Exp $")
+MODULE_ID("$Id: m_items.c,v 1.17 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -55,7 +55,7 @@ MODULE_ID("$Id: m_items.c,v 1.16 2005/01/16 01:02:23 tom Exp $")
NCURSES_EXPORT(int)
set_menu_items(MENU * menu, ITEM ** items)
{
- T((T_CALLED("set_menu_items(%p,%p)"), menu, items));
+ T((T_CALLED("set_menu_items(%p,%p)"), (void *)menu, (void *)items));
if (!menu || (items && !(*items)))
RETURN(E_BAD_ARGUMENT);
@@ -87,7 +87,7 @@ set_menu_items(MENU * menu, ITEM ** items)
NCURSES_EXPORT(ITEM **)
menu_items(const MENU * menu)
{
- T((T_CALLED("menu_items(%p)"), menu));
+ T((T_CALLED("menu_items(%p)"), (const void *)menu));
returnItemPtr(menu ? menu->items : (ITEM **) 0);
}
@@ -103,7 +103,7 @@ menu_items(const MENU * menu)
NCURSES_EXPORT(int)
item_count(const MENU * menu)
{
- T((T_CALLED("item_count(%p)"), menu));
+ T((T_CALLED("item_count(%p)"), (const void *)menu));
returnCode(menu ? menu->nitems : -1);
}
diff --git a/menu/m_new.c b/menu/m_new.c
index c20c66517790..79f9292a7b3c 100644
--- a/menu/m_new.c
+++ b/menu/m_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,11 +37,11 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_new.c,v 1.18 2006/11/04 19:04:06 tom Exp $")
+MODULE_ID("$Id: m_new.c,v 1.21 2010/01/23 21:20:11 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : MENU *new_menu(ITEM **items)
+| Function : MENU* _nc_new_menu(SCREEN*, ITEM **items)
|
| Description : Creates a new menu connected to the item pointer
| array items and returns a pointer to the new menu.
@@ -51,18 +51,25 @@ MODULE_ID("$Id: m_new.c,v 1.18 2006/11/04 19:04:06 tom Exp $")
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(MENU *)
-new_menu(ITEM ** items)
+NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
{
int err = E_SYSTEM_ERROR;
- MENU *menu = (MENU *) calloc(1, sizeof(MENU));
+ MENU *menu = typeCalloc(MENU, 1);
- T((T_CALLED("new_menu(%p)"), items));
+ T((T_CALLED("new_menu(%p,%p)"), (void *)SP_PARM, (void *)items));
if (menu)
{
*menu = _nc_Default_Menu;
menu->status = 0;
menu->rows = menu->frows;
menu->cols = menu->fcols;
+#if NCURSES_SP_FUNCS
+ /* This ensures userwin and usersub are always non-null,
+ so we can derive always the SCREEN that this menu is
+ running on. */
+ menu->userwin = SP_PARM->_stdscr;
+ menu->usersub = SP_PARM->_stdscr;
+#endif
if (items && *items)
{
if (!_nc_Connect_Items(menu, items))
@@ -71,6 +78,8 @@ new_menu(ITEM ** items)
free(menu);
menu = (MENU *) 0;
}
+ else
+ err = E_OK;
}
}
@@ -82,6 +91,25 @@ new_menu(ITEM ** items)
/*---------------------------------------------------------------------------
| Facility : libnmenu
+| Function : MENU *new_menu(ITEM **items)
+|
+| Description : Creates a new menu connected to the item pointer
+| array items and returns a pointer to the new menu.
+| The new menu is initialized with the values from the
+| default menu.
+|
+| Return Values : NULL on error
++--------------------------------------------------------------------------*/
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(MENU *)
+new_menu(ITEM ** items)
+{
+ return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
+}
+#endif
+
+/*---------------------------------------------------------------------------
+| Facility : libnmenu
| Function : int free_menu(MENU *menu)
|
| Description : Disconnects menu from its associated item pointer
@@ -94,7 +122,7 @@ new_menu(ITEM ** items)
NCURSES_EXPORT(int)
free_menu(MENU * menu)
{
- T((T_CALLED("free_menu(%p)"), menu));
+ T((T_CALLED("free_menu(%p)"), (void *)menu));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_opts.c b/menu/m_opts.c
index a7370b06f8e5..bc6924b65149 100644
--- a/menu/m_opts.c
+++ b/menu/m_opts.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_opts.c,v 1.19 2004/12/25 21:36:12 tom Exp $")
+MODULE_ID("$Id: m_opts.c,v 1.20 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -55,7 +55,7 @@ MODULE_ID("$Id: m_opts.c,v 1.19 2004/12/25 21:36:12 tom Exp $")
NCURSES_EXPORT(int)
set_menu_opts(MENU * menu, Menu_Options opts)
{
- T((T_CALLED("set_menu_opts(%p,%d)"), menu, opts));
+ T((T_CALLED("set_menu_opts(%p,%d)"), (void *)menu, opts));
opts &= ALL_MENU_OPTS;
@@ -119,7 +119,7 @@ menu_opts_off(MENU * menu, Menu_Options opts)
NULL menu itself to adjust its behavior */
- T((T_CALLED("menu_opts_off(%p,%d)"), menu, opts));
+ T((T_CALLED("menu_opts_off(%p,%d)"), (void *)menu, opts));
opts &= ALL_MENU_OPTS;
if (opts & ~ALL_MENU_OPTS)
@@ -152,7 +152,7 @@ menu_opts_on(MENU * menu, Menu_Options opts)
NULL menu itself to adjust its behavior */
- T((T_CALLED("menu_opts_on(%p,%d)"), menu, opts));
+ T((T_CALLED("menu_opts_on(%p,%d)"), (void *)menu, opts));
opts &= ALL_MENU_OPTS;
if (opts & ~ALL_MENU_OPTS)
@@ -176,7 +176,7 @@ menu_opts_on(MENU * menu, Menu_Options opts)
NCURSES_EXPORT(Menu_Options)
menu_opts(const MENU * menu)
{
- T((T_CALLED("menu_opts(%p)"), menu));
+ T((T_CALLED("menu_opts(%p)"), (const void *)menu));
returnMenuOpts(ALL_MENU_OPTS & Normalize_Menu(menu)->opt);
}
diff --git a/menu/m_pad.c b/menu/m_pad.c
index 76083ba36d34..caa2f9e207b1 100644
--- a/menu/m_pad.c
+++ b/menu/m_pad.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,19 +37,19 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_pad.c,v 1.10 2004/12/25 21:40:58 tom Exp $")
+MODULE_ID("$Id: m_pad.c,v 1.12 2010/01/23 21:20:10 tom Exp $")
/* Macro to redraw menu if it is posted and changed */
#define Refresh_Menu(menu) \
if ( (menu) && ((menu)->status & _POSTED) )\
{\
_nc_Draw_Menu( menu );\
- _nc_Show_Menu( menu );\
+ _nc_Show_Menu( menu ); \
}
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int set_menu_pad(MENU *menu, int pad)
+| Function : int set_menu_pad(MENU* menu, int pad)
|
| Description : Set the character to be used to separate the item name
| from its description. This must be a printable
@@ -63,7 +63,7 @@ set_menu_pad(MENU * menu, int pad)
{
bool do_refresh = (menu != (MENU *) 0);
- T((T_CALLED("set_menu_pad(%p,%d)"), menu, pad));
+ T((T_CALLED("set_menu_pad(%p,%d)"), (void *)menu, pad));
if (!isprint(UChar(pad)))
RETURN(E_BAD_ARGUMENT);
@@ -88,7 +88,7 @@ set_menu_pad(MENU * menu, int pad)
NCURSES_EXPORT(int)
menu_pad(const MENU * menu)
{
- T((T_CALLED("menu_pad(%p)"), menu));
+ T((T_CALLED("menu_pad(%p)"), (const void *)menu));
returnCode(Normalize_Menu(menu)->pad);
}
diff --git a/menu/m_pattern.c b/menu/m_pattern.c
index 1171390e214c..1764d05fbc0c 100644
--- a/menu/m_pattern.c
+++ b/menu/m_pattern.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_pattern.c,v 1.15 2006/11/04 18:46:39 tom Exp $")
+MODULE_ID("$Id: m_pattern.c,v 1.16 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -55,7 +55,7 @@ menu_pattern(const MENU * menu)
{
static char empty[] = "";
- T((T_CALLED("menu_pattern(%p)"), menu));
+ T((T_CALLED("menu_pattern(%p)"), (const void *)menu));
returnPtr(menu ? (menu->pattern ? menu->pattern : empty) : 0);
}
@@ -78,7 +78,7 @@ set_menu_pattern(MENU * menu, const char *p)
ITEM *matchitem;
int matchpos;
- T((T_CALLED("set_menu_pattern(%p,%s)"), menu, _nc_visbuf(p)));
+ T((T_CALLED("set_menu_pattern(%p,%s)"), (void *)menu, _nc_visbuf(p)));
if (!menu || !p)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_post.c b/menu/m_post.c
index 657d0f18420b..1f0b623ed456 100644
--- a/menu/m_post.c
+++ b/menu/m_post.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_post.c,v 1.26 2004/12/25 23:57:04 tom Exp $")
+MODULE_ID("$Id: m_post.c,v 1.29 2010/05/01 19:18:27 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -171,7 +171,7 @@ _nc_Post_Item(const MENU * menu, const ITEM * item)
waddch(menu->win, ' ');
}
if ((cy + j) < getmaxy(menu->win))
- mvwaddch(menu->win, cy + j, cx - 1, menu->pad);
+ (void)mvwaddch(menu->win, cy + j, cx - 1, menu->pad);
}
wmove(menu->win, ncy, ncx);
if (!isback)
@@ -255,7 +255,7 @@ _nc_Draw_Menu(const MENU * menu)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int post_menu(MENU *)
+| Function : int post_menu(MENU* menu)
|
| Description : Post a menu to the screen. This makes it visible.
|
@@ -269,7 +269,7 @@ _nc_Draw_Menu(const MENU * menu)
NCURSES_EXPORT(int)
post_menu(MENU * menu)
{
- T((T_CALLED("post_menu(%p)"), menu));
+ T((T_CALLED("post_menu(%p)"), (void *)menu));
if (!menu)
RETURN(E_BAD_ARGUMENT);
@@ -329,7 +329,7 @@ post_menu(MENU * menu)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : int unpost_menu(MENU *)
+| Function : int unpost_menu(MENU*)
|
| Description : Detach menu from screen
|
@@ -343,7 +343,7 @@ unpost_menu(MENU * menu)
{
WINDOW *win;
- T((T_CALLED("unpost_menu(%p)"), menu));
+ T((T_CALLED("unpost_menu(%p)"), (void *)menu));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_req_name.c b/menu/m_req_name.c
index 6fd51b1c361e..cad875802071 100644
--- a/menu/m_req_name.c
+++ b/menu/m_req_name.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_req_name.c,v 1.20 2008/09/13 18:59:17 tom Exp $")
+MODULE_ID("$Id: m_req_name.c,v 1.21 2009/10/10 16:17:23 tom Exp $")
static const char *request_names[MAX_MENU_COMMAND - MIN_MENU_COMMAND + 1] =
{
@@ -109,7 +109,7 @@ menu_request_by_name(const char *str)
strncpy(buf, str, sizeof(buf));
while ((i < sizeof(buf)) && (buf[i] != '\0'))
{
- buf[i] = toupper(UChar(buf[i]));
+ buf[i] = (char)toupper(UChar(buf[i]));
i++;
}
diff --git a/menu/m_scale.c b/menu/m_scale.c
index 96c2d84eb3af..068a1cc8c538 100644
--- a/menu/m_scale.c
+++ b/menu/m_scale.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_scale.c,v 1.9 2004/12/11 23:29:34 tom Exp $")
+MODULE_ID("$Id: m_scale.c,v 1.10 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -53,7 +53,10 @@ MODULE_ID("$Id: m_scale.c,v 1.9 2004/12/11 23:29:34 tom Exp $")
NCURSES_EXPORT(int)
scale_menu(const MENU * menu, int *rows, int *cols)
{
- T((T_CALLED("scale_menu(%p,%p,%p)"), menu, rows, cols));
+ T((T_CALLED("scale_menu(%p,%p,%p)"),
+ (const void *)menu,
+ (void *)rows,
+ (void *)cols));
if (!menu)
RETURN(E_BAD_ARGUMENT);
diff --git a/menu/m_spacing.c b/menu/m_spacing.c
index 039bbe4d59b1..1cfa2e166571 100644
--- a/menu/m_spacing.c
+++ b/menu/m_spacing.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_spacing.c,v 1.17 2004/12/11 23:29:34 tom Exp $")
+MODULE_ID("$Id: m_spacing.c,v 1.18 2010/01/23 21:20:10 tom Exp $")
#define MAX_SPC_DESC ((TABSIZE) ? (TABSIZE) : 8)
#define MAX_SPC_COLS ((TABSIZE) ? (TABSIZE) : 8)
@@ -56,7 +56,8 @@ set_menu_spacing(MENU * menu, int s_desc, int s_row, int s_col)
{
MENU *m; /* split for ATAC workaround */
- T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"), menu, s_desc, s_row, s_col));
+ T((T_CALLED("set_menu_spacing(%p,%d,%d,%d)"),
+ (void *)menu, s_desc, s_row, s_col));
m = Normalize_Menu(menu);
@@ -90,7 +91,11 @@ menu_spacing(const MENU * menu, int *s_desc, int *s_row, int *s_col)
{
const MENU *m; /* split for ATAC workaround */
- T((T_CALLED("menu_spacing(%p,%p,%p,%p)"), menu, s_desc, s_row, s_col));
+ T((T_CALLED("menu_spacing(%p,%p,%p,%p)"),
+ (const void *)menu,
+ (void *)s_desc,
+ (void *)s_row,
+ (void *)s_col));
m = Normalize_Menu(menu);
diff --git a/menu/m_sub.c b/menu/m_sub.c
index 82649c57b130..37529a08b295 100644
--- a/menu/m_sub.c
+++ b/menu/m_sub.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_sub.c,v 1.10 2004/12/25 21:38:31 tom Exp $")
+MODULE_ID("$Id: m_sub.c,v 1.12 2010/01/23 21:20:11 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,14 +51,28 @@ MODULE_ID("$Id: m_sub.c,v 1.10 2004/12/25 21:38:31 tom Exp $")
NCURSES_EXPORT(int)
set_menu_sub(MENU * menu, WINDOW *win)
{
- T((T_CALLED("set_menu_sub(%p,%p)"), menu, win));
+ T((T_CALLED("set_menu_sub(%p,%p)"), (void *)menu, (void *)win));
if (menu)
{
if (menu->status & _POSTED)
RETURN(E_POSTED);
- menu->usersub = win;
- _nc_Calculate_Item_Length_and_Width(menu);
+ else
+#if NCURSES_SP_FUNCS
+ {
+ /* We ensure that usersub is never null. So even if a null
+ WINDOW parameter is passed, we store the SCREENS stdscr.
+ The only MENU that can have a null usersub is the static
+ _nc_default_Menu.
+ */
+ SCREEN *sp = _nc_screen_of(menu->usersub);
+
+ menu->usersub = win ? win : sp->_stdscr;
+ _nc_Calculate_Item_Length_and_Width(menu);
+ }
+#else
+ menu->usersub = win;
+#endif
}
else
_nc_Default_Menu.usersub = win;
@@ -68,7 +82,7 @@ set_menu_sub(MENU * menu, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : WINDOW *menu_sub(const MENU *menu)
+| Function : WINDOW* menu_sub(const MENU *menu)
|
| Description : Returns a pointer to the subwindow of the menu
|
@@ -79,7 +93,7 @@ menu_sub(const MENU * menu)
{
const MENU *m = Normalize_Menu(menu);
- T((T_CALLED("menu_sub(%p)"), menu));
+ T((T_CALLED("menu_sub(%p)"), (const void *)menu));
returnWin(Get_Menu_Window(m));
}
diff --git a/menu/m_trace.c b/menu/m_trace.c
index 0f9f90273a6a..094ff86c67a9 100644
--- a/menu/m_trace.c
+++ b/menu/m_trace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2004-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,19 +32,19 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_trace.c,v 1.3 2005/01/16 01:06:11 tom Exp $")
+MODULE_ID("$Id: m_trace.c,v 1.4 2010/01/23 21:20:10 tom Exp $")
NCURSES_EXPORT(ITEM *)
_nc_retrace_item(ITEM * code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(ITEM **)
_nc_retrace_item_ptr(ITEM ** code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
@@ -58,7 +58,7 @@ _nc_retrace_item_opts(Item_Options code)
NCURSES_EXPORT(MENU *)
_nc_retrace_menu(MENU * code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *)code));
return code;
}
diff --git a/menu/m_userptr.c b/menu/m_userptr.c
index 7b178b25a175..a7359c99d0eb 100644
--- a/menu/m_userptr.c
+++ b/menu/m_userptr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_userptr.c,v 1.16 2004/12/25 21:38:55 tom Exp $")
+MODULE_ID("$Id: m_userptr.c,v 1.17 2010/01/23 21:20:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,7 +51,7 @@ MODULE_ID("$Id: m_userptr.c,v 1.16 2004/12/25 21:38:55 tom Exp $")
NCURSES_EXPORT(int)
set_menu_userptr(MENU * menu, void *userptr)
{
- T((T_CALLED("set_menu_userptr(%p,%p)"), menu, userptr));
+ T((T_CALLED("set_menu_userptr(%p,%p)"), (void *)menu, (void *)userptr));
Normalize_Menu(menu)->userptr = userptr;
RETURN(E_OK);
}
@@ -69,7 +69,7 @@ set_menu_userptr(MENU * menu, void *userptr)
NCURSES_EXPORT(void *)
menu_userptr(const MENU * menu)
{
- T((T_CALLED("menu_userptr(%p)"), menu));
+ T((T_CALLED("menu_userptr(%p)"), (const void *)menu));
returnVoidPtr(Normalize_Menu(menu)->userptr);
}
diff --git a/menu/m_win.c b/menu/m_win.c
index c3f857f71688..d88fa674c608 100644
--- a/menu/m_win.c
+++ b/menu/m_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include "menu.priv.h"
-MODULE_ID("$Id: m_win.c,v 1.15 2004/12/25 21:39:20 tom Exp $")
+MODULE_ID("$Id: m_win.c,v 1.17 2010/01/23 21:20:11 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnmenu
@@ -51,14 +51,28 @@ MODULE_ID("$Id: m_win.c,v 1.15 2004/12/25 21:39:20 tom Exp $")
NCURSES_EXPORT(int)
set_menu_win(MENU * menu, WINDOW *win)
{
- T((T_CALLED("set_menu_win(%p,%p)"), menu, win));
+ T((T_CALLED("set_menu_win(%p,%p)"), (void *)menu, (void *)win));
if (menu)
{
if (menu->status & _POSTED)
RETURN(E_POSTED);
- menu->userwin = win;
- _nc_Calculate_Item_Length_and_Width(menu);
+ else
+#if NCURSES_SP_FUNCS
+ {
+ /* We ensure that userwin is never null. So even if a null
+ WINDOW parameter is passed, we store the SCREENS stdscr.
+ The only MENU that can have a null userwin is the static
+ _nc_default_Menu.
+ */
+ SCREEN *sp = _nc_screen_of(menu->userwin);
+
+ menu->userwin = win ? win : sp->_stdscr;
+ _nc_Calculate_Item_Length_and_Width(menu);
+ }
+#else
+ menu->userwin = win;
+#endif
}
else
_nc_Default_Menu.userwin = win;
@@ -68,7 +82,7 @@ set_menu_win(MENU * menu, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnmenu
-| Function : WINDOW *menu_win(const MENU *)
+| Function : WINDOW* menu_win(const MENU*)
|
| Description : Returns pointer to the window of the menu
|
@@ -79,8 +93,8 @@ menu_win(const MENU * menu)
{
const MENU *m = Normalize_Menu(menu);
- T((T_CALLED("menu_win(%p)"), menu));
- returnWin(m->userwin ? m->userwin : stdscr);
+ T((T_CALLED("menu_win(%p)"), (const void *)menu));
+ returnWin(Get_Menu_UserWin(m));
}
/* m_win.c ends here */
diff --git a/menu/menu.h b/menu/menu.h
index 84352eb5d2f6..4eeac018bdb3 100644
--- a/menu/menu.h
+++ b/menu/menu.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
-/* $Id: menu.h,v 1.19 2007/02/24 17:32:13 tom Exp $ */
+/* $Id: menu.h,v 1.20 2009/04/05 00:28:07 tom Exp $ */
#ifndef ETI_MENU
#define ETI_MENU
@@ -249,6 +249,10 @@ extern NCURSES_EXPORT(bool) item_visible (const ITEM *);
extern NCURSES_EXPORT(void) menu_format (const MENU *,int *,int *);
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(MENU *) NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/menu/menu.priv.h b/menu/menu.priv.h
index 10d3537594da..99580a38d1c2 100644
--- a/menu/menu.priv.h
+++ b/menu/menu.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
-/* $Id: menu.priv.h,v 1.22 2005/01/16 01:02:23 tom Exp $ */
+/* $Id: menu.priv.h,v 1.23 2009/02/28 21:02:57 juergen Exp $ */
/***************************************************************************
* Module menu.priv.h *
@@ -56,8 +56,12 @@ extern NCURSES_EXPORT_VAR(MENU) _nc_Default_Menu;
/* Normalize menu to default if none was given */
#define Normalize_Menu( menu ) ((menu)=(menu)?(menu):&_nc_Default_Menu)
+#define Get_Menu_Screen( menu ) (menu->userwin ? \
+ _nc_screen_of(menu->userwin) : CURRENT_SCREEN)
+
/* Get the user defined (framing) window of the menu */
-#define Get_Menu_UserWin(menu) ((menu)->userwin ? (menu)->userwin : stdscr)
+#define Get_Menu_UserWin(menu) ((menu)->userwin ? \
+ (menu)->userwin : CURRENT_SCREEN->_stdscr)
/* Normalize menu window */
#define Get_Menu_Window( menu ) \
diff --git a/menu/modules b/menu/modules
index abc4cf0afa49..fac8fceba1e4 100644
--- a/menu/modules
+++ b/menu/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.17 2006/12/24 00:52:39 tom Exp $
+# $Id: modules,v 1.18 2010/01/23 16:36:23 tom Exp $
##############################################################################
-# Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -32,32 +32,32 @@
@ base
# Library objects
-m_attribs lib $(srcdir) $(MENU_PRIV_H)
-m_cursor lib $(srcdir) $(MENU_PRIV_H)
-m_driver lib $(srcdir) $(MENU_PRIV_H)
-m_format lib $(srcdir) $(MENU_PRIV_H)
-m_global lib $(srcdir) $(MENU_PRIV_H)
-m_hook lib $(srcdir) $(MENU_PRIV_H)
-m_item_cur lib $(srcdir) $(MENU_PRIV_H)
-m_item_nam lib $(srcdir) $(MENU_PRIV_H)
-m_item_new lib $(srcdir) $(MENU_PRIV_H)
-m_item_opt lib $(srcdir) $(MENU_PRIV_H)
-m_item_top lib $(srcdir) $(MENU_PRIV_H)
-m_item_use lib $(srcdir) $(MENU_PRIV_H)
-m_item_val lib $(srcdir) $(MENU_PRIV_H)
-m_item_vis lib $(srcdir) $(MENU_PRIV_H)
-m_items lib $(srcdir) $(MENU_PRIV_H)
-m_new lib $(srcdir) $(MENU_PRIV_H)
-m_opts lib $(srcdir) $(MENU_PRIV_H)
-m_pad lib $(srcdir) $(MENU_PRIV_H)
-m_pattern lib $(srcdir) $(MENU_PRIV_H)
-m_post lib $(srcdir) $(MENU_PRIV_H)
-m_req_name lib $(srcdir) $(MENU_PRIV_H)
-m_scale lib $(srcdir) $(MENU_PRIV_H)
-m_spacing lib $(srcdir) $(MENU_PRIV_H)
-m_sub lib $(srcdir) $(MENU_PRIV_H)
-m_trace lib $(srcdir) $(MENU_PRIV_H)
-m_userptr lib $(srcdir) $(MENU_PRIV_H)
-m_win lib $(srcdir) $(MENU_PRIV_H)
+m_attribs lib $(srcdir) $(HEADER_DEPS)
+m_cursor lib $(srcdir) $(HEADER_DEPS)
+m_driver lib $(srcdir) $(HEADER_DEPS)
+m_format lib $(srcdir) $(HEADER_DEPS)
+m_global lib $(srcdir) $(HEADER_DEPS)
+m_hook lib $(srcdir) $(HEADER_DEPS)
+m_item_cur lib $(srcdir) $(HEADER_DEPS)
+m_item_nam lib $(srcdir) $(HEADER_DEPS)
+m_item_new lib $(srcdir) $(HEADER_DEPS)
+m_item_opt lib $(srcdir) $(HEADER_DEPS)
+m_item_top lib $(srcdir) $(HEADER_DEPS)
+m_item_use lib $(srcdir) $(HEADER_DEPS)
+m_item_val lib $(srcdir) $(HEADER_DEPS)
+m_item_vis lib $(srcdir) $(HEADER_DEPS)
+m_items lib $(srcdir) $(HEADER_DEPS)
+m_new lib $(srcdir) $(HEADER_DEPS)
+m_opts lib $(srcdir) $(HEADER_DEPS)
+m_pad lib $(srcdir) $(HEADER_DEPS)
+m_pattern lib $(srcdir) $(HEADER_DEPS)
+m_post lib $(srcdir) $(HEADER_DEPS)
+m_req_name lib $(srcdir) $(HEADER_DEPS)
+m_scale lib $(srcdir) $(HEADER_DEPS)
+m_spacing lib $(srcdir) $(HEADER_DEPS)
+m_sub lib $(srcdir) $(HEADER_DEPS)
+m_trace lib $(srcdir) $(HEADER_DEPS)
+m_userptr lib $(srcdir) $(HEADER_DEPS)
+m_win lib $(srcdir) $(HEADER_DEPS)
# vile:makemode
diff --git a/misc/Makefile.in b/misc/Makefile.in
index 4cb39b0c79db..93c9b3df3017 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.43 2007/03/31 15:54:17 tom Exp $
+# $Id: Makefile.in,v 1.56 2011/02/21 01:09:31 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -43,6 +43,7 @@
.SUFFIXES :
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
CF_MFLAGS = @cf_cv_makeflags@
@@ -57,24 +58,24 @@ bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
-CC = @CC@
-HOSTCC = @BUILD_CC@
-
tabsetdir = $(datadir)/tabset
ticdir = @TERMINFO@
ticfile = $(ticdir).db
source = @TERMINFO_SRC@
INSTALL = @INSTALL@
-INSTALL_PROG = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+
################################################################################
all : terminfo.tmp
depend :
-sources :
+sources :: terminfo.tmp
install : install.data install.libs
@@ -91,8 +92,7 @@ install.data : terminfo.tmp \
datadir=${datadir} \
ticdir=${ticdir} \
source=terminfo.tmp \
- THIS_CC="$(CC)" \
- THAT_CC="$(HOSTCC)" \
+ cross_compiling=@cross_compiling@ \
$(SHELL) ./run_tic.sh
@cd $(srcdir)/tabset && \
$(SHELL) -c 'for i in * ; do \
@@ -103,8 +103,16 @@ install.data : terminfo.tmp \
NCURSES_CONFIG = ncurses@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config
-install.libs : $(DESTDIR)$(bindir) ncurses-config
- $(INSTALL_PROG) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
+install.libs :: $(DESTDIR)$(bindir) ncurses-config
+ $(INSTALL_SCRIPT) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
+
+@MAKE_PC_FILES@install.libs :: pc-files $(DESTDIR)$(PKG_CONFIG_LIBDIR)
+@MAKE_PC_FILES@ $(SHELL) -c 'for name in *.pc; do $(INSTALL_DATA) $$name $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; done'
+
+@MAKE_PC_FILES@sources :: pc-files
+@MAKE_PC_FILES@pc-files :
+@MAKE_PC_FILES@ $(SHELL) ./gen-pkgconfig
+@MAKE_PC_FILES@ touch $@
terminfo.tmp : run_tic.sed $(source)
echo '** adjusting tabset paths'
@@ -118,8 +126,9 @@ run_tic.sed :
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) \
$(DESTDIR)$(datadir) \
-$(DESTDIR)$(tabsetdir) :
- $(SHELL) $(top_srcdir)/mkdirs.sh $@
+$(DESTDIR)$(tabsetdir) \
+$(DESTDIR)$(PKG_CONFIG_LIBDIR) :
+ mkdir -p $@
uninstall : uninstall.data uninstall.libs
@@ -130,6 +139,7 @@ uninstall.data :
uninstall.libs :
-rm -f $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
+@MAKE_PC_FILES@ $(SHELL) 'for name in *.pc; do rm -f $(DESTDIR)$(PKG_CONFIG_LIBDIR)/$$name; done'
tags :
@@ -138,11 +148,13 @@ tags :
mostlyclean :
-rm -f terminfo.tmp
-rm -f run_tic.sed
+@MAKE_PC_FILES@ -rm -f *.pc pc-files
-rm -f core tags TAGS *~ *.bak *.ln *.atac trace
clean :: mostlyclean
distclean : clean
+@MAKE_PC_FILES@ -rm -f gen-pkgconfig
-rm -f Makefile run_tic.sh ncurses-config
realclean : distclean
diff --git a/misc/gen-pkgconfig.in b/misc/gen-pkgconfig.in
new file mode 100644
index 000000000000..efd29105b571
--- /dev/null
+++ b/misc/gen-pkgconfig.in
@@ -0,0 +1,139 @@
+#!@SHELL@
+# $Id: gen-pkgconfig.in,v 1.8 2010/02/06 22:12:07 Miroslav.Lichvar Exp $
+##############################################################################
+# Copyright (c) 2009,2010 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# 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, 2009
+#
+# The complete configure script for ncurses is the ncurses5-config (or similar
+# name, depending on the flavor, e.g., ncursesw5-config, ncurses6-config, etc).
+# That provides more information than pkg-config, and is the portable and
+# recommended solution.
+#
+# For each library, generate a ".pc" file which depends on the base ncurses
+# library, except that the tinfo library does not depend on ncurses.
+LIB_NAME=@LIB_NAME@
+TINFO_NAME=@TINFO_NAME@
+PANEL_NAME=panel # @PANEL_NAME@
+MENU_NAME=menu # @MENU_NAME@
+FORM_NAME=form # @FORM_NAME@
+CXX_NAME=ncurses++ # @CXX_NAME@
+DFT_DEP_SUFFIX=@DFT_DEP_SUFFIX@
+TINFO_ARG_SUFFIX=@TINFO_ARG_SUFFIX@
+CXX_LIB_SUFFIX=@CXX_LIB_SUFFIX@
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+includedir="@includedir@"
+libdir="@libdir@"
+
+show_prefix='@prefix@'
+show_exec_prefix='@exec_prefix@'
+show_includedir='@includedir@'
+show_libdir='@libdir@'
+
+MAIN_LIBRARY="${LIB_NAME}@DFT_ARG_SUFFIX@"
+SUB_LIBRARY="${TINFO_ARG_SUFFIX}"
+PANEL_LIBRARY="${PANEL_NAME}@DFT_ARG_SUFFIX@"
+MENU_LIBRARY="${MENU_NAME}@DFT_ARG_SUFFIX@"
+FORM_LIBRARY="${FORM_NAME}@DFT_ARG_SUFFIX@"
+
+SUB_LIBRARY_REQ=${SUB_LIBRARY}
+if test $TINFO_NAME = $LIB_NAME ; then
+ SUB_LIBRARY_REQ=
+fi
+
+for lib in ../lib/*
+do
+ name=`basename $lib`
+ if test "$name" = "*" ; then
+ break
+ fi
+
+ root=`basename $name "$DFT_DEP_SUFFIX"`
+ if test "$name" = "$root" ; then
+ root=`basename $name "$CXX_LIB_SUFFIX"`
+ if test "$name" = "$root" ; then
+ continue
+ fi
+ fi
+
+ name=`echo "$name" | sed -e 's/^lib//' -e 's/\..*$//'`
+
+ desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
+ if test $name = $MAIN_LIBRARY ; then
+ reqs=$SUB_LIBRARY_REQ
+ desc="$desc library"
+ elif test $name = $SUB_LIBRARY ; then
+ reqs=
+ desc="$desc terminal interface library"
+ elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then
+ reqs="$PANEL_LIBRARY $MENU_LIBRARY $FORM_LIBRARY $MAIN_LIBRARY $SUB_LIBRARY_REQ"
+ desc="$desc add-on library"
+ else
+ reqs="$MAIN_LIBRARY $SUB_LIBRARY_REQ"
+ desc="$desc add-on library"
+ fi
+
+ if test "$includedir" = "/usr/include" ; then
+ cflags=
+ else
+ cflags="-I\${includedir}"
+ fi
+
+ if test "$libdir" = "/usr/lib" ; then
+ libs=
+ else
+ libs="-L\${libdir}"
+ fi
+ libs="$libs -l$name"
+
+ # add dependencies that pkg-config cannot guess about
+ if test -z "$reqs" ; then
+ libs="$libs @LIBS@"
+ fi
+
+ echo "** creating ${name}.pc"
+ cat >${name}.pc <<EOF
+prefix=$show_prefix
+exec_prefix=$show_exec_prefix
+libdir=$show_libdir
+includedir=$show_includedir
+major_version=@NCURSES_MAJOR@
+version=@NCURSES_MAJOR@.@NCURSES_MINOR@.@NCURSES_PATCH@
+
+Name: $name
+Description: $desc
+Version: \${version}
+Requires: $reqs
+Libs: $libs
+Cflags: $cflags
+EOF
+ # pr -f ${name}.pc
+done
+# vile:shmode
diff --git a/misc/jpf-indent b/misc/jpf-indent
deleted file mode 100755
index cdd825c61d37..000000000000
--- a/misc/jpf-indent
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/sh
-#****************************************************************************
-#* Copyright (c) 2004-2005,2006 Thomas E. Dickey *
-#* *
-#* Permission is hereby granted, free of charge, to any person obtaining a *
-#* copy of this software and associated documentation files (the *
-#* "Software"), to deal in the Software without restriction, including *
-#* without limitation the rights to use, copy, modify, merge, publish, *
-#* distribute, distribute with modifications, sublicense, and/or sell *
-#* copies of the Software, and to permit persons to whom the Software is *
-#* furnished to do so, subject to the following conditions: *
-#* *
-#* The above copyright notice and this permission notice shall be included *
-#* in all copies or substantial portions of the Software. *
-#* *
-#* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
-#* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
-#* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
-#* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
-#* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
-#* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
-#* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
-#* *
-#* Except as contained in this notice, the name(s) of the above copyright *
-#* 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: jpf-indent,v 1.6 2006/02/18 17:07:15 tom Exp $
-# indent ncurses source written by Juergen Pfeifer
-NOOP=no
-OPTS='
--npro
---blank-lines-after-declarations
---blank-lines-after-procedures
---brace-indent2
---braces-after-if-line
---continue-at-parentheses
---indent-level2
---line-length80
---no-space-after-casts
---no-space-after-function-call-names
---parameter-indentation4
---swallow-optional-blank-lines
---tab-size8
-
--T FIELD
--T FIELDTYPE
--T FIELD_CELL
--T FORM
--T NCURSES_INLINE
--T RegExp_Arg
--T TypeArgument
--T WINDOW
--T attr_t
--T bool
--T cchar_t
--T chtype
--T enumARG
--T va_list
--T wchar_t
-'
-for name in $*
-do
- case $name in
- -v|-n)
- NOOP=yes
- OPTS="$OPTS -v"
- ;;
- -*)
- OPTS="$OPTS $name"
- ;;
- *.[ch])
- save="${name}".a$$
- test="${name}".b$$
- rm -f "$save" "$test"
- mv "$name" "$save"
- sed \
- -e '/MODULE_ID(/s/)$/);/' \
- -e 's,\<GCC_NORETURN;,;//GCC_NORETURN;,' \
- -e 's,\<GCC_PRINTFLIKE(,;//GCC_PRINTFLIKE(,' \
- -e 's,\<GCC_SCANFLIKE(,;//GCC_SCANFLIKE(,' \
- -e 's,\(\<NCURSES_EXPORT_VAR\>\),//\1,' \
- "$save" >"$test"
- cp "$test" "$name"
- chmod u+w "$name"
- # ${INDENT_PROG-indent} --version
- ${INDENT_PROG-indent} -npro $OPTS "$name"
- sed \
- -e '/MODULE_ID(/s/);$/)/' \
- -e 's,;[ ]*//GCC_NORETURN;, GCC_NORETURN;,' \
- -e 's,;[ ]*//GCC_PRINTFLIKE(, GCC_PRINTFLIKE(,' \
- -e 's,;[ ]*//GCC_SCANFLIKE(, GCC_SCANFLIKE(,' \
- -e 's,//\(\<NCURSES_EXPORT_VAR\>\),\1,' \
- "$name" >"$test"
- mv "$test" "$name"
- rm -f "${name}~"
- if test $NOOP = yes ; then
- if (cmp -s "$name" "$save" ) then
- echo "** no change: $name"
- else
- diff -u "$save" "$name"
- fi
- rm -f "$name"
- mv "$save" "$name"
- elif ( cmp -s "$name" "$save" ) ; then
- echo "** unchanged $name"
- rm -f "${name}"
- mv "$save" "$name"
- else
- echo "** updated $name"
- rm -f "$save"
- fi
- ;;
- *)
- echo "** ignored: $name"
- ;;
- esac
-done
diff --git a/misc/ncu-indent b/misc/ncu-indent
deleted file mode 100755
index 862a108a3b31..000000000000
--- a/misc/ncu-indent
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/sh
-#****************************************************************************
-#* Copyright (c) 2001-2006,2008 Thomas E. Dickey *
-#* *
-#* Permission is hereby granted, free of charge, to any person obtaining a *
-#* copy of this software and associated documentation files (the *
-#* "Software"), to deal in the Software without restriction, including *
-#* without limitation the rights to use, copy, modify, merge, publish, *
-#* distribute, distribute with modifications, sublicense, and/or sell *
-#* copies of the Software, and to permit persons to whom the Software is *
-#* furnished to do so, subject to the following conditions: *
-#* *
-#* The above copyright notice and this permission notice shall be included *
-#* in all copies or substantial portions of the Software. *
-#* *
-#* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
-#* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
-#* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
-#* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
-#* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
-#* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
-#* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
-#* *
-#* Except as contained in this notice, the name(s) of the above copyright *
-#* 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: ncu-indent,v 1.17 2008/08/03 15:46:44 tom Exp $
-NOOP=no
-OPTS='
---blank-lines-after-procedures
---braces-on-if-line
---continuation-indentation0
---continue-at-parentheses
---cuddle-else
---indent-level4
---leave-preprocessor-space
---no-blank-lines-after-commas
---no-blank-lines-after-declarations
---no-space-after-function-call-names
---procnames-start-lines
---space-special-semicolon
---swallow-optional-blank-lines
---tab-size8
-
--T NCURSES_EXPORT_VAR
--T NCURSES_INLINE
--T SCREEN
--T TERMTYPE
--T attr_t
--T cchar_t
--T chtype
--T inline
--T wchar_t
--T wint_t
-
--T BUFFER
--T CHARTYPE
--T FILE
--T GCC_NORETURN
--T LINE
--T MARK
--T RETSIGTYPE
--T TBUFF
--T WINDOW
--T size_t
--T va_list
-
--T Cardinal
--T Widget
--T XtPointer
-'
-for name in $*
-do
- case $name in
- -v|-n)
- NOOP=yes
- OPTS="$OPTS -v"
- ;;
- -*)
- OPTS="$OPTS $name"
- ;;
- *.[ch]|*.cc|*.cpp)
- save="${name}".a$$
- test="${name}".b$$
- rm -f "$save" "$test"
- mv "$name" "$save"
- sed \
- -e '/EMPTY_MODULE(/s/)$/);/' \
- -e '/MODULE_ID(/s/)$/);/' \
- -e 's,\<GCC_NORETURN;,;//GCC_NORETURN;,' \
- -e 's,\<GCC_PRINTFLIKE(,;//GCC_PRINTFLIKE(,' \
- -e 's,\<GCC_SCANFLIKE(,;//GCC_SCANFLIKE(,' \
- -e 's,\(\<NCURSES_EXPORT_VAR\>\),//\1,' \
- "$save" >"$test"
- cp "$test" "$name"
- chmod u+w "$name"
- # ${INDENT_PROG-indent} --version
- ${INDENT_PROG-indent} -npro $OPTS "$name"
- sed \
- -e '/EMPTY_MODULE(/s/);$/)/' \
- -e '/MODULE_ID(/s/);$/)/' \
- -e 's,;[ ]*//GCC_NORETURN;, GCC_NORETURN;,' \
- -e 's,;[ ]*//GCC_PRINTFLIKE(, GCC_PRINTFLIKE(,' \
- -e 's,;[ ]*//GCC_SCANFLIKE(, GCC_SCANFLIKE(,' \
- -e 's,//\(\<NCURSES_EXPORT_VAR\>\),\1,' \
- "$name" >"$test"
- mv "$test" "$name"
- rm -f "${name}~"
- if test $NOOP = yes ; then
- if (cmp -s "$name" "$save" ) then
- echo "** no change: $name"
- else
- diff -u "$save" "$name"
- fi
- rm -f "$name"
- mv "$save" "$name"
- elif ( cmp -s "$name" "$save" ) ; then
- echo "** unchanged $name"
- rm -f "${name}"
- mv "$save" "$name"
- else
- echo "** updated $name"
- rm -f "$save"
- fi
- ;;
- *)
- echo "** ignored: $name"
- ;;
- esac
-done
diff --git a/misc/ncurses-config.in b/misc/ncurses-config.in
index a349250ab88c..a9c0ac5396ac 100644
--- a/misc/ncurses-config.in
+++ b/misc/ncurses-config.in
@@ -1,7 +1,7 @@
#!@SHELL@
-# $Id: ncurses-config.in,v 1.12 2007/03/17 20:02:19 tom Exp $
+# $Id: ncurses-config.in,v 1.25 2011/03/19 22:43:38 tom Exp $
##############################################################################
-# Copyright (c) 2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 2006-2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,67 +28,70 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey, 2006
+# Author: Thomas E. Dickey, 2006-on
prefix="@prefix@"
exec_prefix="@exec_prefix@"
bindir="@bindir@"
+includedir="@includedir@"
libdir="@libdir@"
datadir="@datadir@"
mandir="@mandir@"
-THIS="ncurses@DFT_ARG_SUFFIX@"
+THIS="@LIB_NAME@@DFT_ARG_SUFFIX@"
+TINFO_LIB="@TINFO_ARG_SUFFIX@"
LANG=C; export LANG
LANGUAGE=C; export LANGUAGE
LC_ALL=C; export LC_ALL
LC_CTYPE=C; export LC_CTYPE
-test $# = 0 && exec @SHELL@ $0 --error
-
-while test $# -gt 0; do
- case "$1" in
- -*=*)
- ARG=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
- ;;
- *)
- ARG=
+# with --disable-overwrite, we installed into a subdirectory, but transformed
+# the headers to include like this:
+# <ncurses@LIB_SUFFIX@/curses.h>
+if test x@WITH_OVERWRITE@ = xno ; then
+ case $includedir in
+ $prefix/include/ncurses@LIB_SUFFIX@)
+ includedir=`echo "$includedir" | sed -e 's,/[^/]*$,,'`
;;
esac
+fi
+
+test $# = 0 && exec @SHELL@ $0 --error
+while test $# -gt 0; do
case "$1" in
# basic configuration
- --prefix=*)
- prefix="$ARG"
- test -z "$exec_prefix" && exec_prefix="$ARG"
- ;;
--prefix)
echo "$prefix"
;;
- --exec-prefix=*)
- exec_prefix="$ARG"
- ;;
--exec-prefix)
echo "$exec_prefix"
;;
# compile/link
--cflags)
INCS=
- if test "${prefix}/include" != /usr/include ; then
- INCS="-I${prefix}/include"
+ if test "x@WITH_OVERWRITE@" = xno ; then
+ INCS="$INCS -I${includedir}/${THIS}"
fi
- if test "@WITH_OVERWRITE@" != no ; then
- INCS="$INCS -I${prefix}/include/${THIS}"
+ if test "${includedir}" != /usr/include ; then
+ INCS="$INCS -I${includedir}"
fi
sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
$INCS
ENDECHO
;;
--libs)
+ if test @TINFO_NAME@ = @LIB_NAME@ ; then
sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
- -L${exec_prefix}/lib @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
+ -L$libdir @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
ENDECHO
+ else
+ sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
+ -L$libdir @EXTRA_LDFLAGS@ -l${THIS} -l${TINFO_LIB} @LIBS@
+ENDECHO
+ fi
;;
# identification
--version)
@@ -107,6 +110,9 @@ ENDECHO
--datadir)
echo "${datadir}"
;;
+ --includedir)
+ echo "${includedir}"
+ ;;
--libdir)
echo "${libdir}"
;;
@@ -129,9 +135,7 @@ Usage: ${THIS}-config [options]
Options:
--prefix echos the package-prefix of ${THIS}
- --prefix=ARG sets the package-prefix of ${THIS}
--exec-prefix echos the executable-prefix of ${THIS}
- --exec-prefix=ARG sets the executable-prefix of ${THIS}
--cflags echos the C compiler flags needed to compile with ${THIS}
--libs echos the libraries needed to link with ${THIS}
@@ -142,6 +146,7 @@ Options:
--bindir echos the directory containing ${THIS} programs
--datadir echos the directory containing ${THIS} data
+ --includedir echos the directory containing ${THIS} header files
--libdir echos the directory containing ${THIS} libraries
--mandir echos the directory containing ${THIS} manpages
--terminfo echos the \$TERMINFO terminfo database path
diff --git a/misc/run_tic.in b/misc/run_tic.in
index 2732403a393d..c34302af69ee 100644
--- a/misc/run_tic.in
+++ b/misc/run_tic.in
@@ -1,7 +1,7 @@
#!@SHELL@
-# $Id: run_tic.in,v 1.23 2006/10/28 19:43:30 tom Exp $
+# $Id: run_tic.in,v 1.32 2011/02/23 23:30:15 tom Exp $
##############################################################################
-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey 1996,2000
+# Author: Thomas E. Dickey 1996-on
#
# This script is used to install terminfo.src using tic. We use a script
# because the path checking is too awkward to do in a makefile.
@@ -41,38 +41,56 @@ echo '** Building terminfo database, please wait...'
# The script is designed to be run from the misc/Makefile as
# make install.data
-: ${suffix=@PROG_EXT@}
-: ${DESTDIR=@DESTDIR@}
-: ${prefix=@prefix@}
-: ${exec_prefix=@exec_prefix@}
-: ${bindir=@bindir@}
-: ${top_srcdir=@top_srcdir@}
-: ${srcdir=@srcdir@}
-: ${datadir=@datadir@}
-: ${ticdir=@TERMINFO@}
-: ${source=@TERMINFO_SRC@}
-: ${LN_S="@LN_S@"}
-: ${THAT_CC=cc}
-: ${THIS_CC=cc}
-: ${ext_funcs=@NCURSES_EXT_FUNCS@}
+: ${suffix:=@PROG_EXT@}
+: ${DESTDIR:=@DESTDIR@}
+: ${prefix:=@prefix@}
+: ${exec_prefix:=@exec_prefix@}
+: ${bindir:=@bindir@}
+: ${top_srcdir:=@top_srcdir@}
+: ${srcdir:=@srcdir@}
+: ${datadir:=@datadir@}
+: ${TIC_PATH:=@TIC_PATH@}
+: ${ticdir:=@TERMINFO@}
+: ${source:=@TERMINFO_SRC@}
+: ${LN_S:="@LN_S@"}
+: ${cross_compiling:=no}
+: ${ext_funcs:=@NCURSES_EXT_FUNCS@}
test -z "${DESTDIR}" && DESTDIR=
# Allow tic to run either from the install-path, or from the build-directory.
# Do not do this if we appear to be cross-compiling. In that case, we rely
# on the host's copy of tic to compile the terminfo database.
-if test "$THAT_CC" = "$THIS_CC" ; then
-case "$PATH" in
-:*) PATH=../progs:../lib:${DESTDIR}$bindir$PATH ;;
-*) PATH=../progs:../lib:${DESTDIR}$bindir:$PATH ;;
-esac
-export PATH
-SHLIB="sh $srcdir/shlib"
+if test "x$cross_compiling" = "xno"
+then
+ if test -f ../progs/tic$suffix
+ then
+ case "$PATH" in
+ \@PATH_SEPARATOR@*)
+ PATH="../progs@PATH_SEPARATOR@../lib@PATH_SEPARATOR@${DESTDIR}$bindir$PATH"
+ ;;
+ *)
+ PATH="../progs@PATH_SEPARATOR@../lib@PATH_SEPARATOR@${DESTDIR}$bindir@PATH_SEPARATOR@$PATH"
+ ;;
+ esac
+ export PATH
+ if test @DFT_LWR_MODEL@ = shared
+ then
+ SHLIB="sh $srcdir/shlib"
+ TIC_PATH="$SHLIB tic"
+ else
+ TIC_PATH="tic"
+ fi
+ elif test "$TIC_PATH" = unknown
+ then
+ echo '? no tic program found'
+ exit 1
+ fi
else
-# Cross-compiling, so don't set PATH or run shlib.
-SHLIB=
-# reset $suffix, since it applies to the target, not the build platform.
-suffix=
+ # Cross-compiling, so don't set PATH or run shlib.
+ SHLIB=
+ # reset $suffix, since it applies to the target, not the build platform.
+ suffix=
fi
@@ -92,6 +110,14 @@ umask 022
# Construct the name of the old (obsolete) pathname, e.g., /usr/lib/terminfo.
TICDIR=`echo $TERMINFO | sed -e 's%/share/\([^/]*\)$%/lib/\1%'`
+# Parent directory may not exist, which would confuse the install for hashed
+# database. Fix.
+PARENT=`echo "$TERMINFO" | sed -e 's%/[^/]*$%%'`
+if test -n "$PARENT"
+then
+ test -d $PARENT || mkdir -p $PARENT
+fi
+
# Remove the old terminfo stuff; we don't care if it existed before, and it
# would generate a lot of confusing error messages if we tried to overwrite it.
# We explicitly remove its contents rather than the directory itself, in case
@@ -100,7 +126,7 @@ TICDIR=`echo $TERMINFO | sed -e 's%/share/\([^/]*\)$%/lib/\1%'`
if test "$ext_funcs" = 1 ; then
cat <<EOF
-Running tic to install $TERMINFO ...
+Running $TIC_PATH to install $TERMINFO ...
You may see messages regarding extended capabilities, e.g., AX.
These are extended terminal capabilities which are compiled
@@ -110,7 +136,7 @@ Running tic to install $TERMINFO ...
document, and install the terminfo without the -x option.
EOF
-if ( $SHLIB tic$suffix -x -s -o $TERMINFO $source )
+if ( $TIC_PATH -x -s -o $TERMINFO $source )
then
echo '** built new '$TERMINFO
else
@@ -119,7 +145,7 @@ else
fi
else
cat <<EOF
-Running tic to install $TERMINFO ...
+Running $TIC_PATH to install $TERMINFO ...
You may see messages regarding unknown capabilities, e.g., AX.
These are extended terminal capabilities which may be compiled
@@ -129,7 +155,7 @@ Running tic to install $TERMINFO ...
document, and install the terminfo without the -x option.
EOF
-if ( $SHLIB tic$suffix -s -o $TERMINFO $source )
+if ( $TIC_PATH -s -o $TERMINFO $source )
then
echo '** built new '$TERMINFO
else
diff --git a/misc/terminfo.src b/misc/terminfo.src
index 92a8d69c3fa5..04163e01d122 100644
--- a/misc/terminfo.src
+++ b/misc/terminfo.src
@@ -6,8 +6,8 @@
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.341 $
-# $Date: 2008/10/12 23:03:54 $
+# $Revision: 1.383 $
+# $Date: 2011/02/20 20:46:53 $
#
# The original header is preserved below for reference. It is noted that there
# is a "newer" version which differs in some cosmetic details (but actually
@@ -340,7 +340,7 @@ ansi+local,
cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
cuu=\E[%p1%dA, use=ansi+local1,
ansi+tabs,
- cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[2g,
+ cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[3g,
ansi+inittabs,
it#8, use=ansi+tabs,
ansi+erase,
@@ -452,8 +452,9 @@ ecma+sgr|attribute capabilities for true ECMA-48 terminals,
# For more detail on this rather pathetic standard, see the comments
# near the end of this file.
ibcs2|Intel Binary Compatibility Standard prescriptions,
- cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cud=\E[%p1%dB,
- cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
+ cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cub1=\E[1D,
+ cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A,
dch=\E[%p1%dP, dispc=\E=%p1%dg, ech=\E[%p1%dX,
hpa=\E[%i%p1%dG, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL,
indn=\E[%p1%dS, rc=\E7, rin=\E[%p1%dT, rmam=\E[?7l, sc=\E7,
@@ -545,7 +546,7 @@ pcansi-m|pcansi-mono|ibm-pc terminal programs claiming to be ansi (mono mode),
cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
hts=\EH, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, kcud1=\E[B,
- kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[2g,
+ kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[3g,
use=klone+sgr-dumb,
pcansi-25-m|pcansi25m|ibm-pc terminal programs with 25 lines (mono mode),
lines#25, use=pcansi-m,
@@ -576,7 +577,7 @@ ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes,
kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S,
rep=%p1%c\E[%p2%{1}%-%db, rin=\E[%p1%dT, s0ds=\E(B,
- s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[2g,
+ s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[3g,
vpa=\E[%i%p1%dd, use=pcansi-m,
ansi+enq|ncurses extension for ANSI ENQ,
@@ -617,11 +618,45 @@ ansi.sys-old|ANSI.SYS under PC-DOS 2.1,
clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H,
is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K,
- khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u,
+ khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, rc=\E[u,
rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR,
u7=\E[6n, use=klone+color, use=klone+sgr8,
+
+# Keypad: Home=\0G Up=\0H PrPag=\0I
+# ka1,kh kcuu1 kpp,ka3
+#
+# Left=\0K 5=\0L Right=\0M
+# kcub1 kb2 kcuf1
+#
+# End=\0O Down=\0P NxPag=\0Q
+# kc1,kend kcud1 kc3,knp
+#
+# Ins=\0R Del=\0S
+# kich1 kdch1
+#
+# On keyboard with 12 function keys,
+# shifted f-keys: F13-F24
+# control f-keys: F25-F36
+# alt f-keys: F37-F48
+# The shift/control/alt keys do not modify each other, but alt overrides both,
+# and control overrides shift.
+#
+# <pfkey> capability for F1-F48 -TD
ansi.sys|ANSI.SYS 3.1 and later versions,
- el=\E[K, use=ansi.sys-old,
+ el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
+ kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
+ kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
+ kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
+ kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
+ kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
+ kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
+ kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
+ kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
+ kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
+ kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
+ kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
+ pfkey=\E[0;%?%p1%{11}%<%t%'\:'%e%?%p1%{13}%<%t%'z'%e%?%p1%{23}%<%t%'G'%e%?%p1%{25}%<%t%'p'%e%?%p1%'#'%<%t%'E'%e%?%p1%'%'%<%t%'f'%e%?%p1%'/'%<%t%'C'%e%{92}%;%;%;%;%;%;%;%p1%+%d;%p2"%s"p,
+ use=ansi.sys-old,
#
# Define IBM PC keypad keys for vi as per MS-Kermit while using ANSI.SYS.
@@ -657,6 +692,149 @@ nansi.sysk|nansisysk|PC-DOS Public Domain NANSI.SYS with keypad redefined for vi
#### ANSI console types
#
+#############################################################################
+#
+# Atari ST terminals.
+# From Guido Flohr <gufl0000@stud.uni-sb.de>.
+#
+tw52|tw52-color|Toswin window manager with color,
+ bce,
+ colors#16, pairs#256,
+ oc=\Eb?\Ec0, op=\Eb?\Ec0,
+ setab=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+ setaf=\Eb%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+ setb=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+ setf=\Eb%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+ use=tw52-m,
+tw52-m|Toswin window manager monochrome,
+ ul,
+ ma#999,
+ bold=\Eya, dch1=\Ea, dim=\EyB,
+ is2=\Ev\Eq\Ez_\Ee\Ei\Eb?\Ec0, rev=\EyP, rmso=\EzQ,
+ rmul=\EzH, rs2=\Ev\Eq\Ez_\Ee\Ei\Eb?\Ec0, sgr0=\Ez_,
+ smso=\EyQ, smul=\EyH, use=at-m,
+tt52|Atari TT medium and high resolution,
+ lines#30, use=at-color,
+st52-color|at-color|atari-color|atari_st-color|Atari ST with color,
+ bce,
+ colors#16, pairs#256,
+ is2=\Ev\Eq\Ee\Eb1\Ec0, rs2=\Ev\Eq\Ee\Eb1\Ec0,
+ setab=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+ setaf=\Eb%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+ setb=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+ setf=\Eb%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+ use=st52,
+st52|st52-m|at|at-m|atari|atari-m|atari_st|atarist-m|Atari ST,
+ am, eo, mir, npc,
+ cols#80, it#8, lines#24,
+ bel=^G, civis=\Ef, clear=\EE, cnorm=\Ee, cr=^M, cub1=\ED,
+ cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
+ cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, el1=\Eo, home=\EH, ht=^I,
+ il1=\EL, ind=^J, is2=\Ev\Eq\Ee, kLFT=\Ed, kRIT=\Ec, kbs=^H,
+ kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\177,
+ kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es,
+ kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EQ,
+ kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, kf8=\EW,
+ kf9=\EX, khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, kpp=\Ea,
+ kund=\EK, nel=^M^J, rc=\Ek, rev=\Ep, ri=\EI, rmso=\Eq,
+ rs2=\Ev\Eq\Ee, sc=\Ej, sgr0=\Eq, smso=\Ep,
+tw100|toswin vt100 window mgr,
+ eo, mir, msgr, xon,
+ colors#8, cols#80, it#8, lines#24, pairs#64, vt#3,
+ acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+ bel=^G, blink=\E[5m, bold=\E[1m, civis=\Ef,
+ clear=\E[2J\E[H, cnorm=\Ee, cr=^M, csr=\E[%i%p1%d;%p2%dr,
+ cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB,
+ cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH,
+ cuu=\E[%p1%dA, cuu1=\EA, dch1=\Ea, dim=\E[2m, dl=\E[%p1%dM,
+ dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I,
+ hts=\EH, ich=\E[%p1%d@, il1=\EL, ind=^J, is2=\E<\E)0, kbs=^H,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\177,
+ kf1=\EOP, kf10=\EOY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es,
+ kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EOQ,
+ kf20=\Ey, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV,
+ kf8=\EOW, kf9=\EOX, khlp=\EH, khome=\E\EE, kich1=\EI,
+ knp=\Eb, kpp=\E\Ea, kund=\EK, ll=\E[24H, nel=\EE,
+ oc=\E[30;47m, op=\E[30;47m, rc=\E8, rev=\E[7m, ri=\EM,
+ rmacs=^O, rmcup=\E[?7h, rmir=\Ei, rmkx=\E[?1l\E>,
+ rmso=\E[m, rmul=\E[m,
+ rs1=\E<\E[20l\E[?3;6;9l\E[r\Eq\E(B\017\E)0\E>,
+ sc=\E7,
+ setb=\E[4%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%=%t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6'%=%t3%e7%;m,
+ setf=\E[3%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%=%t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6'%=%t3%e7%;m,
+ sgr0=\E[m, smacs=^N, smcup=\E[?7l, smir=\Eh,
+ smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+# The entries for stv52 and stv52pc probably need a revision.
+stv52|MiNT virtual console,
+ am, msgr,
+ cols#80, it#8, lines#30,
+ bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE,
+ cnorm=\E. \Ee, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
+ cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.",
+ dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
+ ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
+ kcuu1=\EA, kdch1=\177, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq,
+ kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew,
+ kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET,
+ kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE,
+ kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>,
+ op=\Eb@\EcO, rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_,
+ rmso=\Eq, rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_,
+ smcup=\Ev\Ee\Ez_, smso=\Ep, smul=\EyH,
+stv52pc|MiNT virtual console with PC charset,
+ am, msgr,
+ cols#80, it#8, lines#30,
+ acsc=+\257\,\256-\^.v0\333I\374`\177a\260f\370g\361h\261j\331k\277l\332m\300n\305o\377p-q\304r-s_t+u+v+w+x\263y\363z\362{\343|\366}\234~\371,
+ bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE,
+ cnorm=\E. \Ee, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
+ cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.",
+ dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
+ ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
+ kcuu1=\EA, kdch1=\177, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq,
+ kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew,
+ kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET,
+ kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE,
+ kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>,
+ rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, rmso=\Eq,
+ rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, smcup=\Ev\Ee\Ez_,
+ smso=\Ep, smul=\EyH,
+
+#### Atari ST
+#
+
+# From: Simson L. Garfinkel <simsong@media-lab.mit.edu>
+atari-old|atari st,
+ OTbs, am,
+ cols#80, it#8, lines#25,
+ clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC,
+ cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM,
+ ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB,
+ kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep,
+# UniTerm terminal program for the Atari ST: 49-line VT220 emulation mode
+# From: Paul M. Aoki <aoki@ucbvax.berkeley.edu>
+uniterm|uniterm49|UniTerm VT220 emulator with 49 lines,
+ lines#49,
+ is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H,
+ use=vt220,
+# MiNT VT52 emulation. 80 columns, 25 rows.
+# MiNT is Now TOS, the operating system which comes with all Ataris now
+# (mainly Atari Falcon). This termcap is for the VT52 emulation you get
+# under tcsh/zsh/bash/sh/ksh/ash/csh when you run MiNT in `console' mode
+# From: Per Persson <pp@gnu.ai.mit.edu>, 27 Feb 1996
+st52-old|Atari ST with VT52 emulation,
+ am, km,
+ cols#80, lines#25,
+ bel=^G, civis=\Ef, clear=\EH\EJ, cnorm=\Ee, cr=^M, cub1=\ED,
+ cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
+ cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
+ ind=^J, ka1=\E#7, ka3=\E#5, kb2=\E#9, kbs=^H, kc1=\E#1,
+ kc3=\E#3, kclr=\E#7, kcub1=\E#K, kcud1=\E#P, kcuf1=\E#M,
+ kcuu1=\E#H, kf0=\E#D, kf1=\E#;, kf2=\E#<, kf3=\E#=, kf4=\E#>,
+ kf5=\E#?, kf6=\E#@, kf7=\E#A, kf8=\E#B, kf9=\E#C, khome=\E#G,
+ kil1=\E#R, kind=\E#2, kri=\E#8, lf0=f10, nel=^M^J, rc=\Ek,
+ ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq,
+ smcup=\Ee, smso=\Ep,
+
#### BeOS
#
# BeOS entry for Terminal program Seems to be almost ANSI
@@ -712,13 +890,14 @@ beterm|BeOS Terminal,
#
linux-basic|linux console,
am, bce, eo, mir, msgr, xenl, xon,
- it#8, ncv#18,
+ it#8, ncv#18, U8#1,
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
bel=^G, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr,
- cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
- cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
- dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
- el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H,
+ cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J,
+ cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+ cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
+ dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J,
+ el=\E[K, el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H,
hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
il=\E[%p1%dL, il1=\E[L, ind=^J, kb2=\E[G, kbs=\177,
kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
@@ -746,12 +925,12 @@ linux-m|Linux console no color,
# 1.9.9.
linux-c-nc|linux console with color-change,
ccc,
- initc=\E]P%p1%x%p2%{256}%*%{1000}%/%02x%p3%{256}%*%{1000}%/%02x%p4%{256}%*%{1000}%/%02x,
+ initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
oc=\E]R, use=linux-basic,
# From: Dennis Henriksen <opus@osrl.dk>, 9 July 1996
linux-c|linux console 1.3.6+ for older ncurses,
ccc,
- initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p3%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p4%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;,
+ initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p3%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p4%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;,
oc=\E]R, use=linux-basic,
# The 2.2.x kernels add a private mode that sets the cursor type; use that to
@@ -814,6 +993,41 @@ kon|kon2|jfbterm|Kanji ON Linux console,
initp@, kcbt@, oc@, op=\E[37;40m, rs1=\Ec, tsl=\E[?T,
use=linux,
+# 16-color linux console entry; this works with a 256-character
+# console font but bright background colors turn into dim ones when
+# you use a 512-character console font. This uses bold for bright
+# foreground colors and blink for bright background colors.
+linux-16color|linux console with 16 colors,
+ colors#16, ncv#54, pairs#256,
+ setab=\E[4%p1%{8}%m%d%?%p1%{8}%>%t;5%e%p1%{8}%=%t;2%e;25%;m,
+ setaf=\E[3%p1%{8}%m%d%?%p1%{8}%>%t;1%e%p1%{8}%=%t;2%e;21%;m,
+ use=linux,
+
+# bterm (bogl 0.1.18)
+# Implementation is in bogl-term.c
+# Key capabilities from linux terminfo entry
+#
+# Notes:
+# bterm only supports acs using wide-characters, has case for these: qjxamlkut
+# bterm does not support sgr, since it only processes one parameter -TD
+bterm|bogl virtual terminal,
+ am, bce,
+ colors#8, cols#80, lines#24, pairs#64,
+ acsc=aajjkkllmmqqttuuxx, bold=\E[1m, civis=\E[?25l,
+ clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, cub1=^H, cud1=^J,
+ cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ind=^J,
+ kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
+ kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
+ kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
+ kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
+ kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~,
+ kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
+ kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
+ kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J,
+ op=\E49;39m, rev=\E[7m, ri=\EM, rmacs=^O, rmso=\E[27m,
+ rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+ sgr0=\E[0m, smacs=^N, smso=\E[7m, smul=\E[4m,
+
#### Mach
#
@@ -869,7 +1083,7 @@ mach-color|Mach Console with ANSI color,
hurd|The GNU Hurd console server,
am, bce, bw, eo, km, mir, msgr, xon,
colors#8, it#8, ncv#18, pairs#64,
- acsc=++\,\,--..00ii``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+ acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\Ec, cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr,
cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
@@ -938,7 +1152,7 @@ pmcons|pmconsole|PMAX console,
scoansi-old|SCO Extended ANSI standard crt (5.0.5),
OTbs, am, bce, eo, xon,
colors#8, cols#80, it#8, lines#25, pairs#64,
- acsc=-\230.\231\,.+/0[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3yszr{c}\034~\207,
+ acsc=+/\,.-\230.\2310[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3yszr{c}\034~\207,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
civis=\E[=14;12C, clear=\E[H\E[2J, cnorm=\E[=10;12C,
cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
@@ -1005,7 +1219,7 @@ att6386|at386|386at|AT&T WGS 6386 console,
sc=\E7,
sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m,
sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m,
- tbc=\E[2g, vpa=\E[%i%p1%dd, use=klone+color,
+ tbc=\E[3g, vpa=\E[%i%p1%dd, use=klone+color,
# (pc6300plus: removed ":KM=/usr/lib/ua/kmap.s5:"; renamed BO/EE/CI/CV -- esr)
pc6300plus|AT&T 6300 plus,
OTbs, am, xon,
@@ -1373,7 +1587,7 @@ qnxt2|qnx 2.15 serial terminal,
qansi-g|QNX ANSI,
am, eslok, hs, xon,
colors#8, cols#80, it#8, lines#25, ncv#19, pairs#64, wsl#80,
- acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~Oa,
+ acsc=Oa``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[2J\E[H, cnorm=\E[?25h\E[?12l, cr=^M,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D,
@@ -1416,7 +1630,7 @@ qansi-g|QNX ANSI,
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%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;9%;m%?%p9%t\016%e\017%;,
sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smso=\E[7m,
- smul=\E[4m, tbc=\E[2g,
+ smul=\E[4m, tbc=\E[3g,
tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH,
#
qansi|QNX ansi with console writes,
@@ -1605,8 +1819,8 @@ wsvt25|NetBSD wscons in 25 line DEC VT220 mode,
is2=\E[r\E[25;1H, kend=\E[8~, kf1=\E[11~, kf10=\E[21~,
kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~,
kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
- kf9=\E[20~, khome=\E[7~, op=\E[m, setab=\E[4%p1%dm,
- setaf=\E[3%p1%dm, use=vt220,
+ kf9=\E[20~, khome=\E[7~, op=\E[m, rs1=\Ec,
+ setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=vt220,
wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta,
km, use=wsvt25,
@@ -1705,6 +1919,8 @@ cons25w|ansiw|ansi80x25-raw|freebsd console (25-line raw mode),
cons25|ansis|ansi80x25|freebsd console (25-line ansi mode),
acsc=-\030.^Y0\333`\004a\260f\370g\361h\261i\025j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263y\363z\362~\371,
use=cons25w,
+cons25-debian|freebsd console with debian backspace (25-line ansi mode),
+ kbs=\177, kdch1=\E[3~, use=cons25,
cons25-m|ansis-mono|ansi80x25-mono|freebsd console (25-line mono ansi mode),
colors@, pairs@,
bold@, dim@, op@, rmul=\E[m, setab@, setaf@,
@@ -1849,7 +2065,7 @@ bsdos-ppc|PowerPC BSD/OS Console,
vt52|dec vt52,
OTbs,
cols#80, it#8, lines#24,
- acsc=ffgghhompoqqss.k, bel=^G, clear=\EH\EJ, cr=^M,
+ acsc=+h.k0affggolpnqprrss, bel=^G, clear=\EH\EJ, cr=^M,
cub1=\ED, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB,
@@ -2283,9 +2499,9 @@ vt200-js|vt220-js|dec vt200 series with jump scroll,
am,
cols#80,
bel=^G, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr,
- cub1=^H, cud1=^J, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
- dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
- il1=\E[L, ind=\ED,
+ cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+ cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H,
+ ht=^I, il1=\E[L, ind=\ED,
is2=\E[61"p\E[H\E[?3l\E[?4l\E[?1l\E[?5l\E[?6l\E[?7h\E[?8h\E[?25h\E>\E[m,
kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=^M\ED, rc=\E8,
@@ -2671,8 +2887,8 @@ crt|crt-vt220|CRT 2.3 emulating VT220,
# the default behavior -TD
putty|PuTTY terminal emulator,
- am, bce, bw, ccc, hs, mir, msgr, xenl, xon,
- colors#8, it#8, ncv#22, pairs#64,
+ am, bce, bw, ccc, hs, mir, msgr, xenl, xon, XT,
+ colors#8, it#8, ncv#22, pairs#64, U8#1,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[?25h, cr=^M,
@@ -2688,13 +2904,13 @@ putty|PuTTY terminal emulator,
indn=\E[%p1%dS,
initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R,
- kb2=\E[G, kbs=\177, kcan=^C, kcbt=\E[Z, kcub1=\E[D,
- kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
- kend=\E[4~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
- kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
- kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
- kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
- kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+ kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
+ kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~,
+ kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
+ kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~,
+ kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~,
+ kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~,
+ kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m,
ri=\EM, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l,
@@ -2864,11 +3080,15 @@ ms-vt100+|vt100+|windows XP vt100+ (sic),
ms-vt-utf8|vt-utf8|UTF-8 flavor of vt100+,
use=ms-vt100+,
+# expect-5.44.1.15/example/tkterm
# a minimal subset of a vt100 (compare with "news-unk).
+#
+# The missing "=" in smkx is not a typo (here), but an error in tkterm.
tt|tkterm|Don Libes' tk text widget terminal emulator,
- clear=\E[H\E[J, cr=^M, cuf1=\E[C, cup=\E[%p1%d;%p2%dH,
- cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
- kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, rmso=\E[m,
+ clear=\E[H\E[J, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C,
+ cup=\E[%p1%d;%p2%dH, cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ,
+ kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW,
+ kf9=\EOX, rmkx=\E[?1l\E>, rmso=\E[m, smkx=\E[?1h\E,
smso=\E[7m,
#### X terminal emulators
@@ -3256,11 +3476,15 @@ xterm-basic|modern xterm terminal emulator - common,
xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1,
rmso=\E[m, rmul=\E[m, use=xterm-xf86-v33,
-# This is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey)
+# 16-colors is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey)
+# If configured to support 88- or 256-colors (which is fairly common in 2009),
+# xterm also recognizes the control sequences for initc -TD
xterm-16color|xterm with 16 colors like aixterm,
+ ccc,
+ initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
use=ibm+16color, use=xterm-new,
-# This is a compile-time feature of XFree86 xterm beginning with
+# 256-colors is a compile-time feature of XFree86 xterm beginning with
# patch #111 (1999/7/10) -TD
xterm+256color|xterm 256-color feature,
ccc,
@@ -3270,7 +3494,7 @@ xterm+256color|xterm 256-color feature,
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
setb@, setf@,
-# This is a compile-time feature of XFree86 xterm beginning with
+# 88-colors is a compile-time feature of XFree86 xterm beginning with
# patch #115 (1999/9/18) -TD
#
# Note that the escape sequences used are the same as for 256-colors - xterm
@@ -3411,6 +3635,11 @@ xterm-24|vs100|xterms|xterm terminal emulator (X Window System),
xterm|xterm terminal emulator (X Window System),
use=xterm-new,
+# This entry assumes that xterm's handling of VT100 SI/SO is disabled by
+# setting the vt100Graphics resource to false.
+xterm-utf8|xterm with no VT100 line-drawing in UTF-8 mode,
+ U8#1, use=xterm,
+
# These entries allow access to the X titlebar and icon name as a status line.
# Note that twm (and possibly window managers descended from it such as tvtwm,
# ctwm, and vtwm) track windows by icon-name; thus, you don't want to mess
@@ -3437,7 +3666,7 @@ xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold,
# -- MATSUMOTO Shoji)
# kterm implements acsc via built-in table of X Drawable's
kterm|kterm kanji terminal emulator (X window system),
- eslok, hs,
+ eslok, hs, XT,
ncv@,
acsc=``aajjkkllmmnnooppqqrrssttuuvvwwxx~~,
csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs=, fsl=\E[?F,
@@ -3461,7 +3690,7 @@ xterm1|xterm terminal emulator ignoring the alternate screen buffer,
# The README's with the distribution also say that it supports SGR 21, 24, 25
# and 27, but they are not present in the terminfo or termcap.
color_xterm|cx|cx100|color_xterm color terminal emulator for X,
- OTbs, am, km, mir, msgr, xenl,
+ OTbs, am, km, mir, msgr, xenl, XT,
cols#80, it#8, lines#65, ncv@,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
@@ -3574,8 +3803,10 @@ gnome-fc5|GNOME Terminal,
# of the keys (which more/less correspond to the termcap values), and will
# interpret those according to the $TERM value, but others not in the
# terminfo according to some constantly changing set of hacker guidelines -TD
-gnome-2007|GNOME Terminal snapshot 2.18.1,
+vte-2007|VTE in GNOME Terminal snapshot 2.18.1,
use=xterm+pcc2, use=gnome-fc5,
+gnome-2007|GNOME Terminal snapshot 2.18.1,
+ use=vte-2007,
# GNOME Terminal 2.22.3 (2008 snapshot)
#
@@ -3584,8 +3815,10 @@ gnome-2007|GNOME Terminal snapshot 2.18.1,
# vt220's behavior, which will make it less usable on a VMS system (unclear
# what the intent of the developer is, since the NRC feature exposed in vttest
# by this change does not work).
+vte-2008|VTE in GNOME Terminal snapshot 2.22.3,
+ use=vte+pcfkeys, use=vte-2007,
gnome-2008|GNOME Terminal snapshot 2.22.3,
- use=gnome+pcfkeys, use=gnome-2007,
+ use=vte-2008,
# GNOME terminal may automatically use the contents of the "xterm" terminfo to
# supply key information which is not built into the program. With 2.22.3,
@@ -3603,7 +3836,7 @@ gnome-2008|GNOME Terminal snapshot 2.22.3,
#
# The parameters with \EO (SS3) are technically an error, since SS3 should have
# no parameters. This appears to be rote copying based on xterm+pcc0.
-gnome+pcfkeys|gnome variation on xterm+pcfkeys,
+vte+pcfkeys|VTE's variation on xterm+pcfkeys,
kf1=\EOP, kf13=\EO1;2P, kf14=\EO1;2Q, kf15=\EO1;2R,
kf16=\EO1;2S, kf2=\EOQ, kf25=\EO1;5P, kf26=\EO1;5Q,
kf27=\EO1;5R, kf28=\EO1;5S, kf3=\EOR, kf37=\EO1;6P,
@@ -3611,13 +3844,19 @@ gnome+pcfkeys|gnome variation on xterm+pcfkeys,
kf49=\EO1;3P, kf50=\EO1;3Q, kf51=\EO1;3R, kf52=\EO1;3S,
kf61=\EO1;4P, kf62=\EO1;4Q, kf63=\EO1;4R,
use=xterm+pcfkeys,
+gnome+pcfkeys|VTE's variation on xterm+pcfkeys,
+ use=vte+pcfkeys,
+vte|VTE aka GNOME Terminal,
+ use=vte-2008,
gnome|GNOME Terminal,
- use=gnome-2008,
+ use=vte,
# palette is hardcoded...
+vte-256color|VTE with xterm 256-colors,
+ initc@, use=xterm+256color, use=vte,
gnome-256color|GNOME Terminal with xterm 256-colors,
- initc@, use=xterm+256color, use=gnome,
+ use=vte-256color,
# XFCE Terminal 0.2.5.4beta2
#
@@ -3626,7 +3865,7 @@ gnome-256color|GNOME Terminal with xterm 256-colors,
# Since most of the terminfo-related behavior is due to the VTE library,
# the terminfo is the same as gnome-terminal.
xfce|Xfce Terminal,
- use=gnome,
+ use=vte,
# Multi-Gnome-Terminal 1.6.2
#
@@ -3679,7 +3918,8 @@ kvt|KDE terminal,
# different from xterm (and vt100's). They have the same behavior in this
# detail, but it is unclear which copies the other.
konsole-base|KDE console window,
- bce, km@, npc,
+ bce, km@, npc, XT,
+ ncv@,
bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h,
ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l,
hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1@,
@@ -3752,7 +3992,7 @@ konsole-256color|KDE console window with xterm 256-colors,
# control/shift/alt kf1 to kf12 \E[11;8~ to \E[24;8~
#
mlterm|multi lingual terminal emulator,
- am, eslok, km, mc5i, mir, msgr, npc, xenl,
+ am, eslok, km, mc5i, mir, msgr, npc, xenl, XT,
colors#8, cols#80, it#8, lines#24, pairs#64,
acsc=00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
@@ -3794,6 +4034,9 @@ mlterm+pcfkeys|fragment for PC-style fkeys,
kRIT6=\EO1;6C, kRIT7=\EO1;7C, kUP=\EO1;2A, kUP3=\EO1;3A,
kUP4=\EO1;4A, kUP5=\EO1;5A, kUP6=\EO1;6A, kUP7=\EO1;7A,
+mlterm-256color|mlterm 3.0 with xterm 256-colors,
+ use=xterm+256color, use=rxvt,
+
# From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
# Updated: Oezguer Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
# Notes:
@@ -3816,7 +4059,7 @@ mlterm+pcfkeys|fragment for PC-style fkeys,
# removed dch/dch1 because they are inconsistent with bce/ech -TD
# remove km as per tack test -TD
rxvt-basic|rxvt terminal base (X Window System),
- OTbs, am, bce, eo, mir, msgr, xenl, xon,
+ OTbs, am, bce, eo, mir, msgr, xenl, xon, XT,
cols#80, it#8, lines#24,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
@@ -3934,12 +4177,12 @@ rxvt+pcfkeys|fragment for PC-style fkeys,
kf38=\E[29\^, kf39=\E[31\^, kf4=\E[14~, kf40=\E[32\^,
kf41=\E[33\^, kf42=\E[34\^, kf43=\E[23@, kf44=\E[24@,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
- kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
- kslt=\E[4~, kDC5=\E[3\^, kDC6=\E[3@, kDN=\E[b, kDN5=\EOb,
- kEND5=\E[8\^, kEND6=\E[8@, kHOM5=\E[7\^, kHOM6=\E[7@,
- kIC5=\E[2\^, kIC6=\E[2@, kLFT5=\EOd, kNXT5=\E[6\^,
- kNXT6=\E[6@, kPRV5=\E[5\^, kPRV6=\E[5@, kRIT5=\EOc,
- kUP=\E[a, kUP5=\EOa,
+ kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, kind=\E[a, knp=\E[6~,
+ kpp=\E[5~, kri=\E[b, kslt=\E[4~, kDC5=\E[3\^, kDC6=\E[3@,
+ kDN=\E[b, kDN5=\EOb, kEND5=\E[8\^, kEND6=\E[8@,
+ kHOM5=\E[7\^, kHOM6=\E[7@, kIC5=\E[2\^, kIC6=\E[2@,
+ kLFT5=\EOd, kNXT5=\E[6\^, kNXT6=\E[6@, kPRV5=\E[5\^,
+ kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa,
rxvt|rxvt terminal emulator (X Window System),
ncv@,
@@ -3954,10 +4197,10 @@ rxvt-88color|rxvt 2.7.9 with xterm 88-colors,
rxvt-xpm|rxvt terminal emulator (X Window System),
use=rxvt,
rxvt-cygwin|rxvt terminal emulator (X Window System) on cygwin,
- acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
+ acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
use=rxvt,
rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygwin,
- acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376,
+ acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376,
use=rxvt-cygwin,
# This variant is supposed to work with rxvt 2.7.7 when compiled with
@@ -3965,12 +4208,22 @@ rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygw
rxvt-16color|xterm with 16 colors like aixterm,
ncv#32, use=ibm+16color, use=rxvt,
-# mrxvt 0.5.3
+# mrxvt 0.5.4
#
# mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which
# makes its function-keys different from other flavors of rxvt -TD
mrxvt|multitabbed rxvt,
- use=xterm+pcc2, use=xterm+r6f2, use=rxvt,
+ XT,
+ kEND=\E[8;2~, kHOM=\E[7;2~, kcub1=\E[D, kcud1=\E[B,
+ kcuf1=\E[C, kcuu1=\E[A, kend=\E[8~, khome=\E[7~,
+ kEND3=\E[8;3~, kEND4=\E[8;4~, kEND5=\E[8;5~,
+ kEND6=\E[8;6~, kEND7=\E[8;7~, kHOM3=\E[7;3~,
+ kHOM4=\E[7;4~, kHOM5=\E[7;5~, kHOM6=\E[7;6~,
+ kHOM7=\E[7;7~, use=xterm+r6f2, use=xterm+pcfkeys,
+ use=rxvt,
+
+mrxvt-256color|multitabbed rxvt with 256 colors,
+ use=xterm+256color, use=mrxvt,
# From: Michael Jennings <mej@valinux.com>
#
@@ -3983,7 +4236,7 @@ mrxvt|multitabbed rxvt,
# remove nonworking flash -TD
# remove km as per tack test -TD
Eterm|Eterm-color|Eterm with xterm-style color support (X Window System),
- am, bce, bw, eo, mc5i, mir, msgr, xenl, xon,
+ am, bce, bw, eo, mc5i, mir, msgr, xenl, xon, XT,
btns#5, cols#80, it#8, lines#24, lm#0, ncv@,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
@@ -4019,6 +4272,7 @@ Eterm-88color|Eterm with 88 colors,
# Based on rxvt 2.4.8, it has a few differences in key bindings
aterm|AfterStep terminal,
+ XT,
kbs=\177, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, use=rxvt,
# xiterm 0.5-5.2
@@ -4037,7 +4291,7 @@ xtermm|xterm terminal emulator (monocrome),
btns#3, cols#80, it#8, lines#24,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink@, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
- csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[1D,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
@@ -4140,7 +4394,7 @@ emu|emu native mode,
acsc=61a\202f\260g2j\213k\214l\215m\216n\217o\220q\222s\224t\225u\226v\227w\230x\231~\244,
bel=^G, blink=\EW, bold=\EU, civis=\EZ, clear=\EP\EE0;0;,
cnorm=\Ea, cr=^M, csr=\Ek%p1%d;%p2%d;, cub=\Eq-%p1%d;,
- cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\ED,
+ cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\EC,
cup=\EE%p1%d;%p2%d;, cuu=\Ep-%p1%d;, cuu1=\EA,
dch=\EI%p1%d;, dch1=\EI1;, dl=\ER%p1%d;, dl1=\ER1;,
ech=\Ej%p1%d;, ed=\EN, el=\EK, el1=\EL, home=\EE0;0;, ht=^I,
@@ -4285,6 +4539,31 @@ decansi|ANSI emulation with DEC compatibility hacks,
smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR,
u7=\E[6n, vpa=\E[%i%p1%dd,
+#### VWM
+#
+# vwmterm is a terminal emulator written for the VWM console window manager
+#
+vwmterm|(vwm term),
+ am, bce, ccc, mir, msgr, npc, xenl, xon,
+ colors#8, pairs#64,
+ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+ bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
+ clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub=\E[%p1%dD,
+ cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
+ cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
+ cuu1=\E[A, cvvis=\E[?25h, dim=\E[2m, ed=\E[J, el=\E[K,
+ home=\E[H, il1=\E[L, ind=^J, invis=\E[8m, kcub1=\E[D,
+ kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
+ kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[22~,
+ kf12=\E[23~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E,
+ kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+ khome=\E[1~, knp=\E[6~, kpp=\E[5~, rev=\E[7m, rmacs=\E[10m,
+ rmam=\E[?7l, rmcup=\E[?1049l, rs1=\E[H\E[J\E[m\Ec,
+ setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+ sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
+ sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h,
+ smcup=\E[?1049h, smso=\E[3m, smul=\E[4m,
+
#### MGR
#
# MGR is a Bell Labs window system lighter-weight than X.
@@ -4357,6 +4636,26 @@ eterm|gnu emacs term.el terminal emulation,
sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m,
smul=\E[4m,
+# The codes supported by the term.el terminal emulation in GNU Emacs 22.2
+eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
+ am, mir, msgr, xenl,
+ colors#8, cols#80, lines#24, pairs#64,
+ bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+ cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+ dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
+ el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@,
+ il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kbs=\177,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+ kdch1=\E[3~, kend=\E[4~, khome=\E[1~, kich1=\E[2~,
+ knp=\E[6~, kpp=\E[5~, op=\E[39;49m, rc=\E8, rev=\E[7m,
+ ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+ sc=\E7, setab=\E[%p1%'('%+%dm, setaf=\E[%p1%{30}%+%dm,
+ sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m,
+ sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m,
+ u6=\E[%i%d;%dR, u7=\E[6n,
+
# Entries for use by the `screen' program by Juergen Weigert,
# Michael Schroeder, Oliver Laumann. The screen and
# screen-w entries came with version 3.7.1. The screen2 and screen3 entries
@@ -4374,7 +4673,7 @@ eterm|gnu emacs term.el terminal emulation,
# tested with screen 3.09.08
screen|VT 100/ANSI X3.64 virtual terminal,
OTbs, OTpt, am, km, mir, msgr, xenl, G0,
- colors#8, cols#80, it#8, lines#24, pairs#64,
+ colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
@@ -4400,7 +4699,8 @@ screen|VT 100/ANSI X3.64 virtual terminal,
# The bce and status-line entries are from screen 3.9.13 (and require some
# changes to .screenrc).
screen-bce|VT 100/ANSI X3.64 virtual terminal with bce,
- bce, use=screen,
+ bce,
+ ech@, use=screen,
screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line,
dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen,
@@ -4493,10 +4793,20 @@ screen.teraterm|disable ncv in teraterm,
use=screen+fkeys, use=screen,
# Other terminals
screen.rxvt|screen in rxvt,
- bw,
+ bw, XT,
cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
kcuu1=\EOA, use=screen+fkeys, use=vt100+enq,
use=rxvt+pcfkeys, use=vt220+keypad, use=screen,
+screen.Eterm|screen in Eterm,
+ use=screen+fkeys, use=Eterm,
+screen.mrxvt|screen in mrxvt,
+ use=screen+fkeys, use=mrxvt,
+screen.vte|screen in any VTE-based terminal,
+ use=screen+fkeys, use=vte,
+screen.gnome|screen in GNOME Terminal,
+ use=screen+fkeys, use=gnome,
+screen.konsole|screen in KDE console window,
+ use=screen+fkeys, use=konsole,
# fix the backspace key
screen.linux|screen in linux console,
bw,
@@ -4504,6 +4814,44 @@ screen.linux|screen in linux console,
screen.mlterm|screen in mlterm,
use=screen+fkeys, use=mlterm,
+# The default "screen" entry is reasonably portable, but not optimal for the
+# most widely-used terminal emulators. The "bce" capability is supported in
+# screen since 3.9.13, and when used, will require fewer characters to be sent
+# to the terminal for updates.
+#
+# If you are using only terminals which support bce, then you can use this
+# feature in your screen configuration.
+#
+# Adding these lines to your ".screenrc" file will allow using these customized
+# entries:
+# term screen-bce
+# bce on
+# defbce on
+screen-bce.xterm-new|screen optimized for modern xterm,
+ bce,
+ ech@, use=screen.xterm-new,
+screen-bce.rxvt|screen optimized for rxvt,
+ bce,
+ ech@, use=screen.rxvt,
+screen-bce.Eterm|screen optimized for Eterm,
+ bce,
+ ech@, use=screen.Eterm,
+screen-bce.mrxvt|screen optimized for mrxvt,
+ bce,
+ ech@, use=screen.mrxvt,
+screen-bce.gnome|screen optimized for GNOME-Terminal,
+ bce,
+ ech@, use=screen.gnome,
+screen-bce.konsole|screen optimized for KDE console window,
+ bce,
+ ech@, use=screen.konsole,
+screen-bce.linux|screen optimized for linux console,
+ bce,
+ ech@, use=screen.linux,
+screen-bce.mlterm|screen optimized for mlterm,
+ bce,
+ ech@, use=screen.mlterm,
+
screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols,
cols#132, use=screen,
@@ -4762,11 +5110,28 @@ sun-type4|Sun Workstation console with type 4 keyboard,
# Most of the current references to sun-color are from users wondering why this
# is the default on install. Details from reading the wscons manpage, adding
# cub, etc., here (rather than in the base sun-il entry) since it is not clear
-# when those were added -TD
+# when those were added -TD (2005-05-28)
+#
+# According to wscons manpage, color is supported only on IA systems.
+# Sun's terminfo entry documents bold and smul/rmul capabilities, but wscons
+# does not list these. It also sets ncv#3, however that corresponds to
+# underline and standout.
+#
+# Since the documentation and terminfo do not agree, see also current code at
+# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/tem_safe.c
+#
+# That (actually a different driver which "supports" sun-color) also supports
+# these features:
+# vpa=\E[%i%p1%dd
+# hpa=\E[%i%p1%d`
+# cbt=\E[Z
+# dim=\E[2m
+# blink=\E[5m
+# It supports bold, but not underline -TD (2009-09-19)
sun-color|Sun Microsystems Workstation console with color support (IA systems),
- colors#8, pairs#64,
+ colors#8, ncv#3, pairs#64,
cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
- cuu=\E[%p1%dA, home=\E[H, op=\E[m\E[p, setab=\E[4%p1%dm,
+ cuu=\E[%p1%dA, home=\E[H, op=\E[0m, 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,
@@ -4978,7 +5343,7 @@ news29|news28-a|sony vt100 emulator 29 lines,
nwp511|nwp-511|nwp-511 vt100,
OTbs, OTpt, am, xenl,
cols#80, lines#24,
- clear=\E[;H\E[2J$<20/>, cuf1=\E[C,
+ clear=\E[;H\E[2J$<20/>, cub1=\E[D, cud1=\E[B, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A$<2/>, dl1=\E[M,
ed=\E[J$<30/>, el=\E[K$<3/>,
flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l,
@@ -5042,44 +5407,13 @@ dtterm|CDE desktop terminal,
### EMX termcap.dat compatibility modes
#
-# Keypad: Home=\0G Up=\0H PrPag=\0I
-# ka1,kh kcuu1 kpp,ka3
-#
-# Left=\0K 5=\0L Right=\0M
-# kcub1 kb2 kcuf1
-#
-# End=\0O Down=\0P NxPag=\0Q
-# kc1,kend kcud1 kc3,knp
-#
-# Ins=\0R Del=\0S
-# kich1 kdch1
-#
-# On keyboard with 12 function keys,
-# shifted f-keys: F13-F24
-# control f-keys: F25-F36
-# alt f-keys: F37-F48
-# The shift/control/alt keys do not modify each other, but alt overrides both,
-# and control overrides shift.
-#
# Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the
# no_color_video to inform the application that standout(1), underline(2)
# reverse(4) and invisible(64) don't work with color.
emx-base|DOS special keys,
bce, bw,
it#8, ncv#71,
- bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
- kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
- kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
- kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
- kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
- kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
- kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
- kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
- kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
- kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
- kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
- kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
- use=ansi.sys,
+ bel=^G, use=ansi.sys,
# Except for the "-emx" suffixes, these are as distributed with EMX 0.9b,
# a Unix-style environment used on OS/2. (Note that the suffix makes some
@@ -5247,7 +5581,7 @@ cygwinDBG|Debug Version for Cygwin,
setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m,
sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m,
- smul=\E[4m, tbc=\E[2g, vpa=\E[%i%p1%dd, use=vt102+enq,
+ smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt102+enq,
# Key definitions:
# The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc. match the
@@ -5510,7 +5844,7 @@ pcmw|PC running Microsoft Works,
interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color,
am, bw, msgr,
colors#8, cols#80, lines#25, ncv#3, pairs#64,
- acsc=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\,\021+^P0\333p\304r\304y\363z\362{\343|\330}\234,
+ acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[2J, cub=\E[%p1%dD,
cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC,
cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
@@ -5536,7 +5870,7 @@ interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with colo
rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, rmul=\E[m, rs1=\Ec,
sc=\E[s, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm,
- sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[1m, smul=\E[4m,
+ sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[7m, smul=\E[4m,
opennt-35|ntconsole-35|OpenNT-term35 compatible with color,
lines#35, use=opennt,
@@ -6208,10 +6542,10 @@ hp9837|hp98720|hp98721|HP 9000/300 workstations,
hp9845|HP 9845,
OTbs, am, da, db, eo, mir, xhp,
cols#80, lines#21,
- OTbc=\ED, clear=\EH\EJ, cuf1=\EC, cup=\E&a%p2%2dc%p1%2dY,
- cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK,
- if=/usr/share/tabset/std, il1=\EL, rmir=\ER, rmso=\E&d@,
- smir=\EQ, smso=\E&dB,
+ OTbc=\ED, clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC,
+ cup=\E&a%p2%2dc%p1%2dY, cuu1=\EA, dch1=\EP, dl1=\EM,
+ ed=\EJ, el=\EK, if=/usr/share/tabset/std, il1=\EL,
+ rmir=\ER, rmso=\E&d@, smir=\EQ, smso=\E&dB,
# From: Charles A. Finnell of MITRE <finnell@mitre.org>, developed 07SEP90
# (hp98550: replaced /usr/share/tabset/9837 with std because <it#8>,<hts=\E1>;
# added empty <acsc> to avoid warnings re <smacs>/<rmacs> --esr)
@@ -8252,7 +8586,7 @@ wy100|wyse 100,
wy120|wyse120|wy150|wyse150|Wyse 120/150,
am, bw, hs, km, mc5i, mir, msgr, xon,
cols#80, it#8, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45,
- acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+ acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>,
cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>,
@@ -8331,7 +8665,7 @@ wy120-w-vb|wy120-wvb|wyse120-wvb|wy150-w-vb|wyse150-w-vb|Wyse 120/150 132-column
wy60|wyse60|Wyse 60,
am, bw, hs, km, mc5i, mir, msgr,
cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#45,
- acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+ acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<100>,
cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
@@ -8500,7 +8834,7 @@ wy99a-ansi|Wyse WY-99GT in ansi mode (US PC keyboard),
wy99f|wy99fgt|wy-99fgt|Wyse WY-99GT (int'l PC keyboard),
am, bw, hs, km, mc5i, mir, msgr, xon,
cols#80, it#8, lines#25, wsl#46,
- acsc='x+y.wi~_vj(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G,
+ acsc='x+y.w_vi~j(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G,
blink=\EG2, cbt=\EI, civis=\E`0, clear=\E'\E(\032,
cnorm=\E`4\E`1, cr=^M, cub1=^H, cud1=\Ej, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
@@ -8552,7 +8886,7 @@ wy99fa|wy99fgta|wy-99fgta|Wyse WY-99GT (US PC keyboard),
wy160|wyse160|Wyse 160,
am, bw, hs, km, mc5i, mir, msgr,
cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#38,
- acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+ acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<30>,
cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<5>,
@@ -8860,7 +9194,7 @@ wy185-wvb|wyse185-wvb|wyse 185+flash+132 cols,
wy325|wyse325|Wyse epc,
am, bw, hs, mc5i, mir,
cols#80, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45,
- acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+ acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>,
cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>,
@@ -9307,7 +9641,7 @@ wy100q|Wyse 100 for Quotron,
kermit|standard kermit,
OTbs,
cols#80, lines#24,
- clear=\EE, cub1=^H, cuf1=\EC,
+ clear=\EE, cub1=^H, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
el=\EK, home=\EH, is2=K0 Standard Kermit 9-25-84\n,
kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^,
@@ -9792,14 +10126,14 @@ att5420_2|AT&T 5420 model 2 80 cols,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
blink=\E[5m, cbt=\E[1Z, clear=\EH\EJ, cnorm=\E[11;0j,
cr=\EG, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
- cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C,
- cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cvvis=\E[11;1j,
- dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
- dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J, el=\E[0K,
- el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H,
- hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
- ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dE,
- invis=\E[8m,
+ cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A,
+ cvvis=\E[11;1j, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
+ dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J,
+ el=\E[0K, el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8,
+ home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH,
+ ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J,
+ indn=\E[%p1%dE, invis=\E[8m,
is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;0j\E[6;0j\E[7;0j\E[8;0j\E[9;1j\E[10;0j\E[15;0j\E[16;1j\E[19;0j\E[20;1j\E[29;0j\E[1;24r,
kbeg=\Et, kbs=^H, kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D,
kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M,
@@ -9972,7 +10306,7 @@ att4426|tty4426|teletype 4426S,
bel=^G, bold=\E[5m, clear=\E[H\E[2J\E[1U\E[H\E[2J\E[1V,
cr=^M, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B,
cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
- cuu=\E[%p1%dA, cuu1=\EA, dch=\E[%p1%dP, dch1=\EP,
+ cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EP,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[0K, home=\E[H,
hpa=\E[%p1%dG, ht=^I, hts=\E1, ich=\E[%p1%d@, ich1=\E\^,
il=\E[%p1%dL, il1=\EL, ind=^J, indn=\E[%p1%dS,
@@ -10000,7 +10334,7 @@ att510a|bct510a|AT&T 510A Personal Terminal,
acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z,
civis=\E[11;0|, clear=\E[H\E[J, cnorm=\E[11;3|, cr=^M,
- cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[1B,
+ cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP,
dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J,
@@ -10033,7 +10367,7 @@ att510d|bct510d|AT&T 510D Personal Terminal,
acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z,
clear=\E[H\E[J, cnorm=\E[11;3|, cr=^M, cub=\E[%p1%dD,
- cub1=^H, cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC,
+ cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP, dch1=\E[P,
dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[0K,
@@ -11060,7 +11394,7 @@ aaa+unk|aaa-unk|ann arbor ambassador (internal - don't use this directly),
sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
sgr0=\E[m,
smkx=\EP`>z~[[J`8xz~[[A`4xz~[[D`6xz~[[C`2xz~[[B\E\\,
- smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[2g,
+ smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
vpa=\E[%p1%{1}%+%dd,
aaa+rv|ann arbor ambassador in reverse video,
@@ -11430,7 +11764,7 @@ adds980|a980|adds consul 980,
cit80|cit-80|citoh 80,
OTbs, am,
cols#80, lines#24,
- clear=\E[H\EJ, cr=^M, cub1=^H, cuf1=\E[C,
+ clear=\E[H\EJ, cr=^M, cub1=^H, cud1=\E[B, cuf1=\E[C,
cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\EJ, el=\EK, ff=^L,
ind=^J, is2=\E>, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=,
@@ -11439,9 +11773,9 @@ cit80|cit-80|citoh 80,
cit101|citc|C.itoh fast vt100,
OTbs, am, xenl,
cols#80, lines#24,
- bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cuf1=\E[C,
- cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E7\E[U,
- dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
+ bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cud1=\E[B,
+ cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
+ cvvis=\E7\E[U, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
flash=\E[?5h$<200/>\E[?5l, ich1=\E[@, il1=\E[L,
is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g,
kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
@@ -11459,9 +11793,9 @@ cit101e|C. Itoh CIT-101e,
OTbs, OTpt, am, mir, msgr,
cols#80, it#8, lines#24,
acsc=, clear=\E[H\E[J, cnorm=, csr=\E[%i%p1%2d;%p2%2dr,
- cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A,
- cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M, ed=\E[J,
- el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L,
+ cub1=\E[D, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH,
+ cuu1=\E[A, cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M,
+ ed=\E[J, el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\EOT,
kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOm, kf6=\EOl,
kf7=\EOM, kf8=\EOn, rc=\E8, ri=\EM, rmacs=^O, rmir=\E[4l,
@@ -12147,7 +12481,7 @@ avt-ns|concept avt no status line,
sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
sgr0=\E[m, smacs=\017$<1>, smcup=\E[=4l\E[1;24w\E2\r,
smir=\E[4h, smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m,
- tbc=\E[2g, vpa=\E[%p1%{1}%+%dd,
+ tbc=\E[3g, vpa=\E[%p1%{1}%+%dd,
avt-rv-ns|concept avt in reverse video mode/no status line,
flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h,
use=avt-ns,
@@ -12357,7 +12691,7 @@ dgmode+color|Color info for Data General D470C terminals in DG mode,
dgunix+ccc|Configurable color info for DG D430C terminals in DG-UNIX mode,
bce, ccc,
colors#52, ncv#53, pairs#26,
- initp=\036RG0%p1%02X%p2%{256}%*%{1001}%/%02X%p3%{256}%*%{1001}%/%02X%p4%{256}%*%{1001}%/%02X%p5%{256}%*%{1001}%/%02X%p6%{256}%*%{1001}%/%02X%p7%{256}%*%{1001}%/%02X,
+ initp=\036RG0%p1%02X%p2%{255}%*%{1000}%/%02X%p3%{255}%*%{1000}%/%02X%p4%{255}%*%{1000}%/%02X%p5%{255}%*%{1000}%/%02X%p6%{255}%*%{1000}%/%02X%p7%{255}%*%{1000}%/%02X,
oc=\036RG01A00FF00000000\036RG01B00000000FF00\036RG01C007F00000000\036RG01D000000007F00,
op=\036RF4831A\036RF2E31B\036RF1D31C\036RF3F31D,
scp=\036RG2%p1%02X,
@@ -12366,7 +12700,7 @@ dgunix+ccc|Configurable color info for DG D430C terminals in DG-UNIX mode,
dg+ccc|Configurable color info for DG D430C terminals in DG mode,
bce, ccc,
colors#52, ncv#53, pairs#26,
- initp=\036RG0%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c%p2%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p3%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p4%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p5%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p6%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p7%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c,
+ initp=\036RG0%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c%p2%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p3%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p4%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p5%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p6%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p7%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c,
oc=\036RG01\:00??00000000\036RG01;00000000??00\036RG01<007?00000000\036RG01=000000007?00,
op=\036RF4831\:\036RF2>31;\036RF1=31<\036RF3?31=,
scp=\036RG2%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c,
@@ -12402,11 +12736,11 @@ dg200|data general dasher 200,
dg210|dg-ansi|Data General 210/211,
am,
cols#80, lines#24,
- OTnl=\E[B, clear=\E[2J, cud1=\E[B, cup=\E[%i%p1%d;%p2%dH,
- cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, kcub1=\E[D,
- kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
- nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m, smso=\E[7;m,
- smul=\E[4;m,
+ OTnl=\E[B, clear=\E[2J, cub1=\E[D, cud1=\E[B, cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K,
+ home=\E[H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+ khome=\E[H, nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m,
+ smso=\E[7;m, smul=\E[4;m,
# From: Peter N. Wan <ihnp4!gatech!gacsr!wan>
# courtesy of Carlos Rucalde of Vantage Software, Inc.
# (dg211: this had <cup=\020%r%.%>., which was an ancient termcap hangover.
@@ -13278,7 +13612,7 @@ f200vi-w|Liberty Freedom 200 - 132 cols for vi,
go140|graphon go-140,
OTbs,
cols#80, it#8, lines#24,
- clear=\E[H\E[2J$<10/>, cub1=^H, cuf1=\E[C,
+ clear=\E[H\E[2J$<10/>, cub1=^H, cud1=\E[B, cuf1=\E[C,
cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M,
ed=\E[J$<10/>, el=\E[K, ht=^I,
if=/usr/share/tabset/vt100, il1=\E[L,
@@ -14274,9 +14608,9 @@ intext|Interactive Systems Corporation modified owl 1200,
intext2|intextii|INTERACTIVE modified owl 1251,
am, bw, ul,
cols#80, lines#24, xmc#0,
- bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, cud1=\E[B,
- cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P,
- dl1=\E[M, ed=\E[J, el=\E[K,
+ bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, cub1=\E[D,
+ cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
+ dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
flash=\E[;;;;;;;;;2;;u$<200/>\E[;;;;;;;;;1;;u,
hpa=\E[%p1%{1}%+%dG, ht=^I, ich1=\E[@, il1=\E[L, ind=\E[S,
kbs=^H, kcub1=\ED\r, kcud1=\EB\r, kcuf1=\EC\r, kcuu1=\EA\r,
@@ -14584,7 +14918,7 @@ prism9|p9|P9|MDC Prism-9 in ANSII mode,
sc=\E[%y,
sgr=\E[%{0}%?%p1%p3%|%t%{7}%+%;%?%p2%t%{2}%+%;%?%p4%t%{5}%+%;%?%p6%t%{1}%+%;m%?%p8%t\E[%{32}%+%d%%{%;%?%p9%t\016%e\017%;,
sgr0=\E[0m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m,
- tbc=\E[2g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
+ tbc=\E[3g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
# p9-w: Prism-9 in 132 column mode
# --------------------------------
@@ -15458,7 +15792,7 @@ ncr7901|ncr 7901 model,
ndr9500|nd9500|Newbury Data 9500,
am, bw, hs, mc5i, mir, msgr, ul, xon,
cols#80, lines#24, wsl#79,
- acsc=qKnImAjDwNuLtMvOlBkCxJ, bel=^G, cbt=\EI, civis=\E.0,
+ acsc=jDkClBmAnIqKtMuLvOwNxJ, bel=^G, cbt=\EI, civis=\E.0,
clear=\E;, cnorm=\E.1, cr=^M, cub1=^H, cud1=^V, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW,
dim=\E), dl1=\ER, dsl=\Eh, ed=\EY, el=\ET,
@@ -15578,8 +15912,8 @@ uts30|sperry uts30 with cp/m@1R1,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\ER, clear=^L,
cnorm=\ES, cr=^M, csr=\EU%p1%{32}%+%c%p2%{32}%+%c,
- cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB,
- cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH,
+ cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
+ cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EM,
dl=\E[%p1%dM, dl1=\EL, ed=\E[J, el=\E[K, fsl=^M, home=\E[H,
ht=^I, ich=\E[%p1%d@, ich1=\EO, il=\E[%p1%dL, il1=\EN,
@@ -15654,8 +15988,8 @@ dt110|Tandy DT-110 emulating ansi,
cols#80, lines#24,
acsc=jjkkllmmnnqqttuuvvwwxx, bel=^G, civis=\E[?25l,
clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
- csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[0B, cuf1=\E[C,
- cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[0A, dch1=\E[0P,
+ csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C,
+ cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[0P,
dl1=\E[0M, ed=\E[0J, el=\E[0K, enacs=\E(B\E)0, home=\E[H,
ht=^I, ich1=\E[0@, il1=\E[0L, ind=^J, is2=\E[?3l\E)0\E(B,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[K,
@@ -15806,7 +16140,7 @@ tek4105|tektronix 4105,
OTbs, am, mir, msgr, ul, xenl, xt,
cols#79, it#8, lines#29,
acsc=, bel=^G, blink=\E[=3;<7m, bold=\E[=7;<4m, cbt=\E[Z,
- clear=\E[2J\E[H, cr=^M, cud1=\E[1B, cuf1=\E[1C,
+ clear=\E[2J\E[H, cr=^M, cub1=\E[1D, cud1=\E[1B, cuf1=\E[1C,
cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[1A, dch1=\E[1P,
dim=\E[=1;<6m, dl1=\E[1M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
il1=\E[1L, ind=\E[S, invis=\E[=6;<5, is1=\E%!1\E[m,
@@ -15925,6 +16259,15 @@ tek4106brl|tek4107brl|tek4109brl|Tektronix 4106 4107 or 4109,
sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h,
smkx=\E[?1h\E=, smso=\E[7;42m, smul=\E[4m, tbc=\E[3g,
+# Tektronix 4107/4109 interpret 4 modes using "\E%!" followed by a code:
+# 0 selects Tek mode, i.e., \E%!0
+# 1 selects ANSI mode
+# 2 selects ANSI edit-mode
+# 3 selects VT52 mode
+#
+# One odd thing about the description (which has been unchanged since the 90s)
+# is that the cursor addressing is using VT52 mode, and a few others use the
+# VT52's non-CSI versions of ANSI, e.g., \EJ.
tek4107|tek4109|tektronix terminals 4107 4109,
OTbs, am, mir, msgr, ul, xenl, xt,
cols#79, it#8, lines#29,
@@ -15934,7 +16277,7 @@ tek4107|tek4109|tektronix terminals 4107 4109,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E%!3,
dim=\E%!1\E[<0m$<2>\E%!0, ed=\EJ, el=\EK, ht=^I, ind=^J,
kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
- rev=\E%!1\E[7m$<2>\E%0, ri=\EI,
+ rev=\E%!1\E[7m$<2>\E%!0, ri=\EI,
rmso=\E%!1\E[m$<2>\E%!0, rmul=\E%!1\E[m$<2>\E%!0,
sgr=\E%%!1\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m$<2>\E%%!0,
sgr0=\E%!1\E[m$<2>\E%!0, smso=\E%!1\E[7;5m$<2>\E%!0,
@@ -15971,9 +16314,9 @@ otek4112|o4112-nd|otek4113|otek4114|old tektronix 4110 series,
tek4112|tek4114|tektronix 4110 series,
OTbs, am, db,
cols#80, lines#34,
- cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cuf1=\E[C,
- cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P, dl1=\E[M,
- ed=\E[0J, el=\E[0K, ich1=\E[@, il1=\E[L,
+ cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cud1=\E[B,
+ cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P,
+ dl1=\E[M, ed=\E[0J, el=\E[0K, ich1=\E[@, il1=\E[L,
ind=\E7\E[0;0H\E[M\E8, is2=\E3!1, ri=\E7\E[0;0H\E[L\E8,
rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m,
tek4112-nd|4112 not in dialog area,
@@ -16036,8 +16379,8 @@ tek4115|newer tektronix 4115 entry with more ANSI capabilities,
kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l,
rmso=\E[m, rmul=\E[m,
- sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
- sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[2g,
+ sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m,
+ sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
vpa=\E[%p1%{1}%+%dd,
# The tek4125 emulates a vt100 incorrectly - the scrolling region
# command is ignored. The following entry replaces <csr> with the needed
@@ -16408,7 +16751,7 @@ apple-uterm|Ultraterm for Apple micros,
# This entry assumes that you are using an apple with the UCSD Pascal
# language card. SYSTEM.MISCINFO is assumed to be the same as that
# supplied with the standard apple except that screenwidth should be set
-# using SETUP to 80 columns. Note that the right arrow in not mapped in
+# using SETUP to 80 columns. Note that the right arrow is not mapped in
# this termcap entry. This is because that key, on the Apple, transmits
# a ^U and would thus preempt the more useful "up" function of vi.
#
@@ -16444,15 +16787,16 @@ apple-videx2|Apple II+ w/ Videx card (similar to Datamedia h1520),
apple-videx3|vapple|Apple II with 80 col card,
OTbs, am,
cols#80, lines#24,
- clear=\Ev, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
- cuu1=\EA, el=\Ex, home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
- kcuu1=\EA, kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!,
- kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH,
+ clear=\Ev, cub1=\ED, cud1=\EB, cuf1=\EC,
+ cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, el=\Ex,
+ home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
+ kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!, kf5=\E", kf6=\E#,
+ kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH,
#From: decvax!cbosgd!cbdkc1!mww Mike Warren via BRL
aepro|Apple II+ running ASCII Express Pro--vt52,
OTbs,
cols#80, lines#24,
- clear=\014$<300/>, cuf1=\EC,
+ clear=\014$<300/>, cub1=\ED, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
el=\EK, home=\EH,
# UCSD addition: Yet another termcap from Brian Kantor's Micro Munger Factory
@@ -16524,17 +16868,102 @@ mac|macintosh|Macintosh with MacTerminal,
mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
cols#132, use=mac,
+# nsterm*|Apple_Terminal - AppKit Terminal.app
+#
+# Terminal.app is a Terminal emulator bundled with NeXT's NeXTStep and
+# OPENSTEP/Mach operating systems, and with Apple's Rhapsody, Mac OS X
+# Server and Mac OS X operating systems. There is also a
+# "terminal.app" in GNUStep, but I believe it to be an unrelated
+# codebase and I have not attempted to describe it here.
+#
+# For NeXTStep, OPENSTEP/Mach, Rhapsody and Mac OS X Server 1.0, you
+# are pretty much on your own. Use "nsterm-7-m" and hope for the best.
+# You might also try "nsterm-7" and "nsterm-old" if you suspect your
+# version supports color.
+#
+# To determine the version of Terminal.app you're using by running:
+#
+# echo "$TERM_PROGRAM" "$TERM_PROGRAM_VERSION"
+#
+# For Apple_Terminal v200+, use "nsterm-16color" (a.k.a. "nsterm")
+#
+# For Apple_Terminal v71+/v100+, use "nsterm-bce".
+#
+# For Apple_Terminal v51+, use "nsterm-7-c" or "nsterm-7-c-s".
+#
+# For Apple_Terminal v41+, use "nsterm-old", or "nsterm-s".
+#
+# For all earlier versions (Apple_Terminal), try "nsterm-7-m"
+# (monochrome) or "nsterm-7" (color); "nsterm-7-m-s" and "nsterm-7-s"
+# might work too, but really you're on your own here since these
+# systems are very obsolete and I can't test them. I do welcome
+# patches, though :).
+
+# Other Terminals:
+#
+# For GNUstep_Terminal, you're probably best off using "linux" or
+# writing your own terminfo.
+
+# For MacTelnet, you're on your own. It's a different codebase, and
+# seems to be somewhere between "vt102", "ncsa" and "xterm-color".
+
+# For iTerm.app, see "iterm".
+
+#
# The AppKit Terminal.app descriptions all have names beginning with
# "nsterm". Note that the statusline (-s) versions use the window
# titlebar as a phony status line, and may produce warnings during
-# compilation as a result ("tsl uses 0 parameters, expected 1".) Ignore
-# these warnings, or even ignore these entries entirely. Apps which
-# need to position the cursor or do other fancy stuff inside the status
-# line won't work with these entries. They're primarily useful for
-# programs like Pine which provide simple notifications in the status
-# line. Please note that non-ASCII characters don't work right in the
-# status line, since Terminal.app incorrectly interprets their Unicode
-# codepoints as MacRoman codepoints.
+# compilation as a result ("tsl uses 0 parameters, expected 1".)
+# Ignore these warnings, or even ignore these entries entirely. Apps
+# which need to position the cursor or do other fancy stuff inside the
+# status line won't work with these entries. They're primarily useful
+# for programs like Pine which provide simple notifications in the
+# status line. Please note that non-ASCII characters don't work right
+# in the status line, since Terminal.app incorrectly interprets their
+# Unicode codepoints as MacRoman codepoints (in earlier Mac OS X
+# versions) or only accepts status lines consisting entirely of
+# characters from the first 256 Unicode positions (including C1 but
+# not C0 or DEL.)
+#
+# The Mythology* of AppKit Terminal.app:
+#
+# In the days of NeXTSTep 0.x and 1.x there were two incompatible
+# bundled terminal emulators, Shell and Terminal. Scott Hess wrote a
+# shareware replacement for Terminal called "Stuart" which NeXT bought
+# and used as the basis for the Terminal.app in NeXTstep 2+,
+# OPENSTEP/Mach, Apple Rhapsody, Mac OS X Server 1.0, and Mac OS X. I
+# don't know the TERM_PROGRAM and TERM_PROGRAM_VERSION settings or
+# capabilities for the early versions, but I believe that the
+# TERM_PROGRAM_VERSION may have been reset at some point.
+#
+# The early versions were tailored to the NeXT character set. Sometime
+# after the Apple aquisition the encoding was swiched to MacRoman
+# (initally with serious altcharset bugs due to incomplete conversion
+# of the old NeXT code,) and then later to UTF-8. Alos sometime during
+# or just prior to the early days of Mac OS X, the Terminal grew ANSI
+# 8-color support (initially buggy when combined with attributes, but
+# that was later fixed.) More recently, around Mac OS X version 10.3
+# or so (Terminal.app v100+) xterm-like 16-color support was added. In
+# some versions (for instance 133-1 which shipped with Mac OS X
+# version 10.4) this suffered from the <bce> bug, but that seems to
+# have been fixed in Mac OS X version 10.5 (Terminal.app v240.2+).
+#
+# In the early days of Mac OS X the terminal was fairly buggy and
+# would routinely crash under load. Many of these bugs seem to have
+# been fixed around Mac OS X version 10.3 (Terminal.app v100+) but
+# some may still remain. This change seems to correspond to
+# Terminal.app reporting "xterm-color" as $TERM rather than "vt100" as
+# it did previously.
+#
+# * This may correspond with what actually happened, but I don't
+# know. It is based on guesswork, hearsay, private correspondence,
+# my faulty memory, and the following online sources and references:
+#
+# [1] "Three Scotts and a Duane" by Simson L. Garfinkel
+# http://www.nextcomputers.org/NeXTfiles/Articles/NeXTWORLD/93.8/93.8.Dec.Community1.html
+#
+# [2] NeXTSTEP entry from Wikipedia, the free encyclopedia
+# https://secure.wikimedia.org/wikipedia/en/wiki/Nextstep
#
# * Renamed the AppKit Terminal.app entry from "Apple_Terminal" to
# "nsterm" to comply with the name length and case conventions and
@@ -16624,7 +17053,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
# export TERM
# if [ :"$TERM_PROGRAM_VERSION" = :41 ]
# then
-# TERM="nsterm"
+# TERM="nsterm-old"
# else
# TERM="nsterm-c-7"
# fi
@@ -16635,7 +17064,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
# if ( $?TERM && $?TERM_PROGRAM && $?TERM_PROGRAM_VERSION) then
# if ( :"$TERM" == :"vt100" && :"$TERM_PROGRAM" == :"Apple_Terminal" ) then
# if ( :"$TERM_PROGRAM_VERSION" == :41 ) then
-# setenv TERM "nsterm"
+# setenv TERM "nsterm-old"
# else
# setenv TERM "nsterm-c-7"
# endif
@@ -16652,25 +17081,25 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
- kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
- kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l,
- rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
+ invis=\E[8m, kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+ kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM,
+ rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
- sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m,
- sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
+ sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
+ sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
enacs=\E(B\E)0, rmacs=^O,
- sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
- smacs=^N, use=nsterm+7,
+ sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+ sgr0=\E[m\017, smacs=^N, use=nsterm+7,
nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
- acsc=0#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245+\335-\366\,\334.\377,
+ acsc=+\335\,\334-\366.\3770#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245,
enacs=\E(B\E)0, rmacs=^O,
- sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
- smacs=^N, use=nsterm+7,
+ sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+ sgr0=\E[m\017, smacs=^N, use=nsterm+7,
nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support,
hs,
@@ -16731,7 +17160,7 @@ nsterm-m|AppKit Terminal.app v41+ w/MacRoman charset (monochrome),
nsterm-m-s|AppKit Terminal.app v41+ w/MacRoman charset (monochrome w/statusline),
use=nsterm+s, use=nsterm+mac,
-nsterm|Apple_Terminal|AppKit Terminal.app v41+ w/MacRoman charset (color),
+nsterm-old|AppKit Terminal.app v41+ w/MacRoman charset (color),
use=nsterm+c41, use=nsterm+mac,
nsterm-c|AppKit Terminal.app v51+ w/MacRoman charset (full color),
@@ -16743,17 +17172,66 @@ nsterm-s|AppKit Terminal.app v41+ w/MacRoman charset (color w/statusline),
nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline),
use=nsterm+s, use=nsterm+c, use=nsterm+mac,
+# In Mac OS X version 10.5 the format of the preferences has changed
+# and a new, more complex technique is needed, e.g.,
+#
+# python -c 'import sys,objc;NSUserDefaults=objc.lookUpClass(
+# "NSUserDefaults");ud=NSUserDefaults.alloc();
+# ud.init();prefs=ud.persistentDomainForName_(
+# "com.apple.Terminal");prefs["Window Settings"][
+# prefs["Default Window Settings"]]["TerminalType"
+# ]=sys.argv[1];ud.setPersistentDomain_forName_(prefs,
+# "com.apple.Terminal")' nsterm-16color
+#
+# and it is still not settable from the preferences dialog. This is
+# tracked under rdar://problem/7365108 and rdar://problem/7365134
+# in Apple's bug reporter.
+nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
+ bw@, mir, npc,
+ civis=\E[?25l, cnorm=\E[?25h, dch=\E[%p1%dP, dch1=\E[P,
+ flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG,
+ ich=\E[%p1%d@, ich1=\E[@, kdch1=\E[3~, kend=\E[F,
+ kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
+ kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
+ kf18=\E[22~, kf19=\E[33~, kf20=\E[34~, kf5=\E[15~,
+ kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H,
+ knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
+ smcup=\E7\E[?47h, smir=\E[4h, vpa=\E[%i%p1%dd,
+ use=nsterm-c-s-acs,
+# The versions of Terminal.app in Mac OS X version 10.3.x seem to have
+# the background color erase bug. The newer version 240.2 in Mac OS X
+# version 10.5 does not.
+#
# This entry is based on newsgroup comments by Alain Bench, Christian Ebert,
# and D P Schreber comparing to nsterm-c-s-acs.
#
-# D P Schreber notes that $TERM can be set in Terminal.app, e.g.,
-# defaults write com.apple.Terminal TermCapString nsterm-c-s-acs
+# In Mac OS X version 10.4 and earlier, D P Schreber notes that $TERM
+# can be set in Terminal.app, e.g.,
+#
+# defaults write com.apple.Terminal TermCapString nsterm-bce
+#
# and that it is not set in Terminal's preferences dialog.
-nsterm-16color|AppKit Terminal.app v100.1.8 with MacOS X 10.3.9,
- kdch1=\E[3~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
- kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
- knp=\E[6~, kpp=\E[5~, use=nsterm-c-s-acs,
+nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (bce),
+ bce, bw, use=nsterm-16color,
+
+# This is an alias which should always point to the "current" version
+nsterm|Apple_Terminal|AppKit Terminal.app,
+ use=nsterm-16color,
+
+# iTerm.app from http://iterm.sourceforge.net/ is an alternative (and
+# more featureful) terminal emulator for Mac OS X. It is similar
+# enough in capabilities to nsterm-16color that I have derived this
+# description from that one, but as far as I know they share no code.
+# Many of the features are user-configurable, but I attempt only to
+# describe the default configuration.
+#
+# NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is
+# disabled.
+iTerm.app|iTerm.app terminal emulator for Mac OS X,
+ bce, bw@, ccc@,
+ csr@, initc@, kend=\EOF, khome=\EOH, use=xterm+256color,
+ use=nsterm-16color,
# xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
#
@@ -16863,7 +17341,7 @@ xnuppc+basic|Darwin PowerPC Console basic capabilities,
rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
sc=\E7,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
- sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
+ sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
smul=\E[4m, tbc=\E[3g, use=vt100+keypad,
xnuppc+c|Darwin PowerPC Console ANSI color support,
@@ -17064,42 +17542,6 @@ trs16|trs-80 model 16 console,
lf7=f8, mc4=\E]+, mc5=\E]=, rmacs=\ERg, rmso=\ER@, sgr0=\ER@,
smacs=\ERG, smso=\ERD,
-#### Atari ST
-#
-
-# From: Simson L. Garfinkel <simsong@media-lab.mit.edu>
-atari|atari st,
- OTbs, am,
- cols#80, it#8, lines#25,
- clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC,
- cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM,
- ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB,
- kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep,
-# UniTerm terminal program for the Atari ST: 49-line VT220 emulation mode
-# From: Paul M. Aoki <aoki@ucbvax.berkeley.edu>
-uniterm|uniterm49|UniTerm VT220 emulator with 49 lines,
- lines#49,
- is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H,
- use=vt220,
-# MiNT VT52 emulation. 80 columns, 25 rows.
-# MiNT is Now TOS, the operating system which comes with all Ataris now
-# (mainly Atari Falcon). This termcap is for the VT52 emulation you get
-# under tcsh/zsh/bash/sh/ksh/ash/csh when you run MiNT in `console' mode
-# From: Per Persson <pp@gnu.ai.mit.edu>, 27 Feb 1996
-st52|Atari ST with VT52 emulation,
- am, km,
- cols#80, lines#25,
- bel=^G, civis=\Ef, clear=\EH\EJ, cnorm=\Ee, cr=^M, cub1=\ED,
- cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
- cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
- ind=^J, ka1=\E#7, ka3=\E#5, kb2=\E#9, kbs=^H, kc1=\E#1,
- kc3=\E#3, kclr=\E#7, kcub1=\E#K, kcud1=\E#P, kcuf1=\E#M,
- kcuu1=\E#H, kf0=\E#D, kf1=\E#;, kf2=\E#<, kf3=\E#=, kf4=\E#>,
- kf5=\E#?, kf6=\E#@, kf7=\E#A, kf8=\E#B, kf9=\E#C, khome=\E#G,
- kil1=\E#R, kind=\E#2, kri=\E#8, lf0=f10, nel=^M^J, rc=\Ek,
- ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq,
- smcup=\Ee, smso=\Ep,
-
#### Commodore Business Machines
#
# Formerly located in West Chester, PA; went spectacularly bust in 1994
@@ -17307,23 +17749,31 @@ osexec|Osborne executive,
# even as single processes under SunOS and the Macintosh OS.
#
+# See
+# http://www.minix3.org/manpages/man4/console.4.html
+minix|minix console (v3),
+ use=ecma+color, use=minix-1.7,
+
+# See
+# http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html
# This is the entry provided with minix 1.7.4, with bogus :ri: removed.
-minix|minix console (v1.7),
+minix-1.7|minix console (v1.7),
am, xenl,
cols#80, it#8, lines#25,
bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M,
cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
- dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I,
- ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J,
- is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
- kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U, kf3=\E[T, kf4=\E[S,
- kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp, lf2=PgDn, lf3=Num +,
- lf4=Num -, lf5=Num 5, nel=^M^J, rev=\E[7m, ri=\EM,
- rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m,
+ dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, el1=\E[2K,
+ home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
+ il1=\E[L, ind=^J, is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B,
+ kcuf1=\E[C, kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U,
+ kf3=\E[T, kf4=\E[S, kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp,
+ lf2=PgDn, lf3=Num +, lf4=Num -, lf5=Num 5, nel=^M^J,
+ rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m,
+ smso=\E[7m, smul=\E[4m,
# Corrected Jan 14, 1997 by Vincent Broman <broman@nosc.mil>
-minix-old|minix console (v1.5),
+minix-old|minix-1.5|minix console (v1.5),
xon,
cols#80, it#8, lines#25,
bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M,
@@ -17729,7 +18179,7 @@ tws-generic|dku7102|Bull Questar tws terminals,
rmul=\E[m, rs2=\E[?=h\Ec, s0ds=^O, s1ds=^N,
sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
sgr0=\E[m\017, smacs=^N, smcup=\E[?>h\EPY99\:98\E\\,
- smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[2g,
+ smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g,
tsl=\EPY99\:98\E\\\E[0;98v\E[2;7m,
tws2102-sna|dku7102-sna|BULL Questar tws2102 for SNA,
dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v,
@@ -17930,8 +18380,9 @@ bq300-8|Bull vt320 full 8 bits 80 columns,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\2335m, bold=\2331m, civis=\233?25l,
clear=\233H\233J, cnorm=\233?25h, cr=^M,
- csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cud=\233%p1%dB,
- cuf=\233%p1%dC, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA,
+ csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=\2331D,
+ cud=\233%p1%dB, cud1=\2331B, cuf=\233%p1%dC, cuf1=\2331C,
+ cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\2331A,
dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM,
dsl=\2331$}\2332$~\n\2330$}, ech=\233%p1%dX, ed=\233J,
el=\233K, el1=\2331K, enacs=\E(B\E)0,
@@ -18472,7 +18923,7 @@ h19-us|h19us|h19-smul|heathkit w/keypad shifted/underscore cursor,
h19|heath|h19-b|heathkit|heath-19|z19|zenith|heathkit h19,
OTbs, am, eslok, hs, mir, msgr,
cols#80, it#8, lines#24,
- acsc=~\^x`qanbkcjdmelfgg+hai.kwsutvutvozs{, bel=^G,
+ acsc=+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\^, bel=^G,
clear=\EE, cnorm=\Ey4, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ex4,
dch1=\EN, ed=\EJ, el=\EK, fsl=\Ek\Ey5, home=\EH, ht=^I, ind=^J,
@@ -18610,7 +19061,7 @@ z100|h100|z110|z-100|h-100|heath/zenith z-100 pc with color monitor,
z100bw|h100bw|z110bw|z-100bw|h-100bw|heath/zenith z-100 pc,
OTbs, OTpt, mir, msgr,
OTkn#10, cols#80, it#8, lines#24,
- acsc=~\^x`qanbkcjdmelfgg+hai.kwsutvutvozs{,
+ acsc=+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\^,
clear=\EE$<5*/>, cnorm=\Ey4, cub1=^H, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<1*/>, cuu1=\EA,
cvvis=\Ex4, dch1=\EN$<1*/>, dl1=\EM$<5*/>, ed=\EJ, el=\EK,
@@ -18658,7 +19109,7 @@ ims950-rv|ims tvi950 rev video,
ims-ansi|ultima2|ultimaII|IMS Ultima II,
OTbs, am,
cols#80, it#8, lines#24,
- clear=\E[H\E[2J, cub1=^H, cud1=\ED,
+ clear=\E[H\E[2J, cub1=^H, cud1=\ED, cuf1=\EC,
cup=\E[%i%p1%2d;%p2%2dH, cuu1=\EM, ed=\E[0J, el=\E[0K,
ht=^I, if=/usr/share/tabset/vt100,
is2=\E[m\E[>14l\E[?1;?5;20l\E>\E[1m\r, kcub1=\E[D,
@@ -18769,9 +19220,9 @@ modgraph|mod24|modgraph terminal emulating vt100,
modgraph2|modgraph gx-1000 80x24 with keypad not enabled,
am, da, db,
cols#80, it#8, lines#24,
- clear=\EH\EJ$<50/>, cub1=^H, cuf1=\EC$<2/>,
- cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5/>, cuu1=\EA$<2/>,
- ed=\EJ$<50/>, el=\EK$<3/>, ht=^I,
+ clear=\EH\EJ$<50/>, cub1=^H, cud1=\EB$<2/>,
+ cuf1=\EC$<2/>, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5/>,
+ cuu1=\EA$<2/>, ed=\EJ$<50/>, el=\EK$<3/>, ht=^I,
is2=\E<\E\^5;2s\E\^7;1s\E[3g\E\^11;9s\E\^11;17s\E\^11;25s\E\^11;33s\E\^11;41s\E\^11;49s\E\^11;57s\E\^11;65s\E\^11;73s\E\^11;81s\E\^11;89s\E\^12;0s\E\^14;2s\E\^15;9s\E\^25;1s\E\^9;1s\E\^27;1,
ri=\EI$<5/>,
#
@@ -18842,9 +19293,9 @@ mt70|mt-70|Morrow MD-70; native Morrow mode,
ex155|Motorola Exorterm 155,
OTbs, am, bw,
OTkn#5, OTug#1, cols#80, lines#24,
- cbt=\E[, clear=\EX, cud1=\EB, cuf1=\ED,
- cup=\EE%p1%{32}%+%c%p2%{32}%+%c, ed=\ET, el=\EU,
- home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H,
+ cbt=\E[, clear=\EX, cub1=\ED, cud1=\EB, cuf1=\EC,
+ cup=\EE%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\ET,
+ el=\EU, home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H,
kcud1=^J, kcuf1=^L, kcuu1=^K, ked=\ET, kel=\EU, khome=\E@,
rmso=\Ec\ED, rmul=\Eg\ED, smso=\Eb\ED, smul=\Ef\ED,
@@ -19140,7 +19591,7 @@ t1061f|teleray 1061 with fast PROMs,
t10|teleray 10 special,
OTbs, km, xhp, xt,
cols#80, it#8, lines#24, xmc#2,
- clear=\Ej$<30/>, cub1=^H, cuf1=\EC,
+ clear=\Ej$<30/>, cub1=^H, cud1=\EB, cuf1=\EC,
cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ,
dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, ich1=\EP, il1=\EL,
ind=\Eq, pad=\0, ri=\Ep, rmso=\ER@, rmul=\ER@, smso=\ERD,
@@ -19862,7 +20313,7 @@ teletec|Teletec Datascreen,
v3220|LANPAR Vision II model 3220/3221/3222,
OTbs, am, mir, xenl,
cols#80, it#8, lines#24,
- clear=\E[H\E[J, cub1=^H, cuf1=\E[C,
+ clear=\E[H\E[J, cub1=^H, cud1=\E[B, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M,
ed=\E[J, el=\E[K, ht=^I, il1=\E[L,
is2=\E>\E[?3l\E[?7h\E[?8h\E[p, kcub1=\E[D, kcud1=\E[B,
@@ -21791,13 +22242,118 @@ v3220|LANPAR Vision II model 3220/3221/3222,
# * add "aterm" -TD
# * add "linux2.6.26" -TD
#
-# The following sets edit modes for GNU EMACS.
-# Local Variables:
-# fill-prefix:"\t"
-# fill-column:75
-# comment-column:0
-# comment-start-skip:"^#+"
-# comment-start:"# "
-# compile-command:"tic -c terminfo.master"
-# End:
+# 2008-11-15
+# * change several \E[2g (clear tab at current column) to \E[3g
+# (clear all tabs) to match definition for tbc capability -TD
+#
+# 2008-11-29
+# * add eterm-color -TD
+#
+# 2009-01-10
+# * add screen.Eterm -TD
+#
+# 2009-03-28
+# * correct typo in pfkey of ansi.sys-old
+# (report by Kalle Olavi Niemitalo)
+# * move function- and cursor-keys from emx-base to ansi.sys, and create
+# a pfkey capability which handles F1-F48 -TD
+#
+# 2009-05-02
+# * add vwmterm entry (Bryan Christ)
+#
+# 2009-09-19
+# * change ncv and op capabilities in sun-color to match Sun's entry for
+# this (report by Laszlo Peter)
+# * improve interix smso by using reverse rather than bold (report by
+# Kristof Zelechovski).
+#
+# 2009-10-03
+# * remove unnecessary kcan assignment to ^C from putty (Sven Joachim)
+# * add linux-16color (Benjamin Sittler)
+# * correct initc capability of linux-c-nc end-of-range (Benjamin Sittler)
+# * similar change for dg+ccc and dgunix+ccc (Benjamin Sittler)
+# * add ccc and initc capabilities to xterm-16color -TD
+#
+# 2009-10-31
+# * updated nsterm* entries (Benjamin Sittler, prompted by GenToo #206201)
+#
+# 2009-12-12
+# * updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta)
+#
+# 2009-12-12
+# * add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
+# * rename minix to minix-1.7, add minix entry for Minux3 -TD
+#
+# 2009-12-26
+# * add bterm (bogl 0.1.18) -TD
+# * minor fix to rxvt+pcfkeys -TD
+#
+# 2010-02-06
+# * update mrxvt to 0.5.4, add mrxvt-256color -TD
+#
+# 2010-02-13
+# * add several screen-bce.XXX entries -TD
+#
+# 2010-02-23
+# * modify screen-bce.XXX entries to exclude ech, since screen's color
+# model does not clear with color for that feature -TD
+#
+# 2010-03-20
+# * rename atari and st52 to atari-old, st52-old, use newer entries from
+# FreeMiNT by Guido Flohr (from patch/report by Alan Hourihane).
+#
+# 2010-06-12
+# * add mlterm+256color entry -TD
+#
+# 2010-07-17
+# * add hard-reset for rs2 to wsvt25 to help ensure that reset ends
+# the alternate character set (patch by Nicholas Marriott)
+#
+# 2010-08-28
+# * improve acsc for vt52 (Benjamin Sittler)
+# * modify nsterm entries for consistent sgr/sgr0 -TD
+# * modify xnuppc entries for consistent sgr/sgr0 -TD
+# * add invis to tek4115 sgr -TD
+#
+# 2010-09-11
+# * reformat acsc strings to canonical format -TD
+#
+# 2010-09-25
+# * add "XT" capability to entries for terminals that support both
+# xterm-style mouse- and title-controls, for "screen" which
+# special-cases TERM beginning with "xterm" or "rxvt" -TD
+#
+# 2010-10-02
+# * fill in no-parameter forms of cursor-movement where a parameterized
+# form is available -TD
+# * fill in missing cursor controls where the form of the controls is
+# ANSI -TD
+# * add parameterized cursor-controls to linux-basic (report by Dae) -TD
+#
+# 2010-10-09
+# * correct comparison used for setting 16-colors in linux-16color
+# entry (Novell #644831) -TD
+# * improve linux-16color entry, using "dim" for color-8 which makes it
+# gray rather than black like color-0 -TD
+#
+# 2010-11-20
+# * make "vte" the principal entry defining "gnome", since GNOME terminal
+# is merely one of several terminals whose behavior is provided by this
+# library -TD
+#
+# 2010-11-27
+# * fix typo in rmso for tek4106 -Goran Weinholt
+#
+# 2010-12-11
+# * suppress ncv in screen entry, allowing underline -Alejandro R. Sedeno
+# * also suppress ncv in konsole-base -TD
+#
+# 2011-02-05
+# * add U8 feature to denote entries for terminal emulators which do not
+# support VT100 SI/SO when processing UTF-8 encoding -TD
+# * add xterm-utf8 as a demo of the U8 feature -TD
+#
+# 2011-02-20
+# * add cons25-debian entry (Brian M Carlson, Debina #607662).
+#
######## SHANTIH! SHANTIH! SHANTIH!
diff --git a/mk-0th.awk b/mk-0th.awk
index fe91cca689f6..5a0bf4583ad8 100644
--- a/mk-0th.awk
+++ b/mk-0th.awk
@@ -1,6 +1,6 @@
-# $Id: mk-0th.awk,v 1.17 2005/01/22 16:31:40 tom Exp $
+# $Id: mk-0th.awk,v 1.18 2010/01/09 21:45:41 tom Exp $
##############################################################################
-# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -27,7 +27,7 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey 1996-on
#
# Generate list of sources for a library, together with lint/lintlib rules
#
@@ -36,9 +36,13 @@
# subsets (is used here to decide if wide-character code is used)
#
BEGIN {
+ which = libname;
using = 0;
found = 0;
}
+ /^@/ {
+ which = $0;
+ }
!/^[@#]/ {
if (using == 0)
{
@@ -57,7 +61,11 @@ BEGIN {
print ""
using = 1;
}
- if ( $0 != "" && $1 != "link_test" )
+ if (which ~ /port_/ )
+ {
+ # skip win32 source
+ }
+ else if ( $0 != "" && $1 != "link_test" )
{
if ( found == 0 )
{
diff --git a/mk-1st.awk b/mk-1st.awk
index e2f54ea4cbec..36c9eb3e6f93 100644
--- a/mk-1st.awk
+++ b/mk-1st.awk
@@ -1,6 +1,6 @@
-# $Id: mk-1st.awk,v 1.78 2007/03/24 22:10:55 tom Exp $
+# $Id: mk-1st.awk,v 1.85 2010/08/07 20:42:30 Gabriele.Balducci Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -40,8 +40,9 @@
# subset ("none", "base", "base+ext_funcs" or "termlib", etc.)
# ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable)
# ShlibVerInfix ("yes" or "no", determines location of version #)
-# TermlibRoot ("tinfo" or other root for libterm.so)
-# TermlibSuffix (".so" or other suffix for libterm.so)
+# SymLink ("ln -s", etc)
+# TermlibRoot ("tinfo" or other root for libterm.so)
+# TermlibSuffix (".so" or other suffix for libterm.so)
# ReLink ("yes", or "no", flag to rebuild shared libs on install)
# DoLinks ("yes", "reverse" or "no", flag to add symbolic links)
# rmSoLocs ("yes" or "no", flag to add extra clean target)
@@ -49,6 +50,7 @@
# overwrite ("yes" or "no", flag to add link to libcurses.a
# depend (optional dependencies for all objects, e.g, ncurses_cfg.h)
# host (cross-compile host, if any)
+# libtool_version (libtool "-version-info" or "-version-number")
#
# Notes:
# CLIXs nawk does not like underscores in command-line variable names.
@@ -59,7 +61,7 @@ function is_ticlib() {
return ( subset ~ /^ticlib$/ );
}
function is_termlib() {
- return ( subset ~ /^(ticlib\+)?termlib(\+ext_tinfo)?$/ );
+ return ( subset ~ /^(ticlib\+)?termlib((\+[^+ ]+)*\+[a-z_]+_tinfo)?$/ );
}
# see lib_name
function lib_name_of(a_name) {
@@ -115,7 +117,9 @@ function end_name_of(a_name) {
}
function symlink(src,dst) {
if ( src != dst ) {
- printf "rm -f %s; ", dst
+ if ( SymLink !~ /.*-f.*/ ) {
+ printf "rm -f %s; ", dst
+ }
printf "$(LN_S) %s %s; ", src, dst
}
}
@@ -240,6 +244,7 @@ BEGIN {
printf "# subset: %s\n", subset
printf "# ShlibVer: %s\n", ShlibVer
printf "# ShlibVerInfix: %s\n", ShlibVerInfix
+ printf "# SymLink: %s\n", SymLink
printf "# TermlibRoot: %s\n", TermlibRoot
printf "# TermlibSuffix: %s\n", TermlibSuffix
printf "# ReLink: %s\n", ReLink
@@ -335,11 +340,15 @@ END {
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
+ printf "\tcd $(DESTDIR)$(libdir) && ("
+ symlink(imp_name, ovr_name)
+ printf ")\n"
} 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
+ printf "\tcd $(DESTDIR)$(libdir) && ("
+ symlink(end_name, ovr_name)
+ printf ")\n"
}
}
if ( ldconfig != "" && ldconfig != ":" ) {
@@ -386,7 +395,13 @@ END {
}
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
+ if ( is_ticlib() ) {
+ printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) %s $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(TICS_LIST)\n", compile, lib_name, OBJS, libtool_version
+ } else if ( is_termlib() ) {
+ printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) %s $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(TINFO_LIST)\n", compile, lib_name, OBJS, libtool_version
+ } else {
+ printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) %s $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)\n", compile, lib_name, OBJS, libtool_version
+ }
print ""
print "install \\"
print "install.libs \\"
@@ -404,7 +419,7 @@ END {
{
end_name = lib_name;
printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
- printf "\t$(AR) $(AR_OPTS) $@ $?\n"
+ printf "\t$(AR) $(ARFLAGS) $@ $?\n"
printf "\t$(RANLIB) $@\n"
if ( host == "vxworks" )
{
@@ -420,7 +435,9 @@ END {
{
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(cd $(DESTDIR)$(libdir) && "
+ symlink("libncurses.a", "libcurses.a")
+ printf ")\n"
}
printf "\t$(RANLIB) $(DESTDIR)$(libdir)/%s\n", lib_name
if ( host == "vxworks" )
diff --git a/mk-dlls.sh.in b/mk-dlls.sh.in
new file mode 100644
index 000000000000..05c646ae294a
--- /dev/null
+++ b/mk-dlls.sh.in
@@ -0,0 +1,114 @@
+#!/bin/sh
+# $Id: mk-dlls.sh.in,v 1.3 2010/12/25 22:25:41 tom Exp $
+##############################################################################
+# Copyright (c) 2008,2010 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# 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
+#
+# Build DLLs on MinGW
+#
+LC_ALL=C @CC@ -v 2>&1 | grep Target | grep mingw
+if [ $? -eq 1 ]; then
+ echo "$0 requires a mingw environment" >&2
+else
+ mkdir "$TEMP/tmp-dll"
+ cat > "$TEMP/tmp-dll/arch.c" <<EOF
+#include <stdio.h>
+int main()
+{
+ printf("%d",8*sizeof(void*));
+ return(0);
+}
+EOF
+ pushd "$TEMP/tmp-dll"
+ @CC@ -o arch arch.c
+ ARCH=`./arch`
+ cd ..
+ rm -rf tmp-dll
+ popd
+ echo $ARCH > mingw_arch
+ echo Building DLLs and Import Libraries for Win${ARCH}
+
+ if [ -d lib ]; then
+ cf="-shared"
+ lf="--enable-auto-import"
+ pushd lib 2>&1 >/dev/null
+ for t in "" "t"
+ do
+ for m in "" "_g"
+ do
+ if [ -f libncurses${t}${m}.a ]; then
+ f=libncurses${t}${m}.a
+ g=ncurses${t}${m}
+ gi=libw${g}.dll.a
+ td=$TEMP/tmp-${g}
+ bd=`pwd`
+ rm -rf "${td}"
+ mkdir "${td}"
+ pushd "${td}"
+ ar x "${bd}/${f}" `ar t "${bd}/${f}"`
+ @CC@ $cf -o w${g}.dll -Wl,--out-implib,${gi} -Wl,--output-def,w${g}.def -Wl,$lf `ar t "${bd}/$f"` @LIBS@
+ lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def
+ rm -f `ar t "${bd}/$f"`
+ mv w${g}.dll "${bd}"
+ mv w${g}.lib "${bd}"
+ mv ${gi} "${bd}"
+ popd
+ rm -rf "${td}"
+
+ for l in panel menu form
+ do
+ for f in lib${l}${t}${m}.a
+ do
+ g=${l}${t}${m}
+ td=$TEMP/tmp-${g}
+ gi2=libw${g}.dll.a
+ bd=`pwd`
+ rm -rf "${td}"
+ mkdir "${td}"
+ echo $g
+ pushd "${td}"
+ ar x "${bd}/$f" `ar t "${bd}/$f"`
+ @CC@ $cf -o w${g}.dll -Wl,--out-implib,${gi2} -Wl,--output-def,w${g}.def -Wl,$lf `ar t "${bd}/$f"` "${bd}/${gi}" @LIBS@
+ lib //NOLOGO /MACHINE:i386 /DEF:w${g}.def
+ rm -f `ar t "${bd}/$f"`
+ mv w${g}.dll "${bd}"
+ mv w${g}.lib "${bd}"
+ mv ${gi2} "${bd}"
+ popd
+ rm -rf "${td}"
+ done
+ done
+ fi
+ done
+ done
+ popd
+ else
+ echo lib has not been built >&2
+ fi
+fi
diff --git a/mk-hdr.awk b/mk-hdr.awk
index 9b6bee4108c6..530cbe912958 100644
--- a/mk-hdr.awk
+++ b/mk-hdr.awk
@@ -1,6 +1,6 @@
-# $Id: mk-hdr.awk,v 1.2 2007/03/31 15:48:45 tom Exp $
+# $Id: mk-hdr.awk,v 1.3 2010/05/15 20:10:42 tom Exp $
##############################################################################
-# Copyright (c) 2007 Free Software Foundation, Inc. #
+# Copyright (c) 2007,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -74,7 +74,7 @@ END {
if ( count > 0 )
{
print "${DESTDIR}${includedir} :"
- print " sh ${srcdir}/../mkdirs.sh $@"
+ print " mkdir -p $@"
print ""
print "install \\"
print "install.libs \\"
diff --git a/mkdirs.sh b/mkdirs.sh
deleted file mode 100644
index 59fc39c21ae9..000000000000
--- a/mkdirs.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-# $Id: mkdirs.sh,v 1.5 2007/03/25 22:29:46 tom Exp $
-# -----------------------------------------------------------------------------
-# 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=$?
- if test $errstatus != 0
- then
- # may have failed if invoked in a parallel "make -j# install"
- if test -d "$pathcomp"
- then
- errstatus=0
- fi
- fi
- ;;
- esac
- fi
-
- pathcomp="$pathcomp/"
- done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in
index 558f79f0bbf3..45a26b9d7eaa 100644
--- a/ncurses/Makefile.in
+++ b/ncurses/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.113 2008/10/18 14:11:54 tom Exp $
+# $Id: Makefile.in,v 1.130 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -46,6 +46,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
CF_MFLAGS = @cf_cv_makeflags@
@@ -71,6 +72,7 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@@ -78,11 +80,14 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
-AR_OPTS = @AR_OPTS@
+ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -92,7 +97,7 @@ CPPFLAGS = -DHAVE_CONFIG_H -I../ncurses -I$(srcdir) @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
-BUILD_CPPFLAGS = -I../include @BUILD_CPPFLAGS@
+BUILD_CPPFLAGS = -I../include -DUSE_BUILD_CC @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@
@@ -140,6 +145,10 @@ FALLBACK_LIST = @FALLBACK_LIST@
USE_BIG_STRINGS = @USE_BIG_STRINGS@
TERMINFO_CAPS = $(top_srcdir)/include/@TERMINFO_CAPS@
+TERMINFO = @TERMINFO@
+TERMINFO_SRC = @TERMINFO_SRC@
+TIC_PATH = @TIC_PATH@
+
AUTO_SRC = \
./codes.c \
./comp_captab.c \
@@ -153,6 +162,18 @@ AUTO_SRC = \
init_keytry.h \
keys.list
+HEADER_DEPS = \
+ $(srcdir)/curses.priv.h \
+ ../include/ncurses_dll.h \
+ ../include/ncurses_cfg.h \
+ ../include/curses.h \
+ $(INCDIR)/nc_panel.h \
+ ../include/term.h \
+ $(INCDIR)/term_entry.h \
+ $(INCDIR)/nc_tparm.h \
+ $(INCDIR)/nc_alloc.h \
+ $(INCDIR)/nc_mingw.h
+
TEST_DEPS = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
@@ -164,11 +185,12 @@ TEST_PROGS = \
hashmap$x \
lib_mvcur$x
-base = $(srcdir)/base
-serial = $(srcdir)/tty
-tinfo = $(srcdir)/tinfo
-trace = $(srcdir)/trace
-wide = $(srcdir)/widechar
+base = $(srcdir)/base
+serial = $(srcdir)/tty
+tinfo = $(srcdir)/tinfo
+trace = $(srcdir)/trace
+wide = $(srcdir)/widechar
+win32con = $(srcdir)/win32con
################################################################################
all \
@@ -178,12 +200,12 @@ sources: $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
../lib : ; mkdir $@
./fallback.c : $(tinfo)/MKfallback.sh
- sh -e $(tinfo)/MKfallback.sh @TERMINFO@ @TERMINFO_SRC@ $(FALLBACK_LIST) >$@
+ sh -e $(tinfo)/MKfallback.sh $(TERMINFO) $(TERMINFO_SRC) $(TIC_PATH) $(FALLBACK_LIST) >$@
./lib_gen.c : $(base)/MKlib_gen.sh ../include/curses.h
sh -e $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" generated <../include/curses.h >$@
@@ -200,11 +222,11 @@ make_keys$(BUILD_EXEEXT) : \
$(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
make_hash$(BUILD_EXEEXT) : \
- $(tinfo)/comp_hash.c \
+ $(tinfo)/make_hash.c \
../include/hashsize.h
- $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) -DMAIN_PROGRAM $(tinfo)/comp_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
+ $(BUILD_CC) -o $@ $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
-./expanded.c : $(serial)/MKexpanded.sh
+./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
sh -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
./comp_captab.c: \
@@ -227,10 +249,10 @@ make_hash$(BUILD_EXEEXT) : \
echo | $(AWK) -f $(base)/MKunctrl.awk bigstrings=$(USE_BIG_STRINGS) >$@
tags:
- ctags *.[ch] */*.[ch]
+ $(CTAGS) *.[ch] */*.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch] */*.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch] */*.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
diff --git a/ncurses/README b/ncurses/README
index 120aa5b82c1d..cbde3354a6a3 100644
--- a/ncurses/README
+++ b/ncurses/README
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
--- Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -25,7 +25,26 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: README,v 1.9 2006/04/22 22:19:37 tom Exp $
+-- $Id: README,v 1.10 2009/06/27 14:44:30 tom Exp $
-------------------------------------------------------------------------------
For discussion of the package internals, see hackguide.html in the doc/html
directory.
+
+-------------------------------------------------------------------------------
+The llib-lXXXX files could be used as lint-library sources (and were, at one
+time). However, they are actually used as a documentation aid to keep track
+of changes to the public/private interfaces in ncurses. Most of the text in
+these files is generated using cproto; some manual cleanup and adjustment of
+types (to reflect #define's in curses.h) is needed. The functions listed in
+the llib-lXXXX files do not correspond to the default configure options; some
+additional ones are added to include "all" of the entrypoints for each of the
+major configurations (normal, wide-character, threaded):
+
+ --disable-macros
+ --disable-root-environ
+ --enable-expanded
+ --enable-getcap
+ --enable-getcap-cache
+ --enable-sp-funcs
+ --enable-termcap
+ --with-develop
diff --git a/ncurses/base/MKkeyname.awk b/ncurses/base/MKkeyname.awk
index b35ba2a98027..bb2599acb558 100644
--- a/ncurses/base/MKkeyname.awk
+++ b/ncurses/base/MKkeyname.awk
@@ -1,6 +1,6 @@
-# $Id: MKkeyname.awk,v 1.40 2008/07/12 18:40:00 tom Exp $
+# $Id: MKkeyname.awk,v 1.45 2010/12/19 01:36:14 tom Exp $
##############################################################################
-# Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -31,7 +31,6 @@ BEGIN {
print ""
print "#include <curses.priv.h>"
print "#include <tic.h>"
- print "#include <term_entry.h>"
print ""
first = 1;
}
@@ -67,7 +66,8 @@ END {
print "#define SIZEOF_TABLE 256"
print "#define MyTable _nc_globals.keyname_table"
print ""
- print "NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *sp, int c)"
+ print "NCURSES_EXPORT(NCURSES_CONST char *)"
+ print "safe_keyname (SCREEN *sp, int c)"
print "{"
print " int i;"
print " char name[20];"
@@ -116,14 +116,14 @@ END {
print " result = MyTable[c];"
print " }"
print "#if NCURSES_EXT_FUNCS && NCURSES_XNAMES"
- print " } else if (result == 0 && cur_term != 0) {"
+ print " } else if (result == 0 && HasTerminal(sp)) {"
print " int j, k;"
print " char * bound;"
- print " TERMTYPE *tp = &(cur_term->type);"
- print " int save_trace = _nc_tracing;"
+ print " TERMTYPE *tp = &(TerminalOf(sp)->type);"
+ print " unsigned save_trace = _nc_tracing;"
print ""
print " _nc_tracing = 0; /* prevent recursion via keybound() */"
- print " for (j = 0; (bound = keybound(c, j)) != 0; ++j) {"
+ print " for (j = 0; (bound = NCURSES_SP_NAME(keybound)(NCURSES_SP_ARGx c, j)) != 0; ++j) {"
print " for(k = STRCOUNT; k < (int) NUM_STRINGS(tp); k++) {"
print " if (tp->Strings[k] != 0 && !strcmp(bound, tp->Strings[k])) {"
print " result = ExtStrname(tp, k, strnames);"
@@ -141,9 +141,10 @@ END {
print " return result;"
print "}"
print ""
- print "NCURSES_EXPORT(NCURSES_CONST char *) keyname (int c)"
+ print "NCURSES_EXPORT(NCURSES_CONST char *)"
+ print "keyname (int c)"
print "{"
- print "\treturn _nc_keyname(SP, c);"
+ print " return safe_keyname (CURRENT_SCREEN, c);"
print "}"
print ""
print "#if NO_LEAKS"
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index a984e8545eff..66ae295c607c 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -2,10 +2,10 @@
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.34 2008/08/30 19:20:50 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.43 2011/01/22 19:47:29 tom Exp $)
#
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -51,7 +51,7 @@
# 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
+# 7. sed: squeeze spaces, strip off gen_ prefix.
#
# keep the editing independent of locale:
@@ -82,6 +82,8 @@ if test "$USE" = implemented ; then
cat >$ED1 <<EOF1
/^extern.*implemented/{
h
+ s/NCURSES_SP_NAME(\([^)]*\))/NCURSES_SP_NAME___\1/
+ h
s/^.*implemented:\([^ *]*\).*/P_POUNDCif_USE_\1_SUPPORT/p
g
s/^extern \([^;]*\);.*/\1/p
@@ -151,14 +153,13 @@ cat >$ED3 <<EOF3
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)/
+ s/^\(.*\) \(.*\) (\(.*\))\$/NCURSES_EXPORT(\1) (\2) (\3)/
EOF
else
cat >$ED4 <<EOF
@@ -169,6 +170,7 @@ cat >$ED4 <<EOF
g
s/^\(.*\) \(.*\) (\(.*\))\$/\1 call_\2 (\3)/
}
+s/\([^_]\)NCURSES_SP_NAME___\([a-zA-Z][a-zA-Z_]*\)/\1NCURSES_SP_NAME(\2)/g
EOF
fi
@@ -198,14 +200,16 @@ $0 !~ /^P_/ {
}
}
second = first + 1;
+ returnCast = "";
if ( $first == "chtype" ) {
- returnType = "Char";
+ returnType = "Chtype";
} 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";
+ returnType = "IntAttr";
+ returnCast = "(attr_t)";
} else if ( $first == "bool" || $first == "NCURSES_BOOL" ) {
returnType = "Bool";
} else if ( $second == "*" ) {
@@ -220,9 +224,6 @@ $0 !~ /^P_/ {
break;
}
}
- if (using == "generated") {
- print "M_" $myfunc
- }
print $0;
print "{";
argcount = 1;
@@ -247,6 +248,9 @@ $0 !~ /^P_/ {
if ($myfunc ~ /ripoffline/) {
dotrace = 0;
argcount = 2;
+ if ($myfunc ~ /NCURSES_SP_NAME/) {
+ argcount = 3;
+ }
}
if ($myfunc ~ /wunctrl/) {
dotrace = 0;
@@ -262,24 +266,26 @@ $0 !~ /^P_/ {
argtype = ""
for (i = myfunc; i <= NF; i++) {
ch = $i;
- if ( ch == "*" )
+ if ( ch == "*" ) {
pointer = 1;
- else if ( ch == "va_list" )
+ } else if ( ch == "va_list" ) {
va_list = 1;
- else if ( ch == "..." )
+ } else if ( ch == "..." ) {
varargs = 1;
- else if ( ch == "char" )
+ } else if ( ch == "char" ) {
argtype = "char";
- else if ( ch == "int" )
+ } else if ( ch == "int" ) {
argtype = "int";
- else if ( ch == "short" )
+ } else if ( ch == "short" ) {
argtype = "short";
- else if ( ch == "chtype" )
+ } else if ( ch == "chtype" ) {
argtype = "chtype";
- else if ( ch == "attr_t" || ch == "NCURSES_ATTR_T" )
+ } else if ( ch == "attr_t" || ch == "NCURSES_ATTR_T" ) {
argtype = "attr";
+ }
if ( ch == "," || ch == ")" ) {
+ argcast = "";
if (va_list) {
call = call "%s"
} else if (varargs) {
@@ -289,8 +295,10 @@ $0 !~ /^P_/ {
call = call "%s"
comma = comma "_nc_visbuf2(" num ","
pointer = 0;
- } else
+ } else {
call = call "%p"
+ comma = comma "(const void *)"
+ }
} else if (argcount != 0) {
if ( argtype == "int" || argtype == "short" ) {
call = call "%d"
@@ -298,6 +306,9 @@ $0 !~ /^P_/ {
} else if ( argtype != "" ) {
call = call "%s"
comma = comma "_trace" argtype "2(" num ","
+ if (argtype == "attr") {
+ argcast = "(chtype)";
+ }
} else {
call = call "%#lx"
comma = comma "(long)"
@@ -311,7 +322,7 @@ $0 !~ /^P_/ {
} else if ( varargs ) {
args = args comma "\"...\""
} else {
- args = args comma "z"
+ args = args comma argcast "z"
}
}
call = call ch
@@ -322,7 +333,7 @@ $0 !~ /^P_/ {
pointer = 0;
argtype = ""
}
- if ( i == 2 || ch == "(" )
+ if ( i == myfunc || ch == "(" )
call = call ch
}
call = call "\")"
@@ -333,12 +344,16 @@ $0 !~ /^P_/ {
if (dotrace)
printf "%s", call
- if (match($0, "^void"))
+ if (match($0, "^void")) {
call = ""
- else if (dotrace)
+ } else if (dotrace) {
call = sprintf("return%s( ", returnType);
- else
+ if (returnCast != "") {
+ call = call returnCast;
+ }
+ } else {
call = "@@return ";
+ }
call = call $myfunc "(";
for (i = 1; i < argcount; i++) {
@@ -353,8 +368,9 @@ $0 !~ /^P_/ {
}
if (!match($0, "^void"))
call = call ") ";
- if (dotrace)
+ if (dotrace) {
call = call ")";
+ }
print call ";"
if (match($0, "^void"))
@@ -381,8 +397,17 @@ BEGIN {
}
print " */"
print "#define NCURSES_ATTR_T int"
+ print "#include <ncurses_cfg.h>"
+ print ""
+ print "#undef NCURSES_NOMACROS /* _this_ file uses macros */"
+ print ""
print "#include <curses.priv.h>"
print ""
+ print "#undef vw_scanw"
+ print "#undef vwscanw"
+ print ""
+ print "#undef vw_printw"
+ print "#undef vwprintw"
}
/^DECLARATIONS/ {start = 1; next;}
{if (start) print \$0;}
diff --git a/ncurses/base/MKunctrl.awk b/ncurses/base/MKunctrl.awk
index 36fbeecb2e76..2140900e8c3b 100644
--- a/ncurses/base/MKunctrl.awk
+++ b/ncurses/base/MKunctrl.awk
@@ -1,6 +1,6 @@
-# $Id: MKunctrl.awk,v 1.23 2008/10/04 21:40:24 tom Exp $
+# $Id: MKunctrl.awk,v 1.26 2009/07/04 22:05:15 Clemens.Ladisch Exp $
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -36,19 +36,12 @@ BEGIN {
print "#include <curses.priv.h>"
print "#include <ctype.h>"
print ""
- print "#if USE_WIDEC_SUPPORT"
- print "#if HAVE_WCTYPE_H"
- print "#include <wctype.h>"
- print "#endif"
- print "#endif"
- print ""
print "#undef unctrl"
print ""
}
END {
- print "NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *sp, chtype ch)"
+ print "NCURSES_EXPORT(NCURSES_CONST char *) safe_unctrl(SCREEN *sp, chtype ch)"
print "{"
-
blob=""
offset=0
if (bigstrings) {
@@ -158,16 +151,6 @@ END {
print "\t\t && (check < 160))"
printf "\t\t\tresult = %s_c1[check - 128];\n", stringname;
print "\t\telse"
- print "#if USE_WIDEC_SUPPORT"
- print "\t\tif ((check >= 160)"
- print "\t\t && (check < 256)"
- print "\t\t && ((sp != 0)"
- print "\t\t && ((sp->_legacy_coding > 0)"
- print "\t\t || (sp->_legacy_coding == 0"
- print "\t\t && (isprint(check) || iswprint(check))))))"
- printf "\t\t\tresult = %s_c1[check - 128];\n", stringname;
- print "\t\telse"
- print "#else"
print "\t\tif ((check >= 160)"
print "\t\t && (check < 256)"
print "\t\t && ((sp != 0)"
@@ -176,7 +159,6 @@ END {
print "\t\t && isprint(check)))))"
printf "\t\t\tresult = %s_c1[check - 128];\n", stringname;
print "\t\telse"
- print "#endif /* USE_WIDEC_SUPPORT */"
print "#endif /* NCURSES_EXT_FUNCS */"
printf "\t\t\tresult = %s_table[check];\n", stringname;
print "\t} else {"
@@ -187,6 +169,6 @@ END {
print ""
print "NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype ch)"
print "{"
- print "\treturn _nc_unctrl(SP, ch);"
+ print "\treturn safe_unctrl(CURRENT_SCREEN, ch);"
print "}"
}
diff --git a/ncurses/base/define_key.c b/ncurses/base/define_key.c
index 3d5815f906d6..a49b094279c8 100644
--- a/ncurses/base/define_key.c
+++ b/ncurses/base/define_key.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,33 +27,40 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1997-on *
+ * Author: Thomas E. Dickey 1997-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
#include <curses.priv.h>
-MODULE_ID("$Id: define_key.c,v 1.13 2006/12/30 23:23:31 tom Exp $")
+MODULE_ID("$Id: define_key.c,v 1.20 2009/11/28 22:53:17 tom Exp $")
NCURSES_EXPORT(int)
-define_key(const char *str, int keycode)
+NCURSES_SP_NAME(define_key) (NCURSES_SP_DCLx const char *str, int keycode)
{
int code = ERR;
- T((T_CALLED("define_key(%s,%d)"), _nc_visbuf(str), keycode));
- if (SP == 0) {
+ T((T_CALLED("define_key(%p, %s,%d)"), (void *) SP_PARM, _nc_visbuf(str), keycode));
+ if (SP_PARM == 0 || !HasTInfoTerminal(SP_PARM)) {
code = ERR;
} else if (keycode > 0) {
unsigned ukey = (unsigned) keycode;
+#ifdef USE_TERM_DRIVER
+#define CallHasKey(keycode) CallDriver_1(SP_PARM, kyExist, keycode)
+#else
+#define CallHasKey(keycode) NCURSES_SP_NAME(has_key)(NCURSES_SP_ARGx keycode)
+#endif
+
if (str != 0) {
- define_key(str, 0);
- } else if (has_key(keycode)) {
- while (_nc_remove_key(&(SP->_keytry), ukey))
+ NCURSES_SP_NAME(define_key) (NCURSES_SP_ARGx str, 0);
+ } else if (CallHasKey(keycode)) {
+ while (_nc_remove_key(&(SP_PARM->_keytry), ukey))
code = OK;
}
if (str != 0) {
- if (key_defined(str) == 0) {
- if (_nc_add_to_try(&(SP->_keytry), str, ukey) == OK) {
+ if (NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx str) == 0) {
+ if (_nc_add_to_try(&(SP_PARM->_keytry), str, ukey) == OK) {
code = OK;
} else {
code = ERR;
@@ -63,8 +70,16 @@ define_key(const char *str, int keycode)
}
}
} else {
- while (_nc_remove_string(&(SP->_keytry), str))
+ while (_nc_remove_string(&(SP_PARM->_keytry), str))
code = OK;
}
returnCode(code);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+define_key(const char *str, int keycode)
+{
+ return NCURSES_SP_NAME(define_key) (CURRENT_SCREEN, str, keycode);
+}
+#endif
diff --git a/ncurses/base/key_defined.c b/ncurses/base/key_defined.c
index 759ad824318d..ef987a5484d5 100644
--- a/ncurses/base/key_defined.c
+++ b/ncurses/base/key_defined.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2003,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: key_defined.c,v 1.6 2006/12/30 23:22:55 tom Exp $")
+MODULE_ID("$Id: key_defined.c,v 1.9 2009/10/24 22:15:47 tom Exp $")
static int
find_definition(TRIES * tree, const char *str)
@@ -65,14 +65,22 @@ find_definition(TRIES * tree, const char *str)
* Otherwise, return the keycode's value (neither OK/ERR).
*/
NCURSES_EXPORT(int)
-key_defined(const char *str)
+NCURSES_SP_NAME(key_defined) (NCURSES_SP_DCLx 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);
+ T((T_CALLED("key_defined(%p, %s)"), (void *) SP_PARM, _nc_visbuf(str)));
+ if (SP_PARM != 0 && str != 0) {
+ code = find_definition(SP_PARM->_keytry, str);
}
returnCode(code);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+key_defined(const char *str)
+{
+ return NCURSES_SP_NAME(key_defined) (CURRENT_SCREEN, str);
+}
+#endif
diff --git a/ncurses/base/keybound.c b/ncurses/base/keybound.c
index 2995714ba936..65e6bfc63620 100644
--- a/ncurses/base/keybound.c
+++ b/ncurses/base/keybound.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,25 +27,34 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1999-on *
+ * Author: Thomas E. Dickey 1999-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
#include <curses.priv.h>
-MODULE_ID("$Id: keybound.c,v 1.7 2006/06/17 18:19:24 tom Exp $")
+MODULE_ID("$Id: keybound.c,v 1.10 2009/10/24 22:15:47 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)
+NCURSES_SP_NAME(keybound) (NCURSES_SP_DCLx int code, int count)
{
char *result = 0;
- T((T_CALLED("keybound(%d,%d)"), code, count));
- if (SP != 0 && code >= 0) {
- result = _nc_expand_try(SP->_keytry, (unsigned) code, &count, 0);
+ T((T_CALLED("keybound(%p, %d,%d)"), (void *) SP_PARM, code, count));
+ if (SP_PARM != 0 && code >= 0) {
+ result = _nc_expand_try(SP_PARM->_keytry, (unsigned) code, &count, 0);
}
returnPtr(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+keybound(int code, int count)
+{
+ return NCURSES_SP_NAME(keybound) (CURRENT_SCREEN, code, count);
+}
+#endif
diff --git a/ncurses/base/keyok.c b/ncurses/base/keyok.c
index ad8988cded3b..0eacf4926300 100644
--- a/ncurses/base/keyok.c
+++ b/ncurses/base/keyok.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,12 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1997-on *
+ * Author: Thomas E. Dickey 1997-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
#include <curses.priv.h>
-MODULE_ID("$Id: keyok.c,v 1.7 2006/12/30 16:22:33 tom Exp $")
+MODULE_ID("$Id: keyok.c,v 1.10 2009/10/24 22:15:47 tom Exp $")
/*
* Enable (or disable) ncurses' interpretation of a keycode by adding (or
@@ -45,28 +46,33 @@ MODULE_ID("$Id: keyok.c,v 1.7 2006/12/30 16:22:33 tom Exp $")
*/
NCURSES_EXPORT(int)
-keyok(int c, bool flag)
+NCURSES_SP_NAME(keyok) (NCURSES_SP_DCLx int c, bool flag)
{
int code = ERR;
- int count = 0;
- char *s;
+ T((T_CALLED("keyok(%p, %d,%d)"), (void *) SP_PARM, c, flag));
+#ifdef USE_TERM_DRIVER
+ code = CallDriver_2(sp, kyOk, c, flag);
+#else
T((T_CALLED("keyok(%d,%d)"), c, flag));
if (c >= 0) {
+ int count = 0;
+ char *s;
unsigned ch = (unsigned) c;
+
if (flag) {
- while ((s = _nc_expand_try(SP->_key_ok, ch, &count, 0)) != 0
- && _nc_remove_key(&(SP->_key_ok), ch)) {
- code = _nc_add_to_try(&(SP->_keytry), s, ch);
+ while ((s = _nc_expand_try(SP_PARM->_key_ok, ch, &count, 0)) != 0
+ && _nc_remove_key(&(SP_PARM->_key_ok), ch)) {
+ code = _nc_add_to_try(&(SP_PARM->_keytry), s, ch);
free(s);
count = 0;
if (code != OK)
break;
}
} else {
- while ((s = _nc_expand_try(SP->_keytry, ch, &count, 0)) != 0
- && _nc_remove_key(&(SP->_keytry), ch)) {
- code = _nc_add_to_try(&(SP->_key_ok), s, ch);
+ while ((s = _nc_expand_try(SP_PARM->_keytry, ch, &count, 0)) != 0
+ && _nc_remove_key(&(SP_PARM->_keytry), ch)) {
+ code = _nc_add_to_try(&(SP_PARM->_key_ok), s, ch);
free(s);
count = 0;
if (code != OK)
@@ -74,5 +80,14 @@ keyok(int c, bool flag)
}
}
}
+#endif
returnCode(code);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+keyok(int c, bool flag)
+{
+ return NCURSES_SP_NAME(keyok) (CURRENT_SCREEN, c, flag);
+}
+#endif
diff --git a/ncurses/base/legacy_coding.c b/ncurses/base/legacy_coding.c
index 1c2f160a605d..d8c80208c6a9 100644
--- a/ncurses/base/legacy_coding.c
+++ b/ncurses/base/legacy_coding.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,22 +27,31 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey *
+ * Author: Thomas E. Dickey 2005 *
+ * Juergen Pfeifer 2009 *
****************************************************************************/
#include <curses.priv.h>
-MODULE_ID("$Id: legacy_coding.c,v 1.2 2005/12/17 23:38:17 tom Exp $")
+MODULE_ID("$Id: legacy_coding.c,v 1.5 2009/10/24 22:15:00 tom Exp $")
NCURSES_EXPORT(int)
-use_legacy_coding(int level)
+NCURSES_SP_NAME(use_legacy_coding) (NCURSES_SP_DCLx int level)
{
int result = ERR;
- T((T_CALLED("use_legacy_coding(%d)"), level));
- if (level >= 0 && level <= 2 && SP != 0) {
- result = SP->_legacy_coding;
- SP->_legacy_coding = level;
+ T((T_CALLED("use_legacy_coding(%p,%d)"), (void *) SP_PARM, level));
+ if (level >= 0 && level <= 2 && SP_PARM != 0) {
+ result = SP_PARM->_legacy_coding;
+ SP_PARM->_legacy_coding = level;
}
returnCode(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+use_legacy_coding(int level)
+{
+ return NCURSES_SP_NAME(use_legacy_coding) (CURRENT_SCREEN, level);
+}
+#endif
diff --git a/ncurses/base/lib_addch.c b/ncurses/base/lib_addch.c
index 20a97a01a011..515ebaf0b8fc 100644
--- a/ncurses/base/lib_addch.c
+++ b/ncurses/base/lib_addch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,7 +36,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_addch.c,v 1.113 2008/08/16 19:20:04 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.124 2010/04/24 22:41:05 tom Exp $")
static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
@@ -77,12 +77,6 @@ render_char(WINDOW *win, NCURSES_CH_T ch)
if ((pair = GET_WINDOW_PAIR(win)) == 0)
pair = GetPair(win->_nc_bkgd);
}
-#if 0
- if (pair > 255) {
- NCURSES_CH_T fixme = ch;
- SetPair(fixme, pair);
- }
-#endif
AddAttr(ch, (a & COLOR_MASK(AttrOf(ch))));
SetPair(ch, pair);
}
@@ -131,7 +125,7 @@ newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos)
*ypos = win->_regbottom;
result = TRUE;
} else {
- *ypos += 1;
+ *ypos = (NCURSES_SIZE_T) (*ypos + 1);
}
return result;
}
@@ -176,8 +170,8 @@ fill_cells(WINDOW *win, int count)
if (waddch_literal(win, blank) == ERR)
break;
}
- win->_curx = save_x;
- win->_cury = save_y;
+ win->_curx = (NCURSES_SIZE_T) save_x;
+ win->_cury = (NCURSES_SIZE_T) save_y;
}
#endif
@@ -213,9 +207,9 @@ _nc_build_wch(WINDOW *win, ARG_CH_T ch)
buffer[WINDOW_EXT(win, addch_used)] = (char) CharOf(CHDEREF(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) {
+ if ((len = (int) mbrtowc(&result,
+ buffer,
+ WINDOW_EXT(win, addch_used), &state)) > 0) {
attr_t attrs = AttrOf(CHDEREF(ch));
if_EXT_COLORS(int pair = GetPair(CHDEREF(ch)));
SetChar(CHDEREF(ch), result, attrs);
@@ -260,20 +254,37 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch)
/*
* Build up multibyte characters until we have a wide-character.
*/
+#if NCURSES_SP_FUNCS
+#define DeriveSP() SCREEN *sp = _nc_screen_of(win);
+#else
+#define DeriveSP() /*nothing */
+#endif
if_WIDEC({
+ DeriveSP();
if (WINDOW_EXT(win, addch_used) != 0 || !Charable(ch)) {
int len = _nc_build_wch(win, CHREF(ch));
if (len >= -1) {
- /* handle EILSEQ */
- if (is8bits(CharOf(ch))) {
- const char *s = unctrl((chtype) CharOf(ch));
- if (s[1] != 0) {
- return waddstr(win, s);
+ attr_t attr = AttrOf(ch);
+
+ /* handle EILSEQ (i.e., when len >= -1) */
+ if (len == -1 && is8bits(CharOf(ch))) {
+ int rc = OK;
+ const char *s = NCURSES_SP_NAME(unctrl)
+ (NCURSES_SP_ARGx (chtype) CharOf(ch));
+
+ if (s[1] != '\0') {
+ while (*s != '\0') {
+ rc = waddch(win, UChar(*s) | attr);
+ if (rc != OK)
+ break;
+ ++s;
+ }
+ return rc;
}
}
if (len == -1)
- return waddch(win, ' ');
+ return waddch(win, ' ' | attr);
} else {
return OK;
}
@@ -327,6 +338,7 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch)
return ERR;
x = win->_curx;
y = win->_cury;
+ line = win->_line + y;
}
/*
* Check for cells which are orphaned by adding this character, set
@@ -384,7 +396,7 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch)
if (x > win->_maxx) {
return wrap_to_next_line(win);
}
- win->_curx = x;
+ win->_curx = (NCURSES_SIZE_T) x;
return OK;
}
@@ -393,9 +405,12 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
/* the workhorse function -- add a character to the given window */
{
NCURSES_SIZE_T x, y;
- chtype t = CharOf(ch);
- const char *s = unctrl(t);
-
+ chtype t = (chtype) CharOf(ch);
+#if USE_WIDEC_SUPPORT || NCURSES_SP_FUNCS || USE_REENTRANT
+ SCREEN *sp = _nc_screen_of(win);
+#endif
+ const char *s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx t);
+ int tabsize = 8;
/*
* If we are using the alternate character set, forget about locale.
* Otherwise, if unctrl() returns a single-character or the locale
@@ -404,14 +419,14 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
if ((AttrOf(ch) & A_ALTCHARSET)
|| (
#if USE_WIDEC_SUPPORT
- (SP != 0 && SP->_legacy_coding) &&
+ (sp != 0 && sp->_legacy_coding) &&
#endif
s[1] == 0
)
|| (
isprint(t)
#if USE_WIDEC_SUPPORT
- || ((SP == 0 || !SP->_legacy_coding) &&
+ || ((sp == 0 || !sp->_legacy_coding) &&
(WINDOW_EXT(win, addch_used)
|| !_nc_is_charable(CharOf(ch))))
#endif
@@ -427,8 +442,12 @@ waddch_nosync(WINDOW *win, const NCURSES_CH_T ch)
switch (t) {
case '\t':
- x += (TABSIZE - (x % TABSIZE));
-
+#if USE_REENTRANT
+ tabsize = *ptrTabsize(sp);
+#else
+ tabsize = TABSIZE;
+#endif
+ x = (NCURSES_SIZE_T) (x + (tabsize - (x % tabsize)));
/*
* Space-fill the tab on the bottom line so that we'll get the
* "correct" cursor position.
@@ -514,7 +533,7 @@ waddch(WINDOW *win, const chtype ch)
NCURSES_CH_T wch;
SetChar2(wch, ch);
- TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win,
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), (void *) win,
_tracechtype(ch)));
if (win && (waddch_nosync(win, wch) != ERR)) {
@@ -533,7 +552,8 @@ wechochar(WINDOW *win, const chtype ch)
NCURSES_CH_T wch;
SetChar2(wch, ch);
- TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"),
+ (void *) win,
_tracechtype(ch)));
if (win && (waddch_nosync(win, wch) != ERR)) {
diff --git a/ncurses/base/lib_addstr.c b/ncurses/base/lib_addstr.c
index 4e3a040cf032..d73ce00a4519 100644
--- a/ncurses/base/lib_addstr.c
+++ b/ncurses/base/lib_addstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,7 +44,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_addstr.c,v 1.48 2007/10/13 19:56:57 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.51 2010/12/19 01:22:58 tom Exp $")
NCURSES_EXPORT(int)
waddnstr(WINDOW *win, const char *astr, int n)
@@ -52,7 +52,7 @@ 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));
+ T((T_CALLED("waddnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(astr, n), n));
if (win && (str != 0)) {
TR(TRACE_VIRTPUT | TRACE_ATTRS,
@@ -85,7 +85,7 @@ waddchnstr(WINDOW *win, const chtype *astr, int n)
int i;
struct ldat *line;
- T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n));
+ T((T_CALLED("waddchnstr(%p,%p,%d)"), (void *) win, (const void *) astr, n));
if (!win)
returnCode(ERR);
@@ -107,7 +107,7 @@ waddchnstr(WINDOW *win, const chtype *astr, int n)
for (i = 0; i < n && ChCharOf(astr[i]) != '\0'; ++i) {
SetChar2(line->text[i + x], astr[i]);
}
- CHANGED_RANGE(line, x, x + n - 1);
+ CHANGED_RANGE(line, x, (NCURSES_SIZE_T) (x + n - 1));
_nc_synchook(win);
returnCode(code);
@@ -135,7 +135,10 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n)
struct ldat *line;
int i, j, start, len, end;
- T((T_CALLED("wadd_wchnstr(%p,%s,%d)"), win, _nc_viscbuf(astr, n), n));
+ T((T_CALLED("wadd_wchnstr(%p,%s,%d)"),
+ (void *) win,
+ _nc_viscbuf(astr, n),
+ n));
if (!win)
returnCode(ERR);
@@ -190,7 +193,7 @@ wadd_wchnstr(WINDOW *win, const cchar_t *astr, int n)
SetWidecExt(line->text[x + j], j);
}
}
- x += len;
+ x = (NCURSES_SIZE_T) (x + len);
end += len - 1;
} else {
break;
@@ -217,7 +220,7 @@ 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));
+ T((T_CALLED("waddnwstr(%p,%s,%d)"), (void *) win, _nc_viswbufn(str, n), n));
if (win && (str != 0)) {
TR(TRACE_VIRTPUT | TRACE_ATTRS,
diff --git a/ncurses/base/lib_beep.c b/ncurses/base/lib_beep.c
index b478f251a1bb..9d7f7fd96f01 100644
--- a/ncurses/base/lib_beep.c
+++ b/ncurses/base/lib_beep.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -40,9 +41,12 @@
*/
#include <curses.priv.h>
-#include <term.h> /* beep, flash */
-MODULE_ID("$Id: lib_beep.c,v 1.10 2005/04/09 15:20:04 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_beep.c,v 1.15 2009/10/24 22:02:14 tom Exp $")
/*
* beep()
@@ -53,12 +57,16 @@ MODULE_ID("$Id: lib_beep.c,v 1.10 2005/04/09 15:20:04 tom Exp $")
*/
NCURSES_EXPORT(int)
-beep(void)
+NCURSES_SP_NAME(beep) (NCURSES_SP_DCL0)
{
int res = ERR;
- T((T_CALLED("beep()")));
+ T((T_CALLED("beep(%p)"), (void *) SP_PARM));
+#ifdef USE_TERM_DRIVER
+ if (SP_PARM != 0)
+ res = CallDriver_1(SP_PARM, doBeepOrFlash, TRUE);
+#else
/* FIXME: should make sure that we are not in altchar mode */
if (cur_term == 0) {
res = ERR;
@@ -71,6 +79,15 @@ beep(void)
res = putp(flash_screen);
_nc_flush();
}
+#endif
returnCode(res);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+beep(void)
+{
+ return NCURSES_SP_NAME(beep) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/base/lib_bkgd.c b/ncurses/base/lib_bkgd.c
index c99e0c5fc3a8..0396ba8f47a8 100644
--- a/ncurses/base/lib_bkgd.c
+++ b/ncurses/base/lib_bkgd.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,7 +36,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_bkgd.c,v 1.36 2008/03/23 00:09:14 tom Exp $")
+MODULE_ID("$Id: lib_bkgd.c,v 1.43 2011/01/22 19:47:37 tom Exp $")
/*
* Set the window's background information.
@@ -48,7 +48,7 @@ static NCURSES_INLINE void
#endif
wbkgrndset(WINDOW *win, const ARG_CH_T ch)
{
- T((T_CALLED("wbkgdset(%p,%s)"), win, _tracech_t(ch)));
+ T((T_CALLED("wbkgdset(%p,%s)"), (void *) win, _tracech_t(ch)));
if (win) {
attr_t off = AttrOf(win->_nc_bkgd);
@@ -85,12 +85,12 @@ wbkgrndset(WINDOW *win, const ARG_CH_T ch)
cchar_t wch;
int tmp;
- wgetbkgrnd(win, &wch);
+ (void) wgetbkgrnd(win, &wch);
tmp = _nc_to_char((wint_t) CharOf(wch));
win->_bkgd = (((tmp == EOF) ? ' ' : (chtype) tmp)
| (AttrOf(wch) & ALL_BUT_COLOR)
- | COLOR_PAIR(GET_WINDOW_PAIR(win)));
+ | (chtype) ColorPair(GET_WINDOW_PAIR(win)));
}
#endif
}
@@ -120,14 +120,14 @@ wbkgrnd(WINDOW *win, const ARG_CH_T ch)
int x, y;
NCURSES_CH_T new_bkgd = CHDEREF(ch);
- T((T_CALLED("wbkgd(%p,%s)"), win, _tracech_t(ch)));
+ T((T_CALLED("wbkgd(%p,%s)"), (void *) 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));
+ (void) wbkgrndset(win, CHREF(new_bkgd));
+ (void) wattrset(win, AttrOf(win->_nc_bkgd));
for (y = 0; y <= win->_maxy; y++) {
for (x = 0; x <= win->_maxx; x++) {
diff --git a/ncurses/base/lib_box.c b/ncurses/base/lib_box.c
index d6cfc6cfe09c..6f17c97a5b07 100644
--- a/ncurses/base/lib_box.c
+++ b/ncurses/base/lib_box.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_box.c,v 1.22 2005/11/26 15:39:42 tom Exp $")
+MODULE_ID("$Id: lib_box.c,v 1.24 2010/04/24 23:51:57 tom Exp $")
#if USE_WIDEC_SUPPORT
static NCURSES_INLINE chtype
@@ -51,8 +51,9 @@ _my_render(WINDOW *win, chtype ch)
NCURSES_CH_T wch;
SetChar2(wch, ch);
wch = _nc_render(win, wch);
- return CharOf(wch) | AttrOf(wch);
+ return ((attr_t) 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)
@@ -70,7 +71,7 @@ wborder(WINDOW *win,
chtype wls, wrs, wts, wbs, wtl, wtr, wbl, wbr;
T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"),
- win,
+ (void *) win,
_tracechtype2(1, ls),
_tracechtype2(2, rs),
_tracechtype2(3, ts),
diff --git a/ncurses/base/lib_chgat.c b/ncurses/base/lib_chgat.c
index 89eefa7e82fe..cdddaeae995c 100644
--- a/ncurses/base/lib_chgat.c
+++ b/ncurses/base/lib_chgat.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,19 +42,19 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_chgat.c,v 1.7 2006/07/15 22:07:11 tom Exp $")
+MODULE_ID("$Id: lib_chgat.c,v 1.9 2010/03/31 23:38:02 tom 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));
+ T((T_CALLED("wchgat(%p,%d,%s,%d)"), (void *) win, n, _traceattr(attr), color));
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
- toggle_attr_on(attr, COLOR_PAIR(color));
+ toggle_attr_on(attr, ColorPair(color));
for (i = win->_curx; i <= win->_maxx && (n == -1 || (n-- > 0)); i++) {
SetAttr(line->text[i], attr);
diff --git a/ncurses/base/lib_clear.c b/ncurses/base/lib_clear.c
index e0b4edf9e224..008744ccbabb 100644
--- a/ncurses/base/lib_clear.c
+++ b/ncurses/base/lib_clear.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_clear.c,v 1.7 2000/12/10 02:43:26 tom Exp $")
+MODULE_ID("$Id: lib_clear.c,v 1.8 2009/10/24 22:33:29 tom Exp $")
NCURSES_EXPORT(int)
wclear(WINDOW *win)
{
int code = ERR;
- T((T_CALLED("wclear(%p)"), win));
+ T((T_CALLED("wclear(%p)"), (void *) win));
if ((code = werase(win)) != ERR)
win->_clear = TRUE;
diff --git a/ncurses/base/lib_clearok.c b/ncurses/base/lib_clearok.c
index 9b56bd1ec63a..ffc7d02dc0ff 100644
--- a/ncurses/base/lib_clearok.c
+++ b/ncurses/base/lib_clearok.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,12 +40,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_clearok.c,v 1.4 2000/12/10 02:43:26 tom Exp $")
+MODULE_ID("$Id: lib_clearok.c,v 1.5 2009/10/24 22:34:53 tom Exp $")
NCURSES_EXPORT(int)
clearok(WINDOW *win, bool flag)
{
- T((T_CALLED("clearok(%p,%d)"), win, flag));
+ T((T_CALLED("clearok(%p,%d)"), (void *) win, flag));
if (win) {
win->_clear = flag;
diff --git a/ncurses/base/lib_clrbot.c b/ncurses/base/lib_clrbot.c
index df196e815f82..cbf2206d5581 100644
--- a/ncurses/base/lib_clrbot.c
+++ b/ncurses/base/lib_clrbot.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_clrbot.c,v 1.20 2006/10/14 20:43:31 tom Exp $")
+MODULE_ID("$Id: lib_clrbot.c,v 1.21 2009/10/24 22:33:19 tom Exp $")
NCURSES_EXPORT(int)
wclrtobot(WINDOW *win)
{
int code = ERR;
- T((T_CALLED("wclrtobot(%p)"), win));
+ T((T_CALLED("wclrtobot(%p)"), (void *) win));
if (win) {
NCURSES_SIZE_T y;
diff --git a/ncurses/base/lib_clreol.c b/ncurses/base/lib_clreol.c
index c46ebd93a332..7aff84b35a42 100644
--- a/ncurses/base/lib_clreol.c
+++ b/ncurses/base/lib_clreol.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_clreol.c,v 1.21 2001/12/19 01:06:04 tom Exp $")
+MODULE_ID("$Id: lib_clreol.c,v 1.22 2009/10/24 22:33:06 tom Exp $")
NCURSES_EXPORT(int)
wclrtoeol(WINDOW *win)
{
int code = ERR;
- T((T_CALLED("wclrtoeol(%p)"), win));
+ T((T_CALLED("wclrtoeol(%p)"), (void *) win));
if (win) {
NCURSES_CH_T blank;
diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c
index 9cae495436fe..a5c181c8b4b1 100644
--- a/ncurses/base/lib_color.c
+++ b/ncurses/base/lib_color.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/* lib_color.c
@@ -38,12 +39,33 @@
*/
#include <curses.priv.h>
-
-#include <term.h>
#include <tic.h>
-MODULE_ID("$Id: lib_color.c,v 1.85 2007/04/07 17:07:28 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_color.c,v 1.98 2010/04/24 22:57:53 tom Exp $")
+
+#ifdef USE_TERM_DRIVER
+#define CanChange InfoOf(SP_PARM).canchange
+#define DefaultPalette InfoOf(SP_PARM).defaultPalette
+#define HasColor InfoOf(SP_PARM).hascolor
+#define InitColor InfoOf(SP_PARM).initcolor
+#define MaxColors InfoOf(SP_PARM).maxcolors
+#define MaxPairs InfoOf(SP_PARM).maxpairs
+#define UseHlsPalette (DefaultPalette == _nc_hls_palette)
+#else
+#define CanChange can_change
+#define DefaultPalette (hue_lightness_saturation ? hls_palette : cga_palette)
+#define HasColor has_color
+#define InitColor initialize_color
+#define MaxColors max_colors
+#define MaxPairs max_pairs
+#define UseHlsPalette (hue_lightness_saturation)
+#endif
+#ifndef USE_TERM_DRIVER
/*
* These should be screen structure members. They need to be globals for
* historical reasons. So we assign them in start_color() and also in
@@ -64,6 +86,7 @@ NCURSES_PUBLIC_VAR(COLORS) (void)
NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0;
NCURSES_EXPORT_VAR(int) COLORS = 0;
#endif
+#endif /* !USE_TERM_DRIVER */
#define DATA(r,g,b) {r,g,b, 0,0,0, 0}
@@ -71,7 +94,7 @@ NCURSES_EXPORT_VAR(int) COLORS = 0;
#define MAX_PALETTE 8
-#define OkColorHi(n) (((n) < COLORS) && ((n) < max_colors))
+#define OkColorHi(n) (((n) < COLORS) && ((n) < maxcolors))
#define InPalette(n) ((n) >= 0 && (n) < MAX_PALETTE)
/*
@@ -106,29 +129,43 @@ static const color_t hls_palette[] =
DATA( 300, 50, 100), /* COLOR_CYAN */
DATA( 0, 50, 100), /* COLOR_WHITE */
};
+
+#ifdef USE_TERM_DRIVER
+NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette = cga_palette;
+NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette = hls_palette;
+#endif
+
/* *INDENT-ON* */
+/*
+ * Ensure that we use color pairs only when colors have been started, and also
+ * that the index is within the limits of the table which we allocated.
+ */
+#define ValidPair(pair) \
+ ((SP_PARM != 0) && (pair >= 0) && (pair < SP_PARM->_pair_limit) && SP_PARM->_coloron)
+
#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.
+ * vidattr - so we have to assume that sp may be null.
*/
static int
-default_fg(void)
+default_fg(NCURSES_SP_DCL0)
{
- return (SP != 0) ? SP->_default_fg : COLOR_WHITE;
+ return (SP_PARM != 0) ? SP_PARM->_default_fg : COLOR_WHITE;
}
static int
-default_bg(void)
+default_bg(NCURSES_SP_DCL0)
{
- return SP != 0 ? SP->_default_bg : COLOR_BLACK;
+ return SP_PARM != 0 ? SP_PARM->_default_bg : COLOR_BLACK;
}
#else
-#define default_fg() COLOR_WHITE
-#define default_bg() COLOR_BLACK
+#define default_fg(sp) COLOR_WHITE
+#define default_bg(sp) COLOR_BLACK
#endif
+#ifndef USE_TERM_DRIVER
/*
* 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
@@ -145,52 +182,70 @@ toggled_colors(int c)
}
return c;
}
+#endif
static void
-set_background_color(int bg, int (*outc) (int))
+set_background_color(NCURSES_SP_DCLx int bg, NCURSES_SP_OUTC outc)
{
+#ifdef USE_TERM_DRIVER
+ CallDriver_3(SP_PARM, color, FALSE, bg, outc);
+#else
if (set_a_background) {
TPUTS_TRACE("set_a_background");
- tputs(TPARM_1(set_a_background, bg), 1, outc);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_a_background, bg),
+ 1, outc);
} else {
TPUTS_TRACE("set_background");
- tputs(TPARM_1(set_background, toggled_colors(bg)), 1, outc);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_background, toggled_colors(bg)),
+ 1, outc);
}
+#endif
}
static void
-set_foreground_color(int fg, int (*outc) (int))
+set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc)
{
+#ifdef USE_TERM_DRIVER
+ CallDriver_3(SP_PARM, color, TRUE, fg, outc);
+#else
if (set_a_foreground) {
TPUTS_TRACE("set_a_foreground");
- tputs(TPARM_1(set_a_foreground, fg), 1, outc);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_a_foreground, fg),
+ 1, outc);
} else {
TPUTS_TRACE("set_foreground");
- tputs(TPARM_1(set_foreground, toggled_colors(fg)), 1, outc);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_foreground, toggled_colors(fg)),
+ 1, outc);
}
+#endif
}
static void
-init_color_table(void)
+init_color_table(NCURSES_SP_DCL0)
{
- const color_t *tp;
+ const color_t *tp = DefaultPalette;
int n;
- tp = (hue_lightness_saturation) ? hls_palette : cga_palette;
+ assert(tp != 0);
+
for (n = 0; n < COLORS; n++) {
if (InPalette(n)) {
- SP->_color_table[n] = tp[n];
+ SP_PARM->_color_table[n] = tp[n];
} else {
- SP->_color_table[n] = tp[n % MAX_PALETTE];
- if (hue_lightness_saturation) {
- SP->_color_table[n].green = 100;
+ SP_PARM->_color_table[n] = tp[n % MAX_PALETTE];
+ if (UseHlsPalette) {
+ SP_PARM->_color_table[n].green = 100;
} else {
- if (SP->_color_table[n].red)
- SP->_color_table[n].red = 1000;
- if (SP->_color_table[n].green)
- SP->_color_table[n].green = 1000;
- if (SP->_color_table[n].blue)
- SP->_color_table[n].blue = 1000;
+ if (SP_PARM->_color_table[n].red)
+ SP_PARM->_color_table[n].red = 1000;
+ if (SP_PARM->_color_table[n].green)
+ SP_PARM->_color_table[n].green = 1000;
+ if (SP_PARM->_color_table[n].blue)
+ SP_PARM->_color_table[n].blue = 1000;
}
}
}
@@ -200,16 +255,21 @@ init_color_table(void)
* Reset the color pair, e.g., to whatever color pair 0 is.
*/
static bool
-reset_color_pair(void)
+reset_color_pair(NCURSES_SP_DCL0)
{
+#ifdef USE_TERM_DRIVER
+ return CallDriver(SP_PARM, rescol);
+#else
bool result = FALSE;
+ (void) SP_PARM;
if (orig_pair != 0) {
TPUTS_TRACE("orig_pair");
putp(orig_pair);
result = TRUE;
}
return result;
+#endif
}
/*
@@ -217,65 +277,93 @@ reset_color_pair(void)
* badly-written terminal descriptions than for the relatively rare case where
* someone has changed the color definitions.
*/
-bool
-_nc_reset_colors(void)
+NCURSES_EXPORT(bool)
+NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_DCL0)
{
int result = FALSE;
- T((T_CALLED("_nc_reset_colors()")));
- if (SP->_color_defs > 0)
- SP->_color_defs = -(SP->_color_defs);
-
- if (reset_color_pair())
+ T((T_CALLED("_nc_reset_colors(%p)"), (void *) SP_PARM));
+ if (SP_PARM->_color_defs > 0)
+ SP_PARM->_color_defs = -(SP_PARM->_color_defs);
+ if (reset_color_pair(NCURSES_SP_ARG))
result = TRUE;
+
+#ifdef USE_TERM_DRIVER
+ result = CallDriver(SP_PARM, rescolors);
+#else
if (orig_colors != 0) {
TPUTS_TRACE("orig_colors");
putp(orig_colors);
result = TRUE;
}
+#endif
returnBool(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(bool)
+_nc_reset_colors(void)
+{
+ return NCURSES_SP_NAME(_nc_reset_colors) (CURRENT_SCREEN);
+}
+#endif
+
NCURSES_EXPORT(int)
-start_color(void)
+NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0)
{
int result = ERR;
+ int maxpairs = 0, maxcolors = 0;
- T((T_CALLED("start_color()")));
+ T((T_CALLED("start_color(%p)"), (void *) SP_PARM));
- if (SP == 0) {
+ if (SP_PARM == 0) {
result = ERR;
- } else if (SP->_coloron) {
+ } else if (SP_PARM->_coloron) {
result = OK;
} else {
-
- if (reset_color_pair() != TRUE) {
- set_foreground_color(default_fg(), _nc_outch);
- set_background_color(default_bg(), _nc_outch);
+ maxpairs = MaxPairs;
+ maxcolors = MaxColors;
+ if (reset_color_pair(NCURSES_SP_ARG) != TRUE) {
+ set_foreground_color(NCURSES_SP_ARGx
+ default_fg(NCURSES_SP_ARG),
+ NCURSES_SP_NAME(_nc_outch));
+ set_background_color(NCURSES_SP_ARGx
+ default_bg(NCURSES_SP_ARG),
+ NCURSES_SP_NAME(_nc_outch));
}
- if (max_pairs > 0 && max_colors > 0) {
- SP->_pair_count = max_pairs;
- SP->_color_count = max_colors;
+ if (maxpairs > 0 && maxcolors > 0) {
+ SP_PARM->_pair_limit = maxpairs;
+
+#if NCURSES_EXT_FUNCS
+ /*
+ * If using default colors, allocate extra space in table to
+ * allow for default-color as a component of a color-pair.
+ */
+ SP_PARM->_pair_limit += (1 + (2 * maxcolors));
+#endif
+ SP_PARM->_pair_count = maxpairs;
+ SP_PARM->_color_count = maxcolors;
#if !USE_REENTRANT
- COLOR_PAIRS = max_pairs;
- COLORS = max_colors;
+ COLOR_PAIRS = maxpairs;
+ COLORS = maxcolors;
#endif
- if ((SP->_color_pairs = TYPE_CALLOC(colorpair_t,
- 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();
+ SP_PARM->_color_pairs = TYPE_CALLOC(colorpair_t, SP_PARM->_pair_limit);
+ if (SP_PARM->_color_pairs != 0) {
+ SP_PARM->_color_table = TYPE_CALLOC(color_t, maxcolors);
+ if (SP_PARM->_color_table != 0) {
+ SP_PARM->_color_pairs[0] = PAIR_OF(default_fg(NCURSES_SP_ARG),
+ default_bg(NCURSES_SP_ARG));
+ init_color_table(NCURSES_SP_ARG);
T(("started color: COLORS = %d, COLOR_PAIRS = %d",
COLORS, COLOR_PAIRS));
- SP->_coloron = 1;
+ SP_PARM->_coloron = 1;
result = OK;
- } else if (SP->_color_pairs != 0) {
- FreeAndNull(SP->_color_pairs);
+ } else if (SP_PARM->_color_pairs != 0) {
+ FreeAndNull(SP_PARM->_color_pairs);
}
}
} else {
@@ -285,6 +373,14 @@ start_color(void)
returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+start_color(void)
+{
+ return NCURSES_SP_NAME(start_color) (CURRENT_SCREEN);
+}
+#endif
+
/* 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)
@@ -298,7 +394,7 @@ rgb2hls(short r, short g, short b, short *h, short *l, short *s)
max = b;
/* calculate lightness */
- *l = (min + max) / 20;
+ *l = (short) ((min + max) / 20);
if (min == max) { /* black, white and all shades of gray */
*h = 0;
@@ -308,17 +404,17 @@ rgb2hls(short r, short g, short b, short *h, short *l, short *s)
/* calculate saturation */
if (*l < 50)
- *s = ((max - min) * 100) / (max + min);
+ *s = (short) (((max - min) * 100) / (max + min));
else
- *s = ((max - min) * 100) / (2000 - max - min);
+ *s = (short) (((max - min) * 100) / (2000 - max - min));
/* calculate hue */
if (r == max)
- t = 120 + ((g - b) * 60) / (max - min);
+ t = (short) (120 + ((g - b) * 60) / (max - min));
else if (g == max)
- t = 240 + ((b - r) * 60) / (max - min);
+ t = (short) (240 + ((b - r) * 60) / (max - min));
else
- t = 360 + ((r - g) * 60) / (max - min);
+ t = (short) (360 + ((r - g) * 60) / (max - min));
*h = t % 360;
}
@@ -328,24 +424,75 @@ rgb2hls(short r, short g, short b, short *h, short *l, short *s)
* values.
*/
NCURSES_EXPORT(int)
-init_pair(short pair, short f, short b)
+NCURSES_SP_NAME(init_pair) (NCURSES_SP_DCLx short pair, short f, short b)
{
colorpair_t result;
+ colorpair_t previous;
+ int maxcolors;
- T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b));
+ T((T_CALLED("init_pair(%p,%d,%d,%d)"), (void *) SP_PARM, pair, f, b));
- if ((pair < 0) || (pair >= COLOR_PAIRS) || SP == 0 || !SP->_coloron)
+ if (!ValidPair(pair))
returnCode(ERR);
+
+ maxcolors = MaxColors;
+
+ previous = SP_PARM->_color_pairs[pair];
#if NCURSES_EXT_FUNCS
- if (SP->_default_color) {
- if (f < 0)
+ if (SP_PARM->_default_color) {
+ bool isDefault = FALSE;
+ bool wasDefault = FALSE;
+ int default_pairs = SP_PARM->_default_pairs;
+
+ /*
+ * Map caller's color number, e.g., -1, 0, 1, .., 7, etc., into
+ * internal unsigned values which we will store in the _color_pairs[]
+ * table.
+ */
+ if (isDefaultColor(f)) {
f = COLOR_DEFAULT;
- if (b < 0)
+ isDefault = TRUE;
+ } else if (!OkColorHi(f)) {
+ returnCode(ERR);
+ }
+
+ if (isDefaultColor(b)) {
b = COLOR_DEFAULT;
- if (!OkColorHi(f) && !isDefaultColor(f))
+ isDefault = TRUE;
+ } else if (!OkColorHi(b)) {
returnCode(ERR);
- if (!OkColorHi(b) && !isDefaultColor(b))
+ }
+
+ /*
+ * Check if the table entry that we are going to init/update used
+ * default colors.
+ */
+ if ((FORE_OF(previous) == COLOR_DEFAULT)
+ || (BACK_OF(previous) == COLOR_DEFAULT))
+ wasDefault = TRUE;
+
+ /*
+ * Keep track of the number of entries in the color pair table which
+ * used a default color.
+ */
+ if (isDefault && !wasDefault) {
+ ++default_pairs;
+ } else if (wasDefault && !isDefault) {
+ --default_pairs;
+ }
+
+ /*
+ * As an extension, ncurses allows the pair number to exceed the
+ * terminal's color_pairs value for pairs using a default color.
+ *
+ * Note that updating a pair which used a default color with one
+ * that does not will decrement the count - and possibly interfere
+ * with sequentially adding new pairs.
+ */
+ if (pair > (SP_PARM->_pair_count + default_pairs)) {
returnCode(ERR);
+ }
+ SP_PARM->_default_pairs = default_pairs;
} else
#endif
{
@@ -361,14 +508,14 @@ init_pair(short pair, short f, short b)
* pair colors with the new ones).
*/
result = PAIR_OF(f, b);
- if (SP->_color_pairs[pair] != 0
- && SP->_color_pairs[pair] != result) {
+ if (previous != 0
+ && previous != result) {
int y, x;
- for (y = 0; y <= curscr->_maxy; y++) {
- struct ldat *ptr = &(curscr->_line[y]);
+ for (y = 0; y <= CurScreen(SP_PARM)->_maxy; y++) {
+ struct ldat *ptr = &(CurScreen(SP_PARM)->_line[y]);
bool changed = FALSE;
- for (x = 0; x <= curscr->_maxx; x++) {
+ for (x = 0; x <= CurScreen(SP_PARM)->_maxx; x++) {
if (GetPair(ptr->text[x]) == pair) {
/* Set the old cell to zero to ensure it will be
updated on the next doupdate() */
@@ -378,15 +525,19 @@ init_pair(short pair, short f, short b)
}
}
if (changed)
- _nc_make_oldhash(y);
+ NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx y);
}
}
- SP->_color_pairs[pair] = result;
- if (GET_SCREEN_PAIR(SP) == pair)
- SET_SCREEN_PAIR(SP, (chtype) (~0)); /* force attribute update */
+ SP_PARM->_color_pairs[pair] = result;
+ if (GET_SCREEN_PAIR(SP_PARM) == pair)
+ SET_SCREEN_PAIR(SP_PARM, (chtype) (~0)); /* force attribute update */
+
+#ifdef USE_TERM_DRIVER
+ CallDriver_3(SP_PARM, initpair, pair, f, b);
+#else
if (initialize_pair && InPalette(f) && InPalette(b)) {
- const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
+ const color_t *tp = DefaultPalette;
TR(TRACE_ATTRS,
("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)",
@@ -400,80 +551,148 @@ init_pair(short pair, short f, short b)
tp[f].red, tp[f].green, tp[f].blue,
tp[b].red, tp[b].green, tp[b].blue));
}
+#endif
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+init_pair(short pair, short f, short b)
+{
+ return NCURSES_SP_NAME(init_pair) (CURRENT_SCREEN, pair, f, b);
+}
+#endif
+
#define okRGB(n) ((n) >= 0 && (n) <= 1000)
NCURSES_EXPORT(int)
-init_color(short color, short r, short g, short b)
+NCURSES_SP_NAME(init_color) (NCURSES_SP_DCLx
+ short color, short r, short g, short b)
{
int result = ERR;
+ int maxcolors;
+
+ T((T_CALLED("init_color(%p,%d,%d,%d,%d)"),
+ (void *) SP_PARM,
+ color,
+ r, g, b));
- T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b));
+ if (SP_PARM == 0)
+ returnCode(result);
- if (initialize_color != NULL
- && SP != 0
- && SP->_coloron
+ maxcolors = MaxColors;
+
+ if (InitColor
+ && SP_PARM->_coloron
&& (color >= 0 && OkColorHi(color))
&& (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;
+ SP_PARM->_color_table[color].init = 1;
+ SP_PARM->_color_table[color].r = r;
+ SP_PARM->_color_table[color].g = g;
+ SP_PARM->_color_table[color].b = b;
- if (hue_lightness_saturation) {
+ if (UseHlsPalette) {
rgb2hls(r, g, b,
- &SP->_color_table[color].red,
- &SP->_color_table[color].green,
- &SP->_color_table[color].blue);
+ &SP_PARM->_color_table[color].red,
+ &SP_PARM->_color_table[color].green,
+ &SP_PARM->_color_table[color].blue);
} else {
- SP->_color_table[color].red = r;
- SP->_color_table[color].green = g;
- SP->_color_table[color].blue = b;
+ SP_PARM->_color_table[color].red = r;
+ SP_PARM->_color_table[color].green = g;
+ SP_PARM->_color_table[color].blue = b;
}
+#ifdef USE_TERM_DRIVER
+ CallDriver_4(SP_PARM, initcolor, color, r, g, b);
+#else
TPUTS_TRACE("initialize_color");
putp(TPARM_4(initialize_color, color, r, g, b));
- SP->_color_defs = max(color + 1, SP->_color_defs);
+#endif
+ SP_PARM->_color_defs = max(color + 1, SP_PARM->_color_defs);
+
result = OK;
}
returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+init_color(short color, short r, short g, short b)
+{
+ return NCURSES_SP_NAME(init_color) (CURRENT_SCREEN, color, r, g, b);
+}
+#endif
+
+NCURSES_EXPORT(bool)
+NCURSES_SP_NAME(can_change_color) (NCURSES_SP_DCL)
+{
+ T((T_CALLED("can_change_color(%p)"), (void *) SP_PARM));
+ returnCode((CanChange != 0) ? TRUE : FALSE);
+}
+
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(bool)
can_change_color(void)
{
- T((T_CALLED("can_change_color()")));
- returnCode((can_change != 0) ? TRUE : FALSE);
+ return NCURSES_SP_NAME(can_change_color) (CURRENT_SCREEN);
}
+#endif
NCURSES_EXPORT(bool)
-has_colors(void)
+NCURSES_SP_NAME(has_colors) (NCURSES_SP_DCL0)
{
+ int code;
+
+ (void) SP_PARM;
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);
+#ifdef USE_TERM_DRIVER
+ code = HasColor;
+#else
+ code = ((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);
+#endif
+ returnCode(code);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(bool)
+has_colors(void)
+{
+ return NCURSES_SP_NAME(has_colors) (CURRENT_SCREEN);
+}
+#endif
+
NCURSES_EXPORT(int)
-color_content(short color, short *r, short *g, short *b)
+NCURSES_SP_NAME(color_content) (NCURSES_SP_DCLx
+ short color, short *r, short *g, short *b)
{
- int result;
+ int result = ERR;
+ int maxcolors;
+
+ T((T_CALLED("color_content(%p,%d,%p,%p,%p)"),
+ (void *) SP_PARM,
+ color,
+ (void *) r,
+ (void *) g,
+ (void *) b));
+
+ if (SP_PARM == 0)
+ returnCode(result);
- T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b));
- if (color < 0 || !OkColorHi(color) || SP == 0 || !SP->_coloron) {
+ maxcolors = MaxColors;
+
+ if (color < 0 || !OkColorHi(color) || !SP_PARM->_coloron) {
result = ERR;
} else {
- NCURSES_COLOR_T c_r = SP->_color_table[color].red;
- NCURSES_COLOR_T c_g = SP->_color_table[color].green;
- NCURSES_COLOR_T c_b = SP->_color_table[color].blue;
+ NCURSES_COLOR_T c_r = SP_PARM->_color_table[color].red;
+ NCURSES_COLOR_T c_g = SP_PARM->_color_table[color].green;
+ NCURSES_COLOR_T c_b = SP_PARM->_color_table[color].blue;
if (r)
*r = c_r;
@@ -489,18 +708,31 @@ color_content(short color, short *r, short *g, short *b)
returnCode(result);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-pair_content(short pair, short *f, short *b)
+color_content(short color, short *r, short *g, short *b)
+{
+ return NCURSES_SP_NAME(color_content) (CURRENT_SCREEN, color, r, g, b);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(pair_content) (NCURSES_SP_DCLx
+ short pair, short *f, short *b)
{
int result;
- T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b));
+ T((T_CALLED("pair_content(%p,%d,%p,%p)"),
+ (void *) SP_PARM,
+ pair,
+ (void *) f,
+ (void *) b));
- if ((pair < 0) || (pair >= COLOR_PAIRS) || SP == 0 || !SP->_coloron) {
+ if (!ValidPair(pair)) {
result = ERR;
} else {
- NCURSES_COLOR_T fg = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK);
- NCURSES_COLOR_T bg = (SP->_color_pairs[pair] & C_MASK);
+ NCURSES_COLOR_T fg = FORE_OF(SP_PARM->_color_pairs[pair]);
+ NCURSES_COLOR_T bg = BACK_OF(SP_PARM->_color_pairs[pair]);
#if NCURSES_EXT_FUNCS
if (fg == COLOR_DEFAULT)
@@ -514,33 +746,53 @@ pair_content(short pair, short *f, short *b)
if (b)
*b = bg;
- TR(TRACE_ATTRS, ("...pair_content(%d,%d,%d)", pair, fg, bg));
+ TR(TRACE_ATTRS, ("...pair_content(%p,%d,%d,%d)",
+ (void *) SP_PARM,
+ pair,
+ fg, bg));
result = OK;
}
returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+pair_content(short pair, short *f, short *b)
+{
+ return NCURSES_SP_NAME(pair_content) (CURRENT_SCREEN, pair, f, b);
+}
+#endif
+
NCURSES_EXPORT(void)
-_nc_do_color(short old_pair, short pair, bool reverse, int (*outc) (int))
+NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
+ short old_pair,
+ short pair,
+ bool reverse,
+ NCURSES_SP_OUTC outc)
{
+#ifdef USE_TERM_DRIVER
+ CallDriver_4(SP_PARM, docolor, old_pair, pair, reverse, outc);
+#else
NCURSES_COLOR_T fg = COLOR_DEFAULT;
NCURSES_COLOR_T bg = COLOR_DEFAULT;
NCURSES_COLOR_T old_fg, old_bg;
- if (pair < 0 || pair >= COLOR_PAIRS) {
+ if (!ValidPair(pair)) {
return;
} else if (pair != 0) {
if (set_color_pair) {
TPUTS_TRACE("set_color_pair");
- tputs(TPARM_1(set_color_pair, pair), 1, outc);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_color_pair, pair),
+ 1, outc);
return;
- } else if (SP != 0) {
+ } else if (SP_PARM != 0) {
pair_content((short) pair, &fg, &bg);
}
}
if (old_pair >= 0
- && SP != 0
+ && SP_PARM != 0
&& pair_content(old_pair, &old_fg, &old_bg) != ERR) {
if ((isDefaultColor(fg) && !isDefaultColor(old_fg))
|| (isDefaultColor(bg) && !isDefaultColor(old_bg))) {
@@ -550,29 +802,29 @@ _nc_do_color(short old_pair, short pair, bool reverse, int (*outc) (int))
* 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
+ if (SP_PARM->_has_sgr_39_49
&& isDefaultColor(old_bg)
&& !isDefaultColor(old_fg)) {
- tputs("\033[39m", 1, outc);
- } else if (SP->_has_sgr_39_49
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[39m", 1, outc);
+ } else if (SP_PARM->_has_sgr_39_49
&& isDefaultColor(old_fg)
&& !isDefaultColor(old_bg)) {
- tputs("\033[49m", 1, outc);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[49m", 1, outc);
} else
#endif
- reset_color_pair();
+ reset_color_pair(NCURSES_SP_ARG);
}
} else {
- reset_color_pair();
+ reset_color_pair(NCURSES_SP_ARG);
if (old_pair < 0)
return;
}
#if NCURSES_EXT_FUNCS
if (isDefaultColor(fg))
- fg = default_fg();
+ fg = (short) default_fg(NCURSES_SP_ARG);
if (isDefaultColor(bg))
- bg = default_bg();
+ bg = (short) default_bg(NCURSES_SP_ARG);
#endif
if (reverse) {
@@ -585,9 +837,23 @@ _nc_do_color(short old_pair, short pair, bool reverse, int (*outc) (int))
fg, bg));
if (!isDefaultColor(fg)) {
- set_foreground_color(fg, outc);
+ set_foreground_color(NCURSES_SP_ARGx fg, outc);
}
if (!isDefaultColor(bg)) {
- set_background_color(bg, outc);
+ set_background_color(NCURSES_SP_ARGx bg, outc);
}
+#endif
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_do_color(short old_pair, short pair, bool reverse, NCURSES_OUTC outc)
+{
+ SetSafeOutcWrapper(outc);
+ NCURSES_SP_NAME(_nc_do_color) (CURRENT_SCREEN,
+ old_pair,
+ pair,
+ reverse,
+ _nc_outc_wrapper);
+}
+#endif
diff --git a/ncurses/base/lib_colorset.c b/ncurses/base/lib_colorset.c
index a973c5350c8f..6210a0e8a8f9 100644
--- a/ncurses/base/lib_colorset.c
+++ b/ncurses/base/lib_colorset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
/****************************************************************************
* Author: Juergen Pfeifer, 1998 *
- * and: Thomas E. Dickey, 2005 *
+ * and: Thomas E. Dickey, 2005-on *
****************************************************************************/
/*
@@ -41,20 +41,23 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_colorset.c,v 1.11 2005/01/29 21:40:51 tom Exp $")
+MODULE_ID("$Id: lib_colorset.c,v 1.13 2009/10/24 22:02:14 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));
+ int code = ERR;
+
+ T((T_CALLED("wcolor_set(%p,%d)"), (void *) win, color_pair_number));
if (win
&& !opts
+ && (SP != 0)
&& (color_pair_number >= 0)
- && (color_pair_number < COLOR_PAIRS)) {
+ && (color_pair_number < SP->_pair_limit)) {
TR(TRACE_ATTRS, ("... current %ld", (long) GET_WINDOW_PAIR(win)));
SET_WINDOW_PAIR(win, color_pair_number);
if_EXT_COLORS(win->_color = color_pair_number);
- returnCode(OK);
- } else
- returnCode(ERR);
+ code = OK;
+ }
+ returnCode(code);
}
diff --git a/ncurses/base/lib_delch.c b/ncurses/base/lib_delch.c
index 0c30f2d93c1b..64c9da73edf8 100644
--- a/ncurses/base/lib_delch.c
+++ b/ncurses/base/lib_delch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_delch.c,v 1.12 2001/12/19 01:06:09 tom Exp $")
+MODULE_ID("$Id: lib_delch.c,v 1.13 2009/10/24 22:32:47 tom Exp $")
NCURSES_EXPORT(int)
wdelch(WINDOW *win)
{
int code = ERR;
- T((T_CALLED("wdelch(%p)"), win));
+ T((T_CALLED("wdelch(%p)"), (void *) win));
if (win) {
NCURSES_CH_T blank = win->_nc_bkgd;
diff --git a/ncurses/base/lib_delwin.c b/ncurses/base/lib_delwin.c
index b92c40335958..4bb536ca86ad 100644
--- a/ncurses/base/lib_delwin.c
+++ b/ncurses/base/lib_delwin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2008 *
****************************************************************************/
/*
@@ -40,15 +42,18 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_delwin.c,v 1.17 2008/06/07 14:10:56 tom Exp $")
+MODULE_ID("$Id: lib_delwin.c,v 1.20 2009/10/24 22:02:14 tom Exp $")
static bool
cannot_delete(WINDOW *win)
{
WINDOWLIST *p;
bool result = TRUE;
+#ifdef USE_SP_WINDOWLIST
+ SCREEN *sp = _nc_screen_of(win);
+#endif
- for (each_window(p)) {
+ for (each_window(SP_PARM, p)) {
if (&(p->win) == win) {
result = FALSE;
} else if ((p->win._flags & _SUBWIN) != 0
@@ -65,18 +70,20 @@ delwin(WINDOW *win)
{
int result = ERR;
- T((T_CALLED("delwin(%p)"), win));
+ T((T_CALLED("delwin(%p)"), (void *) win));
if (_nc_try_global(curses) == 0) {
if (win == 0
|| cannot_delete(win)) {
result = ERR;
} else {
-
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(win);
+#endif
if (win->_flags & _SUBWIN)
touchwin(win->_parent);
- else if (curscr != 0)
- touchwin(curscr);
+ else if (CurScreen(SP_PARM) != 0)
+ touchwin(CurScreen(SP_PARM));
result = _nc_freewin(win);
}
diff --git a/ncurses/base/lib_dft_fgbg.c b/ncurses/base/lib_dft_fgbg.c
index 8953c148b09e..4bb9fc2774a9 100644
--- a/ncurses/base/lib_dft_fgbg.c
+++ b/ncurses/base/lib_dft_fgbg.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,49 +27,73 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey *
+ * Author: Thomas E. Dickey 1998-on *
+ * Juergen Pfeifer 2009 *
****************************************************************************/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.18 2005/11/26 20:03:38 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.25 2009/10/24 22:15:00 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)
+NCURSES_SP_NAME(use_default_colors) (NCURSES_SP_DCL0)
+{
+ T((T_CALLED("use_default_colors(%p)"), (void *) SP_PARM));
+ returnCode(NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_ARGx -1, -1));
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
use_default_colors(void)
{
- T((T_CALLED("use_default_colors()")));
- returnCode(assume_default_colors(-1, -1));
+ return NCURSES_SP_NAME(use_default_colors) (CURRENT_SCREEN);
}
+#endif
/*
* 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)
+NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
{
- T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg));
+ int code = ERR;
- if (!orig_pair && !orig_colors)
- returnCode(ERR);
+ T((T_CALLED("assume_default_colors(%p,%d,%d)"), (void *) SP_PARM, fg, bg));
+#ifdef USE_TERM_DRIVER
+ if (sp != 0)
+ code = CallDriver_2(sp, defaultcolors, fg, bg);
+#else
+ if ((orig_pair || orig_colors) && !initialize_pair) {
- if (initialize_pair) /* don't know how to handle this */
- returnCode(ERR);
-
- SP->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
- SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
- SP->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
- SP->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
- if (SP->_color_pairs != 0) {
- bool save = SP->_default_color;
- SP->_default_color = TRUE;
- init_pair(0, (short) fg, (short) bg);
- SP->_default_color = save;
+ SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
+ SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
+ SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
+ SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
+ if (SP_PARM->_color_pairs != 0) {
+ bool save = SP_PARM->_default_color;
+ SP_PARM->_default_color = TRUE;
+ init_pair(0, (short) fg, (short) bg);
+ SP_PARM->_default_color = save;
+ }
+ code = OK;
}
- returnCode(OK);
+#endif
+ returnCode(code);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+assume_default_colors(int fg, int bg)
+{
+ return NCURSES_SP_NAME(assume_default_colors) (CURRENT_SCREEN, fg, bg);
}
+#endif
diff --git a/ncurses/base/lib_driver.c b/ncurses/base/lib_driver.c
new file mode 100644
index 000000000000..40487609be4d
--- /dev/null
+++ b/ncurses/base/lib_driver.c
@@ -0,0 +1,143 @@
+/****************************************************************************
+ * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 *
+ * *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: lib_driver.c,v 1.3 2010/12/20 00:29:17 tom Exp $")
+
+typedef struct DriverEntry {
+ const char *name;
+ TERM_DRIVER *driver;
+} DRIVER_ENTRY;
+
+static DRIVER_ENTRY DriverTable[] =
+{
+#ifdef __MINGW32__
+ {"win", &_nc_WIN_DRIVER},
+#endif
+ {"tinfo", &_nc_TINFO_DRIVER}
+};
+
+NCURSES_EXPORT(int)
+_nc_get_driver(TERMINAL_CONTROL_BLOCK * TCB, const char *name, int *errret)
+{
+ int code = ERR;
+ size_t i;
+ TERM_DRIVER *res = (TERM_DRIVER *) 0;
+ TERM_DRIVER *use = 0;
+
+ T((T_CALLED("_nc_get_driver(%p, %s, %p)"),
+ (void *) TCB, NonNull(name), (void *) errret));
+
+ assert(TCB != 0);
+
+ for (i = 0; i < SIZEOF(DriverTable); i++) {
+ res = DriverTable[i].driver;
+ if (res->CanHandle(TCB, name, errret)) {
+ use = res;
+ break;
+ }
+ }
+ if (use != 0) {
+ TCB->drv = use;
+ code = OK;
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(has_key) (SCREEN *sp, int keycode)
+{
+ T((T_CALLED("has_key(%p, %d)"), (void *) sp, keycode));
+ returnCode(IsValidTIScreen(sp) ? CallDriver_1(sp, kyExist, keycode) : FALSE);
+}
+
+NCURSES_EXPORT(int)
+has_key(int keycode)
+{
+ return NCURSES_SP_NAME(has_key) (CURRENT_SCREEN, keycode);
+}
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_mcprint) (SCREEN *sp, char *data, int len)
+{
+ int code = ERR;
+
+ if (0 != TerminalOf(sp))
+ code = CallDriver_2(sp, print, data, len);
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+mcprint(char *data, int len)
+{
+ return NCURSES_SP_NAME(_nc_mcprint) (CURRENT_SCREEN, data, len);
+}
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(doupdate) (SCREEN *sp)
+{
+ int code = ERR;
+
+ T((T_CALLED("doupdate(%p)"), (void *) sp));
+
+ if (IsValidScreen(sp))
+ code = CallDriver(sp, update);
+
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+doupdate(void)
+{
+ return NCURSES_SP_NAME(doupdate) (CURRENT_SCREEN);
+}
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(mvcur) (SCREEN *sp, int yold, int xold, int ynew, int xnew)
+{
+ int code = ERR;
+ TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%p,%d,%d,%d,%d)"),
+ (void *) sp, yold, xold, ynew, xnew));
+ if (HasTerminal(sp)) {
+ code = CallDriver_4(sp, hwcur, yold, xold, ynew, xnew);
+ }
+ returnCode(code);
+}
+
+NCURSES_EXPORT(int)
+mvcur(int yold, int xold, int ynew, int xnew)
+/* optimized cursor move from (yold, xold) to (ynew, xnew) */
+{
+ return NCURSES_SP_NAME(mvcur) (CURRENT_SCREEN, yold, xold, ynew, xnew);
+}
diff --git a/ncurses/base/lib_echo.c b/ncurses/base/lib_echo.c
index df44713d1a11..9e1d3c265741 100644
--- a/ncurses/base/lib_echo.c
+++ b/ncurses/base/lib_echo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -42,20 +44,40 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_echo.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_echo.c,v 1.8 2009/10/24 22:02:14 tom Exp $")
NCURSES_EXPORT(int)
+NCURSES_SP_NAME(echo) (NCURSES_SP_DCL0)
+{
+ T((T_CALLED("echo(%p)"), (void *) SP_PARM));
+ if (0 == SP_PARM)
+ returnCode(ERR);
+ SP_PARM->_echo = TRUE;
+ returnCode(OK);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
echo(void)
{
- T((T_CALLED("echo()")));
- SP->_echo = TRUE;
+ return NCURSES_SP_NAME(echo) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(noecho) (NCURSES_SP_DCL0)
+{
+ T((T_CALLED("noecho(%p)"), (void *) SP_PARM));
+ if (0 == SP_PARM)
+ returnCode(ERR);
+ SP_PARM->_echo = FALSE;
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
noecho(void)
{
- T((T_CALLED("noecho()")));
- SP->_echo = FALSE;
- returnCode(OK);
+ return NCURSES_SP_NAME(noecho) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/base/lib_endwin.c b/ncurses/base/lib_endwin.c
index 66662871962b..4596d0749633 100644
--- a/ncurses/base/lib_endwin.c
+++ b/ncurses/base/lib_endwin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -39,22 +41,39 @@
*/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_endwin.c,v 1.19 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_endwin.c,v 1.22 2009/10/24 22:02:14 tom Exp $")
NCURSES_EXPORT(int)
-endwin(void)
+NCURSES_SP_NAME(endwin) (NCURSES_SP_DCL0)
{
- T((T_CALLED("endwin()")));
+ int code = ERR;
+
+ T((T_CALLED("endwin(%p)"), (void *) SP_PARM));
- if (SP) {
- SP->_endwin = TRUE;
- SP->_mouse_wrap(SP);
+ if (SP_PARM) {
+#ifdef USE_TERM_DRIVER
+ TERMINAL_CONTROL_BLOCK *TCB = TCBOf(SP_PARM);
+
+ SP_PARM->_endwin = TRUE;
+ if (TCB && TCB->drv && TCB->drv->scexit)
+ TCB->drv->scexit(SP_PARM);
+#else
+ SP_PARM->_endwin = TRUE;
+ SP_PARM->_mouse_wrap(SP_PARM);
_nc_screen_wrap();
_nc_mvcur_wrap(); /* wrap up cursor addressing */
- returnCode(reset_shell_mode());
+#endif
+ code = NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_ARG);
}
- returnCode(ERR);
+ returnCode(code);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+endwin(void)
+{
+ return NCURSES_SP_NAME(endwin) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/base/lib_erase.c b/ncurses/base/lib_erase.c
index 2566e8b39820..bbf10ef81b92 100644
--- a/ncurses/base/lib_erase.c
+++ b/ncurses/base/lib_erase.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,7 +41,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_erase.c,v 1.16 2005/10/30 00:36:36 tom Exp $")
+MODULE_ID("$Id: lib_erase.c,v 1.17 2009/10/24 22:32:29 tom Exp $")
NCURSES_EXPORT(int)
werase(WINDOW *win)
@@ -51,7 +51,7 @@ werase(WINDOW *win)
NCURSES_CH_T blank;
NCURSES_CH_T *sp, *end, *start;
- T((T_CALLED("werase(%p)"), win));
+ T((T_CALLED("werase(%p)"), (void *) win));
if (win) {
blank = win->_nc_bkgd;
diff --git a/ncurses/base/lib_flash.c b/ncurses/base/lib_flash.c
index a6b022a8e816..03f11d923b6d 100644
--- a/ncurses/base/lib_flash.c
+++ b/ncurses/base/lib_flash.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -39,9 +41,12 @@
*/
#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 $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_flash.c,v 1.11 2009/10/24 22:02:14 tom Exp $")
/*
* flash()
@@ -52,12 +57,15 @@ MODULE_ID("$Id: lib_flash.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
*/
NCURSES_EXPORT(int)
-flash(void)
+NCURSES_SP_NAME(flash) (NCURSES_SP_DCL0)
{
int res = ERR;
- T((T_CALLED("flash()")));
-
+ T((T_CALLED("flash(%p)"), (void *) SP_PARM));
+#ifdef USE_TERM_DRIVER
+ if (SP_PARM != 0)
+ res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
+#else
/* FIXME: should make sure that we are not in altchar mode */
if (flash_screen) {
TPUTS_TRACE("flash_screen");
@@ -68,6 +76,14 @@ flash(void)
res = putp(bell);
_nc_flush();
}
-
+#endif
returnCode(res);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+flash(void)
+{
+ return NCURSES_SP_NAME(flash) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c
index 564026582911..5bcc974bc257 100644
--- a/ncurses/base/lib_freeall.c
+++ b/ncurses/base/lib_freeall.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,7 +31,6 @@
****************************************************************************/
#include <curses.priv.h>
-#include <term_entry.h>
#include <tic.h>
#if HAVE_NC_FREEALL
@@ -40,40 +39,40 @@
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.54 2008/09/27 13:09:57 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.59 2010/01/23 17:57:43 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)
+NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0)
{
WINDOWLIST *p, *q;
static va_list empty_va;
T((T_CALLED("_nc_freeall()")));
#if NO_LEAKS
- if (SP != 0) {
- if (SP->_oldnum_list != 0) {
- FreeAndNull(SP->_oldnum_list);
+ if (SP_PARM != 0) {
+ if (SP_PARM->_oldnum_list != 0) {
+ FreeAndNull(SP_PARM->_oldnum_list);
}
- if (SP->_panelHook.destroy != 0) {
- SP->_panelHook.destroy(SP->_panelHook.stdscr_pseudo_panel);
+ if (SP_PARM->_panelHook.destroy != 0) {
+ SP_PARM->_panelHook.destroy(SP_PARM->_panelHook.stdscr_pseudo_panel);
}
}
#endif
- if (SP != 0) {
+ if (SP_PARM != 0) {
_nc_lock_global(curses);
- while (_nc_windows != 0) {
+ while (WindowList(SP_PARM) != 0) {
bool deleted = FALSE;
/* Delete only windows that're not a parent */
- for (each_window(p)) {
+ for (each_window(SP_PARM, p)) {
bool found = FALSE;
- for (each_window(q)) {
+ for (each_window(SP_PARM, q)) {
if ((p != q)
&& (q->win._flags & _SUBWIN)
&& (&(p->win) == q->win._parent)) {
@@ -95,11 +94,9 @@ _nc_freeall(void)
if (!deleted)
break;
}
- delscreen(SP);
+ delscreen(SP_PARM);
_nc_unlock_global(curses);
}
- if (cur_term != 0)
- del_curterm(cur_term);
(void) _nc_printf_string(0, empty_va);
#ifdef TRACE
@@ -121,12 +118,20 @@ _nc_freeall(void)
returnVoid;
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
-_nc_free_and_exit(int code)
+_nc_freeall(void)
+{
+ NCURSES_SP_NAME(_nc_freeall) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
{
- char *last_setbuf = (SP != 0) ? SP->_setbuf : 0;
+ char *last_setbuf = (SP_PARM != 0) ? SP_PARM->_setbuf : 0;
- _nc_freeall();
+ NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
#ifdef TRACE
trace(0); /* close trace file, freeing its setbuf */
{
@@ -146,12 +151,21 @@ _nc_freeall(void)
}
NCURSES_EXPORT(void)
-_nc_free_and_exit(int code)
+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
{
- if (SP)
- delscreen(SP);
- if (cur_term != 0)
- del_curterm(cur_term);
+ if (SP_PARM) {
+ delscreen(SP_PARM);
+ if (SP_PARM->_term)
+ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx SP_PARM->_term);
+ }
exit(code);
}
#endif
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_free_and_exit(int code)
+{
+ NCURSES_SP_NAME(_nc_free_and_exit) (CURRENT_SCREEN, code);
+}
+#endif
diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c
index e7ba0b210e34..130c502431b3 100644
--- a/ncurses/base/lib_getch.c
+++ b/ncurses/base/lib_getch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -41,40 +42,80 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.99 2008/09/20 19:46:13 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.121 2010/12/25 23:24:04 tom Exp $")
#include <fifo_defs.h>
#if USE_REENTRANT
-#define GetEscdelay(sp) (sp)->_ESCDELAY
+#define GetEscdelay(sp) *_nc_ptr_Escdelay(sp)
NCURSES_EXPORT(int)
NCURSES_PUBLIC_VAR(ESCDELAY) (void)
{
- return SP ? GetEscdelay(SP) : 1000;
+ return *(_nc_ptr_Escdelay(CURRENT_SCREEN));
+}
+
+NCURSES_EXPORT(int *)
+_nc_ptr_Escdelay(SCREEN *sp)
+{
+ return ptrEscdelay(sp);
}
#else
#define GetEscdelay(sp) ESCDELAY
-NCURSES_EXPORT_VAR(int)
-ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
+NCURSES_EXPORT_VAR(int) ESCDELAY = 1000;
#endif
#if NCURSES_EXT_FUNCS
NCURSES_EXPORT(int)
-set_escdelay(int value)
+NCURSES_SP_NAME(set_escdelay) (NCURSES_SP_DCLx int value)
{
int code = OK;
#if USE_REENTRANT
- if (SP) {
- SP->_ESCDELAY = value;
+ if (SP_PARM) {
+ SET_ESCDELAY(value);
} else {
code = ERR;
}
#else
+ (void) SP_PARM;
ESCDELAY = value;
#endif
return code;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+set_escdelay(int value)
+{
+ int code;
+#if USE_REENTRANT
+ code = NCURSES_SP_NAME(set_escdelay) (CURRENT_SCREEN, value);
+#else
+ ESCDELAY = value;
+ code = OK;
+#endif
+ return code;
+}
+#endif
+#endif /* NCURSES_EXT_FUNCS */
+
+#if NCURSES_EXT_FUNCS
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(get_escdelay) (NCURSES_SP_DCL0)
+{
+#if !USE_REENTRANT
+ (void) SP_PARM;
+#endif
+ return GetEscdelay(SP_PARM);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+get_escdelay(void)
+{
+ return NCURSES_SP_NAME(get_escdelay) (CURRENT_SCREEN);
+}
#endif
+#endif /* NCURSES_EXT_FUNCS */
static int
_nc_use_meta(WINDOW *win)
@@ -83,12 +124,6 @@ _nc_use_meta(WINDOW *win)
return (sp ? sp->_use_meta : 0);
}
-#ifdef NCURSES_WGETCH_EVENTS
-#define TWAIT_MASK 7
-#else
-#define TWAIT_MASK 3
-#endif
-
/*
* Check for mouse activity, returning nonzero if we find any.
*/
@@ -97,19 +132,29 @@ check_mouse_activity(SCREEN *sp, int delay EVENTLIST_2nd(_nc_eventlist * evl))
{
int rc;
+#ifdef USE_TERM_DRIVER
+ rc = TCBOf(sp)->drv->testmouse(TCBOf(sp), delay);
+#else
#if USE_SYSMOUSE
if ((sp->_mouse_type == M_SYSMOUSE)
&& (sp->_sysmouse_head < sp->_sysmouse_tail)) {
- return 2;
- }
+ rc = TW_MOUSE;
+ } else
#endif
- rc = _nc_timed_wait(sp, TWAIT_MASK, delay, (int *) 0 EVENTLIST_2nd(evl));
+ {
+ rc = _nc_timed_wait(sp,
+ 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;
+ if ((sp->_mouse_type == M_SYSMOUSE)
+ && (sp->_sysmouse_head < sp->_sysmouse_tail)
+ && (rc == 0)
+ && (errno == EINTR)) {
+ rc |= TW_MOUSE;
+ }
+#endif
}
#endif
return rc;
@@ -173,9 +218,9 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
} else
mask = 0;
- if (mask & 4) {
+ if (mask & TW_EVENT) {
T(("fifo_push: ungetch KEY_EVENT"));
- _nc_ungetch(sp, KEY_EVENT);
+ safe_ungetch(sp, KEY_EVENT);
return KEY_EVENT;
}
#elif USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE
@@ -185,7 +230,7 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
#endif
#if USE_GPM_SUPPORT || USE_EMX_MOUSE
- if ((sp->_mouse_fd >= 0) && (mask & 2)) {
+ if ((sp->_mouse_fd >= 0) && (mask & TW_MOUSE)) {
sp->_mouse_event(sp);
ch = KEY_MOUSE;
n = 1;
@@ -204,10 +249,33 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
n = 1;
} else
#endif
+#ifdef USE_TERM_DRIVER
+ if ((sp->_mouse_type == M_TERM_DRIVER)
+ && (sp->_drv_mouse_head < sp->_drv_mouse_tail)) {
+ sp->_mouse_event(sp);
+ ch = KEY_MOUSE;
+ n = 1;
+ } else
+#endif
{ /* Can block... */
+#ifdef USE_TERM_DRIVER
+ int buf;
+ n = CallDriver_1(sp, read, &buf);
+ ch = buf;
+#else
unsigned char c2 = 0;
- n = read(sp->_ifd, &c2, 1);
+# if USE_PTHREADS_EINTR
+# if USE_WEAK_SYMBOLS
+ if ((pthread_self) && (pthread_kill) && (pthread_equal))
+# endif
+ _nc_globals.read_thread = pthread_self();
+# endif
+ n = (int) read(sp->_ifd, &c2, 1);
+#if USE_PTHREADS_EINTR
+ _nc_globals.read_thread = 0;
+#endif
ch = c2;
+#endif
}
#ifdef HIDE_EINTR
@@ -220,7 +288,11 @@ fifo_push(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
* 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)
+ if (n <= 0 && errno == EINTR
+# if USE_PTHREADS_EINTR
+ && (_nc_globals.have_sigwinch == 0)
+# endif
+ )
goto again;
#endif
@@ -260,12 +332,12 @@ recur_wrefresh(WINDOW *win)
{
#ifdef USE_PTHREADS
SCREEN *sp = _nc_screen_of(win);
- if (_nc_use_pthreads && sp != SP) {
+ if (_nc_use_pthreads && sp != CURRENT_SCREEN) {
SCREEN *save_SP;
/* temporarily switch to the window's screen to check/refresh */
_nc_lock_global(curses);
- save_SP = SP;
+ save_SP = CURRENT_SCREEN;
_nc_set_screen(sp);
recur_wrefresh(win);
_nc_set_screen(save_SP);
@@ -286,12 +358,12 @@ recur_wgetnstr(WINDOW *win, char *buf)
if (sp != 0) {
#ifdef USE_PTHREADS
- if (_nc_use_pthreads && sp != SP) {
+ if (_nc_use_pthreads && sp != CURRENT_SCREEN) {
SCREEN *save_SP;
/* temporarily switch to the window's screen to get cooked input */
_nc_lock_global(curses);
- save_SP = SP;
+ save_SP = CURRENT_SCREEN;
_nc_set_screen(sp);
rc = recur_wgetnstr(win, buf);
_nc_set_screen(save_SP);
@@ -311,17 +383,18 @@ recur_wgetnstr(WINDOW *win, char *buf)
NCURSES_EXPORT(int)
_nc_wgetch(WINDOW *win,
- unsigned long *result,
+ int *result,
int use_meta
EVENTLIST_2nd(_nc_eventlist * evl))
{
SCREEN *sp;
int ch;
+ int rc = 0;
#ifdef NCURSES_WGETCH_EVENTS
long event_delay = -1;
#endif
- T((T_CALLED("_nc_wgetch(%p)"), win));
+ T((T_CALLED("_nc_wgetch(%p)"), (void *) win));
*result = 0;
@@ -352,19 +425,20 @@ _nc_wgetch(WINDOW *win,
!sp->_cbreak &&
!sp->_called_wgetch) {
char buf[MAXCOLUMNS], *bufp;
- int rc;
TR(TRACE_IEVENT, ("filling queue in cooked mode"));
- rc = recur_wgetnstr(win, buf);
-
/* ungetch in reverse order */
#ifdef NCURSES_WGETCH_EVENTS
+ rc = recur_wgetnstr(win, buf);
if (rc != KEY_EVENT)
+ safe_ungetch(sp, '\n');
+#else
+ (void) recur_wgetnstr(win, buf);
+ safe_ungetch(sp, '\n');
#endif
- _nc_ungetch(sp, '\n');
for (bufp = buf + strlen(buf); bufp > buf; bufp--)
- _nc_ungetch(sp, bufp[-1]);
+ safe_ungetch(sp, bufp[-1]);
#ifdef NCURSES_WGETCH_EVENTS
/* Return it first */
@@ -384,7 +458,6 @@ _nc_wgetch(WINDOW *win,
if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) {
if (head == -1) { /* fifo is empty */
int delay;
- int rc;
TR(TRACE_IEVENT, ("timed delay in wgetch()"));
if (sp->_cbreak > 1)
@@ -402,13 +475,13 @@ _nc_wgetch(WINDOW *win,
rc = check_mouse_activity(sp, delay EVENTLIST_2nd(evl));
#ifdef NCURSES_WGETCH_EVENTS
- if (rc & 4) {
+ if (rc & TW_EVENT) {
*result = KEY_EVENT;
returnCode(KEY_CODE_YES);
}
#endif
if (!rc) {
- returnCode(ERR);
+ goto check_sigwinch;
}
}
/* else go on to read data available */
@@ -427,7 +500,6 @@ _nc_wgetch(WINDOW *win,
* increase the wait with mouseinterval().
*/
int runcount = 0;
- int rc;
do {
ch = kgetch(sp EVENTLIST_2nd(evl));
@@ -442,11 +514,11 @@ _nc_wgetch(WINDOW *win,
(ch == KEY_MOUSE
&& (((rc = check_mouse_activity(sp, sp->_maxclick
EVENTLIST_2nd(evl))) != 0
- && !(rc & 4))
+ && !(rc & TW_EVENT))
|| !sp->_mouse_parse(sp, runcount)));
#ifdef NCURSES_WGETCH_EVENTS
- if ((rc & 4) && !ch == KEY_EVENT) {
- _nc_ungetch(sp, ch);
+ if ((rc & TW_EVENT) && !(ch == KEY_EVENT)) {
+ safe_ungetch(sp, ch);
ch = KEY_EVENT;
}
#endif
@@ -454,12 +526,12 @@ _nc_wgetch(WINDOW *win,
#ifdef NCURSES_WGETCH_EVENTS
/* mouse event sequence ended by an event, report event */
if (ch == KEY_EVENT) {
- _nc_ungetch(sp, KEY_MOUSE); /* FIXME This interrupts a gesture... */
+ safe_ungetch(sp, KEY_MOUSE); /* FIXME This interrupts a gesture... */
} else
#endif
{
/* mouse event sequence ended by keystroke, store keystroke */
- _nc_ungetch(sp, ch);
+ safe_ungetch(sp, ch);
ch = KEY_MOUSE;
}
}
@@ -470,6 +542,7 @@ _nc_wgetch(WINDOW *win,
}
if (ch == ERR) {
+ check_sigwinch:
#if USE_SIZECHANGE
if (_nc_handle_sigwinch(sp)) {
_nc_update_screensize(sp);
@@ -508,7 +581,7 @@ _nc_wgetch(WINDOW *win,
* cursor to the left.
*/
if (sp->_echo && !(win->_flags & _ISPAD)) {
- chtype backup = (ch == KEY_BACKSPACE) ? '\b' : ch;
+ chtype backup = (chtype) ((ch == KEY_BACKSPACE) ? '\b' : ch);
if (backup < KEY_MIN)
wechochar(win, backup);
}
@@ -539,7 +612,7 @@ NCURSES_EXPORT(int)
wgetch_events(WINDOW *win, _nc_eventlist * evl)
{
int code;
- unsigned long value;
+ int value;
T((T_CALLED("wgetch_events(%p,%p)"), win, evl));
code = _nc_wgetch(win,
@@ -556,9 +629,9 @@ NCURSES_EXPORT(int)
wgetch(WINDOW *win)
{
int code;
- unsigned long value;
+ int value;
- T((T_CALLED("wgetch(%p)"), win));
+ T((T_CALLED("wgetch(%p)"), (void *) win));
code = _nc_wgetch(win,
&value,
_nc_use_meta(win)
@@ -632,7 +705,7 @@ kgetch(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
break;
}
TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d",
- ptr, ptr->ch, ptr->value));
+ (void *) ptr, ptr->ch, ptr->value));
if (ptr->value != 0) { /* sequence terminated */
TR(TRACE_IEVENT, ("end of sequence"));
@@ -651,7 +724,7 @@ kgetch(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
TR(TRACE_IEVENT, ("waiting for rest of sequence"));
rc = check_mouse_activity(sp, timeleft EVENTLIST_2nd(evl));
#ifdef NCURSES_WGETCH_EVENTS
- if (rc & 4) {
+ if (rc & TW_EVENT) {
TR(TRACE_IEVENT, ("interrupted by a user event"));
/* FIXME Should have preserved remainder timeleft for reuse... */
peek = head; /* Restart interpreting later */
diff --git a/ncurses/base/lib_getstr.c b/ncurses/base/lib_getstr.c
index b17df03d2a41..21d8baa05c8b 100644
--- a/ncurses/base/lib_getstr.c
+++ b/ncurses/base/lib_getstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,9 +39,8 @@
*/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_getstr.c,v 1.27 2008/08/16 19:20:04 tom Exp $")
+MODULE_ID("$Id: lib_getstr.c,v 1.29 2009/10/24 21:59:02 tom Exp $")
/*
* This wipes out the last character, no matter whether it was a tab, control
@@ -84,24 +83,24 @@ wgetnstr_events(WINDOW *win,
int ch;
int y, x;
- T((T_CALLED("wgetnstr(%p,%p, %d)"), win, str, maxlen));
+ T((T_CALLED("wgetnstr(%p,%p,%d)"), (void *) win, (void *) str, maxlen));
if (!win)
returnCode(ERR);
- _nc_get_tty_mode(&buf);
+ NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx &buf);
oldnl = sp->_nl;
oldecho = sp->_echo;
oldraw = sp->_raw;
oldcbreak = sp->_cbreak;
- nl();
- noecho();
- noraw();
- cbreak();
+ NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
- erasec = erasechar();
- killc = killchar();
+ erasec = NCURSES_SP_NAME(erasechar) (NCURSES_SP_ARG);
+ killc = NCURSES_SP_NAME(killchar) (NCURSES_SP_ARG);
oldstr = str;
getyx(win, y, x);
@@ -144,7 +143,7 @@ wgetnstr_events(WINDOW *win,
}
} else if (ch >= KEY_MIN
|| (maxlen >= 0 && str - oldstr >= maxlen)) {
- beep();
+ NCURSES_SP_NAME(beep) (NCURSES_SP_ARG);
} else {
*str++ = (char) ch;
if (oldecho == TRUE) {
@@ -193,7 +192,7 @@ wgetnstr_events(WINDOW *win,
sp->_raw = oldraw;
sp->_cbreak = oldcbreak;
- _nc_set_tty_mode(&buf);
+ NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
*str = '\0';
if (ch == ERR)
diff --git a/ncurses/base/lib_hline.c b/ncurses/base/lib_hline.c
index 2ef2cc585e10..1f0380830ddc 100644
--- a/ncurses/base/lib_hline.c
+++ b/ncurses/base/lib_hline.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,16 +40,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_hline.c,v 1.11 2006/03/11 21:52:27 tom Exp $")
+MODULE_ID("$Id: lib_hline.c,v 1.13 2010/12/19 01:48:39 tom Exp $")
NCURSES_EXPORT(int)
whline(WINDOW *win, chtype ch, int n)
{
int code = ERR;
- NCURSES_SIZE_T start;
- NCURSES_SIZE_T end;
+ int start;
+ int end;
- T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
+ T((T_CALLED("whline(%p,%s,%d)"), (void *) win, _tracechtype(ch), n));
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
diff --git a/ncurses/base/lib_immedok.c b/ncurses/base/lib_immedok.c
index 87988b66f1a3..d51b60a30857 100644
--- a/ncurses/base/lib_immedok.c
+++ b/ncurses/base/lib_immedok.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,12 +40,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_immedok.c,v 1.4 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_immedok.c,v 1.5 2009/10/24 22:32:11 tom Exp $")
NCURSES_EXPORT(void)
immedok(WINDOW *win, bool flag)
{
- T((T_CALLED("immedok(%p,%d)"), win, flag));
+ T((T_CALLED("immedok(%p,%d)"), (void *) win, flag));
if (win)
win->_immed = flag;
diff --git a/ncurses/base/lib_inchstr.c b/ncurses/base/lib_inchstr.c
index 6ff01687826e..aebb6d625d5c 100644
--- a/ncurses/base/lib_inchstr.c
+++ b/ncurses/base/lib_inchstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
****************************************************************************/
/*
@@ -40,14 +41,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_inchstr.c,v 1.10 2001/06/02 23:37:58 skimo Exp $")
+MODULE_ID("$Id: lib_inchstr.c,v 1.12 2010/12/20 01:37:41 tom Exp $")
NCURSES_EXPORT(int)
-winchnstr(WINDOW *win, chtype * str, int n)
+winchnstr(WINDOW *win, chtype *str, int n)
{
int i = 0;
- T((T_CALLED("winchnstr(%p,%p,%d)"), win, str, n));
+ T((T_CALLED("winchnstr(%p,%p,%d)"), (void *) win, (void *) str, n));
if (!str)
returnCode(0);
@@ -55,7 +56,7 @@ winchnstr(WINDOW *win, chtype * str, int n)
if (win) {
for (; (n < 0 || (i < n)) && (win->_curx + i <= win->_maxx); i++)
str[i] =
- CharOf(win->_line[win->_cury].text[win->_curx + i]) |
+ (chtype) CharOf(win->_line[win->_cury].text[win->_curx + i]) |
AttrOf(win->_line[win->_cury].text[win->_curx + i]);
}
str[i] = (chtype) 0;
diff --git a/ncurses/base/lib_initscr.c b/ncurses/base/lib_initscr.c
index b2fef0c1d085..334682fab71d 100644
--- a/ncurses/base/lib_initscr.c
+++ b/ncurses/base/lib_initscr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -45,7 +45,7 @@
#include <sys/termio.h> /* needed for ISC */
#endif
-MODULE_ID("$Id: lib_initscr.c,v 1.38 2008/08/16 21:20:48 Werner.Fink Exp $")
+MODULE_ID("$Id: lib_initscr.c,v 1.39 2009/02/14 20:55:49 tom Exp $")
NCURSES_EXPORT(WINDOW *)
initscr(void)
@@ -90,7 +90,11 @@ initscr(void)
}
/* def_shell_mode - done in newterm/_nc_setupscreen */
+#if NCURSES_SP_FUNCS
+ NCURSES_SP_NAME(def_prog_mode) (CURRENT_SCREEN);
+#else
def_prog_mode();
+#endif
}
result = stdscr;
_nc_unlock_global(curses);
diff --git a/ncurses/base/lib_insch.c b/ncurses/base/lib_insch.c
index 9166ea5240e7..e21ec02bc84f 100644
--- a/ncurses/base/lib_insch.c
+++ b/ncurses/base/lib_insch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -43,24 +43,31 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_insch.c,v 1.25 2008/02/03 00:14:37 tom Exp $")
+MODULE_ID("$Id: lib_insch.c,v 1.32 2009/10/24 22:04:35 tom Exp $")
/*
* Insert the given character, updating the current location to simplify
* inserting a string.
*/
NCURSES_EXPORT(int)
-_nc_insert_ch(WINDOW *win, chtype ch)
+_nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
{
int code = OK;
NCURSES_CH_T wch;
int count;
NCURSES_CONST char *s;
+ int tabsize = (
+#if USE_REENTRANT
+ sp->_TABSIZE
+#else
+ TABSIZE
+#endif
+ );
switch (ch) {
case '\t':
- for (count = (TABSIZE - (win->_curx % TABSIZE)); count > 0; count--) {
- if ((code = _nc_insert_ch(win, ' ')) != OK)
+ for (count = (tabsize - (win->_curx % tabsize)); count > 0; count--) {
+ if ((code = _nc_insert_ch(sp, win, ' ')) != OK)
break;
}
break;
@@ -76,7 +83,9 @@ _nc_insert_ch(WINDOW *win, chtype ch)
WINDOW_EXT(win, addch_used) == 0 &&
#endif
is8bits(ChCharOf(ch)) &&
- isprint(ChCharOf(ch))) {
+ (isprint(ChCharOf(ch)) ||
+ (ChAttrOf(ch) & A_ALTCHARSET) ||
+ (sp != 0 && sp->_legacy_coding && !iscntrl(ChCharOf(ch))))) {
if (win->_curx <= win->_maxx) {
struct ldat *line = &(win->_line[win->_cury]);
NCURSES_CH_T *end = &(line->text[win->_curx]);
@@ -93,9 +102,9 @@ _nc_insert_ch(WINDOW *win, chtype ch)
win->_curx++;
}
} else if (is8bits(ChCharOf(ch)) && iscntrl(ChCharOf(ch))) {
- s = unctrl(ChCharOf(ch));
+ s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
while (*s != '\0') {
- code = _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
+ code = _nc_insert_ch(sp, win, ChAttrOf(ch) | UChar(*s));
if (code != OK)
break;
++s;
@@ -110,16 +119,21 @@ _nc_insert_ch(WINDOW *win, chtype ch)
wch = _nc_render(win, wch);
count = _nc_build_wch(win, &wch);
if (count > 0) {
- code = wins_wch(win, &wch);
+ code = _nc_insert_wch(win, &wch);
} else if (count == -1) {
/* handle EILSEQ */
if (is8bits(ch)) {
- s = unctrl(ChCharOf(ch));
- while (*s != '\0') {
- code = _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
- if (code != OK)
- break;
- ++s;
+ s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
+ if (strlen(s) > 1) {
+ while (*s != '\0') {
+ code = _nc_insert_ch(sp, win,
+ ChAttrOf(ch) | UChar(*s));
+ if (code != OK)
+ break;
+ ++s;
+ }
+ } else {
+ code = ERR;
}
} else {
code = ERR;
@@ -139,13 +153,13 @@ winsch(WINDOW *win, chtype c)
NCURSES_SIZE_T ox;
int code = ERR;
- T((T_CALLED("winsch(%p, %s)"), win, _tracechtype(c)));
+ T((T_CALLED("winsch(%p, %s)"), (void *) win, _tracechtype(c)));
if (win != 0) {
oy = win->_cury;
ox = win->_curx;
- code = _nc_insert_ch(win, c);
+ code = _nc_insert_ch(_nc_screen_of(win), win, c);
win->_curx = ox;
win->_cury = oy;
diff --git a/ncurses/base/lib_insdel.c b/ncurses/base/lib_insdel.c
index 342c6541f95f..8f51bbed4844 100644
--- a/ncurses/base/lib_insdel.c
+++ b/ncurses/base/lib_insdel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,14 +42,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_insdel.c,v 1.12 2003/07/26 22:40:06 tom Exp $")
+MODULE_ID("$Id: lib_insdel.c,v 1.13 2009/10/24 22:34:41 tom Exp $")
NCURSES_EXPORT(int)
winsdelln(WINDOW *win, int n)
{
int code = ERR;
- T((T_CALLED("winsdelln(%p,%d)"), win, n));
+ T((T_CALLED("winsdelln(%p,%d)"), (void *) win, n));
if (win) {
if (n != 0) {
diff --git a/ncurses/base/lib_insnstr.c b/ncurses/base/lib_insnstr.c
index b6ddfde3c52b..ce03e64be002 100644
--- a/ncurses/base/lib_insnstr.c
+++ b/ncurses/base/lib_insnstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004 Free Software Foundation, Inc. *
+ * Copyright (c) 2004,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,7 +40,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_insnstr.c,v 1.1 2004/02/28 23:44:56 tom Exp $")
+MODULE_ID("$Id: lib_insnstr.c,v 1.3 2009/10/24 22:04:35 tom Exp $")
NCURSES_EXPORT(int)
winsnstr(WINDOW *win, const char *s, int n)
@@ -51,13 +51,15 @@ winsnstr(WINDOW *win, const char *s, int n)
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));
+ T((T_CALLED("winsnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(s, n), n));
if (win != 0 && str != 0) {
+ SCREEN *sp = _nc_screen_of(win);
+
oy = win->_cury;
ox = win->_curx;
for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
- _nc_insert_ch(win, (chtype) UChar(*cp));
+ _nc_insert_ch(sp, win, (chtype) UChar(*cp));
}
win->_curx = ox;
win->_cury = oy;
diff --git a/ncurses/base/lib_instr.c b/ncurses/base/lib_instr.c
index 3fb29490ad06..e6d1a739c94f 100644
--- a/ncurses/base/lib_instr.c
+++ b/ncurses/base/lib_instr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,14 +41,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_instr.c,v 1.16 2007/07/21 20:18:10 tom Exp $")
+MODULE_ID("$Id: lib_instr.c,v 1.17 2009/10/24 22:55:45 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));
+ T((T_CALLED("winnstr(%p,%p,%d)"), (void *) win, str, n));
if (!str)
returnCode(0);
@@ -79,18 +79,18 @@ winnstr(WINDOW *win, char *str, int n)
init_mb(state);
n3 = wcstombs(0, wch, 0);
- if (isEILSEQ(n3) || (n3 == 0)) {
- ;
- } else if ((int) (n3 + i) > n) {
- done = TRUE;
- } else if ((tmp = typeCalloc(char, n3 + 10)) == 0) {
- done = TRUE;
- } else {
- init_mb(state);
- wcstombs(tmp, wch, n3);
- for (i3 = 0; i3 < n3; ++i3)
- str[i++] = tmp[i3];
- free(tmp);
+ if (!isEILSEQ(n3) && (n3 != 0)) {
+ if (((int) n3 + i) > n) {
+ done = TRUE;
+ } else if ((tmp = typeCalloc(char, n3 + 10)) == 0) {
+ done = TRUE;
+ } else {
+ init_mb(state);
+ wcstombs(tmp, wch, n3);
+ for (i3 = 0; i3 < n3; ++i3)
+ str[i++] = tmp[i3];
+ free(tmp);
+ }
}
}
free(wch);
diff --git a/ncurses/base/lib_isendwin.c b/ncurses/base/lib_isendwin.c
index b337d97a94c3..923e35bf122f 100644
--- a/ncurses/base/lib_isendwin.c
+++ b/ncurses/base/lib_isendwin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -40,12 +42,20 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_isendwin.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_isendwin.c,v 1.7 2009/02/15 00:36:24 tom Exp $")
NCURSES_EXPORT(bool)
-isendwin(void)
+NCURSES_SP_NAME(isendwin) (NCURSES_SP_DCL0)
{
- if (SP == NULL)
+ if (SP_PARM == NULL)
return FALSE;
- return SP->_endwin;
+ return SP_PARM->_endwin;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(bool)
+isendwin(void)
+{
+ return NCURSES_SP_NAME(isendwin) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/base/lib_leaveok.c b/ncurses/base/lib_leaveok.c
index 17d095d0f8c8..e6995f85cb4d 100644
--- a/ncurses/base/lib_leaveok.c
+++ b/ncurses/base/lib_leaveok.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,12 +40,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_leaveok.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_leaveok.c,v 1.6 2009/10/24 22:34:23 tom Exp $")
NCURSES_EXPORT(int)
leaveok(WINDOW *win, bool flag)
{
- T((T_CALLED("leaveok(%p,%d)"), win, flag));
+ T((T_CALLED("leaveok(%p,%d)"), (void *) win, flag));
if (win) {
win->_leaveok = flag;
diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c
index 95f29aa69111..dac039551165 100644
--- a/ncurses/base/lib_mouse.c
+++ b/ncurses/base/lib_mouse.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2008 *
****************************************************************************/
/*
@@ -79,9 +80,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_mouse.c,v 1.102 2008/10/18 21:48:55 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_mouse.c,v 1.121 2011/01/22 19:47:47 tom Exp $")
-#include <term.h>
#include <tic.h>
#if USE_GPM_SUPPORT
@@ -118,12 +122,12 @@ make an error
#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
-#define MASK_RELEASE(x) NCURSES_MOUSE_MASK(x, 001)
-#define MASK_PRESS(x) NCURSES_MOUSE_MASK(x, 002)
-#define MASK_CLICK(x) NCURSES_MOUSE_MASK(x, 004)
-#define MASK_DOUBLE_CLICK(x) NCURSES_MOUSE_MASK(x, 010)
-#define MASK_TRIPLE_CLICK(x) NCURSES_MOUSE_MASK(x, 020)
-#define MASK_RESERVED_EVENT(x) NCURSES_MOUSE_MASK(x, 040)
+#define MASK_RELEASE(x) (mmask_t) NCURSES_MOUSE_MASK(x, 001)
+#define MASK_PRESS(x) (mmask_t) NCURSES_MOUSE_MASK(x, 002)
+#define MASK_CLICK(x) (mmask_t) NCURSES_MOUSE_MASK(x, 004)
+#define MASK_DOUBLE_CLICK(x) (mmask_t) NCURSES_MOUSE_MASK(x, 010)
+#define MASK_TRIPLE_CLICK(x) (mmask_t) NCURSES_MOUSE_MASK(x, 020)
+#define MASK_RESERVED_EVENT(x) (mmask_t) NCURSES_MOUSE_MASK(x, 040)
#if NCURSES_MOUSE_VERSION == 1
#define BUTTON_CLICKED (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED | BUTTON4_CLICKED)
@@ -150,7 +154,7 @@ make an error
#define LIBGPM_SONAME "libgpm.so"
#endif
-#define GET_DLSYM(name) (my_##name = (TYPE_##name) dlsym(SP->_dlopen_gpm, #name))
+#define GET_DLSYM(name) (my_##name = (TYPE_##name) dlsym(sp->_dlopen_gpm, #name))
#endif /* USE_GPM_SUPPORT */
@@ -164,13 +168,13 @@ static void _nc_mouse_wrap(SCREEN *);
#define LastEV(sp) ((sp)->_mouse_events + EV_MAX - 1)
#undef NEXT
-#define NEXT(ep) ((ep >= LastEV(sp)) \
- ? FirstEV(sp) \
+#define NEXT(ep) ((ep >= LastEV(SP_PARM)) \
+ ? FirstEV(SP_PARM) \
: ep + 1)
#undef PREV
-#define PREV(ep) ((ep <= FirstEV(sp)) \
- ? LastEV(sp) \
+#define PREV(ep) ((ep <= FirstEV(SP_PARM)) \
+ ? LastEV(SP_PARM) \
: ep - 1)
#define IndexEV(sp, ep) (ep - FirstEV(sp))
@@ -185,7 +189,7 @@ _trace_slot(SCREEN *sp, const char *tag)
{
MEVENT *ep;
- _tracef(tag);
+ _tracef("%s", tag);
for (ep = FirstEV(sp); ep <= LastEV(sp); ep++)
_tracef("mouse event queue slot %ld = %s",
@@ -340,10 +344,13 @@ sysmouse_server(SCREEN *sp)
static void
handle_sysmouse(int sig GCC_UNUSED)
{
- sysmouse_server(SP);
+ sysmouse_server(CURRENT_SCREEN);
}
#endif /* USE_SYSMOUSE */
+#ifndef USE_TERM_DRIVER
+#define xterm_kmous "\033[M"
+
static void
init_xterm_mouse(SCREEN *sp)
{
@@ -352,6 +359,7 @@ init_xterm_mouse(SCREEN *sp)
if (!VALID_STRING(sp->_mouse_xtermcap))
sp->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;";
}
+#endif
static void
enable_xterm_mouse(SCREEN *sp, int enable)
@@ -359,7 +367,9 @@ enable_xterm_mouse(SCREEN *sp, int enable)
#if USE_EMX_MOUSE
sp->_emxmouse_activated = enable;
#else
- putp(TPARM_1(sp->_mouse_xtermcap, enable));
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "xterm-mouse",
+ TPARM_1(sp->_mouse_xtermcap, enable));
#endif
sp->_mouse_active = enable;
}
@@ -398,7 +408,7 @@ allow_gpm_mouse(void)
static void
unload_gpm_library(SCREEN *sp)
{
- if (SP->_dlopen_gpm != 0) {
+ if (sp->_dlopen_gpm != 0) {
T(("unload GPM library"));
sp->_mouse_gpm_loaded = FALSE;
sp->_mouse_fd = -1;
@@ -440,6 +450,8 @@ enable_gpm_mouse(SCREEN *sp, bool enable)
}
#endif
if (sp->_mouse_gpm_loaded) {
+ int code;
+
/* GPM: initialize connection to gpm server */
sp->_mouse_gpm_connect.eventMask = GPM_DOWN | GPM_UP;
sp->_mouse_gpm_connect.defaultMask =
@@ -454,7 +466,16 @@ enable_gpm_mouse(SCREEN *sp, bool enable)
* The former is recognized by wscons (SunOS), and the latter by
* xterm. Those will not show up in ncurses' traces.
*/
- result = (my_Gpm_Open(&sp->_mouse_gpm_connect, 0) >= 0);
+ code = my_Gpm_Open(&sp->_mouse_gpm_connect, 0);
+ result = (code >= 0);
+
+ /*
+ * GPM can return a -2 if it is trying to do something with xterm.
+ * Ignore that, since it conflicts with our use of stdin.
+ */
+ if (code == -2) {
+ my_Gpm_Close();
+ }
} else {
result = FALSE;
}
@@ -478,8 +499,6 @@ enable_gpm_mouse(SCREEN *sp, bool enable)
}
#endif /* USE_GPM_SUPPORT */
-#define xterm_kmous "\033[M"
-
static void
initialize_mousetype(SCREEN *sp)
{
@@ -514,7 +533,7 @@ initialize_mousetype(SCREEN *sp)
/* OS/2 VIO */
#if USE_EMX_MOUSE
if (!sp->_emxmouse_thread
- && strstr(cur_term->type.term_names, "xterm") == 0
+ && strstr(TerminalOf(sp)->type.term_names, "xterm") == 0
&& key_mouse) {
int handles[2];
@@ -621,16 +640,21 @@ initialize_mousetype(SCREEN *sp)
}
#endif /* USE_SYSMOUSE */
+#ifdef USE_TERM_DRIVER
+ CallDriver(sp, initmouse);
+#else
/* we know how to recognize mouse events under "xterm" */
if (key_mouse != 0) {
if (!strcmp(key_mouse, xterm_kmous)
- || strstr(cur_term->type.term_names, "xterm") != 0) {
+ || strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
init_xterm_mouse(sp);
}
- } else if (strstr(cur_term->type.term_names, "xterm") != 0) {
+ } else if (strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
if (_nc_add_to_try(&(sp->_keytry), xterm_kmous, KEY_MOUSE) == OK)
init_xterm_mouse(sp);
}
+#endif
+
returnVoid;
}
@@ -665,7 +689,7 @@ _nc_mouse_init(SCREEN *sp)
* fifo_push() in lib_getch.c
*/
static bool
-_nc_mouse_event(SCREEN *sp GCC_UNUSED)
+_nc_mouse_event(SCREEN *sp)
{
MEVENT *eventp = sp->_mouse_eventp;
bool result = FALSE;
@@ -694,11 +718,16 @@ _nc_mouse_event(SCREEN *sp GCC_UNUSED)
#if USE_GPM_SUPPORT
case M_GPM:
- {
+ if (sp->_mouse_fd >= 0) {
/* query server for event, return TRUE if we find one */
Gpm_Event ev;
- if (my_Gpm_GetEvent(&ev) == 1) {
+ switch (my_Gpm_GetEvent(&ev)) {
+ case 0:
+ /* Connection closed, drop the mouse. */
+ sp->_mouse_fd = -1;
+ break;
+ case 1:
/* there's only one mouse... */
eventp->id = NORMAL_EVENT;
@@ -729,8 +758,9 @@ _nc_mouse_event(SCREEN *sp GCC_UNUSED)
eventp->z = 0;
/* bump the next-free pointer into the circular list */
- sp->_mouse_eventp = eventp = NEXT(eventp);
+ sp->_mouse_eventp = NEXT(eventp);
result = TRUE;
+ break;
}
}
break;
@@ -759,6 +789,28 @@ _nc_mouse_event(SCREEN *sp GCC_UNUSED)
break;
#endif /* USE_SYSMOUSE */
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ while (sp->_drv_mouse_head < sp->_drv_mouse_tail) {
+ *eventp = sp->_drv_mouse_fifo[sp->_drv_mouse_head];
+
+ /*
+ * Point the fifo-head to the next possible location. If there
+ * are none, reset the indices.
+ */
+ sp->_drv_mouse_head += 1;
+ if (sp->_drv_mouse_head == sp->_drv_mouse_tail) {
+ sp->_drv_mouse_tail = 0;
+ sp->_drv_mouse_head = 0;
+ }
+
+ /* bump the next-free pointer into the circular list */
+ sp->_mouse_eventp = eventp = NEXT(eventp);
+ result = TRUE;
+ }
+ break;
+#endif
+
case M_NONE:
break;
}
@@ -814,17 +866,26 @@ _nc_mouse_inline(SCREEN *sp)
* Wheel mice may return buttons 4 and 5 when the wheel is turned.
* We encode those as button presses.
*/
+# if USE_PTHREADS_EINTR
+# if USE_WEAK_SYMBOLS
+ if ((pthread_self) && (pthread_kill) && (pthread_equal))
+# endif
+ _nc_globals.read_thread = pthread_self();
+# endif
for (grabbed = 0; grabbed < 3; grabbed += (size_t) 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);
+ res = (int) read(M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3);
#else
- res = read(sp->_ifd, kbuf + grabbed, 3 - grabbed);
+ res = (int) read(sp->_ifd, kbuf + grabbed, 3 - grabbed);
#endif
if (res == -1)
break;
}
+#if USE_PTHREADS_EINTR
+ _nc_globals.read_thread = 0;
+#endif
kbuf[3] = '\0';
TR(TRACE_IEVENT,
@@ -937,7 +998,7 @@ mouse_activate(SCREEN *sp, bool on)
switch (sp->_mouse_type) {
case M_XTERM:
#if NCURSES_EXT_FUNCS
- keyok(KEY_MOUSE, on);
+ NCURSES_SP_NAME(keyok) (NCURSES_SP_ARGx KEY_MOUSE, on);
#endif
TPUTS_TRACE("xterm mouse initialization");
enable_xterm_mouse(sp, 1);
@@ -956,6 +1017,11 @@ mouse_activate(SCREEN *sp, bool on)
sp->_mouse_active = TRUE;
break;
#endif
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ sp->_mouse_active = TRUE;
+ break;
+#endif
case M_NONE:
return;
}
@@ -985,11 +1051,16 @@ mouse_activate(SCREEN *sp, bool on)
sp->_mouse_active = FALSE;
break;
#endif
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ sp->_mouse_active = FALSE;
+ break;
+#endif
case M_NONE:
return;
}
}
- _nc_flush();
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
}
/**************************************************************************
@@ -1222,6 +1293,11 @@ _nc_mouse_wrap(SCREEN *sp)
mouse_activate(sp, FALSE);
break;
#endif
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ mouse_activate(sp, FALSE);
+ break;
+#endif
case M_NONE:
break;
}
@@ -1253,6 +1329,13 @@ _nc_mouse_resume(SCREEN *sp)
mouse_activate(sp, TRUE);
break;
#endif
+
+#ifdef USE_TERM_DRIVER
+ case M_TERM_DRIVER:
+ mouse_activate(sp, TRUE);
+ break;
+#endif
+
case M_NONE:
break;
}
@@ -1264,80 +1347,92 @@ _nc_mouse_resume(SCREEN *sp)
*
**************************************************************************/
-static int
-_nc_getmouse(SCREEN *sp, MEVENT * aevent)
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
{
- T((T_CALLED("getmouse(%p)"), aevent));
+ int result = ERR;
- if ((aevent != 0) && (sp != 0) && (sp->_mouse_type != M_NONE)) {
- MEVENT *eventp = sp->_mouse_eventp;
+ T((T_CALLED("getmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
+
+ if ((aevent != 0) && (SP_PARM != 0) && (SP_PARM->_mouse_type != M_NONE)) {
+ MEVENT *eventp = SP_PARM->_mouse_eventp;
/* compute the current-event pointer */
MEVENT *prev = PREV(eventp);
- /* copy the event we find there */
- *aevent = *prev;
+ if (prev->id != INVALID_EVENT) {
+ /* copy the event we find there */
+ *aevent = *prev;
- TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld",
- _nc_tracemouse(sp, prev),
- (long) IndexEV(sp, prev)));
+ TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld",
+ _nc_tracemouse(SP_PARM, prev),
+ (long) IndexEV(SP_PARM, prev)));
- prev->id = INVALID_EVENT; /* so the queue slot becomes free */
- returnCode(OK);
+ prev->id = INVALID_EVENT; /* so the queue slot becomes free */
+ SP_PARM->_mouse_eventp = PREV(prev);
+ result = OK;
+ }
}
- returnCode(ERR);
+ returnCode(result);
}
+#if NCURSES_SP_FUNCS
/* grab a copy of the current mouse event */
NCURSES_EXPORT(int)
getmouse(MEVENT * aevent)
{
- return _nc_getmouse(SP, aevent);
+ return NCURSES_SP_NAME(getmouse) (CURRENT_SCREEN, aevent);
}
+#endif
-static int
-_nc_ungetmouse(SCREEN *sp, MEVENT * aevent)
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(ungetmouse) (NCURSES_SP_DCLx MEVENT * aevent)
{
int result = ERR;
- T((T_CALLED("ungetmouse(%p)"), aevent));
+ T((T_CALLED("ungetmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
- if (aevent != 0 && sp != 0) {
- MEVENT *eventp = sp->_mouse_eventp;
+ if (aevent != 0 && SP_PARM != 0) {
+ MEVENT *eventp = SP_PARM->_mouse_eventp;
/* stick the given event in the next-free slot */
*eventp = *aevent;
/* bump the next-free pointer into the circular list */
- sp->_mouse_eventp = NEXT(eventp);
+ SP_PARM->_mouse_eventp = NEXT(eventp);
/* push back the notification event on the keyboard queue */
- result = _nc_ungetch(sp, KEY_MOUSE);
+ result = NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx KEY_MOUSE);
}
returnCode(result);
}
+#if NCURSES_SP_FUNCS
/* enqueue a synthesized mouse event to be seen by the next wgetch() */
NCURSES_EXPORT(int)
ungetmouse(MEVENT * aevent)
{
- return _nc_ungetmouse(SP, aevent);
+ return NCURSES_SP_NAME(ungetmouse) (CURRENT_SCREEN, aevent);
}
+#endif
NCURSES_EXPORT(mmask_t)
-mousemask(mmask_t newmask, mmask_t * oldmask)
+NCURSES_SP_NAME(mousemask) (NCURSES_SP_DCLx mmask_t newmask, mmask_t * oldmask)
/* set the mouse event mask */
{
mmask_t result = 0;
- T((T_CALLED("mousemask(%#lx,%p)"), (unsigned long) newmask, oldmask));
+ T((T_CALLED("mousemask(%p,%#lx,%p)"),
+ (void *) SP_PARM,
+ (unsigned long) newmask,
+ (void *) oldmask));
- if (SP != 0) {
+ if (SP_PARM != 0) {
if (oldmask)
- *oldmask = SP->_mouse_mask;
+ *oldmask = SP_PARM->_mouse_mask;
- if (newmask || SP->_mouse_initialized) {
- _nc_mouse_init(SP);
- if (SP->_mouse_type != M_NONE) {
+ if (newmask || SP_PARM->_mouse_initialized) {
+ _nc_mouse_init(SP_PARM);
+ if (SP_PARM->_mouse_type != M_NONE) {
result = newmask &
(REPORT_MOUSE_POSITION
| BUTTON_ALT
@@ -1349,14 +1444,22 @@ mousemask(mmask_t newmask, mmask_t * oldmask)
| BUTTON_DOUBLE_CLICKED
| BUTTON_TRIPLE_CLICKED);
- mouse_activate(SP, (bool) (result != 0));
+ mouse_activate(SP_PARM, (bool) (result != 0));
- SP->_mouse_mask = result;
+ SP_PARM->_mouse_mask = result;
}
}
}
- returnBits(result);
+ returnMMask(result);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(mmask_t)
+mousemask(mmask_t newmask, mmask_t * oldmask)
+{
+ return NCURSES_SP_NAME(mousemask) (CURRENT_SCREEN, newmask, oldmask);
}
+#endif
NCURSES_EXPORT(bool)
wenclose(const WINDOW *win, int y, int x)
@@ -1364,7 +1467,7 @@ wenclose(const WINDOW *win, int y, int x)
{
bool result = FALSE;
- T((T_CALLED("wenclose(%p,%d,%d)"), win, y, x));
+ T((T_CALLED("wenclose(%p,%d,%d)"), (const void *) win, y, x));
if (win != 0) {
y -= win->_yoffset;
@@ -1377,17 +1480,17 @@ wenclose(const WINDOW *win, int y, int x)
}
NCURSES_EXPORT(int)
-mouseinterval(int maxclick)
+NCURSES_SP_NAME(mouseinterval) (NCURSES_SP_DCLx int maxclick)
/* set the maximum mouse interval within which to recognize a click */
{
int oldval;
- T((T_CALLED("mouseinterval(%d)"), maxclick));
+ T((T_CALLED("mouseinterval(%p,%d)"), (void *) SP_PARM, maxclick));
- if (SP != 0) {
- oldval = SP->_maxclick;
+ if (SP_PARM != 0) {
+ oldval = SP_PARM->_maxclick;
if (maxclick >= 0)
- SP->_maxclick = maxclick;
+ SP_PARM->_maxclick = maxclick;
} else {
oldval = DEFAULT_MAXCLICK;
}
@@ -1395,20 +1498,46 @@ mouseinterval(int maxclick)
returnCode(oldval);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+mouseinterval(int maxclick)
+{
+ return NCURSES_SP_NAME(mouseinterval) (CURRENT_SCREEN, maxclick);
+}
+#endif
+
/* This may be used by other routines to ask for the existence of mouse
support */
-NCURSES_EXPORT(int)
-_nc_has_mouse(void)
+NCURSES_EXPORT(bool)
+_nc_has_mouse(SCREEN *sp)
+{
+ return (((0 == sp) || (sp->_mouse_type == M_NONE)) ? FALSE : TRUE);
+}
+
+NCURSES_EXPORT(bool)
+NCURSES_SP_NAME(has_mouse) (NCURSES_SP_DCL0)
{
- return (SP->_mouse_type == M_NONE ? 0 : 1);
+ return _nc_has_mouse(SP_PARM);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(bool)
+has_mouse(void)
+{
+ return _nc_has_mouse(CURRENT_SCREEN);
+}
+#endif
+
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));
+ T((T_CALLED("wmouse_trafo(%p,%p,%p,%d)"),
+ (const void *) win,
+ (void *) pY,
+ (void *) pX,
+ to_screen));
if (win && pY && pX) {
int y = *pY;
diff --git a/ncurses/base/lib_move.c b/ncurses/base/lib_move.c
index 652c44d7b718..488b195d15a3 100644
--- a/ncurses/base/lib_move.c
+++ b/ncurses/base/lib_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,12 +41,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_move.c,v 1.12 2004/12/04 21:50:07 tom Exp $")
+MODULE_ID("$Id: lib_move.c,v 1.13 2009/10/24 22:34:07 tom Exp $")
NCURSES_EXPORT(int)
wmove(WINDOW *win, int y, int x)
{
- T((T_CALLED("wmove(%p,%d,%d)"), win, y, x));
+ T((T_CALLED("wmove(%p,%d,%d)"), (void *) win, y, x));
if (LEGALYX(win, y, x)) {
win->_curx = (NCURSES_SIZE_T) x;
diff --git a/ncurses/base/lib_mvwin.c b/ncurses/base/lib_mvwin.c
index e4dad4a746f0..18d31c13319b 100644
--- a/ncurses/base/lib_mvwin.c
+++ b/ncurses/base/lib_mvwin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
@@ -40,12 +42,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_mvwin.c,v 1.14 2006/02/25 22:53:46 tom Exp $")
+MODULE_ID("$Id: lib_mvwin.c,v 1.18 2010/12/19 01:22:58 tom Exp $")
NCURSES_EXPORT(int)
mvwin(WINDOW *win, int by, int bx)
{
- T((T_CALLED("mvwin(%p,%d,%d)"), win, by, bx));
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(win);
+#endif
+
+ T((T_CALLED("mvwin(%p,%d,%d)"), (void *) win, by, bx));
if (!win || (win->_flags & _ISPAD))
returnCode(ERR);
@@ -96,8 +102,8 @@ mvwin(WINDOW *win, int by, int bx)
}
#endif
- if (by + win->_maxy > screen_lines - 1
- || bx + win->_maxx > screen_columns - 1
+ if (by + win->_maxy > screen_lines(SP_PARM) - 1
+ || bx + win->_maxx > screen_columns(SP_PARM) - 1
|| by < 0
|| bx < 0)
returnCode(ERR);
@@ -108,7 +114,7 @@ mvwin(WINDOW *win, int by, int bx)
* 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;
+ win->_begy = (NCURSES_SIZE_T) by;
+ win->_begx = (NCURSES_SIZE_T) bx;
returnCode(touchwin(win));
}
diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c
index 05982b84cee4..e12208b7d02d 100644
--- a/ncurses/base/lib_newterm.c
+++ b/ncurses/base/lib_newterm.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -45,10 +46,19 @@
#define _POSIX_SOURCE
#endif
-#include <term.h> /* clear_screen, cup & friends, cur_term */
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
#include <tic.h>
-MODULE_ID("$Id: lib_newterm.c,v 1.73 2008/08/16 21:20:48 Werner.Fink Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.86 2010/05/20 23:25:18 tom Exp $")
+
+#ifdef USE_TERM_DRIVER
+#define NumLabels InfoOf(SP_PARM).numlabels
+#else
+#define NumLabels num_labels
+#endif
#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
#define ONLCR 0
@@ -63,27 +73,29 @@ MODULE_ID("$Id: lib_newterm.c,v 1.73 2008/08/16 21:20:48 Werner.Fink Exp $")
* is supposed to behave as if it calls newterm, we do it here.
*/
static NCURSES_INLINE int
-_nc_initscr(void)
+_nc_initscr(NCURSES_SP_DCL0)
{
int result = ERR;
+ TERMINAL *term = TerminalOf(SP_PARM);
/* for extended XPG4 conformance requires cbreak() at this point */
/* (SVr4 curses does this anyway) */
- if (cbreak() == OK) {
+ if (NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG) == OK) {
TTY buf;
- buf = cur_term->Nttyb;
+ buf = term->Nttyb;
#ifdef TERMIOS
- buf.c_lflag &= ~(ECHO | ECHONL);
- buf.c_iflag &= ~(ICRNL | INLCR | IGNCR);
- buf.c_oflag &= ~(ONLCR);
+ buf.c_lflag &= (unsigned) ~(ECHO | ECHONL);
+ buf.c_iflag &= (unsigned) ~(ICRNL | INLCR | IGNCR);
+ buf.c_oflag &= (unsigned) ~(ONLCR);
#elif HAVE_SGTTY_H
buf.sg_flags &= ~(ECHO | CRMOD);
#else
memset(&buf, 0, sizeof(buf));
#endif
- if ((result = _nc_set_tty_mode(&buf)) == OK)
- cur_term->Nttyb = buf;
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
+ if (result == OK)
+ term->Nttyb = buf;
}
return result;
}
@@ -95,13 +107,30 @@ _nc_initscr(void)
* initialized.
*/
NCURSES_EXPORT(void)
+NCURSES_SP_NAME(filter) (NCURSES_SP_DCL0)
+{
+ START_TRACE();
+ T((T_CALLED("filter(%p)"), (void *) SP_PARM));
+#if NCURSES_SP_FUNCS
+ if (IsPreScreen(SP_PARM)) {
+ SP_PARM->_filtered = TRUE;
+ }
+#else
+ _nc_prescreen.filter_mode = TRUE;
+#endif
+ returnVoid;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
filter(void)
{
START_TRACE();
- T((T_CALLED("filter")));
+ T((T_CALLED("filter()")));
_nc_prescreen.filter_mode = TRUE;
returnVoid;
}
+#endif
#if NCURSES_EXT_FUNCS
/*
@@ -109,62 +138,125 @@ filter(void)
* requiring it to also be filtered.
*/
NCURSES_EXPORT(void)
+NCURSES_SP_NAME(nofilter) (NCURSES_SP_DCL0)
+{
+ START_TRACE();
+ T((T_CALLED("nofilter(%p)"), (void *) SP_PARM));
+#if NCURSES_SP_FUNCS
+ if (IsPreScreen(SP_PARM)) {
+ SP_PARM->_filtered = FALSE;
+ }
+#else
+ _nc_prescreen.filter_mode = FALSE;
+#endif
+ returnVoid;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
nofilter(void)
{
START_TRACE();
- T((T_CALLED("nofilter")));
+ T((T_CALLED("nofilter()")));
_nc_prescreen.filter_mode = FALSE;
returnVoid;
}
#endif
+#endif /* NCURSES_EXT_FUNCS */
NCURSES_EXPORT(SCREEN *)
-newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
+NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
+ NCURSES_CONST char *name,
+ FILE *ofp,
+ FILE *ifp)
{
int value;
int errret;
- SCREEN *current;
SCREEN *result = 0;
+ SCREEN *current;
TERMINAL *its_term;
+ FILE *_ofp = ofp ? ofp : stdout;
+ FILE *_ifp = ifp ? ifp : stdin;
+ int cols;
+ int slk_format;
+ int filter_mode;
+ TERMINAL *new_term = 0;
START_TRACE();
- T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp));
+ T((T_CALLED("newterm(%p, \"%s\", %p,%p)"),
+ (void *) SP_PARM,
+ name,
+ (void *) ofp,
+ (void *) ifp));
+
+#if NCURSES_SP_FUNCS
+ assert(SP_PARM != 0);
+ if (SP_PARM == 0)
+ returnSP(SP_PARM);
+#endif
_nc_init_pthreads();
_nc_lock_global(curses);
- current = SP;
- its_term = (SP ? SP->_term : 0);
+ current = CURRENT_SCREEN;
+ its_term = (current ? current->_term : 0);
+ INIT_TERM_DRIVER();
/* this loads the capability entry, then sets LINES and COLS */
- if (setupterm(name, fileno(ofp), &errret) != ERR) {
- int slk_format = _nc_globals.slk_format;
+ if (
+#if NCURSES_SP_FUNCS
+ SP_PARM->_prescreen &&
+#endif
+ TINFO_SETUP_TERM(&new_term, name,
+ fileno(_ofp), &errret, FALSE) != ERR) {
+
+ _nc_set_screen(0);
+#ifdef USE_TERM_DRIVER
+ assert(new_term != 0);
+#endif
+
+#if NCURSES_SP_FUNCS
+ slk_format = SP_PARM->slk_format;
+ filter_mode = SP_PARM->_filtered;
+#else
+ slk_format = _nc_globals.slk_format;
+ filter_mode = _nc_prescreen.filter_mode;
+#endif
/*
* This actually allocates the screen structure, and saves the original
* terminal settings.
*/
- _nc_set_screen(0);
-
- /* allow user to set maximum escape delay from the environment */
- if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
- set_escdelay(value);
- }
-
- if (_nc_setupscreen(LINES,
- COLS,
- ofp,
- _nc_prescreen.filter_mode,
- slk_format) == ERR) {
+ if (NCURSES_SP_NAME(_nc_setupscreen) (
+#if NCURSES_SP_FUNCS
+ &SP_PARM,
+#endif
+ *(ptrLines(SP_PARM)),
+ *(ptrCols(SP_PARM)),
+ _ofp,
+ filter_mode,
+ slk_format) == ERR) {
_nc_set_screen(current);
result = 0;
} else {
- assert(SP != 0);
+#ifdef USE_TERM_DRIVER
+ TERMINAL_CONTROL_BLOCK *TCB;
+#elif !NCURSES_SP_FUNCS
+ _nc_set_screen(CURRENT_SCREEN);
+#endif
+ assert(SP_PARM != 0);
+ cols = *(ptrCols(SP_PARM));
+#ifdef USE_TERM_DRIVER
+ _nc_set_screen(SP_PARM);
+ TCB = (TERMINAL_CONTROL_BLOCK *) new_term;
+ TCB->csp = SP_PARM;
+#endif
/*
* In setupterm() we did a set_curterm(), but it was before we set
- * SP. So the "current" screen's terminal pointer was overwritten
- * with a different terminal. Later, in _nc_setupscreen(), we set
- * SP and the terminal pointer in the new screen.
+ * CURRENT_SCREEN. So the "current" screen's terminal pointer was
+ * overwritten with a different terminal. Later, in
+ * _nc_setupscreen(), we set CURRENT_SCREEN and the terminal
+ * pointer in the new screen.
*
* Restore the terminal-pointer for the pre-existing screen, if
* any.
@@ -172,37 +264,53 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
if (current)
current->_term = its_term;
+#ifdef USE_TERM_DRIVER
+ SP_PARM->_term = new_term;
+#else
+ new_term = SP_PARM->_term;
+#endif
+
+ /* allow user to set maximum escape delay from the environment */
+ if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
+ NCURSES_SP_NAME(set_escdelay) (NCURSES_SP_ARGx value);
+ }
+
/* 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);
+ if (slk_format && NumLabels > 0 && SLK_STDFMT(slk_format))
+ _nc_slk_initialize(StdScreen(SP_PARM), cols);
- SP->_ifd = fileno(ifp);
- typeahead(fileno(ifp));
+ SP_PARM->_ifd = fileno(_ifp);
+ NCURSES_SP_NAME(typeahead) (NCURSES_SP_ARGx fileno(_ifp));
#ifdef TERMIOS
- SP->_use_meta = ((cur_term->Ottyb.c_cflag & CSIZE) == CS8 &&
- !(cur_term->Ottyb.c_iflag & ISTRIP));
+ SP_PARM->_use_meta = ((new_term->Ottyb.c_cflag & CSIZE) == CS8 &&
+ !(new_term->Ottyb.c_iflag & ISTRIP));
#else
- SP->_use_meta = FALSE;
+ SP_PARM->_use_meta = FALSE;
#endif
- SP->_endwin = FALSE;
-
+ SP_PARM->_endwin = FALSE;
+#ifndef USE_TERM_DRIVER
/*
* 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)));
+ SP_PARM->_scrolling = ((scroll_forward && scroll_reverse) ||
+ ((parm_rindex ||
+ parm_insert_line ||
+ insert_line) &&
+ (parm_index ||
+ parm_delete_line ||
+ delete_line)));
+#endif
- baudrate(); /* sets a field in the SP structure */
+ NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); /* sets a field in the screen structure */
- SP->_keytry = 0;
+ SP_PARM->_keytry = 0;
+ /* compute movement costs so we can do better move optimization */
+#ifdef USE_TERM_DRIVER
+ TCBOf(SP_PARM)->drv->scinit(SP_PARM);
+#else
/*
* Check for mismatched graphic-rendition capabilities. Most SVr4
* terminfo trees contain entries that have rmul or rmso equated to
@@ -213,23 +321,31 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
* shouldn't be looking at this detail.
*/
#define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode))
- SP->_use_rmso = SGR0_TEST(exit_standout_mode);
- SP->_use_rmul = SGR0_TEST(exit_underline_mode);
+ SP_PARM->_use_rmso = SGR0_TEST(exit_standout_mode);
+ SP_PARM->_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();
+#endif
/* Initialize the terminal line settings. */
- _nc_initscr();
+ _nc_initscr(NCURSES_SP_ARG);
_nc_signal_handler(TRUE);
-
- result = SP;
+ result = SP_PARM;
}
}
_nc_unlock_global(curses);
returnSP(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(SCREEN *)
+newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
+{
+ return NCURSES_SP_NAME(newterm) (CURRENT_SCREEN_PRE, name, ofp, ifp);
+}
+#endif
diff --git a/ncurses/base/lib_newwin.c b/ncurses/base/lib_newwin.c
index 587e83a92009..72d8af84b703 100644
--- a/ncurses/base/lib_newwin.c
+++ b/ncurses/base/lib_newwin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -42,7 +43,7 @@
#include <curses.priv.h>
#include <stddef.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.52 2008/06/07 13:58:09 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.69 2011/03/07 21:58:17 tom Exp $")
#define window_is(name) ((sp)->_##name == win)
@@ -61,6 +62,17 @@ remove_window_from_screen(WINDOW *win)
{
SCREEN *sp;
+#ifdef USE_SP_WINDOWLIST
+ if ((sp = _nc_screen_of(win)) != 0) {
+ if (window_is(curscr)) {
+ remove_window(curscr);
+ } else if (window_is(stdscr)) {
+ remove_window(stdscr);
+ } else if (window_is(newscr)) {
+ remove_window(newscr);
+ }
+ }
+#else
for (each_screen(sp)) {
if (window_is(curscr)) {
remove_window(curscr);
@@ -73,6 +85,7 @@ remove_window_from_screen(WINDOW *win)
break;
}
}
+#endif
}
NCURSES_EXPORT(int)
@@ -81,17 +94,20 @@ _nc_freewin(WINDOW *win)
WINDOWLIST *p, *q;
int i;
int result = ERR;
+#ifdef USE_SP_WINDOWLIST
+ SCREEN *sp = _nc_screen_of(win); /* pretend this is parameter */
+#endif
- T((T_CALLED("_nc_freewin(%p)"), win));
+ T((T_CALLED("_nc_freewin(%p)"), (void *) win));
if (win != 0) {
- if (_nc_try_global(curses) == 0) {
+ if (_nc_nonsp_try_global(curses) == 0) {
q = 0;
- for (each_window(p)) {
+ for (each_window(SP_PARM, p)) {
if (&(p->win) == win) {
remove_window_from_screen(win);
if (q == 0)
- _nc_windows = p->next;
+ WindowList(SP_PARM) = p->next;
else
q->next = p->next;
@@ -103,35 +119,39 @@ _nc_freewin(WINDOW *win)
free(p);
result = OK;
- T(("...deleted win=%p", win));
+ T(("...deleted win=%p", (void *) win));
break;
}
q = p;
}
- _nc_unlock_global(curses);
+ _nc_nonsp_unlock_global(curses);
}
}
returnCode(result);
}
NCURSES_EXPORT(WINDOW *)
-newwin(int num_lines, int num_columns, int begy, int begx)
+NCURSES_SP_NAME(newwin) (NCURSES_SP_DCLx
+ 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));
+ T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), (void *) SP_PARM, 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;
+ num_lines = SP_PARM->_lines_avail - begy;
if (num_columns == 0)
- num_columns = screen_columns - begx;
+ num_columns = screen_columns(SP_PARM) - begx;
- if ((win = _nc_makenew(num_lines, num_columns, begy, begx, 0)) == 0)
+ win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx
+ num_lines, num_columns, begy, begx, 0);
+ if (win == 0)
returnWin(0);
for (i = 0; i < num_lines; i++) {
@@ -149,14 +169,30 @@ newwin(int num_lines, int num_columns, int begy, int begx)
returnWin(win);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(WINDOW *)
+newwin(int num_lines, int num_columns, int begy, int begx)
+{
+ WINDOW *win;
+ _nc_sp_lock_global(curses);
+ win = NCURSES_SP_NAME(newwin) (CURRENT_SCREEN,
+ num_lines, num_columns, begy, begx);
+ _nc_sp_unlock_global(curses);
+ return (win);
+}
+#endif
+
NCURSES_EXPORT(WINDOW *)
derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
{
WINDOW *win;
int i;
int flags = _SUBWIN;
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(orig);
+#endif
- T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), orig, num_lines, num_columns,
+ T((T_CALLED("derwin(%p,%d,%d,%d,%d)"), (void *) orig, num_lines, num_columns,
begy, begx));
/*
@@ -177,8 +213,10 @@ derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
if (orig->_flags & _ISPAD)
flags |= _ISPAD;
- if ((win = _nc_makenew(num_lines, num_columns, orig->_begy + begy,
- orig->_begx + begx, flags)) == 0)
+ win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx num_lines, num_columns,
+ orig->_begy + begy,
+ orig->_begx + begx, flags);
+ if (win == 0)
returnWin(0);
win->_pary = begy;
@@ -197,7 +235,7 @@ derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
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((T_CALLED("subwin(%p, %d, %d, %d, %d)"), (void *) w, l, c, y, x));
T(("parent has begy = %ld, begx = %ld", (long) w->_begy, (long) w->_begx));
returnWin(derwin(w, l, c, y - w->_begy, x - w->_begx));
@@ -206,21 +244,27 @@ subwin(WINDOW *w, int l, int c, int y, int x)
static bool
dimension_limit(int value)
{
- NCURSES_SIZE_T test = value;
+ NCURSES_SIZE_T test = (NCURSES_SIZE_T) value;
return (test == value && value > 0);
}
NCURSES_EXPORT(WINDOW *)
-_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
+NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx,
+ int flags)
{
int i;
WINDOWLIST *wp;
WINDOW *win;
- bool is_pad = (flags & _ISPAD);
+ bool is_padwin = (flags & _ISPAD);
- T((T_CALLED("_nc_makenew(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx));
+ T((T_CALLED("_nc_makenew(%p,%d,%d,%d,%d)"),
+ (void *) SP_PARM, num_lines, num_columns, begy, begx));
- if (SP == 0)
+ if (SP_PARM == 0)
returnWin(0);
if (!dimension_limit(num_lines) || !dimension_limit(num_columns))
@@ -232,26 +276,28 @@ _nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
win = &(wp->win);
if ((win->_line = typeCalloc(struct ldat, ((unsigned) num_lines))) == 0) {
- free(win);
+ free(wp);
returnWin(0);
}
- _nc_lock_global(curses);
+ _nc_nonsp_lock_global(curses);
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->_maxy = (NCURSES_SIZE_T) (num_lines - 1);
+ win->_maxx = (NCURSES_SIZE_T) (num_columns - 1);
+ win->_begy = (NCURSES_SIZE_T) begy;
+ win->_begx = (NCURSES_SIZE_T) begx;
+ win->_yoffset = SP_PARM->_topstolen;
- win->_flags = flags;
+ win->_flags = (short) flags;
WINDOW_ATTRS(win) = A_NORMAL;
SetChar(win->_nc_bkgd, BLANK_TEXT, BLANK_ATTR);
- win->_clear = is_pad ? FALSE : (num_lines == screen_lines
- && num_columns == screen_columns);
+ win->_clear = (is_padwin
+ ? FALSE
+ : (num_lines == screen_lines(SP_PARM)
+ && num_columns == screen_columns(SP_PARM)));
win->_idlok = FALSE;
win->_idcok = TRUE;
win->_scroll = FALSE;
@@ -265,7 +311,7 @@ _nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
win->_parent = 0;
win->_regtop = 0;
- win->_regbottom = num_lines - 1;
+ win->_regbottom = (NCURSES_SIZE_T) (num_lines - 1);
win->_pad._pad_y = -1;
win->_pad._pad_x = -1;
@@ -295,28 +341,28 @@ _nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
* So that's how we want ncurses to behave.
*/
win->_line[i].firstchar = 0;
- win->_line[i].lastchar = num_columns - 1;
+ win->_line[i].lastchar = (NCURSES_SIZE_T) (num_columns - 1);
if_USE_SCROLL_HINTS(win->_line[i].oldindex = i);
}
- if (!is_pad && (begx + num_columns == screen_columns)) {
+ if (!is_padwin && (begx + num_columns == screen_columns(SP_PARM))) {
win->_flags |= _ENDLINE;
- if (begx == 0 && num_lines == screen_lines && begy == 0)
+ if (begx == 0 && num_lines == screen_lines(SP_PARM) && begy == 0)
win->_flags |= _FULLWIN;
- if (begy + num_lines == screen_lines)
+ if (begy + num_lines == screen_lines(SP_PARM))
win->_flags |= _SCROLLWIN;
}
- wp->next = _nc_windows;
- wp->screen = SP;
- _nc_windows = wp;
+ wp->next = WindowList(SP_PARM);
+ wp->screen = SP_PARM;
+ WindowList(SP_PARM) = wp;
- T((T_CREATE("window %p"), win));
+ T((T_CREATE("window %p"), (void *) win));
- _nc_unlock_global(curses);
+ _nc_nonsp_unlock_global(curses);
returnWin(win);
}
@@ -325,14 +371,22 @@ _nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
* internally, and it is useful to allow those to be invoked without switching
* SCREEN's, e.g., for multi-threaded applications.
*/
-NCURSES_EXPORT(SCREEN *)
-_nc_screen_of(WINDOW *win)
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(WINDOW *)
+_nc_curscr_of(SCREEN *sp)
{
- SCREEN *sp = 0;
+ return sp == 0 ? 0 : CurScreen(sp);
+}
- if (win != 0) {
- WINDOWLIST *wp = (WINDOWLIST *) win;
- sp = wp->screen;
- }
- return (sp);
+NCURSES_EXPORT(WINDOW *)
+_nc_newscr_of(SCREEN *sp)
+{
+ return sp == 0 ? 0 : NewScreen(sp);
+}
+
+NCURSES_EXPORT(WINDOW *)
+_nc_stdscr_of(SCREEN *sp)
+{
+ return sp == 0 ? 0 : StdScreen(sp);
}
+#endif
diff --git a/ncurses/base/lib_nl.c b/ncurses/base/lib_nl.c
index 32515da0be81..34254871c985 100644
--- a/ncurses/base/lib_nl.c
+++ b/ncurses/base/lib_nl.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -42,38 +44,52 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_nl.c,v 1.8 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_nl.c,v 1.12 2009/10/24 22:05:55 tom Exp $")
#ifdef __EMX__
#include <io.h>
#endif
NCURSES_EXPORT(int)
-nl(void)
+NCURSES_SP_NAME(nl) (NCURSES_SP_DCL0)
{
- T((T_CALLED("nl()")));
-
- SP->_nl = TRUE;
-
+ T((T_CALLED("nl(%p)"), (void *) SP_PARM));
+ if (0 == SP_PARM)
+ returnCode(ERR);
+ SP_PARM->_nl = TRUE;
#ifdef __EMX__
_nc_flush();
- _fsetmode(NC_OUTPUT, "t");
+ _fsetmode(NC_OUTPUT(SP_PARM), "t");
#endif
-
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-nonl(void)
+nl(void)
{
- T((T_CALLED("nonl()")));
-
- SP->_nl = FALSE;
+ return NCURSES_SP_NAME(nl) (CURRENT_SCREEN);
+}
+#endif
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(nonl) (NCURSES_SP_DCL0)
+{
+ T((T_CALLED("nonl(%p)"), (void *) SP_PARM));
+ if (0 == SP_PARM)
+ returnCode(ERR);
+ SP_PARM->_nl = FALSE;
#ifdef __EMX__
_nc_flush();
- _fsetmode(NC_OUTPUT, "b");
+ _fsetmode(NC_OUTPUT(SP_PARM), "b");
#endif
-
returnCode(OK);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+nonl(void)
+{
+ return NCURSES_SP_NAME(nonl) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/base/lib_overlay.c b/ncurses/base/lib_overlay.c
index 669e8e72c07f..bfb817bc3108 100644
--- a/ncurses/base/lib_overlay.c
+++ b/ncurses/base/lib_overlay.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,7 +40,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_overlay.c,v 1.27 2008/06/07 23:30:34 tom Exp $")
+MODULE_ID("$Id: lib_overlay.c,v 1.29 2009/10/24 23:21:31 tom Exp $")
static int
overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
@@ -52,7 +52,7 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
int dminrow, dmincol;
int dmaxrow, dmaxcol;
- T((T_CALLED("overlap(%p,%p,%d)"), src, dst, flag));
+ T((T_CALLED("overlap(%p,%p,%d)"), (const void *) src, (void *) dst, flag));
if (src != 0 && dst != 0) {
_nc_lock_global(curses);
@@ -110,7 +110,7 @@ overlap(const WINDOW *const src, WINDOW *const dst, int const flag)
NCURSES_EXPORT(int)
overlay(const WINDOW *win1, WINDOW *win2)
{
- T((T_CALLED("overlay(%p,%p)"), win1, win2));
+ T((T_CALLED("overlay(%p,%p)"), (const void *) win1, (void *) win2));
returnCode(overlap(win1, win2, TRUE));
}
@@ -127,7 +127,7 @@ overlay(const WINDOW *win1, WINDOW *win2)
NCURSES_EXPORT(int)
overwrite(const WINDOW *win1, WINDOW *win2)
{
- T((T_CALLED("overwrite(%p,%p)"), win1, win2));
+ T((T_CALLED("overwrite(%p,%p)"), (const void *) win1, (void *) win2));
returnCode(overlap(win1, win2, FALSE));
}
@@ -145,7 +145,11 @@ copywin(const WINDOW *src, WINDOW *dst,
attr_t mask;
T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
- src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
+ (const void *) src,
+ (void *) dst,
+ sminrow, smincol,
+ dminrow, dmincol,
+ dmaxrow, dmaxcol, over));
if (src && dst) {
_nc_lock_global(curses);
diff --git a/ncurses/base/lib_pad.c b/ncurses/base/lib_pad.c
index 6cad9c54b064..b87498b500cd 100644
--- a/ncurses/base/lib_pad.c
+++ b/ncurses/base/lib_pad.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -40,21 +42,22 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_pad.c,v 1.41 2006/10/14 20:47:13 tom Exp $")
+MODULE_ID("$Id: lib_pad.c,v 1.46 2010/04/24 23:50:45 tom Exp $")
NCURSES_EXPORT(WINDOW *)
-newpad(int l, int c)
+NCURSES_SP_NAME(newpad) (NCURSES_SP_DCLx int l, int c)
{
WINDOW *win;
NCURSES_CH_T *ptr;
int i;
- T((T_CALLED("newpad(%d, %d)"), l, c));
+ T((T_CALLED("newpad(%p,%d, %d)"), (void *) SP_PARM, l, c));
if (l <= 0 || c <= 0)
returnWin(0);
- if ((win = _nc_makenew(l, c, 0, 0, _ISPAD)) == NULL)
+ win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx l, c, 0, 0, _ISPAD);
+ if (win == NULL)
returnWin(0);
for (i = 0; i < l; i++) {
@@ -70,6 +73,14 @@ newpad(int l, int c)
returnWin(win);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(WINDOW *)
+newpad(int l, int c)
+{
+ return NCURSES_SP_NAME(newpad) (CURRENT_SCREEN, l, c);
+}
+#endif
+
NCURSES_EXPORT(WINDOW *)
subpad(WINDOW *orig, int l, int c, int begy, int begx)
{
@@ -94,10 +105,14 @@ prefresh(WINDOW *win,
int smaxrow,
int smaxcol)
{
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(win);
+#endif
+
T((T_CALLED("prefresh()")));
if (pnoutrefresh(win, pminrow, pmincol, sminrow, smincol, smaxrow,
smaxcol) != ERR
- && doupdate() != ERR) {
+ && NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG) != ERR) {
returnCode(OK);
}
returnCode(ERR);
@@ -112,10 +127,11 @@ pnoutrefresh(WINDOW *win,
int smaxrow,
int smaxcol)
{
- NCURSES_SIZE_T i, j;
- NCURSES_SIZE_T m, n;
- NCURSES_SIZE_T pmaxrow;
- NCURSES_SIZE_T pmaxcol;
+ int i, j;
+ int m, n;
+ int pmaxrow;
+ int pmaxcol;
+ SCREEN *sp;
#if USE_SCROLL_HINTS
const int my_len = 2; /* parameterize the threshold for hardscroll */
@@ -124,7 +140,7 @@ pnoutrefresh(WINDOW *win,
#endif
T((T_CALLED("pnoutrefresh(%p, %d, %d, %d, %d, %d, %d)"),
- win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
+ (void *) win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol));
if (win == 0)
returnCode(ERR);
@@ -132,6 +148,8 @@ pnoutrefresh(WINDOW *win,
if (!(win->_flags & _ISPAD))
returnCode(ERR);
+ sp = _nc_screen_of(win);
+
/* negative values are interpreted as zero */
if (pminrow < 0)
pminrow = 0;
@@ -162,8 +180,8 @@ pnoutrefresh(WINDOW *win,
pmaxcol = pmincol + smaxcol - smincol;
}
- if (smaxrow >= screen_lines
- || smaxcol >= screen_columns
+ if (smaxrow >= screen_lines(sp)
+ || smaxcol >= screen_columns(sp)
|| sminrow > smaxrow
|| smincol > smaxcol)
returnCode(ERR);
@@ -194,13 +212,13 @@ pnoutrefresh(WINDOW *win,
* merely change the costs of various update cases.
*/
#if USE_SCROLL_HINTS
- wide = (smincol < my_len && smaxcol > (newscr->_maxx - my_len));
+ wide = (smincol < my_len && smaxcol > (NewScreen(sp)->_maxx - my_len));
#endif
for (i = pminrow, m = sminrow + win->_yoffset;
- i <= pmaxrow && m <= newscr->_maxy;
+ i <= pmaxrow && m <= NewScreen(sp)->_maxy;
i++, m++) {
- register struct ldat *nline = &newscr->_line[m];
+ register struct ldat *nline = &NewScreen(sp)->_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];
@@ -229,9 +247,9 @@ pnoutrefresh(WINDOW *win,
|| nind > smaxrow) {
nind = _NEWINDEX;
} else if (displaced) {
- register struct ldat *pline = &curscr->_line[nind];
+ register struct ldat *pline = &CurScreen(sp)->_line[nind];
for (j = 0; j <= my_len; j++) {
- int k = newscr->_maxx - j;
+ int k = NewScreen(sp)->_maxx - j;
if (pline->text[j] != nline->text[j]
|| pline->text[k] != nline->text[k]) {
nind = _NEWINDEX;
@@ -261,12 +279,12 @@ pnoutrefresh(WINDOW *win,
win->_line[i].oldindex = _NEWINDEX;
#endif
- win->_begx = smincol;
- win->_begy = sminrow;
+ win->_begx = (NCURSES_SIZE_T) smincol;
+ win->_begy = (NCURSES_SIZE_T) sminrow;
if (win->_clear) {
win->_clear = FALSE;
- newscr->_clear = TRUE;
+ NewScreen(sp)->_clear = TRUE;
}
/*
@@ -278,10 +296,12 @@ pnoutrefresh(WINDOW *win,
&& 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;
+ NewScreen(sp)->_cury = (NCURSES_SIZE_T) (win->_cury - pminrow
+ + win->_begy + win->_yoffset);
+ NewScreen(sp)->_curx = (NCURSES_SIZE_T) (win->_curx - pmincol
+ + win->_begx);
}
- newscr->_leaveok = win->_leaveok;
+ NewScreen(sp)->_leaveok = win->_leaveok;
win->_flags &= ~_HASMOVED;
/*
@@ -289,12 +309,12 @@ pnoutrefresh(WINDOW *win,
* 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;
+ win->_pad._pad_y = (NCURSES_SIZE_T) pminrow;
+ win->_pad._pad_x = (NCURSES_SIZE_T) pmincol;
+ win->_pad._pad_top = (NCURSES_SIZE_T) sminrow;
+ win->_pad._pad_left = (NCURSES_SIZE_T) smincol;
+ win->_pad._pad_bottom = (NCURSES_SIZE_T) smaxrow;
+ win->_pad._pad_right = (NCURSES_SIZE_T) smaxcol;
returnCode(OK);
}
@@ -302,7 +322,7 @@ pnoutrefresh(WINDOW *win,
NCURSES_EXPORT(int)
pechochar(WINDOW *pad, const chtype ch)
{
- T((T_CALLED("pechochar(%p, %s)"), pad, _tracechtype(ch)));
+ T((T_CALLED("pechochar(%p, %s)"), (void *) pad, _tracechtype(ch)));
if (pad == 0)
returnCode(ERR);
diff --git a/ncurses/base/lib_printw.c b/ncurses/base/lib_printw.c
index 62ae921e650d..963181d9a494 100644
--- a/ncurses/base/lib_printw.c
+++ b/ncurses/base/lib_printw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_printw.c,v 1.18 2006/12/17 19:21:39 tom Exp $")
+MODULE_ID("$Id: lib_printw.c,v 1.20 2009/10/24 22:07:03 tom Exp $")
NCURSES_EXPORT(int)
printw(const char *fmt,...)
@@ -70,7 +70,7 @@ wprintw(WINDOW *win, const char *fmt,...)
#ifdef TRACE
va_start(argp, fmt);
T((T_CALLED("wprintw(%p,%s%s)"),
- win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
va_end(argp);
#endif
@@ -111,7 +111,7 @@ mvwprintw(WINDOW *win, int y, int x, const char *fmt,...)
#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)));
+ y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
va_end(argp);
#endif
@@ -128,10 +128,14 @@ vwprintw(WINDOW *win, const char *fmt, va_list argp)
{
char *buf;
int code = ERR;
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(win);
+#endif
- T((T_CALLED("vwprintw(%p,%s,va_list)"), win, _nc_visbuf(fmt)));
+ T((T_CALLED("vwprintw(%p,%s,va_list)"), (void *) win, _nc_visbuf(fmt)));
- if ((buf = _nc_printf_string(fmt, argp)) != 0) {
+ buf = NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_ARGx fmt, argp);
+ if (buf != 0) {
code = waddstr(win, buf);
}
returnCode(code);
diff --git a/ncurses/base/lib_redrawln.c b/ncurses/base/lib_redrawln.c
index 6b0905f07d67..72905f84d656 100644
--- a/ncurses/base/lib_redrawln.c
+++ b/ncurses/base/lib_redrawln.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_redrawln.c,v 1.12 2007/10/13 20:08:56 tom Exp $")
+MODULE_ID("$Id: lib_redrawln.c,v 1.17 2010/12/19 00:03:23 tom Exp $")
NCURSES_EXPORT(int)
wredrawln(WINDOW *win, int beg, int num)
@@ -47,37 +47,40 @@ wredrawln(WINDOW *win, int beg, int num)
int i;
int end;
size_t len;
+ SCREEN *sp;
- T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));
+ T((T_CALLED("wredrawln(%p,%d,%d)"), (void *) win, beg, num));
if (win == 0)
returnCode(ERR);
+ sp = _nc_screen_of(win);
+
if (beg < 0)
beg = 0;
if (touchline(win, beg, num) == ERR)
returnCode(ERR);
- if (touchline(curscr, beg + win->_begy, num) == ERR)
+ if (touchline(CurScreen(sp), beg + win->_begy, num) == ERR)
returnCode(ERR);
end = beg + num;
- if (end > curscr->_maxy + 1)
- end = curscr->_maxy + 1;
+ if (end > CurScreen(sp)->_maxy + 1 - win->_begy)
+ end = CurScreen(sp)->_maxy + 1 - win->_begy;
if (end > win->_maxy + 1)
end = win->_maxy + 1;
- len = (win->_maxx + 1);
- if (len > (size_t) (curscr->_maxx + 1))
- len = (size_t) (curscr->_maxx + 1);
- len *= sizeof(curscr->_line[0].text[0]);
+ len = (size_t) (win->_maxx + 1);
+ if (len > (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx))
+ len = (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx);
+ len *= sizeof(CurScreen(sp)->_line[0].text[0]);
for (i = beg; i < end; i++) {
int crow = i + win->_begy;
- memset(curscr->_line[crow].text + win->_begx, 0, len);
- _nc_make_oldhash(crow);
+ memset(CurScreen(sp)->_line[crow].text + win->_begx, 0, len);
+ NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx crow);
}
returnCode(OK);
diff --git a/ncurses/base/lib_refresh.c b/ncurses/base/lib_refresh.c
index 2a9cafb7b0ad..8c02086a707d 100644
--- a/ncurses/base/lib_refresh.c
+++ b/ncurses/base/lib_refresh.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
@@ -41,24 +42,27 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_refresh.c,v 1.41 2007/09/29 20:39:34 tom Exp $")
+MODULE_ID("$Id: lib_refresh.c,v 1.44 2010/12/19 01:22:58 tom Exp $")
NCURSES_EXPORT(int)
wrefresh(WINDOW *win)
{
int code;
+#if NCURSES_SP_FUNCS
+ SCREEN *SP_PARM = _nc_screen_of(win);
+#endif
- T((T_CALLED("wrefresh(%p)"), win));
+ T((T_CALLED("wrefresh(%p)"), (void *) win));
if (win == 0) {
code = ERR;
- } else if (win == curscr) {
- curscr->_clear = TRUE;
- code = doupdate();
+ } else if (win == CurScreen(SP_PARM)) {
+ CurScreen(SP_PARM)->_clear = TRUE;
+ code = NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
} else if ((code = wnoutrefresh(win)) == OK) {
if (win->_clear)
- newscr->_clear = TRUE;
- code = doupdate();
+ NewScreen(SP_PARM)->_clear = TRUE;
+ code = NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
/*
* 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
@@ -73,16 +77,19 @@ wrefresh(WINDOW *win)
NCURSES_EXPORT(int)
wnoutrefresh(WINDOW *win)
{
- NCURSES_SIZE_T limit_x;
- NCURSES_SIZE_T src_row, src_col;
- NCURSES_SIZE_T begx;
- NCURSES_SIZE_T begy;
- NCURSES_SIZE_T dst_row, dst_col;
+ int limit_x;
+ int src_row, src_col;
+ int begx;
+ int begy;
+ int dst_row, dst_col;
#if USE_SCROLL_HINTS
bool wide;
#endif
+#if NCURSES_SP_FUNCS
+ SCREEN *SP_PARM = _nc_screen_of(win);
+#endif
- T((T_CALLED("wnoutrefresh(%p)"), win));
+ T((T_CALLED("wnoutrefresh(%p)"), (void *) win));
#ifdef TRACE
if (USE_TRACEF(TRACE_UPDATE)) {
_tracedump("...win", win);
@@ -101,8 +108,8 @@ wnoutrefresh(WINDOW *win)
begx = win->_begx;
begy = win->_begy;
- newscr->_nc_bkgd = win->_nc_bkgd;
- WINDOW_ATTRS(newscr) = WINDOW_ATTRS(win);
+ NewScreen(SP_PARM)->_nc_bkgd = win->_nc_bkgd;
+ WINDOW_ATTRS(NewScreen(SP_PARM)) = WINDOW_ATTRS(win);
/* merge in change information from all subwindows of this window */
wsyncdown(win);
@@ -122,7 +129,7 @@ wnoutrefresh(WINDOW *win)
* 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));
+ wide = (begx <= 1 && win->_maxx >= (NewScreen(SP_PARM)->_maxx - 1));
#endif
win->_flags &= ~_HASMOVED;
@@ -137,14 +144,14 @@ wnoutrefresh(WINDOW *win)
/* limit(dst_col) */
limit_x = win->_maxx;
/* limit(src_col) */
- if (limit_x > newscr->_maxx - begx)
- limit_x = newscr->_maxx - begx;
+ if (limit_x > NewScreen(SP_PARM)->_maxx - begx)
+ limit_x = NewScreen(SP_PARM)->_maxx - begx;
for (src_row = 0, dst_row = begy + win->_yoffset;
- src_row <= win->_maxy && dst_row <= newscr->_maxy;
+ src_row <= win->_maxy && dst_row <= NewScreen(SP_PARM)->_maxy;
src_row++, dst_row++) {
- register struct ldat *nline = &newscr->_line[dst_row];
- register struct ldat *oline = &win->_line[src_row];
+ struct ldat *nline = &(NewScreen(SP_PARM)->_line[dst_row]);
+ struct ldat *oline = &win->_line[src_row];
if (oline->firstchar != _NOCHANGE) {
int last_src = oline->lastchar;
@@ -156,7 +163,7 @@ wnoutrefresh(WINDOW *win)
dst_col = src_col + begx;
if_WIDEC({
- register int j;
+ int j;
/*
* Ensure that we will copy complete multi-column characters
@@ -197,7 +204,7 @@ wnoutrefresh(WINDOW *win)
: win->_maxx);
int fix_left = dst_col;
int fix_right = last_dst;
- register int j;
+ int j;
/*
* Check for boundary cases where we may overwrite part of a
@@ -225,7 +232,8 @@ wnoutrefresh(WINDOW *win)
* this character. Find the end of the character.
*/
++j;
- while (j <= newscr->_maxx && isWidecExt(nline->text[j])) {
+ while (j <= NewScreen(SP_PARM)->_maxx &&
+ isWidecExt(nline->text[j])) {
fix_right = j++;
}
}
@@ -269,18 +277,19 @@ wnoutrefresh(WINDOW *win)
if (win->_clear) {
win->_clear = FALSE;
- newscr->_clear = TRUE;
+ NewScreen(SP_PARM)->_clear = TRUE;
}
if (!win->_leaveok) {
- newscr->_cury = win->_cury + win->_begy + win->_yoffset;
- newscr->_curx = win->_curx + win->_begx;
+ NewScreen(SP_PARM)->_cury = (NCURSES_SIZE_T) (win->_cury +
+ win->_begy + win->_yoffset);
+ NewScreen(SP_PARM)->_curx = (NCURSES_SIZE_T) (win->_curx + win->_begx);
}
- newscr->_leaveok = win->_leaveok;
+ NewScreen(SP_PARM)->_leaveok = win->_leaveok;
#ifdef TRACE
if (USE_TRACEF(TRACE_UPDATE)) {
- _tracedump("newscr", newscr);
+ _tracedump("newscr", NewScreen(SP_PARM));
_nc_unlock_global(tracef);
}
#endif /* TRACE */
diff --git a/ncurses/base/lib_restart.c b/ncurses/base/lib_restart.c
index da770d4e7c92..b28cfd1f2ffd 100644
--- a/ncurses/base/lib_restart.c
+++ b/ncurses/base/lib_restart.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2008 *
****************************************************************************/
/*
@@ -44,49 +45,62 @@
#define _POSIX_SOURCE
#endif
-#include <term.h> /* lines, columns, cur_term */
-
-MODULE_ID("$Id: lib_restart.c,v 1.10 2008/06/21 17:31:22 tom Exp $")
+MODULE_ID("$Id: lib_restart.c,v 1.13 2009/10/24 22:47:43 tom Exp $")
NCURSES_EXPORT(int)
-restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
+NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
+ NCURSES_CONST char *termp,
+ int filenum,
+ int *errret)
{
int result;
+#ifdef USE_TERM_DRIVER
+ TERMINAL *new_term;
+#endif
- T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
+ T((T_CALLED("restartterm(%p,%s,%d,%p)"),
+ (void *) SP_PARM,
+ termp,
+ filenum,
+ (void *) errret));
- if (setupterm(termp, filenum, errret) != OK) {
+ if (TINFO_SETUP_TERM(&new_term, termp, filenum, errret, FALSE) != OK) {
result = ERR;
- } else if (SP != 0) {
- int saveecho = SP->_echo;
- int savecbreak = SP->_cbreak;
- int saveraw = SP->_raw;
- int savenl = SP->_nl;
+ } else if (SP_PARM != 0) {
+ int saveecho = SP_PARM->_echo;
+ int savecbreak = SP_PARM->_cbreak;
+ int saveraw = SP_PARM->_raw;
+ int savenl = SP_PARM->_nl;
- if (saveecho)
- echo();
- else
- noecho();
+#ifdef USE_TERM_DRIVER
+ SP_PARM->_term = new_term;
+#endif
+ if (saveecho) {
+ NCURSES_SP_NAME(echo) (NCURSES_SP_ARG);
+ } else {
+ NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
+ }
if (savecbreak) {
- cbreak();
- noraw();
+ NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
} else if (saveraw) {
- nocbreak();
- raw();
+ NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(raw) (NCURSES_SP_ARG);
+ } else {
+ NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
+ }
+ if (savenl) {
+ NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
} else {
- nocbreak();
- noraw();
+ NCURSES_SP_NAME(nonl) (NCURSES_SP_ARG);
}
- if (savenl)
- nl();
- else
- nonl();
- reset_prog_mode();
+ NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
#if USE_SIZECHANGE
- _nc_update_screensize(SP);
+ _nc_update_screensize(SP_PARM);
#endif
result = OK;
@@ -95,3 +109,11 @@ restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
}
returnCode(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
+{
+ return NCURSES_SP_NAME(restartterm) (CURRENT_SCREEN, termp, filenum, errret);
+}
+#endif
diff --git a/ncurses/base/lib_scanw.c b/ncurses/base/lib_scanw.c
index b8a5a227a1a9..a8621e63e172 100644
--- a/ncurses/base/lib_scanw.c
+++ b/ncurses/base/lib_scanw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2001,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,7 +40,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scanw.c,v 1.11 2001/06/30 23:39:41 tom Exp $")
+MODULE_ID("$Id: lib_scanw.c,v 1.12 2009/10/24 22:35:14 tom Exp $")
NCURSES_EXPORT(int)
vwscanw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp)
@@ -73,7 +73,7 @@ wscanw(WINDOW *win, NCURSES_CONST char *fmt,...)
int code;
va_list ap;
- T(("wscanw(%p,\"%s\",...) called", win, fmt));
+ T(("wscanw(%p,\"%s\",...) called", (void *) win, fmt));
va_start(ap, fmt);
code = vwscanw(win, fmt, ap);
diff --git a/ncurses/base/lib_screen.c b/ncurses/base/lib_screen.c
index 4aa58ea2a19c..27212b790611 100644
--- a/ncurses/base/lib_screen.c
+++ b/ncurses/base/lib_screen.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,35 +30,45 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996 on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_screen.c,v 1.31 2008/08/16 19:05:37 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_screen.c,v 1.38 2009/10/24 22:08:55 tom Exp $")
#define MAX_SIZE 0x3fff /* 16k is big enough for a window or pad */
NCURSES_EXPORT(WINDOW *)
-getwin(FILE *filep)
+NCURSES_SP_NAME(getwin) (NCURSES_SP_DCLx FILE *filep)
{
WINDOW tmp, *nwin;
int n;
- T((T_CALLED("getwin(%p)"), filep));
+ T((T_CALLED("getwin(%p)"), (void *) filep));
clearerr(filep);
- (void) fread(&tmp, sizeof(WINDOW), 1, filep);
- if (ferror(filep)
+ if (fread(&tmp, 1, sizeof(WINDOW), filep) < sizeof(WINDOW)
+ || ferror(filep)
|| tmp._maxy == 0
|| tmp._maxy > MAX_SIZE
|| tmp._maxx == 0
- || tmp._maxx > MAX_SIZE)
+ || tmp._maxx > MAX_SIZE) {
returnWin(0);
+ }
if (tmp._flags & _ISPAD) {
- nwin = newpad(tmp._maxy + 1, tmp._maxx + 1);
+ nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx
+ tmp._maxy + 1,
+ tmp._maxx + 1);
} else {
- nwin = newwin(tmp._maxy + 1, tmp._maxx + 1, 0, 0);
+ nwin = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
+ tmp._maxy + 1,
+ tmp._maxx + 1, 0, 0);
}
/*
@@ -67,6 +77,8 @@ getwin(FILE *filep)
* made sense is probably gone.
*/
if (nwin != 0) {
+ size_t linesize = sizeof(NCURSES_CH_T) * (size_t) (tmp._maxx + 1);
+
nwin->_curx = tmp._curx;
nwin->_cury = tmp._cury;
nwin->_maxy = tmp._maxy;
@@ -98,11 +110,8 @@ getwin(FILE *filep)
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)) {
+ if (fread(nwin->_line[n].text, 1, linesize, filep) < linesize
+ || ferror(filep)) {
delwin(nwin);
returnWin(0);
}
@@ -112,13 +121,21 @@ getwin(FILE *filep)
returnWin(nwin);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(WINDOW *)
+getwin(FILE *filep)
+{
+ return NCURSES_SP_NAME(getwin) (CURRENT_SCREEN, filep);
+}
+#endif
+
NCURSES_EXPORT(int)
putwin(WINDOW *win, FILE *filep)
{
int code = ERR;
int n;
- T((T_CALLED("putwin(%p,%p)"), win, filep));
+ T((T_CALLED("putwin(%p,%p)"), (void *) win, (void *) filep));
if (win != 0) {
size_t len = (size_t) (win->_maxx + 1);
@@ -141,26 +158,34 @@ putwin(WINDOW *win, FILE *filep)
}
NCURSES_EXPORT(int)
-scr_restore(const char *file)
+NCURSES_SP_NAME(scr_restore) (NCURSES_SP_DCLx const char *file)
{
FILE *fp = 0;
- T((T_CALLED("scr_restore(%s)"), _nc_visbuf(file)));
+ T((T_CALLED("scr_restore(%p,%s)"), (void *) SP_PARM, _nc_visbuf(file)));
if (_nc_access(file, R_OK) < 0
|| (fp = fopen(file, "rb")) == 0) {
returnCode(ERR);
} else {
- delwin(newscr);
- SP->_newscr = getwin(fp);
+ delwin(NewScreen(SP_PARM));
+ NewScreen(SP_PARM) = getwin(fp);
#if !USE_REENTRANT
- newscr = SP->_newscr;
+ newscr = NewScreen(SP_PARM);
#endif
(void) fclose(fp);
returnCode(OK);
}
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+scr_restore(const char *file)
+{
+ return NCURSES_SP_NAME(scr_restore) (CURRENT_SCREEN, file);
+}
+#endif
+
NCURSES_EXPORT(int)
scr_dump(const char *file)
{
@@ -179,42 +204,63 @@ scr_dump(const char *file)
}
NCURSES_EXPORT(int)
-scr_init(const char *file)
+NCURSES_SP_NAME(scr_init) (NCURSES_SP_DCLx const char *file)
{
FILE *fp = 0;
+ int code = ERR;
- T((T_CALLED("scr_init(%s)"), _nc_visbuf(file)));
-
- if (exit_ca_mode && non_rev_rmcup)
- returnCode(ERR);
+ T((T_CALLED("scr_init(%p,%s)"), (void *) SP_PARM, _nc_visbuf(file)));
- if (_nc_access(file, R_OK) < 0
- || (fp = fopen(file, "rb")) == 0) {
- returnCode(ERR);
- } else {
- delwin(curscr);
- SP->_curscr = getwin(fp);
+ if (SP_PARM != 0 &&
+#ifdef USE_TERM_DRIVER
+ InfoOf(SP_PARM).caninit
+#else
+ !(exit_ca_mode && non_rev_rmcup)
+#endif
+ ) {
+ if (_nc_access(file, R_OK) >= 0
+ && (fp = fopen(file, "rb")) != 0) {
+ delwin(CurScreen(SP_PARM));
+ CurScreen(SP_PARM) = getwin(fp);
#if !USE_REENTRANT
- curscr = SP->_curscr;
+ curscr = CurScreen(SP_PARM);
#endif
- (void) fclose(fp);
- returnCode(OK);
+ (void) fclose(fp);
+ code = OK;
+ }
}
+ returnCode(code);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-scr_set(const char *file)
+scr_init(const char *file)
{
- T((T_CALLED("scr_set(%s)"), _nc_visbuf(file)));
+ return NCURSES_SP_NAME(scr_init) (CURRENT_SCREEN, file);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(scr_set) (NCURSES_SP_DCLx const char *file)
+{
+ T((T_CALLED("scr_set(%p,%s)"), (void *) SP_PARM, _nc_visbuf(file)));
- if (scr_init(file) == ERR) {
+ if (NCURSES_SP_NAME(scr_init) (NCURSES_SP_ARGx file) == ERR) {
returnCode(ERR);
} else {
- delwin(newscr);
- SP->_newscr = dupwin(curscr);
+ delwin(NewScreen(SP_PARM));
+ NewScreen(SP_PARM) = dupwin(curscr);
#if !USE_REENTRANT
- newscr = SP->_newscr;
+ newscr = NewScreen(SP_PARM);
#endif
returnCode(OK);
}
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+scr_set(const char *file)
+{
+ return NCURSES_SP_NAME(scr_set) (CURRENT_SCREEN, file);
+}
+#endif
diff --git a/ncurses/base/lib_scroll.c b/ncurses/base/lib_scroll.c
index ac85bd55ea1d..fe4e80804dae 100644
--- a/ncurses/base/lib_scroll.c
+++ b/ncurses/base/lib_scroll.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -43,7 +43,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scroll.c,v 1.26 2006/10/14 20:46:08 tom Exp $")
+MODULE_ID("$Id: lib_scroll.c,v 1.28 2010/12/19 01:48:09 tom Exp $")
NCURSES_EXPORT(void)
_nc_scroll_window(WINDOW *win,
@@ -55,10 +55,10 @@ _nc_scroll_window(WINDOW *win,
int limit;
int line;
int j;
- size_t to_copy = (size_t) (sizeof(NCURSES_CH_T) * (win->_maxx + 1));
+ size_t to_copy = (sizeof(NCURSES_CH_T) * (size_t) (win->_maxx + 1));
TR(TRACE_MOVE, ("_nc_scroll_window(%p, %d, %ld, %ld)",
- win, n, (long) top, (long) bottom));
+ (void *) win, n, (long) top, (long) bottom));
if (top < 0
|| bottom < top
@@ -135,7 +135,7 @@ _nc_scroll_window(WINDOW *win,
NCURSES_EXPORT(int)
wscrl(WINDOW *win, int n)
{
- T((T_CALLED("wscrl(%p,%d)"), win, n));
+ T((T_CALLED("wscrl(%p,%d)"), (void *) win, n));
if (!win || !win->_scroll) {
TR(TRACE_MOVE, ("...scrollok is false"));
diff --git a/ncurses/base/lib_scrollok.c b/ncurses/base/lib_scrollok.c
index f6b30259be73..6a698a368da2 100644
--- a/ncurses/base/lib_scrollok.c
+++ b/ncurses/base/lib_scrollok.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,12 +40,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scrollok.c,v 1.4 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_scrollok.c,v 1.5 2009/10/24 22:35:38 tom Exp $")
NCURSES_EXPORT(int)
scrollok(WINDOW *win, bool flag)
{
- T((T_CALLED("scrollok(%p,%d)"), win, flag));
+ T((T_CALLED("scrollok(%p,%d)"), (void *) win, flag));
if (win) {
win->_scroll = flag;
diff --git a/ncurses/base/lib_scrreg.c b/ncurses/base/lib_scrreg.c
index c85d60f1164d..546fbc183a3c 100644
--- a/ncurses/base/lib_scrreg.c
+++ b/ncurses/base/lib_scrreg.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,12 +40,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scrreg.c,v 1.10 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_scrreg.c,v 1.11 2009/10/24 22:35:28 tom Exp $")
NCURSES_EXPORT(int)
wsetscrreg(WINDOW *win, int top, int bottom)
{
- T((T_CALLED("wsetscrreg(%p,%d,%d)"), win, top, bottom));
+ T((T_CALLED("wsetscrreg(%p,%d,%d)"), (void *) win, top, bottom));
if (win &&
top >= 0 && top <= win->_maxy &&
diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c
index aff432bb9fd1..df0a276aef8a 100644
--- a/ncurses/base/lib_set_term.c
+++ b/ncurses/base/lib_set_term.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -40,11 +41,21 @@
*/
#include <curses.priv.h>
-
-#include <term.h> /* cur_term */
#include <tic.h>
-MODULE_ID("$Id: lib_set_term.c,v 1.117 2008/08/04 18:11:12 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_set_term.c,v 1.138 2010/12/20 00:42:20 tom Exp $")
+
+#ifdef USE_TERM_DRIVER
+#define MaxColors InfoOf(sp).maxcolors
+#define NumLabels InfoOf(sp).numlabels
+#else
+#define MaxColors max_colors
+#define NumLabels num_labels
+#endif
NCURSES_EXPORT(SCREEN *)
set_term(SCREEN *screenp)
@@ -52,25 +63,25 @@ set_term(SCREEN *screenp)
SCREEN *oldSP;
SCREEN *newSP;
- T((T_CALLED("set_term(%p)"), screenp));
+ T((T_CALLED("set_term(%p)"), (void *) screenp));
_nc_lock_global(curses);
- oldSP = SP;
+ oldSP = CURRENT_SCREEN;
_nc_set_screen(screenp);
- newSP = SP;
+ newSP = screenp;
if (newSP != 0) {
- set_curterm(newSP->_term);
+ TINFO_SET_CURTERM(newSP, newSP->_term);
#if !USE_REENTRANT
- curscr = newSP->_curscr;
- newscr = newSP->_newscr;
- stdscr = newSP->_stdscr;
+ curscr = CurScreen(newSP);
+ newscr = NewScreen(newSP);
+ stdscr = StdScreen(newSP);
COLORS = newSP->_color_count;
COLOR_PAIRS = newSP->_pair_count;
#endif
} else {
- set_curterm(0);
+ TINFO_SET_CURTERM(oldSP, 0);
#if !USE_REENTRANT
curscr = 0;
newscr = 0;
@@ -82,7 +93,7 @@ set_term(SCREEN *screenp)
_nc_unlock_global(curses);
- T((T_RETURN("%p"), oldSP));
+ T((T_RETURN("%p"), (void *) oldSP));
return (oldSP);
}
@@ -106,7 +117,7 @@ delink_screen(SCREEN *sp)
for (each_screen(temp)) {
if (temp == sp) {
if (last)
- last = sp->_next_screen;
+ last->_next_screen = sp->_next_screen;
else
_nc_screen_chain = sp->_next_screen;
result = TRUE;
@@ -125,14 +136,27 @@ delscreen(SCREEN *sp)
{
int i;
- T((T_CALLED("delscreen(%p)"), sp));
+ T((T_CALLED("delscreen(%p)"), (void *) sp));
_nc_lock_global(curses);
if (delink_screen(sp)) {
+#ifdef USE_SP_RIPOFF
+ ripoff_t *rop;
+ if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) {
+ for (rop = safe_ripoff_stack;
+ rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS;
+ rop++) {
+ if (rop->win) {
+ (void) delwin(rop->win);
+ rop->win = 0;
+ }
+ }
+ }
+#endif
- (void) _nc_freewin(sp->_curscr);
- (void) _nc_freewin(sp->_newscr);
- (void) _nc_freewin(sp->_stdscr);
+ (void) _nc_freewin(CurScreen(sp));
+ (void) _nc_freewin(NewScreen(sp));
+ (void) _nc_freewin(StdScreen(sp));
if (sp->_slk != 0) {
if (sp->_slk->ent != 0) {
@@ -176,7 +200,7 @@ delscreen(SCREEN *sp)
free(sp->_setbuf);
}
- del_curterm(sp->_term);
+ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx sp->_term);
free(sp);
/*
@@ -184,7 +208,7 @@ delscreen(SCREEN *sp)
* application might try to use (except cur_term, which may have
* multiple references in different screens).
*/
- if (sp == SP) {
+ if (sp == CURRENT_SCREEN) {
#if !USE_REENTRANT
curscr = 0;
newscr = 0;
@@ -248,50 +272,98 @@ extract_fgbg(char *src, int *result)
}
#endif
+#define ReturnScreenError() _nc_set_screen(0); \
+ returnCode(ERR)
+
/* OS-independent screen initializations */
NCURSES_EXPORT(int)
-_nc_setupscreen(int slines GCC_UNUSED,
- int scolumns GCC_UNUSED,
- FILE *output,
- bool filtered,
- int slk_format)
+NCURSES_SP_NAME(_nc_setupscreen) (
+#if NCURSES_SP_FUNCS
+ SCREEN **spp,
+#endif
+ int slines,
+ int scolumns,
+ FILE *output,
+ bool filtered,
+ int slk_format)
{
char *env;
int bottom_stolen = 0;
- bool support_cookies = USE_XMC_SUPPORT;
ripoff_t *rop;
+ SCREEN *sp;
+#ifndef USE_TERM_DRIVER
+ bool support_cookies = USE_XMC_SUPPORT;
+#endif
T((T_CALLED("_nc_setupscreen(%d, %d, %p, %d, %d)"),
- slines, scolumns, output, filtered, slk_format));
+ slines, scolumns, (void *) output, filtered, slk_format));
+
+ assert(CURRENT_SCREEN == 0); /* has been reset in newterm() ! */
+
+#if NCURSES_SP_FUNCS
+ assert(spp != 0);
+ sp = *spp;
- assert(SP == 0); /* has been reset in newterm() ! */
+ if (!sp) {
+ sp = _nc_alloc_screen_sp();
+ *spp = sp;
+ }
+ if (!sp
+ || ((sp->_acs_map = typeCalloc(chtype, ACS_LEN)) == 0)
+ || ((sp->_screen_acs_map = typeCalloc(bool, ACS_LEN)) == 0)) {
+ ReturnScreenError();
+ }
+
+ T(("created SP %p", (void *) sp));
+ sp->_next_screen = _nc_screen_chain;
+ _nc_screen_chain = sp;
+
+ if ((sp->_current_attr = typeCalloc(NCURSES_CH_T, 1)) == 0) {
+ ReturnScreenError();
+ }
+#else
if (!_nc_alloc_screen()
|| ((SP->_acs_map = typeCalloc(chtype, ACS_LEN)) == 0)
|| ((SP->_screen_acs_map = typeCalloc(bool, ACS_LEN)) == 0)) {
returnCode(ERR);
}
- T(("created SP %p", SP));
- SP->_next_screen = _nc_screen_chain;
- _nc_screen_chain = SP;
+ T(("created SP %p", (void *) SP));
- if ((SP->_current_attr = typeCalloc(NCURSES_CH_T, 1)) == 0)
+ sp = SP; /* fixup so SET_LINES and SET_COLS works */
+ sp->_next_screen = _nc_screen_chain;
+ _nc_screen_chain = sp;
+
+ if ((sp->_current_attr = typeCalloc(NCURSES_CH_T, 1)) == 0)
returnCode(ERR);
+#endif
/*
* We should always check the screensize, just in case.
*/
- _nc_get_screensize(SP, &slines, &scolumns);
+ _nc_set_screen(sp);
+ sp->_term = cur_term;
+#ifdef USE_TERM_DRIVER
+ TCBOf(sp)->csp = sp;
+ _nc_get_screensize(sp, sp->_term, &slines, &scolumns);
+#else
+ _nc_get_screensize(sp, &slines, &scolumns);
+#endif
SET_LINES(slines);
SET_COLS(scolumns);
- T((T_CREATE("screen %s %dx%d"), termname(), LINES, COLS));
- SP->_filtered = filtered;
+ T((T_CREATE("screen %s %dx%d"),
+ NCURSES_SP_NAME(termname) (NCURSES_SP_ARG), slines, scolumns));
+
+ sp->_filtered = filtered;
/* implement filter mode */
if (filtered) {
slines = 1;
SET_LINES(slines);
+#ifdef USE_TERM_DRIVER
+ CallDriver(sp, setfilter);
+#else
clear_screen = 0;
cursor_down = parm_down_cursor = 0;
cursor_address = 0;
@@ -299,34 +371,25 @@ _nc_setupscreen(int slines GCC_UNUSED,
row_address = 0;
cursor_home = carriage_return;
- T(("filter screensize %dx%d", LINES, COLS));
+#endif
+ T(("filter screensize %dx%d", slines, scolumns));
}
#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 */
-
- SetNoPadding(SP);
+ NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_ARGx output, TRUE);
+ sp->_lines = (NCURSES_SIZE_T) slines;
+ sp->_lines_avail = (NCURSES_SIZE_T) slines;
+ sp->_columns = (NCURSES_SIZE_T) scolumns;
+ sp->_ofp = output;
+ SP_PRE_INIT(sp);
+ SetNoPadding(sp);
#if NCURSES_EXT_FUNCS
- SP->_default_color = FALSE;
- SP->_has_sgr_39_49 = FALSE;
+ sp->_default_color = FALSE;
+ sp->_has_sgr_39_49 = FALSE;
/*
* Set our assumption of the terminal's default foreground and background
@@ -348,11 +411,11 @@ _nc_setupscreen(int slines GCC_UNUSED,
* 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;
+ sp->_default_fg = COLOR_WHITE;
+ sp->_default_bg = COLOR_BLACK;
#else
- SP->_default_fg = C_MASK;
- SP->_default_bg = C_MASK;
+ sp->_default_fg = C_MASK;
+ sp->_default_bg = C_MASK;
#endif
/*
@@ -364,14 +427,14 @@ _nc_setupscreen(int slines GCC_UNUSED,
char sep1, sep2;
int count = sscanf(env, "%d%c%d%c", &fg, &sep1, &bg, &sep2);
if (count >= 1) {
- SP->_default_fg = (fg >= 0 && fg < max_colors) ? fg : C_MASK;
+ sp->_default_fg = ((fg >= 0 && fg < MaxColors) ? fg : C_MASK);
if (count >= 3) {
- SP->_default_bg = (bg >= 0 && bg < max_colors) ? bg : C_MASK;
+ sp->_default_bg = ((bg >= 0 && bg < MaxColors) ? bg : C_MASK);
}
TR(TRACE_CHARPUT | TRACE_MOVE,
("from environment assumed fg=%d, bg=%d",
- SP->_default_fg,
- SP->_default_bg));
+ sp->_default_fg,
+ sp->_default_bg));
}
}
#if USE_COLORFGBG
@@ -384,48 +447,51 @@ _nc_setupscreen(int slines GCC_UNUSED,
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));
+ 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));
+ 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) {
+ sp->_default_fg, sp->_default_bg));
+ if (sp->_default_fg >= MaxColors) {
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;
+ sp->_default_fg %= MaxColors;
}
}
- if (SP->_default_bg >= max_colors) {
+ if (sp->_default_bg >= MaxColors) {
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;
+ sp->_default_bg %= MaxColors;
}
}
}
#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;
+ 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;
/*
* 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.
*/
- SP->_ok_attributes = termattrs();
- if (has_colors()) {
- SP->_ok_attributes |= A_COLOR;
+ sp->_ok_attributes = NCURSES_SP_NAME(termattrs) (NCURSES_SP_ARG);
+ if (NCURSES_SP_NAME(has_colors) (NCURSES_SP_ARG)) {
+ sp->_ok_attributes |= A_COLOR;
}
+#ifdef USE_TERM_DRIVER
+ _nc_cookie_init(sp);
+#else
#if USE_XMC_SUPPORT
/*
* If we have no magic-cookie support compiled-in, or if it is suppressed
@@ -444,7 +510,7 @@ _nc_setupscreen(int slines GCC_UNUSED,
if (magic_cookie_glitch > 0) { /* tvi, wyse */
- SP->_xmc_triggers = SP->_ok_attributes & (
+ sp->_xmc_triggers = sp->_ok_attributes & (
A_STANDOUT |
A_UNDERLINE |
A_REVERSE |
@@ -461,12 +527,12 @@ _nc_setupscreen(int slines GCC_UNUSED,
* cookies.
*/
if (has_colors()) {
- SP->_xmc_triggers |= A_COLOR;
+ sp->_xmc_triggers |= A_COLOR;
}
#endif
- SP->_xmc_suppress = SP->_xmc_triggers & (chtype) ~(A_BOLD);
+ sp->_xmc_suppress = sp->_xmc_triggers & (chtype) ~(A_BOLD);
- T(("magic cookie attributes %s", _traceattr(SP->_xmc_suppress)));
+ T(("magic cookie attributes %s", _traceattr(sp->_xmc_suppress)));
/*
* Supporting line-drawing may be possible. But make the regular
* video attributes work first.
@@ -506,7 +572,7 @@ _nc_setupscreen(int slines GCC_UNUSED,
/* initialize normal acs before wide, since we use mapping in the latter */
#if !USE_WIDEC_SUPPORT
- if (_nc_unicode_locale() && _nc_locale_breaks_acs(cur_term)) {
+ if (_nc_unicode_locale() && _nc_locale_breaks_acs(sp->_term)) {
acs_chars = NULL;
ena_acs = NULL;
enter_alt_charset_mode = NULL;
@@ -514,134 +580,194 @@ _nc_setupscreen(int slines GCC_UNUSED,
set_attributes = NULL;
}
#endif
- _nc_init_acs();
+#endif
+
+ NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_ARG);
#if USE_WIDEC_SUPPORT
_nc_init_wacs();
- SP->_screen_acs_fix = (_nc_unicode_locale()
- && _nc_locale_breaks_acs(cur_term));
+ sp->_screen_acs_fix = (_nc_unicode_locale()
+ && _nc_locale_breaks_acs(sp->_term));
#endif
env = _nc_get_locale();
- SP->_legacy_coding = ((env == 0)
+ sp->_legacy_coding = ((env == 0)
|| !strcmp(env, "C")
|| !strcmp(env, "POSIX"));
- T(("legacy-coding %d", SP->_legacy_coding));
+ T(("legacy-coding %d", sp->_legacy_coding));
- _nc_idcok = TRUE;
- _nc_idlok = FALSE;
+ sp->_nc_sp_idcok = TRUE;
+ sp->_nc_sp_idlok = FALSE;
- SP->oldhash = 0;
- SP->newhash = 0;
+ sp->oldhash = 0;
+ sp->newhash = 0;
T(("creating newscr"));
- if ((SP->_newscr = newwin(slines, scolumns, 0, 0)) == 0)
- returnCode(ERR);
-
+ NewScreen(sp) = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx slines, scolumns,
+ 0, 0);
+ if (NewScreen(sp) == 0) {
+ ReturnScreenError();
+ }
T(("creating curscr"));
- if ((SP->_curscr = newwin(slines, scolumns, 0, 0)) == 0)
- returnCode(ERR);
-
+ CurScreen(sp) = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx slines, scolumns,
+ 0, 0);
+ if (CurScreen(sp) == 0) {
+ ReturnScreenError();
+ }
#if !USE_REENTRANT
- newscr = SP->_newscr;
- curscr = SP->_curscr;
+ newscr = NewScreen(sp);
+ curscr = CurScreen(sp);
#endif
#if USE_SIZECHANGE
- SP->_resize = resizeterm;
+ sp->_resize = NCURSES_SP_NAME(resizeterm);
#endif
- newscr->_clear = TRUE;
- curscr->_clear = FALSE;
-
- def_shell_mode();
- def_prog_mode();
-
- for (rop = ripoff_stack;
- rop != ripoff_sp && (rop - ripoff_stack) < N_RIPS;
- rop++) {
-
- /* 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 (rop->hook == _nc_slk_initialize)
- if (!(num_labels <= 0 || !SLK_STDFMT(slk_format)))
- continue;
- if (rop->hook) {
- int count;
- WINDOW *w;
-
- count = (rop->line < 0) ? -rop->line : rop->line;
- T(("ripping off %i lines at %s", count,
- ((rop->line < 0)
- ? "bottom"
- : "top")));
-
- w = newwin(count, scolumns,
- ((rop->line < 0)
- ? SP->_lines_avail - count
- : 0),
- 0);
- if (w) {
- rop->win = w;
- rop->hook(w, scolumns);
- } else {
- returnCode(ERR);
+ NewScreen(sp)->_clear = TRUE;
+ CurScreen(sp)->_clear = FALSE;
+
+ NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
+
+ if (safe_ripoff_sp && safe_ripoff_sp != safe_ripoff_stack) {
+ for (rop = safe_ripoff_stack;
+ rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS;
+ rop++) {
+
+ /* 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 (rop->hook == _nc_slk_initialize) {
+ if (!(NumLabels <= 0 || !SLK_STDFMT(slk_format))) {
+ continue;
+ }
+ }
+ if (rop->hook) {
+ int count;
+ WINDOW *w;
+
+ count = (rop->line < 0) ? -rop->line : rop->line;
+ T(("ripping off %i lines at %s", count,
+ ((rop->line < 0)
+ ? "bottom"
+ : "top")));
+
+ w = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
+ count, scolumns,
+ ((rop->line < 0)
+ ? sp->_lines_avail - count
+ : 0),
+ 0);
+ if (w) {
+ rop->win = w;
+ rop->hook(w, scolumns);
+ } else {
+ ReturnScreenError();
+ }
+ if (rop->line < 0) {
+ bottom_stolen += count;
+ } else {
+ sp->_topstolen = (NCURSES_SIZE_T) (sp->_topstolen + count);
+ }
+ sp->_lines_avail = (NCURSES_SIZE_T) (sp->_lines_avail - count);
}
- if (rop->line < 0)
- bottom_stolen += count;
- else
- SP->_topstolen += count;
- SP->_lines_avail -= count;
}
+ /* reset the stack */
+ safe_ripoff_sp = safe_ripoff_stack;
}
- /* reset the stack */
- ripoff_sp = ripoff_stack;
T(("creating stdscr"));
- assert((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines);
- if ((SP->_stdscr = newwin(SP->_lines_avail, scolumns, 0, 0)) == 0)
- returnCode(ERR);
-
- SET_LINES(SP->_lines_avail);
+ assert((sp->_lines_avail + sp->_topstolen + bottom_stolen) == slines);
+ if ((StdScreen(sp) = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
+ sp->_lines_avail,
+ scolumns, 0, 0)) == 0) {
+ ReturnScreenError();
+ }
+ SET_LINES(sp->_lines_avail);
#if !USE_REENTRANT
- stdscr = SP->_stdscr;
+ stdscr = StdScreen(sp);
#endif
-
+ sp->_prescreen = FALSE;
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_setupscreen(int slines GCC_UNUSED,
+ int scolumns GCC_UNUSED,
+ FILE *output,
+ bool filtered,
+ int slk_format)
+{
+ SCREEN *sp = 0;
+ int rc = NCURSES_SP_NAME(_nc_setupscreen) (&sp,
+ slines,
+ scolumns,
+ output,
+ filtered,
+ slk_format);
+ if (rc != OK)
+ _nc_set_screen(0);
+ return rc;
+}
+#endif
+
/*
* 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))
+NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_DCLx
+ int line,
+ int (*init) (WINDOW *, int))
{
- T((T_CALLED("_nc_ripoffline(%d, %p)"), line, init));
+ int code = ERR;
- if (line != 0) {
-
- if (ripoff_sp == 0)
- ripoff_sp = ripoff_stack;
- if (ripoff_sp >= ripoff_stack + N_RIPS)
- returnCode(ERR);
+ START_TRACE();
+ T((T_CALLED("ripoffline(%p,%d,%p)"), (void *) SP_PARM, line, init));
- ripoff_sp->line = line;
- ripoff_sp->hook = init;
- ripoff_sp++;
+#if NCURSES_SP_FUNCS
+ if (SP_PARM != 0 && SP_PARM->_prescreen)
+#endif
+ {
+ if (line == 0) {
+ code = OK;
+ } else {
+ if (safe_ripoff_sp == 0)
+ safe_ripoff_sp = safe_ripoff_stack;
+ if (safe_ripoff_sp < safe_ripoff_stack + N_RIPS) {
+ safe_ripoff_sp->line = line;
+ safe_ripoff_sp->hook = init;
+ (safe_ripoff_sp)++;
+ code = OK;
+ }
+ }
}
- returnCode(OK);
+ returnCode(code);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-ripoffline(int line, int (*init) (WINDOW *, int))
+_nc_ripoffline(int line, int (*init) (WINDOW *, int))
{
- START_TRACE();
- T((T_CALLED("ripoffline(%d,%p)"), line, init));
+ return NCURSES_SP_NAME(_nc_ripoffline) (CURRENT_SCREEN_PRE, line, init);
+}
+#endif
- if (line == 0)
- returnCode(OK);
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(ripoffline) (NCURSES_SP_DCLx
+ int line,
+ int (*init) (WINDOW *, int))
+{
+ return NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
+ (line < 0) ? -1 : 1,
+ init);
+}
- returnCode(_nc_ripoffline((line < 0) ? -1 : 1, init));
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+ripoffline(int line, int (*init) (WINDOW *, int))
+{
+ return NCURSES_SP_NAME(ripoffline) (CURRENT_SCREEN_PRE, line, init);
}
+#endif
diff --git a/ncurses/base/lib_slk.c b/ncurses/base/lib_slk.c
index 662f7e45b116..84f17ae03705 100644
--- a/ncurses/base/lib_slk.c
+++ b/ncurses/base/lib_slk.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,26 +41,94 @@
*/
#include <curses.priv.h>
-
#include <ctype.h>
-#include <term.h> /* num_labels, label_*, plab_norm */
-MODULE_ID("$Id: lib_slk.c,v 1.35 2008/09/27 14:07:33 juergen Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_slk.c,v 1.48 2011/03/05 21:21:52 tom Exp $")
+
+#ifdef USE_TERM_DRIVER
+#define NumLabels InfoOf(SP_PARM).numlabels
+#define NoColorVideo InfoOf(SP_PARM).nocolorvideo
+#define LabelWidth InfoOf(SP_PARM).labelwidth
+#define LabelHeight InfoOf(SP_PARM).labelheight
+#else
+#define NumLabels num_labels
+#define NoColorVideo no_color_video
+#define LabelWidth label_width
+#define LabelHeight label_height
+#endif
/*
* Free any memory related to soft labels, return an error.
*/
static int
-slk_failed(void)
+slk_failed(NCURSES_SP_DCL0)
{
- if (SP->_slk) {
- FreeIfNeeded(SP->_slk->ent);
- free(SP->_slk);
- SP->_slk = (SLK *) 0;
+ if ((0 != SP_PARM) && SP_PARM->_slk) {
+ FreeIfNeeded(SP_PARM->_slk->ent);
+ free(SP_PARM->_slk);
+ SP_PARM->_slk = (SLK *) 0;
}
return ERR;
}
+NCURSES_EXPORT(int)
+_nc_format_slks(NCURSES_SP_DCLx int cols)
+{
+ int gap, i, x;
+ int max_length;
+
+ if (!SP_PARM || !SP_PARM->_slk)
+ return ERR;
+
+ max_length = SP_PARM->_slk->maxlen;
+ if (SP_PARM->slk_format >= 3) { /* PC style */
+ gap = (cols - 3 * (3 + 4 * max_length)) / 2;
+
+ if (gap < 1)
+ gap = 1;
+
+ for (i = x = 0; i < SP_PARM->_slk->maxlab; i++) {
+ SP_PARM->_slk->ent[i].ent_x = x;
+ x += max_length;
+ x += (i == 3 || i == 7) ? gap : 1;
+ }
+ } else {
+ if (SP_PARM->slk_format == 2) { /* 4-4 */
+ gap = cols - (int) (SP_PARM->_slk->maxlab * max_length) - 6;
+
+ if (gap < 1)
+ gap = 1;
+ for (i = x = 0; i < SP_PARM->_slk->maxlab; i++) {
+ SP_PARM->_slk->ent[i].ent_x = x;
+ x += max_length;
+ x += (i == 3) ? gap : 1;
+ }
+ } else {
+ if (SP_PARM->slk_format == 1) { /* 1 -> 3-2-3 */
+ gap = (cols - (SP_PARM->_slk->maxlab * max_length) - 5)
+ / 2;
+
+ if (gap < 1)
+ gap = 1;
+ for (i = x = 0; i < SP_PARM->_slk->maxlab; i++) {
+ SP_PARM->_slk->ent[i].ent_x = x;
+ x += max_length;
+ x += (i == 2 || i == 4) ? gap : 1;
+ }
+ } else {
+ return slk_failed(NCURSES_SP_ARG);
+ }
+ }
+ }
+ SP_PARM->_slk->dirty = TRUE;
+
+ return OK;
+}
+
/*
* Initialize soft labels.
* Called from newterm()
@@ -68,108 +136,90 @@ slk_failed(void)
NCURSES_EXPORT(int)
_nc_slk_initialize(WINDOW *stwin, int cols)
{
- int i, x;
+ int i;
int res = OK;
- unsigned max_length;
+ size_t max_length;
+ SCREEN *sp;
+ int numlab;
T((T_CALLED("_nc_slk_initialize()")));
- if (SP->_slk) { /* we did this already, so simply return */
+ assert(stwin);
+
+ sp = _nc_screen_of(stwin);
+ if (0 == sp)
+ returnCode(ERR);
+
+ assert(TerminalOf(SP_PARM));
+
+ numlab = NumLabels;
+
+ if (SP_PARM->_slk) { /* we did this already, so simply return */
returnCode(OK);
- } else if ((SP->_slk = typeCalloc(SLK, 1)) == 0)
+ } else if ((SP_PARM->_slk = typeCalloc(SLK, 1)) == 0)
returnCode(ERR);
- SP->_slk->ent = NULL;
+ if (!SP_PARM->slk_format)
+ SP_PARM->slk_format = _nc_globals.slk_format;
/*
* 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)
- SetAttr(SP->_slk->attr, A_STANDOUT);
+ if ((NoColorVideo & 1) == 0)
+ SetAttr(SP_PARM->_slk->attr, A_STANDOUT);
else
- SetAttr(SP->_slk->attr, A_REVERSE);
-
- SP->_slk->maxlab = ((num_labels > 0)
- ? num_labels
- : MAX_SKEY(_nc_globals.slk_format));
- SP->_slk->maxlen = ((num_labels > 0)
- ? label_width * label_height
- : MAX_SKEY_LEN(_nc_globals.slk_format));
- SP->_slk->labcnt = ((SP->_slk->maxlab < MAX_SKEY(_nc_globals.slk_format))
- ? MAX_SKEY(_nc_globals.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++) {
+ SetAttr(SP_PARM->_slk->attr, A_REVERSE);
+
+ SP_PARM->_slk->maxlab = (short) ((numlab > 0)
+ ? numlab
+ : MAX_SKEY(SP_PARM->slk_format));
+ SP_PARM->_slk->maxlen = (short) ((numlab > 0)
+ ? LabelWidth * LabelHeight
+ : MAX_SKEY_LEN(SP_PARM->slk_format));
+ SP_PARM->_slk->labcnt = (short) ((SP_PARM->_slk->maxlab < MAX_SKEY(SP_PARM->slk_format))
+ ? MAX_SKEY(SP_PARM->slk_format)
+ : SP_PARM->_slk->maxlab);
+
+ if (SP_PARM->_slk->maxlen <= 0
+ || SP_PARM->_slk->labcnt <= 0
+ || (SP_PARM->_slk->ent = typeCalloc(slk_ent,
+ (size_t) SP_PARM->_slk->labcnt))
+ == NULL)
+ returnCode(slk_failed(NCURSES_SP_ARG));
+
+ max_length = (size_t) SP_PARM->_slk->maxlen;
+ for (i = 0; i < SP_PARM->_slk->labcnt; i++) {
size_t used = max_length + 1;
- if ((SP->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used)) == 0)
- returnCode(slk_failed());
- memset(SP->_slk->ent[i].ent_text, 0, used);
-
- if ((SP->_slk->ent[i].form_text = (char *) _nc_doalloc(0, used)) == 0)
- returnCode(slk_failed());
- memset(SP->_slk->ent[i].form_text, 0, used);
+ SP_PARM->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used);
+ if (SP_PARM->_slk->ent[i].ent_text == 0)
+ returnCode(slk_failed(NCURSES_SP_ARG));
+ memset(SP_PARM->_slk->ent[i].ent_text, 0, used);
- memset(SP->_slk->ent[i].form_text, ' ', max_length);
- SP->_slk->ent[i].visible = (char) (i < SP->_slk->maxlab);
- }
- if (_nc_globals.slk_format >= 3) { /* PC style */
- int gap = (cols - 3 * (3 + 4 * max_length)) / 2;
-
- if (gap < 1)
- gap = 1;
+ SP_PARM->_slk->ent[i].form_text = (char *) _nc_doalloc(0, used);
+ if (SP_PARM->_slk->ent[i].form_text == 0)
+ returnCode(slk_failed(NCURSES_SP_ARG));
- 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;
+ if (used > 1) {
+ memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1);
}
- } else {
- if (_nc_globals.slk_format == 2) { /* 4-4 */
- int gap = cols - (SP->_slk->maxlab * max_length) - 6;
+ SP_PARM->_slk->ent[i].form_text[used - 1] = '\0';
- 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_globals.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_PARM->_slk->ent[i].visible = (char) (i < SP_PARM->_slk->maxlab);
}
- SP->_slk->dirty = TRUE;
- if ((SP->_slk->win = stwin) == NULL) {
- returnCode(slk_failed());
+
+ res = _nc_format_slks(NCURSES_SP_ARGx cols);
+
+ if ((SP_PARM->_slk->win = stwin) == NULL) {
+ returnCode(slk_failed(NCURSES_SP_ARG));
}
/* 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_globals.slk_format;
_nc_globals.slk_format = 0;
returnCode(res);
}
@@ -178,14 +228,24 @@ _nc_slk_initialize(WINDOW *stwin, int cols)
* Restore the soft labels on the screen.
*/
NCURSES_EXPORT(int)
-slk_restore(void)
+NCURSES_SP_NAME(slk_restore) (NCURSES_SP_DCL0)
{
- T((T_CALLED("slk_restore()")));
+ T((T_CALLED("slk_restore(%p)"), (void *) SP_PARM));
+
+ if (0 == SP_PARM)
+ returnCode(ERR);
+ if (SP_PARM->_slk == NULL)
+ returnCode(ERR);
+ SP_PARM->_slk->hidden = FALSE;
+ SP_PARM->_slk->dirty = TRUE;
- if (SP->_slk == NULL)
- return (ERR);
- SP->_slk->hidden = FALSE;
- SP->_slk->dirty = TRUE;
+ returnCode(NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_ARG));
+}
- returnCode(slk_refresh());
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_restore(void)
+{
+ return NCURSES_SP_NAME(slk_restore) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/base/lib_slkatr_set.c b/ncurses/base/lib_slkatr_set.c
index f83616beaf17..bd5f539672a7 100644
--- a/ncurses/base/lib_slkatr_set.c
+++ b/ncurses/base/lib_slkatr_set.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@
/****************************************************************************
* Author: Juergen Pfeifer, 1998 *
- * and: Thomas E. Dickey 2005 *
+ * and: Thomas E. Dickey 2005-on *
****************************************************************************/
/*
@@ -38,22 +38,42 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkatr_set.c,v 1.10 2005/01/28 21:11:53 tom Exp $")
+MODULE_ID("$Id: lib_slkatr_set.c,v 1.14 2009/10/24 22:47:03 tom Exp $")
NCURSES_EXPORT(int)
-slk_attr_set(const attr_t attr, short color_pair_number, void *opts)
+NCURSES_SP_NAME(slk_attr_set) (NCURSES_SP_DCLx
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
{
- T((T_CALLED("slk_attr_set(%s,%d)"), _traceattr(attr), color_pair_number));
+ int code = ERR;
+
+ T((T_CALLED("slk_attr_set(%p,%s,%d)"),
+ (void *) SP_PARM,
+ _traceattr(attr),
+ color_pair_number));
- if (SP != 0 && SP->_slk != 0 && !opts &&
- color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
- TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP->_slk->attr))));
- SetAttr(SP->_slk->attr, attr);
+ if (SP_PARM != 0
+ && SP_PARM->_slk != 0
+ && !opts
+ && color_pair_number >= 0
+ && color_pair_number < SP_PARM->_pair_limit) {
+ TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
+ SetAttr(SP_PARM->_slk->attr, attr);
if (color_pair_number > 0) {
- SetPair(SP->_slk->attr, color_pair_number);
+ SetPair(SP_PARM->_slk->attr, color_pair_number);
}
- TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
- returnCode(OK);
- } else
- returnCode(ERR);
+ TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
+ code = OK;
+ }
+ returnCode(code);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_attr_set(const attr_t attr, short color_pair_number, void *opts)
+{
+ return NCURSES_SP_NAME(slk_attr_set) (CURRENT_SCREEN, attr,
+ color_pair_number, opts);
}
+#endif
diff --git a/ncurses/base/lib_slkatrof.c b/ncurses/base/lib_slkatrof.c
index 14b4c3bfadcc..bb980ab812cf 100644
--- a/ncurses/base/lib_slkatrof.c
+++ b/ncurses/base/lib_slkatrof.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,21 +38,29 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkatrof.c,v 1.8 2005/01/08 23:01:32 tom Exp $")
+MODULE_ID("$Id: lib_slkatrof.c,v 1.11 2009/10/24 22:12:21 tom Exp $")
NCURSES_EXPORT(int)
-slk_attroff(const chtype attr)
+NCURSES_SP_NAME(slk_attroff) (NCURSES_SP_DCLx const chtype attr)
{
- T((T_CALLED("slk_attroff(%s)"), _traceattr(attr)));
+ T((T_CALLED("slk_attroff(%p,%s)"), (void *) SP_PARM, _traceattr(attr)));
- if (SP != 0 && SP->_slk != 0) {
- TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP->_slk->attr))));
- RemAttr(SP->_slk->attr, attr);
+ if (SP_PARM != 0 && SP_PARM->_slk != 0) {
+ TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
+ RemAttr(SP_PARM->_slk->attr, attr);
if ((attr & A_COLOR) != 0) {
- SetPair(SP->_slk->attr, 0);
+ SetPair(SP_PARM->_slk->attr, 0);
}
- TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
+ TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
returnCode(OK);
} else
returnCode(ERR);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_attroff(const chtype attr)
+{
+ return NCURSES_SP_NAME(slk_attroff) (CURRENT_SCREEN, attr);
+}
+#endif
diff --git a/ncurses/base/lib_slkatron.c b/ncurses/base/lib_slkatron.c
index 90add86dc1c8..bc2fb3308eea 100644
--- a/ncurses/base/lib_slkatron.c
+++ b/ncurses/base/lib_slkatron.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,21 +38,29 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkatron.c,v 1.8 2005/01/08 23:02:01 tom Exp $")
+MODULE_ID("$Id: lib_slkatron.c,v 1.12 2010/03/31 23:38:02 tom Exp $")
NCURSES_EXPORT(int)
-slk_attron(const chtype attr)
+NCURSES_SP_NAME(slk_attron) (NCURSES_SP_DCLx const chtype attr)
{
- T((T_CALLED("slk_attron(%s)"), _traceattr(attr)));
+ T((T_CALLED("slk_attron(%p,%s)"), (void *) SP_PARM, _traceattr(attr)));
- if (SP != 0 && SP->_slk != 0) {
- TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP->_slk->attr))));
- AddAttr(SP->_slk->attr, attr);
+ if (SP_PARM != 0 && SP_PARM->_slk != 0) {
+ TR(TRACE_ATTRS, ("... current %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
+ AddAttr(SP_PARM->_slk->attr, attr);
if ((attr & A_COLOR) != 0) {
- SetPair(SP->_slk->attr, PAIR_NUMBER(attr));
+ SetPair(SP_PARM->_slk->attr, PairNumber(attr));
}
- TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
+ TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
returnCode(OK);
} else
returnCode(ERR);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_attron(const chtype attr)
+{
+ return NCURSES_SP_NAME(slk_attron) (CURRENT_SCREEN, attr);
+}
+#endif
diff --git a/ncurses/base/lib_slkatrset.c b/ncurses/base/lib_slkatrset.c
index 8da9981b3b3e..544b8d0faab7 100644
--- a/ncurses/base/lib_slkatrset.c
+++ b/ncurses/base/lib_slkatrset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,16 +38,24 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkatrset.c,v 1.7 2005/01/08 21:46:47 tom Exp $")
+MODULE_ID("$Id: lib_slkatrset.c,v 1.10 2009/10/24 22:12:21 tom Exp $")
NCURSES_EXPORT(int)
-slk_attrset(const chtype attr)
+NCURSES_SP_NAME(slk_attrset) (NCURSES_SP_DCLx const chtype attr)
{
- T((T_CALLED("slk_attrset(%s)"), _traceattr(attr)));
+ T((T_CALLED("slk_attrset(%p,%s)"), (void *) SP_PARM, _traceattr(attr)));
- if (SP != 0 && SP->_slk != 0) {
- SetAttr(SP->_slk->attr, attr);
+ if (SP_PARM != 0 && SP_PARM->_slk != 0) {
+ SetAttr(SP_PARM->_slk->attr, attr);
returnCode(OK);
} else
returnCode(ERR);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_attrset(const chtype attr)
+{
+ return NCURSES_SP_NAME(slk_attrset) (CURRENT_SCREEN, attr);
+}
+#endif
diff --git a/ncurses/base/lib_slkattr.c b/ncurses/base/lib_slkattr.c
index da82ee5b623e..bec11e84c667 100644
--- a/ncurses/base/lib_slkattr.c
+++ b/ncurses/base/lib_slkattr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,19 +38,27 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkattr.c,v 1.6 2005/01/08 21:44:28 tom Exp $")
+MODULE_ID("$Id: lib_slkattr.c,v 1.11 2010/12/20 01:41:25 tom Exp $")
NCURSES_EXPORT(attr_t)
-slk_attr(void)
+NCURSES_SP_NAME(slk_attr) (NCURSES_SP_DCL0)
{
- T((T_CALLED("slk_attr()")));
+ T((T_CALLED("slk_attr(%p)"), (void *) SP_PARM));
- if (SP != 0 && SP->_slk != 0) {
- attr_t result = AttrOf(SP->_slk->attr) & ALL_BUT_COLOR;
- int pair = GetPair(SP->_slk->attr);
+ if (SP_PARM != 0 && SP_PARM->_slk != 0) {
+ attr_t result = AttrOf(SP_PARM->_slk->attr) & ALL_BUT_COLOR;
+ int pair = GetPair(SP_PARM->_slk->attr);
- result |= COLOR_PAIR(pair);
+ result |= (attr_t) ColorPair(pair);
returnAttr(result);
} else
returnAttr(0);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(attr_t)
+slk_attr(void)
+{
+ return NCURSES_SP_NAME(slk_attr) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/base/lib_slkclear.c b/ncurses/base/lib_slkclear.c
index 946ceeaf0e0d..264c8c40812c 100644
--- a/ncurses/base/lib_slkclear.c
+++ b/ncurses/base/lib_slkclear.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,27 +40,35 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkclear.c,v 1.10 2007/12/29 17:51:47 tom Exp $")
+MODULE_ID("$Id: lib_slkclear.c,v 1.14 2009/11/07 16:27:05 tom Exp $")
NCURSES_EXPORT(int)
-slk_clear(void)
+NCURSES_SP_NAME(slk_clear) (NCURSES_SP_DCL0)
{
int rc = ERR;
- T((T_CALLED("slk_clear()")));
+ T((T_CALLED("slk_clear(%p)"), (void *) SP_PARM));
- if (SP != NULL && SP->_slk != NULL) {
- SP->_slk->hidden = TRUE;
+ if (SP_PARM != 0 && SP_PARM->_slk != 0) {
+ SP_PARM->_slk->hidden = TRUE;
/* For simulated SLK's it looks much more natural to
inherit those attributes from the standard screen */
- SP->_slk->win->_nc_bkgd = stdscr->_nc_bkgd;
- WINDOW_ATTRS(SP->_slk->win) = WINDOW_ATTRS(stdscr);
- if (SP->_slk->win == stdscr) {
+ SP_PARM->_slk->win->_nc_bkgd = StdScreen(SP_PARM)->_nc_bkgd;
+ WINDOW_ATTRS(SP_PARM->_slk->win) = WINDOW_ATTRS(StdScreen(SP_PARM));
+ if (SP_PARM->_slk->win == StdScreen(SP_PARM)) {
rc = OK;
} else {
- werase(SP->_slk->win);
- rc = wrefresh(SP->_slk->win);
+ werase(SP_PARM->_slk->win);
+ rc = wrefresh(SP_PARM->_slk->win);
}
}
returnCode(rc);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_clear(void)
+{
+ return NCURSES_SP_NAME(slk_clear) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/base/lib_slkcolor.c b/ncurses/base/lib_slkcolor.c
index b677b65a529a..c1211bcb884a 100644
--- a/ncurses/base/lib_slkcolor.c
+++ b/ncurses/base/lib_slkcolor.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,8 +27,8 @@
****************************************************************************/
/****************************************************************************
- * Author: Juergen Pfeifer, 1998 *
- * and: Thomas E. Dickey 2005 *
+ * Author: Juergen Pfeifer, 1998,2009 *
+ * and: Thomas E. Dickey 2005-on *
****************************************************************************/
/*
@@ -38,19 +38,31 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkcolor.c,v 1.12 2005/01/28 21:11:53 tom Exp $")
+MODULE_ID("$Id: lib_slkcolor.c,v 1.16 2009/10/24 22:12:21 tom Exp $")
NCURSES_EXPORT(int)
-slk_color(short color_pair_number)
+NCURSES_SP_NAME(slk_color) (NCURSES_SP_DCLx short color_pair_number)
{
- T((T_CALLED("slk_color(%d)"), color_pair_number));
+ int code = ERR;
+
+ T((T_CALLED("slk_color(%p,%d)"), (void *) SP_PARM, color_pair_number));
+
+ if (SP_PARM != 0
+ && SP_PARM->_slk != 0
+ && color_pair_number >= 0
+ && color_pair_number < SP_PARM->_pair_limit) {
+ TR(TRACE_ATTRS, ("... current is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
+ SetPair(SP_PARM->_slk->attr, color_pair_number);
+ TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP_PARM->_slk->attr))));
+ code = OK;
+ }
+ returnCode(code);
+}
- if (SP != 0 && SP->_slk != 0 &&
- color_pair_number >= 0 && color_pair_number < COLOR_PAIRS) {
- TR(TRACE_ATTRS, ("... current is %s", _tracech_t(CHREF(SP->_slk->attr))));
- SetPair(SP->_slk->attr, color_pair_number);
- TR(TRACE_ATTRS, ("new attribute is %s", _tracech_t(CHREF(SP->_slk->attr))));
- returnCode(OK);
- } else
- returnCode(ERR);
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_color(short color_pair_number)
+{
+ return NCURSES_SP_NAME(slk_color) (CURRENT_SCREEN, color_pair_number);
}
+#endif
diff --git a/ncurses/base/lib_slkinit.c b/ncurses/base/lib_slkinit.c
index c440109b34e6..9cbdfea98430 100644
--- a/ncurses/base/lib_slkinit.c
+++ b/ncurses/base/lib_slkinit.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -39,17 +40,41 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slkinit.c,v 1.7 2008/01/12 20:23:39 tom Exp $")
+MODULE_ID("$Id: lib_slkinit.c,v 1.13 2009/10/31 00:10:46 tom Exp $")
+
+#ifdef USE_SP_RIPOFF
+#define SoftkeyFormat SP_PARM->slk_format
+#else
+#define SoftkeyFormat _nc_globals.slk_format
+#endif
NCURSES_EXPORT(int)
-slk_init(int format)
+NCURSES_SP_NAME(slk_init) (NCURSES_SP_DCLx int format)
{
int code = ERR;
- T((T_CALLED("slk_init(%d)"), format));
- if (format >= 0 && format <= 3 && !_nc_globals.slk_format) {
- _nc_globals.slk_format = 1 + format;
- code = _nc_ripoffline(-SLK_LINES(_nc_globals.slk_format), _nc_slk_initialize);
+ START_TRACE();
+ T((T_CALLED("slk_init(%p,%d)"), (void *) SP_PARM, format));
+
+ if (format >= 0
+ && format <= 3
+#ifdef USE_SP_RIPOFF
+ && SP_PARM
+ && SP_PARM->_prescreen
+#endif
+ && !SoftkeyFormat) {
+ SoftkeyFormat = 1 + format;
+ code = NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
+ -SLK_LINES(SoftkeyFormat),
+ _nc_slk_initialize);
}
returnCode(code);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_init(int format)
+{
+ return NCURSES_SP_NAME(slk_init) (CURRENT_SCREEN_PRE, format);
+}
+#endif
diff --git a/ncurses/base/lib_slklab.c b/ncurses/base/lib_slklab.c
index 42bb4ac1425d..d0b2a230796a 100644
--- a/ncurses/base/lib_slklab.c
+++ b/ncurses/base/lib_slklab.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer, 1998,2009 *
+ * and: Thomas E. Dickey 1998-on *
****************************************************************************/
/*
@@ -38,14 +40,22 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slklab.c,v 1.7 2003/03/29 22:53:48 tom Exp $")
+MODULE_ID("$Id: lib_slklab.c,v 1.10 2009/10/24 22:12:21 tom Exp $")
NCURSES_EXPORT(char *)
-slk_label(int n)
+NCURSES_SP_NAME(slk_label) (NCURSES_SP_DCLx int n)
{
- T((T_CALLED("slk_label(%d)"), n));
+ T((T_CALLED("slk_label(%p,%d)"), (void *) SP_PARM, n));
- if (SP == NULL || SP->_slk == NULL || n < 1 || n > SP->_slk->labcnt)
+ if (SP_PARM == 0 || SP_PARM->_slk == 0 || n < 1 || n > SP_PARM->_slk->labcnt)
returnPtr(0);
- returnPtr(SP->_slk->ent[n - 1].ent_text);
+ returnPtr(SP_PARM->_slk->ent[n - 1].ent_text);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+slk_label(int n)
+{
+ return NCURSES_SP_NAME(slk_label) (CURRENT_SCREEN, n);
}
+#endif
diff --git a/ncurses/base/lib_slkrefr.c b/ncurses/base/lib_slkrefr.c
index cb1beba0e2a1..b06bf8d7f802 100644
--- a/ncurses/base/lib_slkrefr.c
+++ b/ncurses/base/lib_slkrefr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,9 +38,18 @@
* 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.17 2008/09/27 14:07:53 juergen Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_slkrefr.c,v 1.26 2010/05/01 19:17:28 tom Exp $")
+
+#ifdef USE_TERM_DRIVER
+#define NumLabels InfoOf(SP_PARM).numlabels
+#else
+#define NumLabels num_labels
+#endif
/*
* Paint the info line for the PC style SLK emulation.
@@ -53,7 +62,7 @@ slk_paint_info(WINDOW *win)
if (win && sp && (sp->slk_format == 4)) {
int i;
- mvwhline(win, 0, 0, 0, getmaxx(win));
+ (void) mvwhline(win, 0, 0, 0, getmaxx(win));
wmove(win, 0, 0);
for (i = 0; i < sp->_slk->maxlab; i++) {
@@ -66,31 +75,47 @@ slk_paint_info(WINDOW *win)
* Write the soft labels to the soft-key window.
*/
static void
-slk_intern_refresh(SLK * slk)
+slk_intern_refresh(SCREEN *sp)
{
int i;
- int fmt = SP->slk_format;
+ int fmt;
+ SLK *slk;
+ int numlab;
+
+ if (sp == 0)
+ return;
+
+ slk = sp->_slk;
+ fmt = sp->slk_format;
+ numlab = NumLabels;
+
+ if (slk->hidden)
+ return;
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 (numlab > 0 && SLK_STDFMT(fmt)) {
+#ifdef USE_TERM_DRIVER
+ CallDriver_2(sp, hwlabel, i + 1, slk->ent[i].form_text);
+#else
if (i < num_labels) {
TPUTS_TRACE("plab_norm");
putp(TPARM_2(plab_norm, i + 1, slk->ent[i].form_text));
}
+#endif
} else {
if (fmt == 4)
slk_paint_info(slk->win);
wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x);
- if (SP->_slk) {
- wattrset(slk->win, AttrOf(SP->_slk->attr));
+ if (sp->_slk) {
+ (void) wattrset(slk->win, AttrOf(sp->_slk->attr));
}
waddstr(slk->win, slk->ent[i].form_text);
/* if we simulate SLK's, it's looking much more
natural to use the current ATTRIBUTE also
for the label window */
- wattrset(slk->win, WINDOW_ATTRS(stdscr));
+ (void) wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp)));
}
}
slk->ent[i].dirty = FALSE;
@@ -98,7 +123,10 @@ slk_intern_refresh(SLK * slk)
}
slk->dirty = FALSE;
- if (num_labels > 0) {
+ if (numlab > 0) {
+#ifdef USE_TERM_DRIVER
+ CallDriver_1(sp, hwlabelOnOff, slk->hidden ? FALSE : TRUE);
+#else
if (slk->hidden) {
TPUTS_TRACE("label_off");
putp(label_off);
@@ -106,6 +134,7 @@ slk_intern_refresh(SLK * slk)
TPUTS_TRACE("label_on");
putp(label_on);
}
+#endif
}
}
@@ -113,32 +142,48 @@ slk_intern_refresh(SLK * slk)
* Refresh the soft labels.
*/
NCURSES_EXPORT(int)
-slk_noutrefresh(void)
+NCURSES_SP_NAME(slk_noutrefresh) (NCURSES_SP_DCL0)
{
- T((T_CALLED("slk_noutrefresh()")));
+ T((T_CALLED("slk_noutrefresh(%p)"), (void *) SP_PARM));
- if (SP == NULL || SP->_slk == NULL)
+ if (SP_PARM == 0 || SP_PARM->_slk == 0)
returnCode(ERR);
- if (SP->_slk->hidden)
+ if (SP_PARM->_slk->hidden)
returnCode(OK);
- slk_intern_refresh(SP->_slk);
+ slk_intern_refresh(SP_PARM);
- returnCode(wnoutrefresh(SP->_slk->win));
+ returnCode(wnoutrefresh(SP_PARM->_slk->win));
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_noutrefresh(void)
+{
+ return NCURSES_SP_NAME(slk_noutrefresh) (CURRENT_SCREEN);
+}
+#endif
+
/*
* Refresh the soft labels.
*/
NCURSES_EXPORT(int)
-slk_refresh(void)
+NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_DCL0)
{
- T((T_CALLED("slk_refresh()")));
+ T((T_CALLED("slk_refresh(%p)"), (void *) SP_PARM));
- if (SP == NULL || SP->_slk == NULL)
+ if (SP_PARM == 0 || SP_PARM->_slk == 0)
returnCode(ERR);
- if (SP->_slk->hidden)
+ if (SP_PARM->_slk->hidden)
returnCode(OK);
- slk_intern_refresh(SP->_slk);
+ slk_intern_refresh(SP_PARM);
+
+ returnCode(wrefresh(SP_PARM->_slk->win));
+}
- returnCode(wrefresh(SP->_slk->win));
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_refresh(void)
+{
+ return NCURSES_SP_NAME(slk_refresh) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/base/lib_slkset.c b/ncurses/base/lib_slkset.c
index e19f88e60ac4..91483f103b23 100644
--- a/ncurses/base/lib_slkset.c
+++ b/ncurses/base/lib_slkset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,10 +44,10 @@
#endif
#endif
-MODULE_ID("$Id: lib_slkset.c,v 1.17 2007/10/13 20:08:46 tom Exp $")
+MODULE_ID("$Id: lib_slkset.c,v 1.21 2010/12/25 23:43:58 tom Exp $")
NCURSES_EXPORT(int)
-slk_set(int i, const char *astr, int format)
+NCURSES_SP_NAME(slk_set) (NCURSES_SP_DCLx int i, const char *astr, int format)
{
SLK *slk;
int offset;
@@ -57,20 +57,20 @@ slk_set(int i, const char *astr, int format)
const char *str = astr;
const char *p;
- T((T_CALLED("slk_set(%d, \"%s\", %d)"), i, str, format));
+ T((T_CALLED("slk_set(%p, %d, \"%s\", %d)"), (void *) SP_PARM, i, str, format));
- if (SP == 0
- || (slk = SP->_slk) == 0
+ if (SP_PARM == 0
+ || (slk = SP_PARM->_slk) == 0
|| i < 1
|| i > slk->labcnt
|| format < 0
|| format > 2)
returnCode(ERR);
- if (str == NULL)
+ if (str == 0)
str = "";
--i; /* Adjust numbering of labels */
- limit = MAX_SKEY_LEN(SP->slk_format);
+ limit = MAX_SKEY_LEN(SP_PARM->slk_format);
while (isspace(UChar(*str)))
str++; /* skip over leading spaces */
p = str;
@@ -94,12 +94,12 @@ slk_set(int i, const char *astr, int format)
numcols += wcwidth(wc);
p += need;
}
- numchrs = (p - str);
+ numchrs = (int) (p - str);
#else
while (isprint(UChar(*p)))
p++; /* The first non-print stops */
- numcols = (p - str);
+ numcols = (int) (p - str);
if (numcols > limit)
numcols = limit;
numchrs = numcols;
@@ -147,3 +147,11 @@ slk_set(int i, const char *astr, int format)
slk->ent[i].dirty = TRUE;
returnCode(OK);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_set(int i, const char *astr, int format)
+{
+ return NCURSES_SP_NAME(slk_set) (CURRENT_SCREEN, i, astr, format);
+}
+#endif
diff --git a/ncurses/base/lib_slktouch.c b/ncurses/base/lib_slktouch.c
index 5eb5df385b82..ba77fd2375b7 100644
--- a/ncurses/base/lib_slktouch.c
+++ b/ncurses/base/lib_slktouch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,8 +27,8 @@
****************************************************************************/
/****************************************************************************
- * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
- * and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * Author: Juergen Pfeifer 1997,2009 *
+ * and: Thomas E. Dickey 1996-on *
****************************************************************************/
/*
@@ -38,16 +38,24 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: lib_slktouch.c,v 1.5 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_slktouch.c,v 1.8 2009/10/24 22:12:21 tom Exp $")
NCURSES_EXPORT(int)
-slk_touch(void)
+NCURSES_SP_NAME(slk_touch) (NCURSES_SP_DCL0)
{
- T((T_CALLED("slk_touch()")));
+ T((T_CALLED("slk_touch(%p)"), (void *) SP_PARM));
- if (SP == NULL || SP->_slk == NULL)
+ if (SP_PARM == 0 || SP_PARM->_slk == 0)
returnCode(ERR);
- SP->_slk->dirty = TRUE;
+ SP_PARM->_slk->dirty = TRUE;
returnCode(OK);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+slk_touch(void)
+{
+ return NCURSES_SP_NAME(slk_touch) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/base/lib_touch.c b/ncurses/base/lib_touch.c
index 2ac21f2e0d1f..8023c7058027 100644
--- a/ncurses/base/lib_touch.c
+++ b/ncurses/base/lib_touch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -43,12 +43,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_touch.c,v 1.9 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_touch.c,v 1.11 2010/12/19 01:22:58 tom Exp $")
NCURSES_EXPORT(bool)
is_linetouched(WINDOW *win, int line)
{
- T((T_CALLED("is_linetouched(%p,%d)"), win, line));
+ T((T_CALLED("is_linetouched(%p,%d)"), (void *) win, line));
/* XSI doesn't define any error */
if (!win || (line > win->_maxy) || (line < 0))
@@ -62,7 +62,7 @@ is_wintouched(WINDOW *win)
{
int i;
- T((T_CALLED("is_wintouched(%p)"), win));
+ T((T_CALLED("is_wintouched(%p)"), (void *) win));
if (win)
for (i = 0; i <= win->_maxy; i++)
@@ -76,7 +76,7 @@ wtouchln(WINDOW *win, int y, int n, int changed)
{
int i;
- T((T_CALLED("wtouchln(%p,%d,%d,%d)"), win, y, n, changed));
+ T((T_CALLED("wtouchln(%p,%d,%d,%d)"), (void *) win, y, n, changed));
if (!win || (n < 0) || (y < 0) || (y > win->_maxy))
returnCode(ERR);
@@ -85,7 +85,9 @@ wtouchln(WINDOW *win, int y, int n, int changed)
if (i > win->_maxy)
break;
win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
- win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE;
+ win->_line[i].lastchar = (NCURSES_SIZE_T) (changed
+ ? win->_maxx
+ : _NOCHANGE);
}
returnCode(OK);
}
diff --git a/ncurses/base/lib_ungetch.c b/ncurses/base/lib_ungetch.c
index 8742f867fa94..63a14cff7594 100644
--- a/ncurses/base/lib_ungetch.c
+++ b/ncurses/base/lib_ungetch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -41,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_ungetch.c,v 1.11 2008/05/31 16:44:54 tom Exp $")
+MODULE_ID("$Id: lib_ungetch.c,v 1.14 2009/10/24 22:12:21 tom Exp $")
#include <fifo_defs.h>
@@ -57,10 +58,12 @@ _nc_fifo_dump(SCREEN *sp)
#endif /* TRACE */
NCURSES_EXPORT(int)
-_nc_ungetch(SCREEN *sp, int ch)
+safe_ungetch(SCREEN *sp, int ch)
{
int rc = ERR;
+ T((T_CALLED("ungetch(%p,%s)"), (void *) sp, _nc_tracechar(sp, ch)));
+
if (tail != -1) {
if (head == -1) {
head = 0;
@@ -79,12 +82,11 @@ _nc_ungetch(SCREEN *sp, int ch)
#endif
rc = OK;
}
- return rc;
+ returnCode(rc);
}
NCURSES_EXPORT(int)
ungetch(int ch)
{
- T((T_CALLED("ungetch(%s)"), _nc_tracechar(SP, ch)));
- returnCode(_nc_ungetch(SP, ch));
+ return safe_ungetch(CURRENT_SCREEN, ch);
}
diff --git a/ncurses/base/lib_vline.c b/ncurses/base/lib_vline.c
index 1a2537e7eb6a..2f3148eca77c 100644
--- a/ncurses/base/lib_vline.c
+++ b/ncurses/base/lib_vline.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,16 +40,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_vline.c,v 1.10 2006/03/11 21:52:19 tom Exp $")
+MODULE_ID("$Id: lib_vline.c,v 1.12 2010/12/19 01:22:58 tom Exp $")
NCURSES_EXPORT(int)
wvline(WINDOW *win, chtype ch, int n)
{
int code = ERR;
- NCURSES_SIZE_T row, col;
- NCURSES_SIZE_T end;
+ int row, col;
+ int end;
- T((T_CALLED("wvline(%p,%s,%d)"), win, _tracechtype(ch), n));
+ T((T_CALLED("wvline(%p,%s,%d)"), (void *) win, _tracechtype(ch), n));
if (win) {
NCURSES_CH_T wch;
diff --git a/ncurses/base/lib_wattroff.c b/ncurses/base/lib_wattroff.c
index bf2020e06027..fff0b395f1d8 100644
--- a/ncurses/base/lib_wattroff.c
+++ b/ncurses/base/lib_wattroff.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,12 +42,12 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_wattroff.c,v 1.9 2006/05/27 19:30:33 tom Exp $")
+MODULE_ID("$Id: lib_wattroff.c,v 1.10 2009/10/24 22:36:08 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)));
+ T((T_CALLED("wattr_off(%p,%s)"), (void *) win, _traceattr(at)));
if (win) {
T(("... current %s (%d)",
_traceattr(WINDOW_ATTRS(win)),
diff --git a/ncurses/base/lib_wattron.c b/ncurses/base/lib_wattron.c
index 2e17d965e94a..3806285e2a38 100644
--- a/ncurses/base/lib_wattron.c
+++ b/ncurses/base/lib_wattron.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,12 +42,12 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_wattron.c,v 1.9 2006/05/27 19:30:46 tom Exp $")
+MODULE_ID("$Id: lib_wattron.c,v 1.11 2010/03/31 23:38:02 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)));
+ T((T_CALLED("wattr_on(%p,%s)"), (void *) win, _traceattr(at)));
if (win != 0) {
T(("... current %s (%d)",
_traceattr(WINDOW_ATTRS(win)),
@@ -55,7 +55,7 @@ wattr_on(WINDOW *win, attr_t at, void *opts GCC_UNUSED)
if_EXT_COLORS({
if (at & A_COLOR)
- win->_color = PAIR_NUMBER(at);
+ win->_color = PairNumber(at);
});
toggle_attr_on(WINDOW_ATTRS(win), at);
returnCode(OK);
diff --git a/ncurses/base/lib_winch.c b/ncurses/base/lib_winch.c
index 18da9c594945..7e75f85bf390 100644
--- a/ncurses/base/lib_winch.c
+++ b/ncurses/base/lib_winch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,16 +39,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_winch.c,v 1.5 2001/06/02 23:42:08 skimo Exp $")
+MODULE_ID("$Id: lib_winch.c,v 1.8 2010/12/19 01:22:58 tom Exp $")
NCURSES_EXPORT(chtype)
winch(WINDOW *win)
{
- T((T_CALLED("winch(%p)"), win));
+ T((T_CALLED("winch(%p)"), (void *) win));
if (win != 0) {
- returnChar(CharOf(win->_line[win->_cury].text[win->_curx]) |
- AttrOf(win->_line[win->_cury].text[win->_curx]));
+ returnChtype((chtype) CharOf(win->_line[win->_cury].text[win->_curx])
+ | AttrOf(win->_line[win->_cury].text[win->_curx]));
} else {
- returnChar(0);
+ returnChtype(0);
}
}
diff --git a/ncurses/base/lib_window.c b/ncurses/base/lib_window.c
index a3236e206a37..4baa36943c44 100644
--- a/ncurses/base/lib_window.c
+++ b/ncurses/base/lib_window.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_window.c,v 1.25 2008/06/07 14:12:56 tom Exp $")
+MODULE_ID("$Id: lib_window.c,v 1.29 2010/12/19 01:47:22 tom Exp $")
NCURSES_EXPORT(void)
_nc_synchook(WINDOW *win)
@@ -57,32 +57,30 @@ mvderwin(WINDOW *win, int y, int x)
{
WINDOW *orig;
int i;
+ int rc = ERR;
- T((T_CALLED("mvderwin(%p,%d,%d)"), win, y, x));
+ T((T_CALLED("mvderwin(%p,%d,%d)"), (void *) 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);
+ if (win != 0
+ && (orig = win->_parent) != 0
+ && (x >= 0 && y >= 0)
+ && (x + getmaxx(win) <= getmaxx(orig))
+ && (y + getmaxy(win) <= getmaxy(orig))) {
+ wsyncup(win);
+ win->_parx = x;
+ win->_pary = y;
+ for (i = 0; i < getmaxy(win); i++)
+ win->_line[i].text = &(orig->_line[y++].text[x]);
+ rc = OK;
+ }
+ returnCode(rc);
}
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));
+ T((T_CALLED("syncok(%p,%d)"), (void *) win, bf));
if (win) {
win->_sync = bf;
@@ -98,7 +96,7 @@ wsyncup(WINDOW *win)
{
WINDOW *wp;
- T((T_CALLED("wsyncup(%p)"), win));
+ T((T_CALLED("wsyncup(%p)"), (void *) win));
if (win && win->_parent) {
for (wp = win; wp->_parent; wp = wp->_parent) {
int y;
@@ -128,7 +126,7 @@ 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));
+ T((T_CALLED("wsyncdown(%p)"), (void *) win));
if (win && win->_parent) {
WINDOW *pp = win->_parent;
@@ -167,7 +165,7 @@ wcursyncup(WINDOW *win)
{
WINDOW *wp;
- T((T_CALLED("wcursyncup(%p)"), win));
+ T((T_CALLED("wcursyncup(%p)"), (void *) win));
for (wp = win; wp && wp->_parent; wp = wp->_parent) {
wmove(wp->_parent, wp->_pary + wp->_cury, wp->_parx + wp->_curx);
}
@@ -182,19 +180,23 @@ dupwin(WINDOW *win)
size_t linesize;
int i;
- T((T_CALLED("dupwin(%p)"), win));
+ T((T_CALLED("dupwin(%p)"), (void *) win));
if (win != 0) {
-
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(win);
+#endif
_nc_lock_global(curses);
if (win->_flags & _ISPAD) {
- nwin = newpad(win->_maxy + 1,
- win->_maxx + 1);
+ nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx
+ win->_maxy + 1,
+ win->_maxx + 1);
} else {
- nwin = newwin(win->_maxy + 1,
- win->_maxx + 1,
- win->_begy,
- win->_begx);
+ nwin = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
+ win->_maxy + 1,
+ win->_maxx + 1,
+ win->_begy,
+ win->_begx);
}
if (nwin != 0) {
@@ -237,7 +239,7 @@ dupwin(WINDOW *win)
if (win->_flags & _ISPAD)
nwin->_pad = win->_pad;
- linesize = (win->_maxx + 1) * sizeof(NCURSES_CH_T);
+ linesize = (unsigned) (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;
diff --git a/ncurses/base/nc_panel.c b/ncurses/base/nc_panel.c
index 59bfbbe86ef6..69b10bc0c662 100644
--- a/ncurses/base/nc_panel.c
+++ b/ncurses/base/nc_panel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,10 +32,22 @@
#include <curses.priv.h>
-MODULE_ID("$Id: nc_panel.c,v 1.4 2000/12/10 02:43:28 tom Exp $")
+MODULE_ID("$Id: nc_panel.c,v 1.5 2009/04/11 21:05:10 tom Exp $")
NCURSES_EXPORT(struct panelhook *)
+NCURSES_SP_NAME(_nc_panelhook) (NCURSES_SP_DCL0)
+{
+ return (SP_PARM
+ ? &(SP_PARM->_panelHook)
+ : (CURRENT_SCREEN
+ ? &(CURRENT_SCREEN->_panelHook)
+ : 0));
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(struct panelhook *)
_nc_panelhook(void)
{
- return (SP ? &(SP->_panelHook) : NULL);
+ return NCURSES_SP_NAME(_nc_panelhook) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/base/resizeterm.c b/ncurses/base/resizeterm.c
index a94cfc3aaaa8..3f1d36e89d7a 100644
--- a/ncurses/base/resizeterm.c
+++ b/ncurses/base/resizeterm.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,6 +28,7 @@
/****************************************************************************
* Author: Thomas E. Dickey *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
@@ -39,11 +40,12 @@
*/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: resizeterm.c,v 1.34 2008/06/07 13:58:40 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
-#define stolen_lines (screen_lines - SP->_lines_avail)
+MODULE_ID("$Id: resizeterm.c,v 1.43 2011/01/10 01:34:49 tom Exp $")
/*
* If we're trying to be reentrant, do not want any local statics.
@@ -64,18 +66,23 @@ static int current_cols;
static void
show_window_sizes(const char *name)
{
+ SCREEN *sp;
WINDOWLIST *wp;
_nc_lock_global(curses);
- _tracef("%s resizing: %2d x %2d (%2d x %2d)", name, LINES, COLS,
- screen_lines, screen_columns);
- for (each_window(wp)) {
- _tracef(" window %p is %2ld x %2ld at %2ld,%2ld",
- &(wp->win),
- (long) wp->win._maxy + 1,
- (long) wp->win._maxx + 1,
- (long) wp->win._begy,
- (long) wp->win._begx);
+ for (each_screen(sp)) {
+ _tracef("%s resizing: %p: %2d x %2d (%2d x %2d)", name, (void *) sp,
+ *(ptrLines(sp)),
+ *(ptrCols(sp)),
+ screen_lines(sp), screen_columns(sp));
+ for (each_window(sp, wp)) {
+ _tracef(" window %p is %2ld x %2ld at %2ld,%2ld",
+ (void *) &(wp->win),
+ (long) wp->win._maxy + 1,
+ (long) wp->win._maxx + 1,
+ (long) wp->win._begy,
+ (long) wp->win._begx);
+ }
}
_nc_unlock_global(curses);
}
@@ -86,15 +93,23 @@ show_window_sizes(const char *name)
* structure's size.
*/
NCURSES_EXPORT(bool)
-is_term_resized(int ToLines, int ToCols)
+NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_DCLx int ToLines, int ToCols)
{
- T((T_CALLED("is_term_resized(%d, %d)"), ToLines, ToCols));
+ T((T_CALLED("is_term_resized(%p, %d, %d)"), (void *) SP_PARM, ToLines, ToCols));
returnCode(ToLines > 0
&& ToCols > 0
- && (ToLines != screen_lines
- || ToCols != screen_columns));
+ && (ToLines != screen_lines(SP_PARM)
+ || ToCols != screen_columns(SP_PARM)));
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(bool)
+is_term_resized(int ToLines, int ToCols)
+{
+ return NCURSES_SP_NAME(is_term_resized) (CURRENT_SCREEN, ToLines, ToCols);
+}
+#endif
+
/*
*/
static ripoff_t *
@@ -104,6 +119,9 @@ ripped_window(WINDOW *win)
ripoff_t *rop;
if (win != 0) {
+#ifdef USE_SP_RIPOFF
+ SCREEN *sp = _nc_screen_of(win);
+#endif
for (each_ripoff(rop)) {
if (rop->win == win && rop->line != 0) {
result = rop;
@@ -125,6 +143,9 @@ ripped_bottom(WINDOW *win)
ripoff_t *rop;
if (win != 0) {
+#ifdef USE_SP_RIPOFF
+ SCREEN *sp = _nc_screen_of(win);
+#endif
for (each_ripoff(rop)) {
if (rop->line < 0) {
result -= rop->line;
@@ -146,9 +167,12 @@ child_depth(WINDOW *cmp)
int depth = 0;
if (cmp != 0) {
+#ifdef USE_SP_WINDOWLIST
+ SCREEN *sp = _nc_screen_of(cmp);
+#endif
WINDOWLIST *wp;
- for (each_window(wp)) {
+ for (each_window(sp, wp)) {
WINDOW *tst = &(wp->win);
if (tst->_parent == cmp) {
depth = 1 + child_depth(tst);
@@ -184,13 +208,13 @@ static int
adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
{
int result;
- int bottom = CurLines + SP->_topstolen - stolen;
+ int bottom = CurLines + _nc_screen_of(win)->_topstolen - stolen;
int myLines = win->_maxy + 1;
int myCols = win->_maxx + 1;
ripoff_t *rop = ripped_window(win);
T((T_CALLED("adjust_window(%p,%d,%d)%s depth %d/%d currently %ldx%ld at %ld,%ld"),
- win, ToLines, ToCols,
+ (void *) win, ToLines, ToCols,
(rop != 0) ? " (rip)" : "",
parent_depth(win),
child_depth(win),
@@ -202,13 +226,19 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
* If it is a ripped-off window at the bottom of the screen, simply
* move it to the same relative position.
*/
- win->_begy = ToLines - ripped_bottom(win) - 0 - win->_yoffset;
+ win->_begy = (NCURSES_SIZE_T) (ToLines - ripped_bottom(win) - 0 - win->_yoffset);
+ if (rop->hook == _nc_slk_initialize)
+ _nc_format_slks(
+#if NCURSES_SP_FUNCS
+ _nc_screen_of(win),
+#endif
+ ToCols);
} else if (win->_begy >= bottom) {
/*
* If it is below the bottom of the new screen, move up by the same
* amount that the screen shrank.
*/
- win->_begy += (ToLines - CurLines);
+ win->_begy = (NCURSES_SIZE_T) (win->_begy + (ToLines - CurLines));
} else {
if (myLines == (CurLines - stolen)
&& ToLines != CurLines) {
@@ -239,19 +269,19 @@ adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
* children, decrease those to fit, then decrease the containing window, etc.
*/
static int
-decrease_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
+decrease_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
{
bool found;
int depth = 0;
WINDOWLIST *wp;
- T((T_CALLED("decrease_size(%d, %d)"), ToLines, ToCols));
+ T((T_CALLED("decrease_size(%p, %d, %d)"), (void *) SP_PARM, ToLines, ToCols));
do {
found = FALSE;
TR(TRACE_UPDATE, ("decreasing size of windows to %dx%d, depth=%d",
ToLines, ToCols, depth));
- for (each_window(wp)) {
+ for (each_window(SP_PARM, wp)) {
WINDOW *win = &(wp->win);
if (!(win->_flags & _ISPAD)) {
@@ -273,19 +303,19 @@ decrease_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
* parent, increase those to fit, then increase the contained window, etc.
*/
static int
-increase_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
+increase_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
{
bool found;
int depth = 0;
WINDOWLIST *wp;
- T((T_CALLED("increase_size(%d, %d)"), ToLines, ToCols));
+ T((T_CALLED("increase_size(%p, %d, %d)"), (void *) SP_PARM, ToLines, ToCols));
do {
found = FALSE;
TR(TRACE_UPDATE, ("increasing size of windows to %dx%d, depth=%d",
ToLines, ToCols, depth));
- for (each_window(wp)) {
+ for (each_window(SP_PARM, wp)) {
WINDOW *win = &(wp->win);
if (!(win->_flags & _ISPAD)) {
@@ -307,25 +337,26 @@ increase_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
* such as ungetch().
*/
NCURSES_EXPORT(int)
-resize_term(int ToLines, int ToCols)
+NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
{
int result = OK EXTRA_ARGS;
int was_stolen;
- T((T_CALLED("resize_term(%d,%d) old(%d,%d)"),
- ToLines, ToCols,
- screen_lines, screen_columns));
+ T((T_CALLED("resize_term(%p,%d,%d) old(%d,%d)"),
+ (void *) SP_PARM, ToLines, ToCols,
+ (SP_PARM == 0) ? -1 : screen_lines(SP_PARM),
+ (SP_PARM == 0) ? -1 : screen_columns(SP_PARM)));
- if (SP == 0) {
+ if (SP_PARM == 0) {
returnCode(ERR);
}
- _nc_lock_global(curses);
+ _nc_nonsp_lock_global(curses);
- was_stolen = (screen_lines - SP->_lines_avail);
- if (is_term_resized(ToLines, ToCols)) {
- int myLines = CurLines = screen_lines;
- int myCols = CurCols = screen_columns;
+ was_stolen = (screen_lines(SP_PARM) - SP_PARM->_lines_avail);
+ if (NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_ARGx ToLines, ToCols)) {
+ int myLines = CurLines = screen_lines(SP_PARM);
+ int myCols = CurCols = screen_columns(SP_PARM);
#ifdef TRACE
if (USE_TRACEF(TRACE_UPDATE)) {
@@ -333,33 +364,42 @@ resize_term(int ToLines, int ToCols)
_nc_unlock_global(tracef);
}
#endif
- if (ToLines > screen_lines) {
- increase_size(myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
+ if (ToLines > screen_lines(SP_PARM)) {
+ increase_size(NCURSES_SP_ARGx
+ myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
CurLines = myLines;
CurCols = myCols;
}
- if (ToCols > screen_columns) {
- increase_size(myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
+ if (ToCols > screen_columns(SP_PARM)) {
+ increase_size(NCURSES_SP_ARGx
+ myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
CurLines = myLines;
CurCols = myCols;
}
if (ToLines < myLines ||
ToCols < myCols) {
- decrease_size(ToLines, ToCols, was_stolen EXTRA_ARGS);
+ decrease_size(NCURSES_SP_ARGx ToLines, ToCols, was_stolen EXTRA_ARGS);
}
- screen_lines = lines = ToLines;
- screen_columns = columns = ToCols;
+ screen_lines(SP_PARM) = (NCURSES_SIZE_T) ToLines;
+ screen_columns(SP_PARM) = (NCURSES_SIZE_T) ToCols;
- SP->_lines_avail = lines - was_stolen;
+#ifdef USE_TERM_DRIVER
+ CallDriver_2(SP_PARM, setsize, ToLines, ToCols);
+#else
+ lines = (NCURSES_SIZE_T) ToLines;
+ columns = (NCURSES_SIZE_T) ToCols;
+#endif
- if (SP->oldhash) {
- FreeAndNull(SP->oldhash);
+ SP_PARM->_lines_avail = (NCURSES_SIZE_T) (ToLines - was_stolen);
+
+ if (SP_PARM->oldhash) {
+ FreeAndNull(SP_PARM->oldhash);
}
- if (SP->newhash) {
- FreeAndNull(SP->newhash);
+ if (SP_PARM->newhash) {
+ FreeAndNull(SP_PARM->newhash);
}
#ifdef TRACE
if (USE_TRACEF(TRACE_UPDATE)) {
@@ -378,11 +418,23 @@ resize_term(int ToLines, int ToCols)
SET_LINES(ToLines - was_stolen);
SET_COLS(ToCols);
- _nc_unlock_global(curses);
+ _nc_nonsp_unlock_global(curses);
returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+resize_term(int ToLines, int ToCols)
+{
+ int res = ERR;
+ _nc_sp_lock_global(curses);
+ res = NCURSES_SP_NAME(resize_term) (CURRENT_SCREEN, ToLines, ToCols);
+ _nc_sp_unlock_global(curses);
+ return (res);
+}
+#endif
+
/*
* This function reallocates NCURSES window structures. It is invoked in
* response to a SIGWINCH interrupt. Other user-defined windows may also need
@@ -392,34 +444,35 @@ resize_term(int ToLines, int ToCols)
* invoked directly from the signal handler.
*/
NCURSES_EXPORT(int)
-resizeterm(int ToLines, int ToCols)
+NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
{
int result = ERR;
- T((T_CALLED("resizeterm(%d,%d) old(%d,%d)"),
- ToLines, ToCols,
- screen_lines, screen_columns));
+ T((T_CALLED("resizeterm(%p, %d,%d) old(%d,%d)"),
+ (void *) SP_PARM, ToLines, ToCols,
+ (SP_PARM == 0) ? -1 : screen_lines(SP_PARM),
+ (SP_PARM == 0) ? -1 : screen_columns(SP_PARM)));
- if (SP != 0) {
+ if (SP_PARM != 0) {
result = OK;
- SP->_sig_winch = FALSE;
+ SP_PARM->_sig_winch = FALSE;
- if (is_term_resized(ToLines, ToCols)) {
+ if (NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_ARGx ToLines, ToCols)) {
#if USE_SIGWINCH
ripoff_t *rop;
- bool slk_visible = (SP != 0
- && SP->_slk != 0
- && !(SP->_slk->hidden));
+ bool slk_visible = (SP_PARM != 0
+ && SP_PARM->_slk != 0
+ && !(SP_PARM->_slk->hidden));
if (slk_visible) {
slk_clear();
}
#endif
- result = resize_term(ToLines, ToCols);
+ result = NCURSES_SP_NAME(resize_term) (NCURSES_SP_ARGx ToLines, ToCols);
#if USE_SIGWINCH
- _nc_ungetch(SP, KEY_RESIZE); /* so application can know this */
- clearok(curscr, TRUE); /* screen contents are unknown */
+ safe_ungetch(SP_PARM, KEY_RESIZE); /* so application can know this */
+ clearok(CurScreen(SP_PARM), TRUE); /* screen contents are unknown */
/* ripped-off lines are a special case: if we did not lengthen
* them, we haven't moved them either. repaint them, too.
@@ -429,7 +482,7 @@ resizeterm(int ToLines, int ToCols)
* not know which are really on top.
*/
for (each_ripoff(rop)) {
- if (rop->win != stdscr
+ if (rop->win != StdScreen(SP_PARM)
&& rop->win != 0
&& rop->line < 0) {
@@ -442,10 +495,9 @@ resizeterm(int ToLines, int ToCols)
/* soft-keys are a special case: we _know_ how to repaint them */
if (slk_visible) {
- slk_restore();
- slk_touch();
-
- slk_refresh();
+ NCURSES_SP_NAME(slk_restore) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(slk_touch) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_ARG);
}
#endif
}
@@ -453,3 +505,11 @@ resizeterm(int ToLines, int ToCols)
returnCode(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+resizeterm(int ToLines, int ToCols)
+{
+ return NCURSES_SP_NAME(resizeterm) (CURRENT_SCREEN, ToLines, ToCols);
+}
+#endif
diff --git a/ncurses/base/safe_sprintf.c b/ncurses/base/safe_sprintf.c
index 8fc5d89dd210..e73307bac282 100644
--- a/ncurses/base/safe_sprintf.c
+++ b/ncurses/base/safe_sprintf.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,7 +33,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: safe_sprintf.c,v 1.20 2007/04/21 22:28:06 tom Exp $")
+MODULE_ID("$Id: safe_sprintf.c,v 1.24 2010/06/05 22:22:27 tom Exp $")
#if USE_SAFE_SPRINTF
@@ -111,7 +111,7 @@ _nc_printf_length(const char *fmt, va_list ap)
}
sprintf(fmt_arg, "%d", ival);
fmt_len += strlen(fmt_arg);
- if ((format = realloc(format, fmt_len)) == 0) {
+ if ((format = _nc_doalloc(format, fmt_len)) == 0) {
return -1;
}
strcpy(&format[--f], fmt_arg);
@@ -214,13 +214,20 @@ _nc_printf_length(const char *fmt, va_list ap)
* Wrapper for vsprintf that allocates a buffer big enough to hold the result.
*/
NCURSES_EXPORT(char *)
-_nc_printf_string(const char *fmt, va_list ap)
+NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_DCLx
+ const char *fmt,
+ va_list ap)
{
char *result = 0;
if (fmt != 0) {
#if USE_SAFE_SPRINTF
- int len = _nc_printf_length(fmt, ap);
+ va_list ap2;
+ int len;
+
+ begin_va_copy(ap2, ap);
+ len = _nc_printf_length(fmt, ap2);
+ end_va_copy(ap2);
if ((int) my_length < len + 1) {
my_length = 2 * (len + 1);
@@ -237,12 +244,12 @@ _nc_printf_string(const char *fmt, va_list ap)
#define MyCols _nc_globals.safeprint_cols
#define MyRows _nc_globals.safeprint_rows
- if (screen_lines > MyRows || screen_columns > MyCols) {
- if (screen_lines > MyRows)
- MyRows = screen_lines;
- if (screen_columns > MyCols)
- MyCols = screen_columns;
- my_length = (MyRows * (MyCols + 1)) + 1;
+ if (screen_lines(SP_PARM) > MyRows || screen_columns(SP_PARM) > MyCols) {
+ if (screen_lines(SP_PARM) > MyRows)
+ MyRows = screen_lines(SP_PARM);
+ if (screen_columns(SP_PARM) > MyCols)
+ MyCols = screen_columns(SP_PARM);
+ my_length = (size_t) (MyRows * (MyCols + 1)) + 1;
my_buffer = typeRealloc(char, my_length, my_buffer);
}
@@ -262,3 +269,11 @@ _nc_printf_string(const char *fmt, va_list ap)
}
return result;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+_nc_printf_string(const char *fmt, va_list ap)
+{
+ return NCURSES_SP_NAME(_nc_printf_string) (CURRENT_SCREEN, fmt, ap);
+}
+#endif
diff --git a/ncurses/base/tries.c b/ncurses/base/tries.c
index c4263c7e50eb..ad85d229213d 100644
--- a/ncurses/base/tries.c
+++ b/ncurses/base/tries.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: tries.c,v 1.27 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: tries.c,v 1.30 2010/08/28 21:08:23 tom Exp $")
/*
* Expand a keycode into the string that it corresponds to, returning null if
@@ -72,7 +72,9 @@ _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len)
*((unsigned char *) (result + len)) = 128;
#ifdef TRACE
if (len == 0 && USE_TRACEF(TRACE_MAXIMUM)) {
- _tracef("expand_key %s %s", _nc_tracechar(SP, code), _nc_visbuf(result));
+ _tracef("expand_key %s %s",
+ _nc_tracechar(CURRENT_SCREEN, (int) code),
+ _nc_visbuf(result));
_nc_unlock_global(tracef);
}
#endif
@@ -87,7 +89,7 @@ _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len)
NCURSES_EXPORT(int)
_nc_remove_key(TRIES ** tree, unsigned code)
{
- T((T_CALLED("_nc_remove_key(%p,%d)"), tree, code));
+ T((T_CALLED("_nc_remove_key(%p,%d)"), (void *) tree, code));
if (code == 0)
returnCode(FALSE);
@@ -119,7 +121,7 @@ _nc_remove_key(TRIES ** tree, unsigned code)
NCURSES_EXPORT(int)
_nc_remove_string(TRIES ** tree, const char *string)
{
- T((T_CALLED("_nc_remove_string(%p,%s)"), tree, _nc_visbuf(string)));
+ T((T_CALLED("_nc_remove_string(%p,%s)"), (void *) tree, _nc_visbuf(string)));
if (string == 0 || *string == 0)
returnCode(FALSE);
diff --git a/ncurses/base/use_window.c b/ncurses/base/use_window.c
index f6408c37928e..8eb733919848 100644
--- a/ncurses/base/use_window.c
+++ b/ncurses/base/use_window.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,14 +32,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: use_window.c,v 1.8 2008/06/07 14:13:46 tom Exp $")
+MODULE_ID("$Id: use_window.c,v 1.9 2009/10/24 22:40:24 tom Exp $")
NCURSES_EXPORT(int)
use_window(WINDOW *win, NCURSES_WINDOW_CB func, void *data)
{
int code = OK;
- T((T_CALLED("use_window(%p,%p,%p)"), win, func, data));
+ T((T_CALLED("use_window(%p,%p,%p)"), (void *) win, func, data));
_nc_lock_global(curses);
code = func(win, data);
_nc_unlock_global(curses);
diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c
index f46085af59fa..9a6ea500727e 100644
--- a/ncurses/base/wresize.c
+++ b/ncurses/base/wresize.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,12 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1996-2002 *
+ * Author: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
#include <curses.priv.h>
-MODULE_ID("$Id: wresize.c,v 1.29 2008/06/07 13:59:01 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.34 2010/06/05 22:36:26 tom Exp $")
static int
cleanup_lines(struct ldat *data, int length)
@@ -53,10 +54,13 @@ repair_subwindows(WINDOW *cmp)
WINDOWLIST *wp;
struct ldat *pline = cmp->_line;
int row;
+#ifdef USE_SP_WINDOWLIST
+ SCREEN *sp = _nc_screen_of(cmp);
+#endif
_nc_lock_global(curses);
- for (each_window(wp)) {
+ for (each_window(SP_PARM, wp)) {
WINDOW *tst = &(wp->win);
if (tst->_parent == cmp) {
@@ -67,9 +71,9 @@ repair_subwindows(WINDOW *cmp)
tst->_parx = cmp->_maxx;
if (tst->_maxy + tst->_pary > cmp->_maxy)
- tst->_maxy = cmp->_maxy - tst->_pary;
+ tst->_maxy = (NCURSES_SIZE_T) (cmp->_maxy - tst->_pary);
if (tst->_maxx + tst->_parx > cmp->_maxx)
- tst->_maxx = cmp->_maxx - tst->_parx;
+ tst->_maxx = (NCURSES_SIZE_T) (cmp->_maxx - tst->_parx);
for (row = 0; row <= tst->_maxy; ++row) {
tst->_line[row].text = &pline[tst->_pary + row].text[tst->_parx];
@@ -93,7 +97,7 @@ wresize(WINDOW *win, int ToLines, int ToCols)
struct ldat *new_lines = 0;
#ifdef TRACE
- T((T_CALLED("wresize(%p,%d,%d)"), win, ToLines, ToCols));
+ T((T_CALLED("wresize(%p,%d,%d)"), (void *) win, ToLines, ToCols));
if (win) {
TR(TRACE_UPDATE, ("...beg (%ld, %ld), max(%ld,%ld), reg(%ld,%ld)",
(long) win->_begy, (long) win->_begx,
@@ -153,7 +157,8 @@ wresize(WINDOW *win, int ToLines, int ToCols)
if (!(win->_flags & _SUBWIN)) {
if (row <= size_y) {
if (ToCols != size_x) {
- if ((s = typeMalloc(NCURSES_CH_T, ToCols + 1)) == 0)
+ s = typeMalloc(NCURSES_CH_T, (unsigned) ToCols + 1);
+ if (s == 0)
returnCode(cleanup_lines(new_lines, row));
for (col = 0; col <= ToCols; ++col) {
s[col] = (col <= size_x
@@ -164,12 +169,14 @@ wresize(WINDOW *win, int ToLines, int ToCols)
s = win->_line[row].text;
}
} else {
- if ((s = typeMalloc(NCURSES_CH_T, ToCols + 1)) == 0)
+ s = typeMalloc(NCURSES_CH_T, (unsigned) ToCols + 1);
+ if (s == 0)
returnCode(cleanup_lines(new_lines, row));
for (col = 0; col <= ToCols; ++col)
s[col] = win->_nc_bkgd;
}
} else {
+ assert(pline != 0);
s = &pline[win->_pary + row].text[win->_parx];
}
@@ -181,11 +188,11 @@ wresize(WINDOW *win, int ToLines, int ToCols)
if ((ToCols != size_x) || (row > size_y)) {
if (end >= begin) { /* growing */
if (new_lines[row].firstchar < begin)
- new_lines[row].firstchar = begin;
+ new_lines[row].firstchar = (NCURSES_SIZE_T) begin;
} else { /* shrinking */
new_lines[row].firstchar = 0;
}
- new_lines[row].lastchar = ToCols;
+ new_lines[row].lastchar = (NCURSES_SIZE_T) ToCols;
}
new_lines[row].text = s;
}
@@ -212,8 +219,8 @@ wresize(WINDOW *win, int ToLines, int ToCols)
* Finally, adjust the parameters showing screen size and cursor
* position:
*/
- win->_maxx = ToCols;
- win->_maxy = ToLines;
+ win->_maxx = (NCURSES_SIZE_T) ToCols;
+ win->_maxy = (NCURSES_SIZE_T) ToLines;
if (win->_regtop > win->_maxy)
win->_regtop = win->_maxy;
diff --git a/ncurses/build.priv.h b/ncurses/build.priv.h
new file mode 100644
index 000000000000..be00d73ea430
--- /dev/null
+++ b/ncurses/build.priv.h
@@ -0,0 +1,108 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+
+
+/*
+ * $Id: build.priv.h,v 1.6 2010/05/22 20:30:35 tom Exp $
+ *
+ * build.priv.h
+ *
+ * This is a reduced version of curses.priv.h, for build-time utilties.
+ * Because it has fewer dependencies, this simplifies cross-compiling.
+ *
+ */
+
+#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>
+
+#include <assert.h>
+#include <stdio.h>
+
+#include <errno.h>
+
+#include <curses.h> /* we'll use -Ipath directive to get the right one! */
+
+/* usually in <unistd.h> */
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+
+#define FreeAndNull(p) free(p); p = 0
+#define UChar(c) ((unsigned char)(c))
+#define SIZEOF(v) (sizeof(v) / sizeof(v[0]))
+
+#include <nc_alloc.h>
+
+/* declare these, to avoid needing term.h */
+#if BROKEN_LINKER || USE_REENTRANT
+#define NCURSES_ARRAY(name) \
+ NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, name)
+
+NCURSES_ARRAY(boolnames);
+NCURSES_ARRAY(boolfnames);
+NCURSES_ARRAY(numnames);
+NCURSES_ARRAY(numfnames);
+NCURSES_ARRAY(strnames);
+NCURSES_ARRAY(strfnames);
+#endif
+
+#if NO_LEAKS
+NCURSES_EXPORT(void) _nc_names_leaks(void);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CURSES_PRIV_H */
diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
index 29e131953415..49346c122a70 100644
--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,11 +30,11 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
-
/*
- * $Id: curses.priv.h,v 1.394 2008/10/04 21:37:45 tom Exp $
+ * $Id: curses.priv.h,v 1.475 2011/01/22 21:10:19 tom Exp $
*
* curses.priv.h
*
@@ -45,6 +45,7 @@
#ifndef CURSES_PRIV_H
#define CURSES_PRIV_H 1
+/* *INDENT-OFF* */
#include <ncurses_dll.h>
@@ -60,6 +61,7 @@ extern "C" {
#define MODULE_ID(id) /*nothing*/
#endif
+#include <stddef.h> /* for offsetof */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
@@ -97,8 +99,6 @@ extern "C" {
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
@@ -178,6 +178,20 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
#endif
/*
+ * If we have va_copy(), use it for assigning va_list's.
+ */
+#if defined(HAVE___VA_COPY)
+#define begin_va_copy(dst,src) __va_copy(dst, src)
+#define end_va_copy(dst) va_end(dst)
+#elif defined(va_copy) || defined(HAVE_VA_COPY)
+#define begin_va_copy(dst,src) va_copy(dst, src)
+#define end_va_copy(dst) va_end(dst)
+#else
+#define begin_va_copy(dst,src) (dst) = (src)
+#define end_va_copy(dst) /* nothing */
+#endif
+
+/*
* Scroll hints are useless when hashmap is used
*/
#if !USE_SCROLL_HINTS
@@ -195,6 +209,15 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
#endif
/*
+ * Options for terminal drivers, etc...
+ */
+#ifdef USE_TERM_DRIVER
+#define USE_SP_RIPOFF 1
+#define USE_SP_TERMTYPE 1
+#define USE_SP_WINDOWLIST 1
+#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
@@ -247,6 +270,7 @@ color_t;
#define _nc_bkgd _bkgrnd
#else
#undef _XOPEN_SOURCE_EXTENDED
+#undef _XPG5
#define _nc_bkgd _bkgd
#define wgetbkgrnd(win, wch) *wch = win->_bkgd
#define wbkgrnd wbkgd
@@ -257,39 +281,127 @@ color_t;
#define NCURSES_OPAQUE 0
#include <curses.h> /* we'll use -Ipath directive to get the right one! */
+
+/*
+ * If curses.h did not expose the SCREEN-functions, then we do not need the
+ * parameter in the corresponding unextended functions.
+ */
+
+#define USE_SP_FUNC_SUPPORT NCURSES_SP_FUNCS
+#define USE_EXT_SP_FUNC_SUPPORT (NCURSES_SP_FUNCS && NCURSES_EXT_FUNCS)
+
+#if NCURSES_SP_FUNCS
+#define SP_PARM sp /* use parameter */
+#define NCURSES_SP_ARG SP_PARM
+#define NCURSES_SP_DCL SCREEN *NCURSES_SP_ARG
+#define NCURSES_SP_DCL0 NCURSES_SP_DCL
+#define NCURSES_SP_ARGx NCURSES_SP_ARG,
+#define NCURSES_SP_DCLx SCREEN *NCURSES_SP_ARGx
+#else
+#define SP_PARM SP /* use global variable */
+#define NCURSES_SP_ARG
+#define NCURSES_SP_DCL
+#define NCURSES_SP_DCL0 void
+#define NCURSES_SP_ARGx
+#define NCURSES_SP_DCLx
+#endif
+
+#include <nc_panel.h>
+
+#define IsPreScreen(sp) (((sp) != 0) && sp->_prescreen)
+#define HasTerminal(sp) (((sp) != 0) && (0 != ((sp)->_term)))
+#define IsValidScreen(sp) (HasTerminal(sp) && !IsPreScreen(sp))
+
+#if BROKEN_LINKER || USE_REENTRANT
+#define CurTerm _nc_prescreen._cur_term
+#else
+#define CurTerm cur_term
+#endif
+
+#if NCURSES_SP_FUNCS
+#define TerminalOf(sp) ((sp) ? ((sp)->_term ? (sp)->_term : CurTerm) : CurTerm)
+#else
+#define TerminalOf(sp) CurTerm
+#endif
+
#include <term.h>
+
+/*
+ * Reduce dependency on cur_term global by using terminfo data from SCREEN's
+ * pointer to this data.
+ */
+#ifdef USE_SP_TERMTYPE
+#undef CUR
+#endif
+
+#define SP_TERMTYPE TerminalOf(sp)->type.
+
#include <term_entry.h>
+
#include <nc_tparm.h>
-#if NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT
+/*
+ * Use these macros internally, to make tracing less verbose. But leave the
+ * option for compiling the tracing into the library.
+ */
+#if 1
+#define ColorPair(n) NCURSES_BITS(n, 0)
+#define PairNumber(a) (NCURSES_CAST(int,(((unsigned long)(a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
+#else
+#define ColorPair(pair) COLOR_PAIR(pair)
+#define PairNumber(attr) PAIR_NUMBER(attr)
+#endif
+
+#define unColor(n) unColor2(AttrOf(n))
+#define unColor2(a) ((a) & ALL_BUT_COLOR)
+
+/*
+ * Extended-colors stores the color pair in a separate struct-member than the
+ * attributes. But for compatibility, we handle most cases where a program
+ * written for non-extended colors stores the color in the attributes by
+ * checking for a color pair in both places.
+ */
+#if NCURSES_EXT_COLORS
#define if_EXT_COLORS(stmt) stmt
-#define NetPair(value,p) (value).ext_color = (p), \
- AttrOf(value) &= ALL_BUT_COLOR, \
- AttrOf(value) |= (A_COLOR & COLOR_PAIR((p > 255) ? 255 : p))
-#define SetPair(value,p) (value).ext_color = (p)
-#define GetPair(value) (value).ext_color
-#define unColor(n) (AttrOf(n) & ALL_BUT_COLOR)
-#define GET_WINDOW_PAIR(w) (w)->_color
+#define SetPair(value,p) SetPair2((value).ext_color, AttrOf(value), p)
+#define SetPair2(c,a,p) c = (p), \
+ a = (unColor2(a) | (A_COLOR & ColorPair(oldColor(c))))
+#define GetPair(value) GetPair2((value).ext_color, AttrOf(value))
+#define GetPair2(c,a) ((c) ? (c) : PairNumber(a))
+#define oldColor(p) (((p) > 255) ? 255 : (p))
+#define GET_WINDOW_PAIR(w) GetPair2((w)->_color, (w)->_attrs)
#define SET_WINDOW_PAIR(w,p) (w)->_color = (p)
#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b))
-#define VIDATTR(attr, pair) vid_attr(attr, pair, 0)
+
+#if NCURSES_SP_FUNCS
+#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vid_attr)(sp, attr, pair, 0)
#else
+#define VIDATTR(sp,attr,pair) vid_attr(attr, pair, 0)
+#endif
+
+#else /* !NCURSES_EXT_COLORS */
+
#define if_EXT_COLORS(stmt) /* nothing */
#define SetPair(value,p) RemAttr(value, A_COLOR), \
- SetAttr(value, AttrOf(value) | (A_COLOR & COLOR_PAIR(p)))
-#define GetPair(value) PAIR_NUMBER(AttrOf(value))
-#define unColor(n) (AttrOf(n) & ALL_BUT_COLOR)
-#define GET_WINDOW_PAIR(w) PAIR_NUMBER(WINDOW_ATTRS(w))
+ SetAttr(value, AttrOf(value) | (A_COLOR & (attr_t) ColorPair(p)))
+#define GetPair(value) PairNumber(AttrOf(value))
+#define GET_WINDOW_PAIR(w) PairNumber(WINDOW_ATTRS(w))
#define SET_WINDOW_PAIR(w,p) WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \
- WINDOW_ATTRS(w) |= (A_COLOR & COLOR_PAIR(p))
+ WINDOW_ATTRS(w) |= (A_COLOR & (attr_t) ColorPair(p))
#define SameAttrOf(a,b) (AttrOf(a) == AttrOf(b))
-#define VIDATTR(attr, pair) vidattr(attr)
+
+#if NCURSES_SP_FUNCS
+#define VIDATTR(sp,attr,pair) NCURSES_SP_NAME(vidattr)(sp, attr)
+#else
+#define VIDATTR(sp,attr,pair) vidattr(attr)
#endif
+#endif /* NCURSES_EXT_COLORS */
+
#if NCURSES_NO_PADDING
#define GetNoPadding(sp) ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding)
#define SetNoPadding(sp) _nc_set_no_padding(sp)
-extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *);
+extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *);
#else
#define GetNoPadding(sp) FALSE
#define SetNoPadding(sp) /*nothing*/
@@ -301,18 +413,37 @@ extern NCURSES_EXPORT(void) _nc_set_no_padding(SCREEN *);
#define GET_SCREEN_PAIR(s) GetPair(SCREEN_ATTRS(s))
#define SET_SCREEN_PAIR(s,p) SetPair(SCREEN_ATTRS(s), p)
+#if USE_REENTRANT || NCURSES_SP_FUNCS
+NCURSES_EXPORT(int *) _nc_ptr_Lines (SCREEN *);
+NCURSES_EXPORT(int *) _nc_ptr_Cols (SCREEN *);
+NCURSES_EXPORT(int *) _nc_ptr_Tabsize (SCREEN *);
+NCURSES_EXPORT(int *) _nc_ptr_Escdelay (SCREEN *);
+#endif
+
#if USE_REENTRANT
-NCURSES_EXPORT(int *) _nc_ptr_Lines (void);
-NCURSES_EXPORT(int *) _nc_ptr_Cols (void);
-#define ptrLines() (SP ? &(SP->_LINES) : &(_nc_prescreen._LINES))
-#define ptrCols() (SP ? &(SP->_COLS) : &(_nc_prescreen._COLS))
-#define SET_LINES(value) *_nc_ptr_Lines() = value
-#define SET_COLS(value) *_nc_ptr_Cols() = value
+
+#define ptrLines(sp) (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES))
+#define ptrCols(sp) (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS))
+#define ptrTabsize(sp) (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE))
+#define ptrEscdelay(sp) (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY))
+
+#define SET_LINES(value) *_nc_ptr_Lines(SP_PARM) = value
+#define SET_COLS(value) *_nc_ptr_Cols(SP_PARM) = value
+#define SET_TABSIZE(value) *_nc_ptr_Tabsize(SP_PARM) = value
+#define SET_ESCDELAY(value) *_nc_ptr_Escdelay(SP_PARM) = value
+
#else
-#define ptrLines() &LINES
-#define ptrCols() &COLS
-#define SET_LINES(value) LINES = value
-#define SET_COLS(value) COLS = value
+
+#define ptrLines(sp) &LINES
+#define ptrCols(sp) &COLS
+#define ptrTabsize(sp) &TABSIZE
+#define ptrEscdelay(sp) &ESCDELAY
+
+#define SET_LINES(value) LINES = value
+#define SET_COLS(value) COLS = value
+#define SET_TABSIZE(value) TABSIZE = value
+#define SET_ESCDELAY(value) ESCDELAY = value
+
#endif
#define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \
@@ -326,6 +457,19 @@ NCURSES_EXPORT(int *) _nc_ptr_Cols (void);
data.__data.__nusers)
#define TR_GLOBAL_MUTEX(name) TR_MUTEX(_nc_globals.mutex_##name)
+#if USE_WEAK_SYMBOLS
+#if defined(__GNUC__)
+# if defined __USE_ISOC99
+# define _cat_pragma(exp) _Pragma(#exp)
+# define _weak_pragma(exp) _cat_pragma(weak name)
+# else
+# define _weak_pragma(exp)
+# endif
+# define _declare(name) __extension__ extern __typeof__(name) name
+# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
+#endif
+#endif
+
#ifdef USE_PTHREADS
#if USE_REENTRANT
@@ -343,22 +487,10 @@ extern NCURSES_EXPORT(int) _nc_mutex_unlock(pthread_mutex_t *);
#error POSIX threads requires --enable-reentrant option
#endif
-#if USE_WEAK_SYMBOLS
-#if defined(__GNUC__)
-# if defined __USE_ISOC99
-# define _cat_pragma(exp) _Pragma(#exp)
-# define _weak_pragma(exp) _cat_pragma(weak name)
-# else
-# define _weak_pragma(exp)
-# endif
-# define _declare(name) __extension__ extern __typeof__(name) name
-# define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
-#endif
-#endif
-
#ifdef USE_PTHREADS
# if USE_WEAK_SYMBOLS
weak_symbol(pthread_sigmask);
+weak_symbol(pthread_kill);
weak_symbol(pthread_self);
weak_symbol(pthread_equal);
weak_symbol(pthread_mutex_init);
@@ -380,6 +512,19 @@ extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
#else /* !USE_PTHREADS */
+#if USE_PTHREADS_EINTR
+# if USE_WEAK_SYMBOLS
+#include <pthread.h>
+weak_symbol(pthread_sigmask);
+weak_symbol(pthread_kill);
+weak_symbol(pthread_self);
+weak_symbol(pthread_equal);
+extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
+# undef sigprocmask
+# define sigprocmask _nc_sigprocmask
+# endif
+#endif /* USE_PTHREADS_EINTR */
+
#define _nc_init_pthreads() /* nothing */
#define _nc_mutex_init(obj) /* nothing */
@@ -389,6 +534,36 @@ extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
#endif /* USE_PTHREADS */
+/*
+ * When using sp-funcs, locks are targeted to SCREEN-level granularity.
+ * So the locking is done in the non-sp-func (which calls the sp-func) rather
+ * than in the sp-func itself.
+ *
+ * Use the _nc_nonsp_XXX functions in the function using "NCURSES_SP_NAME()".
+ * Use the _nc_sp_XXX functions in the function using "#if NCURSES_SP_FUNCS".
+ */
+#if NCURSES_SP_FUNCS
+
+#define _nc_nonsp_lock_global(name) /* nothing */
+#define _nc_nonsp_try_global(name) 0
+#define _nc_nonsp_unlock_global(name) /* nothing */
+
+#define _nc_sp_lock_global(name) _nc_lock_global(name)
+#define _nc_sp_try_global(name) _nc_try_global(name)
+#define _nc_sp_unlock_global(name) _nc_unlock_global(name)
+
+#else
+
+#define _nc_nonsp_lock_global(name) _nc_lock_global(name)
+#define _nc_nonsp_try_global(name) _nc_try_global(name)
+#define _nc_nonsp_unlock_global(name) _nc_unlock_global(name)
+
+#define _nc_sp_lock_global(name) /* nothing */
+#define _nc_sp_try_global(name) 0
+#define _nc_sp_unlock_global(name) /* nothing */
+
+#endif
+
#if HAVE_GETTIMEOFDAY
# define PRECISE_GETTIME 1
# define TimeType struct timeval
@@ -403,12 +578,14 @@ extern NCURSES_EXPORT(int) _nc_sigprocmask(int, const sigset_t *, sigset_t *);
typedef unsigned colorpair_t; /* type big enough to store PAIR_OF() */
#define C_SHIFT 9 /* 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))
+#define PAIR_OF(fg, bg) (colorpair_t) ((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK))
+#define FORE_OF(c) (((c) >> C_SHIFT) & C_MASK)
+#define BACK_OF(c) ((c) & C_MASK)
#define isDefaultColor(c) ((c) >= COLOR_DEFAULT || (c) < 0)
#define COLOR_DEFAULT C_MASK
-#if defined(USE_TERMLIB) && !defined(NEED_NCURSES_CH_T)
+#if defined(USE_BUILD_CC) || (defined(USE_TERMLIB) && !defined(NEED_NCURSES_CH_T))
#undef NCURSES_CH_T /* this is not a termlib feature */
#define NCURSES_CH_T void /* ...but we need a pointer in SCREEN */
@@ -434,6 +611,9 @@ typedef enum {
#if USE_SYSMOUSE
,M_SYSMOUSE /* FreeBSD sysmouse on console */
#endif
+#ifdef USE_TERM_DRIVER
+ ,M_TERM_DRIVER /* Win32 console, etc */
+#endif
} MouseType;
/*
@@ -452,7 +632,7 @@ typedef struct {
struct _SLK;
-#ifndef USE_TERMLIB
+#if !(defined(USE_TERMLIB) || defined(USE_BUILD_CC))
typedef struct
{
@@ -464,13 +644,13 @@ typedef struct
} slk_ent;
typedef struct _SLK {
- char dirty; /* all labels have changed */
- char hidden; /* soft labels are hidden */
- WINDOW *win;
+ bool dirty; /* all labels have changed */
+ bool 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 */
+ short maxlab; /* number of available labels */
+ short labcnt; /* number of allocated labels */
+ short maxlen; /* length of labels */
NCURSES_CH_T attr; /* soft label attribute */
} SLK;
@@ -493,10 +673,10 @@ typedef int (*TYPE_Gpm_Open) (Gpm_Connect *, int);
typedef int (*TYPE_Gpm_Close) (void);
typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *);
-#define my_gpm_fd SP->_mouse_gpm_fd
-#define my_Gpm_Open SP->_mouse_Gpm_Open
-#define my_Gpm_Close SP->_mouse_Gpm_Close
-#define my_Gpm_GetEvent SP->_mouse_Gpm_GetEvent
+#define my_gpm_fd SP_PARM->_mouse_gpm_fd
+#define my_Gpm_Open SP_PARM->_mouse_Gpm_Open
+#define my_Gpm_Close SP_PARM->_mouse_Gpm_Close
+#define my_Gpm_GetEvent SP_PARM->_mouse_Gpm_GetEvent
#else
/* link statically to GPM */
#define my_gpm_fd &gpm_fd
@@ -563,8 +743,10 @@ typedef struct {
*/
#if MIXEDCASE_FILENAMES
#define LEAF_FMT "%c"
+#define LEAF_LEN 1
#else
#define LEAF_FMT "%02x"
+#define LEAF_LEN 2
#endif
/*
@@ -577,6 +759,13 @@ typedef struct {
#define TRACEMSE_MAX (80 + (5 * 10) + (32 * 15))
#define TRACEMSE_FMT "id %2d at (%2d, %2d, %2d) state %4lx = {" /* } */
+#ifdef USE_TERM_DRIVER
+struct DriverTCB; /* Terminal Control Block forward declaration */
+#define INIT_TERM_DRIVER() _nc_globals.term_driver = _nc_get_driver
+#else
+#define INIT_TERM_DRIVER() /* nothing */
+#endif
+
/*
* Global data which is not specific to a screen.
*/
@@ -609,8 +798,10 @@ typedef struct {
int tgetent_index;
long tgetent_sequence;
+#ifndef USE_SP_WINDOWLIST
WINDOWLIST *_nc_windowlist;
-#define _nc_windows _nc_globals._nc_windowlist
+#define WindowList(sp) _nc_globals._nc_windowlist
+#endif
#if USE_HOME_TERMINFO
char *home_terminfo;
@@ -621,6 +812,10 @@ typedef struct {
int safeprint_rows;
#endif
+#ifdef USE_TERM_DRIVER
+ int (*term_driver)(struct DriverTCB*, const char*, int*);
+#endif
+
#ifdef TRACE
bool init_trace;
char trace_fname[PATH_MAX];
@@ -644,7 +839,9 @@ typedef struct {
char traceatr_color_buf[2][80];
int traceatr_color_sel;
int traceatr_color_last;
-
+#if !defined(USE_PTHREADS) && USE_REENTRANT
+ int nested_tracef;
+#endif
#endif /* TRACE */
#ifdef USE_PTHREADS
@@ -655,6 +852,9 @@ typedef struct {
int use_pthreads;
#define _nc_use_pthreads _nc_globals.use_pthreads
#endif
+#if USE_PTHREADS_EINTR
+ pthread_t read_thread; /* The reading thread */
+#endif
} NCURSES_GLOBALS;
extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;
@@ -669,17 +869,22 @@ typedef struct {
bool use_env;
bool filter_mode;
attr_t previous_attr;
+#ifndef USE_SP_RIPOFF
ripoff_t rippedoff[N_RIPS];
ripoff_t *rsp;
+#endif
TPARM_STATE tparm_state;
TTY *saved_tty; /* savetty/resetty information */
#if NCURSES_NO_PADDING
bool _no_padding; /* flag to set if padding disabled */
#endif
+ NCURSES_SP_OUTC _outch; /* output handler if not putc */
#if BROKEN_LINKER || USE_REENTRANT
chtype *real_acs_map;
int _LINES;
int _COLS;
+ int _TABSIZE;
+ int _ESCDELAY;
TERMINAL *_cur_term;
#ifdef TRACE
long _outchars;
@@ -688,8 +893,16 @@ typedef struct {
#endif
} NCURSES_PRESCREEN;
-#define ripoff_sp _nc_prescreen.rsp
-#define ripoff_stack _nc_prescreen.rippedoff
+/*
+ * Use screen-specific ripoff data (for softkeys) rather than global.
+ */
+#ifdef USE_SP_RIPOFF
+#define safe_ripoff_sp (sp)->rsp
+#define safe_ripoff_stack (sp)->rippedoff
+#else
+#define safe_ripoff_sp _nc_prescreen.rsp
+#define safe_ripoff_stack _nc_prescreen.rippedoff
+#endif
extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen;
@@ -703,6 +916,8 @@ struct screen {
char *_setbuf; /* buffered I/O for output */
bool _filtered; /* filter() was called */
bool _buffered; /* setvbuf uses _setbuf data */
+ bool _prescreen; /* is in prescreen phase */
+ bool _use_env; /* LINES & COLS from environment? */
int _checkfd; /* filedesc for typeahead check */
TERMINAL *_term; /* terminal type information */
TTY _saved_tty; /* savetty/resetty information */
@@ -716,6 +931,10 @@ struct screen {
WINDOW *_newscr; /* virtual screen to be updated to */
WINDOW *_stdscr; /* screen's full-window context */
+#define CurScreen(sp) (sp)->_curscr
+#define NewScreen(sp) (sp)->_newscr
+#define StdScreen(sp) (sp)->_stdscr
+
TRIES *_keytry; /* "Try" for use with keypad mode */
TRIES *_key_ok; /* Disabled keys via keyok(,FALSE) */
bool _tried; /* keypad mode was initialized */
@@ -794,11 +1013,13 @@ struct screen {
int _color_count; /* count of colors in palette */
colorpair_t *_color_pairs; /* screen's color pair list */
int _pair_count; /* count of color pairs */
+ int _pair_limit; /* actual limit 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 */
+ int _default_pairs; /* count pairs using default color */
#endif
chtype _ok_attributes; /* valid attributes for terminal */
chtype _xmc_suppress; /* attributes to suppress if xmc */
@@ -820,8 +1041,6 @@ struct screen {
*/
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.
@@ -871,11 +1090,18 @@ struct screen {
int _sysmouse_new_buttons;
#endif
+#ifdef USE_TERM_DRIVER
+ MEVENT _drv_mouse_fifo[FIFO_SIZE];
+ int _drv_mouse_head;
+ int _drv_mouse_tail;
+ int _drv_mouse_old_buttons;
+ int _drv_mouse_new_buttons;
+#endif
/*
* This supports automatic resizing
*/
#if USE_SIZECHANGE
- int (*_resize)(int,int);
+ int (*_resize)(NCURSES_SP_DCLx int y, int x);
#endif
/*
@@ -895,7 +1121,7 @@ struct screen {
int _oldnum_size;
bool _cleanup; /* cleanup after int/quit signal */
- int (*_outch)(int); /* output handler if not putc */
+ NCURSES_SP_OUTC _outch; /* output handler if not putc */
int _legacy_coding; /* see use_legacy_coding() */
@@ -915,6 +1141,15 @@ struct screen {
char tracechr_buf[40];
char tracemse_buf[TRACEMSE_MAX];
#endif
+#ifdef USE_SP_WINDOWLIST
+ WINDOWLIST* _windowlist;
+#define WindowList(sp) (sp)->_windowlist
+#endif
+ NCURSES_OUTC jump;
+
+ ripoff_t rippedoff[N_RIPS];
+ ripoff_t *rsp;
+
/*
* ncurses/ncursesw are the same up to this point.
*/
@@ -930,10 +1165,10 @@ extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain;
extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
WINDOWLIST {
- WINDOW win; /* first, so WINDOW_EXT() works */
WINDOWLIST *next;
SCREEN *screen; /* screen containing the window */
-#ifdef _XOPEN_SOURCE_EXTENDED
+ WINDOW win; /* WINDOW_EXT() needs to account for offset */
+#ifdef NCURSES_WIDECHAR
char addch_work[(MB_LEN_MAX * 9) + 1];
unsigned addch_used; /* number of bytes in addch_work[] */
int addch_x; /* x-position for addch_work[] */
@@ -941,7 +1176,21 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#endif
};
-#define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field)
+#define WINDOW_EXT(w,m) (((WINDOWLIST *)((void *)((char *)(w) - offsetof(WINDOWLIST, win))))->m)
+
+#define SP_PRE_INIT(sp) \
+ 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->_cursor = -1; \
+ WindowList(sp) = 0; \
+ sp->_outch = NCURSES_SP_NAME(_nc_outch); \
+ sp->jump = 0 \
/* usually in <limits.h> */
#ifndef UCHAR_MAX
@@ -1017,6 +1266,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define RESET_OUTCHARS() COUNT_OUTCHARS(-_nc_outchars)
#define UChar(c) ((unsigned char)(c))
+#define UShort(c) ((unsigned short)(c))
#define ChCharOf(c) ((c) & (chtype)A_CHARTEXT)
#define ChAttrOf(c) ((c) & (chtype)A_ATTRIBUTES)
@@ -1061,9 +1311,9 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define SetChar(ch,c,a) do { \
NCURSES_CH_T *_cp = &ch; \
memset(_cp, 0, sizeof(ch)); \
- _cp->chars[0] = (c); \
+ _cp->chars[0] = (wchar_t) (c); \
_cp->attr = (a); \
- if_EXT_COLORS(SetPair(ch, PAIR_NUMBER(a))); \
+ if_EXT_COLORS(SetPair(ch, PairNumber(a))); \
} while (0)
#define CHREF(wch) (&wch)
#define CHDEREF(wch) (*wch)
@@ -1082,14 +1332,14 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
PUTC_ch = (ch).chars[PUTC_i]; \
if (PUTC_ch == L'\0') \
break; \
- PUTC_n = wcrtomb(PUTC_buf, \
- (ch).chars[PUTC_i], &PUT_st); \
+ PUTC_n = (int) wcrtomb(PUTC_buf, \
+ (ch).chars[PUTC_i], &PUT_st); \
if (PUTC_n <= 0) { \
if (PUTC_ch && is8bits(PUTC_ch) && PUTC_i == 0) \
putc(PUTC_ch,b); \
break; \
} \
- fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b); \
+ IGNORE_RC(fwrite(PUTC_buf, (unsigned) PUTC_n, 1, b)); \
} \
COUNT_OUTCHARS(PUTC_i); \
} } } while (0)
@@ -1105,14 +1355,14 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
* zero. Otherwise we can use those bits to tell if a cell is the
* first or extension part of a wide character.
*/
-#define WidecExt(ch) (AttrOf(ch) & A_CHARTEXT)
+#define WidecExt(ch) (int) (AttrOf(ch) & A_CHARTEXT)
#define isWidecBase(ch) (WidecExt(ch) == 1)
#define isWidecExt(ch) (WidecExt(ch) > 1 && WidecExt(ch) < 32)
#define SetWidecExt(dst, ext) AttrOf(dst) &= ~A_CHARTEXT, \
- AttrOf(dst) |= (ext + 1)
+ AttrOf(dst) |= (attr_t) (ext + 1)
#define if_WIDEC(code) code
-#define Charable(ch) ((SP != 0 && SP->_legacy_coding) \
+#define Charable(ch) ((SP_PARM != 0 && SP_PARM->_legacy_coding) \
|| (AttrOf(ch) & A_ALTCHARSET) \
|| (!isWidecExt(ch) && \
(ch).chars[1] == L'\0' && \
@@ -1162,25 +1412,25 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
#define CHANGED_CELL(line,col) \
if (line->firstchar == _NOCHANGE) \
- line->firstchar = line->lastchar = col; \
+ line->firstchar = line->lastchar = (NCURSES_SIZE_T) col; \
else if ((col) < line->firstchar) \
- line->firstchar = col; \
+ line->firstchar = (NCURSES_SIZE_T) col; \
else if ((col) > line->lastchar) \
- line->lastchar = col
+ line->lastchar = (NCURSES_SIZE_T) col
#define CHANGED_RANGE(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
- line->firstchar = start; \
+ line->firstchar = (NCURSES_SIZE_T) start; \
if (line->lastchar == _NOCHANGE \
|| line->lastchar < (end)) \
- line->lastchar = end
+ line->lastchar = (NCURSES_SIZE_T) end
#define CHANGED_TO_EOL(line,start,end) \
if (line->firstchar == _NOCHANGE \
|| line->firstchar > (start)) \
- line->firstchar = start; \
- line->lastchar = end
+ line->firstchar = (NCURSES_SIZE_T) start; \
+ line->lastchar = (NCURSES_SIZE_T) end
#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
@@ -1214,8 +1464,8 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
* Standardize/simplify common loops
*/
#define each_screen(p) p = _nc_screen_chain; p != 0; p = (p)->_next_screen
-#define each_window(p) p = _nc_windows; p != 0; p = (p)->next
-#define each_ripoff(p) p = ripoff_stack; (p - ripoff_stack) < N_RIPS; ++p
+#define each_window(sp,p) p = WindowList(sp); p != 0; p = (p)->next
+#define each_ripoff(p) p = safe_ripoff_stack; (p - safe_ripoff_stack) < N_RIPS; ++p
/*
* Prefixes for call/return points of library function traces. We use these to
@@ -1256,15 +1506,22 @@ extern NCURSES_EXPORT(void) _nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE
#define TR(n, a) if (USE_TRACEF(n)) _nc_locked_tracef a
#define T(a) TR(TRACE_CALLS, a)
-#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
+#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
+#define TRACE_RETURN2(value,dst,src) return _nc_retrace_##dst##_##src(value)
+#define TRACE_RETURN_SP(value,type) return _nc_retrace_##type(SP_PARM, value)
+
+#define NonNull(s) ((s) != 0 ? s : "<null>")
#define returnAttr(code) TRACE_RETURN(code,attr_t)
#define returnBits(code) TRACE_RETURN(code,unsigned)
#define returnBool(code) TRACE_RETURN(code,bool)
#define returnCPtr(code) TRACE_RETURN(code,cptr)
#define returnCVoidPtr(code) TRACE_RETURN(code,cvoid_ptr)
-#define returnChar(code) TRACE_RETURN(code,chtype)
+#define returnChar(code) TRACE_RETURN(code,char)
+#define returnChtype(code) TRACE_RETURN(code,chtype)
#define returnCode(code) TRACE_RETURN(code,int)
+#define returnIntAttr(code) TRACE_RETURN2(code,int,attr_t)
+#define returnMMask(code) TRACE_RETURN_SP(code,mmask_t)
#define returnPtr(code) TRACE_RETURN(code,ptr)
#define returnSP(code) TRACE_RETURN(code,sp)
#define returnVoid T((T_RETURN(""))); return
@@ -1282,7 +1539,10 @@ 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(const char *) _nc_retrace_cptr (const char *);
+extern NCURSES_EXPORT(char) _nc_retrace_char (char);
extern NCURSES_EXPORT(int) _nc_retrace_int (int);
+extern NCURSES_EXPORT(int) _nc_retrace_int_attr_t (attr_t);
+extern NCURSES_EXPORT(mmask_t) _nc_retrace_mmask_t (SCREEN *, mmask_t);
extern NCURSES_EXPORT(unsigned) _nc_retrace_unsigned (unsigned);
extern NCURSES_EXPORT(void *) _nc_retrace_void_ptr (void *);
extern NCURSES_EXPORT(void) _nc_fifo_dump (SCREEN *);
@@ -1322,8 +1582,11 @@ extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int);
#define returnBool(code) return code
#define returnCPtr(code) return code
#define returnCVoidPtr(code) return code
-#define returnChar(code) return code
+#define returnChar(code) return ((char) code)
+#define returnChtype(code) return code
#define returnCode(code) return code
+#define returnIntAttr(code) return code
+#define returnMMask(code) return code
#define returnPtr(code) return code
#define returnSP(code) return code
#define returnVoid return
@@ -1333,6 +1596,15 @@ extern NCURSES_EXPORT(const char *) _nc_viscbuf (const NCURSES_CH_T *, int);
#endif /* TRACE/!TRACE */
/*
+ * Workaround for defective implementation of gcc attribute warn_unused_result
+ */
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define IGNORE_RC(func) errno = (int) func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */
+
+/*
* Return-codes for tgetent() and friends.
*/
#define TGETENT_YES 1 /* entry is found */
@@ -1348,57 +1620,58 @@ extern NCURSES_EXPORT(void) name (void); \
#define ALL_BUT_COLOR ((chtype)~(A_COLOR))
#define NONBLANK_ATTR (A_NORMAL|A_BOLD|A_DIM|A_BLINK)
-#define XMC_CHANGES(c) ((c) & SP->_xmc_suppress)
+#define XMC_CHANGES(c) ((c) & SP_PARM->_xmc_suppress)
#define toggle_attr_on(S,at) {\
- if (PAIR_NUMBER(at) > 0) {\
- (S) = ((S) & ALL_BUT_COLOR) | (at);\
+ if (PairNumber(at) > 0) {\
+ (S) = ((S) & ALL_BUT_COLOR) | (attr_t) (at);\
} else {\
- (S) |= (at);\
+ (S) |= (attr_t) (at);\
}\
TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
#define toggle_attr_off(S,at) {\
- if (PAIR_NUMBER(at) > 0) {\
+ if (PairNumber(at) > 0) {\
(S) &= ~(at|A_COLOR);\
} else {\
(S) &= ~(at);\
}\
TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
-#define DelCharCost(count) \
+#define DelCharCost(sp,count) \
((parm_dch != 0) \
- ? SP->_dch_cost \
+ ? sp->_dch_cost \
: ((delete_character != 0) \
- ? (SP->_dch1_cost * count) \
+ ? (sp->_dch1_cost * count) \
: INFINITY))
-#define InsCharCost(count) \
+#define InsCharCost(sp,count) \
((parm_ich != 0) \
- ? SP->_ich_cost \
+ ? sp->_ich_cost \
: ((enter_insert_mode && exit_insert_mode) \
- ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
+ ? sp->_smir_cost + sp->_rmir_cost + (sp->_ip_cost * count) \
: ((insert_character != 0) \
- ? ((SP->_ich1_cost + SP->_ip_cost) * count) \
+ ? ((sp->_ich1_cost + sp->_ip_cost) * count) \
: INFINITY)))
#if USE_XMC_SUPPORT
-#define UpdateAttrs(c) if (!SameAttrOf(SCREEN_ATTRS(SP), c)) { \
- attr_t chg = AttrOf(SCREEN_ATTRS(SP)); \
- VIDATTR(AttrOf(c), GetPair(c)); \
+#define UpdateAttrs(sp,c) if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \
+ attr_t chg = AttrOf(SCREEN_ATTRS(sp)); \
+ VIDATTR(sp, AttrOf(c), GetPair(c)); \
if (magic_cookie_glitch > 0 \
- && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(SP))))) { \
+ && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(sp))))) { \
T(("%s @%d before glitch %d,%d", \
__FILE__, __LINE__, \
- SP->_cursrow, \
- SP->_curscol)); \
- _nc_do_xmc_glitch(chg); \
+ sp->_cursrow, \
+ sp->_curscol)); \
+ NCURSES_SP_NAME(_nc_do_xmc_glitch)(NCURSES_SP_ARGx chg); \
} \
}
#else
-#define UpdateAttrs(c) if (!SameAttrOf(SCREEN_ATTRS(SP), c)) \
- VIDATTR(AttrOf(c), GetPair(c));
+#define UpdateAttrs(sp,c) if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \
+ VIDATTR(sp, AttrOf(c), GetPair(c)); \
+ }
#endif
/*
@@ -1408,10 +1681,12 @@ extern NCURSES_EXPORT(void) name (void); \
#define EVENTLIST_0th(param) param
#define EVENTLIST_1st(param) param
#define EVENTLIST_2nd(param) , param
+#define TWAIT_MASK (TW_ANY | TW_EVENT)
#else
#define EVENTLIST_0th(param) void
#define EVENTLIST_1st(param) /* nothing */
#define EVENTLIST_2nd(param) /* nothing */
+#define TWAIT_MASK TW_ANY
#endif
#if NCURSES_EXPANDED && NCURSES_EXT_FUNCS
@@ -1425,16 +1700,28 @@ extern NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *, attr_t);
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);
+#define DelCharCost(sp, count) NCURSES_SP_NAME(_nc_DelCharCost)(NCURSES_SP_ARGx count)
#undef InsCharCost
-#define InsCharCost(count) _nc_InsCharCost(count)
-extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
+#define InsCharCost(sp, count) NCURSES_SP_NAME(_nc_InsCharCost)(NCURSES_SP_ARGx count)
+
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_DelCharCost) (NCURSES_SP_DCLx int _c);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_InsCharCost) (NCURSES_SP_DCLx int _c);
#undef UpdateAttrs
-#define UpdateAttrs(c) _nc_UpdateAttrs(c)
-extern NCURSES_EXPORT(void) _nc_UpdateAttrs (NCURSES_CH_T);
+#define UpdateAttrs(sp,c) NCURSES_SP_NAME(_nc_UpdateAttrs)(NCURSES_SP_ARGx CHREF(c))
+
+#if USE_WIDEC_SUPPORT || defined(NEED_NCURSES_CH_T)
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T _c);
+#else
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx chtype c);
+#endif
+
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(int) _nc_DelCharCost (int);
+extern NCURSES_EXPORT(int) _nc_InsCharCost (int);
+extern NCURSES_EXPORT(void) _nc_UpdateAttrs (CARG_CH_T);
+#endif /* NCURSES_SP_FUNCS */
#else
@@ -1483,8 +1770,8 @@ 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 */
+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_addch.c */
#if USE_WIDEC_SUPPORT
@@ -1492,7 +1779,7 @@ NCURSES_EXPORT(int) _nc_build_wch(WINDOW *win, ARG_CH_T ch);
#endif
/* lib_addstr.c */
-#if USE_WIDEC_SUPPORT && !defined(USE_TERMLIB)
+#if USE_WIDEC_SUPPORT && !(defined(USE_TERMLIB) || defined(USE_BUILD_CC))
extern NCURSES_EXPORT(int) _nc_wchstrlen(const cchar_t *);
#endif
@@ -1500,10 +1787,10 @@ extern NCURSES_EXPORT(int) _nc_wchstrlen(const cchar_t *);
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 *));
+extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, int *, int EVENTLIST_2nd(_nc_eventlist *));
/* lib_insch.c */
-extern NCURSES_EXPORT(int) _nc_insert_ch(WINDOW *, chtype);
+extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype);
/* lib_mvcur.c */
#define INFINITY 1000000 /* cost: too high to use */
@@ -1519,7 +1806,7 @@ 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);
+extern NCURSES_EXPORT(bool) _nc_has_mouse (SCREEN *);
/* lib_mvcur.c */
#define INFINITY 1000000 /* cost: too high to use */
@@ -1527,10 +1814,13 @@ extern NCURSES_EXPORT(int) _nc_has_mouse (void);
/* 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(TERMINAL *);
-extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
-extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
+extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
+extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *);
+extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
+extern NCURSES_EXPORT(void) _nc_tinfo_cmdch(TERMINAL *, char);
+
+/* lib_set_term.c */
+extern NCURSES_EXPORT(int) _nc_ripoffline(int, int(*)(WINDOW*, int));
/* lib_tstp.c */
#if USE_SIGWINCH
@@ -1539,9 +1829,6 @@ extern NCURSES_EXPORT(int) _nc_handle_sigwinch(SCREEN *);
#define _nc_handle_sigwinch(a) /* nothing */
#endif
-/* lib_ungetch.c */
-extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int);
-
/* lib_wacs.c */
#if USE_WIDEC_SUPPORT
extern NCURSES_EXPORT(void) _nc_init_wacs(void);
@@ -1577,9 +1864,8 @@ extern NCURSES_EXPORT(int) _nc_remove_string (TRIES **, const char *);
/* elsewhere ... */
extern NCURSES_EXPORT(ENTRY *) _nc_delink_entry (ENTRY *, TERMTYPE *);
-extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int);
-extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
extern NCURSES_EXPORT(SCREEN *) _nc_screen_of (WINDOW *);
+extern NCURSES_EXPORT(TERMINAL*) _nc_get_cur_term (void);
extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int);
extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t);
extern NCURSES_EXPORT(char *) _nc_trace_bufcat (int, const char *);
@@ -1592,12 +1878,15 @@ extern NCURSES_EXPORT(int) _nc_getenv_num (const char *);
extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, bool);
extern NCURSES_EXPORT(int) _nc_ospeed (int);
extern NCURSES_EXPORT(int) _nc_outch (int);
+extern NCURSES_EXPORT(int) _nc_putp(const char *, const char *);
+extern NCURSES_EXPORT(int) _nc_putp_flush(const char *, const char *);
extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const);
extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, bool, int);
+extern NCURSES_EXPORT(int) _nc_setup_tinfo(const char *, TERMTYPE *);
extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *));
-extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, int (*)(int));
+extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, NCURSES_OUTC);
extern NCURSES_EXPORT(void) _nc_flush (void);
-extern NCURSES_EXPORT(void) _nc_free_and_exit (int);
+extern NCURSES_EXPORT(void) _nc_free_and_exit (int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE *);
extern NCURSES_EXPORT(void) _nc_freeall (void);
extern NCURSES_EXPORT(void) _nc_hash_map (void);
@@ -1622,13 +1911,17 @@ extern NCURSES_EXPORT(void) _nc_names_leaks(void);
extern NCURSES_EXPORT(void) _nc_tgetent_leaks(void);
#endif
-#ifndef USE_TERMLIB
+#if !(defined(USE_TERMLIB) || defined(USE_BUILD_CC))
extern NCURSES_EXPORT(NCURSES_CH_T) _nc_render (WINDOW *, NCURSES_CH_T);
extern NCURSES_EXPORT(int) _nc_waddch_nosync (WINDOW *, const NCURSES_CH_T);
extern NCURSES_EXPORT(void) _nc_scroll_window (WINDOW *, int const, NCURSES_SIZE_T const, NCURSES_SIZE_T const, NCURSES_CH_T);
#endif
-#if USE_WIDEC_SUPPORT && !defined(USE_TERMLIB)
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(int) _nc_insert_wch(WINDOW *, const cchar_t *);
+#endif
+
+#if USE_WIDEC_SUPPORT && !(defined(USE_TERMLIB) || defined(USE_BUILD_CC))
extern NCURSES_EXPORT(size_t) _nc_wcrtomb (char *, wchar_t, mbstate_t *);
#endif
@@ -1650,6 +1943,26 @@ extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *);
#endif
/*
+ * Wide-character macros to hide some platform-differences.
+ */
+#if USE_WIDEC_SUPPORT
+#if HAVE_MBTOWC && HAVE_MBLEN
+#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(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)
+#define state_unused
+#elif HAVE_MBRTOWC && HAVE_MBRLEN
+#define reset_mbytes(state) init_mb(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
+#endif
+
+/*
* Not everyone has vsscanf(), but we'd like to use it for scanw().
*/
#if !HAVE_VSSCANF
@@ -1661,24 +1974,34 @@ extern NCURSES_EXPORT_VAR(int *) _nc_oldnums;
#define USE_SETBUF_0 0
-#define NC_BUFFERED(flag) _nc_set_buffer(SP->_ofp, flag)
+#define NC_BUFFERED(sp,flag) NCURSES_SP_NAME(_nc_set_buffer)(NCURSES_SP_ARGx sp->_ofp, flag)
-#define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout)
+#define NC_OUTPUT(sp) ((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'.
*/
+#define _nc_alloc_screen_sp() typeCalloc(SCREEN, 1)
+
#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 *);
+extern NCURSES_EXPORT(int) _nc_alloc_screen (void);
+extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *);
+#define CURRENT_SCREEN _nc_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
+#define CURRENT_SCREEN SP
+#define _nc_alloc_screen() ((SP = _nc_alloc_screen_sp()) != 0)
+#define _nc_set_screen(sp) SP = sp
+#endif
+
+#if NCURSES_SP_FUNCS
+#define CURRENT_SCREEN_PRE (IsPreScreen(CURRENT_SCREEN) ? CURRENT_SCREEN : new_prescr())
+#else
+#define CURRENT_SCREEN_PRE CURRENT_SCREEN
#endif
/*
@@ -1686,10 +2009,11 @@ extern NCURSES_EXPORT_VAR(SCREEN *) SP;
* 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
+#define screen_lines(sp) (sp)->_lines
+#define screen_columns(sp) (sp)->_columns
extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
+extern NCURSES_EXPORT(int) _nc_format_slks (NCURSES_SP_DCLx int _c);
/*
* Some constants related to SLK's
@@ -1707,16 +2031,282 @@ extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
#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"
+extern NCURSES_EXPORT(int) _nc_set_tty_mode(TTY *);
+extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *);
+
+/* timed_wait flag definitions */
+#define TW_NONE 0
+#define TW_INPUT 1
+#define TW_MOUSE 2
+#define TW_ANY (TW_INPUT | TW_MOUSE)
+#define TW_EVENT 4
+
+#define SetSafeOutcWrapper(outc) \
+ SCREEN* sp = CURRENT_SCREEN; \
+ if (sp==0) { \
+ struct screen dummy; \
+ sp = &dummy; \
+ memset(sp,0,sizeof(struct screen)); \
+ sp->_outch = _nc_outc_wrapper; \
+ }\
+ sp->jump = outc
+
+#ifdef USE_TERM_DRIVER
+typedef void* TERM_HANDLE;
+
+typedef struct _termInfo
+{
+ bool caninit;
+
+ bool hascolor;
+ bool initcolor;
+ bool canchange;
+
+ int tabsize;
+
+ int maxcolors;
+ int maxpairs;
+ int nocolorvideo;
+
+ int numbuttons;
+ int numlabels;
+ int labelwidth;
+ int labelheight;
+
+ const color_t* defaultPalette;
+} TerminalInfo;
+
+typedef struct term_driver {
+ bool isTerminfo;
+ bool (*CanHandle)(struct DriverTCB*,const char*,int*);
+ void (*init)(struct DriverTCB*);
+ void (*release)(struct DriverTCB*);
+ int (*size)(struct DriverTCB*, int* Line, int *Cols);
+ int (*sgmode)(struct DriverTCB*, bool setFlag, TTY*);
+ chtype (*conattr)(struct DriverTCB*);
+ int (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x);
+ int (*mode)(struct DriverTCB*, bool progFlag, bool defFlag);
+ bool (*rescol)(struct DriverTCB*);
+ bool (*rescolors)(struct DriverTCB*);
+ void (*color)(struct DriverTCB*,bool fore, int color, int(*)(SCREEN*,int));
+ int (*doBeepOrFlash)(struct DriverTCB*, bool);
+ void (*initpair)(struct DriverTCB*,short,short,short);
+ void (*initcolor)(struct DriverTCB*,short,short,short,short);
+ void (*docolor)(struct DriverTCB*,short,short,bool,int(*)(SCREEN*,int));
+ void (*initmouse)(struct DriverTCB*);
+ int (*testmouse)(struct DriverTCB*,int);
+ void (*setfilter)(struct DriverTCB*);
+ void (*hwlabel)(struct DriverTCB*,int,char*);
+ void (*hwlabelOnOff)(struct DriverTCB*,bool);
+ int (*update)(struct DriverTCB*);
+ int (*defaultcolors)(struct DriverTCB*,int,int);
+ int (*print)(struct DriverTCB*,char*,int);
+ int (*getsize)(struct DriverTCB*,int*,int*);
+ int (*setsize)(struct DriverTCB*,int,int);
+ void (*initacs)(struct DriverTCB*,chtype*,chtype*);
+ void (*scinit)(SCREEN *);
+ void (*scexit)(SCREEN *);
+ int (*twait)(struct DriverTCB*,int,int,int* EVENTLIST_2nd(_nc_eventlist*));
+ int (*read)(struct DriverTCB*,int*);
+ int (*nap)(struct DriverTCB*,int);
+ int (*kpad)(struct DriverTCB*, bool);
+ int (*kyOk)(struct DriverTCB*, int, bool);
+ bool (*kyExist)(struct DriverTCB*, int);
+} TERM_DRIVER;
+
+typedef struct DriverTCB
+{
+ TERMINAL term; /* needs to be the first Element !!! */
+ TERM_HANDLE inp; /* The input handle of the Terminal */
+ TERM_HANDLE out; /* The output handle of the Terminal in shell mode */
+ TERM_HANDLE hdl; /* The output handle of the Terminal in prog mode */
+ TERM_DRIVER* drv; /* The driver for that Terminal */
+ SCREEN* csp; /* The screen that owns that Terminal */
+ TerminalInfo info; /* Driver independent core capabilities of the Terminal */
+ void* prop; /* Driver dependent property storage to be used by the Driver */
+ long magic;
+} TERMINAL_CONTROL_BLOCK;
+
+#define NCDRV_MAGIC(id) (0x47110000 | (id&0xffff))
+#define NCDRV_TINFO 0x01
+#define NCDRV_WINCONSOLE 0x02
+
+#define TCBOf(sp) ((TERMINAL_CONTROL_BLOCK*)(TerminalOf(sp)))
+#define InfoOf(sp) TCBOf(sp)->info
+#define CallDriver(sp,method) TCBOf(sp)->drv->method(TCBOf(sp))
+#define CallDriver_1(sp,method,arg1) TCBOf(sp)->drv->method(TCBOf(sp),arg1)
+#define CallDriver_2(sp,method,arg1,arg2) TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2)
+#define CallDriver_3(sp,method,arg1,arg2,arg3) TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3)
+#define CallDriver_4(sp,method,arg1,arg2,arg3,arg4) TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3,arg4)
+
+extern NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette;
+extern NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette;
+
+extern NCURSES_EXPORT(int) _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*);
+extern NCURSES_EXPORT(void) _nc_get_screensize_ex(SCREEN *, TERMINAL *, int *, int *);
+#endif /* USE_TERM_DRIVER */
+
+/*
+ * Entrypoints which are actually provided in the terminal driver, which would
+ * be an sp-name otherwise.
+ */
+#ifdef USE_TERM_DRIVER
+#define TINFO_HAS_KEY _nc_tinfo_has_key
+#define TINFO_DOUPDATE _nc_tinfo_doupdate
+#define TINFO_MVCUR _nc_tinfo_mvcur
+extern NCURSES_EXPORT(int) TINFO_HAS_KEY(SCREEN*, int);
+extern NCURSES_EXPORT(int) TINFO_DOUPDATE(SCREEN *);
+extern NCURSES_EXPORT(int) TINFO_MVCUR(SCREEN*, int, int, int, int);
+#else
+#define TINFO_HAS_KEY NCURSES_SP_NAME(has_key)
+#define TINFO_DOUPDATE NCURSES_SP_NAME(doupdate)
+#define TINFO_MVCUR NCURSES_SP_NAME(mvcur)
+#endif
+
+/*
+ * Entrypoints using an extra parameter with the terminal driver.
+ */
+#ifdef USE_TERM_DRIVER
+extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, TERMINAL *, int *, int *);
+extern NCURSES_EXPORT(int) _nc_setupterm_ex(TERMINAL **, NCURSES_CONST char *, int , int *, bool);
+#define TINFO_GET_SIZE(sp, tp, lp, cp) \
+ _nc_get_screensize(sp, tp, lp, cp)
+#define TINFO_SET_CURTERM(sp, tp) \
+ NCURSES_SP_NAME(set_curterm)(sp, tp)
+#define TINFO_SETUP_TERM(tpp, name, fd, err, reuse) \
+ _nc_setupterm_ex(tpp, name, fd, err, reuse)
+#else /* !USE_TERM_DRIVER */
+extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
+#define TINFO_GET_SIZE(sp, tp, lp, cp) \
+ _nc_get_screensize(sp, lp, cp)
+#define TINFO_SET_CURTERM(sp, tp) \
+ set_curterm(tp)
+#define TINFO_SETUP_TERM(tpp, name, fd, err, reuse) \
+ _nc_setupterm(name, fd, err, reuse)
+#endif /* !USE_TERM_DRIVER */
+
+#ifdef USE_TERM_DRIVER
+#ifdef __MINGW32__
+#include <nc_mingw.h>
+extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
+#endif
+extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
+#endif
+
+#ifdef USE_TERM_DRIVER
+#define IsTermInfo(sp) (TCBOf(sp) && ((TCBOf(sp)->drv->isTerminfo)))
+#else
+#define IsTermInfo(sp) TRUE
+#endif
+
+#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
+#define IsValidTIScreen(sp) (HasTInfoTerminal(sp))
+
+/*
+ * Exported entrypoints beyond the published API
+ */
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(WINDOW *) _nc_curscr_of(SCREEN*);
+extern NCURSES_EXPORT(WINDOW *) _nc_newscr_of(SCREEN*);
+extern NCURSES_EXPORT(WINDOW *) _nc_stdscr_of(SCREEN*);
+extern NCURSES_EXPORT(int) _nc_outc_wrapper(SCREEN*,int);
+
+#if USE_REENTRANT
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_TABSIZE)(SCREEN*);
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname)(SCREEN*);
+#endif
+
+#if NCURSES_EXT_FUNCS
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tabsize)(SCREEN*, int);
+#endif
+
+/*
+ * We put the safe versions of various calls here as they are not published
+ * part of the API up to now
+ */
+extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_get_cur_term) (SCREEN *sp);
+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int);
+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*);
+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(_nc_printf_string)(SCREEN*, const char *, va_list);
+extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(_nc_acs_char)(SCREEN*,int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_curs_set)(SCREEN*,int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_get_tty_mode)(SCREEN*,TTY*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_msec_cost)(SCREEN*, const char *, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_outch)(SCREEN*, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_ripoffline)(SCREEN*, int, int (*)(WINDOW *,int));
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_savetty)(SCREEN*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_scrolln)(SCREEN*, int, int, int, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_set_tty_mode)(SCREEN*, TTY*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, bool, int);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, short, void *);
+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int));
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_color)(SCREEN*, short, short, bool, NCURSES_SP_OUTC);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_do_xmc_glitch)(SCREEN*, attr_t);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_flush)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_freeall)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_hash_map)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_init_acs)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_make_oldhash)(SCREEN*, int i);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_init)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_resume)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_mvcur_wrap)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_init)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_resume)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_screen_wrap)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_scroll_oldhash)(SCREEN*, int n, int top, int bot);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_scroll_optimize)(SCREEN*);
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, bool);
+
+extern NCURSES_EXPORT(void) _nc_cookie_init(SCREEN *sp);
+
+#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_linedump)(SCREEN*);
+#endif
+
+#if USE_WIDEC_SUPPORT
+extern NCURSES_EXPORT(wchar_t *) NCURSES_SP_NAME(_nc_wunctrl)(SCREEN*, cchar_t *);
+#endif
+
+#endif /* NCURSES_SP_FUNCS */
+
+#if NCURSES_SP_FUNCS
+
+#define safe_keyname NCURSES_SP_NAME(keyname)
+#define safe_unctrl NCURSES_SP_NAME(unctrl)
+#define safe_ungetch NCURSES_SP_NAME(ungetch)
+
+#else
+
+#define safe_keyname _nc_keyname
+#define safe_unctrl _nc_unctrl
+#define safe_ungetch _nc_ungetch
+
+extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int);
+extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int);
+extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
+
+#endif
+
#ifdef __cplusplus
}
#endif
+/* *INDENT-ON* */
+
#endif /* CURSES_PRIV_H */
diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses
index cc0e3667e681..48f42830272a 100644
--- a/ncurses/llib-lncurses
+++ b/ncurses/llib-lncurses
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1996-2008 *
+ * Author: Thomas E. Dickey 1996-2010,2011 *
****************************************************************************/
/* LINTLIBRARY */
@@ -38,27 +38,54 @@
#undef _nc_oldnums
int *_nc_oldnums;
+#undef _nc_scroll_optimize_sp
+void _nc_scroll_optimize_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_scroll_optimize
void _nc_scroll_optimize(void)
{ /* void */ }
+#undef _nc_linedump_sp
+void _nc_linedump_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_linedump
void _nc_linedump(void)
{ /* void */ }
/* ./tty/hashmap.c */
-#include <term.h>
+#undef _nc_hash_map_sp
+void _nc_hash_map_sp(
+ SCREEN *sp)
+ { /* void */ }
#undef _nc_hash_map
void _nc_hash_map(void)
{ /* void */ }
+#undef _nc_make_oldhash_sp
+void _nc_make_oldhash_sp(
+ SCREEN *sp,
+ int i)
+ { /* void */ }
+
#undef _nc_make_oldhash
void _nc_make_oldhash(
int i)
{ /* void */ }
+#undef _nc_scroll_oldhash_sp
+void _nc_scroll_oldhash_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot)
+ { /* void */ }
+
#undef _nc_scroll_oldhash
void _nc_scroll_oldhash(
int n,
@@ -112,6 +139,11 @@ int waddchnstr(
/* ./base/lib_beep.c */
+#undef beep_sp
+int beep_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef beep
int beep(void)
{ return(*(int *)0); }
@@ -194,14 +226,32 @@ int COLOR_PAIRS;
#undef COLORS
int COLORS;
+#undef _nc_reset_colors_sp
+NCURSES_BOOL _nc_reset_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef _nc_reset_colors
NCURSES_BOOL _nc_reset_colors(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef start_color_sp
+int start_color_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef start_color
int start_color(void)
{ return(*(int *)0); }
+#undef init_pair_sp
+int init_pair_sp(
+ SCREEN *sp,
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
#undef init_pair
int init_pair(
short pair,
@@ -209,6 +259,15 @@ int init_pair(
short b)
{ return(*(int *)0); }
+#undef init_color_sp
+int init_color_sp(
+ SCREEN *sp,
+ short color,
+ short r,
+ short g,
+ short b)
+ { return(*(int *)0); }
+
#undef init_color
int init_color(
short color,
@@ -217,14 +276,33 @@ int init_color(
short b)
{ return(*(int *)0); }
+#undef can_change_color_sp
+NCURSES_BOOL can_change_color_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef can_change_color
NCURSES_BOOL can_change_color(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef has_colors_sp
+NCURSES_BOOL has_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_colors
NCURSES_BOOL has_colors(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef color_content_sp
+int color_content_sp(
+ SCREEN *sp,
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
#undef color_content
int color_content(
short color,
@@ -233,6 +311,14 @@ int color_content(
short *b)
{ return(*(int *)0); }
+#undef pair_content_sp
+int pair_content_sp(
+ SCREEN *sp,
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
#undef pair_content
int pair_content(
short pair,
@@ -240,13 +326,21 @@ int pair_content(
short *b)
{ return(*(int *)0); }
+#undef _nc_do_color_sp
+void _nc_do_color_sp(
+ SCREEN *sp,
+ short old_pair,
+ short pair,
+ NCURSES_BOOL reverse,
+ NCURSES_OUTC_sp outc)
+ { /* void */ }
+
#undef _nc_do_color
void _nc_do_color(
short old_pair,
short pair,
NCURSES_BOOL reverse,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
{ /* void */ }
/* ./base/lib_colorset.c */
@@ -274,16 +368,31 @@ int delwin(
/* ./base/lib_echo.c */
+#undef echo_sp
+int echo_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef echo
int echo(void)
{ return(*(int *)0); }
+#undef noecho_sp
+int noecho_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef noecho
int noecho(void)
{ return(*(int *)0); }
/* ./base/lib_endwin.c */
+#undef endwin_sp
+int endwin_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef endwin
int endwin(void)
{ return(*(int *)0); }
@@ -297,6 +406,11 @@ int werase(
/* ./base/lib_flash.c */
+#undef flash_sp
+int flash_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef flash
int flash(void)
{ return(*(int *)0); }
@@ -1107,11 +1221,21 @@ NCURSES_BOOL is_notimeout(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
+#undef is_pad
+NCURSES_BOOL is_pad(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_scrollok
NCURSES_BOOL is_scrollok(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
+#undef is_subwin
+NCURSES_BOOL is_subwin(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_syncok
NCURSES_BOOL is_syncok(
const WINDOW *z)
@@ -1138,15 +1262,30 @@ NCURSES_BOOL mouse_trafo(
#undef ESCDELAY
int ESCDELAY;
+#undef set_escdelay_sp
+int set_escdelay_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
#undef set_escdelay
int set_escdelay(
int value)
{ return(*(int *)0); }
+#undef get_escdelay_sp
+int get_escdelay_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef get_escdelay
+int get_escdelay(void)
+ { return(*(int *)0); }
+
#undef _nc_wgetch
int _nc_wgetch(
WINDOW *win,
- unsigned long *result,
+ int *result,
int use_meta)
{ return(*(int *)0); }
@@ -1200,6 +1339,7 @@ WINDOW *initscr(void)
#undef _nc_insert_ch
int _nc_insert_ch(
+ SCREEN *sp,
WINDOW *win,
chtype ch)
{ return(*(int *)0); }
@@ -1238,6 +1378,11 @@ int winnstr(
/* ./base/lib_isendwin.c */
+#undef isendwin_sp
+NCURSES_BOOL isendwin_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef isendwin
NCURSES_BOOL isendwin(void)
{ return(*(NCURSES_BOOL *)0); }
@@ -1252,16 +1397,35 @@ int leaveok(
/* ./base/lib_mouse.c */
+#undef getmouse_sp
+int getmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
#undef getmouse
int getmouse(
MEVENT *aevent)
{ return(*(int *)0); }
+#undef ungetmouse_sp
+int ungetmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
#undef ungetmouse
int ungetmouse(
MEVENT *aevent)
{ return(*(int *)0); }
+#undef mousemask_sp
+mmask_t mousemask_sp(
+ SCREEN *sp,
+ mmask_t newmask,
+ mmask_t *oldmask)
+ { return(*(mmask_t *)0); }
+
#undef mousemask
mmask_t mousemask(
mmask_t newmask,
@@ -1275,14 +1439,30 @@ NCURSES_BOOL wenclose(
int x)
{ return(*(NCURSES_BOOL *)0); }
+#undef mouseinterval_sp
+int mouseinterval_sp(
+ SCREEN *sp,
+ int maxclick)
+ { return(*(int *)0); }
+
#undef mouseinterval
int mouseinterval(
int maxclick)
{ return(*(int *)0); }
#undef _nc_has_mouse
-int _nc_has_mouse(void)
- { return(*(int *)0); }
+NCURSES_BOOL _nc_has_mouse(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse_sp
+NCURSES_BOOL has_mouse_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse
+NCURSES_BOOL has_mouse(void)
+ { return(*(NCURSES_BOOL *)0); }
#undef wmouse_trafo
NCURSES_BOOL wmouse_trafo(
@@ -1303,24 +1483,55 @@ int wmove(
/* ./tty/lib_mvcur.c */
+#undef _nc_msec_cost_sp
+int _nc_msec_cost_sp(
+ SCREEN *sp,
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
#undef _nc_msec_cost
int _nc_msec_cost(
const char *const cap,
int affcnt)
{ return(*(int *)0); }
+#undef _nc_mvcur_resume_sp
+void _nc_mvcur_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_resume
void _nc_mvcur_resume(void)
{ /* void */ }
+#undef _nc_mvcur_init_sp
+void _nc_mvcur_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_init
void _nc_mvcur_init(void)
{ /* void */ }
+#undef _nc_mvcur_wrap_sp
+void _nc_mvcur_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_wrap
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef mvcur_sp
+int mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur
int mvcur(
int yold,
@@ -1343,14 +1554,32 @@ int mvwin(
/* ./base/lib_newterm.c */
+#undef filter_sp
+void filter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef filter
void filter(void)
{ /* void */ }
+#undef nofilter_sp
+void nofilter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef nofilter
void nofilter(void)
{ /* void */ }
+#undef newterm_sp
+SCREEN *newterm_sp(
+ SCREEN *sp,
+ char *name,
+ FILE *ofp,
+ FILE *ifp)
+ { return(*(SCREEN **)0); }
+
#undef newterm
SCREEN *newterm(
char *name,
@@ -1365,6 +1594,15 @@ int _nc_freewin(
WINDOW *win)
{ return(*(int *)0); }
+#undef newwin_sp
+WINDOW *newwin_sp(
+ SCREEN *sp,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
#undef newwin
WINDOW *newwin(
int num_lines,
@@ -1391,8 +1629,9 @@ WINDOW *subwin(
int x)
{ return(*(WINDOW **)0); }
-#undef _nc_makenew
-WINDOW *_nc_makenew(
+#undef _nc_makenew_sp
+WINDOW *_nc_makenew_sp(
+ SCREEN *sp,
int num_lines,
int num_columns,
int begy,
@@ -1400,17 +1639,37 @@ WINDOW *_nc_makenew(
int flags)
{ return(*(WINDOW **)0); }
-#undef _nc_screen_of
-SCREEN *_nc_screen_of(
- WINDOW *win)
- { return(*(SCREEN **)0); }
+#undef _nc_curscr_of
+WINDOW *_nc_curscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr_of
+WINDOW *_nc_newscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_stdscr_of
+WINDOW *_nc_stdscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
/* ./base/lib_nl.c */
+#undef nl_sp
+int nl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nl
int nl(void)
{ return(*(int *)0); }
+#undef nonl_sp
+int nonl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nonl
int nonl(void)
{ return(*(int *)0); }
@@ -1444,6 +1703,13 @@ int copywin(
/* ./base/lib_pad.c */
+#undef newpad_sp
+WINDOW *newpad_sp(
+ SCREEN *sp,
+ int l,
+ int c)
+ { return(*(WINDOW **)0); }
+
#undef newpad
WINDOW *newpad(
int l,
@@ -1549,6 +1815,14 @@ int wnoutrefresh(
/* ./base/lib_restart.c */
+#undef restartterm_sp
+int restartterm_sp(
+ SCREEN *sp,
+ char *termp,
+ int filenum,
+ int *errret)
+ { return(*(int *)0); }
+
#undef restartterm
int restartterm(
char *termp,
@@ -1597,6 +1871,12 @@ int mvwscanw(
/* ./base/lib_screen.c */
+#undef getwin_sp
+WINDOW *getwin_sp(
+ SCREEN *sp,
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
#undef getwin
WINDOW *getwin(
FILE *filep)
@@ -1608,6 +1888,12 @@ int putwin(
FILE *filep)
{ return(*(int *)0); }
+#undef scr_restore_sp
+int scr_restore_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_restore
int scr_restore(
const char *file)
@@ -1618,11 +1904,23 @@ int scr_dump(
const char *file)
{ return(*(int *)0); }
+#undef scr_init_sp
+int scr_init_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_init
int scr_init(
const char *file)
{ return(*(int *)0); }
+#undef scr_set_sp
+int scr_set_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_set
int scr_set(
const char *file)
@@ -1674,6 +1972,16 @@ void delscreen(
SCREEN *sp)
{ /* void */ }
+#undef _nc_setupscreen_sp
+int _nc_setupscreen_sp(
+ SCREEN **spp,
+ int slines,
+ int scolumns,
+ FILE *output,
+ NCURSES_BOOL filtered,
+ int slk_format)
+ { return(*(int *)0); }
+
#undef _nc_setupscreen
int _nc_setupscreen(
int slines,
@@ -1683,6 +1991,15 @@ int _nc_setupscreen(
int slk_format)
{ return(*(int *)0); }
+#undef _nc_ripoffline_sp
+int _nc_ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
#undef _nc_ripoffline
int _nc_ripoffline(
int line,
@@ -1691,6 +2008,15 @@ int _nc_ripoffline(
int p2))
{ return(*(int *)0); }
+#undef ripoffline_sp
+int ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
#undef ripoffline
int ripoffline(
int line,
@@ -1701,18 +2027,37 @@ int ripoffline(
/* ./base/lib_slk.c */
+#undef _nc_format_slks
+int _nc_format_slks(
+ SCREEN *sp,
+ int cols)
+ { return(*(int *)0); }
+
#undef _nc_slk_initialize
int _nc_slk_initialize(
WINDOW *stwin,
int cols)
{ return(*(int *)0); }
+#undef slk_restore_sp
+int slk_restore_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_restore
int slk_restore(void)
{ return(*(int *)0); }
/* ./base/lib_slkatr_set.c */
+#undef slk_attr_set_sp
+int slk_attr_set_sp(
+ SCREEN *sp,
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
#undef slk_attr_set
int slk_attr_set(
const attr_t attr,
@@ -1722,6 +2067,12 @@ int slk_attr_set(
/* ./base/lib_slkatrof.c */
+#undef slk_attroff_sp
+int slk_attroff_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attroff
int slk_attroff(
const chtype attr)
@@ -1729,6 +2080,12 @@ int slk_attroff(
/* ./base/lib_slkatron.c */
+#undef slk_attron_sp
+int slk_attron_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attron
int slk_attron(
const chtype attr)
@@ -1736,6 +2093,12 @@ int slk_attron(
/* ./base/lib_slkatrset.c */
+#undef slk_attrset_sp
+int slk_attrset_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attrset
int slk_attrset(
const chtype attr)
@@ -1743,18 +2106,34 @@ int slk_attrset(
/* ./base/lib_slkattr.c */
+#undef slk_attr_sp
+attr_t slk_attr_sp(
+ SCREEN *sp)
+ { return(*(attr_t *)0); }
+
#undef slk_attr
attr_t slk_attr(void)
{ return(*(attr_t *)0); }
/* ./base/lib_slkclear.c */
+#undef slk_clear_sp
+int slk_clear_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_clear
int slk_clear(void)
{ return(*(int *)0); }
/* ./base/lib_slkcolor.c */
+#undef slk_color_sp
+int slk_color_sp(
+ SCREEN *sp,
+ short color_pair_number)
+ { return(*(int *)0); }
+
#undef slk_color
int slk_color(
short color_pair_number)
@@ -1762,6 +2141,12 @@ int slk_color(
/* ./base/lib_slkinit.c */
+#undef slk_init_sp
+int slk_init_sp(
+ SCREEN *sp,
+ int format)
+ { return(*(int *)0); }
+
#undef slk_init
int slk_init(
int format)
@@ -1769,6 +2154,12 @@ int slk_init(
/* ./base/lib_slklab.c */
+#undef slk_label_sp
+char *slk_label_sp(
+ SCREEN *sp,
+ int n)
+ { return(*(char **)0); }
+
#undef slk_label
char *slk_label(
int n)
@@ -1776,16 +2167,34 @@ char *slk_label(
/* ./base/lib_slkrefr.c */
+#undef slk_noutrefresh_sp
+int slk_noutrefresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_noutrefresh
int slk_noutrefresh(void)
{ return(*(int *)0); }
+#undef slk_refresh_sp
+int slk_refresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_refresh
int slk_refresh(void)
{ return(*(int *)0); }
/* ./base/lib_slkset.c */
+#undef slk_set_sp
+int slk_set_sp(
+ SCREEN *sp,
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
#undef slk_set
int slk_set(
int i,
@@ -1795,6 +2204,11 @@ int slk_set(
/* ./base/lib_slktouch.c */
+#undef slk_touch_sp
+int slk_touch_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_touch
int slk_touch(void)
{ return(*(int *)0); }
@@ -1836,6 +2250,12 @@ char *_nc_tracemouse(
MEVENT const *ep)
{ return(*(char **)0); }
+#undef _nc_retrace_mmask_t
+mmask_t _nc_retrace_mmask_t(
+ SCREEN *sp,
+ mmask_t code)
+ { return(*(mmask_t *)0); }
+
#undef _tracemouse
char *_tracemouse(
MEVENT const *ep)
@@ -1857,8 +2277,8 @@ void _nc_fifo_dump(
SCREEN *sp)
{ /* void */ }
-#undef _nc_ungetch
-int _nc_ungetch(
+#undef ungetch_sp
+int ungetch_sp(
SCREEN *sp,
int ch)
{ return(*(int *)0); }
@@ -1870,11 +2290,23 @@ int ungetch(
/* ./tty/lib_vidattr.c */
+#undef vidputs_sp
+int vidputs_sp(
+ SCREEN *sp,
+ chtype newmode,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
#undef vidputs
int vidputs(
chtype newmode,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
+ { return(*(int *)0); }
+
+#undef vidattr_sp
+int vidattr_sp(
+ SCREEN *sp,
+ chtype newmode)
{ return(*(int *)0); }
#undef vidattr
@@ -1882,6 +2314,11 @@ int vidattr(
chtype newmode)
{ return(*(int *)0); }
+#undef termattrs_sp
+chtype termattrs_sp(
+ SCREEN *sp)
+ { return(*(chtype *)0); }
+
#undef termattrs
chtype termattrs(void)
{ return(*(chtype *)0); }
@@ -1962,12 +2399,24 @@ WINDOW *dupwin(
/* ./base/nc_panel.c */
+#undef _nc_panelhook_sp
+struct panelhook *_nc_panelhook_sp(
+ SCREEN *sp)
+ { return(*(struct panelhook **)0); }
+
#undef _nc_panelhook
struct panelhook *_nc_panelhook(void)
{ return(*(struct panelhook **)0); }
/* ./base/safe_sprintf.c */
+#undef _nc_printf_string_sp
+char *_nc_printf_string_sp(
+ SCREEN *sp,
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
#undef _nc_printf_string
char *_nc_printf_string(
const char *fmt,
@@ -1979,10 +2428,24 @@ char *_nc_printf_string(
#include <sys/time.h>
#include <sys/times.h>
+#undef doupdate_sp
+int doupdate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef doupdate
int doupdate(void)
{ return(*(int *)0); }
+#undef _nc_scrolln_sp
+int _nc_scrolln_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
#undef _nc_scrolln
int _nc_scrolln(
int n,
@@ -1991,18 +2454,39 @@ int _nc_scrolln(
int maxy)
{ return(*(int *)0); }
+#undef _nc_screen_resume_sp
+void _nc_screen_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_resume
void _nc_screen_resume(void)
{ /* void */ }
+#undef _nc_screen_init_sp
+void _nc_screen_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_init
void _nc_screen_init(void)
{ /* void */ }
+#undef _nc_screen_wrap_sp
+void _nc_screen_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_wrap
void _nc_screen_wrap(void)
{ /* void */ }
+#undef _nc_do_xmc_glitch_sp
+void _nc_do_xmc_glitch_sp(
+ SCREEN *sp,
+ attr_t previous)
+ { /* void */ }
+
#undef _nc_do_xmc_glitch
void _nc_do_xmc_glitch(
attr_t previous)
@@ -2034,12 +2518,16 @@ void _nc_vsscanf(void)
/* ./base/lib_freeall.c */
-#include <term_entry.h>
-
#undef _nc_freeall
void _nc_freeall(void)
{ /* void */ }
+#undef _nc_free_and_exit_sp
+void _nc_free_and_exit_sp(
+ SCREEN *sp,
+ int code)
+ { /* void */ }
+
#undef _nc_free_and_exit
void _nc_free_and_exit(
int code)
@@ -2059,6 +2547,24 @@ void _nc_toggle_attr_off(
attr_t at)
{ /* void */ }
+#undef _nc_DelCharCost_sp
+int _nc_DelCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_InsCharCost_sp
+int _nc_InsCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_UpdateAttrs_sp
+void _nc_UpdateAttrs_sp(
+ SCREEN *sp,
+ chtype c)
+ { /* void */ }
+
#undef _nc_DelCharCost
int _nc_DelCharCost(
int count)
@@ -2076,6 +2582,12 @@ void _nc_UpdateAttrs(
/* ./base/legacy_coding.c */
+#undef use_legacy_coding_sp
+int use_legacy_coding_sp(
+ SCREEN *sp,
+ int level)
+ { return(*(int *)0); }
+
#undef use_legacy_coding
int use_legacy_coding(
int level)
@@ -2083,10 +2595,22 @@ int use_legacy_coding(
/* ./base/lib_dft_fgbg.c */
+#undef use_default_colors_sp
+int use_default_colors_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef use_default_colors
int use_default_colors(void)
{ return(*(int *)0); }
+#undef assume_default_colors_sp
+int assume_default_colors_sp(
+ SCREEN *sp,
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
#undef assume_default_colors
int assume_default_colors(
int fg,
@@ -2095,6 +2619,13 @@ int assume_default_colors(
/* ./tinfo/lib_print.c */
+#undef mcprint_sp
+int mcprint_sp(
+ SCREEN *sp,
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
#undef mcprint
int mcprint(
char *data,
@@ -2103,18 +2634,39 @@ int mcprint(
/* ./base/resizeterm.c */
+#undef is_term_resized_sp
+NCURSES_BOOL is_term_resized_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_term_resized
NCURSES_BOOL is_term_resized(
int ToLines,
int ToCols)
{ return(*(NCURSES_BOOL *)0); }
+#undef resize_term_sp
+int resize_term_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
#undef resize_term
int resize_term(
int ToLines,
int ToCols)
{ return(*(int *)0); }
+#undef resizeterm_sp
+int resizeterm_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
#undef resizeterm
int resizeterm(
int ToLines,
@@ -2157,9 +2709,6 @@ int wresize(
/* ./tinfo/access.c */
-#include <sys/stat.h>
-#include <nc_alloc.h>
-
#undef _nc_rootname
char *_nc_rootname(
char *path)
@@ -2232,7 +2781,32 @@ char *const numcodes[] = {0};
#undef strcodes
char *const strcodes[] = {0};
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#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 HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
/* ./tinfo/comp_error.c */
+
#undef _nc_suppress_warnings
NCURSES_BOOL _nc_suppress_warnings;
#undef _nc_curr_line
@@ -2277,6 +2851,21 @@ void _nc_syserr_abort(
...)
{ /* void */ }
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *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,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
/* ./tinfo/db_iterator.c */
#undef _nc_tic_dir
@@ -2397,6 +2986,11 @@ void _nc_init_keytry(
#undef acs_map
chtype acs_map[128];
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_init_acs
void _nc_init_acs(void)
{ /* void */ }
@@ -2420,6 +3014,11 @@ int _nc_ospeed(
int BaudRate)
{ return(*(int *)0); }
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef baudrate
int baudrate(void)
{ return(*(int *)0); }
@@ -2429,11 +3028,23 @@ int baudrate(void)
#undef cur_term
TERMINAL *cur_term;
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
#undef set_curterm
TERMINAL *set_curterm(
TERMINAL *termp)
{ return(*(TERMINAL **)0); }
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
#undef del_curterm
int del_curterm(
TERMINAL *termp)
@@ -2456,26 +3067,56 @@ NCURSES_GLOBALS _nc_globals;
#undef _nc_prescreen
NCURSES_PRESCREEN _nc_prescreen;
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
/* ./tinfo/lib_has_cap.c */
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_ic
NCURSES_BOOL has_ic(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_il
NCURSES_BOOL has_il(void)
{ return(*(NCURSES_BOOL *)0); }
/* ./tinfo/lib_kernel.c */
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
#undef erasechar
char erasechar(void)
{ return(*(char *)0); }
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
#undef killchar
char killchar(void)
{ return(*(char *)0); }
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef flushinp
int flushinp(void)
{ return(*(int *)0); }
@@ -2484,8 +3125,8 @@ int flushinp(void)
struct kn { short offset; int code; };
-#undef _nc_keyname
-char *_nc_keyname(
+#undef keyname_sp
+char *keyname_sp(
SCREEN *sp,
int c)
{ return(*(char **)0); }
@@ -2505,6 +3146,12 @@ char *longname(void)
#include <time.h>
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
#undef napms
int napms(
int ms)
@@ -2524,6 +3171,12 @@ void idcok(
NCURSES_BOOL flag)
{ /* void */ }
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
#undef halfdelay
int halfdelay(
int t)
@@ -2559,21 +3212,46 @@ int meta(
NCURSES_BOOL flag)
{ return(*(int *)0); }
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
#undef curs_set
int curs_set(
int vis)
{ return(*(int *)0); }
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
#undef typeahead
int typeahead(
int fd)
{ return(*(int *)0); }
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
#undef has_key
int has_key(
int keycode)
{ return(*(int *)0); }
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
@@ -2582,30 +3260,67 @@ int _nc_keypad(
/* ./tinfo/lib_raw.c */
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef raw
int raw(void)
{ return(*(int *)0); }
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef cbreak
int cbreak(void)
{ return(*(int *)0); }
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef qiflush
void qiflush(void)
{ /* void */ }
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef noraw
int noraw(void)
{ return(*(int *)0); }
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nocbreak
int nocbreak(void)
{ return(*(int *)0); }
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef noqiflush
void noqiflush(void)
{ /* void */ }
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
#undef intrflush
int intrflush(
WINDOW *win,
@@ -2627,6 +3342,12 @@ int COLS;
#undef TABSIZE
int TABSIZE;
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
#undef set_tabsize
int set_tabsize(
int value)
@@ -2637,6 +3358,12 @@ int _nc_handle_sigwinch(
SCREEN *sp)
{ return(*(int *)0); }
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
@@ -2654,6 +3381,18 @@ void _nc_update_screensize(
SCREEN *sp)
{ /* void */ }
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ char proto)
+ { /* void */ }
+
#undef _nc_get_locale
char *_nc_get_locale(void)
{ return(*(char **)0); }
@@ -2675,6 +3414,10 @@ int _nc_setupterm(
NCURSES_BOOL reuse)
{ return(*(int *)0); }
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
#undef setupterm
int setupterm(
char *tname,
@@ -2689,8 +3432,9 @@ char *UP;
#undef BC
char *BC;
-#undef tgetent
-int tgetent(
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
char *bufp,
const char *name)
{ return(*(int *)0); }
@@ -2701,16 +3445,41 @@ int tgetent(
#endif
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
#undef tgetflag
int tgetflag(
char *id)
{ return(*(int *)0); }
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
#undef tgetnum
int tgetnum(
char *id)
{ return(*(int *)0); }
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
#undef tgetstr
char *tgetstr(
char *id,
@@ -2719,6 +3488,11 @@ char *tgetstr(
/* ./tinfo/lib_termname.c */
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
#undef termname
char *termname(void)
{ return(*(char **)0); }
@@ -2734,16 +3508,34 @@ char *tgoto(
/* ./tinfo/lib_ti.c */
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
#undef tigetflag
int tigetflag(
char *str)
{ return(*(int *)0); }
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
#undef tigetnum
int tigetnum(
char *str)
{ return(*(int *)0); }
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
#undef tigetstr
char *tigetstr(
char *str)
@@ -2767,6 +3559,12 @@ char *tparm(
...)
{ return(*(char **)0); }
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
/* ./tinfo/lib_tputs.c */
#undef PC
@@ -2781,25 +3579,75 @@ void _nc_set_no_padding(
SCREEN *sp)
{ /* void */ }
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
#undef delay_output
int delay_output(
int ms)
{ return(*(int *)0); }
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_flush
void _nc_flush(void)
{ /* void */ }
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
#undef _nc_outch
int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
#undef putp
int putp(
const char *string)
{ return(*(int *)0); }
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
#undef tputs
int tputs(
const char *string,
@@ -2833,6 +3681,11 @@ NCURSES_BOOL _nc_retrace_bool(
NCURSES_BOOL code)
{ return(*(NCURSES_BOOL *)0); }
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ char code)
+ { return(*(char *)0); }
+
#undef _nc_retrace_int
int _nc_retrace_int(
int code)
@@ -2886,6 +3739,11 @@ char *_traceattr(
attr_t newmode)
{ return(*(char **)0); }
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
#undef _nc_retrace_attr_t
attr_t _nc_retrace_attr_t(
attr_t code)
@@ -2944,36 +3802,78 @@ char *_tracechar(
/* ./tinfo/lib_ttyflags.c */
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
#undef _nc_get_tty_mode
int _nc_get_tty_mode(
struct termios *buf)
{ return(*(int *)0); }
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ 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_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef def_shell_mode
int def_shell_mode(void)
{ return(*(int *)0); }
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef def_prog_mode
int def_prog_mode(void)
{ return(*(int *)0); }
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef reset_prog_mode
int reset_prog_mode(void)
{ return(*(int *)0); }
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef reset_shell_mode
int reset_shell_mode(void)
{ return(*(int *)0); }
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef savetty
int savetty(void)
{ return(*(int *)0); }
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef resetty
int resetty(void)
{ return(*(int *)0); }
@@ -3053,6 +3953,13 @@ int _nc_read_termcap_entry(
/* ./tinfo/setbuf.c */
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ NCURSES_BOOL buffered)
+ { /* void */ }
+
#undef _nc_set_buffer
void _nc_set_buffer(
FILE *ofp,
@@ -3144,8 +4051,8 @@ char *_nc_trim_sgr0(
/* ./unctrl.c */
-#undef _nc_unctrl
-char *_nc_unctrl(
+#undef unctrl_sp
+char *unctrl_sp(
SCREEN *sp,
chtype ch)
{ return(*(char **)0); }
@@ -3232,25 +4139,6 @@ char *_nc_infotocap(
int const parameterized)
{ return(*(char **)0); }
-/* ./comp_captab.c */
-
-#include <hashsize.h>
-
-#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 short *_nc_get_hash_table(
- NCURSES_BOOL termcap)
- { return(*(const short **)0); }
-
-#undef _nc_get_alias_table
-const struct alias *_nc_get_alias_table(
- NCURSES_BOOL termcap)
- { return(*(const struct alias **)0); }
-
/* ./tinfo/comp_expand.c */
#undef _nc_tic_expand
@@ -3260,21 +4148,6 @@ char *_nc_tic_expand(
int numbers)
{ return(*(char **)0); }
-/* ./tinfo/comp_hash.c */
-
-#undef _nc_find_entry
-struct name_table_entry const *_nc_find_entry(
- const char *string,
- const short *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_termtype2
@@ -3394,6 +4267,13 @@ int _nc_tic_written(void)
/* ./base/define_key.c */
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
#undef define_key
int define_key(
const char *str,
@@ -3408,6 +4288,12 @@ void _nc_hashed_db(void)
/* ./base/key_defined.c */
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
#undef key_defined
int key_defined(
const char *str)
@@ -3415,6 +4301,13 @@ int key_defined(
/* ./base/keybound.c */
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
#undef keybound
char *keybound(
int code,
@@ -3423,6 +4316,13 @@ char *keybound(
/* ./base/keyok.c */
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
#undef keyok
int keyok(
int c,
diff --git a/ncurses/llib-lncursest b/ncurses/llib-lncursest
index d29ef60d561b..f5739cb1e79d 100644
--- a/ncurses/llib-lncursest
+++ b/ncurses/llib-lncursest
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2008 *
+ * Author: Thomas E. Dickey 2008-on *
****************************************************************************/
/* LINTLIBRARY */
@@ -38,27 +38,54 @@
#undef _nc_oldnums
int *_nc_oldnums;
+#undef _nc_scroll_optimize_sp
+void _nc_scroll_optimize_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_scroll_optimize
void _nc_scroll_optimize(void)
{ /* void */ }
+#undef _nc_linedump_sp
+void _nc_linedump_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_linedump
void _nc_linedump(void)
{ /* void */ }
/* ./tty/hashmap.c */
-#include <term.h>
+#undef _nc_hash_map_sp
+void _nc_hash_map_sp(
+ SCREEN *sp)
+ { /* void */ }
#undef _nc_hash_map
void _nc_hash_map(void)
{ /* void */ }
+#undef _nc_make_oldhash_sp
+void _nc_make_oldhash_sp(
+ SCREEN *sp,
+ int i)
+ { /* void */ }
+
#undef _nc_make_oldhash
void _nc_make_oldhash(
int i)
{ /* void */ }
+#undef _nc_scroll_oldhash_sp
+void _nc_scroll_oldhash_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot)
+ { /* void */ }
+
#undef _nc_scroll_oldhash
void _nc_scroll_oldhash(
int n,
@@ -112,6 +139,11 @@ int waddchnstr(
/* ./base/lib_beep.c */
+#undef beep_sp
+int beep_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef beep
int beep(void)
{ return(*(int *)0); }
@@ -197,14 +229,32 @@ int _nc_COLOR_PAIRS(void)
int _nc_COLORS(void)
{ return(*(int *)0); }
+#undef _nc_reset_colors_sp
+NCURSES_BOOL _nc_reset_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef _nc_reset_colors
NCURSES_BOOL _nc_reset_colors(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef start_color_sp
+int start_color_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef start_color
int start_color(void)
{ return(*(int *)0); }
+#undef init_pair_sp
+int init_pair_sp(
+ SCREEN *sp,
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
#undef init_pair
int init_pair(
short pair,
@@ -212,6 +262,15 @@ int init_pair(
short b)
{ return(*(int *)0); }
+#undef init_color_sp
+int init_color_sp(
+ SCREEN *sp,
+ short color,
+ short r,
+ short g,
+ short b)
+ { return(*(int *)0); }
+
#undef init_color
int init_color(
short color,
@@ -220,14 +279,33 @@ int init_color(
short b)
{ return(*(int *)0); }
+#undef can_change_color_sp
+NCURSES_BOOL can_change_color_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef can_change_color
NCURSES_BOOL can_change_color(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef has_colors_sp
+NCURSES_BOOL has_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_colors
NCURSES_BOOL has_colors(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef color_content_sp
+int color_content_sp(
+ SCREEN *sp,
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
#undef color_content
int color_content(
short color,
@@ -236,6 +314,14 @@ int color_content(
short *b)
{ return(*(int *)0); }
+#undef pair_content_sp
+int pair_content_sp(
+ SCREEN *sp,
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
#undef pair_content
int pair_content(
short pair,
@@ -243,13 +329,21 @@ int pair_content(
short *b)
{ return(*(int *)0); }
+#undef _nc_do_color_sp
+void _nc_do_color_sp(
+ SCREEN *sp,
+ short old_pair,
+ short pair,
+ NCURSES_BOOL reverse,
+ NCURSES_OUTC_sp outc)
+ { /* void */ }
+
#undef _nc_do_color
void _nc_do_color(
short old_pair,
short pair,
NCURSES_BOOL reverse,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
{ /* void */ }
/* ./base/lib_colorset.c */
@@ -277,16 +371,31 @@ int delwin(
/* ./base/lib_echo.c */
+#undef echo_sp
+int echo_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef echo
int echo(void)
{ return(*(int *)0); }
+#undef noecho_sp
+int noecho_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef noecho
int noecho(void)
{ return(*(int *)0); }
/* ./base/lib_endwin.c */
+#undef endwin_sp
+int endwin_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef endwin
int endwin(void)
{ return(*(int *)0); }
@@ -300,6 +409,11 @@ int werase(
/* ./base/lib_flash.c */
+#undef flash_sp
+int flash_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef flash
int flash(void)
{ return(*(int *)0); }
@@ -1110,11 +1224,21 @@ NCURSES_BOOL is_notimeout(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
+#undef is_pad
+NCURSES_BOOL is_pad(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_scrollok
NCURSES_BOOL is_scrollok(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
+#undef is_subwin
+NCURSES_BOOL is_subwin(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_syncok
NCURSES_BOOL is_syncok(
const WINDOW *z)
@@ -1142,15 +1266,35 @@ NCURSES_BOOL mouse_trafo(
int _nc_ESCDELAY(void)
{ return(*(int *)0); }
+#undef _nc_ptr_Escdelay
+int *_nc_ptr_Escdelay(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef set_escdelay_sp
+int set_escdelay_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
#undef set_escdelay
int set_escdelay(
int value)
{ return(*(int *)0); }
+#undef get_escdelay_sp
+int get_escdelay_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef get_escdelay
+int get_escdelay(void)
+ { return(*(int *)0); }
+
#undef _nc_wgetch
int _nc_wgetch(
WINDOW *win,
- unsigned long *result,
+ int *result,
int use_meta)
{ return(*(int *)0); }
@@ -1204,6 +1348,7 @@ WINDOW *initscr(void)
#undef _nc_insert_ch
int _nc_insert_ch(
+ SCREEN *sp,
WINDOW *win,
chtype ch)
{ return(*(int *)0); }
@@ -1242,6 +1387,11 @@ int winnstr(
/* ./base/lib_isendwin.c */
+#undef isendwin_sp
+NCURSES_BOOL isendwin_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef isendwin
NCURSES_BOOL isendwin(void)
{ return(*(NCURSES_BOOL *)0); }
@@ -1256,16 +1406,35 @@ int leaveok(
/* ./base/lib_mouse.c */
+#undef getmouse_sp
+int getmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
#undef getmouse
int getmouse(
MEVENT *aevent)
{ return(*(int *)0); }
+#undef ungetmouse_sp
+int ungetmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
#undef ungetmouse
int ungetmouse(
MEVENT *aevent)
{ return(*(int *)0); }
+#undef mousemask_sp
+mmask_t mousemask_sp(
+ SCREEN *sp,
+ mmask_t newmask,
+ mmask_t *oldmask)
+ { return(*(mmask_t *)0); }
+
#undef mousemask
mmask_t mousemask(
mmask_t newmask,
@@ -1279,14 +1448,30 @@ NCURSES_BOOL wenclose(
int x)
{ return(*(NCURSES_BOOL *)0); }
+#undef mouseinterval_sp
+int mouseinterval_sp(
+ SCREEN *sp,
+ int maxclick)
+ { return(*(int *)0); }
+
#undef mouseinterval
int mouseinterval(
int maxclick)
{ return(*(int *)0); }
#undef _nc_has_mouse
-int _nc_has_mouse(void)
- { return(*(int *)0); }
+NCURSES_BOOL _nc_has_mouse(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse_sp
+NCURSES_BOOL has_mouse_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse
+NCURSES_BOOL has_mouse(void)
+ { return(*(NCURSES_BOOL *)0); }
#undef wmouse_trafo
NCURSES_BOOL wmouse_trafo(
@@ -1307,24 +1492,55 @@ int wmove(
/* ./tty/lib_mvcur.c */
+#undef _nc_msec_cost_sp
+int _nc_msec_cost_sp(
+ SCREEN *sp,
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
#undef _nc_msec_cost
int _nc_msec_cost(
const char *const cap,
int affcnt)
{ return(*(int *)0); }
+#undef _nc_mvcur_resume_sp
+void _nc_mvcur_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_resume
void _nc_mvcur_resume(void)
{ /* void */ }
+#undef _nc_mvcur_init_sp
+void _nc_mvcur_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_init
void _nc_mvcur_init(void)
{ /* void */ }
+#undef _nc_mvcur_wrap_sp
+void _nc_mvcur_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_wrap
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef mvcur_sp
+int mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur
int mvcur(
int yold,
@@ -1347,14 +1563,32 @@ int mvwin(
/* ./base/lib_newterm.c */
+#undef filter_sp
+void filter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef filter
void filter(void)
{ /* void */ }
+#undef nofilter_sp
+void nofilter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef nofilter
void nofilter(void)
{ /* void */ }
+#undef newterm_sp
+SCREEN *newterm_sp(
+ SCREEN *sp,
+ char *name,
+ FILE *ofp,
+ FILE *ifp)
+ { return(*(SCREEN **)0); }
+
#undef newterm
SCREEN *newterm(
char *name,
@@ -1369,6 +1603,15 @@ int _nc_freewin(
WINDOW *win)
{ return(*(int *)0); }
+#undef newwin_sp
+WINDOW *newwin_sp(
+ SCREEN *sp,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
#undef newwin
WINDOW *newwin(
int num_lines,
@@ -1395,8 +1638,9 @@ WINDOW *subwin(
int x)
{ return(*(WINDOW **)0); }
-#undef _nc_makenew
-WINDOW *_nc_makenew(
+#undef _nc_makenew_sp
+WINDOW *_nc_makenew_sp(
+ SCREEN *sp,
int num_lines,
int num_columns,
int begy,
@@ -1404,17 +1648,37 @@ WINDOW *_nc_makenew(
int flags)
{ return(*(WINDOW **)0); }
-#undef _nc_screen_of
-SCREEN *_nc_screen_of(
- WINDOW *win)
- { return(*(SCREEN **)0); }
+#undef _nc_curscr_of
+WINDOW *_nc_curscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr_of
+WINDOW *_nc_newscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_stdscr_of
+WINDOW *_nc_stdscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
/* ./base/lib_nl.c */
+#undef nl_sp
+int nl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nl
int nl(void)
{ return(*(int *)0); }
+#undef nonl_sp
+int nonl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nonl
int nonl(void)
{ return(*(int *)0); }
@@ -1448,6 +1712,13 @@ int copywin(
/* ./base/lib_pad.c */
+#undef newpad_sp
+WINDOW *newpad_sp(
+ SCREEN *sp,
+ int l,
+ int c)
+ { return(*(WINDOW **)0); }
+
#undef newpad
WINDOW *newpad(
int l,
@@ -1553,6 +1824,14 @@ int wnoutrefresh(
/* ./base/lib_restart.c */
+#undef restartterm_sp
+int restartterm_sp(
+ SCREEN *sp,
+ char *termp,
+ int filenum,
+ int *errret)
+ { return(*(int *)0); }
+
#undef restartterm
int restartterm(
char *termp,
@@ -1601,6 +1880,12 @@ int mvwscanw(
/* ./base/lib_screen.c */
+#undef getwin_sp
+WINDOW *getwin_sp(
+ SCREEN *sp,
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
#undef getwin
WINDOW *getwin(
FILE *filep)
@@ -1612,6 +1897,12 @@ int putwin(
FILE *filep)
{ return(*(int *)0); }
+#undef scr_restore_sp
+int scr_restore_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_restore
int scr_restore(
const char *file)
@@ -1622,11 +1913,23 @@ int scr_dump(
const char *file)
{ return(*(int *)0); }
+#undef scr_init_sp
+int scr_init_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_init
int scr_init(
const char *file)
{ return(*(int *)0); }
+#undef scr_set_sp
+int scr_set_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_set
int scr_set(
const char *file)
@@ -1678,6 +1981,16 @@ void delscreen(
SCREEN *sp)
{ /* void */ }
+#undef _nc_setupscreen_sp
+int _nc_setupscreen_sp(
+ SCREEN **spp,
+ int slines,
+ int scolumns,
+ FILE *output,
+ NCURSES_BOOL filtered,
+ int slk_format)
+ { return(*(int *)0); }
+
#undef _nc_setupscreen
int _nc_setupscreen(
int slines,
@@ -1687,6 +2000,15 @@ int _nc_setupscreen(
int slk_format)
{ return(*(int *)0); }
+#undef _nc_ripoffline_sp
+int _nc_ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
#undef _nc_ripoffline
int _nc_ripoffline(
int line,
@@ -1695,6 +2017,15 @@ int _nc_ripoffline(
int p2))
{ return(*(int *)0); }
+#undef ripoffline_sp
+int ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
#undef ripoffline
int ripoffline(
int line,
@@ -1705,18 +2036,37 @@ int ripoffline(
/* ./base/lib_slk.c */
+#undef _nc_format_slks
+int _nc_format_slks(
+ SCREEN *sp,
+ int cols)
+ { return(*(int *)0); }
+
#undef _nc_slk_initialize
int _nc_slk_initialize(
WINDOW *stwin,
int cols)
{ return(*(int *)0); }
+#undef slk_restore_sp
+int slk_restore_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_restore
int slk_restore(void)
{ return(*(int *)0); }
/* ./base/lib_slkatr_set.c */
+#undef slk_attr_set_sp
+int slk_attr_set_sp(
+ SCREEN *sp,
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
#undef slk_attr_set
int slk_attr_set(
const attr_t attr,
@@ -1726,6 +2076,12 @@ int slk_attr_set(
/* ./base/lib_slkatrof.c */
+#undef slk_attroff_sp
+int slk_attroff_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attroff
int slk_attroff(
const chtype attr)
@@ -1733,6 +2089,12 @@ int slk_attroff(
/* ./base/lib_slkatron.c */
+#undef slk_attron_sp
+int slk_attron_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attron
int slk_attron(
const chtype attr)
@@ -1740,6 +2102,12 @@ int slk_attron(
/* ./base/lib_slkatrset.c */
+#undef slk_attrset_sp
+int slk_attrset_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attrset
int slk_attrset(
const chtype attr)
@@ -1747,18 +2115,34 @@ int slk_attrset(
/* ./base/lib_slkattr.c */
+#undef slk_attr_sp
+attr_t slk_attr_sp(
+ SCREEN *sp)
+ { return(*(attr_t *)0); }
+
#undef slk_attr
attr_t slk_attr(void)
{ return(*(attr_t *)0); }
/* ./base/lib_slkclear.c */
+#undef slk_clear_sp
+int slk_clear_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_clear
int slk_clear(void)
{ return(*(int *)0); }
/* ./base/lib_slkcolor.c */
+#undef slk_color_sp
+int slk_color_sp(
+ SCREEN *sp,
+ short color_pair_number)
+ { return(*(int *)0); }
+
#undef slk_color
int slk_color(
short color_pair_number)
@@ -1766,6 +2150,12 @@ int slk_color(
/* ./base/lib_slkinit.c */
+#undef slk_init_sp
+int slk_init_sp(
+ SCREEN *sp,
+ int format)
+ { return(*(int *)0); }
+
#undef slk_init
int slk_init(
int format)
@@ -1773,6 +2163,12 @@ int slk_init(
/* ./base/lib_slklab.c */
+#undef slk_label_sp
+char *slk_label_sp(
+ SCREEN *sp,
+ int n)
+ { return(*(char **)0); }
+
#undef slk_label
char *slk_label(
int n)
@@ -1780,16 +2176,34 @@ char *slk_label(
/* ./base/lib_slkrefr.c */
+#undef slk_noutrefresh_sp
+int slk_noutrefresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_noutrefresh
int slk_noutrefresh(void)
{ return(*(int *)0); }
+#undef slk_refresh_sp
+int slk_refresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_refresh
int slk_refresh(void)
{ return(*(int *)0); }
/* ./base/lib_slkset.c */
+#undef slk_set_sp
+int slk_set_sp(
+ SCREEN *sp,
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
#undef slk_set
int slk_set(
int i,
@@ -1799,6 +2213,11 @@ int slk_set(
/* ./base/lib_slktouch.c */
+#undef slk_touch_sp
+int slk_touch_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_touch
int slk_touch(void)
{ return(*(int *)0); }
@@ -1840,6 +2259,12 @@ char *_nc_tracemouse(
MEVENT const *ep)
{ return(*(char **)0); }
+#undef _nc_retrace_mmask_t
+mmask_t _nc_retrace_mmask_t(
+ SCREEN *sp,
+ mmask_t code)
+ { return(*(mmask_t *)0); }
+
#undef _tracemouse
char *_tracemouse(
MEVENT const *ep)
@@ -1861,8 +2286,8 @@ void _nc_fifo_dump(
SCREEN *sp)
{ /* void */ }
-#undef _nc_ungetch
-int _nc_ungetch(
+#undef ungetch_sp
+int ungetch_sp(
SCREEN *sp,
int ch)
{ return(*(int *)0); }
@@ -1874,11 +2299,23 @@ int ungetch(
/* ./tty/lib_vidattr.c */
+#undef vidputs_sp
+int vidputs_sp(
+ SCREEN *sp,
+ chtype newmode,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
#undef vidputs
int vidputs(
chtype newmode,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
+ { return(*(int *)0); }
+
+#undef vidattr_sp
+int vidattr_sp(
+ SCREEN *sp,
+ chtype newmode)
{ return(*(int *)0); }
#undef vidattr
@@ -1886,6 +2323,11 @@ int vidattr(
chtype newmode)
{ return(*(int *)0); }
+#undef termattrs_sp
+chtype termattrs_sp(
+ SCREEN *sp)
+ { return(*(chtype *)0); }
+
#undef termattrs
chtype termattrs(void)
{ return(*(chtype *)0); }
@@ -1966,12 +2408,24 @@ WINDOW *dupwin(
/* ./base/nc_panel.c */
+#undef _nc_panelhook_sp
+struct panelhook *_nc_panelhook_sp(
+ SCREEN *sp)
+ { return(*(struct panelhook **)0); }
+
#undef _nc_panelhook
struct panelhook *_nc_panelhook(void)
{ return(*(struct panelhook **)0); }
/* ./base/safe_sprintf.c */
+#undef _nc_printf_string_sp
+char *_nc_printf_string_sp(
+ SCREEN *sp,
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
#undef _nc_printf_string
char *_nc_printf_string(
const char *fmt,
@@ -1983,10 +2437,24 @@ char *_nc_printf_string(
#include <sys/time.h>
#include <sys/times.h>
+#undef doupdate_sp
+int doupdate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef doupdate
int doupdate(void)
{ return(*(int *)0); }
+#undef _nc_scrolln_sp
+int _nc_scrolln_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
#undef _nc_scrolln
int _nc_scrolln(
int n,
@@ -1995,18 +2463,39 @@ int _nc_scrolln(
int maxy)
{ return(*(int *)0); }
+#undef _nc_screen_resume_sp
+void _nc_screen_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_resume
void _nc_screen_resume(void)
{ /* void */ }
+#undef _nc_screen_init_sp
+void _nc_screen_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_init
void _nc_screen_init(void)
{ /* void */ }
+#undef _nc_screen_wrap_sp
+void _nc_screen_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_wrap
void _nc_screen_wrap(void)
{ /* void */ }
+#undef _nc_do_xmc_glitch_sp
+void _nc_do_xmc_glitch_sp(
+ SCREEN *sp,
+ attr_t previous)
+ { /* void */ }
+
#undef _nc_do_xmc_glitch
void _nc_do_xmc_glitch(
attr_t previous)
@@ -2038,12 +2527,16 @@ void _nc_vsscanf(void)
/* ./base/lib_freeall.c */
-#include <term_entry.h>
-
#undef _nc_freeall
void _nc_freeall(void)
{ /* void */ }
+#undef _nc_free_and_exit_sp
+void _nc_free_and_exit_sp(
+ SCREEN *sp,
+ int code)
+ { /* void */ }
+
#undef _nc_free_and_exit
void _nc_free_and_exit(
int code)
@@ -2063,6 +2556,24 @@ void _nc_toggle_attr_off(
attr_t at)
{ /* void */ }
+#undef _nc_DelCharCost_sp
+int _nc_DelCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_InsCharCost_sp
+int _nc_InsCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_UpdateAttrs_sp
+void _nc_UpdateAttrs_sp(
+ SCREEN *sp,
+ chtype c)
+ { /* void */ }
+
#undef _nc_DelCharCost
int _nc_DelCharCost(
int count)
@@ -2080,6 +2591,12 @@ void _nc_UpdateAttrs(
/* ./base/legacy_coding.c */
+#undef use_legacy_coding_sp
+int use_legacy_coding_sp(
+ SCREEN *sp,
+ int level)
+ { return(*(int *)0); }
+
#undef use_legacy_coding
int use_legacy_coding(
int level)
@@ -2087,10 +2604,22 @@ int use_legacy_coding(
/* ./base/lib_dft_fgbg.c */
+#undef use_default_colors_sp
+int use_default_colors_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef use_default_colors
int use_default_colors(void)
{ return(*(int *)0); }
+#undef assume_default_colors_sp
+int assume_default_colors_sp(
+ SCREEN *sp,
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
#undef assume_default_colors
int assume_default_colors(
int fg,
@@ -2099,6 +2628,13 @@ int assume_default_colors(
/* ./tinfo/lib_print.c */
+#undef mcprint_sp
+int mcprint_sp(
+ SCREEN *sp,
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
#undef mcprint
int mcprint(
char *data,
@@ -2107,18 +2643,39 @@ int mcprint(
/* ./base/resizeterm.c */
+#undef is_term_resized_sp
+NCURSES_BOOL is_term_resized_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_term_resized
NCURSES_BOOL is_term_resized(
int ToLines,
int ToCols)
{ return(*(NCURSES_BOOL *)0); }
+#undef resize_term_sp
+int resize_term_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
#undef resize_term
int resize_term(
int ToLines,
int ToCols)
{ return(*(int *)0); }
+#undef resizeterm_sp
+int resizeterm_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
#undef resizeterm
int resizeterm(
int ToLines,
@@ -2161,9 +2718,6 @@ int wresize(
/* ./tinfo/access.c */
-#include <sys/stat.h>
-#include <nc_alloc.h>
-
#undef _nc_rootname
char *_nc_rootname(
char *path)
@@ -2241,6 +2795,30 @@ char *const *_nc_numcodes(void)
char *const *_nc_strcodes(void)
{ return(*(char **)0); }
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#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 HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
/* ./tinfo/comp_error.c */
#undef _nc_suppress_warnings
@@ -2287,6 +2865,21 @@ void _nc_syserr_abort(
...)
{ /* void */ }
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *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,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
/* ./tinfo/db_iterator.c */
#undef _nc_tic_dir
@@ -2408,6 +3001,11 @@ void _nc_init_keytry(
chtype *_nc_acs_map(void)
{ return(*(chtype **)0); }
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_init_acs
void _nc_init_acs(void)
{ /* void */ }
@@ -2431,21 +3029,47 @@ int _nc_ospeed(
int BaudRate)
{ return(*(int *)0); }
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef baudrate
int baudrate(void)
{ return(*(int *)0); }
/* ./tinfo/lib_cur_term.c */
+#undef _nc_get_cur_term_sp
+TERMINAL *_nc_get_cur_term_sp(
+ SCREEN *sp)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_get_cur_term
+TERMINAL *_nc_get_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
#undef _nc_cur_term
TERMINAL *_nc_cur_term(void)
{ return(*(TERMINAL **)0); }
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
#undef set_curterm
TERMINAL *set_curterm(
TERMINAL *termp)
{ return(*(TERMINAL **)0); }
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
#undef del_curterm
int del_curterm(
TERMINAL *termp)
@@ -2474,6 +3098,11 @@ NCURSES_GLOBALS _nc_globals;
#undef _nc_prescreen
NCURSES_PRESCREEN _nc_prescreen;
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
#undef _nc_init_pthreads
void _nc_init_pthreads(void)
{ /* void */ }
@@ -2500,24 +3129,49 @@ int _nc_mutex_unlock(
/* ./tinfo/lib_has_cap.c */
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_ic
NCURSES_BOOL has_ic(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_il
NCURSES_BOOL has_il(void)
{ return(*(NCURSES_BOOL *)0); }
/* ./tinfo/lib_kernel.c */
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
#undef erasechar
char erasechar(void)
{ return(*(char *)0); }
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
#undef killchar
char killchar(void)
{ return(*(char *)0); }
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef flushinp
int flushinp(void)
{ return(*(int *)0); }
@@ -2526,8 +3180,8 @@ int flushinp(void)
struct kn { short offset; int code; };
-#undef _nc_keyname
-char *_nc_keyname(
+#undef keyname_sp
+char *keyname_sp(
SCREEN *sp,
int c)
{ return(*(char **)0); }
@@ -2539,12 +3193,23 @@ char *keyname(
/* ./tinfo/lib_longname.c */
+#undef longname_sp
+char *longname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
#undef longname
char *longname(void)
{ return(*(char **)0); }
/* ./tinfo/lib_napms.c */
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
#undef napms
int napms(
int ms)
@@ -2564,6 +3229,12 @@ void idcok(
NCURSES_BOOL flag)
{ /* void */ }
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
#undef halfdelay
int halfdelay(
int t)
@@ -2599,21 +3270,46 @@ int meta(
NCURSES_BOOL flag)
{ return(*(int *)0); }
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
#undef curs_set
int curs_set(
int vis)
{ return(*(int *)0); }
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
#undef typeahead
int typeahead(
int fd)
{ return(*(int *)0); }
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
#undef has_key
int has_key(
int keycode)
{ return(*(int *)0); }
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
@@ -2622,30 +3318,67 @@ int _nc_keypad(
/* ./tinfo/lib_raw.c */
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef raw
int raw(void)
{ return(*(int *)0); }
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef cbreak
int cbreak(void)
{ return(*(int *)0); }
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef qiflush
void qiflush(void)
{ /* void */ }
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef noraw
int noraw(void)
{ return(*(int *)0); }
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nocbreak
int nocbreak(void)
{ return(*(int *)0); }
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef noqiflush
void noqiflush(void)
{ /* void */ }
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
#undef intrflush
int intrflush(
WINDOW *win,
@@ -2663,7 +3396,8 @@ char *_nc_ttytype(void)
{ return(*(char **)0); }
#undef _nc_ptr_Lines
-int *_nc_ptr_Lines(void)
+int *_nc_ptr_Lines(
+ SCREEN *sp)
{ return(*(int **)0); }
#undef _nc_LINES
@@ -2671,17 +3405,29 @@ int _nc_LINES(void)
{ return(*(int *)0); }
#undef _nc_ptr_Cols
-int *_nc_ptr_Cols(void)
+int *_nc_ptr_Cols(
+ SCREEN *sp)
{ return(*(int **)0); }
#undef _nc_COLS
int _nc_COLS(void)
{ return(*(int *)0); }
+#undef _nc_ptr_Tabsize
+int *_nc_ptr_Tabsize(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
#undef _nc_TABSIZE
int _nc_TABSIZE(void)
{ return(*(int *)0); }
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
#undef set_tabsize
int set_tabsize(
int value)
@@ -2692,6 +3438,12 @@ int _nc_handle_sigwinch(
SCREEN *sp)
{ return(*(int *)0); }
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
@@ -2709,6 +3461,18 @@ void _nc_update_screensize(
SCREEN *sp)
{ /* void */ }
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ char proto)
+ { /* void */ }
+
#undef _nc_get_locale
char *_nc_get_locale(void)
{ return(*(char **)0); }
@@ -2730,6 +3494,10 @@ int _nc_setupterm(
NCURSES_BOOL reuse)
{ return(*(int *)0); }
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
#undef setupterm
int setupterm(
char *tname,
@@ -2744,8 +3512,9 @@ char *UP;
#undef BC
char *BC;
-#undef tgetent
-int tgetent(
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
char *bufp,
const char *name)
{ return(*(int *)0); }
@@ -2756,16 +3525,41 @@ int tgetent(
#endif
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
#undef tgetflag
int tgetflag(
char *id)
{ return(*(int *)0); }
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
#undef tgetnum
int tgetnum(
char *id)
{ return(*(int *)0); }
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
#undef tgetstr
char *tgetstr(
char *id,
@@ -2774,6 +3568,11 @@ char *tgetstr(
/* ./tinfo/lib_termname.c */
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
#undef termname
char *termname(void)
{ return(*(char **)0); }
@@ -2789,16 +3588,34 @@ char *tgoto(
/* ./tinfo/lib_ti.c */
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
#undef tigetflag
int tigetflag(
char *str)
{ return(*(int *)0); }
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
#undef tigetnum
int tigetnum(
char *str)
{ return(*(int *)0); }
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
#undef tigetstr
char *tigetstr(
char *str)
@@ -2822,6 +3639,12 @@ char *tparm(
...)
{ return(*(char **)0); }
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
/* ./tinfo/lib_tputs.c */
#undef PC
@@ -2836,25 +3659,75 @@ void _nc_set_no_padding(
SCREEN *sp)
{ /* void */ }
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
#undef delay_output
int delay_output(
int ms)
{ return(*(int *)0); }
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_flush
void _nc_flush(void)
{ /* void */ }
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
#undef _nc_outch
int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
#undef putp
int putp(
const char *string)
{ return(*(int *)0); }
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
#undef tputs
int tputs(
const char *string,
@@ -2902,6 +3775,11 @@ NCURSES_BOOL _nc_retrace_bool(
NCURSES_BOOL code)
{ return(*(NCURSES_BOOL *)0); }
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ char code)
+ { return(*(char *)0); }
+
#undef _nc_retrace_int
int _nc_retrace_int(
int code)
@@ -2966,6 +3844,11 @@ char *_traceattr(
attr_t newmode)
{ return(*(char **)0); }
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
#undef _nc_retrace_attr_t
attr_t _nc_retrace_attr_t(
attr_t code)
@@ -3024,36 +3907,78 @@ char *_tracechar(
/* ./tinfo/lib_ttyflags.c */
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
#undef _nc_get_tty_mode
int _nc_get_tty_mode(
struct termios *buf)
{ return(*(int *)0); }
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ 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_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef def_shell_mode
int def_shell_mode(void)
{ return(*(int *)0); }
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef def_prog_mode
int def_prog_mode(void)
{ return(*(int *)0); }
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef reset_prog_mode
int reset_prog_mode(void)
{ return(*(int *)0); }
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef reset_shell_mode
int reset_shell_mode(void)
{ return(*(int *)0); }
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef savetty
int savetty(void)
{ return(*(int *)0); }
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef resetty
int resetty(void)
{ return(*(int *)0); }
@@ -3144,6 +4069,13 @@ int _nc_read_termcap_entry(
/* ./tinfo/setbuf.c */
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ NCURSES_BOOL buffered)
+ { /* void */ }
+
#undef _nc_set_buffer
void _nc_set_buffer(
FILE *ofp,
@@ -3235,8 +4167,8 @@ char *_nc_trim_sgr0(
/* ./unctrl.c */
-#undef _nc_unctrl
-char *_nc_unctrl(
+#undef unctrl_sp
+char *unctrl_sp(
SCREEN *sp,
chtype ch)
{ return(*(char **)0); }
@@ -3323,25 +4255,6 @@ char *_nc_infotocap(
int const parameterized)
{ return(*(char **)0); }
-/* ./comp_captab.c */
-
-#include <hashsize.h>
-
-#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 short *_nc_get_hash_table(
- NCURSES_BOOL termcap)
- { return(*(const short **)0); }
-
-#undef _nc_get_alias_table
-const struct alias *_nc_get_alias_table(
- NCURSES_BOOL termcap)
- { return(*(const struct alias **)0); }
-
/* ./tinfo/comp_expand.c */
#undef _nc_tic_expand
@@ -3351,21 +4264,6 @@ char *_nc_tic_expand(
int numbers)
{ return(*(char **)0); }
-/* ./tinfo/comp_hash.c */
-
-#undef _nc_find_entry
-struct name_table_entry const *_nc_find_entry(
- const char *string,
- const short *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_termtype2
@@ -3485,6 +4383,13 @@ int _nc_tic_written(void)
/* ./base/define_key.c */
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
#undef define_key
int define_key(
const char *str,
@@ -3499,6 +4404,12 @@ void _nc_hashed_db(void)
/* ./base/key_defined.c */
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
#undef key_defined
int key_defined(
const char *str)
@@ -3506,6 +4417,13 @@ int key_defined(
/* ./base/keybound.c */
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
#undef keybound
char *keybound(
int code,
@@ -3514,6 +4432,13 @@ char *keybound(
/* ./base/keyok.c */
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
#undef keyok
int keyok(
int c,
diff --git a/ncurses/llib-lncursestw b/ncurses/llib-lncursestw
new file mode 100644
index 000000000000..5230bc758aff
--- /dev/null
+++ b/ncurses/llib-lncursestw
@@ -0,0 +1,5270 @@
+/****************************************************************************
+ * Copyright (c) 2009-2010,2011 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2009-2010,2011 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./tty/hardscroll.c */
+
+#include <curses.priv.h>
+
+#undef _nc_oldnums
+int *_nc_oldnums;
+
+#undef _nc_scroll_optimize_sp
+void _nc_scroll_optimize_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_scroll_optimize
+void _nc_scroll_optimize(void)
+ { /* void */ }
+
+#undef _nc_linedump_sp
+void _nc_linedump_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_linedump
+void _nc_linedump(void)
+ { /* void */ }
+
+/* ./tty/hashmap.c */
+
+#undef _nc_hash_map_sp
+void _nc_hash_map_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_hash_map
+void _nc_hash_map(void)
+ { /* void */ }
+
+#undef _nc_make_oldhash_sp
+void _nc_make_oldhash_sp(
+ SCREEN *sp,
+ int i)
+ { /* void */ }
+
+#undef _nc_make_oldhash
+void _nc_make_oldhash(
+ int i)
+ { /* void */ }
+
+#undef _nc_scroll_oldhash_sp
+void _nc_scroll_oldhash_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot)
+ { /* 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_build_wch
+int _nc_build_wch(
+ WINDOW *win,
+ cchar_t *ch)
+ { return(*(int *)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_sp
+int beep_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#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 _nc_COLOR_PAIRS
+int _nc_COLOR_PAIRS(void)
+ { return(*(int *)0); }
+
+#undef _nc_COLORS
+int _nc_COLORS(void)
+ { return(*(int *)0); }
+
+#undef _nc_reset_colors_sp
+NCURSES_BOOL _nc_reset_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_reset_colors
+NCURSES_BOOL _nc_reset_colors(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef start_color_sp
+int start_color_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef start_color
+int start_color(void)
+ { return(*(int *)0); }
+
+#undef init_pair_sp
+int init_pair_sp(
+ SCREEN *sp,
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
+#undef init_pair
+int init_pair(
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
+#undef init_color_sp
+int init_color_sp(
+ SCREEN *sp,
+ short color,
+ short r,
+ short g,
+ 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_sp
+NCURSES_BOOL can_change_color_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef can_change_color
+NCURSES_BOOL can_change_color(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_colors_sp
+NCURSES_BOOL has_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_colors
+NCURSES_BOOL has_colors(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef color_content_sp
+int color_content_sp(
+ SCREEN *sp,
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
+#undef color_content
+int color_content(
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
+#undef pair_content_sp
+int pair_content_sp(
+ SCREEN *sp,
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
+#undef pair_content
+int pair_content(
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
+#undef _nc_do_color_sp
+void _nc_do_color_sp(
+ SCREEN *sp,
+ short old_pair,
+ short pair,
+ NCURSES_BOOL reverse,
+ NCURSES_OUTC_sp outc)
+ { /* void */ }
+
+#undef _nc_do_color
+void _nc_do_color(
+ short old_pair,
+ short pair,
+ NCURSES_BOOL reverse,
+ NCURSES_OUTC outc)
+ { /* 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_sp
+int echo_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef echo
+int echo(void)
+ { return(*(int *)0); }
+
+#undef noecho_sp
+int noecho_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef noecho
+int noecho(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_endwin.c */
+
+#undef endwin_sp
+int endwin_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#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_sp
+int flash_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#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 winsstr
+int winsstr(
+ WINDOW *a1,
+ const char *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 getattrs
+int getattrs(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getcurx
+int getcurx(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getcury
+int getcury(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getbegx
+int getbegx(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getbegy
+int getbegy(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getmaxx
+int getmaxx(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getmaxy
+int getmaxy(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getparx
+int getparx(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef getpary
+int getpary(
+ const WINDOW *z)
+ { return(*(int *)0); }
+
+#undef wgetparent
+WINDOW *wgetparent(
+ const WINDOW *z)
+ { return(*(WINDOW **)0); }
+
+#undef is_cleared
+NCURSES_BOOL is_cleared(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_idcok
+NCURSES_BOOL is_idcok(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_idlok
+NCURSES_BOOL is_idlok(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_immedok
+NCURSES_BOOL is_immedok(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_keypad
+NCURSES_BOOL is_keypad(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_leaveok
+NCURSES_BOOL is_leaveok(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_nodelay
+NCURSES_BOOL is_nodelay(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_notimeout
+NCURSES_BOOL is_notimeout(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_pad
+NCURSES_BOOL is_pad(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_scrollok
+NCURSES_BOOL is_scrollok(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_subwin
+NCURSES_BOOL is_subwin(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_syncok
+NCURSES_BOOL is_syncok(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef wgetscrreg
+int wgetscrreg(
+ const WINDOW *a1,
+ int *a2,
+ int *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 wgetbkgrnd
+int wgetbkgrnd(
+ WINDOW *a1,
+ cchar_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 _nc_ESCDELAY
+int _nc_ESCDELAY(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Escdelay
+int *_nc_ptr_Escdelay(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef set_escdelay_sp
+int set_escdelay_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
+#undef set_escdelay
+int set_escdelay(
+ int value)
+ { return(*(int *)0); }
+
+#undef get_escdelay_sp
+int get_escdelay_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef get_escdelay
+int get_escdelay(void)
+ { return(*(int *)0); }
+
+#undef _nc_wgetch
+int _nc_wgetch(
+ WINDOW *win,
+ int *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
+int _nc_insert_ch(
+ SCREEN *sp,
+ WINDOW *win,
+ chtype ch)
+ { return(*(int *)0); }
+
+#undef winsch
+int winsch(
+ WINDOW *win,
+ chtype c)
+ { 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_sp
+NCURSES_BOOL isendwin_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#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_sp
+int getmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef getmouse
+int getmouse(
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef ungetmouse_sp
+int ungetmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef ungetmouse
+int ungetmouse(
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
+#undef mousemask_sp
+mmask_t mousemask_sp(
+ SCREEN *sp,
+ mmask_t newmask,
+ mmask_t *oldmask)
+ { return(*(mmask_t *)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_sp
+int mouseinterval_sp(
+ SCREEN *sp,
+ int maxclick)
+ { return(*(int *)0); }
+
+#undef mouseinterval
+int mouseinterval(
+ int maxclick)
+ { return(*(int *)0); }
+
+#undef _nc_has_mouse
+NCURSES_BOOL _nc_has_mouse(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse_sp
+NCURSES_BOOL has_mouse_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse
+NCURSES_BOOL has_mouse(void)
+ { return(*(NCURSES_BOOL *)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_sp
+int _nc_msec_cost_sp(
+ SCREEN *sp,
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
+#undef _nc_msec_cost
+int _nc_msec_cost(
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
+#undef _nc_mvcur_resume_sp
+void _nc_mvcur_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_mvcur_resume
+void _nc_mvcur_resume(void)
+ { /* void */ }
+
+#undef _nc_mvcur_init_sp
+void _nc_mvcur_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_mvcur_init
+void _nc_mvcur_init(void)
+ { /* void */ }
+
+#undef _nc_mvcur_wrap_sp
+void _nc_mvcur_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_mvcur_wrap
+void _nc_mvcur_wrap(void)
+ { /* void */ }
+
+#undef mvcur_sp
+int mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
+#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_sp
+void filter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef filter
+void filter(void)
+ { /* void */ }
+
+#undef nofilter_sp
+void nofilter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef nofilter
+void nofilter(void)
+ { /* void */ }
+
+#undef newterm_sp
+SCREEN *newterm_sp(
+ SCREEN *sp,
+ char *name,
+ FILE *ofp,
+ FILE *ifp)
+ { return(*(SCREEN **)0); }
+
+#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_sp
+WINDOW *newwin_sp(
+ SCREEN *sp,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)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_sp
+WINDOW *_nc_makenew_sp(
+ SCREEN *sp,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx,
+ int flags)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_curscr_of
+WINDOW *_nc_curscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr_of
+WINDOW *_nc_newscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_stdscr_of
+WINDOW *_nc_stdscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+/* ./base/lib_nl.c */
+
+#undef nl_sp
+int nl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef nl
+int nl(void)
+ { return(*(int *)0); }
+
+#undef nonl_sp
+int nonl_sp(
+ SCREEN *sp)
+ { 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_sp
+WINDOW *newpad_sp(
+ SCREEN *sp,
+ int l,
+ int c)
+ { return(*(WINDOW **)0); }
+
+#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_sp
+int restartterm_sp(
+ SCREEN *sp,
+ char *termp,
+ int filenum,
+ int *errret)
+ { return(*(int *)0); }
+
+#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_sp
+WINDOW *getwin_sp(
+ SCREEN *sp,
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
+#undef getwin
+WINDOW *getwin(
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
+#undef putwin
+int putwin(
+ WINDOW *win,
+ FILE *filep)
+ { return(*(int *)0); }
+
+#undef scr_restore_sp
+int scr_restore_sp(
+ SCREEN *sp,
+ const char *file)
+ { 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_sp
+int scr_init_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_init
+int scr_init(
+ const char *file)
+ { return(*(int *)0); }
+
+#undef scr_set_sp
+int scr_set_sp(
+ SCREEN *sp,
+ 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,
+ int const top,
+ int 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_sp
+int _nc_setupscreen_sp(
+ SCREEN **spp,
+ int slines,
+ int scolumns,
+ FILE *output,
+ NCURSES_BOOL filtered,
+ int slk_format)
+ { return(*(int *)0); }
+
+#undef _nc_setupscreen
+int _nc_setupscreen(
+ int slines,
+ int scolumns,
+ FILE *output,
+ NCURSES_BOOL filtered,
+ int slk_format)
+ { return(*(int *)0); }
+
+#undef _nc_ripoffline_sp
+int _nc_ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
+#undef _nc_ripoffline
+int _nc_ripoffline(
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
+#undef ripoffline_sp
+int ripoffline_sp(
+ SCREEN *sp,
+ 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_format_slks
+int _nc_format_slks(
+ SCREEN *sp,
+ int cols)
+ { return(*(int *)0); }
+
+#undef _nc_slk_initialize
+int _nc_slk_initialize(
+ WINDOW *stwin,
+ int cols)
+ { return(*(int *)0); }
+
+#undef slk_restore_sp
+int slk_restore_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef slk_restore
+int slk_restore(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatr_set.c */
+
+#undef slk_attr_set_sp
+int slk_attr_set_sp(
+ SCREEN *sp,
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
+#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_sp
+int slk_attroff_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
+#undef slk_attroff
+int slk_attroff(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatron.c */
+
+#undef slk_attron_sp
+int slk_attron_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
+#undef slk_attron
+int slk_attron(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkatrset.c */
+
+#undef slk_attrset_sp
+int slk_attrset_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
+#undef slk_attrset
+int slk_attrset(
+ const chtype attr)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkattr.c */
+
+#undef slk_attr_sp
+attr_t slk_attr_sp(
+ SCREEN *sp)
+ { return(*(attr_t *)0); }
+
+#undef slk_attr
+attr_t slk_attr(void)
+ { return(*(attr_t *)0); }
+
+/* ./base/lib_slkclear.c */
+
+#undef slk_clear_sp
+int slk_clear_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef slk_clear
+int slk_clear(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkcolor.c */
+
+#undef slk_color_sp
+int slk_color_sp(
+ SCREEN *sp,
+ short color_pair_number)
+ { return(*(int *)0); }
+
+#undef slk_color
+int slk_color(
+ short color_pair_number)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkinit.c */
+
+#undef slk_init_sp
+int slk_init_sp(
+ SCREEN *sp,
+ int format)
+ { return(*(int *)0); }
+
+#undef slk_init
+int slk_init(
+ int format)
+ { return(*(int *)0); }
+
+/* ./base/lib_slklab.c */
+
+#undef slk_label_sp
+char *slk_label_sp(
+ SCREEN *sp,
+ int n)
+ { return(*(char **)0); }
+
+#undef slk_label
+char *slk_label(
+ int n)
+ { return(*(char **)0); }
+
+/* ./base/lib_slkrefr.c */
+
+#undef slk_noutrefresh_sp
+int slk_noutrefresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef slk_noutrefresh
+int slk_noutrefresh(void)
+ { return(*(int *)0); }
+
+#undef slk_refresh_sp
+int slk_refresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef slk_refresh
+int slk_refresh(void)
+ { return(*(int *)0); }
+
+/* ./base/lib_slkset.c */
+
+#include <wctype.h>
+
+#undef slk_set_sp
+int slk_set_sp(
+ SCREEN *sp,
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
+#undef slk_set
+int slk_set(
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
+/* ./base/lib_slktouch.c */
+
+#undef slk_touch_sp
+int slk_touch_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#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_tracedmp.c */
+
+#undef _tracedump
+void _tracedump(
+ const char *name,
+ WINDOW *win)
+ { /* void */ }
+
+/* ./trace/lib_tracemse.c */
+
+#undef _nc_tracemouse
+char *_nc_tracemouse(
+ SCREEN *sp,
+ MEVENT const *ep)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_mmask_t
+mmask_t _nc_retrace_mmask_t(
+ SCREEN *sp,
+ mmask_t code)
+ { return(*(mmask_t *)0); }
+
+#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(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef ungetch_sp
+int ungetch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef ungetch
+int ungetch(
+ int ch)
+ { return(*(int *)0); }
+
+/* ./tty/lib_vidattr.c */
+
+#undef vidputs_sp
+int vidputs_sp(
+ SCREEN *sp,
+ chtype newmode,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef vidputs
+int vidputs(
+ chtype newmode,
+ NCURSES_OUTC outc)
+ { return(*(int *)0); }
+
+#undef vidattr_sp
+int vidattr_sp(
+ SCREEN *sp,
+ chtype newmode)
+ { return(*(int *)0); }
+
+#undef vidattr
+int vidattr(
+ chtype newmode)
+ { return(*(int *)0); }
+
+#undef termattrs_sp
+chtype termattrs_sp(
+ SCREEN *sp)
+ { return(*(chtype *)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_sp
+struct panelhook *_nc_panelhook_sp(
+ SCREEN *sp)
+ { return(*(struct panelhook **)0); }
+
+#undef _nc_panelhook
+struct panelhook *_nc_panelhook(void)
+ { return(*(struct panelhook **)0); }
+
+/* ./base/safe_sprintf.c */
+
+#undef _nc_printf_string_sp
+char *_nc_printf_string_sp(
+ SCREEN *sp,
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
+#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_sp
+int doupdate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef doupdate
+int doupdate(void)
+ { return(*(int *)0); }
+
+#undef _nc_scrolln_sp
+int _nc_scrolln_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
+#undef _nc_scrolln
+int _nc_scrolln(
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
+#undef _nc_screen_resume_sp
+void _nc_screen_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_screen_resume
+void _nc_screen_resume(void)
+ { /* void */ }
+
+#undef _nc_screen_init_sp
+void _nc_screen_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_screen_init
+void _nc_screen_init(void)
+ { /* void */ }
+
+#undef _nc_screen_wrap_sp
+void _nc_screen_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_screen_wrap
+void _nc_screen_wrap(void)
+ { /* void */ }
+
+#undef _nc_do_xmc_glitch_sp
+void _nc_do_xmc_glitch_sp(
+ SCREEN *sp,
+ attr_t previous)
+ { /* void */ }
+
+#undef _nc_do_xmc_glitch
+void _nc_do_xmc_glitch(
+ attr_t previous)
+ { /* void */ }
+
+/* ./trace/varargs.c */
+
+typedef enum {
+ atUnknown = 0, atInteger, atFloat, atPoint, atString
+} ARGTYPE;
+
+#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 */
+
+#undef _nc_freeall
+void _nc_freeall(void)
+ { /* void */ }
+
+#undef _nc_free_and_exit_sp
+void _nc_free_and_exit_sp(
+ SCREEN *sp,
+ int code)
+ { /* void */ }
+
+#undef _nc_free_and_exit
+void _nc_free_and_exit(
+ int code)
+ { /* 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_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_wch.c */
+
+#undef wget_wch
+int wget_wch(
+ WINDOW *win,
+ wint_t *result)
+ { 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 _nc_insert_wch
+int _nc_insert_wch(
+ WINDOW *win,
+ const cchar_t *wch)
+ { return(*(int *)0); }
+
+#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_key_name.c */
+
+#undef key_name
+char *key_name(
+ wchar_t c)
+ { return(*(char **)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 _nc_wcrtomb
+size_t _nc_wcrtomb(
+ char *target,
+ wchar_t source,
+ mbstate_t *state)
+ { return(*(size_t *)0); }
+
+#undef unget_wch_sp
+int unget_wch_sp(
+ SCREEN *sp,
+ const wchar_t wch)
+ { return(*(int *)0); }
+
+#undef unget_wch
+int unget_wch(
+ const wchar_t wch)
+ { return(*(int *)0); }
+
+/* ./widechar/lib_vid_attr.c */
+
+#undef vid_puts_sp
+int vid_puts_sp(
+ SCREEN *sp,
+ attr_t newmode,
+ short pair,
+ void *opts,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef vid_puts
+int vid_puts(
+ attr_t newmode,
+ short pair,
+ void *opts,
+ NCURSES_OUTC outc)
+ { return(*(int *)0); }
+
+#undef vid_attr_sp
+int vid_attr_sp(
+ SCREEN *sp,
+ attr_t newmode,
+ short pair,
+ void *opts)
+ { return(*(int *)0); }
+
+#undef vid_attr
+int vid_attr(
+ attr_t newmode,
+ short pair,
+ void *opts)
+ { return(*(int *)0); }
+
+#undef term_attrs_sp
+attr_t term_attrs_sp(
+ SCREEN *sp)
+ { return(*(attr_t *)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_sp
+wchar_t *wunctrl_sp(
+ SCREEN *sp,
+ cchar_t *wc)
+ { return(*(wchar_t **)0); }
+
+#undef wunctrl
+wchar_t *wunctrl(
+ cchar_t *wc)
+ { return(*(wchar_t **)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_sp
+int _nc_DelCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_InsCharCost_sp
+int _nc_InsCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_UpdateAttrs_sp
+void _nc_UpdateAttrs_sp(
+ SCREEN *sp,
+ const cchar_t *c)
+ { /* 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(
+ const cchar_t *c)
+ { /* void */ }
+
+/* ./base/legacy_coding.c */
+
+#undef use_legacy_coding_sp
+int use_legacy_coding_sp(
+ SCREEN *sp,
+ int level)
+ { return(*(int *)0); }
+
+#undef use_legacy_coding
+int use_legacy_coding(
+ int level)
+ { return(*(int *)0); }
+
+/* ./base/lib_dft_fgbg.c */
+
+#undef use_default_colors_sp
+int use_default_colors_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef use_default_colors
+int use_default_colors(void)
+ { return(*(int *)0); }
+
+#undef assume_default_colors_sp
+int assume_default_colors_sp(
+ SCREEN *sp,
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
+#undef assume_default_colors
+int assume_default_colors(
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_print.c */
+
+#undef mcprint_sp
+int mcprint_sp(
+ SCREEN *sp,
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
+#undef mcprint
+int mcprint(
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
+/* ./base/resizeterm.c */
+
+#undef is_term_resized_sp
+NCURSES_BOOL is_term_resized_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef is_term_resized
+NCURSES_BOOL is_term_resized(
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef resize_term_sp
+int resize_term_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+#undef resize_term
+int resize_term(
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
+#undef resizeterm_sp
+int resizeterm_sp(
+ SCREEN *sp,
+ 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 */ }
+
+/* ./tinfo/use_screen.c */
+
+#undef use_screen
+int use_screen(
+ SCREEN *screen,
+ NCURSES_SCREEN_CB func,
+ void *data)
+ { return(*(int *)0); }
+
+/* ./base/use_window.c */
+
+#undef use_window
+int use_window(
+ WINDOW *win,
+ NCURSES_WINDOW_CB func,
+ void *data)
+ { 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_is_abs_path
+NCURSES_BOOL _nc_is_abs_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)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_is_dir_path
+NCURSES_BOOL _nc_is_dir_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_is_file_path
+NCURSES_BOOL _nc_is_file_path(
+ const char *path)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/add_tries.c */
+
+#undef _nc_add_to_try
+int _nc_add_to_try(
+ TRIES **tree,
+ const char *str,
+ unsigned code)
+ { return(*(int *)0); }
+
+/* ./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 */ }
+
+/* ./codes.c */
+
+#undef _nc_boolcodes
+char *const *_nc_boolcodes(void)
+ { return(*(char **)0); }
+
+#undef _nc_numcodes
+char *const *_nc_numcodes(void)
+ { return(*(char **)0); }
+
+#undef _nc_strcodes
+char *const *_nc_strcodes(void)
+ { return(*(char **)0); }
+
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#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 HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)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_get_source
+const char *_nc_get_source(void)
+ { return(*(const char **)0); }
+
+#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_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *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,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
+/* ./tinfo/db_iterator.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_last_db
+void _nc_last_db(void)
+ { /* void */ }
+
+#undef _nc_next_db
+const char *_nc_next_db(
+ DBDIRS *state,
+ int *offset)
+ { return(*(const char **)0); }
+
+#undef _nc_first_db
+void _nc_first_db(
+ DBDIRS *state,
+ int *offset)
+ { /* void */ }
+
+/* ./tinfo/doalloc.c */
+
+#undef _nc_doalloc
+void *_nc_doalloc(
+ void *oldp,
+ size_t amount)
+ { return(*(void **)0); }
+
+/* ./tinfo/entries.c */
+
+#undef _nc_head
+ENTRY *_nc_head;
+#undef _nc_tail
+ENTRY *_nc_tail;
+
+#undef _nc_free_entry
+void _nc_free_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { /* void */ }
+
+#undef _nc_free_entries
+void _nc_free_entries(
+ ENTRY *headp)
+ { /* void */ }
+
+#undef _nc_delink_entry
+ENTRY *_nc_delink_entry(
+ ENTRY *headp,
+ TERMTYPE *tterm)
+ { return(*(ENTRY **)0); }
+
+#undef _nc_leaks_tinfo
+void _nc_leaks_tinfo(void)
+ { /* void */ }
+
+/* ./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
+const struct tinfo_fkeys _nc_tinfo_fkeys[] = {0};
+
+#endif
+
+#undef _nc_init_keytry
+void _nc_init_keytry(
+ SCREEN *sp)
+ { /* void */ }
+
+/* ./tinfo/lib_acs.c */
+
+#undef _nc_acs_map
+chtype *_nc_acs_map(void)
+ { return(*(chtype **)0); }
+
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_init_acs
+void _nc_init_acs(void)
+ { /* void */ }
+
+/* ./tinfo/lib_baudrate.c */
+
+#include <termcap.h>
+
+struct speed {
+ int s;
+ int sp;
+};
+
+#undef _nc_baudrate
+int _nc_baudrate(
+ int OSpeed)
+ { return(*(int *)0); }
+
+#undef _nc_ospeed
+int _nc_ospeed(
+ int BaudRate)
+ { return(*(int *)0); }
+
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef baudrate
+int baudrate(void)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_cur_term.c */
+
+#undef _nc_get_cur_term_sp
+TERMINAL *_nc_get_cur_term_sp(
+ SCREEN *sp)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_get_cur_term
+TERMINAL *_nc_get_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
+#undef _nc_cur_term
+TERMINAL *_nc_cur_term(void)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef set_curterm
+TERMINAL *set_curterm(
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef del_curterm
+int del_curterm(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_data.c */
+
+#undef _nc_stdscr
+WINDOW *_nc_stdscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_curscr
+WINDOW *_nc_curscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr
+WINDOW *_nc_newscr(void)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_screen_chain
+SCREEN *_nc_screen_chain;
+#undef SP
+SCREEN *SP;
+#undef _nc_globals
+NCURSES_GLOBALS _nc_globals;
+#undef _nc_prescreen
+NCURSES_PRESCREEN _nc_prescreen;
+
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
+#undef _nc_init_pthreads
+void _nc_init_pthreads(void)
+ { /* void */ }
+
+#undef _nc_mutex_init
+void _nc_mutex_init(
+ pthread_mutex_t *obj)
+ { /* void */ }
+
+#undef _nc_mutex_lock
+int _nc_mutex_lock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+#undef _nc_mutex_trylock
+int _nc_mutex_trylock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+#undef _nc_mutex_unlock
+int _nc_mutex_unlock(
+ pthread_mutex_t *obj)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_has_cap.c */
+
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_ic
+NCURSES_BOOL has_ic(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_il
+NCURSES_BOOL has_il(void)
+ { return(*(NCURSES_BOOL *)0); }
+
+/* ./tinfo/lib_kernel.c */
+
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef erasechar
+char erasechar(void)
+ { return(*(char *)0); }
+
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
+#undef killchar
+char killchar(void)
+ { return(*(char *)0); }
+
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef flushinp
+int flushinp(void)
+ { return(*(int *)0); }
+
+/* ./lib_keyname.c */
+
+struct kn { short offset; int code; };
+
+#undef keyname_sp
+char *keyname_sp(
+ SCREEN *sp,
+ int c)
+ { return(*(char **)0); }
+
+#undef keyname
+char *keyname(
+ int c)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_longname.c */
+
+#undef longname_sp
+char *longname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#undef longname
+char *longname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_napms.c */
+
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#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_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
+#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_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
+#undef curs_set
+int curs_set(
+ int vis)
+ { return(*(int *)0); }
+
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
+#undef typeahead
+int typeahead(
+ int fd)
+ { return(*(int *)0); }
+
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef has_key
+int has_key(
+ int keycode)
+ { return(*(int *)0); }
+
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
+#undef _nc_keypad
+int _nc_keypad(
+ SCREEN *sp,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_raw.c */
+
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef raw
+int raw(void)
+ { return(*(int *)0); }
+
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef cbreak
+int cbreak(void)
+ { return(*(int *)0); }
+
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef qiflush
+void qiflush(void)
+ { /* void */ }
+
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef noraw
+int noraw(void)
+ { return(*(int *)0); }
+
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef nocbreak
+int nocbreak(void)
+ { return(*(int *)0); }
+
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef noqiflush
+void noqiflush(void)
+ { /* void */ }
+
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef intrflush
+int intrflush(
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./tinfo/lib_setup.c */
+
+#include <locale.h>
+#include <sys/ioctl.h>
+#include <langinfo.h>
+
+#undef _nc_ttytype
+char *_nc_ttytype(void)
+ { return(*(char **)0); }
+
+#undef _nc_ptr_Lines
+int *_nc_ptr_Lines(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_LINES
+int _nc_LINES(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Cols
+int *_nc_ptr_Cols(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_COLS
+int _nc_COLS(void)
+ { return(*(int *)0); }
+
+#undef _nc_ptr_Tabsize
+int *_nc_ptr_Tabsize(
+ SCREEN *sp)
+ { return(*(int **)0); }
+
+#undef _nc_TABSIZE
+int _nc_TABSIZE(void)
+ { return(*(int *)0); }
+
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
+#undef set_tabsize
+int set_tabsize(
+ int value)
+ { return(*(int *)0); }
+
+#undef _nc_handle_sigwinch
+int _nc_handle_sigwinch(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef use_env
+void use_env(
+ NCURSES_BOOL f)
+ { /* void */ }
+
+#undef _nc_get_screensize
+void _nc_get_screensize(
+ SCREEN *sp,
+ int *linep,
+ int *colp)
+ { /* void */ }
+
+#undef _nc_update_screensize
+void _nc_update_screensize(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ char proto)
+ { /* 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(
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
+#undef _nc_setupterm
+int _nc_setupterm(
+ char *tname,
+ int Filedes,
+ int *errret,
+ NCURSES_BOOL reuse)
+ { return(*(int *)0); }
+
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)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_sp
+int tgetent_sp(
+ SCREEN *sp,
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#if 0
+
+#include <capdefaults.c>
+
+#endif
+
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetflag
+int tgetflag(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetnum
+int tgetnum(
+ char *id)
+ { return(*(int *)0); }
+
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+#undef tgetstr
+char *tgetstr(
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_termname.c */
+
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
+#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_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetflag
+int tigetflag(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetnum
+int tigetnum(
+ char *str)
+ { return(*(int *)0); }
+
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)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); }
+
+#undef tiparm
+char *tiparm(
+ const 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 _nc_set_no_padding
+void _nc_set_no_padding(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
+#undef delay_output
+int delay_output(
+ int ms)
+ { return(*(int *)0); }
+
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
+#undef _nc_outch
+int _nc_outch(
+ int ch)
+ { return(*(int *)0); }
+
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef putp
+int putp(
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { 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__nc_tputs_trace
+const char *_nc__nc_tputs_trace(void)
+ { return(*(const char **)0); }
+
+#undef _nc__nc_outchars
+long _nc__nc_outchars(void)
+ { return(*(long *)0); }
+
+#undef _nc_set_tputs_trace
+void _nc_set_tputs_trace(
+ const char *s)
+ { /* void */ }
+
+#undef _nc_count_outchars
+void _nc_count_outchars(
+ long increment)
+ { /* void */ }
+
+#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_char
+char _nc_retrace_char(
+ char code)
+ { return(*(char *)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_cptr
+const char *_nc_retrace_cptr(
+ const char *code)
+ { return(*(const char **)0); }
+
+#undef _nc_retrace_cvoid_ptr
+void *_nc_retrace_cvoid_ptr(
+ void *code)
+ { return(*(void **)0); }
+
+#undef _nc_retrace_void_ptr
+void *_nc_retrace_void_ptr(
+ void *code)
+ { return(*(void **)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); }
+
+#undef _nc_use_tracef
+int _nc_use_tracef(
+ unsigned mask)
+ { return(*(int *)0); }
+
+#undef _nc_locked_tracef
+void _nc_locked_tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+/* ./trace/lib_traceatr.c */
+
+#undef _traceattr2
+char *_traceattr2(
+ int bufnum,
+ chtype newmode)
+ { return(*(char **)0); }
+
+#undef _traceattr
+char *_traceattr(
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)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_tracebits.c */
+
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
+#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 _nc_tracechar
+char *_nc_tracechar(
+ SCREEN *sp,
+ int ch)
+ { return(*(char **)0); }
+
+#undef _tracechar
+char *_tracechar(
+ int ch)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_ttyflags.c */
+
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_get_tty_mode
+int _nc_get_tty_mode(
+ struct termios *buf)
+ { return(*(int *)0); }
+
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ 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_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_shell_mode
+int def_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef def_prog_mode
+int def_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_prog_mode
+int reset_prog_mode(void)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef reset_shell_mode
+int reset_shell_mode(void)
+ { return(*(int *)0); }
+
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef savetty
+int savetty(void)
+ { return(*(int *)0); }
+
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef resetty
+int resetty(void)
+ { return(*(int *)0); }
+
+/* ./tty/lib_twait.c */
+
+#undef _nc_timed_wait
+int _nc_timed_wait(
+ SCREEN *sp,
+ 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 _nc_boolnames
+char *const *_nc_boolnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_boolfnames
+char *const *_nc_boolfnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_numnames
+char *const *_nc_numnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_numfnames
+char *const *_nc_numfnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_strnames
+char *const *_nc_strnames(void)
+ { return(*(char **)0); }
+
+#undef _nc_strfnames
+char *const *_nc_strfnames(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/read_entry.c */
+
+#include <hashed_db.h>
+
+#undef _nc_read_termtype
+int _nc_read_termtype(
+ TERMTYPE *ptr,
+ char *buffer,
+ int limit)
+ { return(*(int *)0); }
+
+#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 name,
+ char *const filename,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+/* ./tinfo/read_termcap.c */
+
+#include <sys/types.h>
+
+#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_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ NCURSES_BOOL buffered)
+ { /* void */ }
+
+#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(
+ TRIES *tree)
+ { /* void */ }
+
+/* ./base/tries.c */
+
+#undef _nc_expand_try
+char *_nc_expand_try(
+ TRIES *tree,
+ unsigned code,
+ int *count,
+ size_t len)
+ { return(*(char **)0); }
+
+#undef _nc_remove_key
+int _nc_remove_key(
+ TRIES **tree,
+ unsigned code)
+ { return(*(int *)0); }
+
+#undef _nc_remove_string
+int _nc_remove_string(
+ TRIES **tree,
+ const char *string)
+ { return(*(int *)0); }
+
+/* ./tinfo/trim_sgr0.c */
+
+#undef _nc_trim_sgr0
+char *_nc_trim_sgr0(
+ TERMTYPE *tp)
+ { return(*(char **)0); }
+
+/* ./unctrl.c */
+
+#undef unctrl_sp
+char *unctrl_sp(
+ SCREEN *sp,
+ chtype ch)
+ { return(*(char **)0); }
+
+#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_viswibuf
+const char *_nc_viswibuf(
+ const wint_t *buf)
+ { 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/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/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); }
+
+/* ./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_parse.c */
+
+#undef _nc_check_termtype2
+void (*_nc_check_termtype2)(
+ TERMTYPE *p1,
+ NCURSES_BOOL p2);
+#undef _nc_check_termtype
+void (*_nc_check_termtype)(
+ TERMTYPE *p1);
+
+#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_uses2
+int _nc_resolve_uses2(
+ NCURSES_BOOL fullresolve,
+ NCURSES_BOOL literal)
+ { return(*(int *)0); }
+
+#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_reset_input
+void _nc_reset_input(
+ FILE *fp,
+ char *buf)
+ { /* void */ }
+
+#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 */ }
+
+/* ./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); }
+
+typedef struct {
+ const char *from;
+ const char *to;
+} assoc;
+
+/* ./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/define_key.c */
+
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+#undef define_key
+int define_key(
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
+/* ./tinfo/hashed_db.c */
+
+#undef _nc_hashed_db
+void _nc_hashed_db(void)
+ { /* void */ }
+
+/* ./base/key_defined.c */
+
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
+#undef key_defined
+int key_defined(
+ const char *str)
+ { return(*(int *)0); }
+
+/* ./base/keybound.c */
+
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+#undef keybound
+char *keybound(
+ int code,
+ int count)
+ { return(*(char **)0); }
+
+/* ./base/keyok.c */
+
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+#undef keyok
+int keyok(
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
+/* ./base/version.c */
+
+#undef curses_version
+const char *curses_version(void)
+ { return(*(const char **)0); }
diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw
index 96e7257691d8..28e68034ea8d 100644
--- a/ncurses/llib-lncursesw
+++ b/ncurses/llib-lncursesw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2001-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2001-2008 *
+ * Author: Thomas E. Dickey 2001-2010,2011 *
****************************************************************************/
/* LINTLIBRARY */
@@ -38,27 +38,54 @@
#undef _nc_oldnums
int *_nc_oldnums;
+#undef _nc_scroll_optimize_sp
+void _nc_scroll_optimize_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_scroll_optimize
void _nc_scroll_optimize(void)
{ /* void */ }
+#undef _nc_linedump_sp
+void _nc_linedump_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_linedump
void _nc_linedump(void)
{ /* void */ }
/* ./tty/hashmap.c */
-#include <term.h>
+#undef _nc_hash_map_sp
+void _nc_hash_map_sp(
+ SCREEN *sp)
+ { /* void */ }
#undef _nc_hash_map
void _nc_hash_map(void)
{ /* void */ }
+#undef _nc_make_oldhash_sp
+void _nc_make_oldhash_sp(
+ SCREEN *sp,
+ int i)
+ { /* void */ }
+
#undef _nc_make_oldhash
void _nc_make_oldhash(
int i)
{ /* void */ }
+#undef _nc_scroll_oldhash_sp
+void _nc_scroll_oldhash_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot)
+ { /* void */ }
+
#undef _nc_scroll_oldhash
void _nc_scroll_oldhash(
int n,
@@ -137,6 +164,11 @@ int waddnwstr(
/* ./base/lib_beep.c */
+#undef beep_sp
+int beep_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef beep
int beep(void)
{ return(*(int *)0); }
@@ -231,14 +263,32 @@ int COLOR_PAIRS;
#undef COLORS
int COLORS;
+#undef _nc_reset_colors_sp
+NCURSES_BOOL _nc_reset_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef _nc_reset_colors
NCURSES_BOOL _nc_reset_colors(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef start_color_sp
+int start_color_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef start_color
int start_color(void)
{ return(*(int *)0); }
+#undef init_pair_sp
+int init_pair_sp(
+ SCREEN *sp,
+ short pair,
+ short f,
+ short b)
+ { return(*(int *)0); }
+
#undef init_pair
int init_pair(
short pair,
@@ -246,6 +296,15 @@ int init_pair(
short b)
{ return(*(int *)0); }
+#undef init_color_sp
+int init_color_sp(
+ SCREEN *sp,
+ short color,
+ short r,
+ short g,
+ short b)
+ { return(*(int *)0); }
+
#undef init_color
int init_color(
short color,
@@ -254,14 +313,33 @@ int init_color(
short b)
{ return(*(int *)0); }
+#undef can_change_color_sp
+NCURSES_BOOL can_change_color_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef can_change_color
NCURSES_BOOL can_change_color(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef has_colors_sp
+NCURSES_BOOL has_colors_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_colors
NCURSES_BOOL has_colors(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef color_content_sp
+int color_content_sp(
+ SCREEN *sp,
+ short color,
+ short *r,
+ short *g,
+ short *b)
+ { return(*(int *)0); }
+
#undef color_content
int color_content(
short color,
@@ -270,6 +348,14 @@ int color_content(
short *b)
{ return(*(int *)0); }
+#undef pair_content_sp
+int pair_content_sp(
+ SCREEN *sp,
+ short pair,
+ short *f,
+ short *b)
+ { return(*(int *)0); }
+
#undef pair_content
int pair_content(
short pair,
@@ -277,13 +363,21 @@ int pair_content(
short *b)
{ return(*(int *)0); }
+#undef _nc_do_color_sp
+void _nc_do_color_sp(
+ SCREEN *sp,
+ short old_pair,
+ short pair,
+ NCURSES_BOOL reverse,
+ NCURSES_OUTC_sp outc)
+ { /* void */ }
+
#undef _nc_do_color
void _nc_do_color(
short old_pair,
short pair,
NCURSES_BOOL reverse,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
{ /* void */ }
/* ./base/lib_colorset.c */
@@ -311,16 +405,31 @@ int delwin(
/* ./base/lib_echo.c */
+#undef echo_sp
+int echo_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef echo
int echo(void)
{ return(*(int *)0); }
+#undef noecho_sp
+int noecho_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef noecho
int noecho(void)
{ return(*(int *)0); }
/* ./base/lib_endwin.c */
+#undef endwin_sp
+int endwin_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef endwin
int endwin(void)
{ return(*(int *)0); }
@@ -334,6 +443,11 @@ int werase(
/* ./base/lib_flash.c */
+#undef flash_sp
+int flash_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef flash
int flash(void)
{ return(*(int *)0); }
@@ -1156,11 +1270,21 @@ NCURSES_BOOL is_notimeout(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
+#undef is_pad
+NCURSES_BOOL is_pad(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_scrollok
NCURSES_BOOL is_scrollok(
const WINDOW *z)
{ return(*(NCURSES_BOOL *)0); }
+#undef is_subwin
+NCURSES_BOOL is_subwin(
+ const WINDOW *z)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_syncok
NCURSES_BOOL is_syncok(
const WINDOW *z)
@@ -1646,15 +1770,30 @@ NCURSES_BOOL mouse_trafo(
#undef ESCDELAY
int ESCDELAY;
+#undef set_escdelay_sp
+int set_escdelay_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
#undef set_escdelay
int set_escdelay(
int value)
{ return(*(int *)0); }
+#undef get_escdelay_sp
+int get_escdelay_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
+#undef get_escdelay
+int get_escdelay(void)
+ { return(*(int *)0); }
+
#undef _nc_wgetch
int _nc_wgetch(
WINDOW *win,
- unsigned long *result,
+ int *result,
int use_meta)
{ return(*(int *)0); }
@@ -1708,6 +1847,7 @@ WINDOW *initscr(void)
#undef _nc_insert_ch
int _nc_insert_ch(
+ SCREEN *sp,
WINDOW *win,
chtype ch)
{ return(*(int *)0); }
@@ -1746,6 +1886,11 @@ int winnstr(
/* ./base/lib_isendwin.c */
+#undef isendwin_sp
+NCURSES_BOOL isendwin_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef isendwin
NCURSES_BOOL isendwin(void)
{ return(*(NCURSES_BOOL *)0); }
@@ -1760,16 +1905,35 @@ int leaveok(
/* ./base/lib_mouse.c */
+#undef getmouse_sp
+int getmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
#undef getmouse
int getmouse(
MEVENT *aevent)
{ return(*(int *)0); }
+#undef ungetmouse_sp
+int ungetmouse_sp(
+ SCREEN *sp,
+ MEVENT *aevent)
+ { return(*(int *)0); }
+
#undef ungetmouse
int ungetmouse(
MEVENT *aevent)
{ return(*(int *)0); }
+#undef mousemask_sp
+mmask_t mousemask_sp(
+ SCREEN *sp,
+ mmask_t newmask,
+ mmask_t *oldmask)
+ { return(*(mmask_t *)0); }
+
#undef mousemask
mmask_t mousemask(
mmask_t newmask,
@@ -1783,14 +1947,30 @@ NCURSES_BOOL wenclose(
int x)
{ return(*(NCURSES_BOOL *)0); }
+#undef mouseinterval_sp
+int mouseinterval_sp(
+ SCREEN *sp,
+ int maxclick)
+ { return(*(int *)0); }
+
#undef mouseinterval
int mouseinterval(
int maxclick)
{ return(*(int *)0); }
#undef _nc_has_mouse
-int _nc_has_mouse(void)
- { return(*(int *)0); }
+NCURSES_BOOL _nc_has_mouse(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse_sp
+NCURSES_BOOL has_mouse_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
+#undef has_mouse
+NCURSES_BOOL has_mouse(void)
+ { return(*(NCURSES_BOOL *)0); }
#undef wmouse_trafo
NCURSES_BOOL wmouse_trafo(
@@ -1811,24 +1991,55 @@ int wmove(
/* ./tty/lib_mvcur.c */
+#undef _nc_msec_cost_sp
+int _nc_msec_cost_sp(
+ SCREEN *sp,
+ const char *const cap,
+ int affcnt)
+ { return(*(int *)0); }
+
#undef _nc_msec_cost
int _nc_msec_cost(
const char *const cap,
int affcnt)
{ return(*(int *)0); }
+#undef _nc_mvcur_resume_sp
+void _nc_mvcur_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_resume
void _nc_mvcur_resume(void)
{ /* void */ }
+#undef _nc_mvcur_init_sp
+void _nc_mvcur_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_init
void _nc_mvcur_init(void)
{ /* void */ }
+#undef _nc_mvcur_wrap_sp
+void _nc_mvcur_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_mvcur_wrap
void _nc_mvcur_wrap(void)
{ /* void */ }
+#undef mvcur_sp
+int mvcur_sp(
+ SCREEN *sp,
+ int yold,
+ int xold,
+ int ynew,
+ int xnew)
+ { return(*(int *)0); }
+
#undef mvcur
int mvcur(
int yold,
@@ -1851,14 +2062,32 @@ int mvwin(
/* ./base/lib_newterm.c */
+#undef filter_sp
+void filter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef filter
void filter(void)
{ /* void */ }
+#undef nofilter_sp
+void nofilter_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef nofilter
void nofilter(void)
{ /* void */ }
+#undef newterm_sp
+SCREEN *newterm_sp(
+ SCREEN *sp,
+ char *name,
+ FILE *ofp,
+ FILE *ifp)
+ { return(*(SCREEN **)0); }
+
#undef newterm
SCREEN *newterm(
char *name,
@@ -1873,6 +2102,15 @@ int _nc_freewin(
WINDOW *win)
{ return(*(int *)0); }
+#undef newwin_sp
+WINDOW *newwin_sp(
+ SCREEN *sp,
+ int num_lines,
+ int num_columns,
+ int begy,
+ int begx)
+ { return(*(WINDOW **)0); }
+
#undef newwin
WINDOW *newwin(
int num_lines,
@@ -1899,8 +2137,9 @@ WINDOW *subwin(
int x)
{ return(*(WINDOW **)0); }
-#undef _nc_makenew
-WINDOW *_nc_makenew(
+#undef _nc_makenew_sp
+WINDOW *_nc_makenew_sp(
+ SCREEN *sp,
int num_lines,
int num_columns,
int begy,
@@ -1908,17 +2147,37 @@ WINDOW *_nc_makenew(
int flags)
{ return(*(WINDOW **)0); }
-#undef _nc_screen_of
-SCREEN *_nc_screen_of(
- WINDOW *win)
- { return(*(SCREEN **)0); }
+#undef _nc_curscr_of
+WINDOW *_nc_curscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_newscr_of
+WINDOW *_nc_newscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
+
+#undef _nc_stdscr_of
+WINDOW *_nc_stdscr_of(
+ SCREEN *sp)
+ { return(*(WINDOW **)0); }
/* ./base/lib_nl.c */
+#undef nl_sp
+int nl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nl
int nl(void)
{ return(*(int *)0); }
+#undef nonl_sp
+int nonl_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nonl
int nonl(void)
{ return(*(int *)0); }
@@ -1952,6 +2211,13 @@ int copywin(
/* ./base/lib_pad.c */
+#undef newpad_sp
+WINDOW *newpad_sp(
+ SCREEN *sp,
+ int l,
+ int c)
+ { return(*(WINDOW **)0); }
+
#undef newpad
WINDOW *newpad(
int l,
@@ -2057,6 +2323,14 @@ int wnoutrefresh(
/* ./base/lib_restart.c */
+#undef restartterm_sp
+int restartterm_sp(
+ SCREEN *sp,
+ char *termp,
+ int filenum,
+ int *errret)
+ { return(*(int *)0); }
+
#undef restartterm
int restartterm(
char *termp,
@@ -2105,6 +2379,12 @@ int mvwscanw(
/* ./base/lib_screen.c */
+#undef getwin_sp
+WINDOW *getwin_sp(
+ SCREEN *sp,
+ FILE *filep)
+ { return(*(WINDOW **)0); }
+
#undef getwin
WINDOW *getwin(
FILE *filep)
@@ -2116,6 +2396,12 @@ int putwin(
FILE *filep)
{ return(*(int *)0); }
+#undef scr_restore_sp
+int scr_restore_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_restore
int scr_restore(
const char *file)
@@ -2126,11 +2412,23 @@ int scr_dump(
const char *file)
{ return(*(int *)0); }
+#undef scr_init_sp
+int scr_init_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_init
int scr_init(
const char *file)
{ return(*(int *)0); }
+#undef scr_set_sp
+int scr_set_sp(
+ SCREEN *sp,
+ const char *file)
+ { return(*(int *)0); }
+
#undef scr_set
int scr_set(
const char *file)
@@ -2182,6 +2480,16 @@ void delscreen(
SCREEN *sp)
{ /* void */ }
+#undef _nc_setupscreen_sp
+int _nc_setupscreen_sp(
+ SCREEN **spp,
+ int slines,
+ int scolumns,
+ FILE *output,
+ NCURSES_BOOL filtered,
+ int slk_format)
+ { return(*(int *)0); }
+
#undef _nc_setupscreen
int _nc_setupscreen(
int slines,
@@ -2191,6 +2499,15 @@ int _nc_setupscreen(
int slk_format)
{ return(*(int *)0); }
+#undef _nc_ripoffline_sp
+int _nc_ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
#undef _nc_ripoffline
int _nc_ripoffline(
int line,
@@ -2199,6 +2516,15 @@ int _nc_ripoffline(
int p2))
{ return(*(int *)0); }
+#undef ripoffline_sp
+int ripoffline_sp(
+ SCREEN *sp,
+ int line,
+ int (*init)(
+ WINDOW *p1,
+ int p2))
+ { return(*(int *)0); }
+
#undef ripoffline
int ripoffline(
int line,
@@ -2209,18 +2535,37 @@ int ripoffline(
/* ./base/lib_slk.c */
+#undef _nc_format_slks
+int _nc_format_slks(
+ SCREEN *sp,
+ int cols)
+ { return(*(int *)0); }
+
#undef _nc_slk_initialize
int _nc_slk_initialize(
WINDOW *stwin,
int cols)
{ return(*(int *)0); }
+#undef slk_restore_sp
+int slk_restore_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_restore
int slk_restore(void)
{ return(*(int *)0); }
/* ./base/lib_slkatr_set.c */
+#undef slk_attr_set_sp
+int slk_attr_set_sp(
+ SCREEN *sp,
+ const attr_t attr,
+ short color_pair_number,
+ void *opts)
+ { return(*(int *)0); }
+
#undef slk_attr_set
int slk_attr_set(
const attr_t attr,
@@ -2230,6 +2575,12 @@ int slk_attr_set(
/* ./base/lib_slkatrof.c */
+#undef slk_attroff_sp
+int slk_attroff_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attroff
int slk_attroff(
const chtype attr)
@@ -2237,6 +2588,12 @@ int slk_attroff(
/* ./base/lib_slkatron.c */
+#undef slk_attron_sp
+int slk_attron_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attron
int slk_attron(
const chtype attr)
@@ -2244,6 +2601,12 @@ int slk_attron(
/* ./base/lib_slkatrset.c */
+#undef slk_attrset_sp
+int slk_attrset_sp(
+ SCREEN *sp,
+ const chtype attr)
+ { return(*(int *)0); }
+
#undef slk_attrset
int slk_attrset(
const chtype attr)
@@ -2251,18 +2614,34 @@ int slk_attrset(
/* ./base/lib_slkattr.c */
+#undef slk_attr_sp
+attr_t slk_attr_sp(
+ SCREEN *sp)
+ { return(*(attr_t *)0); }
+
#undef slk_attr
attr_t slk_attr(void)
{ return(*(attr_t *)0); }
/* ./base/lib_slkclear.c */
+#undef slk_clear_sp
+int slk_clear_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_clear
int slk_clear(void)
{ return(*(int *)0); }
/* ./base/lib_slkcolor.c */
+#undef slk_color_sp
+int slk_color_sp(
+ SCREEN *sp,
+ short color_pair_number)
+ { return(*(int *)0); }
+
#undef slk_color
int slk_color(
short color_pair_number)
@@ -2270,6 +2649,12 @@ int slk_color(
/* ./base/lib_slkinit.c */
+#undef slk_init_sp
+int slk_init_sp(
+ SCREEN *sp,
+ int format)
+ { return(*(int *)0); }
+
#undef slk_init
int slk_init(
int format)
@@ -2277,6 +2662,12 @@ int slk_init(
/* ./base/lib_slklab.c */
+#undef slk_label_sp
+char *slk_label_sp(
+ SCREEN *sp,
+ int n)
+ { return(*(char **)0); }
+
#undef slk_label
char *slk_label(
int n)
@@ -2284,10 +2675,20 @@ char *slk_label(
/* ./base/lib_slkrefr.c */
+#undef slk_noutrefresh_sp
+int slk_noutrefresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_noutrefresh
int slk_noutrefresh(void)
{ return(*(int *)0); }
+#undef slk_refresh_sp
+int slk_refresh_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_refresh
int slk_refresh(void)
{ return(*(int *)0); }
@@ -2296,6 +2697,14 @@ int slk_refresh(void)
#include <wctype.h>
+#undef slk_set_sp
+int slk_set_sp(
+ SCREEN *sp,
+ int i,
+ const char *astr,
+ int format)
+ { return(*(int *)0); }
+
#undef slk_set
int slk_set(
int i,
@@ -2305,6 +2714,11 @@ int slk_set(
/* ./base/lib_slktouch.c */
+#undef slk_touch_sp
+int slk_touch_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef slk_touch
int slk_touch(void)
{ return(*(int *)0); }
@@ -2346,6 +2760,12 @@ char *_nc_tracemouse(
MEVENT const *ep)
{ return(*(char **)0); }
+#undef _nc_retrace_mmask_t
+mmask_t _nc_retrace_mmask_t(
+ SCREEN *sp,
+ mmask_t code)
+ { return(*(mmask_t *)0); }
+
#undef _tracemouse
char *_tracemouse(
MEVENT const *ep)
@@ -2367,8 +2787,8 @@ void _nc_fifo_dump(
SCREEN *sp)
{ /* void */ }
-#undef _nc_ungetch
-int _nc_ungetch(
+#undef ungetch_sp
+int ungetch_sp(
SCREEN *sp,
int ch)
{ return(*(int *)0); }
@@ -2380,11 +2800,23 @@ int ungetch(
/* ./tty/lib_vidattr.c */
+#undef vidputs_sp
+int vidputs_sp(
+ SCREEN *sp,
+ chtype newmode,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
#undef vidputs
int vidputs(
chtype newmode,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
+ { return(*(int *)0); }
+
+#undef vidattr_sp
+int vidattr_sp(
+ SCREEN *sp,
+ chtype newmode)
{ return(*(int *)0); }
#undef vidattr
@@ -2392,6 +2824,11 @@ int vidattr(
chtype newmode)
{ return(*(int *)0); }
+#undef termattrs_sp
+chtype termattrs_sp(
+ SCREEN *sp)
+ { return(*(chtype *)0); }
+
#undef termattrs
chtype termattrs(void)
{ return(*(chtype *)0); }
@@ -2472,12 +2909,24 @@ WINDOW *dupwin(
/* ./base/nc_panel.c */
+#undef _nc_panelhook_sp
+struct panelhook *_nc_panelhook_sp(
+ SCREEN *sp)
+ { return(*(struct panelhook **)0); }
+
#undef _nc_panelhook
struct panelhook *_nc_panelhook(void)
{ return(*(struct panelhook **)0); }
/* ./base/safe_sprintf.c */
+#undef _nc_printf_string_sp
+char *_nc_printf_string_sp(
+ SCREEN *sp,
+ const char *fmt,
+ va_list ap)
+ { return(*(char **)0); }
+
#undef _nc_printf_string
char *_nc_printf_string(
const char *fmt,
@@ -2489,10 +2938,24 @@ char *_nc_printf_string(
#include <sys/time.h>
#include <sys/times.h>
+#undef doupdate_sp
+int doupdate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef doupdate
int doupdate(void)
{ return(*(int *)0); }
+#undef _nc_scrolln_sp
+int _nc_scrolln_sp(
+ SCREEN *sp,
+ int n,
+ int top,
+ int bot,
+ int maxy)
+ { return(*(int *)0); }
+
#undef _nc_scrolln
int _nc_scrolln(
int n,
@@ -2501,18 +2964,39 @@ int _nc_scrolln(
int maxy)
{ return(*(int *)0); }
+#undef _nc_screen_resume_sp
+void _nc_screen_resume_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_resume
void _nc_screen_resume(void)
{ /* void */ }
+#undef _nc_screen_init_sp
+void _nc_screen_init_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_init
void _nc_screen_init(void)
{ /* void */ }
+#undef _nc_screen_wrap_sp
+void _nc_screen_wrap_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_screen_wrap
void _nc_screen_wrap(void)
{ /* void */ }
+#undef _nc_do_xmc_glitch_sp
+void _nc_do_xmc_glitch_sp(
+ SCREEN *sp,
+ attr_t previous)
+ { /* void */ }
+
#undef _nc_do_xmc_glitch
void _nc_do_xmc_glitch(
attr_t previous)
@@ -2544,12 +3028,16 @@ void _nc_vsscanf(void)
/* ./base/lib_freeall.c */
-#include <term_entry.h>
-
#undef _nc_freeall
void _nc_freeall(void)
{ /* void */ }
+#undef _nc_free_and_exit_sp
+void _nc_free_and_exit_sp(
+ SCREEN *sp,
+ int code)
+ { /* void */ }
+
#undef _nc_free_and_exit
void _nc_free_and_exit(
int code)
@@ -2678,6 +3166,12 @@ int win_wchnstr(
/* ./widechar/lib_ins_wch.c */
+#undef _nc_insert_wch
+int _nc_insert_wch(
+ WINDOW *win,
+ const cchar_t *wch)
+ { return(*(int *)0); }
+
#undef wins_wch
int wins_wch(
WINDOW *win,
@@ -2739,6 +3233,12 @@ size_t _nc_wcrtomb(
mbstate_t *state)
{ return(*(size_t *)0); }
+#undef unget_wch_sp
+int unget_wch_sp(
+ SCREEN *sp,
+ const wchar_t wch)
+ { return(*(int *)0); }
+
#undef unget_wch
int unget_wch(
const wchar_t wch)
@@ -2746,13 +3246,29 @@ int unget_wch(
/* ./widechar/lib_vid_attr.c */
+#undef vid_puts_sp
+int vid_puts_sp(
+ SCREEN *sp,
+ attr_t newmode,
+ short pair,
+ void *opts,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
#undef vid_puts
int vid_puts(
attr_t newmode,
short pair,
void *opts,
- int (*outc)(
- int p1))
+ NCURSES_OUTC outc)
+ { return(*(int *)0); }
+
+#undef vid_attr_sp
+int vid_attr_sp(
+ SCREEN *sp,
+ attr_t newmode,
+ short pair,
+ void *opts)
{ return(*(int *)0); }
#undef vid_attr
@@ -2762,6 +3278,11 @@ int vid_attr(
void *opts)
{ return(*(int *)0); }
+#undef term_attrs_sp
+attr_t term_attrs_sp(
+ SCREEN *sp)
+ { return(*(attr_t *)0); }
+
#undef term_attrs
attr_t term_attrs(void)
{ return(*(attr_t *)0); }
@@ -2786,6 +3307,12 @@ void _nc_init_wacs(void)
/* ./widechar/lib_wunctrl.c */
+#undef wunctrl_sp
+wchar_t *wunctrl_sp(
+ SCREEN *sp,
+ cchar_t *wc)
+ { return(*(wchar_t **)0); }
+
#undef wunctrl
wchar_t *wunctrl(
cchar_t *wc)
@@ -2805,6 +3332,24 @@ void _nc_toggle_attr_off(
attr_t at)
{ /* void */ }
+#undef _nc_DelCharCost_sp
+int _nc_DelCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_InsCharCost_sp
+int _nc_InsCharCost_sp(
+ SCREEN *sp,
+ int count)
+ { return(*(int *)0); }
+
+#undef _nc_UpdateAttrs_sp
+void _nc_UpdateAttrs_sp(
+ SCREEN *sp,
+ const cchar_t *c)
+ { /* void */ }
+
#undef _nc_DelCharCost
int _nc_DelCharCost(
int count)
@@ -2817,11 +3362,17 @@ int _nc_InsCharCost(
#undef _nc_UpdateAttrs
void _nc_UpdateAttrs(
- cchar_t c)
+ const cchar_t *c)
{ /* void */ }
/* ./base/legacy_coding.c */
+#undef use_legacy_coding_sp
+int use_legacy_coding_sp(
+ SCREEN *sp,
+ int level)
+ { return(*(int *)0); }
+
#undef use_legacy_coding
int use_legacy_coding(
int level)
@@ -2829,10 +3380,22 @@ int use_legacy_coding(
/* ./base/lib_dft_fgbg.c */
+#undef use_default_colors_sp
+int use_default_colors_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef use_default_colors
int use_default_colors(void)
{ return(*(int *)0); }
+#undef assume_default_colors_sp
+int assume_default_colors_sp(
+ SCREEN *sp,
+ int fg,
+ int bg)
+ { return(*(int *)0); }
+
#undef assume_default_colors
int assume_default_colors(
int fg,
@@ -2841,6 +3404,13 @@ int assume_default_colors(
/* ./tinfo/lib_print.c */
+#undef mcprint_sp
+int mcprint_sp(
+ SCREEN *sp,
+ char *data,
+ int len)
+ { return(*(int *)0); }
+
#undef mcprint
int mcprint(
char *data,
@@ -2849,18 +3419,39 @@ int mcprint(
/* ./base/resizeterm.c */
+#undef is_term_resized_sp
+NCURSES_BOOL is_term_resized_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef is_term_resized
NCURSES_BOOL is_term_resized(
int ToLines,
int ToCols)
{ return(*(NCURSES_BOOL *)0); }
+#undef resize_term_sp
+int resize_term_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
#undef resize_term
int resize_term(
int ToLines,
int ToCols)
{ return(*(int *)0); }
+#undef resizeterm_sp
+int resizeterm_sp(
+ SCREEN *sp,
+ int ToLines,
+ int ToCols)
+ { return(*(int *)0); }
+
#undef resizeterm
int resizeterm(
int ToLines,
@@ -2903,9 +3494,6 @@ int wresize(
/* ./tinfo/access.c */
-#include <sys/stat.h>
-#include <nc_alloc.h>
-
#undef _nc_rootname
char *_nc_rootname(
char *path)
@@ -2978,7 +3566,32 @@ char *const numcodes[] = {0};
#undef strcodes
char *const strcodes[] = {0};
+/* ./comp_captab.c */
+
+#include <hashsize.h>
+
+#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 HashValue *_nc_get_hash_table(
+ NCURSES_BOOL termcap)
+ { return(*(const HashValue **)0); }
+
+#undef _nc_get_alias_table
+const struct alias *_nc_get_alias_table(
+ NCURSES_BOOL termcap)
+ { return(*(const struct alias **)0); }
+
+#undef _nc_get_hash_info
+const HashData *_nc_get_hash_info(
+ NCURSES_BOOL termcap)
+ { return(*(const HashData **)0); }
+
/* ./tinfo/comp_error.c */
+
#undef _nc_suppress_warnings
NCURSES_BOOL _nc_suppress_warnings;
#undef _nc_curr_line
@@ -3023,6 +3636,21 @@ void _nc_syserr_abort(
...)
{ /* void */ }
+/* ./tinfo/comp_hash.c */
+
+#undef _nc_find_entry
+struct name_table_entry const *_nc_find_entry(
+ const char *string,
+ const HashValue *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,
+ NCURSES_BOOL termcap)
+ { return(*(struct name_table_entry const **)0); }
+
/* ./tinfo/db_iterator.c */
#undef _nc_tic_dir
@@ -3143,6 +3771,11 @@ void _nc_init_keytry(
#undef acs_map
chtype acs_map[128];
+#undef _nc_init_acs_sp
+void _nc_init_acs_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_init_acs
void _nc_init_acs(void)
{ /* void */ }
@@ -3166,6 +3799,11 @@ int _nc_ospeed(
int BaudRate)
{ return(*(int *)0); }
+#undef baudrate_sp
+int baudrate_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef baudrate
int baudrate(void)
{ return(*(int *)0); }
@@ -3175,11 +3813,23 @@ int baudrate(void)
#undef cur_term
TERMINAL *cur_term;
+#undef set_curterm_sp
+TERMINAL *set_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(TERMINAL **)0); }
+
#undef set_curterm
TERMINAL *set_curterm(
TERMINAL *termp)
{ return(*(TERMINAL **)0); }
+#undef del_curterm_sp
+int del_curterm_sp(
+ SCREEN *sp,
+ TERMINAL *termp)
+ { return(*(int *)0); }
+
#undef del_curterm
int del_curterm(
TERMINAL *termp)
@@ -3202,26 +3852,56 @@ NCURSES_GLOBALS _nc_globals;
#undef _nc_prescreen
NCURSES_PRESCREEN _nc_prescreen;
+#undef _nc_screen_of
+SCREEN *_nc_screen_of(
+ WINDOW *win)
+ { return(*(SCREEN **)0); }
+
/* ./tinfo/lib_has_cap.c */
+#undef has_ic_sp
+NCURSES_BOOL has_ic_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_ic
NCURSES_BOOL has_ic(void)
{ return(*(NCURSES_BOOL *)0); }
+#undef has_il_sp
+NCURSES_BOOL has_il_sp(
+ SCREEN *sp)
+ { return(*(NCURSES_BOOL *)0); }
+
#undef has_il
NCURSES_BOOL has_il(void)
{ return(*(NCURSES_BOOL *)0); }
/* ./tinfo/lib_kernel.c */
+#undef erasechar_sp
+char erasechar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
#undef erasechar
char erasechar(void)
{ return(*(char *)0); }
+#undef killchar_sp
+char killchar_sp(
+ SCREEN *sp)
+ { return(*(char *)0); }
+
#undef killchar
char killchar(void)
{ return(*(char *)0); }
+#undef flushinp_sp
+int flushinp_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef flushinp
int flushinp(void)
{ return(*(int *)0); }
@@ -3230,8 +3910,8 @@ int flushinp(void)
struct kn { short offset; int code; };
-#undef _nc_keyname
-char *_nc_keyname(
+#undef keyname_sp
+char *keyname_sp(
SCREEN *sp,
int c)
{ return(*(char **)0); }
@@ -3251,6 +3931,12 @@ char *longname(void)
#include <time.h>
+#undef napms_sp
+int napms_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
#undef napms
int napms(
int ms)
@@ -3270,6 +3956,12 @@ void idcok(
NCURSES_BOOL flag)
{ /* void */ }
+#undef halfdelay_sp
+int halfdelay_sp(
+ SCREEN *sp,
+ int t)
+ { return(*(int *)0); }
+
#undef halfdelay
int halfdelay(
int t)
@@ -3305,21 +3997,46 @@ int meta(
NCURSES_BOOL flag)
{ return(*(int *)0); }
+#undef curs_set_sp
+int curs_set_sp(
+ SCREEN *sp,
+ int vis)
+ { return(*(int *)0); }
+
#undef curs_set
int curs_set(
int vis)
{ return(*(int *)0); }
+#undef typeahead_sp
+int typeahead_sp(
+ SCREEN *sp,
+ int fd)
+ { return(*(int *)0); }
+
#undef typeahead
int typeahead(
int fd)
{ return(*(int *)0); }
+#undef has_key_sp
+int has_key_sp(
+ SCREEN *sp,
+ int keycode)
+ { return(*(int *)0); }
+
#undef has_key
int has_key(
int keycode)
{ return(*(int *)0); }
+#undef _nc_putp_flush_sp
+int _nc_putp_flush_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *value)
+ { return(*(int *)0); }
+
#undef _nc_keypad
int _nc_keypad(
SCREEN *sp,
@@ -3328,30 +4045,67 @@ int _nc_keypad(
/* ./tinfo/lib_raw.c */
+#undef raw_sp
+int raw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef raw
int raw(void)
{ return(*(int *)0); }
+#undef cbreak_sp
+int cbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef cbreak
int cbreak(void)
{ return(*(int *)0); }
+#undef qiflush_sp
+void qiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef qiflush
void qiflush(void)
{ /* void */ }
+#undef noraw_sp
+int noraw_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef noraw
int noraw(void)
{ return(*(int *)0); }
+#undef nocbreak_sp
+int nocbreak_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef nocbreak
int nocbreak(void)
{ return(*(int *)0); }
+#undef noqiflush_sp
+void noqiflush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef noqiflush
void noqiflush(void)
{ /* void */ }
+#undef intrflush_sp
+int intrflush_sp(
+ SCREEN *sp,
+ WINDOW *win,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
#undef intrflush
int intrflush(
WINDOW *win,
@@ -3373,6 +4127,12 @@ int COLS;
#undef TABSIZE
int TABSIZE;
+#undef set_tabsize_sp
+int set_tabsize_sp(
+ SCREEN *sp,
+ int value)
+ { return(*(int *)0); }
+
#undef set_tabsize
int set_tabsize(
int value)
@@ -3383,6 +4143,12 @@ int _nc_handle_sigwinch(
SCREEN *sp)
{ return(*(int *)0); }
+#undef use_env_sp
+void use_env_sp(
+ SCREEN *sp,
+ NCURSES_BOOL f)
+ { /* void */ }
+
#undef use_env
void use_env(
NCURSES_BOOL f)
@@ -3400,6 +4166,18 @@ void _nc_update_screensize(
SCREEN *sp)
{ /* void */ }
+#undef _nc_setup_tinfo
+int _nc_setup_tinfo(
+ const char *const tn,
+ TERMTYPE *const tp)
+ { return(*(int *)0); }
+
+#undef _nc_tinfo_cmdch
+void _nc_tinfo_cmdch(
+ TERMINAL *termp,
+ char proto)
+ { /* void */ }
+
#undef _nc_get_locale
char *_nc_get_locale(void)
{ return(*(char **)0); }
@@ -3421,6 +4199,10 @@ int _nc_setupterm(
NCURSES_BOOL reuse)
{ return(*(int *)0); }
+#undef new_prescr
+SCREEN *new_prescr(void)
+ { return(*(SCREEN **)0); }
+
#undef setupterm
int setupterm(
char *tname,
@@ -3435,8 +4217,9 @@ char *UP;
#undef BC
char *BC;
-#undef tgetent
-int tgetent(
+#undef tgetent_sp
+int tgetent_sp(
+ SCREEN *sp,
char *bufp,
const char *name)
{ return(*(int *)0); }
@@ -3447,16 +4230,41 @@ int tgetent(
#endif
+#undef tgetent
+int tgetent(
+ char *bufp,
+ const char *name)
+ { return(*(int *)0); }
+
+#undef tgetflag_sp
+int tgetflag_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
#undef tgetflag
int tgetflag(
char *id)
{ return(*(int *)0); }
+#undef tgetnum_sp
+int tgetnum_sp(
+ SCREEN *sp,
+ char *id)
+ { return(*(int *)0); }
+
#undef tgetnum
int tgetnum(
char *id)
{ return(*(int *)0); }
+#undef tgetstr_sp
+char *tgetstr_sp(
+ SCREEN *sp,
+ char *id,
+ char **area)
+ { return(*(char **)0); }
+
#undef tgetstr
char *tgetstr(
char *id,
@@ -3465,6 +4273,11 @@ char *tgetstr(
/* ./tinfo/lib_termname.c */
+#undef termname_sp
+char *termname_sp(
+ SCREEN *sp)
+ { return(*(char **)0); }
+
#undef termname
char *termname(void)
{ return(*(char **)0); }
@@ -3480,16 +4293,34 @@ char *tgoto(
/* ./tinfo/lib_ti.c */
+#undef tigetflag_sp
+int tigetflag_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
#undef tigetflag
int tigetflag(
char *str)
{ return(*(int *)0); }
+#undef tigetnum_sp
+int tigetnum_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(int *)0); }
+
#undef tigetnum
int tigetnum(
char *str)
{ return(*(int *)0); }
+#undef tigetstr_sp
+char *tigetstr_sp(
+ SCREEN *sp,
+ char *str)
+ { return(*(char **)0); }
+
#undef tigetstr
char *tigetstr(
char *str)
@@ -3513,6 +4344,12 @@ char *tparm(
...)
{ return(*(char **)0); }
+#undef tiparm
+char *tiparm(
+ const char *string,
+ ...)
+ { return(*(char **)0); }
+
/* ./tinfo/lib_tputs.c */
#undef PC
@@ -3527,25 +4364,75 @@ void _nc_set_no_padding(
SCREEN *sp)
{ /* void */ }
+#undef delay_output_sp
+int delay_output_sp(
+ SCREEN *sp,
+ int ms)
+ { return(*(int *)0); }
+
#undef delay_output
int delay_output(
int ms)
{ return(*(int *)0); }
+#undef _nc_flush_sp
+void _nc_flush_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef _nc_flush
void _nc_flush(void)
{ /* void */ }
+#undef _nc_outch_sp
+int _nc_outch_sp(
+ SCREEN *sp,
+ int ch)
+ { return(*(int *)0); }
+
#undef _nc_outch
int _nc_outch(
int ch)
{ return(*(int *)0); }
+#undef putp_sp
+int putp_sp(
+ SCREEN *sp,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef _nc_putp_sp
+int _nc_putp_sp(
+ SCREEN *sp,
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
#undef putp
int putp(
const char *string)
{ return(*(int *)0); }
+#undef _nc_putp
+int _nc_putp(
+ const char *name,
+ const char *string)
+ { return(*(int *)0); }
+
+#undef tputs_sp
+int tputs_sp(
+ SCREEN *sp,
+ const char *string,
+ int affcnt,
+ NCURSES_OUTC_sp outc)
+ { return(*(int *)0); }
+
+#undef _nc_outc_wrapper
+int _nc_outc_wrapper(
+ SCREEN *sp,
+ int c)
+ { return(*(int *)0); }
+
#undef tputs
int tputs(
const char *string,
@@ -3579,6 +4466,11 @@ NCURSES_BOOL _nc_retrace_bool(
NCURSES_BOOL code)
{ return(*(NCURSES_BOOL *)0); }
+#undef _nc_retrace_char
+char _nc_retrace_char(
+ char code)
+ { return(*(char *)0); }
+
#undef _nc_retrace_int
int _nc_retrace_int(
int code)
@@ -3632,6 +4524,11 @@ char *_traceattr(
attr_t newmode)
{ return(*(char **)0); }
+#undef _nc_retrace_int_attr_t
+int _nc_retrace_int_attr_t(
+ attr_t code)
+ { return(*(int *)0); }
+
#undef _nc_retrace_attr_t
attr_t _nc_retrace_attr_t(
attr_t code)
@@ -3701,36 +4598,78 @@ char *_tracechar(
/* ./tinfo/lib_ttyflags.c */
+#undef _nc_get_tty_mode_sp
+int _nc_get_tty_mode_sp(
+ SCREEN *sp,
+ struct termios *buf)
+ { return(*(int *)0); }
+
#undef _nc_get_tty_mode
int _nc_get_tty_mode(
struct termios *buf)
{ return(*(int *)0); }
+#undef _nc_set_tty_mode_sp
+int _nc_set_tty_mode_sp(
+ SCREEN *sp,
+ 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_sp
+int def_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef def_shell_mode
int def_shell_mode(void)
{ return(*(int *)0); }
+#undef def_prog_mode_sp
+int def_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef def_prog_mode
int def_prog_mode(void)
{ return(*(int *)0); }
+#undef reset_prog_mode_sp
+int reset_prog_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef reset_prog_mode
int reset_prog_mode(void)
{ return(*(int *)0); }
+#undef reset_shell_mode_sp
+int reset_shell_mode_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef reset_shell_mode
int reset_shell_mode(void)
{ return(*(int *)0); }
+#undef savetty_sp
+int savetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef savetty
int savetty(void)
{ return(*(int *)0); }
+#undef resetty_sp
+int resetty_sp(
+ SCREEN *sp)
+ { return(*(int *)0); }
+
#undef resetty
int resetty(void)
{ return(*(int *)0); }
@@ -3810,6 +4749,13 @@ int _nc_read_termcap_entry(
/* ./tinfo/setbuf.c */
+#undef _nc_set_buffer_sp
+void _nc_set_buffer_sp(
+ SCREEN *sp,
+ FILE *ofp,
+ NCURSES_BOOL buffered)
+ { /* void */ }
+
#undef _nc_set_buffer
void _nc_set_buffer(
FILE *ofp,
@@ -3901,8 +4847,8 @@ char *_nc_trim_sgr0(
/* ./unctrl.c */
-#undef _nc_unctrl
-char *_nc_unctrl(
+#undef unctrl_sp
+char *unctrl_sp(
SCREEN *sp,
chtype ch)
{ return(*(char **)0); }
@@ -4011,25 +4957,6 @@ char *_nc_infotocap(
int const parameterized)
{ return(*(char **)0); }
-/* ./comp_captab.c */
-
-#include <hashsize.h>
-
-#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 short *_nc_get_hash_table(
- NCURSES_BOOL termcap)
- { return(*(const short **)0); }
-
-#undef _nc_get_alias_table
-const struct alias *_nc_get_alias_table(
- NCURSES_BOOL termcap)
- { return(*(const struct alias **)0); }
-
/* ./tinfo/comp_expand.c */
#undef _nc_tic_expand
@@ -4039,21 +4966,6 @@ char *_nc_tic_expand(
int numbers)
{ return(*(char **)0); }
-/* ./tinfo/comp_hash.c */
-
-#undef _nc_find_entry
-struct name_table_entry const *_nc_find_entry(
- const char *string,
- const short *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_termtype2
@@ -4173,6 +5085,13 @@ int _nc_tic_written(void)
/* ./base/define_key.c */
+#undef define_key_sp
+int define_key_sp(
+ SCREEN *sp,
+ const char *str,
+ int keycode)
+ { return(*(int *)0); }
+
#undef define_key
int define_key(
const char *str,
@@ -4187,6 +5106,12 @@ void _nc_hashed_db(void)
/* ./base/key_defined.c */
+#undef key_defined_sp
+int key_defined_sp(
+ SCREEN *sp,
+ const char *str)
+ { return(*(int *)0); }
+
#undef key_defined
int key_defined(
const char *str)
@@ -4194,6 +5119,13 @@ int key_defined(
/* ./base/keybound.c */
+#undef keybound_sp
+char *keybound_sp(
+ SCREEN *sp,
+ int code,
+ int count)
+ { return(*(char **)0); }
+
#undef keybound
char *keybound(
int code,
@@ -4202,6 +5134,13 @@ char *keybound(
/* ./base/keyok.c */
+#undef keyok_sp
+int keyok_sp(
+ SCREEN *sp,
+ int c,
+ NCURSES_BOOL flag)
+ { return(*(int *)0); }
+
#undef keyok
int keyok(
int c,
diff --git a/ncurses/modules b/ncurses/modules
index f28ef81a3b33..caf1799fa87d 100644
--- a/ncurses/modules
+++ b/ncurses/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.112 2007/09/08 22:03:34 tom Exp $
+# $Id: modules,v 1.117 2010/08/07 18:41:02 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -32,201 +32,213 @@
@ 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_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)
+hardscroll lib $(serial) $(HEADER_DEPS)
+hashmap lib $(serial) $(HEADER_DEPS)
+lib_addch lib $(base) $(HEADER_DEPS)
+lib_addstr lib $(base) $(HEADER_DEPS)
+lib_beep lib $(base) $(HEADER_DEPS)
+lib_bkgd lib $(base) $(HEADER_DEPS)
+lib_box lib $(base) $(HEADER_DEPS)
+lib_chgat lib $(base) $(HEADER_DEPS)
+lib_clear lib $(base) $(HEADER_DEPS)
+lib_clearok lib $(base) $(HEADER_DEPS)
+lib_clrbot lib $(base) $(HEADER_DEPS)
+lib_clreol lib $(base) $(HEADER_DEPS)
+lib_color lib $(base) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_colorset lib $(base) $(HEADER_DEPS)
+lib_delch lib $(base) $(HEADER_DEPS)
+lib_delwin lib $(base) $(HEADER_DEPS)
+lib_echo lib $(base) $(HEADER_DEPS)
+lib_endwin lib $(base) $(HEADER_DEPS)
+lib_erase lib $(base) $(HEADER_DEPS)
+lib_flash lib $(base) $(HEADER_DEPS)
+lib_gen lib . $(HEADER_DEPS)
+lib_getch lib $(base) $(HEADER_DEPS) $(srcdir)/fifo_defs.h
+lib_getstr lib $(base) $(HEADER_DEPS)
+lib_hline lib $(base) $(HEADER_DEPS)
+lib_immedok lib $(base) $(HEADER_DEPS)
+lib_inchstr lib $(base) $(HEADER_DEPS)
+lib_initscr lib $(base) $(HEADER_DEPS)
+lib_insch lib $(base) $(HEADER_DEPS)
+lib_insdel lib $(base) $(HEADER_DEPS)
+lib_insnstr lib $(base) $(HEADER_DEPS)
+lib_instr lib $(base) $(HEADER_DEPS)
+lib_isendwin lib $(base) $(HEADER_DEPS)
+lib_leaveok lib $(base) $(HEADER_DEPS)
+lib_mouse lib $(base) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_move lib $(base) $(HEADER_DEPS)
+lib_mvcur lib $(serial) $(HEADER_DEPS) $(INCDIR)/tic.h $(srcdir)/../progs/dump_entry.h
+lib_mvwin lib $(base) $(HEADER_DEPS)
+lib_newterm lib $(base) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_newwin lib $(base) $(HEADER_DEPS)
+lib_nl lib $(base) $(HEADER_DEPS)
+lib_overlay lib $(base) $(HEADER_DEPS)
+lib_pad lib $(base) $(HEADER_DEPS)
+lib_printw lib $(base) $(HEADER_DEPS)
+lib_redrawln lib $(base) $(HEADER_DEPS)
+lib_refresh lib $(base) $(HEADER_DEPS)
+lib_restart lib $(base) $(HEADER_DEPS)
+lib_scanw lib $(base) $(HEADER_DEPS)
+lib_screen lib $(base) $(HEADER_DEPS)
+lib_scroll lib $(base) $(HEADER_DEPS)
+lib_scrollok lib $(base) $(HEADER_DEPS)
+lib_scrreg lib $(base) $(HEADER_DEPS)
+lib_set_term lib $(base) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_slk lib $(base) $(HEADER_DEPS)
+lib_slkatr_set lib $(base) $(HEADER_DEPS)
+lib_slkatrof lib $(base) $(HEADER_DEPS)
+lib_slkatron lib $(base) $(HEADER_DEPS)
+lib_slkatrset lib $(base) $(HEADER_DEPS)
+lib_slkattr lib $(base) $(HEADER_DEPS)
+lib_slkclear lib $(base) $(HEADER_DEPS)
+lib_slkcolor lib $(base) $(HEADER_DEPS)
+lib_slkinit lib $(base) $(HEADER_DEPS)
+lib_slklab lib $(base) $(HEADER_DEPS)
+lib_slkrefr lib $(base) $(HEADER_DEPS)
+lib_slkset lib $(base) $(HEADER_DEPS)
+lib_slktouch lib $(base) $(HEADER_DEPS)
+lib_touch lib $(base) $(HEADER_DEPS)
+lib_tracedmp lib $(trace) $(HEADER_DEPS)
+lib_tracemse lib $(trace) $(HEADER_DEPS)
+lib_tstp lib $(serial) $(HEADER_DEPS) $(srcdir)/SigAction.h
+lib_ungetch lib $(base) $(HEADER_DEPS) $(srcdir)/fifo_defs.h
+lib_vidattr lib $(serial) $(HEADER_DEPS)
+lib_vline lib $(base) $(HEADER_DEPS)
+lib_wattroff lib $(base) $(HEADER_DEPS)
+lib_wattron lib $(base) $(HEADER_DEPS)
+lib_winch lib $(base) $(HEADER_DEPS)
+lib_window lib $(base) $(HEADER_DEPS)
+link_test lib . $(HEADER_DEPS)
+nc_panel lib $(base) $(HEADER_DEPS)
+safe_sprintf lib $(base) $(HEADER_DEPS)
+tty_update lib $(serial) $(HEADER_DEPS)
+varargs lib $(trace) $(HEADER_DEPS)
# Modules for porting
-memmove lib $(base)
-vsscanf lib $(base)
+memmove lib $(base) $(HEADER_DEPS)
+vsscanf lib $(base) $(HEADER_DEPS)
# actually an extension, but with its own configure option (--disable-leaks)
-lib_freeall lib $(base)
+lib_freeall lib $(base) $(HEADER_DEPS) $(INCDIR)/tic.h
# 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_erasewchar lib $(wide)
-lib_get_wch 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_key_name 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)
+charable lib $(wide) $(HEADER_DEPS)
+lib_add_wch lib $(wide) $(HEADER_DEPS)
+lib_box_set lib $(wide) $(HEADER_DEPS)
+lib_cchar lib $(wide) $(HEADER_DEPS)
+lib_erasewchar lib $(wide) $(HEADER_DEPS)
+lib_get_wch lib $(wide) $(HEADER_DEPS)
+lib_get_wstr lib $(wide) $(HEADER_DEPS)
+lib_hline_set lib $(wide) $(HEADER_DEPS)
+lib_in_wch lib $(wide) $(HEADER_DEPS)
+lib_in_wchnstr lib $(wide) $(HEADER_DEPS)
+lib_ins_wch lib $(wide) $(HEADER_DEPS)
+lib_inwstr lib $(wide) $(HEADER_DEPS)
+lib_key_name lib $(wide) $(HEADER_DEPS)
+lib_pecho_wchar lib $(wide) $(HEADER_DEPS)
+lib_slk_wset lib $(wide) $(HEADER_DEPS)
+lib_unget_wch lib $(wide) $(HEADER_DEPS)
+lib_vid_attr lib $(wide) $(HEADER_DEPS)
+lib_vline_set lib $(wide) $(HEADER_DEPS)
+lib_wacs lib $(wide) $(HEADER_DEPS)
+lib_wunctrl lib $(wide) $(HEADER_DEPS)
# Extensions to the base library
@ ext_funcs
-expanded lib .
-legacy_coding lib $(base) ../include/term.h
-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
-use_screen lib $(tinfo)
-use_window lib $(base)
-wresize lib $(base) ../include/term.h
+expanded lib . $(HEADER_DEPS)
+legacy_coding lib $(base) $(HEADER_DEPS)
+lib_dft_fgbg lib $(base) $(HEADER_DEPS)
+lib_print lib $(tinfo) $(HEADER_DEPS)
+resizeterm lib $(base) $(HEADER_DEPS)
+trace_xnames lib $(trace) $(HEADER_DEPS)
+use_screen lib $(tinfo) $(HEADER_DEPS)
+use_window lib $(base) $(HEADER_DEPS)
+wresize lib $(base) $(HEADER_DEPS)
# Support for termcap (and tic, etc.), which can be a separate library
@ termlib
-access lib $(tinfo)
-add_tries lib $(tinfo)
-alloc_ttype lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
-codes lib .
-comp_error lib $(tinfo) $(INCDIR)/tic.h
-db_iterator lib $(tinfo) $(INCDIR)/tic.h
-doalloc lib $(tinfo)
-entries lib $(tinfo) ../include/term.h $(INCDIR)/tic.h
-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_traceatr lib $(trace) ../include/term.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 .
-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)
-tries lib $(base)
-trim_sgr0 lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
-unctrl lib .
-visbuf lib $(trace) $(INCDIR)/tic.h
+access lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+add_tries lib $(tinfo) $(HEADER_DEPS)
+alloc_ttype lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+codes lib . $(HEADER_DEPS)
+comp_captab lib . $(HEADER_DEPS) $(INCDIR)/tic.h ../include/hashsize.h
+comp_error lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+comp_hash lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h ../include/hashsize.h
+db_iterator lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+doalloc lib $(tinfo) $(HEADER_DEPS)
+entries lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+fallback lib . $(HEADER_DEPS)
+free_ttype lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+getenv_num lib $(tinfo) $(HEADER_DEPS)
+home_terminfo lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+init_keytry lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h init_keytry.h
+lib_acs lib $(tinfo) $(HEADER_DEPS)
+lib_baudrate lib $(tinfo) $(HEADER_DEPS) ../include/termcap.h
+lib_cur_term lib $(tinfo) $(HEADER_DEPS) ../include/termcap.h
+lib_data lib $(tinfo) $(HEADER_DEPS)
+lib_has_cap lib $(tinfo) $(HEADER_DEPS)
+lib_kernel lib $(tinfo) $(HEADER_DEPS)
+lib_keyname lib . $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_longname lib $(tinfo) $(HEADER_DEPS)
+lib_napms lib $(tinfo) $(HEADER_DEPS)
+lib_options lib $(tinfo) $(HEADER_DEPS)
+lib_raw lib $(tinfo) $(HEADER_DEPS)
+lib_setup lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_termcap lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h ../include/termcap.h $(INCDIR)/capdefaults.c
+lib_termname lib $(tinfo) $(HEADER_DEPS)
+lib_tgoto lib $(tinfo) $(HEADER_DEPS) ../include/termcap.h
+lib_ti lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_tparm lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_tputs lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h ../include/termcap.h
+lib_trace lib $(trace) $(HEADER_DEPS) $(INCDIR)/tic.h
+lib_traceatr lib $(trace) $(HEADER_DEPS)
+lib_tracebits lib $(trace) $(HEADER_DEPS)
+lib_tracechr lib $(trace) $(HEADER_DEPS)
+lib_ttyflags lib $(tinfo) $(HEADER_DEPS)
+lib_twait lib $(serial) $(HEADER_DEPS)
+name_match lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+names lib . $(HEADER_DEPS)
+read_entry lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h $(INCDIR)/hashed_db.h
+read_termcap lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+setbuf lib $(tinfo) $(HEADER_DEPS)
+strings lib $(tinfo) $(HEADER_DEPS)
+trace_buf lib $(trace) $(HEADER_DEPS)
+trace_tries lib $(trace) $(HEADER_DEPS)
+tries lib $(base) $(HEADER_DEPS)
+trim_sgr0 lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+unctrl lib . $(HEADER_DEPS)
+visbuf lib $(trace) $(HEADER_DEPS) $(INCDIR)/tic.h
# Modules used only for tic, other programs using internal interfaces
@ ticlib
-alloc_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
-captoinfo lib $(tinfo) $(INCDIR)/tic.h
-comp_captab lib . $(INCDIR)/tic.h ../include/term.h ../include/hashsize.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
-parse_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h ../include/parametrized.h $(INCDIR)/capdefaults.c
-write_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
+alloc_entry lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+captoinfo lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+comp_expand lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+comp_parse lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+comp_scan lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
+parse_entry lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h ../include/parametrized.h
+write_entry lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h $(INCDIR)/hashed_db.h
# Extensions to the termlib library
@ ext_tinfo
-define_key lib $(base)
-hashed_db lib $(tinfo)
-key_defined lib $(base)
-keybound lib $(base)
-keyok lib $(base)
-version lib $(base)
+define_key lib $(base) $(HEADER_DEPS)
+hashed_db lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h $(INCDIR)/hashed_db.h
+key_defined lib $(base) $(HEADER_DEPS)
+keybound lib $(base) $(HEADER_DEPS)
+keyok lib $(base) $(HEADER_DEPS)
+version lib $(base) $(HEADER_DEPS)
+
+# Porting
+@ port_drivers
+lib_driver lib $(base) $(HEADER_DEPS)
+
+@ port_win32con
+gettimeofday lib $(win32con) $(HEADER_DEPS)
+wcwidth lib $(win32con) $(HEADER_DEPS)
+win_driver lib $(win32con) $(HEADER_DEPS)
+
+@ port_tinfo
+tinfo_driver lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
# vile:makemode
diff --git a/ncurses/tinfo/MKcaptab.sh b/ncurses/tinfo/MKcaptab.sh
index 98c04e884309..4d1b53a5bd9a 100644
--- a/ncurses/tinfo/MKcaptab.sh
+++ b/ncurses/tinfo/MKcaptab.sh
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 2007 Free Software Foundation, Inc. #
+# Copyright (c) 2007-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -26,12 +26,19 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKcaptab.sh,v 1.8 2007/08/12 13:13:51 tom Exp $
+# $Id: MKcaptab.sh,v 1.13 2010/12/25 23:43:58 tom Exp $
AWK=${1-awk}
OPT1=${2-0}
OPT2=${3-tinfo/MKcaptab.awk}
DATA=${4-../include/Caps}
+cat <<EOF
+/*
+ * generated by $0
+ */
+
+EOF
+
cat <<'EOF'
/*
* comp_captab.c -- The names of the capabilities indexed via a hash
@@ -48,7 +55,7 @@ EOF
./make_hash 1 info $OPT1 <$DATA
./make_hash 3 cap $OPT1 <$DATA
-$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias <$DATA
+$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias <$DATA
$AWK -f $OPT2 bigstrings=$OPT1 tablename=infoalias <$DATA
@@ -58,7 +65,7 @@ cat <<EOF
static void
next_string(const char *strings, unsigned *offset)
{
- *offset += strlen(strings + *offset) + 1;
+ *offset += (unsigned) strlen(strings + *offset) + 1;
}
static const struct name_table_entry *
@@ -66,21 +73,21 @@ _nc_build_names(struct name_table_entry **actual,
const name_table_data *source,
const char *strings)
{
- if (*actual == 0) {
- *actual = typeCalloc(struct name_table_entry, CAPTABSIZE);
- if (*actual != 0) {
- unsigned n;
- unsigned len = 0;
- for (n = 0; n < CAPTABSIZE; ++n) {
- (*actual)[n].nte_name = strings + len;
- (*actual)[n].nte_type = source[n].nte_type;
- (*actual)[n].nte_index = source[n].nte_index;
- (*actual)[n].nte_link = source[n].nte_link;
- next_string(strings, &len);
- }
- }
+ if (*actual == 0) {
+ *actual = typeCalloc(struct name_table_entry, CAPTABSIZE);
+ if (*actual != 0) {
+ unsigned n;
+ unsigned len = 0;
+ for (n = 0; n < CAPTABSIZE; ++n) {
+ (*actual)[n].nte_name = strings + len;
+ (*actual)[n].nte_type = source[n].nte_type;
+ (*actual)[n].nte_index = source[n].nte_index;
+ (*actual)[n].nte_link = source[n].nte_link;
+ next_string(strings, &len);
+ }
}
- return *actual;
+ }
+ return *actual;
}
#define add_alias(field) \\
@@ -94,18 +101,18 @@ _nc_build_alias(struct alias **actual,
const char *strings,
unsigned tablesize)
{
- if (*actual == 0) {
- *actual = typeCalloc(struct alias, tablesize + 1);
- if (*actual != 0) {
- unsigned n;
- for (n = 0; n < tablesize; ++n) {
- add_alias(from);
- add_alias(to);
- add_alias(source);
- }
- }
+ if (*actual == 0) {
+ *actual = typeCalloc(struct alias, tablesize + 1);
+ if (*actual != 0) {
+ unsigned n;
+ for (n = 0; n < tablesize; ++n) {
+ add_alias(from);
+ add_alias(to);
+ add_alias(source);
+ }
}
- return *actual;
+ }
+ return *actual;
}
#define build_names(root) _nc_build_names(&_nc_##root##_table, \\
@@ -122,27 +129,82 @@ _nc_build_alias(struct alias **actual,
NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool termcap)
{
- return termcap ? build_names(cap) : build_names(info) ;
+ return termcap ? build_names(cap) : build_names(info) ;
}
-NCURSES_EXPORT(const short *) _nc_get_hash_table (bool termcap)
+/* entrypoint used by tack (do not alter) */
+NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool termcap)
{
- return termcap ? _nc_cap_hash_table: _nc_info_hash_table ;
+ return termcap ? _nc_cap_hash_table: _nc_info_hash_table ;
}
NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool termcap)
{
- return termcap ? build_alias(cap) : build_alias(info) ;
+ return termcap ? build_alias(cap) : build_alias(info) ;
+}
+
+static HashValue
+info_hash(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 (HashValue) (sum % HASHTABSIZE);
+}
+
+#define TCAP_LEN 2 /* only 1- or 2-character names are used */
+
+static HashValue
+tcap_hash(const char *string)
+{
+ char temp[TCAP_LEN + 1];
+ int limit = 0;
+
+ while (*string) {
+ temp[limit++] = *string++;
+ if (limit >= TCAP_LEN)
+ break;
+ }
+ temp[limit] = '\0';
+ return info_hash(temp);
+}
+
+static int
+compare_tcap_names(const char *a, const char *b)
+{
+ return !strncmp(a, b, TCAP_LEN);
+}
+
+static int
+compare_info_names(const char *a, const char *b)
+{
+ return !strcmp(a, b);
+}
+
+static const HashData hash_data[2] = {
+ { HASHTABSIZE, _nc_info_hash_table, info_hash, compare_info_names },
+ { HASHTABSIZE, _nc_cap_hash_table, tcap_hash, compare_tcap_names }
+};
+
+NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool termcap)
+{
+ return &hash_data[(termcap != FALSE)];
}
#if NO_LEAKS
NCURSES_EXPORT(void) _nc_comp_captab_leaks(void)
{
#if $OPT1
- FreeIfNeeded(_nc_cap_table);
- FreeIfNeeded(_nc_info_table);
- FreeIfNeeded(_nc_capalias_table);
- FreeIfNeeded(_nc_infoalias_table);
+ FreeIfNeeded(_nc_cap_table);
+ FreeIfNeeded(_nc_info_table);
+ FreeIfNeeded(_nc_capalias_table);
+ FreeIfNeeded(_nc_infoalias_table);
#endif
}
#endif /* NO_LEAKS */
diff --git a/ncurses/tinfo/MKcodes.awk b/ncurses/tinfo/MKcodes.awk
index b9ba636e0ccd..97e5131ba07c 100644
--- a/ncurses/tinfo/MKcodes.awk
+++ b/ncurses/tinfo/MKcodes.awk
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKcodes.awk,v 1.5 2008/06/28 23:13:25 tom Exp $
+# $Id: MKcodes.awk,v 1.9 2010/01/23 17:57:43 tom Exp $
function large_item(value) {
result = sprintf("%d,", offset);
offset = offset + length(value) + 1;
@@ -101,8 +101,6 @@ END {
print ""
print "#if BROKEN_LINKER || USE_REENTRANT"
print ""
- print "#include <term.h>"
- print ""
if (bigstrings) {
printf "static const char _nc_code_blob[] = \n"
printf "%s;\n", bigstr;
@@ -117,28 +115,39 @@ END {
print " if ((*value = typeCalloc(NCURSES_CONST char *, size + 1)) != 0) {"
print " unsigned n;"
print " for (n = 0; n < size; ++n) {"
- print " (*value)[n] = _nc_code_blob + offsets[n];"
+ print " (*value)[n] = (NCURSES_CONST char *) _nc_code_blob + offsets[n];"
print " }"
print " }"
print " }"
print " return *value;"
print "}"
print ""
- print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
+ print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
} else {
print "#define DCL(it) static IT data##it[]"
print ""
print_strings("boolcodes", small_boolcodes);
print_strings("numcodes", small_numcodes);
print_strings("strcodes", small_strcodes);
- print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }"
+ print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return data##it; }"
}
print ""
+ print "/* remove public definition which conflicts with FIX() */"
+ print "#undef boolcodes"
+ print "#undef numcodes"
+ print "#undef strcodes"
+ print ""
+ print "/* add local definition */"
print "FIX(boolcodes)"
print "FIX(numcodes)"
print "FIX(strcodes)"
print ""
+ print "/* restore the public definition */"
+ print ""
print "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }"
+ print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
+ print "#define numcodes NCURSES_PUBLIC_VAR(numcodes())"
+ print "#define strcodes NCURSES_PUBLIC_VAR(strcodes())"
print ""
print "#if NO_LEAKS"
print "NCURSES_EXPORT(void)"
diff --git a/ncurses/tinfo/MKfallback.sh b/ncurses/tinfo/MKfallback.sh
index 9feab3507cc0..11f1d2ead138 100755
--- a/ncurses/tinfo/MKfallback.sh
+++ b/ncurses/tinfo/MKfallback.sh
@@ -1,6 +1,6 @@
#!/bin/sh
##############################################################################
-# Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKfallback.sh,v 1.13 2006/07/15 16:54:20 tom Exp $
+# $Id: MKfallback.sh,v 1.15 2010/08/07 20:32:34 tom Exp $
#
# MKfallback.sh -- create fallback table for entry reads
#
@@ -42,6 +42,17 @@ shift
terminfo_src=$1
shift
+tic_path=$1
+shift
+
+case $tic_path in #(vi
+/*)
+ tic_head=`echo "$tic_path" | sed -e 's,/[^/]*$,,'`
+ PATH=$tic_head:$PATH
+ export PATH
+ ;;
+esac
+
if test $# != 0 ; then
tmp_info=tmp_info
echo creating temporary terminfo directory... >&2
@@ -52,7 +63,7 @@ if test $# != 0 ; then
TERMINFO_DIRS=$TERMINFO:$terminfo_dir
export TERMINFO_DIRS
- tic -x $terminfo_src >&2
+ $tic_path -x $terminfo_src >&2
else
tmp_info=
fi
@@ -63,7 +74,6 @@ cat <<EOF
*/
#include <curses.priv.h>
-#include <term.h>
EOF
diff --git a/ncurses/tinfo/MKnames.awk b/ncurses/tinfo/MKnames.awk
index 7e5074480864..7685d1831ef0 100644
--- a/ncurses/tinfo/MKnames.awk
+++ b/ncurses/tinfo/MKnames.awk
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2007,2008 Free Software Foundation, Inc. #
+# Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKnames.awk,v 1.20 2008/10/11 21:07:56 tom Exp $
+# $Id: MKnames.awk,v 1.22 2009/03/21 21:03:39 tom Exp $
function large_item(value) {
result = sprintf("%d,", offset);
offset = offset + length(value) + 1;
@@ -107,8 +107,6 @@ END {
print ""
print "#if BROKEN_LINKER || USE_REENTRANT"
print ""
- print "#include <term.h>"
- print ""
if (bigstrings) {
printf "static const char _nc_name_blob[] = \n"
printf "%s;\n", bigstr;
@@ -133,7 +131,7 @@ END {
print " return *value;"
print "}"
print ""
- print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
+ print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return alloc_array(&ptr_##it, _nc_offset_##it, SIZEOF(_nc_offset_##it)); }"
} else {
print "#define DCL(it) static IT data##it[]"
print ""
@@ -143,9 +141,18 @@ END {
print_strings("numfnames", small_numfnames);
print_strings("strnames", small_strnames);
print_strings("strfnames", small_strfnames);
- print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }"
+ print "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return data##it; }"
}
print ""
+ print "/* remove public definition which conflicts with FIX() */"
+ print "#undef boolnames"
+ print "#undef boolfnames"
+ print "#undef numnames"
+ print "#undef numfnames"
+ print "#undef strnames"
+ print "#undef strfnames"
+ print ""
+ print "/* add local definition */"
print "FIX(boolnames)"
print "FIX(boolfnames)"
print "FIX(numnames)"
@@ -153,6 +160,13 @@ END {
print "FIX(strnames)"
print "FIX(strfnames)"
print ""
+ print "/* restore the public definition */"
+ print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
+ print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
+ print "#define numnames NCURSES_PUBLIC_VAR(numnames())"
+ print "#define numfnames NCURSES_PUBLIC_VAR(numfnames())"
+ print "#define strnames NCURSES_PUBLIC_VAR(strnames())"
+ print "#define strfnames NCURSES_PUBLIC_VAR(strfnames())"
print ""
print "#define FREE_FIX(it) if (ptr_##it) { FreeAndNull(ptr_##it); }"
print ""
diff --git a/ncurses/tinfo/access.c b/ncurses/tinfo/access.c
index ce8ccdac53f6..87c4f462fd4f 100644
--- a/ncurses/tinfo/access.c
+++ b/ncurses/tinfo/access.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,9 +36,8 @@
#include <sys/stat.h>
#include <tic.h>
-#include <nc_alloc.h>
-MODULE_ID("$Id: access.c,v 1.14 2007/11/18 00:57:53 tom Exp $")
+MODULE_ID("$Id: access.c,v 1.16 2010/01/23 17:57:43 tom Exp $")
#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
@@ -97,7 +96,7 @@ _nc_pathlast(const char *path)
test = path;
else
test++;
- return (test - path);
+ return (unsigned) (test - path);
}
NCURSES_EXPORT(char *)
diff --git a/ncurses/tinfo/add_tries.c b/ncurses/tinfo/add_tries.c
index 455d142edc8e..29a1a60045b5 100644
--- a/ncurses/tinfo/add_tries.c
+++ b/ncurses/tinfo/add_tries.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: add_tries.c,v 1.8 2006/12/30 23:15:26 tom Exp $")
+MODULE_ID("$Id: add_tries.c,v 1.10 2010/12/19 01:31:14 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))
@@ -50,7 +50,8 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code)
TRIES *ptr, *savedptr;
unsigned const char *txt = (unsigned const char *) str;
- T((T_CALLED("_nc_add_to_try(%p, %s, %u)"), *tree, _nc_visbuf(str), code));
+ T((T_CALLED("_nc_add_to_try(%p, %s, %u)"),
+ (void *) *tree, _nc_visbuf(str), code));
if (txt == 0 || *txt == '\0' || code == 0)
returnCode(ERR);
@@ -66,7 +67,7 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code)
if (CMP_TRY(ptr->ch, cmp)) {
if (*(++txt) == '\0') {
- ptr->value = code;
+ ptr->value = (unsigned short) code;
returnCode(OK);
}
if (ptr->child != 0)
@@ -115,6 +116,6 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code)
ptr->value = 0;
}
- ptr->value = code;
+ ptr->value = (unsigned short) code;
returnCode(OK);
}
diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c
index 4638e99c4d58..506fb386d208 100644
--- a/ncurses/tinfo/alloc_entry.c
+++ b/ncurses/tinfo/alloc_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -46,9 +46,8 @@
#include <curses.priv.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: alloc_entry.c,v 1.48 2008/08/16 16:25:31 tom Exp $")
+MODULE_ID("$Id: alloc_entry.c,v 1.51 2010/12/25 23:06:01 tom Exp $")
#define ABSENT_OFFSET -1
#define CANCELLED_OFFSET -2
@@ -65,8 +64,10 @@ _nc_init_entry(TERMTYPE *const tp)
unsigned i;
#if NO_LEAKS
- if (tp == 0 && stringbuf != 0) {
- FreeAndNull(stringbuf);
+ if (tp == 0) {
+ if (stringbuf != 0) {
+ FreeAndNull(stringbuf);
+ }
return;
}
#endif
@@ -181,7 +182,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
} else if (tp->Strings[i] == CANCELLED_STRING) {
offsets[i] = CANCELLED_OFFSET;
} else {
- offsets[i] = tp->Strings[i] - stringbuf;
+ offsets[i] = (int) (tp->Strings[i] - stringbuf);
}
}
}
@@ -190,7 +191,7 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
if (ep->uses[i].name == 0)
useoffsets[i] = ABSENT_OFFSET;
else
- useoffsets[i] = ep->uses[i].name - stringbuf;
+ useoffsets[i] = (int) (ep->uses[i].name - stringbuf);
}
if ((tp->str_table = typeMalloc(char, next_free)) == (char *) 0)
@@ -214,10 +215,10 @@ _nc_wrap_entry(ENTRY * const ep, bool copy_strings)
if (!copy_strings) {
if ((n = (unsigned) NUM_EXT_NAMES(tp)) != 0) {
if (n < SIZEOF(offsets)) {
- unsigned length = 0;
+ size_t length = 0;
for (i = 0; i < n; i++) {
length += strlen(tp->ext_Names[i]) + 1;
- offsets[i] = tp->ext_Names[i] - stringbuf;
+ offsets[i] = (int) (tp->ext_Names[i] - stringbuf);
}
if ((tp->ext_str_table = typeMalloc(char, length)) == 0)
_nc_err_abort(MSG_NO_MEMORY);
diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c
index b2b06d1b79ce..b02cb9c6010e 100644
--- a/ncurses/tinfo/alloc_ttype.c
+++ b/ncurses/tinfo/alloc_ttype.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,9 +41,8 @@
#include <curses.priv.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: alloc_ttype.c,v 1.17 2008/10/12 16:12:00 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.22 2010/12/19 00:24:09 tom Exp $")
#if NCURSES_XNAMES
/*
@@ -91,6 +90,9 @@ find_name(char **table, int length, char *name)
return FALSE;
}
+#define EXTEND_NUM(num, ext) \
+ to->num = (unsigned short) (to->num + (ext - to->ext))
+
static void
realign_data(TERMTYPE *to, char **ext_Names,
int ext_Booleans,
@@ -101,7 +103,7 @@ realign_data(TERMTYPE *to, char **ext_Names,
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);
+ EXTEND_NUM(num_Booleans, ext_Booleans);
to->Booleans = typeRealloc(NCURSES_SBOOL, to->num_Booleans, to->Booleans);
for (n = to->ext_Booleans - 1,
m = ext_Booleans - 1,
@@ -112,10 +114,10 @@ realign_data(TERMTYPE *to, char **ext_Names,
to->Booleans[base + m] = FALSE;
}
}
- to->ext_Booleans = ext_Booleans;
+ to->ext_Booleans = UShort(ext_Booleans);
}
if (to->ext_Numbers != ext_Numbers) {
- to->num_Numbers += (ext_Numbers - to->ext_Numbers);
+ EXTEND_NUM(num_Numbers, ext_Numbers);
to->Numbers = typeRealloc(short, to->num_Numbers, to->Numbers);
for (n = to->ext_Numbers - 1,
m = ext_Numbers - 1,
@@ -126,10 +128,10 @@ realign_data(TERMTYPE *to, char **ext_Names,
to->Numbers[base + m] = ABSENT_NUMERIC;
}
}
- to->ext_Numbers = ext_Numbers;
+ to->ext_Numbers = UShort(ext_Numbers);
}
if (to->ext_Strings != ext_Strings) {
- to->num_Strings += (ext_Strings - to->ext_Strings);
+ EXTEND_NUM(num_Strings, ext_Strings);
to->Strings = typeRealloc(char *, to->num_Strings, to->Strings);
for (n = to->ext_Strings - 1,
m = ext_Strings - 1,
@@ -140,17 +142,17 @@ realign_data(TERMTYPE *to, char **ext_Names,
to->Strings[base + m] = ABSENT_STRING;
}
}
- to->ext_Strings = ext_Strings;
+ to->ext_Strings = UShort(ext_Strings);
}
}
/*
* Returns the first index in ext_Names[] for the given token-type
*/
-static int
+static unsigned
_nc_first_ext_name(TERMTYPE *tp, int token_type)
{
- int first;
+ unsigned first;
switch (token_type) {
case BOOLEAN:
@@ -160,7 +162,7 @@ _nc_first_ext_name(TERMTYPE *tp, int token_type)
first = tp->ext_Booleans;
break;
case STRING:
- first = tp->ext_Booleans + tp->ext_Numbers;
+ first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
break;
default:
first = 0;
@@ -172,17 +174,17 @@ _nc_first_ext_name(TERMTYPE *tp, int token_type)
/*
* Returns the last index in ext_Names[] for the given token-type
*/
-static int
+static unsigned
_nc_last_ext_name(TERMTYPE *tp, int token_type)
{
- int last;
+ unsigned last;
switch (token_type) {
case BOOLEAN:
last = tp->ext_Booleans;
break;
case NUMBER:
- last = tp->ext_Booleans + tp->ext_Numbers;
+ last = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
break;
default:
case STRING:
@@ -204,7 +206,7 @@ _nc_find_ext_name(TERMTYPE *tp, char *name, int token_type)
for (j = first; j < last; j++) {
if (!strcmp(name, tp->ext_Names[j])) {
- return j;
+ return (int) j;
}
}
return -1;
@@ -244,7 +246,7 @@ _nc_del_ext_name(TERMTYPE *tp, char *name, int token_type)
int first, last;
if ((first = _nc_find_ext_name(tp, name, token_type)) >= 0) {
- last = NUM_EXT_NAMES(tp) - 1;
+ last = (int) NUM_EXT_NAMES(tp) - 1;
for (j = first; j < last; j++) {
tp->ext_Names[j] = tp->ext_Names[j + 1];
}
@@ -254,22 +256,22 @@ _nc_del_ext_name(TERMTYPE *tp, char *name, int token_type)
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;
+ tp->ext_Booleans--;
+ tp->num_Booleans--;
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;
+ tp->ext_Numbers--;
+ tp->num_Numbers--;
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;
+ tp->ext_Strings--;
+ tp->num_Strings--;
break;
}
return TRUE;
@@ -303,32 +305,32 @@ _nc_ins_ext_name(TERMTYPE *tp, char *name, int token_type)
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);
+ j = (unsigned) _nc_ext_data_index(tp, (int) j, token_type);
switch (token_type) {
case BOOLEAN:
- tp->ext_Booleans += 1;
- tp->num_Booleans += 1;
+ tp->ext_Booleans++;
+ tp->num_Booleans++;
tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
- for (k = tp->num_Booleans - 1; k > j; k--)
+ for (k = (unsigned) (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->ext_Numbers++;
+ tp->num_Numbers++;
tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
- for (k = tp->num_Numbers - 1; k > j; k--)
+ for (k = (unsigned) (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->ext_Strings++;
+ tp->num_Strings++;
tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
- for (k = tp->num_Strings - 1; k > j; k--)
+ for (k = (unsigned) (tp->num_Strings - 1); k > j; k--)
tp->Strings[k] = tp->Strings[k - 1];
break;
}
- return j;
+ return (int) j;
}
/*
@@ -345,10 +347,10 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from)
for (j = first; j < last;) {
char *name = to->ext_Names[j];
- unsigned j_str = to->num_Strings - first - to->ext_Strings;
+ int 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_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);
@@ -356,8 +358,7 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from)
} else {
j++;
}
- } else if ((k = _nc_find_ext_name(from, to->ext_Names[j],
- NUMBER)) >= 0) {
+ } else if (_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);
@@ -365,8 +366,7 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from)
} else {
j++;
}
- } else if ((k = _nc_find_ext_name(from, to->ext_Names[j],
- STRING)) >= 0) {
+ } else if (_nc_find_ext_name(from, to->ext_Names[j], STRING) >= 0) {
if (_nc_del_ext_name(to, name, NUMBER)
|| _nc_del_ext_name(to, name, BOOLEAN)) {
k = _nc_ins_ext_name(to, name, STRING);
@@ -386,8 +386,8 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from)
NCURSES_EXPORT(void)
_nc_align_termtype(TERMTYPE *to, TERMTYPE *from)
{
- int na = NUM_EXT_NAMES(to);
- int nb = NUM_EXT_NAMES(from);
+ int na = (int) NUM_EXT_NAMES(to);
+ int nb = (int) NUM_EXT_NAMES(from);
int n;
bool same;
char **ext_Names;
@@ -417,7 +417,7 @@ _nc_align_termtype(TERMTYPE *to, TERMTYPE *from)
* into it, updating to's counts for booleans, etc. Fortunately we do
* this only for the terminfo compiler (tic) and comparer (infocmp).
*/
- ext_Names = typeMalloc(char *, na + nb);
+ ext_Names = typeMalloc(char *, (size_t)(na + nb));
if (to->ext_Strings && (from->ext_Booleans + from->ext_Numbers))
adjust_cancels(to, from);
@@ -461,8 +461,8 @@ _nc_align_termtype(TERMTYPE *to, TERMTYPE *from)
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);
+ from->ext_Names = typeRealloc(char *, (size_t) nb, from->ext_Names);
+ memcpy(from->ext_Names, ext_Names, sizeof(char *) * (size_t) nb);
DEBUG(2, ("realigned %d extended names for '%s' (from)",
NUM_EXT_NAMES(from), from->term_names));
}
diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c
index 93300c1be3e4..a0da44dea989 100644
--- a/ncurses/tinfo/captoinfo.c
+++ b/ncurses/tinfo/captoinfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -93,7 +93,7 @@
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: captoinfo.c,v 1.52 2008/08/16 19:24:51 tom Exp $")
+MODULE_ID("$Id: captoinfo.c,v 1.58 2010/12/04 20:08:19 tom Exp $")
#define MAX_PUSHED 16 /* max # args we can push onto the stack */
@@ -125,10 +125,10 @@ init_string(void)
static char *
save_string(char *d, const char *const s)
{
- size_t have = (d - my_string);
+ size_t have = (size_t) (d - my_string);
size_t need = have + strlen(s) + 2;
if (need > my_length) {
- my_string = (char *) realloc(my_string, my_length = (need + need));
+ my_string = (char *) _nc_doalloc(my_string, my_length = (need + need));
if (my_string == 0)
_nc_err_abort(MSG_NO_MEMORY);
d = my_string + have;
@@ -196,7 +196,7 @@ cvtchar(register const char *sp)
case '3':
len = 1;
while (isdigit(UChar(*sp))) {
- c = 8 * c + (*sp++ - '0');
+ c = (unsigned char) (8 * c + (*sp++ - '0'));
len++;
}
break;
@@ -207,7 +207,7 @@ cvtchar(register const char *sp)
}
break;
case '^':
- c = (*++sp & 0x1f);
+ c = (unsigned char) (*++sp & 0x1f);
len = 2;
break;
default:
@@ -643,6 +643,7 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
int seenone = 0, seentwo = 0, saw_m = 0, saw_n = 0;
const char *padding;
const char *trimmed = 0;
+ int in0, in1, in2;
char ch1 = 0, ch2 = 0;
char *bufptr = init_string();
int len;
@@ -666,8 +667,27 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
int c1, c2;
char *cp = 0;
- if (str[0] == '\\' && (str[1] == '^' || str[1] == ',')) {
- bufptr = save_char(bufptr, *++str);
+ if (str[0] == '^') {
+ if (str[1] == '\0' || (str + 1) == trimmed) {
+ bufptr = save_string(bufptr, "\\136");
+ ++str;
+ } else {
+ bufptr = save_char(bufptr, *str++);
+ bufptr = save_char(bufptr, *str);
+ }
+ } else if (str[0] == '\\') {
+ if (str[1] == '\0' || (str + 1) == trimmed) {
+ bufptr = save_string(bufptr, "\\134");
+ ++str;
+ } else if (str[1] == '^') {
+ bufptr = save_string(bufptr, "\\136");
+ ++str;
+ } else if (str[1] == ',') {
+ bufptr = save_char(bufptr, *++str);
+ } else {
+ bufptr = save_char(bufptr, *str++);
+ bufptr = save_char(bufptr, *str);
+ }
} else if (str[0] == '$' && str[1] == '<') { /* discard padding */
str += 2;
while (isdigit(UChar(*str))
@@ -677,6 +697,19 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz
|| *str == '>')
str++;
--str;
+ } else if (sscanf(str,
+ "[%%?%%p1%%{8}%%<%%t%d%%p1%%d%%e%%p1%%{16}%%<%%t%d%%p1%%{8}%%-%%d%%e%d;5;%%p1%%d%%;m",
+ &in0, &in1, &in2) == 3
+ && ((in0 == 4 && in1 == 10 && in2 == 48)
+ || (in0 == 3 && in1 == 9 && in2 == 38))) {
+ /* dumb-down an optimized case from xterm-256color for termcap */
+ str = strstr(str, ";m");
+ ++str;
+ if (in2 == 48) {
+ bufptr = save_string(bufptr, "[48;5;%dm");
+ } else {
+ bufptr = save_string(bufptr, "[38;5;%dm");
+ }
} else if (str[0] == '%' && str[1] == '%') { /* escaped '%' */
bufptr = save_string(bufptr, "%%");
++str;
diff --git a/ncurses/tinfo/comp_expand.c b/ncurses/tinfo/comp_expand.c
index 6e79a926b5ac..71012b6355e3 100644
--- a/ncurses/tinfo/comp_expand.c
+++ b/ncurses/tinfo/comp_expand.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,7 +35,7 @@
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: comp_expand.c,v 1.20 2008/08/16 19:29:42 tom Exp $")
+MODULE_ID("$Id: comp_expand.c,v 1.21 2010/01/16 17:11:23 tom Exp $")
static int
trailing_spaces(const char *src)
@@ -91,7 +91,7 @@ _nc_tic_expand(const char *srcp, bool tic_format, int numbers)
&& REALPRINT(str + 1)
&& str[2] == S_QUOTE) {
sprintf(buffer + bufp, "{%d}", str[1]);
- bufp += strlen(buffer + bufp);
+ bufp += (int) strlen(buffer + bufp);
str += 2;
} else {
buffer[bufp++] = *str;
diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c
index b7fbd0616345..959c6e156431 100644
--- a/ncurses/tinfo/comp_hash.c
+++ b/ncurses/tinfo/comp_hash.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,110 +44,36 @@
#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.36 2008/08/16 17:06:53 tom Exp $")
-
-static int hash_function(const char *);
+MODULE_ID("$Id: comp_hash.c,v 1.48 2009/08/08 17:36:21 tom Exp $")
/*
- * _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[].
- *
+ * 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.
*/
-
-#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,
- short *hash_table)
-{
- short i;
- int hashvalue;
- int collisions = 0;
-
- for (i = 0; i < HASHTABSIZE; i++) {
- hash_table[i] = -1;
- }
- for (i = 0; i < CAPTABSIZE; i++) {
- hashvalue = hash_function(table[i].nte_name);
-
- if (hash_table[hashvalue] >= 0)
- collisions++;
-
- if (hash_table[hashvalue] != 0)
- table[i].nte_link = hash_table[hashvalue];
- hash_table[hashvalue] = 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
+/* entrypoint used by tack (do not alter) */
NCURSES_EXPORT(struct name_table_entry const *)
_nc_find_entry(const char *string,
- const short *hash_table)
+ const HashValue * hash_table)
{
+ bool termcap = (hash_table != _nc_get_hash_table(FALSE));
+ const HashData *data = _nc_get_hash_info(termcap);
int hashvalue;
struct name_table_entry const *ptr = 0;
struct name_table_entry const *real_table;
- hashvalue = hash_function(string);
+ hashvalue = data->hash_of(string);
+
+ if (data->table_data[hashvalue] >= 0) {
- if (hash_table[hashvalue] >= 0) {
- real_table = _nc_get_table(hash_table != _nc_get_hash_table(FALSE));
- ptr = real_table + hash_table[hashvalue];
- while (strcmp(ptr->nte_name, string) != 0) {
- if (ptr->nte_link < 0)
- return 0;
- ptr = real_table + (ptr->nte_link + hash_table[HASHTABSIZE]);
+ real_table = _nc_get_table(termcap);
+ ptr = real_table + data->table_data[hashvalue];
+ while (!data->compare_names(ptr->nte_name, string)) {
+ if (ptr->nte_link < 0) {
+ ptr = 0;
+ break;
+ }
+ ptr = real_table + (ptr->nte_link
+ + data->table_data[data->table_size]);
}
}
@@ -155,216 +81,34 @@ _nc_find_entry(const char *string,
}
/*
- * struct name_table_entry *
- * find_type_entry(string, type, table)
+ * Finds the entry for the given name with the given type in the given table if
+ * present (as distinct from _nc_find_entry, which finds the last entry
+ * regardless of type).
*
- * 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.
+ * 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)
+ bool termcap)
{
- 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 */
- assert(s > buffer + 1);
- s[-1] = '\0';
- buffer++;
- }
- list[col] = buffer;
- col++;
- if (mark == '\0')
- break;
- while (*++s && isspace(UChar(*s)))
- /*EMPTY */ ;
- buffer = s;
- } else
+ struct name_table_entry const *ptr = NULL;
+ const HashData *data = _nc_get_hash_info(termcap);
+ int hashvalue = data->hash_of(string);
+
+ if (data->table_data[hashvalue] >= 0) {
+ const struct name_table_entry *const table = _nc_get_table(termcap);
+
+ ptr = table + data->table_data[hashvalue];
+ while (ptr->nte_type != type
+ || !data->compare_names(ptr->nte_name, string)) {
+ if (ptr->nte_link < 0) {
+ ptr = 0;
break;
- }
- }
- return col ? list : 0;
-}
-
-int
-main(int argc, char **argv)
-{
- struct name_table_entry *name_table = typeCalloc(struct
- name_table_entry, CAPTABSIZE);
- short *hash_table = typeCalloc(short, HASHTABSIZE);
- const char *root_name = "";
- int column = 0;
- int bigstring = 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 <= 3
- || (column = atoi(argv[1])) <= 0
- || (column >= MAX_COLUMNS)
- || *(root_name = argv[2]) == 0
- || (bigstring = atoi(argv[3])) < 0
- || name_table == 0
- || hash_table == 0) {
- fprintf(stderr, "usage: make_hash column root_name bigstring\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
- */
- if (bigstring) {
- int len = 0;
- int nxt;
-
- printf("static const char %s_names_text[] = \\\n", root_name);
- for (n = 0; n < CAPTABSIZE; n++) {
- nxt = (int) strlen(name_table[n].nte_name) + 5;
- if (nxt + len > 72) {
- printf("\\\n");
- len = 0;
}
- printf("\"%s\\0\" ", name_table[n].nte_name);
- len += nxt;
+ ptr = table + (ptr->nte_link + data->table_data[data->table_size]);
}
- printf(";\n\n");
-
- len = 0;
- printf("static name_table_data const %s_names_data[] =\n",
- root_name);
- printf("{\n");
- for (n = 0; n < CAPTABSIZE; n++) {
- printf("\t{ %15d,\t%10s,\t%3d, %3d }%c\n",
- len,
- typenames[name_table[n].nte_type],
- name_table[n].nte_index,
- name_table[n].nte_link,
- n < CAPTABSIZE - 1 ? ',' : ' ');
- len += (int) strlen(name_table[n].nte_name) + 1;
- }
- printf("};\n\n");
- printf("static struct name_table_entry *_nc_%s_table = 0;\n\n", root_name);
- } else {
-
- printf("static struct name_table_entry %s _nc_%s_table[] =\n",
- bigstring ? "" : "const",
- 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("static const short _nc_%s_hash_table[%d] =\n",
- root_name,
- HASHTABSIZE + 1);
- printf("{\n");
- for (n = 0; n < HASHTABSIZE; n++) {
- printf("\t%3d,\n", hash_table[n]);
}
- printf("\t0\t/* base-of-table */\n");
- 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");
- free(hash_table);
- return EXIT_SUCCESS;
+ return ptr;
}
-#endif
diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c
index 3325a0ddae6c..8204d75a8193 100644
--- a/ncurses/tinfo/comp_parse.c
+++ b/ncurses/tinfo/comp_parse.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -51,9 +51,8 @@
#include <ctype.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: comp_parse.c,v 1.69 2008/08/16 21:58:16 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.73 2010/12/25 23:06:37 tom Exp $")
static void sanity_check2(TERMTYPE *, bool);
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
@@ -92,16 +91,18 @@ force_bar(char *dst, char *src)
}
return src;
}
+#define ForceBar(dst, src) ((strchr(src, '|') == 0) ? force_bar(dst, src) : 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];
+ char nc1[MAX_NAME_SIZE + 2];
+ char nc2[MAX_NAME_SIZE + 2];
- n1 = force_bar(nc1, n1);
- n2 = force_bar(nc2, n2);
+ n1 = ForceBar(nc1, n1);
+ n2 = ForceBar(nc2, n2);
for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1)
for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend + 1)
@@ -273,7 +274,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
unresolved++;
total_unresolved++;
- _nc_curr_line = lookline;
+ _nc_curr_line = (int) lookline;
_nc_warning("resolution of use=%s failed", lookfor);
qp->uses[i].link = 0;
}
@@ -375,7 +376,7 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
if (_nc_check_termtype != 0) {
_nc_curr_col = -1;
for_entry_list(qp) {
- _nc_curr_line = qp->startline;
+ _nc_curr_line = (int) qp->startline;
_nc_set_type(_nc_first_name(qp->tterm.term_names));
_nc_check_termtype2(&qp->tterm, literal);
}
@@ -473,7 +474,6 @@ _nc_leaks_tic(void)
{
_nc_alloc_entry_leaks();
_nc_captoinfo_leaks();
- _nc_comp_captab_leaks();
_nc_comp_scan_leaks();
#if BROKEN_LINKER || USE_REENTRANT
_nc_names_leaks();
diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c
index 5ad750f930dd..8725b2edb7eb 100644
--- a/ncurses/tinfo/comp_scan.c
+++ b/ncurses/tinfo/comp_scan.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -48,10 +48,9 @@
#include <curses.priv.h>
#include <ctype.h>
-#include <term_entry.h>
#include <tic.h>
-MODULE_ID("$Id: comp_scan.c,v 1.83 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.89 2010/12/25 23:06:37 tom Exp $")
/*
* Maximum length of string capability we'll accept before raising an error.
@@ -61,19 +60,13 @@ MODULE_ID("$Id: comp_scan.c,v 1.83 2008/08/16 19:22:55 tom Exp $")
#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 =
+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
};
@@ -91,8 +84,7 @@ 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 */
+NCURSES_EXPORT_VAR (bool) _nc_disable_period = FALSE; /* used by tic -a option */
#endif
/*****************************************************************************
@@ -211,6 +203,10 @@ next_char(void)
if (fgets(result + used, (int) (allocated - used), yyin) != 0) {
bufstart = result;
if (used == 0) {
+ if (_nc_curr_line == 0
+ && IS_TIC_MAGIC(result)) {
+ _nc_err_abort("This is a compiled terminal description, not a source");
+ }
_nc_curr_line++;
_nc_curr_col = 0;
}
@@ -431,7 +427,7 @@ _nc_get_token(bool silent)
&& !strchr(terminfo_punct, (char) ch)) {
if (!silent)
_nc_warning("Illegal character (expected alphanumeric or %s) - '%s'",
- terminfo_punct, unctrl((chtype) ch));
+ terminfo_punct, unctrl(UChar(ch)));
_nc_panic_mode(separator);
goto start_token;
}
@@ -487,7 +483,6 @@ _nc_get_token(bool silent)
if (OkToAdd()) {
AddCh(ch);
} else {
- ch = EOF;
break;
}
}
@@ -596,7 +591,7 @@ _nc_get_token(bool silent)
case '@':
if ((ch = next_char()) != separator && !silent)
_nc_warning("Missing separator after `%s', have %s",
- tok_buf, unctrl((chtype) ch));
+ tok_buf, unctrl(UChar(ch)));
_nc_curr_token.tk_name = tok_buf;
type = CANCEL;
break;
@@ -617,7 +612,7 @@ _nc_get_token(bool silent)
_nc_warning("Missing separator");
}
_nc_curr_token.tk_name = tok_buf;
- _nc_curr_token.tk_valnumber = number;
+ _nc_curr_token.tk_valnumber = (int) number;
type = NUMBER;
break;
@@ -637,7 +632,7 @@ _nc_get_token(bool silent)
/* just to get rid of the compiler warning */
type = UNDEF;
if (!silent)
- _nc_warning("Illegal character - '%s'", unctrl((chtype) ch));
+ _nc_warning("Illegal character - '%s'", unctrl(UChar(ch)));
}
} /* end else (first_column == FALSE) */
} /* end else (ch != EOF) */
@@ -730,48 +725,47 @@ _nc_trans_string(char *ptr, char *last)
int count = 0;
int number = 0;
int i, c;
- chtype ch, last_ch = '\0';
+ int last_ch = '\0';
bool ignored = FALSE;
bool long_warning = FALSE;
- while ((ch = c = next_char()) != (chtype) separator && c != EOF) {
+ while ((c = next_char()) != separator && c != EOF) {
if (ptr >= (last - 1)) {
if (c != EOF) {
while ((c = next_char()) != separator && c != EOF) {
;
}
- ch = c;
}
break;
}
if ((_nc_syntax == SYN_TERMCAP) && c == '\n')
break;
- if (ch == '^' && last_ch != '%') {
- ch = c = next_char();
+ if (c == '^' && last_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 (!(is7bits(c) && isprint(c))) {
+ _nc_warning("Illegal ^ character - '%s'", unctrl(UChar(c)));
}
- if (ch == '?') {
+ if (c == '?') {
*(ptr++) = '\177';
if (_nc_tracing)
_nc_warning("Allow ^? as synonym for \\177");
} else {
- if ((ch &= 037) == 0)
- ch = 128;
- *(ptr++) = (char) (ch);
+ if ((c &= 037) == 0)
+ c = 128;
+ *(ptr++) = (char) (c);
}
- } else if (ch == '\\') {
- ch = c = next_char();
+ } else if (c == '\\') {
+ c = next_char();
if (c == EOF)
_nc_err_abort(MSG_NO_INPUTS);
- if (ch >= '0' && ch <= '7') {
- number = ch - '0';
+ if (c >= '0' && c <= '7') {
+ number = c - '0';
for (i = 0; i < 2; i++) {
- ch = c = next_char();
+ c = next_char();
if (c == EOF)
_nc_err_abort(MSG_NO_INPUTS);
@@ -848,31 +842,31 @@ _nc_trans_string(char *ptr, char *last)
default:
_nc_warning("Illegal character '%s' in \\ sequence",
- unctrl(ch));
+ unctrl(UChar(c)));
/* FALLTHRU */
case '|':
- *(ptr++) = (char) ch;
- } /* endswitch (ch) */
- } /* endelse (ch < '0' || ch > '7') */
+ *(ptr++) = (char) c;
+ } /* endswitch (c) */
+ } /* endelse (c < '0' || c > '7') */
}
- /* end else if (ch == '\\') */
- else if (ch == '\n' && (_nc_syntax == SYN_TERMINFO)) {
+ /* end else if (c == '\\') */
+ else if (c == '\n' && (_nc_syntax == SYN_TERMINFO)) {
/*
* Newlines embedded in a terminfo string are ignored, provided
* that the next line begins with whitespace.
*/
ignored = TRUE;
} else {
- *(ptr++) = (char) ch;
+ *(ptr++) = (char) c;
}
if (!ignored) {
if (_nc_curr_col <= 1) {
- push_back((char) ch);
- ch = '\n';
+ push_back((char) c);
+ c = '\n';
break;
}
- last_ch = ch;
+ last_ch = c;
count++;
}
ignored = FALSE;
@@ -885,7 +879,7 @@ _nc_trans_string(char *ptr, char *last)
*ptr = '\0';
- return (ch);
+ return (c);
}
/*
diff --git a/ncurses/tinfo/db_iterator.c b/ncurses/tinfo/db_iterator.c
index fdc2bb09eadc..82665cb54be6 100644
--- a/ncurses/tinfo/db_iterator.c
+++ b/ncurses/tinfo/db_iterator.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,7 +38,7 @@
#include <tic.h>
-MODULE_ID("$Id: db_iterator.c,v 1.6 2007/04/22 00:00:26 tom Exp $")
+MODULE_ID("$Id: db_iterator.c,v 1.9 2010/12/25 23:00:25 tom Exp $")
#define HaveTicDirectory _nc_globals.have_tic_directory
#define KeepTicDirectory _nc_globals.keep_tic_directory
@@ -104,7 +104,7 @@ next_list_item(const char *source, int *offset)
if (source != 0) {
FreeIfNeeded(ThisDbList);
ThisDbList = strdup(source);
- ThisDbSize = strlen(source);
+ ThisDbSize = (int) strlen(source);
}
if (ThisDbList != 0 && ThisDbSize && *offset < ThisDbSize) {
@@ -118,11 +118,10 @@ next_list_item(const char *source, int *offset)
* again, using the data at the offset.
*/
if (marker == 0) {
- *offset += strlen(result) + 1;
- marker = result + *offset;
+ *offset += (int) strlen(result);
} else {
*marker++ = 0;
- *offset = marker - ThisDbList;
+ *offset = (int) (marker - ThisDbList);
}
if (*result == 0 && result != (ThisDbList + ThisDbSize))
result = system_db;
diff --git a/ncurses/tinfo/entries.c b/ncurses/tinfo/entries.c
index cf2a8337b870..b1e14a803f31 100644
--- a/ncurses/tinfo/entries.c
+++ b/ncurses/tinfo/entries.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,6 +28,7 @@
/****************************************************************************
* Author: Thomas E. Dickey *
+ * and: Juergen Pfeifer *
****************************************************************************/
#include <curses.priv.h>
@@ -35,9 +36,8 @@
#include <ctype.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: entries.c,v 1.8 2008/09/27 13:11:10 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.17 2010/01/23 17:57:43 tom Exp $")
/****************************************************************************
*
@@ -119,6 +119,12 @@ _nc_leaks_tinfo(void)
#if NO_LEAKS
_nc_free_tparm();
_nc_tgetent_leaks();
+
+ if (TerminalOf(CURRENT_SCREEN) != 0) {
+ del_curterm(TerminalOf(CURRENT_SCREEN));
+ }
+
+ _nc_comp_captab_leaks();
_nc_free_entries(_nc_head);
_nc_get_type(0);
_nc_first_name(0);
@@ -131,6 +137,12 @@ _nc_leaks_tinfo(void)
if ((s = _nc_home_terminfo()) != 0)
free(s);
+
+#ifdef TRACE
+ trace(0);
+ _nc_trace_buf(-1, 0);
+#endif
+
#endif /* NO_LEAKS */
returnVoid;
}
diff --git a/ncurses/tinfo/free_ttype.c b/ncurses/tinfo/free_ttype.c
index fa0fff1b83fb..ad056ba4545b 100644
--- a/ncurses/tinfo/free_ttype.c
+++ b/ncurses/tinfo/free_ttype.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,9 +41,8 @@
#include <curses.priv.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: free_ttype.c,v 1.13 2006/06/25 10:46:02 tom Exp $")
+MODULE_ID("$Id: free_ttype.c,v 1.15 2011/02/06 01:08:31 tom Exp $")
NCURSES_EXPORT(void)
_nc_free_termtype(TERMTYPE *ptr)
@@ -70,6 +69,7 @@ use_extended_names(bool flag)
{
int oldflag = _nc_user_definable;
+ START_TRACE();
T((T_CALLED("use_extended_names(%d)"), flag));
_nc_user_definable = flag;
returnBool(oldflag);
diff --git a/ncurses/tinfo/hashed_db.c b/ncurses/tinfo/hashed_db.c
index 3fc04eae3cca..bf7a968ee96d 100644
--- a/ncurses/tinfo/hashed_db.c
+++ b/ncurses/tinfo/hashed_db.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2006,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2006 *
+ * Author: Thomas E. Dickey 2006-on *
****************************************************************************/
#include <curses.priv.h>
@@ -36,7 +36,7 @@
#if USE_HASHED_DB
-MODULE_ID("$Id: hashed_db.c,v 1.13 2006/08/19 19:48:38 tom Exp $")
+MODULE_ID("$Id: hashed_db.c,v 1.14 2008/12/13 20:59:02 tom Exp $")
#if HASHED_DB_API >= 2
static DBC *cursor;
@@ -49,27 +49,30 @@ NCURSES_EXPORT(DB *)
_nc_db_open(const char *path, bool modify)
{
DB *result = 0;
+ int code;
#if HASHED_DB_API >= 4
db_create(&result, NULL, 0);
- result->open(result,
- NULL,
- path,
- NULL,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644);
+ if ((code = result->open(result,
+ NULL,
+ path,
+ NULL,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644)) != 0) {
+ result = 0;
+ }
#elif HASHED_DB_API >= 3
db_create(&result, NULL, 0);
- result->open(result,
- path,
- NULL,
- DB_HASH,
- modify ? DB_CREATE : DB_RDONLY,
- 0644);
+ if ((code = result->open(result,
+ path,
+ NULL,
+ DB_HASH,
+ modify ? DB_CREATE : DB_RDONLY,
+ 0644)) != 0) {
+ result = 0;
+ }
#elif HASHED_DB_API >= 2
- int code;
-
if ((code = db_open(path,
DB_HASH,
modify ? DB_CREATE : DB_RDONLY,
@@ -77,21 +80,22 @@ _nc_db_open(const char *path, bool modify)
(DB_ENV *) 0,
(DB_INFO *) 0,
&result)) != 0) {
- T(("cannot open %s: %s", path, strerror(code)));
result = 0;
- } else {
- T(("opened %s", path));
}
#else
- result = dbopen(path,
- modify ? (O_CREAT | O_RDWR) : O_RDONLY,
- 0644,
- DB_HASH,
- NULL);
+ if ((result = dbopen(path,
+ modify ? (O_CREAT | O_RDWR) : O_RDONLY,
+ 0644,
+ DB_HASH,
+ NULL)) == 0) {
+ code = errno;
+ }
+#endif
if (result != 0) {
T(("opened %s", path));
+ } else {
+ T(("cannot open %s: %s", path, strerror(code)));
}
-#endif
return result;
}
diff --git a/ncurses/tinfo/home_terminfo.c b/ncurses/tinfo/home_terminfo.c
index 4521c4a8da68..69d69f95bf7c 100644
--- a/ncurses/tinfo/home_terminfo.c
+++ b/ncurses/tinfo/home_terminfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,7 +37,7 @@
#include <curses.priv.h>
#include <tic.h>
-MODULE_ID("$Id: home_terminfo.c,v 1.11 2008/08/03 23:43:11 tom Exp $")
+MODULE_ID("$Id: home_terminfo.c,v 1.12 2010/12/25 23:43:58 tom Exp $")
/* ncurses extension...fall back on user's private directory */
@@ -53,7 +53,7 @@ _nc_home_terminfo(void)
if (use_terminfo_vars()) {
if (MyBuffer == 0) {
if ((home = getenv("HOME")) != 0) {
- unsigned want = (strlen(home) + sizeof(PRIVATE_INFO));
+ size_t want = (strlen(home) + sizeof(PRIVATE_INFO));
MyBuffer = typeMalloc(char, want);
if (MyBuffer == 0)
_nc_err_abort(MSG_NO_MEMORY);
diff --git a/ncurses/tinfo/init_keytry.c b/ncurses/tinfo/init_keytry.c
index 2f6fe4f6fad7..ea47b382b493 100644
--- a/ncurses/tinfo/init_keytry.c
+++ b/ncurses/tinfo/init_keytry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,16 +27,9 @@
****************************************************************************/
#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 */
-#include <term_entry.h>
-
-MODULE_ID("$Id: init_keytry.c,v 1.12 2008/05/24 21:44:51 tom Exp $")
+MODULE_ID("$Id: init_keytry.c,v 1.17 2010/04/24 22:29:56 tom Exp $")
/*
** _nc_init_keytry()
@@ -50,7 +43,7 @@ MODULE_ID("$Id: init_keytry.c,v 1.12 2008/05/24 21:44:51 tom Exp $")
* than cur_term.
*/
#undef CUR
-#define CUR (sp->_term)->type.
+#define CUR SP_TERMTYPE
#if BROKEN_LINKER
#undef _nc_tinfo_fkeys
@@ -73,7 +66,7 @@ _nc_tinfo_fkeysf(void)
NCURSES_EXPORT(void)
_nc_init_keytry(SCREEN *sp)
{
- size_t n;
+ unsigned n;
/* The sp->_keytry value is initialized in newterm(), where the sp
* structure is created, because we can not tell where keypad() or
@@ -97,12 +90,13 @@ _nc_init_keytry(SCREEN *sp)
{
TERMTYPE *tp = &(sp->_term->type);
for (n = STRCOUNT; n < NUM_STRINGS(tp); ++n) {
- const char *name = ExtStrname(tp, n, strnames);
+ const char *name = ExtStrname(tp, (int) n, strnames);
char *value = tp->Strings[n];
if (name != 0
&& *name == 'k'
&& value != 0
- && key_defined(value) == 0) {
+ && NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx
+ value) == 0) {
(void) _nc_add_to_try(&(sp->_keytry),
value,
n - STRCOUNT + KEY_MAX);
diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c
index 919e47287a7b..d8fdedca843f 100644
--- a/ncurses/tinfo/lib_acs.c
+++ b/ncurses/tinfo/lib_acs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,17 +30,21 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2008 *
****************************************************************************/
#include <curses.priv.h>
-#include <term.h> /* ena_acs, acs_chars */
-MODULE_ID("$Id: lib_acs.c,v 1.36 2008/08/16 19:22:55 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_acs.c,v 1.43 2010/12/25 23:00:45 tom Exp $")
#if BROKEN_LINKER || USE_REENTRANT
#define MyBuffer _nc_prescreen.real_acs_map
-NCURSES_EXPORT_VAR(chtype *)
-_nc_acs_map(void)
+NCURSES_EXPORT(chtype *)
+NCURSES_PUBLIC_VAR(acs_map) (void)
{
if (MyBuffer == 0)
MyBuffer = typeCalloc(chtype, ACS_LEN);
@@ -48,17 +52,35 @@ _nc_acs_map(void)
}
#undef MyBuffer
#else
-NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
+NCURSES_EXPORT_VAR (chtype) acs_map[ACS_LEN] =
{
0
};
#endif
+#ifdef USE_TERM_DRIVER
+NCURSES_EXPORT(chtype)
+NCURSES_SP_NAME(_nc_acs_char) (NCURSES_SP_DCLx int c)
+{
+ chtype *map;
+ if (c < 0 || c >= ACS_LEN)
+ return (chtype) 0;
+ map = (SP_PARM != 0) ? SP_PARM->_acs_map :
+#if BROKEN_LINKER || USE_REENTRANT
+ _nc_prescreen.real_acs_map
+#else
+ acs_map
+#endif
+ ;
+ return map[c];
+}
+#endif /* USE_TERM_DRIVER */
+
NCURSES_EXPORT(void)
-_nc_init_acs(void)
+NCURSES_SP_NAME(_nc_init_acs) (NCURSES_SP_DCL0)
{
chtype *fake_map = acs_map;
- chtype *real_map = SP != 0 ? SP->_acs_map : fake_map;
+ chtype *real_map = SP_PARM != 0 ? SP_PARM->_acs_map : fake_map;
int j;
T(("initializing ACS map"));
@@ -71,9 +93,9 @@ _nc_init_acs(void)
if (real_map != fake_map) {
for (j = 1; j < ACS_LEN; ++j) {
real_map[j] = 0;
- fake_map[j] = A_ALTCHARSET | j;
- if (SP)
- SP->_screen_acs_map[j] = FALSE;
+ fake_map[j] = A_ALTCHARSET | (chtype) j;
+ if (SP_PARM)
+ SP_PARM->_screen_acs_map[j] = FALSE;
}
} else {
for (j = 1; j < ACS_LEN; ++j) {
@@ -118,7 +140,34 @@ _nc_init_acs(void)
real_map['{'] = '*'; /* should be greek pi */
real_map['|'] = '!'; /* should be not-equal */
real_map['}'] = 'f'; /* should be pound-sterling symbol */
+ /* thick-line-drawing */
+ real_map['L'] = '+'; /* upper left corner */
+ real_map['M'] = '+'; /* lower left corner */
+ real_map['K'] = '+'; /* upper right corner */
+ real_map['J'] = '+'; /* lower right corner */
+ real_map['T'] = '+'; /* tee pointing left */
+ real_map['U'] = '+'; /* tee pointing right */
+ real_map['V'] = '+'; /* tee pointing up */
+ real_map['W'] = '+'; /* tee pointing down */
+ real_map['Q'] = '-'; /* horizontal line */
+ real_map['X'] = '|'; /* vertical line */
+ real_map['N'] = '+'; /* large plus or crossover */
+ /* double-line-drawing */
+ real_map['C'] = '+'; /* upper left corner */
+ real_map['D'] = '+'; /* lower left corner */
+ real_map['B'] = '+'; /* upper right corner */
+ real_map['A'] = '+'; /* lower right corner */
+ real_map['G'] = '+'; /* tee pointing left */
+ real_map['F'] = '+'; /* tee pointing right */
+ real_map['H'] = '+'; /* tee pointing up */
+ real_map['I'] = '+'; /* tee pointing down */
+ real_map['R'] = '-'; /* horizontal line */
+ real_map['Y'] = '|'; /* vertical line */
+ real_map['E'] = '+'; /* large plus or crossover */
+#ifdef USE_TERM_DRIVER
+ CallDriver_2(SP_PARM, initacs, real_map, fake_map);
+#else
if (ena_acs != NULL) {
TPUTS_TRACE("ena_acs");
putp(ena_acs);
@@ -140,7 +189,7 @@ _nc_init_acs(void)
size_t i;
for (i = 1; i < ACS_LEN; ++i) {
if (real_map[i] == 0) {
- real_map[i] = i;
+ real_map[i] = (chtype) i;
if (real_map != fake_map) {
if (SP != 0)
SP->_screen_acs_map[i] = TRUE;
@@ -191,4 +240,13 @@ _nc_init_acs(void)
_nc_unlock_global(tracef);
}
#endif /* TRACE */
+#endif
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_init_acs(void)
+{
+ NCURSES_SP_NAME(_nc_init_acs) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/tinfo/lib_baudrate.c b/ncurses/tinfo/lib_baudrate.c
index b9cdfda9acce..9302f022b89c 100644
--- a/ncurses/tinfo/lib_baudrate.c
+++ b/ncurses/tinfo/lib_baudrate.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,7 +38,6 @@
*/
#include <curses.priv.h>
-#include <term.h> /* cur_term, pad_char */
#include <termcap.h> /* ospeed */
#if defined(__FreeBSD__)
#include <sys/param.h>
@@ -80,7 +79,7 @@
#undef USE_OLD_TTY
#endif /* USE_OLD_TTY */
-MODULE_ID("$Id: lib_baudrate.c,v 1.27 2008/06/28 15:19:24 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.31 2010/12/19 01:50:50 tom Exp $")
/*
* int
@@ -195,11 +194,11 @@ _nc_ospeed(int BaudRate)
}
NCURSES_EXPORT(int)
-baudrate(void)
+NCURSES_SP_NAME(baudrate) (NCURSES_SP_DCL0)
{
int result;
- T((T_CALLED("baudrate()")));
+ T((T_CALLED("baudrate(%p)"), (void *) SP_PARM));
/*
* In debugging, allow the environment symbol to override when we're
@@ -207,32 +206,41 @@ baudrate(void)
* that take into account costs that depend on baudrate.
*/
#ifdef TRACE
- if (!isatty(fileno(SP ? SP->_ofp : stdout))
+ if (IsValidTIScreen(SP_PARM)
+ && !isatty(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
&& getenv("BAUDRATE") != 0) {
int ret;
if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
ret = 9600;
- ospeed = _nc_ospeed(ret);
+ ospeed = (NCURSES_OSPEED) _nc_ospeed(ret);
returnCode(ret);
}
#endif
- if (cur_term != 0) {
+ if (IsValidTIScreen(SP_PARM)) {
#ifdef USE_OLD_TTY
- result = cfgetospeed(&cur_term->Nttyb);
+ result = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
ospeed = _nc_ospeed(result);
#else /* !USE_OLD_TTY */
#ifdef TERMIOS
- ospeed = cfgetospeed(&cur_term->Nttyb);
+ ospeed = (NCURSES_OSPEED) cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
#else
- ospeed = cur_term->Nttyb.sg_ospeed;
+ ospeed = (NCURSES_OSPEED) TerminalOf(SP_PARM)->Nttyb.sg_ospeed;
#endif
result = _nc_baudrate(ospeed);
#endif
- cur_term->_baudrate = result;
+ TerminalOf(SP_PARM)->_baudrate = result;
} else {
result = ERR;
}
returnCode(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+baudrate(void)
+{
+ return NCURSES_SP_NAME(baudrate) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/tinfo/lib_cur_term.c b/ncurses/tinfo/lib_cur_term.c
index 626578d5c08b..86e130e78527 100644
--- a/ncurses/tinfo/lib_cur_term.c
+++ b/ncurses/tinfo/lib_cur_term.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,69 +37,141 @@
*/
#include <curses.priv.h>
-#include <term_entry.h> /* TTY, cur_term */
#include <termcap.h> /* ospeed */
-MODULE_ID("$Id: lib_cur_term.c,v 1.18 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: lib_cur_term.c,v 1.30 2010/12/19 01:38:45 tom Exp $")
#undef CUR
#define CUR termp->type.
-#if BROKEN_LINKER || USE_REENTRANT
+#if BROKEN_LINKER && !USE_REENTRANT
+NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0;
+#elif BROKEN_LINKER || USE_REENTRANT
+
+NCURSES_EXPORT(TERMINAL *)
+NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_DCL0)
+{
+ return ((0 != TerminalOf(SP_PARM)) ? TerminalOf(SP_PARM) : CurTerm);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(TERMINAL *)
+_nc_get_cur_term(void)
+{
+ return NCURSES_SP_NAME(_nc_get_cur_term) (CURRENT_SCREEN);
+}
+#endif
+
NCURSES_EXPORT(TERMINAL *)
NCURSES_PUBLIC_VAR(cur_term) (void)
{
- return (SP != 0 && SP->_term != 0) ? SP->_term : _nc_prescreen._cur_term;
+#if NCURSES_SP_FUNCS
+ return NCURSES_SP_NAME(_nc_get_cur_term) (CURRENT_SCREEN);
+#else
+ return NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG);
+#endif
}
+
#else
NCURSES_EXPORT_VAR(TERMINAL *) cur_term = 0;
#endif
NCURSES_EXPORT(TERMINAL *)
-set_curterm(TERMINAL * termp)
+NCURSES_SP_NAME(set_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
{
TERMINAL *oldterm;
- T((T_CALLED("set_curterm(%p)"), termp));
+ T((T_CALLED("set_curterm(%p)"), (void *) termp));
_nc_lock_global(curses);
oldterm = cur_term;
- if (SP)
- SP->_term = termp;
-#if BROKEN_LINKER || USE_REENTRANT
- _nc_prescreen._cur_term = termp;
-#else
+ if (SP_PARM)
+ SP_PARM->_term = termp;
+#if BROKEN_LINKER && !USE_REENTRANT
cur_term = termp;
+#else
+ CurTerm = termp;
#endif
if (termp != 0) {
- ospeed = _nc_ospeed(termp->_baudrate);
+#ifdef USE_TERM_DRIVER
+ TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp;
+ ospeed = (NCURSES_OSPEED) _nc_ospeed(termp->_baudrate);
+ if (TCB->drv->isTerminfo && termp->type.Strings) {
+ PC = (char) ((pad_char != NULL) ? pad_char[0] : 0);
+ }
+ TCB->csp = SP_PARM;
+#else
+ ospeed = (NCURSES_OSPEED) _nc_ospeed(termp->_baudrate);
if (termp->type.Strings) {
PC = (char) ((pad_char != NULL) ? pad_char[0] : 0);
}
+#endif
}
_nc_unlock_global(curses);
- T((T_RETURN("%p"), oldterm));
+ T((T_RETURN("%p"), (void *) oldterm));
return (oldterm);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(TERMINAL *)
+set_curterm(TERMINAL * termp)
+{
+ return NCURSES_SP_NAME(set_curterm) (CURRENT_SCREEN, termp);
+}
+#endif
+
NCURSES_EXPORT(int)
-del_curterm(TERMINAL * termp)
+NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
{
int rc = ERR;
- T((T_CALLED("del_curterm(%p)"), termp));
+ T((T_CALLED("del_curterm(%p, %p)"), (void *) SP_PARM, (void *) termp));
- _nc_lock_global(curses);
if (termp != 0) {
+#ifdef USE_TERM_DRIVER
+ TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) termp;
+#endif
+ TERMINAL *cur = (
+#if BROKEN_LINKER && !USE_REENTRANT
+ cur_term
+#elif BROKEN_LINKER || USE_REENTRANT
+ NCURSES_SP_NAME(_nc_get_cur_term) (NCURSES_SP_ARG)
+#else
+ cur_term
+#endif
+ );
+
_nc_free_termtype(&(termp->type));
+ if (termp == cur)
+ NCURSES_SP_NAME(set_curterm) (NCURSES_SP_ARGx 0);
+
FreeIfNeeded(termp->_termname);
+#if USE_HOME_TERMINFO
+ if (_nc_globals.home_terminfo != 0)
+ FreeAndNull(_nc_globals.home_terminfo);
+#endif
+#ifdef USE_TERM_DRIVER
+ if (TCB->drv)
+ TCB->drv->release(TCB);
+#endif
free(termp);
- if (termp == cur_term)
- set_curterm(0);
+
rc = OK;
}
+ returnCode(rc);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+del_curterm(TERMINAL * termp)
+{
+ int rc = ERR;
+
+ _nc_lock_global(curses);
+ rc = NCURSES_SP_NAME(del_curterm) (CURRENT_SCREEN, termp);
_nc_unlock_global(curses);
- returnCode(rc);
+ return (rc);
}
+#endif
diff --git a/ncurses/tinfo/lib_data.c b/ncurses/tinfo/lib_data.c
index e84209d4022c..195ddf978ab6 100644
--- a/ncurses/tinfo/lib_data.c
+++ b/ncurses/tinfo/lib_data.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
@@ -41,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_data.c,v 1.52 2008/08/23 22:16:15 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.61 2010/05/15 22:06:56 tom Exp $")
/*
* OS/2's native linker complains if we don't initialize public data when
@@ -51,17 +52,17 @@ MODULE_ID("$Id: lib_data.c,v 1.52 2008/08/23 22:16:15 tom Exp $")
NCURSES_EXPORT(WINDOW *)
NCURSES_PUBLIC_VAR(stdscr) (void)
{
- return SP ? SP->_stdscr : 0;
+ return CURRENT_SCREEN ? StdScreen(CURRENT_SCREEN) : 0;
}
NCURSES_EXPORT(WINDOW *)
NCURSES_PUBLIC_VAR(curscr) (void)
{
- return SP ? SP->_curscr : 0;
+ return CURRENT_SCREEN ? CurScreen(CURRENT_SCREEN) : 0;
}
NCURSES_EXPORT(WINDOW *)
NCURSES_PUBLIC_VAR(newscr) (void)
{
- return SP ? SP->_newscr : 0;
+ return CURRENT_SCREEN ? NewScreen(CURRENT_SCREEN) : 0;
}
#else
NCURSES_EXPORT_VAR(WINDOW *) stdscr = 0;
@@ -93,7 +94,7 @@ _nc_screen(void)
NCURSES_EXPORT(int)
_nc_alloc_screen(void)
{
- return ((my_screen = typeCalloc(SCREEN, 1)) != 0);
+ return ((my_screen = _nc_alloc_screen_sp()) != 0);
}
NCURSES_EXPORT(void)
@@ -103,6 +104,7 @@ _nc_set_screen(SCREEN *sp)
}
#else
+
NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */
#endif
/* *INDENT-OFF* */
@@ -140,7 +142,9 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
0, /* tgetent_index */
0, /* tgetent_sequence */
+#ifndef USE_SP_WINDOWLIST
0, /* _nc_windowlist */
+#endif
#if USE_HOME_TERMINFO
NULL, /* home_terminfo */
@@ -151,6 +155,10 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
0, /* safeprint_rows */
#endif
+#ifdef USE_TERM_DRIVER
+ 0, /* term_driver */
+#endif
+
#ifdef TRACE
FALSE, /* init_trace */
CHARS_0s, /* trace_fname */
@@ -174,7 +182,9 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
{ CHARS_0s, CHARS_0s }, /* traceatr_color_buf */
0, /* traceatr_color_sel */
-1, /* traceatr_color_last */
-
+#if !defined(USE_PTHREADS) && USE_REENTRANT
+ 0, /* nested_tracef */
+#endif
#endif /* TRACE */
#ifdef USE_PTHREADS
PTHREAD_MUTEX_INITIALIZER, /* mutex_curses */
@@ -183,6 +193,9 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
0, /* nested_tracef */
0, /* use_pthreads */
#endif
+#if USE_PTHREADS_EINTR
+ 0, /* read_thread */
+#endif
};
#define STACK_FRAME_0 { { 0 }, 0 }
@@ -196,8 +209,10 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
TRUE, /* use_env */
FALSE, /* filter_mode */
A_NORMAL, /* previous_attr */
+#ifndef USE_SP_RIPOFF
RIPOFF_0s, /* ripoff */
NULL, /* rsp */
+#endif
{ /* tparm_state */
#ifdef TRACE
NULL, /* tname */
@@ -221,10 +236,13 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
#if NCURSES_NO_PADDING
FALSE, /* flag to set if padding disabled */
#endif
+ 0, /* _outch */
#if BROKEN_LINKER || USE_REENTRANT
NULL, /* real_acs_map */
0, /* LINES */
0, /* COLS */
+ 8, /* TABSIZE */
+ 1000, /* ESCDELAY */
0, /* cur_term */
#ifdef TRACE
0L, /* _outchars */
@@ -234,6 +252,22 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
};
/* *INDENT-ON* */
+/*
+ * wgetch() and other functions with a WINDOW* parameter may use a SCREEN*
+ * internally, and it is useful to allow those to be invoked without switching
+ * SCREEN's, e.g., for multi-threaded applications.
+ */
+NCURSES_EXPORT(SCREEN *)
+_nc_screen_of(WINDOW *win)
+{
+ SCREEN *sp = 0;
+
+ if (win != 0) {
+ sp = WINDOW_EXT(win, screen);
+ }
+ return (sp);
+}
+
/******************************************************************************/
#ifdef USE_PTHREADS
static void
@@ -314,7 +348,9 @@ _nc_mutex_unlock(pthread_mutex_t * obj)
return 0;
return pthread_mutex_unlock(obj);
}
+#endif /* USE_PTHREADS */
+#if defined(USE_PTHREADS) || USE_PTHREADS_EINTR
#if USE_WEAK_SYMBOLS
/*
* NB: sigprocmask(2) is global but pthread_sigmask(3p)
diff --git a/ncurses/tinfo/lib_has_cap.c b/ncurses/tinfo/lib_has_cap.c
index 0dc66bd9b918..d1b9b8d966da 100644
--- a/ncurses/tinfo/lib_has_cap.c
+++ b/ncurses/tinfo/lib_has_cap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-2003 *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -41,25 +42,53 @@
#include <curses.priv.h>
-#include <term.h>
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
-MODULE_ID("$Id: lib_has_cap.c,v 1.4 2003/10/25 19:43:55 tom Exp $")
+MODULE_ID("$Id: lib_has_cap.c,v 1.9 2009/10/24 22:15:47 tom Exp $")
NCURSES_EXPORT(bool)
+NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0)
+{
+ bool code = FALSE;
+
+ T((T_CALLED("has_ic(%p)"), (void *) SP_PARM));
+
+ if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
+ code = ((insert_character || parm_ich
+ || (enter_insert_mode && exit_insert_mode))
+ && (delete_character || parm_dch)) ? TRUE : FALSE;
+ }
+
+ returnCode(code);
+}
+
+#if NCURSES_SP_FUNCS
+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));
+ return NCURSES_SP_NAME(has_ic) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(bool)
+NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0)
+{
+ bool code = FALSE;
+ T((T_CALLED("has_il(%p)"), (void *) SP_PARM));
+ if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
+ code = ((insert_line || parm_insert_line)
+ && (delete_line || parm_delete_line)) ? TRUE : FALSE;
+ }
+
+ returnCode(code);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(bool)
has_il(void)
{
- T((T_CALLED("has_il()")));
- returnCode(cur_term
- && (insert_line || parm_insert_line)
- && (delete_line || parm_delete_line));
+ return NCURSES_SP_NAME(has_il) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/tinfo/lib_kernel.c b/ncurses/tinfo/lib_kernel.c
index 89dc1e80ea8e..37f70842907d 100644
--- a/ncurses/tinfo/lib_kernel.c
+++ b/ncurses/tinfo/lib_kernel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
- * and: Thomas E. Dickey 2002 *
+ * and: Thomas E. Dickey 2002 *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -46,9 +47,8 @@
*/
#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 $")
+MODULE_ID("$Id: lib_kernel.c,v 1.31 2010/12/19 01:21:19 tom Exp $")
static int
_nc_vdisable(void)
@@ -59,7 +59,7 @@ _nc_vdisable(void)
#endif
#if defined(_PC_VDISABLE)
if (value == -1) {
- value = fpathconf(0, _PC_VDISABLE);
+ value = (int) fpathconf(0, _PC_VDISABLE);
if (value == -1) {
value = 0377;
}
@@ -79,22 +79,32 @@ _nc_vdisable(void)
*/
NCURSES_EXPORT(char)
-erasechar(void)
+NCURSES_SP_NAME(erasechar) (NCURSES_SP_DCL0)
{
int result = ERR;
- T((T_CALLED("erasechar()")));
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ T((T_CALLED("erasechar(%p)"), (void *) SP_PARM));
- if (cur_term != 0) {
+ if (termp != 0) {
#ifdef TERMIOS
- result = cur_term->Ottyb.c_cc[VERASE];
+ result = termp->Ottyb.c_cc[VERASE];
if (result == _nc_vdisable())
result = ERR;
#else
- result = cur_term->Ottyb.sg_erase;
+ result = termp->Ottyb.sg_erase;
#endif
}
- returnCode(result);
+ returnChar((char) result);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char)
+erasechar(void)
+{
+ return NCURSES_SP_NAME(erasechar) (CURRENT_SCREEN);
}
+#endif
/*
* killchar()
@@ -104,22 +114,32 @@ erasechar(void)
*/
NCURSES_EXPORT(char)
-killchar(void)
+NCURSES_SP_NAME(killchar) (NCURSES_SP_DCL0)
{
int result = ERR;
- T((T_CALLED("killchar()")));
+ TERMINAL *termp = TerminalOf(SP_PARM);
- if (cur_term != 0) {
+ T((T_CALLED("killchar(%p)"), (void *) SP_PARM));
+
+ if (termp != 0) {
#ifdef TERMIOS
- result = cur_term->Ottyb.c_cc[VKILL];
+ result = termp->Ottyb.c_cc[VKILL];
if (result == _nc_vdisable())
result = ERR;
#else
- result = cur_term->Ottyb.sg_kill;
+ result = termp->Ottyb.sg_kill;
#endif
}
- returnCode(result);
+ returnChar((char) result);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char)
+killchar(void)
+{
+ return NCURSES_SP_NAME(killchar) (CURRENT_SCREEN);
}
+#endif
/*
* flushinp()
@@ -129,26 +149,36 @@ killchar(void)
*/
NCURSES_EXPORT(int)
-flushinp(void)
+NCURSES_SP_NAME(flushinp) (NCURSES_SP_DCL0)
{
- T((T_CALLED("flushinp()")));
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ T((T_CALLED("flushinp(%p)"), (void *) SP_PARM));
- if (cur_term != 0) {
+ if (termp != 0) {
#ifdef TERMIOS
- tcflush(cur_term->Filedes, TCIFLUSH);
+ tcflush(termp->Filedes, TCIFLUSH);
#else
errno = 0;
do {
- ioctl(cur_term->Filedes, TIOCFLUSH, 0);
+ ioctl(termp->Filedes, TIOCFLUSH, 0);
} while
(errno == EINTR);
#endif
- if (SP) {
- SP->_fifohead = -1;
- SP->_fifotail = 0;
- SP->_fifopeek = 0;
+ if (SP_PARM) {
+ SP_PARM->_fifohead = -1;
+ SP_PARM->_fifotail = 0;
+ SP_PARM->_fifopeek = 0;
}
returnCode(OK);
}
returnCode(ERR);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+flushinp(void)
+{
+ return NCURSES_SP_NAME(flushinp) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/tinfo/lib_longname.c b/ncurses/tinfo/lib_longname.c
index 1301ee516944..14903175b322 100644
--- a/ncurses/tinfo/lib_longname.c
+++ b/ncurses/tinfo/lib_longname.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -40,8 +42,38 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_longname.c,v 1.9 2000/12/10 02:55:07 tom Exp $")
+MODULE_ID("$Id: lib_longname.c,v 1.12 2010/12/20 00:31:26 tom Exp $")
+#if USE_REENTRANT
+NCURSES_EXPORT(char *)
+NCURSES_SP_NAME(longname) (NCURSES_SP_DCL0)
+{
+ static char empty[] =
+ {'\0'};
+ char *ptr;
+
+ T((T_CALLED("longname(%p)"), (void *) SP_PARM));
+
+ if (SP_PARM) {
+ for (ptr = SP_PARM->_ttytype + strlen(SP_PARM->_ttytype);
+ ptr > SP_PARM->_ttytype;
+ ptr--)
+ if (*ptr == '|')
+ returnPtr(ptr + 1);
+ returnPtr(SP_PARM->_ttytype);
+ }
+ return empty;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+longname(void)
+{
+ return NCURSES_SP_NAME(longname) (CURRENT_SCREEN);
+}
+#endif
+
+#else
NCURSES_EXPORT(char *)
longname(void)
{
@@ -49,9 +81,11 @@ longname(void)
T((T_CALLED("longname()")));
- for (ptr = ttytype + strlen(ttytype); ptr > ttytype; ptr--)
+ for (ptr = ttytype + strlen(ttytype);
+ ptr > ttytype;
+ ptr--)
if (*ptr == '|')
returnPtr(ptr + 1);
-
returnPtr(ttytype);
}
+#endif
diff --git a/ncurses/tinfo/lib_napms.c b/ncurses/tinfo/lib_napms.c
index 417b3b4b4dbc..1e6abda10d09 100644
--- a/ncurses/tinfo/lib_napms.c
+++ b/ncurses/tinfo/lib_napms.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -49,13 +51,17 @@
#endif
#endif
-MODULE_ID("$Id: lib_napms.c,v 1.17 2008/05/03 21:34:13 tom Exp $")
+MODULE_ID("$Id: lib_napms.c,v 1.20 2009/11/07 20:37:30 tom Exp $")
NCURSES_EXPORT(int)
-napms(int ms)
+NCURSES_SP_NAME(napms) (NCURSES_SP_DCLx int ms)
{
+ (void) SP_PARM;
T((T_CALLED("napms(%d)"), ms));
+#ifdef USE_TERM_DRIVER
+ CallDriver_1(SP_PARM, nap, ms);
+#else /* !USE_TERM_DRIVER */
#if HAVE_NANOSLEEP
{
struct timespec request, remaining;
@@ -69,6 +75,15 @@ napms(int ms)
#else
_nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0));
#endif
+#endif /* !USE_TERM_DRIVER */
returnCode(OK);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+napms(int ms)
+{
+ return NCURSES_SP_NAME(napms) (CURRENT_SCREEN, ms);
+}
+#endif
diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c
index f3b1485bf111..654bf940aa1f 100644
--- a/ncurses/tinfo/lib_options.c
+++ b/ncurses/tinfo/lib_options.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -41,53 +42,67 @@
#include <curses.priv.h>
-#include <term.h>
-
-MODULE_ID("$Id: lib_options.c,v 1.58 2008/08/16 21:20:48 Werner.Fink Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
-static int _nc_curs_set(SCREEN *, int);
-static int _nc_meta(SCREEN *, bool);
+MODULE_ID("$Id: lib_options.c,v 1.71 2009/10/24 21:56:15 tom Exp $")
NCURSES_EXPORT(int)
idlok(WINDOW *win, bool flag)
{
- T((T_CALLED("idlok(%p,%d)"), win, flag));
+ int res = ERR;
+ T((T_CALLED("idlok(%p,%d)"), (void *) win, flag));
if (win) {
- _nc_idlok = win->_idlok = (flag && (has_il() || change_scroll_region));
- returnCode(OK);
- } else
- returnCode(ERR);
+ SCREEN *sp = _nc_screen_of(win);
+ if (sp && IsTermInfo(sp)) {
+ sp->_nc_sp_idlok =
+ win->_idlok = (flag && (NCURSES_SP_NAME(has_il) (NCURSES_SP_ARG)
+ || change_scroll_region));
+ res = OK;
+ }
+ }
+ returnCode(res);
}
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());
+ T((T_CALLED("idcok(%p,%d)"), (void *) win, flag));
+ if (win) {
+ SCREEN *sp = _nc_screen_of(win);
+ sp->_nc_sp_idcok = win->_idcok = (flag && NCURSES_SP_NAME(has_ic) (NCURSES_SP_ARG));
+ }
returnVoid;
}
NCURSES_EXPORT(int)
-halfdelay(int t)
+NCURSES_SP_NAME(halfdelay) (NCURSES_SP_DCLx int t)
{
- T((T_CALLED("halfdelay(%d)"), t));
+ T((T_CALLED("halfdelay(%p,%d)"), (void *) SP_PARM, t));
- if (t < 1 || t > 255 || SP == 0)
+ if (t < 1 || t > 255 || !IsValidTIScreen(SP_PARM))
returnCode(ERR);
- cbreak();
- SP->_cbreak = t + 1;
+ NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
+ SP_PARM->_cbreak = t + 1;
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+halfdelay(int t)
+{
+ return NCURSES_SP_NAME(halfdelay) (CURRENT_SCREEN, t);
+}
+#endif
+
NCURSES_EXPORT(int)
nodelay(WINDOW *win, bool flag)
{
- T((T_CALLED("nodelay(%p,%d)"), win, flag));
+ T((T_CALLED("nodelay(%p,%d)"), (void *) win, flag));
if (win) {
if (flag == TRUE)
@@ -102,7 +117,7 @@ nodelay(WINDOW *win, bool flag)
NCURSES_EXPORT(int)
notimeout(WINDOW *win, bool f)
{
- T((T_CALLED("notimeout(%p,%d)"), win, f));
+ T((T_CALLED("notimeout(%p,%d)"), (void *) win, f));
if (win) {
win->_notimeout = f;
@@ -114,7 +129,7 @@ notimeout(WINDOW *win, bool f)
NCURSES_EXPORT(void)
wtimeout(WINDOW *win, int delay)
{
- T((T_CALLED("wtimeout(%p,%d)"), win, delay));
+ T((T_CALLED("wtimeout(%p,%d)"), (void *) win, delay));
if (win) {
win->_delay = delay;
@@ -125,11 +140,11 @@ wtimeout(WINDOW *win, int delay)
NCURSES_EXPORT(int)
keypad(WINDOW *win, bool flag)
{
- T((T_CALLED("keypad(%p,%d)"), win, flag));
+ T((T_CALLED("keypad(%p,%d)"), (void *) win, flag));
if (win) {
win->_use_keypad = flag;
- returnCode(_nc_keypad(SP, flag));
+ returnCode(_nc_keypad(_nc_screen_of(win), flag));
} else
returnCode(ERR);
}
@@ -137,38 +152,106 @@ keypad(WINDOW *win, bool flag)
NCURSES_EXPORT(int)
meta(WINDOW *win GCC_UNUSED, bool flag)
{
- int result;
+ int result = ERR;
+ SCREEN *sp = (win == 0) ? CURRENT_SCREEN : _nc_screen_of(win);
+
+ /* Ok, we stay relaxed and don't signal an error if win is NULL */
+ T((T_CALLED("meta(%p,%d)"), (void *) win, flag));
/* Ok, we stay relaxed and don't signal an error if win is NULL */
- T((T_CALLED("meta(%p,%d)"), win, flag));
- result = _nc_meta(SP, flag);
+
+ if (sp != 0) {
+ sp->_use_meta = flag;
+#ifdef USE_TERM_DRIVER
+ if (IsTermInfo(sp)) {
+ if (flag) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_on", meta_on);
+ } else {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_off", meta_off);
+ }
+ }
+#else
+ if (flag) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_on", meta_on);
+ } else {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "meta_off", meta_off);
+ }
+#endif
+ result = OK;
+ }
returnCode(result);
}
/* curs_set() moved here to narrow the kernel interface */
NCURSES_EXPORT(int)
-curs_set(int vis)
+NCURSES_SP_NAME(curs_set) (NCURSES_SP_DCLx int vis)
{
- int result;
+ int code = ERR;
+ T((T_CALLED("curs_set(%p,%d)"), (void *) SP_PARM, vis));
- T((T_CALLED("curs_set(%d)"), vis));
- result = _nc_curs_set(SP, vis);
- returnCode(result);
+ if (SP_PARM != 0 && vis >= 0 && vis <= 2) {
+ int cursor = SP_PARM->_cursor;
+ bool bBuiltIn = !IsTermInfo(SP_PARM);
+ if (vis == cursor) {
+ code = cursor;
+ } else {
+ if (!bBuiltIn) {
+ switch (vis) {
+ case 2:
+ code = NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx
+ "cursor_visible",
+ cursor_visible);
+ break;
+ case 1:
+ code = NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx
+ "cursor_normal",
+ cursor_normal);
+ break;
+ case 0:
+ code = NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx
+ "cursor_invisible",
+ cursor_invisible);
+ break;
+ }
+ } else
+ code = ERR;
+ if (code != ERR)
+ code = (cursor == -1 ? 1 : cursor);
+ SP_PARM->_cursor = vis;
+ }
+ }
+ returnCode(code);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-typeahead(int fd)
+curs_set(int vis)
{
- T((T_CALLED("typeahead(%d)"), fd));
- if (SP != 0) {
- SP->_checkfd = fd;
+ return (NCURSES_SP_NAME(curs_set) (CURRENT_SCREEN, vis));
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(typeahead) (NCURSES_SP_DCLx int fd)
+{
+ T((T_CALLED("typeahead(%p, %d)"), (void *) SP_PARM, fd));
+ if (IsValidTIScreen(SP_PARM)) {
+ SP_PARM->_checkfd = fd;
returnCode(OK);
} else {
returnCode(ERR);
}
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+typeahead(int fd)
+{
+ return NCURSES_SP_NAME(typeahead) (CURRENT_SCREEN, fd);
+}
+#endif
+
/*
** has_key()
**
@@ -189,42 +272,49 @@ has_key_internal(int keycode, TRIES * tp)
|| has_key_internal(keycode, tp->sibling));
}
+#ifdef USE_TERM_DRIVER
+NCURSES_EXPORT(int)
+TINFO_HAS_KEY(SCREEN *sp, int keycode)
+{
+ return IsValidTIScreen(sp) ?
+ has_key_internal(keycode, sp->_keytry) : 0;
+}
+#else
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(has_key) (NCURSES_SP_DCLx int keycode)
+{
+ T((T_CALLED("has_key(%p,%d)"), (void *) SP_PARM, keycode));
+ returnCode(SP != 0 ? has_key_internal(keycode, SP_PARM->_keytry) : FALSE);
+}
+
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
has_key(int keycode)
{
- T((T_CALLED("has_key(%d)"), keycode));
- returnCode(SP != 0 ? has_key_internal(keycode, SP->_keytry) : FALSE);
+ return NCURSES_SP_NAME(has_key) (CURRENT_SCREEN, keycode);
}
+#endif
+#endif
#endif /* NCURSES_EXT_FUNCS */
-/*
- * Internal entrypoints use SCREEN* parameter to obtain capabilities rather
- * than cur_term.
- */
-#undef CUR
-#define CUR (sp->_term)->type.
-
-static int
-_nc_putp(const char *name GCC_UNUSED, const char *value)
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_DCLx
+ const char *name, const char *value)
{
- int rc = ERR;
-
- if (value) {
- TPUTS_TRACE(name);
- rc = putp(value);
+ int rc = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx name, value);
+ if (rc != ERR) {
+ _nc_flush();
}
return rc;
}
-static int
+#if 0 && NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
_nc_putp_flush(const char *name, const char *value)
{
- int rc = _nc_putp(name, value);
- if (rc != ERR) {
- _nc_flush();
- }
- return rc;
+ return NCURSES_SP_NAME(_nc_putp_flush) (CURRENT_SCREEN, name, value);
}
+#endif
/* Turn the keypad on/off
*
@@ -245,12 +335,12 @@ _nc_keypad(SCREEN *sp, bool flag)
* has wgetch() reading in more than one thread. putp() and below
* may use SP explicitly.
*/
- if (_nc_use_pthreads && sp != SP) {
+ if (_nc_use_pthreads && sp != CURRENT_SCREEN) {
SCREEN *save_sp;
/* cannot use use_screen(), since that is not in tinfo library */
_nc_lock_global(curses);
- save_sp = SP;
+ save_sp = CURRENT_SCREEN;
_nc_set_screen(sp);
rc = _nc_keypad(sp, flag);
_nc_set_screen(save_sp);
@@ -258,10 +348,19 @@ _nc_keypad(SCREEN *sp, bool flag)
} else
#endif
{
+#ifdef USE_TERM_DRIVER
+ rc = CallDriver_1(sp, kpad, flag);
+ if (rc == OK)
+ sp->_keypad_on = flag;
+#else
if (flag) {
- (void) _nc_putp_flush("keypad_xmit", keypad_xmit);
+ (void) NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx
+ "keypad_xmit",
+ keypad_xmit);
} else if (!flag && keypad_local) {
- (void) _nc_putp_flush("keypad_local", keypad_local);
+ (void) NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_ARGx
+ "keypad_local",
+ keypad_local);
}
if (flag && !sp->_tried) {
@@ -270,58 +369,8 @@ _nc_keypad(SCREEN *sp, bool flag)
}
sp->_keypad_on = flag;
rc = OK;
+#endif
}
}
return (rc);
}
-
-static int
-_nc_curs_set(SCREEN *sp, int vis)
-{
- int result = ERR;
-
- T((T_CALLED("curs_set(%d)"), vis));
- if (sp != 0 && vis >= 0 && vis <= 2) {
- int cursor = sp->_cursor;
-
- if (vis == cursor) {
- result = cursor;
- } else {
- switch (vis) {
- case 2:
- result = _nc_putp_flush("cursor_visible", cursor_visible);
- break;
- case 1:
- result = _nc_putp_flush("cursor_normal", cursor_normal);
- break;
- case 0:
- result = _nc_putp_flush("cursor_invisible", cursor_invisible);
- break;
- }
- if (result != ERR)
- result = (cursor == -1 ? 1 : cursor);
- sp->_cursor = vis;
- }
- }
- returnCode(result);
-}
-
-static int
-_nc_meta(SCREEN *sp, bool flag)
-{
- int result = ERR;
-
- /* Ok, we stay relaxed and don't signal an error if win is NULL */
-
- if (SP != 0) {
- SP->_use_meta = flag;
-
- if (flag) {
- _nc_putp("meta_on", meta_on);
- } else {
- _nc_putp("meta_off", meta_off);
- }
- result = OK;
- }
- return result;
-}
diff --git a/ncurses/tinfo/lib_print.c b/ncurses/tinfo/lib_print.c
index 975b46d85773..c7bd3a62fa87 100644
--- a/ncurses/tinfo/lib_print.c
+++ b/ncurses/tinfo/lib_print.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,23 +29,31 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
#include <curses.priv.h>
-#include <term.h>
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
-MODULE_ID("$Id: lib_print.c,v 1.16 2006/11/26 00:26:34 tom Exp $")
+MODULE_ID("$Id: lib_print.c,v 1.20 2010/06/05 22:18:35 tom Exp $")
NCURSES_EXPORT(int)
-mcprint(char *data, int len)
+NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
/* ship binary character data to the printer via mc4/mc5/mc5p */
{
+ int result;
char *mybuf, *switchon;
- size_t onsize, offsize, res;
+ size_t onsize, offsize;
+ size_t need;
errno = 0;
- if (!cur_term || (!prtr_non && (!prtr_on || !prtr_off))) {
+ if (!HasTInfoTerminal(SP_PARM)
+ || len <= 0
+ || (!prtr_non && (!prtr_on || !prtr_off))) {
errno = ENODEV;
return (ERR);
}
@@ -60,8 +68,10 @@ mcprint(char *data, int len)
offsize = strlen(prtr_off);
}
+ need = onsize + (size_t) len + offsize;
+
if (switchon == 0
- || (mybuf = typeMalloc(char, onsize + len + offsize + 1)) == 0) {
+ || (mybuf = typeMalloc(char, need + 1)) == 0) {
errno = ENOMEM;
return (ERR);
}
@@ -78,15 +88,24 @@ mcprint(char *data, int len)
* 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);
+ result = (int) write(TerminalOf(SP_PARM)->Filedes, mybuf, need);
/*
* 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.
*/
+#ifndef __MINGW32__
(void) sleep(0);
-
+#endif
free(mybuf);
- return (res);
+ return (result);
+}
+
+#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER)
+NCURSES_EXPORT(int)
+mcprint(char *data, int len)
+{
+ return NCURSES_SP_NAME(mcprint) (CURRENT_SCREEN, data, len);
}
+#endif
diff --git a/ncurses/tinfo/lib_raw.c b/ncurses/tinfo/lib_raw.c
index 58e71889af12..b524a1bb55be 100644
--- a/ncurses/tinfo/lib_raw.c
+++ b/ncurses/tinfo/lib_raw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
- * and: Thomas E. Dickey 1998 on *
+ * and: Thomas E. Dickey 1998-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -47,9 +48,8 @@
*/
#include <curses.priv.h>
-#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $")
+MODULE_ID("$Id: lib_raw.c,v 1.19 2010/04/24 23:49:12 tom Exp $")
#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
@@ -61,7 +61,7 @@ MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $")
#ifdef __EMX__
#include <io.h>
-#define _nc_setmode(mode) setmode(SP->_ifd, mode)
+#define _nc_setmode(mode) setmode(SP_PARM->_ifd, mode)
#else
#define _nc_setmode(mode) /* nothing */
#endif
@@ -77,188 +77,235 @@ MODULE_ID("$Id: lib_raw.c,v 1.14 2007/09/29 21:50:22 tom Exp $")
#endif /* TRACE */
NCURSES_EXPORT(int)
-raw(void)
+NCURSES_SP_NAME(raw) (NCURSES_SP_DCL0)
{
int result = ERR;
+ TERMINAL *termp;
- T((T_CALLED("raw()")));
-
- if (SP != 0 && cur_term != 0) {
+ T((T_CALLED("raw(%p)"), (void *) SP_PARM));
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("raw");
_nc_setmode(O_BINARY);
- buf = cur_term->Nttyb;
+ buf = termp->Nttyb;
#ifdef TERMIOS
- buf.c_lflag &= ~(ICANON | ISIG | IEXTEN);
- buf.c_iflag &= ~(COOKED_INPUT);
+ buf.c_lflag &= (unsigned) ~(ICANON | ISIG | IEXTEN);
+ buf.c_iflag &= (unsigned) ~(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;
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
+ if (result == OK) {
+ SP_PARM->_raw = TRUE;
+ SP_PARM->_cbreak = 1;
+ termp->Nttyb = buf;
}
AFTER("raw");
}
returnCode(result);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-cbreak(void)
+raw(void)
{
- int result = ERR;
+ return NCURSES_SP_NAME(raw) (CURRENT_SCREEN);
+}
+#endif
- T((T_CALLED("cbreak()")));
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(cbreak) (NCURSES_SP_DCL0)
+{
+ int result = ERR;
+ TERMINAL *termp;
- if (SP != 0 && cur_term != 0) {
+ T((T_CALLED("cbreak(%p)"), (void *) SP_PARM));
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("cbreak");
_nc_setmode(O_BINARY);
- buf = cur_term->Nttyb;
+ buf = termp->Nttyb;
#ifdef TERMIOS
- buf.c_lflag &= ~ICANON;
- buf.c_iflag &= ~ICRNL;
+ buf.c_lflag &= (unsigned) ~ICANON;
+ buf.c_iflag &= (unsigned) ~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;
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
+ if (result == OK) {
+ SP_PARM->_cbreak = 1;
+ termp->Nttyb = buf;
}
AFTER("cbreak");
}
returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+cbreak(void)
+{
+ return NCURSES_SP_NAME(cbreak) (CURRENT_SCREEN);
+}
+#endif
+
/*
* Note:
* this implementation may be wrong. See the comment under intrflush().
*/
NCURSES_EXPORT(void)
-qiflush(void)
+NCURSES_SP_NAME(qiflush) (NCURSES_SP_DCL0)
{
int result = ERR;
+ TERMINAL *termp;
- T((T_CALLED("qiflush()")));
-
- if (cur_term != 0) {
+ T((T_CALLED("qiflush(%p)"), (void *) SP_PARM));
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("qiflush");
- buf = cur_term->Nttyb;
+ buf = termp->Nttyb;
#ifdef TERMIOS
- buf.c_lflag &= ~(NOFLSH);
- result = _nc_set_tty_mode(&buf);
+ buf.c_lflag &= (unsigned) ~(NOFLSH);
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
#else
/* FIXME */
#endif
if (result == OK)
- cur_term->Nttyb = buf;
+ termp->Nttyb = buf;
AFTER("qiflush");
}
returnVoid;
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+qiflush(void)
+{
+ NCURSES_SP_NAME(qiflush) (CURRENT_SCREEN);
+}
+#endif
+
NCURSES_EXPORT(int)
-noraw(void)
+NCURSES_SP_NAME(noraw) (NCURSES_SP_DCL0)
{
int result = ERR;
+ TERMINAL *termp;
- T((T_CALLED("noraw()")));
-
- if (SP != 0 && cur_term != 0) {
+ T((T_CALLED("noraw(%p)"), (void *) SP_PARM));
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("noraw");
_nc_setmode(O_TEXT);
- buf = cur_term->Nttyb;
+ buf = termp->Nttyb;
#ifdef TERMIOS
buf.c_lflag |= ISIG | ICANON |
- (cur_term->Ottyb.c_lflag & IEXTEN);
+ (termp->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;
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
+ if (result == OK) {
+ SP_PARM->_raw = FALSE;
+ SP_PARM->_cbreak = 0;
+ termp->Nttyb = buf;
}
AFTER("noraw");
}
returnCode(result);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-nocbreak(void)
+noraw(void)
{
- int result = ERR;
+ return NCURSES_SP_NAME(noraw) (CURRENT_SCREEN);
+}
+#endif
- T((T_CALLED("nocbreak()")));
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(nocbreak) (NCURSES_SP_DCL0)
+{
+ int result = ERR;
+ TERMINAL *termp;
- if (SP != 0 && cur_term != 0) {
+ T((T_CALLED("nocbreak(%p)"), (void *) SP_PARM));
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("nocbreak");
_nc_setmode(O_TEXT);
- buf = cur_term->Nttyb;
+ buf = termp->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;
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
+ if (result == OK) {
+ SP_PARM->_cbreak = 0;
+ termp->Nttyb = buf;
}
AFTER("nocbreak");
}
returnCode(result);
}
-/*
- * Note:
- * this implementation may be wrong. See the comment under intrflush().
- */
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+nocbreak(void)
+{
+ return NCURSES_SP_NAME(nocbreak) (CURRENT_SCREEN);
+}
+#endif
+
NCURSES_EXPORT(void)
-noqiflush(void)
+NCURSES_SP_NAME(noqiflush) (NCURSES_SP_DCL0)
{
int result = ERR;
+ TERMINAL *termp;
- T((T_CALLED("noqiflush()")));
-
- if (cur_term != 0) {
+ T((T_CALLED("noqiflush(%p)"), (void *) SP_PARM));
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("noqiflush");
- buf = cur_term->Nttyb;
+ buf = termp->Nttyb;
#ifdef TERMIOS
buf.c_lflag |= NOFLSH;
- result = _nc_set_tty_mode(&buf);
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
#else
/* FIXME */
#endif
- if (result == OK) {
- cur_term->Nttyb = buf;
- }
+ if (result == OK)
+ termp->Nttyb = buf;
AFTER("noqiflush");
}
returnVoid;
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+noqiflush(void)
+{
+ NCURSES_SP_NAME(noqiflush) (CURRENT_SCREEN);
+}
+#endif
+
/*
* 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,
@@ -267,30 +314,41 @@ noqiflush(void)
* curs_inopts(3x) is too exact to be coincidence.
*/
NCURSES_EXPORT(int)
-intrflush(WINDOW *win GCC_UNUSED, bool flag)
+NCURSES_SP_NAME(intrflush) (NCURSES_SP_DCLx WINDOW *win GCC_UNUSED, bool flag)
{
int result = ERR;
+ TERMINAL *termp;
- T((T_CALLED("intrflush(%d)"), flag));
+ T((T_CALLED("intrflush(%p,%d)"), (void *) SP_PARM, flag));
+ if (SP_PARM == 0)
+ returnCode(ERR);
- if (cur_term != 0) {
+ if ((termp = TerminalOf(SP_PARM)) != 0) {
TTY buf;
BEFORE("intrflush");
- buf = cur_term->Nttyb;
+ buf = termp->Nttyb;
#ifdef TERMIOS
if (flag)
- buf.c_lflag &= ~(NOFLSH);
+ buf.c_lflag &= (unsigned) ~(NOFLSH);
else
buf.c_lflag |= (NOFLSH);
- result = _nc_set_tty_mode(&buf);
+ result = NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
#else
/* FIXME */
#endif
if (result == OK) {
- cur_term->Nttyb = buf;
+ termp->Nttyb = buf;
}
AFTER("intrflush");
}
returnCode(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+intrflush(WINDOW *win GCC_UNUSED, bool flag)
+{
+ return NCURSES_SP_NAME(intrflush) (CURRENT_SCREEN, win, flag);
+}
+#endif
diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c
index 8cfaf12c5348..5fcf2ae3fc32 100644
--- a/ncurses/tinfo/lib_setup.c
+++ b/ncurses/tinfo/lib_setup.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -41,7 +42,6 @@
#include <curses.priv.h>
#include <tic.h> /* for MAX_NAME_SIZE */
-#include <term_entry.h>
#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
@@ -51,9 +51,7 @@
#include <locale.h>
#endif
-#include <term.h> /* lines, columns, cur_term */
-
-MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.135 2011/02/06 01:04:21 tom Exp $")
/****************************************************************************
*
@@ -109,61 +107,96 @@ MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $")
* Wrap global variables in this module.
*/
#if USE_REENTRANT
+
NCURSES_EXPORT(char *)
NCURSES_PUBLIC_VAR(ttytype) (void)
{
static char empty[] = "";
- return cur_term ? cur_term->type.term_names : empty;
+ char *result = empty;
+
+#if NCURSES_SP_FUNCS
+ if (CURRENT_SCREEN) {
+ TERMINAL *termp = TerminalOf(CURRENT_SCREEN);
+ if (termp != 0) {
+ result = termp->type.term_names;
+ }
+ }
+#else
+ if (cur_term != 0) {
+ result = cur_term->type.term_names;
+ }
+#endif
+ return result;
}
+
NCURSES_EXPORT(int *)
-_nc_ptr_Lines(void)
+_nc_ptr_Lines(SCREEN *sp)
{
- return ptrLines();
+ return ptrLines(sp);
}
+
NCURSES_EXPORT(int)
NCURSES_PUBLIC_VAR(LINES) (void)
{
- return *_nc_ptr_Lines();
+ return *_nc_ptr_Lines(CURRENT_SCREEN);
}
+
NCURSES_EXPORT(int *)
-_nc_ptr_Cols(void)
+_nc_ptr_Cols(SCREEN *sp)
{
- return ptrCols();
+ return ptrCols(sp);
}
+
NCURSES_EXPORT(int)
NCURSES_PUBLIC_VAR(COLS) (void)
{
- return *_nc_ptr_Cols();
+ return *_nc_ptr_Cols(CURRENT_SCREEN);
+}
+
+NCURSES_EXPORT(int *)
+_nc_ptr_Tabsize(SCREEN *sp)
+{
+ return ptrTabsize(sp);
}
+
NCURSES_EXPORT(int)
NCURSES_PUBLIC_VAR(TABSIZE) (void)
{
- return SP ? SP->_TABSIZE : 8;
+ return *_nc_ptr_Tabsize(CURRENT_SCREEN);
}
#else
NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
NCURSES_EXPORT_VAR(int) LINES = 0;
NCURSES_EXPORT_VAR(int) COLS = 0;
-NCURSES_EXPORT_VAR(int) TABSIZE = 0;
+NCURSES_EXPORT_VAR(int) TABSIZE = 8;
#endif
#if NCURSES_EXT_FUNCS
NCURSES_EXPORT(int)
-set_tabsize(int value)
+NCURSES_SP_NAME(set_tabsize) (NCURSES_SP_DCLx int value)
{
int code = OK;
#if USE_REENTRANT
- if (SP) {
- SP->_TABSIZE = value;
+ if (SP_PARM) {
+ SP_PARM->_TABSIZE = value;
} else {
code = ERR;
}
#else
+ (void) SP_PARM;
TABSIZE = value;
#endif
return code;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+set_tabsize(int value)
+{
+ return NCURSES_SP_NAME(set_tabsize) (CURRENT_SCREEN, value);
+}
#endif
+#endif /* NCURSES_EXT_FUNCS */
#if USE_SIGWINCH
/*
@@ -188,42 +221,71 @@ _nc_handle_sigwinch(SCREEN *sp)
#endif
NCURSES_EXPORT(void)
+NCURSES_SP_NAME(use_env) (NCURSES_SP_DCLx bool f)
+{
+ T((T_CALLED("use_env(%p,%d)"), (void *) SP_PARM, (int) f));
+#if NCURSES_SP_FUNCS
+ if (IsPreScreen(SP_PARM)) {
+ SP_PARM->_use_env = f;
+ }
+#else
+ _nc_prescreen.use_env = f;
+#endif
+ returnVoid;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
use_env(bool f)
{
- T((T_CALLED("use_env()")));
+ T((T_CALLED("use_env(%d)"), (int) f));
_nc_prescreen.use_env = f;
returnVoid;
}
+#endif
NCURSES_EXPORT(void)
-_nc_get_screensize(SCREEN *sp, int *linep, int *colp)
+_nc_get_screensize(SCREEN *sp,
+#ifdef USE_TERM_DRIVER
+ TERMINAL * termp,
+#endif
+ int *linep, int *colp)
/* Obtain lines/columns values from the environment and/or terminfo entry */
{
+#ifdef USE_TERM_DRIVER
+ TERMINAL_CONTROL_BLOCK *TCB;
+ int my_tabsize;
+
+ assert(termp != 0 && linep != 0 && colp != 0);
+ TCB = (TERMINAL_CONTROL_BLOCK *) termp;
+
+ my_tabsize = TCB->info.tabsize;
+ TCB->drv->size(TCB, linep, colp);
+
+#if USE_REENTRANT
+ if (sp != 0) {
+ sp->_TABSIZE = my_tabsize;
+ }
+#else
+ (void) sp;
+ TABSIZE = my_tabsize;
+#endif
+ T(("TABSIZE = %d", my_tabsize));
+#else /* !USE_TERM_DRIVER */
TERMINAL *termp = cur_term;
int my_tabsize;
/* figure out the size of the screen */
T(("screen size: terminfo lines = %d columns = %d", lines, columns));
- if (!_nc_prescreen.use_env) {
- *linep = (int) lines;
- *colp = (int) columns;
- } else { /* usually want to query LINES and COLUMNS from environment */
- int value;
-
- *linep = *colp = 0;
+ *linep = (int) lines;
+ *colp = (int) columns;
- /* 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));
+ if (_nc_prescreen.use_env) {
+ int value;
#ifdef __EMX__
- if (*linep <= 0 || *colp <= 0) {
+ {
int screendata[2];
_scrsize(screendata);
*colp = screendata[0];
@@ -233,33 +295,41 @@ _nc_get_screensize(SCREEN *sp, int *linep, int *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 = (sp != 0 && sp->_filtered) ? 1 : WINSIZE_ROWS(size);
- if (*colp <= 0)
+ /* try asking the OS */
+ if (isatty(cur_term->Filedes)) {
+ STRUCT_WINSIZE size;
+
+ errno = 0;
+ do {
+ if (ioctl(cur_term->Filedes, IOCTL_WINSIZE, &size) >= 0) {
+ *linep = ((sp != 0 && sp->_filtered)
+ ? 1
+ : WINSIZE_ROWS(size));
*colp = WINSIZE_COLS(size);
- }
- /* FALLTHRU */
- failure:;
+ T(("SYS screen size: environment LINES = %d COLUMNS = %d",
+ *linep, *colp));
+ break;
+ }
+ } while
+ (errno == EINTR);
}
#endif /* HAVE_SIZECHANGE */
+ /*
+ * Finally, look for environment variables.
+ *
+ * Solaris lets users override either dimension with an environment
+ * variable.
+ */
+ if ((value = _nc_getenv_num("LINES")) > 0) {
+ *linep = value;
+ T(("screen size: environment LINES = %d", *linep));
+ }
+ if ((value = _nc_getenv_num("COLUMNS")) > 0) {
+ *colp = value;
+ T(("screen size: environment COLUMNS = %d", *colp));
+ }
+
/* if we can't get dynamic info about the size, use static */
if (*linep <= 0) {
*linep = (int) lines;
@@ -298,19 +368,31 @@ _nc_get_screensize(SCREEN *sp, int *linep, int *colp)
TABSIZE = my_tabsize;
#endif
T(("TABSIZE = %d", TABSIZE));
+#endif /* USE_TERM_DRIVER */
}
#if USE_SIZECHANGE
NCURSES_EXPORT(void)
_nc_update_screensize(SCREEN *sp)
{
+ int new_lines;
+ int new_cols;
+
+#ifdef USE_TERM_DRIVER
+ int old_lines;
+ int old_cols;
+
+ assert(sp != 0);
+
+ CallDriver_2(sp, getsize, &old_lines, &old_cols);
+
+#else
TERMINAL *termp = cur_term;
int old_lines = lines;
- int new_lines;
int old_cols = columns;
- int new_cols;
+#endif
- _nc_get_screensize(sp, &new_lines, &new_cols);
+ TINFO_GET_SIZE(sp, sp->_term, &new_lines, &new_cols);
/*
* See is_term_resized() and resizeterm().
@@ -320,7 +402,7 @@ _nc_update_screensize(SCREEN *sp)
if (sp != 0
&& sp->_resize != 0) {
if ((new_lines != old_lines) || (new_cols != old_cols))
- sp->_resize(new_lines, new_cols);
+ sp->_resize(NCURSES_SP_ARGx new_lines, new_cols);
sp->_sig_winch = FALSE;
}
}
@@ -353,8 +435,8 @@ _nc_update_screensize(SCREEN *sp)
* Return 1 if entry found, 0 if not found, -1 if database not accessible,
* just like tgetent().
*/
-static int
-grab_entry(const char *const tn, TERMTYPE *const tp)
+int
+_nc_setup_tinfo(const char *const tn, TERMTYPE *const tp)
{
char filename[PATH_MAX];
int status = _nc_read_entry(tn, filename, tp);
@@ -381,28 +463,27 @@ grab_entry(const char *const tn, TERMTYPE *const tp)
#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(TERMINAL * termp)
+void
+_nc_tinfo_cmdch(TERMINAL * termp, char proto)
{
unsigned i;
char CC;
- char proto;
char *tmp;
- if ((tmp = getenv("CC")) != 0) {
- if ((CC = *tmp) != 0) {
- proto = *command_character;
-
- for_each_string(i, &(termp->type)) {
- for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
- if (*tmp == proto)
- *tmp = CC;
- }
+ /*
+ * Only use the character if the string is a single character,
+ * since it is fairly common for developers to set the C compiler
+ * name as an environment variable - using the same symbol.
+ */
+ if ((tmp = getenv("CC")) != 0 && strlen(tmp) == 1) {
+ CC = *tmp;
+ for_each_string(i, &(termp->type)) {
+ for (tmp = termp->type.Strings[i]; *tmp; tmp++) {
+ if (*tmp == proto)
+ *tmp = CC;
}
}
}
@@ -465,39 +546,64 @@ _nc_unicode_locale(void)
NCURSES_EXPORT(int)
_nc_locale_breaks_acs(TERMINAL * termp)
{
+ const char *env_name = "NCURSES_NO_UTF8_ACS";
char *env;
+ int value;
+ int result = 0;
- if ((env = getenv("NCURSES_NO_UTF8_ACS")) != 0) {
- return atoi(env);
+ if ((env = getenv(env_name)) != 0) {
+ result = _nc_getenv_num(env_name);
+ } else if ((value = tigetnum("U8")) >= 0) {
+ result = value; /* use extension feature */
} else if ((env = getenv("TERM")) != 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 (strstr(env, "linux")) {
+ result = 1; /* always broken */
+ } else 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;
+ CONTROL_O(set_attributes)) {
+ result = 1;
+ }
}
}
- return 0;
+ return result;
}
-/*
- * This entrypoint is called from tgetent() to allow a special case of reusing
- * the same TERMINAL data (see comment).
- */
NCURSES_EXPORT(int)
-_nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
+TINFO_SETUP_TERM(TERMINAL ** tp,
+ NCURSES_CONST char *tname,
+ int Filedes,
+ int *errret,
+ bool reuse)
{
- TERMINAL *termp;
+#ifdef USE_TERM_DRIVER
+ TERMINAL_CONTROL_BLOCK *TCB = 0;
+#else
int status;
+#endif
+ TERMINAL *termp;
+ SCREEN *sp = 0;
+ int code = ERR;
START_TRACE();
- T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, errret));
+
+#ifdef USE_TERM_DRIVER
+ T((T_CALLED("_nc_setupterm_ex(%p,%s,%d,%p)"),
+ (void *) tp, _nc_visbuf(tname), Filedes, (void *) errret));
+
+ if (tp == 0) {
+ ret_error0(TGETENT_ERR,
+ "Invalid parameter, internal error.\n");
+ } else
+ termp = *tp;
+#else
+ termp = cur_term;
+ T((T_CALLED("setupterm(%s,%d,%p)"), _nc_visbuf(tname), Filedes, (void *) errret));
+#endif
if (tname == 0) {
tname = getenv("TERM");
@@ -538,22 +644,37 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
* properly with this feature).
*/
if (reuse
- && (termp = cur_term) != 0
+ && (termp != 0)
&& termp->Filedes == Filedes
&& termp->_termname != 0
&& !strcmp(termp->_termname, tname)
&& _nc_name_match(termp->type.term_names, tname, "|")) {
T(("reusing existing terminal information and mode-settings"));
+ code = OK;
} else {
-
+#ifdef USE_TERM_DRIVER
+ termp = (TERMINAL *) typeCalloc(TERMINAL_CONTROL_BLOCK, 1);
+#else
termp = typeCalloc(TERMINAL, 1);
-
+#endif
if (termp == 0) {
ret_error0(TGETENT_ERR,
"Not enough memory to create terminal structure.\n");
}
+#ifdef USE_TERM_DRIVER
+ INIT_TERM_DRIVER();
+ TCB = (TERMINAL_CONTROL_BLOCK *) termp;
+ code = _nc_globals.term_driver(TCB, tname, errret);
+ if (code == OK) {
+ termp->Filedes = (short) Filedes;
+ termp->_termname = strdup(tname);
+ } else {
+ ret_error0(TGETENT_ERR,
+ "Could not find any driver to handle this terminal.\n");
+ }
+#else
#if USE_DATABASE || USE_TERMCAP
- status = grab_entry(tname, &termp->type);
+ status = _nc_setup_tinfo(tname, &termp->type);
#else
status = TGETENT_NO;
#endif
@@ -581,13 +702,13 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
ttytype[NAMESIZE - 1] = '\0';
#endif
- termp->Filedes = Filedes;
+ termp->Filedes = (short) Filedes;
termp->_termname = strdup(tname);
set_curterm(termp);
- if (command_character && getenv("CC"))
- do_prototype(termp);
+ if (command_character)
+ _nc_tinfo_cmdch(termp, *command_character);
/*
* If an application calls setupterm() rather than initscr() or
@@ -599,24 +720,94 @@ _nc_setupterm(NCURSES_CONST char *tname, int Filedes, int *errret, bool reuse)
def_prog_mode();
baudrate();
}
+ code = OK;
+#endif
}
+#ifdef USE_TERM_DRIVER
+ *tp = termp;
+ NCURSES_SP_NAME(set_curterm) (sp, termp);
+ TCB->drv->init(TCB);
+#else
+ sp = SP;
+#endif
+
/*
* We should always check the screensize, just in case.
*/
- _nc_get_screensize(SP, ptrLines(), ptrCols());
+ TINFO_GET_SIZE(sp, termp, ptrLines(sp), ptrCols(sp));
if (errret)
*errret = TGETENT_YES;
+#ifndef USE_TERM_DRIVER
if (generic_type) {
ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
}
if (hard_copy) {
ret_error(TGETENT_YES, "'%s': I can't handle hardcopy terminals.\n", tname);
}
- returnCode(OK);
+#endif
+ returnCode(code);
+}
+
+#if NCURSES_SP_FUNCS
+/*
+ * In case of handling multiple screens, we need to have a screen before
+ * initialization in setupscreen takes place. This is to extend the substitute
+ * for some of the stuff in _nc_prescreen, especially for slk and ripoff
+ * handling which should be done per screen.
+ */
+NCURSES_EXPORT(SCREEN *)
+new_prescr(void)
+{
+ static SCREEN *sp;
+
+ START_TRACE();
+ T((T_CALLED("new_prescr()")));
+
+ if (sp == 0) {
+ sp = _nc_alloc_screen_sp();
+ if (sp != 0) {
+ sp->rsp = sp->rippedoff;
+ sp->_filtered = _nc_prescreen.filter_mode;
+ sp->_use_env = _nc_prescreen.use_env;
+#if NCURSES_NO_PADDING
+ sp->_no_padding = _nc_prescreen._no_padding;
+#endif
+ sp->slk_format = 0;
+ sp->_slk = 0;
+ sp->_prescreen = TRUE;
+ SP_PRE_INIT(sp);
+#if USE_REENTRANT
+ sp->_TABSIZE = _nc_prescreen._TABSIZE;
+ sp->_ESCDELAY = _nc_prescreen._ESCDELAY;
+#endif
+ }
+ }
+ returnSP(sp);
+}
+#endif
+
+#ifdef USE_TERM_DRIVER
+/*
+ * This entrypoint is called from tgetent() to allow a special case of reusing
+ * the same TERMINAL data (see comment).
+ */
+NCURSES_EXPORT(int)
+_nc_setupterm(NCURSES_CONST char *tname,
+ int Filedes,
+ int *errret,
+ bool reuse)
+{
+ int res;
+ TERMINAL *termp;
+ res = TINFO_SETUP_TERM(&termp, tname, Filedes, errret, reuse);
+ if (ERR != res)
+ NCURSES_SP_NAME(set_curterm) (CURRENT_SCREEN_PRE, termp);
+ return res;
}
+#endif
/*
* setupterm(termname, Filedes, errret)
diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c
index 2d245ffbb61f..e9dae85bdd97 100644
--- a/ncurses/tinfo/lib_termcap.c
+++ b/ncurses/tinfo/lib_termcap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
* *
* some of the code in here was contributed by: *
* Magnus Bengtsson, d6mbeng@dtek.chalmers.se (Nov'93) *
@@ -43,9 +44,11 @@
#include <tic.h>
#include <ctype.h>
-#include <term_entry.h>
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
-MODULE_ID("$Id: lib_termcap.c,v 1.63 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.73 2010/12/25 19:27:12 tom Exp $")
NCURSES_EXPORT_VAR(char *) UP = 0;
NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -76,16 +79,26 @@ NCURSES_EXPORT_VAR(char *) BC = 0;
***************************************************************************/
NCURSES_EXPORT(int)
-tgetent(char *bufp, const char *name)
+NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
{
- int errcode;
+ int rc = ERR;
int n;
bool found_cache = FALSE;
+#ifdef USE_TERM_DRIVER
+ TERMINAL *termp = 0;
+#endif
START_TRACE();
T((T_CALLED("tgetent()")));
- _nc_setupterm((NCURSES_CONST char *) name, STDOUT_FILENO, &errcode, TRUE);
+ TINFO_SETUP_TERM(&termp, (NCURSES_CONST char *) name,
+ STDOUT_FILENO, &rc, TRUE);
+
+#ifdef USE_TERM_DRIVER
+ if (termp == 0 ||
+ !((TERMINAL_CONTROL_BLOCK *) termp)->drv->isTerminfo)
+ return (rc);
+#endif
/*
* In general we cannot tell if the fixed sgr0 is still used by the
@@ -109,9 +122,9 @@ tgetent(char *bufp, const char *name)
/*
* Also free the terminfo data that we loaded (much bigger leak).
*/
- if (LAST_TRM != 0 && LAST_TRM != cur_term) {
+ if (LAST_TRM != 0 && LAST_TRM != TerminalOf(SP_PARM)) {
TERMINAL *trm = LAST_TRM;
- del_curterm(LAST_TRM);
+ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx LAST_TRM);
for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
if (LAST_TRM == trm)
LAST_TRM = 0;
@@ -131,7 +144,7 @@ tgetent(char *bufp, const char *name)
}
CacheInx = best;
}
- LAST_TRM = cur_term;
+ LAST_TRM = TerminalOf(SP_PARM);
LAST_SEQ = ++CacheSeq;
PC = 0;
@@ -139,7 +152,7 @@ tgetent(char *bufp, const char *name)
BC = 0;
FIX_SGR0 = 0; /* don't free it - application may still use */
- if (errcode == 1) {
+ if (rc == 1) {
if (cursor_left)
if ((backspaces_with_bs = (char) !strcmp(cursor_left, "\b")) == 0)
@@ -153,7 +166,7 @@ tgetent(char *bufp, const char *name)
if (backspace_if_not_bs != NULL)
BC = backspace_if_not_bs;
- if ((FIX_SGR0 = _nc_trim_sgr0(&(cur_term->type))) != 0) {
+ if ((FIX_SGR0 = _nc_trim_sgr0(&(TerminalOf(SP_PARM)->type))) != 0) {
if (!strcmp(FIX_SGR0, exit_attribute_mode)) {
if (FIX_SGR0 != exit_attribute_mode) {
free(FIX_SGR0);
@@ -164,8 +177,8 @@ tgetent(char *bufp, const char *name)
LAST_BUF = bufp;
LAST_USE = TRUE;
- SetNoPadding(SP);
- (void) baudrate(); /* sets ospeed as a side-effect */
+ SetNoPadding(SP_PARM);
+ (void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG); /* sets ospeed as a side-effect */
/* LINT_PREPRO
#if 0*/
@@ -174,8 +187,27 @@ tgetent(char *bufp, const char *name)
#endif*/
}
- returnCode(errcode);
+ returnCode(rc);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tgetent(char *bufp, const char *name)
+{
+ return NCURSES_SP_NAME(tgetent) (CURRENT_SCREEN, bufp, name);
+}
+#endif
+
+#if 0
+static bool
+same_tcname(const char *a, const char *b)
+{
+ fprintf(stderr, "compare(%s,%s)\n", a, b);
+ return !strncmp(a, b, 2);
}
+#else
+#define same_tcname(a,b) !strncmp(a,b,2)
+#endif
/***************************************************************************
*
@@ -187,24 +219,48 @@ tgetent(char *bufp, const char *name)
***************************************************************************/
NCURSES_EXPORT(int)
-tgetflag(NCURSES_CONST char *id)
+NCURSES_SP_NAME(tgetflag) (NCURSES_SP_DCLx 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]);
+ int result = 0; /* Solaris returns zero for missing flag */
+ int i, j;
+
+ T((T_CALLED("tgetflag(%p, %s)"), (void *) SP_PARM, id));
+ if (HasTInfoTerminal(SP_PARM)) {
+ TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
+ struct name_table_entry const *entry_ptr;
+
+ entry_ptr = _nc_find_type_entry(id, BOOLEAN, TRUE);
+ if (entry_ptr != 0) {
+ j = entry_ptr->nte_index;
+ }
+#if NCURSES_XNAMES
+ else {
+ j = -1;
+ for_each_ext_boolean(i, tp) {
+ const char *capname = ExtBoolname(tp, i, boolcodes);
+ if (same_tcname(id, capname)) {
+ j = i;
+ break;
+ }
}
}
+#endif
+ if (j >= 0) {
+ /* note: setupterm forces invalid booleans to false */
+ result = tp->Booleans[j];
+ }
}
- returnCode(0); /* Solaris does this */
+ returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tgetflag(NCURSES_CONST char *id)
+{
+ return NCURSES_SP_NAME(tgetflag) (CURRENT_SCREEN, id);
+}
+#endif
+
/***************************************************************************
*
* tgetnum(str)
@@ -215,25 +271,48 @@ tgetflag(NCURSES_CONST char *id)
***************************************************************************/
NCURSES_EXPORT(int)
-tgetnum(NCURSES_CONST char *id)
+NCURSES_SP_NAME(tgetnum) (NCURSES_SP_DCLx 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]);
+ int result = ABSENT_NUMERIC;
+ int i, j;
+
+ T((T_CALLED("tgetnum(%p, %s)"), (void *) SP_PARM, id));
+ if (HasTInfoTerminal(SP_PARM)) {
+ TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
+ struct name_table_entry const *entry_ptr;
+
+ entry_ptr = _nc_find_type_entry(id, NUMBER, TRUE);
+ if (entry_ptr != 0) {
+ j = entry_ptr->nte_index;
+ }
+#if NCURSES_XNAMES
+ else {
+ j = -1;
+ for_each_ext_number(i, tp) {
+ const char *capname = ExtNumname(tp, i, numcodes);
+ if (same_tcname(id, capname)) {
+ j = i;
+ break;
+ }
}
}
+#endif
+ if (j >= 0) {
+ if (VALID_NUMERIC(tp->Numbers[j]))
+ result = tp->Numbers[j];
+ }
}
- returnCode(ABSENT_NUMERIC);
+ returnCode(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tgetnum(NCURSES_CONST char *id)
+{
+ return NCURSES_SP_NAME(tgetnum) (CURRENT_SCREEN, id);
+}
+#endif
+
/***************************************************************************
*
* tgetstr(str, area)
@@ -244,40 +323,62 @@ tgetnum(NCURSES_CONST char *id)
***************************************************************************/
NCURSES_EXPORT(char *)
-tgetstr(NCURSES_CONST char *id, char **area)
+NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area)
{
- unsigned i;
char *result = NULL;
+ int i, j;
- 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_SGR0 != 0) {
- result = FIX_SGR0;
- TR(TRACE_DATABASE, ("altered to : %s", _nc_visbuf(result)));
- }
- if (area != 0
- && *area != 0) {
- (void) strcpy(*area, result);
- result = *area;
- *area += strlen(*area) + 1;
- }
+ T((T_CALLED("tgetstr(%s,%p)"), id, (void *) area));
+ if (HasTInfoTerminal(SP_PARM)) {
+ TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
+ struct name_table_entry const *entry_ptr;
+
+ entry_ptr = _nc_find_type_entry(id, STRING, TRUE);
+ if (entry_ptr != 0) {
+ j = entry_ptr->nte_index;
+ }
+#if NCURSES_XNAMES
+ else {
+ j = -1;
+ for_each_ext_string(i, tp) {
+ const char *capname = ExtStrname(tp, i, strcodes);
+ if (same_tcname(id, capname)) {
+ j = i;
+ break;
+ }
+ }
+ }
+#endif
+ if (j >= 0) {
+ result = tp->Strings[j];
+ 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_SGR0 != 0) {
+ result = FIX_SGR0;
+ TR(TRACE_DATABASE, ("altered to : %s", _nc_visbuf(result)));
+ }
+ if (area != 0
+ && *area != 0) {
+ (void) strcpy(*area, result);
+ result = *area;
+ *area += strlen(*area) + 1;
}
- break;
}
}
}
returnPtr(result);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+tgetstr(NCURSES_CONST char *id, char **area)
+{
+ return NCURSES_SP_NAME(tgetstr) (CURRENT_SCREEN, id, area);
+}
+#endif
+
#if NO_LEAKS
NCURSES_EXPORT(void)
_nc_tgetent_leaks(void)
diff --git a/ncurses/tinfo/lib_termname.c b/ncurses/tinfo/lib_termname.c
index 713d0be8c360..e3f6827ee018 100644
--- a/ncurses/tinfo/lib_termname.c
+++ b/ncurses/tinfo/lib_termname.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -28,17 +28,31 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_termname.c,v 1.8 2003/12/27 18:23:01 tom Exp $")
+MODULE_ID("$Id: lib_termname.c,v 1.12 2009/10/24 21:56:58 tom Exp $")
NCURSES_EXPORT(char *)
-termname(void)
+NCURSES_SP_NAME(termname) (NCURSES_SP_DCL0)
{
char *name = 0;
- T((T_CALLED("termname()")));
+ T((T_CALLED("termname(%p)"), (void *) SP_PARM));
+#if NCURSES_SP_FUNCS
+ if (TerminalOf(SP_PARM) != 0) {
+ name = TerminalOf(SP_PARM)->_termname;
+ }
+#else
if (cur_term != 0)
name = cur_term->_termname;
+#endif
returnPtr(name);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+termname(void)
+{
+ return NCURSES_SP_NAME(termname) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/tinfo/lib_ti.c b/ncurses/tinfo/lib_ti.c
index df460f953ea7..e41234210c85 100644
--- a/ncurses/tinfo/lib_ti.c
+++ b/ncurses/tinfo/lib_ti.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,75 +29,159 @@
/****************************************************************************
* 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_entry.h>
#include <tic.h>
-MODULE_ID("$Id: lib_ti.c,v 1.23 2003/05/24 21:10:28 tom Exp $")
+MODULE_ID("$Id: lib_ti.c,v 1.29 2010/01/23 17:57:43 tom Exp $")
+
+#if 0
+static bool
+same_name(const char *a, const char *b)
+{
+ fprintf(stderr, "compare(%s,%s)\n", a, b);
+ return !strcmp(a, b);
+}
+#else
+#define same_name(a,b) !strcmp(a,b)
+#endif
NCURSES_EXPORT(int)
-tigetflag(NCURSES_CONST char *str)
+NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx NCURSES_CONST char *str)
{
- unsigned i;
+ int result = ABSENT_BOOLEAN;
+ int i, j;
- T((T_CALLED("tigetflag(%s)"), str));
+ T((T_CALLED("tigetflag(%p, %s)"), (void *) SP_PARM, 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]);
+ if (HasTInfoTerminal(SP_PARM)) {
+ TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
+ struct name_table_entry const *entry_ptr;
+
+ entry_ptr = _nc_find_type_entry(str, BOOLEAN, FALSE);
+ if (entry_ptr != 0) {
+ j = entry_ptr->nte_index;
+ }
+#if NCURSES_XNAMES
+ else {
+ j = -1;
+ for_each_ext_boolean(i, tp) {
+ const char *capname = ExtBoolname(tp, i, boolnames);
+ if (same_name(str, capname)) {
+ j = i;
+ break;
+ }
}
}
+#endif
+ if (j >= 0) {
+ /* note: setupterm forces invalid booleans to false */
+ result = tp->Booleans[j];
+ }
}
- returnCode(ABSENT_BOOLEAN);
+ returnCode(result);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-tigetnum(NCURSES_CONST char *str)
+tigetflag(NCURSES_CONST char *str)
+{
+ return NCURSES_SP_NAME(tigetflag) (CURRENT_SCREEN, str);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx 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]);
+ int i, j;
+ int result = CANCELLED_NUMERIC; /* Solaris returns a -1 on error */
+
+ T((T_CALLED("tigetnum(%p, %s)"), (void *) SP_PARM, str));
+
+ if (HasTInfoTerminal(SP_PARM)) {
+ TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
+ struct name_table_entry const *entry_ptr;
+
+ entry_ptr = _nc_find_type_entry(str, NUMBER, FALSE);
+ if (entry_ptr != 0) {
+ j = entry_ptr->nte_index;
+ }
+#if NCURSES_XNAMES
+ else {
+ j = -1;
+ for_each_ext_number(i, tp) {
+ const char *capname = ExtNumname(tp, i, numnames);
+ if (same_name(str, capname)) {
+ j = i;
+ break;
+ }
}
}
+#endif
+ if (j >= 0) {
+ if (VALID_NUMERIC(tp->Numbers[j]))
+ result = tp->Numbers[j];
+ else
+ result = ABSENT_NUMERIC;
+ }
}
- returnCode(CANCELLED_NUMERIC); /* Solaris returns a -1 instead */
+ returnCode(result);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+tigetnum(NCURSES_CONST char *str)
+{
+ return NCURSES_SP_NAME(tigetnum) (CURRENT_SCREEN, str);
}
+#endif
NCURSES_EXPORT(char *)
-tigetstr(NCURSES_CONST char *str)
+NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx NCURSES_CONST char *str)
{
- unsigned i;
+ char *result = CANCELLED_STRING;
+ int i, j;
- T((T_CALLED("tigetstr(%s)"), str));
+ T((T_CALLED("tigetstr(%p, %s)"), (void *) SP_PARM, 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]);
+ if (HasTInfoTerminal(SP_PARM)) {
+ TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
+ struct name_table_entry const *entry_ptr;
+
+ entry_ptr = _nc_find_type_entry(str, STRING, FALSE);
+ if (entry_ptr != 0) {
+ j = entry_ptr->nte_index;
+ }
+#if NCURSES_XNAMES
+ else {
+ j = -1;
+ for_each_ext_string(i, tp) {
+ const char *capname = ExtStrname(tp, i, strnames);
+ if (same_name(str, capname)) {
+ j = i;
+ break;
+ }
}
}
+#endif
+ if (j >= 0) {
+ /* note: setupterm forces cancelled strings to null */
+ result = tp->Strings[j];
+ }
}
- returnPtr(CANCELLED_STRING);
+ returnPtr(result);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(char *)
+tigetstr(NCURSES_CONST char *str)
+{
+ return NCURSES_SP_NAME(tigetstr) (CURRENT_SCREEN, str);
}
+#endif
diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c
index ba2a8404030e..7cd12f7f6845 100644
--- a/ncurses/tinfo/lib_tparm.c
+++ b/ncurses/tinfo/lib_tparm.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,10 +40,9 @@
#include <curses.priv.h>
#include <ctype.h>
-#include <term.h>
#include <tic.h>
-MODULE_ID("$Id: lib_tparm.c,v 1.76 2008/08/16 19:22:55 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.82 2011/01/15 22:19:12 tom Exp $")
/*
* char *
@@ -140,7 +139,7 @@ save_text(const char *fmt, const char *s, int len)
{
size_t s_len = strlen(s);
if (len > (int) s_len)
- s_len = len;
+ s_len = (size_t) len;
get_space(s_len + 1);
@@ -451,12 +450,13 @@ _nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount)
}
static NCURSES_INLINE char *
-tparam_internal(const char *string, va_list ap)
+tparam_internal(bool use_TPARM_ARG, const char *string, va_list ap)
{
char *p_is_s[NUM_PARM];
TPARM_ARG param[NUM_PARM];
- int popcount;
+ int popcount = 0;
int number;
+ int num_args;
int len;
int level;
int x, y;
@@ -479,7 +479,13 @@ tparam_internal(const char *string, va_list ap)
if (TPS(fmt_buff) == 0)
return NULL;
- for (i = 0; i < max(popcount, number); i++) {
+ if (number > NUM_PARM)
+ number = NUM_PARM;
+ if (popcount > NUM_PARM)
+ popcount = NUM_PARM;
+ num_args = max(popcount, number);
+
+ for (i = 0; i < num_args; i++) {
/*
* A few caps (such as plab_norm) have string-valued parms.
* We'll have to assume that the caller knows the difference, since
@@ -489,8 +495,11 @@ tparam_internal(const char *string, va_list ap)
*/
if (p_is_s[i] != 0) {
p_is_s[i] = va_arg(ap, char *);
- } else {
+ param[i] = 0;
+ } else if (use_TPARM_ARG) {
param[i] = va_arg(ap, TPARM_ARG);
+ } else {
+ param[i] = (TPARM_ARG) va_arg(ap, int);
}
}
@@ -508,7 +517,7 @@ tparam_internal(const char *string, va_list ap)
if (p_is_s[i])
spush(p_is_s[i]);
else
- npush(param[i]);
+ npush((int) param[i]);
}
}
#ifdef TRACE
@@ -517,7 +526,7 @@ tparam_internal(const char *string, va_list ap)
if (p_is_s[i] != 0)
save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
else
- save_number(", %d", param[i], 0);
+ save_number(", %d", (int) param[i], 0);
}
_tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(cp), TPS(out_buff));
TPS(out_used) = 0;
@@ -564,7 +573,7 @@ tparam_internal(const char *string, va_list ap)
if (p_is_s[i])
spush(p_is_s[i]);
else
- npush(param[i]);
+ npush((int) param[i]);
}
break;
@@ -772,7 +781,7 @@ tparm_varargs(NCURSES_CONST char *string,...)
#ifdef TRACE
TPS(tname) = "tparm";
#endif /* TRACE */
- result = tparam_internal(string, ap);
+ result = tparam_internal(TRUE, string, ap);
va_end(ap);
return result;
}
@@ -793,3 +802,19 @@ tparm_proto(NCURSES_CONST char *string,
return tparm_varargs(string, a1, a2, a3, a4, a5, a6, a7, a8, a9);
}
#endif /* NCURSES_TPARM_VARARGS */
+
+NCURSES_EXPORT(char *)
+tiparm(const char *string,...)
+{
+ va_list ap;
+ char *result;
+
+ _nc_tparm_err = 0;
+ va_start(ap, string);
+#ifdef TRACE
+ TPS(tname) = "tiparm";
+#endif /* TRACE */
+ result = tparam_internal(FALSE, string, ap);
+ va_end(ap);
+ return result;
+}
diff --git a/ncurses/tinfo/lib_tputs.c b/ncurses/tinfo/lib_tputs.c
index a8b7276895a5..dc70f3e0b0b8 100644
--- a/ncurses/tinfo/lib_tputs.c
+++ b/ncurses/tinfo/lib_tputs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -41,12 +42,16 @@
*/
#include <curses.priv.h>
+
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
#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.66 2008/06/28 13:12:15 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.81 2010/12/20 00:42:50 tom Exp $")
NCURSES_EXPORT_VAR(char) PC = 0; /* used by termcap library */
NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0; /* used by termcap library */
@@ -69,63 +74,136 @@ _nc_set_no_padding(SCREEN *sp)
}
#endif
-static int (*my_outch) (int c) = _nc_outch;
+#if NCURSES_SP_FUNCS
+#define SetOutCh(func) if (SP_PARM) SP_PARM->_outch = func; else _nc_prescreen._outch = func
+#define GetOutCh() (SP_PARM ? SP_PARM->_outch : _nc_prescreen._outch)
+#else
+#define SetOutCh(func) static_outch = func
+#define GetOutCh() static_outch
+static NCURSES_SP_OUTC static_outch = NCURSES_SP_NAME(_nc_outch);
+#endif
NCURSES_EXPORT(int)
-delay_output(int ms)
+NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms)
{
- T((T_CALLED("delay_output(%d)"), ms));
+ T((T_CALLED("delay_output(%p,%d)"), (void *) SP_PARM, ms));
+
+ if (!HasTInfoTerminal(SP_PARM))
+ returnCode(ERR);
if (no_pad_char) {
- _nc_flush();
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
napms(ms);
} else {
+ NCURSES_SP_OUTC my_outch = GetOutCh();
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();
+ my_outch(NCURSES_SP_ARGx PC);
+ if (my_outch == NCURSES_SP_NAME(_nc_outch))
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
}
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+delay_output(int ms)
+{
+ return NCURSES_SP_NAME(delay_output) (CURRENT_SCREEN, ms);
+}
+#endif
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0)
+{
+ (void) fflush(NC_OUTPUT(SP_PARM));
+}
+
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
_nc_flush(void)
{
- (void) fflush(NC_OUTPUT);
+ NCURSES_SP_NAME(_nc_flush) (CURRENT_SCREEN);
}
+#endif
NCURSES_EXPORT(int)
-_nc_outch(int ch)
+NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_DCLx int ch)
{
+ int rc = OK;
+
COUNT_OUTCHARS(1);
- if (SP != 0
- && SP->_cleanup) {
- char tmp = ch;
+ if (HasTInfoTerminal(SP_PARM)
+ && SP_PARM != 0
+ && SP_PARM->_cleanup) {
+ char tmp = (char) ch;
/*
* POSIX says write() is safe in a signal handler, but the
* buffered I/O is not.
*/
- write(fileno(NC_OUTPUT), &tmp, 1);
+ if (write(fileno(NC_OUTPUT(SP_PARM)), &tmp, 1) == -1)
+ rc = ERR;
} else {
- putc(ch, NC_OUTPUT);
+ if (putc(ch, NC_OUTPUT(SP_PARM)) == EOF)
+ rc = ERR;
}
- return OK;
+ return rc;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_outch(int ch)
+{
+ return NCURSES_SP_NAME(_nc_outch) (CURRENT_SCREEN, ch);
}
+#endif
NCURSES_EXPORT(int)
+NCURSES_SP_NAME(putp) (NCURSES_SP_DCLx const char *string)
+{
+ return NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ string, 1, NCURSES_SP_NAME(_nc_outch));
+}
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_DCLx
+ const char *name GCC_UNUSED,
+ const char *string)
+{
+ int rc = ERR;
+
+ if (string != 0) {
+ TPUTS_TRACE(name);
+ rc = NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx string);
+ }
+ return rc;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
putp(const char *string)
{
- return tputs(string, 1, _nc_outch);
+ return NCURSES_SP_NAME(putp) (CURRENT_SCREEN, string);
}
NCURSES_EXPORT(int)
-tputs(const char *string, int affcnt, int (*outc) (int))
+_nc_putp(const char *name, const char *string)
{
+ return NCURSES_SP_NAME(_nc_putp) (CURRENT_SCREEN, name, string);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
+ const char *string,
+ int affcnt,
+ NCURSES_SP_OUTC outc)
+{
+ NCURSES_SP_OUTC my_outch = GetOutCh();
bool always_delay;
bool normal_delay;
int number;
@@ -137,7 +215,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
char addrbuf[32];
if (USE_TRACEF(TRACE_TPUTS)) {
- if (outc == _nc_outch)
+ if (outc == NCURSES_SP_NAME(_nc_outch))
(void) strcpy(addrbuf, "_nc_outch");
else
(void) sprintf(addrbuf, "%p", outc);
@@ -152,10 +230,19 @@ tputs(const char *string, int affcnt, int (*outc) (int))
}
#endif /* TRACE */
+ if (SP_PARM != 0 && !HasTInfoTerminal(SP_PARM))
+ return ERR;
+
if (!VALID_STRING(string))
return ERR;
- if (cur_term == 0) {
+ if (
+#if NCURSES_SP_FUNCS
+ (SP_PARM != 0 && SP_PARM->_term == 0)
+#else
+ cur_term == 0
+#endif
+ ) {
always_delay = FALSE;
normal_delay = TRUE;
} else {
@@ -164,7 +251,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
!xon_xoff
&& padding_baud_rate
#if NCURSES_NO_PADDING
- && !GetNoPadding(SP)
+ && !GetNoPadding(SP_PARM)
#endif
&& (_nc_baudrate(ospeed) >= padding_baud_rate);
}
@@ -198,24 +285,24 @@ tputs(const char *string, int affcnt, int (*outc) (int))
}
#endif /* BSD_TPUTS */
- my_outch = outc; /* redirect delay_output() */
+ SetOutCh(outc); /* redirect delay_output() */
while (*string) {
if (*string != '$')
- (*outc) (*string);
+ (*outc) (NCURSES_SP_ARGx *string);
else {
string++;
if (*string != '<') {
- (*outc) ('$');
+ (*outc) (NCURSES_SP_ARGx '$');
if (*string)
- (*outc) (*string);
+ (*outc) (NCURSES_SP_ARGx *string);
} else {
bool mandatory;
string++;
if ((!isdigit(UChar(*string)) && *string != '.')
|| !strchr(string, '>')) {
- (*outc) ('$');
- (*outc) ('<');
+ (*outc) (NCURSES_SP_ARGx '$');
+ (*outc) (NCURSES_SP_ARGx '<');
continue;
}
@@ -250,7 +337,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
&& (always_delay
|| normal_delay
|| mandatory))
- delay_output(number / 10);
+ NCURSES_SP_NAME(delay_output) (NCURSES_SP_ARGx number / 10);
} /* endelse (*string == '<') */
} /* endelse (*string == '$') */
@@ -270,6 +357,25 @@ tputs(const char *string, int affcnt, int (*outc) (int))
delay_output(trailpad / 10);
#endif /* BSD_TPUTS */
- my_outch = _nc_outch;
+ SetOutCh(my_outch);
return OK;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_outc_wrapper(SCREEN *sp, int c)
+{
+ if (0 == sp) {
+ return (ERR);
+ } else {
+ return sp->jump(c);
+ }
+}
+
+NCURSES_EXPORT(int)
+tputs(const char *string, int affcnt, int (*outc) (int))
+{
+ SetSafeOutcWrapper(outc);
+ return NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx string, affcnt, _nc_outc_wrapper);
+}
+#endif
diff --git a/ncurses/tinfo/lib_ttyflags.c b/ncurses/tinfo/lib_ttyflags.c
index a2b38a3327f1..663a06898090 100644
--- a/ncurses/tinfo/lib_ttyflags.c
+++ b/ncurses/tinfo/lib_ttyflags.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,159 +36,246 @@
*/
#include <curses.priv.h>
-#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_ttyflags.c,v 1.18 2008/08/03 22:10:44 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_ttyflags.c,v 1.27 2010/12/25 23:43:58 tom Exp $")
NCURSES_EXPORT(int)
-_nc_get_tty_mode(TTY * buf)
+NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
{
int result = OK;
- if (buf == 0) {
+ if (buf == 0 || SP_PARM == 0) {
result = ERR;
} else {
- if (cur_term == 0) {
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ if (0 == termp) {
result = ERR;
} else {
+#ifdef USE_TERM_DRIVER
+ result = CallDriver_2(SP_PARM, sgmode, FALSE, buf);
+#else
for (;;) {
- if (GET_TTY(cur_term->Filedes, buf) != 0) {
+ if (GET_TTY(termp->Filedes, buf) != 0) {
if (errno == EINTR)
continue;
result = ERR;
}
break;
}
+#endif
}
if (result == ERR)
memset(buf, 0, sizeof(*buf));
TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
- cur_term ? cur_term->Filedes : -1,
+ termp ? termp->Filedes : -1,
_nc_trace_ttymode(buf)));
}
return (result);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-_nc_set_tty_mode(TTY * buf)
+_nc_get_tty_mode(TTY * buf)
+{
+ return NCURSES_SP_NAME(_nc_get_tty_mode) (CURRENT_SCREEN, buf);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_DCLx TTY * buf)
{
int result = OK;
- if (buf == 0) {
+ if (buf == 0 || SP_PARM == 0) {
result = ERR;
} else {
- if (cur_term == 0) {
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ if (0 == termp) {
result = ERR;
} else {
+#ifdef USE_TERM_DRIVER
+ result = CallDriver_2(SP_PARM, sgmode, TRUE, buf);
+#else
for (;;) {
- if (SET_TTY(cur_term->Filedes, buf) != 0) {
+ if (SET_TTY(termp->Filedes, buf) != 0) {
if (errno == EINTR)
continue;
- if ((errno == ENOTTY) && (SP != 0))
- SP->_notty = TRUE;
+ if ((errno == ENOTTY) && (SP_PARM != 0))
+ SP_PARM->_notty = TRUE;
result = ERR;
}
break;
}
+#endif
}
TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
- cur_term ? cur_term->Filedes : -1,
+ termp ? termp->Filedes : -1,
_nc_trace_ttymode(buf)));
}
return (result);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-def_shell_mode(void)
+_nc_set_tty_mode(TTY * buf)
+{
+ return NCURSES_SP_NAME(_nc_set_tty_mode) (CURRENT_SCREEN, buf);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_DCL0)
{
int rc = ERR;
+ TERMINAL *termp = TerminalOf(SP_PARM);
- T((T_CALLED("def_shell_mode()")));
+ T((T_CALLED("def_shell_mode(%p)"), (void *) SP_PARM));
- if (cur_term != 0) {
+ if (termp != 0) {
+#ifdef USE_TERM_DRIVER
+ rc = CallDriver_2(SP_PARM, mode, FALSE, TRUE);
+#else
/*
* If XTABS was on, remove the tab and backtab capabilities.
*/
- if (_nc_get_tty_mode(&cur_term->Ottyb) == OK) {
+ if (_nc_get_tty_mode(&termp->Ottyb) == OK) {
#ifdef TERMIOS
- if (cur_term->Ottyb.c_oflag & OFLAGS_TABS)
+ if (termp->Ottyb.c_oflag & OFLAGS_TABS)
tab = back_tab = NULL;
#else
- if (cur_term->Ottyb.sg_flags & XTABS)
+ if (termp->Ottyb.sg_flags & XTABS)
tab = back_tab = NULL;
#endif
rc = OK;
}
+#endif
}
returnCode(rc);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-def_prog_mode(void)
+def_shell_mode(void)
+{
+ return NCURSES_SP_NAME(def_shell_mode) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_DCL0)
{
int rc = ERR;
+ TERMINAL *termp = TerminalOf(SP_PARM);
- T((T_CALLED("def_prog_mode()")));
+ T((T_CALLED("def_prog_mode(%p)"), (void *) SP_PARM));
- if (cur_term != 0) {
+ if (termp != 0) {
+#ifdef USE_TERM_DRIVER
+ rc = CallDriver_2(SP_PARM, mode, TRUE, TRUE);
+#else
/*
* Turn off the XTABS bit in the tty structure if it was on.
*/
- if (_nc_get_tty_mode(&cur_term->Nttyb) == OK) {
+ if (_nc_get_tty_mode(&termp->Nttyb) == OK) {
#ifdef TERMIOS
- cur_term->Nttyb.c_oflag &= ~OFLAGS_TABS;
+ termp->Nttyb.c_oflag &= (unsigned) (~OFLAGS_TABS);
#else
- cur_term->Nttyb.sg_flags &= ~XTABS;
+ termp->Nttyb.sg_flags &= (unsigned) (~XTABS);
#endif
rc = OK;
}
+#endif
}
returnCode(rc);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-reset_prog_mode(void)
+def_prog_mode(void)
{
- T((T_CALLED("reset_prog_mode()")));
+ return NCURSES_SP_NAME(def_prog_mode) (CURRENT_SCREEN);
+}
+#endif
- if (cur_term != 0) {
- if (_nc_set_tty_mode(&cur_term->Nttyb) == OK) {
- if (SP) {
- if (SP->_keypad_on)
- _nc_keypad(SP, TRUE);
- NC_BUFFERED(TRUE);
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_DCL0)
+{
+ int rc = ERR;
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ T((T_CALLED("reset_prog_mode(%p)"), (void *) SP_PARM));
+
+ if (termp != 0) {
+#ifdef USE_TERM_DRIVER
+ rc = CallDriver_2(SP_PARM, mode, TRUE, FALSE);
+#else
+ if (_nc_set_tty_mode(&termp->Nttyb) == OK) {
+ if (SP_PARM) {
+ if (SP_PARM->_keypad_on)
+ _nc_keypad(SP_PARM, TRUE);
+ NC_BUFFERED(SP_PARM, TRUE);
}
- returnCode(OK);
+ rc = OK;
}
+#endif
}
- returnCode(ERR);
+ returnCode(rc);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-reset_shell_mode(void)
+reset_prog_mode(void)
{
- T((T_CALLED("reset_shell_mode()")));
+ return NCURSES_SP_NAME(reset_prog_mode) (CURRENT_SCREEN);
+}
+#endif
- if (cur_term != 0) {
- if (SP) {
- _nc_keypad(SP, FALSE);
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(reset_shell_mode) (NCURSES_SP_DCL0)
+{
+ int rc = ERR;
+ TERMINAL *termp = TerminalOf(SP_PARM);
+
+ T((T_CALLED("reset_shell_mode(%p)"), (void *) SP_PARM));
+
+ if (termp != 0) {
+#ifdef USE_TERM_DRIVER
+ rc = CallDriver_2(SP_PARM, mode, FALSE, FALSE);
+#else
+ if (SP_PARM) {
+ _nc_keypad(SP_PARM, FALSE);
_nc_flush();
- NC_BUFFERED(FALSE);
+ NC_BUFFERED(SP_PARM, FALSE);
}
- returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
+ rc = _nc_set_tty_mode(&termp->Ottyb);
+#endif
}
- returnCode(ERR);
+ returnCode(rc);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+reset_shell_mode(void)
+{
+ return NCURSES_SP_NAME(reset_shell_mode) (CURRENT_SCREEN);
+}
+#endif
+
static TTY *
-saved_tty(void)
+saved_tty(NCURSES_SP_DCL0)
{
TTY *result = 0;
- if (SP != 0) {
- result = &(SP->_saved_tty);
+ if (SP_PARM != 0) {
+ result = (TTY *) & (SP_PARM->_saved_tty);
} else {
if (_nc_prescreen.saved_tty == 0) {
_nc_prescreen.saved_tty = typeCalloc(TTY, 1);
@@ -204,17 +291,31 @@ saved_tty(void)
*/
NCURSES_EXPORT(int)
+NCURSES_SP_NAME(savetty) (NCURSES_SP_DCL0)
+{
+ T((T_CALLED("savetty(%p)"), (void *) SP_PARM));
+ returnCode(NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx saved_tty(NCURSES_SP_ARG)));
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
savetty(void)
{
- T((T_CALLED("savetty()")));
+ return NCURSES_SP_NAME(savetty) (CURRENT_SCREEN);
+}
+#endif
- returnCode(_nc_get_tty_mode(saved_tty()));
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(resetty) (NCURSES_SP_DCL0)
+{
+ T((T_CALLED("resetty(%p)"), (void *) SP_PARM));
+ returnCode(NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx saved_tty(NCURSES_SP_ARG)));
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
resetty(void)
{
- T((T_CALLED("resetty()")));
-
- returnCode(_nc_set_tty_mode(saved_tty()));
+ return NCURSES_SP_NAME(resetty) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/tinfo/make_hash.c b/ncurses/tinfo/make_hash.c
new file mode 100644
index 000000000000..15c281def50c
--- /dev/null
+++ b/ncurses/tinfo/make_hash.c
@@ -0,0 +1,294 @@
+/****************************************************************************
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 *
+ ****************************************************************************/
+
+/*
+ * make_hash.c --- build-time program for constructing comp_captab.c
+ *
+ */
+
+#include <build.priv.h>
+
+#include <tic.h>
+#include <hashsize.h>
+
+#include <ctype.h>
+
+MODULE_ID("$Id: make_hash.c,v 1.3 2010/05/22 18:02:50 tom Exp $")
+
+/*
+ * _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[].
+ *
+ */
+
+#undef MODULE_ID
+#define MODULE_ID(id) /*nothing */
+#include <tinfo/doalloc.c>
+
+/*
+ * 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;
+
+ while (*string) {
+ sum += (long) (*string + (*(string + 1) << 8));
+ string++;
+ }
+
+ return (int) (sum % HASHTABSIZE);
+}
+
+static void
+_nc_make_hash_table(struct name_table_entry *table,
+ HashValue * hash_table)
+{
+ short i;
+ int hashvalue;
+ int collisions = 0;
+
+ for (i = 0; i < HASHTABSIZE; i++) {
+ hash_table[i] = -1;
+ }
+ for (i = 0; i < CAPTABSIZE; i++) {
+ hashvalue = hash_function(table[i].nte_name);
+
+ if (hash_table[hashvalue] >= 0)
+ collisions++;
+
+ if (hash_table[hashvalue] != 0)
+ table[i].nte_link = hash_table[hashvalue];
+ hash_table[hashvalue] = i;
+ }
+
+ printf("/* %d collisions out of %d entries */\n", collisions, CAPTABSIZE);
+}
+
+/*
+ * 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 */
+ assert(s > buffer + 1);
+ s[-1] = '\0';
+ buffer++;
+ }
+ 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);
+ HashValue *hash_table = typeCalloc(HashValue, HASHTABSIZE);
+ const char *root_name = "";
+ int column = 0;
+ int bigstring = 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 <= 3
+ || (column = atoi(argv[1])) <= 0
+ || (column >= MAX_COLUMNS)
+ || *(root_name = argv[2]) == 0
+ || (bigstring = atoi(argv[3])) < 0
+ || name_table == 0
+ || hash_table == 0) {
+ fprintf(stderr, "usage: make_hash column root_name bigstring\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
+ */
+ if (bigstring) {
+ int len = 0;
+ int nxt;
+
+ printf("static const char %s_names_text[] = \\\n", root_name);
+ for (n = 0; n < CAPTABSIZE; n++) {
+ nxt = (int) strlen(name_table[n].nte_name) + 5;
+ if (nxt + len > 72) {
+ printf("\\\n");
+ len = 0;
+ }
+ printf("\"%s\\0\" ", name_table[n].nte_name);
+ len += nxt;
+ }
+ printf(";\n\n");
+
+ len = 0;
+ printf("static name_table_data const %s_names_data[] =\n",
+ root_name);
+ printf("{\n");
+ for (n = 0; n < CAPTABSIZE; n++) {
+ printf("\t{ %15d,\t%10s,\t%3d, %3d }%c\n",
+ len,
+ typenames[name_table[n].nte_type],
+ name_table[n].nte_index,
+ name_table[n].nte_link,
+ n < CAPTABSIZE - 1 ? ',' : ' ');
+ len += (int) strlen(name_table[n].nte_name) + 1;
+ }
+ printf("};\n\n");
+ printf("static struct name_table_entry *_nc_%s_table = 0;\n\n", root_name);
+ } else {
+
+ printf("static struct name_table_entry %s _nc_%s_table[] =\n",
+ bigstring ? "" : "const",
+ 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("static const HashValue _nc_%s_hash_table[%d] =\n",
+ root_name,
+ HASHTABSIZE + 1);
+ printf("{\n");
+ for (n = 0; n < HASHTABSIZE; n++) {
+ printf("\t%3d,\n", hash_table[n]);
+ }
+ printf("\t0\t/* base-of-table */\n");
+ 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");
+
+ free(hash_table);
+ return EXIT_SUCCESS;
+}
diff --git a/ncurses/tinfo/make_keys.c b/ncurses/tinfo/make_keys.c
index c084f87fb943..a7854e3fe604 100644
--- a/ncurses/tinfo/make_keys.c
+++ b/ncurses/tinfo/make_keys.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -37,18 +37,18 @@
*/
#define USE_TERMLIB 1
-#include <curses.priv.h>
+#include <build.priv.h>
-MODULE_ID("$Id: make_keys.c,v 1.14 2008/08/03 21:57:22 tom Exp $")
+MODULE_ID("$Id: make_keys.c,v 1.19 2010/06/05 22:08:00 tom Exp $")
#include <names.c>
-#define UNKNOWN (SIZEOF(strnames) + SIZEOF(strfnames))
+#define UNKNOWN (unsigned) (SIZEOF(strnames) + SIZEOF(strfnames))
-static size_t
+static unsigned
lookup(const char *name)
{
- size_t n;
+ unsigned n;
bool found = FALSE;
for (n = 0; strnames[n] != 0; n++) {
if (!strcmp(name, strnames[n])) {
@@ -73,7 +73,7 @@ make_keys(FILE *ifp, FILE *ofp)
char buffer[BUFSIZ];
char from[256];
char to[256];
- int maxlen = 16;
+ unsigned maxlen = 16;
int scanned;
while (fgets(buffer, sizeof(buffer), ifp) != 0) {
@@ -85,14 +85,14 @@ make_keys(FILE *ifp, FILE *ofp)
scanned = sscanf(buffer, "%255s %255s", to, from);
if (scanned == 2) {
- int code = lookup(from);
+ unsigned code = lookup(from);
if (code == UNKNOWN)
continue;
- if ((int) strlen(from) > maxlen)
- maxlen = strlen(from);
- fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n",
+ if (strlen(from) > maxlen)
+ maxlen = (unsigned) strlen(from);
+ fprintf(ofp, "\t{ %4u, %-*.*s },\t/* %s */\n",
code,
- maxlen, maxlen,
+ (int) maxlen, (int) maxlen,
to,
from);
}
diff --git a/ncurses/tinfo/name_match.c b/ncurses/tinfo/name_match.c
index d576901fa2e9..a9ac64278888 100644
--- a/ncurses/tinfo/name_match.c
+++ b/ncurses/tinfo/name_match.c
@@ -31,10 +31,9 @@
****************************************************************************/
#include <curses.priv.h>
-#include <term.h>
#include <tic.h>
-MODULE_ID("$Id: name_match.c,v 1.17 2008/08/03 19:49:33 tom Exp $")
+MODULE_ID("$Id: name_match.c,v 1.18 2008/11/16 00:19:59 juergen Exp $")
/*
* _nc_first_name(char *names)
diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
index cf7a5f409d7c..ddbc25204fec 100644
--- a/ncurses/tinfo/parse_entry.c
+++ b/ncurses/tinfo/parse_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -46,9 +46,8 @@
#include <ctype.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: parse_entry.c,v 1.69 2008/08/16 21:52:03 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.75 2010/05/01 19:35:09 tom Exp $")
#ifdef LINT
static short const parametrized[] =
@@ -84,13 +83,13 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
case NUMBER:
first = tp->ext_Booleans;
last = tp->ext_Numbers + first;
- offset = tp->ext_Booleans + tp->ext_Numbers;
+ offset = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
tindex = tp->num_Numbers;
break;
case STRING:
- first = tp->ext_Booleans + tp->ext_Numbers;
+ first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
last = tp->ext_Strings + first;
- offset = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings;
+ offset = (unsigned) (tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings);
tindex = tp->num_Strings;
break;
case CANCEL:
@@ -137,27 +136,31 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
break;
}
}
+
+#define for_each_value(max) \
+ for (last = (unsigned) (max - 1); last > tindex; last--)
+
if (!found) {
switch (token_type) {
case BOOLEAN:
- tp->ext_Booleans += 1;
- tp->num_Booleans += 1;
+ tp->ext_Booleans++;
+ tp->num_Booleans++;
tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
- for (last = tp->num_Booleans - 1; last > tindex; last--)
+ for_each_value(tp->num_Booleans)
tp->Booleans[last] = tp->Booleans[last - 1];
break;
case NUMBER:
- tp->ext_Numbers += 1;
- tp->num_Numbers += 1;
+ tp->ext_Numbers++;
+ tp->num_Numbers++;
tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
- for (last = tp->num_Numbers - 1; last > tindex; last--)
+ for_each_value(tp->num_Numbers)
tp->Numbers[last] = tp->Numbers[last - 1];
break;
case STRING:
- tp->ext_Strings += 1;
- tp->num_Strings += 1;
+ tp->ext_Strings++;
+ tp->num_Strings++;
tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
- for (last = tp->num_Strings - 1; last > tindex; last--)
+ for_each_value(tp->num_Strings)
tp->Strings[last] = tp->Strings[last - 1];
break;
}
@@ -170,7 +173,7 @@ _nc_extend_names(ENTRY * entryp, char *name, int token_type)
temp.nte_name = tp->ext_Names[offset];
temp.nte_type = token_type;
- temp.nte_index = tindex;
+ temp.nte_index = (short) tindex;
temp.nte_link = -1;
return &temp;
@@ -379,16 +382,14 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
&& !strcmp("ma", _nc_curr_token.tk_name)) {
/* tell max_attributes from arrow_key_map */
entry_ptr = _nc_find_type_entry("ma", NUMBER,
- _nc_get_table(_nc_syntax
- != 0));
+ _nc_syntax != 0);
assert(entry_ptr != 0);
} else if (token_type == STRING
&& !strcmp("MT", _nc_curr_token.tk_name)) {
/* map terminfo's string MT to MT */
entry_ptr = _nc_find_type_entry("MT", STRING,
- _nc_get_table(_nc_syntax
- != 0));
+ _nc_syntax != 0);
assert(entry_ptr != 0);
} else if (token_type == BOOLEAN
@@ -444,7 +445,7 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
case NUMBER:
entryp->tterm.Numbers[entry_ptr->nte_index] =
- _nc_curr_token.tk_valnumber;
+ (short) _nc_curr_token.tk_valnumber;
break;
case STRING:
@@ -510,9 +511,9 @@ NCURSES_EXPORT(int)
_nc_capcmp(const char *s, const char *t)
/* compare two string capabilities, stripping out padding */
{
- if (!s && !t)
+ if (!VALID_STRING(s) && !VALID_STRING(t))
return (0);
- else if (!s || !t)
+ else if (!VALID_STRING(s) || !VALID_STRING(t))
return (1);
for (;;) {
@@ -667,7 +668,7 @@ postprocess_termcap(TERMTYPE *tp, bool has_base)
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 */
+ /* vi doesn't use "do", but it does seem to use nl (or '\n') instead */
if (WANTED(cursor_down)) {
if (PRESENT(linefeed_if_not_lf))
cursor_down = linefeed_if_not_lf;
@@ -772,7 +773,7 @@ postprocess_termcap(TERMTYPE *tp, bool has_base)
* isn't from mytinfo...
*/
if (PRESENT(other_non_function_keys)) {
- char *base = other_non_function_keys;
+ char *base;
char *bp, *cp, *dp;
struct name_table_entry const *from_ptr;
struct name_table_entry const *to_ptr;
@@ -788,7 +789,7 @@ postprocess_termcap(TERMTYPE *tp, bool has_base)
for (base = other_non_function_keys;
(cp = strchr(base, ',')) != 0;
base = cp + 1) {
- size_t len = cp - base;
+ size_t len = (unsigned) (cp - base);
for (ap = ko_xlate; ap->from; ap++) {
if (len == strlen(ap->from)
@@ -840,7 +841,7 @@ postprocess_termcap(TERMTYPE *tp, bool has_base)
} else
*dp++ = *bp;
}
- *dp++ = '\0';
+ *dp = '\0';
tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
}
diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c
index b4ea61ca194e..e38b9cbe49d8 100644
--- a/ncurses/tinfo/read_entry.c
+++ b/ncurses/tinfo/read_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,9 +40,8 @@
#include <hashed_db.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: read_entry.c,v 1.102 2008/08/03 19:33:04 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.108 2011/02/26 15:36:06 tom Exp $")
#define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
@@ -57,7 +56,7 @@ convert_shorts(char *buf, short *Numbers, int count)
else if (IS_NEG2(buf + 2 * i))
Numbers[i] = CANCELLED_NUMERIC;
else
- Numbers[i] = LOW_MSB(buf + 2 * i);
+ Numbers[i] = (short) LOW_MSB(buf + 2 * i);
TR(TRACE_DATABASE, ("get Numbers[%d]=%d", i, Numbers[i]));
}
}
@@ -99,9 +98,9 @@ fake_read(char *src, int *offset, int limit, char *dst, unsigned want)
if (have > 0) {
if ((int) want > have)
- want = have;
+ want = (unsigned) have;
memcpy(dst, src + *offset, want);
- *offset += want;
+ *offset += (int) want;
} else {
want = 0;
}
@@ -155,7 +154,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
return (TGETENT_NO);
}
- want = str_size + name_size + 1;
+ want = (unsigned) (str_size + name_size + 1);
if (str_size) {
/* try to allocate space for the string table */
if (str_count * 2 >= (int) sizeof(buf)
@@ -173,14 +172,14 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
want = min(MAX_NAME_SIZE, (unsigned) name_size);
ptr->str_table = string_table;
ptr->term_names = string_table;
- if ((have = Read(ptr->term_names, want)) != want) {
+ if ((have = (unsigned) Read(ptr->term_names, want)) != want) {
memset(ptr->term_names + have, 0, want - have);
}
ptr->term_names[want] = '\0';
string_table += (want + 1);
if (have > MAX_NAME_SIZE)
- offset = (have - MAX_NAME_SIZE);
+ offset = (int) (have - MAX_NAME_SIZE);
/* grab the booleans */
if ((ptr->Booleans = TYPE_CALLOC(NCURSES_SBOOL,
@@ -234,7 +233,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
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);
+ unsigned need = (unsigned) (ext_bool_count + ext_num_count + ext_str_count);
int base = 0;
if (need >= sizeof(buf)
@@ -247,9 +246,9 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
|| ext_str_limit < 0)
return (TGETENT_NO);
- ptr->num_Booleans = BOOLCOUNT + ext_bool_count;
- ptr->num_Numbers = NUMCOUNT + ext_num_count;
- ptr->num_Strings = STRCOUNT + ext_str_count;
+ ptr->num_Booleans = UShort(BOOLCOUNT + ext_bool_count);
+ ptr->num_Numbers = UShort(NUMCOUNT + ext_num_count);
+ ptr->num_Strings = UShort(STRCOUNT + ext_str_count);
ptr->Booleans = typeRealloc(NCURSES_SBOOL, ptr->num_Booleans, ptr->Booleans);
ptr->Numbers = typeRealloc(short, ptr->num_Numbers, ptr->Numbers);
@@ -261,7 +260,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
TR(TRACE_DATABASE, ("READ %d extended-booleans @%d",
ext_bool_count, offset));
- if ((ptr->ext_Booleans = ext_bool_count) != 0) {
+ if ((ptr->ext_Booleans = UShort(ext_bool_count)) != 0) {
if (Read(ptr->Booleans + BOOLCOUNT, (unsigned)
ext_bool_count) != ext_bool_count)
return (TGETENT_NO);
@@ -270,7 +269,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
TR(TRACE_DATABASE, ("READ %d extended-numbers @%d",
ext_num_count, offset));
- if ((ptr->ext_Numbers = ext_num_count) != 0) {
+ if ((ptr->ext_Numbers = UShort(ext_num_count)) != 0) {
if (!read_shorts(buf, ext_num_count))
return (TGETENT_NO);
TR(TRACE_DATABASE, ("Before converting extended-numbers"));
@@ -279,21 +278,22 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
TR(TRACE_DATABASE, ("READ extended-offsets @%d", offset));
if ((ext_str_count || need)
- && !read_shorts(buf, ext_str_count + need))
+ && !read_shorts(buf, ext_str_count + (int) need))
return (TGETENT_NO);
TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%d",
ext_str_limit, offset));
if (ext_str_limit) {
- if ((ptr->ext_str_table = typeMalloc(char, ext_str_limit)) == 0)
- return (TGETENT_NO);
+ ptr->ext_str_table = typeMalloc(char, (size_t) ext_str_limit);
+ if (ptr->ext_str_table == 0)
+ return (TGETENT_NO);
if (Read(ptr->ext_str_table, (unsigned) ext_str_limit) != ext_str_limit)
return (TGETENT_NO);
TR(TRACE_DATABASE, ("first extended-string is %s", _nc_visbuf(ptr->ext_str_table)));
}
- if ((ptr->ext_Strings = ext_str_count) != 0) {
+ if ((ptr->ext_Strings = UShort(ext_str_count)) != 0) {
TR(TRACE_DATABASE,
("Before computing extended-string capabilities str_count=%d, ext_str_count=%d",
str_count, ext_str_count));
@@ -305,7 +305,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
_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);
+ base += (int) (strlen(ptr->Strings[i + STRCOUNT]) + 1);
TR(TRACE_DATABASE, ("... to [%d] %s",
i + STRCOUNT,
_nc_visbuf(ptr->Strings[i + STRCOUNT])));
@@ -314,7 +314,7 @@ _nc_read_termtype(TERMTYPE *ptr, char *buffer, int limit)
if (need) {
if (ext_str_count >= (MAX_ENTRY_SIZE * 2))
- return (TGETENT_NO);
+ return (TGETENT_NO);
if ((ptr->ext_Names = TYPE_CALLOC(char *, need)) == 0)
return (TGETENT_NO);
TR(TRACE_DATABASE,
@@ -364,16 +364,18 @@ 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;
+ FILE *fp = 0;
+ int code;
int limit;
char buffer[MAX_ENTRY_SIZE + 1];
if (_nc_access(filename, R_OK) < 0
- || (fd = open(filename, O_RDONLY | O_BINARY)) < 0) {
+ || (fp = fopen(filename, "rb")) == 0) {
T(("cannot open terminfo %s (errno=%d)", filename, errno));
code = TGETENT_NO;
} else {
- if ((limit = read(fd, buffer, sizeof(buffer))) > 0) {
+ if ((limit = (int) fread(buffer, sizeof(char), sizeof(buffer), fp))
+ > 0) {
T(("read terminfo %s", filename));
if ((code = _nc_read_termtype(ptr, buffer, limit)) == TGETENT_NO) {
@@ -382,7 +384,7 @@ _nc_read_file_entry(const char *const filename, TERMTYPE *ptr)
} else {
code = TGETENT_NO;
}
- close(fd);
+ fclose(fp);
}
return (code);
@@ -404,26 +406,22 @@ _nc_read_tic_entry(char *filename,
/*
* If we are looking in a directory, assume the entry is a file under that,
* according to the normal rules.
- *
- * FIXME - add caseless-filename fixup.
*/
- if (_nc_is_dir_path(path)) {
- unsigned need = 4 + strlen(path) + strlen(name);
+ unsigned need = (unsigned) (LEAF_LEN + 3 + strlen(path) + strlen(name));
+ if (need <= limit)
+ (void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
- if (need <= limit) {
- (void) sprintf(filename, "%s/" LEAF_FMT "/%s", path, *name, name);
- result = _nc_read_file_entry(filename, tp);
- }
- }
+ if (_nc_is_dir_path(path))
+ result = _nc_read_file_entry(filename, tp);
#if USE_HASHED_DB
else {
static const char suffix[] = DBM_SUFFIX;
DB *capdbp;
unsigned lens = sizeof(suffix) - 1;
unsigned size = strlen(path);
- unsigned need = lens + size;
+ unsigned test = lens + size;
- if (need <= limit) {
+ if (test < limit) {
if (size >= lens
&& !strcmp(path + size - lens, suffix))
(void) strcpy(filename, path);
@@ -515,6 +513,7 @@ _nc_read_entry(const char *const name, char *const filename, TERMTYPE *const tp)
{
int code = TGETENT_NO;
+ sprintf(filename, "%.*s", PATH_MAX - 1, name);
if (strlen(name) == 0
|| strcmp(name, ".") == 0
|| strcmp(name, "..") == 0
diff --git a/ncurses/tinfo/read_termcap.c b/ncurses/tinfo/read_termcap.c
index d94d1a42466d..b39a5bebaa47 100644
--- a/ncurses/tinfo/read_termcap.c
+++ b/ncurses/tinfo/read_termcap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -56,9 +56,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: read_termcap.c,v 1.71 2006/07/29 12:06:51 tom Exp $")
+MODULE_ID("$Id: read_termcap.c,v 1.74 2010/01/23 17:57:43 tom Exp $")
#if !PURE_TERMINFO
@@ -79,6 +78,15 @@ get_termpath(void)
return result;
}
+/*
+ * Note:
+ * getcap(), cgetent(), etc., are BSD functions. A copy of those was added to
+ * this file in November 1995, derived from the BSD4.4 Lite sources.
+ *
+ * The initial adaptation uses 518 lines from that source.
+ * The current source (in 2009) uses 183 lines of BSD4.4 Lite (441 ignoring
+ * whitespace).
+ */
#if USE_GETCAP
#if HAVE_BSD_CGETENT
@@ -107,11 +115,7 @@ static int _nc_nfcmp(const char *, char *);
* 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
+ * 3. 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.
*
diff --git a/ncurses/tinfo/setbuf.c b/ncurses/tinfo/setbuf.c
index ba910e8983a4..a2e2660c8664 100644
--- a/ncurses/tinfo/setbuf.c
+++ b/ncurses/tinfo/setbuf.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2008 *
****************************************************************************/
/*
@@ -40,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $")
+MODULE_ID("$Id: setbuf.c,v 1.16 2010/08/28 21:08:31 tom Exp $")
/*
* If the output file descriptor is connected to a tty (the typical case) it
@@ -98,11 +100,20 @@ MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $")
* buffer. So we disable this by default (there may yet be a workaround).
*/
NCURSES_EXPORT(void)
-_nc_set_buffer(FILE *ofp, bool buffered)
+NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_DCLx FILE *ofp, bool buffered)
{
+ int Cols;
+ int Lines;
+
+ if (0 == SP_PARM)
+ return;
+
+ Cols = *(ptrCols(SP_PARM));
+ Lines = *(ptrLines(SP_PARM));
+
/* optional optimization hack -- do before any output to ofp */
#if HAVE_SETVBUF || HAVE_SETBUFFER
- if (SP->_buffered != buffered) {
+ if (SP_PARM->_buffered != buffered) {
unsigned buf_len;
char *buf_ptr;
@@ -114,11 +125,11 @@ _nc_set_buffer(FILE *ofp, bool buffered)
setmode(ofp, O_BINARY);
#endif
if (buffered != 0) {
- buf_len = min(LINES * (COLS + 6), 2800);
- if ((buf_ptr = SP->_setbuf) == 0) {
+ buf_len = (unsigned) min(Lines * (Cols + 6), 2800);
+ if ((buf_ptr = SP_PARM->_setbuf) == 0) {
if ((buf_ptr = typeMalloc(char, buf_len)) == NULL)
return;
- SP->_setbuf = buf_ptr;
+ SP_PARM->_setbuf = buf_ptr;
/* Don't try to free this! */
}
#if !USE_SETBUF_0
@@ -144,7 +155,15 @@ _nc_set_buffer(FILE *ofp, bool buffered)
(void) setbuffer(ofp, buf_ptr, (int) buf_len);
#endif
- SP->_buffered = buffered;
+ SP_PARM->_buffered = buffered;
}
#endif /* HAVE_SETVBUF || HAVE_SETBUFFER */
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_set_buffer(FILE *ofp, bool buffered)
+{
+ NCURSES_SP_NAME(_nc_set_buffer) (CURRENT_SCREEN, ofp, buffered);
+}
+#endif
diff --git a/ncurses/tinfo/tinfo_driver.c b/ncurses/tinfo/tinfo_driver.c
new file mode 100644
index 000000000000..5b3b55a4519e
--- /dev/null
+++ b/ncurses/tinfo/tinfo_driver.c
@@ -0,0 +1,1337 @@
+/****************************************************************************
+ * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 *
+ * *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+#define CUR ((TERMINAL*)TCB)->type.
+#include <tic.h>
+
+#if HAVE_NANOSLEEP
+#include <time.h>
+#if HAVE_SYS_TIME_H
+#include <sys/time.h> /* needed for MacOS X DP3 */
+#endif
+#endif
+
+#if HAVE_SIZECHANGE
+# if !defined(sun) || !TERMIOS
+# if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+# endif
+# endif
+#endif
+
+MODULE_ID("$Id: tinfo_driver.c,v 1.13 2010/12/20 01:47:09 tom Exp $")
+
+/*
+ * 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
+
+/*
+ * 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.
+ */
+#if USE_REENTRANT
+NCURSES_EXPORT(int)
+NCURSES_PUBLIC_VAR(COLOR_PAIRS) (void)
+{
+ return CURRENT_SCREEN ? CURRENT_SCREEN->_pair_count : -1;
+}
+NCURSES_EXPORT(int)
+NCURSES_PUBLIC_VAR(COLORS) (void)
+{
+ return CURRENT_SCREEN ? CURRENT_SCREEN->_color_count : -1;
+}
+#else
+NCURSES_EXPORT_VAR(int) COLOR_PAIRS = 0;
+NCURSES_EXPORT_VAR(int) COLORS = 0;
+#endif
+
+#define TCBMAGIC NCDRV_MAGIC(NCDRV_TINFO)
+#define AssertTCB() assert(TCB!=0 && TCB->magic==TCBMAGIC)
+#define SetSP() assert(TCB->csp!=0); sp = TCB->csp
+
+/*
+ * This routine needs to do all the work to make curscr look
+ * like newscr.
+ */
+static int
+drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ AssertTCB();
+ return TINFO_DOUPDATE(TCB->csp);
+}
+
+#define ret_error(code, fmt, arg) if (errret) {\
+ *errret = code;\
+ return(FALSE); \
+ } else {\
+ fprintf(stderr, fmt, arg);\
+ exit(EXIT_FAILURE);\
+ }
+
+#define ret_error0(code, msg) if (errret) {\
+ *errret = code;\
+ return(FALSE);\
+ } else {\
+ fprintf(stderr, msg);\
+ exit(EXIT_FAILURE);\
+ }
+
+static bool
+drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB, const char *tname, int *errret)
+{
+ bool result = FALSE;
+ int status;
+ TERMINAL *termp;
+ SCREEN *sp;
+
+ assert(TCB != 0 && tname != 0);
+ termp = (TERMINAL *) TCB;
+ sp = TCB->csp;
+ TCB->magic = TCBMAGIC;
+
+#if (USE_DATABASE || USE_TERMCAP)
+ status = _nc_setup_tinfo(tname, &termp->type);
+#else
+ status = TGETENT_NO;
+#endif
+
+ /* try fallback list if entry on disk */
+ if (status != TGETENT_YES) {
+ const TERMTYPE *fallback = _nc_fallback(tname);
+
+ if (fallback) {
+ termp->type = *fallback;
+ status = TGETENT_YES;
+ }
+ }
+
+ if (status != TGETENT_YES) {
+ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx termp);
+ if (status == TGETENT_ERR) {
+ ret_error0(status, "terminals database is inaccessible\n");
+ } else if (status == TGETENT_NO) {
+ ret_error(status, "'%s': unknown terminal type.\n", tname);
+ }
+ }
+ result = TRUE;
+#if !USE_REENTRANT
+ strncpy(ttytype, termp->type.term_names, NAMESIZE - 1);
+ ttytype[NAMESIZE - 1] = '\0';
+#endif
+
+ if (command_character)
+ _nc_tinfo_cmdch(termp, *command_character);
+
+ if (generic_type) {
+ ret_error(TGETENT_NO, "'%s': I need something more specific.\n", tname);
+ }
+ if (hard_copy) {
+ ret_error(TGETENT_YES, "'%s': I can't handle hardcopy terminals.\n", tname);
+ }
+
+ return result;
+}
+
+static int
+drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB, bool beepFlag)
+{
+ SCREEN *sp;
+ int res = ERR;
+
+ AssertTCB();
+ SetSP();
+
+ /* FIXME: should make sure that we are not in altchar mode */
+ if (beepFlag) {
+ if (bell) {
+ res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "bell", bell);
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ } else if (flash_screen) {
+ res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "flash_screen",
+ flash_screen);
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ }
+ } else {
+ if (flash_screen) {
+ res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "flash_screen",
+ flash_screen);
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ } else if (bell) {
+ res = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "bell", bell);
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ }
+ }
+ return res;
+}
+
+/*
+ * 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 int
+drv_print(TERMINAL_CONTROL_BLOCK * TCB, char *data, int len)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+#if NCURSES_EXT_FUNCS
+ return NCURSES_SP_NAME(mcprint) (TCB->csp, data, len);
+#else
+ return ERR;
+#endif
+}
+
+static int
+drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB, int fg, int bg)
+{
+ SCREEN *sp;
+ int code = ERR;
+
+ AssertTCB();
+ SetSP();
+
+ if (sp != 0 && orig_pair && orig_colors && (initialize_pair != 0)) {
+#if NCURSES_EXT_FUNCS
+ sp->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
+ sp->_has_sgr_39_49 = (NCURSES_SP_NAME(tigetflag) (NCURSES_SP_ARGx
+ "AX")
+ == TRUE);
+ sp->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
+ sp->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
+ if (sp->_color_pairs != 0) {
+ bool save = sp->_default_color;
+ sp->_default_color = TRUE;
+ NCURSES_SP_NAME(init_pair) (NCURSES_SP_ARGx
+ 0,
+ (short)fg,
+ (short)bg);
+ sp->_default_color = save;
+ }
+#endif
+ code = OK;
+ }
+ return (code);
+}
+
+static void
+drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
+ bool fore,
+ int color,
+ NCURSES_SP_OUTC outc)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ if (fore) {
+ if (set_a_foreground) {
+ TPUTS_TRACE("set_a_foreground");
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_a_foreground, color), 1, outc);
+ } else {
+ TPUTS_TRACE("set_foreground");
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_foreground,
+ toggled_colors(color)), 1, outc);
+ }
+ } else {
+ if (set_a_background) {
+ TPUTS_TRACE("set_a_background");
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_a_background, color), 1, outc);
+ } else {
+ TPUTS_TRACE("set_background");
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_background,
+ toggled_colors(color)), 1, outc);
+ }
+ }
+}
+
+static bool
+drv_rescol(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ bool result = FALSE;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ if (orig_pair != 0) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "orig_pair", orig_pair);
+ result = TRUE;
+ }
+ return result;
+}
+
+static bool
+drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ int result = FALSE;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ if (orig_colors != 0) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "orig_colors", orig_colors);
+ result = TRUE;
+ }
+ return result;
+}
+
+static int
+drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *linep, int *colp)
+{
+ SCREEN *sp;
+ bool useEnv = TRUE;
+
+ AssertTCB();
+ sp = TCB->csp; /* can be null here */
+
+ if (sp) {
+ useEnv = sp->_use_env;
+ } else
+ useEnv = _nc_prescreen.use_env;
+
+ /* figure out the size of the screen */
+ T(("screen size: terminfo lines = %d columns = %d", lines, columns));
+
+ *linep = (int) lines;
+ *colp = (int) columns;
+
+ if (useEnv) {
+ int value;
+
+#ifdef __EMX__
+ {
+ 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
+ /* try asking the OS */
+ {
+ TERMINAL *termp = (TERMINAL *) TCB;
+ if (isatty(termp->Filedes)) {
+ STRUCT_WINSIZE size;
+
+ errno = 0;
+ do {
+ if (ioctl(termp->Filedes, IOCTL_WINSIZE, &size) >= 0) {
+ *linep = ((sp != 0 && sp->_filtered)
+ ? 1
+ : WINSIZE_ROWS(size));
+ *colp = WINSIZE_COLS(size);
+ T(("SYS screen size: environment LINES = %d COLUMNS = %d",
+ *linep, *colp));
+ break;
+ }
+ } while
+ (errno == EINTR);
+ }
+ }
+#endif /* HAVE_SIZECHANGE */
+
+ /*
+ * Finally, look for environment variables.
+ *
+ * Solaris lets users override either dimension with an environment
+ * variable.
+ */
+ if ((value = _nc_getenv_num("LINES")) > 0) {
+ *linep = value;
+ T(("screen size: environment LINES = %d", *linep));
+ }
+ if ((value = _nc_getenv_num("COLUMNS")) > 0) {
+ *colp = value;
+ T(("screen size: environment COLUMNS = %d", *colp));
+ }
+
+ /* 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));
+ return OK;
+}
+
+static int
+drv_getsize(TERMINAL_CONTROL_BLOCK * TCB, int *l, int *c)
+{
+ AssertTCB();
+ assert(l != 0 && c != 0);
+ *l = lines;
+ *c = columns;
+ return OK;
+}
+
+static int
+drv_setsize(TERMINAL_CONTROL_BLOCK * TCB, int l, int c)
+{
+ AssertTCB();
+ lines = (short) l;
+ columns = (short) c;
+ return OK;
+}
+
+static int
+drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf)
+{
+ SCREEN *sp = TCB->csp;
+ TERMINAL *_term = (TERMINAL *) TCB;
+ int result = OK;
+
+ AssertTCB();
+ if (setFlag) {
+ for (;;) {
+ if (SET_TTY(_term->Filedes, buf) != 0) {
+ if (errno == EINTR)
+ continue;
+ if (errno == ENOTTY) {
+ if (sp)
+ sp->_notty = TRUE;
+ }
+ result = ERR;
+ }
+ break;
+ }
+ } else {
+ for (;;) {
+ if (GET_TTY(_term->Filedes, buf) != 0) {
+ if (errno == EINTR)
+ continue;
+ result = ERR;
+ }
+ break;
+ }
+ }
+ return result;
+}
+
+static int
+drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag)
+{
+ SCREEN *sp;
+ TERMINAL *_term = (TERMINAL *) TCB;
+ int code = ERR;
+
+ AssertTCB();
+ sp = TCB->csp;
+
+ if (progFlag) /* prog mode */
+ {
+ if (defFlag) {
+ /* def_prog_mode */
+ /*
+ * Turn off the XTABS bit in the tty structure if it was on.
+ */
+ if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
+#ifdef TERMIOS
+ _term->Nttyb.c_oflag &= (unsigned) ~OFLAGS_TABS;
+#else
+ _term->Nttyb.sg_flags &= (unsigned) ~XTABS;
+#endif
+ code = OK;
+ }
+ } else {
+ /* reset_prog_mode */
+ if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) {
+ if (sp) {
+ if (sp->_keypad_on)
+ _nc_keypad(sp, TRUE);
+ NC_BUFFERED(sp, TRUE);
+ }
+ code = OK;
+ }
+ }
+ } else { /* shell mode */
+ if (defFlag) {
+ /* def_shell_mode */
+ /*
+ * If XTABS was on, remove the tab and backtab capabilities.
+ */
+ if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) {
+#ifdef TERMIOS
+ if (_term->Ottyb.c_oflag & OFLAGS_TABS)
+ tab = back_tab = NULL;
+#else
+ if (_term->Ottyb.sg_flags & XTABS)
+ tab = back_tab = NULL;
+#endif
+ code = OK;
+ }
+ } else {
+ /* reset_shell_mode */
+ if (sp) {
+ _nc_keypad(sp, FALSE);
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ NC_BUFFERED(sp, FALSE);
+ }
+ code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
+ }
+ }
+ return (code);
+}
+
+static void
+drv_wrap(SCREEN *sp)
+{
+ if (sp) {
+ sp->_mouse_wrap(sp);
+ NCURSES_SP_NAME(_nc_screen_wrap) (sp);
+ NCURSES_SP_NAME(_nc_mvcur_wrap) (sp); /* wrap up cursor addressing */
+ }
+}
+
+static void
+drv_release(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
+{
+}
+
+# define SGR0_TEST(mode) (mode != 0) && (exit_attribute_mode == 0 || strcmp(mode, exit_attribute_mode))
+
+static void
+drv_screen_init(SCREEN *sp)
+{
+ TERMINAL_CONTROL_BLOCK *TCB = TCBOf(sp);
+
+ AssertTCB();
+
+ /*
+ * Check for mismatched graphic-rendition capabilities. Most SVr4
+ * terminfo trees contain entries that have rmul or rmso equated to
+ * sgr0 (Solaris curses copes with those entries). We do this only
+ * for curses, since many termcap applications assume that
+ * smso/rmso and smul/rmul are paired, and will not function
+ * properly if we remove rmso or rmul. Curses applications
+ * shouldn't be looking at this detail.
+ */
+ sp->_use_rmso = SGR0_TEST(exit_standout_mode);
+ sp->_use_rmul = SGR0_TEST(exit_underline_mode);
+
+ /*
+ * 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)));
+
+ NCURSES_SP_NAME(baudrate) (sp);
+
+ NCURSES_SP_NAME(_nc_mvcur_init) (sp);
+ /* initialize terminal to a sane state */
+ NCURSES_SP_NAME(_nc_screen_init) (sp);
+}
+
+static void
+drv_init(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ SCREEN *sp;
+ TERMINAL *trm;
+
+ AssertTCB();
+
+ trm = (TERMINAL *) TCB;
+ sp = TCB->csp;
+
+ TCB->info.initcolor = initialize_color;
+ TCB->info.canchange = can_change;
+ TCB->info.hascolor = ((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);
+
+ TCB->info.caninit = !(exit_ca_mode && non_rev_rmcup);
+
+ TCB->info.maxpairs = VALID_NUMERIC(max_pairs) ? max_pairs : 0;
+ TCB->info.maxcolors = VALID_NUMERIC(max_colors) ? max_colors : 0;
+ TCB->info.numlabels = VALID_NUMERIC(num_labels) ? num_labels : 0;
+ TCB->info.labelwidth = VALID_NUMERIC(label_width) ? label_width : 0;
+ TCB->info.labelheight = VALID_NUMERIC(label_height) ? label_height : 0;
+ TCB->info.nocolorvideo = VALID_NUMERIC(no_color_video) ? no_color_video
+ : 0;
+ TCB->info.tabsize = VALID_NUMERIC(init_tabs) ? (int) init_tabs : 8;
+
+ TCB->info.defaultPalette = hue_lightness_saturation ? _nc_hls_palette : _nc_cga_palette;
+
+ /*
+ * 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(trm->Filedes)) {
+ TCB->drv->mode(TCB, TRUE, TRUE);
+ }
+}
+
+#define MAX_PALETTE 8
+#define InPalette(n) ((n) >= 0 && (n) < MAX_PALETTE)
+
+static void
+drv_initpair(TERMINAL_CONTROL_BLOCK * TCB, short pair, short f, short b)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ if ((initialize_pair != NULL) && InPalette(f) && InPalette(b)) {
+ const color_t *tp = InfoOf(sp).defaultPalette;
+
+ TR(TRACE_ATTRS,
+ ("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));
+
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "initialize_pair",
+ TPARM_7(initialize_pair,
+ pair,
+ tp[f].red, tp[f].green, tp[f].blue,
+ tp[b].red, tp[b].green, tp[b].blue));
+ }
+}
+
+static int
+default_fg(SCREEN *sp)
+{
+#if NCURSES_EXT_FUNCS
+ return (sp != 0) ? sp->_default_fg : COLOR_WHITE;
+#else
+ return COLOR_WHITE;
+#endif
+}
+
+static int
+default_bg(SCREEN *sp)
+{
+#if NCURSES_EXT_FUNCS
+ return sp != 0 ? sp->_default_bg : COLOR_BLACK;
+#else
+ return COLOR_BLACK;
+#endif
+}
+
+static void
+drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
+ short color, short r, short g, short b)
+{
+ SCREEN *sp = TCB->csp;
+
+ AssertTCB();
+ if (initialize_color != NULL) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "initialize_color",
+ TPARM_4(initialize_color, color, r, g, b));
+ }
+}
+
+static void
+drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
+ short old_pair,
+ short pair,
+ bool reverse,
+ NCURSES_SP_OUTC outc)
+{
+ SCREEN *sp = TCB->csp;
+ NCURSES_COLOR_T fg = COLOR_DEFAULT;
+ NCURSES_COLOR_T bg = COLOR_DEFAULT;
+ NCURSES_COLOR_T old_fg, old_bg;
+
+ AssertTCB();
+ if (sp == 0)
+ return;
+
+ if (pair < 0 || pair >= COLOR_PAIRS) {
+ return;
+ } else if (pair != 0) {
+ if (set_color_pair) {
+ TPUTS_TRACE("set_color_pair");
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(set_color_pair, pair), 1, outc);
+ return;
+ } else if (sp != 0) {
+ NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
+ (short) pair,
+ &fg,
+ &bg);
+ }
+ }
+
+ if (old_pair >= 0
+ && sp != 0
+ && NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
+ old_pair,
+ &old_fg,
+ &old_bg) !=ERR) {
+ if ((isDefaultColor(fg) && !isDefaultColor(old_fg))
+ || (isDefaultColor(bg) && !isDefaultColor(old_bg))) {
+#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
+ && isDefaultColor(old_bg)
+ && !isDefaultColor(old_fg)) {
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[39m", 1, outc);
+ } else if (sp->_has_sgr_39_49
+ && isDefaultColor(old_fg)
+ && !isDefaultColor(old_bg)) {
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[49m", 1, outc);
+ } else
+#endif
+ drv_rescol(TCB);
+ }
+ } else {
+ drv_rescol(TCB);
+ if (old_pair < 0)
+ return;
+ }
+
+#if NCURSES_EXT_FUNCS
+ if (isDefaultColor(fg))
+ fg = (NCURSES_COLOR_T) default_fg(sp);
+ if (isDefaultColor(bg))
+ bg = (NCURSES_COLOR_T) default_bg(sp);
+#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 (!isDefaultColor(fg)) {
+ drv_setcolor(TCB, TRUE, fg, outc);
+ }
+ if (!isDefaultColor(bg)) {
+ drv_setcolor(TCB, FALSE, bg, outc);
+ }
+}
+
+#define xterm_kmous "\033[M"
+static void
+init_xterm_mouse(SCREEN *sp)
+{
+ sp->_mouse_type = M_XTERM;
+ sp->_mouse_xtermcap = NCURSES_SP_NAME(tigetstr) (NCURSES_SP_ARGx "XM");
+ if (!VALID_STRING(sp->_mouse_xtermcap))
+ sp->_mouse_xtermcap = "\033[?1000%?%p1%{1}%=%th%el%;";
+}
+
+static void
+drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ /* we know how to recognize mouse events under "xterm" */
+ if (sp != 0) {
+ if (key_mouse != 0) {
+ if (!strcmp(key_mouse, xterm_kmous)
+ || strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
+ init_xterm_mouse(sp);
+ }
+ } else if (strstr(TerminalOf(sp)->type.term_names, "xterm") != 0) {
+ if (_nc_add_to_try(&(sp->_keytry), xterm_kmous, KEY_MOUSE) == OK)
+ init_xterm_mouse(sp);
+ }
+ }
+}
+
+static int
+drv_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int delay)
+{
+ int rc = 0;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+#if USE_SYSMOUSE
+ if ((sp->_mouse_type == M_SYSMOUSE)
+ && (sp->_sysmouse_head < sp->_sysmouse_tail)) {
+ rc = TW_MOUSE;
+ } else
+#endif
+ {
+ rc = TCBOf(sp)->drv->twait(TCBOf(sp),
+ 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 |= TW_MOUSE;
+ }
+#endif
+ }
+ return rc;
+}
+
+static int
+drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB, int yold, int xold, int ynew, int xnew)
+{
+ SCREEN *sp = TCB->csp;
+ AssertTCB();
+ return TINFO_MVCUR(sp, yold, xold, ynew, xnew);
+}
+
+static void
+drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB, int labnum, char *text)
+{
+ SCREEN *sp = TCB->csp;
+
+ AssertTCB();
+ if (labnum > 0 && labnum <= num_labels) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "plab_norm",
+ TPARM_2(plab_norm, labnum, text));
+ }
+}
+
+static void
+drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB, bool OnFlag)
+{
+ SCREEN *sp = TCB->csp;
+
+ AssertTCB();
+ if (OnFlag) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "label_on", label_on);
+ } else {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "label_off", label_off);
+ }
+}
+
+static chtype
+drv_conattr(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ SCREEN *sp = TCB->csp;
+ chtype attrs = A_NORMAL;
+
+ AssertTCB();
+ 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 && sp->_coloron)
+ attrs |= A_COLOR;
+
+ return (attrs);
+}
+
+static void
+drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ AssertTCB();
+
+ 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;
+}
+
+static void
+drv_initacs(TERMINAL_CONTROL_BLOCK * TCB, chtype *real_map, chtype *fake_map)
+{
+ SCREEN *sp = TCB->csp;
+
+ AssertTCB();
+ assert(sp != 0);
+ if (ena_acs != NULL) {
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx "ena_acs", ena_acs);
+ }
+#if NCURSES_EXT_FUNCS
+ /*
+ * Linux console "supports" the "PC ROM" character set by the coincidence
+ * that smpch/rmpch and smacs/rmacs have the same values. ncurses has
+ * no codepage support (see SCO Merge for an example). Outside of the
+ * values defined in acsc, there are no definitions for the "PC ROM"
+ * character set (assumed by some applications to be codepage 437), but we
+ * allow those applications to use those codepoints.
+ *
+ * test/blue.c uses this feature.
+ */
+#define PCH_KLUDGE(a,b) (a != 0 && b != 0 && !strcmp(a,b))
+ if (PCH_KLUDGE(enter_pc_charset_mode, enter_alt_charset_mode) &&
+ PCH_KLUDGE(exit_pc_charset_mode, exit_alt_charset_mode)) {
+ size_t i;
+ for (i = 1; i < ACS_LEN; ++i) {
+ if (real_map[i] == 0) {
+ real_map[i] = i;
+ if (real_map != fake_map) {
+ if (sp != 0)
+ sp->_screen_acs_map[i] = TRUE;
+ }
+ }
+ }
+ }
+#endif
+
+ 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 (USE_TRACEF(TRACE_CALLS)) {
+ size_t n, m;
+ char show[ACS_LEN * 2 + 1];
+ for (n = 1, m = 0; n < ACS_LEN; n++) {
+ if (real_map[n] != 0) {
+ show[m++] = (char) n;
+ show[m++] = (char) 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));
+
+ _nc_unlock_global(tracef);
+ }
+#endif /* TRACE */
+}
+
+#define ENSURE_TINFO(sp) (TCBOf(sp)->drv->isTerminfo)
+
+NCURSES_EXPORT(void)
+_nc_cookie_init(SCREEN *sp)
+{
+ bool support_cookies = USE_XMC_SUPPORT;
+ TERMINAL_CONTROL_BLOCK *TCB = (TERMINAL_CONTROL_BLOCK *) (sp->_term);
+
+ if (sp == 0 || !ENSURE_TINFO(sp))
+ return;
+
+#if USE_XMC_SUPPORT
+ /*
+ * If we have no magic-cookie support compiled-in, or if it is suppressed
+ * in the environment, reset the support-flag.
+ */
+ if (magic_cookie_glitch >= 0) {
+ if (getenv("NCURSES_NO_MAGIC_COOKIE") != 0) {
+ support_cookies = FALSE;
+ }
+ }
+#endif
+
+ if (!support_cookies && magic_cookie_glitch >= 0) {
+ T(("will disable attributes to work w/o magic cookies"));
+ }
+
+ if (magic_cookie_glitch > 0) { /* tvi, wyse */
+
+ sp->_xmc_triggers = sp->_ok_attributes & (
+ A_STANDOUT |
+ A_UNDERLINE |
+ A_REVERSE |
+ A_BLINK |
+ A_DIM |
+ A_BOLD |
+ A_INVIS |
+ A_PROTECT
+ );
+#if 0
+ /*
+ * We "should" treat colors as an attribute. The wyse350 (and its
+ * clones) appear to be the only ones that have both colors and magic
+ * cookies.
+ */
+ if (has_colors()) {
+ sp->_xmc_triggers |= A_COLOR;
+ }
+#endif
+ sp->_xmc_suppress = sp->_xmc_triggers & (chtype) ~(A_BOLD);
+
+ T(("magic cookie attributes %s", _traceattr(sp->_xmc_suppress)));
+ /*
+ * Supporting line-drawing may be possible. But make the regular
+ * video attributes work first.
+ */
+ acs_chars = ABSENT_STRING;
+ ena_acs = ABSENT_STRING;
+ enter_alt_charset_mode = ABSENT_STRING;
+ exit_alt_charset_mode = ABSENT_STRING;
+#if USE_XMC_SUPPORT
+ /*
+ * To keep the cookie support simple, suppress all of the optimization
+ * hooks except for clear_screen and the cursor addressing.
+ */
+ if (support_cookies) {
+ clr_eol = ABSENT_STRING;
+ clr_eos = ABSENT_STRING;
+ set_attributes = ABSENT_STRING;
+ }
+#endif
+ } else if (magic_cookie_glitch == 0) { /* hpterm */
+ }
+
+ /*
+ * If magic cookies are not supported, cancel the strings that set
+ * video attributes.
+ */
+ if (!support_cookies && magic_cookie_glitch >= 0) {
+ magic_cookie_glitch = ABSENT_NUMERIC;
+ set_attributes = ABSENT_STRING;
+ enter_blink_mode = ABSENT_STRING;
+ enter_bold_mode = ABSENT_STRING;
+ enter_dim_mode = ABSENT_STRING;
+ enter_reverse_mode = ABSENT_STRING;
+ enter_standout_mode = ABSENT_STRING;
+ enter_underline_mode = ABSENT_STRING;
+ }
+
+ /* initialize normal acs before wide, since we use mapping in the latter */
+#if !USE_WIDEC_SUPPORT
+ if (_nc_unicode_locale() && _nc_locale_breaks_acs(sp->_term)) {
+ acs_chars = NULL;
+ ena_acs = NULL;
+ enter_alt_charset_mode = NULL;
+ exit_alt_charset_mode = NULL;
+ set_attributes = NULL;
+ }
+#endif
+}
+
+static int
+drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
+ int mode,
+ int milliseconds,
+ int *timeleft
+ EVENTLIST_2nd(_nc_eventlist * evl))
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ return _nc_timed_wait(sp, mode, milliseconds, timeleft EVENTLIST_2nd(evl));
+}
+
+static int
+drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
+{
+ SCREEN *sp;
+ unsigned char c2 = 0;
+ int n;
+
+ AssertTCB();
+ assert(buf);
+ SetSP();
+
+# if USE_PTHREADS_EINTR
+ if ((pthread_self) && (pthread_kill) && (pthread_equal))
+ _nc_globals.read_thread = pthread_self();
+# endif
+ n = read(sp->_ifd, &c2, 1);
+#if USE_PTHREADS_EINTR
+ _nc_globals.read_thread = 0;
+#endif
+ *buf = (int) c2;
+ return n;
+}
+
+static int
+drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms)
+{
+#if HAVE_NANOSLEEP
+ {
+ struct timespec request, remaining;
+ request.tv_sec = ms / 1000;
+ request.tv_nsec = (ms % 1000) * 1000000;
+ while (nanosleep(&request, &remaining) == -1
+ && errno == EINTR) {
+ request = remaining;
+ }
+ }
+#else
+ _nc_timed_wait(0, 0, ms, (int *) 0 EVENTLIST_2nd(0));
+#endif
+ return OK;
+}
+
+static int
+__nc_putp(SCREEN *sp, const char *name GCC_UNUSED, const char *value)
+{
+ int rc = ERR;
+
+ if (value) {
+ rc = NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx name, value);
+ }
+ return rc;
+}
+
+static int
+__nc_putp_flush(SCREEN *sp, const char *name, const char *value)
+{
+ int rc = __nc_putp(sp, name, value);
+ if (rc != ERR) {
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ }
+ return rc;
+}
+
+static int
+drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool flag)
+{
+ int ret = ERR;
+ SCREEN *sp;
+
+ AssertTCB();
+
+ sp = TCB->csp;
+
+ if (sp) {
+ if (flag) {
+ (void) __nc_putp_flush(sp, "keypad_xmit", keypad_xmit);
+ } else if (!flag && keypad_local) {
+ (void) __nc_putp_flush(sp, "keypad_local", keypad_local);
+ }
+ if (flag && !sp->_tried) {
+ _nc_init_keytry(sp);
+ sp->_tried = TRUE;
+ }
+ ret = OK;
+ }
+
+ return ret;
+}
+
+static int
+drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int c, bool flag)
+{
+ SCREEN *sp;
+ int code = ERR;
+ int count = 0;
+ char *s;
+
+ AssertTCB();
+ SetSP();
+
+ if (c >= 0) {
+ unsigned ch = (unsigned) c;
+ if (flag) {
+ while ((s = _nc_expand_try(sp->_key_ok, ch, &count, 0)) != 0
+ && _nc_remove_key(&(sp->_key_ok), ch)) {
+ code = _nc_add_to_try(&(sp->_keytry), s, ch);
+ free(s);
+ count = 0;
+ if (code != OK)
+ break;
+ }
+ } else {
+ while ((s = _nc_expand_try(sp->_keytry, ch, &count, 0)) != 0
+ && _nc_remove_key(&(sp->_keytry), ch)) {
+ code = _nc_add_to_try(&(sp->_key_ok), s, ch);
+ free(s);
+ count = 0;
+ if (code != OK)
+ break;
+ }
+ }
+ }
+ return (code);
+}
+
+static bool
+drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int key)
+{
+ bool res = FALSE;
+
+ AssertTCB();
+ if (TCB->csp)
+ res = TINFO_HAS_KEY(TCB->csp, key) == 0 ? FALSE : TRUE;
+
+ return res;
+}
+
+NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_TINFO_DRIVER = {
+ TRUE,
+ drv_CanHandle, /* CanHandle */
+ drv_init, /* init */
+ drv_release, /* release */
+ drv_size, /* size */
+ drv_sgmode, /* sgmode */
+ drv_conattr, /* conattr */
+ drv_mvcur, /* hwcur */
+ drv_mode, /* mode */
+ drv_rescol, /* rescol */
+ drv_rescolors, /* rescolors */
+ drv_setcolor, /* color */
+ drv_dobeepflash, /* doBeepOrFlash */
+ drv_initpair, /* initpair */
+ drv_initcolor, /* initcolor */
+ drv_do_color, /* docolor */
+ drv_initmouse, /* initmouse */
+ drv_testmouse, /* testmouse */
+ drv_setfilter, /* setfilter */
+ drv_hwlabel, /* hwlabel */
+ drv_hwlabelOnOff, /* hwlabelOnOff */
+ drv_doupdate, /* update */
+ drv_defaultcolors, /* defaultcolors */
+ drv_print, /* print */
+ drv_getsize, /* getsize */
+ drv_setsize, /* setsize */
+ drv_initacs, /* initacs */
+ drv_screen_init, /* scinit */
+ drv_wrap, /* scexit */
+ drv_twait, /* twait */
+ drv_read, /* read */
+ drv_nap, /* nap */
+ drv_kpad, /* kpad */
+ drv_keyok, /* kyOk */
+ drv_kyExist /* kyExist */
+};
diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c
index 80c8f77fbebe..1f99208667ec 100644
--- a/ncurses/tinfo/trim_sgr0.c
+++ b/ncurses/tinfo/trim_sgr0.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2005-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2005-2007,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,9 +35,8 @@
#include <ctype.h>
#include <tic.h>
-#include <term_entry.h>
-MODULE_ID("$Id: trim_sgr0.c,v 1.8 2007/04/07 17:14:11 tom Exp $")
+MODULE_ID("$Id: trim_sgr0.c,v 1.12 2010/12/25 23:03:57 tom Exp $")
#undef CUR
#define CUR tp->
@@ -100,8 +99,8 @@ rewrite_sgr(char *s, char *attr)
{
if (PRESENT(s)) {
if (PRESENT(attr)) {
- unsigned len_s = strlen(s);
- unsigned len_a = strlen(attr);
+ size_t len_s = strlen(s);
+ size_t len_a = strlen(attr);
if (len_s > len_a && !strncmp(attr, s, len_a)) {
unsigned n;
@@ -124,8 +123,8 @@ 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;
+ size_t len_a;
+ size_t len_b;
TR(TRACE_DATABASE, ("similar_sgr:\n\t%s\n\t%s",
_nc_visbuf2(1, a),
@@ -170,13 +169,13 @@ chop_out(char *string, unsigned i, unsigned j)
* Returns the number of chars from 'full' that we matched. If any mismatch
* occurs, return zero.
*/
-static int
+static unsigned
compare_part(const char *part, const char *full)
{
const char *next_part;
const char *next_full;
- int used_full = 0;
- int used_delay = 0;
+ unsigned used_full = 0;
+ unsigned used_delay = 0;
while (*part != 0) {
if (*part != *full) {
@@ -199,7 +198,7 @@ compare_part(const char *part, const char *full)
next_part = skip_delay(part);
next_full = skip_delay(full);
if (next_part != part && next_full != full) {
- used_delay += (next_full - full);
+ used_delay += (unsigned) (next_full - full);
full = next_full;
part = next_part;
continue;
@@ -261,10 +260,11 @@ _nc_trim_sgr0(TERMTYPE *tp)
k = strlen(exit_alt_charset_mode);
if (j > k) {
for (i = 0; i <= (j - k); ++i) {
- int k2 = compare_part(exit_alt_charset_mode, off + i);
+ unsigned k2 = compare_part(exit_alt_charset_mode,
+ off + i);
if (k2 != 0) {
found = TRUE;
- chop_out(off, i, i + k2);
+ chop_out(off, (unsigned) i, (unsigned) (i + k2));
break;
}
}
@@ -274,18 +274,18 @@ _nc_trim_sgr0(TERMTYPE *tp)
* SGR 10 would reset to normal font.
*/
if (!found) {
- if ((i = is_csi(off)) != 0
+ if ((i = (size_t) 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;
+ i = (size_t) (tmp - off);
if (off[i - 1] == ';')
i--;
- j = skip_zero(tmp + 1) - off;
- i = chop_out(off, i, j);
+ j = (size_t) (skip_zero(tmp + 1) - off);
+ (void) chop_out(off, (unsigned) i, (unsigned) j);
found = TRUE;
}
}
@@ -293,10 +293,10 @@ _nc_trim_sgr0(TERMTYPE *tp)
if (!found
&& (tmp = strstr(end, off)) != 0
&& strcmp(end, off) != 0) {
- i = tmp - end;
+ i = (size_t) (tmp - end);
j = strlen(off);
tmp = strdup(end);
- chop_out(tmp, i, j);
+ chop_out(tmp, (unsigned) i, (unsigned) j);
free(off);
result = tmp;
}
diff --git a/ncurses/tinfo/use_screen.c b/ncurses/tinfo/use_screen.c
index 6c3b12fb9238..6a0297cebd51 100644
--- a/ncurses/tinfo/use_screen.c
+++ b/ncurses/tinfo/use_screen.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: use_screen.c,v 1.6 2008/06/07 19:16:56 tom Exp $")
+MODULE_ID("$Id: use_screen.c,v 1.8 2009/10/24 22:40:20 tom Exp $")
NCURSES_EXPORT(int)
use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
@@ -40,14 +40,14 @@ use_screen(SCREEN *screen, NCURSES_SCREEN_CB func, void *data)
SCREEN *save_SP;
int code = OK;
- T((T_CALLED("use_screen(%p,%p,%p)"), screen, func, data));
+ T((T_CALLED("use_screen(%p,%p,%p)"), (void *) screen, func, (void *) data));
/*
* FIXME - add a flag so a given thread can check if _it_ has already
* recurred through this point, return an error if so.
*/
_nc_lock_global(curses);
- save_SP = SP;
+ save_SP = CURRENT_SCREEN;
set_term(screen);
code = func(screen, data);
diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c
index b53bb210230d..a86c11267e93 100644
--- a/ncurses/tinfo/write_entry.c
+++ b/ncurses/tinfo/write_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,7 +42,6 @@
#include <sys/stat.h>
#include <tic.h>
-#include <term_entry.h>
#ifndef S_ISDIR
#define S_ISDIR(mode) ((mode & S_IFMT) == S_IFDIR)
@@ -54,7 +53,7 @@
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.72 2008/08/03 19:24:00 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.78 2010/12/25 23:23:08 tom Exp $")
static int total_written;
@@ -137,10 +136,12 @@ make_db_path(char *dst, const char *src, unsigned limit)
if (_nc_is_dir_path(dst)) {
rc = -1;
} else {
+ static const char suffix[] = DBM_SUFFIX;
unsigned have = strlen(dst);
- if (have > 3 && strcmp(dst + have - 3, DBM_SUFFIX)) {
- if (have + 3 <= limit)
- strcat(dst, DBM_SUFFIX);
+ unsigned need = strlen(suffix);
+ if (have > need && strcmp(dst + have - need, suffix)) {
+ if (have + need <= limit)
+ strcat(dst, suffix);
else
rc = -1;
}
@@ -171,7 +172,11 @@ make_db_root(const char *path)
struct stat statbuf;
if ((rc = stat(path, &statbuf)) < 0) {
- rc = mkdir(path, 0777);
+ rc = mkdir(path
+#if !defined(__MINGW32__)
+ ,0777
+#endif
+ );
} else if (_nc_access(path, R_OK | W_OK | X_OK) < 0) {
rc = -1; /* permission denied */
} else if (!(S_ISDIR(statbuf.st_mode))) {
@@ -338,6 +343,7 @@ _nc_write_entry(TERMTYPE *const tp)
while (*other_names != '\0') {
ptr = other_names++;
+ assert(ptr < buffer + sizeof(buffer) - 1);
while (*other_names != '|' && *other_names != '\0')
other_names++;
@@ -357,7 +363,7 @@ _nc_write_entry(TERMTYPE *const tp)
start_time = 0;
}
- if (strlen(first_name) >= sizeof(filename) - 3)
+ if (strlen(first_name) >= sizeof(filename) - (2 + LEAF_LEN))
_nc_warning("terminal name too long.");
sprintf(filename, LEAF_FMT "/%s", first_name[0], first_name);
@@ -385,14 +391,13 @@ _nc_write_entry(TERMTYPE *const tp)
}
while (*other_names != '\0') {
ptr = other_names++;
- assert(ptr < buffer + sizeof(buffer) - 1);
while (*other_names != '|' && *other_names != '\0')
other_names++;
if (*other_names != '\0')
*(other_names++) = '\0';
- if (strlen(ptr) > sizeof(linkname) - 3) {
+ if (strlen(ptr) > sizeof(linkname) - (2 + LEAF_LEN)) {
_nc_warning("terminal alias %s too long.", ptr);
continue;
}
@@ -414,8 +419,12 @@ _nc_write_entry(TERMTYPE *const tp)
{
int code;
#if USE_SYMLINKS
- strcpy(symlinkname, "../");
- strncat(symlinkname, filename, sizeof(symlinkname) - 4);
+ if (first_name[0] == linkname[0])
+ strncpy(symlinkname, first_name, sizeof(symlinkname) - 1);
+ else {
+ strcpy(symlinkname, "../");
+ strncat(symlinkname, filename, sizeof(symlinkname) - 4);
+ }
symlinkname[sizeof(symlinkname) - 1] = '\0';
#endif /* USE_SYMLINKS */
#if HAVE_REMOVE
@@ -460,26 +469,26 @@ _nc_write_entry(TERMTYPE *const tp)
#endif /* USE_HASHED_DB */
}
-static unsigned
+static size_t
fake_write(char *dst,
unsigned *offset,
- unsigned limit,
+ size_t limit,
char *src,
- unsigned want,
- unsigned size)
+ size_t want,
+ size_t size)
{
- int have = (limit - *offset);
+ size_t have = (limit - *offset);
want *= size;
if (have > 0) {
- if ((int) want > have)
+ if (want > have)
want = have;
memcpy(dst + *offset, src, want);
- *offset += want;
+ *offset += (unsigned) want;
} else {
want = 0;
}
- return (int) (want / size);
+ return (want / size);
}
#define Write(buf, size, count) fake_write(buffer, offset, limit, (char *) buf, count, size)
@@ -487,15 +496,16 @@ fake_write(char *dst,
#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 LITTLE_ENDIAN(p, x) (p)[0] = (unsigned char)LO(x), \
+ (p)[1] = (unsigned char)HI(x)
#define WRITE_STRING(str) (Write(str, sizeof(char), strlen(str) + 1) == strlen(str) + 1)
static int
-compute_offsets(char **Strings, unsigned strmax, short *offsets)
+compute_offsets(char **Strings, size_t strmax, short *offsets)
{
- size_t nextfree = 0;
- unsigned i;
+ int nextfree = 0;
+ size_t i;
for (i = 0; i < strmax; i++) {
if (Strings[i] == ABSENT_STRING) {
@@ -503,8 +513,8 @@ compute_offsets(char **Strings, unsigned strmax, short *offsets)
} else if (Strings[i] == CANCELLED_STRING) {
offsets[i] = -2;
} else {
- offsets[i] = nextfree;
- nextfree += strlen(Strings[i]) + 1;
+ offsets[i] = (short) nextfree;
+ nextfree += (int) strlen(Strings[i]) + 1;
TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
_nc_visbuf(Strings[i]), (int) nextfree));
}
@@ -513,9 +523,9 @@ compute_offsets(char **Strings, unsigned strmax, short *offsets)
}
static void
-convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
+convert_shorts(unsigned char *buf, short *Numbers, size_t count)
{
- unsigned i;
+ size_t 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;
@@ -524,7 +534,7 @@ convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
buf[2 * i + 1] = 0377;
} else {
LITTLE_ENDIAN(buf + 2 * i, Numbers[i]);
- TRACE_OUT(("put Numbers[%d]=%d", i, Numbers[i]));
+ TRACE_OUT(("put Numbers[%u]=%d", (unsigned) i, Numbers[i]));
}
}
}
@@ -536,8 +546,8 @@ convert_shorts(unsigned char *buf, short *Numbers, unsigned count)
static unsigned
extended_Booleans(TERMTYPE *tp)
{
- unsigned short result = 0;
- unsigned short i;
+ unsigned result = 0;
+ unsigned i;
for (i = 0; i < tp->ext_Booleans; ++i) {
if (tp->Booleans[BOOLCOUNT + i] == TRUE)
@@ -549,8 +559,8 @@ extended_Booleans(TERMTYPE *tp)
static unsigned
extended_Numbers(TERMTYPE *tp)
{
- unsigned short result = 0;
- unsigned short i;
+ unsigned result = 0;
+ unsigned i;
for (i = 0; i < tp->ext_Numbers; ++i) {
if (tp->Numbers[NUMCOUNT + i] != ABSENT_NUMERIC)
@@ -567,7 +577,7 @@ extended_Strings(TERMTYPE *tp)
for (i = 0; i < tp->ext_Strings; ++i) {
if (tp->Strings[STRCOUNT + i] != ABSENT_STRING)
- result = (i + 1);
+ result = (unsigned short) (i + 1);
}
return result;
}
@@ -597,7 +607,7 @@ write_object(TERMTYPE *tp, char *buffer, unsigned *offset, unsigned limit)
size_t namelen, boolmax, nummax, strmax;
char zero = '\0';
size_t i;
- short nextfree;
+ int nextfree;
short offsets[MAX_ENTRY_SIZE / 2];
unsigned char buf[MAX_ENTRY_SIZE];
unsigned last_bool = BOOLWRITE;
@@ -690,7 +700,7 @@ write_object(TERMTYPE *tp, char *buffer, unsigned *offset, unsigned limit)
#if NCURSES_XNAMES
if (extended_object(tp)) {
- unsigned extcnt = NUM_EXT_NAMES(tp);
+ unsigned extcnt = (unsigned) NUM_EXT_NAMES(tp);
if (even_boundary(nextfree))
return (ERR);
diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c
index 743b1f64f1ae..a726901d4a3a 100644
--- a/ncurses/trace/lib_trace.c
+++ b/ncurses/trace/lib_trace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
@@ -46,7 +47,7 @@
#include <ctype.h>
-MODULE_ID("$Id: lib_trace.c,v 1.71 2008/08/23 18:04:29 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.76 2010/12/19 01:21:19 tom Exp $")
NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
@@ -56,26 +57,26 @@ NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
NCURSES_EXPORT(const char *)
NCURSES_PUBLIC_VAR(_nc_tputs_trace) (void)
{
- return SP ? SP->_tputs_trace : _nc_prescreen._tputs_trace;
+ return CURRENT_SCREEN ? CURRENT_SCREEN->_tputs_trace : _nc_prescreen._tputs_trace;
}
NCURSES_EXPORT(long)
NCURSES_PUBLIC_VAR(_nc_outchars) (void)
{
- return SP ? SP->_outchars : _nc_prescreen._outchars;
+ return CURRENT_SCREEN ? CURRENT_SCREEN->_outchars : _nc_prescreen._outchars;
}
NCURSES_EXPORT(void)
_nc_set_tputs_trace(const char *s)
{
- if (SP)
- SP->_tputs_trace = s;
+ if (CURRENT_SCREEN)
+ CURRENT_SCREEN->_tputs_trace = s;
else
_nc_prescreen._tputs_trace = s;
}
NCURSES_EXPORT(void)
_nc_count_outchars(long increment)
{
- if (SP)
- SP->_outchars += increment;
+ if (CURRENT_SCREEN)
+ CURRENT_SCREEN->_outchars += increment;
else
_nc_prescreen._outchars += increment;
}
@@ -95,7 +96,7 @@ trace(const unsigned int tracelevel)
const char *mode = _nc_globals.init_trace ? "ab" : "wb";
if (TracePath[0] == '\0') {
- int size = sizeof(TracePath) - 12;
+ size_t size = sizeof(TracePath) - 12;
if (getcwd(TracePath, size) == 0) {
perror("curses: Can't get working directory");
exit(EXIT_FAILURE);
@@ -121,7 +122,7 @@ trace(const unsigned int tracelevel)
*/
#if HAVE_SETVBUF /* ANSI */
(void) setvbuf(TraceFP, (char *) 0, _IOLBF, 0);
-#elif HAVE_SETBUF /* POSIX */
+#elif HAVE_SETBUF /* POSIX */
(void) setbuffer(TraceFP, (char *) 0);
#endif
_tracef("TRACING NCURSES version %s.%d (tracelevel=%#x)",
@@ -183,8 +184,12 @@ _nc_va_tracef(const char *fmt, va_list ap)
# if USE_WEAK_SYMBOLS
if ((pthread_self))
# endif
+#ifdef __MINGW32__
+ fprintf(TraceFP, "%#lx:", (long) (void *) pthread_self().p);
+#else
fprintf(TraceFP, "%#lx:", (long) (void *) pthread_self());
#endif
+#endif
if (before || after) {
int n;
for (n = 1; n < TraceLevel; n++)
@@ -219,6 +224,14 @@ _nc_retrace_bool(NCURSES_BOOL code)
return code;
}
+/* Trace 'char' return-values */
+NCURSES_EXPORT(char)
+_nc_retrace_char(char code)
+{
+ T((T_RETURN("%c"), code));
+ return code;
+}
+
/* Trace 'int' return-values */
NCURSES_EXPORT(int)
_nc_retrace_int(int code)
@@ -271,7 +284,7 @@ _nc_retrace_void_ptr(void *code)
NCURSES_EXPORT(SCREEN *)
_nc_retrace_sp(SCREEN *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *) code));
return code;
}
@@ -279,7 +292,7 @@ _nc_retrace_sp(SCREEN *code)
NCURSES_EXPORT(WINDOW *)
_nc_retrace_win(WINDOW *code)
{
- T((T_RETURN("%p"), code));
+ T((T_RETURN("%p"), (void *) code));
return code;
}
diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c
index 45a03cea05fe..35ba0d3e6797 100644
--- a/ncurses/trace/lib_traceatr.c
+++ b/ncurses/trace/lib_traceatr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Thomas Dickey 1996-on *
* and: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer *
****************************************************************************/
/*
@@ -37,9 +38,12 @@
*/
#include <curses.priv.h>
-#include <term.h> /* acs_chars */
-MODULE_ID("$Id: lib_traceatr.c,v 1.63 2008/08/03 16:24:53 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_traceatr.c,v 1.74 2011/01/22 19:48:01 tom Exp $")
#define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
@@ -128,11 +132,11 @@ _traceattr2(int bufnum, chtype newmode)
for (n = 0; n < SIZEOF(names); n++) {
if ((newmode & names[n].val) != 0) {
if (result[1] != '\0')
- result = _nc_trace_bufcat(bufnum, "|");
+ (void) _nc_trace_bufcat(bufnum, "|");
result = _nc_trace_bufcat(bufnum, names[n].name);
if (names[n].val == A_COLOR) {
- short pairnum = PAIR_NUMBER(newmode);
+ short pairnum = (short) PairNumber(newmode);
#ifdef USE_TERMLIB
/* pair_content lives in libncurses */
(void) sprintf(temp, "{%d}", pairnum);
@@ -172,6 +176,14 @@ _traceattr(attr_t newmode)
}
/* Trace 'int' return-values */
+NCURSES_EXPORT(int)
+_nc_retrace_int_attr_t(attr_t code)
+{
+ T((T_RETURN("%s"), _traceattr(code)));
+ return (int) code;
+}
+
+/* Trace 'attr_t' return-values */
NCURSES_EXPORT(attr_t)
_nc_retrace_attr_t(attr_t code)
{
@@ -186,6 +198,9 @@ _nc_altcharset_name(attr_t attr, chtype ch)
unsigned int val;
const char *name;
} ALT_NAMES;
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = CURRENT_SCREEN;
+#endif
static const ALT_NAMES names[] =
{
{'l', "ACS_ULCORNER"}, /* upper left corner */
@@ -225,23 +240,26 @@ _nc_altcharset_name(attr_t attr, chtype ch)
const char *result = 0;
+#if NCURSES_SP_FUNCS
+ (void) sp;
+#endif
if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
char *cp;
char *found = 0;
- const ALT_NAMES *sp;
+ const ALT_NAMES *strp;
for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
- if (ChCharOf(cp[1]) == ChCharOf(ch)) {
+ if (ChCharOf(UChar(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;
+ ch = ChCharOf(UChar(*found));
+ for (strp = names; strp->val; strp++)
+ if (strp->val == ch) {
+ result = strp->name;
break;
}
}
@@ -260,7 +278,9 @@ _tracechtype2(int bufnum, chtype ch)
if ((found = _nc_altcharset_name(ChAttrOf(ch), ch)) != 0) {
(void) _nc_trace_bufcat(bufnum, found);
} else
- (void) _nc_trace_bufcat(bufnum, _nc_tracechar(SP, (int) ChCharOf(ch)));
+ (void) _nc_trace_bufcat(bufnum,
+ _nc_tracechar(CURRENT_SCREEN,
+ (int) ChCharOf(ch)));
if (ChAttrOf(ch) != A_NORMAL) {
(void) _nc_trace_bufcat(bufnum, " | ");
@@ -313,14 +333,17 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
(void) _nc_trace_bufcat(bufnum, "{ ");
for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
PUTC_ch = ch->chars[PUTC_i];
- if (PUTC_ch == L'\0')
+ if (PUTC_ch == L'\0') {
+ if (PUTC_i == 0)
+ (void) _nc_trace_bufcat(bufnum, "\\000");
break;
- PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
+ }
+ PUTC_n = (int) wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st);
if (PUTC_n <= 0) {
if (PUTC_ch != L'\0') {
/* it could not be a multibyte sequence */
(void) _nc_trace_bufcat(bufnum,
- _nc_tracechar(SP,
+ _nc_tracechar(CURRENT_SCREEN,
UChar(ch->chars[PUTC_i])));
}
break;
@@ -329,7 +352,7 @@ _tracecchar_t2(int bufnum, const cchar_t *ch)
if (n)
(void) _nc_trace_bufcat(bufnum, ", ");
(void) _nc_trace_bufcat(bufnum,
- _nc_tracechar(SP,
+ _nc_tracechar(CURRENT_SCREEN,
UChar(PUTC_buf[n])));
}
}
diff --git a/ncurses/trace/lib_tracebits.c b/ncurses/trace/lib_tracebits.c
index cc441b391e5b..d19d0e420acc 100644
--- a/ncurses/trace/lib_tracebits.c
+++ b/ncurses/trace/lib_tracebits.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,9 +33,8 @@
****************************************************************************/
#include <curses.priv.h>
-#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_tracebits.c,v 1.17 2008/08/03 16:09:26 tom Exp $")
+MODULE_ID("$Id: lib_tracebits.c,v 1.19 2011/01/09 00:23:03 tom Exp $")
#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
@@ -262,5 +261,5 @@ _nc_tracebits(void)
return _nc_trace_ttymode(&(cur_term->Nttyb));
}
#else
-EMPTY_MODULE(_nc_tracebits)
+EMPTY_MODULE(_nc_empty_lib_tracebits)
#endif /* TRACE */
diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c
index 79cf03b4870c..a1f9f5aa2706 100644
--- a/ncurses/trace/lib_tracechr.c
+++ b/ncurses/trace/lib_tracechr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <ctype.h>
-MODULE_ID("$Id: lib_tracechr.c,v 1.19 2008/08/03 15:39:29 tom Exp $")
+MODULE_ID("$Id: lib_tracechr.c,v 1.20 2009/04/18 22:48:29 tom Exp $")
#ifdef TRACE
@@ -52,7 +52,7 @@ _nc_tracechar(SCREEN *sp, int ch)
: _nc_globals.tracechr_buf);
if (ch > KEY_MIN || ch < 0) {
- name = _nc_keyname(sp, ch);
+ name = safe_keyname(SP_PARM, ch);
if (name == 0 || *name == '\0')
name = "NULL";
(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
@@ -64,7 +64,7 @@ _nc_tracechar(SCREEN *sp, int ch)
*/
(void) sprintf(MyBuffer, "%#03o", ch);
} else {
- name = _nc_unctrl(sp, (chtype) ch);
+ name = safe_unctrl(SP_PARM, (chtype) ch);
if (name == 0 || *name == 0)
name = "null"; /* shouldn't happen */
(void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
@@ -75,7 +75,7 @@ _nc_tracechar(SCREEN *sp, int ch)
NCURSES_EXPORT(char *)
_tracechar(int ch)
{
- return _nc_tracechar(SP, ch);
+ return _nc_tracechar(CURRENT_SCREEN, ch);
}
#else
EMPTY_MODULE(_nc_lib_tracechr)
diff --git a/ncurses/trace/lib_tracedmp.c b/ncurses/trace/lib_tracedmp.c
index 58732a06c246..c7fcbf2e0d56 100644
--- a/ncurses/trace/lib_tracedmp.c
+++ b/ncurses/trace/lib_tracedmp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_tracedmp.c,v 1.31 2008/08/16 19:30:56 tom Exp $")
+MODULE_ID("$Id: lib_tracedmp.c,v 1.32 2009/04/18 21:01:38 tom Exp $")
#ifdef TRACE
@@ -68,7 +68,7 @@ _tracedump(const char *name, WINDOW *win)
if (width < win->_maxx)
++width;
if (++width + 1 > (int) my_length) {
- my_length = 2 * (width + 1);
+ my_length = (unsigned) (2 * (width + 1));
my_buffer = typeRealloc(char, my_length, my_buffer);
}
@@ -82,7 +82,7 @@ _tracedump(const char *name, WINDOW *win)
* we map those to '.' and '?' respectively.
*/
for (j = 0; j < width; ++j) {
- chtype test = CharOf(win->_line[n].text[j]);
+ chtype test = (chtype) CharOf(win->_line[n].text[j]);
ep[j] = (char) ((UChar(test) == test
#if USE_WIDEC_SUPPORT
&& (win->_line[n].text[j].chars[1] == 0)
@@ -111,7 +111,7 @@ _tracedump(const char *name, WINDOW *win)
if (multicolumn) {
ep = my_buffer;
for (j = 0; j < width; ++j) {
- int test = WidecExt(win->_line[n].text[j]);
+ chtype test = WidecExt(win->_line[n].text[j]);
if (test) {
ep[j] = (char) (test + '0');
} else {
@@ -153,7 +153,7 @@ _tracedump(const char *name, WINDOW *win)
for (i = 0; i < 4; ++i) {
const char *hex = " 123456789ABCDEF";
- attr_t mask = (0xf << ((i + 4) * 4));
+ attr_t mask = (attr_t) (0xf << ((i + 4) * 4));
haveattrs = FALSE;
for (j = 0; j < width; ++j)
diff --git a/ncurses/trace/lib_tracemse.c b/ncurses/trace/lib_tracemse.c
index 74cc177d51bb..1afd15d2e785 100644
--- a/ncurses/trace/lib_tracemse.c
+++ b/ncurses/trace/lib_tracemse.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,23 +38,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_tracemse.c,v 1.15 2008/08/03 15:39:29 tom Exp $")
+MODULE_ID("$Id: lib_tracemse.c,v 1.18 2011/01/22 19:48:08 tom Exp $")
#ifdef TRACE
#define my_buffer sp->tracemse_buf
-NCURSES_EXPORT(char *)
-_nc_tracemouse(SCREEN *sp, MEVENT const *ep)
+static char *
+_trace_mmask_t(SCREEN *sp, mmask_t code)
{
- (void) sprintf(my_buffer, TRACEMSE_FMT,
- ep->id,
- ep->x,
- ep->y,
- ep->z,
- (unsigned long) ep->bstate);
-
-#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(my_buffer, s), ", ")
+#define SHOW(m, s) if ((code & m) == m) strcat(strcat(my_buffer, s), ", ")
SHOW(BUTTON1_RELEASED, "release-1");
SHOW(BUTTON1_PRESSED, "press-1");
@@ -110,14 +103,37 @@ _nc_tracemouse(SCREEN *sp, MEVENT const *ep)
if (my_buffer[strlen(my_buffer) - 1] == ' ')
my_buffer[strlen(my_buffer) - 2] = '\0';
+
+ return (my_buffer);
+}
+
+NCURSES_EXPORT(char *)
+_nc_tracemouse(SCREEN *sp, MEVENT const *ep)
+{
+ (void) sprintf(my_buffer, TRACEMSE_FMT,
+ ep->id,
+ ep->x,
+ ep->y,
+ ep->z,
+ (unsigned long) ep->bstate);
+
+ (void) _trace_mmask_t(sp, ep->bstate);
(void) strcat(my_buffer, "}");
return (my_buffer);
}
+NCURSES_EXPORT(mmask_t)
+_nc_retrace_mmask_t(SCREEN *sp, mmask_t code)
+{
+ *my_buffer = '\0';
+ T((T_RETURN("{%s}"), _trace_mmask_t(sp, code)));
+ return code;
+}
+
NCURSES_EXPORT(char *)
_tracemouse(MEVENT const *ep)
{
- return _nc_tracemouse(SP, ep);
+ return _nc_tracemouse(CURRENT_SCREEN, ep);
}
#else /* !TRACE */
diff --git a/ncurses/trace/trace_buf.c b/ncurses/trace/trace_buf.c
index 6345acc035fc..46baba4796b2 100644
--- a/ncurses/trace/trace_buf.c
+++ b/ncurses/trace/trace_buf.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,7 +35,9 @@
#include <curses.priv.h>
-MODULE_ID("$Id: trace_buf.c,v 1.14 2008/08/03 15:13:56 tom Exp $")
+MODULE_ID("$Id: trace_buf.c,v 1.17 2011/01/22 19:48:16 tom Exp $")
+
+#ifdef TRACE
#define MyList _nc_globals.tracebuf_ptr
#define MySize _nc_globals.tracebuf_used
@@ -47,7 +49,7 @@ _nc_trace_alloc(int bufnum, size_t want)
if (bufnum >= 0) {
if ((size_t) (bufnum + 1) > MySize) {
- size_t need = (bufnum + 1) * 2;
+ size_t need = (size_t) (bufnum + 1) * 2;
if ((MyList = typeRealloc(TRACEBUF, need, MyList)) != 0) {
while (need > MySize)
MyList[MySize++].text = 0;
@@ -112,3 +114,6 @@ _nc_trace_bufcat(int bufnum, const char *value)
}
return buffer;
}
+#else
+EMPTY_MODULE(_nc_empty_trace_buf)
+#endif /* TRACE */
diff --git a/ncurses/trace/trace_tries.c b/ncurses/trace/trace_tries.c
index f813aba15825..d3380131ecac 100644
--- a/ncurses/trace/trace_tries.c
+++ b/ncurses/trace/trace_tries.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2009,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1999 *
+ * Author: Thomas E. Dickey 1999 *
****************************************************************************/
/*
* trace_tries.c - Tracing/Debugging buffers (keycode tries-trees)
@@ -35,7 +35,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: trace_tries.c,v 1.13 2008/08/03 15:43:30 tom Exp $")
+MODULE_ID("$Id: trace_tries.c,v 1.16 2011/01/09 00:23:27 tom Exp $")
#ifdef TRACE
#define my_buffer _nc_globals.tracetry_buf
@@ -46,7 +46,7 @@ recur_tries(TRIES * tree, unsigned level)
{
if (level > my_length) {
my_length = (level + 1) * 4;
- my_buffer = (unsigned char *) realloc(my_buffer, my_length);
+ my_buffer = (unsigned char *) _nc_doalloc(my_buffer, my_length);
}
while (tree != 0) {
@@ -67,12 +67,12 @@ NCURSES_EXPORT(void)
_nc_trace_tries(TRIES * tree)
{
my_buffer = typeMalloc(unsigned char, my_length = 80);
- _tracef("BEGIN tries %p", tree);
+ _tracef("BEGIN tries %p", (void *) tree);
recur_tries(tree, 0);
- _tracef(". . . tries %p", tree);
+ _tracef(". . . tries %p", (void *) tree);
free(my_buffer);
}
#else
-EMPTY_MODULE(_nc_trace_tries)
+EMPTY_MODULE(_nc_empty_trace_tries)
#endif
diff --git a/ncurses/trace/trace_xnames.c b/ncurses/trace/trace_xnames.c
index 9b0b5920d814..38a48730ccdc 100644
--- a/ncurses/trace/trace_xnames.c
+++ b/ncurses/trace/trace_xnames.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2000,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,12 +34,11 @@
*/
#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 $")
+MODULE_ID("$Id: trace_xnames.c,v 1.6 2010/01/23 17:59:27 tom Exp $")
NCURSES_EXPORT(void)
-_nc_trace_xnames(TERMTYPE * tp GCC_UNUSED)
+_nc_trace_xnames(TERMTYPE *tp GCC_UNUSED)
{
#ifdef TRACE
#if NCURSES_XNAMES
diff --git a/ncurses/trace/varargs.c b/ncurses/trace/varargs.c
index f4ee46710abb..541173d27459 100644
--- a/ncurses/trace/varargs.c
+++ b/ncurses/trace/varargs.c
@@ -34,7 +34,7 @@
#include <ctype.h>
-MODULE_ID("$Id: varargs.c,v 1.7 2008/08/03 15:42:49 tom Exp $")
+MODULE_ID("$Id: varargs.c,v 1.8 2008/11/16 00:19:59 juergen Exp $")
#ifdef TRACE
@@ -44,7 +44,7 @@ typedef enum {
atUnknown = 0, atInteger, atFloat, atPoint, atString
} ARGTYPE;
-#define VA_INT(type) ival = va_arg(ap, type)
+#define VA_INT(type) ival = (int) 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)
diff --git a/ncurses/trace/visbuf.c b/ncurses/trace/visbuf.c
index bf9fb1472003..66da4f4beca3 100644
--- a/ncurses/trace/visbuf.c
+++ b/ncurses/trace/visbuf.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2001-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,7 +42,9 @@
#include <tic.h>
#include <ctype.h>
-MODULE_ID("$Id: visbuf.c,v 1.32 2008/08/04 23:07:39 tom Exp $")
+MODULE_ID("$Id: visbuf.c,v 1.37 2010/05/29 18:51:41 tom Exp $")
+
+#define NUM_VISBUFS 4
#define NormalLen(len) (size_t) (((size_t)(len) + 1) * 4)
#define WideLen(len) (size_t) (((size_t)(len) + 1) * 4 * MB_CUR_MAX)
@@ -92,7 +94,7 @@ _nc_vischar(char *tp, unsigned c)
static const char *
_nc_visbuf2n(int bufnum, const char *buf, int len)
{
- const char *vbuf;
+ const char *vbuf = 0;
char *tp;
int c;
@@ -108,9 +110,16 @@ _nc_visbuf2n(int bufnum, const char *buf, int len)
vbuf = tp = _nc_trace_buf(bufnum, NormalLen(len));
#else
{
- static char *mybuf[4];
- mybuf[bufnum] = typeRealloc(char, NormalLen(len), mybuf[bufnum]);
- vbuf = tp = mybuf[bufnum];
+ static char *mybuf[NUM_VISBUFS];
+ if (bufnum < 0) {
+ for (c = 0; c < NUM_VISBUFS; ++c) {
+ FreeAndNull(mybuf[c]);
+ }
+ tp = 0;
+ } else {
+ mybuf[bufnum] = typeRealloc(char, NormalLen(len), mybuf[bufnum]);
+ vbuf = tp = mybuf[bufnum];
+ }
}
#endif
if (tp != 0) {
@@ -119,7 +128,7 @@ _nc_visbuf2n(int bufnum, const char *buf, int len)
tp = _nc_vischar(tp, UChar(c));
}
*tp++ = D_QUOTE;
- *tp++ = '\0';
+ *tp = '\0';
} else {
vbuf = ("(_nc_visbuf2n failed)");
}
@@ -177,7 +186,7 @@ _nc_viswbuf2n(int bufnum, const wchar_t *buf, int len)
vbuf = tp = _nc_trace_buf(bufnum, WideLen(len));
#else
{
- static char *mybuf[2];
+ static char *mybuf[NUM_VISBUFS];
mybuf[bufnum] = typeRealloc(char, WideLen(len), mybuf[bufnum]);
vbuf = tp = mybuf[bufnum];
}
@@ -196,7 +205,7 @@ _nc_viswbuf2n(int bufnum, const wchar_t *buf, int len)
}
}
*tp++ = D_QUOTE;
- *tp++ = '\0';
+ *tp = '\0';
} else {
vbuf = ("(_nc_viswbuf2n failed)");
}
@@ -229,7 +238,9 @@ _nc_viswibuf(const wint_t *buf)
static unsigned mylen;
unsigned n;
- for (n = 0; buf[n] != 0; ++n) ;
+ for (n = 0; buf[n] != 0; ++n) {
+ ; /* empty */
+ }
if (mylen < ++n) {
mylen = n + 80;
if (mybuf != 0)
@@ -237,8 +248,10 @@ _nc_viswibuf(const wint_t *buf)
else
mybuf = typeMalloc(wchar_t, mylen);
}
- for (n = 0; buf[n] != 0; ++n)
+ for (n = 0; buf[n] != 0; ++n) {
mybuf[n] = (wchar_t) buf[n];
+ }
+ mybuf[n] = L'\0';
return _nc_viswbuf2(0, mybuf);
}
@@ -274,12 +287,12 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len)
}
}
- result = _nc_trace_bufcat(bufnum, l_brace);
- result = _nc_trace_bufcat(bufnum, d_quote);
+ (void) _nc_trace_bufcat(bufnum, l_brace);
+ (void) _nc_trace_bufcat(bufnum, d_quote);
for (j = first; j <= last; ++j) {
found = _nc_altcharset_name(attr, (chtype) CharOf(buf[j]));
if (found != 0) {
- result = _nc_trace_bufcat(bufnum, found);
+ (void) _nc_trace_bufcat(bufnum, found);
attr &= ~A_ALTCHARSET;
} else
#if USE_WIDEC_SUPPORT
@@ -291,15 +304,19 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len)
int k;
PUTC_ch = buf[j].chars[PUTC_i];
- if (PUTC_ch == L'\0')
+ if (PUTC_ch == L'\0') {
+ if (PUTC_i == 0)
+ (void) _nc_trace_bufcat(bufnum, "\\000");
break;
- PUTC_n = (int) wcrtomb(PUTC_buf, buf[j].chars[PUTC_i], &PUT_st);
+ }
+ PUTC_n = (int) wcrtomb(PUTC_buf,
+ buf[j].chars[PUTC_i], &PUT_st);
if (PUTC_n <= 0)
break;
for (k = 0; k < PUTC_n; k++) {
char temp[80];
_nc_vischar(temp, UChar(PUTC_buf[k]));
- result = _nc_trace_bufcat(bufnum, temp);
+ (void) _nc_trace_bufcat(bufnum, temp);
}
}
}
@@ -311,10 +328,10 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len)
}
#endif /* USE_WIDEC_SUPPORT */
}
- result = _nc_trace_bufcat(bufnum, d_quote);
+ (void) _nc_trace_bufcat(bufnum, d_quote);
if (attr != A_NORMAL) {
- result = _nc_trace_bufcat(bufnum, " | ");
- result = _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr));
+ (void) _nc_trace_bufcat(bufnum, " | ");
+ (void) _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr));
}
result = _nc_trace_bufcat(bufnum, r_brace);
first = last + 1;
diff --git a/ncurses/tty/MKexpanded.sh b/ncurses/tty/MKexpanded.sh
index bf9acf21aa43..7a5f5993c487 100755
--- a/ncurses/tty/MKexpanded.sh
+++ b/ncurses/tty/MKexpanded.sh
@@ -1,6 +1,6 @@
#! /bin/sh
##############################################################################
-# Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -27,9 +27,9 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey <dickey@clark.net> 1997
+# Author: Thomas E. Dickey, 1997-on
#
-# $Id: MKexpanded.sh,v 1.11 2005/01/02 01:06:40 tom Exp $
+# $Id: MKexpanded.sh,v 1.17 2010/01/23 17:57:43 tom Exp $
#
# Script to generate 'expanded.c', a dummy source that contains functions
# corresponding to complex macros used in this library. By making functions,
@@ -52,8 +52,13 @@ trap "rm -f $TMP" 0 1 2 5 15
cat <<EOF
/* generated by MKexpanded.sh */
+#define NEED_NCURSES_CH_T 1
#include <curses.priv.h>
-#include <term.h>
+
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
#if NCURSES_EXPANDED
EOF
@@ -68,29 +73,59 @@ cat >$TMP <<EOF
#undef FALSE
/* this is a marker */
IGNORE
-NCURSES_EXPORT(void) _nc_toggle_attr_on (attr_t *S, attr_t at)
+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)
+
+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)
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_DelCharCost) (NCURSES_SP_DCLx int count)
+{
+ return DelCharCost(SP_PARM, count);
+}
+
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(_nc_InsCharCost) (NCURSES_SP_DCLx int count)
{
- return DelCharCost(count);
+ return InsCharCost(SP_PARM, count);
}
-NCURSES_EXPORT(int) _nc_InsCharCost (int count)
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_UpdateAttrs) (NCURSES_SP_DCLx CARG_CH_T c)
{
- return InsCharCost(count);
+ UpdateAttrs(SP_PARM, CHDEREF(c));
}
-NCURSES_EXPORT(void) _nc_UpdateAttrs (NCURSES_CH_T c)
+
+@if_NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_DelCharCost (int count)
+{
+ return NCURSES_SP_NAME(_nc_DelCharCost) (CURRENT_SCREEN, count);
+}
+
+NCURSES_EXPORT(int)
+_nc_InsCharCost (int count)
+{
+ return NCURSES_SP_NAME(_nc_InsCharCost)(CURRENT_SCREEN, count);
+}
+
+NCURSES_EXPORT(void)
+_nc_UpdateAttrs (CARG_CH_T c)
{
- UpdateAttrs(c);
+ NCURSES_SP_NAME(_nc_UpdateAttrs)(CURRENT_SCREEN,c);
}
+@endif
EOF
-$preprocessor $TMP 2>/dev/null | sed -e '1,/^IGNORE$/d'
+$preprocessor $TMP 2>/dev/null | \
+ sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#if_/#if /'
cat <<EOF
#else /* ! NCURSES_EXPANDED */
diff --git a/ncurses/tty/hardscroll.c b/ncurses/tty/hardscroll.c
index 2c40997fb6b1..af68c961728d 100644
--- a/ncurses/tty/hardscroll.c
+++ b/ncurses/tty/hardscroll.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -147,90 +147,98 @@ AUTHOR
#include <curses.priv.h>
-MODULE_ID("$Id: hardscroll.c,v 1.42 2008/08/03 23:49:30 tom Exp $")
+MODULE_ID("$Id: hardscroll.c,v 1.47 2010/04/24 23:46:47 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 screen_lines(sp) MAXLINES
+NCURSES_EXPORT_VAR (int)
+ oldnums[MAXLINES];
+# define OLDNUM(sp,n) oldnums[n]
# define _tracef printf
# undef TR
# define TR(n, a) if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
-extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
+extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
#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; /* obsolete: keep for ABI compat */
+NCURSES_EXPORT_VAR (int *)
+ _nc_oldnums = 0; /* obsolete: keep for ABI compat */
# if USE_HASHMAP
-# define oldnums SP->_oldnum_list
-# define OLDNUM(n) oldnums[n]
+# define oldnums(sp) (sp)->_oldnum_list
+# define OLDNUM(sp,n) oldnums(sp)[n]
# else /* !USE_HASHMAP */
-# define OLDNUM(n) newscr->_line[n].oldindex
+# define OLDNUM(sp,n) NewScreen(sp)->_line[n].oldindex
# endif /* !USE_HASHMAP */
-#define OLDNUM_SIZE SP->_oldnum_size
+#define OLDNUM_SIZE(sp) (sp)->_oldnum_size
#endif /* defined(SCROLLDEBUG) || defined(HASHDEBUG) */
NCURSES_EXPORT(void)
-_nc_scroll_optimize(void)
+NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_DCL0)
/* scroll optimization to transform curscr to newscr */
{
int i;
int start, end, shift;
- TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize")));
+ TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize(%p)"), (void *) SP_PARM));
#if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
#if USE_HASHMAP
/* get enough storage */
- if (OLDNUM_SIZE < screen_lines) {
- int *new_oldnums = typeRealloc(int, screen_lines, oldnums);
+ if (OLDNUM_SIZE(SP_PARM) < screen_lines(SP_PARM)) {
+ int *new_oldnums = typeRealloc(int,
+ (size_t) screen_lines(SP_PARM),
+ oldnums(SP_PARM));
if (!new_oldnums)
return;
- oldnums = new_oldnums;
- OLDNUM_SIZE = screen_lines;
+ oldnums(SP_PARM) = new_oldnums;
+ OLDNUM_SIZE(SP_PARM) = screen_lines(SP_PARM);
}
/* calculate the indices */
- _nc_hash_map();
+ NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_ARG);
#endif
#endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
#ifdef TRACE
if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) {
- _nc_linedump();
+ NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_ARG);
_nc_unlock_global(tracef);
}
#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))
+ for (i = 0; i < screen_lines(SP_PARM);) {
+ while (i < screen_lines(SP_PARM)
+ && (OLDNUM(SP_PARM, i) == _NEWINDEX || OLDNUM(SP_PARM, i) <= i))
i++;
- if (i >= screen_lines)
+ if (i >= screen_lines(SP_PARM))
break;
- shift = OLDNUM(i) - i; /* shift > 0 */
+ shift = OLDNUM(SP_PARM, i) - i; /* shift > 0 */
start = i;
i++;
- while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
- == shift)
+ while (i < screen_lines(SP_PARM)
+ && OLDNUM(SP_PARM, i) != _NEWINDEX
+ && OLDNUM(SP_PARM, 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) {
+ if (NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_ARGx
+ shift,
+ start,
+ end,
+ screen_lines(SP_PARM) - 1) == ERR) {
TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
continue;
}
@@ -238,23 +246,33 @@ _nc_scroll_optimize(void)
}
/* pass 2 - from bottom to top scrolling down */
- for (i = screen_lines - 1; i >= 0;) {
- while (i >= 0 && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) >= i))
+ for (i = screen_lines(SP_PARM) - 1; i >= 0;) {
+ while (i >= 0
+ && (OLDNUM(SP_PARM, i) == _NEWINDEX
+ || OLDNUM(SP_PARM, i) >= i)) {
i--;
+ }
if (i < 0)
break;
- shift = OLDNUM(i) - i; /* shift < 0 */
+ shift = OLDNUM(SP_PARM, i) - i; /* shift < 0 */
end = i;
i--;
- while (i >= 0 && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i == shift)
+ while (i >= 0
+ && OLDNUM(SP_PARM, i) != _NEWINDEX
+ && OLDNUM(SP_PARM, 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) {
+ if (NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_ARGx
+ shift,
+ start,
+ end,
+ screen_lines(SP_PARM) - 1) == ERR) {
TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
continue;
}
@@ -263,24 +281,41 @@ _nc_scroll_optimize(void)
TR(TRACE_ICALLS, (T_RETURN("")));
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_scroll_optimize(void)
+{
+ NCURSES_SP_NAME(_nc_scroll_optimize) (CURRENT_SCREEN);
+}
+#endif
+
#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
NCURSES_EXPORT(void)
-_nc_linedump(void)
+NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_DCL0)
/* dump the state of the real and virtual oldnum fields */
{
int n;
char *buf = 0;
- size_t want = (screen_lines + 1) * 4;
+ size_t want = ((size_t) screen_lines(SP_PARM) + 1) * 4;
if ((buf = typeMalloc(char, want)) != 0) {
- (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));
+ *buf = '\0';
+ for (n = 0; n < screen_lines(SP_PARM); n++)
+ (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(SP_PARM, n));
+ TR(TRACE_UPDATE | TRACE_MOVE, ("virt %s", buf));
free(buf);
}
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_linedump(void)
+{
+ NCURSES_SP_NAME(_nc_linedump) (CURRENT_SCREEN);
+}
+#endif
+
#endif /* defined(TRACE) || defined(SCROLLDEBUG) */
#ifdef SCROLLDEBUG
diff --git a/ncurses/tty/hashmap.c b/ncurses/tty/hashmap.c
index 9b60df62d5cf..b670e1b9691f 100644
--- a/ncurses/tty/hashmap.c
+++ b/ncurses/tty/hashmap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -68,9 +68,12 @@ AUTHOR
*****************************************************************************/
#include <curses.priv.h>
-#include <term.h> /* for back_color_erase */
-MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: hashmap.c,v 1.62 2010/04/24 23:46:07 tom Exp $")
#ifdef HASHDEBUG
@@ -83,25 +86,25 @@ MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $")
int oldnums[MAXLINES], reallines[MAXLINES];
static NCURSES_CH_T oldtext[MAXLINES][TEXTWIDTH];
static NCURSES_CH_T newtext[MAXLINES][TEXTWIDTH];
-# define OLDNUM(n) oldnums[n]
-# define OLDTEXT(n) oldtext[n]
-# define NEWTEXT(m) newtext[m]
-# define PENDING(n) 1
+# define OLDNUM(sp,n) oldnums[n]
+# define OLDTEXT(sp,n) oldtext[n]
+# define NEWTEXT(sp,m) newtext[m]
+# define PENDING(sp,n) 1
#else /* !HASHDEBUG */
-# define OLDNUM(n) SP->_oldnum_list[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)
+# define OLDNUM(sp,n) (sp)->_oldnum_list[n]
+# define OLDTEXT(sp,n) CurScreen(sp)->_line[n].text
+# define NEWTEXT(sp,m) NewScreen(sp)->_line[m].text
+# define TEXTWIDTH(sp) (CurScreen(sp)->_maxx + 1)
+# define PENDING(sp,n) (NewScreen(sp)->_line[n].firstchar != _NOCHANGE)
#endif /* !HASHDEBUG */
-#define oldhash (SP->oldhash)
-#define newhash (SP->newhash)
-#define hashtab (SP->hashtab)
-#define lines_alloc (SP->hashtab_len)
+#define oldhash(sp) ((sp)->oldhash)
+#define newhash(sp) ((sp)->newhash)
+#define hashtab(sp) ((sp)->hashtab)
+#define lines_alloc(sp) ((sp)->hashtab_len)
#if USE_WIDEC_SUPPORT
#define HASH_VAL(ch) (ch.chars[0])
@@ -112,26 +115,26 @@ static NCURSES_CH_T newtext[MAXLINES][TEXTWIDTH];
static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
static NCURSES_INLINE unsigned long
-hash(NCURSES_CH_T * text)
+hash(SCREEN *sp, NCURSES_CH_T * text)
{
int i;
NCURSES_CH_T ch;
unsigned long result = 0;
- for (i = TEXTWIDTH; i > 0; i--) {
+ for (i = TEXTWIDTH(sp); i > 0; i--) {
ch = *text++;
- result += (result << 5) + HASH_VAL(ch);
+ result += (result << 5) + (unsigned long) HASH_VAL(ch);
}
return result;
}
/* approximate update cost */
static int
-update_cost(NCURSES_CH_T * from, NCURSES_CH_T * to)
+update_cost(SCREEN *sp, NCURSES_CH_T * from, NCURSES_CH_T * to)
{
int cost = 0;
int i;
- for (i = TEXTWIDTH; i > 0; i--, from++, to++)
+ for (i = TEXTWIDTH(sp); i > 0; i--, from++, to++)
if (!(CharEq(*from, *to)))
cost++;
@@ -139,7 +142,7 @@ update_cost(NCURSES_CH_T * from, NCURSES_CH_T * to)
}
static int
-update_cost_from_blank(NCURSES_CH_T * to)
+update_cost_from_blank(SCREEN *sp, NCURSES_CH_T * to)
{
int cost = 0;
int i;
@@ -148,7 +151,7 @@ update_cost_from_blank(NCURSES_CH_T * to)
if (back_color_erase)
SetPair(blank, GetPair(stdscr->_nc_bkgd));
- for (i = TEXTWIDTH; i > 0; i--, to++)
+ for (i = TEXTWIDTH(sp); i > 0; i--, to++)
if (!(CharEq(blank, *to)))
cost++;
@@ -160,14 +163,14 @@ update_cost_from_blank(NCURSES_CH_T * to)
* effective. 'blank' indicates whether the line 'to' would become blank.
*/
static NCURSES_INLINE bool
-cost_effective(const int from, const int to, const bool blank)
+cost_effective(SCREEN *sp, const int from, const int to, const bool blank)
{
int new_from;
if (from == to)
return FALSE;
- new_from = OLDNUM(from);
+ new_from = OLDNUM(sp, from);
if (new_from == _NEWINDEX)
new_from = from;
@@ -175,16 +178,17 @@ cost_effective(const int from, const int to, const bool blank)
* 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;
+ return (((blank ? update_cost_from_blank(sp, NEWTEXT(sp, to))
+ : update_cost(sp, OLDTEXT(sp, to), NEWTEXT(sp, to)))
+ + update_cost(sp, OLDTEXT(sp, new_from), NEWTEXT(sp, from)))
+ >= ((new_from == from ? update_cost_from_blank(sp, NEWTEXT(sp, from))
+ : update_cost(sp, OLDTEXT(sp, new_from), NEWTEXT(sp, from)))
+ + update_cost(sp, OLDTEXT(sp, from), NEWTEXT(sp, to))))
+ ? TRUE : FALSE;
}
static void
-grow_hunks(void)
+grow_hunks(SCREEN *sp)
{
int start, end, shift;
int back_limit, forward_limit; /* limits for cells to fill */
@@ -200,35 +204,36 @@ grow_hunks(void)
back_ref_limit = 0;
i = 0;
- while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
+ while (i < screen_lines(sp) && OLDNUM(sp, i) == _NEWINDEX)
i++;
- for (; i < screen_lines; i = next_hunk) {
+ for (; i < screen_lines(sp); i = next_hunk) {
start = i;
- shift = OLDNUM(i) - i;
+ shift = OLDNUM(sp, i) - i;
/* get forward limit */
i = start + 1;
- while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
- == shift)
+ while (i < screen_lines(sp)
+ && OLDNUM(sp, i) != _NEWINDEX
+ && OLDNUM(sp, i) - i == shift)
i++;
end = i;
- while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
+ while (i < screen_lines(sp) && OLDNUM(sp, i) == _NEWINDEX)
i++;
next_hunk = i;
forward_limit = i;
- if (i >= screen_lines || OLDNUM(i) >= i)
+ if (i >= screen_lines(sp) || OLDNUM(sp, i) >= i)
forward_ref_limit = i;
else
- forward_ref_limit = OLDNUM(i);
+ forward_ref_limit = OLDNUM(sp, 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;
+ if (newhash(sp)[i] == oldhash(sp)[i + shift]
+ || cost_effective(sp, i + shift, i, shift < 0)) {
+ OLDNUM(sp, i) = i + shift;
TR(TRACE_UPDATE | TRACE_MOVE,
("connected new line %d to old line %d (backward continuation)",
i, i + shift));
@@ -246,9 +251,9 @@ grow_hunks(void)
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;
+ if (newhash(sp)[i] == oldhash(sp)[i + shift]
+ || cost_effective(sp, i + shift, i, shift > 0)) {
+ OLDNUM(sp, i) = i + shift;
TR(TRACE_UPDATE | TRACE_MOVE,
("connected new line %d to old line %d (forward continuation)",
i, i + shift));
@@ -268,51 +273,54 @@ grow_hunks(void)
}
NCURSES_EXPORT(void)
-_nc_hash_map(void)
+NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_DCL0)
{
- HASHMAP *sp;
+ HASHMAP *hsp;
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);
+ if (screen_lines(SP_PARM) > lines_alloc(SP_PARM)) {
+ if (hashtab(SP_PARM))
+ free(hashtab(SP_PARM));
+ hashtab(SP_PARM) = typeMalloc(HASHMAP,
+ ((size_t) screen_lines(SP_PARM) + 1) * 2);
+ if (!hashtab(SP_PARM)) {
+ if (oldhash(SP_PARM)) {
+ FreeAndNull(oldhash(SP_PARM));
}
- lines_alloc = 0;
+ lines_alloc(SP_PARM) = 0;
return;
}
- lines_alloc = screen_lines;
+ lines_alloc(SP_PARM) = screen_lines(SP_PARM);
}
- if (oldhash && newhash) {
+ if (oldhash(SP_PARM) && newhash(SP_PARM)) {
/* re-hash only changed lines */
- for (i = 0; i < screen_lines; i++) {
- if (PENDING(i))
- newhash[i] = hash(NEWTEXT(i));
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ if (PENDING(SP_PARM, i))
+ newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, 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)
+ if (oldhash(SP_PARM) == 0)
+ oldhash(SP_PARM) = typeCalloc(unsigned long,
+ (size_t) screen_lines(SP_PARM));
+ if (newhash(SP_PARM) == 0)
+ newhash(SP_PARM) = typeCalloc(unsigned long,
+ (size_t) screen_lines(SP_PARM));
+ if (!oldhash(SP_PARM) || !newhash(SP_PARM))
return; /* malloc failure */
- for (i = 0; i < screen_lines; i++) {
- newhash[i] = hash(NEWTEXT(i));
- oldhash[i] = hash(OLDTEXT(i));
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, i));
+ oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
}
}
#ifdef HASH_VERIFY
- for (i = 0; i < screen_lines; i++) {
- if (newhash[i] != hash(NEWTEXT(i)))
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ if (newhash(SP_PARM)[i] != hash(SP_PARM, NEWTEXT(SP_PARM, i)))
fprintf(stderr, "error in newhash[%d]\n", i);
- if (oldhash[i] != hash(OLDTEXT(i)))
+ if (oldhash(SP_PARM)[i] != hash(SP_PARM, OLDTEXT(SP_PARM, i)))
fprintf(stderr, "error in oldhash[%d]\n", i);
}
#endif
@@ -320,28 +328,30 @@ _nc_hash_map(void)
/*
* 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)
+ memset(hashtab(SP_PARM), '\0',
+ sizeof(*(hashtab(SP_PARM)))
+ * ((size_t) screen_lines(SP_PARM) + 1) * 2);
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ unsigned long hashval = oldhash(SP_PARM)[i];
+
+ for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
+ if (hsp->hashval == hashval)
break;
- sp->hashval = hashval; /* in case this is a new entry */
- sp->oldcount++;
- sp->oldindex = i;
+ hsp->hashval = hashval; /* in case this is a new entry */
+ hsp->oldcount++;
+ hsp->oldindex = i;
}
- for (i = 0; i < screen_lines; i++) {
- unsigned long hashval = newhash[i];
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ unsigned long hashval = newhash(SP_PARM)[i];
- for (sp = hashtab; sp->hashval; sp++)
- if (sp->hashval == hashval)
+ for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
+ if (hsp->hashval == hashval)
break;
- sp->hashval = hashval; /* in case this is a new entry */
- sp->newcount++;
- sp->newindex = i;
+ hsp->hashval = hashval; /* in case this is a new entry */
+ hsp->newcount++;
+ hsp->newindex = i;
- OLDNUM(i) = _NEWINDEX; /* initialize old indices array */
+ OLDNUM(SP_PARM, i) = _NEWINDEX; /* initialize old indices array */
}
/*
@@ -351,16 +361,16 @@ _nc_hash_map(void)
* 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) {
+ for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
+ if (hsp->oldcount == 1 && hsp->newcount == 1
+ && hsp->oldindex != hsp->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;
+ hsp->newindex, hsp->oldindex));
+ OLDNUM(SP_PARM, hsp->newindex) = hsp->oldindex;
}
- grow_hunks();
+ grow_hunks(SP_PARM);
/*
* Eliminate bad or impossible shifts -- this includes removing
@@ -368,58 +378,83 @@ _nc_hash_map(void)
* 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)
+ for (i = 0; i < screen_lines(SP_PARM);) {
+ while (i < screen_lines(SP_PARM) && OLDNUM(SP_PARM, i) == _NEWINDEX)
i++;
- if (i >= screen_lines)
+ if (i >= screen_lines(SP_PARM))
break;
start = i;
- shift = OLDNUM(i) - i;
+ shift = OLDNUM(SP_PARM, i) - i;
i++;
- while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
- == shift)
+ while (i < screen_lines(SP_PARM)
+ && OLDNUM(SP_PARM, i) != _NEWINDEX
+ && OLDNUM(SP_PARM, i) - i == shift)
i++;
size = i - start;
if (size < 3 || size + min(size / 8, 2) < abs(shift)) {
while (start < i) {
- OLDNUM(start) = _NEWINDEX;
+ OLDNUM(SP_PARM, start) = _NEWINDEX;
start++;
}
}
}
/* After clearing invalid hunks, try grow the rest. */
- grow_hunks();
+ grow_hunks(SP_PARM);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_hash_map(void)
+{
+ NCURSES_SP_NAME(_nc_hash_map) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_DCLx int i)
+{
+ if (oldhash(SP_PARM))
+ oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
_nc_make_oldhash(int i)
{
- if (oldhash)
- oldhash[i] = hash(OLDTEXT(i));
+ NCURSES_SP_NAME(_nc_make_oldhash) (CURRENT_SCREEN, i);
}
+#endif
NCURSES_EXPORT(void)
-_nc_scroll_oldhash(int n, int top, int bot)
+NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_DCLx int n, int top, int bot)
{
size_t size;
int i;
- if (!oldhash)
+ if (!oldhash(SP_PARM))
return;
- size = sizeof(*oldhash) * (bot - top + 1 - abs(n));
+ size = sizeof(*(oldhash(SP_PARM))) * (size_t) (bot - top + 1 - abs(n));
if (n > 0) {
- memmove(oldhash + top, oldhash + top + n, size);
+ memmove(oldhash(SP_PARM) + top, oldhash(SP_PARM) + top + n, size);
for (i = bot; i > bot - n; i--)
- oldhash[i] = hash(OLDTEXT(i));
+ oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
} else {
- memmove(oldhash + top - n, oldhash + top, size);
+ memmove(oldhash(SP_PARM) + top - n, oldhash(SP_PARM) + top, size);
for (i = top; i < top - n; i++)
- oldhash[i] = hash(OLDTEXT(i));
+ oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
}
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_scroll_oldhash(int n, int top, int bot)
+{
+ NCURSES_SP_NAME(_nc_scroll_oldhash) (CURRENT_SCREEN, n, top, bot);
+}
+#endif
+
#ifdef HASHDEBUG
static void
usage(void)
diff --git a/ncurses/tty/lib_mvcur.c b/ncurses/tty/lib_mvcur.c
index 8e66fa3bf64c..ad41f8dd72d8 100644
--- a/ncurses/tty/lib_mvcur.c
+++ b/ncurses/tty/lib_mvcur.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -109,8 +110,8 @@
* 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) \
+#define NOT_LOCAL(sp, fy, fx, ty, tx) ((tx > LONG_DIST) \
+ && (tx < screen_columns(sp) - 1 - LONG_DIST) \
&& (abs(ty-fy) + abs(tx-fx) > LONG_DIST))
/****************************************************************************
@@ -152,13 +153,21 @@
*/
#include <curses.priv.h>
-#include <term.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_mvcur.c,v 1.113 2008/08/16 19:30:58 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_mvcur.c,v 1.126 2011/01/22 19:48:21 tom Exp $")
+
+#define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x] /* desired state */
-#define WANT_CHAR(y, x) SP->_newscr->_line[y].text[x] /* desired state */
-#define BAUDRATE cur_term->_baudrate /* bits per second */
+#if NCURSES_SP_FUNCS
+#define BAUDRATE(sp) sp->_term->_baudrate /* bits per second */
+#else
+#define BAUDRATE(sp) cur_term->_baudrate /* bits per second */
+#endif
#if defined(MAIN) || defined(NCURSES_TEST)
#include <sys/time.h>
@@ -169,7 +178,7 @@ static float diff;
#define OPT_SIZE 512
-static int normalized_cost(const char *const cap, int affcnt);
+static int normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt);
/****************************************************************************
*
@@ -179,34 +188,34 @@ static int normalized_cost(const char *const cap, int affcnt);
#ifdef TRACE
static int
-trace_cost_of(const char *capname, const char *cap, int affcnt)
+trace_cost_of(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
{
- int result = _nc_msec_cost(cap, affcnt);
+ int result = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx 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);
+#define CostOf(cap,affcnt) trace_cost_of(NCURSES_SP_ARGx #cap, cap, affcnt)
static int
-trace_normalized_cost(const char *capname, const char *cap, int affcnt)
+trace_normalized_cost(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
{
- int result = normalized_cost(cap, affcnt);
+ int result = normalized_cost(NCURSES_SP_ARGx 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);
+#define NormalizedCost(cap,affcnt) trace_normalized_cost(NCURSES_SP_ARGx #cap, cap, affcnt)
#else
-#define CostOf(cap,affcnt) _nc_msec_cost(cap,affcnt);
-#define NormalizedCost(cap,affcnt) normalized_cost(cap,affcnt);
+#define CostOf(cap,affcnt) NCURSES_SP_NAME(_nc_msec_cost)(NCURSES_SP_ARGx cap, affcnt)
+#define NormalizedCost(cap,affcnt) normalized_cost(NCURSES_SP_ARGx cap, affcnt)
#endif
NCURSES_EXPORT(int)
-_nc_msec_cost(const char *const cap, int affcnt)
+NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_DCLx const char *const cap, int affcnt)
/* compute the cost of a given operation */
{
if (cap == 0)
@@ -222,53 +231,68 @@ _nc_msec_cost(const char *const cap, int affcnt)
for (cp += 2; *cp != '>'; cp++) {
if (isdigit(UChar(*cp)))
- number = number * 10 + (*cp - '0');
+ number = number * 10 + (float) (*cp - '0');
else if (*cp == '*')
- number *= affcnt;
+ number *= (float) affcnt;
else if (*cp == '.' && (*++cp != '>') && isdigit(UChar(*cp)))
- number += (*cp - '0') / 10.0;
+ number += (float) ((*cp - '0') / 10.0);
}
#if NCURSES_NO_PADDING
- if (!GetNoPadding(SP))
+ if (!GetNoPadding(SP_PARM))
#endif
cum_cost += number * 10;
- } else
- cum_cost += SP->_char_padding;
+ } else if (SP_PARM) {
+ cum_cost += (float) SP_PARM->_char_padding;
+ }
}
return ((int) cum_cost);
}
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_msec_cost(const char *const cap, int affcnt)
+{
+ return NCURSES_SP_NAME(_nc_msec_cost) (CURRENT_SCREEN, cap, affcnt);
+}
+#endif
+
static int
-normalized_cost(const char *const cap, int affcnt)
+normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt)
/* compute the effective character-count for an operation (round up) */
{
- int cost = _nc_msec_cost(cap, affcnt);
+ int cost = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx cap, affcnt);
if (cost != INFINITY)
- cost = (cost + SP->_char_padding - 1) / SP->_char_padding;
+ cost = (cost + SP_PARM->_char_padding - 1) / SP_PARM->_char_padding;
return cost;
}
static void
-reset_scroll_region(void)
+reset_scroll_region(NCURSES_SP_DCL0)
/* Set the scroll-region to a known state (the default) */
{
if (change_scroll_region) {
- TPUTS_TRACE("change_scroll_region");
- putp(TPARM_2(change_scroll_region, 0, screen_lines - 1));
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "change_scroll_region",
+ TPARM_2(change_scroll_region,
+ 0, screen_lines(SP_PARM) - 1));
}
}
NCURSES_EXPORT(void)
-_nc_mvcur_resume(void)
+NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_DCL0)
/* what to do at initialization time and after each shellout */
{
+ if (SP_PARM && !IsTermInfo(SP_PARM))
+ return;
+
/* initialize screen for cursor access */
if (enter_ca_mode) {
- TPUTS_TRACE("enter_ca_mode");
- putp(enter_ca_mode);
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "enter_ca_mode",
+ enter_ca_mode);
}
/*
@@ -280,53 +304,63 @@ _nc_mvcur_resume(void)
* 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;
+ reset_scroll_region(NCURSES_SP_ARG);
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
/* restore cursor shape */
- if (SP->_cursor != -1) {
- int cursor = SP->_cursor;
- SP->_cursor = -1;
- curs_set(cursor);
+ if (SP_PARM->_cursor != -1) {
+ int cursor = SP_PARM->_cursor;
+ SP_PARM->_cursor = -1;
+ NCURSES_SP_NAME(curs_set) (NCURSES_SP_ARGx cursor);
}
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
-_nc_mvcur_init(void)
+_nc_mvcur_resume(void)
+{
+ NCURSES_SP_NAME(_nc_mvcur_resume) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_mvcur_init) (NCURSES_SP_DCL0)
/* initialize the cost structure */
{
- if (isatty(fileno(SP->_ofp)))
- SP->_char_padding = ((BAUDBYTE * 1000 * 10)
- / (BAUDRATE > 0 ? BAUDRATE : 9600));
+ if (SP_PARM->_ofp && isatty(fileno(SP_PARM->_ofp)))
+ SP_PARM->_char_padding = ((BAUDBYTE * 1000 * 10)
+ / (BAUDRATE(SP_PARM) > 0
+ ? BAUDRATE(SP_PARM)
+ : 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));
+ SP_PARM->_char_padding = 1; /* must be nonzero */
+ if (SP_PARM->_char_padding <= 0)
+ SP_PARM->_char_padding = 1; /* must be nonzero */
+ TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP_PARM->_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);
+ SP_PARM->_cr_cost = CostOf(carriage_return, 0);
+ SP_PARM->_home_cost = CostOf(cursor_home, 0);
+ SP_PARM->_ll_cost = CostOf(cursor_to_ll, 0);
#if USE_HARD_TABS
if (getenv("NCURSES_NO_HARD_TABS") == 0) {
- SP->_ht_cost = CostOf(tab, 0);
- SP->_cbt_cost = CostOf(back_tab, 0);
+ SP_PARM->_ht_cost = CostOf(tab, 0);
+ SP_PARM->_cbt_cost = CostOf(back_tab, 0);
} else {
- SP->_ht_cost = INFINITY;
- SP->_cbt_cost = INFINITY;
+ SP_PARM->_ht_cost = INFINITY;
+ SP_PARM->_cbt_cost = INFINITY;
}
#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;
+ SP_PARM->_cub1_cost = CostOf(cursor_left, 0);
+ SP_PARM->_cuf1_cost = CostOf(cursor_right, 0);
+ SP_PARM->_cud1_cost = CostOf(cursor_down, 0);
+ SP_PARM->_cuu1_cost = CostOf(cursor_up, 0);
+
+ SP_PARM->_smir_cost = CostOf(enter_insert_mode, 0);
+ SP_PARM->_rmir_cost = CostOf(exit_insert_mode, 0);
+ SP_PARM->_ip_cost = 0;
if (insert_padding) {
- SP->_ip_cost = CostOf(insert_padding, 0);
+ SP_PARM->_ip_cost = CostOf(insert_padding, 0);
}
/*
@@ -335,7 +369,7 @@ _nc_mvcur_init(void)
* 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;
+ SP_PARM->_address_cursor = cursor_address ? cursor_address : cursor_mem_address;
/*
* Parametrized local-motion strings. This static cost computation
@@ -361,40 +395,43 @@ _nc_mvcur_init(void)
* All these averages depend on the assumption that all parameter values
* are equally probable.
*/
- SP->_cup_cost = CostOf(TPARM_2(SP->_address_cursor, 23, 23), 1);
- SP->_cub_cost = CostOf(TPARM_1(parm_left_cursor, 23), 1);
- SP->_cuf_cost = CostOf(TPARM_1(parm_right_cursor, 23), 1);
- SP->_cud_cost = CostOf(TPARM_1(parm_down_cursor, 23), 1);
- SP->_cuu_cost = CostOf(TPARM_1(parm_up_cursor, 23), 1);
- SP->_hpa_cost = CostOf(TPARM_1(column_address, 23), 1);
- SP->_vpa_cost = CostOf(TPARM_1(row_address, 23), 1);
+ SP_PARM->_cup_cost = CostOf(TPARM_2(SP_PARM->_address_cursor, 23, 23), 1);
+ SP_PARM->_cub_cost = CostOf(TPARM_1(parm_left_cursor, 23), 1);
+ SP_PARM->_cuf_cost = CostOf(TPARM_1(parm_right_cursor, 23), 1);
+ SP_PARM->_cud_cost = CostOf(TPARM_1(parm_down_cursor, 23), 1);
+ SP_PARM->_cuu_cost = CostOf(TPARM_1(parm_up_cursor, 23), 1);
+ SP_PARM->_hpa_cost = CostOf(TPARM_1(column_address, 23), 1);
+ SP_PARM->_vpa_cost = CostOf(TPARM_1(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);
+ SP_PARM->_ed_cost = NormalizedCost(clr_eos, 1);
+ SP_PARM->_el_cost = NormalizedCost(clr_eol, 1);
+ SP_PARM->_el1_cost = NormalizedCost(clr_bol, 1);
+ SP_PARM->_dch1_cost = NormalizedCost(delete_character, 1);
+ SP_PARM->_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;
+ SP_PARM->_el_cost = 0;
/* parameterized screen-update strings */
- SP->_dch_cost = NormalizedCost(TPARM_1(parm_dch, 23), 1);
- SP->_ich_cost = NormalizedCost(TPARM_1(parm_ich, 23), 1);
- SP->_ech_cost = NormalizedCost(TPARM_1(erase_chars, 23), 1);
- SP->_rep_cost = NormalizedCost(TPARM_2(repeat_char, ' ', 23), 1);
-
- SP->_cup_ch_cost = NormalizedCost(TPARM_2(SP->_address_cursor, 23, 23), 1);
- SP->_hpa_ch_cost = NormalizedCost(TPARM_1(column_address, 23), 1);
- SP->_cuf_ch_cost = NormalizedCost(TPARM_1(parm_right_cursor, 23), 1);
- SP->_inline_cost = min(SP->_cup_ch_cost,
- min(SP->_hpa_ch_cost,
- SP->_cuf_ch_cost));
+ SP_PARM->_dch_cost = NormalizedCost(TPARM_1(parm_dch, 23), 1);
+ SP_PARM->_ich_cost = NormalizedCost(TPARM_1(parm_ich, 23), 1);
+ SP_PARM->_ech_cost = NormalizedCost(TPARM_1(erase_chars, 23), 1);
+ SP_PARM->_rep_cost = NormalizedCost(TPARM_2(repeat_char, ' ', 23), 1);
+
+ SP_PARM->_cup_ch_cost = NormalizedCost(
+ TPARM_2(SP_PARM->_address_cursor,
+ 23, 23),
+ 1);
+ SP_PARM->_hpa_ch_cost = NormalizedCost(TPARM_1(column_address, 23), 1);
+ SP_PARM->_cuf_ch_cost = NormalizedCost(TPARM_1(parm_right_cursor, 23), 1);
+ SP_PARM->_inline_cost = min(SP_PARM->_cup_ch_cost,
+ min(SP_PARM->_hpa_ch_cost,
+ SP_PARM->_cuf_ch_cost));
/*
* If save_cursor is used within enter_ca_mode, we should not use it for
@@ -411,30 +448,42 @@ _nc_mvcur_init(void)
}
/*
- * A different, possibly better way to arrange this would be to set
- * SP->_endwin = TRUE at window initialization time and let this be
+ * A different, possibly better way to arrange this would be to set the
+ * SCREEN's _endwin to TRUE at window initialization time and let this be
* called by doupdate's return-from-shellout code.
*/
- _nc_mvcur_resume();
+ NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
-_nc_mvcur_wrap(void)
+_nc_mvcur_init(void)
+{
+ NCURSES_SP_NAME(_nc_mvcur_init) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_mvcur_wrap) (NCURSES_SP_DCL0)
/* wrap up cursor-addressing mode */
{
/* leave cursor at screen bottom */
- mvcur(-1, -1, screen_lines - 1, 0);
+ TINFO_MVCUR(NCURSES_SP_ARGx -1, -1, screen_lines(SP_PARM) - 1, 0);
+
+ if (!SP_PARM || !IsTermInfo(SP_PARM))
+ return;
/* set cursor to normal mode */
- if (SP->_cursor != -1) {
- int cursor = SP->_cursor;
- curs_set(1);
- SP->_cursor = cursor;
+ if (SP_PARM->_cursor != -1) {
+ int cursor = SP_PARM->_cursor;
+ NCURSES_SP_NAME(curs_set) (NCURSES_SP_ARGx 1);
+ SP_PARM->_cursor = cursor;
}
if (exit_ca_mode) {
- TPUTS_TRACE("exit_ca_mode");
- putp(exit_ca_mode);
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "exit_ca_mode",
+ exit_ca_mode);
}
/*
* Reset terminal's tab counter. There's a long-time bug that
@@ -444,9 +493,17 @@ _nc_mvcur_wrap(void)
* escape sequences that reset things as column positions.
* Utter a \r to reset this invisibly.
*/
- _nc_outch('\r');
+ NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r');
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_mvcur_wrap(void)
+{
+ NCURSES_SP_NAME(_nc_mvcur_wrap) (CURRENT_SCREEN);
+}
+#endif
+
/****************************************************************************
*
* Optimized cursor movement
@@ -459,7 +516,7 @@ _nc_mvcur_wrap(void)
static NCURSES_INLINE int
repeated_append(string_desc * target, int total, int num, int repeat, const char *src)
{
- size_t need = repeat * strlen(src);
+ size_t need = (size_t) repeat * strlen(src);
if (need < target->s_size) {
while (repeat-- > 0) {
@@ -486,8 +543,13 @@ repeated_append(string_desc * target, int total, int num, int repeat, const char
#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)
+relative_move(NCURSES_SP_DCLx
+ 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;
@@ -500,38 +562,38 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
if (row_address != 0
&& _nc_safe_strcat(target, TPARM_1(row_address, to_y))) {
- vcost = SP->_vpa_cost;
+ vcost = SP_PARM->_vpa_cost;
}
if (to_y > from_y) {
n = (to_y - from_y);
if (parm_down_cursor
- && SP->_cud_cost < vcost
+ && SP_PARM->_cud_cost < vcost
&& _nc_safe_strcat(_nc_str_copy(target, &save),
TPARM_1(parm_down_cursor, n))) {
- vcost = SP->_cud_cost;
+ vcost = SP_PARM->_cud_cost;
}
if (cursor_down
- && (*cursor_down != '\n' || SP->_nl)
- && (n * SP->_cud1_cost < vcost)) {
+ && (*cursor_down != '\n' || SP_PARM->_nl)
+ && (n * SP_PARM->_cud1_cost < vcost)) {
vcost = repeated_append(_nc_str_copy(target, &save), 0,
- SP->_cud1_cost, n, cursor_down);
+ SP_PARM->_cud1_cost, n, cursor_down);
}
} else { /* (to_y < from_y) */
n = (from_y - to_y);
if (parm_up_cursor
- && SP->_cuu_cost < vcost
+ && SP_PARM->_cuu_cost < vcost
&& _nc_safe_strcat(_nc_str_copy(target, &save),
TPARM_1(parm_up_cursor, n))) {
- vcost = SP->_cuu_cost;
+ vcost = SP_PARM->_cuu_cost;
}
- if (cursor_up && (n * SP->_cuu1_cost < vcost)) {
+ if (cursor_up && (n * SP_PARM->_cuu1_cost < vcost)) {
vcost = repeated_append(_nc_str_copy(target, &save), 0,
- SP->_cuu1_cost, n, cursor_up);
+ SP_PARM->_cuu1_cost, n, cursor_up);
}
}
@@ -550,17 +612,17 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
if (column_address
&& _nc_safe_strcat(_nc_str_copy(target, &save),
TPARM_1(column_address, to_x))) {
- hcost = SP->_hpa_cost;
+ hcost = SP_PARM->_hpa_cost;
}
if (to_x > from_x) {
n = to_x - from_x;
if (parm_right_cursor
- && SP->_cuf_cost < hcost
+ && SP_PARM->_cuf_cost < hcost
&& _nc_safe_strcat(_nc_str_copy(target, &save),
TPARM_1(parm_right_cursor, n))) {
- hcost = SP->_cuf_cost;
+ hcost = SP_PARM->_cuf_cost;
}
if (cursor_right) {
@@ -575,7 +637,7 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) {
lhcost = repeated_append(&check, lhcost,
- SP->_ht_cost, 1, tab);
+ SP_PARM->_ht_cost, 1, tab);
if (lhcost == INFINITY)
break;
}
@@ -599,7 +661,7 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
&& n < (int) check.s_size
&& vcost == 0
&& str[0] == '\0') {
- int wanted = CharOf(WANT_CHAR(to_y, from_x));
+ int wanted = CharOf(WANT_CHAR(SP_PARM, to_y, from_x));
if (is8bits(wanted) && isdigit(wanted))
ovw = FALSE;
}
@@ -616,8 +678,8 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
int i;
for (i = 0; i < n; i++) {
- NCURSES_CH_T ch = WANT_CHAR(to_y, from_x + i);
- if (!SameAttrOf(ch, SCREEN_ATTRS(SP))
+ NCURSES_CH_T ch = WANT_CHAR(SP_PARM, to_y, from_x + i);
+ if (!SameAttrOf(ch, SCREEN_ATTRS(SP_PARM))
#if USE_WIDEC_SUPPORT
|| !Charable(ch)
#endif
@@ -631,13 +693,13 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
int i;
for (i = 0; i < n; i++)
- *check.s_tail++ = (char) CharOf(WANT_CHAR(to_y,
+ *check.s_tail++ = (char) CharOf(WANT_CHAR(SP_PARM, to_y,
from_x + i));
*check.s_tail = '\0';
- check.s_size -= n;
- lhcost += n * SP->_char_padding;
+ check.s_size -= (size_t) n;
+ lhcost += n * SP_PARM->_char_padding;
} else {
- lhcost = repeated_append(&check, lhcost, SP->_cuf1_cost,
+ lhcost = repeated_append(&check, lhcost, SP_PARM->_cuf1_cost,
n, cursor_right);
}
@@ -650,10 +712,10 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
n = from_x - to_x;
if (parm_left_cursor
- && SP->_cub_cost < hcost
+ && SP_PARM->_cub_cost < hcost
&& _nc_safe_strcat(_nc_str_copy(target, &save),
TPARM_1(parm_left_cursor, n))) {
- hcost = SP->_cub_cost;
+ hcost = SP_PARM->_cub_cost;
}
if (cursor_left) {
@@ -667,7 +729,8 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) {
lhcost = repeated_append(&check, lhcost,
- SP->_cbt_cost, 1, back_tab);
+ SP_PARM->_cbt_cost,
+ 1, back_tab);
if (lhcost == INFINITY)
break;
}
@@ -676,7 +739,9 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
}
#endif /* USE_HARD_TABS */
- lhcost = repeated_append(&check, lhcost, SP->_cub1_cost, n, cursor_left);
+ lhcost = repeated_append(&check, lhcost,
+ SP_PARM->_cub1_cost,
+ n, cursor_left);
if (lhcost < hcost
&& _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
@@ -705,7 +770,7 @@ relative_move(string_desc * target, int from_y, int from_x, int to_y, int
*/
static NCURSES_INLINE int
-onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
+onscreen_mvcur(NCURSES_SP_DCLx int yold, int xold, int ynew, int xnew, bool ovw)
/* onscreen move from (yold, xold) to (ynew, xnew) */
{
string_desc result;
@@ -723,9 +788,9 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
#define InitResult _nc_str_init(&result, buffer, sizeof(buffer))
/* tactic #0: use direct cursor addressing */
- if (_nc_safe_strcpy(InitResult, TPARM_2(SP->_address_cursor, ynew, xnew))) {
+ if (_nc_safe_strcpy(InitResult, TPARM_2(SP_PARM->_address_cursor, ynew, xnew))) {
tactic = 0;
- usecost = SP->_cup_cost;
+ usecost = SP_PARM->_cup_cost;
#if defined(TRACE) || defined(NCURSES_TEST)
if (!(_nc_optimize_enable & OPTIMIZE_MVCUR))
@@ -740,7 +805,7 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
* (like, say, local-movement \n getting mapped to some obscure
* character because A_ALTCHARSET is on).
*/
- if (yold == -1 || xold == -1 || NOT_LOCAL(yold, xold, ynew, xnew)) {
+ if (yold == -1 || xold == -1 || NOT_LOCAL(SP_PARM, yold, xold, ynew, xnew)) {
#if defined(MAIN) || defined(NCURSES_TEST)
if (!profiling) {
(void) fputs("nonlocal\n", stderr);
@@ -754,8 +819,10 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
#ifndef NO_OPTIMIZE
/* tactic #1: use local movement */
if (yold != -1 && xold != -1
- && ((newcost = relative_move(NullResult, yold, xold, ynew, xnew,
- ovw)) != INFINITY)
+ && ((newcost = relative_move(NCURSES_SP_ARGx
+ NullResult,
+ yold, xold,
+ ynew, xnew, ovw)) != INFINITY)
&& newcost < usecost) {
tactic = 1;
usecost = newcost;
@@ -763,42 +830,51 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
/* 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) {
+ && ((newcost = relative_move(NCURSES_SP_ARGx
+ NullResult,
+ yold, 0,
+ ynew, xnew, ovw)) != INFINITY)
+ && SP_PARM->_cr_cost + newcost < usecost) {
tactic = 2;
- usecost = SP->_cr_cost + newcost;
+ usecost = SP_PARM->_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) {
+ && ((newcost = relative_move(NCURSES_SP_ARGx
+ NullResult,
+ 0, 0,
+ ynew, xnew, ovw)) != INFINITY)
+ && SP_PARM->_home_cost + newcost < usecost) {
tactic = 3;
- usecost = SP->_home_cost + newcost;
+ usecost = SP_PARM->_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) {
+ && ((newcost = relative_move(NCURSES_SP_ARGx
+ NullResult,
+ screen_lines(SP_PARM) - 1, 0,
+ ynew, xnew, ovw)) != INFINITY)
+ && SP_PARM->_ll_cost + newcost < usecost) {
tactic = 4;
- usecost = SP->_ll_cost + newcost;
+ usecost = SP_PARM->_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);
+ t5_cr_cost = (xold > 0 ? SP_PARM->_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) {
+ && ((newcost = relative_move(NCURSES_SP_ARGx
+ NullResult,
+ yold - 1, screen_columns(SP_PARM) - 1,
+ ynew, xnew, ovw)) != INFINITY)
+ && t5_cr_cost + SP_PARM->_cub1_cost + newcost < usecost) {
tactic = 5;
- usecost = t5_cr_cost + SP->_cub1_cost + newcost;
+ usecost = t5_cr_cost + SP_PARM->_cub1_cost + newcost;
}
/*
@@ -808,26 +884,39 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
InitResult;
switch (tactic) {
case 1:
- (void) relative_move(&result, yold, xold, ynew, xnew, ovw);
+ (void) relative_move(NCURSES_SP_ARGx
+ &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);
+ (void) relative_move(NCURSES_SP_ARGx
+ &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);
+ (void) relative_move(NCURSES_SP_ARGx
+ &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);
+ (void) relative_move(NCURSES_SP_ARGx
+ &result,
+ screen_lines(SP_PARM) - 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);
+ (void) relative_move(NCURSES_SP_ARGx
+ &result,
+ yold - 1, screen_columns(SP_PARM) - 1,
+ ynew, xnew, ovw);
break;
}
#endif /* !NO_OPTIMIZE */
@@ -845,25 +934,26 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
if (usecost != INFINITY) {
TPUTS_TRACE("mvcur");
- tputs(buffer, 1, _nc_outch);
- SP->_cursrow = ynew;
- SP->_curscol = xnew;
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ buffer, 1, NCURSES_SP_NAME(_nc_outch));
+ SP_PARM->_cursrow = ynew;
+ SP_PARM->_curscol = xnew;
return (OK);
} else
return (ERR);
}
NCURSES_EXPORT(int)
-mvcur(int yold, int xold, int ynew, int xnew)
+TINFO_MVCUR(NCURSES_SP_DCLx int yold, int xold, int ynew, int xnew)
/* optimized cursor move from (yold, xold) to (ynew, xnew) */
{
NCURSES_CH_T oldattr;
int code;
- TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"),
- yold, xold, ynew, xnew));
+ TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("_nc_tinfo_mvcur(%p,%d,%d,%d,%d)"),
+ (void *) SP_PARM, yold, xold, ynew, xnew));
- if (SP == 0) {
+ if (SP_PARM == 0) {
code = ERR;
} else if (yold == ynew && xold == xnew) {
code = OK;
@@ -874,9 +964,9 @@ mvcur(int yold, int xold, int ynew, int xnew)
* 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;
+ if (xnew >= screen_columns(SP_PARM)) {
+ ynew += xnew / screen_columns(SP_PARM);
+ xnew %= screen_columns(SP_PARM);
}
/*
@@ -884,38 +974,40 @@ mvcur(int yold, int xold, int ynew, int xnew)
* character set -- these have a strong tendency to screw up the CR &
* LF used for local character motions!
*/
- oldattr = SCREEN_ATTRS(SP);
+ oldattr = SCREEN_ATTRS(SP_PARM);
if ((AttrOf(oldattr) & A_ALTCHARSET)
|| (AttrOf(oldattr) && !move_standout_mode)) {
TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move",
(unsigned long) AttrOf(oldattr),
_traceattr(AttrOf(oldattr))));
- (void) VIDATTR(A_NORMAL, 0);
+ (void) VIDATTR(SP_PARM, A_NORMAL, 0);
}
- if (xold >= screen_columns) {
+ if (xold >= screen_columns(SP_PARM)) {
int l;
- if (SP->_nl) {
- l = (xold + 1) / screen_columns;
+ if (SP_PARM->_nl) {
+ l = (xold + 1) / screen_columns(SP_PARM);
yold += l;
- if (yold >= screen_lines)
- l -= (yold - screen_lines - 1);
+ if (yold >= screen_lines(SP_PARM))
+ l -= (yold - screen_lines(SP_PARM) - 1);
if (l > 0) {
if (carriage_return) {
- TPUTS_TRACE("carriage_return");
- putp(carriage_return);
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "carriage_return",
+ carriage_return);
} else
- _nc_outch('\r');
+ NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r');
xold = 0;
while (l > 0) {
if (newline) {
- TPUTS_TRACE("newline");
- putp(newline);
+ NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
+ "newline",
+ newline);
} else
- _nc_outch('\n');
+ NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\n');
l--;
}
}
@@ -929,27 +1021,35 @@ mvcur(int yold, int xold, int ynew, int xnew)
}
}
- if (yold > screen_lines - 1)
- yold = screen_lines - 1;
- if (ynew > screen_lines - 1)
- ynew = screen_lines - 1;
+ if (yold > screen_lines(SP_PARM) - 1)
+ yold = screen_lines(SP_PARM) - 1;
+ if (ynew > screen_lines(SP_PARM) - 1)
+ ynew = screen_lines(SP_PARM) - 1;
/* destination location is on screen now */
- code = onscreen_mvcur(yold, xold, ynew, xnew, TRUE);
+ code = onscreen_mvcur(NCURSES_SP_ARGx yold, xold, ynew, xnew, TRUE);
/*
* Restore attributes if we disabled them before moving.
*/
- if (!SameAttrOf(oldattr, SCREEN_ATTRS(SP))) {
+ if (!SameAttrOf(oldattr, SCREEN_ATTRS(SP_PARM))) {
TR(TRACE_CHARPUT, ("turning on (%#lx) %s after move",
(unsigned long) AttrOf(oldattr),
_traceattr(AttrOf(oldattr))));
- (void) VIDATTR(AttrOf(oldattr), GetPair(oldattr));
+ (void) VIDATTR(SP_PARM, AttrOf(oldattr), GetPair(oldattr));
}
}
returnCode(code);
}
+#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER)
+NCURSES_EXPORT(int)
+mvcur(int yold, int xold, int ynew, int xnew)
+{
+ return NCURSES_SP_NAME(mvcur) (CURRENT_SCREEN, yold, xold, ynew, xnew);
+}
+#endif
+
#if defined(TRACE) || defined(NCURSES_TEST)
NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL;
#endif
@@ -1212,25 +1312,25 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
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);
+ (void) printf("char padding: %d\n", CURRENT_SCREEN->_char_padding);
+ (void) printf("cr cost: %d\n", CURRENT_SCREEN->_cr_cost);
+ (void) printf("cup cost: %d\n", CURRENT_SCREEN->_cup_cost);
+ (void) printf("home cost: %d\n", CURRENT_SCREEN->_home_cost);
+ (void) printf("ll cost: %d\n", CURRENT_SCREEN->_ll_cost);
#if USE_HARD_TABS
- (void) printf("ht cost: %d\n", SP->_ht_cost);
- (void) printf("cbt cost: %d\n", SP->_cbt_cost);
+ (void) printf("ht cost: %d\n", CURRENT_SCREEN->_ht_cost);
+ (void) printf("cbt cost: %d\n", CURRENT_SCREEN->_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);
+ (void) printf("cub1 cost: %d\n", CURRENT_SCREEN->_cub1_cost);
+ (void) printf("cuf1 cost: %d\n", CURRENT_SCREEN->_cuf1_cost);
+ (void) printf("cud1 cost: %d\n", CURRENT_SCREEN->_cud1_cost);
+ (void) printf("cuu1 cost: %d\n", CURRENT_SCREEN->_cuu1_cost);
+ (void) printf("cub cost: %d\n", CURRENT_SCREEN->_cub_cost);
+ (void) printf("cuf cost: %d\n", CURRENT_SCREEN->_cuf_cost);
+ (void) printf("cud cost: %d\n", CURRENT_SCREEN->_cud_cost);
+ (void) printf("cuu cost: %d\n", CURRENT_SCREEN->_cuu_cost);
+ (void) printf("hpa cost: %d\n", CURRENT_SCREEN->_hpa_cost);
+ (void) printf("vpa cost: %d\n", CURRENT_SCREEN->_vpa_cost);
} else if (buf[0] == 'x' || buf[0] == 'q')
break;
else
diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c
index 06c8411caa4d..70f805a2ad5e 100644
--- a/ncurses/tty/lib_tstp.c
+++ b/ncurses/tty/lib_tstp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -46,7 +46,7 @@
#define _POSIX_SOURCE
#endif
-MODULE_ID("$Id: lib_tstp.c,v 1.37 2008/05/03 16:24:56 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.41 2010/05/15 21:31:12 tom Exp $")
#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
#define USE_SIGTSTP 1
@@ -59,16 +59,20 @@ static const char *
signal_name(int sig)
{
switch (sig) {
+#ifdef SIGALRM
case SIGALRM:
return "SIGALRM";
+#endif
#ifdef SIGCONT
case SIGCONT:
return "SIGCONT";
#endif
case SIGINT:
return "SIGINT";
+#ifdef SIGQUIT
case SIGQUIT:
return "SIGQUIT";
+#endif
case SIGTERM:
return "SIGTERM";
#ifdef SIGTSTP
@@ -136,6 +140,7 @@ signal_name(int sig)
static void
tstp(int dummy GCC_UNUSED)
{
+ SCREEN *sp = CURRENT_SCREEN;
sigset_t mask, omask;
sigaction_t act, oact;
@@ -154,11 +159,11 @@ tstp(int dummy GCC_UNUSED)
* 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 (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();
+ NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
/*
* Block window change and timer signals. The latter
@@ -166,7 +171,9 @@ tstp(int dummy GCC_UNUSED)
* to repaint the screen.
*/
(void) sigemptyset(&mask);
+#ifdef SIGALRM
(void) sigaddset(&mask, SIGALRM);
+#endif
#if USE_SIGWINCH
(void) sigaddset(&mask, SIGWINCH);
#endif
@@ -185,7 +192,7 @@ tstp(int dummy GCC_UNUSED)
* End window mode, which also resets the terminal state to the
* original (pre-curses) modes.
*/
- endwin();
+ NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG);
/* Unblock SIGTSTP. */
(void) sigemptyset(&mask);
@@ -212,19 +219,19 @@ tstp(int dummy GCC_UNUSED)
T(("SIGCONT received"));
sigaction(SIGTSTP, &oact, NULL);
- flushinp();
+ NCURSES_SP_NAME(flushinp) (NCURSES_SP_ARG);
/*
* 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();
+ NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
/*
* This relies on the fact that doupdate() will restore the
* program-mode tty state, and issue enter_ca_mode if need be.
*/
- doupdate();
+ NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
/* Reset the signals. */
(void) sigprocmask(SIG_SETMASK, &omask, NULL);
@@ -234,6 +241,8 @@ tstp(int dummy GCC_UNUSED)
static void
cleanup(int sig)
{
+ SCREEN *sp = CURRENT_SCREEN;
+
/*
* 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
@@ -241,7 +250,10 @@ cleanup(int sig)
*/
if (!_nc_globals.cleanup_nested++
&& (sig == SIGINT
- || sig == SIGQUIT)) {
+#ifdef SIGQUIT
+ || sig == SIGQUIT
+#endif
+ )) {
#if HAVE_SIGACTION || HAVE_SIGVEC
sigaction_t act;
sigemptyset(&act.sa_mask);
@@ -257,12 +269,12 @@ cleanup(int sig)
if (scan->_ofp != 0
&& isatty(fileno(scan->_ofp))) {
scan->_cleanup = TRUE;
- scan->_outch = _nc_outch;
+ scan->_outch = NCURSES_SP_NAME(_nc_outch);
}
set_term(scan);
- endwin();
- if (SP)
- SP->_endwin = FALSE; /* in case we have an atexit! */
+ NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG);
+ if (sp)
+ sp->_endwin = FALSE; /* in case we have an atexit! */
}
}
}
@@ -274,6 +286,13 @@ static void
sigwinch(int sig GCC_UNUSED)
{
_nc_globals.have_sigwinch = 1;
+# if USE_PTHREADS_EINTR
+ if (_nc_globals.read_thread) {
+ if (!pthread_equal(pthread_self(), _nc_globals.read_thread))
+ pthread_kill(_nc_globals.read_thread, SIGWINCH);
+ _nc_globals.read_thread = 0;
+ }
+# endif
}
#endif /* USE_SIGWINCH */
diff --git a/ncurses/tty/lib_twait.c b/ncurses/tty/lib_twait.c
index 16d12edbbe3c..329ec29a019f 100644
--- a/ncurses/tty/lib_twait.c
+++ b/ncurses/tty/lib_twait.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -65,10 +65,12 @@
# include <sys/select.h>
# endif
#endif
-
+#ifdef __MINGW32__
+# include <sys/time.h>
+#endif
#undef CUR
-MODULE_ID("$Id: lib_twait.c,v 1.59 2008/08/30 20:08:19 tom Exp $")
+MODULE_ID("$Id: lib_twait.c,v 1.61 2010/12/25 23:43:58 tom Exp $")
static long
_nc_gettime(TimeType * t0, bool first)
@@ -124,15 +126,27 @@ _nc_eventlist_timeout(_nc_eventlist * evl)
}
#endif /* NCURSES_WGETCH_EVENTS */
+#if (USE_FUNC_POLL || HAVE_SELECT)
+# define MAYBE_UNUSED
+#else
+# define MAYBE_UNUSED GCC_UNUSED
+#endif
+
+#if (USE_FUNC_POLL || HAVE_SELECT)
+# define MAYBE_UNUSED
+#else
+# define MAYBE_UNUSED GCC_UNUSED
+#endif
+
/*
* 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.
- *
+ * TW_NONE 0 - none (absolute time)
+ * TW_INPUT 1 - ncurses' normal input-descriptor
+ * TW_MOUSE 2 - mouse descriptor, if any
+ * TW_ANY 3 - either input or mouse.
+ * TW_EVENT 4 -
* 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.
@@ -143,16 +157,18 @@ _nc_eventlist_timeout(_nc_eventlist * evl)
* descriptors.
*/
NCURSES_EXPORT(int)
-_nc_timed_wait(SCREEN *sp,
- int mode,
+_nc_timed_wait(SCREEN *sp MAYBE_UNUSED,
+ int mode MAYBE_UNUSED,
int milliseconds,
int *timeleft
EVENTLIST_2nd(_nc_eventlist * evl))
{
- int fd;
int count;
- int result = 0;
+ int result = TW_NONE;
TimeType t0;
+#if (USE_FUNC_POLL || HAVE_SELECT)
+ int fd;
+#endif
#ifdef NCURSES_WGETCH_EVENTS
int timeout_is_event = 0;
@@ -174,7 +190,7 @@ _nc_timed_wait(SCREEN *sp,
milliseconds, mode));
#ifdef NCURSES_WGETCH_EVENTS
- if (mode & 4) {
+ if (mode & TW_EVENT) {
int event_delay = _nc_eventlist_timeout(evl);
if (event_delay >= 0
@@ -193,7 +209,7 @@ _nc_timed_wait(SCREEN *sp,
count = 0;
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl)
+ if ((mode & TW_EVENT) && evl)
evl->result_flags = 0;
#endif
@@ -201,23 +217,23 @@ _nc_timed_wait(SCREEN *sp,
memset(fd_list, 0, sizeof(fd_list));
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl)
+ if ((mode & TW_EVENT) && evl)
fds = typeMalloc(struct pollfd, MIN_FDS + evl->count);
#endif
- if (mode & 1) {
+ if (mode & TW_INPUT) {
fds[count].fd = sp->_ifd;
fds[count].events = POLLIN;
count++;
}
- if ((mode & 2)
+ if ((mode & TW_MOUSE)
&& (fd = sp->_mouse_fd) >= 0) {
fds[count].fd = fd;
fds[count].events = POLLIN;
count++;
}
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl) {
+ if ((mode & TW_EVENT) && evl) {
for (n = 0; n < evl->count; ++n) {
_nc_event *ev = evl->events[n];
@@ -234,7 +250,7 @@ _nc_timed_wait(SCREEN *sp,
result = poll(fds, (unsigned) count, milliseconds);
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl) {
+ if ((mode & TW_EVENT) && evl) {
int c;
if (!result)
@@ -276,8 +292,8 @@ _nc_timed_wait(SCREEN *sp,
*
* FIXME: this assumes mode&1 if milliseconds < 0 (see lib_getch.c).
*/
- result = 0;
- if (mode & 1) {
+ result = TW_NONE;
+ if (mode & TW_INPUT) {
int step = (milliseconds < 0) ? 0 : 5000;
bigtime_t d;
bigtime_t useconds = milliseconds * 1000;
@@ -313,17 +329,17 @@ _nc_timed_wait(SCREEN *sp,
*/
FD_ZERO(&set);
- if (mode & 1) {
+ if (mode & TW_INPUT) {
FD_SET(sp->_ifd, &set);
count = sp->_ifd + 1;
}
- if ((mode & 2)
+ if ((mode & TW_MOUSE)
&& (fd = sp->_mouse_fd) >= 0) {
FD_SET(fd, &set);
count = max(fd, count) + 1;
}
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl) {
+ if ((mode & TW_EVENT) && evl) {
for (n = 0; n < evl->count; ++n) {
_nc_event *ev = evl->events[n];
@@ -346,7 +362,7 @@ _nc_timed_wait(SCREEN *sp,
}
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl) {
+ if ((mode & TW_EVENT) && evl) {
evl->result_flags = 0;
for (n = 0; n < evl->count; ++n) {
_nc_event *ev = evl->events[n];
@@ -370,7 +386,7 @@ _nc_timed_wait(SCREEN *sp,
returntime = _nc_gettime(&t0, FALSE);
if (milliseconds >= 0)
- milliseconds -= (returntime - starttime);
+ milliseconds -= (int) (returntime - starttime);
#ifdef NCURSES_WGETCH_EVENTS
if (evl) {
@@ -428,22 +444,22 @@ _nc_timed_wait(SCREEN *sp,
}
}
#elif defined(__BEOS__)
- result = 1; /* redundant, but simple */
+ result = TW_INPUT; /* redundant, but simple */
#elif HAVE_SELECT
- if ((mode & 2)
+ if ((mode & TW_MOUSE)
&& (fd = sp->_mouse_fd) >= 0
&& FD_ISSET(fd, &set))
- result |= 2;
- if ((mode & 1)
+ result |= TW_MOUSE;
+ if ((mode & TW_INPUT)
&& FD_ISSET(sp->_ifd, &set))
- result |= 1;
+ result |= TW_INPUT;
#endif
} else
result = 0;
}
#ifdef NCURSES_WGETCH_EVENTS
- if ((mode & 4) && evl && evl->result_flags)
- result |= 4;
+ if ((mode & TW_EVENT) && evl && evl->result_flags)
+ result |= TW_EVENT;
#endif
return (result);
diff --git a/ncurses/tty/lib_vidattr.c b/ncurses/tty/lib_vidattr.c
index ac2a74f08e01..9656b3c70ee6 100644
--- a/ncurses/tty/lib_vidattr.c
+++ b/ncurses/tty/lib_vidattr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,8 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
- * and: Thomas E. Dickey 1996 on *
+ * and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*
@@ -63,11 +64,16 @@
*/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_vidattr.c,v 1.49 2007/06/30 21:58:04 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_vidattr.c,v 1.61 2010/06/05 22:22:04 tom Exp $")
-#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
+#define doPut(mode) \
+ TPUTS_TRACE(#mode); \
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc)
#define TurnOn(mask,mode) \
if ((turn_on & mask) && mode) { doPut(mode); }
@@ -78,40 +84,49 @@ MODULE_ID("$Id: lib_vidattr.c,v 1.49 2007/06/30 21:58:04 tom Exp $")
/* 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); \
+ int old_pair = PairNumber(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_SP_NAME(_nc_do_color)(NCURSES_SP_ARGx \
+ (short) old_pair, \
+ (short) pair, \
+ reverse, outc); \
} \
}
#define PreviousAttr _nc_prescreen.previous_attr
NCURSES_EXPORT(int)
-vidputs(chtype newmode, int (*outc) (int))
+NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx
+ chtype newmode,
+ NCURSES_SP_OUTC outc)
{
attr_t turn_on, turn_off;
int pair;
bool reverse = FALSE;
- bool can_color = (SP == 0 || SP->_coloron);
+ bool can_color = (SP_PARM == 0 || SP_PARM->_coloron);
#if NCURSES_EXT_FUNCS
- bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
+ bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_color);
#else
#define fix_pair0 FALSE
#endif
newmode &= A_ATTRIBUTES;
- T((T_CALLED("vidputs(%s)"), _traceattr(newmode)));
+
+ T((T_CALLED("vidputs(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
+
+ if (!IsTermInfo(SP_PARM))
+ returnCode(ERR);
/* this allows us to go on whether or not newterm() has been called */
- if (SP)
- PreviousAttr = AttrOf(SCREEN_ATTRS(SP));
+ if (SP_PARM)
+ PreviousAttr = AttrOf(SCREEN_ATTRS(SP_PARM));
TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(PreviousAttr)));
- if ((SP != 0)
+ if ((SP_PARM != 0)
&& (magic_cookie_glitch > 0)) {
#if USE_XMC_SUPPORT
static const chtype table[] =
@@ -135,7 +150,7 @@ vidputs(chtype newmode, int (*outc) (int))
* the terminfo max_attributes value.
*/
for (n = 0; n < SIZEOF(table); ++n) {
- if ((table[n] & SP->_ok_attributes) == 0) {
+ if ((table[n] & SP_PARM->_ok_attributes) == 0) {
newmode &= ~table[n];
} else if ((table[n] & newmode) != 0) {
if (used++ >= limit) {
@@ -148,7 +163,7 @@ vidputs(chtype newmode, int (*outc) (int))
}
}
#else
- newmode &= ~(SP->_xmc_suppress);
+ newmode &= ~(SP_PARM->_xmc_suppress);
#endif
TR(TRACE_ATTRS, ("suppressed attribute is %s", _traceattr(newmode)));
}
@@ -172,7 +187,7 @@ vidputs(chtype newmode, int (*outc) (int))
* 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;
+ unsigned value = (unsigned) no_color_video;
attr_t mask = NCURSES_BITS((value & 63)
| ((value & 192) << 1)
| ((value & 256) >> 2), 8);
@@ -188,7 +203,7 @@ vidputs(chtype newmode, int (*outc) (int))
if (newmode == PreviousAttr)
returnCode(OK);
- pair = PAIR_NUMBER(newmode);
+ pair = PairNumber(newmode);
if (reverse) {
newmode &= ~A_REVERSE;
@@ -208,10 +223,10 @@ vidputs(chtype newmode, int (*outc) (int))
if (exit_attribute_mode) {
doPut(exit_attribute_mode);
} else {
- if (!SP || SP->_use_rmul) {
+ if (!SP_PARM || SP_PARM->_use_rmul) {
TurnOff(A_UNDERLINE, exit_underline_mode);
}
- if (!SP || SP->_use_rmso) {
+ if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
}
@@ -222,16 +237,18 @@ vidputs(chtype newmode, int (*outc) (int))
} 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);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ 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);
PreviousAttr &= ALL_BUT_COLOR;
}
SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
@@ -241,11 +258,11 @@ vidputs(chtype newmode, int (*outc) (int))
TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
- if (!SP || SP->_use_rmul) {
+ if (!SP_PARM || SP_PARM->_use_rmul) {
TurnOff(A_UNDERLINE, exit_underline_mode);
}
- if (!SP || SP->_use_rmso) {
+ if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
@@ -282,28 +299,53 @@ vidputs(chtype newmode, int (*outc) (int))
if (reverse)
newmode |= A_REVERSE;
- if (SP)
- SetAttr(SCREEN_ATTRS(SP), newmode);
+ if (SP_PARM)
+ SetAttr(SCREEN_ATTRS(SP_PARM), newmode);
else
PreviousAttr = newmode;
returnCode(OK);
}
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(int)
-vidattr(chtype newmode)
+vidputs(chtype newmode, NCURSES_OUTC outc)
{
- T((T_CALLED("vidattr(%s)"), _traceattr(newmode)));
+ SetSafeOutcWrapper(outc);
+ return NCURSES_SP_NAME(vidputs) (CURRENT_SCREEN,
+ newmode,
+ _nc_outc_wrapper);
+}
+#endif
- returnCode(vidputs(newmode, _nc_outch));
+NCURSES_EXPORT(int)
+NCURSES_SP_NAME(vidattr) (NCURSES_SP_DCLx chtype newmode)
+{
+ T((T_CALLED("vidattr(%p,%s)"), (void *) SP_PARM, _traceattr(newmode)));
+ returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx
+ newmode,
+ NCURSES_SP_NAME(_nc_outch)));
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+vidattr(chtype newmode)
+{
+ return NCURSES_SP_NAME(vidattr) (CURRENT_SCREEN, newmode);
+}
+#endif
+
NCURSES_EXPORT(chtype)
-termattrs(void)
+NCURSES_SP_NAME(termattrs) (NCURSES_SP_DCL0)
{
chtype attrs = A_NORMAL;
- T((T_CALLED("termattrs()")));
+ T((T_CALLED("termattrs(%p)"), (void *) SP_PARM));
+#ifdef USE_TERM_DRIVER
+ if (HasTerminal(SP_PARM))
+ attrs = CallDriver(SP_PARM, conattr);
+#else
+
if (enter_alt_charset_mode)
attrs |= A_ALTCHARSET;
@@ -331,8 +373,17 @@ termattrs(void)
if (enter_underline_mode)
attrs |= A_UNDERLINE;
- if (SP->_coloron)
+ if (SP_PARM->_coloron)
attrs |= A_COLOR;
- returnChar(attrs);
+#endif
+ returnChtype(attrs);
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(chtype)
+termattrs(void)
+{
+ return NCURSES_SP_NAME(termattrs) (CURRENT_SCREEN);
}
+#endif
diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c
index 6a3a0c8e9341..f0d2369c18d6 100644
--- a/ncurses/tty/tty_update.c
+++ b/ncurses/tty/tty_update.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,6 +30,7 @@
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
* and: Thomas E. Dickey 1996-on *
+ * and: Juergen Pfeifer 2009 *
****************************************************************************/
/*-----------------------------------------------------------------
@@ -38,12 +39,16 @@
*
* The routine doupdate() and its dependents.
* All physical output is concentrated here (except _nc_outch()
- * in lib_tputs.c).
+ * in lib_tputs.c).
*
*-----------------------------------------------------------------*/
#include <curses.priv.h>
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
#if defined __HAIKU__ && defined __BEOS__
#undef __BEOS__
#endif
@@ -76,9 +81,8 @@
#endif
#include <ctype.h>
-#include <term.h>
-MODULE_ID("$Id: tty_update.c,v 1.246 2008/08/30 20:08:19 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.264 2010/12/19 01:21:02 tom Exp $")
/*
* This define controls the line-breakout optimization. Every once in a
@@ -91,7 +95,7 @@ MODULE_ID("$Id: tty_update.c,v 1.246 2008/08/30 20:08:19 tom Exp $")
*/
#define CHECK_INTERVAL 5
-#define FILL_BCE() (SP->_coloron && !SP->_default_color && !back_color_erase)
+#define FILL_BCE(sp) (sp->_coloron && !sp->_default_color && !back_color_erase)
static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
static NCURSES_CH_T normal = NewChar(BLANK_TEXT);
@@ -103,13 +107,23 @@ static NCURSES_CH_T normal = NewChar(BLANK_TEXT);
*/
/* #define POSITION_DEBUG */
-static NCURSES_INLINE NCURSES_CH_T ClrBlank(WINDOW *win);
+static NCURSES_INLINE NCURSES_CH_T ClrBlank(NCURSES_SP_DCLx WINDOW *win);
+
+#if NCURSES_SP_FUNCS
+static int ClrBottom(SCREEN *, int total);
+static void ClearScreen(SCREEN *, NCURSES_CH_T blank);
+static void ClrUpdate(SCREEN *);
+static void DelChar(SCREEN *, int count);
+static void InsStr(SCREEN *, NCURSES_CH_T * line, int count);
+static void TransformLine(SCREEN *, int const lineno);
+#else
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);
+#endif
#ifdef POSITION_DEBUG
/****************************************************************************
@@ -119,7 +133,7 @@ static void TransformLine(int const lineno);
****************************************************************************/
static void
-position_check(int expected_y, int expected_x, char *legend)
+position_check(NCURSES_SP_DCLx int expected_y, int expected_x, char *legend)
/* check to see if the real cursor position matches the virtual */
{
char buf[20];
@@ -129,10 +143,10 @@ position_check(int expected_y, int expected_x, char *legend)
if (!_nc_tracing || (expected_y < 0 && expected_x < 0))
return;
- _nc_flush();
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
memset(buf, '\0', sizeof(buf));
- putp("\033[6n"); /* only works on ANSI-compatibles */
- _nc_flush();
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx "\033[6n"); /* only works on ANSI-compatibles */
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
*(s = buf) = 0;
do {
int ask = sizeof(buf) - 1 - (s - buf);
@@ -152,8 +166,12 @@ position_check(int expected_y, int expected_x, char *legend)
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);
+ NCURSES_SP_NAME(beep) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ tparm("\033[%d;%dH",
+ expected_y + 1,
+ expected_x + 1),
+ 1, NCURSES_SP_NAME(_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 {
@@ -162,7 +180,7 @@ position_check(int expected_y, int expected_x, char *legend)
}
}
#else
-#define position_check(expected_y, expected_x, legend) /* nothing */
+#define position_check(sp, expected_y, expected_x, legend) /* nothing */
#endif /* POSITION_DEBUG */
/****************************************************************************
@@ -172,19 +190,22 @@ position_check(int expected_y, int expected_x, char *legend)
****************************************************************************/
static NCURSES_INLINE void
-GoTo(int const row, int const col)
+GoTo(NCURSES_SP_DCLx int const row, int const col)
{
- TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)",
- row, col, SP->_cursrow, SP->_curscol));
+ TR(TRACE_MOVE, ("GoTo(%p, %d, %d) from (%d, %d)",
+ (void *) SP_PARM, row, col, SP_PARM->_cursrow, SP_PARM->_curscol));
- position_check(SP->_cursrow, SP->_curscol, "GoTo");
+ position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo");
- mvcur(SP->_cursrow, SP->_curscol, row, col);
- position_check(SP->_cursrow, SP->_curscol, "GoTo2");
+ TINFO_MVCUR(NCURSES_SP_ARGx
+ SP_PARM->_cursrow,
+ SP_PARM->_curscol,
+ row, col);
+ position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo2");
}
static NCURSES_INLINE void
-PutAttrChar(CARG_CH_T ch)
+PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch)
{
int chlen = 1;
NCURSES_CH_T my_ch;
@@ -194,7 +215,7 @@ PutAttrChar(CARG_CH_T ch)
TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)",
_tracech_t(ch),
- SP->_cursrow, SP->_curscol));
+ SP_PARM->_cursrow, SP_PARM->_curscol));
#if USE_WIDEC_SUPPORT
/*
* If this is not a valid character, there is nothing more to do.
@@ -224,12 +245,12 @@ PutAttrChar(CARG_CH_T ch)
*/
if (is8bits(CharOf(CHDEREF(ch)))
&& (isprint(CharOf(CHDEREF(ch)))
- || (SP->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
- || (SP->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
+ || (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
+ || (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
|| (AttrOf(attr) & A_ALTCHARSET
&& ((CharOfD(ch) < ACS_LEN
- && SP->_acs_map != 0
- && SP->_acs_map[CharOfD(ch)] != 0)
+ && SP_PARM->_acs_map != 0
+ && SP_PARM->_acs_map[CharOfD(ch)] != 0)
|| (CharOfD(ch) >= 128))))) {
;
} else {
@@ -241,7 +262,7 @@ PutAttrChar(CARG_CH_T ch)
#endif
if ((AttrOf(attr) & A_ALTCHARSET)
- && SP->_acs_map != 0
+ && SP_PARM->_acs_map != 0
&& CharOfD(ch) < ACS_LEN) {
my_ch = CHDEREF(ch); /* work around const param */
#if USE_WIDEC_SUPPORT
@@ -251,8 +272,8 @@ PutAttrChar(CARG_CH_T ch)
* 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)]) {
+ if (SP_PARM->_screen_acs_fix
+ && SP_PARM->_screen_acs_map[CharOf(my_ch)]) {
RemAttr(attr, A_ALTCHARSET);
my_ch = _nc_wacs[CharOf(my_ch)];
}
@@ -265,9 +286,9 @@ PutAttrChar(CARG_CH_T ch)
*/
if (AttrOf(attr) & A_ALTCHARSET) {
int j = CharOfD(ch);
- chtype temp = UChar(SP->_acs_map[j]);
+ chtype temp = UChar(SP_PARM->_acs_map[j]);
- if (!(SP->_screen_acs_map[j])) {
+ if (!(SP_PARM->_screen_acs_map[j])) {
RemAttr(attr, A_ALTCHARSET);
if (temp == 0)
temp = ' ';
@@ -282,28 +303,28 @@ PutAttrChar(CARG_CH_T ch)
ch = CHREF(tilde);
}
- UpdateAttrs(attr);
+ UpdateAttrs(SP_PARM, 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));
+ if (SP_PARM->_outch != 0) {
+ SP_PARM->_outch(NCURSES_SP_ARGx UChar(ch));
} else
#endif
{
- PUTC(CHDEREF(ch), SP->_ofp); /* macro's fastest... */
+ PUTC(CHDEREF(ch), SP_PARM->_ofp); /* macro's fastest... */
COUNT_OUTCHARS(1);
}
- SP->_curscol += chlen;
+ SP_PARM->_curscol += chlen;
if (char_padding) {
TPUTS_TRACE("char_padding");
- putp(char_padding);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx char_padding);
}
}
static bool
-check_pending(void)
+check_pending(NCURSES_SP_DCL0)
/* check for pending input */
{
bool have_pending = FALSE;
@@ -313,13 +334,13 @@ check_pending(void)
* have the refreshing slow down drastically (or stop) if there's an
* unread character available.
*/
- if (SP->_fifohold != 0)
+ if (SP_PARM->_fifohold != 0)
return FALSE;
- if (SP->_checkfd >= 0) {
+ if (SP_PARM->_checkfd >= 0) {
#if USE_FUNC_POLL
struct pollfd fds[1];
- fds[0].fd = SP->_checkfd;
+ fds[0].fd = SP_PARM->_checkfd;
fds[0].events = POLLIN;
if (poll(fds, 1, 0) > 0) {
have_pending = TRUE;
@@ -347,43 +368,52 @@ check_pending(void)
ktimeout.tv_usec = 0;
FD_ZERO(&fdset);
- FD_SET(SP->_checkfd, &fdset);
- if (select(SP->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) {
+ FD_SET(SP_PARM->_checkfd, &fdset);
+ if (select(SP_PARM->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) {
have_pending = TRUE;
}
#endif
}
if (have_pending) {
- SP->_fifohold = 5;
- _nc_flush();
+ SP_PARM->_fifohold = 5;
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
}
return FALSE;
}
/* put char at lower right corner */
static void
-PutCharLR(const ARG_CH_T ch)
+PutCharLR(NCURSES_SP_DCLx const ARG_CH_T ch)
{
if (!auto_right_margin) {
/* we can put the char directly */
- PutAttrChar(ch);
+ PutAttrChar(NCURSES_SP_ARGx ch);
} else if (enter_am_mode && exit_am_mode) {
/* we can suppress automargin */
TPUTS_TRACE("exit_am_mode");
- putp(exit_am_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_am_mode);
- PutAttrChar(ch);
- SP->_curscol--;
- position_check(SP->_cursrow, SP->_curscol, "exit_am_mode");
+ PutAttrChar(NCURSES_SP_ARGx ch);
+ SP_PARM->_curscol--;
+ position_check(SP_PARM,
+ SP_PARM->_cursrow,
+ SP_PARM->_curscol,
+ "exit_am_mode");
TPUTS_TRACE("enter_am_mode");
- putp(enter_am_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx 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);
+ GoTo(NCURSES_SP_ARGx
+ screen_lines(SP_PARM) - 1,
+ screen_columns(SP_PARM) - 2);
+ PutAttrChar(NCURSES_SP_ARGx ch);
+ GoTo(NCURSES_SP_ARGx
+ screen_lines(SP_PARM) - 1,
+ screen_columns(SP_PARM) - 2);
+ InsStr(NCURSES_SP_ARGx
+ NewScreen(SP_PARM)->_line[screen_lines(SP_PARM) - 1].text +
+ screen_columns(SP_PARM) - 2, 1);
}
}
@@ -391,7 +421,7 @@ PutCharLR(const ARG_CH_T ch)
* Wrap the cursor position, i.e., advance to the beginning of the next line.
*/
static void
-wrap_cursor(void)
+wrap_cursor(NCURSES_SP_DCL0)
{
if (eat_newline_glitch) {
/*
@@ -407,40 +437,45 @@ wrap_cursor(void)
* 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;
+ SP_PARM->_curscol = -1;
+ SP_PARM->_cursrow = -1;
} else if (auto_right_margin) {
- SP->_curscol = 0;
- SP->_cursrow++;
+ SP_PARM->_curscol = 0;
+ SP_PARM->_cursrow++;
/*
* We've actually moved - but may have to work around problems with
* video attributes not working.
*/
- if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP))) {
+ if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP_PARM))) {
TR(TRACE_CHARPUT, ("turning off (%#lx) %s before wrapping",
- (unsigned long) AttrOf(SCREEN_ATTRS(SP)),
- _traceattr(AttrOf(SCREEN_ATTRS(SP)))));
- (void) VIDATTR(A_NORMAL, 0);
+ (unsigned long) AttrOf(SCREEN_ATTRS(SP_PARM)),
+ _traceattr(AttrOf(SCREEN_ATTRS(SP_PARM)))));
+ (void) VIDATTR(SP_PARM, A_NORMAL, 0);
}
} else {
- SP->_curscol--;
+ SP_PARM->_curscol--;
}
- position_check(SP->_cursrow, SP->_curscol, "wrap_cursor");
+ position_check(SP_PARM,
+ SP_PARM->_cursrow,
+ SP_PARM->_curscol,
+ "wrap_cursor");
}
static NCURSES_INLINE void
-PutChar(const ARG_CH_T ch)
+PutChar(NCURSES_SP_DCLx 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_PARM->_cursrow == screen_lines(SP_PARM) - 1 &&
+ SP_PARM->_curscol == screen_columns(SP_PARM) - 1) {
+ PutCharLR(NCURSES_SP_ARGx ch);
+ } else {
+ PutAttrChar(NCURSES_SP_ARGx ch);
+ }
- if (SP->_curscol >= screen_columns)
- wrap_cursor();
+ if (SP_PARM->_curscol >= screen_columns(SP_PARM))
+ wrap_cursor(NCURSES_SP_ARG);
- position_check(SP->_cursrow, SP->_curscol, "PutChar");
+ position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "PutChar");
}
/*
@@ -450,19 +485,21 @@ PutChar(const ARG_CH_T ch)
* or can be output by clearing (A_COLOR in case of bce-terminal) are excluded.
*/
static NCURSES_INLINE bool
-can_clear_with(ARG_CH_T ch)
+can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch)
{
- if (!back_color_erase && SP->_coloron) {
+ if (!back_color_erase && SP_PARM->_coloron) {
#if NCURSES_EXT_FUNCS
int pair;
- if (!SP->_default_color)
+ if (!SP_PARM->_default_color)
return FALSE;
- if (SP->_default_fg != C_MASK || SP->_default_bg != C_MASK)
+ if (SP_PARM->_default_fg != C_MASK || SP_PARM->_default_bg != C_MASK)
return FALSE;
if ((pair = GetPair(CHDEREF(ch))) != 0) {
short fg, bg;
- pair_content(pair, &fg, &bg);
+ NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx
+ (short) pair,
+ &fg, &bg);
if (fg != C_MASK || bg != C_MASK)
return FALSE;
}
@@ -488,7 +525,7 @@ can_clear_with(ARG_CH_T ch)
* This code is optimized using ech and rep.
*/
static int
-EmitRange(const NCURSES_CH_T * ntext, int num)
+EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num)
{
int i;
@@ -500,13 +537,13 @@ EmitRange(const NCURSES_CH_T * ntext, int num)
NCURSES_CH_T ntext0;
while (num > 1 && !CharEq(ntext[0], ntext[1])) {
- PutChar(CHREF(ntext[0]));
+ PutChar(NCURSES_SP_ARGx CHREF(ntext[0]));
ntext++;
num--;
}
ntext0 = ntext[0];
if (num == 1) {
- PutChar(CHREF(ntext0));
+ PutChar(NCURSES_SP_ARGx CHREF(ntext0));
return 0;
}
runcount = 2;
@@ -523,10 +560,11 @@ EmitRange(const NCURSES_CH_T * ntext, int num)
* which it would be marginally advantageous.
*/
if (erase_chars
- && runcount > SP->_ech_cost + SP->_cup_ch_cost
- && can_clear_with(CHREF(ntext0))) {
- UpdateAttrs(ntext0);
- putp(TPARM_1(erase_chars, runcount));
+ && runcount > SP_PARM->_ech_cost + SP_PARM->_cup_ch_cost
+ && can_clear_with(NCURSES_SP_ARGx CHREF(ntext0))) {
+ UpdateAttrs(SP_PARM, ntext0);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
+ TPARM_1(erase_chars, runcount));
/*
* If this is the last part of the given interval,
@@ -534,27 +572,34 @@ EmitRange(const NCURSES_CH_T * ntext, int num)
* last update on the line.
*/
if (runcount < num) {
- GoTo(SP->_cursrow, SP->_curscol + runcount);
+ GoTo(NCURSES_SP_ARGx
+ SP_PARM->_cursrow,
+ SP_PARM->_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);
+ } else if (repeat_char && runcount > SP_PARM->_rep_cost) {
+ bool wrap_possible = (SP_PARM->_curscol + runcount >=
+ screen_columns(SP_PARM));
int rep_count = runcount;
if (wrap_possible)
rep_count--;
- UpdateAttrs(ntext0);
- tputs(TPARM_2(repeat_char, CharOf(ntext0), rep_count),
- rep_count, _nc_outch);
- SP->_curscol += rep_count;
+ UpdateAttrs(SP_PARM, ntext0);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(repeat_char,
+ CharOf(ntext0),
+ rep_count),
+ rep_count,
+ NCURSES_SP_NAME(_nc_outch));
+ SP_PARM->_curscol += rep_count;
if (wrap_possible)
- PutChar(CHREF(ntext0));
+ PutChar(NCURSES_SP_ARGx CHREF(ntext0));
} else {
for (i = 0; i < runcount; i++)
- PutChar(CHREF(ntext[i]));
+ PutChar(NCURSES_SP_ARGx CHREF(ntext[i]));
}
ntext += runcount;
num -= runcount;
@@ -563,7 +608,7 @@ EmitRange(const NCURSES_CH_T * ntext, int num)
}
for (i = 0; i < num; i++)
- PutChar(CHREF(ntext[i]));
+ PutChar(NCURSES_SP_ARGx CHREF(ntext[i]));
return 0;
}
@@ -576,39 +621,43 @@ EmitRange(const NCURSES_CH_T * ntext, int num)
* Returns: same as EmitRange
*/
static int
-PutRange(const NCURSES_CH_T * otext,
+PutRange(NCURSES_SP_DCLx
+ 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));
+ TR(TRACE_CHARPUT, ("PutRange(%p, %p, %p, %d, %d, %d)",
+ (void *) SP_PARM,
+ (const void *) otext,
+ (const void *) ntext,
+ row, first, last));
if (otext != ntext
- && (last - first + 1) > SP->_inline_cost) {
+ && (last - first + 1) > SP_PARM->_inline_cost) {
for (j = first, same = 0; j <= last; j++) {
if (!same && isWidecExt(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);
+ if (same > SP_PARM->_inline_cost) {
+ EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first);
+ GoTo(NCURSES_SP_ARGx row, first = j);
}
same = 0;
}
}
- i = EmitRange(ntext + first, j - same - first);
+ i = EmitRange(NCURSES_SP_ARGx 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);
+ return EmitRange(NCURSES_SP_ARGx ntext + first, last - first + 1);
}
/* leave unbracketed here so 'indent' works */
@@ -618,7 +667,7 @@ PutRange(const NCURSES_CH_T * otext,
if_USE_SCROLL_HINTS(win->_line[row].oldindex = row)
NCURSES_EXPORT(int)
-doupdate(void)
+TINFO_DOUPDATE(NCURSES_SP_DCL0)
{
int i;
int nonempty;
@@ -626,30 +675,49 @@ doupdate(void)
struct tms before, after;
#endif /* USE_TRACE_TIMES */
- T((T_CALLED("doupdate()")));
+ T((T_CALLED("_nc_tinfo:doupdate(%p)"), (void *) SP_PARM));
- if (curscr == 0
- || newscr == 0)
+#if !USE_REENTRANT
+ /*
+ * It is "legal" but unlikely that an application could assign a new
+ * value to one of the standard windows. Check for that possibility
+ * and try to recover.
+ *
+ * We do not allow applications to assign new values in the reentrant
+ * model.
+ */
+#define SyncScreens(internal,exported) \
+ if (internal == 0) internal = exported; \
+ if (internal != exported) exported = internal
+
+ SyncScreens(CurScreen(SP_PARM), curscr);
+ SyncScreens(NewScreen(SP_PARM), newscr);
+ SyncScreens(StdScreen(SP_PARM), stdscr);
+#endif
+
+ if (CurScreen(SP_PARM) == 0
+ || NewScreen(SP_PARM) == 0
+ || StdScreen(SP_PARM) == 0)
returnCode(ERR);
#ifdef TRACE
if (USE_TRACEF(TRACE_UPDATE)) {
- if (curscr->_clear)
+ if (CurScreen(SP_PARM)->_clear)
_tracef("curscr is clear");
else
- _tracedump("curscr", curscr);
- _tracedump("newscr", newscr);
+ _tracedump("curscr", CurScreen(SP_PARM));
+ _tracedump("newscr", NewScreen(SP_PARM));
_nc_unlock_global(tracef);
}
#endif /* TRACE */
_nc_signal_handler(FALSE);
- if (SP->_fifohold)
- SP->_fifohold--;
+ if (SP_PARM->_fifohold)
+ SP_PARM->_fifohold--;
#if USE_SIZECHANGE
- if (SP->_endwin || _nc_handle_sigwinch(SP)) {
+ if (SP_PARM->_endwin || _nc_handle_sigwinch(SP_PARM)) {
/*
* This is a transparent extension: XSI does not address it,
* and applications need not know that ncurses can do it.
@@ -658,20 +726,20 @@ doupdate(void)
* (this can happen in an xterm, for example), and resize the
* ncurses data structures accordingly.
*/
- _nc_update_screensize(SP);
+ _nc_update_screensize(SP_PARM);
}
#endif
- if (SP->_endwin) {
+ if (SP_PARM->_endwin) {
T(("coming back from shell mode"));
- reset_prog_mode();
+ NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
- _nc_mvcur_resume();
- _nc_screen_resume();
- SP->_mouse_resume(SP);
+ NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
+ SP_PARM->_mouse_resume(SP_PARM);
- SP->_endwin = FALSE;
+ SP_PARM->_endwin = FALSE;
}
#if USE_TRACE_TIMES
/* zero the metering machinery */
@@ -695,11 +763,11 @@ doupdate(void)
int j, k;
attr_t rattr = A_NORMAL;
- for (i = 0; i < screen_lines; i++) {
- for (j = 0; j < screen_columns; j++) {
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ for (j = 0; j < screen_columns(SP_PARM); j++) {
bool failed = FALSE;
- NCURSES_CH_T *thisline = newscr->_line[i].text;
- attr_t thisattr = AttrOf(thisline[j]) & SP->_xmc_triggers;
+ NCURSES_CH_T *thisline = NewScreen(SP_PARM)->_line[i].text;
+ attr_t thisattr = AttrOf(thisline[j]) & SP_PARM->_xmc_triggers;
attr_t turnon = thisattr & ~rattr;
/* is an attribute turned on here? */
@@ -717,8 +785,8 @@ doupdate(void)
* there's enough room to set the attribute before the first
* non-blank in the run.
*/
-#define SAFE(a) (!((a) & SP->_xmc_triggers))
- if (ISBLANK(thisline[j]) && SAFE(turnon)) {
+#define SAFE(scr,a) (!((a) & (scr)->_xmc_triggers))
+ if (ISBLANK(thisline[j]) && SAFE(SP_PARM, turnon)) {
RemAttr(thisline[j], turnon);
continue;
}
@@ -727,14 +795,14 @@ doupdate(void)
for (k = 1; k <= magic_cookie_glitch; k++) {
if (j - k < 0
|| !ISBLANK(thisline[j - k])
- || !SAFE(AttrOf(thisline[j - k]))) {
+ || !SAFE(SP_PARM, AttrOf(thisline[j - k]))) {
failed = TRUE;
TR(TRACE_ATTRS, ("No room at start in %d,%d%s%s",
i, j - k,
(ISBLANK(thisline[j - k])
? ""
: ":nonblank"),
- (SAFE(AttrOf(thisline[j - k]))
+ (SAFE(SP_PARM, AttrOf(thisline[j - k]))
? ""
: ":unsafe")));
break;
@@ -745,10 +813,11 @@ doupdate(void)
int m, n = j;
/* find end of span, if it's onscreen */
- for (m = i; m < screen_lines; m++) {
- for (; n < screen_columns; n++) {
- attr_t testattr = AttrOf(newscr->_line[m].text[n]);
- if ((testattr & SP->_xmc_triggers) == rattr) {
+ for (m = i; m < screen_lines(SP_PARM); m++) {
+ for (; n < screen_columns(SP_PARM); n++) {
+ attr_t testattr =
+ AttrOf(NewScreen(SP_PARM)->_line[m].text[n]);
+ if ((testattr & SP_PARM->_xmc_triggers) == rattr) {
end_onscreen = TRUE;
TR(TRACE_ATTRS,
("Range attributed with %s ends at (%d, %d)",
@@ -764,7 +833,8 @@ doupdate(void)
foundit:;
if (end_onscreen) {
- NCURSES_CH_T *lastline = newscr->_line[m].text;
+ NCURSES_CH_T *lastline =
+ NewScreen(SP_PARM)->_line[m].text;
/*
* If there are safely-attributed blanks at the end of
@@ -773,15 +843,15 @@ doupdate(void)
*/
while (n >= 0
&& ISBLANK(lastline[n])
- && SAFE(AttrOf(lastline[n]))) {
+ && SAFE(SP_PARM, 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
+ if (n + k >= screen_columns(SP_PARM)
|| !ISBLANK(lastline[n + k])
- || !SAFE(AttrOf(lastline[n + k]))) {
+ || !SAFE(SP_PARM, AttrOf(lastline[n + k]))) {
failed = TRUE;
TR(TRACE_ATTRS,
("No room at end in %d,%d%s%s",
@@ -789,7 +859,7 @@ doupdate(void)
(ISBLANK(lastline[n + k])
? ""
: ":nonblank"),
- (SAFE(AttrOf(lastline[n + k]))
+ (SAFE(SP_PARM, AttrOf(lastline[n + k]))
? ""
: ":unsafe")));
break;
@@ -806,12 +876,12 @@ doupdate(void)
_traceattr(turnon), i, j));
/* turn off new attributes over span */
- for (p = i; p < screen_lines; p++) {
- for (; q < screen_columns; q++) {
+ for (p = i; p < screen_lines(SP_PARM); p++) {
+ for (; q < screen_columns(SP_PARM); q++) {
attr_t testattr = AttrOf(newscr->_line[p].text[q]);
- if ((testattr & SP->_xmc_triggers) == rattr)
+ if ((testattr & SP_PARM->_xmc_triggers) == rattr)
goto foundend;
- RemAttr(newscr->_line[p].text[q], turnon);
+ RemAttr(NewScreen(SP_PARM)->_line[p].text[q], turnon);
}
q = 0;
}
@@ -837,7 +907,7 @@ doupdate(void)
/* show altered highlights after magic-cookie check */
if (USE_TRACEF(TRACE_UPDATE)) {
_tracef("After magic-cookie check...");
- _tracedump("newscr", newscr);
+ _tracedump("newscr", NewScreen(SP_PARM));
_nc_unlock_global(tracef);
}
#endif /* TRACE */
@@ -845,23 +915,23 @@ doupdate(void)
#endif /* USE_XMC_SUPPORT */
nonempty = 0;
- if (curscr->_clear || newscr->_clear) { /* force refresh ? */
- ClrUpdate();
- curscr->_clear = FALSE; /* reset flag */
- newscr->_clear = FALSE; /* reset flag */
+ if (CurScreen(SP_PARM)->_clear || NewScreen(SP_PARM)->_clear) { /* force refresh ? */
+ ClrUpdate(NCURSES_SP_ARG);
+ CurScreen(SP_PARM)->_clear = FALSE; /* reset flag */
+ NewScreen(SP_PARM)->_clear = FALSE; /* reset flag */
} else {
int changedlines = CHECK_INTERVAL;
- if (check_pending())
+ if (check_pending(NCURSES_SP_ARG))
goto cleanup;
- nonempty = min(screen_lines, newscr->_maxy + 1);
+ nonempty = min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1);
- if (SP->_scrolling) {
- _nc_scroll_optimize();
+ if (SP_PARM->_scrolling) {
+ NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_ARG);
}
- nonempty = ClrBottom(nonempty);
+ nonempty = ClrBottom(NCURSES_SP_ARGx nonempty);
TR(TRACE_UPDATE, ("Transforming lines, nonempty %d", nonempty));
for (i = 0; i < nonempty; i++) {
@@ -869,7 +939,7 @@ doupdate(void)
* Here is our line-breakout optimization.
*/
if (changedlines == CHECK_INTERVAL) {
- if (check_pending())
+ if (check_pending(NCURSES_SP_ARG))
goto cleanup;
changedlines = 0;
}
@@ -880,35 +950,35 @@ doupdate(void)
* 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);
+ if (NewScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE
+ || CurScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE) {
+ TransformLine(NCURSES_SP_ARGx i);
changedlines++;
}
/* mark line changed successfully */
- if (i <= newscr->_maxy) {
- MARK_NOCHANGE(newscr, i);
+ if (i <= NewScreen(SP_PARM)->_maxy) {
+ MARK_NOCHANGE(NewScreen(SP_PARM), i);
}
- if (i <= curscr->_maxy) {
- MARK_NOCHANGE(curscr, i);
+ if (i <= CurScreen(SP_PARM)->_maxy) {
+ MARK_NOCHANGE(CurScreen(SP_PARM), i);
}
}
}
/* put everything back in sync */
- for (i = nonempty; i <= newscr->_maxy; i++) {
- MARK_NOCHANGE(newscr, i);
+ for (i = nonempty; i <= NewScreen(SP_PARM)->_maxy; i++) {
+ MARK_NOCHANGE(NewScreen(SP_PARM), i);
}
- for (i = nonempty; i <= curscr->_maxy; i++) {
- MARK_NOCHANGE(curscr, i);
+ for (i = nonempty; i <= CurScreen(SP_PARM)->_maxy; i++) {
+ MARK_NOCHANGE(CurScreen(SP_PARM), i);
}
- if (!newscr->_leaveok) {
- curscr->_curx = newscr->_curx;
- curscr->_cury = newscr->_cury;
+ if (!NewScreen(SP_PARM)->_leaveok) {
+ CurScreen(SP_PARM)->_curx = NewScreen(SP_PARM)->_curx;
+ CurScreen(SP_PARM)->_cury = NewScreen(SP_PARM)->_cury;
- GoTo(curscr->_cury, curscr->_curx);
+ GoTo(NCURSES_SP_ARGx CurScreen(SP_PARM)->_cury, CurScreen(SP_PARM)->_curx);
}
cleanup:
@@ -921,10 +991,10 @@ doupdate(void)
#if USE_XMC_SUPPORT
if (magic_cookie_glitch != 0)
#endif
- UpdateAttrs(normal);
+ UpdateAttrs(SP_PARM, normal);
- _nc_flush();
- WINDOW_ATTRS(curscr) = WINDOW_ATTRS(newscr);
+ NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
+ WINDOW_ATTRS(CurScreen(SP_PARM)) = WINDOW_ATTRS(NewScreen(SP_PARM));
#if USE_TRACE_TIMES
(void) times(&after);
@@ -940,6 +1010,14 @@ doupdate(void)
returnCode(OK);
}
+#if NCURSES_SP_FUNCS && !defined(USE_TERM_DRIVER)
+NCURSES_EXPORT(int)
+doupdate(void)
+{
+ return TINFO_DOUPDATE(CURRENT_SCREEN);
+}
+#endif
+
/*
* ClrBlank(win)
*
@@ -951,14 +1029,14 @@ doupdate(void)
* 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)
+#define BCE_BKGD(sp,win) (((win) == CurScreen(sp) ? StdScreen(sp) : (win))->_nc_bkgd)
static NCURSES_INLINE NCURSES_CH_T
-ClrBlank(WINDOW *win)
+ClrBlank(NCURSES_SP_DCLx WINDOW *win)
{
NCURSES_CH_T blank = blankchar;
if (back_color_erase)
- AddAttr(blank, (AttrOf(BCE_BKGD(win)) & BCE_ATTRS));
+ AddAttr(blank, (AttrOf(BCE_BKGD(SP_PARM, win)) & BCE_ATTRS));
return blank;
}
@@ -970,23 +1048,24 @@ ClrBlank(WINDOW *win)
*/
static void
-ClrUpdate(void)
+ClrUpdate(NCURSES_SP_DCL0)
{
- int i;
- NCURSES_CH_T blank = ClrBlank(stdscr);
- int nonempty = min(screen_lines, newscr->_maxy + 1);
-
TR(TRACE_UPDATE, (T_CALLED("ClrUpdate")));
+ if (0 != SP_PARM) {
+ int i;
+ NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
+ int nonempty = min(screen_lines(SP_PARM),
+ NewScreen(SP_PARM)->_maxy + 1);
- ClearScreen(blank);
-
- TR(TRACE_UPDATE, ("updating screen from scratch"));
+ ClearScreen(NCURSES_SP_ARGx blank);
- nonempty = ClrBottom(nonempty);
+ TR(TRACE_UPDATE, ("updating screen from scratch"));
- for (i = 0; i < nonempty; i++)
- TransformLine(i);
+ nonempty = ClrBottom(NCURSES_SP_ARGx nonempty);
+ for (i = 0; i < nonempty; i++)
+ TransformLine(NCURSES_SP_ARGx i);
+ }
TR(TRACE_UPDATE, (T_RETURN("")));
}
@@ -997,35 +1076,36 @@ ClrUpdate(void)
*/
static void
-ClrToEOL(NCURSES_CH_T blank, bool needclear)
+ClrToEOL(NCURSES_SP_DCLx 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;
+ if (SP_PARM != 0) {
+ if (CurScreen(SP_PARM) != 0
+ && SP_PARM->_cursrow >= 0) {
+ for (j = SP_PARM->_curscol; j < screen_columns(SP_PARM); j++) {
+ if (j >= 0) {
+ NCURSES_CH_T *cp =
+ &(CurScreen(SP_PARM)->_line[SP_PARM->_cursrow].text[j]);
+
+ if (!CharEq(*cp, blank)) {
+ *cp = blank;
+ needclear = TRUE;
+ }
}
}
}
- } else {
- needclear = TRUE;
}
- if (needclear) {
- UpdateAttrs(blank);
+ if (needclear && (SP_PARM != 0)) {
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clr_eol");
- if (clr_eol && SP->_el_cost <= (screen_columns - SP->_curscol)) {
- putp(clr_eol);
+ if (clr_eol && SP_PARM->_el_cost <= (screen_columns(SP_PARM) - SP_PARM->_curscol)) {
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
} else {
- int count = (screen_columns - SP->_curscol);
+ int count = (screen_columns(SP_PARM) - SP_PARM->_curscol);
while (count-- > 0)
- PutChar(CHREF(blank));
+ PutChar(NCURSES_SP_ARGx CHREF(blank));
}
}
}
@@ -1037,23 +1117,29 @@ ClrToEOL(NCURSES_CH_T blank, bool needclear)
*/
static void
-ClrToEOS(NCURSES_CH_T blank)
+ClrToEOS(NCURSES_SP_DCLx NCURSES_CH_T blank)
{
int row, col;
- row = SP->_cursrow;
- col = SP->_curscol;
+ if (0 == SP_PARM)
+ return;
+
+ row = SP_PARM->_cursrow;
+ col = SP_PARM->_curscol;
- UpdateAttrs(blank);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clr_eos");
- tputs(clr_eos, screen_lines - row, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ clr_eos,
+ screen_lines(SP_PARM) - row,
+ NCURSES_SP_NAME(_nc_outch));
- while (col < screen_columns)
- curscr->_line[row].text[col++] = blank;
+ while (col < screen_columns(SP_PARM))
+ CurScreen(SP_PARM)->_line[row].text[col++] = blank;
- for (row++; row < screen_lines; row++) {
- for (col = 0; col < screen_columns; col++)
- curscr->_line[row].text[col] = blank;
+ for (row++; row < screen_lines(SP_PARM); row++) {
+ for (col = 0; col < screen_columns(SP_PARM); col++)
+ CurScreen(SP_PARM)->_line[row].text[col] = blank;
}
}
@@ -1065,26 +1151,26 @@ ClrToEOS(NCURSES_CH_T blank)
* screen, checking if each is blank, and one or more are changed.
*/
static int
-ClrBottom(int total)
+ClrBottom(NCURSES_SP_DCLx 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];
+ int last = min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1);
+ NCURSES_CH_T blank = NewScreen(SP_PARM)->_line[total - 1].text[last - 1];
bool ok;
- if (clr_eos && can_clear_with(CHREF(blank))) {
+ if (clr_eos && can_clear_with(NCURSES_SP_ARGx 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));
+ ok = (CharEq(NewScreen(SP_PARM)->_line[row].text[col], blank));
}
if (!ok)
break;
for (col = 0; ok && col < last; col++) {
- ok = (CharEq(curscr->_line[row].text[col], blank));
+ ok = (CharEq(CurScreen(SP_PARM)->_line[row].text[col], blank));
}
if (!ok)
top = row;
@@ -1092,11 +1178,11 @@ ClrBottom(int total)
/* 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];
+ GoTo(NCURSES_SP_ARGx top, 0);
+ ClrToEOS(NCURSES_SP_ARGx blank);
+ if (SP_PARM->oldhash && SP_PARM->newhash) {
+ for (row = top; row < screen_lines(SP_PARM); row++)
+ SP_PARM->oldhash[row] = SP_PARM->newhash[row];
}
}
}
@@ -1105,22 +1191,22 @@ ClrBottom(int total)
#if USE_XMC_SUPPORT
#if USE_WIDEC_SUPPORT
-#define check_xmc_transition(a, b) \
- ((((a)->attr ^ (b)->attr) & ~((a)->attr) & SP->_xmc_triggers) != 0)
-#define xmc_turn_on(a,b) check_xmc_transition(&(a), &(b))
+#define check_xmc_transition(sp, a, b) \
+ ((((a)->attr ^ (b)->attr) & ~((a)->attr) & (sp)->_xmc_triggers) != 0)
+#define xmc_turn_on(sp,a,b) check_xmc_transition(sp,&(a), &(b))
#else
-#define xmc_turn_on(a,b) ((((a)^(b)) & ~(a) & SP->_xmc_triggers) != 0)
+#define xmc_turn_on(sp,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)
+#define xmc_new(sp,r,c) NewScreen(sp)->_line[r].text[c]
+#define xmc_turn_off(sp,a,b) xmc_turn_on(sp,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().
+** Insert/Delete Character if idcok && has_ic().
**
** firstChar = position of first different character in line
** oLastChar = position of last different character in old line
@@ -1135,19 +1221,19 @@ ClrBottom(int total)
*/
static void
-TransformLine(int const lineno)
+TransformLine(NCURSES_SP_DCLx int const lineno)
{
int firstChar, oLastChar, nLastChar;
- NCURSES_CH_T *newLine = newscr->_line[lineno].text;
- NCURSES_CH_T *oldLine = curscr->_line[lineno].text;
+ NCURSES_CH_T *newLine = NewScreen(SP_PARM)->_line[lineno].text;
+ NCURSES_CH_T *oldLine = CurScreen(SP_PARM)->_line[lineno].text;
int n;
bool attrchanged = FALSE;
- TR(TRACE_UPDATE, (T_CALLED("TransformLine(%d)"), lineno));
+ TR(TRACE_UPDATE, (T_CALLED("TransformLine(%p, %d)"), (void *) SP_PARM, lineno));
/* copy new hash value to old one */
- if (SP->oldhash && SP->newhash)
- SP->oldhash[lineno] = SP->newhash[lineno];
+ if (SP_PARM->oldhash && SP_PARM->newhash)
+ SP_PARM->oldhash[lineno] = SP_PARM->newhash[lineno];
/*
* If we have colors, there is the possibility of having two color pairs
@@ -1155,19 +1241,20 @@ TransformLine(int const lineno)
* for this case, and update the old line with the new line's colors when
* they are equivalent.
*/
- if (SP->_coloron) {
+ if (SP_PARM->_coloron) {
int oldPair;
int newPair;
- for (n = 0; n < screen_columns; n++) {
+ for (n = 0; n < screen_columns(SP_PARM); n++) {
if (!CharEq(newLine[n], oldLine[n])) {
oldPair = GetPair(oldLine[n]);
newPair = GetPair(newLine[n]);
if (oldPair != newPair
&& unColor(oldLine[n]) == unColor(newLine[n])) {
- if (oldPair < COLOR_PAIRS
- && newPair < COLOR_PAIRS
- && SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) {
+ if (oldPair < SP_PARM->_pair_limit
+ && newPair < SP_PARM->_pair_limit
+ && (SP_PARM->_color_pairs[oldPair] ==
+ SP_PARM->_color_pairs[newPair])) {
SetPair(oldLine[n], GetPair(newLine[n]));
}
}
@@ -1177,7 +1264,7 @@ TransformLine(int const lineno)
if (ceol_standout_glitch && clr_eol) {
firstChar = 0;
- while (firstChar < screen_columns) {
+ while (firstChar < screen_columns(SP_PARM)) {
if (!SameAttrOf(newLine[firstChar], oldLine[firstChar])) {
attrchanged = TRUE;
break;
@@ -1189,9 +1276,13 @@ TransformLine(int const lineno)
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));
+ GoTo(NCURSES_SP_ARGx lineno, firstChar);
+ ClrToEOL(NCURSES_SP_ARGx
+ ClrBlank(NCURSES_SP_ARGx
+ CurScreen(SP_PARM)), FALSE);
+ PutRange(NCURSES_SP_ARGx
+ oldLine, newLine, lineno, 0,
+ screen_columns(SP_PARM) - 1);
#if USE_XMC_SUPPORT
/*
@@ -1206,8 +1297,8 @@ TransformLine(int const lineno)
* following operation.
*/
} else if (magic_cookie_glitch > 0) {
- GoTo(lineno, firstChar);
- for (n = 0; n < screen_columns; n++) {
+ GoTo(NCURSES_SP_ARGx lineno, firstChar);
+ for (n = 0; n < screen_columns(SP_PARM); n++) {
int m = n + magic_cookie_glitch;
/* check for turn-on:
@@ -1216,26 +1307,30 @@ TransformLine(int const lineno)
*/
if (ISBLANK(newLine[n])
&& ((n > 0
- && xmc_turn_on(newLine[n - 1], newLine[n]))
+ && xmc_turn_on(SP_PARM, newLine[n - 1], newLine[n]))
|| (n == 0
&& lineno > 0
- && xmc_turn_on(xmc_new(lineno - 1, screen_columns - 1),
+ && xmc_turn_on(SP_PARM,
+ xmc_new(SP_PARM, lineno - 1,
+ screen_columns(SP_PARM) - 1),
newLine[n])))) {
n = m;
}
- PutChar(CHREF(newLine[n]));
+ PutChar(NCURSES_SP_ARGx 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 + 1 < screen_columns(SP_PARM)
+ && xmc_turn_off(SP_PARM, newLine[n], newLine[n + 1]))
+ || (n + 1 >= screen_columns(SP_PARM)
+ && lineno + 1 < screen_lines(SP_PARM)
+ && xmc_turn_off(SP_PARM,
+ newLine[n],
+ xmc_new(SP_PARM, lineno + 1, 0))))) {
n = m;
}
@@ -1246,38 +1341,42 @@ TransformLine(int const lineno)
/* it may be cheap to clear leading whitespace with clr_bol */
blank = newLine[0];
- if (clr_bol && can_clear_with(CHREF(blank))) {
+ if (clr_bol && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
int oFirstChar, nFirstChar;
- for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++)
+ for (oFirstChar = 0;
+ oFirstChar < screen_columns(SP_PARM);
+ oFirstChar++)
if (!CharEq(oldLine[oFirstChar], blank))
break;
- for (nFirstChar = 0; nFirstChar < screen_columns; nFirstChar++)
+ for (nFirstChar = 0;
+ nFirstChar < screen_columns(SP_PARM);
+ nFirstChar++)
if (!CharEq(newLine[nFirstChar], blank))
break;
if (nFirstChar == oFirstChar) {
firstChar = nFirstChar;
/* find the first differing character */
- while (firstChar < screen_columns
+ while (firstChar < screen_columns(SP_PARM)
&& 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(blank);
+ if (SP_PARM->_el1_cost < nFirstChar - oFirstChar) {
+ if (nFirstChar >= screen_columns(SP_PARM)
+ && SP_PARM->_el_cost <= SP_PARM->_el1_cost) {
+ GoTo(NCURSES_SP_ARGx lineno, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clr_eol");
- putp(clr_eol);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
} else {
- GoTo(lineno, nFirstChar - 1);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx lineno, nFirstChar - 1);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clr_bol");
- putp(clr_bol);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_bol);
}
while (firstChar < nFirstChar)
@@ -1286,64 +1385,81 @@ TransformLine(int const lineno)
}
} else {
/* find the first differing character */
- while (firstChar < screen_columns
+ while (firstChar < screen_columns(SP_PARM)
&& CharEq(newLine[firstChar], oldLine[firstChar]))
firstChar++;
}
/* if there wasn't one, we're done */
- if (firstChar >= screen_columns) {
+ if (firstChar >= screen_columns(SP_PARM)) {
TR(TRACE_UPDATE, (T_RETURN("")));
return;
}
- blank = newLine[screen_columns - 1];
+ blank = newLine[screen_columns(SP_PARM) - 1];
- if (!can_clear_with(CHREF(blank))) {
+ if (!can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
/* find the last differing character */
- nLastChar = screen_columns - 1;
+ nLastChar = screen_columns(SP_PARM) - 1;
while (nLastChar > firstChar
&& CharEq(newLine[nLastChar], oldLine[nLastChar]))
nLastChar--;
if (nLastChar >= firstChar) {
- GoTo(lineno, firstChar);
- PutRange(oldLine, newLine, lineno, firstChar, nLastChar);
+ GoTo(NCURSES_SP_ARGx lineno, firstChar);
+ PutRange(NCURSES_SP_ARGx
+ oldLine,
+ newLine,
+ lineno,
+ firstChar,
+ nLastChar);
memcpy(oldLine + firstChar,
newLine + firstChar,
- (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T));
+ (unsigned) (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T));
}
TR(TRACE_UPDATE, (T_RETURN("")));
return;
}
/* find last non-blank character on old line */
- oLastChar = screen_columns - 1;
+ oLastChar = screen_columns(SP_PARM) - 1;
while (oLastChar > firstChar && CharEq(oldLine[oLastChar], blank))
oLastChar--;
/* find last non-blank character on new line */
- nLastChar = screen_columns - 1;
+ nLastChar = screen_columns(SP_PARM) - 1;
while (nLastChar > firstChar && CharEq(newLine[nLastChar], blank))
nLastChar--;
if ((nLastChar == firstChar)
- && (SP->_el_cost < (oLastChar - nLastChar))) {
- GoTo(lineno, firstChar);
+ && (SP_PARM->_el_cost < (oLastChar - nLastChar))) {
+ GoTo(NCURSES_SP_ARGx lineno, firstChar);
if (!CharEq(newLine[firstChar], blank))
- PutChar(CHREF(newLine[firstChar]));
- ClrToEOL(blank, FALSE);
+ PutChar(NCURSES_SP_ARGx CHREF(newLine[firstChar]));
+ ClrToEOL(NCURSES_SP_ARGx 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);
+ || !(SP_PARM->_nc_sp_idcok
+ && NCURSES_SP_NAME(has_ic) (NCURSES_SP_ARG)))) {
+ GoTo(NCURSES_SP_ARGx lineno, firstChar);
+ if ((oLastChar - nLastChar) > SP_PARM->_el_cost) {
+ if (PutRange(NCURSES_SP_ARGx
+ oldLine,
+ newLine,
+ lineno,
+ firstChar,
+ nLastChar)) {
+ GoTo(NCURSES_SP_ARGx lineno, nLastChar + 1);
+ }
+ ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
} else {
n = max(nLastChar, oLastChar);
- PutRange(oldLine, newLine, lineno, firstChar, n);
+ PutRange(NCURSES_SP_ARGx
+ oldLine,
+ newLine,
+ lineno,
+ firstChar,
+ n);
}
} else {
int nLastNonblank = nLastChar;
@@ -1364,8 +1480,13 @@ TransformLine(int const lineno)
n = min(oLastChar, nLastChar);
if (n >= firstChar) {
- GoTo(lineno, firstChar);
- PutRange(oldLine, newLine, lineno, firstChar, n);
+ GoTo(NCURSES_SP_ARGx lineno, firstChar);
+ PutRange(NCURSES_SP_ARGx
+ oldLine,
+ newLine,
+ lineno,
+ firstChar,
+ n);
}
if (oLastChar < nLastChar) {
@@ -1376,21 +1497,26 @@ TransformLine(int const lineno)
--oLastChar;
}
#endif
- GoTo(lineno, n + 1);
+ GoTo(NCURSES_SP_ARGx lineno, n + 1);
if ((nLastChar < nLastNonblank)
- || InsCharCost(nLastChar - oLastChar) > (m - n)) {
- PutRange(oldLine, newLine, lineno, n + 1, m);
+ || InsCharCost(SP_PARM, nLastChar - oLastChar) > (m - n)) {
+ PutRange(NCURSES_SP_ARGx
+ oldLine,
+ newLine,
+ lineno,
+ n + 1,
+ m);
} else {
- InsStr(&newLine[n + 1], nLastChar - oLastChar);
+ InsStr(NCURSES_SP_ARGx &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,
+ GoTo(NCURSES_SP_ARGx lineno, n + 1);
+ if (DelCharCost(SP_PARM, oLastChar - nLastChar)
+ > SP_PARM->_el_cost + nLastNonblank - (n + 1)) {
+ if (PutRange(NCURSES_SP_ARGx oldLine, newLine, lineno,
n + 1, nLastNonblank))
- GoTo(lineno, nLastNonblank + 1);
- ClrToEOL(blank, FALSE);
+ GoTo(NCURSES_SP_ARGx lineno, nLastNonblank + 1);
+ ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
} else {
/*
* The delete-char sequence will
@@ -1400,18 +1526,18 @@ TransformLine(int const lineno)
* setting the video attributes from
* the last character on the row.
*/
- UpdateAttrs(blank);
- DelChar(oLastChar - nLastChar);
+ UpdateAttrs(SP_PARM, blank);
+ DelChar(NCURSES_SP_ARGx oLastChar - nLastChar);
}
}
}
}
/* update the code's internal representation */
- if (screen_columns > firstChar)
+ if (screen_columns(SP_PARM) > firstChar)
memcpy(oldLine + firstChar,
newLine + firstChar,
- (screen_columns - firstChar) * sizeof(NCURSES_CH_T));
+ (unsigned) (screen_columns(SP_PARM) - firstChar) * sizeof(NCURSES_CH_T));
TR(TRACE_UPDATE, (T_RETURN("")));
return;
}
@@ -1424,7 +1550,7 @@ TransformLine(int const lineno)
*/
static void
-ClearScreen(NCURSES_CH_T blank)
+ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank)
{
int i, j;
bool fast_clear = (clear_screen || clr_eos || clr_eol);
@@ -1432,9 +1558,13 @@ ClearScreen(NCURSES_CH_T blank)
TR(TRACE_UPDATE, ("ClearScreen() called"));
#if NCURSES_EXT_FUNCS
- if (SP->_coloron
- && !SP->_default_color) {
- _nc_do_color(GET_SCREEN_PAIR(SP), 0, FALSE, _nc_outch);
+ if (SP_PARM->_coloron
+ && !SP_PARM->_default_color) {
+ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
+ (short) GET_SCREEN_PAIR(SP_PARM),
+ 0,
+ FALSE,
+ NCURSES_SP_NAME(_nc_outch));
if (!back_color_erase) {
fast_clear = FALSE;
}
@@ -1443,42 +1573,46 @@ ClearScreen(NCURSES_CH_T blank)
if (fast_clear) {
if (clear_screen) {
- UpdateAttrs(blank);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clear_screen");
- putp(clear_screen);
- SP->_cursrow = SP->_curscol = 0;
- position_check(SP->_cursrow, SP->_curscol, "ClearScreen");
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clear_screen);
+ SP_PARM->_cursrow = SP_PARM->_curscol = 0;
+ position_check(SP_PARM,
+ SP_PARM->_cursrow,
+ SP_PARM->_curscol,
+ "ClearScreen");
} else if (clr_eos) {
- SP->_cursrow = SP->_curscol = -1;
- GoTo(0, 0);
-
- UpdateAttrs(blank);
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
+ GoTo(NCURSES_SP_ARGx 0, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("clr_eos");
- tputs(clr_eos, screen_lines, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ clr_eos,
+ screen_lines(SP_PARM),
+ NCURSES_SP_NAME(_nc_outch));
} else if (clr_eol) {
- SP->_cursrow = SP->_curscol = -1;
-
- UpdateAttrs(blank);
- for (i = 0; i < screen_lines; i++) {
- GoTo(i, 0);
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
+ UpdateAttrs(SP_PARM, blank);
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ GoTo(NCURSES_SP_ARGx i, 0);
TPUTS_TRACE("clr_eol");
- putp(clr_eol);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
}
- GoTo(0, 0);
+ GoTo(NCURSES_SP_ARGx 0, 0);
}
} else {
- UpdateAttrs(blank);
- for (i = 0; i < screen_lines; i++) {
- GoTo(i, 0);
- for (j = 0; j < screen_columns; j++)
- PutChar(CHREF(blank));
+ UpdateAttrs(SP_PARM, blank);
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ GoTo(NCURSES_SP_ARGx i, 0);
+ for (j = 0; j < screen_columns(SP_PARM); j++)
+ PutChar(NCURSES_SP_ARGx CHREF(blank));
}
- GoTo(0, 0);
+ GoTo(NCURSES_SP_ARGx 0, 0);
}
- for (i = 0; i < screen_lines; i++) {
- for (j = 0; j < screen_columns; j++)
- curscr->_line[i].text[j] = blank;
+ for (i = 0; i < screen_lines(SP_PARM); i++) {
+ for (j = 0; j < screen_columns(SP_PARM); j++)
+ CurScreen(SP_PARM)->_line[i].text[j] = blank;
}
TR(TRACE_UPDATE, ("screen cleared"));
@@ -1492,49 +1626,54 @@ ClearScreen(NCURSES_CH_T blank)
*/
static void
-InsStr(NCURSES_CH_T * line, int count)
+InsStr(NCURSES_SP_DCLx NCURSES_CH_T * line, int count)
{
- TR(TRACE_UPDATE, ("InsStr(%p,%d) called", line, count));
+ TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called",
+ (void *) SP_PARM,
+ (void *) 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_1(parm_ich, count), count, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(parm_ich, count),
+ count,
+ NCURSES_SP_NAME(_nc_outch));
while (count) {
- PutAttrChar(CHREF(*line));
+ PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
line++;
count--;
}
} else if (enter_insert_mode && exit_insert_mode) {
TPUTS_TRACE("enter_insert_mode");
- putp(enter_insert_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx enter_insert_mode);
while (count) {
- PutAttrChar(CHREF(*line));
+ PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
if (insert_padding) {
TPUTS_TRACE("insert_padding");
- putp(insert_padding);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_padding);
}
line++;
count--;
}
TPUTS_TRACE("exit_insert_mode");
- putp(exit_insert_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_insert_mode);
} else {
while (count) {
TPUTS_TRACE("insert_character");
- putp(insert_character);
- PutAttrChar(CHREF(*line));
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_character);
+ PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
if (insert_padding) {
TPUTS_TRACE("insert_padding");
- putp(insert_padding);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_padding);
}
line++;
count--;
}
}
- position_check(SP->_cursrow, SP->_curscol, "InsStr");
+ position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "InsStr");
}
/*
@@ -1545,22 +1684,25 @@ InsStr(NCURSES_CH_T * line, int count)
*/
static void
-DelChar(int count)
+DelChar(NCURSES_SP_DCLx int count)
{
int n;
- TR(TRACE_UPDATE, ("DelChar(%d) called, position = (%ld,%ld)",
- count,
- (long) newscr->_cury,
- (long) newscr->_curx));
+ TR(TRACE_UPDATE, ("DelChar(%p, %d) called, position = (%ld,%ld)",
+ (void *) SP_PARM, count,
+ (long) NewScreen(SP_PARM)->_cury,
+ (long) NewScreen(SP_PARM)->_curx));
if (parm_dch) {
TPUTS_TRACE("parm_dch");
- tputs(TPARM_1(parm_dch, count), count, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_1(parm_dch, count),
+ count,
+ NCURSES_SP_NAME(_nc_outch));
} else {
for (n = 0; n < count; n++) {
TPUTS_TRACE("delete_character");
- putp(delete_character);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_character);
}
}
}
@@ -1599,54 +1741,66 @@ DelChar(int count)
/* 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)
+scroll_csr_forward(NCURSES_SP_DCLx
+ 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(blank);
+ GoTo(NCURSES_SP_ARGx bot, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("scroll_forward");
- putp(scroll_forward);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_forward);
} else if (n == 1 && delete_line && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("delete_line");
- putp(delete_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
} else if (parm_index && top == miny && bot == maxy) {
- GoTo(bot, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx bot, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("parm_index");
- tputs(TPARM_2(parm_index, n, 0), n, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(parm_index, n, 0),
+ n,
+ NCURSES_SP_NAME(_nc_outch));
} else if (parm_delete_line && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("parm_delete_line");
- tputs(TPARM_2(parm_delete_line, n, 0), n, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(parm_delete_line, n, 0),
+ n,
+ NCURSES_SP_NAME(_nc_outch));
} else if (scroll_forward && top == miny && bot == maxy) {
- GoTo(bot, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx bot, 0);
+ UpdateAttrs(SP_PARM, blank);
for (i = 0; i < n; i++) {
TPUTS_TRACE("scroll_forward");
- putp(scroll_forward);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_forward);
}
} else if (delete_line && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
for (i = 0; i < n; i++) {
TPUTS_TRACE("delete_line");
- putp(delete_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
}
} else
return ERR;
#if NCURSES_EXT_FUNCS
- if (FILL_BCE()) {
+ if (FILL_BCE(SP_PARM)) {
int j;
for (i = 0; i < n; i++) {
- GoTo(bot - i, 0);
- for (j = 0; j < screen_columns; j++)
- PutChar(CHREF(blank));
+ GoTo(NCURSES_SP_ARGx bot - i, 0);
+ for (j = 0; j < screen_columns(SP_PARM); j++)
+ PutChar(NCURSES_SP_ARGx CHREF(blank));
}
}
#endif
@@ -1656,55 +1810,66 @@ scroll_csr_forward(int n, int top, int bot, int miny, int maxy, NCURSES_CH_T bla
/* 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,
+scroll_csr_backward(NCURSES_SP_DCLx
+ 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(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("scroll_reverse");
- putp(scroll_reverse);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_reverse);
} else if (n == 1 && insert_line && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("insert_line");
- putp(insert_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
} else if (parm_rindex && top == miny && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("parm_rindex");
- tputs(TPARM_2(parm_rindex, n, 0), n, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(parm_rindex, n, 0),
+ n,
+ NCURSES_SP_NAME(_nc_outch));
} else if (parm_insert_line && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
TPUTS_TRACE("parm_insert_line");
- tputs(TPARM_2(parm_insert_line, n, 0), n, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(parm_insert_line, n, 0),
+ n,
+ NCURSES_SP_NAME(_nc_outch));
} else if (scroll_reverse && top == miny && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
for (i = 0; i < n; i++) {
TPUTS_TRACE("scroll_reverse");
- putp(scroll_reverse);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_reverse);
}
} else if (insert_line && bot == maxy) {
- GoTo(top, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx top, 0);
+ UpdateAttrs(SP_PARM, blank);
for (i = 0; i < n; i++) {
TPUTS_TRACE("insert_line");
- putp(insert_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
}
} else
return ERR;
#if NCURSES_EXT_FUNCS
- if (FILL_BCE()) {
+ if (FILL_BCE(SP_PARM)) {
int j;
for (i = 0; i < n; i++) {
- GoTo(top + i, 0);
- for (j = 0; j < screen_columns; j++)
- PutChar(CHREF(blank));
+ GoTo(NCURSES_SP_ARGx top + i, 0);
+ for (j = 0; j < screen_columns(SP_PARM); j++)
+ PutChar(NCURSES_SP_ARGx CHREF(blank));
}
}
#endif
@@ -1714,40 +1879,46 @@ scroll_csr_backward(int n, int top, int bot, int miny, int maxy,
/* 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)
+scroll_idl(NCURSES_SP_DCLx 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(blank);
+ GoTo(NCURSES_SP_ARGx del, 0);
+ UpdateAttrs(SP_PARM, blank);
if (n == 1 && delete_line) {
TPUTS_TRACE("delete_line");
- putp(delete_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
} else if (parm_delete_line) {
TPUTS_TRACE("parm_delete_line");
- tputs(TPARM_2(parm_delete_line, n, 0), n, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(parm_delete_line, n, 0),
+ n,
+ NCURSES_SP_NAME(_nc_outch));
} else { /* if (delete_line) */
for (i = 0; i < n; i++) {
TPUTS_TRACE("delete_line");
- putp(delete_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
}
}
- GoTo(ins, 0);
- UpdateAttrs(blank);
+ GoTo(NCURSES_SP_ARGx ins, 0);
+ UpdateAttrs(SP_PARM, blank);
if (n == 1 && insert_line) {
TPUTS_TRACE("insert_line");
- putp(insert_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
} else if (parm_insert_line) {
TPUTS_TRACE("parm_insert_line");
- tputs(TPARM_2(parm_insert_line, n, 0), n, _nc_outch);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_2(parm_insert_line, n, 0),
+ n,
+ NCURSES_SP_NAME(_nc_outch));
} else { /* if (insert_line) */
for (i = 0; i < n; i++) {
TPUTS_TRACE("insert_line");
- putp(insert_line);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
}
}
@@ -1763,15 +1934,25 @@ scroll_idl(int n, int del, int ins, NCURSES_CH_T blank)
* save/restore cursor capabilities if the terminal has them.
*/
NCURSES_EXPORT(int)
-_nc_scrolln(int n, int top, int bot, int maxy)
+NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_DCLx
+ int n,
+ int top,
+ int bot,
+ int maxy)
/* scroll region from top to bot by n lines */
{
- NCURSES_CH_T blank = ClrBlank(stdscr);
+ NCURSES_CH_T blank;
int i;
bool cursor_saved = FALSE;
int res;
- TR(TRACE_MOVE, ("mvcur_scrolln(%d, %d, %d, %d)", n, top, bot, maxy));
+ TR(TRACE_MOVE, ("_nc_scrolln(%p, %d, %d, %d, %d)",
+ (void *) SP_PARM, n, top, bot, maxy));
+
+ if (!IsValidScreen(SP_PARM))
+ return (ERR);
+
+ blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
#if USE_XMC_SUPPORT
/*
@@ -1787,34 +1968,36 @@ _nc_scrolln(int n, int top, int bot, int maxy)
* 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);
+ res = scroll_csr_forward(NCURSES_SP_ARGx 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))
+ && (SP_PARM->_cursrow == bot || SP_PARM->_cursrow == bot - 1))
&& save_cursor && restore_cursor) {
cursor_saved = TRUE;
TPUTS_TRACE("save_cursor");
- putp(save_cursor);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx save_cursor);
}
TPUTS_TRACE("change_scroll_region");
- putp(TPARM_2(change_scroll_region, top, bot));
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
+ TPARM_2(change_scroll_region, top, bot));
if (cursor_saved) {
TPUTS_TRACE("restore_cursor");
- putp(restore_cursor);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx restore_cursor);
} else {
- SP->_cursrow = SP->_curscol = -1;
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
}
- res = scroll_csr_forward(n, top, bot, top, bot, blank);
+ res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, top, bot, blank);
TPUTS_TRACE("change_scroll_region");
- putp(TPARM_2(change_scroll_region, 0, maxy));
- SP->_cursrow = SP->_curscol = -1;
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
+ TPARM_2(change_scroll_region, 0, maxy));
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
}
- if (res == ERR && _nc_idlok)
- res = scroll_idl(n, top, bot - n + 1, blank);
+ if (res == ERR && SP_PARM->_nc_sp_idlok)
+ res = scroll_idl(NCURSES_SP_ARGx n, top, bot - n + 1, blank);
/*
* Clear the newly shifted-in text.
@@ -1823,44 +2006,49 @@ _nc_scrolln(int n, int top, int bot, int maxy)
&& (non_dest_scroll_region || (memory_below && bot == maxy))) {
static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
if (bot == maxy && clr_eos) {
- GoTo(bot - n + 1, 0);
- ClrToEOS(blank2);
+ GoTo(NCURSES_SP_ARGx bot - n + 1, 0);
+ ClrToEOS(NCURSES_SP_ARGx blank2);
} else {
for (i = 0; i < n; i++) {
- GoTo(bot - i, 0);
- ClrToEOL(blank2, FALSE);
+ GoTo(NCURSES_SP_ARGx bot - i, 0);
+ ClrToEOL(NCURSES_SP_ARGx blank2, FALSE);
}
}
}
} else { /* (n < 0) - scroll down (backward) */
- res = scroll_csr_backward(-n, top, bot, 0, maxy, blank);
+ res = scroll_csr_backward(NCURSES_SP_ARGx -n, top, bot, 0, maxy, blank);
if (res == ERR && change_scroll_region) {
- if (top != 0 && (SP->_cursrow == top || SP->_cursrow == top - 1)
+ if (top != 0
+ && (SP_PARM->_cursrow == top ||
+ SP_PARM->_cursrow == top - 1)
&& save_cursor && restore_cursor) {
cursor_saved = TRUE;
TPUTS_TRACE("save_cursor");
- putp(save_cursor);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx save_cursor);
}
TPUTS_TRACE("change_scroll_region");
- putp(TPARM_2(change_scroll_region, top, bot));
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
+ TPARM_2(change_scroll_region, top, bot));
if (cursor_saved) {
TPUTS_TRACE("restore_cursor");
- putp(restore_cursor);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx restore_cursor);
} else {
- SP->_cursrow = SP->_curscol = -1;
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
}
- res = scroll_csr_backward(-n, top, bot, top, bot, blank);
+ res = scroll_csr_backward(NCURSES_SP_ARGx
+ -n, top, bot, top, bot, blank);
TPUTS_TRACE("change_scroll_region");
- putp(TPARM_2(change_scroll_region, 0, maxy));
- SP->_cursrow = SP->_curscol = -1;
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
+ TPARM_2(change_scroll_region, 0, maxy));
+ SP_PARM->_cursrow = SP_PARM->_curscol = -1;
}
- if (res == ERR && _nc_idlok)
- res = scroll_idl(-n, bot + n + 1, top, blank);
+ if (res == ERR && SP_PARM->_nc_sp_idlok)
+ res = scroll_idl(NCURSES_SP_ARGx -n, bot + n + 1, top, blank);
/*
* Clear the newly shifted-in text.
@@ -1869,8 +2057,8 @@ _nc_scrolln(int n, int top, int bot, int maxy)
&& (non_dest_scroll_region || (memory_above && top == 0))) {
static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
for (i = 0; i < -n; i++) {
- GoTo(i + top, 0);
- ClrToEOL(blank2, FALSE);
+ GoTo(NCURSES_SP_ARGx i + top, 0);
+ ClrToEOL(NCURSES_SP_ARGx blank2, FALSE);
}
}
}
@@ -1878,99 +2066,163 @@ _nc_scrolln(int n, int top, int bot, int maxy)
if (res == ERR)
return (ERR);
- _nc_scroll_window(curscr, n, top, bot, blank);
+ _nc_scroll_window(CurScreen(SP_PARM), n,
+ (NCURSES_SIZE_T) top,
+ (NCURSES_SIZE_T) bot,
+ blank);
/* shift hash values too - they can be reused */
- _nc_scroll_oldhash(n, top, bot);
+ NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_ARGx n, top, bot);
return (OK);
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+_nc_scrolln(int n, int top, int bot, int maxy)
+{
+ return NCURSES_SP_NAME(_nc_scrolln) (CURRENT_SCREEN, n, top, bot, maxy);
+}
+#endif
+
NCURSES_EXPORT(void)
-_nc_screen_resume(void)
+NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_DCL0)
{
+ assert(SP_PARM);
+
/* make sure terminal is in a sane known state */
- SetAttr(SCREEN_ATTRS(SP), A_NORMAL);
- newscr->_clear = TRUE;
+ SetAttr(SCREEN_ATTRS(SP_PARM), A_NORMAL);
+ NewScreen(SP_PARM)->_clear = TRUE;
/* reset color pairs and definitions */
- if (SP->_coloron || SP->_color_defs)
- _nc_reset_colors();
+ if (SP_PARM->_coloron || SP_PARM->_color_defs)
+ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_ARG);
/* restore user-defined colors, if any */
- if (SP->_color_defs < 0) {
+ if (SP_PARM->_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);
+ SP_PARM->_color_defs = -(SP_PARM->_color_defs);
+ for (n = 0; n < SP_PARM->_color_defs; ++n) {
+ if (SP_PARM->_color_table[n].init) {
+ NCURSES_SP_NAME(init_color) (NCURSES_SP_ARGx
+ (short) n,
+ SP_PARM->_color_table[n].r,
+ SP_PARM->_color_table[n].g,
+ SP_PARM->_color_table[n].b);
}
}
}
if (exit_attribute_mode)
- putp(exit_attribute_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_attribute_mode);
else {
/* turn off attributes */
if (exit_alt_charset_mode)
- putp(exit_alt_charset_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_alt_charset_mode);
if (exit_standout_mode)
- putp(exit_standout_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_standout_mode);
if (exit_underline_mode)
- putp(exit_underline_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_underline_mode);
}
if (exit_insert_mode)
- putp(exit_insert_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_insert_mode);
if (enter_am_mode && exit_am_mode)
- putp(auto_right_margin ? enter_am_mode : exit_am_mode);
+ NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
+ (auto_right_margin
+ ? enter_am_mode
+ : exit_am_mode));
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_screen_resume(void)
+{
+ NCURSES_SP_NAME(_nc_screen_resume) (CURRENT_SCREEN);
+}
+#endif
+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_screen_init) (NCURSES_SP_DCL0)
+{
+ NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
+}
+
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
_nc_screen_init(void)
{
- _nc_screen_resume();
+ NCURSES_SP_NAME(_nc_screen_init) (CURRENT_SCREEN);
}
+#endif
/* wrap up screen handling */
NCURSES_EXPORT(void)
-_nc_screen_wrap(void)
+NCURSES_SP_NAME(_nc_screen_wrap) (NCURSES_SP_DCL0)
{
- UpdateAttrs(normal);
+ if (SP_PARM == 0)
+ return;
+
+ UpdateAttrs(SP_PARM, normal);
#if NCURSES_EXT_FUNCS
- if (SP->_coloron
- && !SP->_default_color) {
+ if (SP_PARM->_coloron
+ && !SP_PARM->_default_color) {
static const 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);
+ SP_PARM->_default_color = TRUE;
+ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
+ -1,
+ 0,
+ FALSE,
+ NCURSES_SP_NAME(_nc_outch));
+ SP_PARM->_default_color = FALSE;
+
+ TINFO_MVCUR(NCURSES_SP_ARGx
+ SP_PARM->_cursrow,
+ SP_PARM->_curscol,
+ screen_lines(SP_PARM) - 1,
+ 0);
+
+ ClrToEOL(NCURSES_SP_ARGx blank, TRUE);
}
#endif
- if (SP->_color_defs) {
- _nc_reset_colors();
+ if (SP_PARM->_color_defs) {
+ NCURSES_SP_NAME(_nc_reset_colors) (NCURSES_SP_ARG);
}
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_screen_wrap(void)
+{
+ NCURSES_SP_NAME(_nc_screen_wrap) (CURRENT_SCREEN);
+}
+#endif
+
#if USE_XMC_SUPPORT
NCURSES_EXPORT(void)
-_nc_do_xmc_glitch(attr_t previous)
+NCURSES_SP_NAME(_nc_do_xmc_glitch) (NCURSES_SP_DCLx attr_t previous)
{
- attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP)));
-
- 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));
+ if (SP_PARM != 0) {
+ attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP_PARM)));
+
+ while (chg != 0) {
+ if (chg & 1) {
+ SP_PARM->_curscol += magic_cookie_glitch;
+ if (SP_PARM->_curscol >= SP_PARM->_columns)
+ wrap_cursor(NCURSES_SP_ARG);
+ TR(TRACE_UPDATE, ("bumped to %d,%d after cookie",
+ SP_PARM->_cursrow, SP_PARM->_curscol));
+ }
+ chg >>= 1;
}
- chg >>= 1;
}
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_do_xmc_glitch(attr_t previous)
+{
+ NCURSES_SP_NAME(_nc_do_xmc_glitch) (CURRENT_SCREEN, previous);
+}
+#endif
+
#endif /* USE_XMC_SUPPORT */
diff --git a/ncurses/wcwidth.h b/ncurses/wcwidth.h
new file mode 100644
index 000000000000..61e822ad679f
--- /dev/null
+++ b/ncurses/wcwidth.h
@@ -0,0 +1,309 @@
+/*
+ * This is an implementation of wcwidth() and wcswidth() (defined in
+ * IEEE Std 1002.1-2001) for Unicode.
+ *
+ * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html
+ * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html
+ *
+ * In fixed-width output devices, Latin characters all occupy a single
+ * "cell" position of equal width, whereas ideographic CJK characters
+ * occupy two such cells. Interoperability between terminal-line
+ * applications and (teletype-style) character terminals using the
+ * UTF-8 encoding requires agreement on which character should advance
+ * the cursor by how many cell positions. No established formal
+ * standards exist at present on which Unicode character shall occupy
+ * how many cell positions on character terminals. These routines are
+ * a first attempt of defining such behavior based on simple rules
+ * applied to data provided by the Unicode Consortium.
+ *
+ * For some graphical characters, the Unicode standard explicitly
+ * defines a character-cell width via the definition of the East Asian
+ * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes.
+ * In all these cases, there is no ambiguity about which width a
+ * terminal shall use. For characters in the East Asian Ambiguous (A)
+ * class, the width choice depends purely on a preference of backward
+ * compatibility with either historic CJK or Western practice.
+ * Choosing single-width for these characters is easy to justify as
+ * the appropriate long-term solution, as the CJK practice of
+ * displaying these characters as double-width comes from historic
+ * implementation simplicity (8-bit encoded characters were displayed
+ * single-width and 16-bit ones double-width, even for Greek,
+ * Cyrillic, etc.) and not any typographic considerations.
+ *
+ * Much less clear is the choice of width for the Not East Asian
+ * (Neutral) class. Existing practice does not dictate a width for any
+ * of these characters. It would nevertheless make sense
+ * typographically to allocate two character cells to characters such
+ * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be
+ * represented adequately with a single-width glyph. The following
+ * routines at present merely assign a single-cell width to all
+ * neutral characters, in the interest of simplicity. This is not
+ * entirely satisfactory and should be reconsidered before
+ * establishing a formal standard in this area. At the moment, the
+ * decision which Not East Asian (Neutral) characters should be
+ * represented by double-width glyphs cannot yet be answered by
+ * applying a simple rule from the Unicode database content. Setting
+ * up a proper standard for the behavior of UTF-8 character terminals
+ * will require a careful analysis not only of each Unicode character,
+ * but also of each presentation form, something the author of these
+ * routines has avoided to do so far.
+ *
+ * http://www.unicode.org/unicode/reports/tr11/
+ *
+ * Markus Kuhn -- 2007-05-26 (Unicode 5.0)
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * for any purpose and without fee is hereby granted. The author
+ * disclaims all warranties with regard to this software.
+ *
+ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+ */
+
+#include <wchar.h>
+
+struct interval {
+ int first;
+ int last;
+};
+
+/* auxiliary function for binary search in interval table */
+static int bisearch(wchar_t ucs, const struct interval *table, int max) {
+ int min = 0;
+ int mid;
+
+ if (ucs < table[0].first || ucs > table[max].last)
+ return 0;
+ while (max >= min) {
+ mid = (min + max) / 2;
+ if (ucs > table[mid].last)
+ min = mid + 1;
+ else if (ucs < table[mid].first)
+ max = mid - 1;
+ else
+ return 1;
+ }
+
+ return 0;
+}
+
+
+/* The following two functions define the column width of an ISO 10646
+ * character as follows:
+ *
+ * - The null character (U+0000) has a column width of 0.
+ *
+ * - Other C0/C1 control characters and DEL will lead to a return
+ * value of -1.
+ *
+ * - Non-spacing and enclosing combining characters (general
+ * category code Mn or Me in the Unicode database) have a
+ * column width of 0.
+ *
+ * - SOFT HYPHEN (U+00AD) has a column width of 1.
+ *
+ * - Other format characters (general category code Cf in the Unicode
+ * database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.
+ *
+ * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
+ * have a column width of 0.
+ *
+ * - Spacing characters in the East Asian Wide (W) or East Asian
+ * Full-width (F) category as defined in Unicode Technical
+ * Report #11 have a column width of 2.
+ *
+ * - All remaining characters (including all printable
+ * ISO 8859-1 and WGL4 characters, Unicode control characters,
+ * etc.) have a column width of 1.
+ *
+ * This implementation assumes that wchar_t characters are encoded
+ * in ISO 10646.
+ */
+
+int mk_wcwidth(wchar_t ucs)
+{
+ /* sorted list of non-overlapping intervals of non-spacing characters */
+ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */
+ static const struct interval combining[] = {
+ { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 },
+ { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
+ { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 },
+ { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 },
+ { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
+ { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
+ { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 },
+ { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D },
+ { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 },
+ { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD },
+ { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },
+ { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },
+ { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC },
+ { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD },
+ { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
+ { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D },
+ { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 },
+ { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 },
+ { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC },
+ { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
+ { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D },
+ { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
+ { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
+ { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },
+ { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },
+ { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },
+ { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 },
+ { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },
+ { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 },
+ { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F },
+ { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 },
+ { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD },
+ { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD },
+ { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },
+ { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B },
+ { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
+ { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },
+ { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF },
+ { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 },
+ { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F },
+ { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
+ { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },
+ { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },
+ { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },
+ { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 },
+ { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },
+ { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },
+ { 0xE0100, 0xE01EF }
+ };
+
+ /* test for 8-bit control characters */
+ if (ucs == 0)
+ return 0;
+ if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
+ return -1;
+
+ /* binary search in table of non-spacing characters */
+ if (bisearch(ucs, combining,
+ sizeof(combining) / sizeof(struct interval) - 1))
+ return 0;
+
+ /* if we arrive here, ucs is not a combining or C0/C1 control character */
+
+ return 1 +
+ (ucs >= 0x1100 &&
+ (ucs <= 0x115f || /* Hangul Jamo init. consonants */
+ ucs == 0x2329 || ucs == 0x232a ||
+ (ucs >= 0x2e80 && ucs <= 0xa4cf &&
+ ucs != 0x303f) || /* CJK ... Yi */
+ (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */
+ (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */
+ (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */
+ (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */
+ (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */
+ (ucs >= 0xffe0 && ucs <= 0xffe6) ||
+ (ucs >= 0x20000 && ucs <= 0x2fffd) ||
+ (ucs >= 0x30000 && ucs <= 0x3fffd)));
+}
+
+
+int mk_wcswidth(const wchar_t *pwcs, size_t n)
+{
+ int w, width = 0;
+
+ for (;*pwcs && n-- > 0; pwcs++)
+ if ((w = mk_wcwidth(*pwcs)) < 0)
+ return -1;
+ else
+ width += w;
+
+ return width;
+}
+
+
+/*
+ * The following functions are the same as mk_wcwidth() and
+ * mk_wcswidth(), except that spacing characters in the East Asian
+ * Ambiguous (A) category as defined in Unicode Technical Report #11
+ * have a column width of 2. This variant might be useful for users of
+ * CJK legacy encodings who want to migrate to UCS without changing
+ * the traditional terminal character-width behaviour. It is not
+ * otherwise recommended for general use.
+ */
+int mk_wcwidth_cjk(wchar_t ucs)
+{
+ /* sorted list of non-overlapping intervals of East Asian Ambiguous
+ * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */
+ static const struct interval ambiguous[] = {
+ { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 },
+ { 0x00AA, 0x00AA }, { 0x00AE, 0x00AE }, { 0x00B0, 0x00B4 },
+ { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 },
+ { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 },
+ { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED },
+ { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA },
+ { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 },
+ { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B },
+ { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 },
+ { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 },
+ { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 },
+ { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE },
+ { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 },
+ { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA },
+ { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 },
+ { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB },
+ { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB },
+ { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0391, 0x03A1 },
+ { 0x03A3, 0x03A9 }, { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 },
+ { 0x0401, 0x0401 }, { 0x0410, 0x044F }, { 0x0451, 0x0451 },
+ { 0x2010, 0x2010 }, { 0x2013, 0x2016 }, { 0x2018, 0x2019 },
+ { 0x201C, 0x201D }, { 0x2020, 0x2022 }, { 0x2024, 0x2027 },
+ { 0x2030, 0x2030 }, { 0x2032, 0x2033 }, { 0x2035, 0x2035 },
+ { 0x203B, 0x203B }, { 0x203E, 0x203E }, { 0x2074, 0x2074 },
+ { 0x207F, 0x207F }, { 0x2081, 0x2084 }, { 0x20AC, 0x20AC },
+ { 0x2103, 0x2103 }, { 0x2105, 0x2105 }, { 0x2109, 0x2109 },
+ { 0x2113, 0x2113 }, { 0x2116, 0x2116 }, { 0x2121, 0x2122 },
+ { 0x2126, 0x2126 }, { 0x212B, 0x212B }, { 0x2153, 0x2154 },
+ { 0x215B, 0x215E }, { 0x2160, 0x216B }, { 0x2170, 0x2179 },
+ { 0x2190, 0x2199 }, { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 },
+ { 0x21D4, 0x21D4 }, { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 },
+ { 0x2202, 0x2203 }, { 0x2207, 0x2208 }, { 0x220B, 0x220B },
+ { 0x220F, 0x220F }, { 0x2211, 0x2211 }, { 0x2215, 0x2215 },
+ { 0x221A, 0x221A }, { 0x221D, 0x2220 }, { 0x2223, 0x2223 },
+ { 0x2225, 0x2225 }, { 0x2227, 0x222C }, { 0x222E, 0x222E },
+ { 0x2234, 0x2237 }, { 0x223C, 0x223D }, { 0x2248, 0x2248 },
+ { 0x224C, 0x224C }, { 0x2252, 0x2252 }, { 0x2260, 0x2261 },
+ { 0x2264, 0x2267 }, { 0x226A, 0x226B }, { 0x226E, 0x226F },
+ { 0x2282, 0x2283 }, { 0x2286, 0x2287 }, { 0x2295, 0x2295 },
+ { 0x2299, 0x2299 }, { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF },
+ { 0x2312, 0x2312 }, { 0x2460, 0x24E9 }, { 0x24EB, 0x254B },
+ { 0x2550, 0x2573 }, { 0x2580, 0x258F }, { 0x2592, 0x2595 },
+ { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, { 0x25B2, 0x25B3 },
+ { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, { 0x25C0, 0x25C1 },
+ { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, { 0x25CE, 0x25D1 },
+ { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, { 0x2605, 0x2606 },
+ { 0x2609, 0x2609 }, { 0x260E, 0x260F }, { 0x2614, 0x2615 },
+ { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 },
+ { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 },
+ { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F },
+ { 0x273D, 0x273D }, { 0x2776, 0x277F }, { 0xE000, 0xF8FF },
+ { 0xFFFD, 0xFFFD }, { 0xF0000, 0xFFFFD }, { 0x100000, 0x10FFFD }
+ };
+
+ /* binary search in table of non-spacing characters */
+ if (bisearch(ucs, ambiguous,
+ sizeof(ambiguous) / sizeof(struct interval) - 1))
+ return 2;
+
+ return mk_wcwidth(ucs);
+}
+
+
+int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
+{
+ int w, width = 0;
+
+ for (;*pwcs && n-- > 0; pwcs++)
+ if ((w = mk_wcwidth_cjk(*pwcs)) < 0)
+ return -1;
+ else
+ width += w;
+
+ return width;
+}
diff --git a/ncurses/widechar/lib_add_wch.c b/ncurses/widechar/lib_add_wch.c
index 93b41bb4930c..38d3130a54c4 100644
--- a/ncurses/widechar/lib_add_wch.c
+++ b/ncurses/widechar/lib_add_wch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2004-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,79 +35,409 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_add_wch.c,v 1.6 2006/12/02 21:19:17 tom Exp $")
+#if HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
-NCURSES_EXPORT(int)
-wadd_wch(WINDOW *win, const cchar_t *wch)
+MODULE_ID("$Id: lib_add_wch.c,v 1.12 2011/03/22 09:31:15 Petr.Pavlu Exp $")
+
+/* clone/adapt lib_addch.c */
+static const cchar_t blankchar = NewChar(BLANK_TEXT);
+
+/*
+ * 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
+ * wadd_wch(). 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 NCURSES_INLINE cchar_t
+render_char(WINDOW *win, cchar_t ch)
+/* compute a rendition of the given char correct for the current context */
{
- PUTC_DATA;
- int n;
- int code = ERR;
+ attr_t a = WINDOW_ATTRS(win);
+ int pair = GetPair(ch);
+
+ if (ISBLANK(ch)
+ && AttrOf(ch) == A_NORMAL
+ && pair == 0) {
+ /* color/pair in attrs has precedence over bkgrnd */
+ ch = win->_nc_bkgd;
+ SetAttr(ch, a | AttrOf(win->_nc_bkgd));
+ if ((pair = GET_WINDOW_PAIR(win)) == 0)
+ pair = GetPair(win->_nc_bkgd);
+ SetPair(ch, pair);
+ } else {
+ /* color in attrs has precedence over bkgrnd */
+ a |= AttrOf(win->_nc_bkgd) & COLOR_MASK(a);
+ /* color in ch has precedence */
+ if (pair == 0) {
+ if ((pair = GET_WINDOW_PAIR(win)) == 0)
+ pair = GetPair(win->_nc_bkgd);
+ }
+ AddAttr(ch, (a & COLOR_MASK(AttrOf(ch))));
+ SetPair(ch, pair);
+ }
+
+ TR(TRACE_VIRTPUT,
+ ("render_char bkg %s (%d), attrs %s (%d) -> ch %s (%d)",
+ _tracech_t2(1, CHREF(win->_nc_bkgd)),
+ GetPair(win->_nc_bkgd),
+ _traceattr(WINDOW_ATTRS(win)),
+ GET_WINDOW_PAIR(win),
+ _tracech_t2(3, CHREF(ch)),
+ GetPair(ch)));
+
+ return (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 bool
+newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos)
+{
+ bool result = FALSE;
+
+ if (*ypos >= win->_regtop && *ypos == win->_regbottom) {
+ *ypos = win->_regbottom;
+ result = TRUE;
+ } else {
+ *ypos = (NCURSES_SIZE_T) (*ypos + 1);
+ }
+ return result;
+}
- TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"), win,
- _tracech_t(wch)));
-
- if (win != 0) {
- PUTC_INIT;
- for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
- attr_t attrs = (wch->attr & A_ATTRIBUTES);
-
- 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) | attrs);
- break;
+/*
+ * 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).
+ */
+static int
+wrap_to_next_line(WINDOW *win)
+{
+ win->_flags |= _WRAPPED;
+ if (newline_forces_scroll(win, &(win->_cury))) {
+ win->_curx = win->_maxx;
+ if (!win->_scroll)
+ return (ERR);
+ scroll(win);
+ }
+ win->_curx = 0;
+ return (OK);
+}
+
+static int wadd_wch_literal(WINDOW *, cchar_t);
+/*
+ * Fill the given number of cells with blanks using the current background
+ * rendition. This saves/restores the current x-position.
+ */
+static void
+fill_cells(WINDOW *win, int count)
+{
+ cchar_t blank = blankchar;
+ int save_x = win->_curx;
+ int save_y = win->_cury;
+
+ while (count-- > 0) {
+ if (wadd_wch_literal(win, blank) == ERR)
+ break;
+ }
+ win->_curx = (NCURSES_SIZE_T) save_x;
+ win->_cury = (NCURSES_SIZE_T) save_y;
+}
+
+static int
+wadd_wch_literal(WINDOW *win, cchar_t ch)
+{
+ int x;
+ int y;
+ struct ldat *line;
+
+ x = win->_curx;
+ y = win->_cury;
+
+ CHECK_POSITION(win, x, y);
+
+ ch = render_char(win, ch);
+
+ line = win->_line + y;
+
+ CHANGED_CELL(line, x);
+
+ /*
+ * Non-spacing characters are added to the current cell.
+ *
+ * Spacing characters that are wider than one column require some display
+ * adjustments.
+ */
+ {
+ int len = wcwidth(CharOf(ch));
+ int i;
+ int j;
+ wchar_t *chars;
+
+ if (len == 0) { /* non-spacing */
+ if ((x > 0 && y >= 0)
+ || (win->_maxx >= 0 && win->_cury >= 1)) {
+ if (x > 0 && y >= 0)
+ chars = (win->_line[y].text[x - 1].chars);
+ else
+ chars = (win->_line[y - 1].text[win->_maxx].chars);
+ for (i = 0; i < CCHARW_MAX; ++i) {
+ if (chars[i] == 0) {
+ TR(TRACE_VIRTPUT,
+ ("added non-spacing %d: %x",
+ x, (int) CharOf(ch)));
+ chars[i] = CharOf(ch);
+ break;
+ }
+ }
+ }
+ goto testwrapping;
+ } else if (len > 1) { /* multi-column characters */
+ /*
+ * Check if the character will fit on the current line. If it does
+ * not fit, fill in the remainder of the line with blanks. and
+ * move to the next line.
+ */
+ if (len > win->_maxx + 1) {
+ TR(TRACE_VIRTPUT, ("character will not fit"));
+ return ERR;
+ } else if (x + len > win->_maxx + 1) {
+ int count = win->_maxx + 1 - x;
+ TR(TRACE_VIRTPUT, ("fill %d remaining cells", count));
+ fill_cells(win, count);
+ if (wrap_to_next_line(win) == ERR)
+ return ERR;
+ x = win->_curx;
+ y = win->_cury;
+ line = win->_line + y;
}
- for (n = 0; n < PUTC_n; n++) {
- if ((code = waddch(win, UChar(PUTC_buf[n]) | attrs)) == ERR) {
+ /*
+ * Check for cells which are orphaned by adding this character, set
+ * those to blanks.
+ *
+ * FIXME: this actually could fill j-i cells, more complicated to
+ * setup though.
+ */
+ for (i = 0; i < len; ++i) {
+ if (isWidecBase(win->_line[y].text[x + i])) {
+ break;
+ } else if (isWidecExt(win->_line[y].text[x + i])) {
+ for (j = i; x + j <= win->_maxx; ++j) {
+ if (!isWidecExt(win->_line[y].text[x + j])) {
+ TR(TRACE_VIRTPUT, ("fill %d orphan cells", j));
+ fill_cells(win, j);
+ break;
+ }
+ }
break;
}
}
- if (code == ERR)
- break;
+ /*
+ * Finally, add the cells for this character.
+ */
+ for (i = 0; i < len; ++i) {
+ cchar_t value = ch;
+ SetWidecExt(value, i);
+ TR(TRACE_VIRTPUT, ("multicolumn %d:%d (%d,%d)",
+ i + 1, len,
+ win->_begy + y, win->_begx + x));
+ line->text[x] = value;
+ CHANGED_CELL(line, x);
+ ++x;
+ }
+ goto testwrapping;
}
}
- TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
- return (code);
+ /*
+ * Single-column characters.
+ */
+ line->text[x++] = ch;
+ /*
+ * This label is used only for wide-characters.
+ */
+ testwrapping:
+
+ TR(TRACE_VIRTPUT, ("cell (%ld, %ld..%d) = %s",
+ (long) win->_cury, (long) win->_curx, x - 1,
+ _tracech_t(CHREF(ch))));
+
+ if (x > win->_maxx) {
+ return wrap_to_next_line(win);
+ }
+ win->_curx = (NCURSES_SIZE_T) x;
+ return OK;
}
-NCURSES_EXPORT(int)
-wecho_wchar(WINDOW *win, const cchar_t *wch)
+static NCURSES_INLINE int
+wadd_wch_nosync(WINDOW *win, cchar_t ch)
+/* the workhorse function -- add a character to the given window */
{
- PUTC_DATA;
- int n;
- int code = ERR;
+ NCURSES_SIZE_T x, y;
+ wchar_t *s;
+ int tabsize = 8;
+#if USE_REENTRANT
+ SCREEN *sp = _nc_screen_of(win);
+#endif
+
+ /*
+ * If we are using the alternate character set, forget about locale.
+ * Otherwise, if the locale claims the code is printable, treat it that
+ * way.
+ */
+ if ((AttrOf(ch) & A_ALTCHARSET)
+ || iswprint((wint_t) CharOf(ch)))
+ return wadd_wch_literal(win, ch);
- TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wecho_wchar(%p, %s)"), win,
- _tracech_t(wch)));
-
- if (win != 0) {
- PUTC_INIT;
- for (PUTC_i = 0; PUTC_i < CCHARW_MAX; ++PUTC_i) {
- attr_t attrs = (wch->attr & A_ATTRIBUTES);
-
- 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) | attrs);
- break;
+ /*
+ * 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 (CharOf(ch)) {
+ case '\t':
+#if USE_REENTRANT
+ tabsize = *ptrTabsize(sp);
+#else
+ tabsize = TABSIZE;
+#endif
+ x = (NCURSES_SIZE_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)) {
+ cchar_t blank = blankchar;
+ AddAttr(blank, AttrOf(ch));
+ while (win->_curx < x) {
+ if (wadd_wch_literal(win, blank) == ERR)
+ return (ERR);
}
- for (n = 0; n < PUTC_n; n++) {
- if ((code = waddch(win, UChar(PUTC_buf[n]) | attrs)) == ERR) {
- break;
+ break;
+ } else {
+ wclrtoeol(win);
+ win->_flags |= _WRAPPED;
+ if (newline_forces_scroll(win, &y)) {
+ x = win->_maxx;
+ if (win->_scroll) {
+ scroll(win);
+ x = 0;
}
+ } else {
+ x = 0;
+ }
+ }
+ break;
+ case '\n':
+ wclrtoeol(win);
+ if (newline_forces_scroll(win, &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:
+ if ((s = wunctrl(&ch)) != 0) {
+ while (*s) {
+ cchar_t sch;
+ SetChar(sch, *s++, AttrOf(ch));
+ if_EXT_COLORS(SetPair(sch, GetPair(ch)));
+ if (wadd_wch_literal(win, sch) == ERR)
+ return ERR;
}
- if (code == ERR)
- break;
+ return OK;
}
- wrefresh(win);
+ return ERR;
}
+ win->_curx = x;
+ win->_cury = y;
+
+ return OK;
+}
+
+/*
+ * The versions below call _nc_synchook(). 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)
+wadd_wch(WINDOW *win, const cchar_t *wch)
+{
+ int code = ERR;
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wadd_wch(%p, %s)"),
+ (void *) win,
+ _tracecchar_t(wch)));
+
+ if (win && (wadd_wch_nosync(win, *wch) != ERR)) {
+ _nc_synchook(win);
+ code = OK;
+ }
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
+ return (code);
+}
+
+NCURSES_EXPORT(int)
+wecho_wchar(WINDOW *win, const cchar_t *wch)
+{
+ int code = ERR;
+
+ TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"),
+ (void *) win,
+ _tracecchar_t(wch)));
+
+ if (win && (wadd_wch_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/ncurses/widechar/lib_box_set.c b/ncurses/widechar/lib_box_set.c
index 35fce46d8d40..585c94963b0f 100644
--- a/ncurses/widechar/lib_box_set.c
+++ b/ncurses/widechar/lib_box_set.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2003,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_box_set.c,v 1.4 2003/12/06 18:02:13 tom Exp $")
+MODULE_ID("$Id: lib_box_set.c,v 1.5 2009/10/24 22:36:56 tom Exp $")
NCURSES_EXPORT(int)
wborder_set(WINDOW *win,
@@ -53,7 +53,7 @@ wborder_set(WINDOW *win,
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,
+ (void *) win,
_tracech_t2(1, ls),
_tracech_t2(2, rs),
_tracech_t2(3, ts),
diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c
index b4a0c37a285f..c61c79529db7 100644
--- a/ncurses/widechar/lib_cchar.c
+++ b/ncurses/widechar/lib_cchar.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2001-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2001-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,7 +35,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_cchar.c,v 1.12 2007/05/12 19:03:06 tom Exp $")
+MODULE_ID("$Id: lib_cchar.c,v 1.20 2010/12/25 23:46:26 tom Exp $")
/*
* The SuSv2 description leaves some room for interpretation. We'll assume wch
@@ -50,15 +50,15 @@ setcchar(cchar_t *wcval,
short color_pair,
const void *opts)
{
- int i;
- int len;
+ unsigned i;
+ unsigned len;
int code = OK;
TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
- wcval, _nc_viswbuf(wch),
+ (void *) wcval, _nc_viswbuf(wch),
(unsigned long) attrs, color_pair, opts));
- len = wcslen(wch);
+ len = (unsigned) wcslen(wch);
if (opts != NULL
|| (len > 1 && wcwidth(wch[0]) < 0)) {
code = ERR;
@@ -80,7 +80,7 @@ setcchar(cchar_t *wcval,
memset(wcval, 0, sizeof(*wcval));
if (len != 0) {
- SetAttr(*wcval, attrs | COLOR_PAIR(color_pair));
+ SetAttr(*wcval, attrs | (attr_t) ColorPair(color_pair));
SetPair(CHDEREF(wcval), color_pair);
memcpy(&wcval->chars, wch, len * sizeof(wchar_t));
TR(TRACE_CCALLS, ("copy %d wchars, first is %s", len,
@@ -104,20 +104,28 @@ getcchar(const cchar_t *wcval,
int code = ERR;
TR(TRACE_CCALLS, (T_CALLED("getcchar(%p,%p,%p,%p,%p)"),
- wcval, wch, attrs, color_pair, opts));
+ (const void *) wcval,
+ (void *) wch,
+ (void *) attrs,
+ (void *) color_pair,
+ opts));
if (opts == NULL) {
- len = (wp = wmemchr(wcval->chars, L'\0', CCHARW_MAX))
- ? wp - wcval->chars
- : CCHARW_MAX;
+ len = ((wp = wmemchr(wcval->chars, L'\0', CCHARW_MAX))
+ ? (int) (wp - wcval->chars)
+ : CCHARW_MAX);
if (wch == NULL) {
- code = len;
+ /*
+ * If the value is a null, set the length to 1.
+ * If the value is not a null, return the length plus 1 for null.
+ */
+ code = (len < CCHARW_MAX) ? (len + 1) : CCHARW_MAX;
} else if (attrs == 0 || color_pair == 0) {
code = ERR;
} else if (len >= 0) {
*attrs = AttrOf(*wcval) & A_ATTRIBUTES;
- *color_pair = GetPair(*wcval);
+ *color_pair = (short) GetPair(*wcval);
wmemcpy(wch, wcval->chars, (unsigned) len);
wch[len] = L'\0';
code = OK;
diff --git a/ncurses/widechar/lib_erasewchar.c b/ncurses/widechar/lib_erasewchar.c
index 7d6455370ff9..a4ee93ffa428 100644
--- a/ncurses/widechar/lib_erasewchar.c
+++ b/ncurses/widechar/lib_erasewchar.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * Copyright (c) 2002,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_erasewchar.c,v 1.1 2002/05/11 20:38:06 tom Exp $")
+MODULE_ID("$Id: lib_erasewchar.c,v 1.2 2010/07/24 11:35:12 tom Exp $")
/*
* erasewchar()
@@ -42,7 +42,7 @@ MODULE_ID("$Id: lib_erasewchar.c,v 1.1 2002/05/11 20:38:06 tom Exp $")
*/
NCURSES_EXPORT(int)
-erasewchar(wchar_t * wch)
+erasewchar(wchar_t *wch)
{
int value;
int result = ERR;
@@ -63,7 +63,7 @@ erasewchar(wchar_t * wch)
*/
NCURSES_EXPORT(int)
-killwchar(wchar_t * wch)
+killwchar(wchar_t *wch)
{
int value;
int result = ERR;
diff --git a/ncurses/widechar/lib_get_wch.c b/ncurses/widechar/lib_get_wch.c
index 6cf3129f2d18..32033df2ff9b 100644
--- a/ncurses/widechar/lib_get_wch.c
+++ b/ncurses/widechar/lib_get_wch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,22 +40,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_get_wch.c,v 1.17 2008/08/16 19:22:55 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)
-#define state_unused
-#elif HAVE_MBRTOWC && HAVE_MBRLEN
-#define reset_mbytes(state) init_mb(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
+MODULE_ID("$Id: lib_get_wch.c,v 1.22 2010/08/28 21:00:35 tom Exp $")
NCURSES_EXPORT(int)
wget_wch(WINDOW *win, wint_t *result)
@@ -65,13 +50,13 @@ wget_wch(WINDOW *win, wint_t *result)
char buffer[(MB_LEN_MAX * 9) + 1]; /* allow some redundant shifts */
int status;
size_t count = 0;
- unsigned long value;
+ int value = 0;
wchar_t wch;
#ifndef state_unused
mbstate_t state;
#endif
- T((T_CALLED("wget_wch(%p)"), win));
+ T((T_CALLED("wget_wch(%p)"), (void *) win));
/*
* We can get a stream of single-byte characters and KEY_xxx codes from
@@ -95,12 +80,12 @@ wget_wch(WINDOW *win, wint_t *result)
* whether the improvement would be worth the effort.
*/
if (count != 0) {
- _nc_ungetch(sp, (int) value);
+ safe_ungetch(SP_PARM, value);
code = ERR;
}
break;
} else if (count + 1 >= sizeof(buffer)) {
- _nc_ungetch(sp, (int) value);
+ safe_ungetch(SP_PARM, value);
code = ERR;
break;
} else {
@@ -111,7 +96,7 @@ wget_wch(WINDOW *win, wint_t *result)
reset_mbytes(state);
if (check_mbytes(wch, buffer, count, state) != status) {
code = ERR; /* the two calls should match */
- _nc_ungetch(sp, (int) value);
+ safe_ungetch(SP_PARM, value);
}
value = wch;
break;
@@ -121,8 +106,8 @@ wget_wch(WINDOW *win, wint_t *result)
} else {
code = ERR;
}
- *result = value;
+ *result = (wint_t) value;
_nc_unlock_global(curses);
- T(("result %#lo", value));
+ T(("result %#o", value));
returnCode(code);
}
diff --git a/ncurses/widechar/lib_get_wstr.c b/ncurses/widechar/lib_get_wstr.c
index baa70a5a53f9..0b450211b2c3 100644
--- a/ncurses/widechar/lib_get_wstr.c
+++ b/ncurses/widechar/lib_get_wstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2004,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,9 +38,8 @@
*/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_get_wstr.c,v 1.10 2008/08/16 19:25:33 tom Exp $")
+MODULE_ID("$Id: lib_get_wstr.c,v 1.12 2009/10/24 22:38:11 tom Exp $")
static int
wadd_wint(WINDOW *win, wint_t *src)
@@ -96,7 +95,7 @@ wgetn_wstr(WINDOW *win, wint_t *str, int maxlen)
wint_t ch;
int y, x, code;
- T((T_CALLED("wgetn_wstr(%p,%p, %d)"), win, str, maxlen));
+ T((T_CALLED("wgetn_wstr(%p,%p, %d)"), (void *) win, (void *) str, maxlen));
if (!win)
returnCode(ERR);
diff --git a/ncurses/widechar/lib_hline_set.c b/ncurses/widechar/lib_hline_set.c
index 43175de83464..da92b834f1c3 100644
--- a/ncurses/widechar/lib_hline_set.c
+++ b/ncurses/widechar/lib_hline_set.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,16 +39,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_hline_set.c,v 1.2 2002/03/23 21:35:34 tom Exp $")
+MODULE_ID("$Id: lib_hline_set.c,v 1.4 2010/12/19 01:45:03 tom Exp $")
NCURSES_EXPORT(int)
-whline_set(WINDOW *win, const cchar_t * ch, int n)
+whline_set(WINDOW *win, const cchar_t *ch, int n)
{
int code = ERR;
- NCURSES_SIZE_T start;
- NCURSES_SIZE_T end;
+ int start;
+ int end;
- T((T_CALLED("whline_set(%p,%s,%d)"), win, _tracecchar_t(ch), n));
+ T((T_CALLED("whline_set(%p,%s,%d)"), (void *) win, _tracecchar_t(ch), n));
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
diff --git a/ncurses/widechar/lib_in_wch.c b/ncurses/widechar/lib_in_wch.c
index 5cd92e382de4..b2396508ba25 100644
--- a/ncurses/widechar/lib_in_wch.c
+++ b/ncurses/widechar/lib_in_wch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_in_wch.c,v 1.4 2006/09/03 15:41:22 tom Exp $")
+MODULE_ID("$Id: lib_in_wch.c,v 1.5 2009/10/24 22:37:55 tom Exp $")
NCURSES_EXPORT(int)
win_wch(WINDOW *win, cchar_t *wcval)
@@ -47,7 +47,7 @@ win_wch(WINDOW *win, cchar_t *wcval)
int row, col;
int code = OK;
- TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), win, wcval));
+ TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), (void *) win, (void *) wcval));
if (win != 0
&& wcval != 0) {
getyx(win, row, col);
diff --git a/ncurses/widechar/lib_in_wchnstr.c b/ncurses/widechar/lib_in_wchnstr.c
index e9f0646ea66a..57cc2ca6e73f 100644
--- a/ncurses/widechar/lib_in_wchnstr.c
+++ b/ncurses/widechar/lib_in_wchnstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2004-2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,14 +39,14 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_in_wchnstr.c,v 1.7 2007/02/11 01:00:00 tom Exp $")
+MODULE_ID("$Id: lib_in_wchnstr.c,v 1.8 2009/10/24 22:37:48 tom Exp $")
NCURSES_EXPORT(int)
win_wchnstr(WINDOW *win, cchar_t *wchstr, int n)
{
int code = OK;
- T((T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
+ T((T_CALLED("win_wchnstr(%p,%p,%d)"), (void *) win, (void *) wchstr, n));
if (win != 0
&& wchstr != 0) {
NCURSES_CH_T *src;
diff --git a/ncurses/widechar/lib_ins_wch.c b/ncurses/widechar/lib_ins_wch.c
index c3d0420e53b8..1eee8a3ec016 100644
--- a/ncurses/widechar/lib_ins_wch.c
+++ b/ncurses/widechar/lib_ins_wch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,39 +39,44 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_ins_wch.c,v 1.8 2005/12/03 20:24:19 tom Exp $")
+MODULE_ID("$Id: lib_ins_wch.c,v 1.16 2010/12/19 01:34:04 tom Exp $")
/*
* Insert the given character, updating the current location to simplify
* inserting a string.
*/
-static int
+NCURSES_EXPORT(int)
_nc_insert_wch(WINDOW *win, const cchar_t *wch)
{
int cells = wcwidth(CharOf(CHDEREF(wch)));
int cell;
+ int code = OK;
+
+ if (cells < 0) {
+ code = winsch(win, (chtype) CharOf(CHDEREF(wch)));
+ } else {
+ if (cells == 0)
+ cells = 1;
+
+ 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 - cells;
+
+ CHANGED_TO_EOL(line, win->_curx, win->_maxx);
+ while (temp1 > end)
+ *temp1-- = *temp2--;
+
+ *temp1 = _nc_render(win, *wch);
+ for (cell = 1; cell < cells; ++cell) {
+ SetWidecExt(temp1[cell], cell);
+ }
- if (cells <= 0)
- cells = 1;
-
- 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 - cells;
-
- CHANGED_TO_EOL(line, win->_curx, win->_maxx);
- while (temp1 > end)
- *temp1-- = *temp2--;
-
- *temp1 = _nc_render(win, *wch);
- for (cell = 1; cell < cells; ++cell) {
- SetWidecExt(temp1[cell], cell);
+ win->_curx++;
}
-
- win->_curx++;
}
- return OK;
+ return code;
}
NCURSES_EXPORT(int)
@@ -81,7 +86,7 @@ wins_wch(WINDOW *win, const cchar_t *wch)
NCURSES_SIZE_T ox;
int code = ERR;
- T((T_CALLED("wins_wch(%p, %s)"), win, _tracecchar_t(wch)));
+ T((T_CALLED("wins_wch(%p, %s)"), (void *) win, _tracecchar_t(wch)));
if (win != 0) {
oy = win->_cury;
@@ -104,20 +109,23 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
NCURSES_SIZE_T ox;
const wchar_t *cp;
- T((T_CALLED("wins_nwstr(%p,%s,%d)"), win, _nc_viswbufn(wstr, n), n));
+ T((T_CALLED("wins_nwstr(%p,%s,%d)"),
+ (void *) win, _nc_viswbufn(wstr, n), n));
if (win != 0
&& wstr != 0) {
if (n < 1)
- n = wcslen(wstr);
+ n = (int) wcslen(wstr);
code = OK;
if (n > 0) {
+ SCREEN *sp = _nc_screen_of(win);
+
oy = win->_cury;
ox = win->_curx;
for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
int len = wcwidth(*cp);
- if (len != 1 || !is8bits(*cp)) {
+ if ((len >= 0 && len != 1) || !is7bits(*cp)) {
cchar_t tmp_cchar;
wchar_t tmp_wchar = *cp;
memset(&tmp_cchar, 0, sizeof(tmp_cchar));
@@ -129,7 +137,7 @@ wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
code = _nc_insert_wch(win, &tmp_cchar);
} else {
/* tabs, other ASCII stuff */
- code = _nc_insert_ch(win, (chtype) (*cp));
+ code = _nc_insert_ch(sp, win, (chtype) (*cp));
}
if (code != OK)
break;
diff --git a/ncurses/widechar/lib_inwstr.c b/ncurses/widechar/lib_inwstr.c
index 2207a5f5d19f..4cf7182ae061 100644
--- a/ncurses/widechar/lib_inwstr.c
+++ b/ncurses/widechar/lib_inwstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2004,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_inwstr.c,v 1.4 2004/10/23 20:41:28 tom Exp $")
+MODULE_ID("$Id: lib_inwstr.c,v 1.5 2009/10/24 22:37:29 tom Exp $")
NCURSES_EXPORT(int)
winnwstr(WINDOW *win, wchar_t *wstr, int n)
@@ -50,7 +50,7 @@ winnwstr(WINDOW *win, wchar_t *wstr, int n)
cchar_t *text;
wchar_t wch;
- T((T_CALLED("winnwstr(%p,%p,%d)"), win, wstr, n));
+ T((T_CALLED("winnwstr(%p,%p,%d)"), (void *) win, (void *) wstr, n));
if (wstr != 0) {
if (win) {
getyx(win, row, col);
@@ -93,7 +93,7 @@ NCURSES_EXPORT(int)
winwstr(WINDOW *win, wchar_t *wstr)
{
int result = OK;
- T((T_CALLED("winwstr(%p,%p)"), win, wstr));
+ T((T_CALLED("winwstr(%p,%p)"), (void *) win, (void *) wstr));
if (winnwstr(win, wstr, CCHARW_MAX * (win->_maxx - win->_curx + 1)) == ERR)
result = ERR;
returnCode(result);
diff --git a/ncurses/widechar/lib_pecho_wchar.c b/ncurses/widechar/lib_pecho_wchar.c
index e61277574311..b6da7a865698 100644
--- a/ncurses/widechar/lib_pecho_wchar.c
+++ b/ncurses/widechar/lib_pecho_wchar.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2004 Free Software Foundation, Inc. *
+ * Copyright (c) 2004,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,12 +32,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_pecho_wchar.c,v 1.1 2004/01/03 21:42:01 tom Exp $")
+MODULE_ID("$Id: lib_pecho_wchar.c,v 1.2 2009/10/24 22:43:32 tom Exp $")
NCURSES_EXPORT(int)
-pecho_wchar(WINDOW *pad, const cchar_t * wch)
+pecho_wchar(WINDOW *pad, const cchar_t *wch)
{
- T((T_CALLED("pecho_wchar(%p, %s)"), pad, _tracech_t(wch)));
+ T((T_CALLED("pecho_wchar(%p, %s)"), (void *) pad, _tracech_t(wch)));
if (pad == 0)
returnCode(ERR);
diff --git a/ncurses/widechar/lib_unget_wch.c b/ncurses/widechar/lib_unget_wch.c
index bb2c4a084b15..7a626a9eee84 100644
--- a/ncurses/widechar/lib_unget_wch.c
+++ b/ncurses/widechar/lib_unget_wch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_unget_wch.c,v 1.10 2008/06/07 14:50:37 tom Exp $")
+MODULE_ID("$Id: lib_unget_wch.c,v 1.14 2010/07/24 11:35:21 tom Exp $")
/*
* Wrapper for wcrtomb() which obtains the length needed for the given
@@ -55,24 +55,24 @@ _nc_wcrtomb(char *target, wchar_t source, mbstate_t * state)
const wchar_t *tempp = temp;
temp[0] = source;
temp[1] = 0;
- result = wcsrtombs(NULL, &tempp, 0, state);
+ result = (int) wcsrtombs(NULL, &tempp, 0, state);
} else {
- result = wcrtomb(target, source, state);
+ result = (int) wcrtomb(target, source, state);
}
if (!isEILSEQ(result) && (result == 0))
result = 1;
- return result;
+ return (size_t) result;
}
NCURSES_EXPORT(int)
-unget_wch(const wchar_t wch)
+NCURSES_SP_NAME(unget_wch) (NCURSES_SP_DCLx const wchar_t wch)
{
int result = OK;
mbstate_t state;
size_t length;
int n;
- T((T_CALLED("unget_wch(%#lx)"), (unsigned long) wch));
+ T((T_CALLED("unget_wch(%p, %#lx)"), (void *) SP_PARM, (unsigned long) wch));
init_mb(state);
length = _nc_wcrtomb(0, wch, &state);
@@ -83,10 +83,12 @@ unget_wch(const wchar_t wch)
if ((string = (char *) malloc(length)) != 0) {
init_mb(state);
- wcrtomb(string, wch, &state);
+ /* ignore the result, since we already validated the character */
+ IGNORE_RC((int) wcrtomb(string, wch, &state));
for (n = (int) (length - 1); n >= 0; --n) {
- if (_nc_ungetch(SP, string[n]) != OK) {
+ if (NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx
+ UChar(string[n])) !=OK) {
result = ERR;
break;
}
@@ -101,3 +103,11 @@ unget_wch(const wchar_t wch)
returnCode(result);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+unget_wch(const wchar_t wch)
+{
+ return NCURSES_SP_NAME(unget_wch) (CURRENT_SCREEN, wch);
+}
+#endif
diff --git a/ncurses/widechar/lib_vid_attr.c b/ncurses/widechar/lib_vid_attr.c
index 1dc679e6d907..e4cf093a1f6b 100644
--- a/ncurses/widechar/lib_vid_attr.c
+++ b/ncurses/widechar/lib_vid_attr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2006,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,11 +31,14 @@
****************************************************************************/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_vid_attr.c,v 1.5 2007/06/30 22:03:02 tom Exp $")
+#ifndef CUR
+#define CUR SP_TERMTYPE
+#endif
+
+MODULE_ID("$Id: lib_vid_attr.c,v 1.14 2010/12/19 01:44:24 tom Exp $")
-#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
+#define doPut(mode) TPUTS_TRACE(#mode); NCURSES_SP_NAME(tputs)(NCURSES_SP_ARGx mode, 1, outc)
#define TurnOn(mask,mode) \
if ((turn_on & mask) && mode) { doPut(mode); }
@@ -50,14 +53,22 @@ MODULE_ID("$Id: lib_vid_attr.c,v 1.5 2007/06/30 22:03:02 tom Exp $")
if ((pair != old_pair) \
|| (fix_pair0 && (pair == 0)) \
|| (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
- _nc_do_color(old_pair, pair, reverse, outc); \
+ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx \
+ old_pair, pair, \
+ reverse, outc); \
} \
}
-#define set_color(mode, pair) mode &= ALL_BUT_COLOR; mode |= COLOR_PAIR(pair)
+#define set_color(mode, pair) \
+ mode &= ALL_BUT_COLOR; \
+ mode |= (attr_t) ColorPair(pair)
NCURSES_EXPORT(int)
-vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
+NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx
+ attr_t newmode,
+ short pair,
+ void *opts GCC_UNUSED,
+ NCURSES_SP_OUTC outc)
{
#if NCURSES_EXT_COLORS
static attr_t previous_attr = A_NORMAL;
@@ -65,9 +76,9 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
attr_t turn_on, turn_off;
bool reverse = FALSE;
- bool can_color = (SP == 0 || SP->_coloron);
+ bool can_color = (SP_PARM == 0 || SP_PARM->_coloron);
#if NCURSES_EXT_FUNCS
- bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
+ bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_color);
#else
#define fix_pair0 FALSE
#endif
@@ -76,18 +87,18 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
/* this allows us to go on whether or not newterm() has been called */
- if (SP) {
- previous_attr = AttrOf(SCREEN_ATTRS(SP));
- previous_pair = GetPair(SCREEN_ATTRS(SP));
+ if (SP_PARM) {
+ previous_attr = AttrOf(SCREEN_ATTRS(SP_PARM));
+ previous_pair = GetPair(SCREEN_ATTRS(SP_PARM));
}
TR(TRACE_ATTRS, ("previous attribute was %s, %d",
_traceattr(previous_attr), previous_pair));
#if !USE_XMC_SUPPORT
- if ((SP != 0)
+ if ((SP_PARM != 0)
&& (magic_cookie_glitch > 0))
- newmode &= ~(SP->_xmc_suppress);
+ newmode &= ~(SP_PARM->_xmc_suppress);
#endif
/*
@@ -144,10 +155,10 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
if (exit_attribute_mode) {
doPut(exit_attribute_mode);
} else {
- if (!SP || SP->_use_rmul) {
+ if (!SP_PARM || SP_PARM->_use_rmul) {
TurnOff(A_UNDERLINE, exit_underline_mode);
}
- if (!SP || SP->_use_rmso) {
+ if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
}
@@ -159,16 +170,18 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
} else if (set_attributes) {
if (turn_on || turn_off) {
TPUTS_TRACE("set_attributes");
- tputs(TPARM_9(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);
+ NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
+ TPARM_9(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 &= ALL_BUT_COLOR;
previous_pair = 0;
}
@@ -179,11 +192,11 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
- if (!SP || SP->_use_rmul) {
+ if (!SP_PARM || SP_PARM->_use_rmul) {
TurnOff(A_UNDERLINE, exit_underline_mode);
}
- if (!SP || SP->_use_rmso) {
+ if (!SP_PARM || SP_PARM->_use_rmso) {
TurnOff(A_STANDOUT, exit_standout_mode);
}
@@ -221,9 +234,9 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
if (reverse)
newmode |= A_REVERSE;
- if (SP) {
- SetAttr(SCREEN_ATTRS(SP), newmode);
- SetPair(SCREEN_ATTRS(SP), pair);
+ if (SP_PARM) {
+ SetAttr(SCREEN_ATTRS(SP_PARM), newmode);
+ SetPair(SCREEN_ATTRS(SP_PARM), pair);
} else {
previous_attr = newmode;
previous_pair = pair;
@@ -233,29 +246,60 @@ vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
#else
T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
set_color(newmode, pair);
- returnCode(vidputs(newmode, outc));
+ returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx newmode, outc));
#endif
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+vid_puts(attr_t newmode,
+ short pair,
+ void *opts GCC_UNUSED,
+ NCURSES_OUTC outc)
+{
+ SetSafeOutcWrapper(outc);
+ return NCURSES_SP_NAME(vid_puts) (CURRENT_SCREEN,
+ newmode,
+ pair,
+ opts,
+ _nc_outc_wrapper);
+}
+#endif
+
#undef vid_attr
NCURSES_EXPORT(int)
-vid_attr(attr_t newmode, short pair, void *opts)
+NCURSES_SP_NAME(vid_attr) (NCURSES_SP_DCLx
+ attr_t newmode,
+ short pair,
+ void *opts)
{
T((T_CALLED("vid_attr(%s,%d)"), _traceattr(newmode), pair));
- returnCode(vid_puts(newmode, pair, opts, _nc_outch));
+ returnCode(NCURSES_SP_NAME(vid_puts) (NCURSES_SP_ARGx
+ newmode,
+ pair,
+ opts,
+ NCURSES_SP_NAME(_nc_outch)));
}
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(int)
+vid_attr(attr_t newmode, short pair, void *opts)
+{
+ return NCURSES_SP_NAME(vid_attr) (CURRENT_SCREEN, newmode, pair, opts);
+}
+#endif
+
/*
* This implementation uses the same mask values for A_xxx and WA_xxx, so
* we can use termattrs() for part of the logic.
*/
NCURSES_EXPORT(attr_t)
-term_attrs(void)
+NCURSES_SP_NAME(term_attrs) (NCURSES_SP_DCL0)
{
attr_t attrs;
T((T_CALLED("term_attrs()")));
- attrs = termattrs();
+ attrs = SP_PARM ? NCURSES_SP_NAME(termattrs) (NCURSES_SP_ARG) : 0;
/* these are only supported for wide-character mode */
if (enter_horizontal_hl_mode)
@@ -273,3 +317,11 @@ term_attrs(void)
returnAttr(attrs);
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(attr_t)
+term_attrs(void)
+{
+ return NCURSES_SP_NAME(term_attrs) (CURRENT_SCREEN);
+}
+#endif
diff --git a/ncurses/widechar/lib_vline_set.c b/ncurses/widechar/lib_vline_set.c
index af42df1f24ab..917caac44b44 100644
--- a/ncurses/widechar/lib_vline_set.c
+++ b/ncurses/widechar/lib_vline_set.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,16 +39,16 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_vline_set.c,v 1.2 2002/03/23 21:36:01 tom Exp $")
+MODULE_ID("$Id: lib_vline_set.c,v 1.4 2010/12/19 01:50:50 tom Exp $")
NCURSES_EXPORT(int)
-wvline_set(WINDOW *win, const cchar_t * ch, int n)
+wvline_set(WINDOW *win, const cchar_t *ch, int n)
{
int code = ERR;
- NCURSES_SIZE_T row, col;
- NCURSES_SIZE_T end;
+ int row, col;
+ int end;
- T((T_CALLED("wvline(%p,%s,%d)"), win, _tracecchar_t(ch), n));
+ T((T_CALLED("wvline(%p,%s,%d)"), (void *) win, _tracecchar_t(ch), n));
if (win) {
NCURSES_CH_T wch;
diff --git a/ncurses/widechar/lib_wacs.c b/ncurses/widechar/lib_wacs.c
index fe893b4d2f8b..5a16e457e091 100644
--- a/ncurses/widechar/lib_wacs.c
+++ b/ncurses/widechar/lib_wacs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,9 +31,8 @@
****************************************************************************/
#include <curses.priv.h>
-#include <term.h>
-MODULE_ID("$Id: lib_wacs.c,v 1.7 2006/12/17 15:16:17 tom Exp $")
+MODULE_ID("$Id: lib_wacs.c,v 1.10 2010/12/19 01:43:19 tom Exp $")
NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0;
@@ -42,7 +41,7 @@ _nc_init_wacs(void)
{
/* *INDENT-OFF* */
static const struct {
- int map;
+ unsigned map;
int value[2];
} table[] = {
/* VT100 symbols */
@@ -80,6 +79,30 @@ _nc_init_wacs(void)
{ '{', { '*', 0x03c0 }}, /* greek pi */
{ '|', { '!', 0x2260 }}, /* not-equal */
{ '}', { 'f', 0x00a3 }}, /* pound-sterling symbol */
+ /* thick-line-drawing */
+ { 'L', { '+', 0x250f }}, /* upper left corner */
+ { 'M', { '+', 0x2517 }}, /* lower left corner */
+ { 'K', { '+', 0x2513 }}, /* upper right corner */
+ { 'J', { '+', 0x251b }}, /* lower right corner */
+ { 'T', { '+', 0x2523 }}, /* tee pointing left */
+ { 'U', { '+', 0x252b }}, /* tee pointing right */
+ { 'V', { '+', 0x253b }}, /* tee pointing up */
+ { 'W', { '+', 0x2533 }}, /* tee pointing down */
+ { 'Q', { '-', 0x2501 }}, /* horizontal line */
+ { 'X', { '|', 0x2503 }}, /* vertical line */
+ { 'N', { '+', 0x254b }}, /* large plus or crossover */
+ /* double-line-drawing */
+ { 'C', { '+', 0x2554 }}, /* upper left corner */
+ { 'D', { '+', 0x255a }}, /* lower left corner */
+ { 'B', { '+', 0x2557 }}, /* upper right corner */
+ { 'A', { '+', 0x255d }}, /* lower right corner */
+ { 'G', { '+', 0x2563 }}, /* tee pointing left */
+ { 'F', { '+', 0x2560 }}, /* tee pointing right */
+ { 'H', { '+', 0x2569 }}, /* tee pointing up */
+ { 'I', { '+', 0x2566 }}, /* tee pointing down */
+ { 'R', { '-', 0x2550 }}, /* horizontal line */
+ { 'Y', { '|', 0x2551 }}, /* vertical line */
+ { 'E', { '+', 0x256c }}, /* large plus or crossover */
};
/* *INDENT-ON* */
diff --git a/ncurses/widechar/lib_wunctrl.c b/ncurses/widechar/lib_wunctrl.c
index be2259acdcff..50958e44c7bb 100644
--- a/ncurses/widechar/lib_wunctrl.c
+++ b/ncurses/widechar/lib_wunctrl.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2001-2005,2007 Free Software Foundation, Inc. *
+ * Copyright (c) 2001-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -35,21 +35,31 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_wunctrl.c,v 1.12 2007/06/12 20:22:32 tom Exp $")
+MODULE_ID("$Id: lib_wunctrl.c,v 1.14 2010/12/19 01:42:15 tom Exp $")
NCURSES_EXPORT(wchar_t *)
-wunctrl(cchar_t *wc)
+NCURSES_SP_NAME(wunctrl) (NCURSES_SP_DCLx cchar_t *wc)
{
- static wchar_t str[CCHARW_MAX + 1], *sp;
+ static wchar_t str[CCHARW_MAX + 1], *wsp;
if (Charable(*wc)) {
- const char *p = unctrl((unsigned) _nc_to_char((wint_t) CharOf(*wc)));
+ const char *p =
+ NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx
+ (unsigned) _nc_to_char((wint_t)CharOf(*wc)));
- for (sp = str; *p; ++p) {
- *sp++ = _nc_to_widechar(*p);
+ for (wsp = str; *p; ++p) {
+ *wsp++ = (wchar_t) _nc_to_widechar(*p);
}
- *sp = 0;
+ *wsp = 0;
return str;
} else
return wc->chars;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(wchar_t *)
+wunctrl(cchar_t *wc)
+{
+ return NCURSES_SP_NAME(wunctrl) (CURRENT_SCREEN, wc);
+}
+#endif
diff --git a/ncurses/win32con/gettimeofday.c b/ncurses/win32con/gettimeofday.c
new file mode 100644
index 000000000000..e1ef3401de34
--- /dev/null
+++ b/ncurses/win32con/gettimeofday.c
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * Copyright (c) 2008,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+#define WINVER 0x0501
+
+#include <curses.priv.h>
+
+#include <windows.h>
+
+MODULE_ID("$Id: gettimeofday.c,v 1.2 2010/01/16 15:18:51 tom Exp $")
+
+#define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */
+
+int
+gettimeofday(struct timeval *tv, void *tz GCC_UNUSED)
+{
+ union {
+ FILETIME ft;
+ long long since1601; /* time since 1 Jan 1601 in 100ns units */
+ } data;
+
+ GetSystemTimeAsFileTime(&data.ft);
+ tv->tv_usec = (long) ((data.since1601 / 10LL) % 1000000LL);
+ tv->tv_sec = (long) ((data.since1601 - JAN1970) / 10000000LL);
+ return (0);
+}
diff --git a/ncurses/win32con/wcwidth.c b/ncurses/win32con/wcwidth.c
new file mode 100644
index 000000000000..cdef64a23c0e
--- /dev/null
+++ b/ncurses/win32con/wcwidth.c
@@ -0,0 +1,50 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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: wcwidth.c,v 1.2 2010/08/07 20:52:43 tom Exp $")
+
+#if USE_WIDEC_SUPPORT
+#define mk_wcwidth(ucs) _nc_wcwidth(ucs)
+#define mk_wcswidth(pwcs, n) _nc_wcswidth(pwcs, n)
+#define mk_wcwidth_cjk(ucs) _nc_wcwidth_cjk(ucs)
+#define mk_wcswidth_cjk(pwcs, n) _nc_wcswidth_cjk(pwcs, n)
+
+extern int mk_wcwidth(wchar_t);
+extern int mk_wcswidth(const wchar_t *, size_t);
+extern int mk_wcwidth_cjk(wchar_t);
+extern int mk_wcswidth_cjk(const wchar_t *, size_t);
+
+#include <wcwidth.h>
+#else
+void _nc_empty_wcwidth(void);
+void
+_nc_empty_wcwidth(void)
+{
+}
+#endif
diff --git a/ncurses/win32con/win_driver.c b/ncurses/win32con/win_driver.c
new file mode 100644
index 000000000000..c214639cd4df
--- /dev/null
+++ b/ncurses/win32con/win_driver.c
@@ -0,0 +1,1241 @@
+/****************************************************************************
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 *
+ * *
+ ****************************************************************************/
+
+/*
+ * TODO - GetMousePos(POINT * result) from ntconio.c
+ * TODO - implement nodelay
+ */
+
+#include <curses.priv.h>
+#define CUR my_term.type.
+
+MODULE_ID("$Id: win_driver.c,v 1.10 2010/12/25 19:28:21 tom Exp $")
+
+#define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
+
+#define AssertTCB() assert(TCB!=0 && TCB->magic==WINMAGIC)
+#define SetSP() assert(TCB->csp!=0); sp = TCB->csp
+
+#define GenMap(vKey,key) MAKELONG(key, vKey)
+
+static const LONG keylist[] =
+{
+ GenMap(VK_PRIOR, KEY_PPAGE),
+ GenMap(VK_NEXT, KEY_NPAGE),
+ GenMap(VK_END, KEY_END),
+ GenMap(VK_HOME, KEY_HOME),
+ GenMap(VK_LEFT, KEY_LEFT),
+ GenMap(VK_UP, KEY_UP),
+ GenMap(VK_RIGHT, KEY_RIGHT),
+ GenMap(VK_DOWN, KEY_DOWN),
+ GenMap(VK_DELETE, KEY_DC),
+ GenMap(VK_INSERT, KEY_IC)
+};
+#define N_INI ((int)(sizeof(keylist)/sizeof(keylist[0])))
+#define FKEYS 24
+#define MAPSIZE (FKEYS + N_INI)
+#define NUMPAIRS 64
+
+typedef struct props {
+ CONSOLE_SCREEN_BUFFER_INFO SBI;
+ bool progMode;
+ DWORD map[MAPSIZE];
+ DWORD rmap[MAPSIZE];
+ WORD pairs[NUMPAIRS];
+} Properties;
+
+#define PropOf(TCB) ((Properties*)TCB->prop)
+
+int
+_nc_mingw_ioctl(int fd GCC_UNUSED,
+ long int request GCC_UNUSED,
+ struct termios *arg GCC_UNUSED)
+{
+ return 0;
+ endwin();
+ fprintf(stderr, "TERMINFO currently not supported on Windows.\n");
+ exit(1);
+}
+
+static WORD
+MapColor(bool fore, int color)
+{
+ static const int _cmap[] =
+ {0, 4, 2, 6, 1, 5, 3, 7};
+ int a;
+ if (color < 0 || color > 7)
+ a = fore ? 7 : 0;
+ else
+ a = _cmap[color];
+ if (!fore)
+ a = a << 4;
+ return (WORD) a;
+}
+
+static WORD
+MapAttr(TERMINAL_CONTROL_BLOCK * TCB, WORD res, chtype ch)
+{
+ if (ch & A_COLOR) {
+ int p;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+ p = PairNumber(ch);
+ if (p > 0 && p < NUMPAIRS && TCB != 0 && sp != 0) {
+ WORD a;
+ a = PropOf(TCB)->pairs[p];
+ res = (res & 0xff00) | a;
+ }
+ }
+
+ if (ch & A_REVERSE)
+ res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4)));
+
+ if (ch & A_STANDOUT)
+ res = ((res & 0xff00) | (((res & 0x07) << 4) | ((res & 0x70) >> 4))
+ | BACKGROUND_INTENSITY);
+
+ if (ch & A_BOLD)
+ res |= FOREGROUND_INTENSITY;
+
+ if (ch & A_DIM)
+ res |= BACKGROUND_INTENSITY;
+
+ return res;
+}
+
+static BOOL
+con_write(TERMINAL_CONTROL_BLOCK * TCB, int y, int x, chtype *str, int n)
+{
+ CHAR_INFO ci[n];
+ COORD loc, siz;
+ SMALL_RECT rec;
+ int i;
+ chtype ch;
+ SCREEN *sp;
+
+ AssertTCB();
+
+ if (TCB == 0 || InvalidConsoleHandle(TCB->hdl))
+ return FALSE;
+
+ SetSP();
+
+ for (i = 0; i < n; i++) {
+ ch = str[i];
+ ci[i].Char.AsciiChar = ChCharOf(ch);
+ ci[i].Attributes = MapAttr(TCB,
+ PropOf(TCB)->SBI.wAttributes,
+ ChAttrOf(ch));
+ if (ChAttrOf(ch) & A_ALTCHARSET) {
+ if (sp->_acs_map)
+ ci[i].Char.AsciiChar =
+ ChCharOf(NCURSES_SP_NAME(_nc_acs_char) (sp, ChCharOf(ch)));
+ }
+ }
+
+ loc.X = (short) 0;
+ loc.Y = (short) 0;
+ siz.X = (short) n;
+ siz.Y = 1;
+
+ rec.Left = (short) x;
+ rec.Top = (short) y;
+ rec.Right = (short) (x + n - 1);
+ rec.Bottom = rec.Top;
+
+ return WriteConsoleOutput(TCB->hdl, ci, siz, loc, &rec);
+}
+
+#define MARK_NOCHANGE(win,row) \
+ win->_line[row].firstchar = _NOCHANGE; \
+ win->_line[row].lastchar = _NOCHANGE
+
+static int
+drv_doupdate(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ int y, nonempty, n, x0, x1, Width, Height;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ Width = screen_columns(sp);
+ Height = screen_lines(sp);
+ nonempty = min(Height, NewScreen(sp)->_maxy + 1);
+
+ if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) {
+ int x;
+ chtype empty[Width];
+
+ for (x = 0; x < Width; x++)
+ empty[x] = ' ';
+
+ for (y = 0; y < nonempty; y++) {
+ con_write(TCB, y, 0, empty, Width);
+ memcpy(empty,
+ CurScreen(sp)->_line[y].text,
+ Width * sizeof(chtype));
+ }
+ CurScreen(sp)->_clear = FALSE;
+ NewScreen(sp)->_clear = FALSE;
+ touchwin(NewScreen(sp));
+ }
+
+ for (y = 0; y < nonempty; y++) {
+ x0 = NewScreen(sp)->_line[y].firstchar;
+ if (x0 != _NOCHANGE) {
+ x1 = NewScreen(sp)->_line[y].lastchar;
+ n = x1 - x0 + 1;
+ if (n > 0) {
+ memcpy(CurScreen(sp)->_line[y].text + x0,
+ NewScreen(sp)->_line[y].text + x0,
+ n * sizeof(chtype));
+ con_write(TCB,
+ y,
+ x0,
+ ((chtype *) CurScreen(sp)->_line[y].text) + x0, n);
+
+ /* mark line changed successfully */
+ if (y <= NewScreen(sp)->_maxy) {
+ MARK_NOCHANGE(NewScreen(sp), y);
+ }
+ if (y <= CurScreen(sp)->_maxy) {
+ MARK_NOCHANGE(CurScreen(sp), y);
+ }
+ }
+ }
+ }
+
+ /* put everything back in sync */
+ for (y = nonempty; y <= NewScreen(sp)->_maxy; y++) {
+ MARK_NOCHANGE(NewScreen(sp), y);
+ }
+ for (y = nonempty; y <= CurScreen(sp)->_maxy; y++) {
+ MARK_NOCHANGE(CurScreen(sp), y);
+ }
+
+ if (!NewScreen(sp)->_leaveok) {
+ CurScreen(sp)->_curx = NewScreen(sp)->_curx;
+ CurScreen(sp)->_cury = NewScreen(sp)->_cury;
+
+ TCB->drv->hwcur(TCB, 0, 0, CurScreen(sp)->_cury, CurScreen(sp)->_curx);
+ }
+ SetConsoleActiveScreenBuffer(TCB->hdl);
+ return OK;
+}
+
+static bool
+drv_CanHandle(TERMINAL_CONTROL_BLOCK * TCB,
+ const char *tname,
+ int *errret GCC_UNUSED)
+{
+ bool code = FALSE;
+
+ T((T_CALLED("win32con::drv_CanHandle(%p)"), TCB));
+
+ assert(TCB != 0);
+ assert(tname != 0);
+
+ TCB->magic = WINMAGIC;
+ if (*tname == 0 || *tname == 0) {
+ code = TRUE;
+ } else {
+ TERMINAL my_term;
+ int status;
+
+ code = FALSE;
+#if (USE_DATABASE || USE_TERMCAP)
+ status = _nc_setup_tinfo(tname, &my_term.type);
+#else
+ status = TGETENT_NO;
+#endif
+ if (status != TGETENT_YES) {
+ const TERMTYPE *fallback = _nc_fallback(tname);
+
+ if (fallback) {
+ my_term.type = *fallback;
+ status = TGETENT_YES;
+ } else if (!strcmp(tname, "unknown")) {
+ code = TRUE;
+ }
+ }
+ if (status == TGETENT_YES) {
+ if (generic_type || hard_copy)
+ code = TRUE;
+ }
+ }
+
+ if (code) {
+ if ((TCB->term.type.Booleans) == 0) {
+ _nc_init_entry(&(TCB->term.type));
+ }
+ }
+
+ returnBool(code);
+}
+
+static int
+drv_dobeepflash(TERMINAL_CONTROL_BLOCK * TCB,
+ bool beepFlag GCC_UNUSED)
+{
+ SCREEN *sp;
+ int res = ERR;
+
+ AssertTCB();
+ SetSP();
+
+ return res;
+}
+
+static int
+drv_print(TERMINAL_CONTROL_BLOCK * TCB,
+ char *data GCC_UNUSED,
+ int len GCC_UNUSED)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ return ERR;
+}
+
+static int
+drv_defaultcolors(TERMINAL_CONTROL_BLOCK * TCB,
+ int fg GCC_UNUSED,
+ int bg GCC_UNUSED)
+{
+ SCREEN *sp;
+ int code = ERR;
+
+ AssertTCB();
+ SetSP();
+
+ return (code);
+}
+
+static void
+drv_setcolor(TERMINAL_CONTROL_BLOCK * TCB,
+ bool fore,
+ int color,
+ int (*outc) (SCREEN *, int) GCC_UNUSED)
+{
+ AssertTCB();
+
+ if (TCB && !InvalidConsoleHandle(TCB->hdl)) {
+ WORD a = MapColor(fore, color);
+ a = ((PropOf(TCB)->SBI.wAttributes) & (fore ? 0xfff8 : 0xff8f)) | a;
+ SetConsoleTextAttribute(TCB->hdl, a);
+ GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI));
+ }
+}
+
+static bool
+drv_rescol(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ bool res = FALSE;
+
+ AssertTCB();
+ if (TCB && !InvalidConsoleHandle(TCB->hdl)) {
+ WORD a = FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_GREEN;
+ SetConsoleTextAttribute(TCB->hdl, a);
+ GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI));
+ res = TRUE;
+ }
+ return res;
+}
+
+static bool
+drv_rescolors(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ int result = FALSE;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ return result;
+}
+
+static int
+drv_size(TERMINAL_CONTROL_BLOCK * TCB, int *Lines, int *Cols)
+{
+ AssertTCB();
+
+ if (TCB == NULL || Lines == NULL || Cols == NULL || InvalidConsoleHandle(TCB->hdl))
+ return ERR;
+
+ *Lines = (int) (PropOf(TCB)->SBI.dwSize.Y);
+ *Cols = (int) (PropOf(TCB)->SBI.dwSize.X);
+ return OK;
+}
+
+static int
+drv_setsize(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED,
+ int l GCC_UNUSED,
+ int c GCC_UNUSED)
+{
+ AssertTCB();
+ return ERR;
+}
+
+static int
+drv_sgmode(TERMINAL_CONTROL_BLOCK * TCB, bool setFlag, TTY * buf)
+{
+ DWORD dwFlag = 0;
+ tcflag_t iflag;
+ tcflag_t lflag;
+
+ AssertTCB();
+
+ if (TCB == 0 || buf == NULL)
+ return ERR;
+
+ if (setFlag) {
+ iflag = buf->c_iflag;
+ lflag = buf->c_lflag;
+
+ GetConsoleMode(TCB->inp, &dwFlag);
+
+ if (lflag & ICANON)
+ dwFlag |= ENABLE_LINE_INPUT;
+ else
+ dwFlag &= ~ENABLE_LINE_INPUT;
+
+ if (lflag & ECHO)
+ dwFlag |= ENABLE_ECHO_INPUT;
+ else
+ dwFlag &= ~ENABLE_ECHO_INPUT;
+
+ if (iflag & BRKINT)
+ dwFlag |= ENABLE_PROCESSED_INPUT;
+ else
+ dwFlag &= ~ENABLE_PROCESSED_INPUT;
+
+ dwFlag |= ENABLE_MOUSE_INPUT;
+
+ buf->c_iflag = iflag;
+ buf->c_lflag = lflag;
+ SetConsoleMode(TCB->inp, dwFlag);
+ TCB->term.Nttyb = *buf;
+ } else {
+ iflag = TCB->term.Nttyb.c_iflag;
+ lflag = TCB->term.Nttyb.c_lflag;
+ GetConsoleMode(TCB->inp, &dwFlag);
+
+ if (dwFlag & ENABLE_LINE_INPUT)
+ lflag |= ICANON;
+ else
+ lflag &= ~ICANON;
+
+ if (dwFlag & ENABLE_ECHO_INPUT)
+ lflag |= ECHO;
+ else
+ lflag &= ~ECHO;
+
+ if (dwFlag & ENABLE_PROCESSED_INPUT)
+ iflag |= BRKINT;
+ else
+ iflag &= ~BRKINT;
+
+ TCB->term.Nttyb.c_iflag = iflag;
+ TCB->term.Nttyb.c_lflag = lflag;
+
+ *buf = TCB->term.Nttyb;
+ }
+ return OK;
+}
+
+static int
+drv_mode(TERMINAL_CONTROL_BLOCK * TCB, bool progFlag, bool defFlag)
+{
+ SCREEN *sp;
+ TERMINAL *_term = (TERMINAL *) TCB;
+ int code = ERR;
+
+ AssertTCB();
+ sp = TCB->csp;
+
+ PropOf(TCB)->progMode = progFlag;
+ SetConsoleActiveScreenBuffer(progFlag ? TCB->hdl : TCB->out);
+
+ if (progFlag) /* prog mode */ {
+ if (defFlag) {
+ if ((drv_sgmode(TCB, FALSE, &(_term->Nttyb)) == OK)) {
+ _term->Nttyb.c_oflag &= ~OFLAGS_TABS;
+ code = OK;
+ }
+ } else {
+ /* reset_prog_mode */
+ if (drv_sgmode(TCB, TRUE, &(_term->Nttyb)) == OK) {
+ if (sp) {
+ if (sp->_keypad_on)
+ _nc_keypad(sp, TRUE);
+ NC_BUFFERED(sp, TRUE);
+ }
+ code = OK;
+ }
+ }
+ } else { /* shell mode */
+ if (defFlag) {
+ /* def_shell_mode */
+ if (drv_sgmode(TCB, FALSE, &(_term->Ottyb)) == OK) {
+ code = OK;
+ }
+ } else {
+ /* reset_shell_mode */
+ if (sp) {
+ _nc_keypad(sp, FALSE);
+ NCURSES_SP_NAME(_nc_flush) (sp);
+ NC_BUFFERED(sp, FALSE);
+ }
+ code = drv_sgmode(TCB, TRUE, &(_term->Ottyb));
+ }
+ }
+
+ return (code);
+}
+
+static void
+drv_screen_init(SCREEN *sp GCC_UNUSED)
+{
+}
+
+static void
+drv_wrap(SCREEN *sp GCC_UNUSED)
+{
+}
+
+static int
+rkeycompare(const void *el1, const void *el2)
+{
+ WORD key1 = (LOWORD((*((const LONG *) el1)))) & 0x7fff;
+ WORD key2 = (LOWORD((*((const LONG *) el2)))) & 0x7fff;
+
+ return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1));
+}
+
+static int
+keycompare(const void *el1, const void *el2)
+{
+ WORD key1 = HIWORD((*((const LONG *) el1)));
+ WORD key2 = HIWORD((*((const LONG *) el2)));
+
+ return ((key1 < key2) ? -1 : ((key1 == key2) ? 0 : 1));
+}
+
+static int
+MapKey(TERMINAL_CONTROL_BLOCK * TCB, WORD vKey)
+{
+ WORD nKey = 0;
+ void *res;
+ LONG key = GenMap(vKey, 0);
+ int code = -1;
+
+ AssertTCB();
+
+ res = bsearch(&key,
+ PropOf(TCB)->map,
+ (size_t) (N_INI + FKEYS),
+ sizeof(keylist[0]),
+ keycompare);
+ if (res) {
+ key = *((LONG *) res);
+ nKey = LOWORD(key);
+ code = (int) (nKey & 0x7fff);
+ if (nKey & 0x8000)
+ code = -code;
+ }
+ return code;
+}
+
+static void
+drv_release(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ T((T_CALLED("win32con::drv_release(%p)"), TCB));
+
+ AssertTCB();
+ if (TCB->prop)
+ free(TCB->prop);
+
+ returnVoid;
+}
+
+static void
+drv_init(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ DWORD num_buttons;
+
+ T((T_CALLED("win32con::drv_init(%p)"), TCB));
+
+ AssertTCB();
+
+ if (TCB) {
+ BOOL b = AllocConsole();
+ WORD a;
+ int i;
+
+ if (!b)
+ b = AttachConsole(ATTACH_PARENT_PROCESS);
+
+ TCB->inp = GetStdHandle(STD_INPUT_HANDLE);
+ TCB->out = GetStdHandle(STD_OUTPUT_HANDLE);
+
+ if (getenv("NCGDB"))
+ TCB->hdl = TCB->out;
+ else
+ TCB->hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
+ 0,
+ NULL,
+ CONSOLE_TEXTMODE_BUFFER,
+ NULL);
+
+ if (!InvalidConsoleHandle(TCB->hdl)) {
+ TCB->prop = typeCalloc(Properties, 1);
+ GetConsoleScreenBufferInfo(TCB->hdl, &(PropOf(TCB)->SBI));
+ }
+
+ TCB->info.initcolor = TRUE;
+ TCB->info.canchange = FALSE;
+ TCB->info.hascolor = TRUE;
+ TCB->info.caninit = TRUE;
+
+ TCB->info.maxpairs = NUMPAIRS;
+ TCB->info.maxcolors = 8;
+ TCB->info.numlabels = 0;
+ TCB->info.labelwidth = 0;
+ TCB->info.labelheight = 0;
+ TCB->info.nocolorvideo = 1;
+ TCB->info.tabsize = 8;
+
+ if (GetNumberOfConsoleMouseButtons(&num_buttons)) {
+ T(("mouse has %ld buttons", num_buttons));
+ TCB->info.numbuttons = num_buttons;
+ } else {
+ TCB->info.numbuttons = 1;
+ }
+
+ TCB->info.defaultPalette = _nc_cga_palette;
+
+ for (i = 0; i < (N_INI + FKEYS); i++) {
+ if (i < N_INI)
+ PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] = keylist[i];
+ else
+ PropOf(TCB)->rmap[i] = PropOf(TCB)->map[i] =
+ GenMap((VK_F1 + (i - N_INI)), (KEY_F(1) + (i - N_INI)));
+ }
+ qsort(PropOf(TCB)->map,
+ (size_t) (MAPSIZE),
+ sizeof(keylist[0]),
+ keycompare);
+ qsort(PropOf(TCB)->rmap,
+ (size_t) (MAPSIZE),
+ sizeof(keylist[0]),
+ rkeycompare);
+
+ a = MapColor(true, COLOR_WHITE) | MapColor(false, COLOR_BLACK);
+ for (i = 0; i < NUMPAIRS; i++)
+ PropOf(TCB)->pairs[i] = a;
+ }
+ returnVoid;
+}
+
+static void
+drv_initpair(TERMINAL_CONTROL_BLOCK * TCB,
+ short pair,
+ short f,
+ short b)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ if ((pair > 0) && (pair < NUMPAIRS) && (f >= 0) && (f < 8)
+ && (b >= 0) && (b < 8)) {
+ PropOf(TCB)->pairs[pair] = MapColor(true, f) | MapColor(false, b);
+ }
+}
+
+static void
+drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB,
+ short color GCC_UNUSED,
+ short r GCC_UNUSED,
+ short g GCC_UNUSED,
+ short b GCC_UNUSED)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+}
+
+static void
+drv_do_color(TERMINAL_CONTROL_BLOCK * TCB,
+ short old_pair GCC_UNUSED,
+ short pair GCC_UNUSED,
+ bool reverse GCC_UNUSED,
+ int (*outc) (SCREEN *, int) GCC_UNUSED
+)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+}
+
+static void
+drv_initmouse(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ sp->_mouse_type = M_TERM_DRIVER;
+}
+
+static int
+drv_testmouse(TERMINAL_CONTROL_BLOCK * TCB, int delay)
+{
+ int rc = 0;
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+
+ if (sp->_drv_mouse_head < sp->_drv_mouse_tail) {
+ rc = TW_MOUSE;
+ } else {
+ rc = TCBOf(sp)->drv->twait(TCBOf(sp),
+ TWAIT_MASK,
+ delay,
+ (int *) 0
+ EVENTLIST_2nd(evl));
+ }
+
+ return rc;
+}
+
+static int
+drv_mvcur(TERMINAL_CONTROL_BLOCK * TCB,
+ int yold GCC_UNUSED, int xold GCC_UNUSED,
+ int y, int x)
+{
+ int ret = ERR;
+ if (TCB && !InvalidConsoleHandle(TCB->hdl)) {
+ COORD loc;
+ loc.X = (short) x;
+ loc.Y = (short) y;
+ SetConsoleCursorPosition(TCB->hdl, loc);
+ ret = OK;
+ }
+ return ret;
+}
+
+static void
+drv_hwlabel(TERMINAL_CONTROL_BLOCK * TCB,
+ int labnum GCC_UNUSED,
+ char *text GCC_UNUSED)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+}
+
+static void
+drv_hwlabelOnOff(TERMINAL_CONTROL_BLOCK * TCB,
+ bool OnFlag GCC_UNUSED)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+}
+
+static chtype
+drv_conattr(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED)
+{
+ chtype res = A_NORMAL;
+ res |= (A_BOLD | A_DIM | A_REVERSE | A_STANDOUT | A_COLOR);
+ return res;
+}
+
+static void
+drv_setfilter(TERMINAL_CONTROL_BLOCK * TCB)
+{
+ SCREEN *sp;
+
+ AssertTCB();
+ SetSP();
+}
+
+static void
+drv_initacs(TERMINAL_CONTROL_BLOCK * TCB,
+ chtype *real_map GCC_UNUSED,
+ chtype *fake_map GCC_UNUSED)
+{
+#define DATA(a,b) { a, b }
+ static struct {
+ int acs_code;
+ int use_code;
+ } table[] = {
+ DATA('a', 0xb1), /* ACS_CKBOARD */
+ DATA('f', 0xf8), /* ACS_DEGREE */
+ DATA('g', 0xf1), /* ACS_PLMINUS */
+ DATA('j', 0xd9), /* ACS_LRCORNER */
+ DATA('l', 0xda), /* ACS_ULCORNER */
+ DATA('k', 0xbf), /* ACS_URCORNER */
+ DATA('m', 0xc0), /* ACS_LLCORNER */
+ DATA('n', 0xc5), /* ACS_PLUS */
+ DATA('q', 0xc4), /* ACS_HLINE */
+ DATA('t', 0xc3), /* ACS_LTEE */
+ DATA('u', 0xb4), /* ACS_RTEE */
+ DATA('v', 0xc1), /* ACS_BTEE */
+ DATA('w', 0xc2), /* ACS_TTEE */
+ DATA('x', 0xb3), /* ACS_VLINE */
+ DATA('y', 0xf3), /* ACS_LEQUAL */
+ DATA('z', 0xf2), /* ACS_GEQUAL */
+ DATA('0', 0xdb), /* ACS_BLOCK */
+ DATA('{', 0xe3), /* ACS_PI */
+ DATA('}', 0x9c), /* ACS_STERLING */
+ DATA(',', 0xae), /* ACS_LARROW */
+ DATA('+', 0xaf), /* ACS_RARROW */
+ DATA('~', 0xf9), /* ACS_BULLET */
+ };
+#undef DATA
+ unsigned n;
+
+ SCREEN *sp;
+ AssertTCB();
+ SetSP();
+
+ for (n = 0; n < SIZEOF(table); ++n) {
+ real_map[table[n].acs_code] = table[n].use_code | A_ALTCHARSET;
+ if (sp != 0)
+ sp->_screen_acs_map[table[n].acs_code] = TRUE;
+ }
+}
+
+static ULONGLONG
+tdiff(FILETIME fstart, FILETIME fend)
+{
+ ULARGE_INTEGER ustart;
+ ULARGE_INTEGER uend;
+ ULONGLONG diff;
+
+ ustart.LowPart = fstart.dwLowDateTime;
+ ustart.HighPart = fstart.dwHighDateTime;
+ uend.LowPart = fend.dwLowDateTime;
+ uend.HighPart = fend.dwHighDateTime;
+
+ diff = (uend.QuadPart - ustart.QuadPart) / 10000;
+ return diff;
+}
+
+static int
+Adjust(int milliseconds, int diff)
+{
+ if (milliseconds == INFINITY)
+ return milliseconds;
+ milliseconds -= diff;
+ if (milliseconds < 0)
+ milliseconds = 0;
+ return milliseconds;
+}
+
+#define BUTTON_MASK (FROM_LEFT_1ST_BUTTON_PRESSED | \
+ FROM_LEFT_2ND_BUTTON_PRESSED | \
+ FROM_LEFT_3RD_BUTTON_PRESSED | \
+ FROM_LEFT_4TH_BUTTON_PRESSED | \
+ RIGHTMOST_BUTTON_PRESSED)
+
+static int
+decode_mouse(TERMINAL_CONTROL_BLOCK * TCB, int mask)
+{
+ SCREEN *sp;
+ int result = 0;
+
+ AssertTCB();
+ SetSP();
+
+ if (mask & FROM_LEFT_1ST_BUTTON_PRESSED)
+ result |= BUTTON1_PRESSED;
+ if (mask & FROM_LEFT_2ND_BUTTON_PRESSED)
+ result |= BUTTON2_PRESSED;
+ if (mask & FROM_LEFT_3RD_BUTTON_PRESSED)
+ result |= BUTTON3_PRESSED;
+ if (mask & FROM_LEFT_4TH_BUTTON_PRESSED)
+ result |= BUTTON4_PRESSED;
+
+ if (mask & RIGHTMOST_BUTTON_PRESSED) {
+ switch (TCB->info.numbuttons) {
+ case 1:
+ result |= BUTTON1_PRESSED;
+ break;
+ case 2:
+ result |= BUTTON2_PRESSED;
+ break;
+ case 3:
+ result |= BUTTON3_PRESSED;
+ break;
+ case 4:
+ result |= BUTTON4_PRESSED;
+ break;
+ }
+ }
+
+ return result;
+}
+
+static int
+drv_twait(TERMINAL_CONTROL_BLOCK * TCB,
+ int mode,
+ int milliseconds,
+ int *timeleft
+ EVENTLIST_2nd(_nc_eventlist * evl))
+{
+ SCREEN *sp;
+ INPUT_RECORD inp_rec;
+ BOOL b;
+ DWORD nRead = 0, rc = -1;
+ int code = 0;
+ FILETIME fstart;
+ FILETIME fend;
+ int diff;
+ bool isImmed = (milliseconds == 0);
+
+#define CONSUME() ReadConsoleInput(TCB->inp,&inp_rec,1,&nRead)
+
+ AssertTCB();
+ SetSP();
+
+ TR(TRACE_IEVENT, ("start twait: %d milliseconds, mode: %d",
+ milliseconds, mode));
+
+ if (milliseconds < 0)
+ milliseconds = INFINITY;
+
+ memset(&inp_rec, 0, sizeof(inp_rec));
+
+ while (true) {
+ GetSystemTimeAsFileTime(&fstart);
+ rc = WaitForSingleObject(TCB->inp, milliseconds);
+ GetSystemTimeAsFileTime(&fend);
+ diff = (int) tdiff(fstart, fend);
+ milliseconds = Adjust(milliseconds, diff);
+
+ if (!isImmed && milliseconds == 0)
+ break;
+
+ if (rc == WAIT_OBJECT_0) {
+ if (mode) {
+ b = GetNumberOfConsoleInputEvents(TCB->inp, &nRead);
+ if (b && nRead > 0) {
+ b = PeekConsoleInput(TCB->inp, &inp_rec, 1, &nRead);
+ if (b && nRead > 0) {
+ switch (inp_rec.EventType) {
+ case KEY_EVENT:
+ if (mode & TW_INPUT) {
+ WORD vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
+ char ch = inp_rec.Event.KeyEvent.uChar.AsciiChar;
+
+ if (inp_rec.Event.KeyEvent.bKeyDown) {
+ if (0 == ch) {
+ int nKey = MapKey(TCB, vk);
+ if ((nKey < 0) || FALSE == sp->_keypad_on) {
+ CONSUME();
+ continue;
+ }
+ }
+ code = TW_INPUT;
+ goto end;
+ } else {
+ CONSUME();
+ }
+ }
+ continue;
+ case MOUSE_EVENT:
+ if (decode_mouse(TCB,
+ (inp_rec.Event.MouseEvent.dwButtonState
+ & BUTTON_MASK)) == 0) {
+ CONSUME();
+ } else if (mode & TW_MOUSE) {
+ code = TW_MOUSE;
+ goto end;
+ }
+ continue;
+ default:
+ SetConsoleActiveScreenBuffer(!PropOf(TCB)->progMode ?
+ TCB->hdl : TCB->out);
+ continue;
+ }
+ }
+ }
+ }
+ continue;
+ } else {
+ if (rc != WAIT_TIMEOUT) {
+ code = -1;
+ break;
+ } else {
+ code = 0;
+ break;
+ }
+ }
+ }
+ end:
+
+ TR(TRACE_IEVENT, ("end twait: returned %d (%d), remaining time %d msec",
+ code, errno, milliseconds));
+
+ if (timeleft)
+ *timeleft = milliseconds;
+
+ return code;
+}
+
+static bool
+handle_mouse(TERMINAL_CONTROL_BLOCK * TCB, MOUSE_EVENT_RECORD mer)
+{
+ SCREEN *sp;
+ MEVENT work;
+ bool result = FALSE;
+
+ AssertTCB();
+ SetSP();
+
+ sp->_drv_mouse_old_buttons = sp->_drv_mouse_new_buttons;
+ sp->_drv_mouse_new_buttons = mer.dwButtonState & BUTTON_MASK;
+
+ /*
+ * We're only interested if the button is pressed or released.
+ * FIXME: implement continuous event-tracking.
+ */
+ if (sp->_drv_mouse_new_buttons != sp->_drv_mouse_old_buttons) {
+
+ memset(&work, 0, sizeof(work));
+
+ if (sp->_drv_mouse_new_buttons) {
+
+ work.bstate |= decode_mouse(TCB, sp->_drv_mouse_new_buttons);
+
+ } else {
+
+ /* cf: BUTTON_PRESSED, BUTTON_RELEASED */
+ work.bstate |= (decode_mouse(TCB, sp->_drv_mouse_old_buttons) >> 1);
+
+ result = TRUE;
+ }
+
+ work.x = mer.dwMousePosition.X;
+ work.y = mer.dwMousePosition.Y;
+
+ sp->_drv_mouse_fifo[sp->_drv_mouse_tail] = work;
+ sp->_drv_mouse_tail += 1;
+ }
+
+ return result;
+}
+
+static int
+drv_read(TERMINAL_CONTROL_BLOCK * TCB, int *buf)
+{
+ SCREEN *sp;
+ int n = 1;
+ INPUT_RECORD inp_rec;
+ BOOL b;
+ DWORD nRead;
+ WORD vk;
+ WORD sc;
+
+ AssertTCB();
+ assert(buf);
+ SetSP();
+
+ memset(&inp_rec, 0, sizeof(inp_rec));
+
+ T((T_CALLED("win32con::drv_read(%p)"), TCB));
+ while ((b = ReadConsoleInput(TCB->inp, &inp_rec, 1, &nRead))) {
+ if (b && nRead > 0) {
+ if (inp_rec.EventType == KEY_EVENT) {
+ if (!inp_rec.Event.KeyEvent.bKeyDown)
+ continue;
+ *buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar;
+ vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
+ sc = inp_rec.Event.KeyEvent.wVirtualScanCode;
+ if (*buf == 0) {
+ if (sp->_keypad_on) {
+ *buf = MapKey(TCB, vk);
+ if (0 > (*buf))
+ continue;
+ else
+ break;
+ } else
+ continue;
+ } else { /* *buf != 0 */
+ break;
+ }
+ } else if (inp_rec.EventType == MOUSE_EVENT) {
+ if (handle_mouse(TCB, inp_rec.Event.MouseEvent)) {
+ *buf = KEY_MOUSE;
+ break;
+ }
+ }
+ continue;
+ }
+ }
+ returnCode(n);
+}
+
+static int
+drv_nap(TERMINAL_CONTROL_BLOCK * TCB GCC_UNUSED, int ms)
+{
+ Sleep(ms);
+ return OK;
+}
+
+static bool
+drv_kyExist(TERMINAL_CONTROL_BLOCK * TCB, int keycode)
+{
+ SCREEN *sp;
+ WORD nKey;
+ void *res;
+ bool found = FALSE;
+ LONG key = GenMap(0, (WORD) keycode);
+
+ AssertTCB();
+ SetSP();
+
+ AssertTCB();
+
+ res = bsearch(&key,
+ PropOf(TCB)->rmap,
+ (size_t) (N_INI + FKEYS),
+ sizeof(keylist[0]),
+ rkeycompare);
+ if (res) {
+ key = *((LONG *) res);
+ nKey = LOWORD(key);
+ if (!(nKey & 0x8000))
+ found = TRUE;
+ }
+ return found;
+}
+
+static int
+drv_kpad(TERMINAL_CONTROL_BLOCK * TCB, bool flag GCC_UNUSED)
+{
+ SCREEN *sp;
+ int code = ERR;
+
+ AssertTCB();
+ sp = TCB->csp;
+
+ if (sp) {
+ code = OK;
+ }
+ return code;
+}
+
+static int
+drv_keyok(TERMINAL_CONTROL_BLOCK * TCB, int keycode, bool flag)
+{
+ int code = ERR;
+ SCREEN *sp;
+ WORD nKey;
+ WORD vKey;
+ void *res;
+ LONG key = GenMap(0, (WORD) keycode);
+
+ AssertTCB();
+ SetSP();
+
+ if (sp) {
+ res = bsearch(&key,
+ PropOf(TCB)->rmap,
+ (size_t) (N_INI + FKEYS),
+ sizeof(keylist[0]),
+ rkeycompare);
+ if (res) {
+ key = *((LONG *) res);
+ vKey = HIWORD(key);
+ nKey = (LOWORD(key)) & 0x7fff;
+ if (!flag)
+ nKey |= 0x8000;
+ *(LONG *) res = GenMap(vKey, nKey);
+ }
+ }
+ return code;
+}
+
+NCURSES_EXPORT_VAR (TERM_DRIVER) _nc_WIN_DRIVER = {
+ FALSE,
+ drv_CanHandle, /* CanHandle */
+ drv_init, /* init */
+ drv_release, /* release */
+ drv_size, /* size */
+ drv_sgmode, /* sgmode */
+ drv_conattr, /* conattr */
+ drv_mvcur, /* hwcur */
+ drv_mode, /* mode */
+ drv_rescol, /* rescol */
+ drv_rescolors, /* rescolors */
+ drv_setcolor, /* color */
+ drv_dobeepflash, /* DoBeepFlash */
+ drv_initpair, /* initpair */
+ drv_initcolor, /* initcolor */
+ drv_do_color, /* docolor */
+ drv_initmouse, /* initmouse */
+ drv_testmouse, /* testmouse */
+ drv_setfilter, /* setfilter */
+ drv_hwlabel, /* hwlabel */
+ drv_hwlabelOnOff, /* hwlabelOnOff */
+ drv_doupdate, /* update */
+ drv_defaultcolors, /* defaultcolors */
+ drv_print, /* print */
+ drv_size, /* getsize */
+ drv_setsize, /* setsize */
+ drv_initacs, /* initacs */
+ drv_screen_init, /* scinit */
+ drv_wrap, /* scexit */
+ drv_twait, /* twait */
+ drv_read, /* read */
+ drv_nap, /* nap */
+ drv_kpad, /* kpad */
+ drv_keyok, /* kyOk */
+ drv_kyExist /* kyExist */
+};
diff --git a/panel/Makefile.in b/panel/Makefile.in
index 89dbeeac9009..f0f0a4922bd0 100644
--- a/panel/Makefile.in
+++ b/panel/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $
+# $Id: Makefile.in,v 1.58 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -43,6 +43,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
x = @EXEEXT@
@@ -64,6 +65,7 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@@ -71,11 +73,14 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
-AR_OPTS = @AR_OPTS@
+ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -125,7 +130,7 @@ sources: $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
# make a copy to simplify include-paths while still keeping panel's include
# file in this directory.
@@ -133,15 +138,15 @@ $(DESTDIR)$(libdir) :
-rm -f $@
cp $(srcdir)/panel.h $@
-PANEL_PRIV_H = \
+HEADER_DEPS = \
$(srcdir)/panel.priv.h \
$(srcdir)/panel.h
tags:
- ctags *.[ch]
+ $(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
diff --git a/panel/llib-lpanel b/panel/llib-lpanel
index de49c234ecaa..85371ec73e06 100644
--- a/panel/llib-lpanel
+++ b/panel/llib-lpanel
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1997,2002,2005 *
+ * Author: Thomas E. Dickey 1997,2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./panel.c */
-#include "panel.priv.h"
+#include <panel.priv.h>
#undef _nc_retrace_panel
PANEL *_nc_retrace_panel(
@@ -77,6 +77,11 @@ void _nc_Touchline(
/* ./p_above.c */
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_above
PANEL *panel_above(
const PANEL *pan)
@@ -84,6 +89,11 @@ PANEL *panel_above(
/* ./p_below.c */
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_below
PANEL *panel_below(
const PANEL *pan)
@@ -157,6 +167,11 @@ int top_panel(
/* ./p_update.c */
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef update_panels
void update_panels(void)
{ /* void */ }
diff --git a/panel/llib-lpanelt b/panel/llib-lpanelt
new file mode 100644
index 000000000000..8fcd42c9b6de
--- /dev/null
+++ b/panel/llib-lpanelt
@@ -0,0 +1,197 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./panel.c */
+
+#include <panel.priv.h>
+
+#undef _nc_retrace_panel
+PANEL *_nc_retrace_panel(
+ PANEL *pan)
+ { return(*(PANEL **)0); }
+
+#undef _nc_my_visbuf
+const char *_nc_my_visbuf(
+ const void *ptr)
+ { return(*(const char **)0); }
+
+#undef _nc_dPanel
+void _nc_dPanel(
+ const char *text,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_dStack
+void _nc_dStack(
+ const char *fmt,
+ int num,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Wnoutrefresh
+void _nc_Wnoutrefresh(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchpan
+void _nc_Touchpan(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchline
+void _nc_Touchline(
+ const PANEL *pan,
+ int start,
+ int count)
+ { /* void */ }
+
+/* ./p_above.c */
+
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_above
+PANEL *panel_above(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_below.c */
+
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_below
+PANEL *panel_below(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_bottom.c */
+
+#undef bottom_panel
+int bottom_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_delete.c */
+
+#undef del_panel
+int del_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hide.c */
+
+#undef hide_panel
+int hide_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hidden.c */
+
+#undef panel_hidden
+int panel_hidden(
+ const PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_move.c */
+
+#undef move_panel
+int move_panel(
+ PANEL *pan,
+ int starty,
+ int startx)
+ { return(*(int *)0); }
+
+/* ./p_new.c */
+
+#undef new_panel
+PANEL *new_panel(
+ WINDOW *win)
+ { return(*(PANEL **)0); }
+
+/* ./p_replace.c */
+
+#undef replace_panel
+int replace_panel(
+ PANEL *pan,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./p_show.c */
+
+#undef show_panel
+int show_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_top.c */
+
+#undef top_panel
+int top_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_update.c */
+
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef update_panels
+void update_panels(void)
+ { /* void */ }
+
+/* ./p_user.c */
+
+#undef set_panel_userptr
+int set_panel_userptr(
+ PANEL *pan,
+ void *uptr)
+ { return(*(int *)0); }
+
+#undef panel_userptr
+void *panel_userptr(
+ const PANEL *pan)
+ { return(*(void **)0); }
+
+/* ./p_win.c */
+
+#undef panel_window
+WINDOW *panel_window(
+ const PANEL *pan)
+ { return(*(WINDOW **)0); }
diff --git a/panel/llib-lpaneltw b/panel/llib-lpaneltw
new file mode 100644
index 000000000000..1d3cd8d84c8f
--- /dev/null
+++ b/panel/llib-lpaneltw
@@ -0,0 +1,197 @@
+/****************************************************************************
+ * Copyright (c) 2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./panel.c */
+
+#include <panel.priv.h>
+
+#undef _nc_retrace_panel
+PANEL *_nc_retrace_panel(
+ PANEL *pan)
+ { return(*(PANEL **)0); }
+
+#undef _nc_my_visbuf
+const char *_nc_my_visbuf(
+ const void *ptr)
+ { return(*(const char **)0); }
+
+#undef _nc_dPanel
+void _nc_dPanel(
+ const char *text,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_dStack
+void _nc_dStack(
+ const char *fmt,
+ int num,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Wnoutrefresh
+void _nc_Wnoutrefresh(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchpan
+void _nc_Touchpan(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchline
+void _nc_Touchline(
+ const PANEL *pan,
+ int start,
+ int count)
+ { /* void */ }
+
+/* ./p_above.c */
+
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_above
+PANEL *panel_above(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_below.c */
+
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_below
+PANEL *panel_below(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_bottom.c */
+
+#undef bottom_panel
+int bottom_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_delete.c */
+
+#undef del_panel
+int del_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hide.c */
+
+#undef hide_panel
+int hide_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hidden.c */
+
+#undef panel_hidden
+int panel_hidden(
+ const PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_move.c */
+
+#undef move_panel
+int move_panel(
+ PANEL *pan,
+ int starty,
+ int startx)
+ { return(*(int *)0); }
+
+/* ./p_new.c */
+
+#undef new_panel
+PANEL *new_panel(
+ WINDOW *win)
+ { return(*(PANEL **)0); }
+
+/* ./p_replace.c */
+
+#undef replace_panel
+int replace_panel(
+ PANEL *pan,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./p_show.c */
+
+#undef show_panel
+int show_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_top.c */
+
+#undef top_panel
+int top_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_update.c */
+
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef update_panels
+void update_panels(void)
+ { /* void */ }
+
+/* ./p_user.c */
+
+#undef set_panel_userptr
+int set_panel_userptr(
+ PANEL *pan,
+ void *uptr)
+ { return(*(int *)0); }
+
+#undef panel_userptr
+void *panel_userptr(
+ const PANEL *pan)
+ { return(*(void **)0); }
+
+/* ./p_win.c */
+
+#undef panel_window
+WINDOW *panel_window(
+ const PANEL *pan)
+ { return(*(WINDOW **)0); }
diff --git a/panel/llib-lpanelw b/panel/llib-lpanelw
index 48bd1e0db5a7..503b34345ba8 100644
--- a/panel/llib-lpanelw
+++ b/panel/llib-lpanelw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2002,2005 *
+ * Author: Thomas E. Dickey 2002-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./panel.c */
-#include "panel.priv.h"
+#include <panel.priv.h>
#undef _nc_retrace_panel
PANEL *_nc_retrace_panel(
@@ -77,6 +77,11 @@ void _nc_Touchline(
/* ./p_above.c */
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_above
PANEL *panel_above(
const PANEL *pan)
@@ -84,6 +89,11 @@ PANEL *panel_above(
/* ./p_below.c */
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_below
PANEL *panel_below(
const PANEL *pan)
@@ -157,6 +167,11 @@ int top_panel(
/* ./p_update.c */
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef update_panels
void update_panels(void)
{ /* void */ }
diff --git a/panel/modules b/panel/modules
index d0f7a796678f..cd3f545630f7 100644
--- a/panel/modules
+++ b/panel/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.9 2006/12/24 00:53:17 tom Exp $
+# $Id: modules,v 1.10 2010/01/23 16:31:16 tom Exp $
##############################################################################
-# Copyright (c) 1998,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -32,20 +32,20 @@
@ base
# Library objects
-panel lib $(srcdir) $(PANEL_PRIV_H)
-p_above lib $(srcdir) $(PANEL_PRIV_H)
-p_below lib $(srcdir) $(PANEL_PRIV_H)
-p_bottom lib $(srcdir) $(PANEL_PRIV_H)
-p_delete lib $(srcdir) $(PANEL_PRIV_H)
-p_hide lib $(srcdir) $(PANEL_PRIV_H)
-p_hidden lib $(srcdir) $(PANEL_PRIV_H)
-p_move lib $(srcdir) $(PANEL_PRIV_H)
-p_new lib $(srcdir) $(PANEL_PRIV_H)
-p_replace lib $(srcdir) $(PANEL_PRIV_H)
-p_show lib $(srcdir) $(PANEL_PRIV_H)
-p_top lib $(srcdir) $(PANEL_PRIV_H)
-p_update lib $(srcdir) $(PANEL_PRIV_H)
-p_user lib $(srcdir) $(PANEL_PRIV_H)
-p_win lib $(srcdir) $(PANEL_PRIV_H)
+panel lib $(srcdir) $(HEADER_DEPS)
+p_above lib $(srcdir) $(HEADER_DEPS)
+p_below lib $(srcdir) $(HEADER_DEPS)
+p_bottom lib $(srcdir) $(HEADER_DEPS)
+p_delete lib $(srcdir) $(HEADER_DEPS)
+p_hide lib $(srcdir) $(HEADER_DEPS)
+p_hidden lib $(srcdir) $(HEADER_DEPS)
+p_move lib $(srcdir) $(HEADER_DEPS)
+p_new lib $(srcdir) $(HEADER_DEPS)
+p_replace lib $(srcdir) $(HEADER_DEPS)
+p_show lib $(srcdir) $(HEADER_DEPS)
+p_top lib $(srcdir) $(HEADER_DEPS)
+p_update lib $(srcdir) $(HEADER_DEPS)
+p_user lib $(srcdir) $(HEADER_DEPS)
+p_win lib $(srcdir) $(HEADER_DEPS)
# vile:makemode
diff --git a/panel/p_above.c b/panel/p_above.c
index 32495f627f2d..8bbf1bc21cea 100644
--- a/panel/p_above.c
+++ b/panel/p_above.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,24 +29,56 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_above.c
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_above.c,v 1.6 2005/02/19 16:44:57 tom Exp $")
+MODULE_ID("$Id: p_above.c,v 1.8 2010/01/23 21:22:15 tom Exp $")
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(PANEL *)
+ground_panel(SCREEN * sp)
+{
+ T((T_CALLED("ground_panel(%p)"), sp));
+ if (sp)
+ {
+ struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
+
+ if (_nc_bottom_panel) /* this is the pseudo panel */
+ returnPanel(_nc_bottom_panel->above);
+ else
+ returnPanel(0);
+ }
+ else
+ {
+ if (0 == CURRENT_SCREEN)
+ returnPanel(0);
+ else
+ returnPanel(ground_panel(CURRENT_SCREEN));
+ }
+}
+#endif
NCURSES_EXPORT(PANEL *)
panel_above(const PANEL * pan)
{
- T((T_CALLED("panel_above(%p)"), pan));
- if (!pan)
+ PANEL *result;
+
+ T((T_CALLED("panel_above(%p)"), (const void *)pan));
+ if (pan)
+ result = pan->above;
+ else
{
+#if NCURSES_SP_FUNCS
+ result = ground_panel(CURRENT_SCREEN);
+#else
/* if top and bottom are equal, we have no or only the pseudo panel;
if not, we return the panel above the pseudo panel */
- returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above);
+ result = EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above;
+#endif
}
- else
- returnPanel(pan->above);
+ returnPanel(result);
}
diff --git a/panel/p_below.c b/panel/p_below.c
index c4b241015f5b..f276ef959da5 100644
--- a/panel/p_below.c
+++ b/panel/p_below.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,26 +29,57 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_below.c
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_below.c,v 1.6 2005/02/19 16:45:10 tom Exp $")
+MODULE_ID("$Id: p_below.c,v 1.8 2010/01/23 21:22:15 tom Exp $")
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(PANEL *)
-panel_below(const PANEL * pan)
+ceiling_panel(SCREEN * sp)
{
- T((T_CALLED("panel_below(%p)"), pan));
- if (!pan)
+ T((T_CALLED("ceiling_panel(%p)"), sp));
+ if (sp)
{
+ struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
+
/* if top and bottom are equal, we have no or only the pseudo panel */
returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel);
}
else
{
+ if (0 == CURRENT_SCREEN)
+ returnPanel(0);
+ else
+ returnPanel(ceiling_panel(CURRENT_SCREEN));
+ }
+}
+#endif
+
+NCURSES_EXPORT(PANEL *)
+panel_below(const PANEL * pan)
+{
+ PANEL *result;
+
+ T((T_CALLED("panel_below(%p)"), (const void *)pan));
+ if (pan)
+ {
+ GetHook(pan);
/* we must not return the pseudo panel */
- returnPanel(Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below);
+ result = Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below;
+ }
+ else
+ {
+#if NCURSES_SP_FUNCS
+ result = ceiling_panel(CURRENT_SCREEN);
+#else
+ /* if top and bottom are equal, we have no or only the pseudo panel */
+ result = EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel;
+#endif
}
+ returnPanel(result);
}
diff --git a/panel/p_bottom.c b/panel/p_bottom.c
index b861fd9b2ce7..db814415375c 100644
--- a/panel/p_bottom.c
+++ b/panel/p_bottom.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_bottom.c
@@ -36,16 +37,17 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_bottom.c,v 1.11 2005/02/19 16:38:16 tom Exp $")
+MODULE_ID("$Id: p_bottom.c,v 1.13 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
bottom_panel(PANEL * pan)
{
int err = OK;
- T((T_CALLED("bottom_panel(%p)"), pan));
+ T((T_CALLED("bottom_panel(%p)"), (void *)pan));
if (pan)
{
+ GetHook(pan);
if (!Is_Bottom(pan))
{
diff --git a/panel/p_delete.c b/panel/p_delete.c
index 24ee26b4ff23..39b055377c16 100644
--- a/panel/p_delete.c
+++ b/panel/p_delete.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1999,2008 *
****************************************************************************/
/* p_delete.c
@@ -36,19 +37,22 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_delete.c,v 1.8 2005/02/19 16:38:45 tom Exp $")
+MODULE_ID("$Id: p_delete.c,v 1.10 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
del_panel(PANEL * pan)
{
int err = OK;
- T((T_CALLED("del_panel(%p)"), pan));
+ T((T_CALLED("del_panel(%p)"), (void *)pan));
if (pan)
{
dBug(("--> del_panel %s", USER_PTR(pan->user)));
- HIDE_PANEL(pan, err, OK);
- free((void *)pan);
+ {
+ GetHook(pan);
+ HIDE_PANEL(pan, err, OK);
+ free((void *)pan);
+ }
}
else
err = ERR;
diff --git a/panel/p_hidden.c b/panel/p_hidden.c
index 624c07dae0ba..01b69b91d919 100644
--- a/panel/p_hidden.c
+++ b/panel/p_hidden.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_hidden.c
@@ -36,13 +37,18 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hidden.c,v 1.7 2005/02/19 16:39:17 tom Exp $")
+MODULE_ID("$Id: p_hidden.c,v 1.9 2010/01/23 21:22:15 tom Exp $")
NCURSES_EXPORT(int)
panel_hidden(const PANEL * pan)
{
- T((T_CALLED("panel_hidden(%p)"), pan));
- if (!pan)
- returnCode(ERR);
- returnCode(IS_LINKED(pan) ? FALSE : TRUE);
+ int rc = ERR;
+
+ T((T_CALLED("panel_hidden(%p)"), (const void *)pan));
+ if (pan)
+ {
+ GetHook(pan);
+ rc = (IS_LINKED(pan) ? FALSE : TRUE);
+ }
+ returnCode(rc);
}
diff --git a/panel/p_hide.c b/panel/p_hide.c
index 08d8853a201c..7b780d464e16 100644
--- a/panel/p_hide.c
+++ b/panel/p_hide.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,23 +36,27 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $")
+MODULE_ID("$Id: p_hide.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
hide_panel(register PANEL * pan)
{
- int err = OK;
+ int err = ERR;
- T((T_CALLED("hide_panel(%p)"), pan));
- if (!pan)
- returnCode(ERR);
+ T((T_CALLED("hide_panel(%p)"), (void *)pan));
- dBug(("--> hide_panel %s", USER_PTR(pan->user)));
- dStack("<u%d>", 1, pan);
+ if (pan)
+ {
+ GetHook(pan);
- HIDE_PANEL(pan, err, ERR);
+ dBug(("--> hide_panel %s", USER_PTR(pan->user)));
+ dStack("<u%d>", 1, pan);
- dStack("<u%d>", 9, pan);
+ HIDE_PANEL(pan, err, ERR);
+ err = OK;
+
+ dStack("<u%d>", 9, pan);
+ }
returnCode(err);
}
diff --git a/panel/p_move.c b/panel/p_move.c
index 3818e8cba860..adae64583220 100644
--- a/panel/p_move.c
+++ b/panel/p_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2009 *
****************************************************************************/
/* p_move.c
@@ -36,21 +37,24 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_move.c,v 1.9 2005/02/19 16:46:49 tom Exp $")
+MODULE_ID("$Id: p_move.c,v 1.11 2010/01/23 21:22:15 tom Exp $")
NCURSES_EXPORT(int)
move_panel(PANEL * pan, int starty, int startx)
{
- T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
+ int rc = ERR;
- if (!pan)
- returnCode(ERR);
+ T((T_CALLED("move_panel(%p,%d,%d)"), (void *)pan, starty, startx));
- if (IS_LINKED(pan))
+ if (pan)
{
- Touchpan(pan);
- PANEL_UPDATE(pan, (PANEL *) 0);
+ GetHook(pan);
+ if (IS_LINKED(pan))
+ {
+ Touchpan(pan);
+ PANEL_UPDATE(pan, (PANEL *) 0);
+ }
+ rc = mvwin(pan->win, starty, startx);
}
-
- returnCode(mvwin(pan->win, starty, startx));
+ returnCode(rc);
}
diff --git a/panel/p_new.c b/panel/p_new.c
index 2719316888e0..235336c22f51 100644
--- a/panel/p_new.c
+++ b/panel/p_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -38,7 +38,7 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_new.c,v 1.10 2008/08/04 18:25:48 tom Exp $")
+MODULE_ID("$Id: p_new.c,v 1.16 2010/01/23 21:22:16 tom Exp $")
#ifdef TRACE
static char *stdscr_id;
@@ -50,20 +50,27 @@ static char *new_id;
Establish the pseudo panel for stdscr if necessary.
--------------------------------------------------------------------------*/
static PANEL *
-root_panel(void)
+root_panel(NCURSES_SP_DCL0)
{
+#if NCURSES_SP_FUNCS
+ struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
+
+#elif NO_LEAKS
+ struct panelhook *ph = _nc_panelhook();
+#endif
+
if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
{
- assert(stdscr && !_nc_bottom_panel && !_nc_top_panel);
+ assert(SP_PARM && SP_PARM->_stdscr && !_nc_bottom_panel && !_nc_top_panel);
#if NO_LEAKS
- _nc_panelhook()->destroy = del_panel;
+ ph->destroy = del_panel;
#endif
- _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL));
+ _nc_stdscr_pseudo_panel = typeMalloc(PANEL, 1);
if (_nc_stdscr_pseudo_panel != 0)
{
PANEL *pan = _nc_stdscr_pseudo_panel;
- WINDOW *win = stdscr;
+ WINDOW *win = SP_PARM->_stdscr;
pan->win = win;
pan->below = (PANEL *) 0;
@@ -86,16 +93,18 @@ new_panel(WINDOW *win)
{
PANEL *pan = (PANEL *) 0;
- T((T_CALLED("new_panel(%p)"), win));
+ GetWindowHook(win);
+
+ T((T_CALLED("new_panel(%p)"), (void *)win));
if (!win)
returnPanel(pan);
if (!_nc_stdscr_pseudo_panel)
- (void)root_panel();
+ (void)root_panel(NCURSES_SP_ARG);
assert(_nc_stdscr_pseudo_panel);
- if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL))))
+ if (!(win->_flags & _ISPAD) && (pan = typeMalloc(PANEL, 1)))
{
pan->win = win;
pan->above = (PANEL *) 0;
diff --git a/panel/p_replace.c b/panel/p_replace.c
index 5d0d295c8b17..d3733ed22e2f 100644
--- a/panel/p_replace.c
+++ b/panel/p_replace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,23 +36,25 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $")
+MODULE_ID("$Id: p_replace.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
replace_panel(PANEL * pan, WINDOW *win)
{
- T((T_CALLED("replace_panel(%p,%p)"), pan, win));
+ int rc = ERR;
- if (!pan)
- returnCode(ERR);
+ T((T_CALLED("replace_panel(%p,%p)"), (void *)pan, (void *)win));
- if (IS_LINKED(pan))
+ if (pan)
{
- Touchpan(pan);
- PANEL_UPDATE(pan, (PANEL *) 0);
+ GetHook(pan);
+ if (IS_LINKED(pan))
+ {
+ Touchpan(pan);
+ PANEL_UPDATE(pan, (PANEL *) 0);
+ }
+ pan->win = win;
+ rc = OK;
}
-
- pan->win = win;
-
- returnCode(OK);
+ returnCode(rc);
}
diff --git a/panel/p_show.c b/panel/p_show.c
index 35eee237b958..d5b09bd94260 100644
--- a/panel/p_show.c
+++ b/panel/p_show.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,34 +36,37 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_show.c,v 1.11 2005/02/19 16:42:02 tom Exp $")
+MODULE_ID("$Id: p_show.c,v 1.13 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
show_panel(PANEL * pan)
{
- int err = OK;
+ int err = ERR;
- T((T_CALLED("show_panel(%p)"), pan));
+ T((T_CALLED("show_panel(%p)"), (void *)pan));
- if (!pan)
- returnCode(ERR);
+ if (pan)
+ {
+ GetHook(pan);
- if (Is_Top(pan))
- returnCode(OK);
+ if (Is_Top(pan))
+ returnCode(OK);
- dBug(("--> show_panel %s", USER_PTR(pan->user)));
+ dBug(("--> show_panel %s", USER_PTR(pan->user)));
- HIDE_PANEL(pan, err, OK);
+ HIDE_PANEL(pan, err, OK);
- dStack("<lt%d>", 1, pan);
- assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
+ dStack("<lt%d>", 1, pan);
+ assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
- _nc_top_panel->above = pan;
- pan->below = _nc_top_panel;
- pan->above = (PANEL *) 0;
- _nc_top_panel = pan;
+ _nc_top_panel->above = pan;
+ pan->below = _nc_top_panel;
+ pan->above = (PANEL *) 0;
+ _nc_top_panel = pan;
- dStack("<lt%d>", 9, pan);
+ err = OK;
- returnCode(OK);
+ dStack("<lt%d>", 9, pan);
+ }
+ returnCode(err);
}
diff --git a/panel/p_top.c b/panel/p_top.c
index 8bd1d9fb3fec..fdcdee9afcdc 100644
--- a/panel/p_top.c
+++ b/panel/p_top.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,11 +36,11 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_top.c,v 1.5 2005/02/19 16:42:23 tom Exp $")
+MODULE_ID("$Id: p_top.c,v 1.6 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
top_panel(PANEL * pan)
{
- T((T_CALLED("top_panel(%p)"), pan));
+ T((T_CALLED("top_panel(%p)"), (void *)pan));
returnCode(show_panel(pan));
}
diff --git a/panel/p_update.c b/panel/p_update.c
index 5967718160ff..a2f45063cf5c 100644
--- a/panel/p_update.c
+++ b/panel/p_update.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_update.c
@@ -36,28 +37,42 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_update.c,v 1.9 2005/02/19 16:49:47 tom Exp $")
+MODULE_ID("$Id: p_update.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(void)
-update_panels(void)
+NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
{
PANEL *pan;
- T((T_CALLED("update_panels()")));
+ T((T_CALLED("update_panels(%p)"), (void *)SP_PARM));
dBug(("--> update_panels"));
- pan = _nc_bottom_panel;
- while (pan && pan->above)
- {
- PANEL_UPDATE(pan, pan->above);
- pan = pan->above;
- }
- pan = _nc_bottom_panel;
- while (pan)
+ if (SP_PARM)
{
- Wnoutrefresh(pan);
- pan = pan->above;
+ GetScreenHook(SP_PARM);
+
+ pan = _nc_bottom_panel;
+ while (pan && pan->above)
+ {
+ PANEL_UPDATE(pan, pan->above);
+ pan = pan->above;
+ }
+
+ pan = _nc_bottom_panel;
+ while (pan)
+ {
+ Wnoutrefresh(pan);
+ pan = pan->above;
+ }
}
returnVoid;
}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+update_panels(void)
+{
+ NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN);
+}
+#endif
diff --git a/panel/p_user.c b/panel/p_user.c
index ffa25f85ae12..deb5bdf7e4c5 100644
--- a/panel/p_user.c
+++ b/panel/p_user.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,12 +36,12 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_user.c,v 1.6 2005/02/19 16:52:44 tom Exp $")
+MODULE_ID("$Id: p_user.c,v 1.8 2010/01/23 23:18:35 tom Exp $")
NCURSES_EXPORT(int)
set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
{
- T((T_CALLED("set_panel_userptr(%p,%p)"), pan, uptr));
+ T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr));
if (!pan)
returnCode(ERR);
pan->user = uptr;
@@ -51,6 +51,6 @@ set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
NCURSES_EXPORT(NCURSES_CONST void *)
panel_userptr(const PANEL * pan)
{
- T((T_CALLED("panel_userptr(%p)"), pan));
+ T((T_CALLED("panel_userptr(%p)"), (const void *)pan));
returnCVoidPtr(pan ? pan->user : (NCURSES_CONST void *)0);
}
diff --git a/panel/p_win.c b/panel/p_win.c
index e7d2cea8e3fe..6643d5c2671f 100644
--- a/panel/p_win.c
+++ b/panel/p_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -36,11 +36,11 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_win.c,v 1.5 2005/02/19 16:44:16 tom Exp $")
+MODULE_ID("$Id: p_win.c,v 1.6 2010/01/23 21:22:15 tom Exp $")
NCURSES_EXPORT(WINDOW *)
panel_window(const PANEL * pan)
{
- T((T_CALLED("panel_window(%p)"), pan));
+ T((T_CALLED("panel_window(%p)"), (const void *)pan));
returnWin(pan ? pan->win : (WINDOW *)0);
}
diff --git a/panel/panel.c b/panel/panel.c
index 16a8083d64b2..96cbbab77400 100644
--- a/panel/panel.c
+++ b/panel/panel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,12 +29,14 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1996-1999,2008 *
+ * and: Thomas E. Dickey *
****************************************************************************/
/* panel.c -- implementation of panels library, some core routines */
#include "panel.priv.h"
-MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
+MODULE_ID("$Id: panel.c,v 1.25 2010/01/23 21:22:16 tom Exp $")
/*+-------------------------------------------------------------------------
_nc_retrace_panel (pan)
@@ -43,7 +45,7 @@ MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
NCURSES_EXPORT(PANEL *)
_nc_retrace_panel(PANEL * pan)
{
- T((T_RETURN("%p"), pan));
+ T((T_RETURN("%p"), (void *)pan));
return pan;
}
#endif
@@ -91,6 +93,8 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan)
{
char s80[80];
+ GetPanelHook(pan);
+
sprintf(s80, fmt, num, pan);
_tracef("%s b=%s t=%s", s80,
(_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--",
diff --git a/panel/panel.h b/panel/panel.h
index 1e02091d97f2..6ed2061d1ff8 100644
--- a/panel/panel.h
+++ b/panel/panel.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,9 +29,10 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1996-1999,2008 *
****************************************************************************/
-/* $Id: panel.h,v 1.10 2006/05/27 19:49:40 tom Exp $ */
+/* $Id: panel.h,v 1.11 2009/04/11 19:50:40 tom Exp $ */
/* panel.h -- interface file for panels library */
@@ -68,6 +69,13 @@ extern NCURSES_EXPORT(int) move_panel (PANEL *, int, int);
extern NCURSES_EXPORT(int) replace_panel (PANEL *,WINDOW *);
extern NCURSES_EXPORT(int) panel_hidden (const PANEL *);
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *);
+extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *);
+
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
+#endif
+
#if defined(__cplusplus)
}
#endif
diff --git a/panel/panel.priv.h b/panel/panel.priv.h
index 4fb8144e1b77..ce4f98937fc9 100644
--- a/panel/panel.priv.h
+++ b/panel/panel.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
-/* $Id: panel.priv.h,v 1.22 2008/09/27 22:36:11 tom Exp $ */
+/* $Id: panel.priv.h,v 1.23 2009/04/11 20:33:55 tom Exp $ */
#ifndef NCURSES_PANEL_PRIV_H
#define NCURSES_PANEL_PRIV_H 1
@@ -39,9 +39,11 @@
#include <string.h>
#include <assert.h>
-#include "curses.priv.h"
+struct screen; /* forward declaration */
+
+#include "curses.priv.h" /* includes nc_panel.h */
#include "panel.h"
-#include <nc_panel.h>
+
#if USE_RCS_IDS
# define MODULE_ID(id) static const char Ident[] = id;
@@ -83,14 +85,38 @@
# define Touchline(pan,start,count) touchline((pan)->win,start,count)
#endif
+#if NCURSES_SP_FUNCS
+#define GetScreenHook(sp) \
+ struct panelhook* ph = NCURSES_SP_NAME(_nc_panelhook)(sp)
+#define GetPanelHook(pan) \
+ GetScreenHook(_nc_screen_of((pan)->win))
+#define GetWindowHook(win) \
+ SCREEN* sp = _nc_screen_of(win); \
+ GetScreenHook(sp)
+#define GetHook(pan) SCREEN* sp = _nc_screen_of(pan->win); \
+ GetScreenHook(sp)
+
+#define _nc_stdscr_pseudo_panel ((ph)->stdscr_pseudo_panel)
+#define _nc_top_panel ((ph)->top_panel)
+#define _nc_bottom_panel ((ph)->bottom_panel)
+
+#else /* !NCURSES_SP_FUNCS */
+
+#define GetScreenHook(sp) /* nothing */
+#define GetPanelHook(pan) /* nothing */
+#define GetWindowHook(win) /* nothing */
+#define GetHook(pan) /* nothing */
+
#define _nc_stdscr_pseudo_panel _nc_panelhook()->stdscr_pseudo_panel
-#define _nc_top_panel _nc_panelhook()->top_panel
-#define _nc_bottom_panel _nc_panelhook()->bottom_panel
+#define _nc_top_panel _nc_panelhook()->top_panel
+#define _nc_bottom_panel _nc_panelhook()->bottom_panel
+
+#endif /* NCURSES_SP_FUNCS */
-#define EMPTY_STACK() (_nc_top_panel==_nc_bottom_panel)
-#define Is_Bottom(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above==(p)))
-#define Is_Top(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel==(p)))
-#define Is_Pseudo(p) ((p) && ((p)==_nc_bottom_panel))
+#define EMPTY_STACK() (_nc_top_panel == _nc_bottom_panel)
+#define Is_Bottom(p) (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above == (p)))
+#define Is_Top(p) (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel == (p)))
+#define Is_Pseudo(p) (((p) != (PANEL*)0) && ((p) == _nc_bottom_panel))
/*+-------------------------------------------------------------------------
IS_LINKED(pan) - check to see if panel is in the stack
@@ -122,7 +148,7 @@
ix2 = (PENDX(pan1) < PENDX(pan2)) ? PENDX(pan1) : PENDX(pan2);\
iy1 = (PSTARTY(pan1) < PSTARTY(pan2)) ? PSTARTY(pan2) : PSTARTY(pan1);\
iy2 = (PENDY(pan1) < PENDY(pan2)) ? PENDY(pan1) : PENDY(pan2);\
- assert((ix1<=ix2) && (iy1<=iy2));\
+ assert((ix1<=ix2) && (iy1<=iy2))
/*+-------------------------------------------------------------------------
@@ -136,12 +162,12 @@
{ PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
while(pan2) {\
if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
- int y,ix1,ix2,iy1,iy2;\
- COMPUTE_INTERSECTION(pan,pan2,ix1,ix2,iy1,iy2);\
+ int y, ix1, ix2, iy1, iy2;\
+ COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
for(y = iy1; y <= iy2; y++) {\
if (is_linetouched(pan->win,y - PSTARTY(pan))) {\
struct ldat* line = &(pan2->win->_line[y - PSTARTY(pan2)]);\
- CHANGED_RANGE(line,ix1-PSTARTX(pan2),ix2-PSTARTX(pan2));\
+ CHANGED_RANGE(line, ix1 - PSTARTX(pan2), ix2 - PSTARTX(pan2));\
}\
}\
}\
@@ -180,4 +206,9 @@
err = err_if_unlinked;\
}
+#if NCURSES_SP_FUNCS
+/* These may become later renamed and part of panel.h and the public API */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*);
+#endif
+
#endif /* NCURSES_PANEL_PRIV_H */
diff --git a/progs/Makefile.in b/progs/Makefile.in
index 886fd5be2465..bdb8a0f04898 100644
--- a/progs/Makefile.in
+++ b/progs/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.79 2008/09/07 13:58:55 tom Exp $
+# $Id: Makefile.in,v 1.85 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -43,6 +43,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
CF_MFLAGS = @cf_cv_makeflags@
@@ -76,6 +77,9 @@ transform = @program_transform_name@
AWK = @AWK@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -124,7 +128,7 @@ AUTO_SRC = \
transform.h
# tic relies on direct access to the terminfo database
-GET_PROGS = infocmp$x clear$x tput$x tset$x toe$x
+GET_PROGS = infocmp$x clear$x tabs$x tput$x tset$x toe$x
PUT_PROGS = @MAKE_TERMINFO@ tic$x
PROGS = $(PUT_PROGS) $(GET_PROGS)
@@ -159,6 +163,7 @@ actual_infocmp = `echo infocmp$x| $(TRANSFORM)`
actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
actual_init = `echo init$x| $(TRANSFORM)`
actual_reset = `echo reset$x| $(TRANSFORM)`
+actual_tabs = `echo tabs$x| $(TRANSFORM)`
actual_tic = `echo tic$x| $(TRANSFORM)`
actual_toe = `echo toe$x| $(TRANSFORM)`
actual_tput = `echo tput$x| $(TRANSFORM)`
@@ -171,10 +176,16 @@ define_init = `echo init| $(TRANSFORM)`
define_reset = `echo reset| $(TRANSFORM)`
transform.h :
- echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >$@
- echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@
- echo "#define PROG_RESET \"$(define_reset)\"" >>$@
- echo "#define PROG_INIT \"$(define_init)\"" >>$@
+ echo "#ifndef __TRANSFORM_H" >$@
+ echo "#define __TRANSFORM_H 1" >>$@
+ echo "#include <progs.priv.h>" >>$@
+ echo "extern bool same_program(const char *, const char *);" >>$@
+ -sh -c 'if test -n "$x" ; then echo "#define SUFFIX_IGNORED \"$x\"">>$@; fi'
+ echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\"" >>$@
+ echo "#define PROG_INFOTOCAP \"$(define_infotocap)\"" >>$@
+ echo "#define PROG_RESET \"$(define_reset)\"" >>$@
+ echo "#define PROG_INIT \"$(define_init)\"" >>$@
+ echo "#endif /* __TRANSFORM_H */" >>$@
install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
@MAKE_TERMINFO@ $(LIBTOOL_INSTALL) $(INSTALL_PROG) tic$x $(DESTDIR)$(bindir)/$(actual_tic)
@@ -187,6 +198,7 @@ install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
@MAKE_TERMINFO@ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
$(LIBTOOL_INSTALL) $(INSTALL_PROG) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
$(LIBTOOL_INSTALL) $(INSTALL_PROG) clear$x $(DESTDIR)$(bindir)/$(actual_clear)
+ $(LIBTOOL_INSTALL) $(INSTALL_PROG) tabs$x $(DESTDIR)$(bindir)/$(actual_tabs)
$(LIBTOOL_INSTALL) $(INSTALL_PROG) tput$x $(DESTDIR)$(bindir)/$(actual_tput)
$(LIBTOOL_INSTALL) $(INSTALL_PROG) tset$x $(DESTDIR)$(bindir)/$(actual_tset)
@echo "linking $(actual_reset) to $(actual_tset)"
@@ -200,12 +212,13 @@ uninstall.progs:
@MAKE_TERMINFO@ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_clear)
+ -@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tabs)
-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tput)
-@$(LIBTOOL_CLEAN) rm -f $(DESTDIR)$(bindir)/$(actual_tset)
-@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
$(DESTDIR)$(bindir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
#
# Utilities normally built by make all start here
@@ -213,7 +226,8 @@ $(DESTDIR)$(bindir) :
DEPS_TIC = \
$(MODEL)/tic$o \
- $(MODEL)/dump_entry$o
+ $(MODEL)/dump_entry$o \
+ $(MODEL)/transform$o
tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_TIC) -o $@
@@ -230,8 +244,15 @@ DEPS_CLEAR = \
clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
@ECHO_LINK@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@
+DEPS_TABS = \
+ $(MODEL)/tabs$o
+
+tabs$x: $(DEPS_TABS) $(DEPS_TABS)
+ @ECHO_LINK@ $(LINK) $(DEPS_TABS) $(LDFLAGS_TINFO) -o $@
+
DEPS_TPUT = \
- $(MODEL)/tput$o
+ $(MODEL)/tput$o \
+ $(MODEL)/transform$o
tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_TINFO) -o $@
@@ -244,7 +265,8 @@ infocmp$x: $(DEPS_INFOCMP) $(DEPS_CURSES)
@ECHO_LINK@ $(LINK) $(DEPS_INFOCMP) $(LDFLAGS_TIC) -o $@
DEPS_TSET = \
- $(MODEL)/tset$o
+ $(MODEL)/tset$o \
+ $(MODEL)/transform$o
tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
@@ -257,10 +279,10 @@ termsort.c: $(srcdir)/MKtermsort.sh
#
tags:
- ctags *.[ch]
+ $(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
@@ -289,6 +311,7 @@ lint:
@MAKE_TERMINFO@ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/toe.c $(srcdir)/dump_entry.c $(LINT_LIBS)
$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/clear.c $(LINT_LIBS)
$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/infocmp.c $(srcdir)/dump_entry.c $(LINT_LIBS)
+ $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tabs.c $(LINT_LIBS)
$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c $(LINT_LIBS)
$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c $(srcdir)/dump_entry.c $(LINT_LIBS)
diff --git a/progs/dump_entry.c b/progs/dump_entry.c
index bd2422008bf7..485bbbd91d64 100644
--- a/progs/dump_entry.c
+++ b/progs/dump_entry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
-MODULE_ID("$Id: dump_entry.c,v 1.88 2008/08/04 12:36:12 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.89 2010/05/01 22:04:08 tom Exp $")
#define INDENT 8
#define DISCARD(string) string = ABSENT_STRING
@@ -1040,7 +1040,7 @@ dump_entry(TERMTYPE *tterm,
save_sgr = set_attributes;
- if (((len = FMT_ENTRY()) > critlen)
+ if ((FMT_ENTRY() > critlen)
&& limited) {
save_tterm = *tterm;
@@ -1049,7 +1049,7 @@ dump_entry(TERMTYPE *tterm,
critlen);
suppress_untranslatable = TRUE;
}
- if ((len = FMT_ENTRY()) > critlen) {
+ if (FMT_ENTRY() > critlen) {
/*
* We pick on sgr because it's a nice long string capability that
* is really just an optimization hack. Another good candidate is
@@ -1075,7 +1075,7 @@ dump_entry(TERMTYPE *tterm,
critlen);
}
changed = TRUE;
- if ((len = FMT_ENTRY()) <= critlen)
+ if (FMT_ENTRY() <= critlen)
break;
}
}
@@ -1086,7 +1086,7 @@ dump_entry(TERMTYPE *tterm,
critlen);
changed = TRUE;
}
- if (!changed || ((len = FMT_ENTRY()) > critlen)) {
+ if (!changed || (FMT_ENTRY() > critlen)) {
if (purged_acs(tterm)) {
acs_chars = ABSENT_STRING;
SHOW_WHY("# (acsc removed to fit entry within %d bytes)\n",
@@ -1094,7 +1094,7 @@ dump_entry(TERMTYPE *tterm,
changed = TRUE;
}
}
- if (!changed || ((len = FMT_ENTRY()) > critlen)) {
+ if (!changed || (FMT_ENTRY() > critlen)) {
int oldversion = tversion;
tversion = V_BSD;
@@ -1130,7 +1130,7 @@ dump_entry(TERMTYPE *tterm,
} else if (!version_filter(STRING, STR_IDX(acs_chars))) {
save_tterm = *tterm;
if (purged_acs(tterm)) {
- len = FMT_ENTRY();
+ (void) FMT_ENTRY();
}
*tterm = save_tterm;
}
diff --git a/progs/infocmp.c b/progs/infocmp.c
index 84989ffc63d4..2af9cb50b1d7 100644
--- a/progs/infocmp.c
+++ b/progs/infocmp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -42,7 +42,7 @@
#include <dump_entry.h>
-MODULE_ID("$Id: infocmp.c,v 1.103 2008/08/16 22:04:56 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.105 2010/05/01 22:04:08 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
@@ -894,8 +894,6 @@ file_comparison(int argc, char *argv[])
(void) printf("The following entries are equivalent:\n");
for (qp = heads[0]; qp; qp = qp->next) {
- rp = qp->crosslinks[0];
-
if (qp->ncrosslinks == 1) {
rp = qp->crosslinks[0];
@@ -1255,6 +1253,15 @@ terminal_env(void)
*
***************************************************************************/
+#if NO_LEAKS
+#define MAIN_LEAKS() \
+ free(myargv); \
+ free(tfile); \
+ free(tname)
+#else
+#define MAIN_LEAKS() /* nothing */
+#endif
+
int
main(int argc, char *argv[])
{
@@ -1514,6 +1521,7 @@ main(int argc, char *argv[])
#else
(void) fprintf(stderr, "%s: terminfo files not supported\n",
_nc_progname);
+ MAIN_LEAKS();
ExitProgram(EXIT_FAILURE);
#endif
} else {
@@ -1526,7 +1534,6 @@ main(int argc, char *argv[])
status = _nc_read_entry(tname[termcount],
tfile[termcount],
&entries[termcount].tterm);
- directory = TERMINFO; /* for error message */
}
if (status <= 0) {
@@ -1534,6 +1541,7 @@ main(int argc, char *argv[])
"%s: couldn't open terminfo file %s.\n",
_nc_progname,
tfile[termcount]);
+ MAIN_LEAKS();
ExitProgram(EXIT_FAILURE);
}
repair_acsc(&entries[termcount].tterm);
@@ -1642,11 +1650,7 @@ main(int argc, char *argv[])
else
file_comparison(argc - optind, argv + optind);
-#if NO_LEAKS
- free(myargv);
- free(tfile);
- free(tname);
-#endif
+ MAIN_LEAKS();
ExitProgram(EXIT_SUCCESS);
}
diff --git a/progs/modules b/progs/modules
index 3b4f3b602369..55d7a9fb9694 100644
--- a/progs/modules
+++ b/progs/modules
@@ -1,7 +1,7 @@
-# $Id: modules,v 1.13 2006/12/24 00:53:21 tom Exp $
+# $Id: modules,v 1.17 2010/01/23 17:47:23 tom Exp $
# Program modules (some are in ncurses lib!)
##############################################################################
-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -34,10 +34,12 @@
@ base
clear progs $(srcdir) $(HEADER_DEPS)
tic progs $(srcdir) $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h
-toe progs $(srcdir) $(HEADER_DEPS) $(srcdir)/dump_entry.h
+toe progs $(srcdir) $(HEADER_DEPS) $(INCDIR)/hashed_db.h
dump_entry progs $(srcdir) $(HEADER_DEPS) $(srcdir)/dump_entry.h ../include/parametrized.h $(INCDIR)/capdefaults.c termsort.c
infocmp progs $(srcdir) $(HEADER_DEPS) $(srcdir)/dump_entry.h
-tput progs $(srcdir) $(HEADER_DEPS) transform.h termsort.c
+tabs progs $(srcdir) $(HEADER_DEPS)
+tput progs $(srcdir) $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h termsort.c
tset progs $(srcdir) $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h ../include/termcap.h
+transform progs $(srcdir) $(HEADER_DEPS) transform.h
# vile:makemode
diff --git a/progs/tabs.c b/progs/tabs.c
new file mode 100644
index 000000000000..b59c9086d8d3
--- /dev/null
+++ b/progs/tabs.c
@@ -0,0 +1,510 @@
+/****************************************************************************
+ * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 2008 *
+ ****************************************************************************/
+
+/*
+ * tabs.c -- set terminal hard-tabstops
+ */
+
+#define USE_LIBTINFO
+#include <progs.priv.h>
+
+MODULE_ID("$Id: tabs.c,v 1.19 2010/10/23 22:26:01 tom Exp $")
+
+static void usage(void) GCC_NORETURN;
+
+static int max_cols;
+
+static int
+putch(int c)
+{
+ return putchar(c);
+}
+
+static void
+do_tabs(int *tab_list)
+{
+ int last = 1;
+ int stop;
+
+ putchar('\r');
+ while ((stop = *tab_list++) > 0) {
+ if (last < stop) {
+ while (last++ < stop) {
+ if (last > max_cols)
+ break;
+ putchar(' ');
+ }
+ }
+ if (stop <= max_cols) {
+ tputs(tparm(set_tab, stop), 1, putch);
+ last = stop;
+ } else {
+ break;
+ }
+ }
+ putchar('\n');
+}
+
+static int *
+decode_tabs(const char *tab_list)
+{
+ int *result = typeCalloc(int, strlen(tab_list) + (unsigned) max_cols);
+ int n = 0;
+ int value = 0;
+ int prior = 0;
+ int ch;
+
+ if (result != 0) {
+ while ((ch = *tab_list++) != '\0') {
+ if (isdigit(UChar(ch))) {
+ value *= 10;
+ value += (ch - '0');
+ } else if (ch == ',') {
+ result[n] = value + prior;
+ if (n > 0 && result[n] <= result[n - 1]) {
+ fprintf(stderr,
+ "tab-stops are not in increasing order: %d %d\n",
+ value, result[n - 1]);
+ free(result);
+ result = 0;
+ break;
+ }
+ ++n;
+ value = 0;
+ prior = 0;
+ } else if (ch == '+') {
+ if (n)
+ prior = result[n - 1];
+ }
+ }
+ }
+
+ if (result != 0) {
+ /*
+ * If there is only one value, then it is an option such as "-8".
+ */
+ if ((n == 0) && (value > 0)) {
+ int step = value;
+ while (n < max_cols - 1) {
+ result[n++] = value;
+ value += step;
+ }
+ }
+
+ /*
+ * Add the last value, if any.
+ */
+ result[n++] = value + prior;
+ result[n] = 0;
+ }
+ return result;
+}
+
+static void
+print_ruler(int *tab_list)
+{
+ int last = 0;
+ int stop;
+ int n;
+
+ /* first print a readable ruler */
+ for (n = 0; n < max_cols; n += 10) {
+ int ch = 1 + (n / 10);
+ char buffer[20];
+ sprintf(buffer, "----+----%c",
+ ((ch < 10)
+ ? (ch + '0')
+ : (ch + 'A' - 10)));
+ printf("%.*s", ((max_cols - n) > 10) ? 10 : (max_cols - n), buffer);
+ }
+ putchar('\n');
+
+ /* now, print '*' for each stop */
+ for (n = 0, last = 0; (tab_list[n] > 0) && (last < max_cols); ++n) {
+ stop = tab_list[n];
+ while (++last < stop) {
+ if (last <= max_cols) {
+ putchar('-');
+ } else {
+ break;
+ }
+ }
+ if (last <= max_cols) {
+ putchar('*');
+ last = stop;
+ } else {
+ break;
+ }
+ }
+ while (++last <= max_cols)
+ putchar('-');
+ putchar('\n');
+}
+
+/*
+ * Write an '*' on each tabstop, to demonstrate whether it lines up with the
+ * ruler.
+ */
+static void
+write_tabs(int *tab_list)
+{
+ int stop;
+
+ while ((stop = *tab_list++) > 0 && stop <= max_cols) {
+ fputs((stop == 1) ? "*" : "\t*", stdout);
+ };
+ /* also show a tab _past_ the stops */
+ if (stop < max_cols)
+ fputs("\t+", stdout);
+ putchar('\n');
+}
+
+/*
+ * Trim leading/trailing blanks, as well as blanks after a comma.
+ * Convert embedded blanks to commas.
+ */
+static char *
+trimmed_tab_list(const char *source)
+{
+ char *result = strdup(source);
+ int ch, j, k, last;
+
+ if (result != 0) {
+ for (j = k = last = 0; result[j] != 0; ++j) {
+ ch = UChar(result[j]);
+ if (isspace(ch)) {
+ if (last == '\0') {
+ continue;
+ } else if (isdigit(last) || last == ',') {
+ ch = ',';
+ }
+ } else if (ch == ',') {
+ ;
+ } else {
+ if (last == ',')
+ result[k++] = (char) last;
+ result[k++] = (char) ch;
+ }
+ last = ch;
+ }
+ result[k] = '\0';
+ }
+ return result;
+}
+
+static bool
+comma_is_needed(const char *source)
+{
+ bool result = FALSE;
+
+ if (source != 0) {
+ unsigned len = strlen(source);
+ if (len != 0)
+ result = (source[len - 1] != ',');
+ } else {
+ result = FALSE;
+ }
+ return result;
+}
+
+/*
+ * Add a command-line parameter to the tab-list. It can be blank- or comma-
+ * separated (or a mixture). For simplicity, empty tabs are ignored, e.g.,
+ * tabs 1,,6,11
+ * tabs 1,6,11
+ * are treated the same.
+ */
+static const char *
+add_to_tab_list(char **append, const char *value)
+{
+ char *result = *append;
+ char *copied = trimmed_tab_list(value);
+
+ if (copied != 0 && *copied != '\0') {
+ const char *comma = ",";
+ unsigned need = 1 + strlen(copied);
+
+ if (*copied == ',')
+ comma = "";
+ else if (!comma_is_needed(*append))
+ comma = "";
+
+ need += strlen(comma);
+ if (*append != 0)
+ need += strlen(*append);
+
+ result = malloc(need);
+ if (result != 0) {
+ *result = '\0';
+ if (*append != 0) {
+ strcpy(result, *append);
+ free(*append);
+ }
+ strcat(result, comma);
+ strcat(result, copied);
+ }
+
+ *append = result;
+ }
+ return result;
+}
+
+/*
+ * Check for illegal characters in the tab-list.
+ */
+static bool
+legal_tab_list(const char *program, const char *tab_list)
+{
+ bool result = TRUE;
+
+ if (tab_list != 0 && *tab_list != '\0') {
+ if (comma_is_needed(tab_list)) {
+ int n, ch;
+ for (n = 0; tab_list[n] != '\0'; ++n) {
+ ch = UChar(tab_list[n]);
+ if (!(isdigit(ch) || ch == ',' || ch == '+')) {
+ fprintf(stderr,
+ "%s: unexpected character found '%c'\n",
+ program, ch);
+ result = FALSE;
+ break;
+ }
+ }
+ } else {
+ fprintf(stderr, "%s: trailing comma found '%s'\n", program, tab_list);
+ result = FALSE;
+ }
+ } else {
+ fprintf(stderr, "%s: no tab-list given\n", program);
+ result = FALSE;
+ }
+ return result;
+}
+
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: tabs [options] [tabstop-list]"
+ ,""
+ ,"Options:"
+ ," -0 reset tabs"
+ ," -8 set tabs to standard interval"
+ ," -a Assembler, IBM S/370, first format"
+ ," -a2 Assembler, IBM S/370, second format"
+ ," -c COBOL, normal format"
+ ," -c2 COBOL compact format"
+ ," -c3 COBOL compact format extended"
+ ," -d debug (show ruler with expected/actual tab positions)"
+ ," -f FORTRAN"
+ ," -n no-op (do not modify terminal settings)"
+ ," -p PL/I"
+ ," -s SNOBOL"
+ ," -u UNIVAC 1100 Assembler"
+ ," -T name use terminal type 'name'"
+ ,""
+ ,"A tabstop-list is an ordered list of column numbers, e.g., 1,11,21"
+ ,"or 1,+10,+10 which is the same."
+ };
+ unsigned n;
+
+ fflush(stdout);
+ for (n = 0; n < SIZEOF(msg); ++n) {
+ fprintf(stderr, "%s\n", msg[n]);
+ }
+ ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc, char *argv[])
+{
+ int rc = EXIT_FAILURE;
+ bool debug = FALSE;
+ bool no_op = FALSE;
+ int n, ch;
+ NCURSES_CONST char *term_name = 0;
+ const char *mar_list = 0; /* ignored */
+ char *append = 0;
+ const char *tab_list = 0;
+
+ if ((term_name = getenv("TERM")) == 0)
+ term_name = "ansi+tabs";
+
+ /* cannot use getopt, since some options are two-character */
+ for (n = 1; n < argc; ++n) {
+ char *option = argv[n];
+ switch (option[0]) {
+ case '-':
+ while ((ch = *++option) != '\0') {
+ switch (ch) {
+ case 'a':
+ switch (*option) {
+ case '\0':
+ tab_list = "1,10,16,36,72";
+ /* Assembler, IBM S/370, first format */
+ break;
+ case '2':
+ tab_list = "1,10,16,40,72";
+ /* Assembler, IBM S/370, second format */
+ break;
+ default:
+ usage();
+ }
+ break;
+ case 'c':
+ switch (*option) {
+ case '\0':
+ tab_list = "1,8,12,16,20,55";
+ /* COBOL, normal format */
+ break;
+ case '2':
+ tab_list = "1,6,10,14,49";
+ /* COBOL compact format */
+ break;
+ case '3':
+ tab_list = "1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67";
+ /* COBOL compact format extended */
+ break;
+ default:
+ usage();
+ }
+ break;
+ case 'd': /* ncurses extension */
+ debug = TRUE;
+ break;
+ case 'f':
+ tab_list = "1,7,11,15,19,23";
+ /* FORTRAN */
+ break;
+ case 'n': /* ncurses extension */
+ no_op = TRUE;
+ break;
+ case 'p':
+ tab_list = "1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61";
+ /* PL/I */
+ break;
+ case 's':
+ tab_list = "1,10,55";
+ /* SNOBOL */
+ break;
+ case 'u':
+ tab_list = "1,12,20,44";
+ /* UNIVAC 1100 Assembler */
+ break;
+ case 'T':
+ ++n;
+ if (*++option != '\0') {
+ term_name = option;
+ } else {
+ term_name = argv[n++];
+ }
+ option += ((int) strlen(option)) - 1;
+ continue;
+ default:
+ if (isdigit(UChar(*option))) {
+ tab_list = option;
+ ++n;
+ } else {
+ usage();
+ }
+ option += ((int) strlen(option)) - 1;
+ break;
+ }
+ }
+ break;
+ case '+':
+ while ((ch = *++option) != '\0') {
+ switch (ch) {
+ case 'm':
+ mar_list = option;
+ break;
+ default:
+ /* special case of relative stops separated by spaces? */
+ if (option == argv[n] + 1) {
+ tab_list = add_to_tab_list(&append, argv[n]);
+ }
+ break;
+ }
+ }
+ break;
+ default:
+ if (append != 0) {
+ if (tab_list != (const char *) append) {
+ /* one of the predefined options was used */
+ free(append);
+ append = 0;
+ }
+ }
+ tab_list = add_to_tab_list(&append, option);
+ break;
+ }
+ }
+
+ setupterm(term_name, STDOUT_FILENO, (int *) 0);
+
+ max_cols = (columns > 0) ? columns : 80;
+
+ if (!VALID_STRING(clear_all_tabs)) {
+ fprintf(stderr,
+ "%s: terminal type '%s' cannot reset tabs\n",
+ argv[0], term_name);
+ } else if (!VALID_STRING(set_tab)) {
+ fprintf(stderr,
+ "%s: terminal type '%s' cannot set tabs\n",
+ argv[0], term_name);
+ } else if (legal_tab_list(argv[0], tab_list)) {
+ int *list = decode_tabs(tab_list);
+
+ if (!no_op)
+ tputs(clear_all_tabs, 1, putch);
+
+ if (list != 0) {
+ if (!no_op)
+ do_tabs(list);
+ if (debug) {
+ fflush(stderr);
+ printf("tabs %s\n", tab_list);
+ print_ruler(list);
+ write_tabs(list);
+ }
+ free(list);
+ } else if (debug) {
+ fflush(stderr);
+ printf("tabs %s\n", tab_list);
+ }
+ rc = EXIT_SUCCESS;
+ }
+ if (append != 0)
+ free(append);
+ ExitProgram(rc);
+}
diff --git a/progs/tic.c b/progs/tic.c
index 82bc3ea0d789..8e89095fc676 100644
--- a/progs/tic.c
+++ b/progs/tic.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,7 +44,7 @@
#include <dump_entry.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.137 2008/09/13 16:59:24 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.147 2011/02/12 18:39:08 tom Exp $")
const char *_nc_progname = "tic";
@@ -342,8 +342,15 @@ stripped(char *src)
while (isspace(UChar(*src)))
src++;
if (*src != '\0') {
- char *dst = strcpy((char *) malloc(strlen(src) + 1), src);
- size_t len = strlen(dst);
+ char *dst;
+ size_t len;
+
+ if ((dst = strdup(src)) == NULL)
+ failed("strdup");
+
+ assert(dst != 0);
+
+ len = strlen(dst);
while (--len != 0 && isspace(UChar(dst[len])))
dst[len] = '\0';
return dst;
@@ -495,11 +502,11 @@ main(int argc, char *argv[])
_nc_progname = _nc_rootname(argv[0]);
- if ((infodump = (strcmp(_nc_progname, PROG_CAPTOINFO) == 0)) != FALSE) {
+ if ((infodump = same_program(_nc_progname, PROG_CAPTOINFO)) != FALSE) {
outform = F_TERMINFO;
sortmode = S_TERMINFO;
}
- if ((capdump = (strcmp(_nc_progname, PROG_INFOTOCAP) == 0)) != FALSE) {
+ if ((capdump = same_program(_nc_progname, PROG_INFOTOCAP)) != FALSE) {
outform = F_TERMCAP;
sortmode = S_TERMCAP;
}
@@ -757,6 +764,7 @@ main(int argc, char *argv[])
put_translate(fgetc(tmp_fp));
}
+ repair_acsc(&qp->tterm);
dump_entry(&qp->tterm, suppress_untranslatable,
limited, numbers, NULL);
for (j = 0; j < (int) qp->nuses; j++)
@@ -923,6 +931,156 @@ keypad_index(const char *string)
return result;
}
+/*
+ * list[] is down, up, left, right
+ * "left" may be ^H rather than \E[D
+ * "down" may be ^J rather than \E[B
+ * But up/right are generally consistently escape sequences for ANSI terminals.
+ */
+static void
+check_ansi_cursor(char *list[4])
+{
+ int j, k;
+ int want;
+ size_t prefix = 0;
+ size_t suffix;
+ bool skip[4];
+ bool repeated = FALSE;
+
+ for (j = 0; j < 4; ++j) {
+ skip[j] = FALSE;
+ for (k = 0; k < j; ++k) {
+ if (j != k
+ && !strcmp(list[j], list[k])) {
+ char *value = _nc_tic_expand(list[k], TRUE, 0);
+ _nc_warning("repeated cursor control %s\n", value);
+ repeated = TRUE;
+ }
+ }
+ }
+ if (!repeated) {
+ char *up = list[1];
+
+ if (UChar(up[0]) == '\033') {
+ if (up[1] == '[') {
+ prefix = 2;
+ } else {
+ prefix = 1;
+ }
+ } else if (UChar(up[0]) == UChar('\233')) {
+ prefix = 1;
+ }
+ if (prefix) {
+ suffix = prefix;
+ while (up[suffix] && isdigit(UChar(up[suffix])))
+ ++suffix;
+ }
+ if (prefix && up[suffix] == 'A') {
+ skip[1] = TRUE;
+ if (!strcmp(list[0], "\n"))
+ skip[0] = TRUE;
+ if (!strcmp(list[2], "\b"))
+ skip[2] = TRUE;
+
+ for (j = 0; j < 4; ++j) {
+ if (skip[j] || strlen(list[j]) == 1)
+ continue;
+ if (memcmp(list[j], up, prefix)) {
+ char *value = _nc_tic_expand(list[j], TRUE, 0);
+ _nc_warning("inconsistent prefix for %s\n", value);
+ continue;
+ }
+ if (strlen(list[j]) < suffix) {
+ char *value = _nc_tic_expand(list[j], TRUE, 0);
+ _nc_warning("inconsistent length for %s, expected %d\n",
+ value, (int) suffix + 1);
+ continue;
+ }
+ want = "BADC"[j];
+ if (list[j][suffix] != want) {
+ char *value = _nc_tic_expand(list[j], TRUE, 0);
+ _nc_warning("inconsistent suffix for %s, expected %c, have %c\n",
+ value, want, list[j][suffix]);
+ }
+ }
+ }
+ }
+}
+
+#define EXPECTED(name) if (!PRESENT(name)) _nc_warning("expected " #name)
+
+static void
+check_cursor(TERMTYPE *tp)
+{
+ int count;
+ char *list[4];
+
+ /* if we have a parameterized form, then the non-parameterized is easy */
+ ANDMISSING(parm_down_cursor, cursor_down);
+ ANDMISSING(parm_up_cursor, cursor_up);
+ ANDMISSING(parm_left_cursor, cursor_left);
+ ANDMISSING(parm_right_cursor, cursor_right);
+
+ /* Given any of a set of cursor movement, the whole set should be present.
+ * Technically this is not true (we could use cursor_address to fill in
+ * unsupported controls), but it is likely.
+ */
+ count = 0;
+ if (PRESENT(parm_down_cursor)) {
+ list[count++] = parm_down_cursor;
+ }
+ if (PRESENT(parm_up_cursor)) {
+ list[count++] = parm_up_cursor;
+ }
+ if (PRESENT(parm_left_cursor)) {
+ list[count++] = parm_left_cursor;
+ }
+ if (PRESENT(parm_right_cursor)) {
+ list[count++] = parm_right_cursor;
+ }
+ if (count == 4) {
+ check_ansi_cursor(list);
+ } else if (count != 0) {
+ EXPECTED(parm_down_cursor);
+ EXPECTED(parm_up_cursor);
+ EXPECTED(parm_left_cursor);
+ EXPECTED(parm_right_cursor);
+ }
+
+ count = 0;
+ if (PRESENT(cursor_down)) {
+ list[count++] = cursor_down;
+ }
+ if (PRESENT(cursor_up)) {
+ list[count++] = cursor_up;
+ }
+ if (PRESENT(cursor_left)) {
+ list[count++] = cursor_left;
+ }
+ if (PRESENT(cursor_right)) {
+ list[count++] = cursor_right;
+ }
+ if (count == 4) {
+ check_ansi_cursor(list);
+ } else if (count != 0) {
+ count = 0;
+ if (PRESENT(cursor_down) && strcmp(cursor_down, "\n"))
+ ++count;
+ if (PRESENT(cursor_left) && strcmp(cursor_left, "\b"))
+ ++count;
+ if (PRESENT(cursor_up) && strlen(cursor_up) > 1)
+ ++count;
+ if (PRESENT(cursor_right) && strlen(cursor_right) > 1)
+ ++count;
+ if (count) {
+ EXPECTED(cursor_down);
+ EXPECTED(cursor_up);
+ EXPECTED(cursor_left);
+ EXPECTED(cursor_right);
+ }
+ }
+}
+
#define MAX_KP 5
/*
* Do a quick sanity-check for vt100-style keypads to see if the 5-key keypad
@@ -1032,6 +1190,32 @@ check_keypad(TERMTYPE *tp)
}
}
+static void
+check_printer(TERMTYPE *tp)
+{
+ PAIRED(enter_doublewide_mode, exit_doublewide_mode);
+ PAIRED(enter_italics_mode, exit_italics_mode);
+ PAIRED(enter_leftward_mode, exit_leftward_mode);
+ PAIRED(enter_micro_mode, exit_micro_mode);
+ PAIRED(enter_shadow_mode, exit_shadow_mode);
+ PAIRED(enter_subscript_mode, exit_subscript_mode);
+ PAIRED(enter_superscript_mode, exit_superscript_mode);
+ PAIRED(enter_upward_mode, exit_upward_mode);
+
+ ANDMISSING(start_char_set_def, stop_char_set_def);
+
+ /* if we have a parameterized form, then the non-parameterized is easy */
+ ANDMISSING(set_bottom_margin_parm, set_bottom_margin);
+ ANDMISSING(set_left_margin_parm, set_left_margin);
+ ANDMISSING(set_right_margin_parm, set_right_margin);
+ ANDMISSING(set_top_margin_parm, set_top_margin);
+
+ ANDMISSING(parm_down_micro, micro_down);
+ ANDMISSING(parm_left_micro, micro_left);
+ ANDMISSING(parm_right_micro, micro_right);
+ ANDMISSING(parm_up_micro, micro_up);
+}
+
/*
* Returns the expected number of parameters for the given capability.
*/
@@ -1268,6 +1452,8 @@ similar_sgr(int num, char *a, char *b)
} else if (delaying) {
a = skip_delay(a);
b = skip_delay(b);
+ } else if ((*b == '0' || (*b == ';')) && *a == 'm') {
+ b++;
} else {
a++;
}
@@ -1343,7 +1529,7 @@ show_where(unsigned level)
if (_nc_tracing >= DEBUG_LEVEL(level)) {
char my_name[256];
_nc_get_type(my_name);
- fprintf(stderr, "\"%s\", line %d, '%s' ",
+ _tracef("\"%s\", line %d, '%s'",
_nc_get_source(),
_nc_curr_line, my_name);
}
@@ -1411,7 +1597,9 @@ check_termtype(TERMTYPE *tp, bool literal)
check_acs(tp);
check_colors(tp);
+ check_cursor(tp);
check_keypad(tp);
+ check_printer(tp);
/*
* These may be mismatched because the terminal description relies on
@@ -1432,6 +1620,11 @@ check_termtype(TERMTYPE *tp, bool literal)
ANDMISSING(change_scroll_region, save_cursor);
ANDMISSING(change_scroll_region, restore_cursor);
+ /*
+ * If we can clear tabs, we should be able to initialize them.
+ */
+ ANDMISSING(clear_all_tabs, set_tab);
+
if (PRESENT(set_attributes)) {
char *zero = 0;
diff --git a/progs/toe.c b/progs/toe.c
index 8af6f371b77b..6f45992f7124 100644
--- a/progs/toe.c
+++ b/progs/toe.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,7 +44,7 @@
#include <hashed_db.h>
#endif
-MODULE_ID("$Id: toe.c,v 1.51 2008/08/16 21:53:25 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.52 2010/05/01 22:04:08 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
@@ -61,6 +61,13 @@ ExitProgram(int code)
}
#endif
+static void
+failed(const char *msg)
+{
+ perror(msg);
+ ExitProgram(EXIT_FAILURE);
+}
+
#if USE_HASHED_DB
static bool
make_db_name(char *dst, const char *src, unsigned limit)
@@ -184,10 +191,10 @@ typelist(int eargc, char *eargv[],
DIRENT *entry;
cwd_buf = typeRealloc(char, cwd_len, cwd_buf);
- if (cwd_buf == 0) {
- perror("realloc cwd_buf");
- continue;
- }
+ if (cwd_buf == 0)
+ failed("realloc cwd_buf");
+
+ assert(cwd_buf != 0);
strncpy(name_1, subdir->d_name, len)[len] = '\0';
if (isDotname(name_1))
@@ -480,6 +487,10 @@ main(int argc, char *argv[])
}
if (!pass) {
eargv = typeCalloc(char *, count + 1);
+ if (eargv == 0)
+ failed("realloc eargv");
+
+ assert(eargv != 0);
} else {
code = typelist((int) count, eargv, header, deschook);
while (count-- > 0)
diff --git a/progs/tput.c b/progs/tput.c
index 022d4940c2a1..2e67cfecbef4 100644
--- a/progs/tput.c
+++ b/progs/tput.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -47,7 +47,7 @@
#endif
#include <transform.h>
-MODULE_ID("$Id: tput.c,v 1.42 2008/07/13 11:05:12 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.46 2010/01/09 16:53:24 tom Exp $")
#define PUTS(s) fputs(s, stdout)
#define PUTCHAR(c) putchar(c)
@@ -86,8 +86,8 @@ usage(void)
static void
check_aliases(const char *name)
{
- is_init = (strcmp(name, PROG_INIT) == 0);
- is_reset = (strcmp(name, PROG_RESET) == 0);
+ is_init = same_program(name, PROG_INIT);
+ is_reset = same_program(name, PROG_RESET);
}
/*
@@ -153,6 +153,9 @@ tput(int argc, char *argv[])
int i, j, c;
int status;
FILE *f;
+#if !PURE_TERMINFO
+ bool termcap = FALSE;
+#endif
if ((name = argv[0]) == 0)
name = "";
@@ -265,35 +268,40 @@ tput(int argc, char *argv[])
return 0;
}
#if !PURE_TERMINFO
- {
- const struct name_table_entry *np;
-
- if ((np = _nc_find_entry(name, _nc_get_hash_table(1))) != 0)
- switch (np->nte_type) {
- case BOOLEAN:
- if (bool_from_termcap[np->nte_index])
- name = boolnames[np->nte_index];
- break;
-
- case NUMBER:
- if (num_from_termcap[np->nte_index])
- name = numnames[np->nte_index];
- break;
-
- case STRING:
- if (str_from_termcap[np->nte_index])
- name = strnames[np->nte_index];
- break;
- }
- }
+ retry:
#endif
-
if ((status = tigetflag(name)) != -1) {
return exit_code(BOOLEAN, status);
} else if ((status = tigetnum(name)) != CANCELLED_NUMERIC) {
(void) printf("%d\n", status);
return exit_code(NUMBER, 0);
} else if ((s = tigetstr(name)) == CANCELLED_STRING) {
+#if !PURE_TERMINFO
+ if (!termcap) {
+ const struct name_table_entry *np;
+
+ termcap = TRUE;
+ if ((np = _nc_find_entry(name, _nc_get_hash_table(termcap))) != 0) {
+ switch (np->nte_type) {
+ case BOOLEAN:
+ if (bool_from_termcap[np->nte_index])
+ name = boolnames[np->nte_index];
+ break;
+
+ case NUMBER:
+ if (num_from_termcap[np->nte_index])
+ name = numnames[np->nte_index];
+ break;
+
+ case STRING:
+ if (str_from_termcap[np->nte_index])
+ name = strnames[np->nte_index];
+ break;
+ }
+ goto retry;
+ }
+ }
+#endif
quit(4, "unknown terminfo capability '%s'", name);
} else if (s != ABSENT_STRING) {
if (argc > 1) {
diff --git a/progs/transform.c b/progs/transform.c
new file mode 100644
index 000000000000..75f4573357c3
--- /dev/null
+++ b/progs/transform.c
@@ -0,0 +1,79 @@
+/****************************************************************************
+ * Copyright (c) 2009,2010 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * 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 <progs.priv.h>
+#include <string.h>
+
+#include <transform.h>
+
+MODULE_ID("$Id: transform.c,v 1.2 2010/09/04 21:16:17 tom Exp $")
+
+#ifdef SUFFIX_IGNORED
+static void
+trim_suffix(const char *a, unsigned *len)
+{
+ const char ignore[] = SUFFIX_IGNORED;
+
+ if (sizeof(ignore) != 0) {
+ bool trim = FALSE;
+ unsigned need = (sizeof(ignore) - 1);
+
+ if (*len > need) {
+ unsigned first = *len - need;
+ unsigned n;
+ trim = TRUE;
+ for (n = first; n < *len; ++n) {
+ if (tolower(UChar(a[n])) != tolower(UChar(ignore[n - first]))) {
+ trim = FALSE;
+ break;
+ }
+ }
+ if (trim) {
+ *len -= need;
+ }
+ }
+ }
+}
+#else
+#define trim_suffix(a, len) /* nothing */
+#endif
+
+bool
+same_program(const char *a, const char *b)
+{
+ unsigned len_a = strlen(a);
+ unsigned len_b = strlen(b);
+
+ trim_suffix(a, &len_a);
+ trim_suffix(b, &len_b);
+
+ return (len_a == len_b) && (strncmp(a, b, len_a) == 0);
+}
diff --git a/progs/tset.c b/progs/tset.c
index 6a4d2d61c3de..084e41d6db24 100644
--- a/progs/tset.c
+++ b/progs/tset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,6 +33,22 @@
****************************************************************************/
/*
+ * Notes:
+ * The initial adaptation from 4.4BSD Lite sources in September 1995 used 686
+ * lines from that version, and made changes/additions for 150 lines. There
+ * was no reformatting, so with/without ignoring whitespace, the amount of
+ * change is the same.
+ *
+ * Comparing with current (2009) source, excluding this comment:
+ * a) 209 lines match identically to the 4.4BSD Lite sources, with 771 lines
+ * changed/added.
+ * a) Ignoring whitespace, the current version still uses 516 lines from the
+ * 4.4BSD Lite sources, with 402 lines changed/added.
+ *
+ * Raymond's original comment on this follows...
+ */
+
+/*
* tset.c - terminal initialization utility
*
* This code was mostly swiped from 4.4BSD tset, with some obsolescent
@@ -52,11 +68,7 @@
* 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 acknowledgement:
- * 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
+ * 3. 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.
*
@@ -107,7 +119,7 @@ char *ttyname(int fd);
#include <dump_entry.h>
#include <transform.h>
-MODULE_ID("$Id: tset.c,v 1.76 2008/10/11 19:26:19 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.82 2010/05/01 21:42:46 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
@@ -129,7 +141,9 @@ MODULE_ID("$Id: tset.c,v 1.76 2008/10/11 19:26:19 tom Exp $")
# endif
#endif
+#ifndef environ
extern char **environ;
+#endif
#undef CTRL
#define CTRL(x) ((x) & 0x1f)
@@ -385,9 +399,13 @@ add_mapping(const char *port, char *arg)
char *base = 0;
copy = strdup(arg);
- mapp = (MAP *) malloc(sizeof(MAP));
+ mapp = typeMalloc(MAP, 1);
if (copy == 0 || mapp == 0)
failed("malloc");
+
+ assert(copy != 0);
+ assert(mapp != 0);
+
mapp->next = 0;
if (maplist == 0)
cur = maplist = mapp;
@@ -1247,12 +1265,12 @@ main(int argc, char **argv)
ospeed = (NCURSES_OSPEED) mode.sg_ospeed;
#endif
- if (!strcmp(_nc_progname, PROG_RESET)) {
+ if (same_program(_nc_progname, PROG_RESET)) {
isreset = TRUE;
reset_mode();
}
- ttype = get_termcap_entry(*argv);
+ (void) get_termcap_entry(*argv);
if (!noset) {
tcolumns = columns;
diff --git a/tar-copy.sh b/tar-copy.sh
deleted file mode 100755
index 3df1bc11169e..000000000000
--- a/tar-copy.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/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