From 661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 28 Feb 1998 23:21:12 -0500 Subject: [PATCH] ncurses 4.2 --- ANNOUNCE | 112 +- Ada95/Makefile.in | 77 +- Ada95/README | 42 +- Ada95/ada_include/Makefile.in | 429 ++- .../terminal_interface-curses-aux.adb | 59 +- .../terminal_interface-curses-aux.ads | 42 +- ...erface-curses-forms-choice_field_types.adb | 88 - ...erface-curses-forms-choice_field_types.ads | 46 - ...terface-curses-forms-field_types-alpha.adb | 68 + ...terface-curses-forms-field_types-alpha.ads | 53 + ...-curses-forms-field_types-alphanumeric.adb | 68 + ...-curses-forms-field_types-alphanumeric.ads | 53 + ...rses-forms-field_types-enumeration-ada.adb | 80 + ...rses-forms-field_types-enumeration-ada.ads | 58 + ...e-curses-forms-field_types-enumeration.adb | 119 + ...e-curses-forms-field_types-enumeration.ads | 97 + ...face-curses-forms-field_types-intfield.adb | 72 + ...face-curses-forms-field_types-intfield.ads | 55 + ...-curses-forms-field_types-ipv4_address.adb | 68 + ...-curses-forms-field_types-ipv4_address.ads | 50 + ...rface-curses-forms-field_types-numeric.adb | 74 + ...rface-curses-forms-field_types-numeric.ads | 55 + ...erface-curses-forms-field_types-regexp.adb | 71 + ...erface-curses-forms-field_types-regexp.ads | 55 + ...e-curses-forms-field_types-user-choice.adb | 109 + ...e-curses-forms-field_types-user-choice.ads | 93 + ...nterface-curses-forms-field_types-user.adb | 131 + ...nterface-curses-forms-field_types-user.ads | 96 + ...nal_interface-curses-forms-field_types.adb | 349 +- ...nal_interface-curses-forms-field_types.ads | 50 - ...interface-curses-forms-field_user_data.adb | 88 +- ..._interface-curses-forms-form_user_data.adb | 78 +- .../terminal_interface-curses-forms.adb | 702 +--- ..._interface-curses-menus-item_user_data.adb | 50 +- ..._interface-curses-menus-menu_user_data.adb | 77 +- .../terminal_interface-curses-menus.adb | 252 +- .../terminal_interface-curses-mouse.adb | 61 +- ...inal_interface-curses-panels-user_data.adb | 50 +- .../terminal_interface-curses-panels.adb | 38 +- .../terminal_interface-curses-text_io-aux.adb | 38 +- .../terminal_interface-curses-text_io-aux.ads | 39 +- ...al_interface-curses-text_io-complex_io.adb | 38 +- ...al_interface-curses-text_io-complex_io.ads | 40 +- ...al_interface-curses-text_io-decimal_io.adb | 38 +- ...al_interface-curses-text_io-decimal_io.ads | 38 +- ...nterface-curses-text_io-enumeration_io.adb | 38 +- ...nterface-curses-text_io-enumeration_io.ads | 38 +- ...inal_interface-curses-text_io-fixed_io.adb | 38 +- ...inal_interface-curses-text_io-fixed_io.ads | 38 +- ...inal_interface-curses-text_io-float_io.adb | 38 +- ...inal_interface-curses-text_io-float_io.ads | 38 +- ...al_interface-curses-text_io-integer_io.adb | 38 +- ...al_interface-curses-text_io-integer_io.ads | 38 +- ...al_interface-curses-text_io-modular_io.adb | 38 +- ...al_interface-curses-text_io-modular_io.ads | 38 +- .../terminal_interface-curses-text_io.adb | 43 +- .../terminal_interface-curses-text_io.ads | 38 +- .../ada_include/terminal_interface-curses.adb | 160 +- Ada95/ada_include/terminal_interface.ads | 41 +- Ada95/gen/Makefile.in | 122 +- Ada95/gen/gen.c | 215 +- ..._interface-curses-forms-field_types.ads.m4 | 238 ++ ...erface-curses-forms-field_user_data.ads.m4 | 57 +- ...terface-curses-forms-form_user_data.ads.m4 | 58 +- .../terminal_interface-curses-forms.ads.m4 | 340 +- ...terface-curses-menus-item_user_data.ads.m4 | 49 +- ...terface-curses-menus-menu_user_data.ads.m4 | 57 +- .../terminal_interface-curses-menus.ads.m4 | 156 +- .../terminal_interface-curses-mouse.ads.m4 | 51 +- ...l_interface-curses-panels-user_data.ads.m4 | 48 +- .../terminal_interface-curses-panels.ads.m4 | 52 +- Ada95/gen/terminal_interface-curses.ads.m4 | 230 +- Ada95/html/Makefile | 19 - Ada95/html/curs_addch.3x.html | 6 +- Ada95/html/curs_attr.3x.html | 2 +- Ada95/html/curs_color.3x.html | 2 +- Ada95/html/curs_getch.3x.html | 100 +- Ada95/html/curs_inch.3x.html | 6 +- Ada95/html/curs_kernel.3x.html | 2 +- Ada95/html/curs_mouse.3x.html | 54 +- Ada95/html/curs_outopts.3x.html | 8 +- Ada95/html/curs_print.3x.html | 2 +- Ada95/html/curs_refresh.3x.html | 26 +- Ada95/html/curs_scanw.3x.html | 2 +- Ada95/html/curs_termcap.3x.html | 2 +- Ada95/html/curs_terminfo.3x.html | 104 +- Ada95/html/define_key.3x.html | 70 + Ada95/html/dft_fgbg.3x.html | 6 +- Ada95/html/form.3x.html | 124 +- Ada95/html/form_driver.3x.html | 2 +- Ada95/html/form_field_buffer.3x.html | 2 +- Ada95/html/form_field_new.3x.html | 2 +- Ada95/html/form_field_opts.3x.html | 22 +- Ada95/html/form_field_userptr.3x.html | 4 +- Ada95/html/form_field_validation.3x.html | 2 +- Ada95/html/form_fieldtype.3x.html | 14 +- Ada95/html/form_userptr.3x.html | 4 +- Ada95/html/index.html | 57 +- Ada95/html/keyok.3x.html | 70 + Ada95/html/menu.3x.html | 96 +- Ada95/html/menu_driver.3x.html | 2 +- Ada95/html/menu_format.3x.html | 76 +- Ada95/html/menu_pattern.3x.html | 2 +- Ada95/html/menu_post.3x.html | 14 +- Ada95/html/menu_userptr.3x.html | 4 +- Ada95/html/mitem_new.3x.html | 20 +- Ada95/html/mitem_userptr.3x.html | 4 +- Ada95/html/mitem_value.3x.html | 2 +- Ada95/html/ncurses.3x.html | 18 +- Ada95/html/panel.3x.html | 2 +- Ada95/html/resizeterm.3x.html | 16 +- Ada95/html/table.html | 58 +- ...ace-curses-forms-choice_field_types_s.html | 64 - ...face-curses-forms-field_types-alpha_s.html | 68 + ...rses-forms-field_types-alphanumeric_s.html | 68 + ...s-forms-field_types-enumeration-ada_s.html | 74 + ...urses-forms-field_types-enumeration_s.html | 112 + ...e-curses-forms-field_types-intfield_s.html | 70 + ...rses-forms-field_types-ipv4_address_s.html | 65 + ...ce-curses-forms-field_types-numeric_s.html | 70 + ...ace-curses-forms-field_types-regexp_s.html | 70 + ...urses-forms-field_types-user-choice_s.html | 107 + ...rface-curses-forms-field_types-user_s.html | 110 + ..._interface-curses-forms-field_types_s.html | 244 +- ...erface-curses-forms-field_user_data_s.html | 50 +- ...terface-curses-forms-form_user_data_s.html | 50 +- .../terminal_interface-curses-forms_s.html | 278 +- ...terface-curses-menus-item_user_data_s.html | 41 +- ...terface-curses-menus-menu_user_data_s.html | 50 +- .../terminal_interface-curses-menus_s.html | 89 +- .../terminal_interface-curses-mouse_s.html | 43 +- ...l_interface-curses-panels-user_data_s.html | 37 +- .../terminal_interface-curses-panels_s.html | 37 +- ...interface-curses-text_io-complex_io_s.html | 37 +- ...interface-curses-text_io-decimal_io_s.html | 37 +- ...rface-curses-text_io-enumeration_io_s.html | 37 +- ...l_interface-curses-text_io-fixed_io_s.html | 37 +- ...l_interface-curses-text_io-float_io_s.html | 37 +- ...interface-curses-text_io-integer_io_s.html | 37 +- ...interface-curses-text_io-modular_io_s.html | 37 +- .../terminal_interface-curses-text_io_s.html | 37 +- Ada95/html/terminal_interface-curses_s.html | 112 +- Ada95/html/terminal_interface_s.html | 37 +- Ada95/html/wresize.3x.html | 2 +- Ada95/samples/Makefile.in | 87 +- Ada95/samples/explain.txt | 29 +- Ada95/samples/rain.adb | 161 + Ada95/samples/rain.ads | 42 + .../samples/sample-curses_demo-attributes.adb | 38 +- .../samples/sample-curses_demo-attributes.ads | 38 +- Ada95/samples/sample-curses_demo-mouse.adb | 38 +- Ada95/samples/sample-curses_demo-mouse.ads | 38 +- Ada95/samples/sample-curses_demo.adb | 67 +- Ada95/samples/sample-curses_demo.ads | 38 +- Ada95/samples/sample-explanation.adb | 38 +- Ada95/samples/sample-explanation.ads | 38 +- Ada95/samples/sample-form_demo-aux.adb | 90 +- Ada95/samples/sample-form_demo-aux.ads | 38 +- Ada95/samples/sample-form_demo-handler.adb | 38 +- Ada95/samples/sample-form_demo-handler.ads | 38 +- Ada95/samples/sample-form_demo.adb | 92 +- Ada95/samples/sample-form_demo.ads | 38 +- Ada95/samples/sample-function_key_setting.adb | 38 +- Ada95/samples/sample-function_key_setting.ads | 38 +- Ada95/samples/sample-header_handler.adb | 38 +- Ada95/samples/sample-header_handler.ads | 38 +- Ada95/samples/sample-helpers.adb | 38 +- Ada95/samples/sample-helpers.ads | 38 +- Ada95/samples/sample-keyboard_handler.adb | 56 +- Ada95/samples/sample-keyboard_handler.ads | 38 +- Ada95/samples/sample-manifest.ads | 38 +- Ada95/samples/sample-menu_demo-aux.adb | 50 +- Ada95/samples/sample-menu_demo-aux.ads | 38 +- Ada95/samples/sample-menu_demo-handler.adb | 55 +- Ada95/samples/sample-menu_demo-handler.ads | 38 +- Ada95/samples/sample-menu_demo.adb | 84 +- Ada95/samples/sample-menu_demo.ads | 38 +- Ada95/samples/sample-my_field_type.adb | 50 +- Ada95/samples/sample-my_field_type.ads | 55 +- Ada95/samples/sample-text_io_demo.adb | 39 +- Ada95/samples/sample-text_io_demo.ads | 38 +- Ada95/samples/sample.adb | 46 +- Ada95/samples/sample.ads | 38 +- Ada95/samples/status.adb | 56 + Ada95/samples/status.ads | 55 + Ada95/samples/tour.adb | 38 +- Ada95/samples/tour.ads | 38 +- INSTALL | 31 +- MANIFEST | 150 +- Makefile.glibc | 301 +- Makefile.in | 55 +- NEWS | 1068 +++++- README | 95 +- TO-DO | 52 +- aclocal.m4 | 1429 +++++--- announce.html | 166 +- announce.html.in | 162 +- c++/Makefile.in | 176 +- c++/NEWS | 25 +- c++/PROBLEMS | 7 +- c++/README-first | 39 +- c++/cursesapp.cc | 146 + c++/cursesapp.h | 163 + c++/cursesf.cc | 423 +++ c++/cursesf.h | 823 +++++ c++/cursesm.cc | 335 +- c++/cursesm.h | 477 ++- c++/cursesmain.cc | 51 + c++/cursesp.cc | 87 +- c++/cursesp.h | 142 +- c++/cursesw.cc | 148 +- c++/cursesw.h | 770 ++++- c++/cursslk.cc | 121 + c++/cursslk.h | 200 ++ c++/demo.cc | 301 +- c++/edit_cfg.sh | 59 + c++/etip.h | 148 - c++/etip.h.in | 232 ++ c++/headers | 39 + c++/internal.h | 39 +- c++/modules | 64 +- config.guess | 696 ++++ config.sub | 927 +++++ configure | 3031 ++++++++++++----- configure.in | 676 ++-- dist.mk | 12 +- form/Makefile.in | 73 +- form/READ.ME | 8 +- form/fld_arg.c | 91 + form/fld_attr.c | 111 + form/fld_current.c | 124 + form/fld_def.c | 473 +-- form/fld_dup.c | 97 + form/fld_ftchoice.c | 62 + form/fld_ftlink.c | 83 + form/fld_info.c | 91 + form/fld_just.c | 81 + form/fld_link.c | 90 + form/fld_max.c | 74 + form/fld_move.c | 62 + form/fld_newftyp.c | 125 + form/fld_opts.c | 121 + form/fld_pad.c | 78 + form/fld_page.c | 76 + form/fld_stat.c | 54 +- form/fld_type.c | 256 +- form/fld_user.c | 58 +- form/form.h | 66 +- form/form.priv.h | 76 +- form/frm_adabind.c | 70 +- form/frm_cursor.c | 66 + form/frm_data.c | 54 +- form/frm_def.c | 113 +- form/frm_driver.c | 774 +---- form/frm_hook.c | 54 +- form/frm_opts.c | 54 +- form/frm_page.c | 100 + form/frm_post.c | 117 + form/frm_req_name.c | 54 +- form/frm_scale.c | 63 + form/frm_sub.c | 69 + form/frm_user.c | 58 +- form/frm_win.c | 87 +- form/fty_alnum.c | 10 +- form/fty_alpha.c | 10 +- form/fty_enum.c | 26 +- form/fty_int.c | 12 +- form/fty_num.c | 14 +- form/fty_regex.c | 32 +- form/headers | 49 +- form/llib-lform | 999 +++--- form/modules | 106 +- include/Caps | 53 +- include/MKparametrized.sh | 2 +- include/MKterm.h.awk.in | 122 +- include/Makefile.in | 59 +- include/capdefaults.c | 57 +- include/config_h.in | 26 - include/curses.h.in | 276 +- include/edit_cfg.sh | 71 +- include/headers | 49 +- include/nc_alloc.h | 52 +- include/nc_panel.h | 66 + include/ncurses_cfg.hin | 56 + include/term_entry.h | 50 +- include/termcap.h.in | 55 +- include/tic.h | 94 +- include/unctrl.h.in | 59 +- install-sh | 2 +- man/Makefile.in | 64 +- man/curs_addch.3x | 11 +- man/curs_attr.3x | 5 +- man/curs_color.3x | 4 +- man/curs_getch.3x | 13 +- man/curs_inch.3x | 5 +- man/curs_inchstr.3x | 2 +- man/curs_inopts.3x | 7 +- man/curs_kernel.3x | 4 +- man/curs_mouse.3x | 25 +- man/curs_outopts.3x | 5 + man/curs_print.3x | 3 +- man/curs_refresh.3x | 8 +- man/curs_scanw.3x | 3 +- man/curs_termcap.3x | 4 +- man/curs_terminfo.3x | 8 +- man/define_key.3x | 69 + man/dft_fgbg.3x | 57 +- man/form.3x | 155 +- man/form_driver.3x | 4 +- man/form_field_buffer.3x | 2 +- man/form_field_new.3x | 3 +- man/form_field_opts.3x | 3 +- man/form_field_userptr.3x | 4 +- man/form_field_validation.3x | 4 +- man/form_fieldtype.3x | 5 +- man/form_userptr.3x | 4 +- man/infocmp.1m | 8 +- man/keyok.3x | 70 + man/make_sed.sh | 83 + man/man_db.renames | 19 +- man/menu.3x | 142 +- man/menu_driver.3x | 4 +- man/menu_format.3x | 5 +- man/menu_pattern.3x | 4 +- man/menu_post.3x | 3 +- man/menu_userptr.3x | 4 +- man/mitem_new.3x | 9 +- man/mitem_userptr.3x | 4 +- man/mitem_value.3x | 4 +- man/ncurses.3x | 548 +-- man/panel.3x | 11 +- man/resizeterm.3x | 61 +- man/term.5 | 2 +- man/term.7 | 3 +- man/terminfo.head | 8 +- man/terminfo.tail | 6 +- man/tic.1m | 12 +- man/toe.1m | 3 +- man/tset.1 | 2 +- man/wresize.3x | 53 +- menu/Makefile.in | 83 +- menu/READ.ME | 8 +- menu/eti.h | 52 +- menu/headers | 49 +- menu/llib-lmenu | 207 +- menu/m_adabind.c | 69 +- menu/m_attribs.c | 97 +- menu/m_cursor.c | 56 +- menu/m_driver.c | 143 +- menu/m_format.c | 56 +- menu/m_global.c | 56 +- menu/m_hook.c | 56 +- menu/m_item_cur.c | 116 +- menu/m_item_nam.c | 56 +- menu/m_item_new.c | 90 +- menu/m_item_opt.c | 56 +- menu/m_item_top.c | 102 + menu/m_item_use.c | 64 +- menu/m_item_val.c | 56 +- menu/m_item_vis.c | 56 +- menu/m_items.c | 56 +- menu/m_new.c | 56 +- menu/m_opts.c | 56 +- menu/m_pad.c | 90 + menu/m_pattern.c | 117 + menu/m_post.c | 56 +- menu/m_req_name.c | 56 +- menu/m_scale.c | 71 + menu/m_spacing.c | 56 +- menu/m_sub.c | 80 + menu/m_userptr.c | 64 +- menu/m_win.c | 124 +- menu/menu.h | 68 +- menu/menu.priv.h | 53 +- menu/mf_common.h | 60 +- menu/modules | 59 +- misc/Makefile.in | 71 +- misc/emx.src | 810 +++++ misc/hackguide.doc | 7 +- misc/hackguide.html | 8 +- misc/makellib | 51 +- misc/ncurses-intro.doc | 22 +- misc/ncurses-intro.html | 21 +- misc/run_tic.sh | 51 +- misc/shlib | 51 +- misc/tdlint | 51 +- misc/terminfo.src | 1784 ++++++++-- mk-0th.awk | 63 +- mk-1st.awk | 188 +- mk-2nd.awk | 130 +- mkinstalldirs | 3 +- ncurses.lsm | 30 - ncurses/MKcaptab.awk | 3 +- ncurses/MKexpanded.sh | 57 +- ncurses/MKkeyname.awk | 34 +- ncurses/MKkeys.awk | 1 - ncurses/MKlib_gen.sh | 124 +- ncurses/MKnames.awk | 6 +- ncurses/MKunctrl.awk | 53 +- ncurses/Makefile.in | 123 +- ncurses/SigAction.h | 72 +- ncurses/alloc_entry.c | 54 +- ncurses/captoinfo.c | 82 +- ncurses/comp_error.c | 60 +- ncurses/comp_expand.c | 137 + ncurses/comp_hash.c | 54 +- ncurses/comp_parse.c | 76 +- ncurses/comp_scan.c | 109 +- ncurses/curses.priv.h | 373 +- ncurses/define_key.c | 54 + ncurses/fifo_defs.h | 59 + ncurses/hardscroll.c | 321 +- ncurses/hashmap.c | 407 ++- ncurses/keyok.c | 69 + ncurses/keys.list | 308 +- ncurses/lib_acs.c | 59 +- ncurses/lib_adabind.c | 112 +- ncurses/lib_addch.c | 214 +- ncurses/lib_addstr.c | 123 +- ncurses/lib_baudrate.c | 81 +- ncurses/lib_beep.c | 78 +- ncurses/lib_bkgd.c | 122 +- ncurses/lib_box.c | 124 +- ncurses/lib_chgat.c | 62 + ncurses/lib_clear.c | 65 +- ncurses/lib_clearok.c | 56 + ncurses/lib_clrbot.c | 113 +- ncurses/lib_clreol.c | 127 +- ncurses/lib_color.c | 138 +- ncurses/lib_cur_term.c | 81 + ncurses/lib_data.c | 71 +- ncurses/lib_delch.c | 86 +- ncurses/lib_delwin.c | 52 +- ncurses/lib_dft_fgbg.c | 52 +- ncurses/lib_doupdate.c | 911 ++++- ncurses/lib_echo.c | 61 + ncurses/lib_endwin.c | 86 +- ncurses/lib_erase.c | 99 +- ncurses/lib_flash.c | 69 + ncurses/lib_freeall.c | 56 +- ncurses/lib_getch.c | 324 +- ncurses/lib_getstr.c | 90 +- ncurses/lib_hline.c | 81 + ncurses/lib_immedok.c | 54 + ncurses/lib_inchstr.c | 63 +- ncurses/lib_initscr.c | 90 +- ncurses/lib_insch.c | 78 +- ncurses/lib_insdel.c | 72 +- ncurses/lib_insstr.c | 108 +- ncurses/lib_instr.c | 81 +- ncurses/lib_isendwin.c | 52 +- ncurses/lib_kernel.c | 137 +- ncurses/lib_leaveok.c | 60 + ncurses/lib_longname.c | 54 +- ncurses/lib_mouse.c | 236 +- ncurses/lib_move.c | 59 +- ncurses/lib_mvcur.c | 487 +-- ncurses/lib_mvwin.c | 96 +- ncurses/lib_napms.c | 88 + ncurses/lib_newterm.c | 134 +- ncurses/lib_newwin.c | 56 +- ncurses/lib_nl.c | 80 + ncurses/lib_options.c | 344 +- ncurses/lib_overlay.c | 66 +- ncurses/lib_pad.c | 104 +- ncurses/lib_print.c | 52 +- ncurses/lib_printw.c | 125 +- ncurses/lib_raw.c | 293 +- ncurses/lib_redrawln.c | 67 + ncurses/lib_refresh.c | 76 +- ncurses/lib_restart.c | 91 +- ncurses/lib_scanw.c | 60 +- ncurses/lib_screen.c | 139 +- ncurses/lib_scroll.c | 75 +- ncurses/lib_scrollok.c | 56 + ncurses/lib_scrreg.c | 75 +- ncurses/lib_set_term.c | 155 +- ncurses/lib_setup.c | 180 +- ncurses/lib_slk.c | 414 +-- ncurses/lib_slkatrof.c | 55 + ncurses/lib_slkatron.c | 55 + ncurses/lib_slkatrset.c | 55 + ncurses/lib_slkattr.c | 54 + ncurses/lib_slkclear.c | 58 + ncurses/lib_slkinit.c | 51 + ncurses/lib_slklab.c | 51 + ncurses/lib_slkrefr.c | 126 + ncurses/lib_slkset.c | 95 + ncurses/lib_slktouch.c | 53 + ncurses/lib_termcap.c | 88 +- ncurses/lib_ti.c | 75 +- ncurses/lib_touch.c | 65 +- ncurses/lib_tparm.c | 83 +- ncurses/lib_tputs.c | 140 +- ncurses/lib_trace.c | 56 +- ncurses/lib_traceatr.c | 97 +- ncurses/lib_tracechr.c | 50 +- ncurses/lib_tracedmp.c | 58 +- ncurses/lib_tracemse.c | 52 +- ncurses/lib_tstp.c | 133 +- ncurses/lib_twait.c | 138 +- ncurses/lib_ungetch.c | 74 + ncurses/lib_vidattr.c | 120 +- ncurses/lib_vline.c | 81 + ncurses/lib_wattroff.c | 55 + ncurses/lib_wattron.c | 55 + ncurses/lib_window.c | 79 +- ncurses/llib-lncurses | 1755 +++++----- ncurses/make_keys.c | 134 + ncurses/modules | 148 +- ncurses/name_match.c | 85 + ncurses/nc_panel.c | 41 + ncurses/parse_entry.c | 71 +- ncurses/read_entry.c | 113 +- ncurses/read_termcap.c | 503 ++- ncurses/resizeterm.c | 59 +- ncurses/safe_sprintf.c | 241 ++ ncurses/sigaction.c | 52 +- ncurses/softscroll.c | 257 ++ ncurses/trace_buf.c | 79 + ncurses/tries.c | 185 + ncurses/wresize.c | 81 +- ncurses/write_entry.c | 100 +- panel/Makefile.in | 73 +- panel/headers | 49 +- panel/llib-lpanel | 187 +- panel/modules | 66 +- panel/p_above.c | 51 + panel/p_below.c | 53 + panel/p_bottom.c | 53 + panel/p_delete.c | 53 + panel/p_hidden.c | 47 + panel/p_hide.c | 99 + panel/p_move.c | 59 + panel/p_new.c | 99 + panel/p_replace.c | 52 + panel/p_show.c | 76 + panel/p_top.c | 45 + panel/p_update.c | 61 + panel/p_user.c | 55 + panel/p_win.c | 49 + panel/panel.c | 552 +-- panel/panel.h | 58 +- panel/panel.priv.h | 59 +- progs/Makefile.in | 171 +- progs/capconvert | 133 +- progs/clear.c | 54 +- progs/dump_entry.c | 231 +- progs/dump_entry.h | 53 +- progs/infocmp.c | 97 +- progs/modules | 51 +- progs/progs.priv.h | 71 +- progs/tic.c | 85 +- progs/toe.c | 63 +- progs/tput.c | 83 +- progs/tset.c | 269 +- shlib-versions | 4 + sysdeps/unix/sysv/linux/alpha/configure | 2 + sysdeps/unix/sysv/linux/configure | 315 +- sysdeps/unix/sysv/linux/edit_man.sh | 0 sysdeps/unix/sysv/linux/run_tic.sh | 51 +- tack/Makefile.in | 167 + tack/modules | 47 + tar-copy.sh | 70 + test/Makefile.in | 208 +- test/bs.c | 56 +- test/configure.in | 189 +- test/firework.c | 4 +- test/firstlast.c | 89 + test/gdc.c | 74 +- test/hanoi.c | 16 +- test/hashtest.c | 56 +- test/keynames.c | 14 + test/knight.c | 4 +- test/lrtest.c | 4 +- test/modules | 56 +- test/ncurses.c | 281 +- test/ncurses_tst.hin | 56 + test/newdemo.c | 55 +- test/rain.c | 123 +- test/tclock.c | 43 +- test/test.priv.h | 54 +- test/testaddch.c | 60 + test/testcurs.c | 329 +- test/testscanw.c | 38 + test/view.c | 185 +- test/worm.c | 16 +- test/xmas.c | 121 +- 588 files changed, 43616 insertions(+), 19301 deletions(-) delete mode 100644 Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.adb delete mode 100644 Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.ads create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-user.adb create mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types-user.ads delete mode 100644 Ada95/ada_include/terminal_interface-curses-forms-field_types.ads create mode 100644 Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 delete mode 100644 Ada95/html/Makefile create mode 100644 Ada95/html/define_key.3x.html create mode 100644 Ada95/html/keyok.3x.html delete mode 100644 Ada95/html/terminal_interface-curses-forms-choice_field_types_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-alpha_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-alphanumeric_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-enumeration-ada_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-enumeration_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-intfield_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-ipv4_address_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-numeric_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-regexp_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-user-choice_s.html create mode 100644 Ada95/html/terminal_interface-curses-forms-field_types-user_s.html create mode 100644 Ada95/samples/rain.adb create mode 100644 Ada95/samples/rain.ads create mode 100644 Ada95/samples/status.adb create mode 100644 Ada95/samples/status.ads create mode 100644 c++/cursesapp.cc create mode 100644 c++/cursesapp.h create mode 100644 c++/cursesf.cc create mode 100644 c++/cursesf.h create mode 100644 c++/cursesmain.cc create mode 100644 c++/cursslk.cc create mode 100644 c++/cursslk.h create mode 100755 c++/edit_cfg.sh delete mode 100644 c++/etip.h create mode 100644 c++/etip.h.in create mode 100644 c++/headers create mode 100755 config.guess create mode 100755 config.sub create mode 100644 form/fld_arg.c create mode 100644 form/fld_attr.c create mode 100644 form/fld_current.c create mode 100644 form/fld_dup.c create mode 100644 form/fld_ftchoice.c create mode 100644 form/fld_ftlink.c create mode 100644 form/fld_info.c create mode 100644 form/fld_just.c create mode 100644 form/fld_link.c create mode 100644 form/fld_max.c create mode 100644 form/fld_move.c create mode 100644 form/fld_newftyp.c create mode 100644 form/fld_opts.c create mode 100644 form/fld_pad.c create mode 100644 form/fld_page.c create mode 100644 form/frm_cursor.c create mode 100644 form/frm_page.c create mode 100644 form/frm_post.c create mode 100644 form/frm_scale.c create mode 100644 form/frm_sub.c delete mode 100644 include/config_h.in create mode 100644 include/nc_panel.h create mode 100644 include/ncurses_cfg.hin create mode 100644 man/define_key.3x create mode 100644 man/keyok.3x create mode 100755 man/make_sed.sh create mode 100644 menu/m_item_top.c create mode 100644 menu/m_pad.c create mode 100644 menu/m_pattern.c create mode 100644 menu/m_scale.c create mode 100644 menu/m_sub.c create mode 100644 misc/emx.src delete mode 100644 ncurses.lsm delete mode 100644 ncurses/MKkeys.awk create mode 100644 ncurses/comp_expand.c create mode 100644 ncurses/define_key.c create mode 100644 ncurses/fifo_defs.h create mode 100644 ncurses/keyok.c create mode 100644 ncurses/lib_chgat.c create mode 100644 ncurses/lib_clearok.c create mode 100644 ncurses/lib_cur_term.c create mode 100644 ncurses/lib_echo.c create mode 100644 ncurses/lib_flash.c create mode 100644 ncurses/lib_hline.c create mode 100644 ncurses/lib_immedok.c create mode 100644 ncurses/lib_leaveok.c create mode 100644 ncurses/lib_napms.c create mode 100644 ncurses/lib_nl.c create mode 100644 ncurses/lib_redrawln.c create mode 100644 ncurses/lib_scrollok.c create mode 100644 ncurses/lib_slkatrof.c create mode 100644 ncurses/lib_slkatron.c create mode 100644 ncurses/lib_slkatrset.c create mode 100644 ncurses/lib_slkattr.c create mode 100644 ncurses/lib_slkclear.c create mode 100644 ncurses/lib_slkinit.c create mode 100644 ncurses/lib_slklab.c create mode 100644 ncurses/lib_slkrefr.c create mode 100644 ncurses/lib_slkset.c create mode 100644 ncurses/lib_slktouch.c create mode 100644 ncurses/lib_ungetch.c create mode 100644 ncurses/lib_vline.c create mode 100644 ncurses/lib_wattroff.c create mode 100644 ncurses/lib_wattron.c create mode 100644 ncurses/make_keys.c create mode 100644 ncurses/name_match.c create mode 100644 ncurses/nc_panel.c create mode 100644 ncurses/safe_sprintf.c create mode 100644 ncurses/softscroll.c create mode 100644 ncurses/trace_buf.c create mode 100644 ncurses/tries.c create mode 100644 panel/p_above.c create mode 100644 panel/p_below.c create mode 100644 panel/p_bottom.c create mode 100644 panel/p_delete.c create mode 100644 panel/p_hidden.c create mode 100644 panel/p_hide.c create mode 100644 panel/p_move.c create mode 100644 panel/p_new.c create mode 100644 panel/p_replace.c create mode 100644 panel/p_show.c create mode 100644 panel/p_top.c create mode 100644 panel/p_update.c create mode 100644 panel/p_user.c create mode 100644 panel/p_win.c create mode 100644 shlib-versions create mode 100755 sysdeps/unix/sysv/linux/alpha/configure mode change 100644 => 100755 sysdeps/unix/sysv/linux/configure mode change 100644 => 100755 sysdeps/unix/sysv/linux/edit_man.sh create mode 100644 tack/Makefile.in create mode 100644 tack/modules create mode 100755 tar-copy.sh create mode 100644 test/firstlast.c create mode 100644 test/keynames.c create mode 100644 test/ncurses_tst.hin create mode 100644 test/testaddch.c create mode 100644 test/testscanw.c diff --git a/ANNOUNCE b/ANNOUNCE index 95ae5be2..3383dedd 100644 --- 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 @@ -19,26 +19,26 @@ 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. @@ -60,9 +60,19 @@ 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. @@ -132,7 +142,7 @@ 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 @@ -141,6 +151,12 @@ 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 @@ -160,38 +176,35 @@ 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 @ 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 diff --git a/Ada95/Makefile.in b/Ada95/Makefile.in index f4f6a816..49bbb602 100644 --- a/Ada95/Makefile.in +++ b/Ada95/Makefile.in @@ -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 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 : + @ diff --git a/Ada95/README b/Ada95/README index 6a5362df..28836a2f 100644 --- a/Ada95/README +++ b/Ada95/README @@ -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 1996 Caveats: This is the first delivery of this binding. It has not been diff --git a/Ada95/ada_include/Makefile.in b/Ada95/ada_include/Makefile.in index 7cb92304..3bc6c06f 100644 --- a/Ada95/ada_include/Makefile.in +++ b/Ada95/ada_include/Makefile.in @@ -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 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 diff --git a/Ada95/ada_include/terminal_interface-curses-aux.adb b/Ada95/ada_include/terminal_interface-curses-aux.adb index e6fac3b9..c6827a40 100644 --- a/Ada95/ada_include/terminal_interface-curses-aux.adb +++ b/Ada95/ada_include/terminal_interface-curses-aux.adb @@ -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 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 diff --git a/Ada95/ada_include/terminal_interface-curses-aux.ads b/Ada95/ada_include/terminal_interface-curses-aux.ads index 834ad7dc..1221b2e5 100644 --- a/Ada95/ada_include/terminal_interface-curses-aux.ads +++ b/Ada95/ada_include/terminal_interface-curses-aux.ads @@ -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 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 index 396287ec..00000000 --- a/Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.adb +++ /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 index 24a9375f..00000000 --- a/Ada95/ada_include/terminal_interface-curses-forms-choice_field_types.ads +++ /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 index 00000000..8c124159 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.adb @@ -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 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 index 00000000..e1ea0666 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alpha.ads @@ -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 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 index 00000000..6d7eb3ad --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.adb @@ -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 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 index 00000000..20ec1559 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-alphanumeric.ads @@ -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 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 index 00000000..7ddbac49 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.adb @@ -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 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 index 00000000..e867b9e3 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration-ada.ads @@ -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 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 index 00000000..6fa8daec --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.adb @@ -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 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 index 00000000..55309b60 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-enumeration.ads @@ -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 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 index 00000000..e5742011 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.adb @@ -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 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 index 00000000..f7f8f2b4 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-intfield.ads @@ -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 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 index 00000000..1cf79879 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.adb @@ -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 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 index 00000000..eb057f26 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-ipv4_address.ads @@ -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 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 index 00000000..0a8ae72c --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.adb @@ -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 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 index 00000000..28844622 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-numeric.ads @@ -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 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 index 00000000..e8940035 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.adb @@ -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 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 index 00000000..20f7c5eb --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-regexp.ads @@ -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 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 index 00000000..1606eb5d --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.adb @@ -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 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 index 00000000..ced81fe8 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user-choice.ads @@ -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 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 index 00000000..e5ce433c --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user.adb @@ -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 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 index 00000000..f06459b8 --- /dev/null +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types-user.ads @@ -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 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; diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_types.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_types.adb index 13d2885f..60e1ff38 100644 --- a/Ada95/ada_include/terminal_interface-curses-forms-field_types.adb +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_types.adb @@ -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 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 index 70589948..00000000 --- a/Ada95/ada_include/terminal_interface-curses-forms-field_types.ads +++ /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; - diff --git a/Ada95/ada_include/terminal_interface-curses-forms-field_user_data.adb b/Ada95/ada_include/terminal_interface-curses-forms-field_user_data.adb index dd8aba56..a5729d40 100644 --- a/Ada95/ada_include/terminal_interface-curses-forms-field_user_data.adb +++ b/Ada95/ada_include/terminal_interface-curses-forms-field_user_data.adb @@ -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 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; diff --git a/Ada95/ada_include/terminal_interface-curses-forms-form_user_data.adb b/Ada95/ada_include/terminal_interface-curses-forms-form_user_data.adb index 9022a044..4c6f34cc 100644 --- a/Ada95/ada_include/terminal_interface-curses-forms-form_user_data.adb +++ b/Ada95/ada_include/terminal_interface-curses-forms-form_user_data.adb @@ -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 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; diff --git a/Ada95/ada_include/terminal_interface-curses-forms.adb b/Ada95/ada_include/terminal_interface-curses-forms.adb index 059ae238..fbb43b7f 100644 --- a/Ada95/ada_include/terminal_interface-curses-forms.adb +++ b/Ada95/ada_include/terminal_interface-curses-forms.adb @@ -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 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; - end Unregister_Type; - ----------------------------------------------------------------------------- - -- | - -- | - -- | - procedure Set_Type (Fld : Field; - Fld_Type : Ada_Defined_Field_Type) - is - function Set_Fld_Type (F : Field := Fld; - Ct : C_Field_Type; - Arg1 : Ada_Defined_Field_Type'Class) - return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - Res : Eti_Error; - C : constant C_Field_Type := Search_Type (Fld_Type); - begin - if C = Null_Field_Type then - raise Form_Exception; - else - Res := Set_Fld_Type (Fld, C, Fld_Type); - if Res /= E_Ok then - Eti_Exception (Res); - end if; - end if; - end Set_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Ada_Defined_Field_Type) - return C_Field_Type - is - C : constant C_Field_Type := Search_Type (Ftype); - begin - if C = Null_Field_Type then - raise Form_Exception; - else - return C; - end if; - end Native_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Alpha_Field) - return C_Field_Type - is - C_Alpha_Field_Type : C_Field_Type; - pragma Import (C, C_Alpha_Field_Type, "TYPE_ALPHA"); - begin - return C_Alpha_Field_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Alpha_Field) - is - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type); - Arg1 : C_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Res : Eti_Error; - begin - Res := Set_Fld_Type (Arg1 => C_Int (Fld_Type.Minimum_Field_Width)); - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Alpha_Field'(Fld_Type); - end if; - end Set_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Alpha_Numeric_Field) - return C_Field_Type - is - C_Alpha_Numeric_Field_Type : C_Field_Type; - pragma Import (C, C_Alpha_Numeric_Field_Type, "TYPE_ALNUM"); - begin - return C_Alpha_Numeric_Field_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Alpha_Numeric_Field) - is - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type); - Arg1 : C_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Res : Eti_Error; - begin - Res := Set_Fld_Type (Arg1 => C_Int (Fld_Type.Minimum_Field_Width)); - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Alpha_Numeric_Field'(Fld_Type); - end if; - end Set_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Integer_Field) - return C_Field_Type - is - C_Integer_Field_Type : C_Field_Type; - pragma Import (C, C_Integer_Field_Type, "TYPE_INTEGER"); - begin - return C_Integer_Field_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Integer_Field) - is - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type); - Arg1 : C_Int; - Arg2 : C_Long_Int; - Arg3 : C_Long_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Res : Eti_Error; - begin - Res := Set_Fld_Type (Arg1 => C_Int (Fld_Type.Precision), - Arg2 => C_Long_Int (Fld_Type.Lower_Limit), - Arg3 => C_Long_Int (Fld_Type.Upper_Limit)); - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Integer_Field'(Fld_Type); - end if; - end Set_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Numeric_Field) - return C_Field_Type - is - C_Numeric_Field_Type : C_Field_Type; - pragma Import (C, C_Numeric_Field_Type, "TYPE_NUMERIC"); - begin - return C_Numeric_Field_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Numeric_Field) - is - type Double is new Interfaces.C.double; - - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type); - Arg1 : Double; - Arg2 : Double; - Arg3 : Double) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Res : Eti_Error; - begin - Res := Set_Fld_Type (Arg1 => Double (Fld_Type.Precision), - Arg2 => Double (Fld_Type.Lower_Limit), - Arg3 => Double (Fld_Type.Upper_Limit)); - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Numeric_Field'(Fld_Type); - end if; - end Set_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Regular_Expression_Field) - return C_Field_Type - is - C_Regexp_Field_Type : C_Field_Type; - pragma Import (C, C_Regexp_Field_Type, "TYPE_REGEXP"); - begin - return C_Regexp_Field_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Regular_Expression_Field) - is - type Char_Ptr is access all Interfaces.C.Char; - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type); - Arg1 : Char_Ptr) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Txt : char_array (0 .. Fld_Type.Regular_Expression.all'Length); - Len : size_t; - Res : Eti_Error; - begin - To_C (Fld_Type.Regular_Expression.all, Txt, Len); - Res := Set_Fld_Type (Arg1 => Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Regular_Expression_Field'(Fld_Type); - end if; - end Set_Type; - -- | - -- | - -- | - function Native_Type (Ftype : Enumeration_Field) - return C_Field_Type - is - C_Enum_Type : C_Field_Type; - pragma Import (C, C_Enum_Type, "TYPE_ENUM"); - begin - return C_Enum_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - 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_Type (Fld : in Field; - Fld_Type : in Enumeration_Field) - is - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type); - Arg1 : chars_ptr_array; - Arg2 : C_Int; -- case - Arg3 : C_Int) return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Res : Eti_Error; - begin - if Fld_Type.Arr = null then - raise Form_Exception; - end if; - Res := Set_Fld_Type (Arg1 => Fld_Type.Arr.all, - Arg2 => C_Int (Boolean'Pos - (Fld_Type.Case_Sensitive)), - Arg3 => - C_Int (Boolean'Pos - (Fld_Type.Match_Must_Be_Unique))); - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Enumeration_Field'(Fld_Type); - end if; - end Set_Type; + Release (FA); + end Free; + -- |===================================================================== - function Native_Type (Ftype : Internet_V4_Address_Field) - return C_Field_Type + function Default_Field_Options return Field_Option_Set is - C_IPV4_Field_Type : C_Field_Type; - pragma Import (C, C_IPV4_Field_Type, "TYPE_IPV4"); begin - return C_IPV4_Field_Type; - end Native_Type; - pragma Inline (Native_Type); - -- | - -- | - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Internet_V4_Address_Field) - is - function Set_Fld_Type (F : Field := Fld; - Cft : C_Field_Type := Native_Type (Fld_Type)) - return C_Int; - pragma Import (C, Set_Fld_Type, "set_field_type"); - function Field_Userptr (Fld : Field) - return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); - Res : Eti_Error; - begin - Res := Set_Fld_Type; - if Res /= E_Ok then - Eti_Exception (Res); - else - A.T := new Internet_V4_Address_Field'(Fld_Type); - end if; - end Set_Type; + return Get_Options (Null_Field); + end Default_Field_Options; - -- | - -- |===================================================================== - -- | man page form_field_validation.3x - -- |===================================================================== - -- | - -- | - -- | - function Get_Type (Fld : in Field) return Field_Type_Access + function Default_Form_Options return Form_Option_Set is - A : constant Field_User_Wrapper_Access := Field_Userptr (Fld); begin - if A = null then - return null; - else - return A.T; - end if; - end Get_Type; + return Get_Options (Null_Form); + end Default_Form_Options; -begin - Default_Field_Options := Get_Options (Null_Field); - Default_Form_Options := Get_Options (Null_Form); end Terminal_Interface.Curses.Forms; diff --git a/Ada95/ada_include/terminal_interface-curses-menus-item_user_data.adb b/Ada95/ada_include/terminal_interface-curses-menus-item_user_data.adb index 9e56187d..858e1d25 100644 --- a/Ada95/ada_include/terminal_interface-curses-menus-item_user_data.adb +++ b/Ada95/ada_include/terminal_interface-curses-menus-item_user_data.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Interfaces.C; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; @@ -45,13 +59,19 @@ package body Terminal_Interface.Curses.Menus.Item_User_Data is end if; end Set_User_Data; - procedure Get_User_Data (Itm : in Item; - Data : out User_Access) + function Get_User_Data (Itm : in Item) return User_Access is function Item_Userptr (Itm : Item) return User_Access; pragma Import (C, Item_Userptr, "item_userptr"); begin - Data := Item_Userptr (Itm); + return Item_Userptr (Itm); + end Get_User_Data; + + procedure Get_User_Data (Itm : in Item; + Data : out User_Access) + is + begin + Data := Get_User_Data (Itm); end Get_User_Data; end Terminal_Interface.Curses.Menus.Item_User_Data; diff --git a/Ada95/ada_include/terminal_interface-curses-menus-menu_user_data.adb b/Ada95/ada_include/terminal_interface-curses-menus-menu_user_data.adb index 98dc039d..25a4c941 100644 --- a/Ada95/ada_include/terminal_interface-curses-menus-menu_user_data.adb +++ b/Ada95/ada_include/terminal_interface-curses-menus-menu_user_data.adb @@ -6,62 +6,71 @@ -- -- -- 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 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; package body Terminal_Interface.Curses.Menus.Menu_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 (Men : in Menu; Data : in User_Access) is - function Menu_Userptr (Men : Menu) return Ada_User_Wrapper_Access; - pragma Import (C, Menu_Userptr, "menu_userptr"); + function Set_Menu_Userptr (Men : Menu; + Data : User_Access) return C_Int; + pragma Import (C, Set_Menu_Userptr, "set_menu_userptr"); - U : Ada_User_Wrapper_Access := Menu_Userptr (Men); + Res : constant Eti_Error := Set_Menu_Userptr (Men, Data); begin - if U = null or else U.I = null then - raise Menu_Exception; + if Res /= E_Ok then + Eti_Exception (Res); end if; - U.U := To_Address (Data); end Set_User_Data; - procedure Get_User_Data (Men : in Menu; - Data : out User_Access) + function Get_User_Data (Men : in Menu) return User_Access is - function Menu_Userptr (Men : Menu) return Ada_User_Wrapper_Access; + function Menu_Userptr (Men : Menu) return User_Access; pragma Import (C, Menu_Userptr, "menu_userptr"); + begin + return Menu_Userptr (Men); + end Get_User_Data; - U : Ada_User_Wrapper_Access := Menu_Userptr (Men); + procedure Get_User_Data (Men : in Menu; + Data : out User_Access) + is begin - if U = null then - raise Menu_Exception; - else - Data := To_Pointer (U.U); - end if; + Data := Get_User_Data (Men); end Get_User_Data; end Terminal_Interface.Curses.Menus.Menu_User_Data; diff --git a/Ada95/ada_include/terminal_interface-curses-menus.adb b/Ada95/ada_include/terminal_interface-curses-menus.adb index 33f06603..2df514ec 100644 --- a/Ada95/ada_include/terminal_interface-curses-menus.adb +++ b/Ada95/ada_include/terminal_interface-curses-menus.adb @@ -6,31 +6,45 @@ -- -- -- 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 1996 -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.13 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ +with Ada.Unchecked_Deallocation; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; -with Interfaces.C.Strings; +with Interfaces.C.Strings; use Interfaces.C.Strings; with Terminal_Interface.Curses; -with Ada.Unchecked_Deallocation; with Unchecked_Conversion; package body Terminal_Interface.Curses.Menus is @@ -54,17 +68,9 @@ package body Terminal_Interface.Curses.Menus is Unchecked_Conversion (C_Int, Item_Option_Set); ------------------------------------------------------------------------------- - procedure Free_Allocated_Items is - new Ada.Unchecked_Deallocation (Item_Array, Item_Array_Access); - - procedure Free_User_Wrapper is - new Ada.Unchecked_Deallocation (Ada_User_Wrapper, - Ada_User_Wrapper_Access); - ------------------------------------------------------------------------------ procedure Request_Name (Key : in Menu_Request_Code; - Name : out String) + Name : out String) is function Request_Name (Key : C_Int) return chars_ptr; pragma Import (C, Request_Name, "menu_request_name"); @@ -72,13 +78,14 @@ package body Terminal_Interface.Curses.Menus is Fill_String (Request_Name (C_Int (Key)), Name); end Request_Name; - -- !!! W A R N I N G !!! - -- If you want to port this binding to a non ncurses version of the - -- ETI, this must be rewritten. In ncurses the menu items and - -- descriptions may be automatic variables, because ncurses copies - -- the parameters into private allocated internal structures. - -- Other implementations don't do that usually, so depending on - -- scopes you may see unexpected results. + function Request_Name (Key : Menu_Request_Code) return String + is + function Request_Name (Key : C_Int) return chars_ptr; + pragma Import (C, Request_Name, "menu_request_name"); + begin + return Fill_String (Request_Name (C_Int (Key))); + end Request_Name; + function Create (Name : String; Description : String := "") return Item is @@ -86,15 +93,23 @@ package body Terminal_Interface.Curses.Menus is function Newitem (Name, Desc : Char_Ptr) return Item; pragma Import (C, Newitem, "new_item"); - Name_Str : char_array (0 .. Name'Length); - Desc_Str : char_array (0 .. Description'Length); + type Name_String is new char_array (0 .. Name'Length); + type Name_String_Ptr is access Name_String; + pragma Controlled (Name_String_Ptr); + + type Desc_String is new char_array (0 .. Description'Length); + type Desc_String_Ptr is access Desc_String; + pragma Controlled (Desc_String_Ptr); + + Name_Str : Name_String_Ptr := new Name_String; + Desc_Str : Desc_String_Ptr := new Desc_String; Name_Len, Desc_Len : size_t; Result : Item; begin - To_C (Name, Name_Str, Name_Len); - To_C (Description, Desc_Str, Desc_Len); - Result := Newitem (Name_Str (Name_Str'First)'Access, - Desc_Str (Desc_Str'First)'Access); + To_C (Name, Name_Str.all, Name_Len); + To_C (Description, Desc_Str.all, Desc_Len); + Result := Newitem (Name_Str.all (Name_Str.all'First)'Access, + Desc_Str.all (Desc_Str.all'First)'Access); if Result = Null_Item then raise Eti_System_Error; end if; @@ -103,11 +118,26 @@ package body Terminal_Interface.Curses.Menus is procedure Delete (Itm : in out Item) is + function Descname (Itm : Item) return chars_ptr; + pragma Import (C, Descname, "item_description"); + function Itemname (Itm : Item) return chars_ptr; + pragma Import (C, Itemname, "item_name"); + function Freeitem (Itm : Item) return C_Int; pragma Import (C, Freeitem, "free_item"); - Res : constant Eti_Error := Freeitem (Itm); + Res : Eti_Error; + Ptr : chars_ptr; begin + Ptr := Descname (Itm); + if Ptr /= Null_Ptr then + Interfaces.C.Strings.Free (Ptr); + end if; + Ptr := Itemname (Itm); + if Ptr /= Null_Ptr then + Interfaces.C.Strings.Free (Ptr); + end if; + Res := Freeitem (Itm); if Res /= E_Ok then Eti_Exception (Res); end if; @@ -227,6 +257,14 @@ package body Terminal_Interface.Curses.Menus is Fill_String (Itemname (Itm), Name); end Name; + function Name (Itm : in Item) return String + is + function Itemname (Itm : Item) return chars_ptr; + pragma Import (C, Itemname, "item_name"); + begin + return Fill_String (Itemname (Itm)); + end Name; + procedure Description (Itm : in Item; Description : out String) is @@ -235,6 +273,14 @@ package body Terminal_Interface.Curses.Menus is begin Fill_String (Descname (Itm), Description); end Description; + + function Description (Itm : in Item) return String + is + function Descname (Itm : Item) return chars_ptr; + pragma Import (C, Descname, "item_description"); + begin + return Fill_String (Descname (Itm)); + end Description; ------------------------------------------------------------------------------- procedure Set_Current (Men : in Menu; Itm : in Item) @@ -496,6 +542,14 @@ package body Terminal_Interface.Curses.Menus is Fill_String (Get_Menu_Mark (Men), Mark); end Mark; + function Mark (Men : Menu) return String + is + function Get_Menu_Mark (Men : Menu) return chars_ptr; + pragma Import (C, Get_Menu_Mark, "menu_mark"); + begin + return Fill_String (Get_Menu_Mark (Men)); + end Mark; + ------------------------------------------------------------------------------- procedure Set_Foreground (Men : in Menu; @@ -706,7 +760,7 @@ package body Terminal_Interface.Curses.Menus is end Set_Pattern; procedure Pattern (Men : in Menu; - Text : out String) + Text : out String) is function Get_Pattern (Men : Menu) return chars_ptr; pragma Import (C, Get_Pattern, "menu_pattern"); @@ -840,43 +894,22 @@ package body Terminal_Interface.Curses.Menus is return Menu_Term (Men); end Get_Menu_Term_Hook; ------------------------------------------------------------------------------- - -- This is a bit delicate if we want to manipulate an Ada created menu - -- from C routines or vice versa. - -- In Ada created menus we use the low level user pointer to maintain - -- binding internal additional informations about the menu. 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 menu should also manipulate the user pointer for that - -- menu. procedure Redefine (Men : in Menu; - Items : in Item_Array) + Items : in Item_Array_Access) is function Set_Items (Men : Menu; - Items : Item_Array_Access) return C_Int; + Items : System.Address) return C_Int; pragma Import (C, Set_Items, "set_menu_items"); - function Menu_Userptr (Men : Menu) return Ada_User_Wrapper_Access; - pragma Import (C, Menu_Userptr, "menu_userptr"); - - U : Ada_User_Wrapper_Access := Menu_Userptr (Men); - I : Item_Array_Access; Res : Eti_Error; begin - if U = null or else U.I = null then raise Menu_Exception; + pragma Assert (Items (Items'Last) = Null_Item); + if Items (Items'Last) /= Null_Item then + raise Menu_Exception; else - -- create internally an array of items that contains an - -- additional place for the terminating null item. - I := new Item_Array (1 .. (Items'Length + 1)); - I.all (1 .. Items'Length) := Items (Items'First .. Items'Last); - I.all (Items'Length + 1) := Null_Item; - Res := Set_Items (Men, I); + Res := Set_Items (Men, Items (Items'First)'Address); if Res /= E_Ok then - Free_Allocated_Items (I); Eti_Exception (Res); - else - Free_Allocated_Items (U.I); - U.I := I; end if; end if; end Redefine; @@ -889,65 +922,51 @@ package body Terminal_Interface.Curses.Menus is return Natural (Count (Men)); end Item_Count; - function Items (Men : Menu) return Item_Array_Access + function Items (Men : Menu; + Index : Positive) return Item is - function M_Items (Men : Menu) return Item_Array_Access; - pragma Import (C, M_Items, "menu_items"); + function M_Items (Men : Menu; + Idx : C_Int) return Item; + pragma Import (C, M_Items, "_nc_get_item"); begin - return M_Items (Men); + if Men = Null_Menu or else Index not in 1 .. Item_Count (Men) then + raise Menu_Exception; + else + return M_Items (Men, C_Int (Index) - 1); + end if; end Items; ------------------------------------------------------------------------------- - function Create (Items : Item_Array) return Menu + function Create (Items : Item_Array_Access) return Menu is - function Newmenu (Items : Item_Array_Access) return Menu; + function Newmenu (Items : System.Address) return Menu; pragma Import (C, Newmenu, "new_menu"); - function Set_Menu_Userptr (Men : Menu; - Addr : Ada_User_Wrapper_Access) return C_Int; - pragma Import (C, Set_Menu_Userptr, "set_menu_userptr"); - M : Menu; I : Item_Array_Access; - U : Ada_User_Wrapper_Access; - Res : Eti_Error; begin - I := new Item_Array (1 .. (Items'Length + 1)); - I.all (1 .. Items'Length) := Items (Items'First .. Items'Last); - I.all (Items'Length + 1) := Null_Item; - M := Newmenu (I); - if M = Null_Menu then - Free_Allocated_Items (I); + pragma Assert (Items (Items'Last) = Null_Item); + if Items (Items'Last) /= Null_Item then raise Menu_Exception; + else + M := Newmenu (Items (Items'First)'Address); + if M = Null_Menu then + raise Menu_Exception; + end if; + return M; end if; - U := new Ada_User_Wrapper' (System.Null_Address, I); - Res := Set_Menu_Userptr (M, U); - if Res /= E_Ok then - Free_Allocated_Items (I); - Free_User_Wrapper (U); - Eti_Exception (Res); - end if; - return M; end Create; procedure Delete (Men : in out Menu) is function Free (Men : Menu) return C_Int; pragma Import (C, Free, "free_menu"); - function Menu_Userptr (Men : Menu) return Ada_User_Wrapper_Access; - pragma Import (C, Menu_Userptr, "menu_userptr"); - U : Ada_User_Wrapper_Access := Menu_Userptr (Men); Res : constant Eti_Error := Free (Men); begin if Res /= E_Ok then Eti_Exception (Res); end if; - if U = null or else U.I = null then - raise Menu_Exception; - end if; - Free_Allocated_Items (U.I); - Free_User_Wrapper (U); Men := Null_Menu; end Delete; @@ -973,12 +992,35 @@ package body Terminal_Interface.Curses.Menus is end if; return Menu_Ok; end Driver; + + procedure Free (IA : in out Item_Array_Access; + Free_Items : in Boolean := False) + is + procedure Release is new Ada.Unchecked_Deallocation + (Item_Array, Item_Array_Access); + begin + if IA /= null and then Free_Items then + for I in IA'First .. (IA'Last - 1) loop + if (IA (I) /= Null_Item) then + Delete (IA (I)); + end if; + end loop; + end if; + Release (IA); + end Free; + +------------------------------------------------------------------------------- + function Default_Menu_Options return Menu_Option_Set + is + begin + return Get_Options (Null_Menu); + end Default_Menu_Options; + + function Default_Item_Options return Item_Option_Set + is + begin + return Get_Options (Null_Item); + end Default_Item_Options; ------------------------------------------------------------------------------- -begin - if Generation_Bit_Order /= System.Default_Bit_Order then - raise Constraint_Error; - end if; - Default_Menu_Options := Get_Options (Null_Menu); - Default_Item_Options := Get_Options (Null_Item); end Terminal_Interface.Curses.Menus; diff --git a/Ada95/ada_include/terminal_interface-curses-mouse.adb b/Ada95/ada_include/terminal_interface-curses-mouse.adb index 67aa6495..bef31643 100644 --- a/Ada95/ada_include/terminal_interface-curses-mouse.adb +++ b/Ada95/ada_include/terminal_interface-curses-mouse.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.9 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with System; @@ -44,6 +58,18 @@ package body Terminal_Interface.Curses.Mouse is Unchecked_Conversion (Source => Event_Mask, Target => C_Int); + function Has_Mouse return Boolean + is + function Mouse_Avail return C_Int; + pragma Import (C, Mouse_Avail, "_nc_has_mouse"); + begin + if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then + return True; + else + return False; + end if; + end Has_Mouse; + function Get_Mouse return Mouse_Event is type Event_Access is access all Mouse_Event; @@ -93,6 +119,13 @@ package body Terminal_Interface.Curses.Mouse is return CInt_To_Mask (R); end Start_Mouse; + procedure End_Mouse + is + Old : constant Event_Mask := Start_Mouse (No_Events); + begin + null; + end End_Mouse; + procedure Get_Event (Event : in Mouse_Event; Y : out Line_Position; X : out Column_Position; @@ -145,8 +178,4 @@ package body Terminal_Interface.Curses.Mouse is return Natural (Mouseinterval (C_Int (Msec))); end Mouse_Interval; -begin - if Generation_Bit_Order /= System.Default_Bit_Order then - raise Constraint_Error; - end if; end Terminal_Interface.Curses.Mouse; diff --git a/Ada95/ada_include/terminal_interface-curses-panels-user_data.adb b/Ada95/ada_include/terminal_interface-curses-panels-user_data.adb index 5d1c7e94..287511a6 100644 --- a/Ada95/ada_include/terminal_interface-curses-panels-user_data.adb +++ b/Ada95/ada_include/terminal_interface-curses-panels-user_data.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Interfaces.C; with Terminal_Interface.Curses.Aux; @@ -46,13 +60,19 @@ package body Terminal_Interface.Curses.Panels.User_Data is end if; end Set_User_Data; - procedure Get_User_Data (Pan : in Panel; - Data : out User_Access) + function Get_User_Data (Pan : in Panel) return User_Access is function Panel_Userptr (Pan : Panel) return User_Access; pragma Import (C, Panel_Userptr, "panel_userptr"); begin - Data := Panel_Userptr (Pan); + return Panel_Userptr (Pan); + end Get_User_Data; + + procedure Get_User_Data (Pan : in Panel; + Data : out User_Access) + is + begin + Data := Get_User_Data (Pan); end Get_User_Data; end Terminal_Interface.Curses.Panels.User_Data; diff --git a/Ada95/ada_include/terminal_interface-curses-panels.adb b/Ada95/ada_include/terminal_interface-curses-panels.adb index 74f7c1bd..335668d4 100644 --- a/Ada95/ada_include/terminal_interface-curses-panels.adb +++ b/Ada95/ada_include/terminal_interface-curses-panels.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-aux.adb b/Ada95/ada_include/terminal_interface-curses-text_io-aux.adb index 8be84489..abc3cab3 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-aux.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-aux.adb @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package body Terminal_Interface.Curses.Text_IO.Aux is diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-aux.ads b/Ada95/ada_include/terminal_interface-curses-text_io-aux.ads index 1582e6b0..4fad19c6 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-aux.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-aux.ads @@ -6,25 +6,40 @@ -- -- -- 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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ private package Terminal_Interface.Curses.Text_IO.Aux is + -- pragma Preelaborate (Aux); -- This routine is called from the Text_IO output routines for numeric -- and enumeration types. diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.adb index a71ca20c..60cbecb4 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Text_IO.Float_IO; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.ads index dd895e97..74759845 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-complex_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Complex_Types; @@ -36,7 +50,7 @@ package Terminal_Interface.Curses.Text_IO.Complex_IO is Default_Fore : Field := 2; Default_Aft : Field := Real'Digits - 1; Default_Exp : Field := 3; - + procedure Put (Win : in Window; Item : in Complex; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.adb index 40596004..fef58a39 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Text_IO; with Terminal_Interface.Curses.Text_IO.Aux; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.ads index d1e92453..0d567047 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-decimal_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type Num is delta <> digits <>; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.adb index 633c1d87..1d30946b 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Text_IO; with Ada.Characters.Handling; use Ada.Characters.Handling; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.ads index d715517c..08d72a8d 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-enumeration_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type Enum is (<>); diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.adb index 76703f34..e7d45af5 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Text_IO; with Terminal_Interface.Curses.Text_IO.Aux; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.ads index f3c12647..9a6faa74 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-fixed_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type Num is delta <>; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-float_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-float_io.adb index a6403743..f6255897 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-float_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-float_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Text_IO; with Terminal_Interface.Curses.Text_IO.Aux; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-float_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-float_io.ads index 670407a5..f0070db1 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-float_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-float_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type Num is digits <>; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.adb index 6f4ab6ee..8fe2fa03 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Text_IO; with Terminal_Interface.Curses.Text_IO.Aux; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.ads index 69e9661f..e21ac143 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-integer_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type Num is range <>; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.adb index d4399c4b..3125390e 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.adb @@ -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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Text_IO; with Terminal_Interface.Curses.Text_IO.Aux; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.ads index 1f0b3467..32a687b4 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io-modular_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type Num is mod <>; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io.adb b/Ada95/ada_include/terminal_interface-curses-text_io.adb index 794d6830..f362e40b 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io.adb +++ b/Ada95/ada_include/terminal_interface-curses-text_io.adb @@ -6,29 +6,43 @@ -- -- -- 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 1996 -- Version Control: --- $Revision: 1.4 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with System; package body Terminal_Interface.Curses.Text_IO is - Default_Window : Window; + Default_Window : Window := Null_Window; procedure Set_Window (Win : in Window) is @@ -321,7 +335,4 @@ package body Terminal_Interface.Curses.Text_IO is Put_Line (Get_Window, Item); end Put_Line; -begin - Default_Window := Null_Window; - end Terminal_Interface.Curses.Text_IO; diff --git a/Ada95/ada_include/terminal_interface-curses-text_io.ads b/Ada95/ada_include/terminal_interface-curses-text_io.ads index 7b057aaf..e80f33fb 100644 --- a/Ada95/ada_include/terminal_interface-curses-text_io.ads +++ b/Ada95/ada_include/terminal_interface-curses-text_io.ads @@ -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 1996 -- Version Control: --- $Revision: 1.5 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with System; with System.Parameters; diff --git a/Ada95/ada_include/terminal_interface-curses.adb b/Ada95/ada_include/terminal_interface-curses.adb index f5d2478b..b5ce9ef2 100644 --- a/Ada95/ada_include/terminal_interface-curses.adb +++ b/Ada95/ada_include/terminal_interface-curses.adb @@ -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 1996 -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.15 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with System; @@ -30,20 +44,21 @@ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Ada.Characters.Handling; use Ada.Characters.Handling; +with Ada.Strings.Fixed; with Unchecked_Conversion; package body Terminal_Interface.Curses is use type System.Bit_Order; + package ASF renames Ada.Strings.Fixed; + type chtype_array is array (size_t range <>) of aliased Attributed_Character; - pragma Pack (chtype_array); pragma Convention (C, chtype_array); ------------------------------------------------------------------------------ - procedure Key_Name (Key : in Real_Key_Code; - Name : out String) + function Key_Name (Key : in Real_Key_Code) return String is function Keyname (K : C_Int) return chars_ptr; pragma Import (C, Keyname, "keyname"); @@ -53,31 +68,49 @@ package body Terminal_Interface.Curses is if Key <= Character'Pos (Character'Last) then Ch := Character'Val (Key); if Is_Control (Ch) then - Un_Control (Attributed_Character'(Ch => Ch, - Color => Color_Pair'First, - Attr => Normal_Video), - Name); + return Un_Control (Attributed_Character'(Ch => Ch, + Color => Color_Pair'First, + Attr => Normal_Video)); elsif Is_Graphic (Ch) then - Fill_String (Null_Ptr, Name); - Name (Name'First) := Ch; + declare + S : String (1 .. 1); + begin + S (1) := Ch; + return S; + end; else - Fill_String (Null_Ptr, Name); + return ""; end if; else - Fill_String (Keyname (C_Int (Key)), Name); + return Fill_String (Keyname (C_Int (Key))); end if; end Key_Name; + + procedure Key_Name (Key : in Real_Key_Code; + Name : out String) + is + begin + ASF.Move (Key_Name (Key), Name); + end Key_Name; + ------------------------------------------------------------------------------ procedure Init_Screen is function Initscr return Window; pragma Import (C, Initscr, "initscr"); + function Check_Version (Major, Minor : C_Int) return C_Int; + pragma Import (C, Check_Version, "_nc_ada_vcheck"); + W : Window; begin - W := Initscr; - if W = Null_Window then - raise Curses_Exception; + if (Check_Version (NC_Major_Version, NC_Minor_Version) = 0) then + raise Wrong_Curses_Version; + else + W := Initscr; + if W = Null_Window then + raise Curses_Exception; + end if; end if; end Init_Screen; @@ -349,14 +382,14 @@ package body Terminal_Interface.Curses is type Char_Ptr is access all Interfaces.C.Char; function Waddnstr (Win : Window; Str : Char_Ptr; - Len : Integer := -1) return C_Int; + Len : C_Int := -1) return C_Int; pragma Import (C, Waddnstr, "waddnstr"); Txt : char_array (0 .. Str'Length); Length : size_t; begin To_C (Str, Txt, Length); - if Waddnstr (Win, Txt (Txt'First)'Access, Len) = Curses_Err then + if Waddnstr (Win, Txt (Txt'First)'Access, C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; end Add; @@ -381,7 +414,7 @@ package body Terminal_Interface.Curses is type Chtype_Ptr is access all Attributed_Character; function Waddchnstr (Win : Window; Str : Chtype_Ptr; - Len : Integer := -1) return C_Int; + Len : C_Int := -1) return C_Int; pragma Import (C, Waddchnstr, "waddchnstr"); Txt : chtype_array (0 .. Str'Length); @@ -390,7 +423,9 @@ package body Terminal_Interface.Curses is Txt (Length - 1) := Str (Natural (Length)); end loop; Txt (Str'Length) := Default_Character; - if Waddchnstr (Win, Txt (Txt'First)'Access, Len) = Curses_Err then + if Waddchnstr (Win, + Txt (Txt'First)'Access, + C_Int (Len)) = Curses_Err then raise Curses_Exception; end if; end Add; @@ -1796,6 +1831,14 @@ package body Terminal_Interface.Curses is Fill_String (Slk_Label (C_Int (Label)), Text); end Get_Soft_Label_Key; + function Get_Soft_Label_Key (Label : in Label_Number) return String + is + function Slk_Label (Label : C_Int) return chars_ptr; + pragma Import (C, Slk_Label, "slk_label"); + begin + return Fill_String (Slk_Label (C_Int (Label))); + end Get_Soft_Label_Key; + procedure Clear_Soft_Label_Keys is function Slk_Clear return C_Int; @@ -1885,6 +1928,35 @@ package body Terminal_Interface.Curses is begin return CInt_To_Chtype (Attr).Color; end Get_Soft_Label_Key_Attributes; +------------------------------------------------------------------------------ + procedure Enable_Key (Key : in Special_Key_Code; + Enable : in Boolean := True) + is + function Keyok (Keycode : C_Int; + On_Off : C_Int) return C_Int; + pragma Import (C, Keyok, "keyok"); + begin + if Keyok (C_Int (Key), Boolean'Pos (Enable)) = Curses_Err then + raise Curses_Exception; + end if; + end Enable_Key; +------------------------------------------------------------------------------ + procedure Define_Key (Definition : in String; + Key : in Special_Key_Code) + is + type Char_Ptr is access all Interfaces.C.Char; + function Defkey (Def : Char_Ptr; + Key : C_Int) return C_Int; + pragma Import (C, Defkey, "define_key"); + + Txt : char_array (0 .. Definition'Length); + Length : size_t; + begin + To_C (Definition, Txt, Length); + if Defkey (Txt (Txt'First)'Access, C_Int (Key)) = Curses_Err then + raise Curses_Exception; + end if; + end Define_Key; ------------------------------------------------------------------------------ procedure Un_Control (Ch : in Attributed_Character; Str : out String) @@ -1895,6 +1967,14 @@ package body Terminal_Interface.Curses is Fill_String (Unctrl (Chtype_To_CInt (Ch)), Str); end Un_Control; + function Un_Control (Ch : in Attributed_Character) return String + is + function Unctrl (Ch : C_Int) return chars_ptr; + pragma Import (C, Unctrl, "unctrl"); + begin + return Fill_String (Unctrl (Chtype_To_CInt (Ch))); + end Un_Control; + procedure Delay_Output (Msecs : in Natural) is function Delayoutput (Msecs : C_Int) return C_Int; @@ -1981,6 +2061,14 @@ package body Terminal_Interface.Curses is Fill_String (Longname, Name); end Long_Name; + function Long_Name return String + is + function Longname return chars_ptr; + pragma Import (C, Longname, "longname"); + begin + return Fill_String (Longname); + end Long_Name; + procedure Terminal_Name (Name : out String) is function Termname return chars_ptr; @@ -1988,6 +2076,14 @@ package body Terminal_Interface.Curses is begin Fill_String (Termname, Name); end Terminal_Name; + + function Terminal_Name return String + is + function Termname return chars_ptr; + pragma Import (C, Termname, "termname"); + begin + return Fill_String (Termname); + end Terminal_Name; ------------------------------------------------------------------------------ procedure Init_Pair (Pair : in Redefinable_Color_Pair; Fore : in Color_Number; @@ -2264,8 +2360,4 @@ package body Terminal_Interface.Curses is end if; end Transform_Coordinates; -begin - if Generation_Bit_Order /= System.Default_Bit_Order then - raise Constraint_Error; - end if; end Terminal_Interface.Curses; diff --git a/Ada95/ada_include/terminal_interface.ads b/Ada95/ada_include/terminal_interface.ads index dabec0ba..18e254d0 100644 --- a/Ada95/ada_include/terminal_interface.ads +++ b/Ada95/ada_include/terminal_interface.ads @@ -6,26 +6,43 @@ -- -- -- 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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Terminal_Interface is + pragma Pure (Terminal_Interface); -- -- Everything is in the child units -- end Terminal_Interface; + + diff --git a/Ada95/gen/Makefile.in b/Ada95/gen/Makefile.in index 775c344f..6ebf0c5e 100644 --- a/Ada95/gen/Makefile.in +++ b/Ada95/gen/Makefile.in @@ -1,31 +1,42 @@ -#---------------------------------------------------------------------------- -# -- -# GNAT ncurses Binding -- -# gen/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 1996 +# # Version Control -# $Revision: 1.8 $ +# $Revision: 1.18 $ # .SUFFIXES: SHELL = /bin/sh THIS = Makefile +top_srcdir = @top_srcdir@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -33,6 +44,8 @@ libdir = @libdir@ includedir = @includedir@ datadir = @datadir@ ticdir = $(datadir)/terminfo +ADA_INCLUDE = @ADA_INCLUDE@ +ADA_OBJECTS = @ADA_OBJECTS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -68,12 +81,11 @@ M4FLAGS = DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d' ################################################################################ -ALIB = @nc_ada_package@ +ALIB = @cf_ada_package@ ABASE = $(ALIB)-curses ADA_SRCDIR = ../ada_include ADA_OBJDIR = ../ada_objects -OBJDIR = ../objects GEN_FILES0 = Base_Defs @@ -84,7 +96,8 @@ GEN_FILES1 = Key_Definitions \ Color_Defs \ ACS_Map \ Linker_Options \ - Base_Defs + Base_Defs \ + Version_Info GEN_FILES2 = Menu_Opt_Rep \ Menu_Base_Defs \ @@ -108,6 +121,7 @@ GEN_TARGETS = $(ADA_SRCDIR)/$(ABASE).ads \ $(ADA_SRCDIR)/$(ABASE)-menus-menu_user_data.ads \ $(ADA_SRCDIR)/$(ABASE)-menus-item_user_data.ads \ $(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads \ + $(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads \ $(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads \ $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads @@ -119,15 +133,41 @@ GEN_SRC = $(srcdir)/$(ABASE).ads.m4 \ $(srcdir)/$(ABASE)-menus-menu_user_data.ads.m4 \ $(srcdir)/$(ABASE)-menus-item_user_data.ads.m4 \ $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4 \ + $(srcdir)/$(ABASE)-forms-field_types.ads.m4 \ $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4 \ $(srcdir)/$(ABASE)-panels-user_data.ads.m4 -all: $(GEN_TARGETS) dirs +all: $(ADA_OBJDIR) $(GEN_TARGETS) @ -dirs: - @-mkdir $(OBJDIR) $(ADA_OBJDIR) +sources: + +$(ADA_OBJDIR) \ +$(ADA_INCLUDE) \ +$(ADA_OBJECTS) : + $(top_srcdir)/mkinstalldirs $@ + +install \ +install.libs :: $(ADA_INCLUDE) + @echo installing package $(ABASE) in $(ADA_INCLUDE) + @$(top_srcdir)/tar-copy.sh '$(ABASE)[-.]*' $(ADA_SRCDIR) $(ADA_INCLUDE) + @test $(srcdir) != ./ && $(top_srcdir)/tar-copy.sh '$(ABASE)[-.]*' $(srcdir)/../ada_include $(ADA_INCLUDE) + +install \ +install.libs :: $(ADA_OBJECTS) + @echo installing package $(ABASE) in $(ADA_OBJECTS) + @$(top_srcdir)/tar-copy.sh '$(ABASE)[-.]*' $(ADA_OBJDIR) $(ADA_OBJECTS) + +uninstall \ +uninstall.libs :: + @echo removing package $(ABASE) from $(ADA_INCLUDE) + -@cd $(ADA_INCLUDE) && rm -f $(ABASE)[-.]* + +uninstall \ +uninstall.libs :: + @echo removing package $(ABASE) from $(ADA_OBJECTS) + -@cd $(ADA_OBJECTS) && rm -f $(ABASE)[-.]* gen: gen.o @ECHO_LINK@ $(LINK) $(CFLAGS_NORMAL) gen.o $(LD_FLAGS) -o $@ $(LIB_CURSES) @@ -159,6 +199,9 @@ AC_Rep: gen Linker_Options: gen ./gen B L >$@ +Version_Info: gen + ./gen B V >$@ + Menu_Opt_Rep: gen ./gen M R >$@ @@ -243,6 +286,13 @@ $(ADA_SRCDIR)/$(ABASE)-forms-form_user_data.ads: \ $(srcdir)/$(ABASE)-forms-form_user_data.ads.m4 |\ $(DEL_ADAMODE) >$@ +$(ADA_SRCDIR)/$(ABASE)-forms-field_types.ads: \ + $(srcdir)/$(ABASE)-forms-field_types.ads.m4 \ + $(srcdir)/normal.m4 + $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \ + $(srcdir)/$(ABASE)-forms-field_types.ads.m4 |\ + $(DEL_ADAMODE) >$@ + $(ADA_SRCDIR)/$(ABASE)-forms-field_user_data.ads: \ $(srcdir)/$(ABASE)-forms-field_user_data.ads.m4 \ $(srcdir)/normal.m4 @@ -257,10 +307,6 @@ $(ADA_SRCDIR)/$(ABASE)-panels-user_data.ads: \ $(srcdir)/$(ABASE)-panels-user_data.ads.m4 |\ $(DEL_ADAMODE) >$@ -install :: - -install.libs :: - install.progs :: tags: @@ -269,13 +315,17 @@ tags: TAGS: etags *.[ch] -clean :: - rm -f a.out core gen *.o $(GEN_FILES1) $(GEN_FILES2) $(GEN_FILES3) \ - $(GEN_FILES4) $(GEN_TARGETS) +mostlyclean :: + -rm -f a.out core gen *.o + -rm -f $(GEN_FILES1) + -rm -f $(GEN_FILES2) + -rm -f $(GEN_FILES3) + -rm -f $(GEN_FILES4) -mostlyclean :: clean +clean :: mostlyclean + -rm -f $(GEN_TARGETS) -distclean :: mostlyclean +distclean :: clean rm -f Makefile realclean :: distclean diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c index 3a1426f4..48532947 100644 --- a/Ada95/gen/gen.c +++ b/Ada95/gen/gen.c @@ -1,28 +1,38 @@ -/*---------------------------------------------------------------------------- -// -- -// GNAT ncurses Binding -- -// -- -// gen.c -- -// -- -// 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. -- -//---------------------------------------------------------------------------- +/**************************************************************************** + * 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 1996 * + ****************************************************************************/ + +/* Version Control - $Revision: 1.8 $ + $Revision: 1.14 $ --------------------------------------------------------------------------*/ /* This program generates various record structures and constants from the @@ -34,7 +44,6 @@ #include #include #include -#include #include #include @@ -83,9 +92,16 @@ static int find_pos (char *s, unsigned len, int *low, int *high) return (*high >= 0 && (*low <= *high)) ? *low : -1; } -static void gen_reps ( const name_attribute_pair *nap, - const char *name, - int len) +/* + * This helper routine generates a representation clause for a + * record type defined in the binding. + * We are only dealing with record types which are of 32 or 16 + * bit size, i.e. they fit into an (u)int or a (u)short. + */ +static void gen_reps +(const name_attribute_pair *nap, /* array of name_attribute_pair records */ + const char *name, /* name of the represented record type */ + int len) /* size of the record in bytes */ { int i,l,cnt = 0,low,high; int width = strlen(RES_NAME); @@ -324,6 +340,9 @@ static void gen_form_opt_rep(const char *name) gen_reps (nap, name, sizeof(int)); } +/* + * Generate the representation clause for the Field_Option_Set record + */ static void gen_field_opt_rep(const char *name) { static const name_attribute_pair nap[] = { @@ -362,12 +381,17 @@ static void gen_field_opt_rep(const char *name) gen_reps (nap, name, sizeof(int)); } +/* + * Generate a single key code constant definition. + */ static void keydef(const char *name, const char *old_name, int value, int mode) { - if (mode==0) + if (mode==0) /* Generate the new name */ printf(" %-30s : constant Special_Key_Code := 8#%3o#;\n",name,value); else - { + { /* generate the old name, but only if it doesn't conflict with the old + * name (Ada95 isn't case sensitive!) + */ const char *s = old_name; const char *t = name; while ( *s && *t && (toupper(*s++) == toupper(*t++))); if (*s || *t) @@ -375,6 +399,13 @@ static void keydef(const char *name, const char *old_name, int value, int mode) } } +/* + * Generate constants for the key codes. When called with mode==0, a + * complete list with nice constant names in proper casing style will + * be generated. Otherwise a list of old (i.e. C-style) names will be + * generated, given that the name wasn't already defined in the "nice" + * list. + */ static void gen_keydefs (int mode) { char buf[16]; @@ -665,8 +696,16 @@ static void gen_keydefs (int mode) #ifdef KEY_MOUSE keydef("Key_Mouse","KEY_MOUSE",KEY_MOUSE,mode); #endif +#ifdef KEY_RESIZE + keydef("Key_Resize","KEY_RESIZE",KEY_RESIZE,mode); +#endif } +/* + * Generate a constant with the given name. The second parameter + * is a reference to the ACS character in the acs_map[] array and + * will be translated into an index. + */ static void acs_def (const char *name, chtype *a) { int c = a - &acs_map[0]; @@ -677,7 +716,9 @@ static void acs_def (const char *name, chtype *a) printf("Character'Val (%d);\n",c); } - +/* + * Generate the constants for the ACS characters + */ static void gen_acs (void) { #ifdef ACS_ULCORNER @@ -778,16 +819,24 @@ static void gen_acs (void) #endif } +/* + * Output some comment lines indicating that the file is generated. + * The name parameter is the name of the facility to be used in + * the comment. + */ static void prologue(const char *name) { - time_t t = time(NULL); - printf("-- %s binding, generated at %s",name,ctime(&t)); + printf("-- %s binding.\n",name); printf("-- This module is generated. Please don't change it manually!\n"); printf("-- Run the generator instead.\n-- |"); printf("define(`M4_BIT_ORDER',`%s_Order_First')",little_endian ? "Low":"High"); } +/* + * Write the prologue for the curses facility and make sure that + * KEY_MIN and KEY_MAX are defined for the rest of this source. + */ static void basedefs (void) { prologue("curses"); @@ -798,31 +847,48 @@ static void basedefs (void) #ifndef KEY_MIN # define KEY_MIN 0401 #endif - if (KEY_MIN == 256) - abort(); + if (KEY_MIN == 256) { + fprintf(stderr,"Unexpected value for KEY_MIN: %d\n",KEY_MIN); + exit(1); + } printf("define(`M4_SPECIAL_FIRST',`8#%o#')",KEY_MIN - 1); } +/* + * Write out the comment lines for the menu facility + */ static void menu_basedefs (void) { prologue("menu"); } +/* + * Write out the comment lines for the form facility + */ static void form_basedefs (void) { prologue("form"); } +/* + * Write out the comment lines for the mouse facility + */ static void mouse_basedefs(void) { prologue("mouse"); } +/* + * Write the definition of a single color + */ static void color_def (const char *name, int value) { printf(" %-8s : constant Color_Number := %d;\n",name,value); } +/* + * Generate all color definitions + */ static void gen_color (void) { #ifdef COLOR_BLACK @@ -851,27 +917,57 @@ static void gen_color (void) #endif } +/* + * Generate the linker options for the base facility + */ static void gen_linkopts (void) { printf(" pragma Linker_Options (\"-lncurses\");\n"); } +/* + * Generate the linker options for the menu facility + */ static void gen_menu_linkopts (void) { printf(" pragma Linker_Options (\"-lmenu\");\n"); } +/* + * Generate the linker options for the form facility + */ static void gen_form_linkopts (void) { printf(" pragma Linker_Options (\"-lform\");\n"); } +/* + * Generate the linker options for the panel facility + */ static void gen_panel_linkopts (void) { printf(" pragma Linker_Options (\"-lpanel\");\n"); } +static void gen_version_info (void) +{ + printf(" NC_Major_Version : constant := %d; -- Major version of ncurses library\n", NCURSES_VERSION_MAJOR); + printf(" NC_Minor_Version : constant := %d; -- Minor version of ncurses library\n", NCURSES_VERSION_MINOR); + printf(" NC_Version : constant String := %c%d.%d%c; -- Version of ncurses library\n", '"',NCURSES_VERSION_MAJOR,NCURSES_VERSION_MINOR,'"'); +} +/* + * main() expects two arguments on the commandline, both single characters. + * The first character denotes the facility for which we generate output. + * Possible values are + * B - Base + * M - Menus + * F - Forms + * P - Pointer Device (Mouse) + * + * The second character then denotes the specific output that should be + * generated for the selected facility. + */ int main(int argc, char *argv[]) { int x = 0x12345678; @@ -885,85 +981,88 @@ int main(int argc, char *argv[]) switch(argv[1][0]) { - case 'B': + case 'B': /* The Base facility */ switch(argv[2][0]) { - case 'A': + case 'A': /* chtype translation into Ada95 record type */ gen_attr_set("Character_Attribute_Set"); break; - case 'K': + case 'K': /* translation of keycodes */ gen_keydefs(0); break; - case 'B': + case 'B': /* write some initial comment lines */ basedefs(); break; - case 'C': + case 'C': /* generate color constants */ gen_color(); break; - case 'M': + case 'M': /* generate constants for the ACS characters */ gen_acs(); break; - case 'L': + case 'L': /* generate the Linker_Options pragma */ gen_linkopts(); break; - case 'O': + case 'O': /* generate definitions of the old key code names */ gen_keydefs(1); break; - case 'R': + case 'R': /* generate representation clause for Attributed character */ gen_chtype_rep("Attributed_Character"); break; + case 'V': /* generate version info */ + gen_version_info(); + break; default: break; } break; - case 'M': + case 'M': /* The Menu facility */ switch(argv[2][0]) { - case 'R': + case 'R': /* generate representation clause for Menu_Option_Set */ gen_menu_opt_rep("Menu_Option_Set"); break; - case 'B': + case 'B': /* write some initial comment lines */ menu_basedefs(); break; - case 'L': + case 'L': /* generate the Linker_Options pragma */ gen_menu_linkopts(); break; - case 'I': + case 'I': /* generate representation clause for Item_Option_Set */ gen_item_opt_rep("Item_Option_Set"); break; default: break; } break; - case 'F': + case 'F': /* The Form facility */ switch(argv[2][0]) { - case 'R': + case 'R': /* generate representation clause for Form_Option_Set */ gen_form_opt_rep("Form_Option_Set"); break; - case 'B': + case 'B': /* write some initial comment lines */ form_basedefs(); break; - case 'L': + case 'L': /* generate the Linker_Options pragma */ gen_form_linkopts(); break; - case 'I': + case 'I': /* generate representation clause for Field_Option_Set */ gen_field_opt_rep("Field_Option_Set"); break; default: break; } break; - case 'P': + case 'P': /* The Pointer(=Mouse) facility */ switch(argv[2][0]) { - case 'B': + case 'B': /* write some initial comment lines */ mouse_basedefs(); break; - case 'M': + case 'M': /* generate representation clause for Mouse_Event */ gen_mrep_rep("Mouse_Event"); break; - case 'L': + case 'L': /* generate the Linker_Options pragma */ gen_panel_linkopts(); break; default: diff --git a/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 new file mode 100644 index 00000000..79e185a1 --- /dev/null +++ b/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 @@ -0,0 +1,238 @@ +-- -*- ada -*- +define(`HTMLNAME',`terminal_interface-curses-forms-field_user_data_s.html')dnl +include(M4MACRO)dnl +------------------------------------------------------------------------------ +-- -- +-- GNAT ncurses Binding -- +-- -- +-- Terminal_Interface.Curses.Forms.Field_Types -- +-- -- +-- S P E C -- +-- -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. -- +-- -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: -- +-- -- +-- The above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. -- +-- -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -- +------------------------------------------------------------------------------ +-- Author: Juergen Pfeifer 1996 +-- Version Control: +-- $Revision: 1.6 $ +-- Binding Version 00.93 +------------------------------------------------------------------------------ +with Terminal_Interface.Curses.Aux; + +package Terminal_Interface.Curses.Forms.Field_Types is + pragma Preelaborate (Field_Types); + + -- MANPAGE(`form_fieldtype.3x') + + type Field_Type is abstract tagged null record; + -- Abstract base type for all field types. A concrete field type + -- is an extension that adds some data elements describing formats or + -- boundary values for the type and validation routines. + -- For the builtin low-level fieldtypes, the validation routines are + -- already defined by the low-level C library. + -- The builtin types like Alpha or AlphaNumeric etc. are defined in + -- child packages of this package. You may use one of them as example + -- how to create you own child packages for low-level field types that + -- you may have already written in C. + + type Field_Type_Access is access all Field_Type'Class; + + -- ANCHOR(`set_field_type()',`Set_Type') + procedure Set_Field_Type (Fld : in Field; + Fld_Type : in Field_Type) is abstract; + -- AKA + -- But: we hide the vararg mechanism of the C interface. You always + -- have to pass a single Field_Type parameter. + + -- --------------------------------------------------------------------- + + -- MANPAGE(`form_field_validation.3x') + + -- ANCHOR(`field_type()',`Get_Type') + function Get_Type (Fld : in Field) return Field_Type_Access; + -- AKA + -- ALIAS(`field_arg()') + -- In Ada95 we can combine these. If you try to retrieve the field type + -- that is not defined as extension of the abstract tagged type above, + -- you will raise a Form_Exception. + -- This is not inlined + + -- +---------------------------------------------------------------------- + -- | Private Part. + -- | Most of this is used by the implementations of the child packages. + -- | +private + use Terminal_Interface.Curses.Aux; + + type Makearg_Function is access + function (Args : System.Address) return System.Address; + pragma Convention (C, Makearg_Function); + + type Copyarg_Function is access + function (Usr : System.Address) return System.Address; + pragma Convention (C, Copyarg_Function); + + type Freearg_Function is access + procedure (Usr : System.Address); + pragma Convention (C, Freearg_Function); + + type Field_Check_Function is access + function (Fld : Field; Usr : System.Address) return C_Int; + pragma Convention (C, Field_Check_Function); + + type Char_Check_Function is access + function (Ch : C_Int; Usr : System.Address) return C_Int; + pragma Convention (C, Char_Check_Function); + + type Choice_Function is access + function (Fld : Field; Usr : System.Address) return C_Int; + pragma Convention (C, Choice_Function); + + -- +---------------------------------------------------------------------- + -- | This must be in sync with the FIELDTYPE structure in form.h + -- | + type Low_Level_Field_Type is + record + Status : C_Short; + Ref_Count : C_Long_Int; + Left, Right : System.Address; + Makearg : Makearg_Function; + Copyarg : Copyarg_Function; + Freearg : Freearg_Function; + Fcheck : Field_Check_Function; + Ccheck : Char_Check_Function; + Next, Prev : Choice_Function; + end record; + pragma Convention (C, Low_Level_Field_Type); + type C_Field_Type is access all Low_Level_Field_Type; + + Null_Field_Type : constant C_Field_Type := null; + + -- +---------------------------------------------------------------------- + -- | This four low-level fieldtypes are the ones associated with + -- | fieldtypes handled by this binding. Any other low-level fieldtype + -- | will result in a Form_Exception is function Get_Type. + -- | + M_Generic_Type : C_Field_Type := null; + M_Generic_Choice : C_Field_Type := null; + M_Builtin_Router : C_Field_Type := null; + M_Choice_Router : C_Field_Type := null; + + -- Two wrapper functions to access those low-level fieldtypes defined + -- in this package. + function C_Builtin_Router return C_Field_Type; + function C_Choice_Router return C_Field_Type; + + procedure Wrap_Builtin (Fld : Field; + Typ : Field_Type'Class; + Cft : C_Field_Type := C_Builtin_Router); + -- This procedure has to be called by the Set_Field_Type implementation + -- for builtin low-level fieldtypes to replace it by an Ada95 + -- conformant Field_Type object. + -- The parameter Cft must be C_Builtin_Router for regular low-level + -- fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for + -- low-level fieldtypes witch choice functions (like TYP_ENUM). + -- Any other value will raise a Form_Exception. + + function Make_Arg (Args : System.Address) return System.Address; + pragma Convention (C, Make_Arg); + -- This is the Makearg_Function for the internal low-level types + -- introduced by this binding. + + function Copy_Arg (Usr : System.Address) return System.Address; + pragma Convention (C, Copy_Arg); + -- This is the Copyarg_Function for the internal low-level types + -- introduced by this binding. + + procedure Free_Arg (Usr : System.Address); + pragma Convention (C, Free_Arg); + -- This is the Freearg_Function for the internal low-level types + -- introduced by this binding. + + function Field_Check_Router (Fld : Field; + Usr : System.Address) return C_Int; + pragma Convention (C, Field_Check_Router); + -- This is the Field_Check_Function for the internal low-level types + -- introduced to wrap the low-level types by a Field_Type derived + -- type. It routes the call to the corresponding low-level validation + -- function. + + function Char_Check_Router (Ch : C_Int; + Usr : System.Address) return C_Int; + pragma Convention (C, Char_Check_Router); + -- This is the Char_Check_Function for the internal low-level types + -- introduced to wrap the low-level types by a Field_Type derived + -- type. It routes the call to the corresponding low-level validation + -- function. + + function Next_Router (Fld : Field; + Usr : System.Address) return C_Int; + pragma Convention (C, Next_Router); + -- This is the Choice_Function for the internal low-level types + -- introduced to wrap the low-level types by a Field_Type derived + -- type. It routes the call to the corresponding low-level next_choice + -- function. + + function Prev_Router (Fld : Field; + Usr : System.Address) return C_Int; + pragma Convention (C, Prev_Router); + -- This is the Choice_Function for the internal low-level types + -- introduced to wrap the low-level types by a Field_Type derived + -- type. It routes the call to the corresponding low-level prev_choice + -- function. + + -- This is the Argument structure maintained by all low-level field types + -- introduced by this binding. + type Argument is record + Typ : Field_Type_Access; -- the Field_Type creating this record + Usr : System.Address; -- original arg for builtin low-level types + Cft : C_Field_Type; -- the original low-level type + end record; + type Argument_Access is access all Argument; + + -- +---------------------------------------------------------------------- + -- | + -- | Some Imports of libform routines to deal with low-level fieldtypes. + -- | + function New_Fieldtype (Fcheck : Field_Check_Function; + Ccheck : Char_Check_Function) + return C_Field_Type; + pragma Import (C, New_Fieldtype, "new_fieldtype"); + + function Set_Fieldtype_Arg (Cft : C_Field_Type; + Mak : Makearg_Function := Make_Arg'Access; + Cop : Copyarg_Function := Copy_Arg'Access; + Fre : Freearg_Function := Free_Arg'Access) + return C_Int; + pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg"); + + function Set_Fieldtype_Choice (Cft : C_Field_Type; + Next, Prev : Choice_Function) + return C_Int; + pragma Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice"); + +end Terminal_Interface.Curses.Forms.Field_Types; diff --git a/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 index 3fdeecb1..8059f184 100644 --- a/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4 @@ -9,51 +9,62 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type User is limited private; type User_Access is access User; package Terminal_Interface.Curses.Forms.Field_User_Data is + pragma Preelaborate (Field_User_Data); - -- The binding uses the C level user pointer already for its own - -- internal purposes. So you can´t easily manipulate the user pointer - -- with the low level C routines for this field without taking care of - -- this special situation. If you want to read or write with C routines - -- the user pointer of this field, you should get first the low level - -- user pointer. This points to a record, that always has as its first - -- member the Ada95 user pointer for this field. You should never change - -- the low level user pointer of an Ada created field. - -- -- MANPAGE(`form_field_userptr.3x') -- ANCHOR(`set_field_userptr',`Set_User_Data') procedure Set_User_Data (Fld : in Field; Data : in User_Access); -- AKA - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- ANCHOR(`field_userptr',`Get_User_Data') procedure Get_User_Data (Fld : in Field; Data : out User_Access); -- AKA - pragma Convention (C, Get_User_Data); + + -- ANCHOR(`field_userptr',`Get_User_Data') + function Get_User_Data (Fld : in Field) return User_Access; + -- AKA + -- Sama as function + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Forms.Field_User_Data; diff --git a/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 index da9b0c5f..acc0f247 100644 --- a/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms-form_user_data.ads.m4 @@ -9,52 +9,62 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.3 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type User is limited private; type User_Access is access User; package Terminal_Interface.Curses.Forms.Form_User_Data is + pragma Preelaborate (Form_User_Data); - -- The binding uses the C level user pointer already for its own - -- internal purposes. So you can´t easily manipulate the user pointer - -- with the low level C routines for this form without taking care of - -- this special situation. If you want to read or write with C routines - -- the user pointer of this form, you should get first the low level - -- user pointer. This points to a record, that always has as its first - -- member the Ada95 user pointer for this form. You should never change - -- the low level user pointer of an Ada created form. - -- -- MANPAGE(`form_userptr.3x') -- ANCHOR(`set_form_userptr',`Set_User_Data') procedure Set_User_Data (Frm : in Form; Data : in User_Access); -- AKA - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- ANCHOR(`form_userptr',`Get_User_Data') procedure Get_User_Data (Frm : in Form; Data : out User_Access); -- AKA - pragma Convention (C, Get_User_Data); -end Terminal_Interface.Curses.Forms.Form_User_Data; + -- ANCHOR(`form_userptr',`Get_User_Data') + function Get_User_Data (Frm : in Form) return User_Access; + -- AKA + -- Same as function + pragma Inline (Get_User_Data); +end Terminal_Interface.Curses.Forms.Form_User_Data; diff --git a/Ada95/gen/terminal_interface-curses-forms.ads.m4 b/Ada95/gen/terminal_interface-curses-forms.ads.m4 index 998fdba1..bb4ebfd4 100644 --- a/Ada95/gen/terminal_interface-curses-forms.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-forms.ads.m4 @@ -9,45 +9,54 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.9 $ +-- $Revision: 1.14 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ include(`Form_Base_Defs') with System; -with Ada.Tags; use Ada.Tags; with Ada.Characters.Latin_1; with Interfaces.C; -with Interfaces.C.Strings; package Terminal_Interface.Curses.Forms is - + pragma Preelaborate (Forms); include(`Form_Linker_Options') Space : Character renames Ada.Characters.Latin_1.Space; type Field is private; type Form is private; - type C_Field_Type is private; Null_Field : constant Field; Null_Form : constant Form; - Null_Field_Type : constant C_Field_Type; - type Field_Justification is (None, Left, @@ -56,20 +65,28 @@ include(`Form_Linker_Options') include(`Field_Rep') - Default_Field_Options : Field_Option_Set; + function Default_Field_Options return Field_Option_Set; -- The initial defaults for the field options. + pragma Inline (Default_Field_Options); include(`Form_Opt_Rep') - Default_Form_Options : Form_Option_Set; + function Default_Form_Options return Form_Option_Set; -- The initial defaults for the form options. + pragma Inline (Default_Form_Options); type Buffer_Number is new Natural; type Field_Array is array (Positive range <>) of aliased Field; pragma Convention (C, Field_Array); - type Field_Array_Access is access all Field_Array; + type Field_Array_Access is access Field_Array; + + procedure Free (FA : in out Field_Array_Access; + Free_Fields : in Boolean := False); + -- Release the memory for an allocated field array + -- If Free_Fields is True, call Delete() for all the fields in + -- the array. subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57); @@ -209,6 +226,10 @@ include(`Form_Opt_Rep') procedure Request_Name (Key : in Form_Request_Code; Name : out String); + function Request_Name (Key : Form_Request_Code) return String; + -- Same as function + pragma Inline (Request_Name); + ------------------ -- Exceptions -- ------------------ @@ -225,6 +246,7 @@ include(`Form_Opt_Rep') More_Buffers : Buffer_Number := Buffer_Number'First) return Field; -- AKA + -- An overloaded Create is defined later. Pragma Inline appears there. -- ANCHOR(`new_field()',`New_Field') function New_Field (Height : Line_Count; @@ -235,23 +257,27 @@ include(`Form_Opt_Rep') More_Buffers : Buffer_Number := Buffer_Number'First) return Field renames Create; -- AKA + pragma Inline (New_Field); -- ANCHOR(`free_field()',`Delete') procedure Delete (Fld : in out Field); -- AKA -- Reset Fld to Null_Field + -- An overloaded Delete is defined later. Pragma Inline appears there. -- ANCHOR(`dup_field()',`Duplicate') function Duplicate (Fld : Field; Top : Line_Position; Left : Column_Position) return Field; -- AKA + pragma Inline (Duplicate); -- ANCHOR(`link_field()',`Link') function Link (Fld : Field; Top : Line_Position; Left : Column_Position) return Field; -- AKA + pragma Inline (Link); -- MANPAGE(`form_field_just.3x') @@ -259,10 +285,12 @@ include(`Form_Opt_Rep') procedure Set_Justification (Fld : in Field; Just : in Field_Justification := None); -- AKA + pragma Inline (Set_Justification); -- ANCHOR(`field_just()',`Get_Justification') function Get_Justification (Fld : Field) return Field_Justification; -- AKA + pragma Inline (Get_Justification); -- MANPAGE(`form_field_buffer.3x') @@ -272,6 +300,7 @@ include(`Form_Opt_Rep') Buffer : in Buffer_Number := Buffer_Number'First; Str : in String); -- AKA + -- Not inlined -- ANCHOR(`field_buffer()',`Get_Buffer') procedure Get_Buffer @@ -280,19 +309,29 @@ include(`Form_Opt_Rep') Str : out String); -- AKA + function Get_Buffer + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First) return String; + -- AKA + -- Same but as function + pragma Inline (Get_Buffer); + -- ANCHOR(`set_field_status()',`Set_Status') procedure Set_Status (Fld : in Field; Status : in Boolean := True); -- AKA + pragma Inline (Set_Status); -- ANCHOR(`field_status()',`Changed') function Changed (Fld : Field) return Boolean; -- AKA + pragma Inline (Changed); -- ANCHOR(`set_field_max()',`Set_Maximum_Size') procedure Set_Maximum_Size (Fld : in Field; Max : in Natural := 0); -- AKA + pragma Inline (Set_Maximum_Size); -- MANPAGE(`form_field_opts.3x') @@ -300,6 +339,7 @@ include(`Form_Opt_Rep') procedure Set_Options (Fld : in Field; Options : in Field_Option_Set); -- AKA + -- An overloaded version is defined later. Pragma Inline appears there -- ANCHOR(`field_opts_on()',`Switch_Options') procedure Switch_Options (Fld : in Field; @@ -307,6 +347,7 @@ include(`Form_Opt_Rep') On : Boolean := True); -- AKA -- ALIAS(`field_opts_off()') + -- An overloaded version is defined later. Pragma Inline appears there -- ANCHOR(`field_opts()',`Get_Options') procedure Get_Options (Fld : in Field; @@ -317,6 +358,7 @@ include(`Form_Opt_Rep') function Get_Options (Fld : Field := Null_Field) return Field_Option_Set; -- AKA + -- An overloaded version is defined later. Pragma Inline appears there -- MANPAGE(`form_field_attributes.3x') @@ -326,6 +368,7 @@ include(`Form_Opt_Rep') Fore : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Foreground); -- ANCHOR(`field_fore()',`Foreground') procedure Foreground (Fld : in Field; @@ -337,6 +380,7 @@ include(`Form_Opt_Rep') Fore : out Character_Attribute_Set; Color : out Color_Pair); -- AKA + pragma Inline (Foreground); -- ANCHOR(`set_field_back()',`Set_Background') procedure Set_Background @@ -344,6 +388,7 @@ include(`Form_Opt_Rep') Back : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Background); -- ANCHOR(`field_back()',`Background') procedure Background (Fld : in Field; @@ -355,16 +400,19 @@ include(`Form_Opt_Rep') Back : out Character_Attribute_Set; Color : out Color_Pair); -- AKA + pragma Inline (Background); -- ANCHOR(`set_field_pad()',`Set_Pad_Character') procedure Set_Pad_Character (Fld : in Field; Pad : in Character := Space); -- AKA + pragma Inline (Set_Pad_Character); -- ANCHOR(`field_pad()',`Pad_Character') procedure Pad_Character (Fld : in Field; Pad : out Character); -- AKA + pragma Inline (Pad_Character); -- MANPAGE(`form_field_info.3x') @@ -377,6 +425,7 @@ include(`Form_Opt_Rep') Off_Screen : out Natural; Additional_Buffers : out Buffer_Number); -- AKA + pragma Inline (Info); -- ANCHOR(`dynamic_field_info()',`Dynamic_Info') procedure Dynamic_Info (Fld : in Field; @@ -384,6 +433,7 @@ include(`Form_Opt_Rep') Columns : out Column_Count; Max : out Natural); -- AKA + pragma Inline (Dynamic_Info); -- MANPAGE(`form_win.3x') @@ -391,25 +441,30 @@ include(`Form_Opt_Rep') procedure Set_Window (Frm : in Form; Win : in Window); -- AKA + pragma Inline (Set_Window); -- ANCHOR(`form_win()',`Get_Window') function Get_Window (Frm : Form) return Window; -- AKA + pragma Inline (Get_Window); -- ANCHOR(`set_form_sub()',`Set_Sub_Window') procedure Set_Sub_Window (Frm : in Form; Win : in Window); -- AKA + pragma Inline (Set_Sub_Window); -- ANCHOR(`form_sub()',`Get_Sub_Window') function Get_Sub_Window (Frm : Form) return Window; -- AKA + pragma Inline (Get_Sub_Window); -- ANCHOR(`scale_form()',`Scale') procedure Scale (Frm : in Form; Lines : out Line_Count; Columns : out Column_Count); -- AKA + pragma Inline (Scale); -- MANPAGE(`form_hook.3x') @@ -420,21 +475,25 @@ include(`Form_Opt_Rep') procedure Set_Field_Init_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA + pragma Inline (Set_Field_Init_Hook); -- ANCHOR(`set_field_term()',`Set_Field_Term_Hook') procedure Set_Field_Term_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA + pragma Inline (Set_Field_Term_Hook); -- ANCHOR(`set_form_init()',`Set_Form_Init_Hook') procedure Set_Form_Init_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA + pragma Inline (Set_Form_Init_Hook); -- ANCHOR(`set_form_term()',`Set_Form_Term_Hook') procedure Set_Form_Term_Hook (Frm : in Form; Proc : in Form_Hook_Function); -- AKA + pragma Inline (Set_Form_Term_Hook); -- ANCHOR(`field_init()',`Get_Field_Init_Hook') function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function; @@ -460,44 +519,52 @@ include(`Form_Opt_Rep') -- ANCHOR(`set_form_fields()',`Redefine') procedure Redefine (Frm : in Form; - Flds : in Field_Array); + Flds : in Field_Array_Access); -- AKA - -- With a bit more comfort. You don´t need to terminate the Field_Array - -- with a null entry. This is handled internally in the binding. + pragma Inline (Redefine); -- ANCHOR(`set_form_fields()',`Set_Fields') procedure Set_Fields (Frm : in Form; - Flds : in Field_Array) renames Redefine; + Flds : in Field_Array_Access) renames Redefine; -- AKA + pragma Inline (Set_Fields); -- ANCHOR(`form_fields()',`Fields') - function Fields (Frm : Form) return Field_Array_Access; + function Fields (Frm : Form; + Index : Positive) return Field; -- AKA + pragma Inline (Fields); -- ANCHOR(`field_count()',`Field_Count') function Field_Count (Frm : Form) return Natural; -- AKA + pragma Inline (Field_Count); -- ANCHOR(`move_field()',`Move') procedure Move (Fld : in Field; Line : in Line_Position; Column : in Column_Position); -- AKA + pragma Inline (Move); -- MANPAGE(`form_new.3x') -- ANCHOR(`new_form()',`Create') - function Create (Fields : Field_Array) return Form; + function Create (Fields : Field_Array_Access) return Form; -- AKA + pragma Inline (Create); -- ANCHOR(`new_form()',`New_Form') - function New_Form (Fields : Field_Array) return Form renames Create; + function New_Form (Fields : Field_Array_Access) return Form + renames Create; -- AKA + pragma Inline (New_Form); -- ANCHOR(`free_form()',`Delete') procedure Delete (Frm : in out Form); -- AKA -- Reset Frm to Null_Form + pragma Inline (Delete); -- MANPAGE(`form_opts.3x') @@ -505,6 +572,7 @@ include(`Form_Opt_Rep') procedure Set_Options (Frm : in Form; Options : in Form_Option_Set); -- AKA + pragma Inline (Set_Options); -- ANCHOR(`form_opts_on()',`Switch_Options') procedure Switch_Options (Frm : in Form; @@ -512,6 +580,7 @@ include(`Form_Opt_Rep') On : Boolean := True); -- AKA -- ALIAS(`form_opts_off()') + pragma Inline (Switch_Options); -- ANCHOR(`form_opts()',`Get_Options') procedure Get_Options (Frm : in Form; @@ -521,6 +590,7 @@ include(`Form_Opt_Rep') -- ANCHOR(`form_opts()',`Get_Options') function Get_Options (Frm : Form := Null_Form) return Form_Option_Set; -- AKA + pragma Inline (Get_Options); -- MANPAGE(`form_post.3x') @@ -529,22 +599,26 @@ include(`Form_Opt_Rep') Post : in Boolean := True); -- AKA -- ALIAS(`unpost_form()') + pragma Inline (Post); -- MANPAGE(`form_cursor.3x') -- ANCHOR(`pos_form_cursor()',`Position_Cursor') procedure Position_Cursor (Frm : Form); -- AKA + pragma Inline (Position_Cursor); -- MANPAGE(`form_data.3x') -- ANCHOR(`data_ahead()',`Data_Ahead') function Data_Ahead (Frm : Form) return Boolean; -- AKA + pragma Inline (Data_Ahead); -- ANCHOR(`data_behind()',`Data_Behind') function Data_Behind (Frm : Form) return Boolean; -- AKA + pragma Inline (Data_Behind); -- MANPAGE(`form_driver.3x') @@ -557,6 +631,7 @@ include(`Form_Opt_Rep') function Driver (Frm : Form; Key : Key_Code) return Driver_Result; -- AKA + -- Driver not inlined -- MANPAGE(`form_page.3x') @@ -566,19 +641,23 @@ include(`Form_Opt_Rep') procedure Set_Current (Frm : in Form; Fld : in Field); -- AKA + pragma Inline (Set_Current); -- ANCHOR(`current_field()',`Current') function Current (Frm : in Form) return Field; -- AKA + pragma Inline (Current); -- ANCHOR(`set_form_page()',`Set_Page') procedure Set_Page (Frm : in Form; Page : in Page_Number := Page_Number'First); -- AKA + pragma Inline (Set_Page); -- ANCHOR(`form_page()',`Page') function Page (Frm : Form) return Page_Number; -- AKA + pragma Inline (Page); -- ANCHOR(`field_index()',`Get_Index') function Get_Index (Fld : Field) return Positive; @@ -586,6 +665,7 @@ include(`Form_Opt_Rep') -- Please note that in this binding we start the numbering of fields -- with 1. So this is number is one more than you get from the low -- level call. + pragma Inline (Get_Index); -- MANPAGE(`form_new_page.3x') @@ -593,220 +673,20 @@ include(`Form_Opt_Rep') procedure Set_New_Page (Fld : in Field; New_Page : in Boolean := True); -- AKA + pragma Inline (Set_New_Page); -- ANCHOR(`new_page()',`Is_New_Page') function Is_New_Page (Fld : Field) return Boolean; -- AKA - - -- MANPAGE(`form_fieldtype.3x') - - type Field_Type is abstract tagged null record; - type Field_Type_Access is access all Field_Type'Class; - - function Native_Type (Ftype : Field_Type) - return C_Field_Type is abstract; - -- This function returns the C libraries handle to the field type. - -- May be you need this if you want to interface to lower level - -- routines in the form library. - - -- ANCHOR(`set_field_type()',`Set_Type') - procedure Set_Type (Fld : in Field; - Fld_Type : in Field_Type) is abstract; - -- AKA - -- But: we hide the vararg mechanism of the C interface. You always - -- have to pass a single Field_Type parameter. - - type C_Defined_Field_Type is abstract new Field_Type with null record; - -- This is the root of all field typed defined in C, i.e. this are - -- the predefined field types in the form library. - - type Alpha_Field is new C_Defined_Field_Type - with record - Minimum_Field_Width : Natural := 0; - end record; - procedure Set_Type (Fld : in Field; - Fld_Type : in Alpha_Field); - function Native_Type (Ftype : Alpha_Field) - return C_Field_Type; - - type Alpha_Numeric_Field is new C_Defined_Field_Type with - record - Minimum_Field_Width : Natural := 0; - end record; - procedure Set_Type (Fld : in Field; - Fld_Type : in Alpha_Numeric_Field); - function Native_Type (Ftype : Alpha_Numeric_Field) - return C_Field_Type; - - type Integer_Field is new C_Defined_Field_Type with - record - Precision : Natural; - Lower_Limit : Integer; - Upper_Limit : Integer; - end record; - procedure Set_Type (Fld : in Field; - Fld_Type : in Integer_Field); - function Native_Type (Ftype : Integer_Field) - return C_Field_Type; - - type Numeric_Field is new C_Defined_Field_Type with - record - Precision : Natural; - Lower_Limit : Float; - Upper_Limit : Float; - end record; - procedure Set_Type (Fld : in Field; - Fld_Type : in Numeric_Field); - function Native_Type (Ftype : Numeric_Field) - return C_Field_Type; - - type String_Access is access String; - - type Regular_Expression_Field is new C_Defined_Field_Type with - record - Regular_Expression : String_Access; - end record; - procedure Set_Type (Fld : in Field; - Fld_Type : in Regular_Expression_Field); - function Native_Type (Ftype : Regular_Expression_Field) - return C_Field_Type; - - 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 C_Defined_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. - - procedure Set_Type (Fld : in Field; - Fld_Type : in Enumeration_Field); - function Native_Type (Ftype : Enumeration_Field) - return C_Field_Type; - - -- The next type defintions are all ncurses extensions. They are typically - -- not available in other curses implementations. - - type Internet_V4_Address_Field is new C_Defined_Field_Type - with null record; - procedure Set_Type (Fld : in Field; - Fld_Type : in Internet_V4_Address_Field); - function Native_Type (Ftype : Internet_V4_Address_Field) - return C_Field_Type; - - - type Ada_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 don't have to redefine the Set_Field_Type and - -- Native_Field_Type methods, because they work generically on this - -- class. - - procedure Set_Type (Fld : Field; - Fld_Type : Ada_Defined_Field_Type); - - function Native_Type (Ftype : Ada_Defined_Field_Type) - return C_Field_Type; - - -- MANPAGE(`form_field_validation.3x') - - -- ANCHOR(`field_type()',`Get_Type') - function Get_Type (Fld : in Field) return Field_Type_Access; - -- AKA - -- ALIAS(`field_arg()') - -- In Ada95 we can combine these + pragma Inline (Is_New_Page); ------------------------------------------------------------------------------ private type Field is new System.Address; type Form is new System.Address; - type C_Field_Type is new System.Address; Null_Field : constant Field := Field (System.Null_Address); Null_Form : constant Form := Form (System.Null_Address); - Null_Field_Type : constant C_Field_Type := - C_Field_Type (System.Null_Address); - - type CPA_Access is access Interfaces.C.Strings.chars_ptr_array; - - type Enumeration_Field is new C_Defined_Field_Type with - record - Case_Sensitive : Boolean := False; - Match_Must_Be_Unique : Boolean := False; - Arr : CPA_Access := null; - end record; - - -- In our binding we use the fields user pointer as hook to maintain - -- our own info structure about the field type. To be able to still - -- provide a user pointer, we use this wrapper. - -- - type Field_User_Wrapper is - record - U : System.Address; -- the hook we provide for the user - T : Field_Type_Access; -- may be null - N : Natural; -- use counter - end record; - pragma Convention (C, Field_User_Wrapper); - type Field_User_Wrapper_Access is access all Field_User_Wrapper; - pragma Controlled (Field_User_Wrapper_Access); - - function Set_Field_Userptr (Fld : Field; - Wrp : Field_User_Wrapper_Access) - return Interfaces.C.int; - pragma Import (C, Set_Field_Userptr, "set_field_userptr"); - - function Field_Userptr (Fld : Field) return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - -- In our binding we use the forms user pointer as hook to maintain - -- our own info structure about the field association. To be able to still - -- provide a user pointer, we use this wrapper. - -- - type Form_User_Wrapper is - record - U : System.Address; -- the hook we provide for the user - I : Field_Array_Access; - end record; - pragma Convention (C, Form_User_Wrapper); - type Form_User_Wrapper_Access is access all Form_User_Wrapper; - pragma Controlled (Form_User_Wrapper_Access); - - function Set_Form_Userptr (Frm : Form; - Wrp : Form_User_Wrapper_Access) - return Interfaces.C.int; - pragma Import (C, Set_Form_Userptr, "set_form_userptr"); - - function Form_Userptr (Frm : Form) return Form_User_Wrapper_Access; - pragma Import (C, Form_Userptr, "form_userptr"); - - procedure Register_Type (T : in Ada_Defined_Field_Type'Class; - Cft : in C_Field_Type); - procedure Unregister_Type (T : in Ada_Defined_Field_Type'Class); - function Search_Type (T : Ada_Defined_Field_Type'Class) - return C_Field_Type; - - Generation_Bit_Order : constant System.Bit_Order := System.M4_BIT_ORDER; - -- This constant may be different on your system. end Terminal_Interface.Curses.Forms; diff --git a/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 index c32e764a..957e4437 100644 --- a/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-menus-item_user_data.ads.m4 @@ -9,29 +9,44 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type User is limited private; type User_Access is access User; package Terminal_Interface.Curses.Menus.Item_User_Data is + pragma Preelaborate (Item_User_Data); -- The binding uses the same user pointer for menu items -- as the low level C implementation. So you can safely @@ -43,12 +58,18 @@ package Terminal_Interface.Curses.Menus.Item_User_Data is procedure Set_User_Data (Itm : in Item; Data : in User_Access); -- AKA - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- ANCHOR(`item_userptr',`Get_User_Data') procedure Get_User_Data (Itm : in Item; Data : out User_Access); -- AKA - pragma Convention (C, Get_User_Data); + + -- ANCHOR(`item_userptr',`Get_User_Data') + function Get_User_Data (Itm : in Item) return User_Access; + -- AKA + -- Same as function + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Menus.Item_User_Data; + diff --git a/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 index 79a702b0..f7815da7 100644 --- a/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-menus-menu_user_data.ads.m4 @@ -9,51 +9,62 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type User is limited private; type User_Access is access User; package Terminal_Interface.Curses.Menus.Menu_User_Data is + pragma Preelaborate (Menu_User_Data); - -- The binding uses the C level user pointer already for its own - -- internal purposes. So you can´t easily manipulate the user pointer - -- with the low level C routines for this menu without taking care of - -- this special situation. If you want to read or write with C routines - -- the user pointer of this menu, you should get first the low level - -- user pointer. This points to a record, that always has as its first - -- member the Ada95 user pointer for this menu. You should never change - -- the low level user pointer of an Ada created menu. - -- -- MANPAGE(`menu_userptr.3x') -- ANCHOR(`set_menu_userptr',`Set_User_Data') procedure Set_User_Data (Men : in Menu; Data : in User_Access); -- AKA - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- ANCHOR(`menu_userptr',`Get_User_Data') procedure Get_User_Data (Men : in Menu; Data : out User_Access); -- AKA - pragma Convention (C, Get_User_Data); + + -- ANCHOR(`menu_userptr',`Get_User_Data') + function Get_User_Data (Men : in Menu) return User_Access; + -- AKA + -- Same as function + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Menus.Menu_User_Data; diff --git a/Ada95/gen/terminal_interface-curses-menus.ads.m4 b/Ada95/gen/terminal_interface-curses-menus.ads.m4 index 2c1c42f1..d3e45920 100644 --- a/Ada95/gen/terminal_interface-curses-menus.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-menus.ads.m4 @@ -9,23 +9,37 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.12 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ include(`Menu_Base_Defs') with System; @@ -33,7 +47,7 @@ with Interfaces.C; with Ada.Characters.Latin_1; package Terminal_Interface.Curses.Menus is - + pragma Preelaborate (Menus); include(`Menu_Linker_Options') @@ -92,6 +106,9 @@ include(`Menu_Linker_Options') procedure Request_Name (Key : in Menu_Request_Code; Name : out String); + function Request_Name (Key : Menu_Request_Code) return String; + -- Same as function + ------------------ -- Exceptions -- ------------------ @@ -103,16 +120,17 @@ include(`Menu_Linker_Options') include(`Menu_Opt_Rep') - Default_Menu_Options : Menu_Option_Set; + function Default_Menu_Options return Menu_Option_Set; -- Initial default options for a menu. - + pragma Inline (Default_Menu_Options); -- -- Item options -- include(`Item_Rep') - Default_Item_Options : Item_Option_Set; + function Default_Item_Options return Item_Option_Set; -- Initial default options for an item. + pragma Inline (Default_Item_Options); -- -- Item Array @@ -120,7 +138,13 @@ include(`Item_Rep') type Item_Array is array (Positive range <>) of aliased Item; pragma Convention (C, Item_Array); - type Item_Array_Access is access all Item_Array; + type Item_Array_Access is access Item_Array; + + procedure Free (IA : in out Item_Array_Access; + Free_Items : Boolean := False); + -- Release the memory for an allocated item array + -- If Free_Items is True, call Delete() for all the items in + -- the array. -- MANPAGE(`mitem_new.3x') @@ -128,6 +152,7 @@ include(`Item_Rep') function Create (Name : String; Description : String := "") return Item; -- AKA + -- Not inlined. -- ANCHOR(`new_item()',`New_Item') function New_Item (Name : String; @@ -146,16 +171,19 @@ include(`Item_Rep') procedure Set_Value (Itm : in Item; Value : in Boolean := True); -- AKA + pragma Inline (Set_Value); -- ANCHOR(`item_value()',`Value') function Value (Itm : Item) return Boolean; -- AKA + pragma Inline (Value); -- MANPAGE(`mitem_visible.3x') -- ANCHOR(`item_visible()',`Visible') function Visible (Itm : Item) return Boolean; -- AKA + pragma Inline (Visible); -- MANPAGE(`mitem_opts.3x') @@ -163,6 +191,7 @@ include(`Item_Rep') procedure Set_Options (Itm : in Item; Options : in Item_Option_Set); -- AKA + -- An overloaded Set_Options is defined later. Pragma Inline appears there -- ANCHOR(`item_opts_on()',`Switch_Options') procedure Switch_Options (Itm : in Item; @@ -170,6 +199,8 @@ include(`Item_Rep') On : Boolean := True); -- AKA -- ALIAS(`item_opts_off()') + -- An overloaded Switch_Options is defined later. + -- Pragma Inline appears there -- ANCHOR(`item_opts()',`Get_Options') procedure Get_Options (Itm : in Item; @@ -179,6 +210,7 @@ include(`Item_Rep') -- ANCHOR(`item_opts()',`Get_Options') function Get_Options (Itm : Item := Null_Item) return Item_Option_Set; -- AKA + -- An overloaded Get_Options is defined later. Pragma Inline appears there -- MANPAGE(`mitem_name.3x') @@ -186,31 +218,44 @@ include(`Item_Rep') procedure Name (Itm : in Item; Name : out String); -- AKA + function Name (Itm : Item) return String; + -- AKA + -- Implemented as function + pragma Inline (Name); -- ANCHOR(`item_description();',`Description') procedure Description (Itm : in Item; Description : out String); -- AKA + function Description (Itm : Item) return String; + -- AKA + -- Implemented as function + pragma Inline (Description); + -- MANPAGE(`mitem_current.3x') -- ANCHOR(`set_current_item()',`Set_Current') procedure Set_Current (Men : in Menu; Itm : in Item); -- AKA + pragma Inline (Set_Current); -- ANCHOR(`current_item()',`Current') function Current (Men : Menu) return Item; -- AKA + pragma Inline (Current); -- ANCHOR(`set_top_row()',`Set_Top_Row') procedure Set_Top_Row (Men : in Menu; Line : in Line_Position); -- AKA + pragma Inline (Set_Top_Row); -- ANCHOR(`top_row()',`Top_Row') function Top_Row (Men : Menu) return Line_Position; -- AKA + pragma Inline (Top_Row); -- ANCHOR(`item_index()',`Get_Index') function Get_Index (Itm : Item) return Positive; @@ -218,6 +263,7 @@ include(`Item_Rep') -- Please note that in this binding we start the numbering of items -- with 1. So this is number is one more than you get from the low -- level call. + pragma Inline (Get_Index); -- MANPAGE(`menu_post.3x') @@ -226,6 +272,7 @@ include(`Item_Rep') Post : in Boolean := True); -- AKA -- ALIAS(`unpost_menu()') + pragma Inline (Post); -- MANPAGE(`menu_opts.3x') @@ -233,6 +280,7 @@ include(`Item_Rep') procedure Set_Options (Men : in Menu; Options : in Menu_Option_Set); -- AKA + pragma Inline (Set_Options); -- ANCHOR(`menu_opts_on()',`Switch_Options') procedure Switch_Options (Men : in Menu; @@ -240,6 +288,7 @@ include(`Item_Rep') On : Boolean := True); -- AKA -- ALIAS(`menu_opts_off()') + pragma Inline (Switch_Options); -- ANCHOR(`menu_opts()',`Get_Options') procedure Get_Options (Men : in Menu; @@ -249,6 +298,7 @@ include(`Item_Rep') -- ANCHOR(`menu_opts()',`Get_Options') function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set; -- AKA + pragma Inline (Get_Options); -- MANPAGE(`menu_win.3x') @@ -256,31 +306,37 @@ include(`Item_Rep') procedure Set_Window (Men : in Menu; Win : in Window); -- AKA + pragma Inline (Set_Window); -- ANCHOR(`menu_win()',`Get_Window') function Get_Window (Men : Menu) return Window; -- AKA + pragma Inline (Get_Window); -- ANCHOR(`set_menu_sub()',`Set_Sub_Window') procedure Set_Sub_Window (Men : in Menu; Win : in Window); -- AKA + pragma Inline (Set_Sub_Window); -- ANCHOR(`menu_sub()',`Get_Sub_Window') function Get_Sub_Window (Men : Menu) return Window; -- AKA + pragma Inline (Get_Sub_Window); -- ANCHOR(`scale_menu()',`Scale') procedure Scale (Men : in Menu; Lines : out Line_Count; Columns : out Column_Count); -- AKA + pragma Inline (Scale); -- MANPAGE(`menu_cursor.3x') -- ANCHOR(`pos_menu_cursor()',`Position_Cursor') procedure Position_Cursor (Men : Menu); -- AKA + pragma Inline (Position_Cursor); -- MANPAGE(`menu_mark.3x') @@ -288,12 +344,18 @@ include(`Item_Rep') procedure Set_Mark (Men : in Menu; Mark : in String); -- AKA + pragma Inline (Set_Mark); -- ANCHOR(`menu_mark()',`Mark') procedure Mark (Men : in Menu; Mark : out String); -- AKA + function Mark (Men : Menu) return String; + -- AKA + -- Implemented as function + pragma Inline (Mark); + -- MANPAGE(`menu_attribs.3x') -- ANCHOR(`set_menu_fore()',`Set_Foreground') @@ -302,6 +364,7 @@ include(`Item_Rep') Fore : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Foreground); -- ANCHOR(`menu_fore()',`Foreground') procedure Foreground (Men : in Menu; @@ -313,6 +376,7 @@ include(`Item_Rep') Fore : out Character_Attribute_Set; Color : out Color_Pair); -- AKA + pragma Inline (Foreground); -- ANCHOR(`set_menu_back()',`Set_Background') procedure Set_Background @@ -320,6 +384,7 @@ include(`Item_Rep') Back : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Background); -- ANCHOR(`menu_back()',`Background') procedure Background (Men : in Menu; @@ -331,6 +396,7 @@ include(`Item_Rep') Back : out Character_Attribute_Set; Color : out Color_Pair); -- AKA + pragma Inline (Background); -- ANCHOR(`set_menu_grey()',`Set_Grey') procedure Set_Grey @@ -338,6 +404,7 @@ include(`Item_Rep') Grey : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Grey); -- ANCHOR(`menu_grey()',`Grey') procedure Grey (Men : in Menu; @@ -350,16 +417,19 @@ include(`Item_Rep') Grey : out Character_Attribute_Set; Color : out Color_Pair); -- AKA + pragma Inline (Grey); -- ANCHOR(`set_menu_pad()',`Set_Pad_Character') procedure Set_Pad_Character (Men : in Menu; Pad : in Character := Space); -- AKA + pragma Inline (Set_Pad_Character); -- ANCHOR(`menu_pad()',`Pad_Character') procedure Pad_Character (Men : in Menu; Pad : out Character); -- AKA + pragma Inline (Pad_Character); -- MANPAGE(`menu_spacing.3x') @@ -369,6 +439,7 @@ include(`Item_Rep') Row : in Line_Position := 0; Col : in Column_Position := 0); -- AKA + pragma Inline (Set_Spacing); -- ANCHOR(`menu_spacing()',`Spacing') procedure Spacing (Men : in Menu; @@ -376,6 +447,7 @@ include(`Item_Rep') Row : out Line_Position; Col : out Column_Position); -- AKA + pragma Inline (Spacing); -- MANPAGE(`menu_pattern.3x') @@ -384,11 +456,13 @@ include(`Item_Rep') Text : String) return Boolean; -- AKA -- Return TRUE if the pattern matches, FALSE otherwise + pragma Inline (Set_Pattern); -- ANCHOR(`menu_pattern()',`Pattern') procedure Pattern (Men : in Menu; Text : out String); -- AKA + pragma Inline (Pattern); -- MANPAGE(`menu_format.3x') @@ -397,12 +471,14 @@ include(`Item_Rep') Lines : in Line_Count; Columns : in Column_Count); -- AKA + pragma Inline (Set_Format); -- ANCHOR(`menu_format()',`Format') procedure Format (Men : in Menu; Lines : out Line_Count; Columns : out Column_Count); -- AKA + pragma Inline (Format); -- MANPAGE(`menu_hook.3x') @@ -413,70 +489,83 @@ include(`Item_Rep') procedure Set_Item_Init_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA + pragma Inline (Set_Item_Init_Hook); -- ANCHOR(`set_item_term()',`Set_Item_Term_Hook') procedure Set_Item_Term_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA + pragma Inline (Set_Item_Term_Hook); -- ANCHOR(`set_menu_init()',`Set_Menu_Init_Hook') procedure Set_Menu_Init_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA + pragma Inline (Set_Menu_Init_Hook); -- ANCHOR(`set_menu_term()',`Set_Menu_Term_Hook') procedure Set_Menu_Term_Hook (Men : in Menu; Proc : in Menu_Hook_Function); -- AKA + pragma Inline (Set_Menu_Term_Hook); -- ANCHOR(`item_init()',`Get_Item_Init_Hook') function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function; -- AKA + pragma Inline (Get_Item_Init_Hook); -- ANCHOR(`item_term()',`Get_Item_Term_Hook') function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function; -- AKA + pragma Inline (Get_Item_Term_Hook); -- ANCHOR(`menu_init()',`Get_Menu_Init_Hook') function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function; -- AKA + pragma Inline (Get_Menu_Init_Hook); -- ANCHOR(`menu_term()',`Get_Menu_Term_Hook') function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function; -- AKA + pragma Inline (Get_Menu_Term_Hook); -- MANPAGE(`menu_items.3x') -- ANCHOR(`set_menu_items()',`Redefine') procedure Redefine (Men : in Menu; - Items : in Item_Array); + Items : in Item_Array_Access); -- AKA - -- With a bit more comfort. You don´t need to terminate the Item_Array - -- with a null entry. This is handled internally in the binding. + pragma Inline (Redefine); procedure Set_Items (Men : in Menu; - Items : in Item_Array) renames Redefine; + Items : in Item_Array_Access) renames Redefine; + pragma Inline (Set_Items); -- ANCHOR(`menu_items()',`Items') - function Items (Men : Menu) return Item_Array_Access; + function Items (Men : Menu; + Index : Positive) return Item; -- AKA + pragma Inline (Items); -- ANCHOR(`item_count()',`Item_Count') function Item_Count (Men : Menu) return Natural; -- AKA + pragma Inline (Item_Count); -- MANPAGE(`menu_new.3x') -- ANCHOR(`new_menu()',`Create') - function Create (Items : Item_Array) return Menu; + function Create (Items : Item_Array_Access) return Menu; -- AKA + -- Not inlined - function New_Menu (Items : Item_Array) return Menu renames Create; + function New_Menu (Items : Item_Array_Access) return Menu renames Create; -- ANCHOR(`free_menu()',`Delete') procedure Delete (Men : in out Menu); -- AKA -- Reset Men to Null_Menu + -- Not inlined -- MANPAGE(`menu_new.3x') @@ -489,6 +578,7 @@ include(`Item_Rep') function Driver (Men : Menu; Key : Key_Code) return Driver_Result; -- AKA + -- Driver is not inlined ------------------------------------------------------------------------------- private @@ -498,22 +588,4 @@ private Null_Item : constant Item := Item (System.Null_Address); Null_Menu : constant Menu := Menu (System.Null_Address); - -- This binding uses the original user pointer mechanism of a menu to store - -- specific informations about a menu. This wrapper record carries this - -- specifics and contains a field to maintain a new user pointer. Please - -- note that you must take this into account if you wan't to use the user - -- pointer mechanism of a menu created with this binding in low-level C - -- routines. - type Ada_User_Wrapper is - record - U : System.Address; - I : Item_Array_Access; - end record; - pragma Convention (C, Ada_User_Wrapper); - type Ada_User_Wrapper_Access is access all Ada_User_Wrapper; - pragma Controlled (Ada_User_Wrapper_Access); - - Generation_Bit_Order : constant System.Bit_Order := System.M4_BIT_ORDER; - -- This constant may be different on your system. - end Terminal_Interface.Curses.Menus; diff --git a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 b/Ada95/gen/terminal_interface-curses-mouse.ads.m4 index f4a5928f..21f88e44 100644 --- a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-mouse.ads.m4 @@ -9,28 +9,43 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.6 $ +-- $Revision: 1.12 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ include(`Mouse_Base_Defs') with System; package Terminal_Interface.Curses.Mouse is + pragma Preelaborate (Mouse); -- MANPAGE(`curs_mouse.3x') -- Please note, that in ncurses-1.9.9e documentation mouse support @@ -59,6 +74,9 @@ package Terminal_Interface.Curses.Mouse is -- MANPAGE(`curs_mouse.3x') + function Has_Mouse return Boolean; + -- Return true if a mouse device is supported, false otherwise. + procedure Register_Reportable_Event (B : in Mouse_Button; S : in Button_State; @@ -66,19 +84,22 @@ package Terminal_Interface.Curses.Mouse is -- Stores the event described by the button and the state in the mask. -- Before you call this the first time, you should init the mask -- with the Empty_Mask constant + pragma Inline (Register_Reportable_Event); -- ANCHOR(`mousemask()',`Start_Mouse') function Start_Mouse (Mask : Event_Mask := All_Events) return Event_Mask; -- AKA + pragma Inline (Start_Mouse); procedure End_Mouse; - pragma Import (C, End_Mouse, "_nc_ada_unregister_mouse"); -- Terminates the mouse + pragma Inline (End_Mouse); -- ANCHOR(`getmouse()',`Get_Mouse') function Get_Mouse return Mouse_Event; -- AKA + pragma Inline (Get_Mouse); procedure Get_Event (Event : in Mouse_Event; Y : out Line_Position; @@ -87,20 +108,24 @@ package Terminal_Interface.Curses.Mouse is State : out Button_State); -- !!! Warning: X and Y are screen coordinates. Due to ripped of lines they -- may not be identical to window coordinates. + pragma Inline (Get_Event); -- ANCHOR(`ungetmouse()',`Unget_Mouse') procedure Unget_Mouse (Event : in Mouse_Event); -- AKA + pragma Inline (Unget_Mouse); -- ANCHOR(`wenclose()',`Enclosed_In_Window') function Enclosed_In_Window (Win : Window := Standard_Window; Event : Mouse_Event) return Boolean; -- AKA -- But : use event instead of screen coordinates. + pragma Inline (Enclosed_In_Window); -- ANCHOR(`mouseinterval()',`Mouse_Interval') function Mouse_Interval (Msec : Natural := 200) return Natural; -- AKA + pragma Inline (Mouse_Interval); private type Event_Mask is new Interfaces.C.int; diff --git a/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 b/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 index 6d68cc23..3dd3dd41 100644 --- a/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4 @@ -9,29 +9,44 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ generic type User is limited private; type User_Access is access all User; package Terminal_Interface.Curses.Panels.User_Data is + pragma Preelaborate (User_Data); -- MANPAGE(`panel.3x') @@ -39,12 +54,17 @@ package Terminal_Interface.Curses.Panels.User_Data is procedure Set_User_Data (Pan : in Panel; Data : in User_Access); -- AKA - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- ANCHOR(`panel_userptr',`Get_User_Data') procedure Get_User_Data (Pan : in Panel; Data : out User_Access); -- AKA - pragma Convention (C, Get_User_Data); + + -- ANCHOR(`panel_userptr',`Get_User_Data') + function Get_User_Data (Pan : in Panel) return User_Access; + -- AKA + -- Same as function + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Panels.User_Data; diff --git a/Ada95/gen/terminal_interface-curses-panels.ads.m4 b/Ada95/gen/terminal_interface-curses-panels.ads.m4 index c2503b1a..f9bfb2e0 100644 --- a/Ada95/gen/terminal_interface-curses-panels.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-panels.ads.m4 @@ -9,28 +9,42 @@ include(M4MACRO)dnl -- -- -- 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 1996 -- Version Control: --- $Revision: 1.2 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with System; package Terminal_Interface.Curses.Panels is - + pragma Preelaborate (Panels); include(`Panel_Linker_Options') type Panel is private; @@ -51,22 +65,27 @@ include(`Panel_Linker_Options') -- ANCHOR(`new_panel()',`Create') function Create (Win : Window) return Panel; -- AKA + pragma Inline (Create); -- ANCHOR(`new_panel()',`New_Panel') function New_Panel (Win : Window) return Panel renames Create; -- AKA + pragma Inline (New_Panel); -- ANCHOR(`bottom_panel()',`Bottom') procedure Bottom (Pan : in Panel); -- AKA + pragma Inline (Bottom); -- ANCHOR(`top_panel()',`Top') procedure Top (Pan : in Panel); -- AKA + pragma Inline (Top); -- ANCHOR(`show_panel()',`Show') procedure Show (Pan : in Panel); -- AKA + pragma Inline (Show); -- ANCHOR(`update_panels()',`Update_Panels') procedure Update_Panels; @@ -76,28 +95,34 @@ include(`Panel_Linker_Options') -- ANCHOR(`hide_panel()',`Hide') procedure Hide (Pan : in Panel); -- AKA + pragma Inline (Hide); -- ANCHOR(`panel_window()',`Get_Window') function Get_Window (Pan : Panel) return Window; -- AKA + pragma Inline (Get_Window); -- ANCHOR(`panel_window()',`Panel_Window') function Panel_Window (Pan : Panel) return Window renames Get_Window; + pragma Inline (Panel_Window); -- ANCHOR(`replace_panel()',`Replace') procedure Replace (Pan : in Panel; Win : in Window); -- AKA + pragma Inline (Replace); -- ANCHOR(`move_panel()',`Move') procedure Move (Pan : in Panel; Line : in Line_Position; Column : in Column_Position); -- AKA + pragma Inline (Move); -- ANCHOR(`panel_hidden()',`Is_Hidden') function Is_Hidden (Pan : Panel) return Boolean; -- AKA + pragma Inline (Is_Hidden); -- ANCHOR(`panel_above()',`Above') function Above (Pan : Panel) return Panel; @@ -112,6 +137,7 @@ include(`Panel_Linker_Options') -- ANCHOR(`del_panel()',`Delete') procedure Delete (Pan : in out Panel); -- AKA + pragma Inline (Delete); private type Panel is new System.Address; diff --git a/Ada95/gen/terminal_interface-curses.ads.m4 b/Ada95/gen/terminal_interface-curses.ads.m4 index e4f7ce9d..65bbbd75 100644 --- a/Ada95/gen/terminal_interface-curses.ads.m4 +++ b/Ada95/gen/terminal_interface-curses.ads.m4 @@ -8,31 +8,46 @@ include(M4MACRO)---------------------------------------------------------------- -- -- -- 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 1996 -- Version Control: --- $Revision: 1.7 $ +-- $Revision: 1.15 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ include(`Base_Defs') with System; with Interfaces.C; -- We need this for some assertions. package Terminal_Interface.Curses is - + pragma Preelaborate (Curses); include(`Linker_Options') +include(`Version_Info') type Window is private; Null_Window : constant Window; @@ -127,7 +142,8 @@ include(`AC_Rep') ------------------ -- Exceptions -- ------------------ - Curses_Exception : exception; + Curses_Exception : exception; + Wrong_Curses_Version : exception; -- Those exceptions are raised by the ETI (Extended Terminal Interface) -- subpackets for Menu and Forms handling. @@ -195,15 +211,20 @@ include(`ACS_Map') -- ANCHOR(`initscr()',`Init_Windows') procedure Init_Windows renames Init_Screen; -- AKA + pragma Inline (Init_Screen); + pragma Inline (Init_Windows); -- ANCHOR(`endwin()',`End_Windows') procedure End_Windows; -- AKA procedure End_Screen renames End_Windows; + pragma Inline (End_Windows); + pragma Inline (End_Screen); -- ANCHOR(`isendwin()',`Is_End_Window') function Is_End_Window return Boolean; -- AKA + pragma Inline (Is_End_Window); -- MANPAGE(`curs_move.3x') @@ -212,6 +233,7 @@ include(`ACS_Map') Line : in Line_Position; Column : in Column_Position); -- AKA + pragma Inline (Move_Cursor); -- MANPAGE(`curs_addch.3x') @@ -239,6 +261,7 @@ include(`ACS_Map') Column : in Column_Position; Ch : in Character); -- Move to the position and add a single character into the window + -- There are more Add routines, so the Inline pragma follows later -- ANCHOR(`wechochar()',`Add_With_Immediate_Echo') procedure Add_With_Immediate_Echo @@ -250,6 +273,7 @@ include(`ACS_Map') (Win : in Window := Standard_Window; Ch : in Character); -- Add a character and do an immediate resfresh of the screen. + pragma Inline (Add_With_Immediate_Echo); -- MANPAGE(`curs_window.3x') @@ -260,6 +284,7 @@ include(`ACS_Map') First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA + pragma Inline (Create); function New_Window (Number_Of_Lines : Line_Count; @@ -267,11 +292,13 @@ include(`ACS_Map') First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window renames Create; + pragma Inline (New_Window); -- ANCHOR(`delwin()',`Delete') procedure Delete (Win : in out Window); -- AKA -- Reset Win to Null_Window + pragma Inline (Delete); -- ANCHOR(`subwin()',`Sub_Window') function Sub_Window @@ -281,6 +308,7 @@ include(`ACS_Map') First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA + pragma Inline (Sub_Window); -- ANCHOR(`derwin()',`Derived_Window') function Derived_Window @@ -290,22 +318,26 @@ include(`ACS_Map') First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA + pragma Inline (Derived_Window); -- ANCHOR(`dupwin()',`Duplicate') function Duplicate (Win : Window) return Window; -- AKA + pragma Inline (Duplicate); -- ANCHOR(`mvwin()',`Move_Window') procedure Move_Window (Win : in Window; Line : in Line_Position; Column : in Column_Position); -- AKA + pragma Inline (Move_Window); -- ANCHOR(`mvderwin()',`Move_Derived_Window') procedure Move_Derived_Window (Win : in Window; Line : in Line_Position; Column : in Column_Position); -- AKA + pragma Inline (Move_Derived_Window); -- ANCHOR(`wsyncup()',`Synchronize_Upwards') procedure Synchronize_Upwards (Win : in Window); @@ -321,6 +353,7 @@ include(`ACS_Map') procedure Set_Synch_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA + pragma Inline (Set_Synch_Mode); -- MANPAGE(`curs_addstr.3x') @@ -357,6 +390,7 @@ include(`ACS_Map') Len : in Integer := -1); -- AKA -- ALIAS(`mvwaddchstr()') + pragma Inline (Add); -- MANPAGE(`curs_border.3x') @@ -373,6 +407,7 @@ include(`ACS_Map') Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character ); -- AKA + pragma Inline (Border); -- ANCHOR(`box()',`Box') procedure Box @@ -380,6 +415,7 @@ include(`ACS_Map') Vertical_Symbol : in Attributed_Character := Default_Character; Horizontal_Symbol : in Attributed_Character := Default_Character); -- AKA + pragma Inline (Box); -- ANCHOR(`whline()',`Horizontal_Line') procedure Horizontal_Line @@ -387,6 +423,7 @@ include(`ACS_Map') Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character); -- AKA + pragma Inline (Horizontal_Line); -- ANCHOR(`wvline()',`Vertical_Line') procedure Vertical_Line @@ -394,6 +431,7 @@ include(`ACS_Map') Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character); -- AKA + pragma Inline (Vertical_Line); -- MANPAGE(`curs_getch.3x') @@ -405,19 +443,24 @@ include(`ACS_Map') -- window. -- If for any reason (i.e. a timeout) we couldn't get a character the -- returned keycode is Key_None. + pragma Inline (Get_Keystroke); -- ANCHOR(`ungetch()',`Undo_Keystroke') procedure Undo_Keystroke (Key : in Real_Key_Code); -- AKA + pragma Inline (Undo_Keystroke); -- ANCHOR(`has_key()',`Has_Key') function Has_Key (Key : Special_Key_Code) return Boolean; -- AKA + pragma Inline (Has_Key); + -- | -- | Some helper functions -- | function Is_Function_Key (Key : Special_Key_Code) return Boolean; -- Return True if the Key is a function key (i.e. one of F0 .. F63) + pragma Inline (Is_Function_Key); subtype Function_Key_Number is Integer range 0 .. 63; -- (n)curses allows for 64 function keys. @@ -425,9 +468,11 @@ include(`ACS_Map') function Function_Key (Key : Real_Key_Code) return Function_Key_Number; -- Return the number of the function key. If the code is not a -- function key, a CONSTRAINT_ERROR will be raised. + pragma Inline (Function_Key); function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code; -- Return the key code for a given functionkey number. + pragma Inline (Function_Key_Code); -- MANPAGE(`curs_attr.3x') @@ -445,8 +490,9 @@ include(`ACS_Map') Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Character_Attributes); - -- ANCHOR(`wattr_get()',`Get_Character_Attribute') + -- ANCHOR(`wattr_get()',`Get_Character_Attributes') function Get_Character_Attribute (Win : in Window := Standard_Window) return Character_Attribute_Set; -- AKA @@ -455,6 +501,7 @@ include(`ACS_Map') function Get_Character_Attribute (Win : in Window := Standard_Window) return Color_Pair; -- AKA + pragma Inline (Get_Character_Attribute); -- ANCHOR(`wchgat()',`Change_Attributes') procedure Change_Attributes @@ -473,16 +520,19 @@ include(`ACS_Map') Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Change_Attributes); -- MANPAGE(`curs_beep.3x') -- ANCHOR(`beep()',`Beep') procedure Beep; -- AKA + pragma Inline (Beep); -- ANCHOR(`flash()',`Flash_Screen') procedure Flash_Screen; -- AKA + pragma Inline (Flash_Screen); -- MANPAGE(`curs_inopts.3x') @@ -492,38 +542,45 @@ include(`ACS_Map') procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`nocbreak()') + pragma Inline (Set_Cbreak_Mode); -- ANCHOR(`raw()',`Set_Raw_Mode') procedure Set_Raw_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`noraw()') + pragma Inline (Set_Raw_Mode); -- ANCHOR(`echo()',`Set_Echo_Mode') procedure Set_Echo_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`noecho()') + pragma Inline (Set_Echo_Mode); -- ANCHOR(`meta()',`Set_Meta_Mode') procedure Set_Meta_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True); -- AKA + pragma Inline (Set_Meta_Mode); -- ANCHOR(`keypad()',`Set_KeyPad_Mode') procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True); -- AKA + pragma Inline (Set_KeyPad_Mode); type Half_Delay_Amount is range 1 .. 255; -- ANCHOR(`halfdelay()',`Half_Delay') procedure Half_Delay (Amount : in Half_Delay_Amount); -- AKA + pragma Inline (Half_Delay); -- ANCHOR(`intrflush()',`Set_Flush_On_Interrupt_Mode') procedure Set_Flush_On_Interrupt_Mode (Win : in Window := Standard_Window; Mode : in Boolean := True); -- AKA + pragma Inline (Set_Flush_On_Interrupt_Mode); -- ANCHOR(`qiflush()',`Set_Queue_Interrupt_Mode') procedure Set_Queue_Interrupt_Mode @@ -531,12 +588,14 @@ include(`ACS_Map') Flush : in Boolean := True); -- AKA -- ALIAS(`noqiflush()') + pragma Inline (Set_Queue_Interrupt_Mode); -- ANCHOR(`nodelay()',`Set_NoDelay_Mode') procedure Set_NoDelay_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA + pragma Inline (Set_NoDelay_Mode); type Timeout_Mode is (Blocking, Non_Blocking, Delayed); @@ -549,12 +608,14 @@ include(`ACS_Map') -- introduce the Timeout_Mode parameter. This should improve -- readability. For Blocking and Non_Blocking, the Amount is not -- evaluated. + -- We don't inline this procedure. -- ANCHOR(`notimeout()',`Set_Escape_Time_Mode') procedure Set_Escape_Timer_Mode (Win : in Window := Standard_Window; Timer_Off : in Boolean := False); -- AKA + pragma Inline (Set_Escape_Timer_Mode); -- MANPAGE(`curs_outopts.3x') @@ -562,45 +623,53 @@ include(`ACS_Map') procedure Set_NL_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`nonl()') + pragma Inline (Set_NL_Mode); -- ANCHOR(`clearok()',`Clear_On_Next_Update') procedure Clear_On_Next_Update (Win : in Window := Standard_Window; Do_Clear : in Boolean := True); -- AKA + pragma Inline (Clear_On_Next_Update); -- ANCHOR(`idlok()',`Use_Insert_Delete_Line') procedure Use_Insert_Delete_Line (Win : in Window := Standard_Window; Do_Idl : in Boolean := True); -- AKA + pragma Inline (Use_Insert_Delete_Line); -- ANCHOR(`idcok()',`Use_Insert_Delete_Character') procedure Use_Insert_Delete_Character (Win : in Window := Standard_Window; Do_Idc : in Boolean := True); -- AKA + pragma Inline (Use_Insert_Delete_Character); -- ANCHOR(`leaveok()',`Leave_Cursor_After_Update') procedure Leave_Cursor_After_Update (Win : in Window := Standard_Window; Do_Leave : in Boolean := True); -- AKA + pragma Inline (Leave_Cursor_After_Update); -- ANCHOR(`immedok()',`Immediate_Update_Mode') procedure Immediate_Update_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA + pragma Inline (Immediate_Update_Mode); -- ANCHOR(`scrollok()',`Allow_Scrolling') procedure Allow_Scrolling (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA + pragma Inline (Allow_Scrolling); function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean; -- There is no such function in the C interface. + pragma Inline (Scrolling_Allowed); -- ANCHOR(`wsetscrreg()',`Set_Scroll_Region') procedure Set_Scroll_Region @@ -608,21 +677,27 @@ include(`ACS_Map') Top_Line : in Line_Position; Bottom_Line : in Line_Position); -- AKA + pragma Inline (Set_Scroll_Region); -- MANPAGE(`curs_refresh.3x') -- ANCHOR(`doupdate()',`Update_Screen') procedure Update_Screen; -- AKA + pragma Inline (Update_Screen); -- ANCHOR(`wrefresh()',`Refresh') procedure Refresh (Win : in Window := Standard_Window); -- AKA + -- There is an overloaded Refresh for Pads. + -- The Inline pragma appears there -- ANCHOR(`wnoutrefresh()',`Refresh_Without_Update') procedure Refresh_Without_Update (Win : in Window := Standard_Window); -- AKA + -- There is an overloaded Refresh_Without_Update for Pads. + -- The Inline pragma appears there -- ANCHOR(`redrawwin()',`Redraw') procedure Redraw (Win : in Window := Standard_Window); @@ -633,27 +708,32 @@ include(`ACS_Map') Begin_Line : in Line_Position; Line_Count : in Positive); -- AKA + pragma Inline (Redraw); -- MANPAGE(`curs_clear.3x') -- ANCHOR(`werase()',`Erase') procedure Erase (Win : in Window := Standard_Window); -- AKA + pragma Inline (Erase); -- ANCHOR(`wclear()',`Clear') procedure Clear (Win : in Window := Standard_Window); -- AKA + pragma Inline (Clear); -- ANCHOR(`wclrtobot()',`Clear_To_End_Of_Screen') procedure Clear_To_End_Of_Screen (Win : in Window := Standard_Window); -- AKA + pragma Inline (Clear_To_End_Of_Screen); -- ANCHOR(`wclrtoeol()',`Clear_To_End_Of_Line') procedure Clear_To_End_Of_Line (Win : in Window := Standard_Window); -- AKA + pragma Inline (Clear_To_End_Of_Line); -- MANPAGE(`curs_bkgd.3x') @@ -662,33 +742,38 @@ include(`ACS_Map') (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA + pragma Inline (Set_Background); -- ANCHOR(`wbkgd()',`Change_Background') procedure Change_Background (Win : in Window := Standard_Window; Ch : in Attributed_Character); -- AKA + pragma Inline (Change_Background); -- ANCHOR(`wbkgdget()',`Get_Background') function Get_Background (Win : Window := Standard_Window) return Attributed_Character; -- AKA + pragma Inline (Get_Background); -- MANPAGE(`curs_touch.3x') - -- ANCHOR(`touchwin()',`Touch') - procedure Touch (Win : in Window := Standard_Window); - -- AKA - -- ANCHOR(`untouchwin()',`Untouch') procedure Untouch (Win : in Window := Standard_Window); -- AKA + pragma Inline (Untouch); + + -- ANCHOR(`touchwin()',`Touch') + procedure Touch (Win : in Window := Standard_Window); + -- AKA -- ANCHOR(`touchline()',`Touch') procedure Touch (Win : in Window := Standard_Window; Start : in Line_Position; Count : in Positive); -- AKA + pragma Inline (Touch); -- ANCHOR(`wtouchln()',`Change_Line_Status') procedure Change_Lines_Status (Win : in Window := Standard_Window; @@ -696,6 +781,7 @@ include(`ACS_Map') Count : in Positive; State : in Boolean); -- AKA + pragma Inline (Change_Lines_Status); -- ANCHOR(`is_linetouched()',`Is_Touched') function Is_Touched (Win : Window := Standard_Window; @@ -705,6 +791,7 @@ include(`ACS_Map') -- ANCHOR(`is_wintouched()',`Is_Touched') function Is_Touched (Win : Window := Standard_Window) return Boolean; -- AKA + pragma Inline (Is_Touched); -- MANPAGE(`curs_overlay.3x') @@ -720,16 +807,19 @@ include(`ACS_Map') Destination_Right_Column : in Column_Position; Non_Destructive_Mode : in Boolean := True); -- AKA + pragma Inline (Copy); -- ANCHOR(`overwrite()',`Overwrite') procedure Overwrite (Source_Window : in Window; Destination_Window : in Window); -- AKA + pragma Inline (Overwrite); -- ANCHOR(`overlay()',`Overlay') procedure Overlay (Source_Window : in Window; Destination_Window : in Window); -- AKA + pragma Inline (Overlay); -- MANPAGE(`curs_deleteln.3x') @@ -738,14 +828,17 @@ include(`ACS_Map') (Win : in Window := Standard_Window; Lines : in Integer := 1); -- default is to insert one line above -- AKA + pragma Inline (Insert_Delete_Lines); -- ANCHOR(`wdeleteln()',`Delete_Line') procedure Delete_Line (Win : in Window := Standard_Window); -- AKA + pragma Inline (Delete_Line); -- ANCHOR(`winsertln()',`Insert_Line') procedure Insert_Line (Win : in Window := Standard_Window); -- AKA + pragma Inline (Insert_Line); -- MANPAGE(`curs_getyx.3x') @@ -755,6 +848,7 @@ include(`ACS_Map') Number_Of_Lines : out Line_Count; Number_Of_Columns : out Column_Count); -- AKA + pragma Inline (Get_Size); -- ANCHOR(`getbegyx()',`Get_Window_Position') procedure Get_Window_Position @@ -762,6 +856,7 @@ include(`ACS_Map') Top_Left_Line : out Line_Position; Top_Left_Column : out Column_Position); -- AKA + pragma Inline (Get_Window_Position); -- ANCHOR(`getyx()',`Get_Cursor_Position') procedure Get_Cursor_Position @@ -769,6 +864,7 @@ include(`ACS_Map') Line : out Line_Position; Column : out Column_Position); -- AKA + pragma Inline (Get_Cursor_Position); -- ANCHOR(`getparyx()',`Get_Origin_Relative_To_Parent') procedure Get_Origin_Relative_To_Parent @@ -779,6 +875,7 @@ include(`ACS_Map') -- AKA -- Instead of placing -1 in the coordinates as return, we use a boolean -- to return the info that the window has no parent. + pragma Inline (Get_Origin_Relative_To_Parent); -- MANPAGE(`curs_pad.3x') @@ -786,6 +883,7 @@ include(`ACS_Map') function New_Pad (Lines : Line_Count; Columns : Column_Count) return Window; -- AKA + pragma Inline (New_Pad); -- ANCHOR(`subpad()',`Sub_Pad') function Sub_Pad @@ -795,6 +893,7 @@ include(`ACS_Map') First_Line_Position : Line_Position; First_Column_Position : Column_Position) return Window; -- AKA + pragma Inline (Sub_Pad); -- ANCHOR(`prefresh()',`Refresh') procedure Refresh @@ -806,6 +905,7 @@ include(`ACS_Map') Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position); -- AKA + pragma Inline (Refresh); -- ANCHOR(`pnoutrefresh()',`Refresh_Without_Update') procedure Refresh_Without_Update @@ -817,6 +917,7 @@ include(`ACS_Map') Destination_Bottom_Row : in Line_Position; Destination_Right_Column : in Column_Position); -- AKA + pragma Inline (Refresh_Without_Update); -- ANCHOR(`pechochar()',`Add_Character_To_Pad_And_Echo_It') procedure Add_Character_To_Pad_And_Echo_It @@ -827,6 +928,7 @@ include(`ACS_Map') procedure Add_Character_To_Pad_And_Echo_It (Pad : in Window; Ch : in Character); + pragma Inline (Add_Character_To_Pad_And_Echo_It); -- MANPAGE(`curs_scroll.3x') @@ -834,6 +936,7 @@ include(`ACS_Map') procedure Scroll (Win : in Window := Standard_Window; Amount : in Integer := 1); -- AKA + pragma Inline (Scroll); -- MANPAGE(`curs_delch.3x') @@ -847,6 +950,7 @@ include(`ACS_Map') Line : in Line_Position; Column : in Column_Position); -- AKA + pragma Inline (Delete_Character); -- MANPAGE(`curs_inch.3x') @@ -861,6 +965,7 @@ include(`ACS_Map') Line : Line_Position; Column : Column_Position) return Attributed_Character; -- AKA + -- More Peek's follow, pragma Inline appears later. -- MANPAGE(`curs_winch.3x') @@ -893,6 +998,7 @@ include(`ACS_Map') Len : in Integer := -1); -- AKA -- ALIAS(`mvwinsstr()') + pragma Inline (Insert); -- MANPAGE(`curs_instr.3x') @@ -929,6 +1035,7 @@ include(`ACS_Map') Len : in Integer := -1); -- AKA -- ALIAS(`mvwinchstr()') + -- We don't inline the Peek procedures -- MANPAGE(`curs_getstr.3x') @@ -944,8 +1051,10 @@ include(`ACS_Map') Column : in Column_Position; Str : out String; Len : in Integer := -1); - -- AKA: not specified in ncurses, should be: mvwgetnstr() + -- AKA + -- not specified in ncurses, should be: mvwgetnstr() -- and mvwgetstr() (which exists) + -- Get is not inlined -- MANPAGE(`curs_slk.3x') @@ -960,37 +1069,50 @@ include(`ACS_Map') procedure Init_Soft_Label_Keys (Format : in Soft_Label_Key_Format := Three_Two_Three); -- AKA + pragma Inline (Init_Soft_Label_Keys); -- ANCHOR(`slk_set()',`Set_Soft_Label_Key') procedure Set_Soft_Label_Key (Label : in Label_Number; Text : in String; Fmt : in Label_Justification := Left); -- AKA + -- We don't inline this procedure -- ANCHOR(`slk_refresh()',`Refresh_Soft_Label_Key') procedure Refresh_Soft_Label_Keys; -- AKA + pragma Inline (Refresh_Soft_Label_Keys); -- ANCHOR(`slk_noutrefresh()',`Refresh_Soft_Label_Keys_Without_Update') procedure Refresh_Soft_Label_Keys_Without_Update; -- AKA + pragma Inline (Refresh_Soft_Label_Keys_Without_Update); -- ANCHOR(`slk_label()',`Get_Soft_Label_Key') procedure Get_Soft_Label_Key (Label : in Label_Number; Text : out String); -- AKA + -- ANCHOR(`slk_label()',`Get_Soft_Label_Key') + function Get_Soft_Label_Key (Label : in Label_Number) return String; + -- AKA + -- Same as function + pragma Inline (Get_Soft_Label_Key); + -- ANCHOR(`slk_clear()',`Clear_Soft_Label_Keys') procedure Clear_Soft_Label_Keys; -- AKA + pragma Inline (Clear_Soft_Label_Keys); -- ANCHOR(`slk_restore()',`Restore_Soft_Label_Keys') procedure Restore_Soft_Label_Keys; -- AKA + pragma Inline (Restore_Soft_Label_Keys); -- ANCHOR(`slk_touch()',`Touch_Soft_Label_Keys') procedure Touch_Soft_Label_Keys; -- AKA + pragma Inline (Touch_Soft_Label_Keys); -- ANCHOR(`slk_attron()',`Switch_Soft_Label_Key_Attributes') procedure Switch_Soft_Label_Key_Attributes @@ -998,12 +1120,14 @@ include(`ACS_Map') On : in Boolean := True); -- AKA -- ALIAS(`slk_attroff()') + pragma Inline (Switch_Soft_Label_Key_Attributes); -- ANCHOR(`slk_attrset()',`Set_Soft_Label_Key_Attributes') procedure Set_Soft_Label_Key_Attributes (Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA + pragma Inline (Set_Soft_Label_Key_Attributes); -- ANCHOR(`slk_attr()',`Get_Soft_Label_Key_Attributes') function Get_Soft_Label_Key_Attributes return Character_Attribute_Set; @@ -1012,6 +1136,23 @@ include(`ACS_Map') -- ANCHOR(`slk_attr()',`Get_Soft_Label_Key_Attributes') function Get_Soft_Label_Key_Attributes return Color_Pair; -- AKA + pragma Inline (Get_Soft_Label_Key_Attributes); + + -- MANPAGE(`keyok.3x') + + -- ANCHOR(`keyok()',`Enable_Key') + procedure Enable_Key (Key : in Special_Key_Code; + Enable : in Boolean := True); + -- AKA + pragma Inline (Enable_Key); + + -- MANPAGE(`define_key.3x') + + -- ANCHOR(`define_key()',`Define_Key') + procedure Define_Key (Definition : in String; + Key : in Special_Key_Code); + -- AKA + pragma Inline (Define_Key); -- MANPAGE(`curs_util.3x') @@ -1023,53 +1164,85 @@ include(`ACS_Map') -- AKA -- The external name for a real keystroke. + -- ANCHOR(`keyname()',`Key_Name') + function Key_Name (Key : in Real_Key_Code) return String; + -- AKA + -- Same as function + -- We don't inline this routine + -- ANCHOR(`unctrl()',`Un_Control') procedure Un_Control (Ch : in Attributed_Character; Str : out String); -- AKA + -- ANCHOR(`unctrl()',`Un_Control') + function Un_Control (Ch : in Attributed_Character) return String; + -- AKA + -- Same as function + pragma Inline (Un_Control); + -- ANCHOR(`delay_output()',`Delay_Output') procedure Delay_Output (Msecs : in Natural); -- AKA + pragma Inline (Delay_Output); -- ANCHOR(`flushinp()',`Flush_Input') procedure Flush_Input; -- AKA + pragma Inline (Flush_Input); -- MANPAGE(`curs_termattrs.3x') -- ANCHOR(`baudrate()',`Baudrate') function Baudrate return Natural; -- AKA + pragma Inline (Baudrate); -- ANCHOR(`erasechar()',`Erase_Character') function Erase_Character return Character; -- AKA + pragma Inline (Erase_Character); -- ANCHOR(`killchar()',`Kill_Character') function Kill_Character return Character; -- AKA + pragma Inline (Kill_Character); -- ANCHOR(`has_ic()',`Has_Insert_Character') function Has_Insert_Character return Boolean; -- AKA + pragma Inline (Has_Insert_Character); -- ANCHOR(`has_il()',`Has_Insert_Line') function Has_Insert_Line return Boolean; -- AKA + pragma Inline (Has_Insert_Line); -- ANCHOR(`termattrs()',`Supported_Attributes') function Supported_Attributes return Character_Attribute_Set; -- AKA + pragma Inline (Supported_Attributes); -- ANCHOR(`longname()',`Long_Name') procedure Long_Name (Name : out String); -- AKA + -- ANCHOR(`longname()',`Long_Name') + function Long_Name return String; + -- AKA + -- Same as function + pragma Inline (Long_Name); + -- ANCHOR(`termname()',`Terminal_Name') procedure Terminal_Name (Name : out String); -- AKA + -- ANCHOR(`termname()',`Terminal_Name') + function Terminal_Name return String; + -- AKA + -- Same as function + pragma Inline (Terminal_Name); + -- MANPAGE(`curs_color.3x') -- ANCHOR(`start_clolor()',`Start_Color') @@ -1082,16 +1255,19 @@ include(`ACS_Map') Fore : in Color_Number; Back : in Color_Number); -- AKA + pragma Inline (Init_Pair); -- ANCHOR(`pair_content()',`Pair_Content') procedure Pair_Content (Pair : in Color_Pair; Fore : out Color_Number; Back : out Color_Number); -- AKA + pragma Inline (Pair_Content); -- ANCHOR(`has_colors()',`Has_Colors') function Has_Colors return Boolean; -- AKA + pragma Inline (Has_Colors); -- ANCHOR(`init_color()',`Init_Color') procedure Init_Color (Color : in Color_Number; @@ -1099,10 +1275,12 @@ include(`ACS_Map') Green : in RGB_Value; Blue : in RGB_Value); -- AKA + pragma Inline (Init_Color); -- ANCHOR(`can_change_color()',`Can_Change_Color') function Can_Change_Color return Boolean; -- AKA + pragma Inline (Can_Change_Color); -- ANCHOR(`color_content()',`Color_Content') procedure Color_Content (Color : in Color_Number; @@ -1110,6 +1288,7 @@ include(`ACS_Map') Green : out RGB_Value; Blue : out RGB_Value); -- AKA + pragma Inline (Color_Content); -- MANPAGE(`curs_kernel.3x') @@ -1121,19 +1300,23 @@ include(`ACS_Map') procedure Save_Curses_Mode (Mode : in Curses_Mode); -- AKA -- ALIAS(`def_shell_mode()') + pragma Inline (Save_Curses_Mode); -- ANCHOR(`reset_prog_mode()',`Reset_Curses_Mode') procedure Reset_Curses_Mode (Mode : in Curses_Mode); -- AKA -- ALIAS(`reset_shell_mode()') + pragma Inline (Reset_Curses_Mode); -- ANCHOR(`savetty()',`Save_Terminal_State') procedure Save_Terminal_State; -- AKA + pragma Inline (Save_Terminal_State); -- ANCHOR(`resetty();',`Reset_Terminal_State') procedure Reset_Terminal_State; -- AKA + pragma Inline (Reset_Terminal_State); type Stdscr_Init_Proc is access function (Win : Window; @@ -1151,16 +1334,19 @@ include(`ACS_Map') -- ripoffline(), in which the Lines argument absolute value is the -- number of lines to be ripped of. The official ripoffline() only -- uses the sign of Lines to rip of a single line from bottom or top. + pragma Inline (Rip_Off_Lines); type Cursor_Visibility is (Invisible, Normal, Very_Visible); -- ANCHOR(`curs_set()',`Set_Cursor_Visibility') procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility); -- AKA + pragma Inline (Set_Cursor_Visibility); -- ANCHOR(`napms()',`Nap_Milli_Seconds') procedure Nap_Milli_Seconds (Ms : in Natural); -- AKA + pragma Inline (Nap_Milli_Seconds); -- |===================================================================== -- | Some usefull helpers. @@ -1176,12 +1362,10 @@ include(`ACS_Map') -- Screen coordinates are the position informations on the physical device. -- An Curses_Exception will be raised if Line and Column are not in the -- Window or if you pass the Null_Window as argument. + -- We don't inline this procedure private type Window is new System.Address; Null_Window : constant Window := Window (System.Null_Address); - Generation_Bit_Order : constant System.Bit_Order := System.M4_BIT_ORDER; - -- This constant may be different on your system. - end Terminal_Interface.Curses; diff --git a/Ada95/html/Makefile b/Ada95/html/Makefile deleted file mode 100644 index caf46e35..00000000 --- a/Ada95/html/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Nothing to do in this directory - -all:: - @ - -clean:: - @ - -distclean:: clean - @ - -realclean:: clean - @ - -mostlyclean:: clean - @ - -install:: - @ diff --git a/Ada95/html/curs_addch.3x.html b/Ada95/html/curs_addch.3x.html index e739fc42..5903801e 100644 --- a/Ada95/html/curs_addch.3x.html +++ b/Ada95/html/curs_addch.3x.html @@ -74,8 +74,8 @@ ACS_RTEE + right tee ACS_LTEE + left tee ACS_BTEE + bottom tee ACS_TTEE + top tee ACS_HLINE - horizontal line ACS_VLINE | vertical - line ACS_PLUS + plus ACS_S1 - scan line 1 ACS_S9 - _ scan line 9 ACS_DIAMOND + diamond + line ACS_PLUS + plus ACS_S1 - scan line 1 + ACS_S9 _ scan line 9 ACS_DIAMOND + diamond ACS_CKBOARD : checker board (stipple) ACS_DEGREE ' degree symbol ACS_PLMINUS # plus/minus ACS_BULLET o bullet @@ -85,7 +85,7 @@ ACS_UARROW ^ arrow pointing up ACS_BOARD # board of squares ACS_LANTERN # lantern symbol ACS_BLOCK # solid square block ACS_S3 - scan line - 3 ACS_S7 - scan line 7 ACS_LEQUAL < less- + 3 ACS_S7 - scan line 7 ACS_LEQUAL < less- than-or-equal-to ACS_GEQUAL > greater-than-or- equal-to ACS_PI * greek pi ACS_NEQUAL ! not- equal ACS_STERLING f pound-sterling symbol diff --git a/Ada95/html/curs_attr.3x.html b/Ada95/html/curs_attr.3x.html index 6fe234c7..dd64b5b4 100644 --- a/Ada95/html/curs_attr.3x.html +++ b/Ada95/html/curs_attr.3x.html @@ -71,7 +71,7 @@ tion generalizes this to any window; the mvwchgat function does a cursor move before acting. In these functions, the color argument is a color-pair index (as in the first - argument of init_pair, see curs_color(3x)). The opts + argument of init_pair, see curs_color(3X)). The opts argument is not presently used, but is reserved for the future (leave it NULL). diff --git a/Ada95/html/curs_color.3x.html b/Ada95/html/curs_color.3x.html index a1f877be..dab8b2fe 100644 --- a/Ada95/html/curs_color.3x.html +++ b/Ada95/html/curs_color.3x.html @@ -145,7 +145,7 @@ pair affects only character cells that a character write operation explicitly touches. To change the background color used when parts of a window are blanked by erasing - or scrolling operations, see curs_bkgd(3x). + or scrolling operations, see curs_bkgd(3X). Several caveats apply on 386 and 486 machines with VGA- compatible graphics: diff --git a/Ada95/html/curs_getch.3x.html b/Ada95/html/curs_getch.3x.html index a89c96e7..52d23976 100644 --- a/Ada95/html/curs_getch.3x.html +++ b/Ada95/html/curs_getch.3x.html @@ -92,42 +92,43 @@ KEY_CLOSE/Close key KEY_COMMAND/Cmd (command) key KEY_COPY/Copy key KEY_CREATE/Create key KEY_END/End key KEY_EXIT/Exit key KEY_FIND/Find key KEY_HELP/Help key - KEY_MARK/Mark key KEY_MESSAGE/Message key KEY_MOVE/Move - key KEY_NEXT/Next object key KEY_OPEN/Open key - KEY_OPTIONS/Options key KEY_PREVIOUS/Previous object key - KEY_REDO/Redo key KEY_REFERENCE/Ref(erence) key - KEY_REFRESH/Refresh key KEY_REPLACE/Replace key - KEY_RESTART/Restart key KEY_RESUME/Resume key + KEY_MARK/Mark key KEY_MESSAGE/Message key KEY_MOUSE/Mouse + event read KEY_MOVE/Move key KEY_NEXT/Next object key + KEY_OPEN/Open key KEY_OPTIONS/Options key KEY_PREVI- + OUS/Previous object key KEY_REDO/Redo key KEY_REFER- + ENCE/Ref(erence) key KEY_REFRESH/Refresh key + KEY_REPLACE/Replace key KEY_RESIZE/Screen resized + KEY_RESTART/Restart key KEY_RESUME/Resume key KEY_SAVE/Save key KEY_SBEG/Shifted beginning key KEY_SCAN- - CEL/Shifted cancel key KEY_SCOMMAND/Shifted command key - KEY_SCOPY/Shifted copy key KEY_SCREATE/Shifted create key - KEY_SDC/Shifted delete char key KEY_SDL/Shifted delete - line key KEY_SELECT/Select key KEY_SEND/Shifted end key + CEL/Shifted cancel key KEY_SCOMMAND/Shifted command key + KEY_SCOPY/Shifted copy key KEY_SCREATE/Shifted create key + KEY_SDC/Shifted delete char key KEY_SDL/Shifted delete + line key KEY_SELECT/Select key KEY_SEND/Shifted end key KEY_SEOL/Shifted clear line key KEY_SEXIT/Shifted exit key KEY_SFIND/Shifted find key KEY_SHELP/Shifted help key - KEY_SHOME/Shifted home key KEY_SIC/Shifted input key + KEY_SHOME/Shifted home key KEY_SIC/Shifted input key KEY_SLEFT/Shifted left arrow key KEY_SMESSAGE/Shifted mes- sage key KEY_SMOVE/Shifted move key KEY_SNEXT/Shifted next - key KEY_SOPTIONS/Shifted options key KEY_SPREVIOUS/Shifted - KEY_SRIGHT/Shifted right arrow KEY_SRSUME/Shifted resume - key KEY_SSAVE/Shifted save key KEY_SSUSPEND/Shifted sus- - pend key KEY_SUNDO/Shifted undo key KEY_SUSPEND/Suspend + redo key KEY_SREPLACE/Shifted replace key + KEY_SRIGHT/Shifted right arrow KEY_SRSUME/Shifted resume + key KEY_SSAVE/Shifted save key KEY_SSUSPEND/Shifted sus- + pend key KEY_SUNDO/Shifted undo key KEY_SUSPEND/Suspend key KEY_UNDO/Undo key Keypad is arranged like this: - center allbox tab(/) ; c c c . A1/up/A3 left/B2/right + center allbox tab(/) ; c c c . A1/up/A3 left/B2/right C1/down/C3 The has_key routine takes a key value from the above list, - and returns TRUE or FALSE according as the current termi- + and returns TRUE or FALSE according as the current termi- nal type recognizes a key with that value.

RETURN VALUE

-       All routines return the integer ERR upon  failure  and  an
+       All  routines  return  the integer ERR upon failure and an
        integer value other than ERR (OK in the case of ungetch())
        upon successful completion.
 
@@ -135,64 +136,63 @@
 

NOTES

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

PORTABILITY

-       The *get* functions are described in the XSI Curses  stan-
-       dard,  Issue  4.   They  read single-byte characters only.
-       The standard specifies that they return  ERR  on  failure,
+       The  *get* functions are described in the XSI Curses stan-
+       dard, Issue 4.  They  read  single-byte  characters  only.
+       The  standard  specifies  that they return ERR on failure,
        but specifies no error conditions.
 
-       The  echo  behavior of these functions on input of KEY_ or
-       backspace characters was not specified in the  SVr4  docu-
-       mentation.   This  description  is  adopted  from  the XSI
-       dled  signals  is  unspecified  in the SVr4 and XSI Curses
-       documentation.  Under historical  curses  implementations,
-       it  varied  depending  on  whether  the operating system's
-       implementation of  handled  signal  receipt  interrupts  a
-       read(2)  call in progress or not, and also (in some imple-
-       mentations) depending on whether an input timeout or  non-
+       The echo behavior of these functions on input of  KEY_  or
+       backspace  characters  was not specified in the SVr4 docu-
+
+       The  behavior of getch and friends in the presence of han-
+       dled signals is unspecified in the  SVr4  and  XSI  Curses
+       documentation.   Under  historical curses implementations,
+       it varied depending  on  whether  the  operating  system's
+       implementation  of  handled  signal  receipt  interrupts a
+       read(2) call in progress or not, and also (in some  imple-
+       mentations)  depending on whether an input timeout or non-
        blocking mode hsd been set.
 
        Programmers concerned about portability should be prepared
-       for either of two  cases:  (a)  signal  receipt  does  not
-       interrupt  getch;  (b) signal receipt interrupts getch and
-       causes it to return ERR with errno set  to  EINTR.   Under
-       the  ncurses  implementation, handled signals never inter-
+       for  either  of  two  cases:  (a)  signal receipt does not
+       interrupt getch; (b) signal receipt interrupts  getch  and
+       causes  it  to  return ERR with errno set to EINTR.  Under
+       the ncurses implementation, handled signals  never  inter-
        rupt getch.
 
-       The has_key function is unique to ncurses.   We  recommend
-       that  any  code using it be conditionalized on the NCURSES
-       feature macro.
+       The  has_key  function is unique to ncurses.  We recommend
+       that  any  code  using  it  be  conditionalized   on   the
+       NCURSES_VERSION feature macro.
 
 
 

SEE ALSO

-       curses(3X),        curs_inopts(3X),         curs_move(3X),
-       curs_refresh(3X).
-
-
+       curses(3X),        curs_inopts(3X),        curs_mouse(3X),
+       curs_move(3X), curs_refresh(3X).  resizeterm(3X).
 
 
 
diff --git a/Ada95/html/curs_inch.3x.html b/Ada95/html/curs_inch.3x.html
index 093f99ad..cb7dd9be 100644
--- a/Ada95/html/curs_inch.3x.html
+++ b/Ada95/html/curs_inch.3x.html
@@ -30,8 +30,8 @@
        returned by winch.
 
        l  l  .   A_CHARTEXT     Bit-mask  to  extract   character
-       A_ATTRIBUTES   Bit-mask   to  extract  attributes  A_COLOR
-            Bit-mask to extract color-pair field information
+       A_ATTRIBUTES   Bit-mask      to     extract     attributes
+       A_COLOR   Bit-mask to extract color-pair field information
 
 
 
@@ -41,7 +41,7 @@

PORTABILITY

-       These functions are described in the XSI Curses  standard,
+       These  functions are described in the XSI Curses standard,
        Issue 4.
 
 
diff --git a/Ada95/html/curs_kernel.3x.html b/Ada95/html/curs_kernel.3x.html
index 82b012f7..fe706d52 100644
--- a/Ada95/html/curs_kernel.3x.html
+++ b/Ada95/html/curs_kernel.3x.html
@@ -3,7 +3,7 @@
 
        def_prog_mode,       def_shell_mode,      reset_prog_mode,
        reset_shell_mode, resetty, savetty, getsyx, setsyx, ripof-
-       fline, curs_set, napms - low-level xscurses routines
+       fline, curs_set, napms - low-level curses routines
 
 
 
diff --git a/Ada95/html/curs_mouse.3x.html b/Ada95/html/curs_mouse.3x.html index d328f533..82622ed8 100644 --- a/Ada95/html/curs_mouse.3x.html +++ b/Ada95/html/curs_mouse.3x.html @@ -28,7 +28,7 @@

DESCRIPTION

        These functions provide an interface to mouse events  from
-       ncurses(3x).   Mouse  events  are represented by KEY_MOUSE
+       ncurses(3X).   Mouse  events  are represented by KEY_MOUSE
        pseudo-key values in the wgetch input stream.
 
        To make mouse events visible, use the mousemask  function.
@@ -47,26 +47,28 @@
        Here are the mouse event type masks:
 
        l  l  _ _ l l.  Name Description BUTTON1_PRESSED     mouse
-       button 1 down BUTTON1_RELEASED    mouse button 1  up  BUT-
-       TON1_CLICKED        mouse       button      1      clicked
+       button  1  down  BUTTON1_RELEASED    mouse  button  1   up
+       BUTTON1_CLICKED     mouse       button      1      clicked
        BUTTON1_DOUBLE_CLICKED   mouse  button  1  double  clicked
        BUTTON1_TRIPLE_CLICKED   mouse  button  1  triple  clicked
-       BUTTON2_PRESSED       mouse      button       2       down
-       BUTTON2_RELEASED    mouse   button  2  up  BUTTON2_CLICKED
-           mouse button 2 clicked  BUTTON2_DOUBLE_CLICKED   mouse
-       button  2  double  clicked  BUTTON2_TRIPLE_CLICKED   mouse
-       button 2 triple clicked BUTTON3_PRESSED     mouse button 3
-       down BUTTON3_RELEASED    mouse button 3 up BUTTON3_CLICKED
-       button 3 triple clicked BUTTON4_PRESSED     mouse button 4
-       down BUTTON4_RELEASED    mouse button 4 up BUTTON4_CLICKED
-           mouse button 4 clicked  BUTTON4_DOUBLE_CLICKED   mouse
-       button  4  double  clicked  BUTTON4_TRIPLE_CLICKED   mouse
-       button 4 triple clicked BUTTON_SHIFT   shift was down dur-
-       ing  button  state  change BUTTON_CTRL    control was down
-       during button state  change  BUTTON_ALT     alt  was  down
-       during  button state change ALL_MOUSE_EVENTS    report all
-       button state changes REPORT_MOUSE_POSITION    report mouse
-       movement
+       BUTTON2_PRESSED     mouse       button       2        down
+       BUTTON2_RELEASED    mouse        button        2        up
+       BUTTON2_CLICKED     mouse      button      2       clicked
+       BUTTON2_DOUBLE_CLICKED   mouse  button  2  double  clicked
+       BUTTON2_TRIPLE_CLICKED   mouse  button  2  triple  clicked
+       BUTTON3_PRESSED     mouse        button       3       down
+       BUTTON3_DOUBLE_CLICKED   mouse  button  3  double  clicked
+       BUTTON3_TRIPLE_CLICKED   mouse  button  3  triple  clicked
+       BUTTON4_PRESSED     mouse       button       4        down
+       BUTTON4_RELEASED    mouse        button        4        up
+       BUTTON4_CLICKED     mouse      button      4       clicked
+       BUTTON4_DOUBLE_CLICKED   mouse  button  4  double  clicked
+       BUTTON4_TRIPLE_CLICKED   mouse  button  4  triple  clicked
+       BUTTON_SHIFT   shift  was  down during button state change
+       BUTTON_CTRL    control was down during button state change
+       BUTTON_ALT     alt  was  down  during  button state change
+       ALL_MOUSE_EVENTS    report  all   button   state   changes
+       REPORT_MOUSE_POSITION    report mouse movement
 
        Once  a  class of mouse events have been made visible in a
        window, calling the wgetch function  on  that  window  may
@@ -109,10 +111,9 @@
        All  routines  return  the  integer ERR upon failure or OK
        upon successful completion.
 
-
-
-

PORTABILITY

-       These calls were designed for  ncurses(3x),  and  are  not
+       These calls were designed for  ncurses(3X),  and  are  not
+       found in SVr4 curses, 4.4BSD curses, or any other previous
+       version of curses.
 
        The feature macro NCURSES_MOUSE_VERSION is provided so the
        preprocessor  can  be  used to test whether these features
@@ -125,11 +126,11 @@
        teed.  Additional fields may be added to the structure  in
        the future.
 
-       Under  ncurses(3x),  these  calls  are  implemented  using
+       Under  ncurses(3X),  these  calls  are  implemented  using
        either xterm's built-in mouse-tracking API  or  Alessandro
        Rubini's  gpm  server.   If  you are using something other
        than xterm there is no gpm daemon running on your machine,
-       mouse  events  will not be visible to ncurses(3x) (and the
+       mouse  events  will not be visible to ncurses(3X) (and the
        wmousemask function will always return 0).
 
        The z member in the event structure is not presently used.
@@ -166,9 +167,6 @@
 
 
 
-
-
-
 
diff --git a/Ada95/html/curs_outopts.3x.html b/Ada95/html/curs_outopts.3x.html index 54e8aa71..7c5ec4bb 100644 --- a/Ada95/html/curs_outopts.3x.html +++ b/Ada95/html/curs_outopts.3x.html @@ -134,6 +134,10 @@ perform better vertical-motion optimization at wrefresh time. + The XSI Curses standard does not mention that the cursor + should be made invisible as a side-effect of leaveok. + SVr4 curses does this. +

NOTES

@@ -163,10 +167,6 @@
 
 
 
-
-
-
-
 
diff --git a/Ada95/html/curs_print.3x.html b/Ada95/html/curs_print.3x.html index fcf16ee0..9848edf9 100644 --- a/Ada95/html/curs_print.3x.html +++ b/Ada95/html/curs_print.3x.html @@ -48,7 +48,7 @@

PORTABILITY

-       The mcprint call was designed for ncurses(3x), and is  not
+       The mcprint call was designed for ncurses(3X), and is  not
        found in SVr4 curses, 4.4BSD curses, or any other previous
        version of curses.
 
diff --git a/Ada95/html/curs_refresh.3x.html b/Ada95/html/curs_refresh.3x.html
index ff6d9a33..9e44730f 100644
--- a/Ada95/html/curs_refresh.3x.html
+++ b/Ada95/html/curs_refresh.3x.html
@@ -62,16 +62,15 @@
 
        The wredrawln routine indicates to curses that some screen
        lines  are corrupted and should be thrown away before any-
-       thing is written over them it touches the indicated  lines
-       (marking  them changed) then does a refresh of the window.
-       The routine redrawwin() touches the entire window and then
-       refreshes it.
+       thing is written over  them.   It  touches  the  indicated
+       lines  (marking  them  changed).   The routine redrawwin()
+       touches the entire window.
 
 
 

RETURN VALUE

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

PORTABILITY

-       The  XSI  Curses  standard,  Issue 4 describes these func-
+       The XSI Curses standard, Issue  4  describes  these  func-
        tions.
 
-       Whether wnoutrefresh() copies to the  virtual  screen  the
-       entire  contents  of a window or just its changed portions
+       Whether  wnoutrefresh()  copies  to the virtual screen the
+       entire contents of a window or just its  changed  portions
        has never been well-documented in historic curses versions
-       (including  SVr4).   It  might be unwise to rely on either
-       behavior in programs that might have  to  be  linked  with
-       other  curses  implementations.   Instead,  you  can do an
-       explicit touchwin()  before  the  wnoutrefresh()  call  to
+       (including SVr4).  It might be unwise to  rely  on  either
+       behavior  in  programs  that  might have to be linked with
+       other curses implementations.   Instead,  you  can  do  an
+       explicit  touchwin()  before  the  wnoutrefresh()  call to
        guarantee an entire-contents copy anywhere.
 
 
@@ -117,6 +116,7 @@
 
 
 
+
 
diff --git a/Ada95/html/curs_scanw.3x.html b/Ada95/html/curs_scanw.3x.html index c15106f6..5dfe2078 100644 --- a/Ada95/html/curs_scanw.3x.html +++ b/Ada95/html/curs_scanw.3x.html @@ -51,7 +51,7 @@

SEE ALSO

-       curses(3X), curs_getstr, curs_printw, scanf(3S)
+       curses(3X), curs_getstr(3X), curs_printw(3X), scanf(3S)
 
 
 
diff --git a/Ada95/html/curs_termcap.3x.html b/Ada95/html/curs_termcap.3x.html
index 1e336333..5f448c49 100644
--- a/Ada95/html/curs_termcap.3x.html
+++ b/Ada95/html/curs_termcap.3x.html
@@ -83,7 +83,7 @@
 
 

SEE ALSO

-       curses(3X), curs_terminfo(5), putc(3S).
+       curses(3X), terminfo(5), putc(3S).
 
 
 
diff --git a/Ada95/html/curs_terminfo.3x.html b/Ada95/html/curs_terminfo.3x.html
index e125d997..85d536f4 100644
--- a/Ada95/html/curs_terminfo.3x.html
+++ b/Ada95/html/curs_terminfo.3x.html
@@ -19,8 +19,6 @@
        int  restartterm(const  char  *term,   int   fildes,   int
        *errret);
        char *tparm(const char *str, ...);
-       char  *tparam(const  char  *str,  char  *buffer, int size,
-       ...);
        int tputs(const char *str, int affcnt, int (*putc)(int));
        int putp(const char *str);
        int vidputs(chtype attrs, int (*putc)(char));
@@ -33,96 +31,91 @@
 
 

DESCRIPTION

-       These  low-level  routines must be called by programs that
+       These low-level routines must be called by  programs  that
        have to deal directly with the terminfo database to handle
-       certain  terminal  capabilities, such as programming func-
-       tion keys.  For all other functionality,  curses  routines
+       certain terminal capabilities, such as  programming  func-
+       tion  keys.   For all other functionality, curses routines
        are more suitable and their use is recommended.
 
-       Initially,   setupterm   should   be  called.   Note  that
-       setupterm is automatically called by initscr and  newterm.
+       Initially,  setupterm  should  be   called.    Note   that
+       setupterm  is automatically called by initscr and newterm.
        This  defines  the  set  of  terminal-dependent  variables
        [listed in terminfo(5)].  The terminfo variables lines and
        columns  are  initialized  by  setupterm  as  follows:  If
-       use_env(FALSE) has  been  called,  values  for  lines  and
+       use_env(FALSE)  has  been  called,  values  for  lines and
        columns specified in terminfo are used.  Otherwise, if the
-       environment variables LINES and COLUMNS exist, their  val-
+       environment  variables LINES and COLUMNS exist, their val-
        ues are used.  If these environment variables do not exist
        and the program is running in a window, the current window
-       size  is used.  Otherwise, if the environment variables do
-       not exist, the values for lines and columns  specified  in
+       size is used.  Otherwise, if the environment variables  do
+       not  exist,  the values for lines and columns specified in
        the terminfo database are used.
 
-       The  header  files  curses.h and term.h should be included
-       (in this order) to get the definitions for these  strings,
+       The header files curses.h and term.h  should  be  included
+       (in  this order) to get the definitions for these strings,
        numbers,  and  flags.   Parameterized  strings  should  be
-       passed through tparm to instantiate  them.   All  terminfo
-       the  tty modes before exiting [see curs_kernel(3X)].  Pro-
-       grams  which   use   cursor   addressing   should   output
-       enter_ca_mode  upon startup and should output exit_ca_mode
-       before exiting.  Programs desiring  shell  escapes  should
+       passed  through  tparm  to instantiate them.  All terminfo
+       strings [including the output of tparm] should be  printed
+       with  tputs or putp.  Call the reset_shell_mode to restore
+       enter_ca_mode upon startup and should output  exit_ca_mode
+       before  exiting.   Programs  desiring shell escapes should
        call
 
-       reset_shell_mode  and output exit_ca_mode before the shell
-       is  called  and  should  output  enter_ca_mode  and   call
+       reset_shell_mode and output exit_ca_mode before the  shell
+       is   called  and  should  output  enter_ca_mode  and  call
        reset_prog_mode after returning from the shell.
 
        The setupterm routine reads in the terminfo database, ini-
        tializing the terminfo structures, but does not set up the
        output virtualization structures used by curses.  The ter-
-       minal type is the character string term; if term is  null,
-       the  environment  variable TERM is used.  All output is to
-       file descriptor fildes which is  initialized  for  output.
-       If  errret  is  not null, then setupterm returns OK or ERR
-       and stores a status value in the  integer  pointed  to  by
-       errret.   A  status of 1 in errret is normal, 0 means that
-       the terminal could not be found, and  -1  means  that  the
-       terminfo  database could not be found.  If errret is null,
-       setupterm prints an error message upon  finding  an  error
+       minal  type is the character string term; if term is null,
+       the environment variable TERM is used.  All output  is  to
+       file  descriptor  fildes  which is initialized for output.
+       If errret is not null, then setupterm returns  OK  or  ERR
+       and  stores  a  status  value in the integer pointed to by
+       errret.  A status of 1 in errret is normal, 0  means  that
+       the  terminal  could  not  be found, and -1 means that the
+       terminfo database could not be found.  If errret is  null,
+       setupterm  prints  an  error message upon finding an error
        and exits.  Thus, the simplest call is:
 
              setupterm((char *)0, 1, (int *)0);,
 
-       which  uses  all the defaults and sends the output to std-
+       which uses all the defaults and sends the output  to  std-
        out.
 
-       The setterm routine is being replaced by  setupterm.   The
+       The  setterm  routine is being replaced by setupterm.  The
        call:
 
              setupterm(term, 1, (int *)0)
 
-       provides  the  same  functionality  as setterm(term).  The
-       setterm routine is included here  for  BSD  compatibility,
+       provides the same  functionality  as  setterm(term).   The
+       setterm  routine  is  included here for BSD compatibility,
        and is not recommended for new programs.
 
-       The  set_curterm  routine  sets  the  variable cur_term to
+       The set_curterm routine  sets  the  variable  cur_term  to
        nterm, and makes all of the terminfo boolean, numeric, and
-       string  variables  use  the values from nterm.  It returns
+       string variables use the values from  nterm.   It  returns
        the old value of cur_term.
 
-       The del_curterm routine frees  the  space  pointed  to  by
+       The  del_curterm  routine  frees  the  space pointed to by
        oterm and makes it available for further use.  If oterm is
-       the same as cur_term, references to any  of  the  terminfo
-       boolean,  numeric,  and  string  variables  thereafter may
-       refer to invalid memory locations until another  setupterm
+       the  same  as  cur_term, references to any of the terminfo
+       boolean, numeric,  and  string  variables  thereafter  may
+       refer  to invalid memory locations until another setupterm
        has been called.
 
        The  restartterm  routine  is  similar  to  setupterm  and
-       initscr, except that it is called after  restoring  memory
-       and the input and output options are the same as when mem-
-       ory was saved, but the terminal type and baud rate may  be
-       different.   Accordingly, it saves various tty state bits,
-       does a setupterm, and then restores the bits.
+       initscr,  except  that it is called after restoring memory
+       to a previous state (for example, when  reloading  a  game
+       saved  as a core image dump).  It assumes that the windows
+       be different.  Accordingly, it  saves  various  tty  state
+       bits, does a setupterm, and then restores the bits.
 
        The tparm routine instantiates the string str with parame-
-       ters  pi.  A pointer is returned to the result of str with
+       ters pi.  A pointer is returned to the result of str  with
        the parameters applied.
 
-       The tparam routine is included for compatibility with  the
-       GNU  termcap  implementation.  It works like tparm but you
-       specify a buffer and buffer size to  be  filled  with  the
-       expanded string.
-
        The  tputs  routine  applies  padding  information  to the
        string str and outputs it.  The str  must  be  a  terminfo
        string  variable  or the return value from tparm, tgetstr,
@@ -161,12 +154,13 @@
 
        The capname for each capability is given in the table col-
        umn entitled capname code in the capabilities  section  of
+       terminfo(5).
+
+       char *boolnames, *boolcodes, *boolfnames
 
        char *numnames, *numcodes, *numfnames
 
        char *strnames, *strcodes, *strfnames
-
-       These  null-terminated  arrays  contain  the capnames, the
        termcap codes, and the full C names, for each of the  ter-
        minfo variables.
 
@@ -221,6 +215,12 @@
 
 
 
+
+
+
+
+
+
 
diff --git a/Ada95/html/define_key.3x.html b/Ada95/html/define_key.3x.html new file mode 100644 index 00000000..585285cd --- /dev/null +++ b/Ada95/html/define_key.3x.html @@ -0,0 +1,70 @@ + + +
+       define_key - define a keycode
+
+
+
+

SYNOPSIS

+       #include <curses.h>
+
+       int define_key(char *definition, int keycode);
+
+
+
+

DESCRIPTION

+       This is an extension to the curses library.  It permits an
+       application to define keycodes  with  their  corresponding
+       control  strings,  so that the ncurses library will inter-
+       pret them just as it would the  predefined  codes  in  the
+       terminfo database.
+
+       If  the  given string is null, any existing definition for
+       the keycode is removed.
+
+
+
+

RETURN VALUE

+       The keycode  must  be  greater  than  zero,  else  ERR  is
+       returned.
+
+
+
+

PORTABILITY

+       These  routines  are  specific  to ncurses.  They were not
+       supported on Version 7, BSD or System  V  implementations.
+       It  is recommended that any code depending on them be con-
+       ditioned using NCURSES_VERSION.
+
+
+
+

SEE ALSO

+       keyok(3X).
+
+
+
+

AUTHOR

+       Thomas Dickey.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/Ada95/html/dft_fgbg.3x.html b/Ada95/html/dft_fgbg.3x.html index 02ddbcf2..b13ea12d 100644 --- a/Ada95/html/dft_fgbg.3x.html +++ b/Ada95/html/dft_fgbg.3x.html @@ -1,7 +1,7 @@
-       use_default_colors - use terminal's default colors
+       dft_fgbg - use terminal's default colors
 
 
 
@@ -39,7 +39,7 @@

NOTES

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

SEE ALSO

-       curs_color(3x), ded(1).
+       curs_color(3X), ded(1).
 
 
 
diff --git a/Ada95/html/form.3x.html b/Ada95/html/form.3x.html index f2c3e19e..39b9e4f3 100644 --- a/Ada95/html/form.3x.html +++ b/Ada95/html/form.3x.html @@ -1,7 +1,7 @@
-       forms - curses extension for programming forms
+       form - curses extension for programming forms
 
 
 
@@ -11,21 +11,21 @@

DESCRIPTION

-       The forms library provides terminal-independent facilities
+       The  form library provides terminal-independent facilities
        for composing form screens  on  character-cell  terminals.
        The  library  includes:  field  routines, which create and
        modify form fields; and form routines, which group  fields
        into forms, display forms on the screen, and handle inter-
        action with the user.
 
-       The forms library uses the curses libraries, and a  curses
+       The form library uses the curses libraries, and  a  curses
        initialization  routine  such  as  initscr  must be called
-       before using any of these functions.   To  use  the  forms
+       before using any of these  functions.   To  use  the  form
        library, link with the options -lform -lcurses.
 
 
    Current Default Values for Field Attributes
-       The  forms  library  maintains  a  default value for field
+       The  form  library  maintains  a  default  value for field
        attributes.  You can get or set this  default  by  calling
        the  appropriate  get_  or  set_ routine with a NULL field
        pointer.  Changing  this  default  with  a  set_  function
@@ -38,63 +38,63 @@
        of the manual page on which it is described.
 
        l  l  l  l  .   curses  Routine  Name Manual  Page  Name =
-       current_field  form_page(3X)  data_ahead     form_data(3X)
-       data_behind    form_data(3X)  dup_field form_field_new(3X)
-       dynamic_fieldinfo   form_field_info(3X)
-       field_arg form_field_validation(3X)
-       field_back     form_field_attributes(3X)
-       field_buffer   form_field_buffer(3X)
-       field_count    form_field(3X)
-       field_fore     form_field_attributes(3X)
-       field_index    form_page(3X)
-       field_info     form_field_info(3X)
-       field_init     form_hook(3X)
-       field_just     form_field_just(3X)
-       field_opts     form_field_opts(3X)
-       field_opts_off form_field_opts(3X)
-       field_opts_on  form_field_opts(3X)
-       field_pad form_field_attributes(3X)
-       field_status   form_field_buffer(3X)
-       field_term     form_hook(3X)
-       field_type     form_field_validation(3X)
-       form_fields    form_field(3X)      form_init form_hook(3X)
-       form_opts form_opts(3X)       form_opts_off  form_opts(3X)
-       form_opts_on   form_opts(3X)       form_page form_page(3X)
-       form_request_by_name     form_requestname(3X)
-       form_request_name   form_requestname(3X)
-       form_sub  form_win(3X)             form_term form_hook(3X)
-       form_userptr   form_userptr(3X)     form_win  form_win(3X)
-       free_field     form_field_new(3X)   free_form form_new(3X)
-       link_field     form_field_new(3X)
-       link_fieldtype link_fieldtype(3X)
-       move_field     form_field(3X) new_field form_field_new(3X)
-       new_form  form_new(3X)         new_page  form_new_page(3X)
-       pos_form_cursor     form_cursor(3X)
-       post_form form_post(3X)        scale_form     form_win(3X)
-       set_current_field   form_page(3X)
-       set_field_back form_field_attributes(3X)
-       set_field_buffer    form_field_buffer(3X)
-       set_field_fore form_field_attributes(3X)
-       set_field_init form_hook(3X)
-       set_field_just form_field_just(3X)
-       set_field_opts form_field_opts(3X)
-       set_field_pad  form_field_attributes(3X)
-       set_field_status    form_field_buffer(3X)
-       set_field_term form_hook(3X)
-       set_field_type form_field_validation(3X)
-       set_field_userptr   form_field_userptr(3X)
-       set_fieldtype_arg   form_fieldtype(3X)
-       set_fieldtype_choice     form_fieldtype(3X)
-       set_form_fields     form_field(3X)
-       set_form_init  form_hook(3X)
-       set_form_opts  form_field_opts(3X)
-       set_form_page  form_page(3X)   set_form_sub   form_win(3X)
-       set_form_term  form_hook(3X)
-       set_form_userptr    form_userptr(3X)
-       set_form_win   form_win(3X)
-       set_max_field  form_field_buffer(3X)
-       set_new_page   form_new_page(3X)
-       unpost_form    form_post(3X)
+       current_field  form_page(3X)  data_ahead     form_data(3X)
+       data_behind    form_data(3X)  dup_field form_field_new(3X)
+       dynamic_fieldinfo   form_field_info(3X)
+       field_arg form_field_validation(3X)
+       field_back     form_field_attributes(3X)
+       field_buffer   form_field_buffer(3X)
+       field_count    form_field(3X)
+       field_fore     form_field_attributes(3X)
+       field_index    form_page(3X)
+       field_info     form_field_info(3X)
+       field_init     form_hook(3X)
+       field_just     form_field_just(3X)
+       field_opts     form_field_opts(3X)
+       field_opts_off form_field_opts(3X)
+       field_opts_on  form_field_opts(3X)
+       field_pad form_field_attributes(3X)
+       field_status   form_field_buffer(3X)
+       field_term     form_hook(3X)
+       field_type     form_field_validation(3X)
+       form_fields    form_field(3X)      form_init form_hook(3X)
+       form_opts form_opts(3X)       form_opts_off  form_opts(3X)
+       form_opts_on   form_opts(3X)       form_page form_page(3X)
+       form_request_by_name     form_requestname(3X)
+       form_request_name   form_requestname(3X)
+       form_sub  form_win(3X)             form_term form_hook(3X)
+       form_userptr   form_userptr(3X)     form_win  form_win(3X)
+       free_field     form_field_new(3X)   free_form form_new(3X)
+       link_field     form_field_new(3X)
+       link_fieldtype form_fieldtype(3X)
+       move_field     form_field(3X) new_field form_field_new(3X)
+       new_form  form_new(3X)         new_page  form_new_page(3X)
+       pos_form_cursor     form_cursor(3X)
+       post_form form_post(3X)        scale_form     form_win(3X)
+       set_current_field   form_page(3X)
+       set_field_back form_field_attributes(3X)
+       set_field_buffer    form_field_buffer(3X)
+       set_field_fore form_field_attributes(3X)
+       set_field_init form_hook(3X)
+       set_field_just form_field_just(3X)
+       set_field_opts form_field_opts(3X)
+       set_field_pad  form_field_attributes(3X)
+       set_field_status    form_field_buffer(3X)
+       set_field_term form_hook(3X)
+       set_field_type form_field_validation(3X)
+       set_field_userptr   form_field_userptr(3X)
+       set_fieldtype_arg   form_fieldtype(3X)
+       set_fieldtype_choice     form_fieldtype(3X)
+       set_form_fields     form_field(3X)
+       set_form_init  form_hook(3X)
+       set_form_opts  form_field_opts(3X)
+       set_form_page  form_page(3X)   set_form_sub   form_win(3X)
+       set_form_term  form_hook(3X)
+       set_form_userptr    form_userptr(3X)
+       set_form_win   form_win(3X)
+       set_max_field  form_field_buffer(3X)
+       set_new_page   form_new_page(3X)
+       unpost_form    form_post(3X)
 
 
 
diff --git a/Ada95/html/form_driver.3x.html b/Ada95/html/form_driver.3x.html index 524917c4..c4d122c8 100644 --- a/Ada95/html/form_driver.3x.html +++ b/Ada95/html/form_driver.3x.html @@ -231,7 +231,7 @@

SEE ALSO

-       curses(3X), forms(3x).
+       curses(3X), form(3X).
 
 
 
diff --git a/Ada95/html/form_field_buffer.3x.html b/Ada95/html/form_field_buffer.3x.html index 32ebdce6..5fca7372 100644 --- a/Ada95/html/form_field_buffer.3x.html +++ b/Ada95/html/form_field_buffer.3x.html @@ -21,7 +21,7 @@ the given field to contain a given string. Buffer 0 is the displayed value of the field; other numbered buffers may be allocated by applications through the nbuf argument - of (see field_new(3X)) but are not manipulated by the + of (see form_field_new(3X)) but are not manipulated by the forms library. The function field_buffer returns the foreground attribute. diff --git a/Ada95/html/form_field_new.3x.html b/Ada95/html/form_field_new.3x.html index 5275c1d6..9860310b 100644 --- a/Ada95/html/form_field_new.3x.html +++ b/Ada95/html/form_field_new.3x.html @@ -67,7 +67,7 @@ were not supported on Version 7 or BSD versions. It may be unwise to count on the set of attributes copied - by dup_field(3x) being portable; the System V forms + by dup_field(3X) being portable; the System V forms library documents are not very explicit on what gets copied and was not. diff --git a/Ada95/html/form_field_opts.3x.html b/Ada95/html/form_field_opts.3x.html index f92e9856..d1be72bc 100644 --- a/Ada95/html/form_field_opts.3x.html +++ b/Ada95/html/form_field_opts.3x.html @@ -37,26 +37,29 @@ O_ACTIVE The field is visited during processing. If this option is off, the field will not be reachable by - navigation keys. + navigation keys. Please notice that an invisible + field appears to be inactive also. O_PUBLIC - The field contents are displayed as data is entered. + The field contents are displayed as data is entered. O_EDIT The field can be edited. O_WRAP - Words that don't fit on a line are wrapped to the + Words that don't fit on a line are wrapped to the next line. Words are blank-separated. O_BLANK - The field is cleared whenever a character is entered + The field is cleared whenever a character is entered at the first position. O_AUTOSKIP Skip to the next field when this one fills - O_NULLOK + Allow a blank field. + + O_STATIC Field buffers are fixed to field's original size. O_PASSOK @@ -65,7 +68,7 @@

RETURN VALUE

-       Except  for  field_opts,  each  routine returns one of the
+       Except for field_opts, each routine  returns  one  of  the
        following:
 
        E_OK The routine succeeded.
@@ -88,13 +91,13 @@
 
 

PORTABILITY

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

AUTHORS

-       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
+       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
        curses by Eric S. Raymond.
 
 
@@ -113,9 +116,6 @@
 
 
 
-
-
-
 
 
diff --git a/Ada95/html/form_field_userptr.3x.html b/Ada95/html/form_field_userptr.3x.html index e8bb557f..dc61c29c 100644 --- a/Ada95/html/form_field_userptr.3x.html +++ b/Ada95/html/form_field_userptr.3x.html @@ -8,8 +8,8 @@

SYNOPSIS

        #include <form.h>
-       int set_field_userptr(FIELD *field, const void*userptr);
-       const void *field_userptr(const FIELD *field);
+       int set_field_userptr(FIELD *field, void*userptr);
+       void *field_userptr(const FIELD *field);
 
 
 
diff --git a/Ada95/html/form_field_validation.3x.html b/Ada95/html/form_field_validation.3x.html index 0c33a6d0..a8b5671a 100644 --- a/Ada95/html/form_field_validation.3x.html +++ b/Ada95/html/form_field_validation.3x.html @@ -67,7 +67,7 @@ Regular expression data. Requires a regular expres- sion (char *) third argument; the data is valid if the regular expression matches it. Regular expres- - sions are in the format of regcomp(3x) and + sions are in the format of regcomp(3X) and regexec(3X). Please notice that the regular expres- sion must match the whole field. If you have for example an eight character wide field, a regular diff --git a/Ada95/html/form_fieldtype.3x.html b/Ada95/html/form_fieldtype.3x.html index 4a25187a..d56915ef 100644 --- a/Ada95/html/form_fieldtype.3x.html +++ b/Ada95/html/form_fieldtype.3x.html @@ -51,12 +51,16 @@ object which can later be passed to validation predicated. The other two hook arguments should copy and free argu- ment-block structures. They will be used by the forms- - driver code. + driver code. You must supply the mak_arg function, the + other two are optional, you may supply NULL for them. In + this case it is assumed, that mak_arg doesn't allocate + memory but simply loads the argument into a single scalar + value. - The form driver requests REQ_NEXT_CHOICE and - REQ_PREV_CHOICE assume that the possible values of a field form an ordered set, and provide the forms user with a way to move through the set. The set_fieldtype_choice func- + tion allows forms programmers to define successor and pre- + decessor functions for the field type. These functions take the field pointer and an argument-block structure as arguments. @@ -115,10 +119,6 @@ - - - - diff --git a/Ada95/html/form_userptr.3x.html b/Ada95/html/form_userptr.3x.html index 3dda58e6..5eac8966 100644 --- a/Ada95/html/form_userptr.3x.html +++ b/Ada95/html/form_userptr.3x.html @@ -7,8 +7,8 @@

SYNOPSIS

        #include <form.h>
-       int set_form_userptr(FORM *form, const void *userptr);
-       const void* form_userptr(const FORM *form);
+       int set_form_userptr(FORM *form, void *userptr);
+       void* form_userptr(const FORM *form);
 
 
 
diff --git a/Ada95/html/index.html b/Ada95/html/index.html index 6900ef37..50ec3abc 100644 --- a/Ada95/html/index.html +++ b/Ada95/html/index.html @@ -24,15 +24,15 @@ This binding comes AS IS with no warranty, implied or expressed.

General Remarks

    -
  • This document describes Version 00.92.00 of the binding.
  • +
  • This document describes Version 00.93 of the binding.
  • The functionality is modelled to be compatible with the ncurses package, a clone of the SVr4 curses model.
    I did the development on an Intel box running Linux 1.3.x and 2.0, -ncurses-1.9.9e and the +ncurses-4.x and the GNU Ada Translator -gnat-3.05. For any older versions of ncurses and gnat -it will not work.
  • +gnat-3.09. For any older versions of ncurses and gnat +it is not guaranteed to work.
  • You must have the m4 macroprocessor to build this package. If you don't have this program, you can get the FSF version here.
  • @@ -71,13 +71,10 @@ Same suggestion as above. an OO abstraction of the (n)curses functionality. As mentioned above it's a thin binding for the (n)curses functions. But without any doubt it would be nice to build on top of this an OO abstraction -of (n)curses functionality. -
  • If you use the user-pointer mechanism for most of the ncurses -structures in a mixed language environemt, i.e. Ada95 and C routines -operate on the same objects, care must be taken because the Ada -binding itself uses the user pointer mechanism for it's own purposes. -See the corresponding section in implementention -details.
  • +of (n)curses functionality.
    +The only exception is the method how fieldtypes are represented in +this Binding. We provide an abstract tagged type Field_Type from +which the various fieldtypes are derived.
  • I currently do not support the link_fieldtype functionality of the forms subsystem.
  • The *_IO packages are currently output only.
  • @@ -99,9 +96,21 @@ forms subsystem.
  • Forms +
  • Field_Types + +
  • Text_IO Most likely you will follow a mixed approach. Some features are easy to simulate, others will be hard if not impossible.
  • -
  • For menu items, the name and descriptions are internally copied by ncurses. -So the binding doesn't care for the lifetime of the strings passed to the -construction routine for items. This assumption is not true in most other implementations -of the menu library. In this case you have to modify the binding routine -New_Item to safestore the strings.
  • I'm quite sure I forgot something.

    diff --git a/Ada95/html/keyok.3x.html b/Ada95/html/keyok.3x.html new file mode 100644 index 00000000..3cf442dc --- /dev/null +++ b/Ada95/html/keyok.3x.html @@ -0,0 +1,70 @@ + + +

    +       keyok - enable or disable a keycode
    +
    +
    +
    +

    SYNOPSIS

    +       #include <curses.h>
    +
    +       int keyok(int keycode, bool enable);
    +
    +
    +
    +

    DESCRIPTION

    +       This is an extension to the curses library.  It permits an
    +       application to disable specific keycodes, rather than  use
    +       the  keypad  function  to disable all keycodes.  Keys that
    +       have been disabled can be reenabled.
    +
    +
    +
    +

    RETURN VALUE

    +       The keycode  must  be  greater  than  zero,  else  ERR  is
    +       returned.   If  it  does  not correspond to a defined key,
    +       then ERR is returned.  If the enable  parameter  is  true,
    +       then  the  key  must  have  been disabled, and vice versa.
    +       Otherwise, the function returns OK.
    +
    +
    +
    +

    PORTABILITY

    +       These routines are specific to  ncurses.   They  were  not
    +       supported  on  Version 7, BSD or System V implementations.
    +       It is recommended that any code depending on them be  con-
    +       ditioned using NCURSES_VERSION.
    +
    +
    +
    +

    SEE ALSO

    +       define_key(3X).
    +
    +
    +
    +

    AUTHOR

    +       Thomas Dickey.
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/Ada95/html/menu.3x.html b/Ada95/html/menu.3x.html index 8439ff83..68d79251 100644 --- a/Ada95/html/menu.3x.html +++ b/Ada95/html/menu.3x.html @@ -1,7 +1,7 @@
    -       menus - curses extension for programming menus
    +       menu - curses extension for programming menus
     
     
     
    @@ -11,21 +11,21 @@

    DESCRIPTION

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

    SEE ALSO

    -       curses(3X), menus(3x).
    +       curses(3X), menu(3X).
     
     
     
    diff --git a/Ada95/html/menu_format.3x.html b/Ada95/html/menu_format.3x.html index 4ab46deb..e2ab655e 100644 --- a/Ada95/html/menu_format.3x.html +++ b/Ada95/html/menu_format.3x.html @@ -14,17 +14,20 @@

    DESCRIPTION

            The function set_menu_format sets the maximum display size
    -       of the given window.  If this size is too small to display
    -       all menu items, the menu will be made scrollable.
    -
    -       The   default  format  is  16  rows,  1  column.   Calling
    -       set_menu_format with a null menu pointer will change  this
    +       of the given menu.  If this size is too small  to  display
    +       all  menu items, the menu will be made scrollable. If this
    +       size is larger than the menus subwindow and the  subwindow
    +       is  too  small to display all menu items, post_menu() will
    +       fail.
    +
    +       The  default  format  is  16  rows,  1  column.    Calling
    +       set_menu_format  with a null menu pointer will change this
            default.  A zero row or column argument to set_menu_format
    -       is interpreted as a request  not  to  change  the  current
    +       is  interpreted  as  a  request  not to change the current
            value.
     
    -       The  function  menu_format  returns  the maximum-size con-
    -       straints for the given menu into the storage addressed  by
    +       The function menu_format  returns  the  maximum-size  con-
    +       straints  for the given menu into the storage addressed by
            rows and cols.
     
     
    @@ -38,7 +41,7 @@
                 System error occurred (see errno).
     
            E_BAD_ARGUMENT
    -            Routine  detected  an incorrect or out-of-range argu-
    +            Routine detected an incorrect or  out-of-range  argu-
                 ment.
     
            E_POSTED
    @@ -58,14 +61,63 @@
     
     

    PORTABILITY

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

    AUTHORS

    -       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
    -       curses by Eric S. Raymond.
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
     
     
    diff --git a/Ada95/html/menu_pattern.3x.html b/Ada95/html/menu_pattern.3x.html index 61286891..dc4d217e 100644 --- a/Ada95/html/menu_pattern.3x.html +++ b/Ada95/html/menu_pattern.3x.html @@ -16,7 +16,7 @@ Every menu has an associated pattern match buffer. As input events that are printable ASCII characters come in, they are appended to this match buffer and tested for a - match, as described in menu_driver(3x). + match, as described in menu_driver(3X). The function set_menu_pattern sets the pattern buffer for the given menu and tries to find the first matching item. diff --git a/Ada95/html/menu_post.3x.html b/Ada95/html/menu_post.3x.html index a181597f..65c79f9f 100644 --- a/Ada95/html/menu_post.3x.html +++ b/Ada95/html/menu_post.3x.html @@ -46,7 +46,8 @@ tion function. E_NO_ROOM - Menu is too large for its window. + Menu is too large for its window. You should consider + to use set_menu_format() to solve the problem. E_NOT_POSTED The menu has not been posted. @@ -62,14 +63,17 @@

    NOTES

    -       The header file <menu.h> automatically includes the header
    -       These  routines  emulate  the System V menu library.  They
    +
    +
    +
    +

    PORTABILITY

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

    AUTHORS

    -       Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
    +       Juergen  Pfeifer.   Manual  pages  and  adaptation for new
            curses by Eric S. Raymond.
     
     
    @@ -112,8 +116,6 @@
     
     
     
    -
    -
     
     
     
    diff --git a/Ada95/html/menu_userptr.3x.html b/Ada95/html/menu_userptr.3x.html
    index 85201592..68066579 100644
    --- a/Ada95/html/menu_userptr.3x.html
    +++ b/Ada95/html/menu_userptr.3x.html
    @@ -7,8 +7,8 @@
     

    SYNOPSIS

            #include <menu.h>
    -       int set_menu_userptr(MENU *menu, const void *userptr);
    -       const void *menu_userptr(const MENU *menu);
    +       int set_menu_userptr(MENU *menu, void *userptr);
    +       void *menu_userptr(const MENU *menu);
     
     
     
    diff --git a/Ada95/html/mitem_new.3x.html b/Ada95/html/mitem_new.3x.html index 54e4b030..b2f5b020 100644 --- a/Ada95/html/mitem_new.3x.html +++ b/Ada95/html/mitem_new.3x.html @@ -14,8 +14,16 @@

    DESCRIPTION

            The function new_item allocates a new item and initializes
    -       it from the name and description pointers.
    -       The function free_item de-allocates an item.
    +       it  from  the name and description pointers. Please notice
    +       that the item stores only the pointers  to  the  name  and
    +       description. Those pointers must be valid during the life-
    +       time of the item. So you  should  be  very  carefull  with
    +       names  or descriptions allocated on the stack of some rou-
    +       tines.
    +       The function free_item de-allocates an item. Please notice
    +       that  it  is  the  responsibility  of  the  application to
    +       release the memory for the name or the description of  the
    +       item.
     
     
     
    @@ -59,14 +67,6 @@ Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. - - - - - - - - diff --git a/Ada95/html/mitem_userptr.3x.html b/Ada95/html/mitem_userptr.3x.html index 8f8b5ef4..d39d1ff4 100644 --- a/Ada95/html/mitem_userptr.3x.html +++ b/Ada95/html/mitem_userptr.3x.html @@ -8,8 +8,8 @@

    SYNOPSIS

            #include <menu.h>
    -       int set_item_userptr(ITEM *item, const void *userptr);
    -       const void *item_userptr(const ITEM *item);
    +       int set_item_userptr(ITEM *item, void *userptr);
    +       void *item_userptr(const ITEM *item);
     
     
     
    diff --git a/Ada95/html/mitem_value.3x.html b/Ada95/html/mitem_value.3x.html index de0bd079..451361db 100644 --- a/Ada95/html/mitem_value.3x.html +++ b/Ada95/html/mitem_value.3x.html @@ -14,7 +14,7 @@

    DESCRIPTION

            If  you  turn  off  the menu option O_ONEVALUE (e.g., with
    -       set_menu_opts or menu_opts_off;  see  menu_opts(3x)),  the
    +       set_menu_opts or menu_opts_off;  see  menu_opts(3X)),  the
            menu becomes multi-valued; that is, more than one item may
            simultaneously be selected.
     
    diff --git a/Ada95/html/ncurses.3x.html b/Ada95/html/ncurses.3x.html
    index 0db3fafb..4cae6bbe 100644
    --- a/Ada95/html/ncurses.3x.html
    +++ b/Ada95/html/ncurses.3x.html
    @@ -69,7 +69,7 @@
            be created with newwin.
     
            Note that curses  does  not  handle  overlapping  windows,
    -       that's done by the panels(3x) library. This means that you
    +       that's  done by the panel(3X) library. This means that you
            can either use stdscr or divide the screen into tiled win-
            dows  and  not  using  stdscr  at all. Mixing the two will
            result in unpredictable, and undesired, effects.
    @@ -182,14 +182,14 @@
            addstr/curs_addstr(3X)               attroff/curs_attr(3X)
            attron/curs_attr(3X)       attrset/curs_attr(3X)      bau-
            drate/curs_termattrs(3X)                beep/curs_beep(3X)
    -       bkgd/curs_bkgd(3X)  bkgdset/curs_bkgd(3X) border/curs_bor-
    +       bkgd/curs_bkgd(3X)  bkgdset/curs_bkgd(3X) border/curs_bor-
            der(3X)                                box/curs_border(3X)
            can_change_color/curs_color(3X)     cbreak/curs_inopts(3X)
            clear/curs_clear(3X)    clearok/curs_outopts(3X)    clrto-
            bot/curs_clear(3X)    clrtoeol/curs_clear(3X)   color_con-
            tent/curs_color(3X)               copywin/curs_overlay(3X)
            curs_set/curs_kernel(3X)     def_prog_mode/curs_kernel(3X)
    -       def_shell_mode/curs_kernel(3X)       del_curterm/curs_ter-
    +       def_shell_mode/curs_kernel(3X)       del_curterm/curs_ter-
            minfo(3X)  delay_output/curs_util(3X) delch/curs_delch(3X)
            deleteln/curs_deleteln(3X) delscreen/curs_initscr(3X) del-
            win/curs_window(3X)      derwin/curs_window(3X)      doup-
    @@ -241,17 +241,17 @@
            napms/curs_kernel(3X)                  newpad/curs_pad(3X)
            newterm/curs_initscr(3X)            newwin/curs_window(3X)
            nl/curs_outopts(3X)     nocbreak/curs_inopts(3X)     node-
    -       lay/curs_inopts(3X) noecho/curs_inopts(3X)  nonl/curs_out-
    +       lay/curs_inopts(3X) noecho/curs_inopts(3X)  nonl/curs_out-
            opts(3X)  noqiflush/curs_inopts(3X)  noraw/curs_inopts(3X)
            notimeout/curs_inopts(3X)  overlay/curs_overlay(3X)  over-
            write/curs_overlay(3X)         pair_content/curs_color(3X)
            pechochar/curs_pad(3X)   pnoutrefresh/curs_pad(3X)    pre-
    -       fresh/curs_pad(3X)  printw/curs_printw(3X)  putp/curs_ter-
    +       fresh/curs_pad(3X)  printw/curs_printw(3X)  putp/curs_ter-
            minfo(3X)   putwin/curs_util(3X)   qiflush/curs_inopts(3X)
            raw/curs_inopts(3X)             redrawwin/curs_refresh(3X)
            refresh/curs_refresh(3X)   reset_prog_mode/curs_kernel(3X)
            reset_shell_mode/curs_kernel(3X)   resetty/curs_kernel(3X)
    -       resizeterm/resizeterm(3x)*   restartterm/curs_terminfo(3X)
    +       resizeterm/resizeterm(3X)*   restartterm/curs_terminfo(3X)
            ripoffline/curs_kernel(3X)         savetty/curs_kernel(3X)
            scanw/curs_scanw(3X)            scr_dump/curs_scr_dump(3X)
            scr_init/curs_scr_dump(3X)   scr_restore/curs_scr_dump(3X)
    @@ -277,7 +277,7 @@
            tputs/curs_termcap(3X)    tputs/curs_terminfo(3X)   typea-
            head/curs_inopts(3X)                  unctrl/curs_util(3X)
            ungetch/curs_getch(3X) ungetmouse/curs_mouse(3X)* untouch-
    -       win/curs_touch(3X) use_env/curs_util(3X) vidattr/curs_ter-
    +       win/curs_touch(3X) use_env/curs_util(3X) vidattr/curs_ter-
            minfo(3X)  vidputs/curs_terminfo(3X) vline/curs_border(3X)
            vwprintw/curs_printw(3X)    vwscanw/curs_scanw(3X)    wad-
            dch/curs_addch(3X)   waddchnstr/curs_addchstr(3X)  waddch-
    @@ -299,7 +299,7 @@
            winsstr/curs_insstr(3X)              winstr/curs_instr(3X)
            wmove/curs_move(3X)          wnoutrefresh/curs_refresh(3X)
            wprintw/curs_printw(3X)   wredrawln/curs_refresh(3X)  wre-
    -       fresh/curs_refresh(3X)                wresize/wresize(3x)*
    +       fresh/curs_refresh(3X)                wresize/wresize(3X)*
            wscanw/curs_scanw(3X)    wscrl/curs_scroll(3X)    wsetscr-
            reg/curs_outopts(3X)    wstandend/curs_attr(3X)    wstand-
            out/curs_attr(3X)      wsyncdown/curs_window(3X)     wsyn-
    @@ -357,7 +357,7 @@
            Versions of curses compiled on PC clones  support  display
            of  the  PC ROM characters (including ROM characters 0-31,
            which stock SVr4 curses cannot display).  See  the  EXTEN-
    -       SIONS sections of curs_addch(3x) and curs_attr(3x).
    +       SIONS sections of curs_addch(3X) and curs_attr(3X).
     
            The curses library includes facilities for capturing mouse
            events on certain terminals  (including  xterm).  See  the
    diff --git a/Ada95/html/panel.3x.html b/Ada95/html/panel.3x.html
    index 9875c217..74d806c5 100644
    --- a/Ada95/html/panel.3x.html
    +++ b/Ada95/html/panel.3x.html
    @@ -96,7 +96,7 @@
                   replaces the current window of  panel  with  window
                   (useful, for example if you want to resize a panel;
                   if you're using ncurses, you can call replace_panel
    -              on  the output of wresize(3x)).  It does not change
    +              on  the output of wresize(3X)).  It does not change
                   the position of the panel in the stack.
     
            panel_above(pan)
    diff --git a/Ada95/html/resizeterm.3x.html b/Ada95/html/resizeterm.3x.html
    index 18401194..92c125db 100644
    --- a/Ada95/html/resizeterm.3x.html
    +++ b/Ada95/html/resizeterm.3x.html
    @@ -46,10 +46,17 @@
            to  avoid invoking it in a context where malloc or realloc
            may have been interrupted, since it uses those  functions.
     
    +       If  ncurses  is configured to supply its own SIGWINCH han-
    +       dler, the resizeterm function ungetch's a KEY_RESIZE which
    +       will  be  read on the next call to getch.  This is used to
    +       alert an application that the screen size has changed, and
    +       that  it should repaint special features such as pads that
    +       cannot be done automatically.
    +
     
     

    SEE ALSO

    -       wresize(3x).
    +       wresize(3X).
     
     
     
    @@ -58,13 +65,6 @@ for BSD curses). - - - - - - - diff --git a/Ada95/html/table.html b/Ada95/html/table.html index f142107e..e984bb47 100644 --- a/Ada95/html/table.html +++ b/Ada95/html/table.html @@ -10,23 +10,24 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + - + - + - + - + + - + @@ -35,7 +36,7 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + @@ -52,10 +53,10 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + - + @@ -77,16 +78,16 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - - - + + + - - + + @@ -105,12 +106,13 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + + - + - + @@ -149,7 +151,7 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + @@ -167,7 +169,7 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + @@ -185,10 +187,10 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - - - - + + + + @@ -204,7 +206,7 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + @@ -251,18 +253,18 @@ PUBLIC "-//IETF//DTD HTML 3.0//EN"> - + - - + + - + diff --git a/Ada95/html/terminal_interface-curses-forms-choice_field_types_s.html b/Ada95/html/terminal_interface-curses-forms-choice_field_types_s.html deleted file mode 100644 index b696e9a1..00000000 --- a/Ada95/html/terminal_interface-curses-forms-choice_field_types_s.html +++ /dev/null @@ -1,64 +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                        --
    ---  Jürgen 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;
    -
    -
    - -


    -

    -This is BETA software. The interface is subject to change without notice.

    - - -

    This hypertext format was generated by David A. Wheeler's ada2html - - - diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-alpha_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-alpha_s.html new file mode 100644 index 00000000..8487da97 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-alpha_s.html @@ -0,0 +1,68 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +package Terminal_Interface.Curses.Forms.Field_Types.Alpha is
    +
    +   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);
    +
    +end Terminal_Interface.Curses.Forms.Field_Types.Alpha;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-alphanumeric_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-alphanumeric_s.html new file mode 100644 index 00000000..48aaeaa9 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-alphanumeric_s.html @@ -0,0 +1,68 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +package Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric is
    +
    +   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);
    +
    +end Terminal_Interface.Curses.Forms.Field_Types.AlphaNumeric;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-enumeration-ada_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-enumeration-ada_s.html new file mode 100644 index 00000000..4be75b70 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-enumeration-ada_s.html @@ -0,0 +1,74 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +generic
    +   type T is (<>);
    +
    +package 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;
    +
    +   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;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-enumeration_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-enumeration_s.html new file mode 100644 index 00000000..d72b2a0b --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-enumeration_s.html @@ -0,0 +1,112 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +with Interfaces.C.Strings;
    +
    +package Terminal_Interface.Curses.Forms.Field_Types.Enumeration is
    +
    +   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);
    +
    +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;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-intfield_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-intfield_s.html new file mode 100644 index 00000000..6a556c73 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-intfield_s.html @@ -0,0 +1,70 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +package Terminal_Interface.Curses.Forms.Field_Types.IntField is
    +
    +   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);
    +
    +end Terminal_Interface.Curses.Forms.Field_Types.IntField;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-ipv4_address_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-ipv4_address_s.html new file mode 100644 index 00000000..a8938712 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-ipv4_address_s.html @@ -0,0 +1,65 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +package Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address is
    +
    +   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);
    +
    +end Terminal_Interface.Curses.Forms.Field_Types.IPV4_Address;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-numeric_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-numeric_s.html new file mode 100644 index 00000000..c9164429 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-numeric_s.html @@ -0,0 +1,70 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +package Terminal_Interface.Curses.Forms.Field_Types.Numeric is
    +
    +   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);
    +
    +end Terminal_Interface.Curses.Forms.Field_Types.Numeric;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-regexp_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-regexp_s.html new file mode 100644 index 00000000..eb197a2c --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-regexp_s.html @@ -0,0 +1,70 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +package Terminal_Interface.Curses.Forms.Field_Types.RegExp is
    +
    +   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);
    +
    +end Terminal_Interface.Curses.Forms.Field_Types.RegExp;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-user-choice_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-user-choice_s.html new file mode 100644 index 00000000..3efb8a08 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-user-choice_s.html @@ -0,0 +1,107 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +with Ada.Unchecked_Deallocation;
    +with Terminal_Interface.Curses.Aux;
    +
    +package Terminal_Interface.Curses.Forms.Field_Types.User.Choice is
    +
    +   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 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;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-user_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-user_s.html new file mode 100644 index 00000000..df4346e0 --- /dev/null +++ b/Ada95/html/terminal_interface-curses-forms-field_types-user_s.html @@ -0,0 +1,110 @@ + + + + + +

    +------------------------------------------------------------------------------
    +--                                                                          --
    +--                           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.                                                           --
    +------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +--  Version Control:
    +--  @Revision: 1.1 @
    +------------------------------------------------------------------------------
    +with Ada.Unchecked_Deallocation;
    +with Terminal_Interface.Curses.Aux;
    +
    +package Terminal_Interface.Curses.Forms.Field_Types.User is
    +
    +   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 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;
    +
    +
    + +


    +

    +This is BETA software. The interface is subject to change without notice.

    + + +

    This hypertext format was generated by David A. Wheeler's ada2html + + + diff --git a/Ada95/html/terminal_interface-curses-forms-field_types_s.html b/Ada95/html/terminal_interface-curses-forms-field_types_s.html index 28c6fa6b..89f8a85c 100644 --- a/Ada95/html/terminal_interface-curses-forms-field_types_s.html +++ b/Ada95/html/terminal_interface-curses-forms-field_types_s.html @@ -4,6 +4,7 @@

    +
     ------------------------------------------------------------------------------
     --                                                                          --
     --                           GNAT ncurses Binding                           --
    @@ -12,48 +13,229 @@
     --                                                                          --
     --                                 S P E C                                  --
     --                                                                          --
    ---  Version 00.92                                                           --
    +------------------------------------------------------------------------------
    +-- Copyright (c) 1998 Free Software Foundation, Inc.                        --
     --                                                                          --
    ---  The ncurses Ada95 binding is copyrighted 1996 by                        --
    ---  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
    +-- Permission is hereby granted, free of charge, to any person obtaining a  --
    +-- copy of this software and associated documentation files (the            --
    +-- "Software"), to deal in the Software without restriction, including      --
    +-- without limitation the rights to use, copy, modify, merge, publish,      --
    +-- distribute, distribute with modifications, sublicense, and/or sell       --
    +-- copies of the Software, and to permit persons to whom the Software is    --
    +-- furnished to do so, subject to the following conditions:                 --
     --                                                                          --
    ---  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 above copyright notice and this permission notice shall be included  --
    +-- in all copies or substantial portions of the Software.                   --
     --                                                                          --
    ---  This binding comes AS IS with no warranty, implied or expressed.        --
    +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --
    +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --
    +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --
    +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --
    +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --
    +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --
    +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --
    +--                                                                          --
    +-- Except as contained in this notice, the name(s) of the above copyright   --
    +-- holders shall not be used in advertising or otherwise to promote the     --
    +-- sale, use or other dealings in this Software without prior written       --
    +-- authorization.                                                           --
     ------------------------------------------------------------------------------
    +--  Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                      --
     --  Version Control:
    ---  @Revision: 1.3 @
    +--  @Revision: 1.1 @
     ------------------------------------------------------------------------------
    -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;
    +with Terminal_Interface.Curses.Aux;
    +
     package Terminal_Interface.Curses.Forms.Field_Types is
    ---
    ---  Nothing public. All happens magically.
    ---
    +
    +   --  |=====================================================================
    +   --  | Man page form_fieldtype.3x
    +   --  |=====================================================================
    +
    +   type Field_Type is abstract tagged null record;
    +   --  Abstract base type for all field types. A concrete field type
    +   --  is an extension that adds some data elements describing formats or
    +   --  boundary values for the type and validation routines.
    +   --  For the builtin low-level fieldtypes, the validation routines are
    +   --  already defined by the low-level C library.
    +   --  The builtin types like Alpha or AlphaNumeric etc. are defined in
    +   --  child packages of this package. You may use one of them as example
    +   --  how to create you own child packages for low-level field types that
    +   --  you may have already written in C.
    +
    +   type Field_Type_Access is access all Field_Type'Class;
    +
    +   --  |
    +   procedure Set_Field_Type (Fld      : in Field;
    +                             Fld_Type : in Field_Type) is abstract;
    +   --  AKA: set_field_type()
    +   --  But: we hide the vararg mechanism of the C interface. You always
    +   --       have to pass a single Field_Type parameter.
    +
    +   --  ---------------------------------------------------------------------
    +
    +   --  |=====================================================================
    +   --  | Man page form_field_validation.3x
    +   --  |=====================================================================
    +
    +   --  |
    +   function Get_Type (Fld : in Field) return Field_Type_Access;
    +   --  AKA: field_type()
    +   --  AKA: field_arg()
    +   --  In Ada95 we can combine these. If you try to retrieve the field type
    +   --  that is not defined as extension of the abstract tagged type above,
    +   --  you will raise a Form_Exception.
    +
    +   --  +----------------------------------------------------------------------
    +   --  | Private Part.
    +   --  | Most of this is used by the implementations of the child packages.
    +   --  |
     private
    -   type Tracker is new Limited_Controlled with null record;
    +   use Terminal_Interface.Curses.Aux;
     
    -   procedure Initialize (Obj : in out Tracker);
    -   procedure Finalize   (Obj : in out Tracker);
    +   type Makearg_Function is access
    +     function (Args : System.Address) return System.Address;
    +   pragma Convention (C, Makearg_Function);
     
    -end Terminal_Interface.Curses.Forms.Field_Types;
    +   type Copyarg_Function is access
    +     function (Usr : System.Address) return System.Address;
    +   pragma Convention (C, Copyarg_Function);
    +
    +   type Freearg_Function is access
    +     procedure (Usr : System.Address);
    +   pragma Convention (C, Freearg_Function);
    +
    +   type Field_Check_Function is access
    +     function (Fld : Field; Usr : System.Address) return C_Int;
    +   pragma Convention (C, Field_Check_Function);
    +
    +   type Char_Check_Function is access
    +     function (Ch : C_Int; Usr : System.Address) return C_Int;
    +   pragma Convention (C, Char_Check_Function);
     
    +   type Choice_Function is access
    +     function (Fld : Field; Usr : System.Address) return C_Int;
    +   pragma Convention (C, Choice_Function);
    +
    +   --  +----------------------------------------------------------------------
    +   --  | This must be in sync with the FIELDTYPE structure in form.h
    +   --  |
    +   type Low_Level_Field_Type is
    +      record
    +         Status :              C_Short;
    +         Ref_Count :           C_Long_Int;
    +         Left, Right :         System.Address;
    +         Makearg :             Makearg_Function;
    +         Copyarg :             Copyarg_Function;
    +         Freearg :             Freearg_Function;
    +         Fcheck :              Field_Check_Function;
    +         Ccheck :              Char_Check_Function;
    +         Next, Prev :          Choice_Function;
    +      end record;
    +   pragma Convention (C, Low_Level_Field_Type);
    +   type C_Field_Type is access all Low_Level_Field_Type;
    +
    +   Null_Field_Type   : constant C_Field_Type := null;
    +
    +   --  +----------------------------------------------------------------------
    +   --  | This four low-level fieldtypes are the ones associated with
    +   --  | fieldtypes handled by this binding. Any other low-level fieldtype
    +   --  | will result in a Form_Exception is function Get_Type.
    +   --  |
    +   C_Generic_Type   : C_Field_Type := Null_Field_Type;
    +   C_Generic_Choice : C_Field_Type := Null_Field_Type;
    +   C_Builtin_Router : C_Field_Type := Null_Field_Type;
    +   C_Choice_Router  : C_Field_Type := Null_Field_Type;
    +
    +   procedure Wrap_Builtin (Fld : Field;
    +                           Typ : Field_Type'Class;
    +                           Cft : C_Field_Type := C_Builtin_Router);
    +   --  This procedure has to be called by the Set_Field_Type implementation
    +   --  for builtin low-level fieldtypes to replace it by an Ada95
    +   --  conformant Field_Type object.
    +   --  The parameter Cft must be C_Builtin_Router for regular low-level
    +   --  fieldtypes (like TYP_ALPHA or TYP_ALNUM) and C_Choice_Router for
    +   --  low-level fieldtypes witch choice functions (like TYP_ENUM).
    +   --  Any other value will raise a Form_Exception.
    +
    +   function Make_Arg (Args : System.Address) return System.Address;
    +   pragma Convention (C, Make_Arg);
    +   --  This is the Makearg_Function for the internal low-level types
    +   --  introduced by this binding.
    +
    +   function Copy_Arg (Usr : System.Address) return System.Address;
    +   pragma Convention (C, Copy_Arg);
    +   --  This is the Copyarg_Function for the internal low-level types
    +   --  introduced by this binding.
    +
    +   procedure Free_Arg (Usr : System.Address);
    +   pragma Convention (C, Free_Arg);
    +   --  This is the Freearg_Function for the internal low-level types
    +   --  introduced by this binding.
    +
    +   function Field_Check_Router (Fld : Field;
    +                                Usr : System.Address) return C_Int;
    +   pragma Convention (C, Field_Check_Router);
    +   --  This is the Field_Check_Function for the internal low-level types
    +   --  introduced to wrap the low-level types by a Field_Type derived
    +   --  type. It routes the call to the corresponding low-level validation
    +   --  function.
    +
    +   function Char_Check_Router (Ch : C_Int;
    +                               Usr : System.Address) return C_Int;
    +   pragma Convention (C, Char_Check_Router);
    +   --  This is the Char_Check_Function for the internal low-level types
    +   --  introduced to wrap the low-level types by a Field_Type derived
    +   --  type. It routes the call to the corresponding low-level validation
    +   --  function.
    +
    +   function Next_Router (Fld : Field;
    +                         Usr : System.Address) return C_Int;
    +   pragma Convention (C, Next_Router);
    +   --  This is the Choice_Function for the internal low-level types
    +   --  introduced to wrap the low-level types by a Field_Type derived
    +   --  type. It routes the call to the corresponding low-level next_choice
    +   --  function.
    +
    +   function Prev_Router (Fld : Field;
    +                         Usr : System.Address) return C_Int;
    +   pragma Convention (C, Prev_Router);
    +   --  This is the Choice_Function for the internal low-level types
    +   --  introduced to wrap the low-level types by a Field_Type derived
    +   --  type. It routes the call to the corresponding low-level prev_choice
    +   --  function.
    +
    +   --  This is the Argument structure maintained by all low-level field types
    +   --  introduced by this binding.
    +   type Argument is record
    +      Typ : Field_Type_Access;   --  the Field_Type creating this record
    +      Usr : System.Address;      --  original arg for builtin low-level types
    +      Cft : C_Field_Type;        --  the original low-level type
    +   end record;
    +   type Argument_Access is access all Argument;
    +
    +   --  +----------------------------------------------------------------------
    +   --  |
    +   --  | Some Imports of libform routines to deal with low-level fieldtypes.
    +   --  |
    +   function New_Fieldtype (Fcheck : Field_Check_Function;
    +                           Ccheck : Char_Check_Function)
    +     return C_Field_Type;
    +   pragma Import (C, New_Fieldtype, "new_fieldtype");
    +
    +   function Set_Fieldtype_Arg (Cft : C_Field_Type;
    +                               Mak : Makearg_Function := Make_Arg'Access;
    +                               Cop : Copyarg_Function := Copy_Arg'Access;
    +                               Fre : Freearg_Function := Free_Arg'Access)
    +     return C_Int;
    +   pragma Import (C, Set_Fieldtype_Arg, "set_fieldtype_arg");
    +
    +   function Set_Fieldtype_Choice (Cft : C_Field_Type;
    +                                  Next, Prev : Choice_Function)
    +     return C_Int;
    +   pragma Import (C, Set_Fieldtype_Choice, "set_fieldtype_choice");
    +
    +end Terminal_Interface.Curses.Forms.Field_Types;
     
     
    diff --git a/Ada95/html/terminal_interface-curses-forms-field_user_data_s.html b/Ada95/html/terminal_interface-curses-forms-field_user_data_s.html index 7ad321cc..16c28b0f 100644 --- a/Ada95/html/terminal_interface-curses-forms-field_user_data_s.html +++ b/Ada95/html/terminal_interface-curses-forms-field_user_data_s.html @@ -13,23 +13,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.3 @ +-- @Revision: 1.4 @------------------------------------------------------------------------------generic @@ -37,15 +50,6 @@ type User_Access isaccess User; package Terminal_Interface.Curses.Forms.Field_User_Data is - -- The binding uses the C level user pointer already for its own - -- internal purposes. So you can´t easily manipulate the user pointer - -- with the low level C routines for this field without taking care of - -- this special situation. If you want to read or write with C routines - -- the user pointer of this field, you should get first the low level - -- user pointer. This points to a record, that always has as its first - -- member the Ada95 user pointer for this field. You should never change - -- the low level user pointer of an Ada created field. - ---- |=====================================================================-- | Man page form_field_userptr.3x-- |===================================================================== @@ -54,13 +58,13 @@ procedure Set_User_Data (Fld : in Field; Data : in User_Access); -- AKA: set_field_userptr - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- |procedure Get_User_Data (Fld : in Field; Data : out User_Access); -- AKA: field_userptr - pragma Convention (C, Get_User_Data); + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Forms.Field_User_Data; diff --git a/Ada95/html/terminal_interface-curses-forms-form_user_data_s.html b/Ada95/html/terminal_interface-curses-forms-form_user_data_s.html index be754bed..0478e861 100644 --- a/Ada95/html/terminal_interface-curses-forms-form_user_data_s.html +++ b/Ada95/html/terminal_interface-curses-forms-form_user_data_s.html @@ -13,23 +13,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.3 @ +-- @Revision: 1.4 @------------------------------------------------------------------------------generic @@ -37,15 +50,6 @@ type User_Access isaccess User; package Terminal_Interface.Curses.Forms.Form_User_Data is - -- The binding uses the C level user pointer already for its own - -- internal purposes. So you can´t easily manipulate the user pointer - -- with the low level C routines for this form without taking care of - -- this special situation. If you want to read or write with C routines - -- the user pointer of this form, you should get first the low level - -- user pointer. This points to a record, that always has as its first - -- member the Ada95 user pointer for this form. You should never change - -- the low level user pointer of an Ada created form. - ---- |=====================================================================-- | Man page form_userptr.3x-- |===================================================================== @@ -54,13 +58,13 @@ procedure Set_User_Data (Frm : in Form; Data : in User_Access); -- AKA: set_form_userptr - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- |procedure Get_User_Data (Frm : in Form; Data : out User_Access); -- AKA: form_userptr - pragma Convention (C, Get_User_Data); + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Forms.Form_User_Data; diff --git a/Ada95/html/terminal_interface-curses-forms_s.html b/Ada95/html/terminal_interface-curses-forms_s.html index add98be2..1f0302bd 100644 --- a/Ada95/html/terminal_interface-curses-forms_s.html +++ b/Ada95/html/terminal_interface-curses-forms_s.html @@ -13,33 +13,44 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.9 @ +-- @Revision: 1.10 @------------------------------------------------------------------------------ --- form binding, generated at Sun Feb 2 17:21:44 1997 +-- form binding.-- This module is generated. Please don't change it manually!-- Run the generator instead.-- |with System; -with Ada.Tags; use Ada.Tags; with Ada.Characters.Latin_1; with Interfaces.C; -with Interfaces.C.Strings; package Terminal_Interface.Curses.Forms is @@ -50,12 +61,9 @@ type Field isprivate; type Form isprivate; - type C_Field_Type isprivate; Null_Field : constant Field; Null_Form : constant Form; - Null_Field_Type : constant C_Field_Type; - type Field_Justification is (None, Left, @@ -127,7 +135,13 @@ type Field_Array isarray (Positive range <>) ofaliased Field; pragma Convention (C, Field_Array); - type Field_Array_Access isaccessall Field_Array; + type Field_Array_Access isaccess Field_Array; + + procedure Free (FA : inout Field_Array_Access; + Free_Fields : in Boolean := False); + -- Release the memory for an allocated field array + -- If Free_Fields is True, call Delete() for all the fields in + -- the array.subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57); @@ -267,6 +281,10 @@ procedure Request_Name (Key : in Form_Request_Code; Name : out String); + function Request_Name (Key : Form_Request_Code) return String; + -- Same as function + pragma Inline (Request_Name); + -------------------- Exceptions -------------------- @@ -344,6 +362,12 @@ Str : out String); -- AKA: field_buffer() + function Get_Buffer + (Fld : in Field; + Buffer : in Buffer_Number := Buffer_Number'First) return String; + -- AKA: field_buffer() + -- Same but as function + -- |procedure Set_Status (Fld : in Field; Status : in Boolean := True); @@ -536,18 +560,17 @@ -- |procedure Redefine (Frm : in Form; - Flds : in Field_Array); + Flds : in Field_Array_Access); -- AKA: set_form_fields() - -- With a bit more comfort. You don´t need to terminate the Field_Array - -- with a null entry. This is handled internally in the binding.-- |procedure Set_Fields (Frm : in Form; - Flds : in Field_Array) renames Redefine; + Flds : in Field_Array_Access) renames Redefine; -- AKA: set_form_fields()-- | - function Fields (Frm : Form) return Field_Array_Access; + function Fields (Frm : Form; + Index : Positive) return Field; -- AKA: form_fields()-- | @@ -565,11 +588,12 @@ -- |===================================================================== -- | - function Create (Fields : Field_Array) return Form; + function Create (Fields : Field_Array_Access) return Form; -- AKA: new_form()-- | - function New_Form (Fields : Field_Array) return Form renames Create; + function New_Form (Fields : Field_Array_Access) return Form + renames Create; -- AKA: new_form()-- | @@ -690,217 +714,15 @@ function Is_New_Page (Fld : Field) return Boolean; -- AKA: new_page() - -- |===================================================================== - -- | Man page form_fieldtype.3x - -- |===================================================================== - - type Field_Type isabstracttaggednullrecord; - type Field_Type_Access isaccessall Field_Type'Class; - - function Native_Type (Ftype : Field_Type) - return C_Field_Type isabstract; - -- This function returns the C libraries handle to the field type. - -- May be you need this if you want to interface to lower level - -- routines in the form library. - - -- | - procedure Set_Type (Fld : in Field; - Fld_Type : in Field_Type) is abstract; - -- AKA: set_field_type() - -- But: we hide the vararg mechanism of the C interface. You always - -- have to pass a single Field_Type parameter. - - type C_Defined_Field_Type isabstractnew Field_Type withnullrecord; - -- This is the root of all field typed defined in C, i.e. this are - -- the predefined field types in the form library. - - type Alpha_Field isnew C_Defined_Field_Type - withrecord - Minimum_Field_Width : Natural := 0; - endrecord; - procedure Set_Type (Fld : in Field; - Fld_Type : in Alpha_Field); - function Native_Type (Ftype : Alpha_Field) - return C_Field_Type; - - type Alpha_Numeric_Field isnew C_Defined_Field_Type with - record - Minimum_Field_Width : Natural := 0; - endrecord; - procedure Set_Type (Fld : in Field; - Fld_Type : in Alpha_Numeric_Field); - function Native_Type (Ftype : Alpha_Numeric_Field) - return C_Field_Type; - - type Integer_Field isnew C_Defined_Field_Type with - record - Precision : Natural; - Lower_Limit : Integer; - Upper_Limit : Integer; - endrecord; - procedure Set_Type (Fld : in Field; - Fld_Type : in Integer_Field); - function Native_Type (Ftype : Integer_Field) - return C_Field_Type; - - type Numeric_Field isnew C_Defined_Field_Type with - record - Precision : Natural; - Lower_Limit : Float; - Upper_Limit : Float; - endrecord; - procedure Set_Type (Fld : in Field; - Fld_Type : in Numeric_Field); - function Native_Type (Ftype : Numeric_Field) - return C_Field_Type; - - type String_Access isaccess String; - - type Regular_Expression_Field isnew C_Defined_Field_Type with - record - Regular_Expression : String_Access; - endrecord; - procedure Set_Type (Fld : in Field; - Fld_Type : in Regular_Expression_Field); - function Native_Type (Ftype : Regular_Expression_Field) - return C_Field_Type; - - type Enum_Array isarray (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; - endrecord; - - type Enumeration_Field isnew C_Defined_Field_Type withprivate; - - 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 : inout 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. - - procedure Set_Type (Fld : in Field; - Fld_Type : in Enumeration_Field); - function Native_Type (Ftype : Enumeration_Field) - return C_Field_Type; - - -- The next type defintions are all ncurses extensions. They are typically - -- not available in other curses implementations. - - type Internet_V4_Address_Field isnew C_Defined_Field_Type - withnullrecord; - procedure Set_Type (Fld : in Field; - Fld_Type : in Internet_V4_Address_Field); - function Native_Type (Ftype : Internet_V4_Address_Field) - return C_Field_Type; - - - type Ada_Defined_Field_Type isabstractnew Field_Type withnullrecord; - -- This is the root of the mechanism we use to create field types in - -- Ada95. You don't have to redefine the Set_Field_Type and - -- Native_Field_Type methods, because they work generically on this - -- class. - - procedure Set_Type (Fld : Field; - Fld_Type : Ada_Defined_Field_Type); - - function Native_Type (Ftype : Ada_Defined_Field_Type) - return C_Field_Type; - - -- |===================================================================== - -- | Man page form_field_validation.3x - -- |===================================================================== - - -- | - function Get_Type (Fld : in Field) return Field_Type_Access; - -- AKA: field_type() - -- AKA: field_arg() - -- In Ada95 we can combine these------------------------------------------------------------------------------private type Field isnew System.Address; type Form isnew System.Address; - type C_Field_Type isnew System.Address; Null_Field : constant Field := Field (System.Null_Address); Null_Form : constant Form := Form (System.Null_Address); - Null_Field_Type : constant C_Field_Type := - C_Field_Type (System.Null_Address); - - type CPA_Access isaccess Interfaces.C.Strings.chars_ptr_array; - - type Enumeration_Field isnew C_Defined_Field_Type with - record - Case_Sensitive : Boolean := False; - Match_Must_Be_Unique : Boolean := False; - Arr : CPA_Access := null; - endrecord; - - -- In our binding we use the fields user pointer as hook to maintain - -- our own info structure about the field type. To be able to still - -- provide a user pointer, we use this wrapper. - -- - type Field_User_Wrapper is - record - U : System.Address; -- the hook we provide for the user - T : Field_Type_Access; -- may be null - N : Natural; -- use counter - endrecord; - pragma Convention (C, Field_User_Wrapper); - type Field_User_Wrapper_Access isaccessall Field_User_Wrapper; - pragma Controlled (Field_User_Wrapper_Access); - - function Set_Field_Userptr (Fld : Field; - Wrp : Field_User_Wrapper_Access) - return Interfaces.C.int; - pragma Import (C, Set_Field_Userptr, "set_field_userptr"); - - function Field_Userptr (Fld : Field) return Field_User_Wrapper_Access; - pragma Import (C, Field_Userptr, "field_userptr"); - - -- In our binding we use the forms user pointer as hook to maintain - -- our own info structure about the field association. To be able to still - -- provide a user pointer, we use this wrapper. - -- - type Form_User_Wrapper is - record - U : System.Address; -- the hook we provide for the user - I : Field_Array_Access; - endrecord; - pragma Convention (C, Form_User_Wrapper); - type Form_User_Wrapper_Access isaccessall Form_User_Wrapper; - pragma Controlled (Form_User_Wrapper_Access); - - function Set_Form_Userptr (Frm : Form; - Wrp : Form_User_Wrapper_Access) - return Interfaces.C.int; - pragma Import (C, Set_Form_Userptr, "set_form_userptr"); - - function Form_Userptr (Frm : Form) return Form_User_Wrapper_Access; - pragma Import (C, Form_Userptr, "form_userptr"); - - procedure Register_Type (T : in Ada_Defined_Field_Type'Class; - Cft : in C_Field_Type); - procedure Unregister_Type (T : in Ada_Defined_Field_Type'Class); - function Search_Type (T : Ada_Defined_Field_Type'Class) - return C_Field_Type; Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First; -- This constant may be different on your system. diff --git a/Ada95/html/terminal_interface-curses-menus-item_user_data_s.html b/Ada95/html/terminal_interface-curses-menus-item_user_data_s.html index 5675d804..a867f54b 100644 --- a/Ada95/html/terminal_interface-curses-menus-item_user_data_s.html +++ b/Ada95/html/terminal_interface-curses-menus-item_user_data_s.html @@ -13,23 +13,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @------------------------------------------------------------------------------generic @@ -49,13 +62,13 @@ procedure Set_User_Data (Itm : in Item; Data : in User_Access); -- AKA: set_item_userptr - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- |procedure Get_User_Data (Itm : in Item; Data : out User_Access); -- AKA: item_userptr - pragma Convention (C, Get_User_Data); + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Menus.Item_User_Data; diff --git a/Ada95/html/terminal_interface-curses-menus-menu_user_data_s.html b/Ada95/html/terminal_interface-curses-menus-menu_user_data_s.html index 2cbd2338..69ff87f9 100644 --- a/Ada95/html/terminal_interface-curses-menus-menu_user_data_s.html +++ b/Ada95/html/terminal_interface-curses-menus-menu_user_data_s.html @@ -13,23 +13,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @------------------------------------------------------------------------------generic @@ -37,15 +50,6 @@ type User_Access isaccess User; package Terminal_Interface.Curses.Menus.Menu_User_Data is - -- The binding uses the C level user pointer already for its own - -- internal purposes. So you can´t easily manipulate the user pointer - -- with the low level C routines for this menu without taking care of - -- this special situation. If you want to read or write with C routines - -- the user pointer of this menu, you should get first the low level - -- user pointer. This points to a record, that always has as its first - -- member the Ada95 user pointer for this menu. You should never change - -- the low level user pointer of an Ada created menu. - ---- |=====================================================================-- | Man page menu_userptr.3x-- |===================================================================== @@ -54,13 +58,13 @@ procedure Set_User_Data (Men : in Menu; Data : in User_Access); -- AKA: set_menu_userptr - pragma Convention (C, Set_User_Data); + pragma Inline (Set_User_Data); -- |procedure Get_User_Data (Men : in Menu; Data : out User_Access); -- AKA: menu_userptr - pragma Convention (C, Get_User_Data); + pragma Inline (Get_User_Data); end Terminal_Interface.Curses.Menus.Menu_User_Data; diff --git a/Ada95/html/terminal_interface-curses-menus_s.html b/Ada95/html/terminal_interface-curses-menus_s.html index cd1ce0cc..394bfff3 100644 --- a/Ada95/html/terminal_interface-curses-menus_s.html +++ b/Ada95/html/terminal_interface-curses-menus_s.html @@ -13,25 +13,38 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.8 @------------------------------------------------------------------------------ --- menu binding, generated at Sun Feb 2 17:21:44 1997 +-- menu binding.-- This module is generated. Please don't change it manually!-- Run the generator instead.-- | @@ -100,6 +113,9 @@ procedure Request_Name (Key : in Menu_Request_Code; Name : out String); + function Request_Name (Key : Menu_Request_Code) return String; + -- Same as function + -------------------- Exceptions -------------------- @@ -168,7 +184,13 @@ type Item_Array isarray (Positive range <>) ofaliased Item; pragma Convention (C, Item_Array); - type Item_Array_Access isaccessall Item_Array; + type Item_Array_Access isaccess Item_Array; + + procedure Free (IA : inout Item_Array_Access; + Free_Items : Boolean := False); + -- Release the memory for an allocated item array + -- If Free_Items is True, call Delete() for all the items in + -- the array.-- |=====================================================================-- | Man page mitem_new.3x @@ -244,12 +266,19 @@ procedure Name (Itm : in Item; Name : out String); -- AKA: item_name() + function Name (Itm : Item) return String; + -- AKA: item_name() + -- Implemented as function-- |procedure Description (Itm : in Item; Description : out String); -- AKA: item_description(); + function Description (Itm : Item) return String; + -- AKA: item_description(); + -- Implemented as function + -- |=====================================================================-- | Man page mitem_current.3x-- |===================================================================== @@ -364,6 +393,10 @@ Mark : out String); -- AKA: menu_mark() + function Mark (Men : Menu) return String; + -- AKA: menu_mark() + -- Implemented as function + -- |=====================================================================-- | Man page menu_attribs.3x-- |===================================================================== @@ -531,16 +564,15 @@ -- |procedure Redefine (Men : in Menu; - Items : in Item_Array); + Items : in Item_Array_Access); -- AKA: set_menu_items() - -- With a bit more comfort. You don´t need to terminate the Item_Array - -- with a null entry. This is handled internally in the binding.procedure Set_Items (Men : in Menu; - Items : in Item_Array) renames Redefine; + Items : in Item_Array_Access) renames Redefine; -- | - function Items (Men : Menu) return Item_Array_Access; + function Items (Men : Menu; + Index : Positive) return Item; -- AKA: menu_items()-- | @@ -552,10 +584,10 @@ -- |===================================================================== -- | - function Create (Items : Item_Array) return Menu; + function Create (Items : Item_Array_Access) return Menu; -- AKA: new_menu() - function New_Menu (Items : Item_Array) return Menu renames Create; + function New_Menu (Items : Item_Array_Access) return Menu renames Create; -- |procedure Delete (Men : in out Menu); @@ -584,21 +616,6 @@ Null_Item : constant Item := Item (System.Null_Address); Null_Menu : constant Menu := Menu (System.Null_Address); - -- This binding uses the original user pointer mechanism of a menu to store - -- specific informations about a menu. This wrapper record carries this - -- specifics and contains a field to maintain a new user pointer. Please - -- note that you must take this into account if you wan't to use the user - -- pointer mechanism of a menu created with this binding in low-level C - -- routines. - type Ada_User_Wrapper is - record - U : System.Address; - I : Item_Array_Access; - end record; - pragma Convention (C, Ada_User_Wrapper); - type Ada_User_Wrapper_Access is access all Ada_User_Wrapper; - pragma Controlled (Ada_User_Wrapper_Access); - Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First; -- This constant may be different on your system. diff --git a/Ada95/html/terminal_interface-curses-mouse_s.html b/Ada95/html/terminal_interface-curses-mouse_s.html index 0b92a66a..8054e668 100644 --- a/Ada95/html/terminal_interface-curses-mouse_s.html +++ b/Ada95/html/terminal_interface-curses-mouse_s.html @@ -13,25 +13,38 @@ -- -- -- S P E C -- -- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: -- +-- -- +-- 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. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.6 @ +-- @Revision: 1.8 @------------------------------------------------------------------------------ --- mouse binding, generated at Sun Feb 2 17:21:45 1997 +-- mouse binding.-- This module is generated. Please don't change it manually!-- Run the generator instead.-- | @@ -70,6 +83,9 @@ -- | Man page curs_mouse.3x-- |===================================================================== + function Has_Mouse return Boolean; + -- Return true if a mouse device is supported, false otherwise. + procedure Register_Reportable_Event (B : in Mouse_Button; S : in Button_State; @@ -84,7 +100,6 @@ -- AKA: mousemask()procedure End_Mouse; - pragma Import (C, End_Mouse, "_nc_ada_unregister_mouse"); -- Terminates the mouse-- | diff --git a/Ada95/html/terminal_interface-curses-panels-user_data_s.html b/Ada95/html/terminal_interface-curses-panels-user_data_s.html index 236b7c81..307d0c84 100644 --- a/Ada95/html/terminal_interface-curses-panels-user_data_s.html +++ b/Ada95/html/terminal_interface-curses-panels-user_data_s.html @@ -13,23 +13,36 @@ -- -- -- S P E C -- -- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @------------------------------------------------------------------------------generic diff --git a/Ada95/html/terminal_interface-curses-panels_s.html b/Ada95/html/terminal_interface-curses-panels_s.html index c292134e..9d2ca4c4 100644 --- a/Ada95/html/terminal_interface-curses-panels_s.html +++ b/Ada95/html/terminal_interface-curses-panels_s.html @@ -13,23 +13,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.2 @ +-- @Revision: 1.3 @------------------------------------------------------------------------------with System; diff --git a/Ada95/html/terminal_interface-curses-text_io-complex_io_s.html b/Ada95/html/terminal_interface-curses-text_io-complex_io_s.html index a336fce8..8a959df2 100644 --- a/Ada95/html/terminal_interface-curses-text_io-complex_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-complex_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.3 @ +-- @Revision: 1.4 @------------------------------------------------------------------------------with Ada.Numerics.Generic_Complex_Types; diff --git a/Ada95/html/terminal_interface-curses-text_io-decimal_io_s.html b/Ada95/html/terminal_interface-curses-text_io-decimal_io_s.html index 6ffe5562..3dd4f325 100644 --- a/Ada95/html/terminal_interface-curses-text_io-decimal_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-decimal_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @------------------------------------------------------------------------------generic type Num isdelta <> digits <>; diff --git a/Ada95/html/terminal_interface-curses-text_io-enumeration_io_s.html b/Ada95/html/terminal_interface-curses-text_io-enumeration_io_s.html index e3b3c89b..0c45c78a 100644 --- a/Ada95/html/terminal_interface-curses-text_io-enumeration_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-enumeration_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @------------------------------------------------------------------------------generic type Enum is (<>); diff --git a/Ada95/html/terminal_interface-curses-text_io-fixed_io_s.html b/Ada95/html/terminal_interface-curses-text_io-fixed_io_s.html index c6686deb..72f1bd1b 100644 --- a/Ada95/html/terminal_interface-curses-text_io-fixed_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-fixed_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @------------------------------------------------------------------------------generic type Num isdelta <>; diff --git a/Ada95/html/terminal_interface-curses-text_io-float_io_s.html b/Ada95/html/terminal_interface-curses-text_io-float_io_s.html index cf5cc4a4..9d337e18 100644 --- a/Ada95/html/terminal_interface-curses-text_io-float_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-float_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @------------------------------------------------------------------------------generic type Num isdigits <>; diff --git a/Ada95/html/terminal_interface-curses-text_io-integer_io_s.html b/Ada95/html/terminal_interface-curses-text_io-integer_io_s.html index 052606a4..6346da73 100644 --- a/Ada95/html/terminal_interface-curses-text_io-integer_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-integer_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @------------------------------------------------------------------------------generic type Num isrange <>; diff --git a/Ada95/html/terminal_interface-curses-text_io-modular_io_s.html b/Ada95/html/terminal_interface-curses-text_io-modular_io_s.html index d01cad1b..fa631501 100644 --- a/Ada95/html/terminal_interface-curses-text_io-modular_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io-modular_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.4 @ +-- @Revision: 1.5 @------------------------------------------------------------------------------generic type Num ismod <>; diff --git a/Ada95/html/terminal_interface-curses-text_io_s.html b/Ada95/html/terminal_interface-curses-text_io_s.html index d7af6f4a..1b88db78 100644 --- a/Ada95/html/terminal_interface-curses-text_io_s.html +++ b/Ada95/html/terminal_interface-curses-text_io_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.5 @ +-- @Revision: 1.6 @------------------------------------------------------------------------------with System; with System.Parameters; diff --git a/Ada95/html/terminal_interface-curses_s.html b/Ada95/html/terminal_interface-curses_s.html index 6eaf8bae..e294a6d3 100644 --- a/Ada95/html/terminal_interface-curses_s.html +++ b/Ada95/html/terminal_interface-curses_s.html @@ -14,25 +14,38 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.7 @ +-- @Revision: 1.9 @------------------------------------------------------------------------------ --- curses binding, generated at Sun Feb 2 17:21:42 1997 +-- curses binding.-- This module is generated. Please don't change it manually!-- Run the generator instead.-- | @@ -190,6 +203,7 @@ Key_Suspend : constant Special_Key_Code := 8#627#; Key_Undo : constant Special_Key_Code := 8#630#; Key_Mouse : constant Special_Key_Code := 8#631#; + Key_Resize : constant Special_Key_Code := 8#632#; Key_Max : constant Special_Key_Code := Special_Key_Code'Last; @@ -445,7 +459,7 @@ ACS_Down_Arrow : constant Character := '.'; ACS_Up_Arrow : constant Character := '-'; ACS_Board_Of_Squares : constant Character := 'h'; - ACS_Lantern : constant Character := 'I'; + ACS_Lantern : constant Character := 'i'; ACS_Solid_Block : constant Character := '0'; ACS_Scan_Line_3 : constant Character := 'p'; ACS_Scan_Line_7 : constant Character := 'r'; @@ -1346,28 +1360,46 @@ function Get_Soft_Label_Key_Attributes return Color_Pair; -- AKA: slk_attr() + -- |===================================================================== + -- | Man page keyok.3x + -- |===================================================================== + + -- | + procedure Enable_Key (Key : in Special_Key_Code; + Enable : in Boolean := True); + -- AKA: keyok() + + -- |===================================================================== + -- | Man page define_key.3x + -- |===================================================================== + + -- | + procedure Define_Key (Definition : in String; + Key : in Special_Key_Code); + -- AKA: define_key() + -- |=====================================================================-- | Man page curs_util.3x-- |=====================================================================-- | Not implemented : filter, use_env, putwin, getwin-- - -- | + -- |procedure Key_Name (Key : in Real_Key_Code; Name : out String); -- AKA: keyname()-- The external name for a real keystroke. - -- | + -- |procedure Un_Control (Ch : in Attributed_Character; Str : out String); -- AKA: unctrl() - -- | + -- |procedure Delay_Output (Msecs : in Natural); -- AKA: delay_output() - -- | + -- |procedure Flush_Input; -- AKA: flushinp() @@ -1375,35 +1407,35 @@ -- | Man page curs_termattrs.3x-- |===================================================================== - -- | + -- |function Baudrate return Natural; -- AKA: baudrate() - -- | + -- |function Erase_Character return Character; -- AKA: erasechar() - -- | + -- |function Kill_Character return Character; -- AKA: killchar() - -- | + -- |function Has_Insert_Character return Boolean; -- AKA: has_ic() - -- | + -- |function Has_Insert_Line return Boolean; -- AKA: has_il() - -- | + -- |function Supported_Attributes return Character_Attribute_Set; -- AKA: termattrs() - -- | + -- |procedure Long_Name (Name : out String); -- AKA: longname() - -- | + -- |procedure Terminal_Name (Name : out String); -- AKA: termname() @@ -1411,39 +1443,39 @@ -- | Man page curs_color.3x-- |===================================================================== - -- | + -- |procedure Start_Color; -- AKA: start_clolor()pragma Import (C, Start_Color, "start_color"); - -- | + -- |procedure Init_Pair (Pair : in Redefinable_Color_Pair; Fore : in Color_Number; Back : in Color_Number); -- AKA: init_pair() - -- | + -- |procedure Pair_Content (Pair : in Color_Pair; Fore : out Color_Number; Back : out Color_Number); -- AKA: pair_content() - -- | + -- |function Has_Colors return Boolean; -- AKA: has_colors() - -- | + -- |procedure Init_Color (Color : in Color_Number; Red : in RGB_Value; Green : in RGB_Value; Blue : in RGB_Value); -- AKA: init_color() - -- | + -- |function Can_Change_Color return Boolean; -- AKA: can_change_color() - -- | + -- |procedure Color_Content (Color : in Color_Number; Red : out RGB_Value; Green : out RGB_Value; @@ -1458,21 +1490,21 @@ -- type Curses_Mode is (Curses, Shell); - -- | + -- |procedure Save_Curses_Mode (Mode : in Curses_Mode); -- AKA: def_prog_mode()-- AKA: def_shell_mode() - -- | + -- |procedure Reset_Curses_Mode (Mode : in Curses_Mode); -- AKA: reset_prog_mode()-- AKA: reset_shell_mode() - -- | + -- |procedure Save_Terminal_State; -- AKA: savetty() - -- | + -- |procedure Reset_Terminal_State; -- AKA: resetty(); @@ -1484,7 +1516,7 @@ -- a good practice to return 0 if you think all went fine-- and -1 otherwise. - -- | + -- |procedure Rip_Off_Lines (Lines : in Integer; Proc : in Stdscr_Init_Proc); -- AKA: ripoffline() @@ -1495,11 +1527,11 @@ type Cursor_Visibility is (Invisible, Normal, Very_Visible); - -- | + -- |procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility); -- AKA: curs_set() - -- | + -- |procedure Nap_Milli_Seconds (Ms : in Natural); -- AKA: napms() diff --git a/Ada95/html/terminal_interface_s.html b/Ada95/html/terminal_interface_s.html index 32d50f4c..e405d092 100644 --- a/Ada95/html/terminal_interface_s.html +++ b/Ada95/html/terminal_interface_s.html @@ -12,23 +12,36 @@ -- ---- S P E C ---- -- --- Version 00.92 -- +------------------------------------------------------------------------------ +-- Copyright (c) 1998 Free Software Foundation, Inc. ---- -- --- The ncurses Ada95 binding is copyrighted 1996 by -- --- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de -- +-- Permission is hereby granted, free of charge, to any person obtaining a -- +-- copy of this software and associated documentation files (the -- +-- "Software"), to deal in the Software without restriction, including -- +-- without limitation the rights to use, copy, modify, merge, publish, -- +-- distribute, distribute with modifications, sublicense, and/or sell -- +-- copies of the Software, and to permit persons to whom the Software is -- +-- furnished to do so, subject to the following conditions: ---- -- --- 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 above copyright notice and this permission notice shall be included -- +-- in all copies or substantial portions of the Software. ---- -- --- This binding comes AS IS with no warranty, implied or expressed. -- +-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- +-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- +-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- +-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- +-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- +-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- +-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- +-- -- +-- Except as contained in this notice, the name(s) of the above copyright -- +-- holders shall not be used in advertising or otherwise to promote the -- +-- sale, use or other dealings in this Software without prior written -- +-- authorization. -------------------------------------------------------------------------------- +-- Jürgen Pfeifer, Email: Juergen.Pfeifer@T-Online.de ---- Version Control: --- @Revision: 1.3 @ +-- @Revision: 1.4 @------------------------------------------------------------------------------package Terminal_Interface is-- diff --git a/Ada95/html/wresize.3x.html b/Ada95/html/wresize.3x.html index 3c1d67b1..a5fd1ab8 100644 --- a/Ada95/html/wresize.3x.html +++ b/Ada95/html/wresize.3x.html @@ -40,7 +40,7 @@

    SEE ALSO

    -       resizeterm(3x).
    +       resizeterm(3X).
     
     
     
    diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in index 2130e4a3..09ed5518 100644 --- a/Ada95/samples/Makefile.in +++ b/Ada95/samples/Makefile.in @@ -1,32 +1,41 @@ -#---------------------------------------------------------------------------- -# -- -# GNAT ncurses Binding -- -# samples/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 1996 +# # Version Control -# $Revision: 1.7 $ +# $Revision: 1.16 $ # .SUFFIXES: SHELL = /bin/sh THIS = Makefile -MODEL = ../../@DFT_OBJ_SUBDIR@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -66,19 +75,19 @@ ada_objdir=../ada_objects LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) -ADA = @nc_ada_compiler@ +ADA = @cf_ada_compiler@ ADAFLAGS = @ADAFLAGS@ -I$(srcdir) -ADAMAKE = @nc_ada_make@ +ADAMAKE = @cf_ada_make@ ADAMAKEFLAGS = -aI$(srcdir) -aI$(ada_srcdir) -aI$(srcdir)/$(ada_srcdir) -aO$(ada_objdir) -ALIB = @nc_ada_package@ +ALIB = @cf_ada_package@ ABASE = $(ALIB)-curses CARGS =-cargs $(ADAFLAGS) LARGS =-largs -L../../lib $(LD_FLAGS) -PROGS = tour +PROGS = tour rain TOUR_OBJS = tour.o sample.o sample-curses_demo.o sample-explanation.o \ sample-form_demo.o sample-function_key_setting.o \ @@ -88,7 +97,20 @@ TOUR_OBJS = tour.o sample.o sample-curses_demo.o sample-explanation.o \ sample-curses_demo-attributes.o sample-curses_demo-mouse.o \ sample-form_demo-aux.o sample-my_field_type.o -all :: demo1 +RAIN_OBJS = rain.o status.o + +all :: demo1 rainy_day + @ + +sources : + @ + +install \ +install.libs :: + @ + +uninstall \ +uninstall.libs :: @ demo1: explain.msg @@ -97,15 +119,18 @@ demo1: explain.msg explain.msg: $(srcdir)/explain.txt cp $(srcdir)/explain.txt $@ -clean :: +rainy_day: + $(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS) + +mostlyclean: + @ + +clean :: mostlyclean rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] explain.msg distclean :: clean rm -f Makefile -mostlyclean :: clean - @ - realclean :: distclean @ diff --git a/Ada95/samples/explain.txt b/Ada95/samples/explain.txt index 51c7d695..570f617b 100644 --- a/Ada95/samples/explain.txt +++ b/Ada95/samples/explain.txt @@ -3,7 +3,7 @@ This is Version 00.90.00 of the demo package. #MENUKEYS In a menu you can use the following Keys in the whole application: - - CTRL-Q Quit the menu + - CTRL-X eXit the menu - CTRL-N Go to next item - CTRL-P Go to previous item - CTRL-U Scroll up one line @@ -12,11 +12,11 @@ In a menu you can use the following Keys in the whole application: - PAGE DOWN Scroll down one page - PAGE UP Scroll back one page - CTRL-B Scroll back one page - - CTRL-X Clear pattern + - CTRL-Y Clear pattern - CTRL-H Delete last character from pattern - Backspace Delete last character from pattern - CTRL-A Next pattern match - - CTRL-Z Previous pattern match + - CTRL-E Previous pattern match - CTRL-T Toggle item in a multi-selection menu - CR or LF Select an item - HOME Key Go to the first item @@ -27,19 +27,20 @@ In a menu you can use the following Keys in the whole application: - Cursor Right Right one item - END Key Go to last item #FORMKEYS - - CTRL-Q Quit the form - - CTRL-F Go to the next page of the form - - CTRL-B Go to the previous page of the form - - CTRL-N Go to the next field - - CTRL-P Go to the previous field + - CTRL-X eXit the form + - CTRL-F Go forward to the next field + - CTRL-B Go backward to the previous field - CTRL-L Go to the field left of the current one - CTRL-R Go to the field right of the current one - CTRL-U Go to the field above the current one - CTRL-D Go to the field below the current one + - CTRL-W Go to the next word in the field - CTRL-T Go to the previous word in the field - - CTRL-S Go to the beginning of the field + + - CTRL-A Go to the beginning of the field - CTRL-E Go to the end of the field + - CTRL-I Insert a blank character at the current position - CTRL-O Insert a line - CTRL-V Delete a character @@ -47,9 +48,9 @@ In a menu you can use the following Keys in the whole application: - CTRL-Y Delete a line - CTRL-G Delete a word - CTRL-K Clear to end of field - - CTRL-X Clear the field - - CTRL-A Next choice in a choice field (Enumerations etc.) - - CTRL-Z Previous choice in a choice field. + + - CTRL-N Next choice in a choice field (Enumerations etc.) + - CTRL-P Previous choice in a choice field. #HELP #HELPKEYS You may scroll with the Cursor Up/Down Keys. @@ -75,8 +76,8 @@ You may select this options: You may press at any place in this demo CTRL-C. This will give you a command window. You can just type in the Label-String of a function key, then this key will be simulated. This should help you to run the application even if -you run it on a terminal with no or only a few function keys. With CTRL-A -and CTRL-Z you may browse through the possible values in the command window. +you run it on a terminal with no or only a few function keys. With CTRL-N +and CTRL-P you may browse through the possible values in the command window. #MENU00 Here we give you a selection of various menu demonstrations. #MENU-PAD00 diff --git a/Ada95/samples/rain.adb b/Ada95/samples/rain.adb new file mode 100644 index 00000000..c29cd98d --- /dev/null +++ b/Ada95/samples/rain.adb @@ -0,0 +1,161 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT ncurses Binding Samples -- +-- -- +-- Rain -- +-- -- +-- 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: Laurent Pautet 1997 (modified by J.Pfeifer) +-- Version Control +-- $Revision: 1.3 $ +-- Binding Version 00.93 +------------------------------------------------------------------------------ +-- -- +with Ada.Numerics.Float_Random; use Ada.Numerics.Float_Random; +with Status; use Status; +with Terminal_Interface.Curses; use Terminal_Interface.Curses; + +procedure Rain is + + Visibility : Cursor_Visibility; + + subtype X_Position is Line_Position; + subtype Y_Position is Column_Position; + + Xpos : array (1 .. 5) of X_Position; + Ypos : array (1 .. 5) of Y_Position; + + N : Integer; + + G : Generator; + + Max_X, X : X_Position; + Max_Y, Y : Y_Position; + + procedure Next (J : in out Integer); + procedure Cursor (X : X_Position; Y : Y_Position); + + procedure Next (J : in out Integer) is + begin + if J = 5 then + J := 1; + else + J := J + 1; + end if; + end Next; + + procedure Cursor (X : X_Position; Y : Y_Position) is + begin + Move_Cursor (Line => X, Column => Y); + end Cursor; + pragma Inline (Cursor); + +begin + + Init_Screen; + Set_NL_Mode; + Set_Echo_Mode (False); + + Visibility := Invisible; + Set_Cursor_Visibility (Visibility); + + Max_X := Lines - 5; + Max_Y := Columns - 5; + + for I in Xpos'Range loop + Xpos (I) := X_Position (Float (Max_X) * Random (G)) + 2; + Ypos (I) := Y_Position (Float (Max_Y) * Random (G)) + 2; + end loop; + + N := 1; + while Process.Continue loop + + X := X_Position (Float (Max_X) * Random (G)) + 2; + Y := Y_Position (Float (Max_Y) * Random (G)) + 2; + + Cursor (X, Y); + Add (Ch => '.'); + + Cursor (Xpos (N), Ypos (N)); + Add (Ch => 'o'); + + -- + Next (N); + Cursor (Xpos (N), Ypos (N)); + Add (Ch => 'O'); + + -- + Next (N); + Cursor (Xpos (N) - 1, Ypos (N)); + Add (Ch => '-'); + Cursor (Xpos (N), Ypos (N) - 1); + Add (Str => "|.|"); + Cursor (Xpos (N) + 1, Ypos (N)); + Add (Ch => '-'); + + -- + Next (N); + Cursor (Xpos (N) - 2, Ypos (N)); + Add (Ch => '-'); + Cursor (Xpos (N) - 1, Ypos (N) - 1); + Add (Str => "/\\"); + Cursor (Xpos (N), Ypos (N) - 2); + Add (Str => "| O |"); + Cursor (Xpos (N) + 1, Ypos (N) - 1); + Add (Str => "\\/"); + Cursor (Xpos (N) + 2, Ypos (N)); + Add (Ch => '-'); + + -- + Next (N); + Cursor (Xpos (N) - 2, Ypos (N)); + Add (Ch => ' '); + Cursor (Xpos (N) - 1, Ypos (N) - 1); + Add (Str => " "); + Cursor (Xpos (N), Ypos (N) - 2); + Add (Str => " "); + Cursor (Xpos (N) + 1, Ypos (N) - 1); + Add (Str => " "); + Cursor (Xpos (N) + 2, Ypos (N)); + Add (Ch => ' '); + + Xpos (N) := X; + Ypos (N) := Y; + + Refresh; + Nap_Milli_Seconds (50); + end loop; + + Visibility := Normal; + Set_Cursor_Visibility (Visibility); + End_Windows; + +end Rain; diff --git a/Ada95/samples/rain.ads b/Ada95/samples/rain.ads new file mode 100644 index 00000000..3f075e7f --- /dev/null +++ b/Ada95/samples/rain.ads @@ -0,0 +1,42 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT ncurses Binding Samples -- +-- -- +-- Rain -- +-- -- +-- 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: Laurent Pautet 1997 (modified by J.Pfeifer) +-- Version Control +-- $Revision: 1.3 $ +-- Binding Version 00.93 +------------------------------------------------------------------------------ +-- -- +procedure Rain; diff --git a/Ada95/samples/sample-curses_demo-attributes.adb b/Ada95/samples/sample-curses_demo-attributes.adb index d1eb8f71..9b9089a5 100644 --- a/Ada95/samples/sample-curses_demo-attributes.adb +++ b/Ada95/samples/sample-curses_demo-attributes.adb @@ -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 1996 -- Version Control --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; diff --git a/Ada95/samples/sample-curses_demo-attributes.ads b/Ada95/samples/sample-curses_demo-attributes.ads index fc93e747..30f82577 100644 --- a/Ada95/samples/sample-curses_demo-attributes.ads +++ b/Ada95/samples/sample-curses_demo-attributes.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample.Curses_Demo.Attributes is diff --git a/Ada95/samples/sample-curses_demo-mouse.adb b/Ada95/samples/sample-curses_demo-mouse.adb index e8351598..0240da5f 100644 --- a/Ada95/samples/sample-curses_demo-mouse.adb +++ b/Ada95/samples/sample-curses_demo-mouse.adb @@ -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 1996 -- Version Control --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; diff --git a/Ada95/samples/sample-curses_demo-mouse.ads b/Ada95/samples/sample-curses_demo-mouse.ads index ad3e5dac..49eb84ab 100644 --- a/Ada95/samples/sample-curses_demo-mouse.ads +++ b/Ada95/samples/sample-curses_demo-mouse.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample.Curses_Demo.Mouse is diff --git a/Ada95/samples/sample-curses_demo.adb b/Ada95/samples/sample-curses_demo.adb index 81ac9a5a..aa5b1091 100644 --- a/Ada95/samples/sample-curses_demo.adb +++ b/Ada95/samples/sample-curses_demo.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Menus; use Terminal_Interface.Curses.Menus; @@ -43,6 +57,12 @@ with Sample.Curses_Demo.Attributes; package body Sample.Curses_Demo is + type User_Data is new Integer; + type User_Data_Access is access all User_Data; + package PUD is new Panels.User_Data (User_Data, User_Data_Access); + -- We use above instantiation of the generic User_Data package to + -- demonstrate and test the use of the user data maechanism. + procedure Demo is function My_Driver (M : Menu; @@ -50,20 +70,25 @@ package body Sample.Curses_Demo is Pan : Panel) return Boolean; package Mh is new Sample.Menu_Demo.Handler (My_Driver); - Itm : constant Item_Array (1 .. 2) := + Itm : Item_Array_Access := new Item_Array' (New_Item ("Attributes Demo"), - New_Item ("Mouse Demo")); - M : Menu := New_Menu (Itm); + New_Item ("Mouse Demo"), + Null_Item); + M : Menu := New_Menu (Itm); + U1 : User_Data_Access := new User_Data'(4711); + U2 : User_Data_Access; function My_Driver (M : Menu; K : Key_Code; Pan : Panel) return Boolean is Idx : constant Positive := Get_Index (Current (M)); + Result : Boolean := False; begin + PUD.Set_User_Data (Pan, U1); -- set some user data, just for fun if K in User_Key_Code'Range then if K = QUIT then - return True; + Result := True; elsif K = SELECT_ITEM then if Idx in Itm'Range then Hide (Pan); @@ -82,16 +107,18 @@ package body Sample.Curses_Demo is end if; end if; end if; - return False; + PUD.Get_User_Data (Pan, U2); -- get the user data + pragma Assert (U1.all = U2.all and then U1 = U2); + return Result; end My_Driver; begin - if Item_Count (M) /= Itm'Length then + if (1 + Item_Count (M)) /= Itm'Length then raise Constraint_Error; end if; - if not Has_Key (Key_Mouse) then + if not Has_Mouse then declare O : Item_Option_Set; begin @@ -110,7 +137,7 @@ package body Sample.Curses_Demo is Pop_Environment; Delete (M); - + Free (Itm, True); end Demo; end Sample.Curses_Demo; diff --git a/Ada95/samples/sample-curses_demo.ads b/Ada95/samples/sample-curses_demo.ads index 49e5fb6c..eb1f691e 100644 --- a/Ada95/samples/sample-curses_demo.ads +++ b/Ada95/samples/sample-curses_demo.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample.Curses_Demo is diff --git a/Ada95/samples/sample-explanation.adb b/Ada95/samples/sample-explanation.adb index 67930911..eb7f4577 100644 --- a/Ada95/samples/sample-explanation.adb +++ b/Ada95/samples/sample-explanation.adb @@ -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 1996 -- Version Control --- $Revision: 1.6 $ +-- $Revision: 1.9 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ -- Poor mans help system. This scans a sequential file for key lines and -- then reads the lines up to the next key. Those lines are presented in diff --git a/Ada95/samples/sample-explanation.ads b/Ada95/samples/sample-explanation.ads index 3eaecbe3..ff7bd4ba 100644 --- a/Ada95/samples/sample-explanation.ads +++ b/Ada95/samples/sample-explanation.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ -- Poor mans help system. This scans a sequential file for key lines and -- then reads the lines up to the next key. Those lines are presented in diff --git a/Ada95/samples/sample-form_demo-aux.adb b/Ada95/samples/sample-form_demo-aux.adb index 2f3f24e7..6da5e951 100644 --- a/Ada95/samples/sample-form_demo-aux.adb +++ b/Ada95/samples/sample-form_demo-aux.adb @@ -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 1996 -- Version Control --- $Revision: 1.5 $ +-- $Revision: 1.9 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; @@ -120,36 +134,40 @@ package body Sample.Form_Demo.Aux is K := Get_Key (W); if K in Special_Key_Code'Range then case K is - when HELP_CODE => Explain_Context; - when EXPLAIN_CODE => Explain ("FORMKEYS"); - when Key_Home => return F_First_Field; - when Key_End => return F_Last_Field; - when QUIT_CODE => return QUIT; - when Key_Cursor_Down => return F_Down_Char; - when Key_Cursor_Up => return F_Up_Char; - when Key_Cursor_Left => return F_Left_Char; - when Key_Cursor_Right => return F_Right_Char; - when Key_Next_Page => return F_ScrollForward_Line; - when Key_Previous_Page => return F_ScrollBackward_Line; - when Key_Backspace => return F_Delete_Previous; - when others => return K; + when HELP_CODE => Explain_Context; + when EXPLAIN_CODE => Explain ("FORMKEYS"); + when Key_Home => return F_First_Field; + when Key_End => return F_Last_Field; + when QUIT_CODE => return QUIT; + when Key_Cursor_Down => return F_Down_Char; + when Key_Cursor_Up => return F_Up_Char; + when Key_Cursor_Left => return F_Previous_Char; + when Key_Cursor_Right => return F_Next_Char; + when Key_Next_Page => return F_Next_Page; + when Key_Previous_Page => return F_Previous_Page; + when Key_Backspace => return F_Delete_Previous; + when Key_Clear_Screen => return F_Clear_Field; + when Key_Clear_End_Of_Line => return F_Clear_EOF; + when others => return K; end case; elsif K in Normal_Key_Code'Range then Ch := Character'Val (K); case Ch is - when DC1 => return QUIT; -- CTRL-Q - when ACK => return F_Next_Page; -- CTRL-F - when STX => return F_Previous_Page; -- CTRL-B - when SO => return F_Next_Field; -- CTRL-N - when DLE => return F_Previous_Field; -- CTRL-P + when CAN => return QUIT; -- CTRL-X + + when ACK => return F_Next_Field; -- CTRL-F + when STX => return F_Previous_Field; -- CTRL-B when FF => return F_Left_Field; -- CTRL-L when DC2 => return F_Right_Field; -- CTRL-R when NAK => return F_Up_Field; -- CTRL-U when EOT => return F_Down_Field; -- CTRL-D + when ETB => return F_Next_Word; -- CTRL-W when DC4 => return F_Previous_Word; -- CTRL-T - when DC3 => return F_Begin_Field; -- CTRL-S + + when SOH => return F_Begin_Field; -- CTRL-A when ENQ => return F_End_Field; -- CTRL-E + when HT => return F_Insert_Char; -- CTRL-I when SI => return F_Insert_Line; -- CTRL-O when SYN => return F_Delete_Char; -- CTRL-V @@ -157,9 +175,10 @@ package body Sample.Form_Demo.Aux is when EM => return F_Delete_Line; -- CTRL-Y when BEL => return F_Delete_Word; -- CTRL-G when VT => return F_Clear_EOF; -- CTRL-K - when CAN => return F_Clear_Field; -- CTRL-X - when SOH => return F_Next_Choice; -- CTRL-A - when SUB => return F_Previous_Choice; -- CTRL-Z + + when SO => return F_Next_Choice; -- CTRL-N + when DLE => return F_Previous_Choice; -- CTRL-P + when CR | LF => if Handle_CRLF then return F_New_Line; @@ -224,12 +243,11 @@ package body Sample.Form_Demo.Aux is is N : Natural := 0; O : Field_Option_Set; - A : constant Field_Array_Access := Fields (F); H : constant Natural := Field_Count (F); begin if H > 0 then for I in 1 .. H loop - Get_Options (A.all (I), O); + Get_Options (Fields (F, I), O); if O.Active then N := N + 1; end if; diff --git a/Ada95/samples/sample-form_demo-aux.ads b/Ada95/samples/sample-form_demo-aux.ads index d1927985..1fd44778 100644 --- a/Ada95/samples/sample-form_demo-aux.ads +++ b/Ada95/samples/sample-form_demo-aux.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; diff --git a/Ada95/samples/sample-form_demo-handler.adb b/Ada95/samples/sample-form_demo-handler.adb index 6f992b7d..2678027d 100644 --- a/Ada95/samples/sample-form_demo-handler.adb +++ b/Ada95/samples/sample-form_demo-handler.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; with Sample.Form_Demo.Aux; diff --git a/Ada95/samples/sample-form_demo-handler.ads b/Ada95/samples/sample-form_demo-handler.ads index 33c9f146..4754563a 100644 --- a/Ada95/samples/sample-form_demo-handler.ads +++ b/Ada95/samples/sample-form_demo-handler.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-form_demo.adb b/Ada95/samples/sample-form_demo.adb index 9d4390f6..62189267 100644 --- a/Ada95/samples/sample-form_demo.adb +++ b/Ada95/samples/sample-form_demo.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; @@ -32,7 +46,6 @@ with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; with Terminal_Interface.Curses.Forms.Field_User_Data; with Terminal_Interface.Curses.Forms.Form_User_Data; - with Sample.Keyboard_Handler; use Sample.Keyboard_Handler; with Sample.My_Field_Type; use Sample.My_Field_Type; with Sample.Manifest; use Sample.Manifest; @@ -41,6 +54,12 @@ with Sample.Form_Demo.Aux; use Sample.Form_Demo.Aux; with Sample.Function_Key_Setting; use Sample.Function_Key_Setting; with Sample.Form_Demo.Handler; +with Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; +with Terminal_Interface.Curses.Forms.Field_Types.Enumeration; +use Terminal_Interface.Curses.Forms.Field_Types.Enumeration; +with Terminal_Interface.Curses.Forms.Field_Types.IntField; +use Terminal_Interface.Curses.Forms.Field_Types.IntField; + package body Sample.Form_Demo is type User_Data is @@ -57,33 +76,32 @@ package body Sample.Form_Demo is Terminal_Interface.Curses.Forms.Form_User_Data (User_Data, User_Access); - Enums : constant Enum_Array := (new String'("alpha"), - new String'("beta"), - new String'("gamma")); + type Weekday is (Sunday, Monday, Tuesday, Wednesday, Thursday, + Friday, Saturday); - Enum_Info : constant Enumeration_Info := (Enums'Length, Enums, - False, False); + package Weekday_Enum is new + Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada (Weekday); - Enum_Field : constant Enumeration_Field := Create (Enum_Info, True); + Enum_Field : constant Enumeration_Field := + Weekday_Enum.Create; procedure Demo is Mft : My_Data := (Ch => 'X'); - FA : Field_Array (1 .. 9) := (Make (0, 14, "Sample Entry Form"), - Make (2, 0, "An Enumeration"), - Make (2, 20, "Numeric 1-10"), - Make (2, 34, "Only 'X'"), - Make (5, 0, - "Multiple Lines offscreen (Scroll)"), - - Make (Width => 18, Top => 3, Left => 0), - Make (Width => 12, Top => 3, Left => 20), - Make (Width => 12, Top => 3, Left => 34), - Make (Width => 46, Top => 6, Left => 0, - Height => 4, Off_Screen => 2) - ); + FA : Field_Array_Access := new Field_Array' + (Make (0, 14, "Sample Entry Form"), + Make (2, 0, "WeekdayEnumeration"), + Make (2, 20, "Numeric 1-10"), + Make (2, 34, "Only 'X'"), + Make (5, 0, "Multiple Lines offscreen(Scroll)"), + Make (Width => 18, Top => 3, Left => 0), + Make (Width => 12, Top => 3, Left => 20), + Make (Width => 12, Top => 3, Left => 34), + Make (Width => 46, Top => 6, Left => 0, Height => 4, Off_Screen => 2), + Null_Field + ); Frm : Terminal_Interface.Curses.Forms.Form := Create (FA); @@ -100,9 +118,9 @@ package body Sample.Form_Demo is Notepad ("FORM-PAD00"); Default_Labels; - Set_Type (FA (6), Enum_Field); - Set_Type (FA (7), I_F); - Set_Type (FA (8), Mft); + Set_Field_Type (FA (6), Enum_Field); + Set_Field_Type (FA (7), I_F); + Set_Field_Type (FA (8), Mft); F1 := new User_Data'(Data => 4711); Fld_U.Set_User_Data (FA (1), F1); @@ -116,9 +134,7 @@ package body Sample.Form_Demo is Pop_Environment; Delete (Frm); - for I in FA'Range loop - Delete (FA (I)); - end loop; + Free (FA, True); end Demo; end Sample.Form_Demo; diff --git a/Ada95/samples/sample-form_demo.ads b/Ada95/samples/sample-form_demo.ads index 42fdec6b..7d9a2772 100644 --- a/Ada95/samples/sample-form_demo.ads +++ b/Ada95/samples/sample-form_demo.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample.Form_Demo is diff --git a/Ada95/samples/sample-function_key_setting.adb b/Ada95/samples/sample-function_key_setting.adb index 4cae7275..979fefd0 100644 --- a/Ada95/samples/sample-function_key_setting.adb +++ b/Ada95/samples/sample-function_key_setting.adb @@ -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 1996 -- Version Control --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; with Sample.Manifest; use Sample.Manifest; diff --git a/Ada95/samples/sample-function_key_setting.ads b/Ada95/samples/sample-function_key_setting.ads index 6199094d..71c120f3 100644 --- a/Ada95/samples/sample-function_key_setting.ads +++ b/Ada95/samples/sample-function_key_setting.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; diff --git a/Ada95/samples/sample-header_handler.adb b/Ada95/samples/sample-header_handler.adb index b66402d8..4787f24f 100644 --- a/Ada95/samples/sample-header_handler.adb +++ b/Ada95/samples/sample-header_handler.adb @@ -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 1996 -- Version Control --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Calendar; use Ada.Calendar; with Terminal_Interface.Curses.Text_IO.Integer_IO; diff --git a/Ada95/samples/sample-header_handler.ads b/Ada95/samples/sample-header_handler.ads index a88b798d..d2124ddb 100644 --- a/Ada95/samples/sample-header_handler.ads +++ b/Ada95/samples/sample-header_handler.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-helpers.adb b/Ada95/samples/sample-helpers.adb index 379b592a..533f411c 100644 --- a/Ada95/samples/sample-helpers.adb +++ b/Ada95/samples/sample-helpers.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-helpers.ads b/Ada95/samples/sample-helpers.ads index 6b4ef2ae..d2f5f039 100644 --- a/Ada95/samples/sample-helpers.ads +++ b/Ada95/samples/sample-helpers.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-keyboard_handler.adb b/Ada95/samples/sample-keyboard_handler.adb index c320cdd2..1d7a85a1 100644 --- a/Ada95/samples/sample-keyboard_handler.adb +++ b/Ada95/samples/sample-keyboard_handler.adb @@ -6,31 +6,48 @@ -- -- -- 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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Strings; use Ada.Strings; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants; with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; +with Ada.Characters.Handling; use Ada.Characters.Handling; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; +with Terminal_Interface.Curses.Forms.Field_Types.Enumeration; +use Terminal_Interface.Curses.Forms.Field_Types.Enumeration; with Sample.Header_Handler; use Sample.Header_Handler; with Sample.Form_Demo.Aux; use Sample.Form_Demo.Aux; @@ -64,9 +81,10 @@ package body Sample.Keyboard_Handler is Labels : Label_Array; - FA : Field_Array (1 .. 2) := (Make (0, 0, "Command:"), - Make (Top => 0, Left => 9, - Width => Columns - 11)); + FA : Field_Array_Access := new Field_Array' + (Make (0, 0, "Command:"), + Make (Top => 0, Left => 9, Width => Columns - 11), + Null_Field); K : Real_Key_Code := Key_None; N : Natural := 0; @@ -93,7 +111,7 @@ package body Sample.Keyboard_Handler is Get_Buffer (Fld => FA (2), Str => Buffer); Trim (Buffer, Left); if Buffer (1) /= ' ' then - Cmdc := Buffer (Cmdc'Range); + Cmdc := To_Upper (Buffer (Cmdc'Range)); for I in Labels'Range loop if Cmdc = Labels (I) then K := Function_Key_Code @@ -136,7 +154,7 @@ package body Sample.Keyboard_Handler is end if; end loop; Enum_Field := Create (Enum_Info, True); - Set_Type (FA (2), Enum_Field); + Set_Field_Type (FA (2), Enum_Field); Set_Background (FA (2), Normal_Video); Fh.Drive_Me (Frm, Lines - 3, 0); @@ -144,9 +162,7 @@ package body Sample.Keyboard_Handler is Update_Panels; Update_Screen; end; end if; - for I in FA'Range loop - Delete (FA (I)); - end loop; + Free (FA, True); In_Command := False; return K; end Command; diff --git a/Ada95/samples/sample-keyboard_handler.ads b/Ada95/samples/sample-keyboard_handler.ads index 7927ac0e..9b870247 100644 --- a/Ada95/samples/sample-keyboard_handler.ads +++ b/Ada95/samples/sample-keyboard_handler.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-manifest.ads b/Ada95/samples/sample-manifest.ads index 3f14246a..4d9aa502 100644 --- a/Ada95/samples/sample-manifest.ads +++ b/Ada95/samples/sample-manifest.ads @@ -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 1996 -- Version Control --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-menu_demo-aux.adb b/Ada95/samples/sample-menu_demo-aux.adb index 9e091b2c..66e10c15 100644 --- a/Ada95/samples/sample-menu_demo-aux.adb +++ b/Ada95/samples/sample-menu_demo-aux.adb @@ -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 1996 -- Version Control --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; @@ -164,21 +178,21 @@ package body Sample.Menu_Demo.Aux is elsif K in Normal_Key_Code'Range then Ch := Character'Val (K); case Ch is - when DC1 => return QUIT; -- CTRL-Q + when CAN => return QUIT; -- CTRL-X when SO => return REQ_NEXT_ITEM; -- CTRL-N when DLE => return REQ_PREV_ITEM; -- CTRL-P when NAK => return REQ_SCR_ULINE; -- CTRL-U when EOT => return REQ_SCR_DLINE; -- CTRL-D when ACK => return REQ_SCR_DPAGE; -- CTRL-F when STX => return REQ_SCR_UPAGE; -- CTRL-B - when CAN => return REQ_CLEAR_PATTERN; -- CTRL-X + when EM => return REQ_CLEAR_PATTERN; -- CTRL-Y when BS => return REQ_BACK_PATTERN; -- CTRL-H when SOH => return REQ_NEXT_MATCH; -- CTRL-A - when SUB => return REQ_PREV_MATCH; -- CTRL-Z + when ENQ => return REQ_PREV_MATCH; -- CTRL-E when DC4 => return REQ_TOGGLE_ITEM; -- CTRL-T - when CR => return SELECT_ITEM; -- CTRL-M - when LF => return SELECT_ITEM; -- CTRL-J - when others => return K; + + when CR | LF => return SELECT_ITEM; + when others => return K; end case; else return K; diff --git a/Ada95/samples/sample-menu_demo-aux.ads b/Ada95/samples/sample-menu_demo-aux.ads index a1061305..1efbb3dc 100644 --- a/Ada95/samples/sample-menu_demo-aux.ads +++ b/Ada95/samples/sample-menu_demo-aux.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; diff --git a/Ada95/samples/sample-menu_demo-handler.adb b/Ada95/samples/sample-menu_demo-handler.adb index aa0c10ea..cac7578b 100644 --- a/Ada95/samples/sample-menu_demo-handler.adb +++ b/Ada95/samples/sample-menu_demo-handler.adb @@ -6,26 +6,41 @@ -- -- -- 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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Sample.Menu_Demo.Aux; with Sample.Explanation; use Sample.Explanation; +with Sample.Manifest; use Sample.Manifest; package body Sample.Menu_Demo.Handler is @@ -60,9 +75,19 @@ package body Sample.Menu_Demo.Handler is case R is when Menu_Ok => null; when Unknown_Request => - if My_Driver (M, K, Pan) then - exit; - end if; + declare + I : constant Item := Current (M); + O : Item_Option_Set; + begin + Get_Options (I, O); + if K = SELECT_ITEM and then not O.Selectable then + Beep; + else + if My_Driver (M, K, Pan) then + exit; + end if; + end if; + end; when others => Beep; end case; end; diff --git a/Ada95/samples/sample-menu_demo-handler.ads b/Ada95/samples/sample-menu_demo-handler.ads index 107d1c7a..78a2ebb5 100644 --- a/Ada95/samples/sample-menu_demo-handler.ads +++ b/Ada95/samples/sample-menu_demo-handler.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; diff --git a/Ada95/samples/sample-menu_demo.adb b/Ada95/samples/sample-menu_demo.adb index 6006fc3c..1d08316f 100644 --- a/Ada95/samples/sample-menu_demo.adb +++ b/Ada95/samples/sample-menu_demo.adb @@ -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 1996 -- Version Control --- $Revision: 1.4 $ +-- $Revision: 1.7 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; @@ -60,30 +74,20 @@ package body Sample.Menu_Demo is package Mh is new Sample.Menu_Demo.Handler (My_Driver); - I : constant Item_Array (1 .. 12) := (New_Item ("January", - "31 Days"), - New_Item ("February", - "28/29 Days"), - New_Item ("March", - "31 Days"), - New_Item ("April", - "30 Days"), - New_Item ("May", - "31 Days"), - New_Item ("June", - "30 Days"), - New_Item ("July", - "31 Days"), - New_Item ("August", - "31 Days"), - New_Item ("September", - "30 Days"), - New_Item ("October", - "31 Days"), - New_Item ("November", - "30 Days"), - New_Item ("December", - "31 Days")); + I : Item_Array_Access := new Item_Array' + (New_Item ("January", "31 Days"), + New_Item ("February", "28/29 Days"), + New_Item ("March", "31 Days"), + New_Item ("April", "30 Days"), + New_Item ("May", "31 Days"), + New_Item ("June", "30 Days"), + New_Item ("July", "31 Days"), + New_Item ("August", "31 Days"), + New_Item ("September", "30 Days"), + New_Item ("October", "31 Days"), + New_Item ("November", "30 Days"), + New_Item ("December", "31 Days"), + Null_Item); M : Menu := New_Menu (I); Flip_State : Boolean := True; @@ -300,7 +304,7 @@ package body Sample.Menu_Demo is Pop_Environment; Delete (M); - + Free (I, True); end Spacing_Test; end Spacing_Demo; @@ -323,9 +327,10 @@ package body Sample.Menu_Demo is package Mh is new Sample.Menu_Demo.Handler (My_Driver); - Itm : constant Item_Array (1 .. 2) := + Itm : Item_Array_Access := new Item_Array' (New_Item ("Menu Layout Options"), - New_Item ("Demo of Hook functions")); + New_Item ("Demo of Hook functions"), + Null_Item); M : Menu := New_Menu (Itm); U1 : User_Data_Access := new User_Data'(4711); @@ -381,6 +386,7 @@ package body Sample.Menu_Demo is Pop_Environment; Delete (M); + Free (Itm, True); end Demo; end Sample.Menu_Demo; diff --git a/Ada95/samples/sample-menu_demo.ads b/Ada95/samples/sample-menu_demo.ads index 797ed2b1..250e0892 100644 --- a/Ada95/samples/sample-menu_demo.ads +++ b/Ada95/samples/sample-menu_demo.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample.Menu_Demo is diff --git a/Ada95/samples/sample-my_field_type.adb b/Ada95/samples/sample-my_field_type.adb index 5becee3d..f2f1b112 100644 --- a/Ada95/samples/sample-my_field_type.adb +++ b/Ada95/samples/sample-my_field_type.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; @@ -32,18 +46,20 @@ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; package body Sample.My_Field_Type is -- That's simple. There are no field validity checks. - function F_Check (Fld : Field; Info : My_Access) return Boolean + function Field_Check (Fld : Field; + Typ : My_Data) return Boolean is begin return True; - end F_Check; + end Field_Check; -- Check exactly against the specified character. - function C_Check (Ch : Character; Info : My_Access) return Boolean + function Character_Check (Ch : Character; + Typ : My_Data) return Boolean is - C : constant Character := Info.Ch; + C : constant Character := Typ.Ch; begin return Ch = C; - end C_Check; + end Character_Check; end Sample.My_Field_Type; diff --git a/Ada95/samples/sample-my_field_type.ads b/Ada95/samples/sample-my_field_type.ads index cf4d8f9f..b05a3ef4 100644 --- a/Ada95/samples/sample-my_field_type.ads +++ b/Ada95/samples/sample-my_field_type.ads @@ -6,46 +6,57 @@ -- -- -- 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 1996 -- Version Control --- $Revision: 1.3 $ +-- $Revision: 1.6 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; -with Terminal_Interface.Curses.Forms.Field_Types; +with Terminal_Interface.Curses.Forms.Field_Types.User; +use Terminal_Interface.Curses.Forms.Field_Types.User; -- This is a very simple user defined field type. It accepts only a -- defined character as input into the field. -- package Sample.My_Field_Type is - type My_Data is new Ada_Defined_Field_Type with + type My_Data is new User_Defined_Field_Type with record Ch : Character; end record; - type My_Access is access My_Data; - -private - function F_Check (Fld : Field; Info : My_Access) return Boolean; - function C_Check (Ch : Character; Info : My_Access) return Boolean; + function Field_Check (Fld : Field; + Typ : My_Data) return Boolean; - package One_Character_Only is new - Terminal_Interface.Curses.Forms.Field_Types - (My_Data, My_Access, F_Check, C_Check); + function Character_Check (Ch : Character; + Typ : My_Data) return Boolean; end Sample.My_Field_Type; diff --git a/Ada95/samples/sample-text_io_demo.adb b/Ada95/samples/sample-text_io_demo.adb index d122801d..9962be9c 100644 --- a/Ada95/samples/sample-text_io_demo.adb +++ b/Ada95/samples/sample-text_io_demo.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Ada.Numerics.Generic_Elementary_Functions; with Ada.Numerics.Complex_Types; @@ -107,7 +121,6 @@ package body Sample.Text_IO_Demo is Notepad ("TEXTIO-PAD00"); Set_Echo_Mode (FALSE); - Set_Raw_Mode; Set_Meta_Mode; Set_KeyPad_Mode; W := Sub_Window (Standard_Window, Lines - 2, Columns - 2, 1, 1); diff --git a/Ada95/samples/sample-text_io_demo.ads b/Ada95/samples/sample-text_io_demo.ads index 557ce8a4..3d64b299 100644 --- a/Ada95/samples/sample-text_io_demo.ads +++ b/Ada95/samples/sample-text_io_demo.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample.Text_IO_Demo is diff --git a/Ada95/samples/sample.adb b/Ada95/samples/sample.adb index 8b3d55d5..ce0cc3a1 100644 --- a/Ada95/samples/sample.adb +++ b/Ada95/samples/sample.adb @@ -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 1996 -- Version Control --- $Revision: 1.5 $ +-- $Revision: 1.8 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Text_IO; @@ -76,11 +90,12 @@ package body Sample is package Mh is new Sample.Menu_Demo.Handler (My_Driver); - I : constant Item_Array (1 .. 4) := + I : Item_Array_Access := new Item_Array' (New_Item ("Curses Core Demo"), New_Item ("Menu Demo"), New_Item ("Form Demo"), - New_Item ("Text IO Demo")); + New_Item ("Text IO Demo"), + Null_Item); M : Menu := New_Menu (I); @@ -121,7 +136,7 @@ package body Sample is begin - if Item_Count (M) /= I'Length then + if (1 + Item_Count (M)) /= I'Length then raise Constraint_Error; end if; @@ -147,6 +162,7 @@ package body Sample is pragma Assert (I1.Data = I2.Data); Delete (M); + Free (I, True); end Main_Menu; begin diff --git a/Ada95/samples/sample.ads b/Ada95/samples/sample.ads index 8a385d48..7522815b 100644 --- a/Ada95/samples/sample.ads +++ b/Ada95/samples/sample.ads @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ package Sample is procedure Whow; diff --git a/Ada95/samples/status.adb b/Ada95/samples/status.adb new file mode 100644 index 00000000..850e4e3c --- /dev/null +++ b/Ada95/samples/status.adb @@ -0,0 +1,56 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT ncurses Binding Samples -- +-- -- +-- Status -- +-- -- +-- 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 1996 +-- Version Control +-- $Revision: 1.3 $ +-- Binding Version 00.93 +------------------------------------------------------------------------------ +-- This package has been contributed by Laurent Pautet -- +-- -- +package body Status is + + protected body Process is + procedure Stop is + begin + Done := True; + end Stop; + function Continue return Boolean is + begin + return not Done; + end Continue; + end Process; + +end Status; diff --git a/Ada95/samples/status.ads b/Ada95/samples/status.ads new file mode 100644 index 00000000..4b81b0a5 --- /dev/null +++ b/Ada95/samples/status.ads @@ -0,0 +1,55 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT ncurses Binding Samples -- +-- -- +-- Status -- +-- -- +-- 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 1996 +-- Version Control +-- $Revision: 1.3 $ +-- Binding Version 00.93 +------------------------------------------------------------------------------ +-- This package has been contributed by Laurent Pautet -- +-- -- +with Ada.Interrupts.Names; + +package Status is + + protected Process is + procedure Stop; + function Continue return Boolean; + pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); + private + Done : Boolean := False; + end Process; + +end Status; diff --git a/Ada95/samples/tour.adb b/Ada95/samples/tour.adb index bbcdcd3a..920eb91a 100644 --- a/Ada95/samples/tour.adb +++ b/Ada95/samples/tour.adb @@ -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 1996 -- Version Control --- $Revision: 1.2 $ +-- $Revision: 1.5 $ +-- Binding Version 00.93 ------------------------------------------------------------------------------ with Sample; use Sample; diff --git a/Ada95/samples/tour.ads b/Ada95/samples/tour.ads index 9d8395c6..2abc440f 100644 --- a/Ada95/samples/tour.ads +++ b/Ada95/samples/tour.ads @@ -6,22 +6,36 @@ -- -- -- 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-
    C nameAda nameman page
    baudrate()Baudratecurs_termattrs.3x
    baudrate()Baudratecurs_termattrs.3x
    beep()Beepcurs_beep.3x
    bottom_panel()Bottompanel.3x
    box()Boxcurs_border.3x
    can_change_color()Can_Change_Colorcurs_color.3x
    can_change_color()Can_Change_Colorcurs_color.3x
    cbreak()Set_Cbreak_Modecurs_inopts.3x
    clearok()Clear_On_Next_Updatecurs_outopts.3x
    color_content()Color_Contentcurs_color.3x
    color_content()Color_Contentcurs_color.3x
    copywin()Copycurs_overlay.3x
    current_field()Currentform_page.3x
    current_item()Currentmitem_current.3x
    curs_set()Set_Cursor_Visibilitycurs_kernel.3x
    curs_set()Set_Cursor_Visibilitycurs_kernel.3x
    data_ahead()Data_Aheadform_data.3x
    data_behind()Data_Behindform_data.3x
    def_prog_mode()Save_Curses_Modecurs_kernel.3x
    def_prog_mode()Save_Curses_Modecurs_kernel.3x
    define_key()Define_Keydefine_key.3x
    del_panel()Deletepanel.3x
    delay_output()Delay_Outputcurs_util.3x
    delay_output()Delay_Outputcurs_util.3x
    delwin()Deletecurs_window.3x
    derwin()Derived_Windowcurs_window.3x
    doupdate()Update_Screencurs_refresh.3x
    dynamic_field_info()Dynamic_Infoform_field_info.3x
    echo()Set_Echo_Modecurs_inopts.3x
    endwin()End_Windowscurs_initscr.3x
    erasechar()Erase_Charactercurs_termattrs.3x
    erasechar()Erase_Charactercurs_termattrs.3x
    field_back()Backgroundform_field_attributes.3x
    field_back()Backgroundform_field_attributes.3x
    field_buffer()Get_Bufferform_field_buffer.3x
    field_pad()Pad_Characterform_field_attributes.3x
    field_status()Changedform_field_buffer.3x
    field_term()Get_Field_Term_Hookform_hook.3x
    field_type()Get_Typeform_field_validation.3x
    field_type()Get_Typeform_field_validation.3x
    field_userptrGet_User_Dataform_field_userptr.3x
    flash()Flash_Screencurs_beep.3x
    flushinp()Flush_Inputcurs_util.3x
    flushinp()Flush_Inputcurs_util.3x
    form_driver()Driverform_driver.3x
    form_fields()Fieldsform_field.3x
    form_init()Get_Form_Init_Hookform_hook.3x
    getparyx()Get_Origin_Relative_To_Parentcurs_getyx.3x
    getyx()Get_Cursor_Positioncurs_getyx.3x
    halfdelay()Half_Delaycurs_inopts.3x
    has_colors()Has_Colorscurs_color.3x
    has_ic()Has_Insert_Charactercurs_termattrs.3x
    has_il()Has_Insert_Linecurs_termattrs.3x
    has_colors()Has_Colorscurs_color.3x
    has_ic()Has_Insert_Charactercurs_termattrs.3x
    has_il()Has_Insert_Linecurs_termattrs.3x
    has_key()Has_Keycurs_getch.3x
    hide_panel()Hidepanel.3x
    idcok()Use_Insert_Delete_Charactercurs_outopts.3x
    idlok()Use_Insert_Delete_Linecurs_outopts.3x
    immedok()Immediate_Update_Modecurs_outopts.3x
    init_color()Init_Colorcurs_color.3x
    init_pair()Init_Paircurs_color.3x
    init_color()Init_Colorcurs_color.3x
    init_pair()Init_Paircurs_color.3x
    initscr()Init_Screencurs_initscr.3x
    initscr()Init_Windowscurs_initscr.3x
    intrflush()Set_Flush_On_Interrupt_Modecurs_inopts.3x
    item_userptrGet_User_Datamitem_userptr.3x
    item_value()Valuemitem_value.3x
    item_visible()Visiblemitem_visible.3x
    keyname()Key_Namecurs_util.3x
    keyname()Key_Namecurs_util.3x
    keyok()Enable_Keykeyok.3x
    keypad()Set_KeyPad_Modecurs_inopts.3x
    killchar()Kill_Charactercurs_termattrs.3x
    killchar()Kill_Charactercurs_termattrs.3x
    leaveok()Leave_Cursor_After_Updatecurs_outopts.3x
    link_field()Linkform_field_new.3x
    longname()Long_Namecurs_termattrs.3x
    longname()Long_Namecurs_termattrs.3x
    menu_back()Backgroundmenu_attribs.3x
    menu_back()Backgroundmenu_attribs.3x
    menu_driver()Drivermenu_new.3x
    mvwinnstr()Peekcurs_instr.3x
    mvwinsch()Insertcurs_winch.3x
    mvwinsnstr()Insertcurs_winch.3x
    napms()Nap_Milli_Secondscurs_kernel.3x
    napms()Nap_Milli_Secondscurs_kernel.3x
    new_field()Createform_field_new.3x
    new_field()New_Fieldform_field_new.3x
    new_form()Createform_new.3x
    notimeout()Set_Escape_Time_Modecurs_inopts.3x
    overlay()Overlaycurs_overlay.3x
    overwrite()Overwritecurs_overlay.3x
    pair_content()Pair_Contentcurs_color.3x
    pair_content()Pair_Contentcurs_color.3x
    panel_above()Abovepanel.3x
    panel_below()Belowpanel.3x
    panel_hidden()Is_Hiddenpanel.3x
    raw()Set_Raw_Modecurs_inopts.3x
    redrawwin()Redrawcurs_refresh.3x
    replace_panel()Replacepanel.3x
    reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
    resetty();Reset_Terminal_Statecurs_kernel.3x
    ripoffline()Rip_Off_Linescurs_kernel.3x
    savetty()Save_Terminal_Statecurs_kernel.3x
    reset_prog_mode()Reset_Curses_Modecurs_kernel.3x
    resetty();Reset_Terminal_Statecurs_kernel.3x
    ripoffline()Rip_Off_Linescurs_kernel.3x
    savetty()Save_Terminal_Statecurs_kernel.3x
    scale_form()Scaleform_win.3x
    scale_menu()Scalemenu_win.3x
    scrollok()Allow_Scrollingcurs_outopts.3x
    set_field_pad()Set_Pad_Characterform_field_attributes.3x
    set_field_status()Set_Statusform_field_buffer.3x
    set_field_term()Set_Field_Term_Hookform_hook.3x
    set_field_type()Set_Typeform_fieldtype.3x
    set_field_type()Set_Typeform_fieldtype.3x
    set_field_userptrSet_User_Dataform_field_userptr.3x
    set_form_fields()Redefineform_field.3x
    set_form_fields()Set_Fieldsform_field.3x
    slk_restore()Restore_Soft_Label_Keyscurs_slk.3x
    slk_set()Set_Soft_Label_Keycurs_slk.3x
    slk_touch()Touch_Soft_Label_Keyscurs_slk.3x
    start_clolor()Start_Colorcurs_color.3x
    start_clolor()Start_Colorcurs_color.3x
    stdscrStandard_Windowcurs_initscr.3x
    subpad()Sub_Padcurs_pad.3x
    subwin()Sub_Windowcurs_window.3x
    syncok()Set_Synch_Modecurs_window.3x
    termattrs()Supported_Attributescurs_termattrs.3x
    termname()Terminal_Namecurs_termattrs.3x
    termattrs()Supported_Attributescurs_termattrs.3x
    termname()Terminal_Namecurs_termattrs.3x
    top_panel()Toppanel.3x
    top_row()Top_Rowmitem_current.3x
    touchline()Touchcurs_touch.3x
    touchwin()Touchcurs_touch.3x
    unctrl()Un_Controlcurs_util.3x
    unctrl()Un_Controlcurs_util.3x
    ungetch()Undo_Keystrokecurs_getch.3x
    ungetmouse()Unget_Mousecurs_mouse.3x
    untouchwin()Untouchcurs_touch.3x