aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ncurses/ANNOUNCE310
-rw-r--r--contrib/ncurses/INSTALL47
-rw-r--r--contrib/ncurses/MANIFEST62
-rw-r--r--contrib/ncurses/NEWS300
-rw-r--r--contrib/ncurses/aclocal.m4347
-rw-r--r--contrib/ncurses/announce.html.in400
-rw-r--r--contrib/ncurses/c++/Makefile.in50
-rw-r--r--contrib/ncurses/c++/cursesapp.cc6
-rw-r--r--contrib/ncurses/c++/cursesapp.h12
-rw-r--r--contrib/ncurses/c++/cursesf.cc58
-rw-r--r--contrib/ncurses/c++/cursesf.h44
-rw-r--r--contrib/ncurses/c++/cursesm.cc57
-rw-r--r--contrib/ncurses/c++/cursesm.h20
-rw-r--r--contrib/ncurses/c++/cursesmain.cc6
-rw-r--r--contrib/ncurses/c++/cursesp.cc10
-rw-r--r--contrib/ncurses/c++/cursesp.h12
-rw-r--r--contrib/ncurses/c++/cursespad.cc6
-rw-r--r--contrib/ncurses/c++/cursesw.cc77
-rw-r--r--contrib/ncurses/c++/cursesw.h181
-rw-r--r--contrib/ncurses/c++/cursslk.cc10
-rw-r--r--contrib/ncurses/c++/cursslk.h26
-rw-r--r--contrib/ncurses/c++/demo.cc2
-rwxr-xr-xcontrib/ncurses/c++/edit_cfg.sh9
-rw-r--r--contrib/ncurses/c++/etip.h.in64
-rw-r--r--contrib/ncurses/c++/internal.h12
-rwxr-xr-xcontrib/ncurses/config.guess572
-rwxr-xr-xcontrib/ncurses/config.sub134
-rwxr-xr-xcontrib/ncurses/configure1147
-rw-r--r--contrib/ncurses/configure.in90
-rw-r--r--contrib/ncurses/dist.mk12
-rw-r--r--contrib/ncurses/doc/hackguide.doc687
-rw-r--r--contrib/ncurses/doc/html/announce.html397
-rw-r--r--contrib/ncurses/doc/ncurses-intro.doc2502
-rw-r--r--contrib/ncurses/form/Makefile.in13
-rw-r--r--contrib/ncurses/form/fld_arg.c17
-rw-r--r--contrib/ncurses/form/fld_attr.c8
-rw-r--r--contrib/ncurses/form/fld_current.c13
-rw-r--r--contrib/ncurses/form/fld_def.c39
-rw-r--r--contrib/ncurses/form/fld_dup.c7
-rw-r--r--contrib/ncurses/form/fld_ftchoice.c12
-rw-r--r--contrib/ncurses/form/fld_ftlink.c8
-rw-r--r--contrib/ncurses/form/fld_info.c19
-rw-r--r--contrib/ncurses/form/fld_just.c10
-rw-r--r--contrib/ncurses/form/fld_link.c7
-rw-r--r--contrib/ncurses/form/fld_max.c7
-rw-r--r--contrib/ncurses/form/fld_move.c7
-rw-r--r--contrib/ncurses/form/fld_newftyp.c12
-rw-r--r--contrib/ncurses/form/fld_opts.c16
-rw-r--r--contrib/ncurses/form/fld_pad.c10
-rw-r--r--contrib/ncurses/form/fld_page.c10
-rw-r--r--contrib/ncurses/form/fld_stat.c10
-rw-r--r--contrib/ncurses/form/fld_type.c10
-rw-r--r--contrib/ncurses/form/fld_user.c10
-rw-r--r--contrib/ncurses/form/form.h205
-rw-r--r--contrib/ncurses/form/form.priv.h34
-rw-r--r--contrib/ncurses/form/frm_cursor.c7
-rw-r--r--contrib/ncurses/form/frm_data.c10
-rw-r--r--contrib/ncurses/form/frm_def.c21
-rw-r--r--contrib/ncurses/form/frm_driver.c58
-rw-r--r--contrib/ncurses/form/frm_hook.c8
-rw-r--r--contrib/ncurses/form/frm_opts.c16
-rw-r--r--contrib/ncurses/form/frm_page.c10
-rw-r--r--contrib/ncurses/form/frm_post.c10
-rw-r--r--contrib/ncurses/form/frm_req_name.c10
-rw-r--r--contrib/ncurses/form/frm_scale.c7
-rw-r--r--contrib/ncurses/form/frm_sub.c10
-rw-r--r--contrib/ncurses/form/frm_user.c10
-rw-r--r--contrib/ncurses/form/frm_win.c10
-rw-r--r--contrib/ncurses/form/fty_alnum.c4
-rw-r--r--contrib/ncurses/form/fty_alpha.c4
-rw-r--r--contrib/ncurses/form/fty_enum.c6
-rw-r--r--contrib/ncurses/form/fty_int.c4
-rw-r--r--contrib/ncurses/form/fty_ipv4.c8
-rw-r--r--contrib/ncurses/form/fty_num.c4
-rw-r--r--contrib/ncurses/form/fty_regex.c4
-rw-r--r--contrib/ncurses/include/Caps78
-rw-r--r--contrib/ncurses/include/MKterm.h.awk.in100
-rw-r--r--contrib/ncurses/include/Makefile.in6
-rw-r--r--contrib/ncurses/include/curses.h.in814
-rw-r--r--contrib/ncurses/include/headers3
-rw-r--r--contrib/ncurses/include/nc_panel.h6
-rw-r--r--contrib/ncurses/include/ncurses_defs5
-rw-r--r--contrib/ncurses/include/ncurses_dll.h41
-rw-r--r--contrib/ncurses/include/term_entry.h53
-rw-r--r--contrib/ncurses/include/termcap.h.in37
-rw-r--r--contrib/ncurses/include/tic.h92
-rw-r--r--contrib/ncurses/include/unctrl.h.in12
-rw-r--r--contrib/ncurses/man/curs_deleteln.3x4
-rw-r--r--contrib/ncurses/man/curs_getch.3x11
-rw-r--r--contrib/ncurses/man/curs_outopts.3x7
-rw-r--r--contrib/ncurses/man/curs_slk.3x4
-rw-r--r--contrib/ncurses/man/curs_termcap.3x21
-rw-r--r--contrib/ncurses/man/curs_terminfo.3x6
-rw-r--r--contrib/ncurses/man/ncurses.3x6
-rw-r--r--contrib/ncurses/man/terminfo.tail5
-rw-r--r--contrib/ncurses/menu/Makefile.in14
-rw-r--r--contrib/ncurses/menu/eti.h4
-rw-r--r--contrib/ncurses/menu/m_attribs.c8
-rw-r--r--contrib/ncurses/menu/m_cursor.c13
-rw-r--r--contrib/ncurses/menu/m_driver.c11
-rw-r--r--contrib/ncurses/menu/m_format.c10
-rw-r--r--contrib/ncurses/menu/m_global.c28
-rw-r--r--contrib/ncurses/menu/m_hook.c8
-rw-r--r--contrib/ncurses/menu/m_item_cur.c13
-rw-r--r--contrib/ncurses/menu/m_item_nam.c10
-rw-r--r--contrib/ncurses/menu/m_item_new.c16
-rw-r--r--contrib/ncurses/menu/m_item_opt.c16
-rw-r--r--contrib/ncurses/menu/m_item_top.c10
-rw-r--r--contrib/ncurses/menu/m_item_use.c10
-rw-r--r--contrib/ncurses/menu/m_item_val.c10
-rw-r--r--contrib/ncurses/menu/m_item_vis.c7
-rw-r--r--contrib/ncurses/menu/m_items.c13
-rw-r--r--contrib/ncurses/menu/m_new.c10
-rw-r--r--contrib/ncurses/menu/m_opts.c16
-rw-r--r--contrib/ncurses/menu/m_pad.c10
-rw-r--r--contrib/ncurses/menu/m_pattern.c12
-rw-r--r--contrib/ncurses/menu/m_post.c16
-rw-r--r--contrib/ncurses/menu/m_req_name.c10
-rw-r--r--contrib/ncurses/menu/m_scale.c7
-rw-r--r--contrib/ncurses/menu/m_spacing.c11
-rw-r--r--contrib/ncurses/menu/m_sub.c10
-rw-r--r--contrib/ncurses/menu/m_userptr.c10
-rw-r--r--contrib/ncurses/menu/m_win.c10
-rw-r--r--contrib/ncurses/menu/menu.h154
-rw-r--r--contrib/ncurses/menu/menu.priv.h26
-rwxr-xr-xcontrib/ncurses/misc/makellib11
-rwxr-xr-xcontrib/ncurses/misc/tdlint4
-rw-r--r--contrib/ncurses/misc/terminfo.src293
-rw-r--r--contrib/ncurses/mk-0th.awk6
-rw-r--r--contrib/ncurses/mk-1st.awk34
-rw-r--r--contrib/ncurses/mk-2nd.awk6
-rw-r--r--contrib/ncurses/ncurses/Makefile.in14
-rw-r--r--contrib/ncurses/ncurses/README2
-rw-r--r--contrib/ncurses/ncurses/SigAction.h16
-rw-r--r--contrib/ncurses/ncurses/base/MKkeyname.awk6
-rwxr-xr-xcontrib/ncurses/ncurses/base/MKlib_gen.sh10
-rw-r--r--contrib/ncurses/ncurses/base/MKunctrl.awk6
-rw-r--r--contrib/ncurses/ncurses/base/define_key.c43
-rw-r--r--contrib/ncurses/ncurses/base/keybound.c9
-rw-r--r--contrib/ncurses/ncurses/base/keyok.c49
-rw-r--r--contrib/ncurses/ncurses/base/lib_addch.c37
-rw-r--r--contrib/ncurses/ncurses/base/lib_addstr.c12
-rw-r--r--contrib/ncurses/ncurses/base/lib_beep.c36
-rw-r--r--contrib/ncurses/ncurses/base/lib_bkgd.c86
-rw-r--r--contrib/ncurses/ncurses/base/lib_box.c31
-rw-r--r--contrib/ncurses/ncurses/base/lib_chgat.c25
-rw-r--r--contrib/ncurses/ncurses/base/lib_clear.c19
-rw-r--r--contrib/ncurses/ncurses/base/lib_clearok.c21
-rw-r--r--contrib/ncurses/ncurses/base/lib_clrbot.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_clreol.c8
-rw-r--r--contrib/ncurses/ncurses/base/lib_color.c80
-rw-r--r--contrib/ncurses/ncurses/base/lib_colorset.c7
-rw-r--r--contrib/ncurses/ncurses/base/lib_delch.c39
-rw-r--r--contrib/ncurses/ncurses/base/lib_delwin.c48
-rw-r--r--contrib/ncurses/ncurses/base/lib_dft_fgbg.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_echo.c23
-rw-r--r--contrib/ncurses/ncurses/base/lib_endwin.c25
-rw-r--r--contrib/ncurses/ncurses/base/lib_erase.c42
-rw-r--r--contrib/ncurses/ncurses/base/lib_flash.c36
-rw-r--r--contrib/ncurses/ncurses/base/lib_freeall.c12
-rw-r--r--contrib/ncurses/ncurses/base/lib_getch.c21
-rw-r--r--contrib/ncurses/ncurses/base/lib_getstr.c245
-rw-r--r--contrib/ncurses/ncurses/base/lib_hline.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_immedok.c16
-rw-r--r--contrib/ncurses/ncurses/base/lib_inchstr.c26
-rw-r--r--contrib/ncurses/ncurses/base/lib_initscr.c55
-rw-r--r--contrib/ncurses/ncurses/base/lib_insch.c37
-rw-r--r--contrib/ncurses/ncurses/base/lib_insdel.c23
-rw-r--r--contrib/ncurses/ncurses/base/lib_insstr.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_instr.c39
-rw-r--r--contrib/ncurses/ncurses/base/lib_isendwin.c14
-rw-r--r--contrib/ncurses/ncurses/base/lib_leaveok.c21
-rw-r--r--contrib/ncurses/ncurses/base/lib_mouse.c19
-rw-r--r--contrib/ncurses/ncurses/base/lib_move.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_mvwin.c112
-rw-r--r--contrib/ncurses/ncurses/base/lib_newterm.c17
-rw-r--r--contrib/ncurses/ncurses/base/lib_newwin.c39
-rw-r--r--contrib/ncurses/ncurses/base/lib_nl.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_overlay.c170
-rw-r--r--contrib/ncurses/ncurses/base/lib_pad.c56
-rw-r--r--contrib/ncurses/ncurses/base/lib_printw.c99
-rw-r--r--contrib/ncurses/ncurses/base/lib_redrawln.c40
-rw-r--r--contrib/ncurses/ncurses/base/lib_refresh.c14
-rw-r--r--contrib/ncurses/ncurses/base/lib_restart.c7
-rw-r--r--contrib/ncurses/ncurses/base/lib_scanw.c83
-rw-r--r--contrib/ncurses/ncurses/base/lib_screen.c250
-rw-r--r--contrib/ncurses/ncurses/base/lib_scroll.c28
-rw-r--r--contrib/ncurses/ncurses/base/lib_scrollok.c21
-rw-r--r--contrib/ncurses/ncurses/base/lib_scrreg.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_set_term.c35
-rw-r--r--contrib/ncurses/ncurses/base/lib_slk.c244
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkatr_set.c27
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkatrof.c20
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkatron.c20
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkatrset.c20
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkattr.c18
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkclear.c35
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkcolor.c24
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkinit.c16
-rw-r--r--contrib/ncurses/ncurses/base/lib_slklab.c14
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkrefr.c110
-rw-r--r--contrib/ncurses/ncurses/base/lib_slkset.c94
-rw-r--r--contrib/ncurses/ncurses/base/lib_slktouch.c16
-rw-r--r--contrib/ncurses/ncurses/base/lib_touch.c58
-rw-r--r--contrib/ncurses/ncurses/base/lib_ungetch.c43
-rw-r--r--contrib/ncurses/ncurses/base/lib_vline.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_wattroff.c22
-rw-r--r--contrib/ncurses/ncurses/base/lib_wattron.c22
-rw-r--r--contrib/ncurses/ncurses/base/lib_winch.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_window.c292
-rw-r--r--contrib/ncurses/ncurses/base/memmove.c48
-rw-r--r--contrib/ncurses/ncurses/base/nc_panel.c8
-rw-r--r--contrib/ncurses/ncurses/base/resizeterm.c117
-rw-r--r--contrib/ncurses/ncurses/base/safe_sprintf.c345
-rw-r--r--contrib/ncurses/ncurses/base/sigaction.c86
-rw-r--r--contrib/ncurses/ncurses/base/tries.c142
-rw-r--r--contrib/ncurses/ncurses/base/version.c10
-rw-r--r--contrib/ncurses/ncurses/base/vsscanf.c53
-rw-r--r--contrib/ncurses/ncurses/base/wresize.c16
-rw-r--r--contrib/ncurses/ncurses/curses.priv.h183
-rw-r--r--contrib/ncurses/ncurses/llib-lncurses46
-rw-r--r--contrib/ncurses/ncurses/tinfo/MKcaptab.awk7
-rwxr-xr-xcontrib/ncurses/ncurses/tinfo/MKfallback.sh4
-rw-r--r--contrib/ncurses/ncurses/tinfo/MKnames.awk8
-rw-r--r--contrib/ncurses/ncurses/tinfo/access.c12
-rw-r--r--contrib/ncurses/ncurses/tinfo/add_tries.c6
-rw-r--r--contrib/ncurses/ncurses/tinfo/alloc_entry.c64
-rw-r--r--contrib/ncurses/ncurses/tinfo/alloc_ttype.c12
-rw-r--r--contrib/ncurses/ncurses/tinfo/captoinfo.c63
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_error.c127
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_expand.c260
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_hash.c362
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_parse.c101
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_scan.c232
-rw-r--r--contrib/ncurses/ncurses/tinfo/doalloc.c31
-rw-r--r--contrib/ncurses/ncurses/tinfo/free_ttype.c11
-rw-r--r--contrib/ncurses/ncurses/tinfo/getenv_num.c26
-rw-r--r--contrib/ncurses/ncurses/tinfo/home_terminfo.c4
-rw-r--r--contrib/ncurses/ncurses/tinfo/init_keytry.c38
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_acs.c210
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_baudrate.c14
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_cur_term.c46
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_data.c35
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_has_cap.c29
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_kernel.c72
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_longname.c19
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_napms.c4
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_options.c28
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_print.c33
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_raw.c16
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_setup.c49
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_termcap.c24
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_termname.c26
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tgoto.c39
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_ti.c8
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tparm.c32
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tputs.c38
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_ttyflags.c139
-rw-r--r--contrib/ncurses/ncurses/tinfo/make_keys.c154
-rw-r--r--contrib/ncurses/ncurses/tinfo/name_match.c79
-rw-r--r--contrib/ncurses/ncurses/tinfo/parse_entry.c99
-rw-r--r--contrib/ncurses/ncurses/tinfo/read_entry.c18
-rw-r--r--contrib/ncurses/ncurses/tinfo/read_termcap.c25
-rw-r--r--contrib/ncurses/ncurses/tinfo/setbuf.c58
-rw-r--r--contrib/ncurses/ncurses/tinfo/strings.c26
-rw-r--r--contrib/ncurses/ncurses/tinfo/write_entry.c30
-rw-r--r--contrib/ncurses/ncurses/trace/lib_trace.c40
-rw-r--r--contrib/ncurses/ncurses/trace/lib_traceatr.c23
-rw-r--r--contrib/ncurses/ncurses/trace/lib_tracebits.c22
-rw-r--r--contrib/ncurses/ncurses/trace/lib_tracechr.c18
-rw-r--r--contrib/ncurses/ncurses/trace/lib_tracedmp.c75
-rw-r--r--contrib/ncurses/ncurses/trace/lib_tracemse.c89
-rw-r--r--contrib/ncurses/ncurses/trace/trace_buf.c64
-rw-r--r--contrib/ncurses/ncurses/trace/trace_tries.c49
-rw-r--r--contrib/ncurses/ncurses/trace/trace_xnames.c19
-rwxr-xr-xcontrib/ncurses/ncurses/tty/MKexpanded.sh14
-rw-r--r--contrib/ncurses/ncurses/tty/hardscroll.c71
-rw-r--r--contrib/ncurses/ncurses/tty/hashmap.c256
-rw-r--r--contrib/ncurses/ncurses/tty/lib_mvcur.c62
-rw-r--r--contrib/ncurses/ncurses/tty/lib_tstp.c4
-rw-r--r--contrib/ncurses/ncurses/tty/lib_twait.c7
-rw-r--r--contrib/ncurses/ncurses/tty/lib_vidattr.c21
-rw-r--r--contrib/ncurses/ncurses/tty/tty_display.h30
-rw-r--r--contrib/ncurses/ncurses/tty/tty_input.h18
-rw-r--r--contrib/ncurses/ncurses/tty/tty_update.c53
-rw-r--r--contrib/ncurses/panel/Makefile.in13
-rw-r--r--contrib/ncurses/panel/p_above.c8
-rw-r--r--contrib/ncurses/panel/p_below.c8
-rw-r--r--contrib/ncurses/panel/p_bottom.c10
-rw-r--r--contrib/ncurses/panel/p_delete.c10
-rw-r--r--contrib/ncurses/panel/p_hidden.c8
-rw-r--r--contrib/ncurses/panel/p_hide.c10
-rw-r--r--contrib/ncurses/panel/p_move.c14
-rw-r--r--contrib/ncurses/panel/p_new.c8
-rw-r--r--contrib/ncurses/panel/p_replace.c14
-rw-r--r--contrib/ncurses/panel/p_show.c10
-rw-r--r--contrib/ncurses/panel/p_top.c8
-rw-r--r--contrib/ncurses/panel/p_update.c10
-rw-r--r--contrib/ncurses/panel/p_user.c13
-rw-r--r--contrib/ncurses/panel/p_win.c8
-rw-r--r--contrib/ncurses/panel/panel.c32
-rw-r--r--contrib/ncurses/panel/panel.h38
-rw-r--r--contrib/ncurses/panel/panel.priv.h32
-rw-r--r--contrib/ncurses/progs/Makefile.in37
-rw-r--r--contrib/ncurses/progs/dump_entry.c4
-rw-r--r--contrib/ncurses/progs/infocmp.c13
-rw-r--r--contrib/ncurses/progs/progs.priv.h6
-rw-r--r--contrib/ncurses/progs/tic.c38
-rw-r--r--contrib/ncurses/progs/tput.c6
-rw-r--r--contrib/ncurses/progs/tset.c16
-rw-r--r--contrib/ncurses/tack/Makefile.in21
-rw-r--r--contrib/ncurses/tack/ansi.c25
-rw-r--r--contrib/ncurses/tack/charset.c6
-rw-r--r--contrib/ncurses/tack/edit.c12
-rw-r--r--contrib/ncurses/tack/output.c12
-rw-r--r--contrib/ncurses/tack/tack.h10
-rw-r--r--contrib/ncurses/test/Makefile.in14
-rw-r--r--contrib/ncurses/test/bs.c812
-rw-r--r--contrib/ncurses/test/cardfile.c8
-rwxr-xr-xcontrib/ncurses/test/configure114
-rw-r--r--contrib/ncurses/test/configure.in8
-rw-r--r--contrib/ncurses/test/filter.c5
-rw-r--r--contrib/ncurses/test/gdc.c5
-rw-r--r--contrib/ncurses/test/hashtest.c314
-rw-r--r--contrib/ncurses/test/knight.c667
-rw-r--r--contrib/ncurses/test/lrtest.c27
-rw-r--r--contrib/ncurses/test/ncurses.c77
-rw-r--r--contrib/ncurses/test/newdemo.c492
-rw-r--r--contrib/ncurses/test/railroad.c7
-rw-r--r--contrib/ncurses/test/tclock.c26
-rw-r--r--contrib/ncurses/test/test.priv.h4
-rw-r--r--contrib/ncurses/test/testcurs.c8
-rw-r--r--contrib/ncurses/test/testscanw.c47
-rw-r--r--contrib/ncurses/test/view.c56
-rw-r--r--contrib/ncurses/test/worm.c7
335 files changed, 13793 insertions, 7982 deletions
diff --git a/contrib/ncurses/ANNOUNCE b/contrib/ncurses/ANNOUNCE
index 5ef8f3c2f963..7b5f4efa69ae 100644
--- a/contrib/ncurses/ANNOUNCE
+++ b/contrib/ncurses/ANNOUNCE
@@ -1,5 +1,5 @@
- Announcing ncurses 5.1
+ Announcing ncurses 5.2
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,102 +27,224 @@
Release Notes
- This release is designed to be upward compatible from ncurses 5.0;
- very few applications will require recompilation, depending on the
- platform. These are the highlights from the change-log since ncurses
- 5.0 release.
+ This release is designed to be upward compatible from ncurses 5.0 and
+ 5.1; very few applications will require recompilation, depending on
+ the platform. These are the highlights from the change-log since
+ ncurses 5.1 release.
Interface changes:
- * made the extended terminal capabilities
- (configure --enable-tcap-names) a standard feature (though the
- configure script can disable it, it is built by default).
- * removed the trace() function and related trace support from the
- production library. This is the only interface change that may
- cause problems with existing applications linked to shared
- libraries, since not all platforms use the minor version number.
- * explicitly initialized to zero several data items which were
- implicitly initialized, e.g., cur_term. If not explicitly
- initialized, their storage type is C (common), and causes problems
- linking on some platforms.
- * modified curses.h.in, undef'ing some symbols to avoid conflict
- with C++ STL.
-
- New features:
- * added a new extension, assume_default_colors() to provide better
- control over the use of default colors. This is the principal
- visible difference between ncurses 5.1 and preceding versions. The
- new extension allows an application to specify what colors pair 0
- uses.
- NOTE: Pair 0 defaults to white on black unless you have invoked
- use_default_colors() or set it via assume_default_colors(). An
- application that calls start_colors() without setting the
- background color will consistently have a black background no
- matter what color your terminal's background actually is.
- * made several fixes to the terminfo-to-termcap conversion, and have
- been using the generated termcaps without further hand-tuning.
- This builds on the extension use_extended_names() by adding
- "obsolete" termcap strings to terminfo.src
- + modified tic so that if extended names (i.e.,
- configure --enable-tcap-names) are active, then tic -x will
- also write "obsolete" capabilities that are present in the
- terminfo source.
- + added screen's AX capability (for ECMA SGR 39 and 49) to
- applicable terminfo entries, use presence of this as a check
- for a small improvement in setting default colors.
- + add -a option to tic and infocmp, which retains commented-out
- capabilities during source translation/comparison, e.g.,
- captoinfo and infotocap.
- * implemented limited support for UTF-8, useful with XFree86 xterm:
- + if the configure --enable-widec option is given, append 'w'
- to names of the generated libraries (e.g., libncursesw.so) to
- avoid conflict with existing ncurses libraries.
- + add a simple UTF-8 output driver to the experimental
- wide-character support. If any of the environment variables
- LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this
- driver will be used to translate the output to UTF-8.
- + modified view.c to make a rudimentary viewer of UTF-8 text.
- * modify raw() and noraw() to clear/restore IEXTEN flag which
- affects stty lnext on systems such as FreeBSD
- * reordered tests during mouse initialization to allow for gpm to
- run in xterm, or for xterm to be used under OS/2 EMX. Also dropped
- test for $DISPLAY in favor of the terminfo capability kmous=\E[M
- or if $TERM environment variable contains "xterm".
- * added configure option --with-manpage-symlinks, which provides for
- fully indexing manpage entries by making symbolic links for the
- aliases.
- * changed unctrl() to render C1 characters (128-159) as ~@, ~A, etc.
- * add experimental configure option --enable-colorfgbg to check for
- $COLORTERM variable as set by rxvt/aterm/Eterm.
- * made the infocmp -F option less verbose.
- * dropped support for gnat 3.10 (gnat 3.12 is current).
+ * change type of ospeed variable back to short to match its use in
+ legacy applications. It was altered after ncurses 4.2 to speed_t
+ to repair a type mismatch which was introduced after 1.9.4 in
+ 1995. The principal users of termcap continued to use short, which
+ is not the same size.
+ NOTE: A few applications will have to be recompiled (about 1% of
+ the programs in a typical Linux distribution, 10% of the programs
+ that use ncurses). These are easy to identify with nm or strings.
+ * remove a private function _nc_can_clear_with(), which was built
+ with the configure --enable-expanded option but not used.
+ * add several private functions (prefixed with "_nc_") for tracing
+ chtype values in the debug library, and for better access and
+ buffer limit checking.
+
+ New features and improvements:
+ * rewrote tgoto() to make it better support existing termcap
+ applications which use hardcoded strings rather than obtain all of
+ their information from the termcap file. If the string does not
+ appear to be a terminfo string (i.e., does not refer to a "%p"
+ parameter, or terminfo-style padding), and termcap support is
+ configured, tgoto() will interpret it as termcap. Otherwise, as
+ before, it will use tparm().
+ * to ensure that the tgoto() changes work properly, added checks to
+ tic which report capabilities that do not reference the expected
+ number of parameters.
+ * new configure script options:
+ + option --disable-root-environ adds runtime checks which tell
+ ncurses to disregard $TERMINFO and similar environment
+ variables if the current user is root, or running
+ setuid/setgid.
+ + option --disable-assumed-color allows you to use the pre-5.1
+ convention of default colors used for color-pair 0 to be
+ configured (see assume_default_colors()).
+ + implement configure script options that transform installed
+ program names, e.g., --program-prefix, including the manpage
+ names and cross references.
+ + option --with-database allows you to specify a different
+ terminfo source-file to install. On OS/2 EMX, the default is
+ misc/emx.src, otherwise misc/terminfo.src
+ + option --with-default-terminfo-dir allows you to specify the
+ default terminfo database directory.
+ + option --with-libtool allows you to build with libtool.
+ NOTE: libtool uses a different notation for numbering shared
+ library versions from the existing ncurses configuration.
+ + option --with-manpage-tbl causes the manpages to be
+ preprocessed by tbl(1) prior to installation,
+ + option --without-curses-h causes the installation process to
+ install curses.h as ncurses.h and make appropriate changes to
+ headers and manpages.
+ * modified configure script options:
+ + change symbol used by the --install-prefix configure option
+ from INSTALL_PREFIX to DESTDIR (the latter has become common
+ usage although the name is misleading).
+ + modify ld -rpath options (e.g., Linux, and Solaris) to use an
+ absolute pathname for the build tree's lib directory,
+ avoiding confusion with directories relative to the current
+ one with the installed programs.
+ + modified misc/run_tic.in to use tic -o, to eliminate
+ dependency on $TERMINFO variable for installs.
+ * terminfo database:
+ + updated xterm terminfo entries to match XFree86 xterm patch
+ #146.
+ + added amiga-vnc, Matrix Orbital, and QNX qansi to
+ misc/terminfo.src.
+ + added os2 entry to misc/emx.src.
+ + add S0 and E0 extensions to screen's terminfo entry since
+ otherwise the FreeBSD port makes it pass termcap equivalents
+ to tgoto, which would be misinterpreted by older versions of
+ ncurses.
+ * improvements to program usability:
+ + modify programs to use curses_version() string to report the
+ version of ncurses with which they are compiled rather than
+ the NCURSES_VERSION string. The function returns the patch
+ level in addition to the major and minor version numbers.
+ + modify tput program so it can be renamed or invoked via a
+ link as 'reset' or 'init', producing the same effect as
+ tput reset or tput init.
+ + add error checking to infocmp's -v and -m options to ensure
+ that the option value is indeed a number.
+ * improved performance:
+ + replace a lookup table in lib_vidattr.c used to decode
+ no_color_video with a logic expression which is faster.
Major bug fixes:
- * modified infocmp -e, -E options to ensure that generated
- fallback.c type for Booleans agrees with term.h
- * documented a special case of incompatiblity between ncurses 4.2
- and 5.0, added a section for this in INSTALL.
- * corrected tests for file-descriptors in OS/2 EMX mouse support. A
- negative value could be used by FD_SET, causing the select() call
- to wait indefinitely.
- * made 'tput flash' work properly for xterm by flushing output in
- delay_output() when using napms(), and modifying xterm's terminfo
- to specify no padding character. Otherwise, xterm's reported baud
- rate could mislead ncurses into producing too few padding
- characters.
- * modified lib_addch.c to allow repeated update to the lower-right
- corner, rather than displaying only the first character written
- until the cursor is moved. Recent versions of SVr4 curses can
- update the lower-right corner, and behave this way.
- * modified echo() behavior of getch() to match Solaris curses for
- carriage return and backspace (reported by Neil Zanella).
- * corrected offsets used for subwindows in wresize()
- * modified configure script so AC_MSG_ERROR is temporarily defined
- to a warning in AC_PROG_CXX to make it recover from a missing C++
- compiler without requiring user to add --without-cxx option
- * corrected logic in lib_twait.c as used by lib_mouse.c for GPM
- mouse support when poll() is used rather than select().
- * made several fixes for buffer overflows, unchecked recursion,
- improvements in performance, etc. See the NEWS file for details.
+ * correct manlinks.sed script introduced in ncurses 5.1 to avoid
+ using ERE "\+", which is not understood by standard versions of
+ sed. This happens to work with GNU sed, but is not portable, and
+ was the initial motivation for this release.
+ * remove "hpux10.*" case from CF_SHARED_OPTS configure script macro.
+ This differed from the "hpux*" case by using reversed symbolic
+ links, which made the 5.1 version not match the configuration of
+ 5.0 shared libraries.
+ * guard against corrupt terminfo data:
+ + modify tparm() to disallow arithmetic on strings, analyze the
+ varargs list to read strings as strings and numbers as
+ numbers.
+ + modify tparm()'s internal function spop() to treat a null
+ pointer as an empty string.
+ + modify parse_format() in lib_tparm.c to ignore precision if
+ it is longer than 10000.
+ + rewrote limit checks in lib_mvcur.c using new functions
+ _nc_safe_strcat(), etc. Made other related changes to check
+ lengths used for strcat() and strcpy().
+ * corrections to screen optimization:
+ + added special case in lib_vidattr.c to reset underline and
+ standout for devices that have no sgr0 defined.
+ + change handling of non_dest_scroll_region in tty_update.c to
+ clear text after it is shifted in rather than before shifting
+ out. Also correct row computation.
+ + modify rs2 capability in xterm-r6 and similar entries where
+ cursor save/restore bracketed the sequence for resetting
+ video attributes. The cursor restore would undo that.
+ * UTF-8 support:
+ + when checking LC_ALL, LC_CTYPE, and LANG environment
+ variables for UTF-8 locale, ignore those which are set to an
+ empty value, as per SUSV2.
+ + encode 0xFFFD in UTF-8 with 3 bytes, not 2.
+ + modify _nc_utf8_outch() to avoid sign-extension when checking
+ for out-of-range value.
+ * other library fixes:
+ + added checks for an empty $HOME environment variable, to
+ avoid retrieving terminfo descriptions from ./.terminfo .
+ + change functions _nc_parse_entry() and postprocess_termcap()
+ to avoid using strtok(), because it is non-reentrant.
+ + initialize fds[] array to 0's in _nc_timed_wait(); apparently
+ poll() only sets the revents members of that array when there
+ is activity corresponding to the related file.
+ + add a check for null pointer in Make_Enum_Type().
+ + fix a heap problem with the c++ binding.
+ + correct missing includes for <string.h> in several places,
+ including the C++ binding. This is not noted by gcc unless we
+ use the -fno-builtin option.
+ * several fixes for tic:
+ + add a check for empty buffers returned by fgets() in
+ comp_scan.c next_char() function, in case tic is run on a
+ non-text file (fixes a core dump).
+ + modify tic to verify that its inputs are really files, in
+ case someone tries to read a directory (or /dev/zero).
+ + correct an uninitialized parameter to open_tempfile() in
+ tic.c which made "tic -I" give an ambiguous error message
+ about tmpnam.
+ + correct logic in adjust_cancels(), which did not check both
+ alternatives when reclassifying an extended name between
+ boolean, number and string, causing an infinite loop in tic.
+ * using new checks in tic for parameter counts in capability
+ strings, found/fixed several errors both in the terminfo database
+ and in the include/Caps file.
+ + modified several terminfo capability strings, including the
+ definitions for setaf, setab, in include/Caps to indicate
+ that the entries are parameterized. This information is used
+ to tell which strings are translated when converting to
+ termcap. This fixes a problem where the generated termcap
+ would contain a spurious "%p1" for the terminfo "%p1%d".
+ + correct parameter counts in include/Caps for dclk as well as
+ some printer-specific capabilities: csnm, defc, scs, scsd,
+ smgtp, smglp.
+ * various fixes for install scripts used to support configure
+ --srcdir and --with-install-prefix.
+ * correct several mismatches between manpage filename and ".TH"
+ directives, renaming dft_fgbg.3x to default_colors.3x and
+ menu_attribs.3x to menu_attributes.3x.
+
+ Portability:
+ * configure script:
+ + newer config.guess, config.sub, including changes to support
+ OS/2 EMX. The configure script for OS/2 EMX still relies on a
+ patch since there is no (working) support for that platform
+ in the main autoconf distribution.
+ + make configure script checks on variables $GCC and $GXX
+ consistently compare against 'yes' rather than test if they
+ are nonnull, since either may be set to the corresponding
+ name of the C or C++ compiler.
+ + change configure script to use AC_CANONICAL_SYSTEM rather
+ than AC_CANONICAL_HOST, which means that configure --target
+ will set a default program-prefix.
+ + modify the check for big-core to force a couple of memory
+ accesses, which may work as needed for older/less-capable
+ machines (if not, there's still the explicit configure
+ option).
+ + modify configure test for tcgetattr() to allow for old
+ implementations, e.g., on BeOS, which only defined it as a
+ macro.
+ + add configure check for filesystems (such as OS/2 EMX) which
+ do not distinguish between upper/lowercase filenames, use
+ this to fix tags rules in makefiles.
+ + add MKncurses_def.sh to generate fallback definitions for
+ ncurses_cfg.h, to quiet gcc -Wundef warnings, modified
+ ifdef's in code to consistently use "#if" rather than
+ "#ifdef".
+ + change most remaining unquoted parameters of test in
+ configure script to use quotes, for instance fixing a problem
+ in the --disable-database option.
+ + modify scripts so that "make install.data" works on OS/2 EMX.
+ + modify scripts and makefiles so the Ada95 directory builds on
+ OS/2 EMX.
+ * library:
+ + replaced case-statement in _nc_tracebits() for CSIZE with a
+ table to simplify working around implementations that define
+ random combinations of the related macros to zero.
+ + improved OS/2 mouse support by retrying as a 2-button mouse
+ if code fails to set up a 3-button mouse.
+ + added private entrypoint _nc_basename(), used to consolidate
+ related code in progs, as well as accommodating OS/2 EMX
+ pathnames.
+ + alter definition of NCURSES_CONST to make it non-empty.
+ + redefine 'TEXT' in menu.h for AMIGA, since it is reported to
+ have an (unspecified) symbol conflict.
+ * programs:
+ + modified progs/tset.c and tack/sysdep.c to build with sgttyb
+ interface if neither termio or termios is available. Tested
+ this with FreeBSD 2.1.5 (which does have termios - but the
+ sgttyb does work).
Features of Ncurses
@@ -344,7 +466,7 @@ References
5. http://dickey.his.com/ded/ded.html
6. http://dickey.his.com/dialog/dialog.html
7. http://lynx.isc.org/release/
- 8. file://localhost/usr/build/ncurses/ncurses-5.1-20000704/doc/html/www.gnome.org/mc/
+ 8. file://localhost/usr/build/ncurses/ncurses-5.2-20001021/doc/html/www.gnome.org/mc/
9. http://www.mutt.org/
10. http://www.ncftp.com/
11. http://www.bostic.com/vi/
diff --git a/contrib/ncurses/INSTALL b/contrib/ncurses/INSTALL
index ab2dc74c56c1..591738bf64e9 100644
--- a/contrib/ncurses/INSTALL
+++ b/contrib/ncurses/INSTALL
@@ -1,4 +1,4 @@
--- $Id: INSTALL,v 1.45 2000/10/08 02:17:57 tom Exp $
+-- $Id: INSTALL,v 1.47 2000/11/05 01:57:24 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@@ -104,6 +104,8 @@ INSTALLATION PROCEDURE:
libncurses_p.a (profile)
+ libncurses.la (libtool)
+
If you do not specify any models, the normal and debug libraries will be
configured. Typing `configure' with no arguments is equivalent to:
@@ -126,6 +128,13 @@ INSTALLATION PROCEDURE:
and SunOS with gcc, but more work needs to be done to make shared libraries
work on other systems.
+ If you have libtool installed, you can type
+
+ ./configure --with-libtool
+
+ to generate the appropriate static and/or shared libraries for your
+ platform using libtool.
+
You can make curses and terminfo fall back to an existing file of termcap
definitions by configuring with --enable-termcap. If you do this, the
library will search /etc/termcap before the terminfo database, and will
@@ -176,7 +185,8 @@ INSTALLATION PROCEDURE:
The terminfo(5) manual page must be preprocessed with tbl(1) before
being formatted by nroff(1). Modern man(1) implementations tend to do
this by default, but you may want to look at your version's manual page
- to be sure.
+ to be sure. You may also install the manual pages after preprocessing
+ with tbl(1) by specifying the configure option --with-manpage-tbl.
If the system already has a curses library that you need to keep using
for some bizarre binary-compatibility reason, you'll need to distinguish
@@ -494,6 +504,10 @@ SUMMARY OF CONFIGURE OPTIONS:
NOTE: a few systems build shared libraries with fixed pathnames; this
option probably will not work for those configurations.
+ --with-libtool
+ Generate libraries with libtool. If this option is selected, then
+ it overrides all other library model specifications.
+
--with-manpage-format=XXX
Tell the configure script how you would like to install man-pages. The
option value must be one of these: gzip, compress, BSDI, normal,
@@ -513,6 +527,24 @@ SUMMARY OF CONFIGURE OPTIONS:
this on systems that do not support symbolic links will result in
copying the man-page for each alias.
+ --with-manpage-tbl
+ Tell the configure script that you with to preprocess the manpages
+ by running them through tbl to generate tables understandable by
+ nroff.
+
+ --with-ospeed=TYPE
+ Override type of ospeed variable, which is part of the termcap
+ compatibility interface. In termcap, this is a 'short', which works
+ for a wide range of baudrates because ospeed is not the actual speed
+ but the encoded value, e.g., B9600 would be a small number such as 13.
+ However the encoding scheme originally allowed for values "only" up to
+ 38400bd. A newer set of definitions past 38400bd is not encoded as
+ compactly, and is not guaranteed to fit into a short (see the function
+ cfgetospeed(), which returns a speed_t for this reason). In practice,
+ applications that required knowledge of the ospeed variable, i.e.,
+ those using termcap, do not use the higher speeds. Your application
+ (or system, in general) may or may not.
+
--with-normal
Generate normal (i.e., static) libraries (default).
@@ -558,6 +590,11 @@ SUMMARY OF CONFIGURE OPTIONS:
Suppress the configure script's check for Ada95, do not build the
Ada95 binding and related demo.
+ --without-curses-h
+ Don't install the ncurses header with the name "curses.h". Rather,
+ install as "ncurses.h" and modify the installed headers and manpages
+ accordingly.
+
--without-cxx
XSI curses declares "bool" as part of the interface. C++ also declares
"bool". Neither specifies the size and type of booleans, but both
@@ -592,6 +629,12 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
you may encounter when building a system with different versions of
ncurses:
+ 5.2 (October 21, 2000)
+ Interface changes:
+
+ + revert termcap ospeed variable to 'short' (see discussion of the
+ --with-ospeed configure option).
+
5.1 (July 8, 2000)
Interface changes:
diff --git a/contrib/ncurses/MANIFEST b/contrib/ncurses/MANIFEST
index 6e2118596c59..f958ac420e74 100644
--- a/contrib/ncurses/MANIFEST
+++ b/contrib/ncurses/MANIFEST
@@ -18,10 +18,52 @@
./Ada95/gen/terminal_interface-curses-mouse.ads.m4
./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
./Ada95/gen/terminal_interface-curses-panels.ads.m4
+./Ada95/gen/terminal_interface-curses-trace.ads.m4
./Ada95/gen/terminal_interface-curses.ads.m4
./Ada95/samples/Makefile.in
./Ada95/samples/README
./Ada95/samples/explain.txt
+./Ada95/samples/ncurses.adb
+./Ada95/samples/ncurses2-acs_and_scroll.adb
+./Ada95/samples/ncurses2-acs_and_scroll.ads
+./Ada95/samples/ncurses2-acs_display.adb
+./Ada95/samples/ncurses2-acs_display.ads
+./Ada95/samples/ncurses2-attr_test.adb
+./Ada95/samples/ncurses2-attr_test.ads
+./Ada95/samples/ncurses2-color_edit.adb
+./Ada95/samples/ncurses2-color_edit.ads
+./Ada95/samples/ncurses2-color_test.adb
+./Ada95/samples/ncurses2-color_test.ads
+./Ada95/samples/ncurses2-demo_forms.adb
+./Ada95/samples/ncurses2-demo_forms.ads
+./Ada95/samples/ncurses2-demo_pad.adb
+./Ada95/samples/ncurses2-demo_pad.ads
+./Ada95/samples/ncurses2-demo_panels.adb
+./Ada95/samples/ncurses2-demo_panels.ads
+./Ada95/samples/ncurses2-flushinp_test.adb
+./Ada95/samples/ncurses2-flushinp_test.ads
+./Ada95/samples/ncurses2-genericputs.adb
+./Ada95/samples/ncurses2-genericputs.ads
+./Ada95/samples/ncurses2-getch.ads
+./Ada95/samples/ncurses2-getch_test.adb
+./Ada95/samples/ncurses2-getch_test.ads
+./Ada95/samples/ncurses2-getopt.adb
+./Ada95/samples/ncurses2-getopt.ads
+./Ada95/samples/ncurses2-m.adb
+./Ada95/samples/ncurses2-m.ads
+./Ada95/samples/ncurses2-menu_test.adb
+./Ada95/samples/ncurses2-menu_test.ads
+./Ada95/samples/ncurses2-overlap_test.adb
+./Ada95/samples/ncurses2-overlap_test.ads
+./Ada95/samples/ncurses2-slk_test.adb
+./Ada95/samples/ncurses2-slk_test.ads
+./Ada95/samples/ncurses2-test_sgr_attributes.adb
+./Ada95/samples/ncurses2-test_sgr_attributes.ads
+./Ada95/samples/ncurses2-trace_set.adb
+./Ada95/samples/ncurses2-trace_set.ads
+./Ada95/samples/ncurses2-util.adb
+./Ada95/samples/ncurses2-util.ads
+./Ada95/samples/ncurses2.ads
./Ada95/samples/rain.adb
./Ada95/samples/rain.ads
./Ada95/samples/sample-curses_demo-attributes.adb
@@ -95,6 +137,12 @@
./Ada95/src/terminal_interface-curses-mouse.adb
./Ada95/src/terminal_interface-curses-panels-user_data.adb
./Ada95/src/terminal_interface-curses-panels.adb
+./Ada95/src/terminal_interface-curses-putwin.adb
+./Ada95/src/terminal_interface-curses-putwin.ads
+./Ada95/src/terminal_interface-curses-termcap.adb
+./Ada95/src/terminal_interface-curses-termcap.ads
+./Ada95/src/terminal_interface-curses-terminfo.adb
+./Ada95/src/terminal_interface-curses-terminfo.ads
./Ada95/src/terminal_interface-curses-text_io-aux.adb
./Ada95/src/terminal_interface-curses-text_io-aux.ads
./Ada95/src/terminal_interface-curses-text_io-complex_io.adb
@@ -113,6 +161,7 @@
./Ada95/src/terminal_interface-curses-text_io-modular_io.ads
./Ada95/src/terminal_interface-curses-text_io.adb
./Ada95/src/terminal_interface-curses-text_io.ads
+./Ada95/src/terminal_interface-curses-trace.adb_p
./Ada95/src/terminal_interface-curses.adb
./Ada95/src/terminal_interface.ads
./INSTALL
@@ -229,6 +278,12 @@
./doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm
./doc/html/ada/terminal_interface-curses-panels__adb.htm
./doc/html/ada/terminal_interface-curses-panels__ads.htm
+./doc/html/ada/terminal_interface-curses-putwin__adb.htm
+./doc/html/ada/terminal_interface-curses-putwin__ads.htm
+./doc/html/ada/terminal_interface-curses-termcap__adb.htm
+./doc/html/ada/terminal_interface-curses-termcap__ads.htm
+./doc/html/ada/terminal_interface-curses-terminfo__adb.htm
+./doc/html/ada/terminal_interface-curses-terminfo__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm
@@ -247,6 +302,8 @@
./doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io__ads.htm
+./doc/html/ada/terminal_interface-curses-trace__adb.htm
+./doc/html/ada/terminal_interface-curses-trace__ads.htm
./doc/html/ada/terminal_interface-curses__adb.htm
./doc/html/ada/terminal_interface-curses__ads.htm
./doc/html/ada/terminal_interface__ads.htm
@@ -297,8 +354,8 @@
./doc/html/man/curs_trace.3x.html
./doc/html/man/curs_util.3x.html
./doc/html/man/curs_window.3x.html
+./doc/html/man/default_colors.3x.html
./doc/html/man/define_key.3x.html
-./doc/html/man/dft_fgbg.3x.html
./doc/html/man/form.3x.html
./doc/html/man/form_cursor.3x.html
./doc/html/man/form_data.3x.html
@@ -327,7 +384,7 @@
./doc/html/man/keybound.3x.html
./doc/html/man/keyok.3x.html
./doc/html/man/menu.3x.html
-./doc/html/man/menu_attribs.3x.html
+./doc/html/man/menu_attributes.3x.html
./doc/html/man/menu_cursor.3x.html
./doc/html/man/menu_driver.3x.html
./doc/html/man/menu_format.3x.html
@@ -422,6 +479,7 @@
./include/nc_panel.h
./include/ncurses_cfg.hin
./include/ncurses_defs
+./include/ncurses_dll.h
./include/term_entry.h
./include/termcap.h.in
./include/tic.h
diff --git a/contrib/ncurses/NEWS b/contrib/ncurses/NEWS
index 7b7022ca097a..099c5a7f07d5 100644
--- a/contrib/ncurses/NEWS
+++ b/contrib/ncurses/NEWS
@@ -1,4 +1,4 @@
--- $Id: NEWS,v 1.599 2000/10/10 01:02:11 tom Exp $
+-- $Id: NEWS,v 1.626 2001/05/13 00:11:58 tom Exp $
This is a log of changes that ncurses has gone through since Zeyd started
working with Pavel Curtis' original work, pcurses, in 1992.
@@ -6,6 +6,296 @@ working with Pavel Curtis' original work, pcurses, in 1992.
Changes through 1.9.9e are recorded by Zeyd M. Ben-Halim.
Changes since 1.9.9e are recorded by Thomas Dickey.
+20010512
+ + modify test/ncurses.c to work with xterm-256color, which has fewer
+ color pairs than colors*colors (report by David Ellement
+ <ellement@sdd.hp.com>).
+
+20010505
+ + corrected screen.xterm-xfree86 entry.
+ + update comment in Caps regarding IBM (AIX) function-key definitions.
+
+20010421
+ + modify c++/Makefile.in to link with libncurses++w.a when configured
+ for wide-characters (patch by Sven Verdoolaege).
+ + add check in _nc_trace_buf() to refrain from freeing a null pointer.
+ + improve CF_PROG_INSTALL macro using CF_DIRNAME.
+ + update config.guess, config.sub from autoconf 2.49e (alpha).
+
+20010414
+ + add secondary check in tic.c, similar_sgr() to see if the reason
+ for mismatch was that the individual capabilities used a time-delay
+ while sgr did not. Used this to cleanup mismatches, e.g., in vt100,
+ and remove time-delay from Apple_Terminal entries.
+ + add Apple_Terminal terminfo entries (Benjamin C W Sittler
+ <bsittler@iname.com>).
+ + correct definitions of shifted editing keys for xterm-xfree86 -TD
+ + fix a bug in test/bs.c from 20010407 (patch by Erik Sigra).
+ + prevent relative_move() from doing an overwrite if it detects 8-bit
+ characters when configured for UTF-8 (reported by Sven Verdoolaege
+ <skimo@kotnet.org>).
+
+20010407
+ + add configure checks for strstream.h vscan function, and similar
+ stdio-based function which may be used in C++ binding for gcc 3.0
+ (reports by George Goffe, Lars Hecking, Mike Castle).
+ + rewrite parts of configure.in which used changequote(). That feature
+ is broken in the latest autoconf alphas (e.g., 2.49d).
+ + add a missing pathname for ncurses_dll.h, needed when building in
+ a directory outside the source tree (patch by Sven Verdoolaege
+ <skimo@kotnet.org>).
+ > fix 2 bugs in test/bs.c (patch by Erik Sigra <sigra@home.se>):
+ + no ships were ever placed in the last row or in the last column.
+ This made the game very easy to win, because you never had to waste
+ any shots there, but the computer did.
+ + the squares around a sunken ship that belonged to the player were not
+ displayed as already hit by the computer, like it does for the
+ player.
+
+20010331
+ + add some examples of customizing screen's terminfo:
+ screen.xterm-xfree86, screen.xterm-r6, screen.teraterm -TD
+ + modify screen's terminfo entry to match the khome/kend in screen
+ 3.09.08 (Debian bug report #92215).
+ + correct a memory leak in forms library (report by Stefan Vogtner
+ <stefan@vogtner.de>, patch by Juergen Pfeifer).
+
+20010324
+ + change symbols used to guard against repeated includes to begin
+ consistently with "NCURSES_" rather than a leading underscore. There
+ are other symbols defined in the header files which begin with a
+ leading underscore, but they are part of the legacy interface.
+ + reorder includes in c++ binding so that rcs identifiers can be
+ compiled-in.
+ + add .cc.ii rule to c++ makefile, to get preprocessor output for
+ debugging.
+ + correct configure script handling of @keyword@ substitutions when the
+ --with-manpage-renames option is given (cf: 20000715, fixes Debian
+ bug #89939).
+ + report stack underflow/overflow in tparm() when tic -cv option is
+ given.
+ + remove spurious "%|" operator from xterm-xfree86 terminfo entry,
+ (reported by Adam Costello <amc@cs.berkeley.edu>, Debian bug #89222).
+
+20010310
+ + cleanup of newdemo.c, fixing some ambiguous expressions noted by gcc
+ 2.95.2, and correcting some conflicting color pair initializations.
+ + add missing copyright notice for cursesw.h
+ + review, make minor fixes for use of '::' for referring to C-language
+ interface from C++ binding.
+ + modify configure check for g++ library slightly to accommodate
+ nonstandard version number, e.g., <vendor>-2.7 (report by Ronald Ho
+ <rho@mipos2.intel.com>).
+ + add configure check for c++ <sstream> header, replace hardcoded
+ ifdef.
+ + workaround for pre-release of gcc 3.0 libstdc++, which has dropped
+ vscan from strstreambuf to follow standard, use wrapper for C vscanf
+ instead (report by George Goffe <grgoffe@excite.com> and Matt Taggart
+ <taggart@carmen.fc.hp.com>, fixes Debian .
+
+20010303
+ + modify interface of _nc_get_token() to pass 'silent' parameter to it,
+ to make quieter loading of /etc/termcap (patch by Todd C Miller).
+ + correct a few typos in curs_slk.3x and curs_outopts.3x manpages
+ (patch by Todd C Miller).
+
+20010224
+ + compiler-warning fixes (reported by Nelson Beebe).
+
+20010210
+ + modify screen terminfo entry to use new 3.9.8 feature allowing xterm
+ mouse controls -TD
+
+20010203
+ + broaden patterns used to match OS/2 EMX in configure script to cover
+ variant used in newer config.guess/config.sub
+ + remove changequote() calls from configure script, since this feature
+ is broken in the autoconf 2.49c alpha, maintainers decline to fix.
+ + remove macro callPutChar() from tty_update.c, since this is no longer
+ needed (reported by Philippe Blain).
+ + add a null-pointer check in tic.c to handle the case when the input
+ file is really empty. Modify the next_char() function in comp_scan.c
+ to allow arbitrarily long lines, and incidentally supply a newline to
+ files that do not end in a newline. These changes improve tic's
+ recovery from attempts to read binary files, e.g., its output from
+ the terminfo database (reported by Bernhard Rosenkraenzer).
+
+20010127
+ + revert change to c++/demo.cc from 20001209, which changed definition
+ of main() apparently to accommodate cygwin linker, but broke the demo
+ program.
+ + workaround for broken egcs 2.91.66 which calls member functions
+ (i.e., lines() and colors() of NCursesWindow before calling its
+ constructor. Add calls to initialize() in a few constructors which
+ did not do this already.
+ + use the GNAT preprocessor to make the necessary switch between TRACE
+ and NO_TRACE configurations (patch by Juergen Pfeifer).
+ > patches by Bernhard Rosenkraenzer:
+ + modify kterm terminfo entry to use SCS sequence to support alternate
+ character set (it does not work with SI/SO).
+ + --with-ospeed=something didn't work. configure.in checked for a
+ $enableval where it should check for $withval. Also,
+ ncurses/llib-lncurses still had a hardcoded short.
+
+20010114
+ + correction to my merge of Tom Riddle's patch that broke tic in some
+ conditions (reported by Enoch Wexler <enoch@wexler.co.il>) -TD
+
+20010113
+ + modify view.c to test halfdelay(). Like other tests, this recognizes
+ the 's' and space commands for stopping/starting polled input, shows
+ a freerunning clock in the header. If given a parameter to 's', that
+ makes view.c use halfdelay() with that parameter rather than
+ nodelay().
+ + fix to allow compile with the experimental configure option
+ --disable-hashmap.
+ + modify postprocess_termcap() to avoid overwriting key_backspace,
+ key_left, key_down when processing a non-base entry (report/patch by
+ Tom Riddle).
+ + modify _nc_wrap_entry(), adding option to reallocate the string
+ table, needed in _nc_merge_entry() when merging termcap entries.
+ (adapted from report/patch by Tom Riddle <ftr@oracom.com>).
+ + modify a few configure script macros to keep $CFLAGS used only for
+ compiler options, preprocessor options in $CPPFLAGS.
+
+20001230
+ + correct marker positions in lrtest.c after receiving a sigwinch.
+ + fix ifdef's in ncurses.c to build against pre-5.2 for testing.
+ + fixes to tclock for resizing behavior, redundant computation (report
+ and patch by A M Kuchling <akuchlin@mems-exchange.org>).
+
+20001216
+ + improved scoansi terminfo entry -TD
+ + modify configure script and makefile in Ada95/src to compile a stub
+ for the trace functions when ncurses does not provide those.
+
+20001209
+ + add ncurses_dll.h and related definitions to support generating DLL's
+ with cygwin (adapted from a patch by Charles Wilson
+ <cwilson@ece.gatech.edu>, changed NCURSES_EXPORT macro to make it
+ work with 'indent').
+
+20001202
+ + correct prototypes for some functions in curs_termcap.3x, matching
+ termcap.h, which matches X/Open.
+ > patch by Juergen Pfeifer:
+ + a revised version of the Ada enhancements sent in by "H.
+ Nanosecond", aka Eugene V. Melaragno <aldomel@ix.netcom.com>. This
+ patch includes
+ - small fixes to the existing ncurses binding
+ - addition of some more low-level functions to the binding, including
+ termcap and terminfo functions
+ - An Ada implementation of the "ncurses" test application originally
+ written in C.
+
+20001125
+ + modify logic in lib_setup.c to allow either lines or columns value
+ from terminfo to be used if the screen size cannot be determined
+ dynamically rather than requiring both (patch by Ehud Karni
+ <ehud@unix.simonwiesel.co.il>).
+ + add check in lib_tgoto.c's is_termcap() function to reject null or
+ empty strings (reported by Valentin Nechayev <netch@netch.kiev.ua> to
+ freebsd-bugs).
+ + add definition from configure script that denotes the path-separator,
+ which is normally a colon. The path-separator is a semicolon on
+ OS/2 EMX and similar systems which may use a colon within pathnames.
+ + alter logic to set default for --disable-overwrite option to set it
+ to 'yes' if the --prefix/$prefix value is not /usr/local, thereby
+ accommodating the most common cause of problems: gcc's nonstandard
+ search rules. Other locations such as /usr/local/ncurses will default
+ to overwriting (report by Lars Hecking <lhecking@nmrc.ie>).
+
+20001118
+ + modify default for --disable-overwrite configure option to disable
+ if the --prefix or $prefix value is not /usr.
+ + add cygwin to systems for which ncurses is installed by default into
+ /usr rather than /usr/local.
+
+20001111
+ + minor optimization in comp_error.c and lib_termname.c, using
+ strncat() to replace strncpy() (patch by Solar Designer).
+ + add a use_terminfo_vars() check for $HOME/.termcap, and check for
+ geteuid() to use_terminfo_vars() (patch by Solar Designer
+ <solar@false.com>).
+ + improved cygwin terminfo entry, based on patch by
+ <ernie_boyd@yahoo.com>.
+ + modify _nc_write_entry() to allow for the possibility that linking
+ aliases on a filesystem that ignores case would not succeed because
+ the source and destination differ only by case, e.g., NCR260VT300WPP0
+ on cygwin (report by Neil Zanella).
+ + fix a typo in the curs_deleteln.3x man page (patch by Bernhard
+ Rosenkraenzer <bero@redhat.de>).
+
+20001104
+ + add configure option --with-ospeed to assist packagers in transition
+ to 5.3 change to ospeed type.
+ + add/use CharOf() macro to suppress sign-extension of char type on
+ platforms where this is a problem in ctype macros, e.g., Solaris.
+ + change trace output to binary format.
+ + correct a missing quote adjustment in CF_PATH_SYNTAX autoconf
+ macro, for OS/2 EMX configuration.
+ + rearrange a few configure macros, moving preprocessor options to
+ $CPPFLAGS (a now-obsolete version of autoconf did not consistently
+ use $CPPFLAGS in both the compile and preprocessor checks).
+ + add a check in relative_move() to guard against buffer overflow in
+ the overwrite logic.
+
+20001028
+ + add message to configure script showing g++ version.
+ + resync config.guess, config.sub
+ + modify lib_delwin.c, making it return ERR if the window did not exist
+ (suggested by Neil Zanella).
+ + add cases for FreeBSD 3.1 to tdlint and makellib scripts, used this
+ to test/review ncurses library. (Would use lclint, but it doesn't
+ work).
+ + reorganized knight.c to avoid forward references. Correct screen
+ updates when backtracking, especially to the first cell. Add F/B/a
+ commands.
+
+20001021 5.2 release for upload to ftp.gnu.org
+ + update generated html files from manpages.
+ + modify dist.mk to use edit_man.sh to substitute autoconf'd variables
+ in html manpages.
+ + fix an uninitialized pointer in read_termcap.c (report by Todd C
+ Miller, from report/patch by Philip Guenther <guenther@gac.edu>).
+ + correct help-message and array limit in knight.c (patch by Brian
+ Raiter <breadbox@muppetlabs.com>).
+ > patch by Juergen Pfeifer:
+ + fix to avoid warning by GNAT-3.13p about use of inconsistent casing
+ for some identifiers defined in the standard package.
+ + cosmetic change to forms/fty_enum.c
+
+20001014
+ + correct an off-by-one position in test/railroad.c which could cause
+ wrapping at the right margin.
+ + test/repair some issues with libtool configuration. Make
+ --disable-echo force libtool --silent. (Libtool does not work for
+ OS/2 EMX, works partly for SCO - libtool is still very specific to
+ gcc).
+ + change default of --with-manpage-tbl to "no", since for most of the
+ platforms which do have tbl installed, the system "man" program
+ understands how to run tbl automatically.
+ + minor improvement to force_bar() in comp_parse.c (Bernhard
+ Rosenkraenzer <bero@redhat.de>).
+ + modify lib_tparm.c to use get_space() before writing terminating
+ null character, both for consistency as well as to ensure that if
+ save_char() was called immediately before, that the allocated memory
+ is enough (patch by Sergei Ivanov).
+ + add note about termcap ML capability which is duplicated between two
+ different capabilities: smgl and smglr (reported by Sergei Ivanov
+ <svivanov@pdmi.ras.ru>).
+ + correct parameter counts in include/Caps for dclk as well as some
+ printer-specific capabilities: csnm, defc, scs, scsd, smgtp, smglp.
+ > patch by Johnny C Lam <lamj@stat.cmu.edu>:
+ + add support for building with libtool (apparently version 1.3.5,
+ since old versions do not handle -L../lib), using new configure
+ option --with-libtool.
+ + add configure option --with-manpage-tbl, which causes the manpages to
+ be preprocessed by tbl(1) prior to installation,
+ + add configure option --without-curses-h, which causes the
+ installation process to install curses.h as ncurses.h and make
+ appropriate changes to headers and manpages.
+
20001009
+ correct order of options/parameters in run_tic.in invocation of tic,
which did not work with standard getopt() (reported by Ethan
@@ -38,7 +328,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
(see assume_default_colors()).
+ rename configure option --enable-hashmap --disable-hashmap, and
reorder the configure options, splitting the experimental and
- development
+ development
+ add configure option --disable-root-environ, which tells ncurses to
disregard $TERMINFO and similar environment variables if the current
user is root, or running setuid/setgid (based on discussion with
@@ -74,7 +364,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
20000923
+ modify rs2 capability in xterm-r6 and similar where cursor
- save/restore bracketed the sequence for resetting video attributes.
+ save/restore bracketed the sequence for resetting video attributes.
The cursor restore would undo that (from a NetBSD bug report by John
Hawkinson <jhawk@MIT.EDU>).
+ using parameter check added to tic, corrected 27 typos in
@@ -117,7 +407,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
which had the effect of ignoring p9 in set_attributes (sgr), breaking
alternate character set (reported by Piotr Majka <charvel@link.pl>).
+ correct ifdef'ing for GCC_PRINTF, GCC_SCANF which would not compile
- with Sun WorkShop compilers since these tokens were empty (cf:
+ with Sun WorkShop compilers since these tokens were empty (cf:
20000902, reported by Albert Chin-A-Young).
20000909
@@ -417,7 +707,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
20000513
+ the tack program knows how to use smcup and rmcup but the "show caps
that can be tested" feature did not reflect this knowledge. Correct
- the display in the menu tack/test/edit/c (patch by Daniel Weaver).
+ the display in the menu tack/test/edit/c (patch by Daniel Weaver).
+ xterm-16color does allow bold+colors, removed ncv#32 from that
terminfo entry.
diff --git a/contrib/ncurses/aclocal.m4 b/contrib/ncurses/aclocal.m4
index d03851395e89..382aa10629e9 100644
--- a/contrib/ncurses/aclocal.m4
+++ b/contrib/ncurses/aclocal.m4
@@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1996,1997,1998,1999,2000
dnl
-dnl $Id: aclocal.m4,v 1.235 2000/10/08 01:01:40 tom Exp $
+dnl $Id: aclocal.m4,v 1.248 2001/04/21 19:40:04 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl See http://dickey.his.com/autoconf/ for additional information.
@@ -57,6 +57,28 @@ fi
AC_SUBST(ACPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
+dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
+AC_DEFUN([CF_ADD_CFLAGS],
+[
+for cf_add_cflags in $1
+do
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case "$CPPFLAGS" in
+ *$cf_add_cflags)
+ ;;
+ *)
+ CPPFLAGS="$CPPFLAGS $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ CFLAGS="$CFLAGS $cf_add_cflags"
+ ;;
+ esac
+done
+])dnl
+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],
@@ -65,6 +87,7 @@ AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
AC_CACHE_VAL(cf_cv_ansi_cc,[
cf_cv_ansi_cc=no
cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
@@ -80,7 +103,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \
"-Aa -D_HPUX_SOURCE" \
-Xc
do
- CFLAGS="$cf_save_CFLAGS $cf_arg"
+ CF_ADD_CFLAGS($cf_arg)
AC_TRY_COMPILE(
[
#ifndef CC_HAS_PROTOS
@@ -95,12 +118,13 @@ choke me
[cf_cv_ansi_cc="$cf_arg"; break])
done
CFLAGS="$cf_save_CFLAGS"
+CPPFLAGS="$cf_save_CPPFLAGS"
])
AC_MSG_RESULT($cf_cv_ansi_cc)
if test "$cf_cv_ansi_cc" != "no"; then
if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
- CFLAGS="$CFLAGS $cf_cv_ansi_cc"
+ CF_ADD_CFLAGS($cf_cv_ansi_cc)
else
AC_DEFINE(CC_HAS_PROTOS)
fi
@@ -207,7 +231,7 @@ AC_MSG_CHECKING(for prefix)
if test "x$prefix" = "xNONE" ; then
case "$cf_cv_system_name" in
# non-vendor systems don't have a conflict
- openbsd*|netbsd*|freebsd*|linux*)
+ openbsd*|netbsd*|freebsd*|linux*|cygwin*)
prefix=/usr
;;
*) prefix=$ac_default_prefix
@@ -363,8 +387,9 @@ dnl is a late feature for the standard and is not in some recent compilers
dnl (1999/9/11).
AC_DEFUN([CF_CPP_PARAM_INIT],
[
-if test "$CXX" = yes ; then
+if test -n "$CXX"; then
AC_CACHE_CHECK(if $CXX accepts parameter initialization,cf_cv_cpp_param_init,[
+ AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
class TEST {
@@ -384,11 +409,86 @@ void main() { }
[cf_cv_cpp_param_init=yes],
[cf_cv_cpp_param_init=no],
[cf_cv_cpp_param_init=unknown])
+ AC_LANG_RESTORE
])
fi
test "$cf_cv_cpp_param_init" = yes && AC_DEFINE(CPP_HAS_PARAM_INIT)
])dnl
dnl ---------------------------------------------------------------------------
+dnl Check if the g++ compiler supports vscan function (not a standard feature).
+AC_DEFUN([CF_CPP_VSCAN_FUNC],
+[
+if test -n "$CXX"; then
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_CHECK_HEADERS(strstream.h)
+
+AC_CACHE_CHECK(if $CXX supports vscan function,cf_cv_cpp_vscan_func,[
+ for cf_vscan_func in strstream stdio
+ do
+ case $cf_vscan_func in #(vi
+ stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
+ strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
+ esac
+ AC_TRY_LINK([
+#include <stdio.h>
+#include <stdarg.h>
+#define $cf_vscan_defs 1
+#if defined(USE_STDIO_VSCAN)
+#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
+#include <strstream.h>
+#endif
+
+int scanw(const char* fmt, ...)
+{
+ int result = -1;
+#if defined(__GNUG__)
+ char buf[BUFSIZ];
+
+ va_list args;
+ va_start(args, fmt);
+#if defined(USE_STDIO_VSCAN)
+ if (::vscanf(fmt, args) != -1)
+ result = 0;
+#elif defined(USE_STRSTREAM_VSCAN)
+ strstreambuf ss(buf, sizeof(buf));
+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
+ result = 0;
+#else
+#error case $cf_vscan_func failed
+#endif
+ va_end(args);
+#else
+#error sorry, we only know about the GNU compiler case
+#endif
+ return result;
+}
+],[int tmp, foo = scanw("%d", &tmp)],
+ [cf_cv_cpp_vscan_func=$cf_vscan_func; break],
+ [cf_cv_cpp_vscan_func=no])
+ test "$cf_cv_cpp_vscan_func" != no && break
+ done
+])
+
+AC_LANG_RESTORE
+fi
+
+case $cf_cv_cpp_vscan_func in #(vi
+stdio) #(vi
+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
+ AC_DEFINE(USE_STDIO_VSCAN)
+ ;;
+strstream)
+ AC_DEFINE(CPP_HAS_VSCAN_FUNC)
+ AC_DEFINE(USE_STRSTREAM_VSCAN)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl "dirname" is not portable, so we fake it with a shell script.
+AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's:/[[^/]]*$::'`])dnl
+dnl ---------------------------------------------------------------------------
AC_DEFUN([CF_DIRS_TO_MAKE],
[
DIRS_TO_MAKE="lib"
@@ -545,7 +645,6 @@ EOF
if test "$GCC" = yes
then
AC_CHECKING([for $CC __attribute__ directives])
- changequote(,)dnl
cat > conftest.$ac_ext <<EOF
#line __oline__ "configure"
#include "confdefs.h"
@@ -564,9 +663,8 @@ cat > conftest.$ac_ext <<EOF
extern void wow(char *,...) GCC_SCANFLIKE(1,2);
extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
-int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
+int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
EOF
- changequote([,])dnl
for cf_attribute in scanf printf unused noreturn
do
CF_UPPER(CF_ATTRIBUTE,$cf_attribute)
@@ -611,12 +709,10 @@ AC_DEFUN([CF_GCC_WARNINGS],
[
if test "$GCC" = yes
then
- changequote(,)dnl
cat > conftest.$ac_ext <<EOF
#line __oline__ "configure"
-int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
+int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
EOF
- changequote([,])dnl
AC_CHECKING([for $CC warning options])
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-W -Wall"
@@ -673,11 +769,10 @@ dnl ---------------------------------------------------------------------------
dnl Verify Version of GNAT.
AC_DEFUN([CF_GNAT_VERSION],
[
-changequote(<<, >>)dnl
-cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
- sed -e 's/[^0-9 \.]//g' | $AWK '{print $<<1>>;}'`
+cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\
+ sed -e 's/[[^0-9 \.]]//g' | $AWK '{print $[1];}'`
case $cf_cv_gnat_version in
- 3.1[1-9]*|3.[2-9]*|[4-9].*)
+ 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*)
cf_cv_prog_gnat_correct=yes
;;
*) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
@@ -685,7 +780,7 @@ case $cf_cv_gnat_version in
;;
esac
case $cf_cv_gnat_version in
- 3.1*|[4-9].*)
+ 3.1*|[[4-9]].*)
cf_compile_generics=generics
cf_generic_objects="\$(GENOBJS)"
;;
@@ -693,7 +788,6 @@ case $cf_cv_gnat_version in
cf_generic_objects=
;;
esac
-changequote([, ])dnl
])
dnl ---------------------------------------------------------------------------
dnl If we're trying to use g++, test if libg++ is installed (a rather common
@@ -785,7 +879,8 @@ dnl $1 = variable to set
AC_DEFUN([CF_LIB_PREFIX],
[
case $cf_cv_system_name in
- os2) LIB_PREFIX='' ;;
+ OS/2*) LIB_PREFIX='' ;;
+ os2*) LIB_PREFIX='' ;;
*) LIB_PREFIX='lib' ;;
esac
ifelse($1,,,[$1=$LIB_PREFIX])
@@ -1000,27 +1095,62 @@ done
DST=\[$]1
REF=\[$]2
SRC=\[$]3
+TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
echo installing \$SRC in \$DST
+CF_EOF
+if test $WITH_CURSES_H = yes; then
+ cat >>headers.sh <<CF_EOF
case \$DST in
/*/include/*)
- TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
- TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
END=\`basename \$DST\`
for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
do
NAME=\`basename \$i\`
echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
done
- rm -f \$TMPSRC
- sed -f \$TMPSED \$SRC > \$TMPSRC
- eval \$PRG \$TMPSRC \$DST/\`basename \$SRC\`
- rm -f \$TMPSRC \$TMPSED
;;
*)
- eval \$PRG \$SRC \$DST
+ echo "" >> \$TMPSED
;;
esac
CF_EOF
+else
+ cat >>headers.sh <<CF_EOF
+case \$DST in
+/*/include/*)
+ END=\`basename \$DST\`
+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
+ do
+ NAME=\`basename \$i\`
+ if test "\$NAME" = "curses.h"
+ then
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ NAME=ncurses.h
+ fi
+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
+ done
+ ;;
+*)
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ ;;
+esac
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+rm -f \$TMPSRC
+sed -f \$TMPSED \$SRC > \$TMPSRC
+NAME=\`basename \$SRC\`
+CF_EOF
+if test $WITH_CURSES_H != yes; then
+ cat >>headers.sh <<CF_EOF
+test "\$NAME" = "curses.h" && NAME=ncurses.h
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+eval \$PRG \$TMPSRC \$DST/\$NAME
+rm -f \$TMPSRC \$TMPSED
+CF_EOF
chmod 0755 headers.sh
@@ -1045,7 +1175,7 @@ CF_EOF
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
do
echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
- test $i = curses.h && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
+ test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
done
cat >>$cf_dir/Makefile <<CF_EOF
@@ -1073,6 +1203,7 @@ AC_DEFUN([CF_LIB_SUFFIX],
[
AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
case $1 in
+ libtool) $2='.la' ;;
normal) $2='.a' ;;
debug) $2='_g.a' ;;
profile) $2='_p.a' ;;
@@ -1092,6 +1223,7 @@ dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_TYPE],
[
case $1 in
+ libtool) $2='' ;;
normal) $2='' ;;
debug) $2='_g' ;;
profile) $2='_p' ;;
@@ -1109,18 +1241,15 @@ AC_DEFUN([CF_LINK_DATAONLY],
AC_MSG_CHECKING([if data-only library module links])
AC_CACHE_VAL(cf_cv_link_dataonly,[
rm -f conftest.a
- changequote(,)dnl
cat >conftest.$ac_ext <<EOF
#line __oline__ "configure"
-int testdata[3] = { 123, 456, 789 };
+int testdata[[3]] = { 123, 456, 789 };
EOF
- changequote([,])dnl
if AC_TRY_EVAL(ac_compile) ; then
mv conftest.o data.o && \
( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
fi
rm -f conftest.$ac_ext data.o
- changequote(,)dnl
cat >conftest.$ac_ext <<EOF
#line __oline__ "configure"
int testfunc()
@@ -1128,14 +1257,13 @@ int testfunc()
#if defined(NeXT)
exit(1); /* I'm told this linker is broken */
#else
- extern int testdata[3];
- return testdata[0] == 123
- && testdata[1] == 456
- && testdata[2] == 789;
+ extern int testdata[[3]];
+ return testdata[[0]] == 123
+ && testdata[[1]] == 456
+ && testdata[[2]] == 789;
#endif
}
EOF
- changequote([,])dnl
if AC_TRY_EVAL(ac_compile); then
mv conftest.o func.o && \
( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
@@ -1281,7 +1409,9 @@ dnl ---------------------------------------------------------------------------
dnl Option to allow user to override automatic configuration of manpage format.
dnl There are several special cases.
AC_DEFUN([CF_MANPAGE_FORMAT],
-[ AC_MSG_CHECKING(format of man-pages)
+[
+AC_REQUIRE([CF_PATHSEP])
+AC_MSG_CHECKING(format of man-pages)
AC_ARG_WITH(manpage-format,
[ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
@@ -1297,13 +1427,11 @@ case ".$cf_manpage_form" in
MANPATH="/usr/man:/usr/share/man"
fi
# look for the 'date' man-page (it's most likely to be installed!)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
cf_manpage_form=unknown
for cf_dir in $MANPATH; do
test -z "$cf_dir" && cf_dir=/usr/man
-changequote({{,}})dnl
- for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
-changequote([,])dnl
+ for cf_name in $cf_dir/*/date.[[01]]* $cf_dir/*/date
do
cf_test=`echo $cf_name | sed -e 's/*//'`
if test "x$cf_test" = "x$cf_name" ; then
@@ -1387,6 +1515,20 @@ AC_ARG_WITH(manpage-symlinks,
AC_MSG_RESULT($cf_manpage_symlinks)
])dnl
dnl ---------------------------------------------------------------------------
+dnl This option causes manpages to be run through tbl(1) to generate tables
+dnl correctly.
+AC_DEFUN([CF_MANPAGE_TBL],
+[
+AC_MSG_CHECKING(for manpage tbl)
+
+AC_ARG_WITH(manpage-tbl,
+ [ --with-manpage-tbl specify manpage processing with tbl],
+ [cf_manpage_tbl=$withval],
+ [cf_manpage_tbl=no])
+
+AC_MSG_RESULT($cf_manpage_tbl)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl Try to determine if the man-pages on the system are compressed, and if
dnl so, what format is used. Use this information to construct a script that
dnl will install man-pages.
@@ -1396,6 +1538,7 @@ CF_HELP_MESSAGE(Options to Specify How Manpages are Installed:)
CF_MANPAGE_FORMAT
CF_MANPAGE_RENAMES
CF_MANPAGE_SYMLINKS
+CF_MANPAGE_TBL
if test "$prefix" = "NONE" ; then
cf_prefix="$ac_default_prefix"
@@ -1416,7 +1559,6 @@ CF_MANPAGE_SYMLINKS
test ! -d man && mkdir man
cat >man/edit_man.sh <<CF_EOF
-changequote({{,}})dnl
#! /bin/sh
# this script is generated by the configure-script
prefix="$cf_prefix"
@@ -1430,20 +1572,20 @@ transform="$program_transform_name"
TMP=\${TMPDIR-/tmp}/man\$\$
trap "rm -f \$TMP" 0 1 2 5 15
-verb=\{{$}}1
+verb=\[$]1
shift
-mandir=\{{$}}1
+mandir=\[$]1
shift
-srcdir=\{{$}}1
+srcdir=\[$]1
shift
-for i in \{{$}}* ; do
+for i in \[$]* ; do
case \$i in #(vi
*.orig|*.rej) ;; #(vi
-*.[0-9]*)
- section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
+*.[[0-9]]*)
+ section=\`expr "\$i" : '.*\\.\\([[0-9]]\\)[[xm]]*'\`;
if test \$verb = installing ; then
if test ! -d $cf_subdir\${section} ; then
\$MKDIRS $cf_subdir\$section
@@ -1463,6 +1605,7 @@ cat >>man/edit_man.sh <<CF_EOF
aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
CF_EOF
fi
+
if test "$cf_manpage_renames" = no ; then
cat >>man/edit_man.sh <<CF_EOF
# perform program transformations for section 1 man pages
@@ -1471,22 +1614,32 @@ cat >>man/edit_man.sh <<CF_EOF
else
target=$cf_subdir\${section}/\$source
fi
+CF_EOF
+else
+cat >>man/edit_man.sh <<CF_EOF
+ target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \[$]2}'\`
+ if test -z "\$target" ; then
+ echo '? missing rename for '\$source
+ target="\$source"
+ fi
+ target="$cf_subdir\${section}/\${target}"
+CF_EOF
+fi
# replace variables in man page
-CF_EOF
- ifelse($1,,,{{
+ ifelse($1,,,[
for cf_name in $1
do
cat >>man/edit_man.sh <<CF_EOF
prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
CF_EOF
done
- }})
+ ])
cat >>man/edit_man.sh <<CF_EOF
sed -e "s,@DATADIR@,\$datadir," \\
-e "s,@TERMINFO@,\$TERMINFO," \\
CF_EOF
- ifelse($1,,,{{
+ ifelse($1,,,[
for cf_name in $1
do
cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
@@ -1494,19 +1647,20 @@ cat >>man/edit_man.sh <<CF_EOF
-e "s,@$cf_NAME@,\$prog_$cf_name," \\
CF_EOF
done
- }})
+ ])
cat >>man/edit_man.sh <<CF_EOF
< \$i >\$TMP
CF_EOF
-else
+if test $cf_manpage_tbl = yes ; then
cat >>man/edit_man.sh <<CF_EOF
- target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \{{$}}2}'\`
- if test -z "\$target" ; then
- echo '? missing rename for '\$source
- target="\$source"
- fi
- target="$cf_subdir\$section/\$target"
- test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
+ tbl \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+if test $with_curses_h != yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
CF_EOF
fi
if test $cf_format = yes ; then
@@ -1541,14 +1695,14 @@ CF_EOF
*BSDI*)
cat >>man/edit_man.sh <<CF_EOF
# BSDI installs only .0 suffixes in the cat directories
- target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
+ target="\`echo \$target|sed -e 's/\.[[1-9]]\+.\?/.0/'\`"
CF_EOF
;;
esac
cat >>man/edit_man.sh <<CF_EOF
- echo \$verb \$target
- suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
+ suffix=\`basename \$target | sed -e 's/^[[^.]]*//'\`
if test \$verb = installing ; then
+ echo \$verb \$target
\$INSTALL_DATA \$TMP \$target
test -n "\$aliases" && (
cd $cf_subdir\${section} && (
@@ -1576,7 +1730,8 @@ cat >>man/edit_man.sh <<CF_EOF
done
)
)
- else
+ elif test \$verb = removing ; then
+ echo \$verb \$target
rm -f \$target
test -n "\$aliases" && (
cd $cf_subdir\${section} && (
@@ -1591,13 +1746,15 @@ cat >>man/edit_man.sh <<CF_EOF
done
)
)
+ else
+# echo ".hy 0"
+ cat \$TMP
fi
;;
esac
done
exit 0
CF_EOF
-changequote([,])dnl
chmod 755 man/edit_man.sh
])dnl
@@ -1645,6 +1802,7 @@ dnl Compute the object-directory name from the given model name
AC_DEFUN([CF_OBJ_SUBDIR],
[
case $1 in
+ libtool) $2='obj_lo' ;;
normal) $2='objects' ;;
debug) $2='obj_g' ;;
profile) $2='obj_p' ;;
@@ -1652,6 +1810,17 @@ AC_DEFUN([CF_OBJ_SUBDIR],
esac
])dnl
dnl ---------------------------------------------------------------------------
+dnl Provide a value for the $PATH and similar separator
+AC_DEFUN([CF_PATHSEP],
+[
+ case $cf_cv_system_name in
+ os2*) PATHSEP=';' ;;
+ *) PATHSEP=':' ;;
+ esac
+ifelse($1,,,[$1=$PATHSEP])
+ AC_SUBST(PATHSEP)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
dnl begins with one of the prefix/exec_prefix variables, and then again if the
dnl result begins with 'NONE'. This is necessary to workaround autoconf's
@@ -1660,7 +1829,7 @@ AC_DEFUN([CF_PATH_SYNTAX],[
case ".[$]$1" in #(vi
./*) #(vi
;;
-.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
;;
.\[$]{*prefix}*) #(vi
eval $1="[$]$1"
@@ -1674,7 +1843,7 @@ case ".[$]$1" in #(vi
$1=`echo [$]$1 | sed -e s@NONE@$ac_default_prefix@`
;;
*)
- AC_ERROR(expected a pathname)
+ AC_ERROR(expected a pathname, not "[$]$1")
;;
esac
])dnl
@@ -1687,8 +1856,9 @@ PROG_EXT=
case $cf_cv_system_name in
os2*)
# We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
- CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
- CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__"
+ CFLAGS="$CFLAGS -Zmt"
+ CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+ CXXFLAGS="$CXXFLAGS -Zmt"
LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
PROG_EXT=".exe"
;;
@@ -1708,10 +1878,8 @@ case $INSTALL in
/*)
;;
*)
-changequote({{,}})dnl
- cf_dir=`echo $INSTALL|sed -e 's%/[^/]*$%%'`
+ CF_DIRNAME(cf_dir,$INSTALL)
test -z "$cf_dir" && cf_dir=.
-changequote([,])dnl
INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
;;
esac
@@ -1993,13 +2161,13 @@ AC_DEFUN([CF_SIZECHANGE],
AC_REQUIRE([CF_STRUCT_TERMIOS])
AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
cf_cv_sizechange=unknown
- cf_save_CFLAGS="$CFLAGS"
+ cf_save_CPPFLAGS="$CPPFLAGS"
for cf_opts in "" "NEED_PTEM_H"
do
- CFLAGS="$cf_save_CFLAGS"
- test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
AC_TRY_COMPILE([#include <sys/types.h>
#ifdef HAVE_TERMIOS_H
#include <termios.h>
@@ -2036,7 +2204,7 @@ do
[cf_cv_sizechange=yes],
[cf_cv_sizechange=no])
- CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
if test "$cf_cv_sizechange" = yes ; then
echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
@@ -2066,7 +2234,11 @@ AC_MSG_CHECKING(for src modules)
# dependencies and linker-arguments for test-programs
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
-TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
+if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+else
+ TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
+fi
# dependencies and linker-arguments for utility-programs
PROG_ARGS="$TEST_ARGS"
@@ -2101,7 +2273,11 @@ do
AC_DEFINE_UNQUOTED(HAVE_${cf_have_include}_H)
AC_DEFINE_UNQUOTED(HAVE_LIB${cf_have_include})
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
- TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ fi
fi
fi
done
@@ -2211,7 +2387,7 @@ if test "$ISC" = yes ; then
AC_CHECK_HEADERS( sys/termio.h )
fi
if test "$ac_cv_header_termios_h" = yes ; then
- case "$CFLAGS" in
+ case "$CFLAGS $CPPFLAGS" in
*-D_POSIX_SOURCE*)
termios_bad=dunno ;;
*) termios_bad=maybe ;;
@@ -2252,11 +2428,9 @@ dnl ---------------------------------------------------------------------------
dnl Get the version-number for use in shared-library naming, etc.
AC_DEFUN([CF_SUBST_NCURSES_VERSION],
[
-changequote(,)dnl
-NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
-NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
-NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
-changequote([,])dnl
+NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
+NCURSES_MINOR="`egrep '^NCURSES_MINOR[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
+NCURSES_PATCH="`egrep '^NCURSES_PATCH[[ ]]*=' $srcdir/dist.mk | sed -e 's/^[[^0-9]]*//'`"
cf_cv_abi_version=${NCURSES_MAJOR}
cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
dnl Show the computed version, for logging
@@ -2394,9 +2568,7 @@ dnl Make an uppercase version of a variable
dnl $1=uppercase($2)
AC_DEFUN([CF_UPPER],
[
-changequote(,)dnl
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-changequote([,])dnl
])dnl
dnl ---------------------------------------------------------------------------
dnl Compute the shift-mask that we'll use for wide-character indices. We use
@@ -2478,10 +2650,11 @@ 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_PATHLIST],[
+AC_REQUIRE([CF_PATHSEP])
AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
ifelse($4,,[withval="${$3}"],[withval="${$3-ifelse($5,,$4,$5)}"]))dnl
-IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
cf_dst_path=
for cf_src_path in $withval
do
diff --git a/contrib/ncurses/announce.html.in b/contrib/ncurses/announce.html.in
index 936b2053d588..e62db47cb32a 100644
--- a/contrib/ncurses/announce.html.in
+++ b/contrib/ncurses/announce.html.in
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
- $Id: announce.html.in,v 1.39 2000/07/04 21:59:36 tom Exp $
+ $Id: announce.html.in,v 1.41 2000/10/28 21:43:25 tom Exp $
-->
<HTML>
<HEAD>
@@ -22,8 +22,11 @@ considered 4.4BSD curses obsolete, and is encouraging the keepers of
Unix releases such as BSD/OS, freeBSD and netBSD to switch over to
ncurses.<P>
-The ncurses code was developed under GNU/Linux. It should port easily to
-any ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!<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),
@@ -38,136 +41,327 @@ the GNU distribution site
<H1>Release Notes</H1>
-This release is designed to be upward compatible from ncurses 5.0; very few
-applications will require recompilation, depending on the platform.
-These are the highlights from the change-log since ncurses 5.0 release.
+This release is designed to be upward compatible from ncurses 5.0 and 5.1;
+very few applications will require recompilation, depending on the platform.
+These are the highlights from the change-log since ncurses 5.1 release.
<p>
Interface changes:
<ul>
- <li>made the extended terminal capabilities
- (<code>configure&nbsp;--enable-tcap-names</code>)
- a standard feature (though the configure script can disable it,
- it is built by default).
-
- <li>removed the <code>trace()</code> function and related trace support
- from the production library. This is the only interface change that
- may cause problems with existing applications linked to shared
- libraries, since not all platforms use the minor version number.
-
- <li>explicitly initialized to zero several data items which were
- implicitly initialized, e.g., cur_term. If not explicitly
- initialized, their storage type is C (common), and causes problems
- linking on some platforms.
-
- <li>modified curses.h.in, undef'ing some symbols to avoid conflict with
- C++ STL.
+ <li>change type of <code>ospeed</code> variable back to
+ <code>short</code> to match its use in legacy applications. It was
+ altered after ncurses 4.2 to <code>speed_t</code> to repair a type
+ mismatch which was introduced after 1.9.4 in 1995. The principal
+ users of termcap continued to use <code>short</code>, which is
+ not the same size.
+ <p>
+ <em>NOTE</em>: A few applications will have to be recompiled
+ (about 1% of the programs in a typical Linux distribution,
+ 10% of the programs that use ncurses). These are easy to
+ identify with <code>nm</code> or <code>strings</code>.
+
+ <li>remove a private function <code>_nc_can_clear_with()</code>, which
+ was built with the configure --enable-expanded option but not used.
+
+ <li>add several private functions (prefixed with "_nc_") for tracing
+ <code>chtype</code> values in the debug library, and for better
+ access and buffer limit checking.
</ul>
-New features:
+New features and improvements:
<ul>
- <li>added a new extension, <code>assume_default_colors()</code> to
- provide better control over the use of default colors. This is
- the principal visible difference between ncurses 5.1 and preceding
- versions. The new extension allows an application to specify what
- colors pair 0 uses.
- <p>
- <em>NOTE</em>: Pair 0 defaults to white on black unless
- you have invoked <code>use_default_colors()</code> or set it via
- <code>assume_default_colors()</code>. An application that calls
- <code>start_colors()</code> without setting the background color
- will consistently have a black background no matter what color your
- terminal's background actually is.
-
- <li>made several fixes to the terminfo-to-termcap conversion, and
- have been using the generated termcaps without further hand-tuning.
- This builds on the extension <code>use_extended_names()</code> by
- adding "obsolete" termcap strings to terminfo.src
+ <li>rewrote <code>tgoto()</code> to make it better support existing
+ termcap applications which use hardcoded strings rather than obtain
+ all of their information from the termcap file. If the string does
+ not appear to be a terminfo string (i.e., does not refer to a "%p"
+ parameter, or terminfo-style padding), and termcap support is configured, <code>tgoto()</code>
+ will interpret it as termcap. Otherwise, as before, it will use
+ <code>tparm()</code>.
+
+ <li>to ensure that the <code>tgoto()</code> changes work properly,
+ added checks to <code>tic</code> which report capabilities that do
+ not reference the expected number of parameters.
+
+ <li>new configure script options:
<ul>
- <li>modified <code>tic</code> so that if extended names (i.e.,
- configure&nbsp;--enable-tcap-names) are active, then <code>tic&nbsp;-x</code>
- will also write "obsolete" capabilities that are present in the
- terminfo source.
-
- <li>added screen's AX capability (for ECMA SGR 39 and 49) to applicable
- terminfo entries, use presence of this as a check for a small
- improvement in setting default colors.
-
- <li>add -a option to tic and infocmp, which retains commented-out
- capabilities during source translation/comparison, e.g., captoinfo
- and infotocap.
+ <li>option <code>--disable-root-environ</code> adds runtime checks
+ which tell ncurses to disregard $TERMINFO and similar environment
+ variables if the current user is root, or running setuid/setgid.
+
+ <li>option <code>--disable-assumed-color</code> allows you to use the
+ pre-5.1 convention of default colors used for color-pair 0 to be
+ configured (see assume_default_colors()).
+
+ <li>implement configure script options that transform installed
+ program names, e.g., <code>--program-prefix</code>, including the
+ manpage names and cross references.
+
+ <li>option <code>--with-database</code> allows you to specify a
+ different terminfo source-file to install. On OS/2 EMX, the
+ default is misc/emx.src, otherwise misc/terminfo.src
+
+ <li>option <code>--with-default-terminfo-dir</code> allows you to
+ specify the default terminfo database directory.
+
+ <li>option <code>--with-libtool</code> allows you to build with
+ <code>libtool</code>. <p> <em>NOTE</em>: <code>libtool</code>
+ uses a different notation for numbering shared library versions
+ from the existing ncurses configuration.
+
+ <li>option <code>--with-manpage-tbl</code> causes the manpages to be
+ preprocessed by tbl(1) prior to installation,
+
+ <li>option <code>--without-curses-h</code> causes the installation
+ process to install curses.h as ncurses.h and make appropriate
+ changes to headers and manpages.
</ul>
- <li>implemented limited support for UTF-8, useful with XFree86 xterm:
+ <li>modified configure script options:
<ul>
- <li>if the <code>configure&nbsp;--enable-widec</code> option is
- given, append 'w' to names of the generated libraries (e.g.,
- libncursesw.so) to avoid conflict with existing ncurses libraries.
- <li>add a simple UTF-8 output driver to the experimental
- wide-character support. If any of the environment variables
- LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this driver
- will be used to translate the output to UTF-8.
- <li>modified view.c to make a rudimentary viewer of UTF-8 text.
+ <li>change symbol used by the <code>--install-prefix</code> configure
+ option from <code>INSTALL_PREFIX</code> to <code>DESTDIR</code>
+ (the latter has become common usage although the name is
+ misleading).
+
+ <li>modify <code>ld -rpath</code> options (e.g., Linux, and Solaris)
+ to use an absolute pathname for the build tree's lib directory,
+ avoiding confusion with directories relative to the current one
+ with the installed programs.
+
+ <li>modified <code>misc/run_tic.in</code> to use
+ <code>tic&nbsp;-o</code>, to eliminate dependency on
+ <code>$TERMINFO</code> variable for installs.
</ul>
- <li>modify <code>raw()</code> and <code>noraw()</code> to clear/restore
- IEXTEN flag which affects <code>stty lnext</code> on systems such as FreeBSD
+ <li>terminfo database:
+ <ul>
+ <li>updated xterm terminfo entries to match XFree86 xterm patch #146.
- <li>reordered tests during mouse initialization to allow for gpm to run
- in xterm, or for xterm to be used under OS/2 EMX. Also dropped test
- for <code>$DISPLAY</code> in favor of the terminfo capability
- <code>kmous=\E[M</code> or
- if <code>$TERM</code> environment variable contains "xterm".
+ <li>added amiga-vnc,
+ Matrix Orbital, and
+ QNX qansi to misc/terminfo.src.
- <li>added configure option <code>--with-manpage-symlinks</code>, which
- provides for fully indexing manpage entries by making symbolic links
- for the aliases.
+ <li>added os2 entry to misc/emx.src.
- <li>changed <code>unctrl()</code> to render C1 characters (128-159) as
- <code>~@</code>, <code>~A</code>, etc.
+ <li>add S0 and E0 extensions to <code>screen</code>'s terminfo entry
+ since otherwise the FreeBSD port makes it pass termcap equivalents
+ to <code>tgoto</code>, which would be misinterpreted by older
+ versions of ncurses.
+ </ul>
+
+ <li>improvements to program usability:
+ <ul>
+ <li>modify programs to use <code>curses_version()</code> string to
+ report the version of ncurses with which they are compiled rather
+ than the NCURSES_VERSION string. The function returns the patch
+ level in addition to the major and minor version numbers.
- <li>add experimental configure option --enable-colorfgbg to check for
- $COLORTERM variable as set by rxvt/aterm/Eterm.
+ <li>modify <code>tput</code> program so it can be renamed or invoked via a link as
+ 'reset' or 'init', producing the same effect as <code>tput&nbsp;reset</code> or <code>tput&nbsp;init</code>.
- <li>made the <code>infocmp -F</code> option less verbose.
+ <li>add error checking to infocmp's -v and -m options to ensure that
+ the option value is indeed a number.
+ </ul>
- <li>dropped support for gnat 3.10 (gnat 3.12 is current).
+ <li>improved performance:
+ <ul>
+ <li>replace a lookup table in lib_vidattr.c used to decode
+ <code>no_color_video</code> with a logic expression which is faster.
+ </ul>
</ul>
Major bug fixes:
<ul>
- <li>modified infocmp -e, -E options to ensure that generated fallback.c
- type for Booleans agrees with term.h
+ <li>correct <code>manlinks.sed</code> script introduced in ncurses 5.1
+ to avoid using ERE "\+", which is not understood by standard versions
+ of <code>sed</code>. This happens to work with GNU <code>sed</code>,
+ but is not portable, and was the initial motivation for this release.
+
+ <li>remove "hpux10.*" case from CF_SHARED_OPTS configure script macro.
+ This differed from the "hpux*" case by using reversed symbolic
+ links, which made the 5.1 version not match the configuration of
+ 5.0 shared libraries.
+
+ <li>guard against corrupt terminfo data:
+ <ul>
+ <li>modify <code>tparm()</code> to disallow arithmetic on strings,
+ analyze the varargs list to read strings as strings and numbers as
+ numbers.
+
+ <li>modify <code>tparm()</code>'s internal function
+ <code>spop()</code> to treat a null pointer as an empty string.
+
+ <li>modify <code>parse_format()</code> in lib_tparm.c to ignore
+ precision if it is longer than 10000.
+
+ <li>rewrote limit checks in lib_mvcur.c using new functions
+ <code>_nc_safe_strcat()</code>, etc. Made other related changes to
+ check lengths used for <code>strcat()</code> and
+ <code>strcpy()</code>.
+ </ul>
+
+ <li>corrections to screen optimization:
+ <ul>
+ <li>added special case in lib_vidattr.c to reset underline and
+ standout for devices that have no sgr0 defined.
+
+ <li>change handling of <code>non_dest_scroll_region</code> in
+ tty_update.c to clear text after it is shifted in rather than before
+ shifting out. Also correct row computation.
+
+ <li>modify <code>rs2</code> capability in xterm-r6 and similar entries
+ where cursor save/restore bracketed the sequence for resetting video
+ attributes. The cursor restore would undo that.
+ </ul>
+
+ <li>UTF-8 support:
+ <ul>
+ <li>when checking LC_ALL, LC_CTYPE, and LANG environment variables
+ for UTF-8 locale, ignore those which are set to an empty value, as
+ per SUSV2.
- <li>documented a special case of incompatiblity between ncurses 4.2 and
- 5.0, added a section for this in INSTALL.
+ <li>encode 0xFFFD in UTF-8 with 3 bytes, not 2.
- <li>corrected tests for file-descriptors in OS/2 EMX mouse support. A
- negative value could be used by FD_SET, causing the select() call to
- wait indefinitely.
+ <li>modify <code>_nc_utf8_outch()</code> to avoid sign-extension when
+ checking for out-of-range value.
+ </ul>
- <li>made 'tput flash' work properly for xterm by flushing output in
- delay_output() when using napms(), and modifying xterm's terminfo to
- specify no padding character. Otherwise, xterm's reported baud rate
- could mislead ncurses into producing too few padding characters.
+ <li>other library fixes:
+ <ul>
+ <li>added checks for an empty <code>$HOME</code> environment
+ variable, to avoid retrieving terminfo descriptions from
+ <code>./.terminfo</code> .
- <li>modified lib_addch.c to allow repeated update to the lower-right
- corner, rather than displaying only the first character written until
- the cursor is moved. Recent versions of SVr4 curses can update the
- lower-right corner, and behave this way.
+ <li>change functions <code>_nc_parse_entry()</code> and
+ <code>postprocess_termcap()</code> to avoid using
+ <code>strtok()</code>, because it is non-reentrant.
- <li>modified echo() behavior of getch() to match Solaris curses for
- carriage return and backspace (reported by Neil Zanella).
+ <li>initialize <code>fds[]</code> array to 0's in
+ <code>_nc_timed_wait()</code>; apparently <code>poll()</code> only
+ sets the <code>revents</code> members of that array when there is
+ activity corresponding to the related file.
- <li>corrected offsets used for subwindows in <code>wresize()</code>
+ <li>add a check for null pointer in <code>Make_Enum_Type()</code>.
- <li>modified configure script so AC_MSG_ERROR is temporarily defined to
- a warning in AC_PROG_CXX to make it recover from a missing C++
- compiler without requiring user to add --without-cxx option
+ <li>fix a heap problem with the c++ binding.
- <li>corrected logic in lib_twait.c as used by lib_mouse.c for GPM mouse
- support when poll() is used rather than select().
+ <li>correct missing includes for &lt;string.h&gt; in several places,
+ including the C++ binding. This is not noted by gcc unless we use
+ the <code>-fno-builtin</code> option.
+ </ul>
+
+ <li>several fixes for tic:
+ <ul>
+ <li>add a check for empty buffers returned by <code>fgets()</code> in
+ comp_scan.c <code>next_char()</code> function, in case
+ <code>tic</code> is run on a non-text file (fixes a core dump).
+
+ <li>modify <code>tic</code> to verify that its inputs are really files,
+ in case someone tries to read a directory (or
+ <code>/dev/zero</code>).
+
+ <li>correct an uninitialized parameter to <code>open_tempfile()</code>
+ in tic.c which made "tic -I" give an ambiguous error message about
+ <code>tmpnam</code>.
+
+ <li>correct logic in <code>adjust_cancels()</code>, which did not check
+ both alternatives when reclassifying an extended name between
+ boolean, number and string, causing an infinite loop in
+ <code>tic</code>.
+ </ul>
+
+ <li>using new checks in <code>tic</code> for parameter counts in
+ capability strings, found/fixed several errors both in the
+ terminfo database and in the include/Caps file.
+ <ul>
+ <li>modified several terminfo capability strings, including the
+ definitions for setaf, setab, in include/Caps to indicate that the
+ entries are parameterized. This information is used to tell which
+ strings are translated when converting to termcap. This fixes a
+ problem where the generated termcap would contain a spurious "%p1"
+ for the terminfo "%p1%d".
+
+ <li>correct parameter counts in include/Caps for dclk as well as some
+ printer-specific capabilities: csnm, defc, scs, scsd, smgtp, smglp.
+ </ul>
+
+ <li>various fixes for install scripts used to support configure
+ <code>--srcdir</code> and <code>--with-install-prefix</code>.
+
+ <li>correct several mismatches between manpage filename and ".TH"
+ directives, renaming dft_fgbg.3x to default_colors.3x and
+ menu_attribs.3x to menu_attributes.3x.
+</ul>
+
+Portability:
+<ul>
+ <li>configure script:
+ <ul>
+ <li>newer config.guess, config.sub, including changes to support OS/2
+ EMX. The configure script for OS/2 EMX still relies on a patch
+ since there is no (working) support for that platform in the main
+ autoconf distribution.
+
+ <li>make configure script checks on variables <code>$GCC</code> and
+ <code>$GXX</code> consistently compare against 'yes' rather than
+ test if they are nonnull, since either may be set to the
+ corresponding name of the C or C++ compiler.
+
+ <li>change configure script to use AC_CANONICAL_SYSTEM rather than
+ AC_CANONICAL_HOST, which means that <code>configure --target</code>
+ will set a default program-prefix.
+
+ <li>modify the check for big-core to force a couple of memory
+ accesses, which may work as needed for older/less-capable machines
+ (if not, there's still the explicit configure option).
+
+ <li>modify configure test for <code>tcgetattr()</code> to allow for
+ old implementations, e.g., on BeOS, which only defined it as a
+ macro.
+
+ <li>add configure check for filesystems (such as OS/2 EMX) which do
+ not distinguish between upper/lowercase filenames, use this to fix
+ tags rules in makefiles.
+
+ <li>add MKncurses_def.sh to generate fallback definitions for
+ ncurses_cfg.h, to quiet gcc -Wundef warnings, modified ifdef's in
+ code to consistently use "#if" rather than "#ifdef".
+
+ <li>change most remaining unquoted parameters of <code>test</code> in
+ configure script to use quotes, for instance fixing a problem in the
+ <code>--disable-database</code> option.
+
+ <li>modify scripts so that "make install.data" works on OS/2 EMX.
+
+ <li>modify scripts and makefiles so the Ada95 directory builds on
+ OS/2 EMX.
+ </ul>
+
+ <li>library:
+ <ul>
+ <li>replaced case-statement in <code>_nc_tracebits()</code> for CSIZE
+ with a table to simplify working around implementations that define
+ random combinations of the related macros to zero.
+
+ <li>improved OS/2 mouse support by retrying as a 2-button mouse if code
+ fails to set up a 3-button mouse.
+
+ <li>added private entrypoint <code>_nc_basename()</code>, used to
+ consolidate related code in progs, as well as accommodating OS/2 EMX
+ pathnames.
+
+ <li>alter definition of NCURSES_CONST to make it non-empty.
+
+ <li>redefine 'TEXT' in menu.h for AMIGA, since it is reported to have
+ an (unspecified) symbol conflict.
+ </ul>
+
+ <li>programs:
+ <ul>
+ <li>modified progs/tset.c and tack/sysdep.c to build with sgttyb
+ interface if neither termio or termios is available. Tested this
+ with FreeBSD 2.1.5 (which does have termios - but the sgttyb does
+ work).
+ </ul>
- <li>made several fixes for buffer overflows, unchecked recursion,
- improvements in performance, etc. See the NEWS file for details.
</ul>
<H1>Features of Ncurses</H1>
diff --git a/contrib/ncurses/c++/Makefile.in b/contrib/ncurses/c++/Makefile.in
index 78b86db364db..96f338fbb152 100644
--- a/contrib/ncurses/c++/Makefile.in
+++ b/contrib/ncurses/c++/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.53 2000/08/19 19:12:32 tom Exp $
+# $Id: Makefile.in,v 1.58 2001/04/21 21:31:08 tom Exp $
##############################################################################
-# Copyright (c) 1998,1999 Free Software Foundation, Inc. #
+# Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -48,6 +48,8 @@ exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
+LIBTOOL = @LIBTOOL@
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -56,6 +58,7 @@ AR_OPTS = @AR_OPTS@
RANLIB = @RANLIB@
CXX = @CXX@
+CPP = @CPP@
CXXFLAGS = @CXXFLAGS@
CXXLIBS = @CXXLIBS@
@@ -64,6 +67,7 @@ CPPFLAGS = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CXXFLAGS)
+CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CXX_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
@@ -71,25 +75,37 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
+NCURSES_MAJOR = @NCURSES_MAJOR@
+NCURSES_MINOR = @NCURSES_MINOR@
REL_VERSION = @cf_cv_rel_version@
ABI_VERSION = @cf_cv_abi_version@
-LINK = @LINK_PROGS@ $(CXX) @CXXLDFLAGS@
+LINK = @LINK_PROGS@ $(LIBTOOL) $(CXX) @CXXLDFLAGS@
+
+LIBROOT = ncurses++
+
+LIBNAME_LIBTOOL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.la
+LIBNAME_NORMAL = @LIB_PREFIX@$(LIBROOT)@LIB_SUFFIX@.a
+LIBNAME = @LIB_PREFIX@$(LIBROOT)@CXX_LIB_SUFFIX@
-LIBROOT = ncurses++@LIB_SUFFIX@
-LIBNAME = @LIB_PREFIX@$(LIBROOT).a
+LINK_FLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) -l$(LIBROOT)@LIB_SUFFIX@
-LDFLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) \
- -l$(LIBROOT) \
- @TEST_ARGS@ @LDFLAGS@ \
+LINK_LIBTOOL = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) ../lib/$(LIBNAME)
+LINK_NORMAL = $(LINK_FLAGS)
+LINK_DEBUG = $(LINK_FLAGS)
+LINK_PROFILE = $(LINK_FLAGS)
+LINK_SHARED = $(LINK_FLAGS)
+
+LDFLAGS = @TEST_ARGS@ @LDFLAGS@ \
@LD_MODEL@ @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ $(CXXLIBS)
+LDFLAGS_LIBTOOL = $(LDFLAGS)
LDFLAGS_NORMAL = $(LDFLAGS)
LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@
LDFLAGS_PROFILE = $(LDFLAGS) -pg
LDFLAGS_SHARED = $(LDFLAGS) @LD_SHARED_OPTS@
-LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
+LDFLAGS_DEFAULT = $(LINK_@DFT_UPR_MODEL@) $(LDFLAGS_@DFT_UPR_MODEL@)
AUTO_SRC = \
etip.h
@@ -114,10 +130,15 @@ LIB_OBJS = \
$(MODEL)/cursesapp.o \
$(MODEL)/cursesmain.o
-../lib/$(LIBNAME) : $(LIB_OBJS)
+../lib/$(LIBNAME_NORMAL) : $(LIB_OBJS)
$(AR) $(AR_OPTS) $@ $?
$(RANLIB) $@
+../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
+ cd ../lib && $(LIBTOOL) $(CXX) -o $(LIBNAME) $(LIB_OBJS:.o=.lo) \
+ -rpath $(INSTALL_PREFIX)$(libdir) \
+ -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR)
+
OBJS_DEMO = $(MODEL)/demo.o
$(MODEL)/demo.o : $(srcdir)/demo.cc \
@@ -137,17 +158,18 @@ $(DESTDIR)$(libdir) :
install \
install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
- $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
+ $(LIBTOOL) $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
uninstall \
uninstall.libs::
- -rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
+ -$(LIBTOOL) rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
mostlyclean ::
- -rm -f core tags TAGS *~ *.ln *.atac trace
+ -rm -f core tags TAGS *~ *.i *.ii *.ln *.atac trace
clean :: mostlyclean
- -rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(OBJS_DEMO)
+ -$(LIBTOOL) rm -f demo$x $(AUTO_SRC) ../lib/$(LIBNAME) $(LIB_OBJS) $(LIB_OBJS:.o=.lo) $(OBJS_DEMO)
+ -rm -rf .libs
distclean :: clean
-rm -f Makefile
diff --git a/contrib/ncurses/c++/cursesapp.cc b/contrib/ncurses/c++/cursesapp.cc
index eaaadc7eebdd..46cc271db644 100644
--- a/contrib/ncurses/c++/cursesapp.cc
+++ b/contrib/ncurses/c++/cursesapp.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,10 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-#include "cursesapp.h"
#include "internal.h"
+#include "cursesapp.h"
-MODULE_ID("$Id: cursesapp.cc,v 1.6 1999/10/30 23:59:37 tom Exp $")
+MODULE_ID("$Id: cursesapp.cc,v 1.8 2001/03/24 21:25:36 tom Exp $")
void
NCursesApplication::init(bool bColors) {
diff --git a/contrib/ncurses/c++/cursesapp.h b/contrib/ncurses/c++/cursesapp.h
index f13fd1bdb457..c897a07dc20d 100644
--- a/contrib/ncurses/c++/cursesapp.h
+++ b/contrib/ncurses/c++/cursesapp.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,14 +31,14 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: cursesapp.h,v 1.5 1999/05/16 17:29:59 juergen Exp $
+// $Id: cursesapp.h,v 1.7 2001/03/24 21:41:18 tom Exp $
-#ifndef _CURSESAPP_H
-#define _CURSESAPP_H
+#ifndef NCURSES_CURSESAPP_H_incl
+#define NCURSES_CURSESAPP_H_incl
#include <cursslk.h>
-class NCursesApplication {
+class NCURSES_IMPEXP NCursesApplication {
public:
typedef struct _slk_link { // This structure is used to maintain
struct _slk_link* prev; // a stack of SLKs
@@ -160,4 +160,4 @@ public:
};
-#endif // _CURSESAPP_H
+#endif // NCURSES_CURSESAPP_H_incl
diff --git a/contrib/ncurses/c++/cursesf.cc b/contrib/ncurses/c++/cursesf.cc
index a3b066cb51ef..35e01ee9ea6c 100644
--- a/contrib/ncurses/c++/cursesf.cc
+++ b/contrib/ncurses/c++/cursesf.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,12 +31,12 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
+#include "internal.h"
#include "cursesf.h"
#include "cursesapp.h"
-#include "internal.h"
-MODULE_ID("$Id: cursesf.cc,v 1.11 2000/06/09 16:15:40 juergen Exp $")
-
+MODULE_ID("$Id: cursesf.cc,v 1.13 2001/03/24 20:03:51 tom Exp $")
+
NCursesFormField::~NCursesFormField () {
if (field)
OnError(::free_field (field));
@@ -54,16 +54,16 @@ NCursesForm::mapFields(NCursesFormField* nfields[]) {
for (lcv=0; nfields[lcv]->field; ++lcv)
++fieldCount;
-
+
FIELD** fields = new FIELD*[fieldCount + 1];
-
+
for (lcv=0;nfields[lcv]->field;++lcv) {
fields[lcv] = nfields[lcv]->field;
}
fields[lcv] = NULL;
-
+
my_fields = nfields;
-
+
if (form && (old_fields = ::form_fields(form))) {
::set_form_fields(form,(FIELD**)0);
delete[] old_fields;
@@ -104,7 +104,7 @@ NCursesForm::InitForm(NCursesFormField* nfields[],
bool with_frame,
bool autoDelete_Fields) {
int mrows, mcols;
-
+
keypad(TRUE);
meta(TRUE);
@@ -115,24 +115,24 @@ NCursesForm::InitForm(NCursesFormField* nfields[],
form = ::new_form(mapFields(nfields));
if (!form)
OnError (E_SYSTEM_ERROR);
-
+
UserHook* hook = new UserHook;
hook->m_user = NULL;
hook->m_back = this;
hook->m_owner = form;
::set_form_userptr(form,(void*)hook);
-
+
::set_form_init (form, NCursesForm::frm_init);
::set_form_term (form, NCursesForm::frm_term);
::set_field_init (form, NCursesForm::fld_init);
::set_field_term (form, NCursesForm::fld_term);
-
+
scale(mrows, mcols);
::set_form_win(form, w);
-
+
if (with_frame) {
if ((mrows > height()-2) || (mcols > width()-2))
- OnError(E_NO_ROOM);
+ OnError(E_NO_ROOM);
sub = new NCursesWindow(*this,mrows,mcols,1,1,'r');
::set_form_sub(form, sub->w);
b_sub_owner = TRUE;
@@ -161,14 +161,14 @@ NCursesForm::~NCursesForm() {
if (b_autoDelete) {
if (cnt>0) {
for (int i=0; i <= cnt; i++)
- delete my_fields[i];
+ delete my_fields[i];
}
delete[] my_fields;
}
::free_form(form);
// It's essential to do this after free_form()
- delete[] fields;
+ delete[] fields;
}
}
@@ -186,7 +186,7 @@ NCursesForm::setSubWindow(NCursesWindow& nsub) {
/* Internal hook functions. They will route the hook
* calls to virtual methods of the NCursesForm class,
- * so in C++ providing a hook is done simply by
+ * so in C++ providing a hook is done simply by
* implementing a virtual method in a derived class
*/
void
@@ -228,7 +228,7 @@ NCursesForm::On_Field_Termination(NCursesFormField& field) {
}
// call the form driver and do basic error checking.
-int
+int
NCursesForm::driver (int c) {
int res = ::form_driver (form, c);
switch (res) {
@@ -244,15 +244,15 @@ NCursesForm::driver (int c) {
}
void NCursesForm::On_Request_Denied(int c) const {
- beep();
+ ::beep();
}
void NCursesForm::On_Invalid_Field(int c) const {
- beep();
+ ::beep();
}
void NCursesForm::On_Unknown_Command(int c) const {
- beep();
+ ::beep();
}
static const int CMD_QUIT = MAX_COMMAND + 1;
@@ -266,7 +266,7 @@ NCursesForm::operator()(void) {
post();
show();
refresh();
-
+
while (((drvCmnd = virtualize((c=getch()))) != CMD_QUIT)) {
switch((err=driver(drvCmnd))) {
case E_REQUEST_DENIED:
@@ -295,7 +295,7 @@ NCursesForm::operator()(void) {
// code c into a form request code.
// The default implementation provides a hopefully straightforward
// mapping for the most common keystrokes and form requests.
-int
+int
NCursesForm::virtualize(int c) {
switch(c) {
@@ -318,7 +318,7 @@ NCursesForm::virtualize(int c) {
case CTRL('F') : return(REQ_NEXT_FIELD); // Forward
case CTRL('B') : return(REQ_PREV_FIELD); // Backward
- case CTRL('L') : return(REQ_LEFT_FIELD); // Left
+ case CTRL('L') : return(REQ_LEFT_FIELD); // Left
case CTRL('R') : return(REQ_RIGHT_FIELD); // Right
case CTRL('U') : return(REQ_UP_FIELD); // Up
case CTRL('D') : return(REQ_DOWN_FIELD); // Down
@@ -341,7 +341,7 @@ NCursesForm::virtualize(int c) {
case CTRL('N') : return(REQ_NEXT_CHOICE);
case CTRL('P') : return(REQ_PREV_CHOICE);
-
+
default:
return(c);
}
@@ -362,7 +362,7 @@ bool UserDefinedFieldType::fcheck(FIELD *f, const void *u) {
bool UserDefinedFieldType::ccheck(int c, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F != 0);
- UserDefinedFieldType* udf =
+ UserDefinedFieldType* udf =
(UserDefinedFieldType*)(F->fieldtype());
assert(udf != 0);
return udf->char_check(c);
@@ -383,7 +383,7 @@ FIELDTYPE* UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice =
bool UserDefinedFieldType_With_Choice::next_choice(FIELD *f, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F != 0);
- UserDefinedFieldType_With_Choice* udf =
+ UserDefinedFieldType_With_Choice* udf =
(UserDefinedFieldType_With_Choice*)(F->fieldtype());
assert(udf != 0);
return udf->next(*F);
@@ -392,7 +392,7 @@ bool UserDefinedFieldType_With_Choice::next_choice(FIELD *f, const void *u) {
bool UserDefinedFieldType_With_Choice::prev_choice(FIELD *f, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F != 0);
- UserDefinedFieldType_With_Choice* udf =
+ UserDefinedFieldType_With_Choice* udf =
(UserDefinedFieldType_With_Choice*)(F->fieldtype());
assert(udf != 0);
return udf->previous(*F);
@@ -408,7 +408,7 @@ public:
UserDefinedFieldType::makearg,
NULL,
NULL);
- if (code==E_OK)
+ if (code==E_OK)
code = ::set_fieldtype_arg
(UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice,
UserDefinedFieldType::makearg,
diff --git a/contrib/ncurses/c++/cursesf.h b/contrib/ncurses/c++/cursesf.h
index 40f4146172c3..3dc2e9557c0f 100644
--- a/contrib/ncurses/c++/cursesf.h
+++ b/contrib/ncurses/c++/cursesf.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,10 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: cursesf.h,v 1.12 2000/07/15 21:08:25 tom Exp $
+// $Id: cursesf.h,v 1.15 2001/03/24 21:41:23 tom Exp $
-#ifndef _CURSESF_H
-#define _CURSESF_H
+#ifndef NCURSES_CURSESF_H_incl
+#define NCURSES_CURSESF_H_incl 1
#include <cursesp.h>
#include <string.h>
@@ -47,11 +47,11 @@ extern "C" {
// The abstract base class for buitin and user defined Fieldtypes.
// -------------------------------------------------------------------------
//
-class NCursesFormField; // forward declaration
+class NCURSES_IMPEXP NCursesFormField; // forward declaration
// Class to represent builtin field types as well as C++ written new
// fieldtypes (see classes UserDefineFieldType...
-class NCursesFieldType {
+class NCURSES_IMPEXP NCursesFieldType {
friend class NCursesFormField;
protected:
@@ -80,7 +80,7 @@ public:
// The class representing a forms field, wrapping the lowlevel FIELD struct
// -------------------------------------------------------------------------
//
-class NCursesFormField {
+class NCURSES_IMPEXP NCursesFormField {
friend class NCursesForm;
protected:
@@ -288,7 +288,7 @@ public:
// The class representing a form, wrapping the lowlevel FORM struct
// -------------------------------------------------------------------------
//
-class NCursesForm : public NCursesPanel {
+class NCURSES_IMPEXP NCursesForm : public NCursesPanel {
protected:
FORM* form; // the lowlevel structure
@@ -541,7 +541,7 @@ public:
// data belongs to some class T. Use T as template argument
// to create a UserField.
// -------------------------------------------------------------------------
-template<class T> class NCursesUserField : public NCursesFormField
+template<class T> class NCURSES_IMPEXP NCursesUserField : public NCursesFormField
{
public:
NCursesUserField (int rows,
@@ -574,7 +574,7 @@ public:
// The same mechanism is used to attach user data to a form
// -------------------------------------------------------------------------
//
-template<class T> class NCursesUserForm : public NCursesForm
+template<class T> class NCURSES_IMPEXP NCursesUserForm : public NCursesForm
{
protected:
// 'Internal' constructor, builds an object without association to a
@@ -637,7 +637,7 @@ public:
// Builtin Fieldtypes
// -------------------------------------------------------------------------
//
-class Alpha_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType {
private:
int min_field_width;
@@ -652,7 +652,7 @@ public:
}
};
-class Alphanumeric_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType {
private:
int min_field_width;
@@ -667,7 +667,7 @@ public:
}
};
-class Integer_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Integer_Field : public NCursesFieldType {
private:
int precision;
long lower_limit, upper_limit;
@@ -684,7 +684,7 @@ public:
}
};
-class Numeric_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType {
private:
int precision;
double lower_limit, upper_limit;
@@ -701,7 +701,7 @@ public:
}
};
-class Regular_Expression_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType {
private:
char* regex;
@@ -712,8 +712,8 @@ private:
public:
Regular_Expression_Field(const char *expr)
: NCursesFieldType(TYPE_REGEXP) {
- regex = new char[1+::strlen(expr)];
- (strcpy)(regex,expr);
+ regex = new char[1 + ::strlen(expr)];
+ (::strcpy)(regex,expr);
}
~Regular_Expression_Field() {
@@ -721,7 +721,7 @@ public:
}
};
-class Enumeration_Field : public NCursesFieldType {
+class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType {
private:
char** list;
int case_sensitive;
@@ -742,7 +742,7 @@ public:
}
};
-class IPV4_Address_Field : public NCursesFieldType {
+class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType {
private:
void set(NCursesFormField& f) {
OnError(::set_field_type(f.get_field(),fieldtype));
@@ -757,7 +757,7 @@ public:
// Abstract base class for User-Defined Fieldtypes
// -------------------------------------------------------------------------
//
-class UserDefinedFieldType : public NCursesFieldType {
+class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType {
friend class UDF_Init; // Internal helper to set up statics
private:
// For all C++ defined fieldtypes we need only one generic lowlevel
@@ -793,7 +793,7 @@ public:
// Abstract base class for User-Defined Fieldtypes with Choice functions
// -------------------------------------------------------------------------
//
-class UserDefinedFieldType_With_Choice : public UserDefinedFieldType {
+class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType {
friend class UDF_Init; // Internal helper to set up statics
private:
// For all C++ defined fieldtypes with choice functions we need only one
@@ -820,5 +820,5 @@ public:
}
};
-#endif // _CURSESF_H
+#endif // NCURSES_CURSESF_H_incl
diff --git a/contrib/ncurses/c++/cursesm.cc b/contrib/ncurses/c++/cursesm.cc
index 3b4dbd58bef1..410cdbc892db 100644
--- a/contrib/ncurses/c++/cursesm.cc
+++ b/contrib/ncurses/c++/cursesm.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,18 +31,18 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
+#include "internal.h"
#include "cursesm.h"
#include "cursesapp.h"
-#include "internal.h"
-MODULE_ID("$Id: cursesm.cc,v 1.12 1999/10/30 23:59:37 tom Exp $")
-
+MODULE_ID("$Id: cursesm.cc,v 1.15 2001/03/24 20:03:56 tom Exp $")
+
NCursesMenuItem::~NCursesMenuItem() {
if (item)
OnError(::free_item(item));
}
-bool
+bool
NCursesMenuItem::action() {
return FALSE;
};
@@ -50,7 +50,7 @@ NCursesMenuItem::action() {
NCursesMenuCallbackItem::~NCursesMenuCallbackItem() {
}
-bool
+bool
NCursesMenuCallbackItem::action() {
if (p_fct)
return p_fct (*this);
@@ -60,7 +60,7 @@ NCursesMenuCallbackItem::action() {
/* Internal hook functions. They will route the hook
* calls to virtual methods of the NCursesMenu class,
- * so in C++ providing a hook is done simply by
+ * so in C++ providing a hook is done simply by
* implementing a virtual method in a derived class
*/
void
@@ -91,21 +91,21 @@ NCursesMenu::itm_term(MENU *m) {
ITEM**
NCursesMenu::mapItems(NCursesMenuItem* nitems[]) {
int itemCount = 0,lcv;
-
+
for (lcv=0; nitems[lcv]->item; ++lcv)
++itemCount;
-
+
ITEM** items = new ITEM*[itemCount + 1];
-
+
for (lcv=0;nitems[lcv]->item;++lcv) {
items[lcv] = nitems[lcv]->item;
}
items[lcv] = NULL;
-
+
my_items = nitems;
-
+
if (menu)
- delete[] ::menu_items(menu);
+ delete[] ::menu_items(menu);
return items;
}
@@ -114,7 +114,7 @@ NCursesMenu::InitMenu(NCursesMenuItem* nitems[],
bool with_frame,
bool autoDelete_Items) {
int mrows, mcols;
-
+
keypad(TRUE);
meta(TRUE);
@@ -125,24 +125,24 @@ NCursesMenu::InitMenu(NCursesMenuItem* nitems[],
menu = ::new_menu(mapItems(nitems));
if (!menu)
OnError (E_SYSTEM_ERROR);
-
+
UserHook* hook = new UserHook;
hook->m_user = NULL;
hook->m_back = this;
hook->m_owner = menu;
::set_menu_userptr(menu,(void*)hook);
-
+
::set_menu_init (menu, NCursesMenu::mnu_init);
::set_menu_term (menu, NCursesMenu::mnu_term);
::set_item_init (menu, NCursesMenu::itm_init);
::set_item_term (menu, NCursesMenu::itm_term);
-
+
scale(mrows, mcols);
::set_menu_win(menu, w);
-
+
if (with_frame) {
if ((mrows > height()-2) || (mcols > width()-2))
- OnError(E_NO_ROOM);
+ OnError(E_NO_ROOM);
sub = new NCursesWindow(*this,mrows,mcols,1,1,'r');
::set_menu_sub(menu, sub->w);
b_sub_owner = TRUE;
@@ -180,14 +180,14 @@ NCursesMenu::~NCursesMenu() {
if (b_autoDelete) {
if (cnt>0) {
for (int i=0; i <= cnt; i++)
- delete my_items[i];
+ delete my_items[i];
}
delete[] my_items;
}
::free_menu(menu);
// It's essential to do this after free_menu()
- delete[] itms;
+ delete[] itms;
}
}
@@ -218,7 +218,7 @@ NCursesMenu::set_pattern (const char *pat) {
}
// call the menu driver and do basic error checking.
-int
+int
NCursesMenu::driver (int c) {
int res = ::menu_driver (menu, c);
switch (res) {
@@ -243,7 +243,7 @@ static const int CMD_ACTION = MAX_COMMAND + 2;
// The default implementation provides a hopefully straightforward
// mapping for the most common keystrokes and menu requests.
// -------------------------------------------------------------------------
-int
+int
NCursesMenu::virtualize(int c) {
switch(c) {
case CTRL('X') : return(CMD_QUIT); // eXit
@@ -290,7 +290,7 @@ NCursesMenu::operator()(void) {
post();
show();
refresh();
-
+
while (!b_action && ((drvCmnd = virtualize((c=getch()))) != CMD_QUIT)) {
switch((err=driver(drvCmnd))) {
@@ -363,21 +363,20 @@ NCursesMenu::On_Item_Termination(NCursesMenuItem& item) {
void
NCursesMenu::On_Request_Denied(int c) const {
- beep();
+ ::beep();
}
void
NCursesMenu::On_Not_Selectable(int c) const {
- beep();
+ ::beep();
}
void
NCursesMenu::On_No_Match(int c) const {
- beep();
+ ::beep();
}
void
NCursesMenu::On_Unknown_Command(int c) const {
- beep();
+ ::beep();
}
-
diff --git a/contrib/ncurses/c++/cursesm.h b/contrib/ncurses/c++/cursesm.h
index 26e0b4ce2b02..541ba038795b 100644
--- a/contrib/ncurses/c++/cursesm.h
+++ b/contrib/ncurses/c++/cursesm.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,10 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: cursesm.h,v 1.13 1999/10/30 23:59:37 tom Exp $
+// $Id: cursesm.h,v 1.15 2001/03/24 21:41:28 tom Exp $
-#ifndef _CURSESM_H
-#define _CURSESM_H
+#ifndef NCURSES_CURSESM_H_incl
+#define NCURSES_CURSESM_H_incl 1
#include <cursesp.h>
@@ -46,7 +46,7 @@ extern "C" {
// This wraps the ITEM type of <menu.h>
// -------------------------------------------------------------------------
//
-class NCursesMenuItem {
+class NCURSES_IMPEXP NCursesMenuItem {
friend class NCursesMenu;
protected:
@@ -135,7 +135,7 @@ typedef bool ITEMCALLBACK(NCursesMenuItem&);
// If you don't like to create a child class for individual items to
// overload action(), you may use this class and provide a callback
// function pointer for items.
-class NCursesMenuCallbackItem : public NCursesMenuItem {
+class NCURSES_IMPEXP NCursesMenuCallbackItem : public NCursesMenuItem {
private:
ITEMCALLBACK* p_fct;
@@ -156,7 +156,7 @@ public:
// This wraps the MENU type of <menu.h>
// -------------------------------------------------------------------------
//
-class NCursesMenu : public NCursesPanel {
+class NCURSES_IMPEXP NCursesMenu : public NCursesPanel {
protected:
MENU *menu;
@@ -514,7 +514,7 @@ public:
// to create a UserItem.
// -------------------------------------------------------------------------
//
-template<class T> class NCursesUserItem : public NCursesMenuItem
+template<class T> class NCURSES_IMPEXP NCursesUserItem : public NCursesMenuItem
{
public:
NCursesUserItem (const char* p_name,
@@ -541,7 +541,7 @@ public:
// The same mechanism is used to attach user data to a menu
// -------------------------------------------------------------------------
//
-template<class T> class NCursesUserMenu : public NCursesMenu
+template<class T> class NCURSES_IMPEXP NCursesUserMenu : public NCursesMenu
{
protected:
NCursesUserMenu( int lines,
@@ -589,4 +589,4 @@ public:
}
};
-#endif // _CURSESM_H
+#endif // NCURSES_CURSESM_H_incl
diff --git a/contrib/ncurses/c++/cursesmain.cc b/contrib/ncurses/c++/cursesmain.cc
index 09400b8d690a..03f61bc3da68 100644
--- a/contrib/ncurses/c++/cursesmain.cc
+++ b/contrib/ncurses/c++/cursesmain.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,10 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-#include "cursesapp.h"
#include "internal.h"
+#include "cursesapp.h"
-MODULE_ID("$Id: cursesmain.cc,v 1.5 1999/05/16 17:31:22 juergen Exp $")
+MODULE_ID("$Id: cursesmain.cc,v 1.7 2001/03/24 21:25:47 tom Exp $")
/* This is the default implementation of main() for a NCursesApplication.
* You only have to instantiate a static NCursesApplication object in your
diff --git a/contrib/ncurses/c++/cursesp.cc b/contrib/ncurses/c++/cursesp.cc
index 50095d3d2144..bfd4d9f4dda3 100644
--- a/contrib/ncurses/c++/cursesp.cc
+++ b/contrib/ncurses/c++/cursesp.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,11 +31,11 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1993,1997 *
****************************************************************************/
-#include "cursesp.h"
#include "internal.h"
+#include "cursesp.h"
#include <string.h>
-MODULE_ID("$Id: cursesp.cc,v 1.16 2000/07/15 21:08:13 tom Exp $")
+MODULE_ID("$Id: cursesp.cc,v 1.18 2001/03/24 20:04:04 tom Exp $")
NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0;
@@ -75,7 +75,7 @@ NCursesPanel::redraw() {
int
NCursesPanel::refresh() {
::update_panels();
- return doupdate();
+ return ::doupdate();
}
int
@@ -116,7 +116,7 @@ NCursesPanel::label(const char *tLabel, const char *bLabel) {
void
NCursesPanel::centertext(int row,const char *label) {
if (label) {
- int x = (maxx() - strlen(label)) / 2;
+ int x = (maxx() - ::strlen(label)) / 2;
if (x<0)
x=0;
OnError(addstr(row, x, label, width()));
diff --git a/contrib/ncurses/c++/cursesp.h b/contrib/ncurses/c++/cursesp.h
index 6293dd102e87..b56580a6376f 100644
--- a/contrib/ncurses/c++/cursesp.h
+++ b/contrib/ncurses/c++/cursesp.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,10 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-#ifndef _CURSESP_H
-#define _CURSESP_H
+#ifndef NCURSES_CURSESP_H_incl
+#define NCURSES_CURSESP_H_incl 1
-// $Id: cursesp.h,v 1.12 1999/10/31 00:00:02 tom Exp $
+// $Id: cursesp.h,v 1.14 2001/03/24 21:41:35 tom Exp $
#include <cursesw.h>
@@ -42,7 +42,7 @@ extern "C" {
# include <panel.h>
}
-class NCursesPanel : public NCursesWindow {
+class NCURSES_IMPEXP NCursesPanel : public NCursesWindow {
protected:
PANEL *p;
static NCursesPanel *dummy;
@@ -215,4 +215,4 @@ public:
// Associate the user panel with the user data pointed to by p_UserData.
};
-#endif // _CURSESP_H
+#endif // NCURSES_CURSESP_H_incl
diff --git a/contrib/ncurses/c++/cursespad.cc b/contrib/ncurses/c++/cursespad.cc
index b82d39399b45..64795120ebb7 100644
--- a/contrib/ncurses/c++/cursespad.cc
+++ b/contrib/ncurses/c++/cursespad.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1999,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,11 +31,11 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1999 *
****************************************************************************/
+#include "internal.h"
#include "etip.h"
#include "cursesw.h"
-#include "internal.h"
-MODULE_ID("$Id: cursespad.cc,v 1.2 1999/09/11 23:25:54 tom Exp $")
+MODULE_ID("$Id: cursespad.cc,v 1.4 2001/03/24 21:25:57 tom Exp $")
NCursesPad::NCursesPad(int lines, int cols)
: NCursesWindow(),
diff --git a/contrib/ncurses/c++/cursesw.cc b/contrib/ncurses/c++/cursesw.cc
index b61a7056af15..463554b404e6 100644
--- a/contrib/ncurses/c++/cursesw.cc
+++ b/contrib/ncurses/c++/cursesw.cc
@@ -22,10 +22,10 @@
modified by Juergen Pfeifer (juergen.pfeifer@gmx.net)
*/
-#include "cursesw.h"
#include "internal.h"
+#include "cursesw.h"
-MODULE_ID("$Id: cursesw.cc,v 1.17 2000/09/02 18:55:31 tom Exp $")
+MODULE_ID("$Id: cursesw.cc,v 1.21 2001/04/07 22:11:39 tom Exp $")
#define COLORS_NEED_INITIALIZATION -1
#define COLORS_NOT_INITIALIZED 0
@@ -45,43 +45,52 @@ bool NCursesWindow::b_initialized = FALSE;
int
NCursesWindow::scanw(const char* fmt, ...)
{
+ int result = ERR;
#if defined(__GNUG__)
- va_list args;
- va_start(args, fmt);
char buf[BUFSIZ];
- int result = wgetstr(w, buf);
- if (result == OK) {
+
+ if (::wgetnstr(w, buf, sizeof(buf)) != ERR) {
+ va_list args;
+ va_start(args, fmt);
+#if USE_STDIO_VSCAN
+ if (::vscanf(fmt, args) != -1)
+ result = OK;
+#elif USE_STRSTREAM_VSCAN /* pre-gcc 3.0 */
strstreambuf ss(buf, sizeof(buf));
- result = ss.vscan(fmt, (_IO_va_list)args);
+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
+ result = OK;
+#endif
+ va_end(args);
}
- va_end(args);
- return result;
-#else
- return ERR;
#endif
+ return result;
}
int
NCursesWindow::scanw(int y, int x, const char* fmt, ...)
{
+ int result = ERR;
#if defined(__GNUG__)
- va_list args;
- va_start(args, fmt);
char buf[BUFSIZ];
- int result = wmove(w, y, x);
- if (result == OK) {
- result = wgetstr(w, buf);
- if (result == OK) {
+
+ if (::wmove(w, y, x) != ERR) {
+ if (::wgetnstr(w, buf, sizeof(buf)) != ERR) {
+ va_list args;
+ va_start(args, fmt);
+#if USE_STDIO_VSCAN
+ if (::vscanf(fmt, args) != -1)
+ result = OK;
+#elif USE_STRSTREAM_VSCAN /* pre-gcc 3.0 */
strstreambuf ss(buf, sizeof(buf));
- result = ss.vscan(fmt, (_IO_va_list)args);
+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
+ result = OK;
+#endif
+ va_end(args);
}
}
- va_end(args);
- return result;
-#else
- return ERR;
#endif
+ return result;
}
@@ -91,7 +100,7 @@ NCursesWindow::printw(const char * fmt, ...)
va_list args;
va_start(args, fmt);
char buf[BUFSIZ];
- vsprintf(buf, fmt, args);
+ ::vsprintf(buf, fmt, args);
va_end(args);
return waddstr(w, buf);
}
@@ -102,10 +111,10 @@ NCursesWindow::printw(int y, int x, const char * fmt, ...)
{
va_list args;
va_start(args, fmt);
- int result = wmove(w, y, x);
+ int result = ::wmove(w, y, x);
if (result == OK) {
char buf[BUFSIZ];
- vsprintf(buf, fmt, args);
+ ::vsprintf(buf, fmt, args);
result = waddstr(w, buf);
}
va_end(args);
@@ -142,8 +151,7 @@ NCursesWindow::initialize() {
}
NCursesWindow::NCursesWindow() {
- if (!b_initialized)
- initialize();
+ initialize();
w = (WINDOW *)0;
init();
@@ -154,8 +162,7 @@ NCursesWindow::NCursesWindow() {
NCursesWindow::NCursesWindow(int lines, int cols, int begin_y, int begin_x)
{
- if (!b_initialized)
- initialize();
+ initialize();
w = ::newwin(lines, cols, begin_y, begin_x);
if (w == 0) {
@@ -170,8 +177,7 @@ NCursesWindow::NCursesWindow(int lines, int cols, int begin_y, int begin_x)
NCursesWindow::NCursesWindow(WINDOW* &window)
{
- if (!b_initialized)
- initialize();
+ initialize();
w = window;
init();
@@ -183,6 +189,7 @@ NCursesWindow::NCursesWindow(WINDOW* &window)
NCursesWindow::NCursesWindow(NCursesWindow& win, int l, int c,
int begin_y, int begin_x, char absrel)
{
+ initialize();
if (absrel == 'a') { // absolute origin
begin_y -= win.begy();
begin_x -= win.begx();
@@ -208,6 +215,7 @@ NCursesWindow::NCursesWindow(NCursesWindow& win, int l, int c,
NCursesWindow::NCursesWindow(NCursesWindow& win,
bool do_box NCURSES_PARAM_INIT(TRUE))
{
+ initialize();
w = :: derwin(win.w,win.height()-2,win.width()-2,1,1);
if (w == 0) {
err_handler("Cannot construct subwindow");
@@ -244,6 +252,7 @@ static RIPOFFINIT* prip = R_INIT;
extern "C" int _nc_ripoffline(int,int (*init)(WINDOW*,int));
NCursesWindow::NCursesWindow(WINDOW *win, int cols) {
+ initialize();
w = win;
assert((w->_maxx+1)==cols);
alloced = FALSE;
@@ -323,7 +332,7 @@ NCursesWindow::~NCursesWindow()
}
if (alloced && w != 0)
- delwin(w);
+ ::delwin(w);
if (alloced) {
--count;
@@ -364,7 +373,7 @@ NCursesWindow::getcolor(int getback) const
short fore, back;
if (colorInitialized==COLORS_ARE_REALLY_THERE) {
- if (pair_content((short)PAIR_NUMBER(w->_attrs), &fore, &back))
+ if (::pair_content((short)PAIR_NUMBER(w->_attrs), &fore, &back))
err_handler("Can't get color pair");
}
else {
@@ -396,7 +405,7 @@ int
NCursesWindow::setpalette(short fore, short back, short pair)
{
if (colorInitialized==COLORS_ARE_REALLY_THERE)
- return init_pair(pair, fore, back);
+ return ::init_pair(pair, fore, back);
else
return OK;
}
diff --git a/contrib/ncurses/c++/cursesw.h b/contrib/ncurses/c++/cursesw.h
index 8091194cbc5e..dcaadd9b3098 100644
--- a/contrib/ncurses/c++/cursesw.h
+++ b/contrib/ncurses/c++/cursesw.h
@@ -1,19 +1,42 @@
// * This makes emacs happy -*-Mode: C++;-*-
-#ifndef _CURSESW_H
-#define _CURSESW_H
-
-// $Id: cursesw.h,v 1.18 1999/10/23 15:16:53 tom Exp $
+/****************************************************************************
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+#ifndef NCURSES_CURSESW_H_incl
+#define NCURSES_CURSESW_H_incl 1
+
+// $Id: cursesw.h,v 1.25 2001/04/07 22:44:07 tom Exp $
#include <etip.h>
#include <stdio.h>
#include <stdarg.h>
-#ifdef __MWERKS__
-/* This is a bogus check, stringstream is actually ANSI C++ standard,
- * but old compilers like GCC don't have it, and new compilers like Metrowerks
- * don't have strstream
- */
-#include <sstream>
-#else
+
+#if HAVE_STRSTREAM_H && USE_STRSTREAM_VSCAN
#include <strstream.h>
#endif
@@ -118,7 +141,7 @@ inline int UNDEF(clearok)(WINDOW* win, bool bf) { return clearok(win, bf); }
#undef clearok
#define clearok UNDEF(clearok)
#else
-extern "C" int clearok(WINDOW*, bool);
+extern "C" NCURSES_IMPEXP int NCURSES_API clearok(WINDOW*, bool);
#endif
#ifdef clrtobot
@@ -152,7 +175,7 @@ inline int UNDEF(erase)() { return erase(); }
#endif
#ifdef flushok
-inline int UNDEF(flushok)(WINDOW* _win, bool _bf) {
+inline int UNDEF(flushok)(WINDOW* _win, bool _bf) {
return flushok(_win, _bf); }
#undef flushok
#define flushok UNDEF(flushok)
@@ -185,49 +208,49 @@ inline int UNDEF(innstr)(char *_str, int n) { return innstr(_str,n); }
#endif
#ifdef mvwinnstr
-inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) {
+inline int UNDEF(mvwinnstr)(WINDOW *win, int y, int x, char *_str, int n) {
return mvwinnstr(win,y,x,_str,n); }
#undef mvwinnstr
#define mvwinnstr UNDEF(mvwinnstr)
#endif
#ifdef mvinnstr
-inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) {
+inline int UNDEF(mvinnstr)(int y, int x, char *_str, int n) {
return mvinnstr(y,x,_str,n); }
#undef mvinnstr
#define mvinnstr UNDEF(mvinnstr)
#endif
#ifdef winsstr
-inline int UNDEF(winsstr)(WINDOW *w, const char *_str) {
+inline int UNDEF(winsstr)(WINDOW *w, const char *_str) {
return winsstr(w,_str); }
#undef winsstr
#define winsstr UNDEF(winsstr)
#endif
#ifdef mvwinsstr
-inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) {
+inline int UNDEF(mvwinsstr)(WINDOW *w, int y, int x, const char *_str) {
return mvwinsstr(w,y,x,_str); }
#undef mvwinsstr
#define mvwinsstr UNDEF(mvwinsstr)
#endif
#ifdef insstr
-inline int UNDEF(insstr)(const char *_str) {
+inline int UNDEF(insstr)(const char *_str) {
return insstr(_str); }
#undef insstr
#define insstr UNDEF(insstr)
#endif
#ifdef mvinsstr
-inline int UNDEF(mvinsstr)(int y, int x,const char *_str) {
+inline int UNDEF(mvinsstr)(int y, int x,const char *_str) {
return mvinsstr(y,x,_str); }
#undef mvinsstr
#define mvinsstr UNDEF(mvinsstr)
#endif
#ifdef insnstr
-inline int UNDEF(insnstr)(const char *_str, int n) {
+inline int UNDEF(insnstr)(const char *_str, int n) {
return insnstr(_str,n); }
#undef insnstr
#define insnstr UNDEF(insnstr)
@@ -254,7 +277,7 @@ inline int UNDEF(getnstr)(char *_str, int n) { return getnstr(_str,n); }
#endif
#ifdef getyx
-inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) {
+inline void UNDEF(getyx)(const WINDOW* win, int& y, int& x) {
getyx(win, y, x); }
#undef getyx
#define getyx UNDEF(getyx)
@@ -301,7 +324,7 @@ inline int UNDEF(leaveok)(WINDOW* win, bool bf) { return leaveok(win, bf); }
#undef leaveok
#define leaveok UNDEF(leaveok)
#else
-extern "C" int leaveok(WINDOW* win, bool bf);
+extern "C" NCURSES_IMPEXP int NCURSES_API leaveok(WINDOW* win, bool bf);
#endif
#ifdef move
@@ -340,9 +363,9 @@ inline int UNDEF(scrollok)(WINDOW* win, bool bf) { return scrollok(win, bf); }
#define scrollok UNDEF(scrollok)
#else
#if defined(__NCURSES_H)
-extern "C" int scrollok(WINDOW*, bool);
+extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, bool);
#else
-extern "C" int scrollok(WINDOW*, char);
+extern "C" NCURSES_IMPEXP int NCURSES_API scrollok(WINDOW*, char);
#endif
#endif
@@ -365,7 +388,7 @@ inline int UNDEF(standout)() { return standout(); }
#endif
#ifdef subpad
-inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x)
+inline WINDOW *UNDEF(subpad)(WINDOW *p, int l, int c, int y, int x)
{ return derwin(p,l,c,y,x); }
#undef subpad
#define subpad UNDEF(subpad)
@@ -434,7 +457,7 @@ inline int UNDEF(wattroff)(WINDOW *win, int att) { return wattroff(win, att); }
#endif
#ifdef chgat
-inline int UNDEF(chgat)(int n,attr_t attr, short color, const void *opts) {
+inline int UNDEF(chgat)(int n,attr_t attr, short color, const void *opts) {
return chgat(n,attr,color,opts); }
#undef chgat
#define chgat UNDEF(chgat)
@@ -442,7 +465,7 @@ inline int UNDEF(chgat)(int n,attr_t attr, short color, const void *opts) {
#ifdef mvchgat
inline int UNDEF(mvchgat)(int y, int x, int n,
- attr_t attr, short color, const void *opts) {
+ attr_t attr, short color, const void *opts) {
return mvchgat(y,x,n,attr,color,opts); }
#undef mvchgat
#define mvchgat UNDEF(mvchgat)
@@ -450,7 +473,7 @@ inline int UNDEF(mvchgat)(int y, int x, int n,
#ifdef mvwchgat
inline int UNDEF(mvwchgat)(WINDOW *win, int y, int x, int n,
- attr_t attr, short color, const void *opts) {
+ attr_t attr, short color, const void *opts) {
return mvwchgat(win,y,x,n,attr,color,opts); }
#undef mvwchgat
#define mvwchgat UNDEF(mvwchgat)
@@ -538,7 +561,7 @@ inline int UNDEF(mvwgetnstr)(WINDOW *win, int y, int x, char *str, int n)
#endif
#ifdef mvwinch
-inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) {
+inline chtype UNDEF(mvwinch)(WINDOW *win, int y, int x) {
return mvwinch(win, y, x);}
#undef mvwinch
#define mvwinch UNDEF(mvwinch)
@@ -671,18 +694,18 @@ inline void UNDEF(bkgdset)(chtype ch) { bkgdset(ch); }
*
*/
-class NCursesWindow
+class NCURSES_IMPEXP NCursesWindow
{
friend class NCursesMenu;
friend class NCursesForm;
-
+
private:
static bool b_initialized;
static void initialize();
static int ripoff_init(WINDOW *,int);
- void init();
-
+ void init();
+
short getcolor(int getback) const;
static int setpalette(short fore, short back, short pair);
@@ -700,15 +723,15 @@ protected:
// We rely on the c++ promise that
// all otherwise uninitialized
// static class vars are set to 0
-
+
WINDOW* w; // the curses WINDOW
-
+
bool alloced; // TRUE if we own the WINDOW
-
+
NCursesWindow* par; // parent, if subwindow
NCursesWindow* subwins; // head of subwindows list
NCursesWindow* sib; // next subwindow of parent
-
+
void kill_subwindows(); // disable all subwindows
// Destroy all subwindows.
@@ -718,12 +741,12 @@ protected:
public:
NCursesWindow(WINDOW* &window); // useful only for stdscr
-
+
NCursesWindow(int lines, // number of lines
int cols, // number of columns
int begin_y, // line origin
int begin_x); // col origin
-
+
NCursesWindow(NCursesWindow& par,// parent window
int lines, // number of lines
int cols, // number of columns
@@ -751,9 +774,9 @@ public:
int (*init)(NCursesWindow& win));
// This function is used to generate a window of ripped-of lines.
// If the argument is positive, lines are removed from the top, if it
- // is negative lines are removed from the bottom. This enhances the
- // lowlevel ripoffline() function because it uses the internal
- // implementation that allows to remove more than just a single line.
+ // is negative lines are removed from the bottom. This enhances the
+ // lowlevel ripoffline() function because it uses the internal
+ // implementation that allows to remove more than just a single line.
// This function must be called before any other ncurses function. The
// creation of the window is defered until ncurses gets initialized.
// The initialization function is then called.
@@ -761,13 +784,13 @@ public:
// -------------------------------------------------------------------------
// terminal status
// -------------------------------------------------------------------------
- int lines() const { return LINES; }
+ int lines() const { initialize(); return LINES; }
// Number of lines on terminal, *not* window
- int cols() const { return COLS; }
+ int cols() const { initialize(); return COLS; }
// Number of cols on terminal, *not* window
- int tabsize() const { return TABSIZE; }
+ int tabsize() const { initialize(); return TABSIZE; }
// Size of a tab on terminal, *not* window
static int NumberOfColors();
@@ -775,7 +798,7 @@ public:
int colors() const { return NumberOfColors(); }
// Number of available colors
-
+
// -------------------------------------------------------------------------
// window status
// -------------------------------------------------------------------------
@@ -811,7 +834,7 @@ public:
int setcolor(short pair);
// Set actually used palette entry
-
+
// -------------------------------------------------------------------------
// window positioning
// -------------------------------------------------------------------------
@@ -827,12 +850,12 @@ public:
// Move cursor the this position
void getyx(int& y, int& x) const { ::getyx(w, y, x); }
- // Get current position of the cursor
+ // Get current position of the cursor
- int mvcur(int oldrow, int oldcol, int newrow, int newcol) const {
+ int mvcur(int oldrow, int oldcol, int newrow, int newcol) const {
return ::mvcur(oldrow, oldcol, newrow, newcol); }
// Perform lowlevel cursor motion that takes effect immediately.
-
+
// -------------------------------------------------------------------------
// input
// -------------------------------------------------------------------------
@@ -842,13 +865,13 @@ public:
int getch(int y, int x) { return ::mvwgetch(w,y,x); }
// Move cursor to position and get a keystroke from the window
- int getstr(char* str, int n=-1) {
+ int getstr(char* str, int n=-1) {
return ::wgetnstr(w, str,n); }
// Read a series of characters into str until a newline or carriage return
// is received. Read at most n characters. If n is negative, the limit is
// ignored.
- int getstr(int y, int x, char* str, int n=-1) {
+ int getstr(int y, int x, char* str, int n=-1) {
return ::mvwgetnstr(w,y,x,str,n); }
// Move the cursor to the requested position and then perform the getstr()
// as described above.
@@ -880,12 +903,12 @@ public:
#else
;
#endif
-
+
// -------------------------------------------------------------------------
// output
// -------------------------------------------------------------------------
int addch(const chtype ch) { return ::waddch(w, ch); }
- // Put attributed character to the window.
+ // Put attributed character to the window.
int addch(int y, int x, const chtype ch) {
return ::mvwaddch(w,y,x,ch); }
@@ -895,10 +918,10 @@ public:
int echochar(const chtype ch) { return ::wechochar(w,ch); }
// Put attributed character to the window and refresh it immediately.
- int addstr(const char* str, int n=-1) {
+ int addstr(const char* str, int n=-1) {
return ::waddnstr(w, (char*)str,n); }
// Write the string str to the window, stop writing if the terminating
- // NUL or the limit n is reached. If n is negative, it is ignored.
+ // NUL or the limit n is reached. If n is negative, it is ignored.
int addstr(int y, int x, const char * str, int n=-1) {
return ::mvwaddnstr(w,y,x,(char*)str,n); }
@@ -939,7 +962,7 @@ public:
int insertln() { return ::winsdelln(w,1); }
// Insert an empty line above the current line.
-
+
int insdelln(int n=1) { return ::winsdelln(w,n); }
// If n>0 insert that many lines above the current line. If n<0 delete
// that many lines beginning with the current line.
@@ -949,7 +972,7 @@ public:
// Insert the string into the window before the current cursor position.
// Insert stops at end of string or when the limit n is reached. If n is
// negative, it is ignored.
-
+
int insstr(int y, int x, const char *s, int n=-1) {
return ::mvwinsnstr(w,y,x,s,n); }
// Move the cursor to the requested position and then perform the insstr()
@@ -957,7 +980,7 @@ public:
int attron (chtype at) { return ::wattron (w, at); }
// Switch on the window attributes;
-
+
int attroff(chtype at) { return ::wattroff(w, (int) at); }
// Switch off the window attributes;
@@ -995,7 +1018,7 @@ public:
// -------------------------------------------------------------------------
// borders
// -------------------------------------------------------------------------
- int box(chtype vert=0, chtype hor=0) {
+ int box(chtype vert=0, chtype hor=0) {
return ::wborder(w, vert, vert, hor, hor, 0, 0 ,0, 0); }
// Draw a box around the window with the given vertical and horizontal
// drawing characters. If you specifiy a zero as character, curses will try
@@ -1016,7 +1039,7 @@ public:
// -------------------------------------------------------------------------
int hline(int len, chtype ch=0) { return ::whline(w, ch, len); }
// Draw a horizontal line of len characters with the given character. If
- // you pass zero for the character, curses will try to find a "nice" one.
+ // you pass zero for the character, curses will try to find a "nice" one.
int hline(int y, int x, int len, chtype ch=0) {
return ::mvwhline(w,y,x,ch,len); }
@@ -1029,7 +1052,7 @@ public:
int vline(int y, int x, int len, chtype ch=0) {
return ::mvwvline(w,y,x,ch,len); }
// Move the cursor to the requested position and then draw a vertical line.
-
+
// -------------------------------------------------------------------------
// erasure
// -------------------------------------------------------------------------
@@ -1050,7 +1073,7 @@ public:
// Clear to the end of the line.
int delch() { return ::wdelch(w); }
- // Delete character under the cursor.
+ // Delete character under the cursor.
int delch(int y, int x) { return ::mvwdelch(w,y,x); }
// Move cursor to requested position and delete the character under the
@@ -1090,18 +1113,18 @@ public:
int untouchwin() { return ::wtouchln(w,0,height(),0); }
// Mark the whole window as unmodified.
- int touchln(int s, int cnt, bool changed=TRUE) {
+ int touchln(int s, int cnt, bool changed=TRUE) {
return ::wtouchln(w,s,cnt,(int)(changed?1:0)); }
// Mark cnt lines beginning from line s as changed or unchanged, depending
// on the value of the changed flag.
- bool is_linetouched(int line) const {
+ bool is_linetouched(int line) const {
return (::is_linetouched(w,line) ? TRUE:FALSE); }
- // Return TRUE if line is marked as changed, FALSE otherwise
+ // Return TRUE if line is marked as changed, FALSE otherwise
- bool is_wintouched() const {
+ bool is_wintouched() const {
return (::is_wintouched(w) ? TRUE:FALSE); }
- // Return TRUE if window is marked as changed, FALSE otherwise
+ // Return TRUE if window is marked as changed, FALSE otherwise
int leaveok(bool bf) { return ::leaveok(w, bf); }
// If bf is TRUE, curses will leave the cursor after an update whereever
@@ -1141,7 +1164,7 @@ public:
int meta(bool bf) { return ::meta(w,bf); }
// If called with bf=TRUE, keys may generate 8-Bit characters. Otherwise
- // 7-Bit characters are generated.
+ // 7-Bit characters are generated.
int standout() { return ::wstandout(w); }
// Enable "standout" attributes
@@ -1158,9 +1181,9 @@ public:
// doupdate(). This is redefined in NCursesPanel.
virtual int noutrefresh() { return ::wnoutrefresh(w); }
- // Propagate the changes in this window to the virtual screen. This is
+ // Propagate the changes in this window to the virtual screen. This is
// redefined in NCursesPanel.
-
+
// -------------------------------------------------------------------------
// multiple window control
// -------------------------------------------------------------------------
@@ -1207,7 +1230,7 @@ public:
// -------------------------------------------------------------------------
// We leave this here for compatibility reasons.
// -------------------------------------------------------------------------
-class NCursesColorWindow : public NCursesWindow {
+class NCURSES_IMPEXP NCursesColorWindow : public NCursesWindow {
public:
NCursesColorWindow(WINDOW* &window) // useful only for stdscr
: NCursesWindow(window) {
@@ -1228,8 +1251,8 @@ public:
char absrel = 'a') // if `a', by & bx are
: NCursesWindow(par,lines,cols, // absolute screen pos,
begin_y,begin_x, // else if `r', they are
- absrel ) { // relative to par origin
- useColors(); }
+ absrel ) { // relative to par origin
+ useColors(); }
};
// These enum definitions really belong inside the NCursesPad class, but only
@@ -1251,7 +1274,7 @@ public:
// Pad Support. We allow an association of a pad with a "real" window
// through which the pad may be viewed.
// -------------------------------------------------------------------------
-class NCursesPad : public NCursesWindow {
+class NCURSES_IMPEXP NCursesPad : public NCursesWindow {
private:
NCursesWindow* viewWin; // the "viewport" window
NCursesWindow* viewSub; // the "viewport" subwindow
@@ -1301,7 +1324,7 @@ public:
int echochar(const chtype ch) { return ::pechochar(w,ch); }
// Put the attributed character onto the pad and immediately do a
// prefresh().
-
+
int refresh();
// If a viewport is defined the pad is displayed in this window, otherwise
// this is a noop.
@@ -1326,7 +1349,7 @@ public:
return ::pnoutrefresh(w,pminrow,pmincol,
sminrow,smincol,smaxrow,smaxcol);
}
- // Does the same like refresh() but without calling doupdate().
+ // Does the same as refresh() but without calling doupdate().
virtual void setWindow(NCursesWindow& view, int v_grid = 1, int h_grid = 1);
// Add the window "view" as viewing window to the pad.
@@ -1343,7 +1366,7 @@ public:
// A FramedPad is constructed always with a viewport window. This viewport
// will be framed (by a box() command) and the interior of the box is the
// viewport subwindow. On the frame we display scrollbar sliders.
-class NCursesFramedPad : public NCursesPad {
+class NCURSES_IMPEXP NCursesFramedPad : public NCursesPad {
protected:
virtual void OnOperation(int pad_req);
@@ -1372,4 +1395,4 @@ public:
};
-#endif // _CURSESW_H
+#endif // NCURSES_CURSESW_H_incl
diff --git a/contrib/ncurses/c++/cursslk.cc b/contrib/ncurses/c++/cursslk.cc
index 236d3a55b3dd..c0c372b04939 100644
--- a/contrib/ncurses/c++/cursslk.cc
+++ b/contrib/ncurses/c++/cursslk.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,23 +31,23 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
+#include "internal.h"
#include "cursslk.h"
#include "cursesapp.h"
-#include "internal.h"
#include <string.h>
-MODULE_ID("$Id: cursslk.cc,v 1.6 2000/07/15 21:07:50 tom Exp $")
+MODULE_ID("$Id: cursslk.cc,v 1.9 2001/03/24 20:04:15 tom Exp $")
void Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text) {
delete[] label;
label = new char[1 + ::strlen(text)];
- (strcpy)(label,text);
+ (::strcpy)(label,text);
}
long Soft_Label_Key_Set::count = 0L;
int Soft_Label_Key_Set::num_labels = 0;
-Soft_Label_Key_Set::Label_Layout
+Soft_Label_Key_Set::Label_Layout
Soft_Label_Key_Set::format = None;
void Soft_Label_Key_Set::init() {
diff --git a/contrib/ncurses/c++/cursslk.h b/contrib/ncurses/c++/cursslk.h
index 1598b0634bab..79fa9936fa94 100644
--- a/contrib/ncurses/c++/cursslk.h
+++ b/contrib/ncurses/c++/cursslk.h
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,17 +31,17 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: cursslk.h,v 1.5 1999/05/16 17:30:08 juergen Exp $
+// $Id: cursslk.h,v 1.7 2001/03/24 21:41:47 tom Exp $
-#ifndef _CURSSLK_H
-#define _CURSSLK_H
+#ifndef NCURSES_CURSSLK_H_incl
+#define NCURSES_CURSSLK_H_incl
#include <cursesw.h>
-class Soft_Label_Key_Set {
+class NCURSES_IMPEXP Soft_Label_Key_Set {
public:
// This inner class represents the attributes of a Soft Label Key (SLK)
- class Soft_Label_Key {
+ class NCURSES_IMPEXP Soft_Label_Key {
friend class Soft_Label_Key_Set;
public:
typedef enum { Left=0, Center=1, Right=2 } Justification;
@@ -83,10 +83,10 @@ public:
} Label_Layout;
private:
- static long count; // Number of Key Sets
- static Label_Layout format; // Layout of the Key Sets
- static int num_labels; // Number Of Labels in Key Sets
- bool b_attrInit; // Are attributes initialized
+ static long NCURSES_IMPEXP count; // Number of Key Sets
+ static Label_Layout NCURSES_IMPEXP format; // Layout of the Key Sets
+ static int NCURSES_IMPEXP num_labels; // Number Of Labels in Key Sets
+ bool NCURSES_IMPEXP b_attrInit; // Are attributes initialized
Soft_Label_Key *slk_array; // The array of SLK's
@@ -126,12 +126,12 @@ public:
// This constructor assumes, that you already constructed a Key Set
// with a layout by the constructor above. This layout will be reused.
- Soft_Label_Key_Set();
+ NCURSES_IMPEXP Soft_Label_Key_Set();
virtual ~Soft_Label_Key_Set();
// Get Label# i. Label counting starts with 1!
- Soft_Label_Key& operator[](int i);
+ NCURSES_IMPEXP Soft_Label_Key& operator[](int i);
// Retrieve number of Labels
inline int labels() const { return num_labels; }
@@ -202,4 +202,4 @@ public:
}
};
-#endif // _CURSSLK_H
+#endif // NCURSES_CURSSLK_H_incl
diff --git a/contrib/ncurses/c++/demo.cc b/contrib/ncurses/c++/demo.cc
index 088dc2fbc86d..8db700019b56 100644
--- a/contrib/ncurses/c++/demo.cc
+++ b/contrib/ncurses/c++/demo.cc
@@ -6,7 +6,7 @@
* Demo code for NCursesMenu and NCursesForm written by
* Juergen Pfeifer <juergen.pfeifer@gmx.net>
*
- * $Id: demo.cc,v 1.18 1999/09/11 18:57:54 tom Exp $
+ * $Id: demo.cc,v 1.20 2001/01/28 02:26:27 tom Exp $
*/
#include "cursesapp.h"
diff --git a/contrib/ncurses/c++/edit_cfg.sh b/contrib/ncurses/c++/edit_cfg.sh
index efea83323b11..e2f828a86134 100755
--- a/contrib/ncurses/c++/edit_cfg.sh
+++ b/contrib/ncurses/c++/edit_cfg.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: edit_cfg.sh,v 1.8 2000/07/01 16:07:37 tom Exp $
+# $Id: edit_cfg.sh,v 1.10 2001/04/07 22:45:11 tom Exp $
##############################################################################
# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
# #
@@ -42,10 +42,13 @@ for name in \
ETIP_NEEDS_MATH_EXCEPTION \
ETIP_NEEDS_MATH_H \
HAVE_BUILTIN_H \
- HAVE_GXX_BUILTIN_H \
HAVE_GPP_BUILTIN_H \
+ HAVE_GXX_BUILTIN_H \
+ HAVE_STRSTREAM_H \
HAVE_TYPEINFO \
- HAVE_VALUES_H
+ HAVE_VALUES_H \
+ USE_STDIO_VSCAN \
+ USE_STRSTREAM_VSCAN
do
mv $2 $2.bak
if ( grep "[ ]$name[ ]1" $1 2>&1 >/dev/null)
diff --git a/contrib/ncurses/c++/etip.h.in b/contrib/ncurses/c++/etip.h.in
index 985cd1eb6a06..d3421d2c5f06 100644
--- a/contrib/ncurses/c++/etip.h.in
+++ b/contrib/ncurses/c++/etip.h.in
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,10 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: etip.h.in,v 1.13 1999/09/12 02:01:59 tom Exp $
+// $Id: etip.h.in,v 1.18 2001/04/07 22:45:04 tom Exp $
-#ifndef _ETIP_H
-#define _ETIP_H
+#ifndef NCURSES_ETIP_H_incl
+#define NCURSES_ETIP_H_incl 1
// These are substituted at configure/build time
#ifndef HAVE_BUILTIN_H
@@ -49,6 +49,10 @@
#define HAVE_GPP_BUILTIN_H 0
#endif
+#ifndef HAVE_STRSTREAM_H
+#define HAVE_STRSTREAM_H 0
+#endif
+
#ifndef HAVE_TYPEINFO
#define HAVE_TYPEINFO 0
#endif
@@ -69,6 +73,14 @@
#define CPP_HAS_PARAM_INIT 0
#endif
+#ifndef USE_STDIO_VSCAN
+#define USE_STDIO_VSCAN 0
+#endif
+
+#ifndef USE_STRSTREAM_VSCAN
+#define USE_STRSTREAM_VSCAN 0
+#endif
+
#ifdef __GNUG__
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
# if HAVE_TYPEINFO
@@ -104,6 +116,8 @@
# include <string.h>
#endif
+#include <ncurses_dll.h>
+
extern "C" {
#if HAVE_VALUES_H
# include <values.h>
@@ -122,11 +136,11 @@ extern "C" {
#endif
// Forward Declarations
-class NCursesPanel;
-class NCursesMenu;
-class NCursesForm;
+class NCURSES_IMPEXP NCursesPanel;
+class NCURSES_IMPEXP NCursesMenu;
+class NCURSES_IMPEXP NCursesForm;
-class NCursesException
+class NCURSES_IMPEXP NCursesException
{
public:
const char *message;
@@ -145,30 +159,30 @@ public:
}
};
-class NCursesPanelException : public NCursesException
+class NCURSES_IMPEXP NCursesPanelException : public NCursesException
{
public:
const NCursesPanel* p;
- NCursesPanelException (const char *msg, int err) :
+ NCursesPanelException (const char *msg, int err) :
NCursesException (msg, err),
p ((NCursesPanel*)0)
{};
NCursesPanelException (const NCursesPanel* panel,
const char *msg,
- int err) :
+ int err) :
NCursesException (msg, err),
p (panel)
{};
- NCursesPanelException (int err) :
+ NCursesPanelException (int err) :
NCursesException ("panel library error", err),
p ((NCursesPanel*)0)
{};
NCursesPanelException (const NCursesPanel* panel,
- int err) :
+ int err) :
NCursesException ("panel library error", err),
p (panel)
{};
@@ -179,30 +193,30 @@ public:
};
-class NCursesMenuException : public NCursesException
+class NCURSES_IMPEXP NCursesMenuException : public NCursesException
{
public:
const NCursesMenu* m;
- NCursesMenuException (const char *msg, int err) :
+ NCursesMenuException (const char *msg, int err) :
NCursesException (msg, err),
m ((NCursesMenu *)0)
{};
NCursesMenuException (const NCursesMenu* menu,
const char *msg,
- int err) :
+ int err) :
NCursesException (msg, err),
m (menu)
{};
- NCursesMenuException (int err) :
+ NCursesMenuException (int err) :
NCursesException ("menu library error", err),
m ((NCursesMenu *)0)
{};
NCursesMenuException (const NCursesMenu* menu,
- int err) :
+ int err) :
NCursesException ("menu library error", err),
m (menu)
{};
@@ -213,30 +227,30 @@ public:
};
-class NCursesFormException : public NCursesException
+class NCURSES_IMPEXP NCursesFormException : public NCursesException
{
public:
const NCursesForm* f;
- NCursesFormException (const char *msg, int err) :
+ NCursesFormException (const char *msg, int err) :
NCursesException (msg, err),
f ((NCursesForm*)0)
{};
NCursesFormException (const NCursesForm* form,
const char *msg,
- int err) :
+ int err) :
NCursesException (msg, err),
f (form)
{};
- NCursesFormException (int err) :
+ NCursesFormException (int err) :
NCursesException ("form library error", err),
f ((NCursesForm*)0)
{};
NCursesFormException (const NCursesForm* form,
- int err) :
+ int err) :
NCursesException ("form library error", err),
f (form)
{};
@@ -265,9 +279,9 @@ inline void THROW(const NCursesException *e) {
if (e)
cerr << e->message << endl;
exit(0);
-#endif
+#endif
}
#define THROWS(s)
-#endif // _ETIP_H
+#endif // NCURSES_ETIP_H_incl
diff --git a/contrib/ncurses/c++/internal.h b/contrib/ncurses/c++/internal.h
index 67bc3ff2469e..6009027c929a 100644
--- a/contrib/ncurses/c++/internal.h
+++ b/contrib/ncurses/c++/internal.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,10 +31,12 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: internal.h,v 1.6 2000/09/02 18:22:23 tom Exp $
+// $Id: internal.h,v 1.8 2001/03/24 21:36:17 tom Exp $
-#ifndef _CPLUS_INTERNAL_H
-#define _CPLUS_INTERNAL_H 1
+#ifndef NCURSES_CPLUS_INTERNAL_H
+#define NCURSES_CPLUS_INTERNAL_H 1
+
+#include <ncurses_cfg.h>
#if USE_RCS_IDS
#define MODULE_ID(id) static const char Ident[] = id;
@@ -44,4 +46,4 @@
#define CTRL(x) ((x) & 0x1f)
-#endif
+#endif // NCURSES_CPLUS_INTERNAL_H
diff --git a/contrib/ncurses/config.guess b/contrib/ncurses/config.guess
index b100dbe1a331..71de137a6b6c 100755
--- a/contrib/ncurses/config.guess
+++ b/contrib/ncurses/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
-version='2000-06-13'
+timestamp='2001-03-16'
# 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
@@ -32,30 +32,41 @@ version='2000-06-13'
# 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 system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
+# don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
-Output the configuration name of this system.
+Output the configuration name of the system \`$me' is run on.
Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit"
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
@@ -64,9 +75,7 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
+ echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
@@ -78,19 +87,30 @@ if test $# != 0; then
exit 1
fi
-# Use $HOST_CC if defined. $CC may point to a cross-compiler
-if test x"$CC_FOR_BUILD" = x; then
- if test x"$HOST_CC" != x; then
- CC_FOR_BUILD="$HOST_CC"
- else
- if test x"$CC" != x; then
- CC_FOR_BUILD="$CC"
- else
- CC_FOR_BUILD=cc
- fi
- fi
-fi
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c
+ for c in cc gcc c89 ; do
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+ if test $? = 0 ; then
+ CC_FOR_BUILD="$c"; break
+ fi
+ done
+ rm -f $dummy.c $dummy.o $dummy.rel
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
@@ -100,18 +120,12 @@ fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-dummy=dummy-$$
-trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
-
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- i?86:OS/2:*:*)
- echo "i386-unknown-os2"
- exit 0;;
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -122,7 +136,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
- amiga) machine=m68k-cbm ;;
+ amiga) machine=m68k-unknown ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
@@ -132,16 +146,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ibmrt|romp-ibm) machine=romp-ibm ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
- # The Operating System including object format.
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE}" in
+ i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
@@ -218,7 +240,7 @@ EOF
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-cbm-sysv4
+ echo m68k-unknown-sysv4
exit 0;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
@@ -250,7 +272,7 @@ EOF
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
- SR2?01:HI-UX/MPP:*:*)
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
@@ -386,7 +408,7 @@ EOF
EOF
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && rm $dummy.c $dummy && exit 0
+ && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
@@ -434,12 +456,20 @@ EOF
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >$dummy.c
@@ -453,7 +483,7 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
@@ -462,9 +492,9 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit 0 ;;
- *:AIX:*:4)
+ *:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
- if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -472,7 +502,7 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=4.${UNAME_RELEASE}
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit 0 ;;
@@ -498,10 +528,28 @@ EOF
echo m68k-hp-bsd4.4
exit 0 ;;
9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
+ case "${HPUX_REV}" in
+ 11.[0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ esac ;;
+ esac
+ fi ;;
+ esac
+ if [ "${HP_ARCH}" = "" ]; then
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
@@ -536,11 +584,16 @@ EOF
}
EOF
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
rm -f $dummy.c $dummy
+ fi ;;
esac
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
@@ -567,7 +620,7 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
@@ -631,23 +684,24 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
- CRAY*T3E:*:*:*)
+ CRAY*T3D:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
- F300:UNIX_System_V:*:*)
+ 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 "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
- F301:UNIX_System_V:*:*)
- echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
- exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -672,6 +726,9 @@ EOF
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -693,58 +750,38 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
- *: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.
- ld_help_string=`cd /; ld --help 2>&1`
- ld_supported_emulations=`echo $ld_help_string \
- | sed -ne '/supported emulations:/!d
- s/[ ][ ]*/ /g
- s/.*supported emulations: *//
- s/ .*//
- p'`
- case "$ld_supported_emulations" in
- *ia64)
- echo "${UNAME_MACHINE}-unknown-linux"
- exit 0
- ;;
- i?86linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0
- ;;
- elf_i?86)
- echo "${UNAME_MACHINE}-pc-linux"
- exit 0
- ;;
- i?86coff)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0
- ;;
- sparclinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- armlinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32arm*)
- echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
- exit 0
- ;;
- armelf_linux*)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
- exit 0
- ;;
- m68klinux)
- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
- exit 0
- ;;
- elf32ppc | elf32ppclinux)
- # Determine Lib Version
- cat >$dummy.c <<EOF
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ cat >$dummy.c <<EOF
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+int main (int argc, char *argv[]) {
+#else
+int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ ;;
+ ppc:Linux:*:*)
+ # Determine Lib Version
+ cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
@@ -757,127 +794,127 @@ main(argc, argv)
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
- printf("unkown\n");
+ printf("unknown\n");
#endif
return 0;
}
EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ LIBC=""
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./$dummy | grep 1\.99 > /dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; fi
+ fi
+ rm -f $dummy.c $dummy
+ echo powerpc-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ alpha:Linux:*:*)
+ cat <<EOF >$dummy.s
+ .data
+ \$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+ .text
+ .globl main
+ .align 4
+ .ent main
+ main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ LIBC=""
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0) UNAME_MACHINE="alpha" ;;
+ 1-0) UNAME_MACHINE="alphaev5" ;;
+ 1-1) UNAME_MACHINE="alphaev56" ;;
+ 1-101) UNAME_MACHINE="alphapca56" ;;
+ 2-303) UNAME_MACHINE="alphaev6" ;;
+ 2-307) UNAME_MACHINE="alphaev67" ;;
+ esac
+ objdump --private-headers $dummy | \
+ grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
- ./$dummy | grep 1\.99 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
+ LIBC="libc1"
fi
- rm -f $dummy.c $dummy
- echo powerpc-unknown-linux-gnu${LIBC}
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ 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.
+ ld_supported_emulations=`cd /; ld --help 2>&1 \
+ | sed -ne '/supported emulations:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported emulations: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_emulations" in
+ i?86linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
- shelf_linux)
- echo "${UNAME_MACHINE}-unknown-linux-gnu"
+ elf_i?86)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ i?86coff)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
esac
-
- if test "${UNAME_MACHINE}" = "alpha" ; then
- cat <<EOF >$dummy.s
- .data
- \$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
- main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- esac
-
- objdump --private-headers $dummy | \
- grep ld.so.1 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.s $dummy
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
- elif test "${UNAME_MACHINE}" = "mips" ; then
- cat >$dummy.c <<EOF
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
-#ifdef __MIPSEB__
- printf ("%s-unknown-linux-gnu\n", argv[1]);
-#endif
-#ifdef __MIPSEL__
- printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
- return 0;
-}
-EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- elif test "${UNAME_MACHINE}" = "s390"; then
- echo s390-ibm-linux && exit 0
- else
- # Either a pre-BFD a.out linker (linux-gnuoldld)
- # or one that does not give us useful --help.
- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
- # If ld does not provide *any* "supported emulations:"
- # that means it is gnuoldld.
- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
-
- case "${UNAME_MACHINE}" in
- i?86)
- VENDOR=pc;
- ;;
- *)
- VENDOR=unknown;
- ;;
- esac
- # Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >$dummy.c <<EOF
#include <features.h>
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -901,9 +938,10 @@ EOF
return 0;
}
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
- fi ;;
+ $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i?86:DYNIX/ptx:4*:*)
@@ -980,7 +1018,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1003,9 +1041,12 @@ EOF
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+ rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
@@ -1039,7 +1080,7 @@ EOF
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
- news*:NEWS-OS:*:6*)
+ news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit 0 ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
@@ -1082,15 +1123,52 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-W:NONSTOP_KERNEL:*:*)
+ NSR-[KW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit 0 ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ i?86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1182,11 +1260,24 @@ main ()
#endif
#if defined (vax)
-#if !defined (ultrix)
- printf ("vax-dec-bsd\n"); exit (0);
-#else
- printf ("vax-dec-ultrix\n"); exit (0);
-#endif
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
#endif
#if defined (alliant) && defined (i860)
@@ -1197,7 +1288,7 @@ main ()
}
EOF
-$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
@@ -1233,8 +1324,9 @@ fi
cat >&2 <<EOF
$0: unable to guess system type
-The $version version of this script cannot recognize your system type.
-Please download the most up to date version of the config scripts:
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
ftp://ftp.gnu.org/pub/gnu/config/
@@ -1243,7 +1335,7 @@ send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
-config.guess version = $version
+config.guess timestamp = $timestamp
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
@@ -1270,7 +1362,7 @@ exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "version='"
+# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
diff --git a/contrib/ncurses/config.sub b/contrib/ncurses/config.sub
index f8ec622e95b0..9df4e53f8092 100755
--- a/contrib/ncurses/config.sub
+++ b/contrib/ncurses/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
-# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
-version='2000-07-06'
+timestamp='2001-03-09'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -60,16 +60,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS
Canonicalize a configuration name.
Operation modes:
- -h, --help print this help, then exit
- -V, --version print version number, then exit"
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
- case "$1" in
- --version | --vers* | -V )
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
@@ -78,9 +92,7 @@ while test $# -gt 0 ; do
- ) # Use stdin as input.
break ;;
-* )
- exec >&2
- echo "$me: invalid option $1"
- echo "$help"
+ echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
@@ -105,7 +117,7 @@ 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*)
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -122,9 +134,6 @@ esac
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
- -os2)
- basic_machine=`echo $1 | sed -e 's/86-.*/86/'`
- ;;
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
@@ -206,22 +215,24 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+ | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
- | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
+ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
- | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
+ | 1750a | dsp16xx | pdp10 | pdp11 \
+ | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
- | mips64vr5000 | miprs64vr5000el | mcore \
+ | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | d30v | fr30 | avr)
+ | thumb | d10v | d30v | fr30 | avr | openrisc)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -235,7 +246,7 @@ case $basic_machine in
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
- i[234567]86)
+ i[234567]86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -246,26 +257,28 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
+ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
- | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
+ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+ | [cjt]90-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
- | bs2000-* | tic54x-* | c54x-*)
+ | bs2000-* | tic54x-* | c54x-* | x86_64-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -302,14 +315,14 @@ case $basic_machine in
os=-sysv
;;
amiga | amiga-*)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
;;
amigaos | amigados)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
@@ -356,8 +369,8 @@ case $basic_machine in
basic_machine=cray2-cray
os=-unicos
;;
- [ctj]90-cray)
- basic_machine=c90-cray
+ [cjt]90)
+ basic_machine=${basic_machine}-cray
os=-unicos
;;
crds | unos)
@@ -413,6 +426,10 @@ case $basic_machine in
basic_machine=tron-gmicro
os=-sysv
;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@@ -512,14 +529,6 @@ case $basic_machine in
basic_machine=i386-unknown
os=-vsta
;;
- i386-go32 | go32)
- basic_machine=i386-unknown
- os=-go32
- ;;
- i386-mingw32 | mingw32)
- basic_machine=i386-unknown
- os=-mingw32
- ;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -545,6 +554,10 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -575,7 +588,7 @@ case $basic_machine in
os=-coff
;;
msdos)
- basic_machine=i386-unknown
+ basic_machine=i386-pc
os=-msdos
;;
mvs)
@@ -639,6 +652,10 @@ case $basic_machine in
basic_machine=i960-intel
os=-mon960
;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
np1)
basic_machine=np1-gould
;;
@@ -674,28 +691,28 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | k6 | nexen)
+ pentium | p5 | k5 | k6 | nexgen)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
basic_machine=i686-pc
;;
pentiumii | pentium2)
- basic_machine=i786-pc
+ basic_machine=i686-pc
;;
- pentium-* | p5-* | k5-* | k6-* | nexen-*)
+ pentium-* | p5-* | k5-* | k6-* | nexgen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
- power) basic_machine=rs6000-ibm
+ power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
@@ -710,6 +727,10 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -900,6 +921,10 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -907,7 +932,7 @@ case $basic_machine in
basic_machine=we32k-att
;;
sh3 | sh4)
- base_machine=sh-unknown
+ basic_machine=sh-unknown
;;
sparc | sparcv9)
basic_machine=sparc-sun
@@ -990,7 +1015,8 @@ case $os in
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit*)
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1006,7 +1032,6 @@ case $os in
os=-nto-qnx
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -os2 \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
@@ -1052,7 +1077,7 @@ case $os in
-ns2 )
os=-nextstep2
;;
- -nsk)
+ -nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
@@ -1089,7 +1114,7 @@ case $os in
-xenix)
os=-xenix
;;
- -*mint | -*MiNT)
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-none)
@@ -1123,6 +1148,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ pdp10-*)
+ os=-tops20
+ ;;
pdp11-*)
os=-none
;;
@@ -1231,7 +1259,7 @@ case $basic_machine in
*-masscomp)
os=-rtu
;;
- f301-fujitsu)
+ f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
@@ -1309,7 +1337,7 @@ case $basic_machine in
-mpw* | -macos*)
vendor=apple
;;
- -*mint | -*MiNT)
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
esac
@@ -1322,7 +1350,7 @@ exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "version='"
+# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
diff --git a/contrib/ncurses/configure b/contrib/ncurses/configure
index 7b8164df2eef..d8e599b277fa 100755
--- a/contrib/ncurses/configure
+++ b/contrib/ncurses/configure
@@ -1,6 +1,6 @@
#! /bin/sh
-# From configure.in Revision: 1.217
+# From configure.in Revision: 1.233
@@ -193,15 +193,17 @@ cat <<EOF
--without-cxx-binding do not build C++ binding and demo
--without-ada suppress check for Ada95, don't build demo
--without-progs suppress build with programs (e.g., tic)
+ --without-curses-h install curses.h as ncurses.h only
--with-install-prefix prefixes actual install-location
Options to Specify the Libraries Built/Used:
+ --with-libtool generate libraries with libtool
--with-shared generate shared-libraries
--with-normal generate normal-libraries (default)
--with-debug generate debug-libraries (default)
- --with-profile generate profile-libraries
- --with-termlib generate separate terminfo library
EOF
cat <<EOF
+ --with-profile generate profile-libraries
+ --with-termlib generate separate terminfo library
--with-dbmalloc test: use Conor Cahill's dbmalloc library
--with-dmalloc test: use Gray Watson's dmalloc library
--with-gpm use Alessandro Rubini's GPM library
@@ -212,25 +214,27 @@ Fine-Tuning Your Configuration:
--disable-database use only built-in data
--with-database=XXX specify terminfo source to install
--with-fallbacks=XXX specify list of fallback terminal descriptions
- --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
- --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
EOF
cat <<EOF
+ --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
+ --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
--disable-big-core assume machine has little memory
--enable-termcap compile in termcap fallback support
--enable-getcap fast termcap load, no xrefs to terminfo
--enable-getcap-cache cache translated termcaps in ~/.terminfo
--enable-symlinks make tic use symbolic links not hard links
--enable-broken_linker compile with broken-linker support code
+ --with-ospeed=TYPE override type of ospeed variable
--enable-bsdpad recognize BSD-style prefix padding
--with-rcs-ids compile-in RCS identifiers
Options to Specify How Manpages are Installed:
+EOF
+cat <<EOF
--with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
optionally formatted, e.g., gzip,formatted
--with-manpage-renames specify manpage-renaming
--with-manpage-symlinks specify manpage-symlinks
-EOF
-cat <<EOF
+ --with-manpage-tbl specify manpage processing with tbl
Extensions:
--disable-ext-funcs disable function-extensions
--enable-const compile with extra/non-standard const
@@ -239,12 +243,12 @@ Extensions:
--enable-tcap-names compile with user-definable terminal capabilities
Development Code:
--with-develop enable all development options
+EOF
+cat <<EOF
--enable-colorfgbg compile with \$COLORFGBG code
--enable-hard-tabs compile with hard-tabs code
--disable-root-environ limit environment when running as root
--enable-xmc-glitch compile with limited support for xmc
-EOF
-cat <<EOF
Experimental Code:
--disable-assumed-color do not assume anything about default-colors
--disable-hashmap compile without hashmap scrolling-optimization
@@ -253,12 +257,12 @@ Experimental Code:
--enable-widec compile with experimental wide-char/UTF-8 code
Testing/development Options:
--enable-echo build: display "compiling" commands (default)
+EOF
+cat <<EOF
--enable-warnings build: turn on GCC compiler warnings
--enable-assertions test: turn on generation of assertion code
--disable-leaks test: suppress permanent memory-leaks
--enable-expanded test: generate functions for certain macros
-EOF
-cat <<EOF
--disable-macros test: use functions rather than macros
Ada95 Binding Options:
--with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
@@ -668,7 +672,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:672: checking host system type" >&5
+echo "configure:676: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -689,7 +693,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:693: checking target system type" >&5
+echo "configure:697: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -707,7 +711,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:711: checking build system type" >&5
+echo "configure:715: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -800,11 +804,11 @@ cf_user_CFLAGS="$CFLAGS"
### Default install-location
echo $ac_n "checking for prefix""... $ac_c" 1>&6
-echo "configure:804: checking for prefix" >&5
+echo "configure:808: checking for prefix" >&5
if test "x$prefix" = "xNONE" ; then
case "$cf_cv_system_name" in
# non-vendor systems don't have a conflict
- openbsd*|netbsd*|freebsd*|linux*)
+ openbsd*|netbsd*|freebsd*|linux*|cygwin*)
prefix=/usr
;;
*) prefix=$ac_default_prefix
@@ -815,7 +819,7 @@ echo "$ac_t""$prefix" 1>&6
if test "x$prefix" = "xNONE" ; then
echo $ac_n "checking for default include-directory""... $ac_c" 1>&6
-echo "configure:819: checking for default include-directory" >&5
+echo "configure:823: checking for default include-directory" >&5
test -n "$verbose" && echo 1>&6
for cf_symbol in \
$includedir \
@@ -845,7 +849,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:849: checking for $ac_word" >&5
+echo "configure:853: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -875,7 +879,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:879: checking for $ac_word" >&5
+echo "configure:883: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -926,7 +930,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:930: checking for $ac_word" >&5
+echo "configure:934: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -958,7 +962,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -969,12 +973,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 973 "configure"
+#line 977 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1000,12 +1004,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1004: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1009: checking whether we are using GNU C" >&5
+echo "configure:1013: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1014,7 +1018,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1033,7 +1037,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1037: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1066,7 +1070,7 @@ fi
if test "$GCC" = yes ; then
echo $ac_n "checking version of gcc""... $ac_c" 1>&6
-echo "configure:1070: checking version of gcc" >&5
+echo "configure:1074: checking version of gcc" >&5
eval "$CC --version"
fi
if test "$host" != $build; then
@@ -1075,7 +1079,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1079: checking for $ac_word" >&5
+echo "configure:1083: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1109,7 +1113,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1113: checking how to run the C preprocessor" >&5
+echo "configure:1117: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1124,13 +1128,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1128 "configure"
+#line 1132 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1141,13 +1145,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1145 "configure"
+#line 1149 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1158,13 +1162,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1162 "configure"
+#line 1166 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1190,13 +1194,13 @@ echo "$ac_t""$CPP" 1>&6
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1194: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1198: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 1200 "configure"
+#line 1204 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -1214,7 +1218,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 1218 "configure"
+#line 1222 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -1236,7 +1240,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1240: checking for POSIXized ISC" >&5
+echo "configure:1244: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1258,13 +1262,14 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:1262: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:1266: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cf_cv_ansi_cc=no
cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
@@ -1280,9 +1285,27 @@ for cf_arg in "-DCC_HAS_PROTOS" \
"-Aa -D_HPUX_SOURCE" \
-Xc
do
- CFLAGS="$cf_save_CFLAGS $cf_arg"
+
+for cf_add_cflags in $cf_arg
+do
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case "$CPPFLAGS" in
+ *$cf_add_cflags)
+ ;;
+ *)
+ CPPFLAGS="$CPPFLAGS $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ CFLAGS="$CFLAGS $cf_add_cflags"
+ ;;
+ esac
+done
+
cat > conftest.$ac_ext <<EOF
-#line 1286 "configure"
+#line 1309 "configure"
#include "confdefs.h"
#ifndef CC_HAS_PROTOS
@@ -1298,7 +1321,7 @@ int main() {
struct s2 {int (*f) (double a);};
; return 0; }
EOF
-if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_ansi_cc="$cf_arg"; break
else
@@ -1308,6 +1331,7 @@ fi
rm -f conftest*
done
CFLAGS="$cf_save_CFLAGS"
+CPPFLAGS="$cf_save_CPPFLAGS"
fi
@@ -1315,7 +1339,25 @@ echo "$ac_t""$cf_cv_ansi_cc" 1>&6
if test "$cf_cv_ansi_cc" != "no"; then
if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
- CFLAGS="$CFLAGS $cf_cv_ansi_cc"
+
+for cf_add_cflags in $cf_cv_ansi_cc
+do
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case "$CPPFLAGS" in
+ *$cf_add_cflags)
+ ;;
+ *)
+ CPPFLAGS="$CPPFLAGS $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ CFLAGS="$CFLAGS $cf_add_cflags"
+ ;;
+ esac
+done
+
else
cat >> confdefs.h <<\EOF
#define CC_HAS_PROTOS 1
@@ -1339,8 +1381,9 @@ PROG_EXT=
case $cf_cv_system_name in
os2*)
# We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
- CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
- CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__"
+ CFLAGS="$CFLAGS -Zmt"
+ CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+ CXXFLAGS="$CXXFLAGS -Zmt"
LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
PROG_EXT=".exe"
;;
@@ -1359,7 +1402,7 @@ freebsd*) #(vi
# Extract the first word of "ldconfig", so it can be a program name with args.
set dummy ldconfig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1363: checking for $ac_word" >&5
+echo "configure:1406: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1396,7 +1439,7 @@ esac
echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6
-echo "configure:1400: checking if you want to ensure bool is consistent with C++" >&5
+echo "configure:1443: checking if you want to ensure bool is consistent with C++" >&5
# Check whether --with-cxx or --without-cxx was given.
if test "${with_cxx+set}" = set; then
@@ -1416,7 +1459,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1420: checking for $ac_word" >&5
+echo "configure:1463: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1448,7 +1491,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1452: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1495: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1459,12 +1502,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1463 "configure"
+#line 1506 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1490,12 +1533,12 @@ if test $ac_cv_prog_cxx_works = no; then
echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6; cf_with_cxx=no; CXX=""; GXX="";
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1494: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1537: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1499: checking whether we are using GNU C++" >&5
+echo "configure:1542: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1504,7 +1547,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1523,7 +1566,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1527: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1570: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1567,7 +1610,7 @@ if test "$GXX" = yes; then
fi
echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6
-echo "configure:1571: checking if you want to build C++ binding and demo" >&5
+echo "configure:1614: checking if you want to build C++ binding and demo" >&5
# Check whether --with-cxx-binding or --without-cxx-binding was given.
if test "${with_cxx_binding+set}" = set; then
@@ -1580,7 +1623,7 @@ fi
echo "$ac_t""$cf_with_cxx_binding" 1>&6
echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6
-echo "configure:1584: checking if you want to build with Ada95" >&5
+echo "configure:1627: checking if you want to build with Ada95" >&5
# Check whether --with-ada or --without-ada was given.
if test "${with_ada+set}" = set; then
@@ -1593,7 +1636,7 @@ fi
echo "$ac_t""$cf_with_ada" 1>&6
echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6
-echo "configure:1597: checking if you want to build programs such as tic" >&5
+echo "configure:1640: checking if you want to build programs such as tic" >&5
# Check whether --with-progs or --without-progs was given.
if test "${with_progs+set}" = set; then
@@ -1605,6 +1648,19 @@ fi
echo "$ac_t""$cf_with_progs" 1>&6
+echo $ac_n "checking if you wish to install curses.h""... $ac_c" 1>&6
+echo "configure:1653: checking if you wish to install curses.h" >&5
+
+# Check whether --with-curses-h or --without-curses-h was given.
+if test "${with_curses_h+set}" = set; then
+ withval="$with_curses_h"
+ with_curses_h=$withval
+else
+ with_curses_h=yes
+fi
+
+echo "$ac_t""$with_curses_h" 1>&6
+
modules_to_build="ncurses"
if test "X$cf_with_progs" != Xno ; then
modules_to_build="$modules_to_build progs tack"
@@ -1635,7 +1691,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1639: checking for $ac_word" >&5
+echo "configure:1695: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1665,7 +1721,7 @@ test -n "$AWK" && break
done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1669: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1725: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1703,7 +1759,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1707: checking for a BSD compatible install" >&5
+echo "configure:1763: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1759,14 +1815,14 @@ case $INSTALL in
/*)
;;
*)
- cf_dir=`echo $INSTALL|sed -e 's%/[^/]*$%%'`
+ cf_dir=`echo $INSTALL | sed -e 's:/[^/]*$::'`
test -z "$cf_dir" && cf_dir=.
INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
;;
esac
echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:1770: checking for long file names" >&5
+echo "configure:1826: checking for long file names" >&5
if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1811,7 +1867,7 @@ fi
echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
-echo "configure:1815: checking if filesystem supports mixed-case filenames" >&5
+echo "configure:1871: checking if filesystem supports mixed-case filenames" >&5
if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1834,7 +1890,7 @@ EOF
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1838: checking whether ln -s works" >&5
+echo "configure:1894: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1857,7 +1913,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1861: checking for $ac_word" >&5
+echo "configure:1917: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1889,7 +1945,7 @@ fi
# Extract the first word of "ctags", so it can be a program name with args.
set dummy ctags; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1893: checking for $ac_word" >&5
+echo "configure:1949: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1921,7 +1977,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1925: checking for $ac_word" >&5
+echo "configure:1981: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1971,7 +2027,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1975: checking for $ac_word" >&5
+echo "configure:2031: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2005,7 +2061,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2009: checking for $ac_word" >&5
+echo "configure:2065: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2041,7 +2097,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then
else
echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6
-echo "configure:2045: checking for loader (symbol LD)" >&5
+echo "configure:2101: checking for loader (symbol LD)" >&5
test -z "$LD" && LD=ld
echo "$ac_t""$LD" 1>&6
@@ -2055,7 +2111,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then
else
echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6
-echo "configure:2059: checking for archiver (symbol AR)" >&5
+echo "configure:2115: checking for archiver (symbol AR)" >&5
test -z "$AR" && AR=ar
echo "$ac_t""$AR" 1>&6
@@ -2069,7 +2125,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then
else
echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6
-echo "configure:2073: checking for archiver options (symbol AR_OPTS)" >&5
+echo "configure:2129: checking for archiver options (symbol AR_OPTS)" >&5
test -z "$AR_OPTS" && AR_OPTS=rv
echo "$ac_t""$AR_OPTS" 1>&6
@@ -2081,7 +2137,7 @@ AR_OPTS=${cf_cv_subst_AR_OPTS}
echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
-echo "configure:2085: checking for makeflags variable" >&5
+echo "configure:2141: checking for makeflags variable" >&5
if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2117,7 +2173,7 @@ echo "$ac_t""$cf_cv_makeflags" 1>&6
echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6
-echo "configure:2121: checking if you have specified an install-prefix" >&5
+echo "configure:2177: checking if you have specified an install-prefix" >&5
# Check whether --with-install-prefix or --without-install-prefix was given.
if test "${with_install_prefix+set}" = set; then
@@ -2141,8 +2197,28 @@ echo "$ac_t""$DESTDIR" 1>&6
### shared, for example.
cf_list_models=""
+echo $ac_n "checking if you want to build libraries with libtool""... $ac_c" 1>&6
+echo "configure:2202: checking if you want to build libraries with libtool" >&5
+
+# Check whether --with-libtool or --without-libtool was given.
+if test "${with_libtool+set}" = set; then
+ withval="$with_libtool"
+ with_libtool=$withval
+else
+ with_libtool=no
+fi
+
+echo "$ac_t""$with_libtool" 1>&6
+if test "$with_libtool" = "yes"; then
+ cf_list_models="$cf_list_models libtool"
+ test -z "$LIBTOOL" && LIBTOOL=libtool
+else
+ LIBTOOL=""
+fi
+
+
echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6
-echo "configure:2146: checking if you want to build shared libraries" >&5
+echo "configure:2222: checking if you want to build shared libraries" >&5
# Check whether --with-shared or --without-shared was given.
if test "${with_shared+set}" = set; then
@@ -2156,7 +2232,7 @@ echo "$ac_t""$with_shared" 1>&6
test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6
-echo "configure:2160: checking if you want to build static libraries" >&5
+echo "configure:2236: checking if you want to build static libraries" >&5
# Check whether --with-normal or --without-normal was given.
if test "${with_normal+set}" = set; then
@@ -2170,7 +2246,7 @@ echo "$ac_t""$with_normal" 1>&6
test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6
-echo "configure:2174: checking if you want to build debug libraries" >&5
+echo "configure:2250: checking if you want to build debug libraries" >&5
# Check whether --with-debug or --without-debug was given.
if test "${with_debug+set}" = set; then
@@ -2184,7 +2260,7 @@ echo "$ac_t""$with_debug" 1>&6
test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6
-echo "configure:2188: checking if you want to build profiling libraries" >&5
+echo "configure:2264: checking if you want to build profiling libraries" >&5
# Check whether --with-profile or --without-profile was given.
if test "${with_profile+set}" = set; then
@@ -2200,14 +2276,15 @@ test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
###############################################################################
echo $ac_n "checking for specified models""... $ac_c" 1>&6
-echo "configure:2204: checking for specified models" >&5
+echo "configure:2280: checking for specified models" >&5
test -z "$cf_list_models" && cf_list_models=normal
+test "$with_libtool" = "yes" && cf_list_models=libtool
echo "$ac_t""$cf_list_models" 1>&6
### Use the first model as the default, and save its suffix for use in building
### up test-applications.
echo $ac_n "checking for default model""... $ac_c" 1>&6
-echo "configure:2211: checking for default model" >&5
+echo "configure:2288: checking for default model" >&5
DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
echo "$ac_t""$DFT_LWR_MODEL" 1>&6
@@ -2224,7 +2301,8 @@ LIB_NAME=ncurses
LIB_DIR=../lib
case $cf_cv_system_name in
- os2) LIB_PREFIX='' ;;
+ OS/2*) LIB_PREFIX='' ;;
+ os2*) LIB_PREFIX='' ;;
*) LIB_PREFIX='lib' ;;
esac
cf_prefix=$LIB_PREFIX
@@ -2239,7 +2317,7 @@ LIB_SUFFIX=
###############################################################################
echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6
-echo "configure:2243: checking if you want to build a separate terminfo library" >&5
+echo "configure:2321: checking if you want to build a separate terminfo library" >&5
# Check whether --with-termlib or --without-termlib was given.
if test "${with_termlib+set}" = set; then
@@ -2253,7 +2331,7 @@ echo "$ac_t""$with_termlib" 1>&6
### Checks for special libraries, must be done up-front.
echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6
-echo "configure:2257: checking if you want to link with dbmalloc for testing" >&5
+echo "configure:2335: checking if you want to link with dbmalloc for testing" >&5
# Check whether --with-dbmalloc or --without-dbmalloc was given.
if test "${with_dbmalloc+set}" = set; then
@@ -2266,7 +2344,7 @@ fi
echo "$ac_t""$with_dbmalloc" 1>&6
if test "$with_dbmalloc" = yes ; then
echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
-echo "configure:2270: checking for debug_malloc in -ldbmalloc" >&5
+echo "configure:2348: checking for debug_malloc in -ldbmalloc" >&5
ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2274,7 +2352,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldbmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2278 "configure"
+#line 2356 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2285,7 +2363,7 @@ int main() {
debug_malloc()
; return 0; }
EOF
-if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2315,7 +2393,7 @@ fi
fi
echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6
-echo "configure:2319: checking if you want to link with dmalloc for testing" >&5
+echo "configure:2397: checking if you want to link with dmalloc for testing" >&5
# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
@@ -2328,7 +2406,7 @@ fi
echo "$ac_t""$with_dmalloc" 1>&6
if test "$with_dmalloc" = yes ; then
echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
-echo "configure:2332: checking for dmalloc_debug in -ldmalloc" >&5
+echo "configure:2410: checking for dmalloc_debug in -ldmalloc" >&5
ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2336,7 +2414,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2340 "configure"
+#line 2418 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2347,7 +2425,7 @@ int main() {
dmalloc_debug()
; return 0; }
EOF
-if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2378,7 +2456,7 @@ fi
SHLIB_LIST=""
echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6
-echo "configure:2382: checking if you want to link with the gpm mouse library" >&5
+echo "configure:2460: checking if you want to link with the gpm mouse library" >&5
# Check whether --with-gpm or --without-gpm was given.
if test "${with_gpm+set}" = set; then
@@ -2391,7 +2469,7 @@ fi
echo "$ac_t""$with_gpm" 1>&6
if test "$with_gpm" = yes ; then
echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:2395: checking for Gpm_Open in -lgpm" >&5
+echo "configure:2473: checking for Gpm_Open in -lgpm" >&5
ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2399,7 +2477,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgpm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2403 "configure"
+#line 2481 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2410,7 +2488,7 @@ int main() {
Gpm_Open()
; return 0; }
EOF
-if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2436,17 +2514,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2440: checking for $ac_hdr" >&5
+echo "configure:2518: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2445 "configure"
+#line 2523 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2494,8 +2572,9 @@ fi
echo $ac_n "checking for default loader flags""... $ac_c" 1>&6
-echo "configure:2498: checking for default loader flags" >&5
+echo "configure:2576: checking for default loader flags" >&5
case $DFT_LWR_MODEL in
+libtool) LD_MODEL='' ;;
normal) LD_MODEL='' ;;
debug) LD_MODEL=$CC_G_OPT ;;
profile) LD_MODEL='-pg';;
@@ -2504,7 +2583,7 @@ esac
echo "$ac_t""$LD_MODEL" 1>&6
echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6
-echo "configure:2508: checking if rpath option should be used" >&5
+echo "configure:2587: checking if rpath option should be used" >&5
# Check whether --enable-rpath or --disable-rpath was given.
if test "${enable_rpath+set}" = set; then
@@ -2526,7 +2605,7 @@ echo "$ac_t""$cf_cv_ld_rpath" 1>&6
cf_cv_do_symlinks=no
echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6
-echo "configure:2530: checking if release/abi version should be used for shared libs" >&5
+echo "configure:2609: checking if release/abi version should be used for shared libs" >&5
# Check whether --with-shlib-version or --without-shlib-version was given.
if test "${with_shlib_version+set}" = set; then
@@ -2557,20 +2636,20 @@ fi
if test "$GCC" = yes
then
echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6
-echo "configure:2561: checking which $CC option to use" >&5
+echo "configure:2640: checking which $CC option to use" >&5
cf_save_CFLAGS="$CFLAGS"
for CC_SHARED_OPTS in -fPIC -fpic ''
do
CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
cat > conftest.$ac_ext <<EOF
-#line 2567 "configure"
+#line 2646 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
int x = 1
; return 0; }
EOF
-if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
@@ -2738,18 +2817,18 @@ rm -f conftest*
if test -n "$cf_ld_rpath_opt" ; then
echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6
-echo "configure:2742: checking if we need a space after rpath option" >&5
+echo "configure:2821: checking if we need a space after rpath option" >&5
cf_save_LIBS="$LIBS"
LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
cat > conftest.$ac_ext <<EOF
-#line 2746 "configure"
+#line 2825 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_rpath_space=no
else
@@ -2788,20 +2867,20 @@ fi
### use option --disable-overwrite to leave out the link to -lcurses
echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6
-echo "configure:2792: checking if you wish to install ncurses overwriting curses" >&5
+echo "configure:2871: checking if you wish to install ncurses overwriting curses" >&5
# Check whether --enable-overwrite or --disable-overwrite was given.
if test "${enable_overwrite+set}" = set; then
enableval="$enable_overwrite"
with_overwrite=$enableval
else
- with_overwrite=yes
+ if test "$prefix" != "/usr/local" ; then with_overwrite=yes; else with_overwrite=no; fi
fi
echo "$ac_t""$with_overwrite" 1>&6
echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6
-echo "configure:2805: checking if external terminfo-database is used" >&5
+echo "configure:2884: checking if external terminfo-database is used" >&5
# Check whether --enable-database or --disable-database was given.
if test "${enable_database+set}" = set; then
@@ -2829,7 +2908,7 @@ if test "$use_database" != no ; then
EOF
echo $ac_n "checking which terminfo source-file will be installed""... $ac_c" 1>&6
-echo "configure:2833: checking which terminfo source-file will be installed" >&5
+echo "configure:2912: checking which terminfo source-file will be installed" >&5
# Check whether --enable-database or --disable-database was given.
if test "${enable_database+set}" = set; then
@@ -2841,7 +2920,7 @@ fi
fi
echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6
-echo "configure:2845: checking for list of fallback descriptions" >&5
+echo "configure:2924: checking for list of fallback descriptions" >&5
# Check whether --with-fallbacks or --without-fallbacks was given.
if test "${with_fallbacks+set}" = set; then
@@ -2863,7 +2942,16 @@ if test "$use_database" = no ; then
else
echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6
-echo "configure:2867: checking for list of terminfo directories" >&5
+echo "configure:2946: checking for list of terminfo directories" >&5
+
+ case $cf_cv_system_name in
+ os2*) PATHSEP=';' ;;
+ *) PATHSEP=':' ;;
+ esac
+
+
+
+
# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
@@ -2874,7 +2962,7 @@ else
withval="${TERMINFO_DIRS-${datadir}/terminfo}"
fi
-IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
cf_dst_path=
for cf_src_path in $withval
do
@@ -2882,7 +2970,7 @@ do
case ".$cf_src_path" in #(vi
./*) #(vi
;;
-.a-zA-Z:\\/*) #(vi OS/2 EMX
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
.\${*prefix}*) #(vi
eval cf_src_path="$cf_src_path"
@@ -2914,7 +3002,7 @@ EOF
echo $ac_n "checking for default terminfo directory""... $ac_c" 1>&6
-echo "configure:2918: checking for default terminfo directory" >&5
+echo "configure:3006: checking for default terminfo directory" >&5
# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
if test "${with_default_terminfo_dir+set}" = set; then
@@ -2927,7 +3015,7 @@ fi
case ".$withval" in #(vi
./*) #(vi
;;
-.a-zA-Z:\\/*) #(vi OS/2 EMX
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
.\${*prefix}*) #(vi
eval withval="$withval"
@@ -2960,7 +3048,7 @@ fi
### use option --disable-big-core to make tic run on small machines
### We need 4Mb, check if we can allocate 50% more than that.
echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6
-echo "configure:2964: checking if big-core option selected" >&5
+echo "configure:3052: checking if big-core option selected" >&5
# Check whether --enable-big-core or --disable-big-core was given.
if test "${enable_big_core+set}" = set; then
@@ -2971,7 +3059,7 @@ else
with_big_core=no
else
cat > conftest.$ac_ext <<EOF
-#line 2975 "configure"
+#line 3063 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -2984,7 +3072,7 @@ int main() {
exit(s == 0);
}
EOF
-if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
with_big_core=yes
else
@@ -3006,7 +3094,7 @@ EOF
### use option --enable-termcap to compile in the termcap fallback support
echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6
-echo "configure:3010: checking if you want termcap-fallback support" >&5
+echo "configure:3098: checking if you want termcap-fallback support" >&5
# Check whether --enable-termcap or --disable-termcap was given.
if test "${enable_termcap+set}" = set; then
@@ -3027,7 +3115,7 @@ else
### use option --enable-getcap to use a hacked getcap for reading termcaps
echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6
-echo "configure:3031: checking if fast termcap-loader is needed" >&5
+echo "configure:3119: checking if fast termcap-loader is needed" >&5
# Check whether --enable-getcap or --disable-getcap was given.
if test "${enable_getcap+set}" = set; then
@@ -3044,7 +3132,7 @@ EOF
echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6
-echo "configure:3048: checking if translated termcaps will be cached in ~/.terminfo" >&5
+echo "configure:3136: checking if translated termcaps will be cached in ~/.terminfo" >&5
# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
if test "${enable_getcap_cache+set}" = set; then
@@ -3070,12 +3158,12 @@ for ac_func in \
unlink
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3074: checking for $ac_func" >&5
+echo "configure:3162: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3079 "configure"
+#line 3167 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3098,7 +3186,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3129,12 +3217,12 @@ if test "$ac_cv_prog_cc_cross" = yes ; then
symlink
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3133: checking for $ac_func" >&5
+echo "configure:3221: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3138 "configure"
+#line 3226 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3157,7 +3245,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3183,7 +3271,7 @@ done
else
echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6
-echo "configure:3187: checking if link/symlink functions work" >&5
+echo "configure:3275: checking if link/symlink functions work" >&5
if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3195,7 +3283,7 @@ else
eval 'ac_cv_func_'$cf_func'=error'
else
cat > conftest.$ac_ext <<EOF
-#line 3199 "configure"
+#line 3287 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3224,7 +3312,7 @@ int main()
}
EOF
-if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
@@ -3261,7 +3349,7 @@ with_symlinks=no
if test "$ac_cv_func_link" != yes ; then
echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
-echo "configure:3265: checking if tic should use symbolic links" >&5
+echo "configure:3353: checking if tic should use symbolic links" >&5
if test "$ac_cv_func_symlink" = yes ; then
with_symlinks=yes
else
@@ -3270,7 +3358,7 @@ echo "configure:3265: checking if tic should use symbolic links" >&5
echo "$ac_t""$with_symlinks" 1>&6
elif test "$ac_cv_func_symlink" != yes ; then
echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6
-echo "configure:3274: checking if tic should use hard links" >&5
+echo "configure:3362: checking if tic should use hard links" >&5
if test "$ac_cv_func_link" = yes ; then
with_links=yes
else
@@ -3279,7 +3367,7 @@ echo "configure:3274: checking if tic should use hard links" >&5
echo "$ac_t""$with_links" 1>&6
else
echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
-echo "configure:3283: checking if tic should use symbolic links" >&5
+echo "configure:3371: checking if tic should use symbolic links" >&5
# Check whether --enable-symlinks or --disable-symlinks was given.
if test "${enable_symlinks+set}" = set; then
@@ -3303,7 +3391,7 @@ EOF
### use option --enable-broken-linker to force on use of broken-linker support
echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6
-echo "configure:3307: checking if you want broken-linker support code" >&5
+echo "configure:3395: checking if you want broken-linker support code" >&5
# Check whether --enable-broken_linker or --disable-broken_linker was given.
if test "${enable_broken_linker+set}" = set; then
@@ -3319,9 +3407,24 @@ test "$with_broken_linker" = yes && cat >> confdefs.h <<\EOF
EOF
+### use option --with-ospeed to override ospeed's type
+echo $ac_n "checking for type of ospeed""... $ac_c" 1>&6
+echo "configure:3413: checking for type of ospeed" >&5
+
+# Check whether --with-ospeed or --without-ospeed was given.
+if test "${with_ospeed+set}" = set; then
+ withval="$with_ospeed"
+ NCURSES_OSPEED=$withval
+else
+ NCURSES_OSPEED=short
+fi
+
+echo "$ac_t""$NCURSES_OSPEED" 1>&6
+
+
### use option --enable-bsdpad to have tputs process BSD-style prefix padding
echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6
-echo "configure:3325: checking if tputs should process BSD-style prefix padding" >&5
+echo "configure:3428: checking if tputs should process BSD-style prefix padding" >&5
# Check whether --enable-bsdpad or --disable-bsdpad was given.
if test "${enable_bsdpad+set}" = set; then
@@ -3339,7 +3442,7 @@ EOF
### Enable compiling-in rcs id's
echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
-echo "configure:3343: checking if RCS identifiers should be compiled-in" >&5
+echo "configure:3446: checking if RCS identifiers should be compiled-in" >&5
# Check whether --with-rcs-ids or --without-rcs-ids was given.
if test "${with_rcs_ids+set}" = set; then
@@ -3358,8 +3461,10 @@ EOF
###############################################################################
- echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
-echo "configure:3363: checking format of man-pages" >&5
+
+
+echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
+echo "configure:3468: checking format of man-pages" >&5
# Check whether --with-manpage-format or --without-manpage-format was given.
@@ -3379,7 +3484,7 @@ case ".$cf_manpage_form" in
MANPATH="/usr/man:/usr/share/man"
fi
# look for the 'date' man-page (it's most likely to be installed!)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
cf_manpage_form=unknown
for cf_dir in $MANPATH; do
test -z "$cf_dir" && cf_dir=/usr/man
@@ -3411,7 +3516,7 @@ echo "$ac_t""$cf_manpage_form" 1>&6
echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
-echo "configure:3415: checking for manpage renaming" >&5
+echo "configure:3520: checking for manpage renaming" >&5
# Check whether --with-manpage-renames or --without-manpage-renames was given.
@@ -3454,7 +3559,7 @@ echo "$ac_t""$cf_manpage_renames" 1>&6
echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
-echo "configure:3458: checking for manpage symlinks" >&5
+echo "configure:3563: checking for manpage symlinks" >&5
# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
@@ -3469,6 +3574,22 @@ fi
echo "$ac_t""$cf_manpage_symlinks" 1>&6
+echo $ac_n "checking for manpage tbl""... $ac_c" 1>&6
+echo "configure:3579: checking for manpage tbl" >&5
+
+
+# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
+if test "${with_manpage_tbl+set}" = set; then
+ withval="$with_manpage_tbl"
+ cf_manpage_tbl=$withval
+else
+ cf_manpage_tbl=no
+fi
+
+
+echo "$ac_t""$cf_manpage_tbl" 1>&6
+
+
if test "$prefix" = "NONE" ; then
cf_prefix="$ac_default_prefix"
else
@@ -3534,6 +3655,7 @@ cat >>man/edit_man.sh <<CF_EOF
aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
CF_EOF
fi
+
if test "$cf_manpage_renames" = no ; then
cat >>man/edit_man.sh <<CF_EOF
# perform program transformations for section 1 man pages
@@ -3542,9 +3664,19 @@ cat >>man/edit_man.sh <<CF_EOF
else
target=$cf_subdir\${section}/\$source
fi
+CF_EOF
+else
+cat >>man/edit_man.sh <<CF_EOF
+ target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
+ if test -z "\$target" ; then
+ echo '? missing rename for '\$source
+ target="\$source"
+ fi
+ target="$cf_subdir\${section}/\${target}"
+CF_EOF
+fi
# replace variables in man page
-CF_EOF
for cf_name in captoinfo clear infocmp infotocap tic toe tput
do
@@ -3569,15 +3701,16 @@ CF_EOF
cat >>man/edit_man.sh <<CF_EOF
< \$i >\$TMP
CF_EOF
-else
+if test $cf_manpage_tbl = yes ; then
cat >>man/edit_man.sh <<CF_EOF
- target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
- if test -z "\$target" ; then
- echo '? missing rename for '\$source
- target="\$source"
- fi
- target="$cf_subdir\$section/\$target"
- test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
+ tbl \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+if test $with_curses_h != yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
CF_EOF
fi
if test $cf_format = yes ; then
@@ -3617,9 +3750,9 @@ CF_EOF
;;
esac
cat >>man/edit_man.sh <<CF_EOF
- echo \$verb \$target
suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
if test \$verb = installing ; then
+ echo \$verb \$target
\$INSTALL_DATA \$TMP \$target
test -n "\$aliases" && (
cd $cf_subdir\${section} && (
@@ -3647,7 +3780,8 @@ cat >>man/edit_man.sh <<CF_EOF
done
)
)
- else
+ elif test \$verb = removing ; then
+ echo \$verb \$target
rm -f \$target
test -n "\$aliases" && (
cd $cf_subdir\${section} && (
@@ -3662,6 +3796,9 @@ cat >>man/edit_man.sh <<CF_EOF
done
)
)
+ else
+# echo ".hy 0"
+ cat \$TMP
fi
;;
esac
@@ -3677,7 +3814,7 @@ chmod 755 man/edit_man.sh
### Note that some functions (such as const) are normally disabled anyway.
echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
-echo "configure:3681: checking if you want to build with function extensions" >&5
+echo "configure:3818: checking if you want to build with function extensions" >&5
# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
if test "${enable_ext_funcs+set}" = set; then
@@ -3717,7 +3854,7 @@ fi
### use option --enable-const to turn on use of const beyond that in XSI.
echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6
-echo "configure:3721: checking for extended use of const keyword" >&5
+echo "configure:3858: checking for extended use of const keyword" >&5
# Check whether --enable-const or --disable-const was given.
if test "${enable_const+set}" = set; then
@@ -3735,7 +3872,7 @@ fi
echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6
-echo "configure:3739: checking if you want \$NCURSES_NO_PADDING code" >&5
+echo "configure:3876: checking if you want \$NCURSES_NO_PADDING code" >&5
# Check whether --enable-no-padding or --disable-no-padding was given.
if test "${enable_no_padding+set}" = set; then
@@ -3753,7 +3890,7 @@ EOF
### use option --enable-sigwinch to turn on use of SIGWINCH logic
echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6
-echo "configure:3757: checking if you want SIGWINCH handler" >&5
+echo "configure:3894: checking if you want SIGWINCH handler" >&5
# Check whether --enable-sigwinch or --disable-sigwinch was given.
if test "${enable_sigwinch+set}" = set; then
@@ -3771,7 +3908,7 @@ EOF
### use option --enable-tcap-names to allow user to define new capabilities
echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6
-echo "configure:3775: checking if you want user-definable terminal capabilities like termcap" >&5
+echo "configure:3912: checking if you want user-definable terminal capabilities like termcap" >&5
# Check whether --enable-tcap-names or --disable-tcap-names was given.
if test "${enable_tcap_names+set}" = set; then
@@ -3790,7 +3927,7 @@ test "$with_tcap_names" = yes && NCURSES_XNAMES=1
# These options are relatively safe to experiment with.
echo $ac_n "checking if you want all development code""... $ac_c" 1>&6
-echo "configure:3794: checking if you want all development code" >&5
+echo "configure:3931: checking if you want all development code" >&5
# Check whether --with-develop or --without-develop was given.
if test "${with_develop+set}" = set; then
@@ -3804,7 +3941,7 @@ echo "$ac_t""$with_develop" 1>&6
### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
echo $ac_n "checking if you want colorfgbg code""... $ac_c" 1>&6
-echo "configure:3808: checking if you want colorfgbg code" >&5
+echo "configure:3945: checking if you want colorfgbg code" >&5
# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
if test "${enable_hard_tabs+set}" = set; then
@@ -3822,7 +3959,7 @@ EOF
### use option --enable-hard-tabs to turn on use of hard-tabs optimize
echo $ac_n "checking if you want hard-tabs code""... $ac_c" 1>&6
-echo "configure:3826: checking if you want hard-tabs code" >&5
+echo "configure:3963: checking if you want hard-tabs code" >&5
# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
if test "${enable_hard_tabs+set}" = set; then
@@ -3839,7 +3976,7 @@ EOF
echo $ac_n "checking if you want to use restrict environment when running as root""... $ac_c" 1>&6
-echo "configure:3843: checking if you want to use restrict environment when running as root" >&5
+echo "configure:3980: checking if you want to use restrict environment when running as root" >&5
# Check whether --enable-root-environ or --disable-root-environ was given.
if test "${enable_root_environ+set}" = set; then
@@ -3857,7 +3994,7 @@ EOF
### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
echo $ac_n "checking if you want limited support for xmc""... $ac_c" 1>&6
-echo "configure:3861: checking if you want limited support for xmc" >&5
+echo "configure:3998: checking if you want limited support for xmc" >&5
# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
if test "${enable_xmc_glitch+set}" = set; then
@@ -3878,7 +4015,7 @@ EOF
echo $ac_n "checking if you do not want to assume colors are white-on-black""... $ac_c" 1>&6
-echo "configure:3882: checking if you do not want to assume colors are white-on-black" >&5
+echo "configure:4019: checking if you do not want to assume colors are white-on-black" >&5
# Check whether --enable-assumed-color or --disable-assumed-color was given.
if test "${enable_assumed_color+set}" = set; then
@@ -3896,7 +4033,7 @@ EOF
### use option --enable-hashmap to turn on use of hashmap scrolling logic
echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6
-echo "configure:3900: checking if you want hashmap scrolling-optimization code" >&5
+echo "configure:4037: checking if you want hashmap scrolling-optimization code" >&5
# Check whether --enable-hashmap or --disable-hashmap was given.
if test "${enable_hashmap+set}" = set; then
@@ -3913,7 +4050,7 @@ EOF
echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6
-echo "configure:3917: checking if you want experimental safe-sprintf code" >&5
+echo "configure:4054: checking if you want experimental safe-sprintf code" >&5
# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
if test "${enable_safe_sprintf+set}" = set; then
@@ -3933,7 +4070,7 @@ EOF
# when hashmap is used scroll hints are useless
if test "$with_hashmap" = no ; then
echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6
-echo "configure:3937: checking if you want to experiment without scrolling-hints code" >&5
+echo "configure:4074: checking if you want to experiment without scrolling-hints code" >&5
# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
if test "${enable_scroll_hints+set}" = set; then
@@ -3952,7 +4089,7 @@ fi
### use option --enable-widec to turn on use of wide-character support
echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6
-echo "configure:3956: checking if you want experimental wide-character code" >&5
+echo "configure:4093: checking if you want experimental wide-character code" >&5
# Check whether --enable-widec or --disable-widec was given.
if test "${enable_widec+set}" = set; then
@@ -3976,7 +4113,7 @@ fi
### use option --disable-echo to suppress full display compiling commands
echo $ac_n "checking if you want to display full commands during build""... $ac_c" 1>&6
-echo "configure:3980: checking if you want to display full commands during build" >&5
+echo "configure:4117: checking if you want to display full commands during build" >&5
# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
@@ -3990,13 +4127,14 @@ if test "$with_echo" = yes; then
ECHO_LINK=
else
ECHO_LINK='@ echo linking $@ ... ;'
+ test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
fi
echo "$ac_t""$with_echo" 1>&6
### use option --enable-warnings to turn on all gcc warnings
echo $ac_n "checking if you want to see compiler warnings""... $ac_c" 1>&6
-echo "configure:4000: checking if you want to see compiler warnings" >&5
+echo "configure:4138: checking if you want to see compiler warnings" >&5
# Check whether --enable-warnings or --disable-warnings was given.
if test "${enable_warnings+set}" = set; then
@@ -4004,17 +4142,19 @@ if test "${enable_warnings+set}" = set; then
with_warnings=$enableval
fi
+echo "$ac_t""$with_warnings" 1>&6
+
if test -n "$with_warnings"; then
ADAFLAGS="$ADAFLAGS -gnatg"
if test "$GCC" = yes
then
- cat > conftest.$ac_ext <<EOF
-#line 4014 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 4154 "configure"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
- echo "checking for $CC warning options" 1>&6
-echo "configure:4018: checking for $CC warning options" >&5
+ echo "checking for $CC warning options" 1>&6
+echo "configure:4158: checking for $CC warning options" >&5
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-W -Wall"
cf_warn_CONST=""
@@ -4032,7 +4172,7 @@ echo "configure:4018: checking for $CC warning options" >&5
Wstrict-prototypes $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo configure:4036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
@@ -4044,7 +4184,6 @@ fi
fi
-echo "$ac_t""$with_warnings" 1>&6
if test "$GCC" = yes
then
@@ -4065,9 +4204,9 @@ EOF
if test "$GCC" = yes
then
echo "checking for $CC __attribute__ directives" 1>&6
-echo "configure:4069: checking for $CC __attribute__ directives" >&5
- cat > conftest.$ac_ext <<EOF
-#line 4071 "configure"
+echo "configure:4208: checking for $CC __attribute__ directives" >&5
+cat > conftest.$ac_ext <<EOF
+#line 4210 "configure"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -4086,7 +4225,7 @@ extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
extern void foo(void) GCC_NORETURN;
int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
EOF
- for cf_attribute in scanf printf unused noreturn
+ for cf_attribute in scanf printf unused noreturn
do
CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
@@ -4105,7 +4244,7 @@ EOF
EOF
;;
esac
- if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
cat conftest.h >>confdefs.h
# else
@@ -4121,7 +4260,7 @@ fi
### use option --enable-assertions to turn on generation of assertion code
echo $ac_n "checking if you want to enable runtime assertions""... $ac_c" 1>&6
-echo "configure:4125: checking if you want to enable runtime assertions" >&5
+echo "configure:4264: checking if you want to enable runtime assertions" >&5
# Check whether --enable-assertions or --disable-assertions was given.
if test "${enable_assertions+set}" = set; then
@@ -4188,12 +4327,12 @@ fi
### Checks for libraries.
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
-echo "configure:4192: checking for gettimeofday" >&5
+echo "configure:4331: checking for gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4197 "configure"
+#line 4336 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gettimeofday(); below. */
@@ -4216,7 +4355,7 @@ gettimeofday();
; return 0; }
EOF
-if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gettimeofday=yes"
else
@@ -4239,7 +4378,7 @@ else
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:4243: checking for gettimeofday in -lbsd" >&5
+echo "configure:4382: checking for gettimeofday in -lbsd" >&5
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4247,7 +4386,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4251 "configure"
+#line 4390 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4258,7 +4397,7 @@ int main() {
gettimeofday()
; return 0; }
EOF
-if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4286,13 +4425,13 @@ fi
echo $ac_n "checking if -lm needed for math functions""... $ac_c" 1>&6
-echo "configure:4290: checking if -lm needed for math functions" >&5
+echo "configure:4429: checking if -lm needed for math functions" >&5
if eval "test \"`echo '$''{'cf_cv_need_libm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4296 "configure"
+#line 4435 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4302,7 +4441,7 @@ int main() {
double x = rand(); printf("result = %g\n", sin(x))
; return 0; }
EOF
-if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_need_libm=no
else
@@ -4324,12 +4463,12 @@ fi
### Checks for header files.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:4328: checking for ANSI C header files" >&5
+echo "configure:4467: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4333 "configure"
+#line 4472 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -4337,7 +4476,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4354,7 +4493,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4358 "configure"
+#line 4497 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -4372,7 +4511,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4376 "configure"
+#line 4515 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -4393,7 +4532,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 4397 "configure"
+#line 4536 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4404,7 +4543,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -4432,12 +4571,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4436: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4575: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4441 "configure"
+#line 4580 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4445,7 +4584,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4470,7 +4609,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4474: checking for opendir in -ldir" >&5
+echo "configure:4613: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4478,7 +4617,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4482 "configure"
+#line 4621 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4489,7 +4628,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4511,7 +4650,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4515: checking for opendir in -lx" >&5
+echo "configure:4654: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4519,7 +4658,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4523 "configure"
+#line 4662 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4530,7 +4669,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4554,13 +4693,13 @@ fi
echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6
-echo "configure:4558: checking for regular-expression headers" >&5
+echo "configure:4697: checking for regular-expression headers" >&5
if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4564 "configure"
+#line 4703 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <regex.h>
@@ -4573,7 +4712,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_regex="regex.h"
else
@@ -4582,7 +4721,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 4586 "configure"
+#line 4725 "configure"
#include "confdefs.h"
#include <regexp.h>
int main() {
@@ -4592,7 +4731,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_regex="regexp.h"
else
@@ -4603,7 +4742,7 @@ else
cf_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4607 "configure"
+#line 4746 "configure"
#include "confdefs.h"
#include <regexpr.h>
int main() {
@@ -4613,7 +4752,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_regex="regexpr.h"
else
@@ -4667,17 +4806,17 @@ unistd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4671: checking for $ac_hdr" >&5
+echo "configure:4810: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4676 "configure"
+#line 4815 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4708,7 +4847,7 @@ done
# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
if test "$ISC" = yes ; then
echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6
-echo "configure:4712: checking for main in -lcposix" >&5
+echo "configure:4851: checking for main in -lcposix" >&5
ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4716,14 +4855,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4720 "configure"
+#line 4859 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4751,7 +4890,7 @@ else
fi
echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6
-echo "configure:4755: checking for bzero in -linet" >&5
+echo "configure:4894: checking for bzero in -linet" >&5
ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4759,7 +4898,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4763 "configure"
+#line 4902 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4770,7 +4909,7 @@ int main() {
bzero()
; return 0; }
EOF
-if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4793,13 +4932,13 @@ fi
echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
-echo "configure:4797: checking if sys/time.h works with sys/select.h" >&5
+echo "configure:4936: checking if sys/time.h works with sys/select.h" >&5
if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4803 "configure"
+#line 4942 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -4814,7 +4953,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_sys_time_select=yes
else
@@ -4843,12 +4982,12 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4847: checking for working const" >&5
+echo "configure:4986: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4852 "configure"
+#line 4991 "configure"
#include "confdefs.h"
int main() {
@@ -4897,7 +5036,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:4901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -4918,21 +5057,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:4922: checking for inline" >&5
+echo "configure:5061: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 4929 "configure"
+#line 5068 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -4964,20 +5103,20 @@ EOF
echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6
-echo "configure:4968: checking if unsigned literals are legal" >&5
+echo "configure:5107: checking if unsigned literals are legal" >&5
if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4974 "configure"
+#line 5113 "configure"
#include "confdefs.h"
int main() {
long x = 1L + 1UL + 1U + 1
; return 0; }
EOF
-if { (eval echo configure:4981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_unsigned_literals=yes
else
@@ -4995,7 +5134,7 @@ echo "$ac_t""$cf_cv_unsigned_literals" 1>&6
echo $ac_n "checking for type of chtype""... $ac_c" 1>&6
-echo "configure:4999: checking for type of chtype" >&5
+echo "configure:5138: checking for type of chtype" >&5
if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5004,7 +5143,7 @@ else
cf_cv_typeof_chtype=long
else
cat > conftest.$ac_ext <<EOF
-#line 5008 "configure"
+#line 5147 "configure"
#include "confdefs.h"
#ifdef USE_WIDEC_SUPPORT
@@ -5050,7 +5189,7 @@ int main()
}
EOF
-if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_typeof_chtype=`cat cf_test.out`
else
@@ -5083,7 +5222,7 @@ test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
echo $ac_n "checking for number of bits in chtype""... $ac_c" 1>&6
-echo "configure:5087: checking for number of bits in chtype" >&5
+echo "configure:5226: checking for number of bits in chtype" >&5
if eval "test \"`echo '$''{'cf_cv_shift_limit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5092,7 +5231,7 @@ else
cf_cv_shift_limit=32
else
cat > conftest.$ac_ext <<EOF
-#line 5096 "configure"
+#line 5235 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5115,7 +5254,7 @@ int main()
}
EOF
-if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_shift_limit=`cat cf_test.out`
else
@@ -5135,7 +5274,7 @@ echo "$ac_t""$cf_cv_shift_limit" 1>&6
echo $ac_n "checking for width of character-index""... $ac_c" 1>&6
-echo "configure:5139: checking for width of character-index" >&5
+echo "configure:5278: checking for width of character-index" >&5
if eval "test \"`echo '$''{'cf_cv_widec_shift'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5162,13 +5301,13 @@ echo "$ac_t""$cf_cv_widec_shift" 1>&6
echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
-echo "configure:5166: checking if external errno is declared" >&5
+echo "configure:5305: checking if external errno is declared" >&5
if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5172 "configure"
+#line 5311 "configure"
#include "confdefs.h"
#ifdef HAVE_STDLIB_H
@@ -5181,7 +5320,7 @@ int main() {
long x = (long) errno
; return 0; }
EOF
-if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval 'cf_cv_dcl_'errno'=yes'
else
@@ -5212,13 +5351,13 @@ fi
# It's possible (for near-UNIX clones) that the data doesn't exist
echo $ac_n "checking if external errno exists""... $ac_c" 1>&6
-echo "configure:5216: checking if external errno exists" >&5
+echo "configure:5355: checking if external errno exists" >&5
if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5222 "configure"
+#line 5361 "configure"
#include "confdefs.h"
#undef errno
@@ -5228,7 +5367,7 @@ int main() {
errno = 2
; return 0; }
EOF
-if { (eval echo configure:5232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval 'cf_cv_have_'errno'=yes'
else
@@ -5260,23 +5399,23 @@ fi
echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6
-echo "configure:5264: checking if data-only library module links" >&5
+echo "configure:5403: checking if data-only library module links" >&5
if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest.a
- cat >conftest.$ac_ext <<EOF
-#line 5271 "configure"
+ cat >conftest.$ac_ext <<EOF
+#line 5410 "configure"
int testdata[3] = { 123, 456, 789 };
EOF
- if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
+ if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
mv conftest.o data.o && \
( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
fi
rm -f conftest.$ac_ext data.o
- cat >conftest.$ac_ext <<EOF
-#line 5280 "configure"
+ cat >conftest.$ac_ext <<EOF
+#line 5419 "configure"
int testfunc()
{
#if defined(NeXT)
@@ -5289,7 +5428,7 @@ int testfunc()
#endif
}
EOF
- if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
mv conftest.o func.o && \
( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
fi
@@ -5301,7 +5440,7 @@ EOF
cf_cv_link_dataonly=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 5305 "configure"
+#line 5444 "configure"
#include "confdefs.h"
int main()
@@ -5311,7 +5450,7 @@ else
}
EOF
-if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_link_dataonly=yes
else
@@ -5362,12 +5501,12 @@ vsscanf \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5366: checking for $ac_func" >&5
+echo "configure:5505: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5371 "configure"
+#line 5510 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5390,7 +5529,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5417,13 +5556,13 @@ done
if test "$with_getcap" = "yes" ; then
echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6
-echo "configure:5421: checking for terminal-capability database functions" >&5
+echo "configure:5560: checking for terminal-capability database functions" >&5
if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5427 "configure"
+#line 5566 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5438,7 +5577,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_cgetent=yes
else
@@ -5461,20 +5600,20 @@ fi
echo $ac_n "checking for isascii""... $ac_c" 1>&6
-echo "configure:5465: checking for isascii" >&5
+echo "configure:5604: checking for isascii" >&5
if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5471 "configure"
+#line 5610 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
int x = isascii(' ')
; return 0; }
EOF
-if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_have_isascii=yes
else
@@ -5495,9 +5634,9 @@ EOF
if test "$ac_cv_func_sigaction" = yes; then
echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6
-echo "configure:5499: checking whether sigaction needs _POSIX_SOURCE" >&5
+echo "configure:5638: checking whether sigaction needs _POSIX_SOURCE" >&5
cat > conftest.$ac_ext <<EOF
-#line 5501 "configure"
+#line 5640 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -5506,7 +5645,7 @@ int main() {
struct sigaction act
; return 0; }
EOF
-if { (eval echo configure:5510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
sigact_bad=no
else
@@ -5515,7 +5654,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 5519 "configure"
+#line 5658 "configure"
#include "confdefs.h"
#define _POSIX_SOURCE
@@ -5525,7 +5664,7 @@ int main() {
struct sigaction act
; return 0; }
EOF
-if { (eval echo configure:5529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
sigact_bad=yes
cat >> confdefs.h <<\EOF
@@ -5553,17 +5692,17 @@ unistd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5557: checking for $ac_hdr" >&5
+echo "configure:5696: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5562 "configure"
+#line 5701 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5594,17 +5733,17 @@ if test "$ISC" = yes ; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5598: checking for $ac_hdr" >&5
+echo "configure:5737: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5603 "configure"
+#line 5742 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5632,23 +5771,23 @@ done
fi
if test "$ac_cv_header_termios_h" = yes ; then
- case "$CFLAGS" in
+ case "$CFLAGS $CPPFLAGS" in
*-D_POSIX_SOURCE*)
termios_bad=dunno ;;
*) termios_bad=maybe ;;
esac
if test "$termios_bad" = maybe ; then
echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6
-echo "configure:5643: checking whether termios.h needs _POSIX_SOURCE" >&5
+echo "configure:5782: checking whether termios.h needs _POSIX_SOURCE" >&5
cat > conftest.$ac_ext <<EOF
-#line 5645 "configure"
+#line 5784 "configure"
#include "confdefs.h"
#include <termios.h>
int main() {
struct termios foo; int x = foo.c_iflag
; return 0; }
EOF
-if { (eval echo configure:5652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
termios_bad=no
else
@@ -5657,7 +5796,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 5661 "configure"
+#line 5800 "configure"
#include "confdefs.h"
#define _POSIX_SOURCE
@@ -5666,7 +5805,7 @@ int main() {
struct termios foo; int x = foo.c_iflag
; return 0; }
EOF
-if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
termios_bad=unknown
else
@@ -5689,13 +5828,13 @@ fi
echo $ac_n "checking for tcgetattr""... $ac_c" 1>&6
-echo "configure:5693: checking for tcgetattr" >&5
+echo "configure:5832: checking for tcgetattr" >&5
if eval "test \"`echo '$''{'cf_cv_have_tcgetattr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5699 "configure"
+#line 5838 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -5718,7 +5857,7 @@ TTY foo;
tcgetattr(1, &foo);
; return 0; }
EOF
-if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_have_tcgetattr=yes
else
@@ -5741,7 +5880,7 @@ if test "$cross_compiling" = yes ; then
echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2
else
echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
-echo "configure:5745: checking whether setvbuf arguments are reversed" >&5
+echo "configure:5884: checking whether setvbuf arguments are reversed" >&5
if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5749,7 +5888,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5753 "configure"
+#line 5892 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
@@ -5763,7 +5902,7 @@ main () {
exit(0); /* Non-reversed systems segv here. */
}
EOF
-if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setvbuf_reversed=yes
else
@@ -5788,12 +5927,12 @@ fi
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5792: checking return type of signal handlers" >&5
+echo "configure:5931: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5797 "configure"
+#line 5936 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -5810,7 +5949,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -5830,13 +5969,13 @@ EOF
echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6
-echo "configure:5834: checking for type sigaction_t" >&5
+echo "configure:5973: checking for type sigaction_t" >&5
if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5840 "configure"
+#line 5979 "configure"
#include "confdefs.h"
#include <signal.h>
@@ -5844,7 +5983,7 @@ int main() {
sigaction_t x
; return 0; }
EOF
-if { (eval echo configure:5848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_type_sigaction=yes
else
@@ -5865,21 +6004,21 @@ EOF
echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
-echo "configure:5869: checking declaration of size-change" >&5
+echo "configure:6008: checking declaration of size-change" >&5
if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cf_cv_sizechange=unknown
- cf_save_CFLAGS="$CFLAGS"
+ cf_save_CPPFLAGS="$CPPFLAGS"
for cf_opts in "" "NEED_PTEM_H"
do
- CFLAGS="$cf_save_CFLAGS"
- test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
cat > conftest.$ac_ext <<EOF
-#line 5883 "configure"
+#line 6022 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TERMIOS_H
@@ -5918,7 +6057,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_sizechange=yes
else
@@ -5929,7 +6068,7 @@ else
fi
rm -f conftest*
- CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
if test "$cf_cv_sizechange" = yes ; then
echo "size-change succeeded ($cf_opts)" >&5
test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
@@ -5957,12 +6096,12 @@ fi
echo $ac_n "checking for memmove""... $ac_c" 1>&6
-echo "configure:5961: checking for memmove" >&5
+echo "configure:6100: checking for memmove" >&5
if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5966 "configure"
+#line 6105 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char memmove(); below. */
@@ -5985,7 +6124,7 @@ memmove();
; return 0; }
EOF
-if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_memmove=yes"
else
@@ -6004,12 +6143,12 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for bcopy""... $ac_c" 1>&6
-echo "configure:6008: checking for bcopy" >&5
+echo "configure:6147: checking for bcopy" >&5
if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6013 "configure"
+#line 6152 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char bcopy(); below. */
@@ -6032,7 +6171,7 @@ bcopy();
; return 0; }
EOF
-if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_bcopy=yes"
else
@@ -6048,7 +6187,7 @@ if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6
-echo "configure:6052: checking if bcopy does overlapping moves" >&5
+echo "configure:6191: checking if bcopy does overlapping moves" >&5
if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6057,7 +6196,7 @@ else
cf_cv_good_bcopy=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6061 "configure"
+#line 6200 "configure"
#include "confdefs.h"
int main() {
@@ -6070,7 +6209,7 @@ int main() {
}
EOF
-if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_good_bcopy=yes
else
@@ -6108,7 +6247,7 @@ fi
echo $ac_n "checking if poll really works""... $ac_c" 1>&6
-echo "configure:6112: checking if poll really works" >&5
+echo "configure:6251: checking if poll really works" >&5
if eval "test \"`echo '$''{'cf_cv_working_poll'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6117,7 +6256,7 @@ if test "$cross_compiling" = yes; then
cf_cv_working_poll=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6121 "configure"
+#line 6260 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -6137,7 +6276,7 @@ int main() {
exit(ret != 0);
}
EOF
-if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_working_poll=yes
else
@@ -6165,13 +6304,13 @@ fi
echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
-echo "configure:6169: checking for builtin bool type" >&5
+echo "configure:6308: checking for builtin bool type" >&5
if eval "test \"`echo '$''{'cf_cv_cc_bool_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6175 "configure"
+#line 6314 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -6181,7 +6320,7 @@ int main() {
bool x = false
; return 0; }
EOF
-if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_cc_bool_type=1
else
@@ -6218,7 +6357,7 @@ os2*) #(vi
;;
esac
echo $ac_n "checking for library $cf_stdcpp_libname""... $ac_c" 1>&6
-echo "configure:6222: checking for library $cf_stdcpp_libname" >&5
+echo "configure:6361: checking for library $cf_stdcpp_libname" >&5
if eval "test \"`echo '$''{'cf_cv_libstdcpp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6226,7 +6365,7 @@ else
cf_save="$LIBS"
LIBS="$LIBS -l$cf_stdcpp_libname"
cat > conftest.$ac_ext <<EOF
-#line 6230 "configure"
+#line 6369 "configure"
#include "confdefs.h"
#include <strstream.h>
@@ -6237,7 +6376,7 @@ strstreambuf foo(buf, sizeof(buf))
; return 0; }
EOF
-if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_libstdcpp=yes
else
@@ -6255,12 +6394,16 @@ echo "$ac_t""$cf_cv_libstdcpp" 1>&6
test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
fi
+
if test "$GXX" = yes; then
+ echo $ac_n "checking version of ${CXX-g++}""... $ac_c" 1>&6
+echo "configure:6401: checking version of ${CXX-g++}" >&5
+ eval "${CXX-g++} --version"
case "`${CXX-g++} --version`" in
1*|2.0-6*)
cf_cxx_library=yes
;;
- 2.7*)
+ *-2.7*|2.7*)
cf_cxx_library=unknown
case $cf_cv_system_name in #(vi
@@ -6273,11 +6416,11 @@ os2*) #(vi
esac
if test "$ac_cv_prog_gxx" = yes; then
echo $ac_n "checking for lib$cf_gpp_libname""... $ac_c" 1>&6
-echo "configure:6277: checking for lib$cf_gpp_libname" >&5
+echo "configure:6420: checking for lib$cf_gpp_libname" >&5
cf_save="$LIBS"
LIBS="$LIBS -l$cf_gpp_libname"
cat > conftest.$ac_ext <<EOF
-#line 6281 "configure"
+#line 6424 "configure"
#include "confdefs.h"
#include <$cf_gpp_libname/builtin.h>
@@ -6286,7 +6429,7 @@ int main() {
two_arg_error_handler_t foo2 = lib_error_handler
; return 0; }
EOF
-if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cxx_library=yes
CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -6306,7 +6449,7 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 6310 "configure"
+#line 6453 "configure"
#include "confdefs.h"
#include <builtin.h>
@@ -6315,7 +6458,7 @@ int main() {
two_arg_error_handler_t foo2 = lib_error_handler
; return 0; }
EOF
-if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cxx_library=yes
CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -6344,8 +6487,9 @@ fi
else
cf_cxx_library=no
fi
+
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:6349: checking how to run the C++ preprocessor" >&5
+echo "configure:6493: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -6358,12 +6502,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 6362 "configure"
+#line 6506 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -6391,17 +6535,17 @@ for ac_hdr in typeinfo
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6395: checking for $ac_hdr" >&5
+echo "configure:6539: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6400 "configure"
+#line 6544 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6427,15 +6571,16 @@ else
fi
done
+
echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
-echo "configure:6433: checking for builtin bool type" >&5
+echo "configure:6578: checking for builtin bool type" >&5
if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6439 "configure"
+#line 6584 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -6445,7 +6590,7 @@ int main() {
bool x = false
; return 0; }
EOF
-if { (eval echo configure:6449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_builtin_bool=1
else
@@ -6465,7 +6610,7 @@ fi
echo $ac_n "checking for size of bool""... $ac_c" 1>&6
-echo "configure:6469: checking for size of bool" >&5
+echo "configure:6614: checking for size of bool" >&5
if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6475,7 +6620,7 @@ else
cf_cv_type_of_bool=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6479 "configure"
+#line 6624 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
@@ -6507,7 +6652,7 @@ main()
}
EOF
-if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_type_of_bool=`cat cf_test.out`
else
@@ -6531,7 +6676,7 @@ fi
echo $ac_n "checking for special defines needed for etip.h""... $ac_c" 1>&6
-echo "configure:6535: checking for special defines needed for etip.h" >&5
+echo "configure:6680: checking for special defines needed for etip.h" >&5
cf_save_CXXFLAGS="$CXXFLAGS"
cf_result="none"
for cf_math in "" MATH_H
@@ -6542,7 +6687,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 <<EOF
-#line 6546 "configure"
+#line 6691 "configure"
#include "confdefs.h"
#include <etip.h.in>
@@ -6551,7 +6696,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
test -n "$cf_math" && cat >> confdefs.h <<EOF
@@ -6576,13 +6721,14 @@ echo "$ac_t""$cf_result" 1>&6
CXXFLAGS="$cf_save_CXXFLAGS"
-if test "$CXX" = yes ; then
+if test -n "$CXX"; then
echo $ac_n "checking if $CXX accepts parameter initialization""... $ac_c" 1>&6
-echo "configure:6582: checking if $CXX accepts parameter initialization" >&5
+echo "configure:6727: checking if $CXX accepts parameter initialization" >&5
if eval "test \"`echo '$''{'cf_cv_cpp_param_init'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
@@ -6594,7 +6740,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
cf_cv_cpp_param_init=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6598 "configure"
+#line 6744 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
@@ -6615,7 +6761,7 @@ TEST::TEST(int x = 1) // some compilers do not like second initializer
void main() { }
EOF
-if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_cpp_param_init=yes
else
@@ -6627,6 +6773,13 @@ fi
rm -fr conftest*
fi
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
fi
@@ -6637,6 +6790,161 @@ test "$cf_cv_cpp_param_init" = yes && cat >> confdefs.h <<\EOF
EOF
+
+if test -n "$CXX"; then
+
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+for ac_hdr in strstream.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6809: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6814 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking if $CXX supports vscan function""... $ac_c" 1>&6
+echo "configure:6847: checking if $CXX supports vscan function" >&5
+if eval "test \"`echo '$''{'cf_cv_cpp_vscan_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ for cf_vscan_func in strstream stdio
+ do
+ case $cf_vscan_func in #(vi
+ stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
+ strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
+ esac
+ cat > conftest.$ac_ext <<EOF
+#line 6859 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+#define $cf_vscan_defs 1
+#if defined(USE_STDIO_VSCAN)
+#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
+#include <strstream.h>
+#endif
+
+int scanw(const char* fmt, ...)
+{
+ int result = -1;
+#if defined(__GNUG__)
+ char buf[BUFSIZ];
+
+ va_list args;
+ va_start(args, fmt);
+#if defined(USE_STDIO_VSCAN)
+ if (::vscanf(fmt, args) != -1)
+ result = 0;
+#elif defined(USE_STRSTREAM_VSCAN)
+ strstreambuf ss(buf, sizeof(buf));
+ if (ss.vscan(fmt, (_IO_va_list)args) != -1)
+ result = 0;
+#else
+#error case $cf_vscan_func failed
+#endif
+ va_end(args);
+#else
+#error sorry, we only know about the GNU compiler case
+#endif
+ return result;
+}
+
+int main() {
+int tmp, foo = scanw("%d", &tmp)
+; return 0; }
+EOF
+if { (eval echo configure:6899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ cf_cv_cpp_vscan_func=$cf_vscan_func; break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_cv_cpp_vscan_func=no
+fi
+rm -f conftest*
+ test "$cf_cv_cpp_vscan_func" != no && break
+ done
+
+fi
+
+echo "$ac_t""$cf_cv_cpp_vscan_func" 1>&6
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+fi
+
+case $cf_cv_cpp_vscan_func in #(vi
+stdio) #(vi
+ cat >> confdefs.h <<\EOF
+#define CPP_HAS_VSCAN_FUNC 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define USE_STDIO_VSCAN 1
+EOF
+
+ ;;
+strstream)
+ cat >> confdefs.h <<\EOF
+#define CPP_HAS_VSCAN_FUNC 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define USE_STRSTREAM_VSCAN 1
+EOF
+
+ ;;
+esac
+
+
case $cf_cv_system_name in #(vi
sco3.2v5*)
CXXLDFLAGS="-u main"
@@ -6657,7 +6965,7 @@ else
# may change.
echo $ac_n "checking for fallback type of bool""... $ac_c" 1>&6
-echo "configure:6661: checking for fallback type of bool" >&5
+echo "configure:6969: checking for fallback type of bool" >&5
case "$host_cpu" in #(vi
i?86) cf_cv_type_of_bool=char ;; #(vi
*) cf_cv_type_of_bool=int ;;
@@ -6673,7 +6981,7 @@ cf_ada_make=gnatmake
# Extract the first word of "$cf_ada_make", so it can be a program name with args.
set dummy $cf_ada_make; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6677: checking for $ac_word" >&5
+echo "configure:6985: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6727,7 +7035,7 @@ esac
# Extract the first word of "m4", so it can be a program name with args.
set dummy m4; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6731: checking for $ac_word" >&5
+echo "configure:7039: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_M4_exists'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6760,7 +7068,7 @@ fi
fi
if test "$cf_cv_prog_gnat_correct" = yes; then
echo $ac_n "checking if GNAT works""... $ac_c" 1>&6
-echo "configure:6764: checking if GNAT works" >&5
+echo "configure:7072: checking if GNAT works" >&5
rm -f conftest*
cat >>conftest.ads <<CF_EOF
@@ -6824,7 +7132,7 @@ fi
case ".$withval" in #(vi
./*) #(vi
;;
-.a-zA-Z:\\/*) #(vi OS/2 EMX
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
.\${*prefix}*) #(vi
eval withval="$withval"
@@ -6858,7 +7166,7 @@ fi
case ".$withval" in #(vi
./*) #(vi
;;
-.a-zA-Z:\\/*) #(vi OS/2 EMX
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
.\${*prefix}*) #(vi
eval withval="$withval"
@@ -6904,7 +7212,7 @@ fi
### Construct the library-subsets, if any, from this set of keywords:
### none, base, ext_funcs, termlib.
echo $ac_n "checking for library subsets""... $ac_c" 1>&6
-echo "configure:6908: checking for library subsets" >&5
+echo "configure:7216: checking for library subsets" >&5
if test "$with_termlib" = yes ; then
LIB_SUBSETS="termlib "
else
@@ -6915,12 +7223,15 @@ test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
echo "$ac_t""$LIB_SUBSETS" 1>&6
LIB_TRACING=DEBUG
-case "$CFLAGS" in
+ADA_TRACE=FALSE
+case "$CFLAGS $CPPFLAGS" in
*-DTRACE*)
LIB_TRACING=all
+ ADA_TRACE=TRUE
;;
esac
+
### Construct the list of include-directories to be generated
CPPFLAGS="$CPPFLAGS -I. -I../include"
@@ -6961,9 +7272,10 @@ fi
### Build up pieces for makefile rules
echo $ac_n "checking default library suffix""... $ac_c" 1>&6
-echo "configure:6965: checking default library suffix" >&5
+echo "configure:7276: checking default library suffix" >&5
case $DFT_LWR_MODEL in
+ libtool) DFT_ARG_SUFFIX='' ;;
normal) DFT_ARG_SUFFIX='' ;;
debug) DFT_ARG_SUFFIX='_g' ;;
profile) DFT_ARG_SUFFIX='_p' ;;
@@ -6973,10 +7285,11 @@ echo "configure:6965: checking default library suffix" >&5
echo "$ac_t""$DFT_ARG_SUFFIX" 1>&6
echo $ac_n "checking default library-dependency suffix""... $ac_c" 1>&6
-echo "configure:6977: checking default library-dependency suffix" >&5
+echo "configure:7289: checking default library-dependency suffix" >&5
case $DFT_LWR_MODEL in
+ libtool) DFT_DEP_SUFFIX='.la' ;;
normal) DFT_DEP_SUFFIX='.a' ;;
debug) DFT_DEP_SUFFIX='_g.a' ;;
profile) DFT_DEP_SUFFIX='_p.a' ;;
@@ -6990,9 +7303,10 @@ echo "configure:6977: checking default library-dependency suffix" >&5
echo "$ac_t""$DFT_DEP_SUFFIX" 1>&6
echo $ac_n "checking default object directory""... $ac_c" 1>&6
-echo "configure:6994: checking default object directory" >&5
+echo "configure:7307: checking default object directory" >&5
case $DFT_LWR_MODEL in
+ libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
normal) DFT_OBJ_SUBDIR='objects' ;;
debug) DFT_OBJ_SUBDIR='obj_g' ;;
profile) DFT_OBJ_SUBDIR='obj_p' ;;
@@ -7000,11 +7314,35 @@ echo "configure:6994: checking default object directory" >&5
esac
echo "$ac_t""$DFT_OBJ_SUBDIR" 1>&6
+# libtool thinks it can make c++ shared libraries (perhaps only g++)
+echo $ac_n "checking c++ library-dependency suffix""... $ac_c" 1>&6
+echo "configure:7320: checking c++ library-dependency suffix" >&5
+if test "$with_libtool" = "yes"; then
+ CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
+else
+
+
+ case normal in
+ libtool) CXX_LIB_SUFFIX='.la' ;;
+ normal) CXX_LIB_SUFFIX='.a' ;;
+ debug) CXX_LIB_SUFFIX='_g.a' ;;
+ profile) CXX_LIB_SUFFIX='_p.a' ;;
+ shared)
+ case $cf_cv_system_name in
+ hpux*) CXX_LIB_SUFFIX='.sl' ;;
+ *) CXX_LIB_SUFFIX='.so' ;;
+ esac
+ esac
+ test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
+fi
+echo "$ac_t""$CXX_LIB_SUFFIX" 1>&6
+
+
TINFO_LIST="$SHLIB_LIST"
test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6
-echo "configure:7008: checking where we will install curses.h" >&5
+echo "configure:7346: checking where we will install curses.h" >&5
test "$with_overwrite" = no && \
test "x$includedir" = 'x${prefix}/include' && \
includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
@@ -7018,7 +7356,11 @@ echo "$ac_t""$includedir" 1>&6
### could override this.
if test "$with_termlib" = yes ; then
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
- TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
+ fi
fi
PROG_DEPS="$TEST_DEPS"
PROG_ARGS="$TEST_ARGS"
@@ -7028,11 +7370,15 @@ PROG_ARGS="$TEST_ARGS"
echo $ac_n "checking for src modules""... $ac_c" 1>&6
-echo "configure:7032: checking for src modules" >&5
+echo "configure:7374: checking for src modules" >&5
# dependencies and linker-arguments for test-programs
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
-TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
+if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+else
+ TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
+fi
# dependencies and linker-arguments for utility-programs
PROG_ARGS="$TEST_ARGS"
@@ -7075,7 +7421,11 @@ EOF
EOF
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
- TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
+ fi
fi
fi
done
@@ -7121,6 +7471,7 @@ for cf_item in $cf_list_models
do
case $cf_item in
+ libtool) cf_subdir='obj_lo' ;;
normal) cf_subdir='objects' ;;
debug) cf_subdir='obj_g' ;;
profile) cf_subdir='obj_p' ;;
@@ -7136,6 +7487,11 @@ done
+cat >> confdefs.h <<EOF
+#define NCURSES_PATHSEP '$PATHSEP'
+EOF
+
+
### Now that we're done running tests, add the compiler-warnings, if any
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
@@ -7327,6 +7683,7 @@ s%@AR_OPTS@%$AR_OPTS%g
s%@cf_cv_makeflags@%$cf_cv_makeflags%g
s%@DESTDIR@%$DESTDIR%g
s%@cf_list_models@%$cf_list_models%g
+s%@LIBTOOL@%$LIBTOOL%g
s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g
s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
s%@TINFO_NAME@%$TINFO_NAME%g
@@ -7347,8 +7704,10 @@ s%@LOCAL_LDFLAGS2@%$LOCAL_LDFLAGS2%g
s%@INSTALL_LIB@%$INSTALL_LIB%g
s%@TERMINFO_SRC@%$TERMINFO_SRC%g
s%@FALLBACK_LIST@%$FALLBACK_LIST%g
+s%@PATHSEP@%$PATHSEP%g
s%@TERMINFO_DIRS@%$TERMINFO_DIRS%g
s%@TERMINFO@%$TERMINFO%g
+s%@NCURSES_OSPEED@%$NCURSES_OSPEED%g
s%@NCURSES_CONST@%$NCURSES_CONST%g
s%@NCURSES_XNAMES@%$NCURSES_XNAMES%g
s%@ECHO_LINK@%$ECHO_LINK%g
@@ -7371,10 +7730,12 @@ s%@cf_compile_generics@%$cf_compile_generics%g
s%@cf_generic_objects@%$cf_generic_objects%g
s%@ADA_INCLUDE@%$ADA_INCLUDE%g
s%@ADA_OBJECTS@%$ADA_OBJECTS%g
+s%@ADA_TRACE@%$ADA_TRACE%g
s%@ACPPFLAGS@%$ACPPFLAGS%g
s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g
s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
+s%@CXX_LIB_SUFFIX@%$CXX_LIB_SUFFIX%g
s%@EXTRA_LIBS@%$EXTRA_LIBS%g
s%@TINFO_LIST@%$TINFO_LIST%g
s%@SHLIB_LIST@%$SHLIB_LIST%g
@@ -7611,6 +7972,7 @@ TERMINFO="$TERMINFO"
TINFO_NAME="$TINFO_NAME"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
+WITH_CURSES_H="$with_curses_h"
cf_cv_abi_version="$cf_cv_abi_version"
cf_cv_do_symlinks="$cf_cv_do_symlinks"
cf_cv_rel_version="$cf_cv_rel_version"
@@ -7628,7 +7990,8 @@ cat >> $CONFIG_STATUS <<\EOF
case $cf_cv_system_name in
- os2) LIB_PREFIX='' ;;
+ OS/2*) LIB_PREFIX='' ;;
+ os2*) LIB_PREFIX='' ;;
*) LIB_PREFIX='lib' ;;
esac
cf_prefix=$LIB_PREFIX
@@ -7645,6 +8008,7 @@ do
case $cf_item in
+ libtool) cf_suffix='.la' ;;
normal) cf_suffix='.a' ;;
debug) cf_suffix='_g.a' ;;
profile) cf_suffix='_p.a' ;;
@@ -7695,6 +8059,7 @@ CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
case $cf_item in
+ libtool) cf_suffix='.la' ;;
normal) cf_suffix='.a' ;;
debug) cf_suffix='_g.a' ;;
profile) cf_suffix='_p.a' ;;
@@ -7708,6 +8073,7 @@ CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
case $cf_item in
+ libtool) cf_subdir='obj_lo' ;;
normal) cf_subdir='objects' ;;
debug) cf_subdir='obj_g' ;;
profile) cf_subdir='obj_p' ;;
@@ -7857,27 +8223,62 @@ done
DST=\$1
REF=\$2
SRC=\$3
+TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
+TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
echo installing \$SRC in \$DST
+CF_EOF
+if test $WITH_CURSES_H = yes; then
+ cat >>headers.sh <<CF_EOF
+case \$DST in
+/*/include/*)
+ END=\`basename \$DST\`
+ for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
+ do
+ NAME=\`basename \$i\`
+ echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
+ done
+ ;;
+*)
+ echo "" >> \$TMPSED
+ ;;
+esac
+CF_EOF
+else
+ cat >>headers.sh <<CF_EOF
case \$DST in
/*/include/*)
- TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
- TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
END=\`basename \$DST\`
for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
do
NAME=\`basename \$i\`
+ if test "\$NAME" = "curses.h"
+ then
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
+ NAME=ncurses.h
+ fi
echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
done
- rm -f \$TMPSRC
- sed -f \$TMPSED \$SRC > \$TMPSRC
- eval \$PRG \$TMPSRC \$DST/\`basename \$SRC\`
- rm -f \$TMPSRC \$TMPSED
;;
*)
- eval \$PRG \$SRC \$DST
+ echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
;;
esac
CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+rm -f \$TMPSRC
+sed -f \$TMPSED \$SRC > \$TMPSRC
+NAME=\`basename \$SRC\`
+CF_EOF
+if test $WITH_CURSES_H != yes; then
+ cat >>headers.sh <<CF_EOF
+test "\$NAME" = "curses.h" && NAME=ncurses.h
+CF_EOF
+fi
+cat >>headers.sh <<CF_EOF
+eval \$PRG \$TMPSRC \$DST/\$NAME
+rm -f \$TMPSRC \$TMPSED
+CF_EOF
chmod 0755 headers.sh
@@ -7902,7 +8303,7 @@ CF_EOF
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
do
echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
- test $i = curses.h && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
+ test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
done
cat >>$cf_dir/Makefile <<CF_EOF
diff --git a/contrib/ncurses/configure.in b/contrib/ncurses/configure.in
index aa1993b69ff3..62e9e829c2a7 100644
--- a/contrib/ncurses/configure.in
+++ b/contrib/ncurses/configure.in
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998,1999,2000,2001 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 <dickey@clark.net> 1996,1997
dnl
-dnl $Id: configure.in,v 1.217 2000/10/08 01:02:43 tom Exp $
+dnl $Id: configure.in,v 1.233 2001/04/07 22:09:57 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://dickey.his.com/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20000819)
-AC_REVISION($Revision: 1.217 $)
+AC_REVISION($Revision: 1.233 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@@ -61,19 +61,16 @@ AC_ARG_ENABLE(add-ons, dnl
[glibc_add_on=yes],
[glibc_add_on=])
-dnl We need to use [ and ] for other purposes for a while now.
-changequote(,)dnl
if test x"$glibc_add_on" = "xyes" ; then
rm -f $srcdir/Banner
# We are in glibc.
rm -f $srcdir/Makefile
cp $srcdir/Makefile.glibc $srcdir/Makefile
- echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \
+ echo "ncurses `grep \"^[[ ]]*ncurses-version[[ ]]*=.*$\" \
$srcdir/Makefile | sed -e \
- 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner
+ 's/^[[ ]]*ncurses-version[[ ]]*=[[ ]]*\([[^ ^ ]]*\)[[ ]]*$/\1/'`" > $srcdir/Banner
exit 0
fi
-changequote([,])dnl
### Save the given $CFLAGS to allow user-override.
cf_user_CFLAGS="$CFLAGS"
@@ -129,17 +126,15 @@ else
popdef([AC_MSG_ERROR])dnl
fi
-changequote(,)dnl
if test "$GXX" = yes; then
case "`${CXX-g++} --version`" in
- 1*|2.[0-6]*)
+ 1*|2.[[0-6]]*)
GXX=""; CXX=""; ac_cv_prog_gxx=no
cf_cxx_library=no
echo No: templates do not work
;;
esac
fi
-changequote([,])dnl
AC_MSG_CHECKING(if you want to build C++ binding and demo)
AC_ARG_WITH(cxx-binding,
@@ -162,6 +157,13 @@ AC_ARG_WITH(progs,
[cf_with_progs=yes])
AC_MSG_RESULT($cf_with_progs)
+AC_MSG_CHECKING(if you wish to install curses.h)
+AC_ARG_WITH(curses-h,
+ [ --without-curses-h install curses.h as ncurses.h only],
+ [with_curses_h=$withval],
+ [with_curses_h=yes])
+AC_MSG_RESULT($with_curses_h)
+
modules_to_build="ncurses"
if test "X$cf_with_progs" != Xno ; then
modules_to_build="$modules_to_build progs tack"
@@ -212,6 +214,20 @@ CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
cf_list_models=""
AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug")
+AC_MSG_CHECKING(if you want to build libraries with libtool)
+AC_ARG_WITH(libtool,
+ [ --with-libtool generate libraries with libtool],
+ [with_libtool=$withval],
+ [with_libtool=no])
+AC_MSG_RESULT($with_libtool)
+if test "$with_libtool" = "yes"; then
+ cf_list_models="$cf_list_models libtool"
+ test -z "$LIBTOOL" && LIBTOOL=libtool
+else
+ LIBTOOL=""
+fi
+AC_SUBST(LIBTOOL)
+
AC_MSG_CHECKING(if you want to build shared libraries)
AC_ARG_WITH(shared,
[ --with-shared generate shared-libraries],
@@ -248,6 +264,9 @@ test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
AC_MSG_CHECKING(for specified models)
test -z "$cf_list_models" && cf_list_models=normal
+dnl If we use libtool to generate libraries, then it must be the only
+dnl specified model.
+test "$with_libtool" = "yes" && cf_list_models=libtool
AC_MSG_RESULT($cf_list_models)
### Use the first model as the default, and save its suffix for use in building
@@ -337,6 +356,7 @@ AC_SUBST(CXX_G_OPT)
AC_MSG_CHECKING(for default loader flags)
case $DFT_LWR_MODEL in
+libtool) LD_MODEL='' ;;
normal) LD_MODEL='' ;;
debug) LD_MODEL=$CC_G_OPT ;;
profile) LD_MODEL='-pg';;
@@ -369,7 +389,7 @@ AC_MSG_CHECKING(if you wish to install ncurses overwriting curses)
AC_ARG_ENABLE(overwrite,
[ --disable-overwrite leave out the link to -lcurses],
[with_overwrite=$enableval],
- [with_overwrite=yes])
+ [if test "$prefix" != "/usr/local" ; then with_overwrite=yes; else with_overwrite=no; fi])
AC_MSG_RESULT($with_overwrite)
AC_MSG_CHECKING(if external terminfo-database is used)
@@ -533,6 +553,15 @@ AC_ARG_ENABLE(broken_linker,
AC_MSG_RESULT($with_broken_linker)
test "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER)
+### use option --with-ospeed to override ospeed's type
+AC_MSG_CHECKING(for type of ospeed)
+AC_ARG_WITH(ospeed,
+ [ --with-ospeed=TYPE override type of ospeed variable],
+ [NCURSES_OSPEED=$withval],
+ [NCURSES_OSPEED=short])
+AC_MSG_RESULT($NCURSES_OSPEED)
+AC_SUBST(NCURSES_OSPEED)
+
### use option --enable-bsdpad to have tputs process BSD-style prefix padding
AC_MSG_CHECKING(if tputs should process BSD-style prefix padding)
AC_ARG_ENABLE(bsdpad,
@@ -725,6 +754,7 @@ if test "$with_echo" = yes; then
ECHO_LINK=
else
ECHO_LINK='@ echo linking $@ ... ;'
+ test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
fi
AC_MSG_RESULT($with_echo)
AC_SUBST(ECHO_LINK)
@@ -734,11 +764,12 @@ AC_MSG_CHECKING(if you want to see compiler warnings)
AC_ARG_ENABLE(warnings,
[ --enable-warnings build: turn on GCC compiler warnings],
[with_warnings=$enableval])
+AC_MSG_RESULT($with_warnings)
+
if test -n "$with_warnings"; then
ADAFLAGS="$ADAFLAGS -gnatg"
CF_GCC_WARNINGS
fi
-AC_MSG_RESULT($with_warnings)
CF_GCC_ATTRIBUTES
### use option --enable-assertions to turn on generation of assertion code
@@ -889,12 +920,15 @@ CF_BOOL_DECL(cf_cv_cc_bool_type)
if test -n "$CXX" ; then
AC_LANG_CPLUSPLUS
CF_STDCPP_LIBRARY
+
if test "$GXX" = yes; then
+ AC_MSG_CHECKING(version of ${CXX-g++})
+ eval "${CXX-g++} --version"
case "`${CXX-g++} --version`" in
1*|2.[0-6]*)
cf_cxx_library=yes
;;
- 2.7*)
+ *-2.7*|2.7*)
CF_GPP_LIBRARY
;;
*)
@@ -904,11 +938,15 @@ if test -n "$CXX" ; then
else
cf_cxx_library=no
fi
+
AC_CHECK_HEADERS(typeinfo)
+
CF_BOOL_DECL
CF_BOOL_SIZE
CF_ETIP_DEFINES
CF_CPP_PARAM_INIT
+ CF_CPP_VSCAN_FUNC
+
case $cf_cv_system_name in #(vi
sco3.2v5*)
CXXLDFLAGS="-u main"
@@ -1032,11 +1070,14 @@ test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
AC_MSG_RESULT($LIB_SUBSETS)
LIB_TRACING=DEBUG
-case "$CFLAGS" in
+ADA_TRACE=FALSE
+case "$CFLAGS $CPPFLAGS" in
*-DTRACE*)
LIB_TRACING=all
+ ADA_TRACE=TRUE
;;
esac
+AC_SUBST(ADA_TRACE)
### Construct the list of include-directories to be generated
CF_INCLUDE_DIRS
@@ -1058,6 +1099,16 @@ CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
AC_MSG_RESULT($DFT_OBJ_SUBDIR)
+# libtool thinks it can make c++ shared libraries (perhaps only g++)
+AC_MSG_CHECKING(c++ library-dependency suffix)
+if test "$with_libtool" = "yes"; then
+ CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
+else
+ CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX)dnl we normally make a static library
+fi
+AC_MSG_RESULT($CXX_LIB_SUFFIX)
+AC_SUBST(CXX_LIB_SUFFIX)
+
TINFO_LIST="$SHLIB_LIST"
test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
@@ -1075,7 +1126,11 @@ AC_SUBST(SHLIB_LIST)
### could override this.
if test "$with_termlib" = yes ; then
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
- TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
+ if test "$DFT_LWR_MODEL" = "libtool"; then
+ TEST_ARGS="${TEST_DEPS}"
+ else
+ TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
+ fi
fi
PROG_DEPS="$TEST_DEPS"
PROG_ARGS="$TEST_ARGS"
@@ -1086,6 +1141,8 @@ PROG_ARGS="$TEST_ARGS"
CF_SRC_MODULES($modules_to_build)
CF_DIRS_TO_MAKE
+AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
+
### Now that we're done running tests, add the compiler-warnings, if any
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
@@ -1116,6 +1173,7 @@ TERMINFO="$TERMINFO"
TINFO_NAME="$TINFO_NAME"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
+WITH_CURSES_H="$with_curses_h"
cf_cv_abi_version="$cf_cv_abi_version"
cf_cv_do_symlinks="$cf_cv_do_symlinks"
cf_cv_rel_version="$cf_cv_rel_version"
diff --git a/contrib/ncurses/dist.mk b/contrib/ncurses/dist.mk
index 8d60a1742cc3..08cb199f0c21 100644
--- a/contrib/ncurses/dist.mk
+++ b/contrib/ncurses/dist.mk
@@ -1,4 +1,4 @@
-# $Id: dist.mk,v 1.224 2000/10/09 22:47:15 tom Exp $
+# $Id: dist.mk,v 1.247 2001/05/12 18:18:37 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@@ -9,8 +9,8 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
-NCURSES_MINOR = 1
-NCURSES_PATCH = 20001009
+NCURSES_MINOR = 2
+NCURSES_PATCH = 20010512
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@@ -49,8 +49,8 @@ doc/ncurses-intro.doc: doc/html/ncurses-intro.html
doc/hackguide.doc: doc/html/hackguide.html
$(DUMP2) doc/html/hackguide.html > $@
-# Note that this rule assumes the manpages were installed - it does not use
-# the copies in the build tree except to get the list of names.
+MANPROG = tbl | nroff -man
+
manhtml: MANIFEST
@rm -f doc/html/man/*.html
@mkdir -p doc/html/man
@@ -70,7 +70,7 @@ manhtml: MANIFEST
g=$${m}.html ;\
if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\
echo "Converting $$m to HTML" ;\
- man $$f | tr '\255' '-' | $(MAN2HTML) | \
+ man/edit_man.sh editing /usr/man man $$f | $(MANPROG) | tr '\255' '-' | $(MAN2HTML) | \
sed -f subst.sed |\
sed -e 's/"curses.3x.html"/"ncurses.3x.html"/g' \
> doc/html/man/$$g ;\
diff --git a/contrib/ncurses/doc/hackguide.doc b/contrib/ncurses/doc/hackguide.doc
new file mode 100644
index 000000000000..e9828d2919fa
--- /dev/null
+++ b/contrib/ncurses/doc/hackguide.doc
@@ -0,0 +1,687 @@
+
+ A Hacker's Guide to NCURSES
+
+ Contents
+
+ * Abstract
+ * Objective of the Package
+ + Why System V Curses?
+ + How to Design Extensions
+ * Portability and Configuration
+ * Documentation Conventions
+ * How to Report Bugs
+ * A Tour of the Ncurses Library
+ + Library Overview
+ + The Engine Room
+ + Keyboard Input
+ + Mouse Events
+ + Output and Screen Updating
+ * The Forms and Menu Libraries
+ * A Tour of the Terminfo Compiler
+ + Translation of Non-use Capabilities
+ + Use Capability Resolution
+ + Source-Form Translation
+ * Other Utilities
+ * Style Tips for Developers
+ * Porting Hints
+
+ Abstract
+
+ This document is a hacker's tour of the ncurses library and utilities.
+ It discusses design philosophy, implementation methods, and the
+ conventions used for coding and documentation. It is recommended
+ reading for anyone who is interested in porting, extending or
+ improving the package.
+
+ Objective of the Package
+
+ The objective of the ncurses package is to provide a free software API
+ for character-cell terminals and terminal emulators with the following
+ characteristics:
+ * Source-compatible with historical curses implementations
+ (including the original BSD curses and System V curses.
+ * Conformant with the XSI Curses standard issued as part of XPG4 by
+ X/Open.
+ * High-quality -- stable and reliable code, wide portability, good
+ packaging, superior documentation.
+ * Featureful -- should eliminate as much of the drudgery of C
+ interface programming as possible, freeing programmers to think at
+ a higher level of design.
+
+ These objectives are in priority order. So, for example, source
+ compatibility with older version must trump featurefulness -- we
+ cannot add features if it means breaking the portion of the API
+ corresponding to historical curses versions.
+
+Why System V Curses?
+
+ We used System V curses as a model, reverse-engineering their API, in
+ order to fulfill the first two objectives.
+
+ System V curses implementations can support BSD curses programs with
+ just a recompilation, so by capturing the System V API we also capture
+ BSD's.
+
+ More importantly for the future, the XSI Curses standard issued by
+ X/Open is explicitly and closely modeled on System V. So conformance
+ with System V took us most of the way to base-level XSI conformance.
+
+How to Design Extensions
+
+ The third objective (standards conformance) requires that it be easy
+ to condition source code using ncurses so that the absence of
+ nonstandard extensions does not break the code.
+
+ Accordingly, we have a policy of associating with each nonstandard
+ extension a feature macro, so that ncurses client code can use this
+ macro to condition in or out the code that requires the ncurses
+ extension.
+
+ For example, there is a macro NCURSES_MOUSE_VERSION which XSI Curses
+ does not define, but which is defined in the ncurses library header.
+ You can use this to condition the calls to the mouse API calls.
+
+ Portability and Configuration
+
+ Code written for ncurses may assume an ANSI-standard C compiler and
+ POSIX-compatible OS interface. It may also assume the presence of a
+ System-V-compatible select(2) call.
+
+ We encourage (but do not require) developers to make the code friendly
+ to less-capable UNIX environments wherever possible.
+
+ We encourage developers to support OS-specific optimizations and
+ methods not available under POSIX/ANSI, provided only that:
+ * All such code is properly conditioned so the build process does
+ not attempt to compile it under a plain ANSI/POSIX environment.
+ * Adding such implementation methods does not introduce
+ incompatibilities in the ncurses API between platforms.
+
+ We use GNU autoconf(1) as a tool to deal with portability issues. The
+ right way to leverage an OS-specific feature is to modify the autoconf
+ specification files (configure.in and aclocal.m4) to set up a new
+ feature macro, which you then use to condition your code.
+
+ Documentation Conventions
+
+ There are three kinds of documentation associated with this package.
+ Each has a different preferred format:
+ * Package-internal files (README, INSTALL, TO-DO etc.)
+ * Manual pages.
+ * Everything else (i.e., narrative documentation).
+
+ Our conventions are simple:
+ 1. Maintain package-internal files in plain text. The expected viewer
+ for them more(1) or an editor window; there's no point in
+ elaborate mark-up.
+ 2. Mark up manual pages in the man macros. These have to be viewable
+ through traditional man(1) programs.
+ 3. Write everything else in HTML.
+
+ When in doubt, HTMLize a master and use lynx(1) to generate plain
+ ASCII (as we do for the announcement document).
+
+ The reason for choosing HTML is that it's (a) well-adapted for on-line
+ browsing through viewers that are everywhere; (b) more easily readable
+ as plain text than most other mark-ups, if you don't have a viewer;
+ and (c) carries enough information that you can generate a
+ nice-looking printed version from it. Also, of course, it make
+ exporting things like the announcement document to WWW pretty trivial.
+
+ How to Report Bugs
+
+ The reporting address for bugs is bug-ncurses@gnu.org. This is a
+ majordomo list; to join, write to bug-ncurses-request@gnu.org with a
+ message containing the line:
+ subscribe <name>@<host.domain>
+
+ The ncurses code is maintained by a small group of volunteers. While
+ we try our best to fix bugs promptly, we simply don't have a lot of
+ hours to spend on elementary hand-holding. We rely on intelligent
+ cooperation from our users. If you think you have found a bug in
+ ncurses, there are some steps you can take before contacting us that
+ will help get the bug fixed quickly.
+
+ In order to use our bug-fixing time efficiently, we put people who
+ show us they've taken these steps at the head of our queue. This means
+ that if you don't, you'll probably end up at the tail end and have to
+ wait a while.
+ 1. Develop a recipe to reproduce the bug.
+ Bugs we can reproduce are likely to be fixed very quickly, often
+ within days. The most effective single thing you can do to get a
+ quick fix is develop a way we can duplicate the bad behavior --
+ ideally, by giving us source for a small, portable test program
+ that breaks the library. (Even better is a keystroke recipe using
+ one of the test programs provided with the distribution.)
+ 2. Try to reproduce the bug on a different terminal type.
+ In our experience, most of the behaviors people report as library
+ bugs are actually due to subtle problems in terminal descriptions.
+ This is especially likely to be true if you're using a traditional
+ asynchronous terminal or PC-based terminal emulator, rather than
+ xterm or a UNIX console entry.
+ It's therefore extremely helpful if you can tell us whether or not
+ your problem reproduces on other terminal types. Usually you'll
+ have both a console type and xterm available; please tell us
+ whether or not your bug reproduces on both.
+ If you have xterm available, it is also good to collect xterm
+ reports for different window sizes. This is especially true if you
+ normally use an unusual xterm window size -- a surprising number
+ of the bugs we've seen are either triggered or masked by these.
+ 3. Generate and examine a trace file for the broken behavior.
+ Recompile your program with the debugging versions of the
+ libraries. Insert a trace() call with the argument set to
+ TRACE_UPDATE. (See "Writing Programs with NCURSES" for details on
+ trace levels.) Reproduce your bug, then look at the trace file to
+ see what the library was actually doing.
+ Another frequent cause of apparent bugs is application coding
+ errors that cause the wrong things to be put on the virtual
+ screen. Looking at the virtual-screen dumps in the trace file will
+ tell you immediately if this is happening, and save you from the
+ possible embarrassment of being told that the bug is in your code
+ and is your problem rather than ours.
+ If the virtual-screen dumps look correct but the bug persists,
+ it's possible to crank up the trace level to give more and more
+ information about the library's update actions and the control
+ sequences it issues to perform them. The test directory of the
+ distribution contains a tool for digesting these logs to make them
+ less tedious to wade through.
+ Often you'll find terminfo problems at this stage by noticing that
+ the escape sequences put out for various capabilities are wrong.
+ If not, you're likely to learn enough to be able to characterize
+ any bug in the screen-update logic quite exactly.
+ 4. Report details and symptoms, not just interpretations.
+ If you do the preceding two steps, it is very likely that you'll
+ discover the nature of the problem yourself and be able to send us
+ a fix. This will create happy feelings all around and earn you
+ good karma for the first time you run into a bug you really can't
+ characterize and fix yourself.
+ If you're still stuck, at least you'll know what to tell us.
+ Remember, we need details. If you guess about what is safe to
+ leave out, you are too likely to be wrong.
+ If your bug produces a bad update, include a trace file. Try to
+ make the trace at the least voluminous level that pins down the
+ bug. Logs that have been through tracemunch are OK, it doesn't
+ throw away any information (actually they're better than
+ un-munched ones because they're easier to read).
+ If your bug produces a core-dump, please include a symbolic stack
+ trace generated by gdb(1) or your local equivalent.
+ Tell us about every terminal on which you've reproduced the bug --
+ and every terminal on which you can't. Ideally, sent us terminfo
+ sources for all of these (yours might differ from ours).
+ Include your ncurses version and your OS/machine type, of course!
+ You can find your ncurses version in the curses.h file.
+
+ If your problem smells like a logic error or in cursor movement or
+ scrolling or a bad capability, there are a couple of tiny test frames
+ for the library algorithms in the progs directory that may help you
+ isolate it. These are not part of the normal build, but do have their
+ own make productions.
+
+ The most important of these is mvcur, a test frame for the
+ cursor-movement optimization code. With this program, you can see
+ directly what control sequences will be emitted for any given cursor
+ movement or scroll/insert/delete operations. If you think you've got a
+ bad capability identified, you can disable it and test again. The
+ program is command-driven and has on-line help.
+
+ If you think the vertical-scroll optimization is broken, or just want
+ to understand how it works better, build hashmap and read the header
+ comments of hardscroll.c and hashmap.c; then try it out. You can also
+ test the hardware-scrolling optimization separately with hardscroll.
+
+ There's one other interactive tester, tctest, that exercises
+ translation between termcap and terminfo formats. If you have a
+ serious need to run this, you probably belong on our development team!
+
+ A Tour of the Ncurses Library
+
+Library Overview
+
+ Most of the library is superstructure -- fairly trivial convenience
+ interfaces to a small set of basic functions and data structures used
+ to manipulate the virtual screen (in particular, none of this code
+ does any I/O except through calls to more fundamental modules
+ described below). The files
+
+ lib_addch.c lib_bkgd.c lib_box.c lib_chgat.c lib_clear.c
+ lib_clearok.c lib_clrbot.c lib_clreol.c lib_colorset.c lib_data.c
+ lib_delch.c lib_delwin.c lib_echo.c lib_erase.c lib_gen.c
+ lib_getstr.c lib_hline.c lib_immedok.c lib_inchstr.c lib_insch.c
+ lib_insdel.c lib_insstr.c lib_instr.c lib_isendwin.c lib_keyname.c
+ lib_leaveok.c lib_move.c lib_mvwin.c lib_overlay.c lib_pad.c
+ lib_printw.c lib_redrawln.c lib_scanw.c lib_screen.c lib_scroll.c
+ lib_scrollok.c lib_scrreg.c lib_set_term.c lib_slk.c
+ lib_slkatr_set.c lib_slkatrof.c lib_slkatron.c lib_slkatrset.c
+ lib_slkattr.c lib_slkclear.c lib_slkcolor.c lib_slkinit.c
+ lib_slklab.c lib_slkrefr.c lib_slkset.c lib_slktouch.c lib_touch.c
+ lib_unctrl.c lib_vline.c lib_wattroff.c lib_wattron.c lib_window.c
+
+ are all in this category. They are very unlikely to need change,
+ barring bugs or some fundamental reorganization in the underlying data
+ structures.
+
+ These files are used only for debugging support:
+
+ lib_trace.c lib_traceatr.c lib_tracebits.c lib_tracechr.c
+ lib_tracedmp.c lib_tracemse.c trace_buf.c
+
+ It is rather unlikely you will ever need to change these, unless you
+ want to introduce a new debug trace level for some reasoon.
+
+ There is another group of files that do direct I/O via tputs(),
+ computations on the terminal capabilities, or queries to the OS
+ environment, but nevertheless have only fairly low complexity. These
+ include:
+
+ lib_acs.c lib_beep.c lib_color.c lib_endwin.c lib_initscr.c
+ lib_longname.c lib_newterm.c lib_options.c lib_termcap.c lib_ti.c
+ lib_tparm.c lib_tputs.c lib_vidattr.c read_entry.c.
+
+ They are likely to need revision only if ncurses is being ported to an
+ environment without an underlying terminfo capability representation.
+
+ These files have serious hooks into the tty driver and signal
+ facilities:
+
+ lib_kernel.c lib_baudrate.c lib_raw.c lib_tstp.c lib_twait.c
+
+ If you run into porting snafus moving the package to another UNIX, the
+ problem is likely to be in one of these files. The file lib_print.c
+ uses sleep(2) and also falls in this category.
+
+ Almost all of the real work is done in the files
+
+ hardscroll.c hashmap.c lib_addch.c lib_doupdate.c lib_getch.c
+ lib_mouse.c lib_mvcur.c lib_refresh.c lib_setup.c lib_vidattr.c
+
+ Most of the algorithmic complexity in the library lives in these
+ files. If there is a real bug in ncurses itself, it's probably here.
+ We'll tour some of these files in detail below (see The Engine Room).
+
+ Finally, there is a group of files that is actually most of the
+ terminfo compiler. The reason this code lives in the ncurses library
+ is to support fallback to /etc/termcap. These files include
+
+ alloc_entry.c captoinfo.c comp_captab.c comp_error.c comp_hash.c
+ comp_parse.c comp_scan.c parse_entry.c read_termcap.c write_entry.c
+
+ We'll discuss these in the compiler tour.
+
+The Engine Room
+
+ Keyboard Input
+
+ All ncurses input funnels through the function wgetch(), defined in
+ lib_getch.c. This function is tricky; it has to poll for keyboard and
+ mouse events and do a running match of incoming input against the set
+ of defined special keys.
+
+ The central data structure in this module is a FIFO queue, used to
+ match multiple-character input sequences against special-key
+ capabilities; also to implement pushback via ungetch().
+
+ The wgetch() code distinguishes between function key sequences and the
+ same sequences typed manually by doing a timed wait after each input
+ character that could lead a function key sequence. If the entire
+ sequence takes less than 1 second, it is assumed to have been
+ generated by a function key press.
+
+ Hackers bruised by previous encounters with variant select(2) calls
+ may find the code in lib_twait.c interesting. It deals with the
+ problem that some BSD selects don't return a reliable time-left value.
+ The function timed_wait() effectively simulates a System V select.
+
+ Mouse Events
+
+ If the mouse interface is active, wgetch() polls for mouse events each
+ call, before it goes to the keyboard for input. It is up to
+ lib_mouse.c how the polling is accomplished; it may vary for different
+ devices.
+
+ Under xterm, however, mouse event notifications come in via the
+ keyboard input stream. They are recognized by having the kmous
+ capability as a prefix. This is kind of klugey, but trying to wire in
+ recognition of a mouse key prefix without going through the
+ function-key machinery would be just too painful, and this turns out
+ to imply having the prefix somewhere in the function-key capabilities
+ at terminal-type initialization.
+
+ This kluge only works because kmous isn't actually used by any
+ historic terminal type or curses implementation we know of. Best guess
+ is it's a relic of some forgotten experiment in-house at Bell Labs
+ that didn't leave any traces in the publicly-distributed System V
+ terminfo files. If System V or XPG4 ever gets serious about using it
+ again, this kluge may have to change.
+
+ Here are some more details about mouse event handling:
+
+ The lib_mouse()code is logically split into a lower level that accepts
+ event reports in a device-dependent format and an upper level that
+ parses mouse gestures and filters events. The mediating data structure
+ is a circular queue of event structures.
+
+ Functionally, the lower level's job is to pick up primitive events and
+ put them on the circular queue. This can happen in one of two ways:
+ either (a) _nc_mouse_event() detects a series of incoming mouse
+ reports and queues them, or (b) code in lib_getch.c detects the kmous
+ prefix in the keyboard input stream and calls _nc_mouse_inline to
+ queue up a series of adjacent mouse reports.
+
+ In either case, _nc_mouse_parse() should be called after the series is
+ accepted to parse the digested mouse reports (low-level events) into a
+ gesture (a high-level or composite event).
+
+ Output and Screen Updating
+
+ With the single exception of character echoes during a wgetnstr() call
+ (which simulates cooked-mode line editing in an ncurses window), the
+ library normally does all its output at refresh time.
+
+ The main job is to go from the current state of the screen (as
+ represented in the curscr window structure) to the desired new state
+ (as represented in the newscr window structure), while doing as little
+ I/O as possible.
+
+ The brains of this operation are the modules hashmap.c, hardscroll.c
+ and lib_doupdate.c; the latter two use lib_mvcur.c. Essentially, what
+ happens looks like this:
+
+ The hashmap.c module tries to detect vertical motion changes between
+ the real and virtual screens. This information is represented by the
+ oldindex members in the newscr structure. These are modified by
+ vertical-motion and clear operations, and both are re-initialized
+ after each update. To this change-journalling information, the hashmap
+ code adds deductions made using a modified Heckel algorithm on hash
+ values generated from the line contents.
+
+ The hardscroll.c module computes an optimum set of scroll, insertion,
+ and deletion operations to make the indices match. It calls
+ _nc_mvcur_scrolln() in lib_mvcur.c to do those motions.
+
+ Then lib_doupdate.c goes to work. Its job is to do line-by-line
+ transformations of curscr lines to newscr lines. Its main tool is the
+ routine mvcur() in lib_mvcur.c. This routine does cursor-movement
+ optimization, attempting to get from given screen location A to given
+ location B in the fewest output characters posible.
+
+ If you want to work on screen optimizations, you should use the fact
+ that (in the trace-enabled version of the library) enabling the
+ TRACE_TIMES trace level causes a report to be emitted after each
+ screen update giving the elapsed time and a count of characters
+ emitted during the update. You can use this to tell when an update
+ optimization improves efficiency.
+
+ In the trace-enabled version of the library, it is also possible to
+ disable and re-enable various optimizations at runtime by tweaking the
+ variable _nc_optimize_enable. See the file include/curses.h.in for
+ mask values, near the end.
+
+ The Forms and Menu Libraries
+
+ The forms and menu libraries should work reliably in any environment
+ you can port ncurses to. The only portability issue anywhere in them
+ is what flavor of regular expressions the built-in form field type
+ TYPE_REGEXP will recognize.
+
+ The configuration code prefers the POSIX regex facility, modeled on
+ System V's, but will settle for BSD regexps if the former isn't
+ available.
+
+ Historical note: the panels code was written primarily to assist in
+ porting u386mon 2.0 (comp.sources.misc v14i001-4) to systems lacking
+ panels support; u386mon 2.10 and beyond use it. This version has been
+ slightly cleaned up for ncurses.
+
+ A Tour of the Terminfo Compiler
+
+ The ncurses implementation of tic is rather complex internally; it has
+ to do a trying combination of missions. This starts with the fact
+ that, in addition to its normal duty of compiling terminfo sources
+ into loadable terminfo binaries, it has to be able to handle termcap
+ syntax and compile that too into terminfo entries.
+
+ The implementation therefore starts with a table-driven, dual-mode
+ lexical analyzer (in comp_scan.c). The lexer chooses its mode (termcap
+ or terminfo) based on the first `,' or `:' it finds in each entry. The
+ lexer does all the work of recognizing capability names and values;
+ the grammar above it is trivial, just "parse entries till you run out
+ of file".
+
+Translation of Non-use Capabilities
+
+ Translation of most things besides use capabilities is pretty
+ straightforward. The lexical analyzer's tokenizer hands each
+ capability name to a hash function, which drives a table lookup. The
+ table entry yields an index which is used to look up the token type in
+ another table, and controls interpretation of the value.
+
+ One possibly interesting aspect of the implementation is the way the
+ compiler tables are initialized. All the tables are generated by
+ various awk/sed/sh scripts from a master table include/Caps; these
+ scripts actually write C initializers which are linked to the
+ compiler. Furthermore, the hash table is generated in the same way, so
+ it doesn't have to be generated at compiler startup time (another
+ benefit of this organization is that the hash table can be in
+ shareable text space).
+
+ Thus, adding a new capability is usually pretty trivial, just a matter
+ of adding one line to the include/Caps file. We'll have more to say
+ about this in the section on Source-Form Translation.
+
+Use Capability Resolution
+
+ The background problem that makes tic tricky isn't the capability
+ translation itself, it's the resolution of use capabilities. Older
+ versions would not handle forward use references for this reason (that
+ is, a using terminal always had to follow its use target in the source
+ file). By doing this, they got away with a simple implementation
+ tactic; compile everything as it blows by, then resolve uses from
+ compiled entries.
+
+ This won't do for ncurses. The problem is that that the whole
+ compilation process has to be embeddable in the ncurses library so
+ that it can be called by the startup code to translate termcap entries
+ on the fly. The embedded version can't go promiscuously writing
+ everything it translates out to disk -- for one thing, it will
+ typically be running with non-root permissions.
+
+ So our tic is designed to parse an entire terminfo file into a
+ doubly-linked circular list of entry structures in-core, and then do
+ use resolution in-memory before writing everything out. This design
+ has other advantages: it makes forward and back use-references equally
+ easy (so we get the latter for free), and it makes checking for name
+ collisions before they're written out easy to do.
+
+ And this is exactly how the embedded version works. But the
+ stand-alone user-accessible version of tic partly reverts to the
+ historical strategy; it writes to disk (not keeping in core) any entry
+ with no use references.
+
+ This is strictly a core-economy kluge, implemented because the
+ terminfo master file is large enough that some core-poor systems swap
+ like crazy when you compile it all in memory...there have been reports
+ of this process taking three hours, rather than the twenty seconds or
+ less typical on the author's development box.
+
+ So. The executable tic passes the entry-parser a hook that immediately
+ writes out the referenced entry if it has no use capabilities. The
+ compiler main loop refrains from adding the entry to the in-core list
+ when this hook fires. If some other entry later needs to reference an
+ entry that got written immediately, that's OK; the resolution code
+ will fetch it off disk when it can't find it in core.
+
+ Name collisions will still be detected, just not as cleanly. The
+ write_entry() code complains before overwriting an entry that
+ postdates the time of tic's first call to write_entry(), Thus it will
+ complain about overwriting entries newly made during the tic run, but
+ not about overwriting ones that predate it.
+
+Source-Form Translation
+
+ Another use of tic is to do source translation between various termcap
+ and terminfo formats. There are more variants out there than you might
+ think; the ones we know about are described in the captoinfo(1) manual
+ page.
+
+ The translation output code (dump_entry() in ncurses/dump_entry.c) is
+ shared with the infocmp(1) utility. It takes the same internal
+ representation used to generate the binary form and dumps it to
+ standard output in a specified format.
+
+ The include/Caps file has a header comment describing ways you can
+ specify source translations for nonstandard capabilities just by
+ altering the master table. It's possible to set up capability aliasing
+ or tell the compiler to plain ignore a given capability without
+ writing any C code at all.
+
+ For circumstances where you need to do algorithmic translation, there
+ are functions in parse_entry.c called after the parse of each entry
+ that are specifically intended to encapsulate such translations. This,
+ for example, is where the AIX box1 capability get translated to an
+ acsc string.
+
+ Other Utilities
+
+ The infocmp utility is just a wrapper around the same entry-dumping
+ code used by tic for source translation. Perhaps the one interesting
+ aspect of the code is the use of a predicate function passed in to
+ dump_entry() to control which capabilities are dumped. This is
+ necessary in order to handle both the ordinary De-compilation case and
+ entry difference reporting.
+
+ The tput and clear utilities just do an entry load followed by a
+ tputs() of a selected capability.
+
+ Style Tips for Developers
+
+ See the TO-DO file in the top-level directory of the source
+ distribution for additions that would be particularly useful.
+
+ The prefix _nc_ should be used on library public functions that are
+ not part of the curses API in order to prevent pollution of the
+ application namespace. If you have to add to or modify the function
+ prototypes in curses.h.in, read ncurses/MKlib_gen.sh first so you can
+ avoid breaking XSI conformance. Please join the ncurses mailing list.
+ See the INSTALL file in the top level of the distribution for details
+ on the list.
+
+ Look for the string FIXME in source files to tag minor bugs and
+ potential problems that could use fixing.
+
+ Don't try to auto-detect OS features in the main body of the C code.
+ That's the job of the configuration system.
+
+ To hold down complexity, do make your code data-driven. Especially, if
+ you can drive logic from a table filtered out of include/Caps, do it.
+ If you find you need to augment the data in that file in order to
+ generate the proper table, that's still preferable to ad-hoc code --
+ that's why the fifth field (flags) is there.
+
+ Have fun!
+
+ Porting Hints
+
+ The following notes are intended to be a first step towards DOS and
+ Macintosh ports of the ncurses libraries.
+
+ The following library modules are `pure curses'; they operate only on
+ the curses internal structures, do all output through other curses
+ calls (not including tputs() and putp()) and do not call any other
+ UNIX routines such as signal(2) or the stdio library. Thus, they
+ should not need to be modified for single-terminal ports.
+
+ lib_addch.c lib_addstr.c lib_bkgd.c lib_box.c lib_clear.c
+ lib_clrbot.c lib_clreol.c lib_delch.c lib_delwin.c lib_erase.c
+ lib_inchstr.c lib_insch.c lib_insdel.c lib_insstr.c lib_keyname.c
+ lib_move.c lib_mvwin.c lib_newwin.c lib_overlay.c lib_pad.c
+ lib_printw.c lib_refresh.c lib_scanw.c lib_scroll.c lib_scrreg.c
+ lib_set_term.c lib_touch.c lib_tparm.c lib_tputs.c lib_unctrl.c
+ lib_window.c panel.c
+
+ This module is pure curses, but calls outstr():
+
+ lib_getstr.c
+
+ These modules are pure curses, except that they use tputs() and
+ putp():
+
+ lib_beep.c lib_color.c lib_endwin.c lib_options.c lib_slk.c
+ lib_vidattr.c
+
+ This modules assist in POSIX emulation on non-POSIX systems:
+
+ sigaction.c
+ signal calls
+
+ The following source files will not be needed for a
+ single-terminal-type port.
+
+ alloc_entry.c captoinfo.c clear.c comp_captab.c comp_error.c
+ comp_hash.c comp_main.c comp_parse.c comp_scan.c dump_entry.c
+ infocmp.c parse_entry.c read_entry.c tput.c write_entry.c
+
+ The following modules will use open()/read()/write()/close()/lseek()
+ on files, but no other OS calls.
+
+ lib_screen.c
+ used to read/write screen dumps
+
+ lib_trace.c
+ used to write trace data to the logfile
+
+ Modules that would have to be modified for a port start here:
+
+ The following modules are `pure curses' but contain assumptions
+ inappropriate for a memory-mapped port.
+
+ lib_longname.c
+ assumes there may be multiple terminals
+
+ lib_acs.c
+ assumes acs_map as a double indirection
+
+ lib_mvcur.c
+ assumes cursor moves have variable cost
+
+ lib_termcap.c
+ assumes there may be multiple terminals
+
+ lib_ti.c
+ assumes there may be multiple terminals
+
+ The following modules use UNIX-specific calls:
+
+ lib_doupdate.c
+ input checking
+
+ lib_getch.c
+ read()
+
+ lib_initscr.c
+ getenv()
+
+ lib_newterm.c
+ lib_baudrate.c
+ lib_kernel.c
+ various tty-manipulation and system calls
+
+ lib_raw.c
+ various tty-manipulation calls
+
+ lib_setup.c
+ various tty-manipulation calls
+
+ lib_restart.c
+ various tty-manipulation calls
+
+ lib_tstp.c
+ signal-manipulation calls
+
+ lib_twait.c
+ gettimeofday(), select().
+ _________________________________________________________________
+
+
+ Eric S. Raymond <esr@snark.thyrsus.com>
+
+ (Note: This is not the bug address!)
diff --git a/contrib/ncurses/doc/html/announce.html b/contrib/ncurses/doc/html/announce.html
index e7a79d6c899d..3005e49d5889 100644
--- a/contrib/ncurses/doc/html/announce.html
+++ b/contrib/ncurses/doc/html/announce.html
@@ -1,15 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
- $Id: announce.html,v 1.38 2000/07/04 22:41:38 tom Exp $
+ $Id: announce.html,v 1.39 2000/10/20 10:47:16 tom Exp $
-->
<HTML>
<HEAD>
-<TITLE>Announcing ncurses 5.1</TITLE>
+<TITLE>Announcing ncurses 5.2</TITLE>
<link rev=made href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1>Announcing ncurses 5.1</H1>
+<H1>Announcing ncurses 5.2</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,
@@ -38,136 +38,327 @@ the GNU distribution site
<H1>Release Notes</H1>
-This release is designed to be upward compatible from ncurses 5.0; very few
-applications will require recompilation, depending on the platform.
-These are the highlights from the change-log since ncurses 5.0 release.
+This release is designed to be upward compatible from ncurses 5.0 and 5.1;
+very few applications will require recompilation, depending on the platform.
+These are the highlights from the change-log since ncurses 5.1 release.
<p>
Interface changes:
<ul>
- <li>made the extended terminal capabilities
- (<code>configure&nbsp;--enable-tcap-names</code>)
- a standard feature (though the configure script can disable it,
- it is built by default).
-
- <li>removed the <code>trace()</code> function and related trace support
- from the production library. This is the only interface change that
- may cause problems with existing applications linked to shared
- libraries, since not all platforms use the minor version number.
-
- <li>explicitly initialized to zero several data items which were
- implicitly initialized, e.g., cur_term. If not explicitly
- initialized, their storage type is C (common), and causes problems
- linking on some platforms.
-
- <li>modified curses.h.in, undef'ing some symbols to avoid conflict with
- C++ STL.
+ <li>change type of <code>ospeed</code> variable back to
+ <code>short</code> to match its use in legacy applications. It was
+ altered after ncurses 4.2 to <code>speed_t</code> to repair a type
+ mismatch which was introduced after 1.9.4 in 1995. The principal
+ users of termcap continued to use <code>short</code>, which is
+ not the same size.
+ <p>
+ <em>NOTE</em>: A few applications will have to be recompiled
+ (about 1% of the programs in a typical Linux distribution,
+ 10% of the programs that use ncurses). These are easy to
+ identify with <code>nm</code> or <code>strings</code>.
+
+ <li>remove a private function <code>_nc_can_clear_with()</code>, which
+ was built with the configure --enable-expanded option but not used.
+
+ <li>add several private functions (prefixed with "_nc_") for tracing
+ <code>chtype</code> values in the debug library, and for better
+ access and buffer limit checking.
</ul>
-New features:
+New features and improvements:
<ul>
- <li>added a new extension, <code>assume_default_colors()</code> to
- provide better control over the use of default colors. This is
- the principal visible difference between ncurses 5.1 and preceding
- versions. The new extension allows an application to specify what
- colors pair 0 uses.
- <p>
- <em>NOTE</em>: Pair 0 defaults to white on black unless
- you have invoked <code>use_default_colors()</code> or set it via
- <code>assume_default_colors()</code>. An application that calls
- <code>start_colors()</code> without setting the background color
- will consistently have a black background no matter what color your
- terminal's background actually is.
-
- <li>made several fixes to the terminfo-to-termcap conversion, and
- have been using the generated termcaps without further hand-tuning.
- This builds on the extension <code>use_extended_names()</code> by
- adding "obsolete" termcap strings to terminfo.src
+ <li>rewrote <code>tgoto()</code> to make it better support existing
+ termcap applications which use hardcoded strings rather than obtain
+ all of their information from the termcap file. If the string does
+ not appear to be a terminfo string (i.e., does not refer to a "%p"
+ parameter, or terminfo-style padding), and termcap support is configured, <code>tgoto()</code>
+ will interpret it as termcap. Otherwise, as before, it will use
+ <code>tparm()</code>.
+
+ <li>to ensure that the <code>tgoto()</code> changes work properly,
+ added checks to <code>tic</code> which report capabilities that do
+ not reference the expected number of parameters.
+
+ <li>new configure script options:
<ul>
- <li>modified <code>tic</code> so that if extended names (i.e.,
- configure&nbsp;--enable-tcap-names) are active, then <code>tic&nbsp;-x</code>
- will also write "obsolete" capabilities that are present in the
- terminfo source.
-
- <li>added screen's AX capability (for ECMA SGR 39 and 49) to applicable
- terminfo entries, use presence of this as a check for a small
- improvement in setting default colors.
-
- <li>add -a option to tic and infocmp, which retains commented-out
- capabilities during source translation/comparison, e.g., captoinfo
- and infotocap.
+ <li>option <code>--disable-root-environ</code> adds runtime checks
+ which tell ncurses to disregard $TERMINFO and similar environment
+ variables if the current user is root, or running setuid/setgid.
+
+ <li>option <code>--disable-assumed-color</code> allows you to use the
+ pre-5.1 convention of default colors used for color-pair 0 to be
+ configured (see assume_default_colors()).
+
+ <li>implement configure script options that transform installed
+ program names, e.g., <code>--program-prefix</code>, including the
+ manpage names and cross references.
+
+ <li>option <code>--with-database</code> allows you to specify a
+ different terminfo source-file to install. On OS/2 EMX, the
+ default is misc/emx.src, otherwise misc/terminfo.src
+
+ <li>option <code>--with-default-terminfo-dir</code> allows you to
+ specify the default terminfo database directory.
+
+ <li>option <code>--with-libtool</code> allows you to build with
+ <code>libtool</code>. <p> <em>NOTE</em>: <code>libtool</code>
+ uses a different notation for numbering shared library versions
+ from the existing ncurses configuration.
+
+ <li>option <code>--with-manpage-tbl</code> causes the manpages to be
+ preprocessed by tbl(1) prior to installation,
+
+ <li>option <code>--without-curses-h</code> causes the installation
+ process to install curses.h as ncurses.h and make appropriate
+ changes to headers and manpages.
</ul>
- <li>implemented limited support for UTF-8, useful with XFree86 xterm:
+ <li>modified configure script options:
<ul>
- <li>if the <code>configure&nbsp;--enable-widec</code> option is
- given, append 'w' to names of the generated libraries (e.g.,
- libncursesw.so) to avoid conflict with existing ncurses libraries.
- <li>add a simple UTF-8 output driver to the experimental
- wide-character support. If any of the environment variables
- LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this driver
- will be used to translate the output to UTF-8.
- <li>modified view.c to make a rudimentary viewer of UTF-8 text.
+ <li>change symbol used by the <code>--install-prefix</code> configure
+ option from <code>INSTALL_PREFIX</code> to <code>DESTDIR</code>
+ (the latter has become common usage although the name is
+ misleading).
+
+ <li>modify <code>ld -rpath</code> options (e.g., Linux, and Solaris)
+ to use an absolute pathname for the build tree's lib directory,
+ avoiding confusion with directories relative to the current one
+ with the installed programs.
+
+ <li>modified <code>misc/run_tic.in</code> to use
+ <code>tic&nbsp;-o</code>, to eliminate dependency on
+ <code>$TERMINFO</code> variable for installs.
</ul>
- <li>modify <code>raw()</code> and <code>noraw()</code> to clear/restore
- IEXTEN flag which affects <code>stty lnext</code> on systems such as FreeBSD
+ <li>terminfo database:
+ <ul>
+ <li>updated xterm terminfo entries to match XFree86 xterm patch #146.
- <li>reordered tests during mouse initialization to allow for gpm to run
- in xterm, or for xterm to be used under OS/2 EMX. Also dropped test
- for <code>$DISPLAY</code> in favor of the terminfo capability
- <code>kmous=\E[M</code> or
- if <code>$TERM</code> environment variable contains "xterm".
+ <li>added amiga-vnc,
+ Matrix Orbital, and
+ QNX qansi to misc/terminfo.src.
- <li>added configure option <code>--with-manpage-symlinks</code>, which
- provides for fully indexing manpage entries by making symbolic links
- for the aliases.
+ <li>added os2 entry to misc/emx.src.
- <li>changed <code>unctrl()</code> to render C1 characters (128-159) as
- <code>~@</code>, <code>~A</code>, etc.
+ <li>add S0 and E0 extensions to <code>screen</code>'s terminfo entry
+ since otherwise the FreeBSD port makes it pass termcap equivalents
+ to <code>tgoto</code>, which would be misinterpreted by older
+ versions of ncurses.
+ </ul>
+
+ <li>improvements to program usability:
+ <ul>
+ <li>modify programs to use <code>curses_version()</code> string to
+ report the version of ncurses with which they are compiled rather
+ than the NCURSES_VERSION string. The function returns the patch
+ level in addition to the major and minor version numbers.
- <li>add experimental configure option --enable-colorfgbg to check for
- $COLORTERM variable as set by rxvt/aterm/Eterm.
+ <li>modify <code>tput</code> program so it can be renamed or invoked via a link as
+ 'reset' or 'init', producing the same effect as <code>tput&nbsp;reset</code> or <code>tput&nbsp;init</code>.
- <li>made the <code>infocmp -F</code> option less verbose.
+ <li>add error checking to infocmp's -v and -m options to ensure that
+ the option value is indeed a number.
+ </ul>
- <li>dropped support for gnat 3.10 (gnat 3.12 is current).
+ <li>improved performance:
+ <ul>
+ <li>replace a lookup table in lib_vidattr.c used to decode
+ <code>no_color_video</code> with a logic expression which is faster.
+ </ul>
</ul>
Major bug fixes:
<ul>
- <li>modified infocmp -e, -E options to ensure that generated fallback.c
- type for Booleans agrees with term.h
+ <li>correct <code>manlinks.sed</code> script introduced in ncurses 5.1
+ to avoid using ERE "\+", which is not understood by standard versions
+ of <code>sed</code>. This happens to work with GNU <code>sed</code>,
+ but is not portable, and was the initial motivation for this release.
+
+ <li>remove "hpux10.*" case from CF_SHARED_OPTS configure script macro.
+ This differed from the "hpux*" case by using reversed symbolic
+ links, which made the 5.1 version not match the configuration of
+ 5.0 shared libraries.
+
+ <li>guard against corrupt terminfo data:
+ <ul>
+ <li>modify <code>tparm()</code> to disallow arithmetic on strings,
+ analyze the varargs list to read strings as strings and numbers as
+ numbers.
+
+ <li>modify <code>tparm()</code>'s internal function
+ <code>spop()</code> to treat a null pointer as an empty string.
+
+ <li>modify <code>parse_format()</code> in lib_tparm.c to ignore
+ precision if it is longer than 10000.
+
+ <li>rewrote limit checks in lib_mvcur.c using new functions
+ <code>_nc_safe_strcat()</code>, etc. Made other related changes to
+ check lengths used for <code>strcat()</code> and
+ <code>strcpy()</code>.
+ </ul>
+
+ <li>corrections to screen optimization:
+ <ul>
+ <li>added special case in lib_vidattr.c to reset underline and
+ standout for devices that have no sgr0 defined.
+
+ <li>change handling of <code>non_dest_scroll_region</code> in
+ tty_update.c to clear text after it is shifted in rather than before
+ shifting out. Also correct row computation.
+
+ <li>modify <code>rs2</code> capability in xterm-r6 and similar entries
+ where cursor save/restore bracketed the sequence for resetting video
+ attributes. The cursor restore would undo that.
+ </ul>
+
+ <li>UTF-8 support:
+ <ul>
+ <li>when checking LC_ALL, LC_CTYPE, and LANG environment variables
+ for UTF-8 locale, ignore those which are set to an empty value, as
+ per SUSV2.
- <li>documented a special case of incompatiblity between ncurses 4.2 and
- 5.0, added a section for this in INSTALL.
+ <li>encode 0xFFFD in UTF-8 with 3 bytes, not 2.
- <li>corrected tests for file-descriptors in OS/2 EMX mouse support. A
- negative value could be used by FD_SET, causing the select() call to
- wait indefinitely.
+ <li>modify <code>_nc_utf8_outch()</code> to avoid sign-extension when
+ checking for out-of-range value.
+ </ul>
- <li>made 'tput flash' work properly for xterm by flushing output in
- delay_output() when using napms(), and modifying xterm's terminfo to
- specify no padding character. Otherwise, xterm's reported baud rate
- could mislead ncurses into producing too few padding characters.
+ <li>other library fixes:
+ <ul>
+ <li>added checks for an empty <code>$HOME</code> environment
+ variable, to avoid retrieving terminfo descriptions from
+ <code>./.terminfo</code> .
- <li>modified lib_addch.c to allow repeated update to the lower-right
- corner, rather than displaying only the first character written until
- the cursor is moved. Recent versions of SVr4 curses can update the
- lower-right corner, and behave this way.
+ <li>change functions <code>_nc_parse_entry()</code> and
+ <code>postprocess_termcap()</code> to avoid using
+ <code>strtok()</code>, because it is non-reentrant.
- <li>modified echo() behavior of getch() to match Solaris curses for
- carriage return and backspace (reported by Neil Zanella).
+ <li>initialize <code>fds[]</code> array to 0's in
+ <code>_nc_timed_wait()</code>; apparently <code>poll()</code> only
+ sets the <code>revents</code> members of that array when there is
+ activity corresponding to the related file.
- <li>corrected offsets used for subwindows in <code>wresize()</code>
+ <li>add a check for null pointer in <code>Make_Enum_Type()</code>.
- <li>modified configure script so AC_MSG_ERROR is temporarily defined to
- a warning in AC_PROG_CXX to make it recover from a missing C++
- compiler without requiring user to add --without-cxx option
+ <li>fix a heap problem with the c++ binding.
- <li>corrected logic in lib_twait.c as used by lib_mouse.c for GPM mouse
- support when poll() is used rather than select().
+ <li>correct missing includes for &lt;string.h&gt; in several places,
+ including the C++ binding. This is not noted by gcc unless we use
+ the <code>-fno-builtin</code> option.
+ </ul>
+
+ <li>several fixes for tic:
+ <ul>
+ <li>add a check for empty buffers returned by <code>fgets()</code> in
+ comp_scan.c <code>next_char()</code> function, in case
+ <code>tic</code> is run on a non-text file (fixes a core dump).
+
+ <li>modify <code>tic</code> to verify that its inputs are really files,
+ in case someone tries to read a directory (or
+ <code>/dev/zero</code>).
+
+ <li>correct an uninitialized parameter to <code>open_tempfile()</code>
+ in tic.c which made "tic -I" give an ambiguous error message about
+ <code>tmpnam</code>.
+
+ <li>correct logic in <code>adjust_cancels()</code>, which did not check
+ both alternatives when reclassifying an extended name between
+ boolean, number and string, causing an infinite loop in
+ <code>tic</code>.
+ </ul>
+
+ <li>using new checks in <code>tic</code> for parameter counts in
+ capability strings, found/fixed several errors both in the
+ terminfo database and in the include/Caps file.
+ <ul>
+ <li>modified several terminfo capability strings, including the
+ definitions for setaf, setab, in include/Caps to indicate that the
+ entries are parameterized. This information is used to tell which
+ strings are translated when converting to termcap. This fixes a
+ problem where the generated termcap would contain a spurious "%p1"
+ for the terminfo "%p1%d".
+
+ <li>correct parameter counts in include/Caps for dclk as well as some
+ printer-specific capabilities: csnm, defc, scs, scsd, smgtp, smglp.
+ </ul>
+
+ <li>various fixes for install scripts used to support configure
+ <code>--srcdir</code> and <code>--with-install-prefix</code>.
+
+ <li>correct several mismatches between manpage filename and ".TH"
+ directives, renaming dft_fgbg.3x to default_colors.3x and
+ menu_attribs.3x to menu_attributes.3x.
+</ul>
+
+Portability:
+<ul>
+ <li>configure script:
+ <ul>
+ <li>newer config.guess, config.sub, including changes to support OS/2
+ EMX. The configure script for OS/2 EMX still relies on a patch
+ since there is no (working) support for that platform in the main
+ autoconf distribution.
+
+ <li>make configure script checks on variables <code>$GCC</code> and
+ <code>$GXX</code> consistently compare against 'yes' rather than
+ test if they are nonnull, since either may be set to the
+ corresponding name of the C or C++ compiler.
+
+ <li>change configure script to use AC_CANONICAL_SYSTEM rather than
+ AC_CANONICAL_HOST, which means that <code>configure --target</code>
+ will set a default program-prefix.
+
+ <li>modify the check for big-core to force a couple of memory
+ accesses, which may work as needed for older/less-capable machines
+ (if not, there's still the explicit configure option).
+
+ <li>modify configure test for <code>tcgetattr()</code> to allow for
+ old implementations, e.g., on BeOS, which only defined it as a
+ macro.
+
+ <li>add configure check for filesystems (such as OS/2 EMX) which do
+ not distinguish between upper/lowercase filenames, use this to fix
+ tags rules in makefiles.
+
+ <li>add MKncurses_def.sh to generate fallback definitions for
+ ncurses_cfg.h, to quiet gcc -Wundef warnings, modified ifdef's in
+ code to consistently use "#if" rather than "#ifdef".
+
+ <li>change most remaining unquoted parameters of <code>test</code> in
+ configure script to use quotes, for instance fixing a problem in the
+ <code>--disable-database</code> option.
+
+ <li>modify scripts so that "make install.data" works on OS/2 EMX.
+
+ <li>modify scripts and makefiles so the Ada95 directory builds on
+ OS/2 EMX.
+ </ul>
+
+ <li>library:
+ <ul>
+ <li>replaced case-statement in <code>_nc_tracebits()</code> for CSIZE
+ with a table to simplify working around implementations that define
+ random combinations of the related macros to zero.
+
+ <li>improved OS/2 mouse support by retrying as a 2-button mouse if code
+ fails to set up a 3-button mouse.
+
+ <li>added private entrypoint <code>_nc_basename()</code>, used to
+ consolidate related code in progs, as well as accommodating OS/2 EMX
+ pathnames.
+
+ <li>alter definition of NCURSES_CONST to make it non-empty.
+
+ <li>redefine 'TEXT' in menu.h for AMIGA, since it is reported to have
+ an (unspecified) symbol conflict.
+ </ul>
+
+ <li>programs:
+ <ul>
+ <li>modified progs/tset.c and tack/sysdep.c to build with sgttyb
+ interface if neither termio or termios is available. Tested this
+ with FreeBSD 2.1.5 (which does have termios - but the sgttyb does
+ work).
+ </ul>
- <li>made several fixes for buffer overflows, unchecked recursion,
- improvements in performance, etc. See the NEWS file for details.
</ul>
<H1>Features of Ncurses</H1>
diff --git a/contrib/ncurses/doc/ncurses-intro.doc b/contrib/ncurses/doc/ncurses-intro.doc
new file mode 100644
index 000000000000..669b0b391705
--- /dev/null
+++ b/contrib/ncurses/doc/ncurses-intro.doc
@@ -0,0 +1,2502 @@
+
+ Writing Programs with NCURSES
+
+ by Eric S. Raymond and Zeyd M. Ben-Halim
+ updates since release 1.9.9e by Thomas Dickey
+
+ Contents
+
+ * Introduction
+ + A Brief History of Curses
+ + Scope of This Document
+ + Terminology
+ * The Curses Library
+ + An Overview of Curses
+ o Compiling Programs using Curses
+ o Updating the Screen
+ o Standard Windows and Function Naming Conventions
+ o Variables
+ + Using the Library
+ o Starting up
+ o Output
+ o Input
+ o Using Forms Characters
+ o Character Attributes and Color
+ o Mouse Interfacing
+ o Finishing Up
+ + Function Descriptions
+ o Initialization and Wrapup
+ o Causing Output to the Terminal
+ o Low-Level Capability Access
+ o Debugging
+ + Hints, Tips, and Tricks
+ o Some Notes of Caution
+ o Temporarily Leaving ncurses Mode
+ o Using ncurses under xterm
+ o Handling Multiple Terminal Screens
+ o Testing for Terminal Capabilities
+ o Tuning for Speed
+ o Special Features of ncurses
+ + Compatibility with Older Versions
+ o Refresh of Overlapping Windows
+ o Background Erase
+ + XSI Curses Conformance
+ * The Panels Library
+ + Compiling With the Panels Library
+ + Overview of Panels
+ + Panels, Input, and the Standard Screen
+ + Hiding Panels
+ + Miscellaneous Other Facilities
+ * The Menu Library
+ + Compiling with the menu Library
+ + Overview of Menus
+ + Selecting items
+ + Menu Display
+ + Menu Windows
+ + Processing Menu Input
+ + Miscellaneous Other Features
+ * The Forms Library
+ + Compiling with the forms Library
+ + Overview of Forms
+ + Creating and Freeing Fields and Forms
+ + Fetching and Changing Field Attributes
+ o Fetching Size and Location Data
+ o Changing the Field Location
+ o The Justification Attribute
+ o Field Display Attributes
+ o Field Option Bits
+ o Field Status
+ o Field User Pointer
+ + Variable-Sized Fields
+ + Field Validation
+ o TYPE_ALPHA
+ o TYPE_ALNUM
+ o TYPE_ENUM
+ o TYPE_INTEGER
+ o TYPE_NUMERIC
+ o TYPE_REGEXP
+ + Direct Field Buffer Manipulation
+ + Attributes of Forms
+ + Control of Form Display
+ + Input Processing in the Forms Driver
+ o Page Navigation Requests
+ o Inter-Field Navigation Requests
+ o Intra-Field Navigation Requests
+ o Scrolling Requests
+ o Field Editing Requests
+ o Order Requests
+ o Application Commands
+ + Field Change Hooks
+ + Field Change Commands
+ + Form Options
+ + Custom Validation Types
+ o Union Types
+ o New Field Types
+ o Validation Function Arguments
+ o Order Functions For Custom Types
+ o Avoiding Problems
+ _________________________________________________________________
+
+ Introduction
+
+ This document is an introduction to programming with curses. It is not
+ an exhaustive reference for the curses Application Programming
+ Interface (API); that role is filled by the curses manual pages.
+ Rather, it is intended to help C programmers ease into using the
+ package.
+
+ This document is aimed at C applications programmers not yet
+ specifically familiar with ncurses. If you are already an experienced
+ curses programmer, you should nevertheless read the sections on Mouse
+ Interfacing, Debugging, Compatibility with Older Versions, and Hints,
+ Tips, and Tricks. These will bring you up to speed on the special
+ features and quirks of the ncurses implementation. If you are not so
+ experienced, keep reading.
+
+ The curses package is a subroutine library for terminal-independent
+ screen-painting and input-event handling which presents a high level
+ screen model to the programmer, hiding differences between terminal
+ types and doing automatic optimization of output to change one screen
+ full of text into another. Curses uses terminfo, which is a database
+ format that can describe the capabilities of thousands of different
+ terminals.
+
+ The curses API may seem something of an archaism on UNIX desktops
+ increasingly dominated by X, Motif, and Tcl/Tk. Nevertheless, UNIX
+ still supports tty lines and X supports xterm(1); the curses API has
+ the advantage of (a) back-portability to character-cell terminals, and
+ (b) simplicity. For an application that does not require bit-mapped
+ graphics and multiple fonts, an interface implementation using curses
+ will typically be a great deal simpler and less expensive than one
+ using an X toolkit.
+
+A Brief History of Curses
+
+ Historically, the first ancestor of curses was the routines written to
+ provide screen-handling for the game rogue; these used the
+ already-existing termcap database facility for describing terminal
+ capabilities. These routines were abstracted into a documented library
+ and first released with the early BSD UNIX versions.
+
+ System III UNIX from Bell Labs featured a rewritten and much-improved
+ curses library. It introduced the terminfo format. Terminfo is based
+ on Berkeley's termcap database, but contains a number of improvements
+ and extensions. Parameterized capabilities strings were introduced,
+ making it possible to describe multiple video attributes, and colors
+ and to handle far more unusual terminals than possible with termcap.
+ In the later AT&T System V releases, curses evolved to use more
+ facilities and offer more capabilities, going far beyond BSD curses in
+ power and flexibility.
+
+Scope of This Document
+
+ This document describes ncurses, a free implementation of the System V
+ curses API with some clearly marked extensions. It includes the
+ following System V curses features:
+ * Support for multiple screen highlights (BSD curses could only
+ handle one `standout' highlight, usually reverse-video).
+ * Support for line- and box-drawing using forms characters.
+ * Recognition of function keys on input.
+ * Color support.
+ * Support for pads (windows of larger than screen size on which the
+ screen or a subwindow defines a viewport).
+
+ Also, this package makes use of the insert and delete line and
+ character features of terminals so equipped, and determines how to
+ optimally use these features with no help from the programmer. It
+ allows arbitrary combinations of video attributes to be displayed,
+ even on terminals that leave ``magic cookies'' on the screen to mark
+ changes in attributes.
+
+ The ncurses package can also capture and use event reports from a
+ mouse in some environments (notably, xterm under the X window system).
+ This document includes tips for using the mouse.
+
+ The ncurses package was originated by Pavel Curtis. The original
+ maintainer of this package is Zeyd Ben-Halim <zmbenhal@netcom.com>.
+ Eric S. Raymond <esr@snark.thyrsus.com> wrote many of the new features
+ in versions after 1.8.1 and wrote most of this introduction. Jürgen
+ Pfeifer wrote all of the menu and forms code as well as the Ada95
+ binding. Ongoing work is being done by Thomas Dickey and Jürgen
+ Pfeifer. Florian La Roche acts as the maintainer for the Free Software
+ Foundation, which holds the copyright on ncurses. Contact the current
+ maintainers at bug-ncurses@gnu.org.
+
+ This document also describes the panels extension library, similarly
+ modeled on the SVr4 panels facility. This library allows you to
+ associate backing store with each of a stack or deck of overlapping
+ windows, and provides operations for moving windows around in the
+ stack that change their visibility in the natural way (handling window
+ overlaps).
+
+ Finally, this document describes in detail the menus and forms
+ extension libraries, also cloned from System V, which support easy
+ construction and sequences of menus and fill-in forms.
+
+Terminology
+
+ In this document, the following terminology is used with reasonable
+ consistency:
+
+ window
+ A data structure describing a sub-rectangle of the screen
+ (possibly the entire screen). You can write to a window as
+ though it were a miniature screen, scrolling independently of
+ other windows on the physical screen.
+
+ screens
+ A subset of windows which are as large as the terminal screen,
+ i.e., they start at the upper left hand corner and encompass
+ the lower right hand corner. One of these, stdscr, is
+ automatically provided for the programmer.
+
+ terminal screen
+ The package's idea of what the terminal display currently looks
+ like, i.e., what the user sees now. This is a special screen.
+
+ The Curses Library
+
+An Overview of Curses
+
+ Compiling Programs using Curses
+
+ In order to use the library, it is necessary to have certain types and
+ variables defined. Therefore, the programmer must have a line:
+ #include <curses.h>
+
+ at the top of the program source. The screen package uses the Standard
+ I/O library, so <curses.h> includes <stdio.h>. <curses.h> also
+ includes <termios.h>, <termio.h>, or <sgtty.h> depending on your
+ system. It is redundant (but harmless) for the programmer to do these
+ includes, too. In linking with curses you need to have -lncurses in
+ your LDFLAGS or on the command line. There is no need for any other
+ libraries.
+
+ Updating the Screen
+
+ In order to update the screen optimally, it is necessary for the
+ routines to know what the screen currently looks like and what the
+ programmer wants it to look like next. For this purpose, a data type
+ (structure) named WINDOW is defined which describes a window image to
+ the routines, including its starting position on the screen (the (y,
+ x) coordinates of the upper left hand corner) and its size. One of
+ these (called curscr, for current screen) is a screen image of what
+ the terminal currently looks like. Another screen (called stdscr, for
+ standard screen) is provided by default to make changes on.
+
+ A window is a purely internal representation. It is used to build and
+ store a potential image of a portion of the terminal. It doesn't bear
+ any necessary relation to what is really on the terminal screen; it's
+ more like a scratchpad or write buffer.
+
+ To make the section of physical screen corresponding to a window
+ reflect the contents of the window structure, the routine refresh()
+ (or wrefresh() if the window is not stdscr) is called.
+
+ A given physical screen section may be within the scope of any number
+ of overlapping windows. Also, changes can be made to windows in any
+ order, without regard to motion efficiency. Then, at will, the
+ programmer can effectively say ``make it look like this,'' and let the
+ package implementation determine the most efficient way to repaint the
+ screen.
+
+ Standard Windows and Function Naming Conventions
+
+ As hinted above, the routines can use several windows, but two are
+ automatically given: curscr, which knows what the terminal looks like,
+ and stdscr, which is what the programmer wants the terminal to look
+ like next. The user should never actually access curscr directly.
+ Changes should be made to through the API, and then the routine
+ refresh() (or wrefresh()) called.
+
+ Many functions are defined to use stdscr as a default screen. For
+ example, to add a character to stdscr, one calls addch() with the
+ desired character as argument. To write to a different window. use the
+ routine waddch() (for `w'indow-specific addch()) is provided. This
+ convention of prepending function names with a `w' when they are to be
+ applied to specific windows is consistent. The only routines which do
+ not follow it are those for which a window must always be specified.
+
+ In order to move the current (y, x) coordinates from one point to
+ another, the routines move() and wmove() are provided. However, it is
+ often desirable to first move and then perform some I/O operation. In
+ order to avoid clumsiness, most I/O routines can be preceded by the
+ prefix 'mv' and the desired (y, x) coordinates prepended to the
+ arguments to the function. For example, the calls
+ move(y, x);
+ addch(ch);
+
+ can be replaced by
+ mvaddch(y, x, ch);
+
+ and
+ wmove(win, y, x);
+ waddch(win, ch);
+
+ can be replaced by
+ mvwaddch(win, y, x, ch);
+
+ Note that the window description pointer (win) comes before the added
+ (y, x) coordinates. If a function requires a window pointer, it is
+ always the first parameter passed.
+
+ Variables
+
+ The curses library sets some variables describing the terminal
+ capabilities.
+ type name description
+ ------------------------------------------------------------------
+ int LINES number of lines on the terminal
+ int COLS number of columns on the terminal
+
+ The curses.h also introduces some #define constants and types of
+ general usefulness:
+
+ bool
+ boolean type, actually a `char' (e.g., bool doneit;)
+
+ TRUE
+ boolean `true' flag (1).
+
+ FALSE
+ boolean `false' flag (0).
+
+ ERR
+ error flag returned by routines on a failure (-1).
+
+ OK
+ error flag returned by routines when things go right.
+
+Using the Library
+
+ Now we describe how to actually use the screen package. In it, we
+ assume all updating, reading, etc. is applied to stdscr. These
+ instructions will work on any window, providing you change the
+ function names and parameters as mentioned above.
+
+ Here is a sample program to motivate the discussion:
+#include <curses.h>
+#include <signal.h>
+
+static void finish(int sig);
+
+int
+main(int argc, char *argv[])
+{
+ int num = 0;
+
+ /* initialize your non-curses data structures here */
+
+ (void) signal(SIGINT, finish); /* arrange interrupts to terminate */
+
+ (void) initscr(); /* initialize the curses library */
+ keypad(stdscr, TRUE); /* enable keyboard mapping */
+ (void) nonl(); /* tell curses not to do NL->CR/NL on output */
+ (void) cbreak(); /* take input chars one at a time, no wait for \n */
+ (void) echo(); /* echo input - in color */
+
+ if (has_colors())
+ {
+ start_color();
+
+ /*
+ * Simple color assignment, often all we need. Color pair 0 cannot
+ * be redefined. This example uses the same value for the color
+ * pair as for the foreground color, though of course that is not
+ * necessary:
+ */
+ init_pair(1, COLOR_RED, COLOR_BLACK);
+ init_pair(2, COLOR_GREEN, COLOR_BLACK);
+ init_pair(3, COLOR_YELLOW, COLOR_BLACK);
+ init_pair(4, COLOR_BLUE, COLOR_BLACK);
+ init_pair(5, COLOR_CYAN, COLOR_BLACK);
+ init_pair(6, COLOR_MAGENTA, COLOR_BLACK);
+ init_pair(7, COLOR_WHITE, COLOR_BLACK);
+ }
+
+ for (;;)
+ {
+ int c = getch(); /* refresh, accept single keystroke of input */
+ attrset(COLOR_PAIR(num % 8));
+ num++;
+
+ /* process the command keystroke */
+ }
+
+ finish(0); /* we're done */
+}
+
+static void finish(int sig)
+{
+ endwin();
+
+ /* do your non-curses wrapup here */
+
+ exit(0);
+}
+
+ Starting up
+
+ In order to use the screen package, the routines must know about
+ terminal characteristics, and the space for curscr and stdscr must be
+ allocated. These function initscr() does both these things. Since it
+ must allocate space for the windows, it can overflow memory when
+ attempting to do so. On the rare occasions this happens, initscr()
+ will terminate the program with an error message. initscr() must
+ always be called before any of the routines which affect windows are
+ used. If it is not, the program will core dump as soon as either
+ curscr or stdscr are referenced. However, it is usually best to wait
+ to call it until after you are sure you will need it, like after
+ checking for startup errors. Terminal status changing routines like
+ nl() and cbreak() should be called after initscr().
+
+ Once the screen windows have been allocated, you can set them up for
+ your program. If you want to, say, allow a screen to scroll, use
+ scrollok(). If you want the cursor to be left in place after the last
+ change, use leaveok(). If this isn't done, refresh() will move the
+ cursor to the window's current (y, x) coordinates after updating it.
+
+ You can create new windows of your own using the functions newwin(),
+ derwin(), and subwin(). The routine delwin() will allow you to get rid
+ of old windows. All the options described above can be applied to any
+ window.
+
+ Output
+
+ Now that we have set things up, we will want to actually update the
+ terminal. The basic functions used to change what will go on a window
+ are addch() and move(). addch() adds a character at the current (y, x)
+ coordinates. move() changes the current (y, x) coordinates to whatever
+ you want them to be. It returns ERR if you try to move off the window.
+ As mentioned above, you can combine the two into mvaddch() to do both
+ things at once.
+
+ The other output functions, such as addstr() and printw(), all call
+ addch() to add characters to the window.
+
+ After you have put on the window what you want there, when you want
+ the portion of the terminal covered by the window to be made to look
+ like it, you must call refresh(). In order to optimize finding
+ changes, refresh() assumes that any part of the window not changed
+ since the last refresh() of that window has not been changed on the
+ terminal, i.e., that you have not refreshed a portion of the terminal
+ with an overlapping window. If this is not the case, the routine
+ touchwin() is provided to make it look like the entire window has been
+ changed, thus making refresh() check the whole subsection of the
+ terminal for changes.
+
+ If you call wrefresh() with curscr as its argument, it will make the
+ screen look like curscr thinks it looks like. This is useful for
+ implementing a command which would redraw the screen in case it get
+ messed up.
+
+ Input
+
+ The complementary function to addch() is getch() which, if echo is
+ set, will call addch() to echo the character. Since the screen package
+ needs to know what is on the terminal at all times, if characters are
+ to be echoed, the tty must be in raw or cbreak mode. Since initially
+ the terminal has echoing enabled and is in ordinary ``cooked'' mode,
+ one or the other has to changed before calling getch(); otherwise, the
+ program's output will be unpredictable.
+
+ When you need to accept line-oriented input in a window, the functions
+ wgetstr() and friends are available. There is even a wscanw() function
+ that can do scanf()(3)-style multi-field parsing on window input.
+ These pseudo-line-oriented functions turn on echoing while they
+ execute.
+
+ The example code above uses the call keypad(stdscr, TRUE) to enable
+ support for function-key mapping. With this feature, the getch() code
+ watches the input stream for character sequences that correspond to
+ arrow and function keys. These sequences are returned as
+ pseudo-character values. The #define values returned are listed in the
+ curses.h The mapping from sequences to #define values is determined by
+ key_ capabilities in the terminal's terminfo entry.
+
+ Using Forms Characters
+
+ The addch() function (and some others, including box() and border())
+ can accept some pseudo-character arguments which are specially defined
+ by ncurses. These are #define values set up in the curses.h header;
+ see there for a complete list (look for the prefix ACS_).
+
+ The most useful of the ACS defines are the forms-drawing characters.
+ You can use these to draw boxes and simple graphs on the screen. If
+ the terminal does not have such characters, curses.h will map them to
+ a recognizable (though ugly) set of ASCII defaults.
+
+ Character Attributes and Color
+
+ The ncurses package supports screen highlights including standout,
+ reverse-video, underline, and blink. It also supports color, which is
+ treated as another kind of highlight.
+
+ Highlights are encoded, internally, as high bits of the
+ pseudo-character type (chtype) that curses.h uses to represent the
+ contents of a screen cell. See the curses.h header file for a complete
+ list of highlight mask values (look for the prefix A_).
+
+ There are two ways to make highlights. One is to logical-or the value
+ of the highlights you want into the character argument of an addch()
+ call, or any other output call that takes a chtype argument.
+
+ The other is to set the current-highlight value. This is logical-or'ed
+ with any highlight you specify the first way. You do this with the
+ functions attron(), attroff(), and attrset(); see the manual pages for
+ details. Color is a special kind of highlight. The package actually
+ thinks in terms of color pairs, combinations of foreground and
+ background colors. The sample code above sets up eight color pairs,
+ all of the guaranteed-available colors on black. Note that each color
+ pair is, in effect, given the name of its foreground color. Any other
+ range of eight non-conflicting values could have been used as the
+ first arguments of the init_pair() values.
+
+ Once you've done an init_pair() that creates color-pair N, you can use
+ COLOR_PAIR(N) as a highlight that invokes that particular color
+ combination. Note that COLOR_PAIR(N), for constant N, is itself a
+ compile-time constant and can be used in initializers.
+
+ Mouse Interfacing
+
+ The ncurses library also provides a mouse interface.
+
+ NOTE: this facility is specific to ncurses, it is not part of
+ either the XSI Curses standard, nor of System V Release 4, nor BSD
+ curses. System V Release 4 curses contains code with similar
+ interface definitions, however it is not documented. Other than by
+ disassembling the library, we have no way to determine exactly how
+ that mouse code works. Thus, we recommend that you wrap
+ mouse-related code in an #ifdef using the feature macro
+ NCURSES_MOUSE_VERSION so it will not be compiled and linked on
+ non-ncurses systems.
+
+ Presently, mouse event reporting works in the following environments:
+ * xterm and similar programs such as rxvt.
+ * Linux console, when configured with gpm(1), Alessandro Rubini's
+ mouse server.
+ * OS/2 EMX
+
+ The mouse interface is very simple. To activate it, you use the
+ function mousemask(), passing it as first argument a bit-mask that
+ specifies what kinds of events you want your program to be able to
+ see. It will return the bit-mask of events that actually become
+ visible, which may differ from the argument if the mouse device is not
+ capable of reporting some of the event types you specify.
+
+ Once the mouse is active, your application's command loop should watch
+ for a return value of KEY_MOUSE from wgetch(). When you see this, a
+ mouse event report has been queued. To pick it off the queue, use the
+ function getmouse() (you must do this before the next wgetch(),
+ otherwise another mouse event might come in and make the first one
+ inaccessible).
+
+ Each call to getmouse() fills a structure (the address of which you'll
+ pass it) with mouse event data. The event data includes zero-origin,
+ screen-relative character-cell coordinates of the mouse pointer. It
+ also includes an event mask. Bits in this mask will be set,
+ corresponding to the event type being reported.
+
+ The mouse structure contains two additional fields which may be
+ significant in the future as ncurses interfaces to new kinds of
+ pointing device. In addition to x and y coordinates, there is a slot
+ for a z coordinate; this might be useful with touch-screens that can
+ return a pressure or duration parameter. There is also a device ID
+ field, which could be used to distinguish between multiple pointing
+ devices.
+
+ The class of visible events may be changed at any time via
+ mousemask(). Events that can be reported include presses, releases,
+ single-, double- and triple-clicks (you can set the maximum
+ button-down time for clicks). If you don't make clicks visible, they
+ will be reported as press-release pairs. In some environments, the
+ event mask may include bits reporting the state of shift, alt, and
+ ctrl keys on the keyboard during the event.
+
+ A function to check whether a mouse event fell within a given window
+ is also supplied. You can use this to see whether a given window
+ should consider a mouse event relevant to it.
+
+ Because mouse event reporting will not be available in all
+ environments, it would be unwise to build ncurses applications that
+ require the use of a mouse. Rather, you should use the mouse as a
+ shortcut for point-and-shoot commands your application would normally
+ accept from the keyboard. Two of the test games in the ncurses
+ distribution (bs and knight) contain code that illustrates how this
+ can be done.
+
+ See the manual page curs_mouse(3X) for full details of the
+ mouse-interface functions.
+
+ Finishing Up
+
+ In order to clean up after the ncurses routines, the routine endwin()
+ is provided. It restores tty modes to what they were when initscr()
+ was first called, and moves the cursor down to the lower-left corner.
+ Thus, anytime after the call to initscr, endwin() should be called
+ before exiting.
+
+Function Descriptions
+
+ We describe the detailed behavior of some important curses functions
+ here, as a supplement to the manual page descriptions.
+
+ Initialization and Wrapup
+
+ initscr()
+ The first function called should almost always be initscr().
+ This will determine the terminal type and initialize curses
+ data structures. initscr() also arranges that the first call to
+ refresh() will clear the screen. If an error occurs a message
+ is written to standard error and the program exits. Otherwise
+ it returns a pointer to stdscr. A few functions may be called
+ before initscr (slk_init(), filter(), ripofflines(), use_env(),
+ and, if you are using multiple terminals, newterm().)
+
+ endwin()
+ Your program should always call endwin() before exiting or
+ shelling out of the program. This function will restore tty
+ modes, move the cursor to the lower left corner of the screen,
+ reset the terminal into the proper non-visual mode. Calling
+ refresh() or doupdate() after a temporary escape from the
+ program will restore the ncurses screen from before the escape.
+
+ newterm(type, ofp, ifp)
+ A program which outputs to more than one terminal should use
+ newterm() instead of initscr(). newterm() should be called once
+ for each terminal. It returns a variable of type SCREEN * which
+ should be saved as a reference to that terminal. The arguments
+ are the type of the terminal (a string) and FILE pointers for
+ the output and input of the terminal. If type is NULL then the
+ environment variable $TERM is used. endwin() should called once
+ at wrapup time for each terminal opened using this function.
+
+ set_term(new)
+ This function is used to switch to a different terminal
+ previously opened by newterm(). The screen reference for the
+ new terminal is passed as the parameter. The previous terminal
+ is returned by the function. All other calls affect only the
+ current terminal.
+
+ delscreen(sp)
+ The inverse of newterm(); deallocates the data structures
+ associated with a given SCREEN reference.
+
+ Causing Output to the Terminal
+
+ refresh() and wrefresh(win)
+ These functions must be called to actually get any output on
+ the terminal, as other routines merely manipulate data
+ structures. wrefresh() copies the named window to the physical
+ terminal screen, taking into account what is already there in
+ order to do optimizations. refresh() does a refresh of
+ stdscr(). Unless leaveok() has been enabled, the physical
+ cursor of the terminal is left at the location of the window's
+ cursor.
+
+ doupdate() and wnoutrefresh(win)
+ These two functions allow multiple updates with more efficiency
+ than wrefresh. To use them, it is important to understand how
+ curses works. In addition to all the window structures, curses
+ keeps two data structures representing the terminal screen: a
+ physical screen, describing what is actually on the screen, and
+ a virtual screen, describing what the programmer wants to have
+ on the screen. wrefresh works by first copying the named window
+ to the virtual screen (wnoutrefresh()), and then calling the
+ routine to update the screen (doupdate()). If the programmer
+ wishes to output several windows at once, a series of calls to
+ wrefresh will result in alternating calls to wnoutrefresh() and
+ doupdate(), causing several bursts of output to the screen. By
+ calling wnoutrefresh() for each window, it is then possible to
+ call doupdate() once, resulting in only one burst of output,
+ with fewer total characters transmitted (this also avoids a
+ visually annoying flicker at each update).
+
+ Low-Level Capability Access
+
+ setupterm(term, filenum, errret)
+ This routine is called to initialize a terminal's description,
+ without setting up the curses screen structures or changing the
+ tty-driver mode bits. term is the character string representing
+ the name of the terminal being used. filenum is the UNIX file
+ descriptor of the terminal to be used for output. errret is a
+ pointer to an integer, in which a success or failure indication
+ is returned. The values returned can be 1 (all is well), 0 (no
+ such terminal), or -1 (some problem locating the terminfo
+ database).
+
+ The value of term can be given as NULL, which will cause the
+ value of TERM in the environment to be used. The errret pointer
+ can also be given as NULL, meaning no error code is wanted. If
+ errret is defaulted, and something goes wrong, setupterm() will
+ print an appropriate error message and exit, rather than
+ returning. Thus, a simple program can call setupterm(0, 1, 0)
+ and not worry about initialization errors.
+
+ After the call to setupterm(), the global variable cur_term is
+ set to point to the current structure of terminal capabilities.
+ By calling setupterm() for each terminal, and saving and
+ restoring cur_term, it is possible for a program to use two or
+ more terminals at once. Setupterm() also stores the names
+ section of the terminal description in the global character
+ array ttytype[]. Subsequent calls to setupterm() will overwrite
+ this array, so you'll have to save it yourself if need be.
+
+ Debugging
+
+ NOTE: These functions are not part of the standard curses API!
+
+ trace()
+ This function can be used to explicitly set a trace level. If
+ the trace level is nonzero, execution of your program will
+ generate a file called `trace' in the current working directory
+ containing a report on the library's actions. Higher trace
+ levels enable more detailed (and verbose) reporting -- see
+ comments attached to TRACE_ defines in the curses.h file for
+ details. (It is also possible to set a trace level by assigning
+ a trace level value to the environment variable NCURSES_TRACE).
+
+ _tracef()
+ This function can be used to output your own debugging
+ information. It is only available only if you link with
+ -lncurses_g. It can be used the same way as printf(), only it
+ outputs a newline after the end of arguments. The output goes
+ to a file called trace in the current directory.
+
+ Trace logs can be difficult to interpret due to the sheer volume of
+ data dumped in them. There is a script called tracemunch included with
+ the ncurses distribution that can alleviate this problem somewhat; it
+ compacts long sequences of similar operations into more succinct
+ single-line pseudo-operations. These pseudo-ops can be distinguished
+ by the fact that they are named in capital letters.
+
+Hints, Tips, and Tricks
+
+ The ncurses manual pages are a complete reference for this library. In
+ the remainder of this document, we discuss various useful methods that
+ may not be obvious from the manual page descriptions.
+
+ Some Notes of Caution
+
+ If you find yourself thinking you need to use noraw() or nocbreak(),
+ think again and move carefully. It's probably better design to use
+ getstr() or one of its relatives to simulate cooked mode. The noraw()
+ and nocbreak() functions try to restore cooked mode, but they may end
+ up clobbering some control bits set before you started your
+ application. Also, they have always been poorly documented, and are
+ likely to hurt your application's usability with other curses
+ libraries.
+
+ Bear in mind that refresh() is a synonym for wrefresh(stdscr). Don't
+ try to mix use of stdscr with use of windows declared by newwin(); a
+ refresh() call will blow them off the screen. The right way to handle
+ this is to use subwin(), or not touch stdscr at all and tile your
+ screen with declared windows which you then wnoutrefresh() somewhere
+ in your program event loop, with a single doupdate() call to trigger
+ actual repainting.
+
+ You are much less likely to run into problems if you design your
+ screen layouts to use tiled rather than overlapping windows.
+ Historically, curses support for overlapping windows has been weak,
+ fragile, and poorly documented. The ncurses library is not yet an
+ exception to this rule.
+
+ There is a panels library included in the ncurses distribution that
+ does a pretty good job of strengthening the overlapping-windows
+ facilities.
+
+ Try to avoid using the global variables LINES and COLS. Use getmaxyx()
+ on the stdscr context instead. Reason: your code may be ported to run
+ in an environment with window resizes, in which case several screens
+ could be open with different sizes.
+
+ Temporarily Leaving NCURSES Mode
+
+ Sometimes you will want to write a program that spends most of its
+ time in screen mode, but occasionally returns to ordinary `cooked'
+ mode. A common reason for this is to support shell-out. This behavior
+ is simple to arrange in ncurses.
+
+ To leave ncurses mode, call endwin() as you would if you were
+ intending to terminate the program. This will take the screen back to
+ cooked mode; you can do your shell-out. When you want to return to
+ ncurses mode, simply call refresh() or doupdate(). This will repaint
+ the screen.
+
+ There is a boolean function, isendwin(), which code can use to test
+ whether ncurses screen mode is active. It returns TRUE in the interval
+ between an endwin() call and the following refresh(), FALSE otherwise.
+
+ Here is some sample code for shellout:
+ addstr("Shelling out...");
+ def_prog_mode(); /* save current tty modes */
+ endwin(); /* restore original tty modes */
+ system("sh"); /* run shell */
+ addstr("returned.\n"); /* prepare return message */
+ refresh(); /* restore save modes, repaint screen */
+
+ Using NCURSES under XTERM
+
+ A resize operation in X sends SIGWINCH to the application running
+ under xterm. The ncurses library provides an experimental signal
+ handler, but in general does not catch this signal, because it cannot
+ know how you want the screen re-painted. You will usually have to
+ write the SIGWINCH handler yourself. Ncurses can give you some help.
+
+ The easiest way to code your SIGWINCH handler is to have it do an
+ endwin, followed by an refresh and a screen repaint you code yourself.
+ The refresh will pick up the new screen size from the xterm's
+ environment.
+
+ That is the standard way, of course (it even works with some vendor's
+ curses implementations). Its drawback is that it clears the screen to
+ reinitialize the display, and does not resize subwindows which must be
+ shrunk. Ncurses provides an extension which works better, the
+ resizeterm function. That function ensures that all windows are
+ limited to the new screen dimensions, and pads stdscr with blanks if
+ the screen is larger.
+
+ Finally, ncurses can be configured to provide its own SIGWINCH
+ handler, based on resizeterm.
+
+ Handling Multiple Terminal Screens
+
+ The initscr() function actually calls a function named newterm() to do
+ most of its work. If you are writing a program that opens multiple
+ terminals, use newterm() directly.
+
+ For each call, you will have to specify a terminal type and a pair of
+ file pointers; each call will return a screen reference, and stdscr
+ will be set to the last one allocated. You will switch between screens
+ with the set_term call. Note that you will also have to call
+ def_shell_mode and def_prog_mode on each tty yourself.
+
+ Testing for Terminal Capabilities
+
+ Sometimes you may want to write programs that test for the presence of
+ various capabilities before deciding whether to go into ncurses mode.
+ An easy way to do this is to call setupterm(), then use the functions
+ tigetflag(), tigetnum(), and tigetstr() to do your testing.
+
+ A particularly useful case of this often comes up when you want to
+ test whether a given terminal type should be treated as `smart'
+ (cursor-addressable) or `stupid'. The right way to test this is to see
+ if the return value of tigetstr("cup") is non-NULL. Alternatively, you
+ can include the term.h file and test the value of the macro
+ cursor_address.
+
+ Tuning for Speed
+
+ Use the addchstr() family of functions for fast screen-painting of
+ text when you know the text doesn't contain any control characters.
+ Try to make attribute changes infrequent on your screens. Don't use
+ the immedok() option!
+
+ Special Features of NCURSES
+
+ The wresize() function allows you to resize a window in place. The
+ associated resizeterm() function simplifies the construction of
+ SIGWINCH handlers, for resizing all windows.
+
+ The define_key() function allows you to define at runtime function-key
+ control sequences which are not in the terminal description. The
+ keyok() function allows you to temporarily enable or disable
+ interpretation of any function-key control sequence.
+
+ The use_default_colors() function allows you to construct applications
+ which can use the terminal's default foreground and background colors
+ as an additional "default" color. Several terminal emulators support
+ this feature, which is based on ISO 6429.
+
+ Ncurses supports up 16 colors, unlike SVr4 curses which defines only
+ 8. While most terminals which provide color allow only 8 colors, about
+ a quarter (including XFree86 xterm) support 16 colors.
+
+Compatibility with Older Versions
+
+ Despite our best efforts, there are some differences between ncurses
+ and the (undocumented!) behavior of older curses implementations.
+ These arise from ambiguities or omissions in the documentation of the
+ API.
+
+ Refresh of Overlapping Windows
+
+ If you define two windows A and B that overlap, and then alternately
+ scribble on and refresh them, the changes made to the overlapping
+ region under historic curses versions were often not documented
+ precisely.
+
+ To understand why this is a problem, remember that screen updates are
+ calculated between two representations of the entire display. The
+ documentation says that when you refresh a window, it is first copied
+ to to the virtual screen, and then changes are calculated to update
+ the physical screen (and applied to the terminal). But "copied to" is
+ not very specific, and subtle differences in how copying works can
+ produce different behaviors in the case where two overlapping windows
+ are each being refreshed at unpredictable intervals.
+
+ What happens to the overlapping region depends on what wnoutrefresh()
+ does with its argument -- what portions of the argument window it
+ copies to the virtual screen. Some implementations do "change copy",
+ copying down only locations in the window that have changed (or been
+ marked changed with wtouchln() and friends). Some implementations do
+ "entire copy", copying all window locations to the virtual screen
+ whether or not they have changed.
+
+ The ncurses library itself has not always been consistent on this
+ score. Due to a bug, versions 1.8.7 to 1.9.8a did entire copy.
+ Versions 1.8.6 and older, and versions 1.9.9 and newer, do change
+ copy.
+
+ For most commercial curses implementations, it is not documented and
+ not known for sure (at least not to the ncurses maintainers) whether
+ they do change copy or entire copy. We know that System V release 3
+ curses has logic in it that looks like an attempt to do change copy,
+ but the surrounding logic and data representations are sufficiently
+ complex, and our knowledge sufficiently indirect, that it's hard to
+ know whether this is reliable. It is not clear what the SVr4
+ documentation and XSI standard intend. The XSI Curses standard barely
+ mentions wnoutrefresh(); the SVr4 documents seem to be describing
+ entire-copy, but it is possible with some effort and straining to read
+ them the other way.
+
+ It might therefore be unwise to rely on either behavior in programs
+ that might have to be linked with other curses implementations.
+ Instead, you can do an explicit touchwin() before the wnoutrefresh()
+ call to guarantee an entire-contents copy anywhere.
+
+ The really clean way to handle this is to use the panels library. If,
+ when you want a screen update, you do update_panels(), it will do all
+ the necessary wnoutrfresh() calls for whatever panel stacking order
+ you have defined. Then you can do one doupdate() and there will be a
+ single burst of physical I/O that will do all your updates.
+
+ Background Erase
+
+ If you have been using a very old versions of ncurses (1.8.7 or older)
+ you may be surprised by the behavior of the erase functions. In older
+ versions, erased areas of a window were filled with a blank modified
+ by the window's current attribute (as set by wattrset(), wattron(),
+ wattroff() and friends).
+
+ In newer versions, this is not so. Instead, the attribute of erased
+ blanks is normal unless and until it is modified by the functions
+ bkgdset() or wbkgdset().
+
+ This change in behavior conforms ncurses to System V Release 4 and the
+ XSI Curses standard.
+
+XSI Curses Conformance
+
+ The ncurses library is intended to be base-level conformant with the
+ XSI Curses standard from X/Open. Many extended-level features (in
+ fact, almost all features not directly concerned with wide characters
+ and internationalization) are also supported.
+
+ One effect of XSI conformance is the change in behavior described
+ under "Background Erase -- Compatibility with Old Versions".
+
+ Also, ncurses meets the XSI requirement that every macro entry point
+ have a corresponding function which may be linked (and will be
+ prototype-checked) if the macro definition is disabled with #undef.
+
+ The Panels Library
+
+ The ncurses library by itself provides good support for screen
+ displays in which the windows are tiled (non-overlapping). In the more
+ general case that windows may overlap, you have to use a series of
+ wnoutrefresh() calls followed by a doupdate(), and be careful about
+ the order you do the window refreshes in. It has to be bottom-upwards,
+ otherwise parts of windows that should be obscured will show through.
+
+ When your interface design is such that windows may dive deeper into
+ the visibility stack or pop to the top at runtime, the resulting
+ book-keeping can be tedious and difficult to get right. Hence the
+ panels library.
+
+ The panel library first appeared in AT&T System V. The version
+ documented here is the panel code distributed with ncurses.
+
+Compiling With the Panels Library
+
+ Your panels-using modules must import the panels library declarations
+ with
+ #include <panel.h>
+
+ and must be linked explicitly with the panels library using an -lpanel
+ argument. Note that they must also link the ncurses library with
+ -lncurses. Many linkers are two-pass and will accept either order, but
+ it is still good practice to put -lpanel first and -lncurses second.
+
+Overview of Panels
+
+ A panel object is a window that is implicitly treated as part of a
+ deck including all other panel objects. The deck has an implicit
+ bottom-to-top visibility order. The panels library includes an update
+ function (analogous to refresh()) that displays all panels in the deck
+ in the proper order to resolve overlaps. The standard window, stdscr,
+ is considered below all panels.
+
+ Details on the panels functions are available in the man pages. We'll
+ just hit the highlights here.
+
+ You create a panel from a window by calling new_panel() on a window
+ pointer. It then becomes the top of the deck. The panel's window is
+ available as the value of panel_window() called with the panel pointer
+ as argument.
+
+ You can delete a panel (removing it from the deck) with del_panel.
+ This will not deallocate the associated window; you have to do that
+ yourself. You can replace a panel's window with a different window by
+ calling replace_window. The new window may be of different size; the
+ panel code will re-compute all overlaps. This operation doesn't change
+ the panel's position in the deck.
+
+ To move a panel's window, use move_panel(). The mvwin() function on
+ the panel's window isn't sufficient because it doesn't update the
+ panels library's representation of where the windows are. This
+ operation leaves the panel's depth, contents, and size unchanged.
+
+ Two functions (top_panel(), bottom_panel()) are provided for
+ rearranging the deck. The first pops its argument window to the top of
+ the deck; the second sends it to the bottom. Either operation leaves
+ the panel's screen location, contents, and size unchanged.
+
+ The function update_panels() does all the wnoutrefresh() calls needed
+ to prepare for doupdate() (which you must call yourself, afterwards).
+
+ Typically, you will want to call update_panels() and doupdate() just
+ before accepting command input, once in each cycle of interaction with
+ the user. If you call update_panels() after each and every panel
+ write, you'll generate a lot of unnecessary refresh activity and
+ screen flicker.
+
+Panels, Input, and the Standard Screen
+
+ You shouldn't mix wnoutrefresh() or wrefresh() operations with panels
+ code; this will work only if the argument window is either in the top
+ panel or unobscured by any other panels.
+
+ The stsdcr window is a special case. It is considered below all
+ panels. Because changes to panels may obscure parts of stdscr, though,
+ you should call update_panels() before doupdate() even when you only
+ change stdscr.
+
+ Note that wgetch automatically calls wrefresh. Therefore, before
+ requesting input from a panel window, you need to be sure that the
+ panel is totally unobscured.
+
+ There is presently no way to display changes to one obscured panel
+ without repainting all panels.
+
+Hiding Panels
+
+ It's possible to remove a panel from the deck temporarily; use
+ hide_panel for this. Use show_panel() to render it visible again. The
+ predicate function panel_hidden tests whether or not a panel is
+ hidden.
+
+ The panel_update code ignores hidden panels. You cannot do top_panel()
+ or bottom_panel on a hidden panel(). Other panels operations are
+ applicable.
+
+Miscellaneous Other Facilities
+
+ It's possible to navigate the deck using the functions panel_above()
+ and panel_below. Handed a panel pointer, they return the panel above
+ or below that panel. Handed NULL, they return the bottom-most or
+ top-most panel.
+
+ Every panel has an associated user pointer, not used by the panel
+ code, to which you can attach application data. See the man page
+ documentation of set_panel_userptr() and panel_userptr for details.
+
+ The Menu Library
+
+ A menu is a screen display that assists the user to choose some subset
+ of a given set of items. The menu library is a curses extension that
+ supports easy programming of menu hierarchies with a uniform but
+ flexible interface.
+
+ The menu library first appeared in AT&T System V. The version
+ documented here is the menu code distributed with ncurses.
+
+Compiling With the menu Library
+
+ Your menu-using modules must import the menu library declarations with
+ #include <menu.h>
+
+ and must be linked explicitly with the menus library using an -lmenu
+ argument. Note that they must also link the ncurses library with
+ -lncurses. Many linkers are two-pass and will accept either order, but
+ it is still good practice to put -lmenu first and -lncurses second.
+
+Overview of Menus
+
+ The menus created by this library consist of collections of items
+ including a name string part and a description string part. To make
+ menus, you create groups of these items and connect them with menu
+ frame objects.
+
+ The menu can then by posted, that is written to an associated window.
+ Actually, each menu has two associated windows; a containing window in
+ which the programmer can scribble titles or borders, and a subwindow
+ in which the menu items proper are displayed. If this subwindow is too
+ small to display all the items, it will be a scrollable viewport on
+ the collection of items.
+
+ A menu may also be unposted (that is, undisplayed), and finally freed
+ to make the storage associated with it and its items available for
+ re-use.
+
+ The general flow of control of a menu program looks like this:
+ 1. Initialize curses.
+ 2. Create the menu items, using new_item().
+ 3. Create the menu using new_menu().
+ 4. Post the menu using menu_post().
+ 5. Refresh the screen.
+ 6. Process user requests via an input loop.
+ 7. Unpost the menu using menu_unpost().
+ 8. Free the menu, using free_menu().
+ 9. Free the items using free_item().
+ 10. Terminate curses.
+
+Selecting items
+
+ Menus may be multi-valued or (the default) single-valued (see the
+ manual page menu_opts(3x) to see how to change the default). Both
+ types always have a current item.
+
+ From a single-valued menu you can read the selected value simply by
+ looking at the current item. From a multi-valued menu, you get the
+ selected set by looping through the items applying the item_value()
+ predicate function. Your menu-processing code can use the function
+ set_item_value() to flag the items in the select set.
+
+ Menu items can be made unselectable using set_item_opts() or
+ item_opts_off() with the O_SELECTABLE argument. This is the only
+ option so far defined for menus, but it is good practice to code as
+ though other option bits might be on.
+
+Menu Display
+
+ The menu library calculates a minimum display size for your window,
+ based on the following variables:
+ * The number and maximum length of the menu items
+ * Whether the O_ROWMAJOR option is enabled
+ * Whether display of descriptions is enabled
+ * Whatever menu format may have been set by the programmer
+ * The length of the menu mark string used for highlighting selected
+ items
+
+ The function set_menu_format() allows you to set the maximum size of
+ the viewport or menu page that will be used to display menu items. You
+ can retrieve any format associated with a menu with menu_format(). The
+ default format is rows=16, columns=1.
+
+ The actual menu page may be smaller than the format size. This depends
+ on the item number and size and whether O_ROWMAJOR is on. This option
+ (on by default) causes menu items to be displayed in a `raster-scan'
+ pattern, so that if more than one item will fit horizontally the first
+ couple of items are side-by-side in the top row. The alternative is
+ column-major display, which tries to put the first several items in
+ the first column.
+
+ As mentioned above, a menu format not large enough to allow all items
+ to fit on-screen will result in a menu display that is vertically
+ scrollable.
+
+ You can scroll it with requests to the menu driver, which will be
+ described in the section on menu input handling.
+
+ Each menu has a mark string used to visually tag selected items; see
+ the menu_mark(3x) manual page for details. The mark string length also
+ influences the menu page size.
+
+ The function scale_menu() returns the minimum display size that the
+ menu code computes from all these factors. There are other menu
+ display attributes including a select attribute, an attribute for
+ selectable items, an attribute for unselectable items, and a pad
+ character used to separate item name text from description text. These
+ have reasonable defaults which the library allows you to change (see
+ the menu_attribs(3x) manual page.
+
+Menu Windows
+
+ Each menu has, as mentioned previously, a pair of associated windows.
+ Both these windows are painted when the menu is posted and erased when
+ the menu is unposted.
+
+ The outer or frame window is not otherwise touched by the menu
+ routines. It exists so the programmer can associate a title, a border,
+ or perhaps help text with the menu and have it properly refreshed or
+ erased at post/unpost time. The inner window or subwindow is where the
+ current menu page is displayed.
+
+ By default, both windows are stdscr. You can set them with the
+ functions in menu_win(3x).
+
+ When you call menu_post(), you write the menu to its subwindow. When
+ you call menu_unpost(), you erase the subwindow, However, neither of
+ these actually modifies the screen. To do that, call wrefresh() or
+ some equivalent.
+
+Processing Menu Input
+
+ The main loop of your menu-processing code should call menu_driver()
+ repeatedly. The first argument of this routine is a menu pointer; the
+ second is a menu command code. You should write an input-fetching
+ routine that maps input characters to menu command codes, and pass its
+ output to menu_driver(). The menu command codes are fully documented
+ in menu_driver(3x).
+
+ The simplest group of command codes is REQ_NEXT_ITEM, REQ_PREV_ITEM,
+ REQ_FIRST_ITEM, REQ_LAST_ITEM, REQ_UP_ITEM, REQ_DOWN_ITEM,
+ REQ_LEFT_ITEM, REQ_RIGHT_ITEM. These change the currently selected
+ item. These requests may cause scrolling of the menu page if it only
+ partially displayed.
+
+ There are explicit requests for scrolling which also change the
+ current item (because the select location does not change, but the
+ item there does). These are REQ_SCR_DLINE, REQ_SCR_ULINE,
+ REQ_SCR_DPAGE, and REQ_SCR_UPAGE.
+
+ The REQ_TOGGLE_ITEM selects or deselects the current item. It is for
+ use in multi-valued menus; if you use it with O_ONEVALUE on, you'll
+ get an error return (E_REQUEST_DENIED).
+
+ Each menu has an associated pattern buffer. The menu_driver() logic
+ tries to accumulate printable ASCII characters passed in in that
+ buffer; when it matches a prefix of an item name, that item (or the
+ next matching item) is selected. If appending a character yields no
+ new match, that character is deleted from the pattern buffer, and
+ menu_driver() returns E_NO_MATCH.
+
+ Some requests change the pattern buffer directly: REQ_CLEAR_PATTERN,
+ REQ_BACK_PATTERN, REQ_NEXT_MATCH, REQ_PREV_MATCH. The latter two are
+ useful when pattern buffer input matches more than one item in a
+ multi-valued menu.
+
+ Each successful scroll or item navigation request clears the pattern
+ buffer. It is also possible to set the pattern buffer explicitly with
+ set_menu_pattern().
+
+ Finally, menu driver requests above the constant MAX_COMMAND are
+ considered application-specific commands. The menu_driver() code
+ ignores them and returns E_UNKNOWN_COMMAND.
+
+Miscellaneous Other Features
+
+ Various menu options can affect the processing and visual appearance
+ and input processing of menus. See menu_opts(3x) for details.
+
+ It is possible to change the current item from application code; this
+ is useful if you want to write your own navigation requests. It is
+ also possible to explicitly set the top row of the menu display. See
+ mitem_current(3x). If your application needs to change the menu
+ subwindow cursor for any reason, pos_menu_cursor() will restore it to
+ the correct location for continuing menu driver processing.
+
+ It is possible to set hooks to be called at menu initialization and
+ wrapup time, and whenever the selected item changes. See
+ menu_hook(3x).
+
+ Each item, and each menu, has an associated user pointer on which you
+ can hang application data. See mitem_userptr(3x) and menu_userptr(3x).
+
+ The Forms Library
+
+ The form library is a curses extension that supports easy programming
+ of on-screen forms for data entry and program control.
+
+ The form library first appeared in AT&T System V. The version
+ documented here is the form code distributed with ncurses.
+
+Compiling With the form Library
+
+ Your form-using modules must import the form library declarations with
+ #include <form.h>
+
+ and must be linked explicitly with the forms library using an -lform
+ argument. Note that they must also link the ncurses library with
+ -lncurses. Many linkers are two-pass and will accept either order, but
+ it is still good practice to put -lform first and -lncurses second.
+
+Overview of Forms
+
+ A form is a collection of fields; each field may be either a label
+ (explanatory text) or a data-entry location. Long forms may be
+ segmented into pages; each entry to a new page clears the screen.
+
+ To make forms, you create groups of fields and connect them with form
+ frame objects; the form library makes this relatively simple.
+
+ Once defined, a form can be posted, that is written to an associated
+ window. Actually, each form has two associated windows; a containing
+ window in which the programmer can scribble titles or borders, and a
+ subwindow in which the form fields proper are displayed.
+
+ As the form user fills out the posted form, navigation and editing
+ keys support movement between fields, editing keys support modifying
+ field, and plain text adds to or changes data in a current field. The
+ form library allows you (the forms designer) to bind each navigation
+ and editing key to any keystroke accepted by curses Fields may have
+ validation conditions on them, so that they check input data for type
+ and value. The form library supplies a rich set of pre-defined field
+ types, and makes it relatively easy to define new ones.
+
+ Once its transaction is completed (or aborted), a form may be unposted
+ (that is, undisplayed), and finally freed to make the storage
+ associated with it and its items available for re-use.
+
+ The general flow of control of a form program looks like this:
+ 1. Initialize curses.
+ 2. Create the form fields, using new_field().
+ 3. Create the form using new_form().
+ 4. Post the form using form_post().
+ 5. Refresh the screen.
+ 6. Process user requests via an input loop.
+ 7. Unpost the form using form_unpost().
+ 8. Free the form, using free_form().
+ 9. Free the fields using free_field().
+ 10. Terminate curses.
+
+ Note that this looks much like a menu program; the form library
+ handles tasks which are in many ways similar, and its interface was
+ obviously designed to resemble that of the menu library wherever
+ possible.
+
+ In forms programs, however, the `process user requests' is somewhat
+ more complicated than for menus. Besides menu-like navigation
+ operations, the menu driver loop has to support field editing and data
+ validation.
+
+Creating and Freeing Fields and Forms
+
+ The basic function for creating fields is new_field():
+FIELD *new_field(int height, int width, /* new field size */
+ int top, int left, /* upper left corner */
+ int offscreen, /* number of offscreen rows */
+ int nbuf); /* number of working buffers */
+
+ Menu items always occupy a single row, but forms fields may have
+ multiple rows. So new_field() requires you to specify a width and
+ height (the first two arguments, which mist both be greater than
+ zero).
+
+ You must also specify the location of the field's upper left corner on
+ the screen (the third and fourth arguments, which must be zero or
+ greater). Note that these coordinates are relative to the form
+ subwindow, which will coincide with stdscr by default but need not be
+ stdscr if you've done an explicit set_form_window() call.
+
+ The fifth argument allows you to specify a number of off-screen rows.
+ If this is zero, the entire field will always be displayed. If it is
+ nonzero, the form will be scrollable, with only one screen-full
+ (initially the top part) displayed at any given time. If you make a
+ field dynamic and grow it so it will no longer fit on the screen, the
+ form will become scrollable even if the offscreen argument was
+ initially zero.
+
+ The forms library allocates one working buffer per field; the size of
+ each buffer is ((height + offscreen)*width + 1, one character for each
+ position in the field plus a NUL terminator. The sixth argument is the
+ number of additional data buffers to allocate for the field; your
+ application can use them for its own purposes.
+FIELD *dup_field(FIELD *field, /* field to copy */
+ int top, int left); /* location of new copy */
+
+ The function dup_field() duplicates an existing field at a new
+ location. Size and buffering information are copied; some attribute
+ flags and status bits are not (see the form_field_new(3X) for
+ details).
+FIELD *link_field(FIELD *field, /* field to copy */
+ int top, int left); /* location of new copy */
+
+ The function link_field() also duplicates an existing field at a new
+ location. The difference from dup_field() is that it arranges for the
+ new field's buffer to be shared with the old one.
+
+ Besides the obvious use in making a field editable from two different
+ form pages, linked fields give you a way to hack in dynamic labels. If
+ you declare several fields linked to an original, and then make them
+ inactive, changes from the original will still be propagated to the
+ linked fields.
+
+ As with duplicated fields, linked fields have attribute bits separate
+ from the original.
+
+ As you might guess, all these field-allocations return NULL if the
+ field allocation is not possible due to an out-of-memory error or
+ out-of-bounds arguments.
+
+ To connect fields to a form, use
+FORM *new_form(FIELD **fields);
+
+ This function expects to see a NULL-terminated array of field
+ pointers. Said fields are connected to a newly-allocated form object;
+ its address is returned (or else NULL if the allocation fails).
+
+ Note that new_field() does not copy the pointer array into private
+ storage; if you modify the contents of the pointer array during forms
+ processing, all manner of bizarre things might happen. Also note that
+ any given field may only be connected to one form.
+
+ The functions free_field() and free_form are available to free field
+ and form objects. It is an error to attempt to free a field connected
+ to a form, but not vice-versa; thus, you will generally free your form
+ objects first.
+
+Fetching and Changing Field Attributes
+
+ Each form field has a number of location and size attributes
+ associated with it. There are other field attributes used to control
+ display and editing of the field. Some (for example, the O_STATIC bit)
+ involve sufficient complications to be covered in sections of their
+ own later on. We cover the functions used to get and set several basic
+ attributes here.
+
+ When a field is created, the attributes not specified by the new_field
+ function are copied from an invisible system default field. In
+ attribute-setting and -fetching functions, the argument NULL is taken
+ to mean this field. Changes to it persist as defaults until your forms
+ application terminates.
+
+ Fetching Size and Location Data
+
+ You can retrieve field sizes and locations through:
+int field_info(FIELD *field, /* field from which to fetch */
+ int *height, *int width, /* field size */
+ int *top, int *left, /* upper left corner */
+ int *offscreen, /* number of offscreen rows */
+ int *nbuf); /* number of working buffers */
+
+ This function is a sort of inverse of new_field(); instead of setting
+ size and location attributes of a new field, it fetches them from an
+ existing one.
+
+ Changing the Field Location
+
+ It is possible to move a field's location on the screen:
+int move_field(FIELD *field, /* field to alter */
+ int top, int left); /* new upper-left corner */
+
+ You can, of course. query the current location through field_info().
+
+ The Justification Attribute
+
+ One-line fields may be unjustified, justified right, justified left,
+ or centered. Here is how you manipulate this attribute:
+int set_field_just(FIELD *field, /* field to alter */
+ int justmode); /* mode to set */
+
+int field_just(FIELD *field); /* fetch mode of field */
+
+ The mode values accepted and returned by this functions are
+ preprocessor macros NO_JUSTIFICATION, JUSTIFY_RIGHT, JUSTIFY_LEFT, or
+ JUSTIFY_CENTER.
+
+ Field Display Attributes
+
+ For each field, you can set a foreground attribute for entered
+ characters, a background attribute for the entire field, and a pad
+ character for the unfilled portion of the field. You can also control
+ pagination of the form.
+
+ This group of four field attributes controls the visual appearance of
+ the field on the screen, without affecting in any way the data in the
+ field buffer.
+int set_field_fore(FIELD *field, /* field to alter */
+ chtype attr); /* attribute to set */
+
+chtype field_fore(FIELD *field); /* field to query */
+
+int set_field_back(FIELD *field, /* field to alter */
+ chtype attr); /* attribute to set */
+
+chtype field_back(FIELD *field); /* field to query */
+
+int set_field_pad(FIELD *field, /* field to alter */
+ int pad); /* pad character to set */
+
+chtype field_pad(FIELD *field);
+
+int set_new_page(FIELD *field, /* field to alter */
+ int flag); /* TRUE to force new page */
+
+chtype new_page(FIELD *field); /* field to query */
+
+ The attributes set and returned by the first four functions are normal
+ curses(3x) display attribute values (A_STANDOUT, A_BOLD, A_REVERSE
+ etc). The page bit of a field controls whether it is displayed at the
+ start of a new form screen.
+
+ Field Option Bits
+
+ There is also a large collection of field option bits you can set to
+ control various aspects of forms processing. You can manipulate them
+ with these functions:
+int set_field_opts(FIELD *field, /* field to alter */
+ int attr); /* attribute to set */
+
+int field_opts_on(FIELD *field, /* field to alter */
+ int attr); /* attributes to turn on */
+
+int field_opts_off(FIELD *field, /* field to alter */
+ int attr); /* attributes to turn off */
+
+int field_opts(FIELD *field); /* field to query */
+
+ By default, all options are on. Here are the available option bits:
+
+ O_VISIBLE
+ Controls whether the field is visible on the screen. Can be
+ used during form processing to hide or pop up fields depending
+ on the value of parent fields.
+
+ O_ACTIVE
+ Controls whether the field is active during forms processing
+ (i.e. visited by form navigation keys). Can be used to make
+ labels or derived fields with buffer values alterable by the
+ forms application, not the user.
+
+ O_PUBLIC
+ Controls whether data is displayed during field entry. If this
+ option is turned off on a field, the library will accept and
+ edit data in that field, but it will not be displayed and the
+ visible field cursor will not move. You can turn off the
+ O_PUBLIC bit to define password fields.
+
+ O_EDIT
+ Controls whether the field's data can be modified. When this
+ option is off, all editing requests except REQ_PREV_CHOICE and
+ REQ_NEXT_CHOICE will fail. Such read-only fields may be useful
+ for help messages.
+
+ O_WRAP
+ Controls word-wrapping in multi-line fields. Normally, when any
+ character of a (blank-separated) word reaches the end of the
+ current line, the entire word is wrapped to the next line
+ (assuming there is one). When this option is off, the word will
+ be split across the line break.
+
+ O_BLANK
+ Controls field blanking. When this option is on, entering a
+ character at the first field position erases the entire field
+ (except for the just-entered character).
+
+ O_AUTOSKIP
+ Controls automatic skip to next field when this one fills.
+ Normally, when the forms user tries to type more data into a
+ field than will fit, the editing location jumps to next field.
+ When this option is off, the user's cursor will hang at the end
+ of the field. This option is ignored in dynamic fields that
+ have not reached their size limit.
+
+ O_NULLOK
+ Controls whether validation is applied to blank fields.
+ Normally, it is not; the user can leave a field blank without
+ invoking the usual validation check on exit. If this option is
+ off on a field, exit from it will invoke a validation check.
+
+ O_PASSOK
+ Controls whether validation occurs on every exit, or only after
+ the field is modified. Normally the latter is true. Setting
+ O_PASSOK may be useful if your field's validation function may
+ change during forms processing.
+
+ O_STATIC
+ Controls whether the field is fixed to its initial dimensions.
+ If you turn this off, the field becomes dynamic and will
+ stretch to fit entered data.
+
+ A field's options cannot be changed while the field is currently
+ selected. However, options may be changed on posted fields that are
+ not current.
+
+ The option values are bit-masks and can be composed with logical-or in
+ the obvious way.
+
+Field Status
+
+ Every field has a status flag, which is set to FALSE when the field is
+ created and TRUE when the value in field buffer 0 changes. This flag
+ can be queried and set directly:
+int set_field_status(FIELD *field, /* field to alter */
+ int status); /* mode to set */
+
+int field_status(FIELD *field); /* fetch mode of field */
+
+ Setting this flag under program control can be useful if you use the
+ same form repeatedly, looking for modified fields each time.
+
+ Calling field_status() on a field not currently selected for input
+ will return a correct value. Calling field_status() on a field that is
+ currently selected for input may not necessarily give a correct field
+ status value, because entered data isn't necessarily copied to buffer
+ zero before the exit validation check. To guarantee that the returned
+ status value reflects reality, call field_status() either (1) in the
+ field's exit validation check routine, (2) from the field's or form's
+ initialization or termination hooks, or (3) just after a
+ REQ_VALIDATION request has been processed by the forms driver.
+
+Field User Pointer
+
+ Each field structure contains one character pointer slot that is not
+ used by the forms library. It is intended to be used by applications
+ to store private per-field data. You can manipulate it with:
+int set_field_userptr(FIELD *field, /* field to alter */
+ char *userptr); /* mode to set */
+
+char *field_userptr(FIELD *field); /* fetch mode of field */
+
+ (Properly, this user pointer field ought to have (void *) type. The
+ (char *) type is retained for System V compatibility.)
+
+ It is valid to set the user pointer of the default field (with a
+ set_field_userptr() call passed a NULL field pointer.) When a new
+ field is created, the default-field user pointer is copied to
+ initialize the new field's user pointer.
+
+Variable-Sized Fields
+
+ Normally, a field is fixed at the size specified for it at creation
+ time. If, however, you turn off its O_STATIC bit, it becomes dynamic
+ and will automatically resize itself to accommodate data as it is
+ entered. If the field has extra buffers associated with it, they will
+ grow right along with the main input buffer.
+
+ A one-line dynamic field will have a fixed height (1) but variable
+ width, scrolling horizontally to display data within the field area as
+ originally dimensioned and located. A multi-line dynamic field will
+ have a fixed width, but variable height (number of rows), scrolling
+ vertically to display data within the field area as originally
+ dimensioned and located.
+
+ Normally, a dynamic field is allowed to grow without limit. But it is
+ possible to set an upper limit on the size of a dynamic field. You do
+ it with this function:
+int set_max_field(FIELD *field, /* field to alter (may not be NULL) */
+ int max_size); /* upper limit on field size */
+
+ If the field is one-line, max_size is taken to be a column size limit;
+ if it is multi-line, it is taken to be a line size limit. To disable
+ any limit, use an argument of zero. The growth limit can be changed
+ whether or not the O_STATIC bit is on, but has no effect until it is.
+
+ The following properties of a field change when it becomes dynamic:
+ * If there is no growth limit, there is no final position of the
+ field; therefore O_AUTOSKIP and O_NL_OVERLOAD are ignored.
+ * Field justification will be ignored (though whatever justification
+ is set up will be retained internally and can be queried).
+ * The dup_field() and link_field() calls copy dynamic-buffer sizes.
+ If the O_STATIC option is set on one of a collection of links,
+ buffer resizing will occur only when the field is edited through
+ that link.
+ * The call field_info() will retrieve the original static size of
+ the field; use dynamic_field_info() to get the actual dynamic
+ size.
+
+Field Validation
+
+ By default, a field will accept any data that will fit in its input
+ buffer. However, it is possible to attach a validation type to a
+ field. If you do this, any attempt to leave the field while it
+ contains data that doesn't match the validation type will fail. Some
+ validation types also have a character-validity check for each time a
+ character is entered in the field.
+
+ A field's validation check (if any) is not called when
+ set_field_buffer() modifies the input buffer, nor when that buffer is
+ changed through a linked field.
+
+ The form library provides a rich set of pre-defined validation types,
+ and gives you the capability to define custom ones of your own. You
+ can examine and change field validation attributes with the following
+ functions:
+int set_field_type(FIELD *field, /* field to alter */
+ FIELDTYPE *ftype, /* type to associate */
+ ...); /* additional arguments*/
+
+FIELDTYPE *field_type(FIELD *field); /* field to query */
+
+ The validation type of a field is considered an attribute of the
+ field. As with other field attributes, Also, doing set_field_type()
+ with a NULL field default will change the system default for
+ validation of newly-created fields.
+
+ Here are the pre-defined validation types:
+
+ TYPE_ALPHA
+
+ This field type accepts alphabetic data; no blanks, no digits, no
+ special characters (this is checked at character-entry time). It is
+ set up with:
+int set_field_type(FIELD *field, /* field to alter */
+ TYPE_ALPHA, /* type to associate */
+ int width); /* maximum width of field */
+
+ The width argument sets a minimum width of data. Typically you'll want
+ to set this to the field width; if it's greater than the field width,
+ the validation check will always fail. A minimum width of zero makes
+ field completion optional.
+
+ TYPE_ALNUM
+
+ This field type accepts alphabetic data and digits; no blanks, no
+ special characters (this is checked at character-entry time). It is
+ set up with:
+int set_field_type(FIELD *field, /* field to alter */
+ TYPE_ALNUM, /* type to associate */
+ int width); /* maximum width of field */
+
+ The width argument sets a minimum width of data. As with TYPE_ALPHA,
+ typically you'll want to set this to the field width; if it's greater
+ than the field width, the validation check will always fail. A minimum
+ width of zero makes field completion optional.
+
+ TYPE_ENUM
+
+ This type allows you to restrict a field's values to be among a
+ specified set of string values (for example, the two-letter postal
+ codes for U.S. states). It is set up with:
+int set_field_type(FIELD *field, /* field to alter */
+ TYPE_ENUM, /* type to associate */
+ char **valuelist; /* list of possible values */
+ int checkcase; /* case-sensitive? */
+ int checkunique); /* must specify uniquely? */
+
+ The valuelist parameter must point at a NULL-terminated list of valid
+ strings. The checkcase argument, if true, makes comparison with the
+ string case-sensitive.
+
+ When the user exits a TYPE_ENUM field, the validation procedure tries
+ to complete the data in the buffer to a valid entry. If a complete
+ choice string has been entered, it is of course valid. But it is also
+ possible to enter a prefix of a valid string and have it completed for
+ you.
+
+ By default, if you enter such a prefix and it matches more than one
+ value in the string list, the prefix will be completed to the first
+ matching value. But the checkunique argument, if true, requires prefix
+ matches to be unique in order to be valid.
+
+ The REQ_NEXT_CHOICE and REQ_PREV_CHOICE input requests can be
+ particularly useful with these fields.
+
+ TYPE_INTEGER
+
+ This field type accepts an integer. It is set up as follows:
+int set_field_type(FIELD *field, /* field to alter */
+ TYPE_INTEGER, /* type to associate */
+ int padding, /* # places to zero-pad to */
+ int vmin, int vmax); /* valid range */
+
+ Valid characters consist of an optional leading minus and digits. The
+ range check is performed on exit. If the range maximum is less than or
+ equal to the minimum, the range is ignored.
+
+ If the value passes its range check, it is padded with as many leading
+ zero digits as necessary to meet the padding argument.
+
+ A TYPE_INTEGER value buffer can conveniently be interpreted with the C
+ library function atoi(3).
+
+ TYPE_NUMERIC
+
+ This field type accepts a decimal number. It is set up as follows:
+int set_field_type(FIELD *field, /* field to alter */
+ TYPE_NUMERIC, /* type to associate */
+ int padding, /* # places of precision */
+ double vmin, double vmax); /* valid range */
+
+ Valid characters consist of an optional leading minus and digits.
+ possibly including a decimal point. If your system supports locale's,
+ the decimal point character used must be the one defined by your
+ locale. The range check is performed on exit. If the range maximum is
+ less than or equal to the minimum, the range is ignored.
+
+ If the value passes its range check, it is padded with as many
+ trailing zero digits as necessary to meet the padding argument.
+
+ A TYPE_NUMERIC value buffer can conveniently be interpreted with the C
+ library function atof(3).
+
+ TYPE_REGEXP
+
+ This field type accepts data matching a regular expression. It is set
+ up as follows:
+int set_field_type(FIELD *field, /* field to alter */
+ TYPE_REGEXP, /* type to associate */
+ char *regexp); /* expression to match */
+
+ The syntax for regular expressions is that of regcomp(3). The check
+ for regular-expression match is performed on exit.
+
+Direct Field Buffer Manipulation
+
+ The chief attribute of a field is its buffer contents. When a form has
+ been completed, your application usually needs to know the state of
+ each field buffer. You can find this out with:
+char *field_buffer(FIELD *field, /* field to query */
+ int bufindex); /* number of buffer to query */
+
+ Normally, the state of the zero-numbered buffer for each field is set
+ by the user's editing actions on that field. It's sometimes useful to
+ be able to set the value of the zero-numbered (or some other) buffer
+ from your application:
+int set_field_buffer(FIELD *field, /* field to alter */
+ int bufindex, /* number of buffer to alter */
+ char *value); /* string value to set */
+
+ If the field is not large enough and cannot be resized to a
+ sufficiently large size to contain the specified value, the value will
+ be truncated to fit.
+
+ Calling field_buffer() with a null field pointer will raise an error.
+ Calling field_buffer() on a field not currently selected for input
+ will return a correct value. Calling field_buffer() on a field that is
+ currently selected for input may not necessarily give a correct field
+ buffer value, because entered data isn't necessarily copied to buffer
+ zero before the exit validation check. To guarantee that the returned
+ buffer value reflects on-screen reality, call field_buffer() either
+ (1) in the field's exit validation check routine, (2) from the field's
+ or form's initialization or termination hooks, or (3) just after a
+ REQ_VALIDATION request has been processed by the forms driver.
+
+Attributes of Forms
+
+ As with field attributes, form attributes inherit a default from a
+ system default form structure. These defaults can be queried or set by
+ of these functions using a form-pointer argument of NULL.
+
+ The principal attribute of a form is its field list. You can query and
+ change this list with:
+int set_form_fields(FORM *form, /* form to alter */
+ FIELD **fields); /* fields to connect */
+
+char *form_fields(FORM *form); /* fetch fields of form */
+
+int field_count(FORM *form); /* count connect fields */
+
+ The second argument of set_form_fields() may be a NULL-terminated
+ field pointer array like the one required by new_form(). In that case,
+ the old fields of the form are disconnected but not freed (and
+ eligible to be connected to other forms), then the new fields are
+ connected.
+
+ It may also be null, in which case the old fields are disconnected
+ (and not freed) but no new ones are connected.
+
+ The field_count() function simply counts the number of fields
+ connected to a given from. It returns -1 if the form-pointer argument
+ is NULL.
+
+Control of Form Display
+
+ In the overview section, you saw that to display a form you normally
+ start by defining its size (and fields), posting it, and refreshing
+ the screen. There is an hidden step before posting, which is the
+ association of the form with a frame window (actually, a pair of
+ windows) within which it will be displayed. By default, the forms
+ library associates every form with the full-screen window stdscr.
+
+ By making this step explicit, you can associate a form with a declared
+ frame window on your screen display. This can be useful if you want to
+ adapt the form display to different screen sizes, dynamically tile
+ forms on the screen, or use a form as part of an interface layout
+ managed by panels.
+
+ The two windows associated with each form have the same functions as
+ their analogues in the menu library. Both these windows are painted
+ when the form is posted and erased when the form is unposted.
+
+ The outer or frame window is not otherwise touched by the form
+ routines. It exists so the programmer can associate a title, a border,
+ or perhaps help text with the form and have it properly refreshed or
+ erased at post/unpost time. The inner window or subwindow is where the
+ current form page is actually displayed.
+
+ In order to declare your own frame window for a form, you'll need to
+ know the size of the form's bounding rectangle. You can get this
+ information with:
+int scale_form(FORM *form, /* form to query */
+ int *rows, /* form rows */
+ int *cols); /* form cols */
+
+ The form dimensions are passed back in the locations pointed to by the
+ arguments. Once you have this information, you can use it to declare
+ of windows, then use one of these functions:
+int set_form_win(FORM *form, /* form to alter */
+ WINDOW *win); /* frame window to connect */
+
+WINDOW *form_win(FORM *form); /* fetch frame window of form */
+
+int set_form_sub(FORM *form, /* form to alter */
+ WINDOW *win); /* form subwindow to connect */
+
+WINDOW *form_sub(FORM *form); /* fetch form subwindow of form */
+
+ Note that curses operations, including refresh(), on the form, should
+ be done on the frame window, not the form subwindow.
+
+ It is possible to check from your application whether all of a
+ scrollable field is actually displayed within the menu subwindow. Use
+ these functions:
+int data_ahead(FORM *form); /* form to be queried */
+
+int data_behind(FORM *form); /* form to be queried */
+
+ The function data_ahead() returns TRUE if (a) the current field is
+ one-line and has undisplayed data off to the right, (b) the current
+ field is multi-line and there is data off-screen below it.
+
+ The function data_behind() returns TRUE if the first (upper left hand)
+ character position is off-screen (not being displayed).
+
+ Finally, there is a function to restore the form window's cursor to
+ the value expected by the forms driver:
+int pos_form_cursor(FORM *) /* form to be queried */
+
+ If your application changes the form window cursor, call this function
+ before handing control back to the forms driver in order to
+ re-synchronize it.
+
+Input Processing in the Forms Driver
+
+ The function form_driver() handles virtualized input requests for form
+ navigation, editing, and validation requests, just as menu_driver does
+ for menus (see the section on menu input handling).
+int form_driver(FORM *form, /* form to pass input to */
+ int request); /* form request code */
+
+ Your input virtualization function needs to take input and then
+ convert it to either an alphanumeric character (which is treated as
+ data to be entered in the currently-selected field), or a forms
+ processing request.
+
+ The forms driver provides hooks (through input-validation and
+ field-termination functions) with which your application code can
+ check that the input taken by the driver matched what was expected.
+
+ Page Navigation Requests
+
+ These requests cause page-level moves through the form, triggering
+ display of a new form screen.
+
+ REQ_NEXT_PAGE
+ Move to the next form page.
+
+ REQ_PREV_PAGE
+ Move to the previous form page.
+
+ REQ_FIRST_PAGE
+ Move to the first form page.
+
+ REQ_LAST_PAGE
+ Move to the last form page.
+
+ These requests treat the list as cyclic; that is, REQ_NEXT_PAGE from
+ the last page goes to the first, and REQ_PREV_PAGE from the first page
+ goes to the last.
+
+ Inter-Field Navigation Requests
+
+ These requests handle navigation between fields on the same page.
+
+ REQ_NEXT_FIELD
+ Move to next field.
+
+ REQ_PREV_FIELD
+ Move to previous field.
+
+ REQ_FIRST_FIELD
+ Move to the first field.
+
+ REQ_LAST_FIELD
+ Move to the last field.
+
+ REQ_SNEXT_FIELD
+ Move to sorted next field.
+
+ REQ_SPREV_FIELD
+ Move to sorted previous field.
+
+ REQ_SFIRST_FIELD
+ Move to the sorted first field.
+
+ REQ_SLAST_FIELD
+ Move to the sorted last field.
+
+ REQ_LEFT_FIELD
+ Move left to field.
+
+ REQ_RIGHT_FIELD
+ Move right to field.
+
+ REQ_UP_FIELD
+ Move up to field.
+
+ REQ_DOWN_FIELD
+ Move down to field.
+
+ These requests treat the list of fields on a page as cyclic; that is,
+ REQ_NEXT_FIELD from the last field goes to the first, and
+ REQ_PREV_FIELD from the first field goes to the last. The order of the
+ fields for these (and the REQ_FIRST_FIELD and REQ_LAST_FIELD requests)
+ is simply the order of the field pointers in the form array (as set up
+ by new_form() or set_form_fields()
+
+ It is also possible to traverse the fields as if they had been sorted
+ in screen-position order, so the sequence goes left-to-right and
+ top-to-bottom. To do this, use the second group of four
+ sorted-movement requests.
+
+ Finally, it is possible to move between fields using visual directions
+ up, down, right, and left. To accomplish this, use the third group of
+ four requests. Note, however, that the position of a form for purposes
+ of these requests is its upper-left corner.
+
+ For example, suppose you have a multi-line field B, and two
+ single-line fields A and C on the same line with B, with A to the left
+ of B and C to the right of B. A REQ_MOVE_RIGHT from A will go to B
+ only if A, B, and C all share the same first line; otherwise it will
+ skip over B to C.
+
+ Intra-Field Navigation Requests
+
+ These requests drive movement of the edit cursor within the currently
+ selected field.
+
+ REQ_NEXT_CHAR
+ Move to next character.
+
+ REQ_PREV_CHAR
+ Move to previous character.
+
+ REQ_NEXT_LINE
+ Move to next line.
+
+ REQ_PREV_LINE
+ Move to previous line.
+
+ REQ_NEXT_WORD
+ Move to next word.
+
+ REQ_PREV_WORD
+ Move to previous word.
+
+ REQ_BEG_FIELD
+ Move to beginning of field.
+
+ REQ_END_FIELD
+ Move to end of field.
+
+ REQ_BEG_LINE
+ Move to beginning of line.
+
+ REQ_END_LINE
+ Move to end of line.
+
+ REQ_LEFT_CHAR
+ Move left in field.
+
+ REQ_RIGHT_CHAR
+ Move right in field.
+
+ REQ_UP_CHAR
+ Move up in field.
+
+ REQ_DOWN_CHAR
+ Move down in field.
+
+ Each word is separated from the previous and next characters by
+ whitespace. The commands to move to beginning and end of line or field
+ look for the first or last non-pad character in their ranges.
+
+ Scrolling Requests
+
+ Fields that are dynamic and have grown and fields explicitly created
+ with offscreen rows are scrollable. One-line fields scroll
+ horizontally; multi-line fields scroll vertically. Most scrolling is
+ triggered by editing and intra-field movement (the library scrolls the
+ field to keep the cursor visible). It is possible to explicitly
+ request scrolling with the following requests:
+
+ REQ_SCR_FLINE
+ Scroll vertically forward a line.
+
+ REQ_SCR_BLINE
+ Scroll vertically backward a line.
+
+ REQ_SCR_FPAGE
+ Scroll vertically forward a page.
+
+ REQ_SCR_BPAGE
+ Scroll vertically backward a page.
+
+ REQ_SCR_FHPAGE
+ Scroll vertically forward half a page.
+
+ REQ_SCR_BHPAGE
+ Scroll vertically backward half a page.
+
+ REQ_SCR_FCHAR
+ Scroll horizontally forward a character.
+
+ REQ_SCR_BCHAR
+ Scroll horizontally backward a character.
+
+ REQ_SCR_HFLINE
+ Scroll horizontally one field width forward.
+
+ REQ_SCR_HBLINE
+ Scroll horizontally one field width backward.
+
+ REQ_SCR_HFHALF
+ Scroll horizontally one half field width forward.
+
+ REQ_SCR_HBHALF
+ Scroll horizontally one half field width backward.
+
+ For scrolling purposes, a page of a field is the height of its visible
+ part.
+
+ Editing Requests
+
+ When you pass the forms driver an ASCII character, it is treated as a
+ request to add the character to the field's data buffer. Whether this
+ is an insertion or a replacement depends on the field's edit mode
+ (insertion is the default.
+
+ The following requests support editing the field and changing the edit
+ mode:
+
+ REQ_INS_MODE
+ Set insertion mode.
+
+ REQ_OVL_MODE
+ Set overlay mode.
+
+ REQ_NEW_LINE
+ New line request (see below for explanation).
+
+ REQ_INS_CHAR
+ Insert space at character location.
+
+ REQ_INS_LINE
+ Insert blank line at character location.
+
+ REQ_DEL_CHAR
+ Delete character at cursor.
+
+ REQ_DEL_PREV
+ Delete previous word at cursor.
+
+ REQ_DEL_LINE
+ Delete line at cursor.
+
+ REQ_DEL_WORD
+ Delete word at cursor.
+
+ REQ_CLR_EOL
+ Clear to end of line.
+
+ REQ_CLR_EOF
+ Clear to end of field.
+
+ REQ_CLEAR_FIELD
+ Clear entire field.
+
+ The behavior of the REQ_NEW_LINE and REQ_DEL_PREV requests is
+ complicated and partly controlled by a pair of forms options. The
+ special cases are triggered when the cursor is at the beginning of a
+ field, or on the last line of the field.
+
+ First, we consider REQ_NEW_LINE:
+
+ The normal behavior of REQ_NEW_LINE in insert mode is to break the
+ current line at the position of the edit cursor, inserting the portion
+ of the current line after the cursor as a new line following the
+ current and moving the cursor to the beginning of that new line (you
+ may think of this as inserting a newline in the field buffer).
+
+ The normal behavior of REQ_NEW_LINE in overlay mode is to clear the
+ current line from the position of the edit cursor to end of line. The
+ cursor is then moved to the beginning of the next line.
+
+ However, REQ_NEW_LINE at the beginning of a field, or on the last line
+ of a field, instead does a REQ_NEXT_FIELD. O_NL_OVERLOAD option is
+ off, this special action is disabled.
+
+ Now, let us consider REQ_DEL_PREV:
+
+ The normal behavior of REQ_DEL_PREV is to delete the previous
+ character. If insert mode is on, and the cursor is at the start of a
+ line, and the text on that line will fit on the previous one, it
+ instead appends the contents of the current line to the previous one
+ and deletes the current line (you may think of this as deleting a
+ newline from the field buffer).
+
+ However, REQ_DEL_PREV at the beginning of a field is instead treated
+ as a REQ_PREV_FIELD.
+
+ If the O_BS_OVERLOAD option is off, this special action is disabled
+ and the forms driver just returns E_REQUEST_DENIED.
+
+ See Form Options for discussion of how to set and clear the overload
+ options.
+
+ Order Requests
+
+ If the type of your field is ordered, and has associated functions for
+ getting the next and previous values of the type from a given value,
+ there are requests that can fetch that value into the field buffer:
+
+ REQ_NEXT_CHOICE
+ Place the successor value of the current value in the buffer.
+
+ REQ_PREV_CHOICE
+ Place the predecessor value of the current value in the buffer.
+
+ Of the built-in field types, only TYPE_ENUM has built-in successor and
+ predecessor functions. When you define a field type of your own (see
+ Custom Validation Types), you can associate our own ordering
+ functions.
+
+ Application Commands
+
+ Form requests are represented as integers above the curses value
+ greater than KEY_MAX and less than or equal to the constant
+ MAX_COMMAND. If your input-virtualization routine returns a value
+ above MAX_COMMAND, the forms driver will ignore it.
+
+Field Change Hooks
+
+ It is possible to set function hooks to be executed whenever the
+ current field or form changes. Here are the functions that support
+ this:
+typedef void (*HOOK)(); /* pointer to function returning void */
+
+int set_form_init(FORM *form, /* form to alter */
+ HOOK hook); /* initialization hook */
+
+HOOK form_init(FORM *form); /* form to query */
+
+int set_form_term(FORM *form, /* form to alter */
+ HOOK hook); /* termination hook */
+
+HOOK form_term(FORM *form); /* form to query */
+
+int set_field_init(FORM *form, /* form to alter */
+ HOOK hook); /* initialization hook */
+
+HOOK field_init(FORM *form); /* form to query */
+
+int set_field_term(FORM *form, /* form to alter */
+ HOOK hook); /* termination hook */
+
+HOOK field_term(FORM *form); /* form to query */
+
+ These functions allow you to either set or query four different hooks.
+ In each of the set functions, the second argument should be the
+ address of a hook function. These functions differ only in the timing
+ of the hook call.
+
+ form_init
+ This hook is called when the form is posted; also, just after
+ each page change operation.
+
+ field_init
+ This hook is called when the form is posted; also, just after
+ each field change
+
+ field_term
+ This hook is called just after field validation; that is, just
+ before the field is altered. It is also called when the form is
+ unposted.
+
+ form_term
+ This hook is called when the form is unposted; also, just
+ before each page change operation.
+
+ Calls to these hooks may be triggered
+ 1. When user editing requests are processed by the forms driver
+ 2. When the current page is changed by set_current_field() call
+ 3. When the current field is changed by a set_form_page() call
+
+ See Field Change Commands for discussion of the latter two cases.
+
+ You can set a default hook for all fields by passing one of the set
+ functions a NULL first argument.
+
+ You can disable any of these hooks by (re)setting them to NULL, the
+ default value.
+
+Field Change Commands
+
+ Normally, navigation through the form will be driven by the user's
+ input requests. But sometimes it is useful to be able to move the
+ focus for editing and viewing under control of your application, or
+ ask which field it currently is in. The following functions help you
+ accomplish this:
+int set_current_field(FORM *form, /* form to alter */
+ FIELD *field); /* field to shift to */
+
+FIELD *current_field(FORM *form); /* form to query */
+
+int field_index(FORM *form, /* form to query */
+ FIELD *field); /* field to get index of */
+
+ The function field_index() returns the index of the given field in the
+ given form's field array (the array passed to new_form() or
+ set_form_fields()).
+
+ The initial current field of a form is the first active field on the
+ first page. The function set_form_fields() resets this.
+
+ It is also possible to move around by pages.
+int set_form_page(FORM *form, /* form to alter */
+ int page); /* page to go to (0-origin) */
+
+int form_page(FORM *form); /* return form's current page */
+
+ The initial page of a newly-created form is 0. The function
+ set_form_fields() resets this.
+
+Form Options
+
+ Like fields, forms may have control option bits. They can be changed
+ or queried with these functions:
+int set_form_opts(FORM *form, /* form to alter */
+ int attr); /* attribute to set */
+
+int form_opts_on(FORM *form, /* form to alter */
+ int attr); /* attributes to turn on */
+
+int form_opts_off(FORM *form, /* form to alter */
+ int attr); /* attributes to turn off */
+
+int form_opts(FORM *form); /* form to query */
+
+ By default, all options are on. Here are the available option bits:
+
+ O_NL_OVERLOAD
+ Enable overloading of REQ_NEW_LINE as described in Editing
+ Requests. The value of this option is ignored on dynamic fields
+ that have not reached their size limit; these have no last
+ line, so the circumstances for triggering a REQ_NEXT_FIELD
+ never arise.
+
+ O_BS_OVERLOAD
+ Enable overloading of REQ_DEL_PREV as described in Editing
+ Requests.
+
+ The option values are bit-masks and can be composed with logical-or in
+ the obvious way.
+
+Custom Validation Types
+
+ The form library gives you the capability to define custom validation
+ types of your own. Further, the optional additional arguments of
+ set_field_type effectively allow you to parameterize validation types.
+ Most of the complications in the validation-type interface have to do
+ with the handling of the additional arguments within custom validation
+ functions.
+
+ Union Types
+
+ The simplest way to create a custom data type is to compose it from
+ two preexisting ones:
+FIELD *link_fieldtype(FIELDTYPE *type1,
+ FIELDTYPE *type2);
+
+ This function creates a field type that will accept any of the values
+ legal for either of its argument field types (which may be either
+ predefined or programmer-defined). If a set_field_type() call later
+ requires arguments, the new composite type expects all arguments for
+ the first type, than all arguments for the second. Order functions
+ (see Order Requests) associated with the component types will work on
+ the composite; what it does is check the validation function for the
+ first type, then for the second, to figure what type the buffer
+ contents should be treated as.
+
+ New Field Types
+
+ To create a field type from scratch, you need to specify one or both
+ of the following things:
+ * A character-validation function, to check each character as it is
+ entered.
+ * A field-validation function to be applied on exit from the field.
+
+ Here's how you do that:
+typedef int (*HOOK)(); /* pointer to function returning int */
+
+FIELDTYPE *new_fieldtype(HOOK f_validate, /* field validator */
+ HOOK c_validate) /* character validator */
+
+
+int free_fieldtype(FIELDTYPE *ftype); /* type to free */
+
+ At least one of the arguments of new_fieldtype() must be non-NULL. The
+ forms driver will automatically call the new type's validation
+ functions at appropriate points in processing a field of the new type.
+
+ The function free_fieldtype() deallocates the argument fieldtype,
+ freeing all storage associated with it.
+
+ Normally, a field validator is called when the user attempts to leave
+ the field. Its first argument is a field pointer, from which it can
+ get to field buffer 0 and test it. If the function returns TRUE, the
+ operation succeeds; if it returns FALSE, the edit cursor stays in the
+ field.
+
+ A character validator gets the character passed in as a first
+ argument. It too should return TRUE if the character is valid, FALSE
+ otherwise.
+
+ Validation Function Arguments
+
+ Your field- and character- validation functions will be passed a
+ second argument as well. This second argument is the address of a
+ structure (which we'll call a pile) built from any of the
+ field-type-specific arguments passed to set_field_type(). If no such
+ arguments are defined for the field type, this pile pointer argument
+ will be NULL.
+
+ In order to arrange for such arguments to be passed to your validation
+ functions, you must associate a small set of storage-management
+ functions with the type. The forms driver will use these to synthesize
+ a pile from the trailing arguments of each set_field_type() argument,
+ and a pointer to the pile will be passed to the validation functions.
+
+ Here is how you make the association:
+typedef char *(*PTRHOOK)(); /* pointer to function returning (char *) */
+typedef void (*VOIDHOOK)(); /* pointer to function returning void */
+
+int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */
+ PTRHOOK make_str, /* make structure from args */
+ PTRHOOK copy_str, /* make copy of structure */
+ VOIDHOOK free_str); /* free structure storage */
+
+ Here is how the storage-management hooks are used:
+
+ make_str
+ This function is called by set_field_type(). It gets one
+ argument, a va_list of the type-specific arguments passed to
+ set_field_type(). It is expected to return a pile pointer to a
+ data structure that encapsulates those arguments.
+
+ copy_str
+ This function is called by form library functions that allocate
+ new field instances. It is expected to take a pile pointer,
+ copy the pile to allocated storage, and return the address of
+ the pile copy.
+
+ free_str
+ This function is called by field- and type-deallocation
+ routines in the library. It takes a pile pointer argument, and
+ is expected to free the storage of that pile.
+
+ The make_str and copy_str functions may return NULL to signal
+ allocation failure. The library routines will that call them will
+ return error indication when this happens. Thus, your validation
+ functions should never see a NULL file pointer and need not check
+ specially for it.
+
+ Order Functions For Custom Types
+
+ Some custom field types are simply ordered in the same well-defined
+ way that TYPE_ENUM is. For such types, it is possible to define
+ successor and predecessor functions to support the REQ_NEXT_CHOICE and
+ REQ_PREV_CHOICE requests. Here's how:
+typedef int (*INTHOOK)(); /* pointer to function returning int */
+
+int set_fieldtype_arg(FIELDTYPE *type, /* type to alter */
+ INTHOOK succ, /* get successor value */
+ INTHOOK pred); /* get predecessor value */
+
+ The successor and predecessor arguments will each be passed two
+ arguments; a field pointer, and a pile pointer (as for the validation
+ functions). They are expected to use the function field_buffer() to
+ read the current value, and set_field_buffer() on buffer 0 to set the
+ next or previous value. Either hook may return TRUE to indicate
+ success (a legal next or previous value was set) or FALSE to indicate
+ failure.
+
+ Avoiding Problems
+
+ The interface for defining custom types is complicated and tricky.
+ Rather than attempting to create a custom type entirely from scratch,
+ you should start by studying the library source code for whichever of
+ the pre-defined types seems to be closest to what you want.
+
+ Use that code as a model, and evolve it towards what you really want.
+ You will avoid many problems and annoyances that way. The code in the
+ ncurses library has been specifically exempted from the package
+ copyright to support this.
+
+ If your custom type defines order functions, have do something
+ intuitive with a blank field. A useful convention is to make the
+ successor of a blank field the types minimum value, and its
+ predecessor the maximum.
diff --git a/contrib/ncurses/form/Makefile.in b/contrib/ncurses/form/Makefile.in
index 9c40f8aade58..8f3f2976e407 100644
--- a/contrib/ncurses/form/Makefile.in
+++ b/contrib/ncurses/form/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.30 2000/08/26 21:51:44 tom Exp $
+# $Id: Makefile.in,v 1.32 2001/03/24 19:53:31 tom Exp $
##############################################################################
-# Copyright (c) 1998-2000 Free Software Foundation, Inc. #
+# Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -53,6 +53,8 @@ exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
+LIBTOOL = @LIBTOOL@
+
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
INSTALL_DATA = @INSTALL_DATA@
@@ -72,6 +74,7 @@ CPPFLAGS = @CPPFLAGS@ \
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
+CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
@@ -79,7 +82,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
-LINK = $(CC)
+LINK = $(LIBTOOL) $(CC)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib -L$(libdir)
@@ -87,6 +90,8 @@ SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
+NCURSES_MAJOR = @NCURSES_MAJOR@
+NCURSES_MINOR = @NCURSES_MINOR@
REL_VERSION = @cf_cv_rel_version@
ABI_VERSION = @cf_cv_abi_version@
@@ -131,7 +136,7 @@ tags:
@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
- -rm -f core tags TAGS *~ *.ln *.atac trace
+ -rm -f core tags TAGS *~ *.i *.ln *.atac trace
clean :: mostlyclean
-rm -f $(AUTO_SRC)
diff --git a/contrib/ncurses/form/fld_arg.c b/contrib/ncurses/form/fld_arg.c
index bc816e9efd0f..dcbae596035e 100644
--- a/contrib/ncurses/form/fld_arg.c
+++ b/contrib/ncurses/form/fld_arg.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_arg.c,v 1.4 1999/05/16 17:16:04 juergen Exp $")
+MODULE_ID("$Id: fld_arg.c,v 1.5 2000/12/10 02:09:37 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -60,10 +60,12 @@ MODULE_ID("$Id: fld_arg.c,v 1.4 1999/05/16 17:16:04 juergen Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
-int set_fieldtype_arg(FIELDTYPE * typ,
- void * (* const make_arg)(va_list *),
- void * (* const copy_arg)(const void *),
- void (* const free_arg)(void *))
+NCURSES_EXPORT(int)
+set_fieldtype_arg
+ (FIELDTYPE * typ,
+ void * (* const make_arg)(va_list *),
+ void * (* const copy_arg)(const void *),
+ void (* const free_arg)(void *))
{
if ( !typ || !make_arg )
RETURN(E_BAD_ARGUMENT);
@@ -83,7 +85,8 @@ int set_fieldtype_arg(FIELDTYPE * typ,
|
| Return Values : Pointer to structure or NULL if none is defined.
+--------------------------------------------------------------------------*/
-void *field_arg(const FIELD * field)
+NCURSES_EXPORT(void *)
+field_arg (const FIELD * field)
{
return Normalize_Field(field)->arg;
}
diff --git a/contrib/ncurses/form/fld_attr.c b/contrib/ncurses/form/fld_attr.c
index 3c7d8e353c0e..cd584d048427 100644
--- a/contrib/ncurses/form/fld_attr.c
+++ b/contrib/ncurses/form/fld_attr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,14 +31,14 @@
****************************************************************************/
#include "form.priv.h"
-MODULE_ID("$Id: fld_attr.c,v 1.4 1999/05/16 17:16:30 juergen Exp $")
+MODULE_ID("$Id: fld_attr.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*----------------------------------------------------------------------------
Field-Attribute manipulation routines
--------------------------------------------------------------------------*/
/* "Template" macro to generate a function to set a fields attribute */
#define GEN_FIELD_ATTR_SET_FCT( name ) \
-int set_field_ ## name (FIELD * field, chtype attr)\
+NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
{\
int res = E_BAD_ARGUMENT;\
if ( attr==A_NORMAL || ((attr & A_ATTRIBUTES)==attr) )\
@@ -57,7 +57,7 @@ int set_field_ ## name (FIELD * field, chtype attr)\
/* "Template" macro to generate a function to get a fields attribute */
#define GEN_FIELD_ATTR_GET_FCT( name ) \
-chtype field_ ## name (const FIELD * field)\
+NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
{\
return ( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\
}
diff --git a/contrib/ncurses/form/fld_current.c b/contrib/ncurses/form/fld_current.c
index 2bf8163a43f7..b23d21ca1dc1 100644
--- a/contrib/ncurses/form/fld_current.c
+++ b/contrib/ncurses/form/fld_current.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,7 +31,7 @@
****************************************************************************/
#include "form.priv.h"
-MODULE_ID("$Id: fld_current.c,v 1.4 1999/05/16 17:16:46 juergen Exp $")
+MODULE_ID("$Id: fld_current.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,7 +46,8 @@ MODULE_ID("$Id: fld_current.c,v 1.4 1999/05/16 17:16:46 juergen Exp $")
| E_INVALID_FIELD - current field can't be left
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
-int set_current_field(FORM * form, FIELD * field)
+NCURSES_EXPORT(int)
+set_current_field (FORM * form, FIELD * field)
{
int err = E_OK;
@@ -101,7 +102,8 @@ int set_current_field(FORM * form, FIELD * field)
|
| Return Values : Pointer to the current field.
+--------------------------------------------------------------------------*/
-FIELD *current_field(const FORM * form)
+NCURSES_EXPORT(FIELD *)
+current_field (const FORM * form)
{
return Normalize_Form(form)->current;
}
@@ -116,7 +118,8 @@ FIELD *current_field(const FORM * form)
| Return Values : >= 0 : field index
| -1 : fieldpointer invalid or field not connected
+--------------------------------------------------------------------------*/
-int field_index(const FIELD * field)
+NCURSES_EXPORT(int)
+field_index (const FIELD * field)
{
return ( (field && field->form) ? field->index : -1 );
}
diff --git a/contrib/ncurses/form/fld_def.c b/contrib/ncurses/form/fld_def.c
index dd3de804688b..e12179e35d55 100644
--- a/contrib/ncurses/form/fld_def.c
+++ b/contrib/ncurses/form/fld_def.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_def.c,v 1.12 1999/05/16 17:37:48 juergen Exp $")
+MODULE_ID("$Id: fld_def.c,v 1.13 2000/12/10 02:09:38 tom Exp $")
/* this can't be readonly */
static FIELD default_field = {
@@ -63,7 +63,7 @@ static FIELD default_field = {
(char *)0 /* usrptr */
};
-FIELD *_nc_Default_Field = &default_field;
+NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -79,8 +79,9 @@ FIELD *_nc_Default_Field = &default_field;
| Return Values : Pointer to argument structure. Maybe NULL.
| In case of an error in *err an errorcounter is increased.
+--------------------------------------------------------------------------*/
-TypeArgument*
-_nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
+NCURSES_EXPORT(TypeArgument*)
+_nc_Make_Argument
+(const FIELDTYPE *typ, va_list *ap, int *err)
{
TypeArgument *res = (TypeArgument *)0;
TypeArgument *p;
@@ -121,9 +122,10 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
| Return Values : Pointer to argument structure. Maybe NULL.
| In case of an error in *err an errorcounter is increased.
+--------------------------------------------------------------------------*/
-TypeArgument*
-_nc_Copy_Argument(const FIELDTYPE *typ,
- const TypeArgument *argp, int *err)
+NCURSES_EXPORT(TypeArgument*)
+_nc_Copy_Argument
+ (const FIELDTYPE *typ,
+ const TypeArgument *argp, int *err)
{
TypeArgument *res = (TypeArgument *)0;
TypeArgument *p;
@@ -166,8 +168,9 @@ _nc_Copy_Argument(const FIELDTYPE *typ,
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void
-_nc_Free_Argument(const FIELDTYPE * typ, TypeArgument * argp)
+NCURSES_EXPORT(void)
+_nc_Free_Argument
+(const FIELDTYPE * typ, TypeArgument * argp)
{
if (!typ || !(typ->status & _HAS_ARGS))
return;
@@ -195,8 +198,9 @@ _nc_Free_Argument(const FIELDTYPE * typ, TypeArgument * argp)
| Return Values : TRUE - copy worked
| FALSE - error occured
+--------------------------------------------------------------------------*/
-bool
-_nc_Copy_Type(FIELD *dst, FIELD const *src)
+NCURSES_EXPORT(bool)
+_nc_Copy_Type
+(FIELD *dst, FIELD const *src)
{
int err = 0;
@@ -228,8 +232,8 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src)
|
| Return Values : -
+--------------------------------------------------------------------------*/
-void
-_nc_Free_Type(FIELD *field)
+NCURSES_EXPORT(void)
+_nc_Free_Type (FIELD *field)
{
assert(field);
if (field->type)
@@ -253,7 +257,9 @@ _nc_Free_Type(FIELD *field)
|
| Return Values : Pointer to the new field or NULL if failure.
+--------------------------------------------------------------------------*/
-FIELD *new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
+NCURSES_EXPORT(FIELD *)
+new_field
+(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
{
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
@@ -317,7 +323,8 @@ FIELD *new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
| E_BAD_ARGUMENT - invalid field pointer
| E_CONNECTED - field is connected
+--------------------------------------------------------------------------*/
-int free_field(FIELD * field)
+NCURSES_EXPORT(int)
+free_field (FIELD * field)
{
if (!field)
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/form/fld_dup.c b/contrib/ncurses/form/fld_dup.c
index d265f958f218..4aed77292d64 100644
--- a/contrib/ncurses/form/fld_dup.c
+++ b/contrib/ncurses/form/fld_dup.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_dup.c,v 1.4 1999/05/16 17:17:08 juergen Exp $")
+MODULE_ID("$Id: fld_dup.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -47,7 +47,8 @@ MODULE_ID("$Id: fld_dup.c,v 1.4 1999/05/16 17:17:08 juergen Exp $")
|
| Return Values : Pointer to the new field or NULL if failure
+--------------------------------------------------------------------------*/
-FIELD *dup_field(FIELD * field, int frow, int fcol)
+NCURSES_EXPORT(FIELD *)
+dup_field (FIELD * field, int frow, int fcol)
{
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
diff --git a/contrib/ncurses/form/fld_ftchoice.c b/contrib/ncurses/form/fld_ftchoice.c
index 8e7d2a9683f1..377f9abdb923 100644
--- a/contrib/ncurses/form/fld_ftchoice.c
+++ b/contrib/ncurses/form/fld_ftchoice.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_ftchoice.c,v 1.4 1999/05/16 17:17:21 juergen Exp $")
+MODULE_ID("$Id: fld_ftchoice.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,9 +46,11 @@ MODULE_ID("$Id: fld_ftchoice.c,v 1.4 1999/05/16 17:17:21 juergen Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid arguments
+--------------------------------------------------------------------------*/
-int set_fieldtype_choice(FIELDTYPE * typ,
- bool (* const next_choice) (FIELD *,const void *),
- bool (* const prev_choice) (FIELD *,const void *))
+NCURSES_EXPORT(int)
+set_fieldtype_choice
+ (FIELDTYPE * typ,
+ bool (* const next_choice) (FIELD *,const void *),
+ bool (* const prev_choice) (FIELD *,const void *))
{
if ( !typ || !next_choice || !prev_choice )
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/form/fld_ftlink.c b/contrib/ncurses/form/fld_ftlink.c
index 1c30cab244a4..87aa661a8069 100644
--- a/contrib/ncurses/form/fld_ftlink.c
+++ b/contrib/ncurses/form/fld_ftlink.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_ftlink.c,v 1.4 1999/05/16 17:17:33 juergen Exp $")
+MODULE_ID("$Id: fld_ftlink.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -48,7 +48,9 @@ MODULE_ID("$Id: fld_ftlink.c,v 1.4 1999/05/16 17:17:33 juergen Exp $")
|
| Return Values : Fieldtype pointer or NULL if error occured.
+--------------------------------------------------------------------------*/
-FIELDTYPE *link_fieldtype(FIELDTYPE * type1, FIELDTYPE * type2)
+NCURSES_EXPORT(FIELDTYPE *)
+link_fieldtype
+(FIELDTYPE * type1, FIELDTYPE * type2)
{
FIELDTYPE *nftyp = (FIELDTYPE *)0;
diff --git a/contrib/ncurses/form/fld_info.c b/contrib/ncurses/form/fld_info.c
index 98100a4f40a2..be4fd0645973 100644
--- a/contrib/ncurses/form/fld_info.c
+++ b/contrib/ncurses/form/fld_info.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_info.c,v 1.4 1999/05/16 17:17:52 juergen Exp $")
+MODULE_ID("$Id: fld_info.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -46,10 +46,12 @@ MODULE_ID("$Id: fld_info.c,v 1.4 1999/05/16 17:17:52 juergen Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid field pointer
+--------------------------------------------------------------------------*/
-int field_info(const FIELD *field,
- int *rows, int *cols,
- int *frow, int *fcol,
- int *nrow, int *nbuf)
+NCURSES_EXPORT(int)
+field_info
+ (const FIELD *field,
+ int *rows, int *cols,
+ int *frow, int *fcol,
+ int *nrow, int *nbuf)
{
if (!field)
RETURN(E_BAD_ARGUMENT);
@@ -75,8 +77,9 @@ int field_info(const FIELD *field,
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
-int dynamic_field_info(const FIELD *field,
- int *drows, int *dcols, int *maxgrow)
+NCURSES_EXPORT(int)
+dynamic_field_info
+(const FIELD *field, int *drows, int *dcols, int *maxgrow)
{
if (!field)
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/form/fld_just.c b/contrib/ncurses/form/fld_just.c
index 2a6dd38ec390..a30f2f9d0c02 100644
--- a/contrib/ncurses/form/fld_just.c
+++ b/contrib/ncurses/form/fld_just.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_just.c,v 1.5 1999/05/16 17:18:06 juergen Exp $")
+MODULE_ID("$Id: fld_just.c,v 1.6 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -44,7 +44,8 @@ MODULE_ID("$Id: fld_just.c,v 1.5 1999/05/16 17:18:06 juergen Exp $")
| E_BAD_ARGUMENT - one of the arguments was incorrect
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
-int set_field_just(FIELD * field, int just)
+NCURSES_EXPORT(int)
+set_field_just (FIELD * field, int just)
{
int res = E_BAD_ARGUMENT;
@@ -73,7 +74,8 @@ int set_field_just(FIELD * field, int just)
|
| Return Values : The justification type.
+--------------------------------------------------------------------------*/
-int field_just(const FIELD * field)
+NCURSES_EXPORT(int)
+field_just (const FIELD * field)
{
return Normalize_Field( field )->just;
}
diff --git a/contrib/ncurses/form/fld_link.c b/contrib/ncurses/form/fld_link.c
index 4352d6abf083..0b0a033068f2 100644
--- a/contrib/ncurses/form/fld_link.c
+++ b/contrib/ncurses/form/fld_link.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_link.c,v 1.4 1999/05/16 17:18:18 juergen Exp $")
+MODULE_ID("$Id: fld_link.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -48,7 +48,8 @@ MODULE_ID("$Id: fld_link.c,v 1.4 1999/05/16 17:18:18 juergen Exp $")
|
| Return Values : Pointer to the new field or NULL if failure
+--------------------------------------------------------------------------*/
-FIELD *link_field(FIELD * field, int frow, int fcol)
+NCURSES_EXPORT(FIELD *)
+link_field (FIELD * field, int frow, int fcol)
{
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
diff --git a/contrib/ncurses/form/fld_max.c b/contrib/ncurses/form/fld_max.c
index f17bcec5a478..2e5e2389b32b 100644
--- a/contrib/ncurses/form/fld_max.c
+++ b/contrib/ncurses/form/fld_max.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_max.c,v 1.4 1999/05/16 17:18:34 juergen Exp $")
+MODULE_ID("$Id: fld_max.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -44,7 +44,8 @@ MODULE_ID("$Id: fld_max.c,v 1.4 1999/05/16 17:18:34 juergen Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
-int set_max_field(FIELD *field, int maxgrow)
+NCURSES_EXPORT(int)
+set_max_field (FIELD *field, int maxgrow)
{
if (!field || (maxgrow<0))
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/form/fld_move.c b/contrib/ncurses/form/fld_move.c
index 7965d5afbea8..fc3715685cad 100644
--- a/contrib/ncurses/form/fld_move.c
+++ b/contrib/ncurses/form/fld_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_move.c,v 1.4 1999/05/16 17:38:51 juergen Exp $")
+MODULE_ID("$Id: fld_move.c,v 1.5 2000/12/10 02:09:38 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -45,7 +45,8 @@ MODULE_ID("$Id: fld_move.c,v 1.4 1999/05/16 17:38:51 juergen Exp $")
| E_BAD_ARGUMENT - invalid argument passed
| E_CONNECTED - field is connected
+--------------------------------------------------------------------------*/
-int move_field(FIELD *field, int frow, int fcol)
+NCURSES_EXPORT(int)
+move_field (FIELD *field, int frow, int fcol)
{
if ( !field || (frow<0) || (fcol<0) )
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/form/fld_newftyp.c b/contrib/ncurses/form/fld_newftyp.c
index 68b1692a2ab8..e0c8b33114c3 100644
--- a/contrib/ncurses/form/fld_newftyp.c
+++ b/contrib/ncurses/form/fld_newftyp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -32,7 +32,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fld_newftyp.c,v 1.5 1999/05/16 17:18:54 juergen Exp $")
+MODULE_ID("$Id: fld_newftyp.c,v 1.6 2000/12/10 02:09:38 tom Exp $")
static FIELDTYPE const default_fieldtype = {
0, /* status */
@@ -48,7 +48,7 @@ static FIELDTYPE const default_fieldtype = {
NULL /* enumerate previous function */
};
-const FIELDTYPE* _nc_Default_FieldType = &default_fieldtype;
+NCURSES_EXPORT_VAR(const FIELDTYPE*) _nc_Default_FieldType = &default_fieldtype;
/*---------------------------------------------------------------------------
| Facility : libnform
@@ -65,7 +65,8 @@ const FIELDTYPE* _nc_Default_FieldType = &default_fieldtype;
|
| Return Values : Fieldtype pointer or NULL if error occured
+--------------------------------------------------------------------------*/
-FIELDTYPE *new_fieldtype(
+NCURSES_EXPORT(FIELDTYPE *)
+new_fieldtype (
bool (* const field_check)(FIELD *,const void *),
bool (* const char_check) (int,const void *) )
{
@@ -102,7 +103,8 @@ FIELDTYPE *new_fieldtype(
| E_CONNECTED - there are fields referencing the type
| E_BAD_ARGUMENT - invalid fieldtype pointer
+--------------------------------------------------------------------------*/
-int free_fieldtype(FIELDTYPE *typ)
+NCURSES_EXPORT(int)
+free_fieldtype (FIELDTYPE *typ)
{
if (!typ)
RETURN(E_BAD_ARGUMENT);
diff --git a/contrib/ncurses/form/fld_opts.c b/contrib/ncurses/form/fld_opts.c
index e5cd996d06b5..19b3642af6d4 100644
--- a/contrib/ncurses/form/fld_opts.