]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 4.2 v4.2
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 1 Mar 1998 04:21:12 +0000 (23:21 -0500)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 1 Mar 1998 04:21:12 +0000 (23:21 -0500)
588 files changed:
ANNOUNCE
Ada95/Makefile.in
Ada95/README
Ada95/ada_include/Makefile.in
Ada95/ada_include/terminal_interface-curses-aux.adb
Ada95/ada_include/terminal_interface-curses-aux.ads
Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.adb [deleted file]
Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.ads [deleted file]
Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-user.adb [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types-user.ads [new file with mode: 0644]
Ada95/ada_include/terminal_interface-curses-forms-field_types.adb
Ada95/ada_include/terminal_interface-curses-forms-field_types.ads [deleted file]
Ada95/ada_include/terminal_interface-curses-forms-field_user_data.adb
Ada95/ada_include/terminal_interface-curses-forms-form_user_data.adb
Ada95/ada_include/terminal_interface-curses-forms.adb
Ada95/ada_include/terminal_interface-curses-menus-item_user_data.adb
Ada95/ada_include/terminal_interface-curses-menus-menu_user_data.adb
Ada95/ada_include/terminal_interface-curses-menus.adb
Ada95/ada_include/terminal_interface-curses-mouse.adb
Ada95/ada_include/terminal_interface-curses-panels-user_data.adb
Ada95/ada_include/terminal_interface-curses-panels.adb
Ada95/ada_include/terminal_interface-curses-text_io-aux.adb
Ada95/ada_include/terminal_interface-curses-text_io-aux.ads
Ada95/ada_include/terminal_interface-curses-text_io-complex_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-complex_io.ads
Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.ads
Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.ads
Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.ads
Ada95/ada_include/terminal_interface-curses-text_io-float_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-float_io.ads
Ada95/ada_include/terminal_interface-curses-text_io-integer_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-integer_io.ads
Ada95/ada_include/terminal_interface-curses-text_io-modular_io.adb
Ada95/ada_include/terminal_interface-curses-text_io-modular_io.ads
Ada95/ada_include/terminal_interface-curses-text_io.adb
Ada95/ada_include/terminal_interface-curses-text_io.ads
Ada95/ada_include/terminal_interface-curses.adb
Ada95/ada_include/terminal_interface.ads
Ada95/gen/Makefile.in
Ada95/gen/gen.c
Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 [new file with mode: 0644]
Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4
Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4
Ada95/gen/terminal_interface-curses-forms.ads.m4
Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4
Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4
Ada95/gen/terminal_interface-curses-menus.ads.m4
Ada95/gen/terminal_interface-curses-mouse.ads.m4
Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
Ada95/gen/terminal_interface-curses-panels.ads.m4
Ada95/gen/terminal_interface-curses.ads.m4
Ada95/html/Makefile [deleted file]
Ada95/html/curs_addch.3x.html
Ada95/html/curs_attr.3x.html
Ada95/html/curs_color.3x.html
Ada95/html/curs_getch.3x.html
Ada95/html/curs_inch.3x.html
Ada95/html/curs_kernel.3x.html
Ada95/html/curs_mouse.3x.html
Ada95/html/curs_outopts.3x.html
Ada95/html/curs_print.3x.html
Ada95/html/curs_refresh.3x.html
Ada95/html/curs_scanw.3x.html
Ada95/html/curs_termcap.3x.html
Ada95/html/curs_terminfo.3x.html
Ada95/html/define_key.3x.html [new file with mode: 0644]
Ada95/html/dft_fgbg.3x.html
Ada95/html/form.3x.html
Ada95/html/form_driver.3x.html
Ada95/html/form_field_buffer.3x.html
Ada95/html/form_field_new.3x.html
Ada95/html/form_field_opts.3x.html
Ada95/html/form_field_userptr.3x.html
Ada95/html/form_field_validation.3x.html
Ada95/html/form_fieldtype.3x.html
Ada95/html/form_userptr.3x.html
Ada95/html/index.html
Ada95/html/keyok.3x.html [new file with mode: 0644]
Ada95/html/menu.3x.html
Ada95/html/menu_driver.3x.html
Ada95/html/menu_format.3x.html
Ada95/html/menu_pattern.3x.html
Ada95/html/menu_post.3x.html
Ada95/html/menu_userptr.3x.html
Ada95/html/mitem_new.3x.html
Ada95/html/mitem_userptr.3x.html
Ada95/html/mitem_value.3x.html
Ada95/html/ncurses.3x.html
Ada95/html/panel.3x.html
Ada95/html/resizeterm.3x.html
Ada95/html/table.html
Ada95/html/terminal_interface-curses-forms-choice_field_types_s.html [deleted file]
Ada95/html/terminal_interface-curses-forms-field_types-alpha_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-alphanumeric_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-enumeration-ada_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-enumeration_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-intfield_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-ipv4_address_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-numeric_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-regexp_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-user-choice_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types-user_s.html [new file with mode: 0644]
Ada95/html/terminal_interface-curses-forms-field_types_s.html
Ada95/html/terminal_interface-curses-forms-field_user_data_s.html
Ada95/html/terminal_interface-curses-forms-form_user_data_s.html
Ada95/html/terminal_interface-curses-forms_s.html
Ada95/html/terminal_interface-curses-menus-item_user_data_s.html
Ada95/html/terminal_interface-curses-menus-menu_user_data_s.html
Ada95/html/terminal_interface-curses-menus_s.html
Ada95/html/terminal_interface-curses-mouse_s.html
Ada95/html/terminal_interface-curses-panels-user_data_s.html
Ada95/html/terminal_interface-curses-panels_s.html
Ada95/html/terminal_interface-curses-text_io-complex_io_s.html
Ada95/html/terminal_interface-curses-text_io-decimal_io_s.html
Ada95/html/terminal_interface-curses-text_io-enumeration_io_s.html
Ada95/html/terminal_interface-curses-text_io-fixed_io_s.html
Ada95/html/terminal_interface-curses-text_io-float_io_s.html
Ada95/html/terminal_interface-curses-text_io-integer_io_s.html
Ada95/html/terminal_interface-curses-text_io-modular_io_s.html
Ada95/html/terminal_interface-curses-text_io_s.html
Ada95/html/terminal_interface-curses_s.html
Ada95/html/terminal_interface_s.html
Ada95/html/wresize.3x.html
Ada95/samples/Makefile.in
Ada95/samples/explain.txt
Ada95/samples/rain.adb [new file with mode: 0644]
Ada95/samples/rain.ads [new file with mode: 0644]
Ada95/samples/sample-curses_demo-attributes.adb
Ada95/samples/sample-curses_demo-attributes.ads
Ada95/samples/sample-curses_demo-mouse.adb
Ada95/samples/sample-curses_demo-mouse.ads
Ada95/samples/sample-curses_demo.adb
Ada95/samples/sample-curses_demo.ads
Ada95/samples/sample-explanation.adb
Ada95/samples/sample-explanation.ads
Ada95/samples/sample-form_demo-aux.adb
Ada95/samples/sample-form_demo-aux.ads
Ada95/samples/sample-form_demo-handler.adb
Ada95/samples/sample-form_demo-handler.ads
Ada95/samples/sample-form_demo.adb
Ada95/samples/sample-form_demo.ads
Ada95/samples/sample-function_key_setting.adb
Ada95/samples/sample-function_key_setting.ads
Ada95/samples/sample-header_handler.adb
Ada95/samples/sample-header_handler.ads
Ada95/samples/sample-helpers.adb
Ada95/samples/sample-helpers.ads
Ada95/samples/sample-keyboard_handler.adb
Ada95/samples/sample-keyboard_handler.ads
Ada95/samples/sample-manifest.ads
Ada95/samples/sample-menu_demo-aux.adb
Ada95/samples/sample-menu_demo-aux.ads
Ada95/samples/sample-menu_demo-handler.adb
Ada95/samples/sample-menu_demo-handler.ads
Ada95/samples/sample-menu_demo.adb
Ada95/samples/sample-menu_demo.ads
Ada95/samples/sample-my_field_type.adb
Ada95/samples/sample-my_field_type.ads
Ada95/samples/sample-text_io_demo.adb
Ada95/samples/sample-text_io_demo.ads
Ada95/samples/sample.adb
Ada95/samples/sample.ads
Ada95/samples/status.adb [new file with mode: 0644]
Ada95/samples/status.ads [new file with mode: 0644]
Ada95/samples/tour.adb
Ada95/samples/tour.ads
INSTALL
MANIFEST
Makefile.glibc
Makefile.in
NEWS
README
TO-DO
aclocal.m4
announce.html
announce.html.in
c++/Makefile.in
c++/NEWS
c++/PROBLEMS
c++/README-first
c++/cursesapp.cc [new file with mode: 0644]
c++/cursesapp.h [new file with mode: 0644]
c++/cursesf.cc [new file with mode: 0644]
c++/cursesf.h [new file with mode: 0644]
c++/cursesm.cc
c++/cursesm.h
c++/cursesmain.cc [new file with mode: 0644]
c++/cursesp.cc
c++/cursesp.h
c++/cursesw.cc
c++/cursesw.h
c++/cursslk.cc [new file with mode: 0644]
c++/cursslk.h [new file with mode: 0644]
c++/demo.cc
c++/edit_cfg.sh [new file with mode: 0755]
c++/etip.h [deleted file]
c++/etip.h.in [new file with mode: 0644]
c++/headers [new file with mode: 0644]
c++/internal.h
c++/modules
config.guess [new file with mode: 0755]
config.sub [new file with mode: 0755]
configure
configure.in
dist.mk
form/Makefile.in
form/READ.ME
form/fld_arg.c [new file with mode: 0644]
form/fld_attr.c [new file with mode: 0644]
form/fld_current.c [new file with mode: 0644]
form/fld_def.c
form/fld_dup.c [new file with mode: 0644]
form/fld_ftchoice.c [new file with mode: 0644]
form/fld_ftlink.c [new file with mode: 0644]
form/fld_info.c [new file with mode: 0644]
form/fld_just.c [new file with mode: 0644]
form/fld_link.c [new file with mode: 0644]
form/fld_max.c [new file with mode: 0644]
form/fld_move.c [new file with mode: 0644]
form/fld_newftyp.c [new file with mode: 0644]
form/fld_opts.c [new file with mode: 0644]
form/fld_pad.c [new file with mode: 0644]
form/fld_page.c [new file with mode: 0644]
form/fld_stat.c
form/fld_type.c
form/fld_user.c
form/form.h
form/form.priv.h
form/frm_adabind.c
form/frm_cursor.c [new file with mode: 0644]
form/frm_data.c
form/frm_def.c
form/frm_driver.c
form/frm_hook.c
form/frm_opts.c
form/frm_page.c [new file with mode: 0644]
form/frm_post.c [new file with mode: 0644]
form/frm_req_name.c
form/frm_scale.c [new file with mode: 0644]
form/frm_sub.c [new file with mode: 0644]
form/frm_user.c
form/frm_win.c
form/fty_alnum.c
form/fty_alpha.c
form/fty_enum.c
form/fty_int.c
form/fty_num.c
form/fty_regex.c
form/headers
form/llib-lform
form/modules
include/Caps
include/MKparametrized.sh
include/MKterm.h.awk.in
include/Makefile.in
include/capdefaults.c
include/config_h.in [deleted file]
include/curses.h.in
include/edit_cfg.sh
include/headers
include/nc_alloc.h
include/nc_panel.h [new file with mode: 0644]
include/ncurses_cfg.hin [new file with mode: 0644]
include/term_entry.h
include/termcap.h.in
include/tic.h
include/unctrl.h.in
install-sh
man/Makefile.in
man/curs_addch.3x
man/curs_attr.3x
man/curs_color.3x
man/curs_getch.3x
man/curs_inch.3x
man/curs_inchstr.3x
man/curs_inopts.3x
man/curs_kernel.3x
man/curs_mouse.3x
man/curs_outopts.3x
man/curs_print.3x
man/curs_refresh.3x
man/curs_scanw.3x
man/curs_termcap.3x
man/curs_terminfo.3x
man/define_key.3x [new file with mode: 0644]
man/dft_fgbg.3x
man/form.3x
man/form_driver.3x
man/form_field_buffer.3x
man/form_field_new.3x
man/form_field_opts.3x
man/form_field_userptr.3x
man/form_field_validation.3x
man/form_fieldtype.3x
man/form_userptr.3x
man/infocmp.1m
man/keyok.3x [new file with mode: 0644]
man/make_sed.sh [new file with mode: 0755]
man/man_db.renames
man/menu.3x
man/menu_driver.3x
man/menu_format.3x
man/menu_pattern.3x
man/menu_post.3x
man/menu_userptr.3x
man/mitem_new.3x
man/mitem_userptr.3x
man/mitem_value.3x
man/ncurses.3x
man/panel.3x
man/resizeterm.3x
man/term.5
man/term.7
man/terminfo.head
man/terminfo.tail
man/tic.1m
man/toe.1m
man/tset.1
man/wresize.3x
menu/Makefile.in
menu/READ.ME
menu/eti.h
menu/headers
menu/llib-lmenu
menu/m_adabind.c
menu/m_attribs.c
menu/m_cursor.c
menu/m_driver.c
menu/m_format.c
menu/m_global.c
menu/m_hook.c
menu/m_item_cur.c
menu/m_item_nam.c
menu/m_item_new.c
menu/m_item_opt.c
menu/m_item_top.c [new file with mode: 0644]
menu/m_item_use.c
menu/m_item_val.c
menu/m_item_vis.c
menu/m_items.c
menu/m_new.c
menu/m_opts.c
menu/m_pad.c [new file with mode: 0644]
menu/m_pattern.c [new file with mode: 0644]
menu/m_post.c
menu/m_req_name.c
menu/m_scale.c [new file with mode: 0644]
menu/m_spacing.c
menu/m_sub.c [new file with mode: 0644]
menu/m_userptr.c
menu/m_win.c
menu/menu.h
menu/menu.priv.h
menu/mf_common.h
menu/modules
misc/Makefile.in
misc/emx.src [new file with mode: 0644]
misc/hackguide.doc
misc/hackguide.html
misc/makellib
misc/ncurses-intro.doc
misc/ncurses-intro.html
misc/run_tic.sh
misc/shlib
misc/tdlint
misc/terminfo.src
mk-0th.awk
mk-1st.awk
mk-2nd.awk
mkinstalldirs
ncurses.lsm [deleted file]
ncurses/MKcaptab.awk
ncurses/MKexpanded.sh
ncurses/MKkeyname.awk
ncurses/MKkeys.awk [deleted file]
ncurses/MKlib_gen.sh
ncurses/MKnames.awk
ncurses/MKunctrl.awk
ncurses/Makefile.in
ncurses/SigAction.h
ncurses/alloc_entry.c
ncurses/captoinfo.c
ncurses/comp_error.c
ncurses/comp_expand.c [new file with mode: 0644]
ncurses/comp_hash.c
ncurses/comp_parse.c
ncurses/comp_scan.c
ncurses/curses.priv.h
ncurses/define_key.c [new file with mode: 0644]
ncurses/fifo_defs.h [new file with mode: 0644]
ncurses/hardscroll.c
ncurses/hashmap.c
ncurses/keyok.c [new file with mode: 0644]
ncurses/keys.list
ncurses/lib_acs.c
ncurses/lib_adabind.c
ncurses/lib_addch.c
ncurses/lib_addstr.c
ncurses/lib_baudrate.c
ncurses/lib_beep.c
ncurses/lib_bkgd.c
ncurses/lib_box.c
ncurses/lib_chgat.c [new file with mode: 0644]
ncurses/lib_clear.c
ncurses/lib_clearok.c [new file with mode: 0644]
ncurses/lib_clrbot.c
ncurses/lib_clreol.c
ncurses/lib_color.c
ncurses/lib_cur_term.c [new file with mode: 0644]
ncurses/lib_data.c
ncurses/lib_delch.c
ncurses/lib_delwin.c
ncurses/lib_dft_fgbg.c
ncurses/lib_doupdate.c
ncurses/lib_echo.c [new file with mode: 0644]
ncurses/lib_endwin.c
ncurses/lib_erase.c
ncurses/lib_flash.c [new file with mode: 0644]
ncurses/lib_freeall.c
ncurses/lib_getch.c
ncurses/lib_getstr.c
ncurses/lib_hline.c [new file with mode: 0644]
ncurses/lib_immedok.c [new file with mode: 0644]
ncurses/lib_inchstr.c
ncurses/lib_initscr.c
ncurses/lib_insch.c
ncurses/lib_insdel.c
ncurses/lib_insstr.c
ncurses/lib_instr.c
ncurses/lib_isendwin.c
ncurses/lib_kernel.c
ncurses/lib_leaveok.c [new file with mode: 0644]
ncurses/lib_longname.c
ncurses/lib_mouse.c
ncurses/lib_move.c
ncurses/lib_mvcur.c
ncurses/lib_mvwin.c
ncurses/lib_napms.c [new file with mode: 0644]
ncurses/lib_newterm.c
ncurses/lib_newwin.c
ncurses/lib_nl.c [new file with mode: 0644]
ncurses/lib_options.c
ncurses/lib_overlay.c
ncurses/lib_pad.c
ncurses/lib_print.c
ncurses/lib_printw.c
ncurses/lib_raw.c
ncurses/lib_redrawln.c [new file with mode: 0644]
ncurses/lib_refresh.c
ncurses/lib_restart.c
ncurses/lib_scanw.c
ncurses/lib_screen.c
ncurses/lib_scroll.c
ncurses/lib_scrollok.c [new file with mode: 0644]
ncurses/lib_scrreg.c
ncurses/lib_set_term.c
ncurses/lib_setup.c
ncurses/lib_slk.c
ncurses/lib_slkatrof.c [new file with mode: 0644]
ncurses/lib_slkatron.c [new file with mode: 0644]
ncurses/lib_slkatrset.c [new file with mode: 0644]
ncurses/lib_slkattr.c [new file with mode: 0644]
ncurses/lib_slkclear.c [new file with mode: 0644]
ncurses/lib_slkinit.c [new file with mode: 0644]
ncurses/lib_slklab.c [new file with mode: 0644]
ncurses/lib_slkrefr.c [new file with mode: 0644]
ncurses/lib_slkset.c [new file with mode: 0644]
ncurses/lib_slktouch.c [new file with mode: 0644]
ncurses/lib_termcap.c
ncurses/lib_ti.c
ncurses/lib_touch.c
ncurses/lib_tparm.c
ncurses/lib_tputs.c
ncurses/lib_trace.c
ncurses/lib_traceatr.c
ncurses/lib_tracechr.c
ncurses/lib_tracedmp.c
ncurses/lib_tracemse.c
ncurses/lib_tstp.c
ncurses/lib_twait.c
ncurses/lib_ungetch.c [new file with mode: 0644]
ncurses/lib_vidattr.c
ncurses/lib_vline.c [new file with mode: 0644]
ncurses/lib_wattroff.c [new file with mode: 0644]
ncurses/lib_wattron.c [new file with mode: 0644]
ncurses/lib_window.c
ncurses/llib-lncurses
ncurses/make_keys.c [new file with mode: 0644]
ncurses/modules
ncurses/name_match.c [new file with mode: 0644]
ncurses/nc_panel.c [new file with mode: 0644]
ncurses/parse_entry.c
ncurses/read_entry.c
ncurses/read_termcap.c
ncurses/resizeterm.c
ncurses/safe_sprintf.c [new file with mode: 0644]
ncurses/sigaction.c
ncurses/softscroll.c [new file with mode: 0644]
ncurses/trace_buf.c [new file with mode: 0644]
ncurses/tries.c [new file with mode: 0644]
ncurses/wresize.c
ncurses/write_entry.c
panel/Makefile.in
panel/headers
panel/llib-lpanel
panel/modules
panel/p_above.c [new file with mode: 0644]
panel/p_below.c [new file with mode: 0644]
panel/p_bottom.c [new file with mode: 0644]
panel/p_delete.c [new file with mode: 0644]
panel/p_hidden.c [new file with mode: 0644]
panel/p_hide.c [new file with mode: 0644]
panel/p_move.c [new file with mode: 0644]
panel/p_new.c [new file with mode: 0644]
panel/p_replace.c [new file with mode: 0644]
panel/p_show.c [new file with mode: 0644]
panel/p_top.c [new file with mode: 0644]
panel/p_update.c [new file with mode: 0644]
panel/p_user.c [new file with mode: 0644]
panel/p_win.c [new file with mode: 0644]
panel/panel.c
panel/panel.h
panel/panel.priv.h
progs/Makefile.in
progs/capconvert
progs/clear.c
progs/dump_entry.c
progs/dump_entry.h
progs/infocmp.c
progs/modules
progs/progs.priv.h
progs/tic.c
progs/toe.c
progs/tput.c
progs/tset.c
shlib-versions [new file with mode: 0644]
sysdeps/unix/sysv/linux/alpha/configure [new file with mode: 0755]
sysdeps/unix/sysv/linux/configure [changed mode: 0644->0755]
sysdeps/unix/sysv/linux/edit_man.sh [changed mode: 0644->0755]
sysdeps/unix/sysv/linux/run_tic.sh
tack/Makefile.in [new file with mode: 0644]
tack/modules [new file with mode: 0644]
tar-copy.sh [new file with mode: 0755]
test/Makefile.in
test/bs.c
test/configure.in
test/firework.c
test/firstlast.c [new file with mode: 0644]
test/gdc.c
test/hanoi.c
test/hashtest.c
test/keynames.c [new file with mode: 0644]
test/knight.c
test/lrtest.c
test/modules
test/ncurses.c
test/ncurses_tst.hin [new file with mode: 0644]
test/newdemo.c
test/rain.c
test/tclock.c
test/test.priv.h
test/testaddch.c [new file with mode: 0644]
test/testcurs.c
test/testscanw.c [new file with mode: 0644]
test/view.c
test/worm.c
test/xmas.c

index 95ae5be25603f8da267c560fe068c19ceeb7df22..3383dedd993ffd346059f69868e163dbfb7a4ed4 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-                            Announcing ncurses 4.1
+                            Announcing ncurses 4.2
                                        
    The ncurses (new curses) library is a freeware emulation of System V
    Release 4.0 curses. It uses terminfo format, supports pads and color
    tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full
    manual pages are provided for the library and tools.
    
-   The ncurses distribution is available via anonymous FTP at:
-   [1]ftp://ftp.clark.net/pub/dickey/ncurses. and
-   [2]ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses. It is also carried on
-   the GNU distribution site at [3]ftp://prep.ai.mit.edu/pub/gnu.
+   The ncurses distribution is available via anonymous FTP at the GNU
+   distribution site [1]ftp://prep.ai.mit.edu/pub/gnu. It is also
+   available at [2]ftp://ftp.clark.net/pub/dickey/ncurses.
    
                               Features of ncurses
                                        
-   The ncurses package is fully compatible with SVr4 curses:
+   The ncurses package is fully compatible with SVr4 (System V Release 4)
+   curses:
    
      * All 257 of the SVr4 calls have been implemented (and are
        documented).
      * Full support for SVr4 curses features including keyboard mapping,
        color, forms-drawing with ACS characters, and automatic
        recognition of keypad and function keys.
-     * An emulation of the System V Release 4 panels library, supporting
-       a stack of windows with backing store, is included.
-     * An emulation of the System V Release 4 menus library, supporting a
-       uniform but flexible interface for menu programming, is included.
-     * An emulation of the System V Release 4 form library, supporting
-       data collection through on-screen forms, is included.
+     * An emulation of the SVr4 panels library, supporting a stack of
+       windows with backing store, is included.
+     * An emulation of the SVr4 menus library, supporting a uniform but
+       flexible interface for menu programming, is included.
+     * An emulation of the SVr4 form library, supporting data collection
+       through on-screen forms, is included.
      * Binary terminfo entries generated by the ncurses tic(1)
        implementation are bit-for-bit-compatible with the entry format
        SVr4 curses uses.
        capability.
      * (PC-clone boxes only) Support for access to the IBM PC ROM
        characters 0-32 through the highlight A_ALTCHARSET.
+     * Ada95 and C++ bindings.
      * Support for mouse event reporting under xterm.
+     * Extended mouse support via Alessandro Rubini's gpm package.
      * The function wresize() allows you to resize windows, preserving
        their data.
+     * The function use_default_colors() allows you to use the terminal's
+       default colors for the default color pair, achieving the effect of
+       transparent colors.
+     * The functions keyok() and define_key() allow you to better control
+       the use of function keys, e.g., disabling the ncurses KEY_MOUSE,
+       or by defining more than one control sequence to map to a given
+       key code.
+     * Support for 16-color terminals, such as aixterm and XFree86 xterm.
      * Better cursor-movement optimization. The package now features a
        cursor-local-movement computation more efficient than either BSD's
        or System V's.
    including:
    
    ded
-          directory-editor [4]ftp://ftp.clark.net/pub/dickey/ded.
+          directory-editor [3]ftp://ftp.clark.net/pub/dickey/ded.
           
    dialog
           the underlying application used in Slackware's setup, and the
    lynx-2.7
           the character-screen WWW browser
           
+   Midnight Commander 4.1
+          file manager
+          
+   mutt 0.88
+          mail utility
+          
    ncftp 2.0
           file-transfer utility
           
           terminal emulator
           
    tin-unoff
-          tin (unofficial) newsreader, supporting color, MIME
-          [5]ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff.
+          tin 1.4 newsreader, supporting color, MIME
+          [4]ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff.
           
    vile
-          vi-like-emacs [6]ftp://ftp.clark.net/pub/dickey/vile.
+          vi-like-emacs [5]ftp://ftp.clark.net/pub/dickey/vile.
           
    The ncurses distribution includes a selection of test programs
    (including a few games).
    
 Who's Who and What's What
 
-   The original maintainer of ncurses is [7]Zeyd Ben-Halim.
-   Unfortunately, he can only work on the package part time. As a result,
-   since 1.8.1, much of the enhancement work and documentation has been
-   done by [8]Eric S. Raymond. The current primary maintainers are
-   [9]Thomas Dickey and [10]Juergen Pfeifer.
-   
-   There is an ncurses mailing list. It is a majordomo list; to join,
-   write to ncurses-request@mailgate.bsdi.com with a message containing
-   the line:
-
+   The original developers of ncurses are [6]Zeyd Ben-Halim and [7]Eric
+   S. Raymond. Ongoing work is being done by [8]Thomas Dickey and
+   [9]JĂĽrgen Pfeifer. [10]Florian La Roche acts as the maintainer for the
+   Free Software Foundation, which holds the copyright on ncurses.
+   Contact the current maintainers at [11]bug-ncurses@gnu.org.
+   
+   To join the ncurses mailing list, please write email to
+   bug-ncurses-request@gnu.org containing the line:
              subscribe <name>@<host.domain>
 
    This list is open to anyone interested in helping with the development
    and testing of this package.
    
    Beta versions of ncurses and patches to the current release are made
-   available at [11]ftp://ftp.clark.net/pub/dickey/ncurses.
+   available at [12]ftp://ftp.clark.net/pub/dickey/ncurses.
    
 Future Plans
 
-     * Extended mouse support via Alessandro Rubini's gpm package.
      * Extended-level XPG4 conformance, with internationalization
        support.
      * Ports to more systems, including DOS and Windows.
@@ -199,33 +212,28 @@ Future Plans
    We need people to help with these projects. If you are interested in
    working on them, please join the ncurses list.
    
-The terminfo/termcap Database
-
-   The distribution includes and uses a copy of the terminfo-format
-   terminal description file maintained by Eric Raymond. You can download
-   either the [12]termcap or [13]terminfo versions of the terminal-type
-   database from Eric's ncurses page,
-   [14]http://www.ccil.org/~esr/ncurses.html.
-   
 Other Related Resources
 
+   The distribution includes and uses a version of the terminfo-format
+   terminal description file maintained by Eric Raymond.
+   [13]http://earthspace.net/~esr/terminfo.
+   
    You can find lots of information on terminal-related topics not
-   covered in the terminfo file at [15]Richard Shuford's archive.
+   covered in the terminfo file at [14]Richard Shuford's archive.
 
 References
 
-   1. ftp://ftp.clark.net/pub/dickey/ncurses
-   2. ftp://ftp.netcom.com/pub/zm/zmbenhal/ncurses
-   3. ftp://prep.ai.mit.edu/pub/gnu
-   4. ftp://ftp.clark.net/pub/dickey/ded
-   5. ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff
-   6. ftp://ftp.clark.net/pub/dickey/vile
-   7. mailto:zmbenhal@netcom.com
-   8. http://www.ccil.org/~esr/home.html
-   9. mailto:dickey@clark.net
-  10. mailto:Juergen.Pfeifer@T-Online.de
-  11. ftp://ftp.clark.net/pub/dickey/ncurses
-  12. http://www.ccil.org/~esr/terminfo/termtypes.tc.gz
-  13. http://www.ccil.org/~esr/terminfo/termtypes.ti.gz
-  14. http://www.ccil.org/~esr/ncurses.html
-  15. http://www.cs.utk.edu/~shuford/terminal_index.html
+   1. ftp://prep.ai.mit.edu/pub/gnu
+   2. ftp://ftp.clark.net/pub/dickey/ncurses
+   3. ftp://ftp.clark.net/pub/dickey/ded
+   4. ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff
+   5. ftp://ftp.clark.net/pub/dickey/vile
+   6. mailto:zmbenhal@netcom.com
+   7. http://www.ccil.org/~esr/home.html
+   8. mailto:dickey@clark.net
+   9. mailto:Juergen.Pfeifer@T-Online.de
+  10. mailto:florian@gnu.org
+  11. mailto:bug-ncurses@gnu.org
+  12. ftp://ftp.clark.net/pub/dickey/ncurses
+  13. http://earthspace.net/~esr/terminfo
+  14. http://www.cs.utk.edu/~shuford/terminal_index.html
index f4f6a816b4c6e0543ad85bdca4afa2c619728a96..49bbb60232e9aedd183c83fa39589c236394d543 100644 (file)
@@ -1,56 +1,63 @@
-#----------------------------------------------------------------------------
-#                                                                          --
-#                            GNAT ncurses Binding                          --
-#                                  Makefile                                --
-#                                                                          --
-#  Version 00.92                                                           --
-#                                                                          --
-#  The ncurses Ada95 binding is copyrighted 1996 by                        --
-#  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
-#                                                                          --
-#  Permission is hereby granted to reproduce and distribute this           --
-#  binding by any means and for any fee, whether alone or as part          --
-#  of a larger distribution, in source or in binary form, PROVIDED         --
-#  this notice is included with any such distribution, and is not          --
-#  removed from any of its header files. Mention of ncurses and the        --
-#  author of this binding in any applications linked with it is            --
-#  highly appreciated.                                                     --
-#                                                                          --
-#  This binding comes AS IS with no warranty, implied or expressed.        --
-#----------------------------------------------------------------------------
+##############################################################################
+# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+#                                                                            #
+# Permission is hereby granted, free of charge, to any person obtaining a    #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation  #
+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the  #
+# following conditions:                                                      #
+#                                                                            #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software.                        #
+#                                                                            #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
+# DEALINGS IN THE SOFTWARE.                                                  #
+#                                                                            #
+# Except as contained in this notice, the name(s) of the above copyright     #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written               #
+# authorization.                                                             #
+##############################################################################
+#
+#  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+#
 #  Version Control
-#  $Revision: 1.3 $
+#  $Revision: 1.10 $
 #
 SHELL          = /bin/sh
 THIS           = Makefile
 
 SUBDIRS         = @ADA_SUBDIRS@
 
-all ::
+all \
+sources \
+install \
+install.libs \
+uninstall \
+uninstall.libs ::
        for d in $(SUBDIRS); do \
                (cd $$d ; $(MAKE) $@) ;\
        done
 
-clean ::
+clean \
+mostlyclean ::
        for d in $(SUBDIRS); do \
                (cd $$d ; $(MAKE) $@) ;\
        done
 
-distclean ::
-       for d in $(SUBDIRS); do \
-               (cd $$d ; $(MAKE) $@) ;\
-       done
-       rm -f Makefile
-
+distclean \
 realclean ::
        for d in $(SUBDIRS); do \
                (cd $$d ; $(MAKE) $@) ;\
        done
        rm -f Makefile
 
-mostlyclean ::
-       for d in $(SUBDIRS); do \
-               (cd $$d ; $(MAKE) $@) ;\
-       done
-
-install ::
+install.data :
+       @
index 6a5362df5d7054923dd119906c523d40805661c6..28836a2fe358b2662178370c2232d942d48331cd 100644 (file)
@@ -1,16 +1,32 @@
-The ncurses Ada95 binding is copyrighted 1996 by Juergen Pfeifer
-Email: Juergen.Pfeifer@T-Online.de
-                                                                         
-Permission is hereby granted to reproduce and distribute this
-binding by any means and for any fee, whether alone or as part 
-of a larger distribution, in source or in binary form, PROVIDED        
-this notice is included with any such distribution, and is not    
-removed from any of its header files. Mention of ncurses and the
-author of this binding in any applications linked with it is 
-highly appreciated.                
-                                                                         
-This binding comes AS IS with no warranty, implied or expressed.       
-----------------------------------------------------------------------
+-------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                         --
+--                                                                           --
+-- Permission is hereby granted, free of charge, to any person obtaining a   --
+-- copy of this software and associated documentation files (the             --
+-- "Software"), to deal in the Software without restriction, including       --
+-- without limitation the rights to use, copy, modify, merge, publish,       --
+-- distribute, distribute with modifications, sublicense, and/or sell copies --
+-- of the Software, and to permit persons to whom the Software is furnished  --
+-- to do so, subject to the following conditions:                            --
+--                                                                           --
+-- The above copyright notice and this permission notice shall be included   --
+-- in all copies or substantial portions of the Software.                    --
+--                                                                           --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
+-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
+-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
+--                                                                           --
+-- Except as contained in this notice, the name(s) of the above copyright    --
+-- holders shall not be used in advertising or otherwise to promote the      --
+-- sale, use or other dealings in this Software without prior written        --
+-- authorization.                                                            --
+-------------------------------------------------------------------------------
+
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 Caveats:
 
    This is the first delivery of this binding. It has not been
index 7cb92304aa9d152c699c1c9b8edc4a1205086ddb..3bc6c06f42c0622211914bd3257832547a6e6caa 100644 (file)
@@ -1,25 +1,35 @@
-#----------------------------------------------------------------------------
-#                                                                          --
-#                            GNAT ncurses Binding                          --
-#                                src/Makefile                              --
-#                                                                          --
-#  Version 00.92                                                           --
-#                                                                          --
-#  The ncurses Ada95 binding is copyrighted 1996 by                        --
-#  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
-#                                                                          --
-#  Permission is hereby granted to reproduce and distribute this           --
-#  binding by any means and for any fee, whether alone or as part          --
-#  of a larger distribution, in source or in binary form, PROVIDED         --
-#  this notice is included with any such distribution, and is not          --
-#  removed from any of its header files. Mention of ncurses and the        --
-#  author of this binding in any applications linked with it is            --
-#  highly appreciated.                                                     --
-#                                                                          --
-#  This binding comes AS IS with no warranty, implied or expressed.        --
-#----------------------------------------------------------------------------
+##############################################################################
+# Copyright (c) 1998 Free Software Foundation, Inc.                          #
+#                                                                            #
+# Permission is hereby granted, free of charge, to any person obtaining a    #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation  #
+# the rights to use, copy, modify, merge, publish, distribute, distribute    #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the  #
+# following conditions:                                                      #
+#                                                                            #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software.                        #
+#                                                                            #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
+# DEALINGS IN THE SOFTWARE.                                                  #
+#                                                                            #
+# Except as contained in this notice, the name(s) of the above copyright     #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written               #
+# authorization.                                                             #
+##############################################################################
+#
+#  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+#
 #  Version Control
-#  $Revision: 1.6 $
+#  $Revision: 1.13 $
 #
 .SUFFIXES:
 
@@ -34,6 +44,7 @@ libdir                = @libdir@
 includedir     = @includedir@
 datadir                = @datadir@
 ticdir         = $(datadir)/terminfo
+ADA_INCLUDE    = @ADA_INCLUDE@
 
 INSTALL                = @INSTALL@
 INSTALL_DATA   = @INSTALL_DATA@
@@ -61,52 +72,115 @@ LDFLAGS            = @LDFLAGS@ @LD_MODEL@ @LIBS@
 
 RANLIB         = @RANLIB@
 ################################################################################
-ADA             = @nc_ada_compiler@
+ADA             = @cf_ada_compiler@
 ADAFLAGS        = @ADAFLAGS@ -I. -I$(srcdir)
 
-ADAMAKE         = @nc_ada_make@
+ADAMAKE         = @cf_ada_make@
 ADAMAKEFLAGS    = 
 
 CARGS           = -cargs $(ADAFLAGS)
 LARGS           =
 
-ALIB            = @nc_ada_package@
+ALIB            = @cf_ada_package@
 ABASE           = $(ALIB)-curses
 
 ADA_OBJDIR      = ../ada_objects
 OBJDIR          = ../objects
 
-LIBALIS=$(ADA_OBJDIR)/$(ALIB).ali              \
-       $(ADA_OBJDIR)/$(ABASE)-aux.ali         \
-       $(ADA_OBJDIR)/$(ABASE).ali             \
-       $(ADA_OBJDIR)/$(ABASE)-mouse.ali       \
-       $(ADA_OBJDIR)/$(ABASE)-panels.ali      \
-       $(ADA_OBJDIR)/$(ABASE)-menus.ali       \
-       $(ADA_OBJDIR)/$(ABASE)-forms.ali       \
-       $(ADA_OBJDIR)/$(ABASE)-text_io.ali     \
+LIBALIS=$(ADA_OBJDIR)/$(ALIB).ali                                              \
+       $(ADA_OBJDIR)/$(ABASE)-aux.ali                                  \
+       $(ADA_OBJDIR)/$(ABASE).ali                                      \
+       $(ADA_OBJDIR)/$(ABASE)-mouse.ali                                \
+       $(ADA_OBJDIR)/$(ABASE)-panels.ali                               \
+       $(ADA_OBJDIR)/$(ABASE)-menus.ali                                \
+       $(ADA_OBJDIR)/$(ABASE)-forms.ali                                \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types.ali                    \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-alpha.ali              \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-alphanumeric.ali       \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-intfield.ali           \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-numeric.ali            \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-regexp.ali             \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration.ali        \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-ipv4_address.ali       \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-user.ali               \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-user-choice.ali        \
+       $(ADA_OBJDIR)/$(ABASE)-text_io.ali                              \
        $(ADA_OBJDIR)/$(ABASE)-text_io-aux.ali
 
-LIBOBJS=$(ADA_OBJDIR)/$(ALIB).o                \
-       $(ADA_OBJDIR)/$(ABASE)-aux.o           \
-       $(ADA_OBJDIR)/$(ABASE).o               \
-       $(ADA_OBJDIR)/$(ABASE)-mouse.o         \
-       $(ADA_OBJDIR)/$(ABASE)-panels.o        \
-       $(ADA_OBJDIR)/$(ABASE)-menus.o         \
-       $(ADA_OBJDIR)/$(ABASE)-forms.o         \
-       $(ADA_OBJDIR)/$(ABASE)-text_io.o       \
+# Ada Library files for generic packages. Since gnat 3.10 they are
+# also compiled
+GENALIS=$(ADA_OBJDIR)/$(ABASE)-menus-menu_user_data.ali                        \
+       $(ADA_OBJDIR)/$(ABASE)-menus-item_user_data.ali                 \
+       $(ADA_OBJDIR)/$(ABASE)-forms-form_user_data.ali                 \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_user_data.ali                \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration-ada.ali    \
+       $(ADA_OBJDIR)/$(ABASE)-panels-user_data.ali                     \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-integer_io.ali                   \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-float_io.ali                     \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-fixed_io.ali                     \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-decimal_io.ali                   \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-enumeration_io.ali               \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-modular_io.ali                   \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-complex_io.ali
+
+LIBOBJS=$(ADA_OBJDIR)/$(ALIB).o                                        \
+       $(ADA_OBJDIR)/$(ABASE)-aux.o                            \
+       $(ADA_OBJDIR)/$(ABASE).o                                \
+       $(ADA_OBJDIR)/$(ABASE)-mouse.o                          \
+       $(ADA_OBJDIR)/$(ABASE)-panels.o                         \
+       $(ADA_OBJDIR)/$(ABASE)-menus.o                          \
+       $(ADA_OBJDIR)/$(ABASE)-forms.o                          \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types.o              \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-alpha.o        \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-alphanumeric.o \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-intfield.o     \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-numeric.o      \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-regexp.o       \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration.o  \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-ipv4_address.o \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-user.o         \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-user-choice.o  \
+       $(ADA_OBJDIR)/$(ABASE)-text_io.o                        \
        $(ADA_OBJDIR)/$(ABASE)-text_io-aux.o
 
-
-all :: $(LIBALIS)
+# Ada object files for generic packages. Since gnat 3.10 they are
+# also compiled
+GENOBJS=$(ADA_OBJDIR)/$(ABASE)-menus-menu_user_data.o                  \
+       $(ADA_OBJDIR)/$(ABASE)-menus-item_user_data.o                   \
+       $(ADA_OBJDIR)/$(ABASE)-forms-form_user_data.o                   \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_user_data.o                  \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration-ada.o      \
+       $(ADA_OBJDIR)/$(ABASE)-panels-user_data.o                       \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-integer_io.o                     \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-float_io.o                       \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-fixed_io.o                       \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-decimal_io.o                     \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-enumeration_io.o                 \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-modular_io.o                     \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-complex_io.o
+
+
+all :: $(LIBALIS) @cf_compile_generics@
        @echo done
 
-clean ::
+sources :
+       @
+
+install ::
+install.libs ::
+uninstall ::
+uninstall.libs ::
+
+generics: $(GENALIS)
+       @
+
+mostlyclean ::
        rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] *.a
 
-mostlyclean :: clean
+clean :: mostlyclean
        rm -f $(LIBALIS) $(LIBOBJS)
 
-distclean :: mostlyclean
+distclean :: clean
        rm -f Makefile
 
 realclean :: distclean
@@ -184,6 +258,115 @@ $(ADA_OBJDIR)/$(ABASE)-forms.ali: $(ADA_OBJDIR)/$(ABASE)-forms.o
           rm -f $(ABASE)-forms.ali ;\
        fi
 
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types.o: \
+               $(ABASE)-forms-field_types.ads \
+               $(srcdir)/$(ABASE)-forms-field_types.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types.o
+       if [ -f $(ABASE)-forms-field_types.ali ]; then \
+          ln -f $(ABASE)-forms-field_types.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-alpha.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-alpha.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-alpha.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-alpha.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-alpha.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-alpha.o
+       if [ -f $(ABASE)-forms-field_types-alpha.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-alpha.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-alpha.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-alphanumeric.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-alphanumeric.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-alphanumeric.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-alphanumeric.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-alphanumeric.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-alphanumeric.o
+       if [ -f $(ABASE)-forms-field_types-alphanumeric.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-alphanumeric.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-alphanumeric.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-intfield.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-intfield.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-intfield.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-intfield.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-intfield.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-intfield.o
+       if [ -f $(ABASE)-forms-field_types-intfield.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-intfield.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-intfield.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-numeric.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-numeric.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-numeric.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-numeric.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-numeric.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-numeric.o
+       if [ -f $(ABASE)-forms-field_types-numeric.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-numeric.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-numeric.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-regexp.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-regexp.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-regexp.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-regexp.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-regexp.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-regexp.o
+       if [ -f $(ABASE)-forms-field_types-regexp.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-regexp.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-regexp.ali ;\
+       fi
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-enumeration.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-enumeration.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-enumeration.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration.o
+       if [ -f $(ABASE)-forms-field_types-enumeration.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-enumeration.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-enumeration.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-ipv4_address.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-ipv4_address.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-ipv4_address.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-ipv4_address.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-ipv4_address.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-ipv4_address.o
+       if [ -f $(ABASE)-forms-field_types-ipv4_address.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-ipv4_address.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-ipv4_address.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-user.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-user.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-user.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-user.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-user.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-user.o
+       if [ -f $(ABASE)-forms-field_types-user.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-user.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-user.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-user-choice.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-user-choice.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-user-choice.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-user-choice.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-user-choice.ali: $(ADA_OBJDIR)/$(ABASE)-forms-field_types-user-choice.o
+       if [ -f $(ABASE)-forms-field_types-user-choice.ali ]; then \
+          ln -f $(ABASE)-forms-field_types-user-choice.ali $@ ;\
+          rm -f $(ABASE)-forms-field_types-user-choice.ali ;\
+       fi
+
 $(ADA_OBJDIR)/$(ABASE)-text_io.o: \
                $(srcdir)/$(ABASE)-text_io.ads \
                $(srcdir)/$(ABASE)-text_io.adb $(BASEDEPS)
@@ -205,3 +388,159 @@ $(ADA_OBJDIR)/$(ABASE)-text_io-aux.ali: $(ADA_OBJDIR)/$(ABASE)-text_io-aux.o
           ln -f $(ABASE)-text_io-aux.ali $@ ;\
           rm -f $(ABASE)-text_io-aux.ali ;\
        fi
+
+$(ADA_OBJDIR)/$(ABASE)-menus-menu_user_data.o: \
+               $(ABASE)-menus-menu_user_data.ads \
+               $(srcdir)/$(ABASE)-menus-menu_user_data.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-menus-menu_user_data.adb
+
+$(ADA_OBJDIR)/$(ABASE)-menus-menu_user_data.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-menus-menu_user_data.o
+       if [ -f $(ABASE)-menus-menu_user_data.ali ]; then \
+          ln -f $(ABASE)-menus-menu_user_data.ali $@ ;\
+          rm -f $(ABASE)-menus-menu_user_data.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-menus-item_user_data.o: \
+               $(ABASE)-menus-item_user_data.ads \
+               $(srcdir)/$(ABASE)-menus-item_user_data.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-menus-item_user_data.adb
+
+$(ADA_OBJDIR)/$(ABASE)-menus-item_user_data.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-menus-item_user_data.o
+       if [ -f $(ABASE)-menus-item_user_data.ali ]; then \
+         ln -f $(ABASE)-menus-item_user_data.ali $@ ;\
+         rm -f $(ABASE)-menus-item_user_data.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-form_user_data.o: \
+               $(ABASE)-forms-form_user_data.ads \
+               $(srcdir)/$(ABASE)-forms-form_user_data.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-form_user_data.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-form_user_data.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-forms-form_user_data.o
+       if [ -f $(ABASE)-forms-form_user_data.ali ]; then \
+         ln -f $(ABASE)-forms-form_user_data.ali $@ ;\
+         rm -f $(ABASE)-forms-form_user_data.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_user_data.o: \
+               $(ABASE)-forms-field_user_data.ads \
+               $(srcdir)/$(ABASE)-forms-field_user_data.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_user_data.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_user_data.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_user_data.o
+       if [ -f $(ABASE)-forms-field_user_data.ali ]; then \
+         ln -f $(ABASE)-forms-field_user_data.ali $@ ;\
+         rm -f $(ABASE)-forms-field_user_data.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration-ada.o: \
+               $(srcdir)/$(ABASE)-forms-field_types-enumeration-ada.ads \
+               $(srcdir)/$(ABASE)-forms-field_types-enumeration-ada.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-forms-field_types-enumeration-ada.adb
+
+$(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration-ada.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-forms-field_types-enumeration-ada.o
+       if [ -f $(ABASE)-forms-field_types-enumeration-ada.ali ]; then \
+         ln -f $(ABASE)-forms-field_types-enumeration-ada.ali $@ ;\
+         rm -f $(ABASE)-forms-field_types-enumeration-ada.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-panels-user_data.o: \
+               $(ABASE)-panels-user_data.ads \
+               $(srcdir)/$(ABASE)-panels-user_data.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-panels-user_data.adb
+
+$(ADA_OBJDIR)/$(ABASE)-panels-user_data.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-panels-user_data.o
+       if [ -f $(ABASE)-panels-user_data.ali ]; then \
+         ln -f $(ABASE)-panels-user_data.ali $@ ;\
+         rm -f $(ABASE)-panels-user_data.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-integer_io.o: \
+               $(srcdir)/$(ABASE)-text_io-integer_io.ads \
+               $(srcdir)/$(ABASE)-text_io-integer_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-integer_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-integer_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-integer_io.o
+       if [ -f $(ABASE)-text_io-integer_io.ali ]; then \
+         ln -f $(ABASE)-text_io-integer_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-integer_io.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-float_io.o: \
+               $(srcdir)/$(ABASE)-text_io-float_io.ads \
+               $(srcdir)/$(ABASE)-text_io-float_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-float_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-float_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-float_io.o
+       if [ -f $(ABASE)-text_io-float_io.ali ]; then \
+         ln -f $(ABASE)-text_io-float_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-float_io.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-fixed_io.o: \
+               $(srcdir)/$(ABASE)-text_io-fixed_io.ads \
+               $(srcdir)/$(ABASE)-text_io-fixed_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-fixed_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-fixed_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-fixed_io.o
+       if [ -f $(ABASE)-text_io-fixed_io.ali ]; then \
+         ln -f $(ABASE)-text_io-fixed_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-fixed_io.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-decimal_io.o: \
+               $(srcdir)/$(ABASE)-text_io-decimal_io.ads \
+               $(srcdir)/$(ABASE)-text_io-decimal_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-decimal_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-decimal_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-decimal_io.o
+       if [ -f $(ABASE)-text_io-decimal_io.ali ]; then \
+         ln -f $(ABASE)-text_io-decimal_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-decimal_io.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-enumeration_io.o: \
+               $(srcdir)/$(ABASE)-text_io-enumeration_io.ads \
+               $(srcdir)/$(ABASE)-text_io-enumeration_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-enumeration_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-enumeration_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-enumeration_io.o
+       if [ -f $(ABASE)-text_io-enumeration_io.ali ]; then \
+         ln -f $(ABASE)-text_io-enumeration_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-enumeration_io.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-modular_io.o: \
+               $(srcdir)/$(ABASE)-text_io-modular_io.ads \
+               $(srcdir)/$(ABASE)-text_io-modular_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-modular_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-modular_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-modular_io.o
+       if [ -f $(ABASE)-text_io-modular_io.ali ]; then \
+         ln -f $(ABASE)-text_io-modular_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-modular_io.ali ;\
+       fi
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-complex_io.o: \
+               $(srcdir)/$(ABASE)-text_io-complex_io.ads \
+               $(srcdir)/$(ABASE)-text_io-complex_io.adb $(BASEDEPS)
+       $(ADA) $(ADAFLAGS) -c -o $@ $(srcdir)/$(ABASE)-text_io-complex_io.adb
+
+$(ADA_OBJDIR)/$(ABASE)-text_io-complex_io.ali: \
+       $(ADA_OBJDIR)/$(ABASE)-text_io-complex_io.o
+       if [ -f $(ABASE)-text_io-complex_io.ali ]; then \
+         ln -f $(ABASE)-text_io-complex_io.ali $@ ;\
+         rm -f $(ABASE)-text_io-complex_io.ali ;\
+       fi
index e6fac3b924cbd16f9c483a4bbc5f88bbd6fdacc7..c6827a400ec01cfe031372b1c7086f796cb3fb5f 100644 (file)
@@ -6,23 +6,37 @@
 --                                                                          --
 --                                 B O D Y                                  --
 --                                                                          --
---  Version 00.92                                                           --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
 --                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
 --                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
 --                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
 ------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 --  Version Control:
---  $Revision: 1.3 $
+--  $Revision: 1.6 $
+--  Binding Version 00.93
 ------------------------------------------------------------------------------
 package body Terminal_Interface.Curses.Aux is
    --
@@ -56,6 +70,27 @@ package body Terminal_Interface.Curses.Aux is
 
    end Fill_String;
 
+   function Fill_String (Cp : chars_ptr) return String
+   is
+      Len : Natural;
+   begin
+      if Cp /= Null_Ptr then
+         Len := Natural (Strlen (Cp));
+         if Len = 0 then
+            return "";
+         else
+            declare
+               S : String (1 .. Len);
+            begin
+               Fill_String (Cp, S);
+               return S;
+            end;
+         end if;
+      else
+         return "";
+      end if;
+   end Fill_String;
+
    procedure Eti_Exception (Code : Eti_Error)
    is
    begin
index 834ad7dc25ca313d0bcaaeacd6843771caadb6c6..1221b2e50a846f6d2a7646f4cd956dbdb979b5d4 100644 (file)
@@ -6,23 +6,37 @@
 --                                                                          --
 --                                 S P E C                                  --
 --                                                                          --
---  Version 00.92                                                           --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
 --                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
 --                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
 --                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
 ------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 --  Version Control:
---  $Revision: 1.4 $
+--  $Revision: 1.8 $
+--  Binding Version 00.93
 ------------------------------------------------------------------------------
 with System;
 with Interfaces.C;
@@ -30,6 +44,7 @@ with Interfaces.C.Strings; use Interfaces.C.Strings;
 with Unchecked_Conversion;
 
 package Terminal_Interface.Curses.Aux is
+   pragma Preelaborate (Aux);
 
    use type Interfaces.C.Int;
 
@@ -87,4 +102,7 @@ package Terminal_Interface.Curses.Aux is
    --  Fill the Str parameter with the string denoted by the chars_ptr
    --  C-Style string.
 
+   function Fill_String (Cp : chars_ptr) return String;
+   --  Same but as function.
+
 end Terminal_Interface.Curses.Aux;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.adb b/Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.adb
deleted file mode 100644 (file)
index 396287e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---              Terminal_Interface.Curses.Forms.Choice_Field_Types          --
---                                                                          --
---                                 B O D Y                                  --
---                                                                          --
---  Version 00.92                                                           --
---                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
---                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
---                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
-------------------------------------------------------------------------------
---  Version Control:
---  $Revision: 1.5 $
-------------------------------------------------------------------------------
-with Interfaces.C;
-with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-with Terminal_Interface.Curses.Forms.Field_Types;
-
---  |
---  |=====================================================================
---  | man page form_fieldtype.3x
---  |=====================================================================
---  |
-package body Terminal_Interface.Curses.Forms.Choice_Field_Types is
-
-   use type Interfaces.C.int;
-
-   package Ft is new Terminal_Interface.Curses.Forms.Field_Types
-     (User, User_Access, Field_Check, Character_Check);
-
-   type N_Check is access
-      function (Fld : Field; Info : User_Access) return Boolean;
-   pragma Convention (C, N_Check);
-
-   type P_Check is access
-      function (Fld : Field; Info : User_Access) return Boolean;
-   pragma Convention (C, P_Check);
-
-   function Nc (Fld : Field; Info : User_Access) return Boolean;
-   pragma Convention (C, Nc);
-
-   function Pc (Fld : Field; Info : User_Access) return Boolean;
-   pragma Convention (C, Pc);
-
-   function Nc (Fld : Field; Info : User_Access) return Boolean
-   is
-   begin
-      return Next_Choice (Fld, Info);
-   end Nc;
-
-   function Pc (Fld : Field; Info : User_Access) return Boolean
-   is
-   begin
-      return Prev_Choice (Fld, Info);
-   end Pc;
-   --  |
-   --  |
-   --  |
-   function Set_Choice (Ft : C_Field_Type;
-                        Nc : N_Check;
-                        Pc : P_Check) return C_Int;
-   pragma Import (C, Set_Choice, "set_fieldtype_choice");
-
-   procedure Define_Choices
-   is
-      R : Eti_Error;
-   begin
-      R := Set_Choice (Search_Type (User'Tag), Nc'Access, Pc'Access);
-      if (R /= E_OK) then
-         Eti_Exception (R);
-      end if;
-   end Define_Choices;
-
-begin
-   Define_Choices;
-end Terminal_Interface.Curses.Forms.Choice_Field_Types;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.ads b/Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.ads
deleted file mode 100644 (file)
index 24a9375..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---              Terminal_Interface.Curses.Forms.Choice_Field_Types          --
---                                                                          --
---                                 S P E C                                  --
---                                                                          --
---  Version 00.92                                                           --
---                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
---                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
---                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
-------------------------------------------------------------------------------
---  Version Control:
---  $Revision: 1.6 $
-------------------------------------------------------------------------------
---  You must instantiate this package for any user defined field type
---  to make it visible to the runtime.
---
-generic
-   type User is new Ada_Defined_Field_Type with private;
-   type User_Access is access User;
-   with function Field_Check (Fld  : Field;
-                              Info : User_Access) return Boolean;
-   with function Character_Check (Ch   : Character;
-                                  Info : User_Access) return Boolean;
-   with function Next_Choice (Fld  : Field;
-                              Info : User_Access) return Boolean;
-   with function Prev_Choice (Fld  : Field;
-                              Info : User_Access) return Boolean;
-package Terminal_Interface.Curses.Forms.Choice_Field_Types is
---
---  Nothing public.
---  But we need the body.
-    pragma Elaborate_Body;
-end Terminal_Interface.Curses.Forms.Choice_Field_Types;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.adb
new file mode 100644 (file)
index 0000000..8c12415
--- /dev/null
@@ -0,0 +1,68 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--              Terminal_Interface.Curses.Forms.Field_Types.Alpha           --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.Alpha is
+
+   use type Interfaces.C.Int;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Alpha_Field)
+   is
+      C_Alpha_Field_Type : C_Field_Type;
+      pragma Import (C, C_Alpha_Field_Type, "TYPE_ALPHA");
+
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cft  : C_Field_Type := C_Alpha_Field_Type;
+                             Arg1 : C_Int) return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
+      Res : Eti_Error;
+   begin
+      Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width));
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.Alpha;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.ads
new file mode 100644 (file)
index 0000000..e1ea066
--- /dev/null
@@ -0,0 +1,53 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--              Terminal_Interface.Curses.Forms.Field_Types.Alpha           --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+package Terminal_Interface.Curses.Forms.Field_Types.Alpha is
+   pragma Preelaborate (Alpha);
+
+   type Alpha_Field is new Field_Type
+     with record
+        Minimum_Field_Width : Natural := 0;
+     end record;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Alpha_Field);
+   pragma Inline (Set_Field_Type);
+
+end Terminal_Interface.Curses.Forms.Field_Types.Alpha;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.adb
new file mode 100644 (file)
index 0000000..6d7eb3a
--- /dev/null
@@ -0,0 +1,68 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--          Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric        --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is
+
+   use type Interfaces.C.Int;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in AlphaNumeric_Field)
+   is
+      C_AlphaNumeric_Field_Type : C_Field_Type;
+      pragma Import (C, C_AlphaNumeric_Field_Type, "TYPE_ALNUM");
+
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cft  : C_Field_Type := C_AlphaNumeric_Field_Type;
+                             Arg1 : C_Int) return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
+      Res : Eti_Error;
+   begin
+      Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width));
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads
new file mode 100644 (file)
index 0000000..20ec155
--- /dev/null
@@ -0,0 +1,53 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--          Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric        --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is
+   pragma Preelaborate (AlphaNumeric);
+
+   type AlphaNumeric_Field is new Field_Type
+     with record
+        Minimum_Field_Width : Natural := 0;
+     end record;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in AlphaNumeric_Field);
+   pragma Inline (Set_Field_Type);
+
+end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.adb
new file mode 100644 (file)
index 0000000..7ddbac4
--- /dev/null
@@ -0,0 +1,80 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--         Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada      --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Ada.Characters.Handling; use Ada.Characters.Handling;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is
+
+   function Create (Set            : Type_Set := Mixed_Case;
+                    Case_Sensitive : Boolean  := False;
+                    Must_Be_Unique : Boolean  := False)
+                    return Enumeration_Field
+   is
+      I : Enumeration_Info (T'Pos (T'Last) - T'Pos (T'First) + 1);
+      J : Positive := 1;
+   begin
+      I.Case_Sensitive := Case_Sensitive;
+      I.Match_Must_Be_Unique := Must_Be_Unique;
+
+      for E in T'Range loop
+         I.Names (J) := new String'(T'Image (T (E)));
+         --  The Image attribute defaults to upper case, so we have to handle
+         --  only the other ones...
+         if Set /= Upper_Case then
+            I.Names (J).all := To_Lower (I.Names (J).all);
+            if Set = Mixed_Case then
+               I.Names (J)(I.Names (J).all'First) :=
+                 To_Upper (I.Names (J)(I.Names (J).all'First));
+            end if;
+         end if;
+         J := J + 1;
+      end loop;
+
+      return Create (I, True);
+   end Create;
+
+   function Value (Fld : Field;
+                   Buf : Buffer_Number := Buffer_Number'First) return T
+   is
+   begin
+      return T'Value (Get_Buffer (Fld, Buf));
+   end Value;
+
+end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.ads
new file mode 100644 (file)
index 0000000..e867b9e
--- /dev/null
@@ -0,0 +1,58 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--         Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada      --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.4 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+generic
+   type T is (<>);
+
+package Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada is
+   pragma Preelaborate (Enumeration.Ada);
+
+   function Create (Set            : Type_Set := Mixed_Case;
+                    Case_Sensitive : Boolean  := False;
+                    Must_Be_Unique : Boolean  := False)
+                    return Enumeration_Field;
+
+   function Value (Fld : Field;
+                   Buf : Buffer_Number := Buffer_Number'First) return T;
+   --  Translate the content of the fields buffer - indicated by the
+   --  buffer number - into an enumeration value. If the buffer is empty
+   --  or the content is invalid, a Constraint_Error is raises.
+
+end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.adb
new file mode 100644 (file)
index 0000000..6fa8dae
--- /dev/null
@@ -0,0 +1,119 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--          Terminal_Interface.Curses.Forms.Field_Types.Enumeration         --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Ada.Unchecked_Deallocation;
+with Interfaces.C; use Interfaces.C;
+with Interfaces.C.Strings; use Interfaces.C.Strings;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
+
+   function Create (Info               : Enumeration_Info;
+                    Auto_Release_Names : Boolean := False)
+                    return Enumeration_Field
+   is
+      procedure Release_String is
+        new Ada.Unchecked_Deallocation (String,
+                                        String_Access);
+      E : Enumeration_Field;
+      L : constant size_t := 1 + size_t (Info.C);
+      S : String_Access;
+   begin
+      E.Case_Sensitive       := Info.Case_Sensitive;
+      E.Match_Must_Be_Unique := Info.Match_Must_Be_Unique;
+      E.Arr := new chars_ptr_array (size_t (1) .. L);
+      for I in 1 .. Positive (L - 1) loop
+         if Info.Names (I) = null then
+            raise Form_Exception;
+         end if;
+         E.Arr (size_t (I)) := New_String (Info.Names (I).all);
+         if Auto_Release_Names then
+            S := Info.Names (I);
+            Release_String (S);
+         end if;
+      end loop;
+      E.Arr (L) := Null_Ptr;
+      return E;
+   end Create;
+
+   procedure Release (Enum : in out Enumeration_Field)
+   is
+      I : size_t := 0;
+      P : chars_ptr;
+   begin
+      loop
+         P := Enum.Arr (I);
+         exit when P = Null_Ptr;
+         Free (P);
+         Enum.Arr (I) := Null_Ptr;
+         I := I + 1;
+      end loop;
+      Enum.Arr := null;
+   end Release;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Enumeration_Field)
+   is
+      C_Enum_Type : C_Field_Type;
+      pragma Import (C, C_Enum_Type, "TYPE_ENUM");
+
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cft  : C_Field_Type := C_Enum_Type;
+                             Arg1 : chars_ptr_array;
+                             Arg2 : C_Int;
+                             Arg3 : C_Int) return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
+      Res : Eti_Error;
+   begin
+      if Typ.Arr = null then
+         raise Form_Exception;
+      end if;
+      Res := Set_Fld_Type (Arg1 => Typ.Arr.all,
+                           Arg2 => C_Int (Boolean'Pos (Typ.Case_Sensitive)),
+                           Arg3 => C_Int (Boolean'Pos
+                                          (Typ.Match_Must_Be_Unique)));
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ, C_Choice_Router);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.Enumeration;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.ads
new file mode 100644 (file)
index 0000000..55309b6
--- /dev/null
@@ -0,0 +1,97 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--           Terminal_Interface.Curses.Forms.Field_Types.Enumeration        --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C.Strings;
+
+package Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
+   pragma Preelaborate (Enumeration);
+
+   type String_Access is access String;
+
+   --  Type_Set is used by the child package Ada
+   type Type_Set is (Lower_Case, Upper_Case, Mixed_Case);
+
+   type Enum_Array is array (Positive range <>)
+     of String_Access;
+
+   type Enumeration_Info (C : Positive) is
+      record
+         Names                : Enum_Array (1 .. C);
+         Case_Sensitive       : Boolean := False;
+         Match_Must_Be_Unique : Boolean := False;
+      end record;
+
+   type Enumeration_Field is new Field_Type with private;
+
+   function Create (Info : Enumeration_Info;
+                    Auto_Release_Names : Boolean := False)
+                    return Enumeration_Field;
+   --  Make an fieldtype from the info. Enumerations are special, because
+   --  they normally don't copy the enum values into a private store, so
+   --  we have to care for the lifetime of the info we provide.
+   --  The Auto_Release_Names flag may be used to automatically releases
+   --  the strings in the Names array of the Enumeration_Info.
+
+   function Make_Enumeration_Type (Info : Enumeration_Info;
+                                   Auto_Release_Names : Boolean := False)
+                                   return Enumeration_Field renames Create;
+
+   procedure Release (Enum : in out Enumeration_Field);
+   --  But we may want to release the field to release the memory allocated
+   --  by it internally. After that the Enumeration field is no longer usable.
+
+   --  The next type defintions are all ncurses extensions. They are typically
+   --  not available in other curses implementations.
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Enumeration_Field);
+   pragma Inline (Set_Field_Type);
+
+private
+   type CPA_Access is access Interfaces.C.Strings.chars_ptr_array;
+
+   type Enumeration_Field is new Field_Type with
+      record
+         Case_Sensitive       : Boolean := False;
+         Match_Must_Be_Unique : Boolean := False;
+         Arr                  : CPA_Access := null;
+      end record;
+
+end Terminal_Interface.Curses.Forms.Field_Types.Enumeration;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.adb
new file mode 100644 (file)
index 0000000..e574201
--- /dev/null
@@ -0,0 +1,72 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--            Terminal_Interface.Curses.Forms.Field_Types.IntField          --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.IntField is
+
+   use type Interfaces.C.Int;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Integer_Field)
+   is
+      C_Integer_Field_Type : C_Field_Type;
+      pragma Import (C, C_Integer_Field_Type, "TYPE_INTEGER");
+
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cft  : C_Field_Type := C_Integer_Field_Type;
+                             Arg1 : C_Int;
+                             Arg2 : C_Long_Int;
+                             Arg3 : C_Long_Int) return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
+      Res : Eti_Error;
+   begin
+      Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
+                           Arg2 => C_Long_Int (Typ.Lower_Limit),
+                           Arg3 => C_Long_Int (Typ.Upper_Limit));
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.IntField;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.ads
new file mode 100644 (file)
index 0000000..f7f8f2b
--- /dev/null
@@ -0,0 +1,55 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--            Terminal_Interface.Curses.Forms.Field_Types.IntField          --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+package Terminal_Interface.Curses.Forms.Field_Types.IntField is
+   pragma Preelaborate (IntField);
+
+   type Integer_Field is new Field_Type with
+      record
+         Precision   : Natural;
+         Lower_Limit : Integer;
+         Upper_Limit : Integer;
+      end record;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Integer_Field);
+   pragma Inline (Set_Field_Type);
+
+end Terminal_Interface.Curses.Forms.Field_Types.IntField;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.adb
new file mode 100644 (file)
index 0000000..1cf7987
--- /dev/null
@@ -0,0 +1,68 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--          Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address        --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is
+
+   use type Interfaces.C.Int;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Internet_V4_Address_Field)
+   is
+      C_IPV4_Field_Type : C_Field_Type;
+      pragma Import (C, C_IPV4_Field_Type, "TYPE_IPV4");
+
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cft  : C_Field_Type := C_IPV4_Field_Type)
+                             return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
+      Res : Eti_Error;
+   begin
+      Res := Set_Fld_Type;
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.ads
new file mode 100644 (file)
index 0000000..eb057f2
--- /dev/null
@@ -0,0 +1,50 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--          Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address        --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+package Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is
+   pragma Preelaborate (IPV4_Address);
+
+   type Internet_V4_Address_Field is new Field_Type with null record;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Internet_V4_Address_Field);
+   pragma Inline (Set_Field_Type);
+
+end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.adb
new file mode 100644 (file)
index 0000000..0a8ae72
--- /dev/null
@@ -0,0 +1,74 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--            Terminal_Interface.Curses.Forms.Field_Types.Numeric           --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.Numeric is
+
+   use type Interfaces.C.Int;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Numeric_Field)
+   is
+      type Double is new Interfaces.C.double;
+
+   C_Numeric_Field_Type : C_Field_Type;
+   pragma Import (C, C_Numeric_Field_Type, "TYPE_NUMERIC");
+
+   function Set_Fld_Type (F    : Field := Fld;
+                          Cft  : C_Field_Type := C_Numeric_Field_Type;
+                          Arg1 : C_Int;
+                          Arg2 : Double;
+                          Arg3 : Double) return C_Int;
+   pragma Import (C, Set_Fld_Type, "set_field_type");
+
+   Res : Eti_Error;
+   begin
+      Res := Set_Fld_Type (Arg1 => C_Int (Typ.Precision),
+                           Arg2 => Double (Typ.Lower_Limit),
+                           Arg3 => Double (Typ.Upper_Limit));
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.Numeric;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.ads
new file mode 100644 (file)
index 0000000..2884462
--- /dev/null
@@ -0,0 +1,55 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--             Terminal_Interface.Curses.Forms.Field_Types.Numeric          --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+package Terminal_Interface.Curses.Forms.Field_Types.Numeric is
+   pragma Preelaborate (Numeric);
+
+   type Numeric_Field is new Field_Type with
+      record
+         Precision   : Natural;
+         Lower_Limit : Float;
+         Upper_Limit : Float;
+      end record;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Numeric_Field);
+   pragma Inline (Set_Field_Type);
+
+end Terminal_Interface.Curses.Forms.Field_Types.Numeric;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.adb
new file mode 100644 (file)
index 0000000..e894003
--- /dev/null
@@ -0,0 +1,71 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--             Terminal_Interface.Curses.Forms.Field_Types.RegExp           --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.3 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Interfaces.C; use Interfaces.C;
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.RegExp is
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Regular_Expression_Field)
+   is
+      type Char_Ptr is access all Interfaces.C.Char;
+
+      C_Regexp_Field_Type : C_Field_Type;
+      pragma Import (C, C_Regexp_Field_Type, "TYPE_REGEXP");
+
+      function Set_Ftyp (F    : Field := Fld;
+                         Cft  : C_Field_Type := C_Regexp_Field_Type;
+                         Arg1 : Char_Ptr) return C_Int;
+      pragma Import (C, Set_Ftyp, "set_field_type");
+
+      Txt : char_array (0 .. Typ.Regular_Expression.all'Length);
+      Len : size_t;
+      Res : Eti_Error;
+   begin
+      To_C (Typ.Regular_Expression.all, Txt, Len);
+      Res := Set_Ftyp (Arg1 => Txt (Txt'First)'Access);
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+      Wrap_Builtin (Fld, Typ);
+   end Set_Field_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.RegExp;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.ads
new file mode 100644 (file)
index 0000000..20f7c5e
--- /dev/null
@@ -0,0 +1,55 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--              Terminal_Interface.Curses.Forms.Field_Types.RegExp          --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.5 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+package Terminal_Interface.Curses.Forms.Field_Types.RegExp is
+   pragma Preelaborate (RegExp);
+
+   type String_Access is access String;
+
+   type Regular_Expression_Field is new Field_Type with
+      record
+         Regular_Expression : String_Access;
+      end record;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in Regular_Expression_Field);
+   pragma Inline (Set_Field_Type);
+
+end Terminal_Interface.Curses.Forms.Field_Types.RegExp;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.adb
new file mode 100644 (file)
index 0000000..1606eb5
--- /dev/null
@@ -0,0 +1,109 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--          Terminal_Interface.Curses.Forms.Field_Types.User.Choice         --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.4 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Ada.Unchecked_Conversion;
+with Interfaces.C;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
+
+   use type Interfaces.C.Int;
+
+   function To_Argument_Access is new Ada.Unchecked_Conversion
+     (System.Address, Argument_Access);
+
+   function Generic_Next (Fld : Field;
+                          Usr : System.Address) return C_Int
+   is
+      Result : Boolean;
+      Udf    : User_Defined_Field_Type_With_Choice_Access :=
+        User_Defined_Field_Type_With_Choice_Access
+        (To_Argument_Access (Usr).Typ);
+   begin
+      Result := Next (Fld, Udf.all);
+      return C_Int (Boolean'Pos (Result));
+   end Generic_Next;
+
+   function Generic_Prev (Fld : Field;
+                          Usr : System.Address) return C_Int
+   is
+      Result : Boolean;
+      Udf    : User_Defined_Field_Type_With_Choice_Access :=
+        User_Defined_Field_Type_With_Choice_Access
+        (To_Argument_Access (Usr).Typ);
+   begin
+      Result := Previous (Fld, Udf.all);
+      return C_Int (Boolean'Pos (Result));
+   end Generic_Prev;
+
+   --  -----------------------------------------------------------------------
+   --
+   function C_Generic_Choice return C_Field_Type
+   is
+      Res : Eti_Error;
+      T   : C_Field_Type;
+   begin
+      if M_Generic_Choice = Null_Field_Type then
+         T := New_Fieldtype (Generic_Field_Check'Access,
+                             Generic_Char_Check'Access);
+         if T = Null_Field_Type then
+            raise Form_Exception;
+         else
+            Res := Set_Fieldtype_Arg (T,
+                                      Make_Arg'Access,
+                                      Copy_Arg'Access,
+                                      Free_Arg'Access);
+            if Res /= E_Ok then
+               Eti_Exception (Res);
+            end if;
+
+            Res := Set_Fieldtype_Choice (T,
+                                         Generic_Next'Access,
+                                         Generic_Prev'Access);
+            if Res /= E_Ok then
+               Eti_Exception (Res);
+            end if;
+         end if;
+         M_Generic_Choice := T;
+      end if;
+      pragma Assert (M_Generic_Choice /= Null_Field_Type);
+      return M_Generic_Choice;
+   end C_Generic_Choice;
+
+end Terminal_Interface.Curses.Forms.Field_Types.User.Choice;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.ads
new file mode 100644 (file)
index 0000000..ced81fe
--- /dev/null
@@ -0,0 +1,93 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--           Terminal_Interface.Curses.Forms.Field_Types.User.Choice        --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.4 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Ada.Unchecked_Deallocation;
+with Terminal_Interface.Curses.Aux;
+
+package Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
+   pragma Preelaborate (Choice);
+
+   type User_Defined_Field_Type_With_Choice is abstract new
+     User_Defined_Field_Type with null record;
+   --  This is the root of the mechanism we use to create field types in
+   --  Ada95 that allow the prev/next mechanism. You should your own type
+   --  derive from this one and implement the Field_Check, Character_Check
+   --  Next and Previous functions for your own type.
+
+   type User_Defined_Field_Type_With_Choice_Access is access all
+     User_Defined_Field_Type_With_Choice'Class;
+
+   function Next
+     (Fld : Field;
+      Typ : User_Defined_Field_Type_With_Choice) return Boolean
+      is abstract;
+   --  If True is returned, the function successfully generated a next
+   --  value into the fields buffer.
+
+   function Previous
+     (Fld : Field;
+      Typ : User_Defined_Field_Type_With_Choice) return Boolean
+      is abstract;
+   --  If True is returned, the function successfully generated a previous
+   --  value into the fields buffer.
+
+   --  +----------------------------------------------------------------------
+   --  | Private Part.
+   --  |
+private
+   use type Interfaces.C.Int;
+
+   function C_Generic_Choice return C_Field_Type;
+
+   function Generic_Next (Fld : Field;
+                          Usr : System.Address) return C_Int;
+   pragma Convention (C, Generic_Next);
+   --  This is the generic next Choice_Function for the low-level fieldtype
+   --  representing all the User_Defined_Field_Type derivates. It routes
+   --  the call to the Next implementation for the type.
+
+   function Generic_Prev (Fld : Field;
+                          Usr : System.Address) return C_Int;
+   pragma Convention (C, Generic_Prev);
+   --  This is the generic prev Choice_Function for the low-level fieldtype
+   --  representing all the User_Defined_Field_Type derivates. It routes
+   --  the call to the Previous implementation for the type.
+
+end Terminal_Interface.Curses.Forms.Field_Types.User.Choice;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-user.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user.adb
new file mode 100644 (file)
index 0000000..e5ce433
--- /dev/null
@@ -0,0 +1,131 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--              Terminal_Interface.Curses.Forms.Field_Types.User            --
+--                                                                          --
+--                                 B O D Y                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.4 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Ada.Unchecked_Conversion;
+with Interfaces.C;
+
+package body Terminal_Interface.Curses.Forms.Field_Types.User is
+
+   use type Interfaces.C.Int;
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in User_Defined_Field_Type)
+   is
+      function Allocate_Arg (T : User_Defined_Field_Type'Class)
+                             return Argument_Access;
+
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cft  : C_Field_Type := C_Generic_Type;
+                             Arg1 : Argument_Access)
+                             return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
+      Res : Eti_Error;
+
+      function Allocate_Arg (T : User_Defined_Field_Type'Class)
+                             return Argument_Access
+      is
+         Ptr : Field_Type_Access := new User_Defined_Field_Type'Class'(T);
+      begin
+         return new Argument'(Usr => System.Null_Address,
+                              Typ => Ptr,
+                              Cft => Null_Field_Type);
+      end Allocate_Arg;
+
+   begin
+      Res := Set_Fld_Type (Arg1 => Allocate_Arg (Typ));
+      if Res /= E_Ok then
+         Eti_Exception (Res);
+      end if;
+   end Set_Field_Type;
+
+   function To_Argument_Access is new Ada.Unchecked_Conversion
+     (System.Address, Argument_Access);
+
+   function Generic_Field_Check (Fld : Field;
+                                 Usr : System.Address) return C_Int
+   is
+      Result : Boolean;
+      Udf    : User_Defined_Field_Type_Access :=
+        User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
+   begin
+      Result := Field_Check (Fld, Udf.all);
+      return C_Int (Boolean'Pos (Result));
+   end Generic_Field_Check;
+
+   function Generic_Char_Check (Ch  : C_Int;
+                                Usr : System.Address) return C_Int
+   is
+      Result : Boolean;
+      Udf    : User_Defined_Field_Type_Access :=
+        User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ);
+   begin
+      Result := Character_Check (Character'Val (Ch), Udf.all);
+      return C_Int (Boolean'Pos (Result));
+   end Generic_Char_Check;
+
+   --  -----------------------------------------------------------------------
+   --
+   function C_Generic_Type return C_Field_Type
+   is
+      Res : Eti_Error;
+      T   : C_Field_Type;
+   begin
+      if M_Generic_Type = Null_Field_Type then
+         T := New_Fieldtype (Generic_Field_Check'Access,
+                             Generic_Char_Check'Access);
+         if T = Null_Field_Type then
+            raise Form_Exception;
+         else
+            Res := Set_Fieldtype_Arg (T,
+                                      Make_Arg'Access,
+                                      Copy_Arg'Access,
+                                      Free_Arg'Access);
+            if Res /= E_Ok then
+               Eti_Exception (Res);
+            end if;
+         end if;
+         M_Generic_Type := T;
+      end if;
+      pragma Assert (M_Generic_Type /= Null_Field_Type);
+      return M_Generic_Type;
+   end C_Generic_Type;
+
+end Terminal_Interface.Curses.Forms.Field_Types.User;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types-user.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user.ads
new file mode 100644 (file)
index 0000000..f06459b
--- /dev/null
@@ -0,0 +1,96 @@
+------------------------------------------------------------------------------
+--                                                                          --
+--                           GNAT ncurses Binding                           --
+--                                                                          --
+--               Terminal_Interface.Curses.Forms.Field_Types.User           --
+--                                                                          --
+--                                 S P E C                                  --
+--                                                                          --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
+--                                                                          --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
+--                                                                          --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
+--                                                                          --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
+------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
+--  Version Control:
+--  $Revision: 1.4 $
+--  Binding Version 00.93
+------------------------------------------------------------------------------
+with Ada.Unchecked_Deallocation;
+with Terminal_Interface.Curses.Aux;
+
+package Terminal_Interface.Curses.Forms.Field_Types.User is
+   pragma Preelaborate (User);
+
+   type User_Defined_Field_Type is abstract new Field_Type with null record;
+   --  This is the root of the mechanism we use to create field types in
+   --  Ada95. You should your own type derive from this one and implement
+   --  the Field_Check and Character_Check functions for your own type.
+
+   type User_Defined_Field_Type_Access is access all
+     User_Defined_Field_Type'Class;
+
+   function Field_Check
+     (Fld : Field;
+      Typ : User_Defined_Field_Type) return Boolean
+      is abstract;
+   --  If True is returned, the field is considered valid, otherwise it is
+   --  invalid.
+
+   function Character_Check
+     (Ch  : Character;
+      Typ : User_Defined_Field_Type) return Boolean
+      is abstract;
+   --  If True is returned, the character is considered as valid for the
+   --  field, otherwise as invalid.
+
+   procedure Set_Field_Type (Fld : in Field;
+                             Typ : in User_Defined_Field_Type);
+   --  This should work for all types derived from User_Defined_Field_Type.
+   --  No need to reimplement it for your derived type.
+
+   --  +----------------------------------------------------------------------
+   --  | Private Part.
+   --  | Used by the Choice child package.
+private
+   use type Interfaces.C.Int;
+
+   function C_Generic_Type   return C_Field_Type;
+
+   function Generic_Field_Check (Fld : Field;
+                                 Usr : System.Address) return C_Int;
+   pragma Convention (C, Generic_Field_Check);
+   --  This is the generic Field_Check_Function for the low-level fieldtype
+   --  representing all the User_Defined_Field_Type derivates. It routes
+   --  the call to the Field_Check implementation for the type.
+
+   function Generic_Char_Check (Ch  : C_Int;
+                                Usr : System.Address) return C_Int;
+   pragma Convention (C, Generic_Char_Check);
+   --  This is the generic Char_Check_Function for the low-level fieldtype
+   --  representing all the User_Defined_Field_Type derivates. It routes
+   --  the call to the Character_Check implementation for the type.
+
+end Terminal_Interface.Curses.Forms.Field_Types.User;
index 13d2885fdad58a1d7c1e4fc01eee20ee4624a84d..60e1ff38b8cf78be96e16576130e7b9db6d158ad 100644 (file)
@@ -6,28 +6,44 @@
 --                                                                          --
 --                                 B O D Y                                  --
 --                                                                          --
---  Version 00.92                                                           --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
 --                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
 --                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
 --                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
 ------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 --  Version Control:
---  $Revision: 1.4 $
+--  $Revision: 1.8 $
+--  Binding Version 00.93
 ------------------------------------------------------------------------------
 with Interfaces.C;
 with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-with Unchecked_Deallocation;
-
+with Ada.Unchecked_Deallocation;
+with Ada.Unchecked_Conversion;
+with Terminal_Interface.Curses.Forms.Field_Types.User;
+with Terminal_Interface.Curses.Forms.Field_Types.User.Choice;
 --  |
 --  |=====================================================================
 --  | man page form_fieldtype.3x
@@ -36,147 +52,238 @@ with Unchecked_Deallocation;
 package body Terminal_Interface.Curses.Forms.Field_Types is
 
    use type Interfaces.C.int;
+   use type System.Address;
 
-   type F_Check is access
-      function (Fld : Field; Info : User_Access) return C_Int;
-   pragma Convention (C, F_Check);
-
-   type C_Check is access
-      function (Ch : Character; Info : User_Access) return C_Int;
-   pragma Convention (C, C_Check);
+   function To_Argument_Access is new Ada.Unchecked_Conversion
+     (System.Address, Argument_Access);
 
-   procedure Free is new
-     Unchecked_Deallocation (User, User_Access);
+   function Get_Fieldtype (F : Field) return C_Field_Type;
+   pragma Import (C, Get_Fieldtype, "field_type");
 
-   --  Forward decls.
-   procedure Register_Field_Type;
-   procedure Unregister_Field_Type;
-
-   procedure Initialize (Obj : in out Tracker)
+   function Get_Arg (F : Field) return System.Address;
+   pragma Import (C, Get_Arg, "field_arg");
+   --  |
+   --  |=====================================================================
+   --  | man page form_field_validation.3x
+   --  |=====================================================================
+   --  |
+   --  |
+   --  |
+   function Get_Type (Fld : in Field) return Field_Type_Access
    is
+      Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
+      Arg : Argument_Access;
    begin
-      Register_Field_Type;
-   end Initialize;
+      if Low_Level = Null_Field_Type then
+         return null;
+      else
+         if Low_Level = M_Builtin_Router or else
+           Low_Level = M_Generic_Type or else
+           Low_Level = M_Choice_Router or else
+           Low_Level = M_Generic_Choice then
+            Arg := To_Argument_Access (Get_Arg (Fld));
+            if Arg = null then
+               raise Form_Exception;
+            else
+               return Arg.Typ;
+            end if;
+         else
+            raise Form_Exception;
+         end if;
+      end if;
+   end Get_Type;
 
-   procedure Finalize (Obj : in out Tracker)
+   function Make_Arg (Args : System.Address) return System.Address
    is
+      function Getarg (Arg : System.Address := Args)
+        return System.Address;
+      pragma Import (C, Getarg, "_nc_ada_getvarg");
    begin
-      Unregister_Field_Type;
-   end Finalize;
-
-   function Fc (Fld : Field; Info : User_Access) return C_Int;
-   pragma Convention (C, Fc);
-
-   function Cc (Ch : Character; Info : User_Access) return C_Int;
-   pragma Convention (C, Cc);
+      return Getarg;
+   end Make_Arg;
 
-   function Make_Arg (U : User_Access) return User_Access;
-   pragma Convention (C, Make_Arg);
+   function Copy_Arg (Usr : System.Address) return System.Address
+   is
+   begin
+      return Usr;
+   end Copy_Arg;
 
-   function Copy_Arg (U : User_Access) return User_Access;
-   pragma Convention (C, Copy_Arg);
+   procedure Free_Arg (Usr : in System.Address)
+   is
+      procedure Free_Type is new Ada.Unchecked_Deallocation
+        (Field_Type'Class, Field_Type_Access);
+      procedure Freeargs is new Ada.Unchecked_Deallocation
+        (Argument, Argument_Access);
 
-   procedure Free_Arg (U : User_Access);
-   pragma Convention (C, Free_Arg);
+      To_Be_Free : Argument_Access := To_Argument_Access (Usr);
+      Low_Level  : C_Field_Type;
+   begin
+      if To_Be_Free /= null then
+         if To_Be_Free.Usr /= System.Null_Address then
+            Low_Level := To_Be_Free.Cft;
+            if Low_Level.Freearg /= null then
+               Low_Level.Freearg (To_Be_Free.Usr);
+            end if;
+         end if;
+         if To_Be_Free.Typ /= null then
+            Free_Type (To_Be_Free.Typ);
+         end if;
+         Freeargs (To_Be_Free);
+      end if;
+   end Free_Arg;
 
-   function New_Fieldtype (Fc : F_Check;
-                           Cc : C_Check) return C_Field_Type;
-   pragma Import (C, New_Fieldtype, "new_fieldtype");
 
-   function Fc (Fld : Field; Info : User_Access) return C_Int
+   procedure Wrap_Builtin (Fld : Field;
+                           Typ : Field_Type'Class;
+                           Cft : C_Field_Type := C_Builtin_Router)
    is
+      Usr_Arg   : System.Address := Get_Arg (Fld);
+      Low_Level : constant C_Field_Type := Get_Fieldtype (Fld);
+      Arg : Argument_Access;
+      Res : Eti_Error;
+      function Set_Fld_Type (F    : Field := Fld;
+                             Cf   : C_Field_Type := Cft;
+                             Arg1 : Argument_Access) return C_Int;
+      pragma Import (C, Set_Fld_Type, "set_field_type");
+
    begin
-      return C_Int (Boolean'Pos (Field_Check (Fld, Info)));
-   end Fc;
+      pragma Assert (Low_Level /= Null_Field_Type);
+      if Cft /= C_Builtin_Router and then Cft /= C_Choice_Router then
+         raise Form_Exception;
+      else
+         Arg := new Argument'(Usr => System.Null_Address,
+                              Typ => new Field_Type'Class'(Typ),
+                              Cft => Get_Fieldtype (Fld));
+         if Usr_Arg /= System.Null_Address then
+            if Low_Level.Copyarg /= null then
+               Arg.Usr := Low_Level.Copyarg (Usr_Arg);
+            else
+               Arg.Usr := Usr_Arg;
+            end if;
+         end if;
 
-   function Cc (Ch : Character; Info : User_Access) return C_Int
+         Res := Set_Fld_Type (Arg1 => Arg);
+         if Res /= E_Ok then
+            Eti_Exception (Res);
+         end if;
+      end if;
+   end Wrap_Builtin;
+
+   function Field_Check_Router (Fld : Field;
+                                Usr : System.Address) return C_Int
    is
+      Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
-      return C_Int (Boolean'Pos (Character_Check (Ch, Info)));
-   end Cc;
+      pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
+                     and then Arg.Typ /= null);
+      if Arg.Cft.Fcheck /= null then
+         return Arg.Cft.Fcheck (Fld, Arg.Usr);
+      else
+         return 1;
+      end if;
+   end Field_Check_Router;
 
-   function Make_Arg (U : User_Access) return User_Access
+   function Char_Check_Router (Ch  : C_Int;
+                               Usr : System.Address) return C_Int
    is
-      function Fixme (U : User_Access) return User_Access;
-      pragma Import (C, Fixme, "_nc_ada_getvarg");
-      V : constant User_Access := Fixme (U);
-      I : constant User_Access := new User'(V.all);
+      Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
-      return I;
-   end Make_Arg;
+      pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
+                     and then Arg.Typ /= null);
+      if Arg.Cft.Ccheck /= null then
+         return Arg.Cft.Ccheck (Ch, Arg.Usr);
+      else
+         return 1;
+      end if;
+   end Char_Check_Router;
 
-   function Copy_Arg (U : User_Access) return User_Access
+   function Next_Router (Fld : Field;
+                         Usr : System.Address) return C_Int
    is
-      I : constant User_Access := new User'(U.all);
+      Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
-      return I;
-   end Copy_Arg;
+      pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
+                     and then Arg.Typ /= null);
+      if Arg.Cft.Next /= null then
+         return Arg.Cft.Next (Fld, Arg.Usr);
+      else
+         return 1;
+      end if;
+   end Next_Router;
 
-   procedure Free_Arg (U : User_Access)
+   function Prev_Router (Fld : Field;
+                         Usr : System.Address) return C_Int
    is
+      Arg  : constant Argument_Access := To_Argument_Access (Usr);
    begin
-      null;
-   end Free_Arg;
-
-   type M_Arg is access function (U : User_Access) return User_Access;
-   pragma Convention (C, M_Arg);
-
-   type C_Arg is access function (U : User_Access) return User_Access;
-   pragma Convention (C, C_Arg);
-
-   type F_Arg is access procedure (U : User_Access);
-   pragma Convention (C, F_Arg);
-
-   function Set_Fieldtype_Arg (Typ : C_Field_Type;
-                               Ma  : M_Arg;
-                               Ca  : C_Arg;
-                               Fa  : F_Arg) return C_Int;
-   pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
-   --  |
-   --  |
-   --  |
+      pragma Assert (Arg /= null and then Arg.Cft /= Null_Field_Type
+                     and then Arg.Typ /= null);
+      if Arg.Cft.Prev /= null then
+         return Arg.Cft.Prev (Fld, Arg.Usr);
+      else
+         return 1;
+      end if;
+   end Prev_Router;
 
-   procedure Register_Field_Type
+   --  -----------------------------------------------------------------------
+   --
+   function C_Builtin_Router return C_Field_Type
    is
       Res : Eti_Error;
-      Cft : C_Field_Type;
-      P   : User_Access := new User;
-      --  we need an instance to call
-      --  the Register_Type procedure
+      T   : C_Field_Type;
    begin
-      Cft := New_Fieldtype (Fc'Access,
-                            Cc'Access);
-      if Cft = Null_Field_Type then
-         raise Form_Exception;
-      end if;
-      Res := Set_Fieldtype_Arg (Cft,
-                                Make_Arg'Access,
-                                Copy_Arg'Access,
-                                Free_Arg'Access);
-      if Res /= E_Ok then
-         Eti_Exception (Res);
+      if M_Builtin_Router = Null_Field_Type then
+         T := New_Fieldtype (Field_Check_Router'Access,
+                             Char_Check_Router'Access);
+         if T = Null_Field_Type then
+            raise Form_Exception;
+         else
+            Res := Set_Fieldtype_Arg (T,
+                                      Make_Arg'Access,
+                                      Copy_Arg'Access,
+                                      Free_Arg'Access);
+            if Res /= E_Ok then
+               Eti_Exception (Res);
+            end if;
+         end if;
+         M_Builtin_Router := T;
       end if;
+      pragma Assert (M_Builtin_Router /= Null_Field_Type);
+      return M_Builtin_Router;
+   end C_Builtin_Router;
 
-      Register_Type (P.all, Cft);
-      Free (P);
-   end Register_Field_Type;
-   --  |
-   --  |
-   --  |
-   procedure Unregister_Field_Type
+   --  -----------------------------------------------------------------------
+   --
+   function C_Choice_Router return C_Field_Type
    is
-      P : User_Access := new User;
-      --  we need an instance to call
-      --  the Unregister_Type procedure
+      Res : Eti_Error;
+      T   : C_Field_Type;
    begin
-      Unregister_Type (P.all);
-      Free (P);
-   end Unregister_Field_Type;
-
-   Hook : Tracker;
-end Terminal_Interface.Curses.Forms.Field_Types;
-
-
-
+      if M_Choice_Router = Null_Field_Type then
+         T := New_Fieldtype (Field_Check_Router'Access,
+                             Char_Check_Router'Access);
+         if T = Null_Field_Type then
+            raise Form_Exception;
+         else
+            Res := Set_Fieldtype_Arg (T,
+                                      Make_Arg'Access,
+                                      Copy_Arg'Access,
+                                      Free_Arg'Access);
+            if Res /= E_Ok then
+               Eti_Exception (Res);
+            end if;
 
+            Res := Set_Fieldtype_Choice (T,
+                                         Next_Router'Access,
+                                         Prev_Router'Access);
+            if Res /= E_Ok then
+               Eti_Exception (Res);
+            end if;
+         end if;
+         M_Choice_Router := T;
+      end if;
+      pragma Assert (M_Choice_Router /= Null_Field_Type);
+      return M_Choice_Router;
+   end C_Choice_Router;
 
+end Terminal_Interface.Curses.Forms.Field_Types;
diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types.ads b/Ada95/ada_include/terminal_interface-curses-forms-field_types.ads
deleted file mode 100644 (file)
index 7058994..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-------------------------------------------------------------------------------
---                                                                          --
---                           GNAT ncurses Binding                           --
---                                                                          --
---                 Terminal_Interface.Curses.Forms.Field_Types              --
---                                                                          --
---                                 S P E C                                  --
---                                                                          --
---  Version 00.92                                                           --
---                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
---                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
---                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
-------------------------------------------------------------------------------
---  Version Control:
---  $Revision: 1.3 $
-------------------------------------------------------------------------------
-with Ada.Finalization; use Ada.Finalization;
-
---  You must instantiate this package for any user defined field type
---  to make it visible to the runtime.
---
-generic
-   type User is new Ada_Defined_Field_Type with private;
-   type User_Access is access User;
-   with function Field_Check (Fld  : Field;
-                              Info : User_Access) return Boolean;
-   with function Character_Check (Ch   : Character;
-                                  Info : User_Access) return Boolean;
-package Terminal_Interface.Curses.Forms.Field_Types is
---
---  Nothing public. All happens magically.
---
-private
-   type Tracker is new Limited_Controlled with null record;
-
-   procedure Initialize (Obj : in out Tracker);
-   procedure Finalize   (Obj : in out Tracker);
-
-end Terminal_Interface.Curses.Forms.Field_Types;
-
index dd8aba561ed771a8dff1ce4fc0f2d6d586616c94..a5729d40ace2ed4f0236ad0f2311e18c7ac9c18f 100644 (file)
@@ -6,27 +6,39 @@
 --                                                                          --
 --                                 B O D Y                                  --
 --                                                                          --
---  Version 00.92                                                           --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
 --                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
 --                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
 --                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
 ------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 --  Version Control:
---  $Revision: 1.3 $
+--  $Revision: 1.7 $
+--  Binding Version 00.93
 ------------------------------------------------------------------------------
-with Unchecked_Conversion;
-with Terminal_Interface.Curses.Aux;
-use  Terminal_Interface.Curses.Aux;
+with Terminal_Interface.Curses.Aux; use  Terminal_Interface.Curses.Aux;
 
 --  |
 --  |=====================================================================
@@ -34,48 +46,40 @@ use  Terminal_Interface.Curses.Aux;
 --  |=====================================================================
 --  |
 package body Terminal_Interface.Curses.Forms.Field_User_Data is
-
-   function To_Address is new Unchecked_Conversion (User_Access,
-                                                    System.Address);
-   function To_Pointer is new Unchecked_Conversion (System.Address,
-                                                    User_Access);
    --  |
    --  |
    --  |
+   use type Interfaces.C.Int;
+
    procedure Set_User_Data (Fld  : in Field;
                             Data : in User_Access)
    is
-      A : constant Field_User_Wrapper_Access := Field_Userptr (Fld);
-      B : Field_User_Wrapper_Access;
-      R : C_Int;
+      function Set_Field_Userptr (Fld : Field;
+                                  Usr : User_Access) return C_Int;
+      pragma Import (C, Set_Field_Userptr, "set_field_userptr");
+
+      Res : constant Eti_Error := Set_Field_Userptr (Fld, Data);
    begin
-      if A = null then
-         raise Form_Exception;
-      else
-         if A.N > 1 then
-            B := new Field_User_Wrapper'(T => A.T,
-                                         N => 1,
-                                         U => To_Address (Data));
-            R := Set_Field_Userptr (Fld, B);
-            A.N := A.N - 1;
-         else
-            A.U := To_Address (Data);
-         end if;
+      if Res /= E_Ok then
+         Eti_Exception (Res);
       end if;
    end Set_User_Data;
    --  |
    --  |
    --  |
+   function Get_User_Data (Fld  : in  Field) return User_Access
+   is
+      function Field_Userptr (Fld : Field) return User_Access;
+      pragma Import (C, Field_Userptr, "field_userptr");
+   begin
+      return Field_Userptr (Fld);
+   end Get_User_Data;
+
    procedure Get_User_Data (Fld  : in  Field;
                             Data : out User_Access)
    is
-      A : constant Field_User_Wrapper_Access := Field_Userptr (Fld);
    begin
-      if A = null then
-         raise Form_Exception;
-      else
-         Data := To_Pointer (A.U);
-      end if;
+      Data := Get_User_Data (Fld);
    end Get_User_Data;
-   
+
 end Terminal_Interface.Curses.Forms.Field_User_Data;
index 9022a044e5a1838dc2d9395a9f92340944e71ae2..4c6f34cc840c54eefc4c699b930060b912033c51 100644 (file)
@@ -6,63 +6,81 @@
 --                                                                          --
 --                                 B O D Y                                  --
 --                                                                          --
---  Version 00.92                                                           --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
 --                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
 --                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
 --                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
 ------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 --  Version Control:
---  $Revision: 1.3 $
+--  $Revision: 1.7 $
+--  Binding Version 00.93
 ------------------------------------------------------------------------------
-with Unchecked_Conversion;
 --  |
 --  |=====================================================================
 --  | man page form__userptr.3x
 --  |=====================================================================
 --  |
+with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
+
 package body Terminal_Interface.Curses.Forms.Form_User_Data is
-   
-   function To_Address is new Unchecked_Conversion (User_Access,
-                                                    System.Address);
-   function To_Pointer is new Unchecked_Conversion (System.Address,
-                                                    User_Access);
+
+   use type Interfaces.C.Int;
+
    --  |
    --  |
    --  |
    procedure Set_User_Data (Frm  : in Form;
                             Data : in User_Access)
    is
-      A : constant Form_User_Wrapper_Access := Form_Userptr (Frm);
+      function Set_Form_Userptr (Frm  : Form;
+                                 Data : User_Access)  return C_Int;
+      pragma Import (C, Set_Form_Userptr, "set_form_userptr");
+
+      Res : constant Eti_Error := Set_Form_Userptr (Frm, Data);
    begin
-      if A = null then
-         raise Form_Exception;
-      else
-         A.U := To_Address (Data);
+      if  Res /= E_Ok then
+         Eti_Exception (Res);
       end if;
    end Set_User_Data;
    --  |
    --  |
    --  |
+   function Get_User_Data (Frm  : in  Form) return User_Access
+   is
+      function Form_Userptr (Frm : Form) return User_Access;
+      pragma Import (C, Form_Userptr, "form_userptr");
+   begin
+      return Form_Userptr (Frm);
+   end Get_User_Data;
+
    procedure Get_User_Data (Frm  : in  Form;
                             Data : out User_Access)
    is
-      A : constant Form_User_Wrapper_Access := Form_Userptr (Frm);
    begin
-      if A = null then
-         raise Form_Exception;
-      else
-         Data := To_Pointer (A.U);
-      end if;
+      Data := Get_User_Data (Frm);
    end Get_User_Data;
-   
+
 end Terminal_Interface.Curses.Forms.Form_User_Data;
index 059ae23817b9b77c491489d93a0d870bdc1839be..fbb43b7f81e665f1fcc716675cd15162493ff829 100644 (file)
@@ -6,25 +6,38 @@
 --                                                                          --
 --                                 B O D Y                                  --
 --                                                                          --
---  Version 00.92                                                           --
+------------------------------------------------------------------------------
+-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
+--                                                                          --
+-- Permission is hereby granted, free of charge, to any person obtaining a  --
+-- copy of this software and associated documentation files (the            --
+-- "Software"), to deal in the Software without restriction, including      --
+-- without limitation the rights to use, copy, modify, merge, publish,      --
+-- distribute, distribute with modifications, sublicense, and/or sell       --
+-- copies of the Software, and to permit persons to whom the Software is    --
+-- furnished to do so, subject to the following conditions:                 --
 --                                                                          --
---  The ncurses Ada95 binding is copyrighted 1996 by                        --
---  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
+-- The above copyright notice and this permission notice shall be included  --
+-- in all copies or substantial portions of the Software.                   --
 --                                                                          --
---  Permission is hereby granted to reproduce and distribute this           --
---  binding by any means and for any fee, whether alone or as part          --
---  of a larger distribution, in source or in binary form, PROVIDED         --
---  this notice is included with any such distribution, and is not          --
---  removed from any of its header files. Mention of ncurses and the        --
---  author of this binding in any applications linked with it is            --
---  highly appreciated.                                                     --
+-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
+-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
+-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
+-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
+-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
+-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
+-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
 --                                                                          --
---  This binding comes AS IS with no warranty, implied or expressed.        --
+-- Except as contained in this notice, the name(s) of the above copyright   --
+-- holders shall not be used in advertising or otherwise to promote the     --
+-- sale, use or other dealings in this Software without prior written       --
+-- authorization.                                                           --
 ------------------------------------------------------------------------------
+--  Author: Juergen Pfeifer <Juergen.Pfeifer@T-Online.de> 1996
 --  Version Control:
---  $Revision: 1.9 $
+--  $Revision: 1.13 $
+--  Binding Version 00.93
 ------------------------------------------------------------------------------
-with Ada.Tags; use Ada.Tags;
 with Ada.Unchecked_Deallocation;
 with Unchecked_Conversion;
 
@@ -32,7 +45,6 @@ with Interfaces.C; use Interfaces.C;
 with Interfaces.C.Strings; use Interfaces.C.Strings;
 
 with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
-with GNAT.Htable;
 
 package body Terminal_Interface.Curses.Forms is
 
@@ -66,34 +78,15 @@ package body Terminal_Interface.Curses.Forms is
    begin
       Fill_String (Form_Request_Name (C_Int (Key)), Name);
    end Request_Name;
-------------------------------------------------------------------------------
-   procedure Free_Field_User_Wrapper is
-     new Ada.Unchecked_Deallocation (Field_User_Wrapper,
-                                     Field_User_Wrapper_Access);
-
-   procedure Release_User_Wrapper (A : in out Field_User_Wrapper_Access);
-   procedure Dup_User_Wrapper (A : in out Field_User_Wrapper_Access);
-
-   procedure Release_User_Wrapper (A : in out Field_User_Wrapper_Access)
-   is
-   begin
-      A.N := A.N - 1;
-      if A.N = 0 then
-         Free_Field_User_Wrapper (A);
-      end if;
-   end Release_User_Wrapper;
-   pragma Inline (Release_User_Wrapper);
 
-   procedure Dup_User_Wrapper (A : in out Field_User_Wrapper_Access)
+   function Request_Name (Key : Form_Request_Code) return String
    is
+      function Form_Request_Name (Key : C_Int) return chars_ptr;
+      pragma Import (C, Form_Request_Name, "form_request_name");
    begin
-      A.N := A.N + 1;
-   end Dup_User_Wrapper;
-   pragma Inline (Dup_User_Wrapper);
+      return Fill_String (Form_Request_Name (C_Int (Key)));
+   end Request_Name;
 ------------------------------------------------------------------------------
-   procedure Free_Form_User_Wrapper is
-     new Ada.Unchecked_Deallocation (Form_User_Wrapper,
-                                     Form_User_Wrapper_Access);
    --  |
    --  |
    --  |
@@ -118,21 +111,9 @@ package body Terminal_Interface.Curses.Forms is
                                         C_Int (Top), C_Int (Left),
                                         C_Int (Off_Screen),
                                         C_Int (More_Buffers));
-
-      A   : Field_User_Wrapper_Access;
-      Res : Eti_Error;
    begin
       if Fld = Null_Field then
          raise Form_Exception;
-      else
-         A := new Field_User_Wrapper'(U => System.Null_Address,
-                                      T => null,
-                                      N => 1);
-         Res := Set_Field_Userptr (Fld, A);
-         if Res /= E_Ok then
-            Free_Field_User_Wrapper (A);
-            Eti_Exception (Res);
-         end if;
       end if;
       return Fld;
    end Create;
@@ -143,19 +124,9 @@ package body Terminal_Interface.Curses.Forms is
    is
       function Free_Field (Fld : Field) return C_Int;
       pragma Import (C, Free_Field, "free_field");
-      procedure Free_Field_Type is
-        new Ada.Unchecked_Deallocation (Field_Type'Class,
-                                        Field_Type_Access);
 
-      A   : Field_User_Wrapper_Access := Field_Userptr (Fld);
       Res : Eti_Error;
    begin
-      if A /= null then
-         if A.T /= null then
-            Free_Field_Type (A.T);
-         end if;
-         Release_User_Wrapper (A);
-      end if;
       Res := Free_Field (Fld);
       if Res /= E_Ok then
          Eti_Exception (Res);
@@ -174,15 +145,12 @@ package body Terminal_Interface.Curses.Forms is
                           Left : C_Int) return Field;
       pragma Import (C, Dup_Field, "dup_field");
 
-      A : Field_User_Wrapper_Access := Field_Userptr (Fld);
       F : constant Field := Dup_Field (Fld,
                                        C_Int (Top),
                                        C_Int (Left));
    begin
       if F = Null_Field then
          raise Form_Exception;
-      else
-         Dup_User_Wrapper (A);
       end if;
       return F;
    end Duplicate;
@@ -198,15 +166,12 @@ package body Terminal_Interface.Curses.Forms is
                           Left : C_Int) return Field;
       pragma Import (C, Lnk_Field, "link_field");
 
-      A : Field_User_Wrapper_Access := Field_Userptr (Fld);
       F : constant Field := Lnk_Field (Fld,
                                        C_Int (Top),
                                        C_Int (Left));
    begin
       if F = Null_Field then
          raise Form_Exception;
-      else
-         Dup_User_Wrapper (A);
       end if;
       return F;
    end Link;
@@ -285,6 +250,17 @@ package body Terminal_Interface.Curses.Forms is
    begin
       Fill_String (Field_Buffer (Fld, C_Int (Buffer)), Str);
    end Get_Buffer;
+
+   function Get_Buffer
+     (Fld    : in Field;
+      Buffer : in Buffer_Number := Buffer_Number'First) return String
+   is
+      function Field_Buffer (Fld : Field;
+                             B   : C_Int) return chars_ptr;
+      pragma Import (C, Field_Buffer, "field_buffer");
+   begin
+      return Fill_String (Field_Buffer (Fld, C_Int (Buffer)));
+   end Get_Buffer;
    --  |
    --  |
    --  |
@@ -747,57 +723,39 @@ package body Terminal_Interface.Curses.Forms is
    --  |
    --  |
    --  |
-   procedure Free_Allocated_Fields is
-     new Ada.Unchecked_Deallocation (Field_Array, Field_Array_Access);
-   --  |
-   --  |
-   --  |
-   --  This is a bit delicate if we want to manipulate an Ada created form
-   --  from C routines or vice versa.
-   --  In Ada created forms we use the low level user pointer to maintain
-   --  binding internal additional informations about the form. This
-   --  internal information contains a hook for the Ada provided user pointer.
-   --  Unless you understand this implementation, the safest way in mixed
-   --  language programs to deal with user pointers is, that only the language
-   --  that created the form should also manipulate the user pointer for that
-   --  form.
    procedure Redefine (Frm  : in Form;
-                       Flds : in Field_Array)
+                       Flds : in Field_Array_Access)
    is
       function Set_Frm_Fields (Frm   : Form;
-                               Items : Field_Array) return C_Int;
+                               Items : System.Address) return C_Int;
       pragma Import (C, Set_Frm_Fields, "set_form_fields");
 
-      A   : constant Form_User_Wrapper_Access := Form_Userptr (Frm);
-      I   : Field_Array_Access;
       Res : Eti_Error;
    begin
-      if A = null or else A.I = null then raise Form_Exception;
+      pragma Assert (Flds (Flds'Last) = Null_Field);
+      if Flds (Flds'Last) /= Null_Field then
+         raise Form_Exception;
       else
-         I := new Field_Array (1 .. (Flds'Length + 1));
-         I.all (1 .. Flds'Length) := Flds (Flds'First .. Flds'Last);
-         I.all (Flds'Length + 1) := Null_Field;
-         Res := Set_Frm_Fields (Frm, I.all);
+         Res := Set_Frm_Fields (Frm, Flds (Flds'First)'Address);
          if  Res /= E_Ok then
-            Free_Allocated_Fields (I);
             Eti_Exception (Res);
-         else
-            Free_Allocated_Fields (A.I);
-            A.I := I;
          end if;
       end if;
    end Redefine;
    --  |
    --  |
    --  |
-   function Fields (Frm : Form) return Field_Array_Access
+   function Fields (Frm   : Form;
+                    Index : Positive) return Field
    is
-      A : constant Form_User_Wrapper_Access := Form_Userptr (Frm);
+      function F_Fields (Frm : Form;
+                         Idx : C_Int) return Field;
+      pragma Import (C, F_Fields, "_nc_get_field");
    begin
-      if A = null or else A.I = null then
+      if Frm = Null_Form or else Index not in 1 .. Field_Count (Frm) then
          raise Form_Exception;
       else
-         return A.I;
+         return F_Fields (Frm, C_Int (Index) - 1);
       end if;
    end Fields;
    --  |
@@ -833,32 +791,23 @@ package body Terminal_Interface.Curses.Forms is
    --  |
    --  |
    --  |
-   function Create (Fields : Field_Array) return Form
+   function Create (Fields : Field_Array_Access) return Form
    is
-      function NewForm (Fields : Field_Array) return Form;
+      function NewForm (Fields : System.Address) return Form;
       pragma Import (C, NewForm, "new_form");
 
       M   : Form;
-      I   : Field_Array_Access;
-      U   : Form_User_Wrapper_Access;
-      Res : Eti_Error;
    begin
-      I := new Field_Array (1 .. (Fields'Length + 1));
-      I.all (1 .. Fields'Length) := Fields (Fields'First .. Fields'Last);
-      I.all (Fields'Length + 1) := Null_Field;
-      M := NewForm (I.all);
-      if M = Null_Form then
-         Free_Allocated_Fields (I);
+      pragma Assert (Fields (Fields'Last) = Null_Field);
+      if Fields (Fields'Last) /= Null_Field then
          raise Form_Exception;
+      else
+         M := NewForm (Fields (Fields'First)'Address);
+         if M = Null_Form then
+            raise Form_Exception;
+         end if;
+         return M;
       end if;
-      U := new Form_User_Wrapper'(U => System.Null_Address, I => I);
-      Res := Set_Form_Userptr (M, U);
-      if  Res /= E_Ok then
-         Free_Allocated_Fields (I);
-         Free_Form_User_Wrapper (U);
-         Eti_Exception (Res);
-      end if;
-      return M;
    end Create;
    --  |
    --  |
@@ -868,17 +817,11 @@ package body Terminal_Interface.Curses.Forms is
       function Free (Frm : Form) return C_Int;
       pragma Import (C, Free, "free_form");
 
-      U   : Form_User_Wrapper_Access := Form_Userptr (Frm);
       Res : constant Eti_Error := Free (Frm);
    begin
       if Res /= E_Ok then
          Eti_Exception (Res);
       end if;
-      if U = null or else U.I = null then
-         raise Form_Exception;
-      end if;
-      Free_Allocated_Fields (U.I);
-      Free_Form_User_Wrapper (U);
       Frm := Null_Form;
    end Delete;
    --  |
@@ -1183,511 +1126,34 @@ package body Terminal_Interface.Curses.Forms is
       end if;
    end Is_New_Page;
 
-------------------------------------------------------------------------------
-   --  We use a GNAT internal hash table mechanism to create an association
-   --  between an Ada_Defined_Field_Type and it's low level C_Field_Type
-   --  peer.
-   --  It shouldn´t be too complicated to reimplent this hashing mechanism
-   --  for other compilers.
-   --
-   type Tag_Type_Pair;
-   type Tag_Pair_Access is access all Tag_Type_Pair;
-   pragma Controlled (Tag_Pair_Access);
-
-   Null_Tag_Pair : constant Tag_Pair_Access := Tag_Pair_Access'(null);
-
-   type Tag_Type_Pair is
-      record
-         Ada_Tag    : Tag;
-         Cft        : C_Field_Type;
-         Next       : Tag_Pair_Access;
-      end record;
-
-   type Htable_Headers is range 1 .. 31;
-   procedure Free_Tag_Type_Pair is
-     new Ada.Unchecked_Deallocation (Tag_Type_Pair, Tag_Pair_Access);
-
-   procedure Set_Pair_Link (T : Tag_Pair_Access; Next : Tag_Pair_Access);
-   function  Get_Pair_Link (T : Tag_Pair_Access) return Tag_Pair_Access;
-   function  Get_Pair_Tag  (T : Tag_Pair_Access) return Tag;
-
-   function Hash (T : Tag) return Htable_Headers;
-   function Equal (A, B : Tag) return Boolean;
-
-   package External_Pair_Htable is new GNAT.Htable.Static_Htable
-     (Header_Num => Htable_Headers,
-      Element    => Tag_Type_Pair,
-      Elmt_Ptr   => Tag_Pair_Access,
-      Null_Ptr   => Null_Tag_Pair,
-      Set_Next   => Set_Pair_Link,
-      Next       => Get_Pair_Link,
-      Key        => Tag,
-      Get_Key    => Get_Pair_Tag,
-      Hash       => Hash,
-      Equal      => Equal);
-
-   procedure Set_Pair_Link (T : Tag_Pair_Access; Next : Tag_Pair_Access)
-   is
-   begin
-      T.all.Next := Next;
-   end Set_Pair_Link;
-
-   function  Get_Pair_Link (T : Tag_Pair_Access) return Tag_Pair_Access
-   is
-   begin
-      return T.all.Next;
-   end Get_Pair_Link;
-
-   function  Get_Pair_Tag  (T : Tag_Pair_Access) return Tag
-   is
-   begin
-      return T.all.Ada_Tag;
-   end Get_Pair_Tag;
-
-   function Equal (A, B : Tag) return Boolean
-   is
-   begin
-      return A = B;
-   end Equal;
-
-   function Hash (T : Tag) return Htable_Headers
+   procedure Free (FA          : in out Field_Array_Access;
+                   Free_Fields : in Boolean := False)
    is
-      function H is new GNAT.Htable.Hash (Htable_Headers);
+      procedure Release is new Ada.Unchecked_Deallocation
+        (Field_Array, Field_Array_Access);
    begin
-      return H (External_Tag (T));
-   end Hash;
-
-   function Search_Type (T : Ada_Defined_Field_Type'Class)
-                         return C_Field_Type
-   is
-      P : Tag_Pair_Access := External_Pair_Htable.Get (T'Tag);
-   begin
-      if P /= null then
-         return P.Cft;
-      else
-         return Null_Field_Type;
-      end if;
-   end Search_Type;
-
-   --  Register an Ada_Defined_Field_Type given by its Tag
-   --  with it's associated C_Field_Type.
-   procedure Register_Type (T   : in Ada_Defined_Field_Type'Class;
-                            Cft : in C_Field_Type)
-   is
-      C : C_Field_Type := Search_Type (T);
-      P : Tag_Pair_Access;
-   begin
-      if C /= Null_Field_Type then
-         raise Form_Exception;
-      else
-         P := new Tag_Type_Pair'(T'Tag, Cft, null);
-         External_Pair_Htable.Set (P);
+      if FA /= null and then Free_Fields then
+         for I in FA'First .. (FA'Last - 1) loop
+            if (FA (I) /= Null_Field) then
+               Delete (FA (I));
+            end if;
+         end loop;
       end if;
-   end Register_Type;
-
-   --  Unregister an Ada_Defined_Field_Type given by it's tag
-   procedure Unregister_Type (T : in Ada_Defined_Field_Type'Class)
-   is
-      function Free_Fieldtype (Ft : C_Field_Type) return C_Int;
-      pragma Import (C, Free_Fieldtype, "free_fieldtype");
-
-      P   : Tag_Pair_Access := External_Pair_Htable.Get (T'Tag);
-      Ft  : C_Field_Type;
-      Res : C_Int;
-   begin
-      if P = null then
-         raise Form_Exception;
-      else
-         Ft := P.Cft;
-         External_Pair_Htable.Remove (T'Tag);
-         Free_Tag_Type_Pair (P);
-         Res := Free_Fieldtype (Ft);
-         if Res /= E_Ok then
-            Eti_Exception (Res);
-         end if;
-      end if;
-&n