diff options
Diffstat (limited to 'lib/ncurses')
-rw-r--r-- | lib/ncurses/ncurses/Makefile | 707 | ||||
-rw-r--r-- | lib/ncurses/ncurses/ncurses_cfg.h | 129 | ||||
-rw-r--r-- | lib/ncurses/ncurses/pathnames.h | 38 | ||||
-rw-r--r-- | lib/ncurses/ncurses/termcap.c | 265 |
4 files changed, 941 insertions, 198 deletions
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 30886f5..40f456d 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -1,205 +1,516 @@ -# Makefile for ncurses # $FreeBSD$ -LIB= ncurses -SHLIB_MAJOR= 3 -SHLIB_MINOR= 1 -SRCS= lib_kernel.c lib_pad.c lib_bkgd.c \ - lib_unctrl.c lib_raw.c lib_vidattr.c lib_trace.c lib_beep.c \ - lib_doupdate.c lib_refresh.c lib_initscr.c lib_newwin.c lib_addch.c \ - lib_addstr.c lib_scroll.c lib_clreol.c lib_touch.c lib_mvcur.c \ - lib_keyname.c keys.tries.h \ - lib_delwin.c lib_endwin.c lib_clrbot.c lib_move.c lib_printw.c \ - lib_scanw.c lib_erase.c lib_getch.c lib_options.c lib_acs.c lib_slk.c\ - lib_box.c lib_clear.c lib_delch.c lib_insch.c lib_instr.c \ - lib_getstr.c lib_mvwin.c lib_longname.c lib_tstp.c \ - lib_newterm.c lib_set_term.c lib_overlay.c lib_scrreg.c lib_color.c \ - lib_insstr.c lib_insdel.c lib_twait.c lib_window.c copyright.c - -CFLAGS+= -I. -I${.CURDIR} -Wall -DMYTINFO #-DTRACE -DPADD= ${LIBMYTINFO} -LDADD= -lmytinfo - -CLEANFILES+= lib_keyname.c keys.tries.h - -beforeinstall: - ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/unctrl.h \ - ${DESTDIR}/usr/include - ${INSTALL} -C -m 444 -o $(BINOWN) -g $(BINGRP) ${.CURDIR}/curses.h \ - ${DESTDIR}/usr/include/ncurses.h - -keys.tries.h: ${.CURDIR}/keys.list ${.CURDIR}/MKkeys.awk - awk -f ${.CURDIR}/MKkeys.awk ${.CURDIR}/keys.list > keys.tries.h - -lib_keyname.c: ${.CURDIR}/keys.list ${.CURDIR}/MKkeyname.awk - awk -f ${.CURDIR}/MKkeyname.awk ${.CURDIR}/keys.list > lib_keyname.c - -MAN3 = curs_addch.3 \ - curs_addchst.3 \ - curs_addstr.3 \ - curs_attr.3 \ - curs_beep.3 \ - curs_bkgd.3 \ - curs_border.3 \ - curs_clear.3 \ - curs_color.3 \ - curs_delch.3 \ - curs_delln.3 \ - curs_getch.3 \ - curs_getstr.3 \ - curs_getyx.3 \ - curs_inch.3 \ - curs_inchstr.3 \ - curs_initscr.3 \ - curs_inopts.3 \ - curs_insch.3 \ - curs_insstr.3 \ - curs_instr.3 \ - curs_kernel.3 \ - curs_move.3 \ - curs_outopts.3 \ - curs_overlay.3 \ - curs_pad.3 \ - curs_printw.3 \ - curs_refresh.3 \ - curs_scanw.3 \ - curs_scr_dmp.3 \ - curs_scroll.3 \ - curs_slk.3 \ - curs_termatt.3 \ - curs_termin.3 \ - curs_touch.3 \ - curs_util.3 \ - curs_window.3 \ - ncurses.3 - -MAN5 = term.5 - -MLINKS+=curs_addch.3 addch.3 curs_addch.3 waddch.3 curs_addch.3 echochar.3 \ - curs_addch.3 wechochar.3 curs_addch.3 mvaddch.3 \ - curs_addch.3 mvwaddch.3 -MLINKS+=curs_addchst.3 addchstr.3 curs_addchst.3 addchnstr.3 \ - curs_addchst.3 waddchstr.3 curs_addchst.3 waddchnstr.3 \ - curs_addchst.3 mvaddchstr.3 curs_addchst.3 mvaddchnstr.3 \ - curs_addchst.3 mvwaddchstr.3 curs_addchst.3 mvwaddchnstr.3 -MLINKS+=curs_addstr.3 addstr.3 curs_addstr.3 addnstr.3 \ - curs_addstr.3 waddstr.3 curs_addstr.3 waddnstr.3 \ - curs_addstr.3 mvaddstr.3 curs_addstr.3 mvaddnstr.3 \ - curs_addstr.3 mvwaddstr.3 curs_addstr.3 mvwaddnstr.3 -MLINKS+=curs_attr.3 attroff.3 curs_attr.3 wattroff.3 \ - curs_attr.3 attron.3 curs_attr.3 wattron.3 \ - curs_attr.3 attrset.3 curs_attr.3 wattrset.3 \ - curs_attr.3 standend.3 curs_attr.3 wstandend.3 \ - curs_attr.3 standout.3 curs_attr.3 wstandout.3 +NCURSES=${.CURDIR}/../../contrib/ncurses + +LIB= ncurses +SHLIB_MAJOR=5 +SHLIB_MINOR=0 + +# Should be elsewhere +AWK?= awk +TERMINFODIR?= ${DESTDIR}/usr/share/misc + +NCURSES_MAJOR!=egrep 'NCURSES_MAJOR[ ]*=' ${NCURSES}/dist.mk | sed -e 's/^[^0-9]*//' +NCURSES_MINOR!=egrep 'NCURSES_MINOR[ ]*=' ${NCURSES}/dist.mk | sed -e 's/^[^0-9]*//' +NCURSES_PATCH!=egrep 'NCURSES_PATCH[ ]*=' ${NCURSES}/dist.mk | sed -e 's/^[^0-9]*//' + +# From autoconf (!) +NCURSES_CONST= +NCURSES_XNAMES= 0 +OSPEED_INCLUDES=\#include <termios.h> +OSPEED_TYPE= speed_t +BUILTIN_BOOL= 1 +BOOL_TYPE= 0 +TYPE_OF_BOOL= char +TYPEOF_CHTYPE= long +WIDEC_SHIFT= 8 +SHIFT_LIMIT= 32 +ONEUL= 1UL + +.PATH: ${NCURSES}/ncurses +.PATH: ${NCURSES}/ncurses/base +.PATH: ${NCURSES}/ncurses/tinfo +.PATH: ${NCURSES}/ncurses/tty +.PATH: ${NCURSES}/ncurses/trace +.PATH: ${NCURSES}/include +.PATH: ${NCURSES}/man + +INCS= -I. -I${.CURDIR} -I${NCURSES}/ncurses -I${NCURSES}/include +CFLAGS+=${INCS} -Wall -DFREEBSD_NATIVE -DNDEBUG -DHAVE_CONFIG_H + +GENSRC= \ + codes.c \ + expanded.c \ + fallback.c \ + lib_gen.c \ + lib_keyname.c \ + names.c \ + unctrl.c + +GENHDR= \ + curses.h \ + hashsize.h \ + init_keytry.h \ + nomacros.h \ + parametrized.h \ + term.h \ + termcap.h \ + unctrl.h + +# Installed +HEADERS=curses.h term.h termcap.h unctrl.h + +# Components of names.c and codes.c +NAMESRC=boolnames boolfnames numnames numfnames strnames strfnames +CODESRC=boolcodes numcodes strcodes + +SRCS= ${GENHDR} ${GENSRC} \ + access.c \ + add_tries.c \ + alloc_entry.c \ + alloc_ttype.c \ + captoinfo.c \ + comp_captab.c \ + comp_error.c \ + comp_expand.c \ + comp_hash.c \ + comp_parse.c \ + comp_scan.c \ + define_key.c \ + doalloc.c \ + free_ttype.c \ + getenv_num.c \ + hardscroll.c \ + hashmap.c \ + home_terminfo.c \ + init_keytry.c \ + keybound.c \ + keyok.c \ + lib_acs.c \ + lib_addch.c \ + lib_addstr.c \ + lib_baudrate.c \ + lib_beep.c \ + lib_bkgd.c \ + lib_box.c \ + lib_chgat.c \ + lib_clear.c \ + lib_clearok.c \ + lib_clrbot.c \ + lib_clreol.c \ + lib_color.c \ + lib_colorset.c \ + lib_cur_term.c \ + lib_data.c \ + lib_delch.c \ + lib_delwin.c \ + lib_dft_fgbg.c \ + lib_echo.c \ + lib_endwin.c \ + lib_erase.c \ + lib_flash.c \ + lib_freeall.c \ + lib_getch.c \ + lib_getstr.c \ + lib_has_cap.c \ + lib_hline.c \ + lib_immedok.c \ + lib_inchstr.c \ + lib_initscr.c \ + lib_insch.c \ + lib_insdel.c \ + lib_insstr.c \ + lib_instr.c \ + lib_isendwin.c \ + lib_kernel.c \ + lib_leaveok.c \ + lib_longname.c \ + lib_mouse.c \ + lib_move.c \ + lib_mvcur.c \ + lib_mvwin.c \ + lib_napms.c \ + lib_newterm.c \ + lib_newwin.c \ + lib_nl.c \ + lib_options.c \ + lib_overlay.c \ + lib_pad.c \ + lib_print.c \ + lib_printw.c \ + lib_raw.c \ + lib_redrawln.c \ + lib_refresh.c \ + lib_restart.c \ + lib_scanw.c \ + lib_screen.c \ + lib_scroll.c \ + lib_scrollok.c \ + lib_scrreg.c \ + lib_set_term.c \ + lib_setup.c \ + lib_slk.c \ + lib_slkatr_set.c \ + lib_slkatrof.c \ + lib_slkatron.c \ + lib_slkatrset.c \ + lib_slkattr.c \ + lib_slkclear.c \ + lib_slkcolor.c \ + lib_slkinit.c \ + lib_slklab.c \ + lib_slkrefr.c \ + lib_slkset.c \ + lib_slktouch.c \ + lib_termcap.c \ + lib_termname.c \ + lib_ti.c \ + lib_touch.c \ + lib_tparm.c \ + lib_tputs.c \ + lib_trace.c \ + lib_traceatr.c \ + lib_tracebits.c \ + lib_tracechr.c \ + lib_tracedmp.c \ + lib_tracemse.c \ + lib_tstp.c \ + lib_ttyflags.c \ + lib_twait.c \ + lib_ungetch.c \ + lib_vidattr.c \ + lib_vline.c \ + lib_wattroff.c \ + lib_wattron.c \ + lib_winch.c \ + lib_window.c \ + memmove.c \ + name_match.c \ + nc_panel.c \ + parse_entry.c \ + read_entry.c \ + resizeterm.c \ + safe_sprintf.c \ + setbuf.c \ + sigaction.c \ + trace_buf.c \ + trace_tries.c \ + trace_xnames.c \ + tries.c \ + tty_update.c \ + vsscanf.c \ + wresize.c \ + write_entry.c \ + +# From our old libtermcap. +# Used instead of the hideous read_termcap.c abomination. +SRCS+= termcap.c + +CLEANFILES+= ${GENSRC} ${GENHDR} keys.tries make_hash term.h.new \ + make_keys MKterm.h.awk comp_captab.c \ + namehdr nameftr codeftr ${NAMESRC} ${CODESRC} + +SYMLINKS+=${LIBDIR}/libncurses.a ${LIBDIR}/libcurses.a +SYMLINKS+=${LIBDIR}/libncurses.a ${LIBDIR}/libtermcap.a +SYMLINKS+=${LIBDIR}/libncurses.a ${LIBDIR}/libtermlib.a +SYMLINKS+=${LIBDIR}/libncurses.a ${LIBDIR}/libmytinfo.a +SYMLINKS+=${LIBDIR}/libncurses.a ${LIBDIR}/libtinfo.a +.if !defined(NOPIC) +.if ${OBJFORMAT} == aout +SYMLINKS+=${SHLIBDIR}/libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ${SHLIBDIR}/libcurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +SYMLINKS+=${SHLIBDIR}/libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ${SHLIBDIR}/libtermcap.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +SYMLINKS+=${SHLIBDIR}/libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ${SHLIBDIR}/libtermlib.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +SYMLINKS+=${SHLIBDIR}/libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ${SHLIBDIR}/libmytinfo.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +SYMLINKS+=${SHLIBDIR}/libncurses.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ + ${SHLIBDIR}/libtinfo.so.${SHLIB_MAJOR}.${SHLIB_MINOR} +.else +# no need for major at all, it's an ld-time redirection only +SYMLINKS+=${SHLIBDIR}/libncurses.so ${SHLIBDIR}/libcurses.so +SYMLINKS+=${SHLIBDIR}/libncurses.so ${SHLIBDIR}/libtermcap.so +SYMLINKS+=${SHLIBDIR}/libncurses.so ${SHLIBDIR}/libtermlib.so +SYMLINKS+=${SHLIBDIR}/libncurses.so ${SHLIBDIR}/libmytinfo.so +SYMLINKS+=${SHLIBDIR}/libncurses.so ${SHLIBDIR}/libtinfo.so +.endif +.endif +.if !defined(NOPROFILE) +SYMLINKS+=${LIBDIR}/libncurses_p.a ${LIBDIR}/libcurses_p.a +SYMLINKS+=${LIBDIR}/libncurses_p.a ${LIBDIR}/libtermcap_p.a +SYMLINKS+=${LIBDIR}/libncurses_p.a ${LIBDIR}/libtermlib_p.a +SYMLINKS+=${LIBDIR}/libncurses_p.a ${LIBDIR}/libmytinfo_p.a +SYMLINKS+=${LIBDIR}/libncurses_p.a ${LIBDIR}/libtinfo_p.a +.endif + +beforeinstall: ${HEADERS} + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${HEADERS} \ + ${DESTDIR}/usr/include + rm -f ${DESTDIR}/usr/include/ncurses.h + ln -s curses.h ${DESTDIR}/usr/include/ncurses.h + +# Generated source +namehdr nameftr codeftr ${NAMESRC} ${CODESRC}: MKnames.awk Caps + ${AWK} -f ${NCURSES}/ncurses/tinfo/MKnames.awk ${NCURSES}/include/Caps + +names.c: namehdr ${NAMESRC} nameftr + cat namehdr ${NAMESRC} nameftr > $@ + +codes.c: namehdr ${CODESRC} codeftr + cat namehdr ${CODESRC} codeftr > $@ + +lib_gen.c: MKlib_gen.sh curses.h + sh ${NCURSES}/ncurses/base/MKlib_gen.sh "${CC} -E ${INCS}" \ + "${AWK}" < curses.h >$@ + +lib_keyname.c: keys.list MKkeyname.awk + ${AWK} -f ${NCURSES}/ncurses/base/MKkeyname.awk \ + ${NCURSES}/ncurses/tinfo/keys.list > lib_keyname.c + +unctrl.c: MKunctrl.awk + echo | ${AWK} -f ${NCURSES}/ncurses/base/MKunctrl.awk > unctrl.c + +comp_captab.c: MKcaptab.awk Caps make_hash + sh ${NCURSES}/ncurses/tinfo/MKcaptab.awk "${AWK}" \ + ${NCURSES}/include/Caps > comp_captab.c + +expanded.c: MKexpanded.sh + sh ${NCURSES}/ncurses/tty/MKexpanded.sh "${CC} -E" ${CFLAGS} >expanded.c + +fallback.c: MKfallback.sh + sh ${NCURSES}/ncurses/tinfo/MKfallback.sh > fallback.c + +# Generated headers +nomacros.h: MKlib_gen.sh curses.h + sh ${NCURSES}/ncurses/base/MKlib_gen.sh "${CC} -E ${INCS}" \ + "${AWK}" < curses.h | fgrep undef > $@ + +init_keytry.h: keys.list make_keys + ./make_keys ${NCURSES}/ncurses/tinfo/keys.list > init_keytry.h + +hashsize.h: MKhashsize.sh Caps + sh ${NCURSES}/include/MKhashsize.sh ${NCURSES}/include/Caps > $@ + +parametrized.h: MKparametrized.sh Caps + AWK=${AWK} sh ${NCURSES}/include/MKparametrized.sh \ + ${NCURSES}/include/Caps > $@ + +term.h: MKterm.h.awk edit_cfg.sh Caps + ${AWK} -f MKterm.h.awk ${NCURSES}/include/Caps > $@.new + sh ${NCURSES}/include/edit_cfg.sh ${.CURDIR}/ncurses_cfg.h $@.new + mv -f $@.new $@ + +# Build tools +make_keys: make_keys.c names.c + ${CC} -o $@ ${CFLAGS} ${NCURSES}/ncurses/tinfo/make_keys.c + +make_hash: comp_hash.c + ${CC} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ + ${NCURSES}/ncurses/tinfo/comp_hash.c + +# ./configure generated +MKterm.h.awk: MKterm.h.awk.in + sed <${NCURSES}/include/$@.in >$@ \ + -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ + -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" \ + -e "/@NCURSES_CONST@/s//${NCURSES_CONST}/" \ + -e "/@NCURSES_XNAMES@/s//${NCURSES_XNAMES}/" + +termcap.h: termcap.h.in + sed <${NCURSES}/include/$@.in >$@ \ + -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ + -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" \ + -e "/@NCURSES_CONST@/s//${NCURSES_CONST}/" \ + -e "/@OSPEED_INCLUDES@/s//${OSPEED_INCLUDES}/" \ + -e "/@OSPEED_TYPE@/s//${OSPEED_TYPE}/" + +curses.h: curses.h.in + sed <${NCURSES}/include/$@.in >$@ \ + -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ + -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" \ + -e "/@NCURSES_PATCH@/s//${NCURSES_PATCH}/" \ + -e "/@NCURSES_CONST@/s//${NCURSES_CONST}/" \ + -e "s/@cf_cv_builtin_bool@/${BUILTIN_BOOL}/g" \ + -e "s/@cf_cv_cc_bool_type@/${BOOL_TYPE}/g" \ + -e "s/@cf_cv_type_of_bool@/${TYPE_OF_BOOL}/g" \ + -e "s/@cf_cv_typeof_chtype@/${TYPEOF_CHTYPE}/g" \ + -e "s/@cf_cv_widec_shift@/${WIDEC_SHIFT}/g" \ + -e "s/@cf_cv_shift_limit@/${SHIFT_LIMIT}/g" \ + -e "s/@cf_cv_1UL@/${ONEUL}/g" + +unctrl.h: unctrl.h.in + sed <${NCURSES}/include/$@.in >$@ \ + -e "/@NCURSES_MAJOR@/s//${NCURSES_MAJOR}/" \ + -e "/@NCURSES_MINOR@/s//${NCURSES_MINOR}/" + +# MAN page gunk +terminfo.5: MKterminfo.sh terminfo.head Caps + sh ${NCURSES}/man/MKterminfo.sh ${NCURSES}/man/terminfo.head \ + ${NCURSES}/include/Caps ${NCURSES}/man/terminfo.tail >$@ + +CLEANFILES+= terminfo.5 +MANFILTER= sed -e 's\#@DATADIR@\#${TERMINFODIR}/terminfo\#g' + +MAN3x= curs_addch.3x curs_addchstr.3x curs_addstr.3x curs_attr.3x \ + curs_beep.3x curs_bkgd.3x curs_border.3x curs_clear.3x curs_color.3x \ + curs_delch.3x curs_deleteln.3x curs_getch.3x curs_getstr.3x \ + curs_getyx.3x curs_inch.3x curs_inchstr.3x curs_initscr.3x \ + curs_inopts.3x curs_insch.3x curs_insstr.3x curs_instr.3x \ + curs_kernel.3x curs_mouse.3x curs_move.3x curs_outopts.3x \ + curs_overlay.3x curs_pad.3x curs_print.3x curs_printw.3x \ + curs_refresh.3x curs_scanw.3x curs_scr_dump.3x curs_scroll.3x \ + curs_slk.3x curs_termattrs.3x curs_termcap.3x curs_terminfo.3x \ + curs_touch.3x curs_util.3x curs_window.3x define_key.3x \ + dft_fgbg.3x keybound.3x keyok.3x ncurses.3x resizeterm.3x wresize.3x +MAN5= term.5 terminfo.5 +MAN7= term.7 + +# Generate the MAN3 list from MAN3x +.for page in ${MAN3x} +CLEANFILES+=${page:T:S/3x$/3/g} +MAN3+=${page:T:S/3x$/3/g} +all-man: ${page:T:S/3x$/3/g} +${page:T:S/3x$/3/g}: ${page} + ln -s ${.ALLSRC} ${.TARGET} +.endfor + +MLINKS+=curs_addch.3 addch.3 curs_addch.3 echochar.3 curs_addch.3 mvaddch.3 \ + curs_addch.3 mvwaddch.3 curs_addch.3 waddch.3 curs_addch.3 wechochar.3 +MLINKS+=curs_addchstr.3 addchnstr.3 curs_addchstr.3 addchstr.3 \ + curs_addchstr.3 mvaddchnstr.3 curs_addchstr.3 mvaddchstr.3 \ + curs_addchstr.3 mvwaddchnstr.3 curs_addchstr.3 mvwaddchstr.3 \ + curs_addchstr.3 waddchnstr.3 curs_addchstr.3 waddchstr.3 +MLINKS+=curs_addstr.3 addnstr.3 curs_addstr.3 addstr.3 \ + curs_addstr.3 mvaddnstr.3 curs_addstr.3 mvaddstr.3 \ + curs_addstr.3 mvwaddnstr.3 curs_addstr.3 mvwaddstr.3 \ + curs_addstr.3 waddnstr.3 curs_addstr.3 waddstr.3 +MLINKS+=curs_attr.3 attr_get.3 curs_attr.3 attr_off.3 curs_attr.3 attr_on.3 \ + curs_attr.3 attr_set.3 curs_attr.3 attroff.3 curs_attr.3 attron.3 \ + curs_attr.3 attrset.3 curs_attr.3 chgat.3 curs_attr.3 color_set.3 \ + curs_attr.3 mvchgat.3 curs_attr.3 mvwchgat.3 curs_attr.3 standend.3 \ + curs_attr.3 standout.3 curs_attr.3 wattr_get.3 curs_attr.3 wattr_off.3 \ + curs_attr.3 wattr_on.3 curs_attr.3 wattr_set.3 curs_attr.3 wattroff.3 \ + curs_attr.3 wattron.3 curs_attr.3 wattrset.3 curs_attr.3 wchgat.3 \ + curs_attr.3 wcolor_set.3 curs_attr.3 wstandend.3 \ + curs_attr.3 wstandout.3 MLINKS+=curs_beep.3 beep.3 curs_beep.3 flash.3 -MLINKS+=curs_bkgd.3 bkgdset.3 curs_bkgd.3 wbkgdset.3 \ - curs_bkgd.3 bkgd.3 curs_bkgd.3 wbkgd.3 -MLINKS+=curs_border.3 border.3 curs_border.3 wborder.3 curs_border.3 box.3 \ - curs_border.3 hline.3 curs_border.3 whline.3 \ - curs_border.3 vline.3 curs_border.3 wvline.3 -MLINKS+=curs_clear.3 erase.3 curs_clear.3 werase.3 curs_clear.3 clear.3 \ - curs_clear.3 wclear.3 curs_clear.3 clrtobot.3 \ - curs_clear.3 wclrtobot.3 curs_clear.3 clrtoeol.3 \ - curs_clear.3 wclrtoeol.3 -MLINKS+=curs_color.3 start_color.3 curs_color.3 init_pair.3 \ - curs_color.3 init_color.3 curs_color.3 has_colors.3 \ - curs_color.3 can_change_color.3 curs_color.3 color_content.3 \ - curs_color.3 pair_content.3 -MLINKS+=curs_delch.3 delch.3 curs_delch.3 wdelch.3 curs_delch.3 mvdelch.3 \ - curs_delch.3 mvwdelch.3 -MLINKS+=curs_delln.3 deleteln.3 curs_delln.3 wdeleteln.3 \ - curs_delln.3 insdelln.3 curs_delln.3 winsdelln.3 \ - curs_delln.3 insertln.3 curs_delln.3 winsertln.3 -MLINKS+=curs_getch.3 getch.3 curs_getch.3 wgetch.3 curs_getch.3 mvgetch.3 \ - curs_getch.3 mvwgetch.3 curs_getch.3 ungetch.3 -MLINKS+=curs_getstr.3 getstr.3 curs_getstr.3 wgetstr.3 \ - curs_getstr.3 mvgetstr.3 curs_getstr.3 mvwgetstr.3 \ - curs_getstr.3 wgetnstr.3 -MLINKS+=curs_getyx.3 getyx.3 curs_getyx.3 pgetparyx.3 curs_getyx.3 getbegyx.3 \ - curs_getyx.3 getmaxyx.3 -MLINKS+=curs_inch.3 inch.3 curs_inch.3 winch.3 curs_inch.3 mvinch.3 \ - curs_inch.3 mvwinch.3 -MLINKS+=curs_inchstr.3 inchstr.3 curs_inchstr.3 inchnstr.3 \ - curs_inchstr.3 winchstr.3 curs_inchstr.3 winchnstr.3 \ - curs_inchstr.3 mvinchstr.3 curs_inchstr.3 mvinchnstr.3 \ - curs_inchstr.3 mvwinchstr.3 curs_inchstr.3 mvwinchnstr.3 -MLINKS+=curs_initscr.3 initscr.3 curs_initscr.3 newterm.3 \ - curs_initscr.3 endwin.3 curs_initscr.3 isendwin.3 \ - curs_initscr.3 set_term.3 curs_initscr.3 delscreen.3 -MLINKS+=curs_inopts.3 cbreak.3 curs_inopts.3 nocbreak.3 curs_inopts.3 echo.3 \ - curs_inopts.3 noecho.3 curs_inopts.3 halfdelay.3 \ +MLINKS+=curs_bkgd.3 bkgd.3 curs_bkgd.3 bkgdset.3 curs_bkgd.3 getbkgd.3 \ + curs_bkgd.3 wbkgd.3 curs_bkgd.3 wbkgdset.3 +MLINKS+=curs_border.3 border.3 curs_border.3 box.3 curs_border.3 hline.3 \ + curs_border.3 mvhline.3 curs_border.3 mvwhline.3 \ + curs_border.3 mvwvline.3 curs_border.3 vline.3 curs_border.3 wborder.3 \ + curs_border.3 whline.3 curs_border.3 wvline.3 +MLINKS+=curs_clear.3 clear.3 curs_clear.3 clrtobot.3 curs_clear.3 clrtoeol.3 \ + curs_clear.3 erase.3 curs_clear.3 wclear.3 curs_clear.3 wclrtobot.3 \ + curs_clear.3 wclrtoeol.3 curs_clear.3 werase.3 +MLINKS+=curs_color.3 can_change_color.3 curs_color.3 color_content.3 \ + curs_color.3 has_colors.3 curs_color.3 init_color.3 \ + curs_color.3 init_pair.3 curs_color.3 pair_content.3 \ + curs_color.3 start_color.3 +MLINKS+=curs_delch.3 delch.3 curs_delch.3 mvdelch.3 curs_delch.3 mvwdelch.3 \ + curs_delch.3 wdelch.3 +MLINKS+=curs_deleteln.3 deleteln.3 curs_deleteln.3 insdelln.3 \ + curs_deleteln.3 insertln.3 curs_deleteln.3 wdeleteln.3 \ + curs_deleteln.3 winsdelln.3 curs_deleteln.3 winsertln.3 +MLINKS+=curs_getch.3 getch.3 curs_getch.3 has_key.3 curs_getch.3 mvgetch.3 \ + curs_getch.3 mvwgetch.3 curs_getch.3 ungetch.3 curs_getch.3 wgetch.3 +MLINKS+=curs_getstr.3 getnstr.3 curs_getstr.3 getstr.3 \ + curs_getstr.3 mvgetnstr.3 curs_getstr.3 mvgetstr.3 \ + curs_getstr.3 mvwgetnstr.3 curs_getstr.3 mvwgetstr.3 \ + curs_getstr.3 wgetnstr.3 curs_getstr.3 wgetstr.3 +MLINKS+=curs_getyx.3 getbegyx.3 curs_getyx.3 getmaxyx.3 \ + curs_getyx.3 getparyx.3 curs_getyx.3 getyx.3 +MLINKS+=curs_inch.3 inch.3 curs_inch.3 mvinch.3 curs_inch.3 mvwinch.3 \ + curs_inch.3 winch.3 +MLINKS+=curs_inchstr.3 inchnstr.3 curs_inchstr.3 inchstr.3 \ + curs_inchstr.3 mvinchnstr.3 curs_inchstr.3 mvinchstr.3 \ + curs_inchstr.3 mvwinchnstr.3 curs_inchstr.3 mvwinchstr.3 \ + curs_inchstr.3 winchnstr.3 curs_inchstr.3 winchstr.3 +MLINKS+=curs_initscr.3 delscreen.3 curs_initscr.3 endwin.3 \ + curs_initscr.3 initscr.3 curs_initscr.3 isendwin.3 \ + curs_initscr.3 newterm.3 curs_initscr.3 set_term.3 +MLINKS+=curs_inopts.3 cbreak.3 curs_inopts.3 echo.3 curs_inopts.3 halfdelay.3 \ curs_inopts.3 intrflush.3 curs_inopts.3 keypad.3 curs_inopts.3 meta.3 \ - curs_inopts.3 nodelay.3 curs_inopts.3 notimeout.3 curs_inopts.3 raw.3 \ - curs_inopts.3 noraw.3 curs_inopts.3 noqiflush.3 \ - curs_inopts.3 qiflush.3 curs_inopts.3 timeout.3 \ - curs_inopts.3 wtimeout.3 curs_inopts.3 typeahead.3 -MLINKS+=curs_insch.3 insch.3 curs_insch.3 winsch.3 curs_insch.3 mvinsch.3 \ - curs_insch.3 mvwinsch.3 -MLINKS+=curs_insstr.3 insstr.3 curs_insstr.3 insnstr.3 \ - curs_insstr.3 winsstr.3 curs_insstr.3 winsnstr.3 \ - curs_insstr.3 mvinsstr.3 curs_insstr.3 mvinsnstr.3 \ - curs_insstr.3 mvwinsstr.3 curs_insstr.3 mvwinsnstr.3 -MLINKS+=curs_instr.3 instr.3 curs_instr.3 innstr.3 curs_instr.3 winstr.3 \ - curs_instr.3 winnstr.3 curs_instr.3 mvinstr.3 curs_instr.3 mvinnstr.3 \ - curs_instr.3 mvwinstr.3 curs_instr.3 mvwinnstr.3 -MLINKS+=curs_kernel.3 def_prog_mode.3 curs_kernel.3 def_shell_mode.3 \ - curs_kernel.3 reset_prog_mode.3 curs_kernel.3 reset_shell_mode.3 \ - curs_kernel.3 resetty.3 curs_kernel.3 savetty.3 \ - curs_kernel.3 getsyx.3 curs_kernel.3 setsyx.3 \ - curs_kernel.3 ripoffline.3 curs_kernel.3 curs_set.3 \ - curs_kernel.3 napms.3 + curs_inopts.3 nocbreak.3 curs_inopts.3 nodelay.3 \ + curs_inopts.3 noecho.3 curs_inopts.3 noqiflush.3 curs_inopts.3 noraw.3 \ + curs_inopts.3 notimeout.3 curs_inopts.3 qiflush.3 curs_inopts.3 raw.3 \ + curs_inopts.3 timeout.3 curs_inopts.3 typeahead.3 \ + curs_inopts.3 wtimeout.3 +MLINKS+=curs_insch.3 insch.3 curs_insch.3 mvinsch.3 curs_insch.3 mvwinsch.3 \ + curs_insch.3 winsch.3 +MLINKS+=curs_insstr.3 insnstr.3 curs_insstr.3 insstr.3 \ + curs_insstr.3 mvinsnstr.3 curs_insstr.3 mvinsstr.3 \ + curs_insstr.3 mvwinsnstr.3 curs_insstr.3 mvwinsstr.3 \ + curs_insstr.3 winsnstr.3 curs_insstr.3 winsstr.3 +MLINKS+=curs_instr.3 innstr.3 curs_instr.3 instr.3 curs_instr.3 mvinnstr.3 \ + curs_instr.3 mvinstr.3 curs_instr.3 mvwinnstr.3 \ + curs_instr.3 mvwinstr.3 curs_instr.3 winnstr.3 curs_instr.3 winstr.3 +MLINKS+=curs_kernel.3 curs_set.3 curs_kernel.3 def_prog_mode.3 \ + curs_kernel.3 def_shell_mode.3 curs_kernel.3 getsyx.3 \ + curs_kernel.3 napms.3 curs_kernel.3 reset_prog_mode.3 \ + curs_kernel.3 reset_shell_mode.3 curs_kernel.3 resetty.3 \ + curs_kernel.3 ripoffline.3 curs_kernel.3 savetty.3 \ + curs_kernel.3 setsyx.3 +MLINKS+=curs_mouse.3 getmouse.3 curs_mouse.3 mouseinterval.3 \ + curs_mouse.3 mousemask.3 curs_mouse.3 ungetmouse.3 \ + curs_mouse.3 wenclose.3 curs_mouse.3 wmouse_trafo.3 MLINKS+=curs_move.3 move.3 curs_move.3 wmove.3 -MLINKS+=curs_outopts.3 clearok.3 curs_outopts.3 idlok.3 \ - curs_outopts.3 idcok.3 curs_outopts.3 immedok.3 \ - curs_outopts.3 leaveok.3 curs_outopts.3 setscrreg.3 \ - curs_outopts.3 wsetscrreg.3 curs_outopts.3 scrollok.3 \ - curs_outopts.3 nl.3 curs_outopts.3 nonl.3 -MLINKS+=curs_overlay.3 overlay.3 curs_overlay.3 overwrite.3 \ - curs_overlay.3 copywin.3 -MLINKS+=curs_pad.3 newpad.3 curs_pad.3 subpad.3 curs_pad.3 prefresh.3 \ - curs_pad.3 pnoutrefresh.3 curs_pad.3 pechochar.3 -MLINKS+=curs_printw.3 printw.3 curs_printw.3 wprintw.3 \ - curs_printw.3 mvprintw.3 curs_printw.3 mvwprintw.3 \ - curs_printw.3 vwprintw.3 -MLINKS+=curs_refresh.3 refresh.3 curs_refresh.3 wrefresh.3 \ - curs_refresh.3 wnoutrefresh.3 curs_refresh.3 doupdate.3 \ - curs_refresh.3 redrawwin.3 curs_refresh.3 wredrawln.3 -MLINKS+=curs_scanw.3 scanw.3 curs_scanw.3 wscanw.3 curs_scanw.3 mvscanw.3 \ - curs_scanw.3 mvwscanw.3 curs_scanw.3 vwscanw.3 -MLINKS+=curs_scr_dmp.3 scr_dump.3 curs_scr_dmp.3 scr_restore.3 \ - curs_scr_dmp.3 scr_init.3 curs_scr_dmp.3 scr_set.3 -MLINKS+=curs_scroll.3 scroll.3 curs_scroll.3 scrl.3 curs_scroll.3 wscrl.3 -MLINKS+=curs_slk.3 slk_init.3 curs_slk.3 slk_set.3 curs_slk.3 slk_refresh.3 \ - curs_slk.3 slk_noutrefresh.3 curs_slk.3 slk_label.3 \ - curs_slk.3 slk_clear.3 curs_slk.3 slk_restore.3 \ - curs_slk.3 slk_touch.3 curs_slk.3 slk_attron.3 \ - curs_slk.3 slk_attrset.3 curs_slk.3 slk_attroff.3 -MLINKS+=curs_termatt.3 baudrate.3 curs_termatt.3 erasechar.3 \ - curs_termatt.3 has_ic.3 curs_termatt.3 has_il.3 \ - curs_termatt.3 killchar.3 curs_termatt.3 longname.3 \ - curs_termatt.3 termattrs.3 curs_termatt.3 termname.3 - -# XXX name clash with termcap(3) -# MLINKS+= curs_termin.3 tparm.3 -MLINKS+=curs_termin.3 setupterm.3 curs_termin.3 setterm.3 \ - curs_termin.3 set_curterm.3 curs_termin.3 del_curterm.3 \ - curs_termin.3 restartterm.3 \ - curs_termin.3 putp.3 curs_termin.3 vidputs.3 \ - curs_termin.3 vidattr.3 curs_termin.3 mvcur.3 \ - curs_termin.3 tigetflag.3 curs_termin.3 tigetnum.3 \ - curs_termin.3 tigetstr.3 -MLINKS+=curs_touch.3 touchwin.3 curs_touch.3 touchline.3 \ - curs_touch.3 untouchwin.3 curs_touch.3 wtouchln.3 \ - curs_touch.3 is_linetouched.3 curs_touch.3 is_wintouched.3 -MLINKS+=curs_util.3 unctrl.3 curs_util.3 keyname.3 \ - curs_util.3 filter.3 curs_util.3 use_env.3 \ - curs_util.3 putwin.3 curs_util.3 getwin.3 \ - curs_util.3 delay_output.3 curs_util.3 flushinp.3 -MLINKS+=curs_window.3 newwin.3 curs_window.3 delwin.3 \ - curs_window.3 mvwin.3 curs_window.3 subwin.3 \ - curs_window.3 derwin.3 curs_window.3 mvderwin.3 \ - curs_window.3 dupwin.3 curs_window.3 wsyncup.3 \ - curs_window.3 syncok.3 curs_window.3 wcursyncup.3 \ - curs_window.3 wsyncdown.3 +MLINKS+=curs_outopts.3 clearok.3 curs_outopts.3 idcok.3 curs_outopts.3 idlok.3 \ + curs_outopts.3 immedok.3 curs_outopts.3 leaveok.3 curs_outopts.3 nl.3 \ + curs_outopts.3 nonl.3 curs_outopts.3 scrollok.3 \ + curs_outopts.3 setscrreg.3 curs_outopts.3 wsetscrreg.3 +MLINKS+=curs_overlay.3 copywin.3 curs_overlay.3 overlay.3 \ + curs_overlay.3 overwrite.3 +MLINKS+=curs_pad.3 newpad.3 curs_pad.3 pechochar.3 curs_pad.3 pnoutrefresh.3 \ + curs_pad.3 prefresh.3 curs_pad.3 subpad.3 +MLINKS+=curs_print.3 mcprint.3 +MLINKS+=curs_printw.3 mvprintw.3 curs_printw.3 mvwprintw.3 \ + curs_printw.3 printw.3 curs_printw.3 vw_printw.3 \ + curs_printw.3 vwprintw.3 curs_printw.3 wprintw.3 +MLINKS+=curs_refresh.3 doupdate.3 curs_refresh.3 redrawwin.3 \ + curs_refresh.3 refresh.3 curs_refresh.3 wnoutrefresh.3 \ + curs_refresh.3 wredrawln.3 curs_refresh.3 wrefresh.3 +MLINKS+=curs_scanw.3 mvscanw.3 curs_scanw.3 mvwscanw.3 curs_scanw.3 scanw.3 \ + curs_scanw.3 vw_scanw.3 curs_scanw.3 vwscanw.3 curs_scanw.3 wscanw.3 +MLINKS+=curs_scr_dump.3 scr_dump.3 curs_scr_dump.3 scr_init.3 \ + curs_scr_dump.3 scr_restore.3 curs_scr_dump.3 scr_set.3 +MLINKS+=curs_scroll.3 scrl.3 curs_scroll.3 scroll.3 curs_scroll.3 wscrl.3 +MLINKS+=curs_slk.3 slk_attr.3 curs_slk.3 slk_attr_off.3 \ + curs_slk.3 slk_attr_on.3 curs_slk.3 slk_attr_set.3 \ + curs_slk.3 slk_attroff.3 curs_slk.3 slk_attron.3 \ + curs_slk.3 slk_attrset.3 curs_slk.3 slk_clear.3 \ + curs_slk.3 slk_color.3 curs_slk.3 slk_init.3 curs_slk.3 slk_label.3 \ + curs_slk.3 slk_noutrefresh.3 curs_slk.3 slk_refresh.3 \ + curs_slk.3 slk_restore.3 curs_slk.3 slk_set.3 curs_slk.3 slk_touch.3 +MLINKS+=curs_termattrs.3 baudrate.3 curs_termattrs.3 erasechar.3 \ + curs_termattrs.3 has_ic.3 curs_termattrs.3 has_il.3 \ + curs_termattrs.3 killchar.3 curs_termattrs.3 longname.3 \ + curs_termattrs.3 termattrs.3 curs_termattrs.3 termname.3 +MLINKS+=curs_termcap.3 tgetent.3 curs_termcap.3 tgetflag.3 \ + curs_termcap.3 tgetnum.3 curs_termcap.3 tgetstr.3 \ + curs_termcap.3 tgoto.3 curs_termcap.3 tputs.3 +MLINKS+=curs_terminfo.3 del_curterm.3 curs_terminfo.3 mvcur.3 \ + curs_terminfo.3 putp.3 curs_terminfo.3 restartterm.3 \ + curs_terminfo.3 set_curterm.3 curs_terminfo.3 setterm.3 \ + curs_terminfo.3 setupterm.3 curs_terminfo.3 tigetflag.3 \ + curs_terminfo.3 tigetnum.3 curs_terminfo.3 tigetstr.3 \ + curs_terminfo.3 tparm.3 curs_terminfo.3 tputs.3 \ + curs_terminfo.3 vidattr.3 curs_terminfo.3 vidputs.3 +MLINKS+=curs_touch.3 is_linetouched.3 curs_touch.3 is_wintouched.3 \ + curs_touch.3 touchline.3 curs_touch.3 touchwin.3 \ + curs_touch.3 untouchwin.3 curs_touch.3 wtouchln.3 +MLINKS+=curs_util.3 delay_output.3 curs_util.3 filter.3 \ + curs_util.3 flushinp.3 curs_util.3 getwin.3 \ + curs_util.3 keyname.3 curs_util.3 putwin.3 \ + curs_util.3 unctrl.3 curs_util.3 use_env.3 +MLINKS+=curs_window.3 delwin.3 curs_window.3 derwin.3 curs_window.3 dupwin.3 \ + curs_window.3 mvderwin.3 curs_window.3 mvwin.3 curs_window.3 newwin.3 \ + curs_window.3 subwin.3 curs_window.3 syncok.3 \ + curs_window.3 wcursyncup.3 curs_window.3 wsyncdown.3 \ + curs_window.3 wsyncup.3 +MLINKS+=dft_fgbg.3 use_default_colors.3 .include <bsd.lib.mk> + +.SUFFIXES: .3x .3 diff --git a/lib/ncurses/ncurses/ncurses_cfg.h b/lib/ncurses/ncurses/ncurses_cfg.h new file mode 100644 index 0000000..a14d5ba --- /dev/null +++ b/lib/ncurses/ncurses/ncurses_cfg.h @@ -0,0 +1,129 @@ +/* include/ncurses_cfg.h. Generated automatically by configure. */ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * Permission is hereby granted, free of charge, to any person obtaining a * + * copy of this software and associated documentation files (the * + * "Software"), to deal in the Software without restriction, including * + * without limitation the rights to use, copy, modify, merge, publish, * + * distribute, distribute with modifications, sublicense, and/or sell * + * copies of the Software, and to permit persons to whom the Software is * + * furnished to do so, subject to the following conditions: * + * * + * The above copyright notice and this permission notice shall be included * + * in all copies or substantial portions of the Software. * + * * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey <dickey@clark.net> 1997 * + ****************************************************************************/ +/* + * Id: ncurses_cfg.hin,v 1.2 1998/02/11 12:13:46 tom Exp + * + * This is a template-file used to generate the "ncurses_cfg.h" file. + * + * Rather than list every definition, the configuration script substitutes + * the definitions that it finds using 'sed'. You need a patch (971222) + * to autoconf 2.12 to do this. + */ +#ifndef NC_CONFIG_H +#define NC_CONFIG_H + +#define BSD_TPUTS 1 +#define CC_HAS_INLINE_FUNCS 1 +#define CC_HAS_PROTOS 1 +#define ETIP_NEEDS_ 1 +#define GCC_NORETURN __dead2 +#define GCC_PRINTF 1 +#define GCC_SCANF 1 +#define GCC_UNUSED __unused +#define HAVE_BIG_CORE 1 +#define HAVE_BSD_CGETENT 1 +#define HAVE_DIRENT_H 1 +#define HAVE_ERRNO 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FORM_H 1 +#define HAVE_GETCWD 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_GETTTYNAM 1 +#define HAVE_ISASCII 1 +#define HAVE_LIBFORM 1 +#define HAVE_LIBMENU 1 +#define HAVE_LIBPANEL 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LINK 1 +#define HAVE_LOCALE_H 1 +#define HAVE_LONG_FILE_NAMES 1 +#define HAVE_MEMCCPY 1 +#define HAVE_MENU_H 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_NC_ALLOC_H 1 +#define HAVE_PANEL_H 1 +#define HAVE_POLL 1 +#define HAVE_POLL_H 1 +#define HAVE_REGEX_H_FUNCS 1 +#define HAVE_REMOVE 1 +#define HAVE_SELECT 1 +#define HAVE_SETBUF 1 +#define HAVE_SETBUFFER 1 +#define HAVE_SETVBUF 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGVEC 1 +#define HAVE_SIZECHANGE 1 +#define HAVE_STRDUP 1 +#define HAVE_STRSTR 1 +#define HAVE_SYMLINK 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_TIMES_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TIME_SELECT 1 +#define HAVE_TCGETATTR 1 +#define HAVE_TCGETPGRP 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_TIMES 1 +#define HAVE_TTYENT_H 1 +#define HAVE_TYPEINFO 1 +#define HAVE_UNISTD_H 1 +#define HAVE_USLEEP 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_VSSCANF 1 +#define NCURSES_EXT_FUNCS 1 +#define NCURSES_NO_PADDING 1 +#define NDEBUG 1 +#define RETSIGTYPE void +#define STDC_HEADERS 1 +#define SYSTEM_NAME "FreeBSD" +#define TERMINFO_DIRS "/usr/share/misc/terminfo" +#define TYPEOF_CHTYPE long +#define USE_DATABASE 1 +#define USE_GETCAP 1 +#define USE_HASHMAP 1 +#define USE_SIGWINCH 1 + + /* The C compiler may not treat these properly but C++ has to */ +#ifdef __cplusplus +#undef const +#undef inline +#else +#if defined(lint) || defined(TRACE) +#undef inline +#define inline /* nothing */ +#endif +#endif + +#endif /* NC_CONFIG_H */ diff --git a/lib/ncurses/ncurses/pathnames.h b/lib/ncurses/ncurses/pathnames.h new file mode 100644 index 0000000..5cac36f --- /dev/null +++ b/lib/ncurses/ncurses/pathnames.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)pathnames.h 8.1 (Berkeley) 6/4/93 + * $FreeBSD$ + */ + +#define _PATH_DEF ".termcap /usr/share/misc/termcap" +#define _PATH_DEF_SEC "/usr/share/misc/termcap" diff --git a/lib/ncurses/ncurses/termcap.c b/lib/ncurses/ncurses/termcap.c new file mode 100644 index 0000000..e2bde8b --- /dev/null +++ b/lib/ncurses/ncurses/termcap.c @@ -0,0 +1,265 @@ +/* A portion of this file is from ncurses: */ +/*************************************************************************** +* COPYRIGHT NOTICE * +**************************************************************************** +* ncurses is copyright (C) 1992-1995 * +* Zeyd M. Ben-Halim * +* zmbenhal@netcom.com * +* Eric S. Raymond * +* esr@snark.thyrsus.com * +* * +* Permission is hereby granted to reproduce and distribute ncurses * +* 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 in any * +* applications linked with it is highly appreciated. * +* * +* ncurses comes AS IS with no warranty, implied or expressed. * +* * +***************************************************************************/ + +#include <curses.priv.h> + +#include <string.h> +#include <term.h> +#include <tic.h> +#include <term_entry.h> + +/* The rest is from BSD */ +/* + * Copyright (c) 1980, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef lint +static const char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93"; +#endif /* not lint */ + +#include <stdio.h> +#include <ctype.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <sys/param.h> +#include "pathnames.h" + +#define PBUFSIZ MAXPATHLEN /* max length of filename path */ +#define PVECSIZ 32 /* max number of names in path */ +#define TBUFSIZ 1024 /* max length of _nc_tgetent buffer */ + +char _nc_termcap[TBUFSIZ + 1]; /* Last getcap, provided to tgetent() emul */ + +/* + * termcap - routines for dealing with the terminal capability data base + * + * BUG: Should use a "last" pointer in tbuf, so that searching + * for capabilities alphabetically would not be a n**2/2 + * process when large numbers of capabilities are given. + * Note: If we add a last pointer now we will screw up the + * tc capability. We really should compile termcap. + * + * Essentially all the work here is scanning and decoding escapes + * in string capabilities. We don't use stdio because the editor + * doesn't, and because living w/o it is not hard. + */ + +/* + * Get an entry for terminal name in buffer _nc_termcap from the termcap + * file. + */ +int +_nc_read_termcap_entry(const char *const name, TERMTYPE *const tp) +{ + ENTRY *ep; + register char *p; + register char *cp; + char *dummy; + char **fname; + char *home; + int i; + char pathbuf[PBUFSIZ]; /* holds raw path of filenames */ + char *pathvec[PVECSIZ]; /* to point to names in pathbuf */ + char **pvec; /* holds usable tail of path vector */ + char *termpath; + + _nc_termcap[0] = '\0'; /* in case */ + dummy = NULL; + fname = pathvec; + pvec = pathvec; + p = pathbuf; + cp = getenv("TERMCAP"); + /* + * TERMCAP can have one of two things in it. It can be the + * name of a file to use instead of /etc/termcap. In this + * case it better start with a "/". Or it can be an entry to + * use so we don't have to read the file. In this case it + * has to already have the newlines crunched out. If TERMCAP + * does not hold a file name then a path of names is searched + * instead. The path is found in the TERMPATH variable, or + * becomes "$HOME/.termcap /etc/termcap" if no TERMPATH exists. + */ + if (!cp || *cp != '/') { /* no TERMCAP or it holds an entry */ + if ( (termpath = getenv("TERMPATH")) ) + strncpy(pathbuf, termpath, PBUFSIZ); + else { + if ( (home = getenv("HOME")) ) {/* set up default */ + strncpy(pathbuf, home, PBUFSIZ - 1); /* $HOME first */ + pathbuf[PBUFSIZ - 2] = '\0'; /* -2 because we add a slash */ + p += strlen(pathbuf); /* path, looking in */ + *p++ = '/'; + } /* if no $HOME look in current directory */ + strncpy(p, _PATH_DEF, PBUFSIZ - (p - pathbuf)); + } + } + else /* user-defined name in TERMCAP */ + strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ + + /* For safety */ + if (issetugid()) + strcpy(pathbuf, _PATH_DEF_SEC); + + pathbuf[PBUFSIZ - 1] = '\0'; + + *fname++ = pathbuf; /* tokenize path into vector of names */ + while (*++p) + if (*p == ' ' || *p == ':') { + *p = '\0'; + while (*++p) + if (*p != ' ' && *p != ':') + break; + if (*p == '\0') + break; + *fname++ = p; + if (fname >= pathvec + PVECSIZ) { + fname--; + break; + } + } + *fname = (char *) 0; /* mark end of vector */ + if (cp && *cp && *cp != '/') + if (cgetset(cp) < 0) + return(-2); + + i = cgetent(&dummy, pathvec, (char *)name); + + if (i == 0) { + char *pd, *ps, *tok, *s, *tcs; + size_t len; + + pd = _nc_termcap; + ps = dummy; + if ((tok = strchr(ps, ':')) == NULL) { + len = strlen(ps); + if (len >= TBUFSIZ) + i = -1; + else + strcpy(pd, ps); + goto done; + } + len = tok - ps + 1; + if (pd + len + 1 - _nc_termcap >= TBUFSIZ) { + i = -1; + goto done; + } + memcpy(pd, ps, len); + ps += len; + pd += len; + *pd = '\0'; + tcs = pd - 1; + for (;;) { + while ((tok = strsep(&ps, ":")) != NULL && + (*tok == '\0' || *tok == '\\' || !isgraph(*tok))) + ; + if (tok == NULL) + break; + for (s = tcs; s != NULL && s[1] != '\0'; + s = strchr(s, ':')) { + s++; + if (s[0] == tok[0] && s[1] == tok[1]) + goto skip_it; + } + len = strlen(tok); + if (pd + len + 1 - _nc_termcap >= TBUFSIZ) { + i = -1; + break; + } + memcpy(pd, tok, len); + pd += len; + *pd++ = ':'; + *pd = '\0'; + skip_it: ; + } + } +done: + if (dummy) + free(dummy); + + +/* + * From here on is ncurses-specific glue code + */ + + if (i < 0) + return(ERR); + + _nc_set_source("TERMCAP"); + _nc_read_entry_source((FILE *)NULL, _nc_termcap, FALSE, FALSE,NULLHOOK); + + if (_nc_head == (ENTRY *)NULL) + return(ERR); + + /* resolve all use references */ + _nc_resolve_uses(); + + for_entry_list(ep) + if (_nc_name_match(ep->tterm.term_names, name, "|:")) + { + /* + * Make a local copy of the terminal capabilities. free + * all entry storage except the string table for the + * loaded type (which we disconnected from the list by + * NULLing out ep->tterm.str_table above). + */ + memcpy(tp, &ep->tterm, sizeof(TERMTYPE)); + ep->tterm.str_table = (char *)NULL; + _nc_free_entries(_nc_head); + _nc_head = _nc_tail = NULL; /* do not reuse! */ + + return 1; /* OK */ + } + + _nc_free_entries(_nc_head); + _nc_head = _nc_tail = NULL; /* do not reuse! */ + return(0); /* not found */ +} |