diff --git a/packages/devel/ncurses/meta b/packages/devel/ncurses/meta index a563bfb2a8..e87a89bda5 100644 --- a/packages/devel/ncurses/meta +++ b/packages/devel/ncurses/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="ncurses" -PKG_VERSION="5.8" +PKG_VERSION="5.9" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="MIT" diff --git a/packages/devel/ncurses/patches/ncurses-5.8-00_ncurses_upstream_fixes-20110402.patch b/packages/devel/ncurses/patches/ncurses-5.8-00_ncurses_upstream_fixes-20110402.patch deleted file mode 100644 index f541d7cee2..0000000000 --- a/packages/devel/ncurses/patches/ncurses-5.8-00_ncurses_upstream_fixes-20110402.patch +++ /dev/null @@ -1,38717 +0,0 @@ -diff -Naur ncurses-5.8/aclocal.m4 ncurses-5.8-20110402/aclocal.m4 ---- ncurses-5.8/aclocal.m4 2011-02-21 02:40:21.000000000 +0100 -+++ ncurses-5.8-20110402/aclocal.m4 2011-04-01 01:35:38.000000000 +0200 -@@ -28,7 +28,7 @@ - dnl - dnl Author: Thomas E. Dickey 1995-on - dnl --dnl $Id: aclocal.m4,v 1.549 2011/02/21 01:40:21 tom Exp $ -+dnl $Id: aclocal.m4,v 1.553 2011/03/31 23:35:38 tom Exp $ - dnl Macros used in NCURSES auto-configuration script. - dnl - dnl These macros are maintained separately from NCURSES. The copyright on -@@ -1769,10 +1769,12 @@ - AC_SUBST(EXTRA_CFLAGS) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18 -+dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41 - dnl ---------------- - AC_DEFUN([CF_GNAT_GENERICS], - [ -+AC_REQUIRE([CF_GNAT_VERSION]) -+ - AC_MSG_CHECKING(if GNAT supports generics) - case $cf_gnat_version in #(vi - 3.[[1-9]]*|[[4-9]].*) #(vi -@@ -1826,28 +1828,92 @@ - AC_SUBST(PRAGMA_UNREF) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18 -+dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41 - dnl ---------------- -+dnl GNAT projects are configured with ".gpr" project files. -+dnl GNAT libraries are a further development, using the project feature. - AC_DEFUN([CF_GNAT_PROJECTS], - [ -+AC_REQUIRE([CF_GNAT_VERSION]) -+ -+cf_gnat_libraries=no -+cf_gnat_projects=no -+ - AC_MSG_CHECKING(if GNAT supports project files) - case $cf_gnat_version in #(vi - 3.[[0-9]]*) #(vi -- cf_gnat_projects=no - ;; - *) - case $cf_cv_system_name in #(vi - cygwin*) #(vi -- cf_gnat_projects=no - ;; - *) -- cf_gnat_projects=yes -+ mkdir conftest.src conftest.bin conftest.lib -+ cd conftest.src -+ rm -rf conftest* *~conftest* -+ cat >>library.gpr <>confpackage.ads <>confpackage.adb <&AC_FD_CC 2>&1 ) ; then -+ cf_gnat_projects=yes -+ fi -+ cd .. -+ if test -f conftest.lib/confpackage.ali -+ then -+ cf_gnat_libraries=yes -+ fi -+ rm -rf conftest* *~conftest* - ;; - esac - ;; - esac - AC_MSG_RESULT($cf_gnat_projects) - -+if test $cf_gnat_projects = yes -+then -+ AC_MSG_CHECKING(if GNAT supports libraries) -+ AC_MSG_RESULT($cf_gnat_libraries) -+fi -+ - if test "$cf_gnat_projects" = yes - then - USE_OLD_MAKERULES="#" -@@ -1857,11 +1923,66 @@ - USE_GNAT_PROJECTS="#" - fi - -+if test "$cf_gnat_libraries" = yes -+then -+ USE_GNAT_LIBRARIES="" -+else -+ USE_GNAT_LIBRARIES="#" -+fi -+ - AC_SUBST(USE_OLD_MAKERULES) - AC_SUBST(USE_GNAT_PROJECTS) -+AC_SUBST(USE_GNAT_LIBRARIES) -+])dnl -+dnl --------------------------------------------------------------------------- -+dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 -+dnl -------------- -+dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it -+dnl is noted that gnat may compile a tasking unit even for configurations which -+dnl fail at runtime. -+AC_DEFUN([CF_GNAT_SIGINT],[ -+AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[ -+CF_GNAT_TRY_LINK([with Ada.Interrupts.Names; -+ -+package ConfTest is -+ -+ pragma Warnings (Off); -- the next pragma exists since 3.11p -+ pragma Unreserve_All_Interrupts; -+ pragma Warnings (On); -+ -+ protected Process is -+ procedure Stop; -+ function Continue return Boolean; -+ pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); -+ private -+ Done : Boolean := False; -+ end Process; -+ -+end ConfTest;], -+[package body ConfTest is -+ protected body Process is -+ procedure Stop is -+ begin -+ Done := True; -+ end Stop; -+ function Continue return Boolean is -+ begin -+ return not Done; -+ end Continue; -+ end Process; -+end ConfTest;], -+ [cf_cv_gnat_sigint=yes], -+ [cf_cv_gnat_sigint=no])]) -+ -+if test $cf_cv_gnat_sigint = yes ; then -+ USE_GNAT_SIGINT="" -+else -+ USE_GNAT_SIGINT="#" -+fi -+AC_SUBST(USE_GNAT_SIGINT) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37 -+dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45 - dnl ---------------- - dnl Verify that a test program compiles/links with GNAT. - dnl $cf_ada_make is set to the program that compiles/links -@@ -1873,7 +1994,7 @@ - dnl $4 is the shell command to execute if not successful - AC_DEFUN([CF_GNAT_TRY_LINK], - [ --rm -rf conftest* -+rm -rf conftest* *~conftest* - cat >>conftest.ads <>conftest.ads </dev/null | sed -e 's,[[ ]]*$,,'` -+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'` - case "$cf_result" in - .*k) - cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` -diff -Naur ncurses-5.8/Ada95/aclocal.m4 ncurses-5.8-20110402/Ada95/aclocal.m4 ---- ncurses-5.8/Ada95/aclocal.m4 2011-01-22 20:46:50.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/aclocal.m4 2011-04-01 01:32:36.000000000 +0200 -@@ -28,7 +28,7 @@ - dnl - dnl Author: Thomas E. Dickey - dnl --dnl $Id: aclocal.m4,v 1.20 2011/01/22 19:46:50 tom Exp $ -+dnl $Id: aclocal.m4,v 1.24 2011/03/31 23:32:36 tom Exp $ - dnl Macros used in NCURSES Ada95 auto-configuration script. - dnl - dnl These macros are maintained separately from NCURSES. The copyright on -@@ -1040,10 +1040,12 @@ - AC_SUBST(EXTRA_CFLAGS) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18 -+dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41 - dnl ---------------- - AC_DEFUN([CF_GNAT_GENERICS], - [ -+AC_REQUIRE([CF_GNAT_VERSION]) -+ - AC_MSG_CHECKING(if GNAT supports generics) - case $cf_gnat_version in #(vi - 3.[[1-9]]*|[[4-9]].*) #(vi -@@ -1068,6 +1070,53 @@ - AC_SUBST(cf_generic_objects) - ])dnl - dnl --------------------------------------------------------------------------- -+dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 -+dnl -------------- -+dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it -+dnl is noted that gnat may compile a tasking unit even for configurations which -+dnl fail at runtime. -+AC_DEFUN([CF_GNAT_SIGINT],[ -+AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[ -+CF_GNAT_TRY_LINK([with Ada.Interrupts.Names; -+ -+package ConfTest is -+ -+ pragma Warnings (Off); -- the next pragma exists since 3.11p -+ pragma Unreserve_All_Interrupts; -+ pragma Warnings (On); -+ -+ protected Process is -+ procedure Stop; -+ function Continue return Boolean; -+ pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); -+ private -+ Done : Boolean := False; -+ end Process; -+ -+end ConfTest;], -+[package body ConfTest is -+ protected body Process is -+ procedure Stop is -+ begin -+ Done := True; -+ end Stop; -+ function Continue return Boolean is -+ begin -+ return not Done; -+ end Continue; -+ end Process; -+end ConfTest;], -+ [cf_cv_gnat_sigint=yes], -+ [cf_cv_gnat_sigint=no])]) -+ -+if test $cf_cv_gnat_sigint = yes ; then -+ USE_GNAT_SIGINT="" -+else -+ USE_GNAT_SIGINT="#" -+fi -+AC_SUBST(USE_GNAT_SIGINT) -+])dnl -+dnl --------------------------------------------------------------------------- - dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18 - dnl -------------------- - dnl Check if the gnat pragma "Unreferenced" works. -@@ -1097,28 +1146,92 @@ - AC_SUBST(PRAGMA_UNREF) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18 -+dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41 - dnl ---------------- -+dnl GNAT projects are configured with ".gpr" project files. -+dnl GNAT libraries are a further development, using the project feature. - AC_DEFUN([CF_GNAT_PROJECTS], - [ -+AC_REQUIRE([CF_GNAT_VERSION]) -+ -+cf_gnat_libraries=no -+cf_gnat_projects=no -+ - AC_MSG_CHECKING(if GNAT supports project files) - case $cf_gnat_version in #(vi - 3.[[0-9]]*) #(vi -- cf_gnat_projects=no - ;; - *) - case $cf_cv_system_name in #(vi - cygwin*) #(vi -- cf_gnat_projects=no - ;; - *) -- cf_gnat_projects=yes -+ mkdir conftest.src conftest.bin conftest.lib -+ cd conftest.src -+ rm -rf conftest* *~conftest* -+ cat >>library.gpr <>confpackage.ads <>confpackage.adb <&AC_FD_CC 2>&1 ) ; then -+ cf_gnat_projects=yes -+ fi -+ cd .. -+ if test -f conftest.lib/confpackage.ali -+ then -+ cf_gnat_libraries=yes -+ fi -+ rm -rf conftest* *~conftest* - ;; - esac - ;; - esac - AC_MSG_RESULT($cf_gnat_projects) - -+if test $cf_gnat_projects = yes -+then -+ AC_MSG_CHECKING(if GNAT supports libraries) -+ AC_MSG_RESULT($cf_gnat_libraries) -+fi -+ - if test "$cf_gnat_projects" = yes - then - USE_OLD_MAKERULES="#" -@@ -1128,11 +1241,19 @@ - USE_GNAT_PROJECTS="#" - fi - -+if test "$cf_gnat_libraries" = yes -+then -+ USE_GNAT_LIBRARIES="" -+else -+ USE_GNAT_LIBRARIES="#" -+fi -+ - AC_SUBST(USE_OLD_MAKERULES) - AC_SUBST(USE_GNAT_PROJECTS) -+AC_SUBST(USE_GNAT_LIBRARIES) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37 -+dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45 - dnl ---------------- - dnl Verify that a test program compiles/links with GNAT. - dnl $cf_ada_make is set to the program that compiles/links -@@ -1144,7 +1265,7 @@ - dnl $4 is the shell command to execute if not successful - AC_DEFUN([CF_GNAT_TRY_LINK], - [ --rm -rf conftest* -+rm -rf conftest* *~conftest* - cat >>conftest.ads <>conftest.ads </dev/null | sed -e 's,[[ ]]*$,,'` -+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'` - case "$cf_result" in - .*k) - cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` -@@ -1914,7 +2032,7 @@ - echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_NCURSES_ADDON version: 3 updated: 2010/10/23 15:54:49 -+dnl CF_NCURSES_ADDON version: 4 updated: 2011/03/27 17:10:13 - dnl ---------------- - dnl Configure an ncurses add-on, built outside the ncurses tree. - AC_DEFUN([CF_NCURSES_ADDON],[ -@@ -1939,8 +2057,8 @@ - cf_version=`$NCURSES_CONFIG --version` - - NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'` --NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]]\+\.//' -e 's/\..*//'` --NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]]\+\.[[0-9]]\+\.//'` -+NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.//' -e 's/\..*//'` -+NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.//'` - - # ABI version is not available from headers - cf_cv_abi_version=`$NCURSES_CONFIG --abi-version` -@@ -1956,10 +2074,10 @@ - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out" - AC_TRY_EVAL(cf_try) - if test -f conftest.out ; then -- cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ ]]\+//"` -- eval NCURSES_$cf_name=$cf_result -- cat conftest.$ac_ext -- cat conftest.out -+ cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[[ ]][[ ]]*//"` -+ eval NCURSES_$cf_name=\"$cf_result\" -+ # cat conftest.$ac_ext -+ # cat conftest.out - fi - done - -@@ -2428,7 +2546,7 @@ - esac - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09 -+dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24 - dnl ------------- - dnl Check for the package-config program, unless disabled by command-line. - AC_DEFUN([CF_PKG_CONFIG], -@@ -2445,7 +2563,7 @@ - PKG_CONFIG=none - ;; - yes) #(vi -- AC_PATH_PROG(PKG_CONFIG, pkg-config, none) -+ AC_PATH_TOOL(PKG_CONFIG, pkg-config, none) - ;; - *) - PKG_CONFIG=$withval -@@ -3355,7 +3473,7 @@ - fi - ]) - dnl --------------------------------------------------------------------------- --dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42 -+dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 - dnl --------------- - dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, - dnl or adapt to the vendor's definitions to get equivalent functionality, -@@ -3374,6 +3492,9 @@ - aix[[456]]*) #(vi - cf_xopen_source="-D_ALL_SOURCE" - ;; -+cygwin) #(vi -+ cf_XOPEN_SOURCE=600 -+ ;; - darwin[[0-8]].*) #(vi - cf_xopen_source="-D_APPLE_C_SOURCE" - ;; -diff -Naur ncurses-5.8/Ada95/configure ncurses-5.8-20110402/Ada95/configure ---- ncurses-5.8/Ada95/configure 2011-01-15 22:51:23.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/configure 2011-04-01 01:34:47.000000000 +0200 -@@ -1,7 +1,7 @@ - #! /bin/sh --# From configure.in Revision: 1.21 . -+# From configure.in Revision: 1.30 . - # Guess values for system-dependent variables and create Makefiles. --# Generated by Autoconf 2.52.20101001. -+# Generated by Autoconf 2.52.20101002. - # - # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 - # Free Software Foundation, Inc. -@@ -657,9 +657,11 @@ - --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS) - --with-build-libs=XXX the build libraries (${BUILD_LIBS}) - Options to Specify the Libraries Built/Used: -+ --with-shared generate shared C-objects (needed for --with-ada-sharedlib) - --enable-widec compile with wide-char/UTF-8 code - --with-curses-dir=DIR directory in which (n)curses is installed - --with-shlib-version=X Specify rel or abi version for shared libs -+ --enable-rpath-link link sample programs with rpath option - Fine-Tuning Your Configuration: - --enable-broken_linker compile with broken-linker support code - --disable-largefile omit support for large files -@@ -755,7 +757,7 @@ - running configure, to aid debugging if configure makes a mistake. - - It was created by $as_me, which was --generated by GNU Autoconf 2.52.20101001. Invocation command line was -+generated by GNU Autoconf 2.52.20101002. Invocation command line was - - $ $0 $@ - -@@ -879,7 +881,7 @@ - fi - for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then -- { echo "$as_me:882: loading site script $ac_site_file" >&5 -+ { echo "$as_me:884: loading site script $ac_site_file" >&5 - echo "$as_me: loading site script $ac_site_file" >&6;} - cat "$ac_site_file" >&5 - . "$ac_site_file" -@@ -890,7 +892,7 @@ - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then -- { echo "$as_me:893: loading cache $cache_file" >&5 -+ { echo "$as_me:895: loading cache $cache_file" >&5 - echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; -@@ -898,7 +900,7 @@ - esac - fi - else -- { echo "$as_me:901: creating cache $cache_file" >&5 -+ { echo "$as_me:903: creating cache $cache_file" >&5 - echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file - fi -@@ -914,21 +916,21 @@ - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) -- { echo "$as_me:917: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -+ { echo "$as_me:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 - echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) -- { echo "$as_me:921: error: \`$ac_var' was not set in the previous run" >&5 -+ { echo "$as_me:923: error: \`$ac_var' was not set in the previous run" >&5 - echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then -- { echo "$as_me:927: error: \`$ac_var' has changed since the previous run:" >&5 -+ { echo "$as_me:929: error: \`$ac_var' has changed since the previous run:" >&5 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} -- { echo "$as_me:929: former value: $ac_old_val" >&5 -+ { echo "$as_me:931: former value: $ac_old_val" >&5 - echo "$as_me: former value: $ac_old_val" >&2;} -- { echo "$as_me:931: current value: $ac_new_val" >&5 -+ { echo "$as_me:933: current value: $ac_new_val" >&5 - echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; -@@ -947,9 +949,9 @@ - fi - done - if $ac_cache_corrupted; then -- { echo "$as_me:950: error: changes in the environment can compromise the build" >&5 -+ { echo "$as_me:952: error: changes in the environment can compromise the build" >&5 - echo "$as_me: error: changes in the environment can compromise the build" >&2;} -- { { echo "$as_me:952: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -+ { { echo "$as_me:954: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 - echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -970,10 +972,10 @@ - echo "#! $SHELL" >conftest.sh - echo "exit 0" >>conftest.sh - chmod +x conftest.sh --if { (echo "$as_me:973: PATH=\".;.\"; conftest.sh") >&5 -+if { (echo "$as_me:975: PATH=\".;.\"; conftest.sh") >&5 - (PATH=".;."; conftest.sh) 2>&5 - ac_status=$? -- echo "$as_me:976: \$? = $ac_status" >&5 -+ echo "$as_me:978: \$? = $ac_status" >&5 - (exit $ac_status); }; then - ac_path_separator=';' - else -@@ -1003,7 +1005,7 @@ - fi - done - if test -z "$ac_aux_dir"; then -- { { echo "$as_me:1006: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -+ { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 - echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } - fi -@@ -1013,11 +1015,11 @@ - - # Make sure we can run config.sub. - $ac_config_sub sun4 >/dev/null 2>&1 || -- { { echo "$as_me:1016: error: cannot run $ac_config_sub" >&5 -+ { { echo "$as_me:1018: error: cannot run $ac_config_sub" >&5 - echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - --echo "$as_me:1020: checking build system type" >&5 -+echo "$as_me:1022: checking build system type" >&5 - echo $ECHO_N "checking build system type... $ECHO_C" >&6 - if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1026,23 +1028,23 @@ - test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` - test -z "$ac_cv_build_alias" && -- { { echo "$as_me:1029: error: cannot guess build type; you must specify one" >&5 -+ { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5 - echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } - ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || -- { { echo "$as_me:1033: error: $ac_config_sub $ac_cv_build_alias failed." >&5 -+ { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5 - echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:1038: result: $ac_cv_build" >&5 -+echo "$as_me:1040: result: $ac_cv_build" >&5 - echo "${ECHO_T}$ac_cv_build" >&6 - build=$ac_cv_build - build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - --echo "$as_me:1045: checking host system type" >&5 -+echo "$as_me:1047: checking host system type" >&5 - echo $ECHO_N "checking host system type... $ECHO_C" >&6 - if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1051,12 +1053,12 @@ - test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias - ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || -- { { echo "$as_me:1054: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -+ { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5 - echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:1059: result: $ac_cv_host" >&5 -+echo "$as_me:1061: result: $ac_cv_host" >&5 - echo "${ECHO_T}$ac_cv_host" >&6 - host=$ac_cv_host - host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -@@ -1064,7 +1066,7 @@ - host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then -- echo "$as_me:1067: checking target system type" >&5 -+ echo "$as_me:1069: checking target system type" >&5 - echo $ECHO_N "checking target system type... $ECHO_C" >&6 - if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1073,12 +1075,12 @@ - test "x$ac_cv_target_alias" = "x" && - ac_cv_target_alias=$ac_cv_host_alias - ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || -- { { echo "$as_me:1076: error: $ac_config_sub $ac_cv_target_alias failed" >&5 -+ { { echo "$as_me:1078: error: $ac_config_sub $ac_cv_target_alias failed" >&5 - echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:1081: result: $ac_cv_target" >&5 -+echo "$as_me:1083: result: $ac_cv_target" >&5 - echo "${ECHO_T}$ac_cv_target" >&6 - target=$ac_cv_target - target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -@@ -1109,13 +1111,13 @@ - fi - - test -z "$system_name" && system_name="$cf_cv_system_name" --test -n "$cf_cv_system_name" && echo "$as_me:1112: result: Configuring for $cf_cv_system_name" >&5 -+test -n "$cf_cv_system_name" && echo "$as_me:1114: result: Configuring for $cf_cv_system_name" >&5 - echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 - - if test ".$system_name" != ".$cf_cv_system_name" ; then -- echo "$as_me:1116: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 -+ echo "$as_me:1118: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 - echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 -- { { echo "$as_me:1118: error: \"Please remove config.cache and try again.\"" >&5 -+ { { echo "$as_me:1120: error: \"Please remove config.cache and try again.\"" >&5 - echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -1123,7 +1125,7 @@ - # Check whether --with-system-type or --without-system-type was given. - if test "${with_system_type+set}" = set; then - withval="$with_system_type" -- { echo "$as_me:1126: WARNING: overriding system type to $withval" >&5 -+ { echo "$as_me:1128: WARNING: overriding system type to $withval" >&5 - echo "$as_me: WARNING: overriding system type to $withval" >&2;} - cf_cv_system_name=$withval - fi; -@@ -1133,7 +1135,7 @@ - - ### Default install-location - --echo "$as_me:1136: checking for prefix" >&5 -+echo "$as_me:1138: checking for prefix" >&5 - echo $ECHO_N "checking for prefix... $ECHO_C" >&6 - if test "x$prefix" = "xNONE" ; then - case "$cf_cv_system_name" in -@@ -1145,11 +1147,11 @@ - ;; - esac - fi --echo "$as_me:1148: result: $prefix" >&5 -+echo "$as_me:1150: result: $prefix" >&5 - echo "${ECHO_T}$prefix" >&6 - - if test "x$prefix" = "xNONE" ; then --echo "$as_me:1152: checking for default include-directory" >&5 -+echo "$as_me:1154: checking for default include-directory" >&5 - echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6 - test -n "$verbose" && echo 1>&6 - for cf_symbol in \ -@@ -1172,7 +1174,7 @@ - fi - test -n "$verbose" && echo " tested $cf_dir" 1>&6 - done --echo "$as_me:1175: result: $includedir" >&5 -+echo "$as_me:1177: result: $includedir" >&5 - echo "${ECHO_T}$includedir" >&6 - fi - -@@ -1186,7 +1188,7 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. - set dummy ${ac_tool_prefix}gcc; ac_word=$2 --echo "$as_me:1189: checking for $ac_word" >&5 -+echo "$as_me:1191: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1201,7 +1203,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_CC="${ac_tool_prefix}gcc" --echo "$as_me:1204: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1206: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1209,10 +1211,10 @@ - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$as_me:1212: result: $CC" >&5 -+ echo "$as_me:1214: result: $CC" >&5 - echo "${ECHO_T}$CC" >&6 - else -- echo "$as_me:1215: result: no" >&5 -+ echo "$as_me:1217: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1221,7 +1223,7 @@ - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. - set dummy gcc; ac_word=$2 --echo "$as_me:1224: checking for $ac_word" >&5 -+echo "$as_me:1226: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1236,7 +1238,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_CC="gcc" --echo "$as_me:1239: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1241: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1244,10 +1246,10 @@ - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- echo "$as_me:1247: result: $ac_ct_CC" >&5 -+ echo "$as_me:1249: result: $ac_ct_CC" >&5 - echo "${ECHO_T}$ac_ct_CC" >&6 - else -- echo "$as_me:1250: result: no" >&5 -+ echo "$as_me:1252: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1260,7 +1262,7 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. - set dummy ${ac_tool_prefix}cc; ac_word=$2 --echo "$as_me:1263: checking for $ac_word" >&5 -+echo "$as_me:1265: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1275,7 +1277,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_CC="${ac_tool_prefix}cc" --echo "$as_me:1278: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1280: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1283,10 +1285,10 @@ - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$as_me:1286: result: $CC" >&5 -+ echo "$as_me:1288: result: $CC" >&5 - echo "${ECHO_T}$CC" >&6 - else -- echo "$as_me:1289: result: no" >&5 -+ echo "$as_me:1291: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1295,7 +1297,7 @@ - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 --echo "$as_me:1298: checking for $ac_word" >&5 -+echo "$as_me:1300: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1310,7 +1312,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_CC="cc" --echo "$as_me:1313: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1315: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1318,10 +1320,10 @@ - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- echo "$as_me:1321: result: $ac_ct_CC" >&5 -+ echo "$as_me:1323: result: $ac_ct_CC" >&5 - echo "${ECHO_T}$ac_ct_CC" >&6 - else -- echo "$as_me:1324: result: no" >&5 -+ echo "$as_me:1326: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1334,7 +1336,7 @@ - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. - set dummy cc; ac_word=$2 --echo "$as_me:1337: checking for $ac_word" >&5 -+echo "$as_me:1339: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1354,7 +1356,7 @@ - continue - fi - ac_cv_prog_CC="cc" --echo "$as_me:1357: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1359: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1376,10 +1378,10 @@ - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$as_me:1379: result: $CC" >&5 -+ echo "$as_me:1381: result: $CC" >&5 - echo "${ECHO_T}$CC" >&6 - else -- echo "$as_me:1382: result: no" >&5 -+ echo "$as_me:1384: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1390,7 +1392,7 @@ - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. - set dummy $ac_tool_prefix$ac_prog; ac_word=$2 --echo "$as_me:1393: checking for $ac_word" >&5 -+echo "$as_me:1395: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1405,7 +1407,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" --echo "$as_me:1408: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1410: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1413,10 +1415,10 @@ - fi - CC=$ac_cv_prog_CC - if test -n "$CC"; then -- echo "$as_me:1416: result: $CC" >&5 -+ echo "$as_me:1418: result: $CC" >&5 - echo "${ECHO_T}$CC" >&6 - else -- echo "$as_me:1419: result: no" >&5 -+ echo "$as_me:1421: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1429,7 +1431,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:1432: checking for $ac_word" >&5 -+echo "$as_me:1434: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -1444,7 +1446,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_CC="$ac_prog" --echo "$as_me:1447: found $ac_dir/$ac_word" >&5 -+echo "$as_me:1449: found $ac_dir/$ac_word" >&5 - break - done - -@@ -1452,10 +1454,10 @@ - fi - ac_ct_CC=$ac_cv_prog_ac_ct_CC - if test -n "$ac_ct_CC"; then -- echo "$as_me:1455: result: $ac_ct_CC" >&5 -+ echo "$as_me:1457: result: $ac_ct_CC" >&5 - echo "${ECHO_T}$ac_ct_CC" >&6 - else -- echo "$as_me:1458: result: no" >&5 -+ echo "$as_me:1460: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -1467,32 +1469,32 @@ - - fi - --test -z "$CC" && { { echo "$as_me:1470: error: no acceptable cc found in \$PATH" >&5 -+test -z "$CC" && { { echo "$as_me:1472: error: no acceptable cc found in \$PATH" >&5 - echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - - # Provide some information about the compiler. --echo "$as_me:1475:" \ -+echo "$as_me:1477:" \ - "checking for C compiler version" >&5 - ac_compiler=`set X $ac_compile; echo $2` --{ (eval echo "$as_me:1478: \"$ac_compiler --version &5\"") >&5 -+{ (eval echo "$as_me:1480: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? -- echo "$as_me:1481: \$? = $ac_status" >&5 -+ echo "$as_me:1483: \$? = $ac_status" >&5 - (exit $ac_status); } --{ (eval echo "$as_me:1483: \"$ac_compiler -v &5\"") >&5 -+{ (eval echo "$as_me:1485: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? -- echo "$as_me:1486: \$? = $ac_status" >&5 -+ echo "$as_me:1488: \$? = $ac_status" >&5 - (exit $ac_status); } --{ (eval echo "$as_me:1488: \"$ac_compiler -V &5\"") >&5 -+{ (eval echo "$as_me:1490: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? -- echo "$as_me:1491: \$? = $ac_status" >&5 -+ echo "$as_me:1493: \$? = $ac_status" >&5 - (exit $ac_status); } - - cat >conftest.$ac_ext <<_ACEOF --#line 1495 "configure" -+#line 1497 "configure" - #include "confdefs.h" - - int -@@ -1508,13 +1510,13 @@ - # Try to create an executable without -o first, disregard a.out. - # It will help us diagnose broken compilers, and finding out an intuition - # of exeext. --echo "$as_me:1511: checking for C compiler default output" >&5 -+echo "$as_me:1513: checking for C compiler default output" >&5 - echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 - ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` --if { (eval echo "$as_me:1514: \"$ac_link_default\"") >&5 -+if { (eval echo "$as_me:1516: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? -- echo "$as_me:1517: \$? = $ac_status" >&5 -+ echo "$as_me:1519: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is - # not robust to junk in `.', hence go to wildcards (a.*) only as a last -@@ -1537,34 +1539,34 @@ - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --{ { echo "$as_me:1540: error: C compiler cannot create executables" >&5 -+{ { echo "$as_me:1542: error: C compiler cannot create executables" >&5 - echo "$as_me: error: C compiler cannot create executables" >&2;} - { (exit 77); exit 77; }; } - fi - - ac_exeext=$ac_cv_exeext --echo "$as_me:1546: result: $ac_file" >&5 -+echo "$as_me:1548: result: $ac_file" >&5 - echo "${ECHO_T}$ac_file" >&6 - - # Check the compiler produces executables we can run. If not, either - # the compiler is broken, or we cross compile. --echo "$as_me:1551: checking whether the C compiler works" >&5 -+echo "$as_me:1553: checking whether the C compiler works" >&5 - echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 - # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 - # If not cross compiling, check that we can run a simple program. - if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' -- { (eval echo "$as_me:1557: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:1559: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:1560: \$? = $ac_status" >&5 -+ echo "$as_me:1562: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else -- { { echo "$as_me:1567: error: cannot run C compiled programs. -+ { { echo "$as_me:1569: error: cannot run C compiled programs. - If you meant to cross compile, use \`--host'." >&5 - echo "$as_me: error: cannot run C compiled programs. - If you meant to cross compile, use \`--host'." >&2;} -@@ -1572,24 +1574,24 @@ - fi - fi - fi --echo "$as_me:1575: result: yes" >&5 -+echo "$as_me:1577: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - - rm -f a.out a.exe conftest$ac_cv_exeext - ac_clean_files=$ac_clean_files_save - # Check the compiler produces executables we can run. If not, either - # the compiler is broken, or we cross compile. --echo "$as_me:1582: checking whether we are cross compiling" >&5 -+echo "$as_me:1584: checking whether we are cross compiling" >&5 - echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 --echo "$as_me:1584: result: $cross_compiling" >&5 -+echo "$as_me:1586: result: $cross_compiling" >&5 - echo "${ECHO_T}$cross_compiling" >&6 - --echo "$as_me:1587: checking for executable suffix" >&5 -+echo "$as_me:1589: checking for executable suffix" >&5 - echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 --if { (eval echo "$as_me:1589: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:1591: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:1592: \$? = $ac_status" >&5 -+ echo "$as_me:1594: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) - # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -@@ -1605,25 +1607,25 @@ - esac - done - else -- { { echo "$as_me:1608: error: cannot compute EXEEXT: cannot compile and link" >&5 -+ { { echo "$as_me:1610: error: cannot compute EXEEXT: cannot compile and link" >&5 - echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} - { (exit 1); exit 1; }; } - fi - - rm -f conftest$ac_cv_exeext --echo "$as_me:1614: result: $ac_cv_exeext" >&5 -+echo "$as_me:1616: result: $ac_cv_exeext" >&5 - echo "${ECHO_T}$ac_cv_exeext" >&6 - - rm -f conftest.$ac_ext - EXEEXT=$ac_cv_exeext - ac_exeext=$EXEEXT --echo "$as_me:1620: checking for object suffix" >&5 -+echo "$as_me:1622: checking for object suffix" >&5 - echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 - if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 1626 "configure" -+#line 1628 "configure" - #include "confdefs.h" - - int -@@ -1635,10 +1637,10 @@ - } - _ACEOF - rm -f conftest.o conftest.obj --if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:1641: \$? = $ac_status" >&5 -+ echo "$as_me:1643: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in -@@ -1650,24 +1652,24 @@ - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --{ { echo "$as_me:1653: error: cannot compute OBJEXT: cannot compile" >&5 -+{ { echo "$as_me:1655: error: cannot compute OBJEXT: cannot compile" >&5 - echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} - { (exit 1); exit 1; }; } - fi - - rm -f conftest.$ac_cv_objext conftest.$ac_ext - fi --echo "$as_me:1660: result: $ac_cv_objext" >&5 -+echo "$as_me:1662: result: $ac_cv_objext" >&5 - echo "${ECHO_T}$ac_cv_objext" >&6 - OBJEXT=$ac_cv_objext - ac_objext=$OBJEXT --echo "$as_me:1664: checking whether we are using the GNU C compiler" >&5 -+echo "$as_me:1666: checking whether we are using the GNU C compiler" >&5 - echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 - if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 1670 "configure" -+#line 1672 "configure" - #include "confdefs.h" - - int -@@ -1682,16 +1684,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:1685: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:1688: \$? = $ac_status" >&5 -+ echo "$as_me:1690: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:1691: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:1693: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:1694: \$? = $ac_status" >&5 -+ echo "$as_me:1696: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes - else -@@ -1703,19 +1705,19 @@ - ac_cv_c_compiler_gnu=$ac_compiler_gnu - - fi --echo "$as_me:1706: result: $ac_cv_c_compiler_gnu" >&5 -+echo "$as_me:1708: result: $ac_cv_c_compiler_gnu" >&5 - echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 - GCC=`test $ac_compiler_gnu = yes && echo yes` - ac_test_CFLAGS=${CFLAGS+set} - ac_save_CFLAGS=$CFLAGS - CFLAGS="-g" --echo "$as_me:1712: checking whether $CC accepts -g" >&5 -+echo "$as_me:1714: checking whether $CC accepts -g" >&5 - echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 - if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 1718 "configure" -+#line 1720 "configure" - #include "confdefs.h" - - int -@@ -1727,16 +1729,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:1730: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:1733: \$? = $ac_status" >&5 -+ echo "$as_me:1735: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:1736: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:1738: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:1739: \$? = $ac_status" >&5 -+ echo "$as_me:1741: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes - else -@@ -1746,7 +1748,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:1749: result: $ac_cv_prog_cc_g" >&5 -+echo "$as_me:1751: result: $ac_cv_prog_cc_g" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -@@ -1773,16 +1775,16 @@ - #endif - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:1779: \$? = $ac_status" >&5 -+ echo "$as_me:1781: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:1782: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:1784: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:1785: \$? = $ac_status" >&5 -+ echo "$as_me:1787: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - ''\ -@@ -1794,7 +1796,7 @@ - 'void exit (int);' - do - cat >conftest.$ac_ext <<_ACEOF --#line 1797 "configure" -+#line 1799 "configure" - #include "confdefs.h" - #include - $ac_declaration -@@ -1807,16 +1809,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:1810: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:1813: \$? = $ac_status" >&5 -+ echo "$as_me:1815: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:1816: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:1818: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:1819: \$? = $ac_status" >&5 -+ echo "$as_me:1821: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -1826,7 +1828,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF --#line 1829 "configure" -+#line 1831 "configure" - #include "confdefs.h" - $ac_declaration - int -@@ -1838,16 +1840,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:1841: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:1844: \$? = $ac_status" >&5 -+ echo "$as_me:1846: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:1847: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:1849: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:1850: \$? = $ac_status" >&5 -+ echo "$as_me:1852: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -1877,11 +1879,11 @@ - - GCC_VERSION=none - if test "$GCC" = yes ; then -- echo "$as_me:1880: checking version of $CC" >&5 -+ echo "$as_me:1882: checking version of $CC" >&5 - echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" - test -z "$GCC_VERSION" && GCC_VERSION=unknown -- echo "$as_me:1884: result: $GCC_VERSION" >&5 -+ echo "$as_me:1886: result: $GCC_VERSION" >&5 - echo "${ECHO_T}$GCC_VERSION" >&6 - fi - -@@ -1891,7 +1893,7 @@ - ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_main_return=return --echo "$as_me:1894: checking how to run the C preprocessor" >&5 -+echo "$as_me:1896: checking how to run the C preprocessor" >&5 - echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 - # On Suns, sometimes $CPP names a directory. - if test -n "$CPP" && test -d "$CPP"; then -@@ -1912,18 +1914,18 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line 1915 "configure" -+#line 1917 "configure" - #include "confdefs.h" - #include - Syntax error - _ACEOF --if { (eval echo "$as_me:1920: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:1926: \$? = $ac_status" >&5 -+ echo "$as_me:1928: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -1946,17 +1948,17 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line 1949 "configure" -+#line 1951 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:1953: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:1959: \$? = $ac_status" >&5 -+ echo "$as_me:1961: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -1993,7 +1995,7 @@ - else - ac_cv_prog_CPP=$CPP - fi --echo "$as_me:1996: result: $CPP" >&5 -+echo "$as_me:1998: result: $CPP" >&5 - echo "${ECHO_T}$CPP" >&6 - ac_preproc_ok=false - for ac_c_preproc_warn_flag in '' yes -@@ -2003,18 +2005,18 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line 2006 "configure" -+#line 2008 "configure" - #include "confdefs.h" - #include - Syntax error - _ACEOF --if { (eval echo "$as_me:2011: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:2013: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:2017: \$? = $ac_status" >&5 -+ echo "$as_me:2019: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -2037,17 +2039,17 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line 2040 "configure" -+#line 2042 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:2044: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:2050: \$? = $ac_status" >&5 -+ echo "$as_me:2052: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -2075,7 +2077,7 @@ - if $ac_preproc_ok; then - : - else -- { { echo "$as_me:2078: error: C preprocessor \"$CPP\" fails sanity check" >&5 -+ { { echo "$as_me:2080: error: C preprocessor \"$CPP\" fails sanity check" >&5 - echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -2088,14 +2090,14 @@ - ac_main_return=return - - if test $ac_cv_c_compiler_gnu = yes; then -- echo "$as_me:2091: checking whether $CC needs -traditional" >&5 -+ echo "$as_me:2093: checking whether $CC needs -traditional" >&5 - echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 - if test "${ac_cv_prog_gcc_traditional+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_pattern="Autoconf.*'x'" - cat >conftest.$ac_ext <<_ACEOF --#line 2098 "configure" -+#line 2100 "configure" - #include "confdefs.h" - #include - int Autoconf = TIOCGETP; -@@ -2110,7 +2112,7 @@ - - if test $ac_cv_prog_gcc_traditional = no; then - cat >conftest.$ac_ext <<_ACEOF --#line 2113 "configure" -+#line 2115 "configure" - #include "confdefs.h" - #include - int Autoconf = TCGETA; -@@ -2123,14 +2125,14 @@ - - fi - fi --echo "$as_me:2126: result: $ac_cv_prog_gcc_traditional" >&5 -+echo "$as_me:2128: result: $ac_cv_prog_gcc_traditional" >&5 - echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi - fi - --echo "$as_me:2133: checking whether $CC understands -c and -o together" >&5 -+echo "$as_me:2135: checking whether $CC understands -c and -o together" >&5 - echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6 - if test "${cf_cv_prog_CC_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2146,15 +2148,15 @@ - # We do the test twice because some compilers refuse to overwrite an - # existing .o file with -o, though they will create one. - ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' --if { (eval echo "$as_me:2149: \"$ac_try\"") >&5 -+if { (eval echo "$as_me:2151: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:2152: \$? = $ac_status" >&5 -+ echo "$as_me:2154: \$? = $ac_status" >&5 - (exit $ac_status); } && -- test -f conftest2.$ac_objext && { (eval echo "$as_me:2154: \"$ac_try\"") >&5 -+ test -f conftest2.$ac_objext && { (eval echo "$as_me:2156: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:2157: \$? = $ac_status" >&5 -+ echo "$as_me:2159: \$? = $ac_status" >&5 - (exit $ac_status); }; - then - eval cf_cv_prog_CC_c_o=yes -@@ -2165,19 +2167,19 @@ - - fi - if test $cf_cv_prog_CC_c_o = yes; then -- echo "$as_me:2168: result: yes" >&5 -+ echo "$as_me:2170: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else -- echo "$as_me:2171: result: no" >&5 -+ echo "$as_me:2173: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - --echo "$as_me:2175: checking for POSIXized ISC" >&5 -+echo "$as_me:2177: checking for POSIXized ISC" >&5 - echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6 - if test -d /etc/conf/kconfig.d && - grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 - then -- echo "$as_me:2180: result: yes" >&5 -+ echo "$as_me:2182: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - ISC=yes # If later tests want to check for ISC. - -@@ -2191,12 +2193,12 @@ - CC="$CC -Xp" - fi - else -- echo "$as_me:2194: result: no" >&5 -+ echo "$as_me:2196: result: no" >&5 - echo "${ECHO_T}no" >&6 - ISC= - fi - --echo "$as_me:2199: checking for ${CC:-cc} option to accept ANSI C" >&5 -+echo "$as_me:2201: checking for ${CC:-cc} option to accept ANSI C" >&5 - echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6 - if test "${cf_cv_ansi_cc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2300,7 +2302,7 @@ - fi - - cat >conftest.$ac_ext <<_ACEOF --#line 2303 "configure" -+#line 2305 "configure" - #include "confdefs.h" - - #ifndef CC_HAS_PROTOS -@@ -2321,16 +2323,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:2324: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:2326: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:2327: \$? = $ac_status" >&5 -+ echo "$as_me:2329: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:2330: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:2332: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:2333: \$? = $ac_status" >&5 -+ echo "$as_me:2335: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ansi_cc="$cf_arg"; break - else -@@ -2343,7 +2345,7 @@ - CPPFLAGS="$cf_save_CPPFLAGS" - - fi --echo "$as_me:2346: result: $cf_cv_ansi_cc" >&5 -+echo "$as_me:2348: result: $cf_cv_ansi_cc" >&5 - echo "${ECHO_T}$cf_cv_ansi_cc" >&6 - - if test "$cf_cv_ansi_cc" != "no"; then -@@ -2436,7 +2438,7 @@ - fi - - if test "$cf_cv_ansi_cc" = "no"; then -- { { echo "$as_me:2439: error: Your compiler does not appear to recognize prototypes. -+ { { echo "$as_me:2441: error: Your compiler does not appear to recognize prototypes. - You have the following choices: - a. adjust your compiler options - b. get an up-to-date compiler -@@ -2483,7 +2485,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:2486: checking for $ac_word" >&5 -+echo "$as_me:2488: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2498,7 +2500,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_AWK="$ac_prog" --echo "$as_me:2501: found $ac_dir/$ac_word" >&5 -+echo "$as_me:2503: found $ac_dir/$ac_word" >&5 - break - done - -@@ -2506,21 +2508,21 @@ - fi - AWK=$ac_cv_prog_AWK - if test -n "$AWK"; then -- echo "$as_me:2509: result: $AWK" >&5 -+ echo "$as_me:2511: result: $AWK" >&5 - echo "${ECHO_T}$AWK" >&6 - else -- echo "$as_me:2512: result: no" >&5 -+ echo "$as_me:2514: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - - test -n "$AWK" && break - done - --test -z "$AWK" && { { echo "$as_me:2519: error: No awk program found" >&5 -+test -z "$AWK" && { { echo "$as_me:2521: error: No awk program found" >&5 - echo "$as_me: error: No awk program found" >&2;} - { (exit 1); exit 1; }; } - --echo "$as_me:2523: checking for egrep" >&5 -+echo "$as_me:2525: checking for egrep" >&5 - echo $ECHO_N "checking for egrep... $ECHO_C" >&6 - if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2530,11 +2532,11 @@ - else ac_cv_prog_egrep='egrep' - fi - fi --echo "$as_me:2533: result: $ac_cv_prog_egrep" >&5 -+echo "$as_me:2535: result: $ac_cv_prog_egrep" >&5 - echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - --test -z "$EGREP" && { { echo "$as_me:2537: error: No egrep program found" >&5 -+test -z "$EGREP" && { { echo "$as_me:2539: error: No egrep program found" >&5 - echo "$as_me: error: No egrep program found" >&2;} - { (exit 1); exit 1; }; } - -@@ -2550,7 +2552,7 @@ - # AFS /usr/afsws/bin/install, which mishandles nonexistent args - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" - # ./install, which can be erroneously created by make from ./install.sh. --echo "$as_me:2553: checking for a BSD compatible install" >&5 -+echo "$as_me:2555: checking for a BSD compatible install" >&5 - echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 - if test -z "$INSTALL"; then - if test "${ac_cv_path_install+set}" = set; then -@@ -2599,7 +2601,7 @@ - INSTALL=$ac_install_sh - fi - fi --echo "$as_me:2602: result: $INSTALL" >&5 -+echo "$as_me:2604: result: $INSTALL" >&5 - echo "${ECHO_T}$INSTALL" >&6 - - # Use test -z because SunOS4 sh mishandles braces in ${var-val}. -@@ -2610,18 +2612,18 @@ - - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - --echo "$as_me:2613: checking whether ln -s works" >&5 -+echo "$as_me:2615: checking whether ln -s works" >&5 - echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 - LN_S=$as_ln_s - if test "$LN_S" = "ln -s"; then -- echo "$as_me:2617: result: yes" >&5 -+ echo "$as_me:2619: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else -- echo "$as_me:2620: result: no, using $LN_S" >&5 -+ echo "$as_me:2622: result: no, using $LN_S" >&5 - echo "${ECHO_T}no, using $LN_S" >&6 - fi - --echo "$as_me:2624: checking if $LN_S -f options work" >&5 -+echo "$as_me:2626: checking if $LN_S -f options work" >&5 - echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6 - - rm -f conf$$.src conf$$dst -@@ -2633,12 +2635,12 @@ - cf_prog_ln_sf=no - fi - rm -f conf$$.dst conf$$src --echo "$as_me:2636: result: $cf_prog_ln_sf" >&5 -+echo "$as_me:2638: result: $cf_prog_ln_sf" >&5 - echo "${ECHO_T}$cf_prog_ln_sf" >&6 - - test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" - --echo "$as_me:2641: checking for long file names" >&5 -+echo "$as_me:2643: checking for long file names" >&5 - echo $ECHO_N "checking for long file names... $ECHO_C" >&6 - if test "${ac_cv_sys_long_file_names+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2677,7 +2679,7 @@ - rm -rf $ac_xdir 2>/dev/null - done - fi --echo "$as_me:2680: result: $ac_cv_sys_long_file_names" >&5 -+echo "$as_me:2682: result: $ac_cv_sys_long_file_names" >&5 - echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6 - if test $ac_cv_sys_long_file_names = yes; then - -@@ -2689,7 +2691,7 @@ - - # if we find pkg-config, check if we should install the ".pc" files. - --echo "$as_me:2692: checking if you want to use pkg-config" >&5 -+echo "$as_me:2694: checking if you want to use pkg-config" >&5 - echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6 - - # Check whether --with-pkg-config or --without-pkg-config was given. -@@ -2699,7 +2701,7 @@ - else - cf_pkg_config=yes - fi; --echo "$as_me:2702: result: $cf_pkg_config" >&5 -+echo "$as_me:2704: result: $cf_pkg_config" >&5 - echo "${ECHO_T}$cf_pkg_config" >&6 - - case $cf_pkg_config in #(vi -@@ -2707,9 +2709,10 @@ - PKG_CONFIG=none - ;; - yes) #(vi -- # Extract the first word of "pkg-config", so it can be a program name with args. --set dummy pkg-config; ac_word=$2 --echo "$as_me:2712: checking for $ac_word" >&5 -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -+echo "$as_me:2715: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2726,25 +2729,70 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:2729: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:2732: found $ac_dir/$ac_word" >&5 - break - fi - done - -- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none" - ;; - esac - fi - PKG_CONFIG=$ac_cv_path_PKG_CONFIG - - if test -n "$PKG_CONFIG"; then -- echo "$as_me:2741: result: $PKG_CONFIG" >&5 -+ echo "$as_me:2743: result: $PKG_CONFIG" >&5 - echo "${ECHO_T}$PKG_CONFIG" >&6 - else -- echo "$as_me:2744: result: no" >&5 -+ echo "$as_me:2746: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+fi -+if test -z "$ac_cv_path_PKG_CONFIG"; then -+ ac_pt_PKG_CONFIG=$PKG_CONFIG -+ # Extract the first word of "pkg-config", so it can be a program name with args. -+set dummy pkg-config; ac_word=$2 -+echo "$as_me:2755: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $ac_pt_PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ ac_save_IFS=$IFS; IFS=$ac_path_separator -+ac_dummy="$PATH" -+for ac_dir in $ac_dummy; do -+ IFS=$ac_save_IFS -+ test -z "$ac_dir" && ac_dir=. -+ if $as_executable_p "$ac_dir/$ac_word"; then -+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word" -+ echo "$as_me:2772: found $ac_dir/$ac_word" >&5 -+ break -+fi -+done -+ -+ test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none" -+ ;; -+esac -+fi -+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -+ -+if test -n "$ac_pt_PKG_CONFIG"; then -+ echo "$as_me:2784: result: $ac_pt_PKG_CONFIG" >&5 -+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 -+else -+ echo "$as_me:2787: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -+ PKG_CONFIG=$ac_pt_PKG_CONFIG -+else -+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -+fi -+ - ;; - *) - PKG_CONFIG=$withval -@@ -2779,7 +2827,7 @@ - PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:2782: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 -+ { { echo "$as_me:2830: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 - echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -2787,8 +2835,8 @@ - - fi - --if test "$PKG_CONFIG" != no ; then -- echo "$as_me:2791: checking if we should install .pc files for $PKG_CONFIG" >&5 -+if test "$PKG_CONFIG" != none ; then -+ echo "$as_me:2839: checking if we should install .pc files for $PKG_CONFIG" >&5 - echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6 - - # Leave this as something that can be overridden in the environment. -@@ -2805,18 +2853,18 @@ - else - enable_pc_files=no - fi; -- echo "$as_me:2808: result: $enable_pc_files" >&5 -+ echo "$as_me:2856: result: $enable_pc_files" >&5 - echo "${ECHO_T}$enable_pc_files" >&6 - else -- echo "$as_me:2811: result: no" >&5 -+ echo "$as_me:2859: result: no" >&5 - echo "${ECHO_T}no" >&6 -- { echo "$as_me:2813: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5 -+ { echo "$as_me:2861: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5 - echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;} - enable_pc_files=no - fi - fi - --echo "$as_me:2819: checking if you want to build test-programs" >&5 -+echo "$as_me:2867: checking if you want to build test-programs" >&5 - echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6 - - # Check whether --with-tests or --without-tests was given. -@@ -2826,10 +2874,10 @@ - else - cf_with_tests=yes - fi; --echo "$as_me:2829: result: $cf_with_tests" >&5 -+echo "$as_me:2877: result: $cf_with_tests" >&5 - echo "${ECHO_T}$cf_with_tests" >&6 - --echo "$as_me:2832: checking if we should assume mixed-case filenames" >&5 -+echo "$as_me:2880: checking if we should assume mixed-case filenames" >&5 - echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6 - - # Check whether --enable-mixed-case or --disable-mixed-case was given. -@@ -2839,11 +2887,11 @@ - else - enable_mixedcase=auto - fi; --echo "$as_me:2842: result: $enable_mixedcase" >&5 -+echo "$as_me:2890: result: $enable_mixedcase" >&5 - echo "${ECHO_T}$enable_mixedcase" >&6 - if test "$enable_mixedcase" = "auto" ; then - --echo "$as_me:2846: checking if filesystem supports mixed-case filenames" >&5 -+echo "$as_me:2894: checking if filesystem supports mixed-case filenames" >&5 - echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 - if test "${cf_cv_mixedcase+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2870,7 +2918,7 @@ - fi - - fi --echo "$as_me:2873: result: $cf_cv_mixedcase" >&5 -+echo "$as_me:2921: result: $cf_cv_mixedcase" >&5 - echo "${ECHO_T}$cf_cv_mixedcase" >&6 - test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF - #define MIXEDCASE_FILENAMES 1 -@@ -2887,7 +2935,7 @@ - fi - - # do this after mixed-case option (tags/TAGS is not as important as tic). --echo "$as_me:2890: checking whether ${MAKE-make} sets \${MAKE}" >&5 -+echo "$as_me:2938: checking whether ${MAKE-make} sets \${MAKE}" >&5 - echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` - if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then -@@ -2907,11 +2955,11 @@ - rm -f conftest.make - fi - if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then -- echo "$as_me:2910: result: yes" >&5 -+ echo "$as_me:2958: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - SET_MAKE= - else -- echo "$as_me:2914: result: no" >&5 -+ echo "$as_me:2962: result: no" >&5 - echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" - fi -@@ -2920,7 +2968,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:2923: checking for $ac_word" >&5 -+echo "$as_me:2971: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_CTAGS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2935,7 +2983,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_CTAGS="$ac_prog" --echo "$as_me:2938: found $ac_dir/$ac_word" >&5 -+echo "$as_me:2986: found $ac_dir/$ac_word" >&5 - break - done - -@@ -2943,10 +2991,10 @@ - fi - CTAGS=$ac_cv_prog_CTAGS - if test -n "$CTAGS"; then -- echo "$as_me:2946: result: $CTAGS" >&5 -+ echo "$as_me:2994: result: $CTAGS" >&5 - echo "${ECHO_T}$CTAGS" >&6 - else -- echo "$as_me:2949: result: no" >&5 -+ echo "$as_me:2997: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -2957,7 +3005,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:2960: checking for $ac_word" >&5 -+echo "$as_me:3008: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ETAGS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -2972,7 +3020,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ETAGS="$ac_prog" --echo "$as_me:2975: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3023: found $ac_dir/$ac_word" >&5 - break - done - -@@ -2980,10 +3028,10 @@ - fi - ETAGS=$ac_cv_prog_ETAGS - if test -n "$ETAGS"; then -- echo "$as_me:2983: result: $ETAGS" >&5 -+ echo "$as_me:3031: result: $ETAGS" >&5 - echo "${ECHO_T}$ETAGS" >&6 - else -- echo "$as_me:2986: result: no" >&5 -+ echo "$as_me:3034: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -2992,7 +3040,7 @@ - - # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args. - set dummy ${CTAGS:-ctags}; ac_word=$2 --echo "$as_me:2995: checking for $ac_word" >&5 -+echo "$as_me:3043: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3007,7 +3055,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_MAKE_LOWER_TAGS="yes" --echo "$as_me:3010: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3058: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3016,17 +3064,17 @@ - fi - MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS - if test -n "$MAKE_LOWER_TAGS"; then -- echo "$as_me:3019: result: $MAKE_LOWER_TAGS" >&5 -+ echo "$as_me:3067: result: $MAKE_LOWER_TAGS" >&5 - echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6 - else -- echo "$as_me:3022: result: no" >&5 -+ echo "$as_me:3070: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - - if test "$cf_cv_mixedcase" = yes ; then - # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args. - set dummy ${ETAGS:-etags}; ac_word=$2 --echo "$as_me:3029: checking for $ac_word" >&5 -+echo "$as_me:3077: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3041,7 +3089,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_MAKE_UPPER_TAGS="yes" --echo "$as_me:3044: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3092: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3050,10 +3098,10 @@ - fi - MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS - if test -n "$MAKE_UPPER_TAGS"; then -- echo "$as_me:3053: result: $MAKE_UPPER_TAGS" >&5 -+ echo "$as_me:3101: result: $MAKE_UPPER_TAGS" >&5 - echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6 - else -- echo "$as_me:3056: result: no" >&5 -+ echo "$as_me:3104: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3073,7 +3121,7 @@ - MAKE_LOWER_TAGS="#" - fi - --echo "$as_me:3076: checking for makeflags variable" >&5 -+echo "$as_me:3124: checking for makeflags variable" >&5 - echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6 - if test "${cf_cv_makeflags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3087,7 +3135,7 @@ - all : - @ echo '.$cf_option' - CF_EOF -- cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[ ]*$,,'` -+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'` - case "$cf_result" in - .*k) - cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` -@@ -3107,13 +3155,13 @@ - rm -f cf_makeflags.tmp - - fi --echo "$as_me:3110: result: $cf_cv_makeflags" >&5 -+echo "$as_me:3158: result: $cf_cv_makeflags" >&5 - echo "${ECHO_T}$cf_cv_makeflags" >&6 - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. - set dummy ${ac_tool_prefix}ranlib; ac_word=$2 --echo "$as_me:3116: checking for $ac_word" >&5 -+echo "$as_me:3164: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3128,7 +3176,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" --echo "$as_me:3131: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3179: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3136,10 +3184,10 @@ - fi - RANLIB=$ac_cv_prog_RANLIB - if test -n "$RANLIB"; then -- echo "$as_me:3139: result: $RANLIB" >&5 -+ echo "$as_me:3187: result: $RANLIB" >&5 - echo "${ECHO_T}$RANLIB" >&6 - else -- echo "$as_me:3142: result: no" >&5 -+ echo "$as_me:3190: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3148,7 +3196,7 @@ - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. - set dummy ranlib; ac_word=$2 --echo "$as_me:3151: checking for $ac_word" >&5 -+echo "$as_me:3199: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3163,7 +3211,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_RANLIB="ranlib" --echo "$as_me:3166: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3214: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3172,10 +3220,10 @@ - fi - ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB - if test -n "$ac_ct_RANLIB"; then -- echo "$as_me:3175: result: $ac_ct_RANLIB" >&5 -+ echo "$as_me:3223: result: $ac_ct_RANLIB" >&5 - echo "${ECHO_T}$ac_ct_RANLIB" >&6 - else -- echo "$as_me:3178: result: no" >&5 -+ echo "$as_me:3226: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3187,7 +3235,7 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. - set dummy ${ac_tool_prefix}ld; ac_word=$2 --echo "$as_me:3190: checking for $ac_word" >&5 -+echo "$as_me:3238: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3202,7 +3250,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_LD="${ac_tool_prefix}ld" --echo "$as_me:3205: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3253: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3210,10 +3258,10 @@ - fi - LD=$ac_cv_prog_LD - if test -n "$LD"; then -- echo "$as_me:3213: result: $LD" >&5 -+ echo "$as_me:3261: result: $LD" >&5 - echo "${ECHO_T}$LD" >&6 - else -- echo "$as_me:3216: result: no" >&5 -+ echo "$as_me:3264: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3222,7 +3270,7 @@ - ac_ct_LD=$LD - # Extract the first word of "ld", so it can be a program name with args. - set dummy ld; ac_word=$2 --echo "$as_me:3225: checking for $ac_word" >&5 -+echo "$as_me:3273: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_LD+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3237,7 +3285,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_LD="ld" --echo "$as_me:3240: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3288: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3246,10 +3294,10 @@ - fi - ac_ct_LD=$ac_cv_prog_ac_ct_LD - if test -n "$ac_ct_LD"; then -- echo "$as_me:3249: result: $ac_ct_LD" >&5 -+ echo "$as_me:3297: result: $ac_ct_LD" >&5 - echo "${ECHO_T}$ac_ct_LD" >&6 - else -- echo "$as_me:3252: result: no" >&5 -+ echo "$as_me:3300: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3261,7 +3309,7 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. - set dummy ${ac_tool_prefix}ar; ac_word=$2 --echo "$as_me:3264: checking for $ac_word" >&5 -+echo "$as_me:3312: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3276,7 +3324,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_AR="${ac_tool_prefix}ar" --echo "$as_me:3279: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3327: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3284,10 +3332,10 @@ - fi - AR=$ac_cv_prog_AR - if test -n "$AR"; then -- echo "$as_me:3287: result: $AR" >&5 -+ echo "$as_me:3335: result: $AR" >&5 - echo "${ECHO_T}$AR" >&6 - else -- echo "$as_me:3290: result: no" >&5 -+ echo "$as_me:3338: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3296,7 +3344,7 @@ - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. - set dummy ar; ac_word=$2 --echo "$as_me:3299: checking for $ac_word" >&5 -+echo "$as_me:3347: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3311,7 +3359,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_AR="ar" --echo "$as_me:3314: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3362: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3320,10 +3368,10 @@ - fi - ac_ct_AR=$ac_cv_prog_ac_ct_AR - if test -n "$ac_ct_AR"; then -- echo "$as_me:3323: result: $ac_ct_AR" >&5 -+ echo "$as_me:3371: result: $ac_ct_AR" >&5 - echo "${ECHO_T}$ac_ct_AR" >&6 - else -- echo "$as_me:3326: result: no" >&5 -+ echo "$as_me:3374: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3335,7 +3383,7 @@ - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. - set dummy ${ac_tool_prefix}ar; ac_word=$2 --echo "$as_me:3338: checking for $ac_word" >&5 -+echo "$as_me:3386: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3350,7 +3398,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_AR="${ac_tool_prefix}ar" --echo "$as_me:3353: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3401: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3358,10 +3406,10 @@ - fi - AR=$ac_cv_prog_AR - if test -n "$AR"; then -- echo "$as_me:3361: result: $AR" >&5 -+ echo "$as_me:3409: result: $AR" >&5 - echo "${ECHO_T}$AR" >&6 - else -- echo "$as_me:3364: result: no" >&5 -+ echo "$as_me:3412: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3370,7 +3418,7 @@ - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. - set dummy ar; ac_word=$2 --echo "$as_me:3373: checking for $ac_word" >&5 -+echo "$as_me:3421: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_ac_ct_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3385,7 +3433,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_ac_ct_AR="ar" --echo "$as_me:3388: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3436: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3394,10 +3442,10 @@ - fi - ac_ct_AR=$ac_cv_prog_ac_ct_AR - if test -n "$ac_ct_AR"; then -- echo "$as_me:3397: result: $ac_ct_AR" >&5 -+ echo "$as_me:3445: result: $ac_ct_AR" >&5 - echo "${ECHO_T}$ac_ct_AR" >&6 - else -- echo "$as_me:3400: result: no" >&5 -+ echo "$as_me:3448: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3406,7 +3454,7 @@ - AR="$ac_cv_prog_AR" - fi - --echo "$as_me:3409: checking for options to update archives" >&5 -+echo "$as_me:3457: checking for options to update archives" >&5 - echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6 - if test "${cf_cv_ar_flags+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3429,13 +3477,13 @@ - rm -f conftest.a - - cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:3483: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3438: \$? = $ac_status" >&5 -+ echo "$as_me:3486: \$? = $ac_status" >&5 - (exit $ac_status); } ; then - echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5 - $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null -@@ -3446,7 +3494,7 @@ - else - test -n "$verbose" && echo " cannot compile test-program" 1>&6 - --echo "${as_me:-configure}:3449: testing cannot compile test-program ..." 1>&5 -+echo "${as_me:-configure}:3497: testing cannot compile test-program ..." 1>&5 - - break - fi -@@ -3454,7 +3502,7 @@ - rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext - - fi --echo "$as_me:3457: result: $cf_cv_ar_flags" >&5 -+echo "$as_me:3505: result: $cf_cv_ar_flags" >&5 - echo "${ECHO_T}$cf_cv_ar_flags" >&6 - - if test -n "$ARFLAGS" ; then -@@ -3465,7 +3513,7 @@ - ARFLAGS=$cf_cv_ar_flags - fi - --echo "$as_me:3468: checking if you have specified an install-prefix" >&5 -+echo "$as_me:3516: checking if you have specified an install-prefix" >&5 - echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6 - - # Check whether --with-install-prefix or --without-install-prefix was given. -@@ -3478,7 +3526,7 @@ - ;; - esac - fi; --echo "$as_me:3481: result: $DESTDIR" >&5 -+echo "$as_me:3529: result: $DESTDIR" >&5 - echo "${ECHO_T}$DESTDIR" >&6 - - ############################################################################### -@@ -3506,7 +3554,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:3509: checking for $ac_word" >&5 -+echo "$as_me:3557: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_BUILD_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3521,7 +3569,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_BUILD_CC="$ac_prog" --echo "$as_me:3524: found $ac_dir/$ac_word" >&5 -+echo "$as_me:3572: found $ac_dir/$ac_word" >&5 - break - done - -@@ -3529,10 +3577,10 @@ - fi - BUILD_CC=$ac_cv_prog_BUILD_CC - if test -n "$BUILD_CC"; then -- echo "$as_me:3532: result: $BUILD_CC" >&5 -+ echo "$as_me:3580: result: $BUILD_CC" >&5 - echo "${ECHO_T}$BUILD_CC" >&6 - else -- echo "$as_me:3535: result: no" >&5 -+ echo "$as_me:3583: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -3540,12 +3588,12 @@ - done - - fi; -- echo "$as_me:3543: checking for native build C compiler" >&5 -+ echo "$as_me:3591: checking for native build C compiler" >&5 - echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6 -- echo "$as_me:3545: result: $BUILD_CC" >&5 -+ echo "$as_me:3593: result: $BUILD_CC" >&5 - echo "${ECHO_T}$BUILD_CC" >&6 - -- echo "$as_me:3548: checking for native build C preprocessor" >&5 -+ echo "$as_me:3596: checking for native build C preprocessor" >&5 - echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6 - - # Check whether --with-build-cpp or --without-build-cpp was given. -@@ -3555,10 +3603,10 @@ - else - BUILD_CPP='${BUILD_CC} -E' - fi; -- echo "$as_me:3558: result: $BUILD_CPP" >&5 -+ echo "$as_me:3606: result: $BUILD_CPP" >&5 - echo "${ECHO_T}$BUILD_CPP" >&6 - -- echo "$as_me:3561: checking for native build C flags" >&5 -+ echo "$as_me:3609: checking for native build C flags" >&5 - echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6 - - # Check whether --with-build-cflags or --without-build-cflags was given. -@@ -3566,10 +3614,10 @@ - withval="$with_build_cflags" - BUILD_CFLAGS="$withval" - fi; -- echo "$as_me:3569: result: $BUILD_CFLAGS" >&5 -+ echo "$as_me:3617: result: $BUILD_CFLAGS" >&5 - echo "${ECHO_T}$BUILD_CFLAGS" >&6 - -- echo "$as_me:3572: checking for native build C preprocessor-flags" >&5 -+ echo "$as_me:3620: checking for native build C preprocessor-flags" >&5 - echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6 - - # Check whether --with-build-cppflags or --without-build-cppflags was given. -@@ -3577,10 +3625,10 @@ - withval="$with_build_cppflags" - BUILD_CPPFLAGS="$withval" - fi; -- echo "$as_me:3580: result: $BUILD_CPPFLAGS" >&5 -+ echo "$as_me:3628: result: $BUILD_CPPFLAGS" >&5 - echo "${ECHO_T}$BUILD_CPPFLAGS" >&6 - -- echo "$as_me:3583: checking for native build linker-flags" >&5 -+ echo "$as_me:3631: checking for native build linker-flags" >&5 - echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6 - - # Check whether --with-build-ldflags or --without-build-ldflags was given. -@@ -3588,10 +3636,10 @@ - withval="$with_build_ldflags" - BUILD_LDFLAGS="$withval" - fi; -- echo "$as_me:3591: result: $BUILD_LDFLAGS" >&5 -+ echo "$as_me:3639: result: $BUILD_LDFLAGS" >&5 - echo "${ECHO_T}$BUILD_LDFLAGS" >&6 - -- echo "$as_me:3594: checking for native build linker-libraries" >&5 -+ echo "$as_me:3642: checking for native build linker-libraries" >&5 - echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6 - - # Check whether --with-build-libs or --without-build-libs was given. -@@ -3599,7 +3647,7 @@ - withval="$with_build_libs" - BUILD_LIBS="$withval" - fi; -- echo "$as_me:3602: result: $BUILD_LIBS" >&5 -+ echo "$as_me:3650: result: $BUILD_LIBS" >&5 - echo "${ECHO_T}$BUILD_LIBS" >&6 - - # this assumes we're on Unix. -@@ -3609,7 +3657,7 @@ - : ${BUILD_CC:='${CC}'} - - if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then -- { { echo "$as_me:3612: error: Cross-build requires two compilers. -+ { { echo "$as_me:3660: error: Cross-build requires two compilers. - Use --with-build-cc to specify the native compiler." >&5 - echo "$as_me: error: Cross-build requires two compilers. - Use --with-build-cc to specify the native compiler." >&2;} -@@ -3633,23 +3681,38 @@ - ### Use "--without-normal --with-shared" to allow the default model to be - ### shared, for example. - cf_list_models="" --echo "$as_me:3636: checking for specified models" >&5 -+ -+echo "$as_me:3685: checking if you want to build shared C-objects" >&5 -+echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6 -+ -+# Check whether --with-shared or --without-shared was given. -+if test "${with_shared+set}" = set; then -+ withval="$with_shared" -+ with_shared=$withval -+else -+ with_shared=no -+fi; -+echo "$as_me:3695: result: $with_shared" >&5 -+echo "${ECHO_T}$with_shared" >&6 -+test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" -+ -+echo "$as_me:3699: checking for specified models" >&5 - echo $ECHO_N "checking for specified models... $ECHO_C" >&6 - test -z "$cf_list_models" && cf_list_models=normal --echo "$as_me:3639: result: $cf_list_models" >&5 -+echo "$as_me:3702: result: $cf_list_models" >&5 - echo "${ECHO_T}$cf_list_models" >&6 - - ### Use the first model as the default, and save its suffix for use in building - ### up test-applications. --echo "$as_me:3644: checking for default model" >&5 -+echo "$as_me:3707: checking for default model" >&5 - echo $ECHO_N "checking for default model... $ECHO_C" >&6 - DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'` --echo "$as_me:3647: result: $DFT_LWR_MODEL" >&5 -+echo "$as_me:3710: result: $DFT_LWR_MODEL" >&5 - echo "${ECHO_T}$DFT_LWR_MODEL" >&6 - - DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` - --echo "$as_me:3652: checking for specific curses-directory" >&5 -+echo "$as_me:3715: checking for specific curses-directory" >&5 - echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6 - - # Check whether --with-curses-dir or --without-curses-dir was given. -@@ -3659,7 +3722,7 @@ - else - cf_cv_curses_dir=no - fi; --echo "$as_me:3662: result: $cf_cv_curses_dir" >&5 -+echo "$as_me:3725: result: $cf_cv_curses_dir" >&5 - echo "${ECHO_T}$cf_cv_curses_dir" >&6 - - if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) -@@ -3690,7 +3753,7 @@ - withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:3693: error: expected a pathname, not \"$withval\"" >&5 -+ { { echo "$as_me:3756: error: expected a pathname, not \"$withval\"" >&5 - echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -3723,7 +3786,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 3726 "configure" -+#line 3789 "configure" - #include "confdefs.h" - #include - int -@@ -3735,16 +3798,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3738: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3801: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3741: \$? = $ac_status" >&5 -+ echo "$as_me:3804: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3744: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3807: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3747: \$? = $ac_status" >&5 -+ echo "$as_me:3810: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -3761,7 +3824,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:3764: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:3827: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -3795,7 +3858,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:3798: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:3861: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -3806,7 +3869,7 @@ - fi - fi - --echo "$as_me:3809: checking if you want wide-character code" >&5 -+echo "$as_me:3872: checking if you want wide-character code" >&5 - echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6 - - # Check whether --enable-widec or --disable-widec was given. -@@ -3816,11 +3879,11 @@ - else - with_widec=no - fi; --echo "$as_me:3819: result: $with_widec" >&5 -+echo "$as_me:3882: result: $with_widec" >&5 - echo "${ECHO_T}$with_widec" >&6 - if test "$with_widec" = yes ; then - --echo "$as_me:3823: checking for multibyte character support" >&5 -+echo "$as_me:3886: checking for multibyte character support" >&5 - echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6 - if test "${cf_cv_utf8_lib+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3828,7 +3891,7 @@ - - cf_save_LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 3831 "configure" -+#line 3894 "configure" - #include "confdefs.h" - - #include -@@ -3841,16 +3904,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:3844: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:3907: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:3847: \$? = $ac_status" >&5 -+ echo "$as_me:3910: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:3850: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3913: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3853: \$? = $ac_status" >&5 -+ echo "$as_me:3916: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_utf8_lib=yes - else -@@ -3862,12 +3925,12 @@ - cf_cv_header_path_utf8= - cf_cv_library_path_utf8= - --echo "${as_me:-configure}:3865: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 -+echo "${as_me:-configure}:3928: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 - - cf_save_LIBS="$LIBS" - - cat >conftest.$ac_ext <<_ACEOF --#line 3870 "configure" -+#line 3933 "configure" - #include "confdefs.h" - - #include -@@ -3880,16 +3943,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:3883: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:3946: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:3886: \$? = $ac_status" >&5 -+ echo "$as_me:3949: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:3889: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3952: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3892: \$? = $ac_status" >&5 -+ echo "$as_me:3955: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_find_linkage_utf8=yes -@@ -3903,7 +3966,7 @@ - LIBS="-lutf8 $cf_save_LIBS" - - cat >conftest.$ac_ext <<_ACEOF --#line 3906 "configure" -+#line 3969 "configure" - #include "confdefs.h" - - #include -@@ -3916,16 +3979,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:3919: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:3982: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:3922: \$? = $ac_status" >&5 -+ echo "$as_me:3985: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:3925: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3988: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3928: \$? = $ac_status" >&5 -+ echo "$as_me:3991: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_find_linkage_utf8=yes -@@ -3942,9 +4005,9 @@ - - test -n "$verbose" && echo " find linkage for utf8 library" 1>&6 - --echo "${as_me:-configure}:3945: testing find linkage for utf8 library ..." 1>&5 -+echo "${as_me:-configure}:4008: testing find linkage for utf8 library ..." 1>&5 - --echo "${as_me:-configure}:3947: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 -+echo "${as_me:-configure}:4010: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 - - cf_save_CPPFLAGS="$CPPFLAGS" - cf_test_CPPFLAGS="$CPPFLAGS" -@@ -4057,11 +4120,11 @@ - if test -d $cf_cv_header_path_utf8 ; then - test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6 - --echo "${as_me:-configure}:4060: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:4123: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 - - CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8" - cat >conftest.$ac_ext <<_ACEOF --#line 4064 "configure" -+#line 4127 "configure" - #include "confdefs.h" - - #include -@@ -4074,21 +4137,21 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4077: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4140: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4080: \$? = $ac_status" >&5 -+ echo "$as_me:4143: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4083: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4146: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4086: \$? = $ac_status" >&5 -+ echo "$as_me:4149: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6 - --echo "${as_me:-configure}:4091: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:4154: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 - - cf_cv_find_linkage_utf8=maybe - cf_test_CPPFLAGS="$CPPFLAGS" -@@ -4106,7 +4169,7 @@ - - if test "$cf_cv_find_linkage_utf8" = maybe ; then - --echo "${as_me:-configure}:4109: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 -+echo "${as_me:-configure}:4172: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 - - cf_save_LIBS="$LIBS" - cf_save_LDFLAGS="$LDFLAGS" -@@ -4203,13 +4266,13 @@ - if test -d $cf_cv_library_path_utf8 ; then - test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6 - --echo "${as_me:-configure}:4206: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:4269: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 - - CPPFLAGS="$cf_test_CPPFLAGS" - LIBS="-lutf8 $cf_save_LIBS" - LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8" - cat >conftest.$ac_ext <<_ACEOF --#line 4212 "configure" -+#line 4275 "configure" - #include "confdefs.h" - - #include -@@ -4222,21 +4285,21 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:4225: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:4288: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:4228: \$? = $ac_status" >&5 -+ echo "$as_me:4291: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:4231: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4294: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4234: \$? = $ac_status" >&5 -+ echo "$as_me:4297: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6 - --echo "${as_me:-configure}:4239: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:4302: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 - - cf_cv_find_linkage_utf8=yes - cf_cv_library_file_utf8="-lutf8" -@@ -4278,7 +4341,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:4281: result: $cf_cv_utf8_lib" >&5 -+echo "$as_me:4344: result: $cf_cv_utf8_lib" >&5 - echo "${ECHO_T}$cf_cv_utf8_lib" >&6 - - # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between -@@ -4312,7 +4375,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 4315 "configure" -+#line 4378 "configure" - #include "confdefs.h" - #include - int -@@ -4324,16 +4387,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4327: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4390: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4330: \$? = $ac_status" >&5 -+ echo "$as_me:4393: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4333: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4396: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4336: \$? = $ac_status" >&5 -+ echo "$as_me:4399: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -4350,7 +4413,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:4353: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:4416: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -4384,7 +4447,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:4387: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:4450: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -4402,7 +4465,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:4405: checking for $ac_word" >&5 -+echo "$as_me:4468: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4419,7 +4482,7 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:4422: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:4485: found $ac_dir/$ac_word" >&5 - break - fi - done -@@ -4430,10 +4493,10 @@ - NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG - - if test -n "$NCURSES_CONFIG"; then -- echo "$as_me:4433: result: $NCURSES_CONFIG" >&5 -+ echo "$as_me:4496: result: $NCURSES_CONFIG" >&5 - echo "${ECHO_T}$NCURSES_CONFIG" >&6 - else -- echo "$as_me:4436: result: no" >&5 -+ echo "$as_me:4499: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -4448,7 +4511,7 @@ - - # even with config script, some packages use no-override for curses.h - --echo "$as_me:4451: checking if we have identified curses headers" >&5 -+echo "$as_me:4514: checking if we have identified curses headers" >&5 - echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 - if test "${cf_cv_ncurses_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4462,7 +4525,7 @@ - ncurses.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 4465 "configure" -+#line 4528 "configure" - #include "confdefs.h" - #include <${cf_header}> - int -@@ -4474,16 +4537,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4477: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4480: \$? = $ac_status" >&5 -+ echo "$as_me:4543: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4483: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4546: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4486: \$? = $ac_status" >&5 -+ echo "$as_me:4549: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_header=$cf_header; break - else -@@ -4494,11 +4557,11 @@ - done - - fi --echo "$as_me:4497: result: $cf_cv_ncurses_header" >&5 -+echo "$as_me:4560: result: $cf_cv_ncurses_header" >&5 - echo "${ECHO_T}$cf_cv_ncurses_header" >&6 - - if test "$cf_cv_ncurses_header" = none ; then -- { { echo "$as_me:4501: error: No curses header-files found" >&5 -+ { { echo "$as_me:4564: error: No curses header-files found" >&5 - echo "$as_me: error: No curses header-files found" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -4508,23 +4571,23 @@ - for ac_header in $cf_cv_ncurses_header - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:4511: checking for $ac_header" >&5 -+echo "$as_me:4574: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 4517 "configure" -+#line 4580 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:4521: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:4584: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:4527: \$? = $ac_status" >&5 -+ echo "$as_me:4590: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -4543,7 +4606,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:4546: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:4609: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <conftest.$ac_ext <<_ACEOF --#line 4599 "configure" -+#line 4662 "configure" - #include "confdefs.h" - #include - int -@@ -4608,16 +4671,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4611: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4674: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4614: \$? = $ac_status" >&5 -+ echo "$as_me:4677: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4617: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4680: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4620: \$? = $ac_status" >&5 -+ echo "$as_me:4683: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -4634,7 +4697,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:4637: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:4700: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -4651,7 +4714,7 @@ - - } - --echo "$as_me:4654: checking for $cf_ncuhdr_root header in include-path" >&5 -+echo "$as_me:4717: checking for $cf_ncuhdr_root header in include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4663,7 +4726,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 4666 "configure" -+#line 4729 "configure" - #include "confdefs.h" - - #define _XOPEN_SOURCE_EXTENDED -@@ -4695,16 +4758,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4698: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4761: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4701: \$? = $ac_status" >&5 -+ echo "$as_me:4764: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4704: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4767: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4707: \$? = $ac_status" >&5 -+ echo "$as_me:4770: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h=$cf_header - -@@ -4719,14 +4782,14 @@ - done - - fi --echo "$as_me:4722: result: $cf_cv_ncurses_h" >&5 -+echo "$as_me:4785: result: $cf_cv_ncurses_h" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h" >&6 - - if test "$cf_cv_ncurses_h" != no ; then - cf_cv_ncurses_header=$cf_cv_ncurses_h - else - --echo "$as_me:4729: checking for $cf_ncuhdr_root include-path" >&5 -+echo "$as_me:4792: checking for $cf_ncuhdr_root include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4866,7 +4929,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 4869 "configure" -+#line 4932 "configure" - #include "confdefs.h" - #include - int -@@ -4878,16 +4941,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4881: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4944: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4884: \$? = $ac_status" >&5 -+ echo "$as_me:4947: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4887: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4950: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4890: \$? = $ac_status" >&5 -+ echo "$as_me:4953: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -4904,7 +4967,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:4907: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:4970: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -4925,7 +4988,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 4928 "configure" -+#line 4991 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -4949,16 +5012,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4952: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5015: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4955: \$? = $ac_status" >&5 -+ echo "$as_me:5018: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4958: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5021: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4961: \$? = $ac_status" >&5 -+ echo "$as_me:5024: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h2=$cf_header - -@@ -4979,12 +5042,12 @@ - CPPFLAGS="$cf_save2_CPPFLAGS" - test "$cf_cv_ncurses_h2" != no && break - done -- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4982: error: not found" >&5 -+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5045: error: not found" >&5 - echo "$as_me: error: not found" >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:4987: result: $cf_cv_ncurses_h2" >&5 -+echo "$as_me:5050: result: $cf_cv_ncurses_h2" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 - - cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'` -@@ -5017,7 +5080,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 5020 "configure" -+#line 5083 "configure" - #include "confdefs.h" - #include - int -@@ -5029,16 +5092,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5032: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5095: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5035: \$? = $ac_status" >&5 -+ echo "$as_me:5098: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5038: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5101: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5041: \$? = $ac_status" >&5 -+ echo "$as_me:5104: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -5055,7 +5118,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:5058: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:5121: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -5098,7 +5161,7 @@ - ;; - esac - --echo "$as_me:5101: checking for terminfo header" >&5 -+echo "$as_me:5164: checking for terminfo header" >&5 - echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 - if test "${cf_cv_term_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5116,7 +5179,7 @@ - for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" - do - cat >conftest.$ac_ext <<_ACEOF --#line 5119 "configure" -+#line 5182 "configure" - #include "confdefs.h" - #include - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -5131,16 +5194,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5134: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5197: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5137: \$? = $ac_status" >&5 -+ echo "$as_me:5200: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5140: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5203: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5143: \$? = $ac_status" >&5 -+ echo "$as_me:5206: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_term_header="$cf_test" -@@ -5156,7 +5219,7 @@ - done - - fi --echo "$as_me:5159: result: $cf_cv_term_header" >&5 -+echo "$as_me:5222: result: $cf_cv_term_header" >&5 - echo "${ECHO_T}$cf_cv_term_header" >&6 - - # Set definitions to allow ifdef'ing to accommodate subdirectories -@@ -5190,7 +5253,7 @@ - #define NCURSES 1 - EOF - --echo "$as_me:5193: checking for ncurses version" >&5 -+echo "$as_me:5256: checking for ncurses version" >&5 - echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 - if test "${cf_cv_ncurses_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5216,10 +5279,10 @@ - #endif - EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" -- { (eval echo "$as_me:5219: \"$cf_try\"") >&5 -+ { (eval echo "$as_me:5282: \"$cf_try\"") >&5 - (eval $cf_try) 2>&5 - ac_status=$? -- echo "$as_me:5222: \$? = $ac_status" >&5 -+ echo "$as_me:5285: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f conftest.out ; then - cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` -@@ -5229,7 +5292,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 5232 "configure" -+#line 5295 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -5254,15 +5317,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:5257: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5320: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5260: \$? = $ac_status" >&5 -+ echo "$as_me:5323: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:5262: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5325: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5265: \$? = $ac_status" >&5 -+ echo "$as_me:5328: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_ncurses_version=`cat $cf_tempfile` -@@ -5276,7 +5339,7 @@ - rm -f $cf_tempfile - - fi --echo "$as_me:5279: result: $cf_cv_ncurses_version" >&5 -+echo "$as_me:5342: result: $cf_cv_ncurses_version" >&5 - echo "${ECHO_T}$cf_cv_ncurses_version" >&6 - test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF - #define NCURSES 1 -@@ -5288,7 +5351,7 @@ - # to link gpm. - cf_ncurses_LIBS="" - cf_ncurses_SAVE="$LIBS" --echo "$as_me:5291: checking for Gpm_Open in -lgpm" >&5 -+echo "$as_me:5354: checking for Gpm_Open in -lgpm" >&5 - echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5296,7 +5359,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5299 "configure" -+#line 5362 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5315,16 +5378,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5318: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5381: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5321: \$? = $ac_status" >&5 -+ echo "$as_me:5384: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5324: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5387: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5327: \$? = $ac_status" >&5 -+ echo "$as_me:5390: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_Gpm_Open=yes - else -@@ -5335,10 +5398,10 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5338: result: $ac_cv_lib_gpm_Gpm_Open" >&5 -+echo "$as_me:5401: result: $ac_cv_lib_gpm_Gpm_Open" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 - if test $ac_cv_lib_gpm_Gpm_Open = yes; then -- echo "$as_me:5341: checking for initscr in -lgpm" >&5 -+ echo "$as_me:5404: checking for initscr in -lgpm" >&5 - echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5346,7 +5409,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5349 "configure" -+#line 5412 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5365,16 +5428,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5368: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5431: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5371: \$? = $ac_status" >&5 -+ echo "$as_me:5434: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5374: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5437: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5377: \$? = $ac_status" >&5 -+ echo "$as_me:5440: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_initscr=yes - else -@@ -5385,7 +5448,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5388: result: $ac_cv_lib_gpm_initscr" >&5 -+echo "$as_me:5451: result: $ac_cv_lib_gpm_initscr" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 - if test $ac_cv_lib_gpm_initscr = yes; then - LIBS="$cf_ncurses_SAVE" -@@ -5400,7 +5463,7 @@ - # This is only necessary if you are linking against an obsolete - # version of ncurses (but it should do no harm, since it's static). - if test "$cf_nculib_root" = ncurses ; then -- echo "$as_me:5403: checking for tgoto in -lmytinfo" >&5 -+ echo "$as_me:5466: checking for tgoto in -lmytinfo" >&5 - echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 - if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5408,7 +5471,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lmytinfo $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5411 "configure" -+#line 5474 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5427,16 +5490,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5430: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5493: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5433: \$? = $ac_status" >&5 -+ echo "$as_me:5496: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5436: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5499: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5439: \$? = $ac_status" >&5 -+ echo "$as_me:5502: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_mytinfo_tgoto=yes - else -@@ -5447,7 +5510,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5450: result: $ac_cv_lib_mytinfo_tgoto" >&5 -+echo "$as_me:5513: result: $ac_cv_lib_mytinfo_tgoto" >&5 - echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 - if test $ac_cv_lib_mytinfo_tgoto = yes; then - cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" -@@ -5466,13 +5529,13 @@ - - eval 'cf_cv_have_lib_'$cf_nculib_root'=no' - cf_libdir="" -- echo "$as_me:5469: checking for initscr" >&5 -+ echo "$as_me:5532: checking for initscr" >&5 - echo $ECHO_N "checking for initscr... $ECHO_C" >&6 - if test "${ac_cv_func_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 5475 "configure" -+#line 5538 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char initscr (); below. */ -@@ -5503,16 +5566,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5506: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5569: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5509: \$? = $ac_status" >&5 -+ echo "$as_me:5572: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5512: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5575: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5515: \$? = $ac_status" >&5 -+ echo "$as_me:5578: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_initscr=yes - else -@@ -5522,18 +5585,18 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:5525: result: $ac_cv_func_initscr" >&5 -+echo "$as_me:5588: result: $ac_cv_func_initscr" >&5 - echo "${ECHO_T}$ac_cv_func_initscr" >&6 - if test $ac_cv_func_initscr = yes; then - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - else - - cf_save_LIBS="$LIBS" -- echo "$as_me:5532: checking for initscr in -l$cf_nculib_root" >&5 -+ echo "$as_me:5595: checking for initscr in -l$cf_nculib_root" >&5 - echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 - LIBS="-l$cf_nculib_root $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5536 "configure" -+#line 5599 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5545,25 +5608,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5548: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5611: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5551: \$? = $ac_status" >&5 -+ echo "$as_me:5614: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5554: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5617: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5557: \$? = $ac_status" >&5 -+ echo "$as_me:5620: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:5559: result: yes" >&5 -+ echo "$as_me:5622: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:5566: result: no" >&5 -+echo "$as_me:5629: result: no" >&5 - echo "${ECHO_T}no" >&6 - - cf_search= -@@ -5653,11 +5716,11 @@ - - for cf_libdir in $cf_search - do -- echo "$as_me:5656: checking for -l$cf_nculib_root in $cf_libdir" >&5 -+ echo "$as_me:5719: checking for -l$cf_nculib_root in $cf_libdir" >&5 - echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 - LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5660 "configure" -+#line 5723 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5669,25 +5732,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5672: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5735: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5675: \$? = $ac_status" >&5 -+ echo "$as_me:5738: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5678: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5741: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5681: \$? = $ac_status" >&5 -+ echo "$as_me:5744: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:5683: result: yes" >&5 -+ echo "$as_me:5746: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - break - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:5690: result: no" >&5 -+echo "$as_me:5753: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_save_LIBS" - fi -@@ -5702,7 +5765,7 @@ - eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root - - if test $cf_found_library = no ; then -- { { echo "$as_me:5705: error: Cannot link $cf_nculib_root library" >&5 -+ { { echo "$as_me:5768: error: Cannot link $cf_nculib_root library" >&5 - echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -5710,7 +5773,7 @@ - fi - - if test -n "$cf_ncurses_LIBS" ; then -- echo "$as_me:5713: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 -+ echo "$as_me:5776: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 - echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 - cf_ncurses_SAVE="$LIBS" - for p in $cf_ncurses_LIBS ; do -@@ -5720,7 +5783,7 @@ - fi - done - cat >conftest.$ac_ext <<_ACEOF --#line 5723 "configure" -+#line 5786 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5732,23 +5795,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5735: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5798: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5738: \$? = $ac_status" >&5 -+ echo "$as_me:5801: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5741: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5804: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5744: \$? = $ac_status" >&5 -+ echo "$as_me:5807: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:5746: result: yes" >&5 -+ echo "$as_me:5809: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:5751: result: no" >&5 -+echo "$as_me:5814: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_ncurses_SAVE" - fi -@@ -5772,7 +5835,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:5775: checking for $ac_word" >&5 -+echo "$as_me:5838: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5789,7 +5852,7 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:5792: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:5855: found $ac_dir/$ac_word" >&5 - break - fi - done -@@ -5800,10 +5863,10 @@ - NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG - - if test -n "$NCURSES_CONFIG"; then -- echo "$as_me:5803: result: $NCURSES_CONFIG" >&5 -+ echo "$as_me:5866: result: $NCURSES_CONFIG" >&5 - echo "${ECHO_T}$NCURSES_CONFIG" >&6 - else -- echo "$as_me:5806: result: no" >&5 -+ echo "$as_me:5869: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -5818,7 +5881,7 @@ - - # even with config script, some packages use no-override for curses.h - --echo "$as_me:5821: checking if we have identified curses headers" >&5 -+echo "$as_me:5884: checking if we have identified curses headers" >&5 - echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 - if test "${cf_cv_ncurses_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5832,7 +5895,7 @@ - ncurses.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 5835 "configure" -+#line 5898 "configure" - #include "confdefs.h" - #include <${cf_header}> - int -@@ -5844,16 +5907,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5847: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5910: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5850: \$? = $ac_status" >&5 -+ echo "$as_me:5913: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5853: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5916: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5856: \$? = $ac_status" >&5 -+ echo "$as_me:5919: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_header=$cf_header; break - else -@@ -5864,11 +5927,11 @@ - done - - fi --echo "$as_me:5867: result: $cf_cv_ncurses_header" >&5 -+echo "$as_me:5930: result: $cf_cv_ncurses_header" >&5 - echo "${ECHO_T}$cf_cv_ncurses_header" >&6 - - if test "$cf_cv_ncurses_header" = none ; then -- { { echo "$as_me:5871: error: No curses header-files found" >&5 -+ { { echo "$as_me:5934: error: No curses header-files found" >&5 - echo "$as_me: error: No curses header-files found" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -5878,23 +5941,23 @@ - for ac_header in $cf_cv_ncurses_header - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:5881: checking for $ac_header" >&5 -+echo "$as_me:5944: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 5887 "configure" -+#line 5950 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:5891: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:5954: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:5897: \$? = $ac_status" >&5 -+ echo "$as_me:5960: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -5913,7 +5976,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:5916: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:5979: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <conftest.$ac_ext <<_ACEOF --#line 5969 "configure" -+#line 6032 "configure" - #include "confdefs.h" - #include - int -@@ -5978,16 +6041,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5981: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6044: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5984: \$? = $ac_status" >&5 -+ echo "$as_me:6047: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5987: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6050: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5990: \$? = $ac_status" >&5 -+ echo "$as_me:6053: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -6004,7 +6067,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:6007: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:6070: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -6021,7 +6084,7 @@ - - } - --echo "$as_me:6024: checking for $cf_ncuhdr_root header in include-path" >&5 -+echo "$as_me:6087: checking for $cf_ncuhdr_root header in include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6033,7 +6096,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 6036 "configure" -+#line 6099 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -6057,16 +6120,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6060: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6123: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6063: \$? = $ac_status" >&5 -+ echo "$as_me:6126: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6066: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6129: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6069: \$? = $ac_status" >&5 -+ echo "$as_me:6132: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h=$cf_header - -@@ -6081,14 +6144,14 @@ - done - - fi --echo "$as_me:6084: result: $cf_cv_ncurses_h" >&5 -+echo "$as_me:6147: result: $cf_cv_ncurses_h" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h" >&6 - - if test "$cf_cv_ncurses_h" != no ; then - cf_cv_ncurses_header=$cf_cv_ncurses_h - else - --echo "$as_me:6091: checking for $cf_ncuhdr_root include-path" >&5 -+echo "$as_me:6154: checking for $cf_ncuhdr_root include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6228,7 +6291,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 6231 "configure" -+#line 6294 "configure" - #include "confdefs.h" - #include - int -@@ -6240,16 +6303,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6243: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6306: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6246: \$? = $ac_status" >&5 -+ echo "$as_me:6309: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6249: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6312: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6252: \$? = $ac_status" >&5 -+ echo "$as_me:6315: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -6266,7 +6329,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:6269: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:6332: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -6287,7 +6350,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 6290 "configure" -+#line 6353 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -6311,16 +6374,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6314: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6377: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6317: \$? = $ac_status" >&5 -+ echo "$as_me:6380: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6320: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6383: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6323: \$? = $ac_status" >&5 -+ echo "$as_me:6386: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h2=$cf_header - -@@ -6341,12 +6404,12 @@ - CPPFLAGS="$cf_save2_CPPFLAGS" - test "$cf_cv_ncurses_h2" != no && break - done -- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6344: error: not found" >&5 -+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6407: error: not found" >&5 - echo "$as_me: error: not found" >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:6349: result: $cf_cv_ncurses_h2" >&5 -+echo "$as_me:6412: result: $cf_cv_ncurses_h2" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 - - cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'` -@@ -6379,7 +6442,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 6382 "configure" -+#line 6445 "configure" - #include "confdefs.h" - #include - int -@@ -6391,16 +6454,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6394: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6457: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6397: \$? = $ac_status" >&5 -+ echo "$as_me:6460: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6400: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6463: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6403: \$? = $ac_status" >&5 -+ echo "$as_me:6466: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -6417,7 +6480,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:6420: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:6483: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -6460,7 +6523,7 @@ - ;; - esac - --echo "$as_me:6463: checking for terminfo header" >&5 -+echo "$as_me:6526: checking for terminfo header" >&5 - echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 - if test "${cf_cv_term_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6478,7 +6541,7 @@ - for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" - do - cat >conftest.$ac_ext <<_ACEOF --#line 6481 "configure" -+#line 6544 "configure" - #include "confdefs.h" - #include - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -6493,16 +6556,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6496: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6559: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6499: \$? = $ac_status" >&5 -+ echo "$as_me:6562: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6502: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6565: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6505: \$? = $ac_status" >&5 -+ echo "$as_me:6568: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_term_header="$cf_test" -@@ -6518,7 +6581,7 @@ - done - - fi --echo "$as_me:6521: result: $cf_cv_term_header" >&5 -+echo "$as_me:6584: result: $cf_cv_term_header" >&5 - echo "${ECHO_T}$cf_cv_term_header" >&6 - - # Set definitions to allow ifdef'ing to accommodate subdirectories -@@ -6552,7 +6615,7 @@ - #define NCURSES 1 - EOF - --echo "$as_me:6555: checking for ncurses version" >&5 -+echo "$as_me:6618: checking for ncurses version" >&5 - echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 - if test "${cf_cv_ncurses_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6578,10 +6641,10 @@ - #endif - EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" -- { (eval echo "$as_me:6581: \"$cf_try\"") >&5 -+ { (eval echo "$as_me:6644: \"$cf_try\"") >&5 - (eval $cf_try) 2>&5 - ac_status=$? -- echo "$as_me:6584: \$? = $ac_status" >&5 -+ echo "$as_me:6647: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f conftest.out ; then - cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` -@@ -6591,7 +6654,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 6594 "configure" -+#line 6657 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -6616,15 +6679,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:6619: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6682: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6622: \$? = $ac_status" >&5 -+ echo "$as_me:6685: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:6624: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6687: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6627: \$? = $ac_status" >&5 -+ echo "$as_me:6690: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_ncurses_version=`cat $cf_tempfile` -@@ -6638,7 +6701,7 @@ - rm -f $cf_tempfile - - fi --echo "$as_me:6641: result: $cf_cv_ncurses_version" >&5 -+echo "$as_me:6704: result: $cf_cv_ncurses_version" >&5 - echo "${ECHO_T}$cf_cv_ncurses_version" >&6 - test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF - #define NCURSES 1 -@@ -6650,7 +6713,7 @@ - # to link gpm. - cf_ncurses_LIBS="" - cf_ncurses_SAVE="$LIBS" --echo "$as_me:6653: checking for Gpm_Open in -lgpm" >&5 -+echo "$as_me:6716: checking for Gpm_Open in -lgpm" >&5 - echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6658,7 +6721,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6661 "configure" -+#line 6724 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -6677,16 +6740,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6680: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6743: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6683: \$? = $ac_status" >&5 -+ echo "$as_me:6746: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6686: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6749: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6689: \$? = $ac_status" >&5 -+ echo "$as_me:6752: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_Gpm_Open=yes - else -@@ -6697,10 +6760,10 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:6700: result: $ac_cv_lib_gpm_Gpm_Open" >&5 -+echo "$as_me:6763: result: $ac_cv_lib_gpm_Gpm_Open" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 - if test $ac_cv_lib_gpm_Gpm_Open = yes; then -- echo "$as_me:6703: checking for initscr in -lgpm" >&5 -+ echo "$as_me:6766: checking for initscr in -lgpm" >&5 - echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6708,7 +6771,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6711 "configure" -+#line 6774 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -6727,16 +6790,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6730: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6793: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6733: \$? = $ac_status" >&5 -+ echo "$as_me:6796: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6736: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6799: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6739: \$? = $ac_status" >&5 -+ echo "$as_me:6802: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_initscr=yes - else -@@ -6747,7 +6810,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:6750: result: $ac_cv_lib_gpm_initscr" >&5 -+echo "$as_me:6813: result: $ac_cv_lib_gpm_initscr" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 - if test $ac_cv_lib_gpm_initscr = yes; then - LIBS="$cf_ncurses_SAVE" -@@ -6762,7 +6825,7 @@ - # This is only necessary if you are linking against an obsolete - # version of ncurses (but it should do no harm, since it's static). - if test "$cf_nculib_root" = ncurses ; then -- echo "$as_me:6765: checking for tgoto in -lmytinfo" >&5 -+ echo "$as_me:6828: checking for tgoto in -lmytinfo" >&5 - echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 - if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6770,7 +6833,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lmytinfo $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6773 "configure" -+#line 6836 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -6789,16 +6852,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6792: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6855: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6795: \$? = $ac_status" >&5 -+ echo "$as_me:6858: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6798: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6861: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6801: \$? = $ac_status" >&5 -+ echo "$as_me:6864: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_mytinfo_tgoto=yes - else -@@ -6809,7 +6872,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:6812: result: $ac_cv_lib_mytinfo_tgoto" >&5 -+echo "$as_me:6875: result: $ac_cv_lib_mytinfo_tgoto" >&5 - echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 - if test $ac_cv_lib_mytinfo_tgoto = yes; then - cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" -@@ -6828,13 +6891,13 @@ - - eval 'cf_cv_have_lib_'$cf_nculib_root'=no' - cf_libdir="" -- echo "$as_me:6831: checking for initscr" >&5 -+ echo "$as_me:6894: checking for initscr" >&5 - echo $ECHO_N "checking for initscr... $ECHO_C" >&6 - if test "${ac_cv_func_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 6837 "configure" -+#line 6900 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char initscr (); below. */ -@@ -6865,16 +6928,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6868: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6931: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6871: \$? = $ac_status" >&5 -+ echo "$as_me:6934: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6874: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6937: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6877: \$? = $ac_status" >&5 -+ echo "$as_me:6940: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_initscr=yes - else -@@ -6884,18 +6947,18 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:6887: result: $ac_cv_func_initscr" >&5 -+echo "$as_me:6950: result: $ac_cv_func_initscr" >&5 - echo "${ECHO_T}$ac_cv_func_initscr" >&6 - if test $ac_cv_func_initscr = yes; then - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - else - - cf_save_LIBS="$LIBS" -- echo "$as_me:6894: checking for initscr in -l$cf_nculib_root" >&5 -+ echo "$as_me:6957: checking for initscr in -l$cf_nculib_root" >&5 - echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 - LIBS="-l$cf_nculib_root $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6898 "configure" -+#line 6961 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -6907,25 +6970,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6910: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6973: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6913: \$? = $ac_status" >&5 -+ echo "$as_me:6976: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6916: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6979: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6919: \$? = $ac_status" >&5 -+ echo "$as_me:6982: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:6921: result: yes" >&5 -+ echo "$as_me:6984: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:6928: result: no" >&5 -+echo "$as_me:6991: result: no" >&5 - echo "${ECHO_T}no" >&6 - - cf_search= -@@ -7015,11 +7078,11 @@ - - for cf_libdir in $cf_search - do -- echo "$as_me:7018: checking for -l$cf_nculib_root in $cf_libdir" >&5 -+ echo "$as_me:7081: checking for -l$cf_nculib_root in $cf_libdir" >&5 - echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 - LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 7022 "configure" -+#line 7085 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -7031,25 +7094,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7034: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7097: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7037: \$? = $ac_status" >&5 -+ echo "$as_me:7100: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7040: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7103: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7043: \$? = $ac_status" >&5 -+ echo "$as_me:7106: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:7045: result: yes" >&5 -+ echo "$as_me:7108: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - break - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:7052: result: no" >&5 -+echo "$as_me:7115: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_save_LIBS" - fi -@@ -7064,7 +7127,7 @@ - eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root - - if test $cf_found_library = no ; then -- { { echo "$as_me:7067: error: Cannot link $cf_nculib_root library" >&5 -+ { { echo "$as_me:7130: error: Cannot link $cf_nculib_root library" >&5 - echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -7072,7 +7135,7 @@ - fi - - if test -n "$cf_ncurses_LIBS" ; then -- echo "$as_me:7075: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 -+ echo "$as_me:7138: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 - echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 - cf_ncurses_SAVE="$LIBS" - for p in $cf_ncurses_LIBS ; do -@@ -7082,7 +7145,7 @@ - fi - done - cat >conftest.$ac_ext <<_ACEOF --#line 7085 "configure" -+#line 7148 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -7094,23 +7157,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7097: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7160: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7100: \$? = $ac_status" >&5 -+ echo "$as_me:7163: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7103: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7166: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7106: \$? = $ac_status" >&5 -+ echo "$as_me:7169: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:7108: result: yes" >&5 -+ echo "$as_me:7171: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:7113: result: no" >&5 -+echo "$as_me:7176: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_ncurses_SAVE" - fi -@@ -7132,8 +7195,8 @@ - cf_version=`$NCURSES_CONFIG --version` - - NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'` --NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9]\+\.//' -e 's/\..*//'` --NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9]\+\.[0-9]\+\.//'` -+NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'` -+NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'` - - # ABI version is not available from headers - cf_cv_abi_version=`$NCURSES_CONFIG --abi-version` -@@ -7147,16 +7210,16 @@ - AUTOCONF_$cf_name NCURSES_VERSION_$cf_name - CF_EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out" -- { (eval echo "$as_me:7150: \"$cf_try\"") >&5 -+ { (eval echo "$as_me:7213: \"$cf_try\"") >&5 - (eval $cf_try) 2>&5 - ac_status=$? -- echo "$as_me:7153: \$? = $ac_status" >&5 -+ echo "$as_me:7216: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f conftest.out ; then -- cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ]\+//"` -- eval NCURSES_$cf_name=$cf_result -- cat conftest.$ac_ext -- cat conftest.out -+ cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"` -+ eval NCURSES_$cf_name=\"$cf_result\" -+ # cat conftest.$ac_ext -+ # cat conftest.out - fi - done - -@@ -7168,7 +7231,7 @@ - - cf_cv_timestamp=`date` - --echo "$as_me:7171: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5 -+echo "$as_me:7234: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5 - echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6 - - case $cf_cv_system_name in #(vi -@@ -7191,7 +7254,7 @@ - test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT='' - fi - --echo "$as_me:7194: checking for default loader flags" >&5 -+echo "$as_me:7257: checking for default loader flags" >&5 - echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6 - case $DFT_LWR_MODEL in - normal) LD_MODEL='' ;; -@@ -7199,11 +7262,11 @@ - profile) LD_MODEL='-pg';; - shared) LD_MODEL='' ;; - esac --echo "$as_me:7202: result: $LD_MODEL" >&5 -+echo "$as_me:7265: result: $LD_MODEL" >&5 - echo "${ECHO_T}$LD_MODEL" >&6 - - LD_RPATH_OPT= --echo "$as_me:7206: checking for an rpath option" >&5 -+echo "$as_me:7269: checking for an rpath option" >&5 - echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6 - case $cf_cv_system_name in #(vi - irix*) #(vi -@@ -7234,17 +7297,17 @@ - *) - ;; - esac --echo "$as_me:7237: result: $LD_RPATH_OPT" >&5 -+echo "$as_me:7300: result: $LD_RPATH_OPT" >&5 - echo "${ECHO_T}$LD_RPATH_OPT" >&6 - - case "x$LD_RPATH_OPT" in #(vi - x-R*) -- echo "$as_me:7242: checking if we need a space after rpath option" >&5 -+ echo "$as_me:7305: checking if we need a space after rpath option" >&5 - echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6 - cf_save_LIBS="$LIBS" - LIBS="${LD_RPATH_OPT}$libdir $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 7247 "configure" -+#line 7310 "configure" - #include "confdefs.h" - - int -@@ -7256,16 +7319,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7259: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7322: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7262: \$? = $ac_status" >&5 -+ echo "$as_me:7325: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7265: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7328: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7268: \$? = $ac_status" >&5 -+ echo "$as_me:7331: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_rpath_space=no - else -@@ -7275,7 +7338,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS="$cf_save_LIBS" -- echo "$as_me:7278: result: $cf_rpath_space" >&5 -+ echo "$as_me:7341: result: $cf_rpath_space" >&5 - echo "${ECHO_T}$cf_rpath_space" >&6 - test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT " - ;; -@@ -7290,7 +7353,7 @@ - cf_ld_rpath_opt= - test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT" - -- echo "$as_me:7293: checking if release/abi version should be used for shared libs" >&5 -+ echo "$as_me:7356: checking if release/abi version should be used for shared libs" >&5 - echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6 - - # Check whether --with-shlib-version or --without-shlib-version was given. -@@ -7305,7 +7368,7 @@ - cf_cv_shlib_version=$withval - ;; - *) -- { { echo "$as_me:7308: error: option value must be one of: rel, abi, auto or no" >&5 -+ { { echo "$as_me:7371: error: option value must be one of: rel, abi, auto or no" >&5 - echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -7314,7 +7377,7 @@ - else - cf_cv_shlib_version=auto - fi; -- echo "$as_me:7317: result: $cf_cv_shlib_version" >&5 -+ echo "$as_me:7380: result: $cf_cv_shlib_version" >&5 - echo "${ECHO_T}$cf_cv_shlib_version" >&6 - - cf_cv_rm_so_locs=no -@@ -7323,14 +7386,14 @@ - CC_SHARED_OPTS= - if test "$GCC" = yes - then -- echo "$as_me:7326: checking which $CC option to use" >&5 -+ echo "$as_me:7389: checking which $CC option to use" >&5 - echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6 - cf_save_CFLAGS="$CFLAGS" - for CC_SHARED_OPTS in -fPIC -fpic '' - do - CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" - cat >conftest.$ac_ext <<_ACEOF --#line 7333 "configure" -+#line 7396 "configure" - #include "confdefs.h" - #include - int -@@ -7342,16 +7405,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7345: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7408: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7348: \$? = $ac_status" >&5 -+ echo "$as_me:7411: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7351: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7414: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7354: \$? = $ac_status" >&5 -+ echo "$as_me:7417: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -7360,7 +7423,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - done -- echo "$as_me:7363: result: $CC_SHARED_OPTS" >&5 -+ echo "$as_me:7426: result: $CC_SHARED_OPTS" >&5 - echo "${ECHO_T}$CC_SHARED_OPTS" >&6 - CFLAGS="$cf_save_CFLAGS" - fi -@@ -7402,7 +7465,7 @@ - MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@' - test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi - cf_cv_shlib_version_infix=yes -- echo "$as_me:7405: checking if ld -search_paths_first works" >&5 -+ echo "$as_me:7468: checking if ld -search_paths_first works" >&5 - echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6 - if test "${cf_cv_ldflags_search_paths_first+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -7411,7 +7474,7 @@ - cf_save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" - cat >conftest.$ac_ext <<_ACEOF --#line 7414 "configure" -+#line 7477 "configure" - #include "confdefs.h" - - int -@@ -7423,16 +7486,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7426: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7489: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7429: \$? = $ac_status" >&5 -+ echo "$as_me:7492: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7432: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7495: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7435: \$? = $ac_status" >&5 -+ echo "$as_me:7498: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ldflags_search_paths_first=yes - else -@@ -7443,7 +7506,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$cf_save_LDFLAGS - fi --echo "$as_me:7446: result: $cf_cv_ldflags_search_paths_first" >&5 -+echo "$as_me:7509: result: $cf_cv_ldflags_search_paths_first" >&5 - echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6 - if test $cf_cv_ldflags_search_paths_first = yes; then - LDFLAGS="$LDFLAGS -Wl,-search_paths_first" -@@ -7623,7 +7686,7 @@ - do - CFLAGS="$cf_shared_opts $cf_save_CFLAGS" - cat >conftest.$ac_ext <<_ACEOF --#line 7626 "configure" -+#line 7689 "configure" - #include "confdefs.h" - #include - int -@@ -7635,16 +7698,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7638: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7701: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7641: \$? = $ac_status" >&5 -+ echo "$as_me:7704: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7644: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7707: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7647: \$? = $ac_status" >&5 -+ echo "$as_me:7710: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -7681,7 +7744,7 @@ - test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes - ;; - *) -- { echo "$as_me:7684: WARNING: ignored --with-shlib-version" >&5 -+ { echo "$as_me:7747: WARNING: ignored --with-shlib-version" >&5 - echo "$as_me: WARNING: ignored --with-shlib-version" >&2;} - ;; - esac -@@ -7692,6 +7755,29 @@ - MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}" - fi - -+# The test/sample programs in the original tree link using rpath option. -+# Make it optional for packagers. -+if test -n "$LOCAL_LDFLAGS" -+then -+ echo "$as_me:7762: checking if you want to link sample programs with rpath option" >&5 -+echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6 -+ -+# Check whether --enable-rpath-link or --disable-rpath-link was given. -+if test "${enable_rpath_link+set}" = set; then -+ enableval="$enable_rpath_link" -+ with_rpath_link=$enableval -+else -+ with_rpath_link=yes -+fi; -+ echo "$as_me:7772: result: $with_rpath_link" >&5 -+echo "${ECHO_T}$with_rpath_link" >&6 -+ if test "$with_rpath_link" = no -+ then -+ LOCAL_LDFLAGS= -+ LOCAL_LDFLAGS2= -+ fi -+fi -+ - ############################################################################### - - case $cf_cv_system_name in -@@ -7700,7 +7786,7 @@ - esac - - ### use option --enable-broken-linker to force on use of broken-linker support --echo "$as_me:7703: checking if you want broken-linker support code" >&5 -+echo "$as_me:7789: checking if you want broken-linker support code" >&5 - echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6 - - # Check whether --enable-broken_linker or --disable-broken_linker was given. -@@ -7710,7 +7796,7 @@ - else - with_broken_linker=${BROKEN_LINKER:-no} - fi; --echo "$as_me:7713: result: $with_broken_linker" >&5 -+echo "$as_me:7799: result: $with_broken_linker" >&5 - echo "${ECHO_T}$with_broken_linker" >&6 - - BROKEN_LINKER=0 -@@ -7730,7 +7816,7 @@ - BROKEN_LINKER=1 - test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6 - --echo "${as_me:-configure}:7733: testing cygwin linker is broken anyway ..." 1>&5 -+echo "${as_me:-configure}:7819: testing cygwin linker is broken anyway ..." 1>&5 - - ;; - esac -@@ -7746,6 +7832,9 @@ - aix[456]*) #(vi - cf_xopen_source="-D_ALL_SOURCE" - ;; -+cygwin) #(vi -+ cf_XOPEN_SOURCE=600 -+ ;; - darwin[0-8].*) #(vi - cf_xopen_source="-D_APPLE_C_SOURCE" - ;; -@@ -7771,14 +7860,14 @@ - ;; - linux*|gnu*|mint*|k*bsd*-gnu) #(vi - --echo "$as_me:7774: checking if we must define _GNU_SOURCE" >&5 -+echo "$as_me:7863: checking if we must define _GNU_SOURCE" >&5 - echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 - if test "${cf_cv_gnu_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 7781 "configure" -+#line 7870 "configure" - #include "confdefs.h" - #include - int -@@ -7793,16 +7882,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7796: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7885: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7799: \$? = $ac_status" >&5 -+ echo "$as_me:7888: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7802: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7891: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7805: \$? = $ac_status" >&5 -+ echo "$as_me:7894: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_gnu_source=no - else -@@ -7811,7 +7900,7 @@ - cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - cat >conftest.$ac_ext <<_ACEOF --#line 7814 "configure" -+#line 7903 "configure" - #include "confdefs.h" - #include - int -@@ -7826,16 +7915,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7829: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7918: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7832: \$? = $ac_status" >&5 -+ echo "$as_me:7921: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7835: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7924: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7838: \$? = $ac_status" >&5 -+ echo "$as_me:7927: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_gnu_source=no - else -@@ -7850,7 +7939,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:7853: result: $cf_cv_gnu_source" >&5 -+echo "$as_me:7942: result: $cf_cv_gnu_source" >&5 - echo "${ECHO_T}$cf_cv_gnu_source" >&6 - test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - -@@ -7880,14 +7969,14 @@ - cf_xopen_source="-D__EXTENSIONS__" - ;; - *) -- echo "$as_me:7883: checking if we should define _XOPEN_SOURCE" >&5 -+ echo "$as_me:7972: checking if we should define _XOPEN_SOURCE" >&5 - echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 - if test "${cf_cv_xopen_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 7890 "configure" -+#line 7979 "configure" - #include "confdefs.h" - #include - int -@@ -7902,16 +7991,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7905: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7994: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7908: \$? = $ac_status" >&5 -+ echo "$as_me:7997: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7911: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8000: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7914: \$? = $ac_status" >&5 -+ echo "$as_me:8003: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xopen_source=no - else -@@ -7920,7 +8009,7 @@ - cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - cat >conftest.$ac_ext <<_ACEOF --#line 7923 "configure" -+#line 8012 "configure" - #include "confdefs.h" - #include - int -@@ -7935,16 +8024,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7938: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8027: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7941: \$? = $ac_status" >&5 -+ echo "$as_me:8030: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7944: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8033: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7947: \$? = $ac_status" >&5 -+ echo "$as_me:8036: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xopen_source=no - else -@@ -7959,7 +8048,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:7962: result: $cf_cv_xopen_source" >&5 -+echo "$as_me:8051: result: $cf_cv_xopen_source" >&5 - echo "${ECHO_T}$cf_cv_xopen_source" >&6 - if test "$cf_cv_xopen_source" != no ; then - -@@ -8066,16 +8155,16 @@ - sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ - -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` - --echo "$as_me:8069: checking if we should define _POSIX_C_SOURCE" >&5 -+echo "$as_me:8158: checking if we should define _POSIX_C_SOURCE" >&5 - echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 - if test "${cf_cv_posix_c_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - --echo "${as_me:-configure}:8075: testing if the symbol is already defined go no further ..." 1>&5 -+echo "${as_me:-configure}:8164: testing if the symbol is already defined go no further ..." 1>&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 8078 "configure" -+#line 8167 "configure" - #include "confdefs.h" - #include - int -@@ -8090,16 +8179,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8093: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8182: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8096: \$? = $ac_status" >&5 -+ echo "$as_me:8185: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8099: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8188: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8102: \$? = $ac_status" >&5 -+ echo "$as_me:8191: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_posix_c_source=no - else -@@ -8120,7 +8209,7 @@ - esac - if test "$cf_want_posix_source" = yes ; then - cat >conftest.$ac_ext <<_ACEOF --#line 8123 "configure" -+#line 8212 "configure" - #include "confdefs.h" - #include - int -@@ -8135,16 +8224,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8141: \$? = $ac_status" >&5 -+ echo "$as_me:8230: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8144: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8233: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8147: \$? = $ac_status" >&5 -+ echo "$as_me:8236: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -8155,15 +8244,15 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - fi - --echo "${as_me:-configure}:8158: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 -+echo "${as_me:-configure}:8247: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 - - CFLAGS="$cf_trim_CFLAGS" - CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" - --echo "${as_me:-configure}:8163: testing if the second compile does not leave our definition intact error ..." 1>&5 -+echo "${as_me:-configure}:8252: testing if the second compile does not leave our definition intact error ..." 1>&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 8166 "configure" -+#line 8255 "configure" - #include "confdefs.h" - #include - int -@@ -8178,16 +8267,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8181: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8270: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8184: \$? = $ac_status" >&5 -+ echo "$as_me:8273: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8187: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8276: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8190: \$? = $ac_status" >&5 -+ echo "$as_me:8279: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -8203,7 +8292,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:8206: result: $cf_cv_posix_c_source" >&5 -+echo "$as_me:8295: result: $cf_cv_posix_c_source" >&5 - echo "${ECHO_T}$cf_cv_posix_c_source" >&6 - - if test "$cf_cv_posix_c_source" != no ; then -@@ -8382,7 +8471,7 @@ - fi; - if test "$enable_largefile" != no; then - -- echo "$as_me:8385: checking for special C compiler options needed for large files" >&5 -+ echo "$as_me:8474: checking for special C compiler options needed for large files" >&5 - echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 - if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8394,7 +8483,7 @@ - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF --#line 8397 "configure" -+#line 8486 "configure" - #include "confdefs.h" - #include - /* Check that off_t can represent 2**63 - 1 correctly. -@@ -8414,16 +8503,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8417: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8420: \$? = $ac_status" >&5 -+ echo "$as_me:8509: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8423: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8512: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8426: \$? = $ac_status" >&5 -+ echo "$as_me:8515: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -8433,16 +8522,16 @@ - rm -f conftest.$ac_objext - CC="$CC -n32" - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8436: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8525: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8439: \$? = $ac_status" >&5 -+ echo "$as_me:8528: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8442: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8531: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8445: \$? = $ac_status" >&5 -+ echo "$as_me:8534: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_largefile_CC=' -n32'; break - else -@@ -8456,13 +8545,13 @@ - rm -f conftest.$ac_ext - fi - fi --echo "$as_me:8459: result: $ac_cv_sys_largefile_CC" >&5 -+echo "$as_me:8548: result: $ac_cv_sys_largefile_CC" >&5 - echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 - if test "$ac_cv_sys_largefile_CC" != no; then - CC=$CC$ac_cv_sys_largefile_CC - fi - -- echo "$as_me:8465: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -+ echo "$as_me:8554: checking for _FILE_OFFSET_BITS value needed for large files" >&5 - echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 - if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8470,7 +8559,7 @@ - while :; do - ac_cv_sys_file_offset_bits=no - cat >conftest.$ac_ext <<_ACEOF --#line 8473 "configure" -+#line 8562 "configure" - #include "confdefs.h" - #include - /* Check that off_t can represent 2**63 - 1 correctly. -@@ -8490,16 +8579,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8493: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8582: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8496: \$? = $ac_status" >&5 -+ echo "$as_me:8585: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8499: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8588: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8502: \$? = $ac_status" >&5 -+ echo "$as_me:8591: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -8508,7 +8597,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF --#line 8511 "configure" -+#line 8600 "configure" - #include "confdefs.h" - #define _FILE_OFFSET_BITS 64 - #include -@@ -8529,16 +8618,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8532: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8621: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8535: \$? = $ac_status" >&5 -+ echo "$as_me:8624: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8538: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8627: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8541: \$? = $ac_status" >&5 -+ echo "$as_me:8630: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_file_offset_bits=64; break - else -@@ -8549,7 +8638,7 @@ - break - done - fi --echo "$as_me:8552: result: $ac_cv_sys_file_offset_bits" >&5 -+echo "$as_me:8641: result: $ac_cv_sys_file_offset_bits" >&5 - echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 - if test "$ac_cv_sys_file_offset_bits" != no; then - -@@ -8559,7 +8648,7 @@ - - fi - rm -rf conftest* -- echo "$as_me:8562: checking for _LARGE_FILES value needed for large files" >&5 -+ echo "$as_me:8651: checking for _LARGE_FILES value needed for large files" >&5 - echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 - if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8567,7 +8656,7 @@ - while :; do - ac_cv_sys_large_files=no - cat >conftest.$ac_ext <<_ACEOF --#line 8570 "configure" -+#line 8659 "configure" - #include "confdefs.h" - #include - /* Check that off_t can represent 2**63 - 1 correctly. -@@ -8587,16 +8676,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8590: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8679: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8593: \$? = $ac_status" >&5 -+ echo "$as_me:8682: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8596: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8685: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8599: \$? = $ac_status" >&5 -+ echo "$as_me:8688: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -8605,7 +8694,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF --#line 8608 "configure" -+#line 8697 "configure" - #include "confdefs.h" - #define _LARGE_FILES 1 - #include -@@ -8626,16 +8715,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8629: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8718: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8632: \$? = $ac_status" >&5 -+ echo "$as_me:8721: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8635: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8724: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8638: \$? = $ac_status" >&5 -+ echo "$as_me:8727: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_large_files=1; break - else -@@ -8646,7 +8735,7 @@ - break - done - fi --echo "$as_me:8649: result: $ac_cv_sys_large_files" >&5 -+echo "$as_me:8738: result: $ac_cv_sys_large_files" >&5 - echo "${ECHO_T}$ac_cv_sys_large_files" >&6 - if test "$ac_cv_sys_large_files" != no; then - -@@ -8659,7 +8748,7 @@ - fi - - if test "$enable_largefile" != no ; then -- echo "$as_me:8662: checking for _LARGEFILE_SOURCE value needed for large files" >&5 -+ echo "$as_me:8751: checking for _LARGEFILE_SOURCE value needed for large files" >&5 - echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6 - if test "${ac_cv_sys_largefile_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8667,7 +8756,7 @@ - while :; do - ac_cv_sys_largefile_source=no - cat >conftest.$ac_ext <<_ACEOF --#line 8670 "configure" -+#line 8759 "configure" - #include "confdefs.h" - #include - int -@@ -8679,16 +8768,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8682: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8685: \$? = $ac_status" >&5 -+ echo "$as_me:8774: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8688: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8777: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8691: \$? = $ac_status" >&5 -+ echo "$as_me:8780: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break - else -@@ -8697,7 +8786,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF --#line 8700 "configure" -+#line 8789 "configure" - #include "confdefs.h" - #define _LARGEFILE_SOURCE 1 - #include -@@ -8710,16 +8799,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8802: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8716: \$? = $ac_status" >&5 -+ echo "$as_me:8805: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8719: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8808: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8722: \$? = $ac_status" >&5 -+ echo "$as_me:8811: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sys_largefile_source=1; break - else -@@ -8730,7 +8819,7 @@ - break - done - fi --echo "$as_me:8733: result: $ac_cv_sys_largefile_source" >&5 -+echo "$as_me:8822: result: $ac_cv_sys_largefile_source" >&5 - echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6 - if test "$ac_cv_sys_largefile_source" != no; then - -@@ -8744,13 +8833,13 @@ - # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug - # in glibc 2.1.3, but that breaks too many other things. - # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. --echo "$as_me:8747: checking for fseeko" >&5 -+echo "$as_me:8836: checking for fseeko" >&5 - echo $ECHO_N "checking for fseeko... $ECHO_C" >&6 - if test "${ac_cv_func_fseeko+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 8753 "configure" -+#line 8842 "configure" - #include "confdefs.h" - #include - int -@@ -8762,16 +8851,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:8765: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8854: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8768: \$? = $ac_status" >&5 -+ echo "$as_me:8857: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:8771: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8860: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8774: \$? = $ac_status" >&5 -+ echo "$as_me:8863: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fseeko=yes - else -@@ -8781,7 +8870,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:8784: result: $ac_cv_func_fseeko" >&5 -+echo "$as_me:8873: result: $ac_cv_func_fseeko" >&5 - echo "${ECHO_T}$ac_cv_func_fseeko" >&6 - if test $ac_cv_func_fseeko = yes; then - -@@ -8802,14 +8891,14 @@ - test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE " - test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits " - -- echo "$as_me:8805: checking whether to use struct dirent64" >&5 -+ echo "$as_me:8894: checking whether to use struct dirent64" >&5 - echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6 - if test "${cf_cv_struct_dirent64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 8812 "configure" -+#line 8901 "configure" - #include "confdefs.h" - - #include -@@ -8830,16 +8919,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8833: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8922: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8836: \$? = $ac_status" >&5 -+ echo "$as_me:8925: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8839: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8928: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8842: \$? = $ac_status" >&5 -+ echo "$as_me:8931: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_struct_dirent64=yes - else -@@ -8850,7 +8939,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:8853: result: $cf_cv_struct_dirent64" >&5 -+echo "$as_me:8942: result: $cf_cv_struct_dirent64" >&5 - echo "${ECHO_T}$cf_cv_struct_dirent64" >&6 - test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF - #define HAVE_STRUCT_DIRENT64 1 -@@ -8859,7 +8948,7 @@ - fi - - ### Enable compiling-in rcs id's --echo "$as_me:8862: checking if RCS identifiers should be compiled-in" >&5 -+echo "$as_me:8951: checking if RCS identifiers should be compiled-in" >&5 - echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6 - - # Check whether --with-rcs-ids or --without-rcs-ids was given. -@@ -8869,7 +8958,7 @@ - else - with_rcs_ids=no - fi; --echo "$as_me:8872: result: $with_rcs_ids" >&5 -+echo "$as_me:8961: result: $with_rcs_ids" >&5 - echo "${ECHO_T}$with_rcs_ids" >&6 - test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF - #define USE_RCS_IDS 1 -@@ -8878,7 +8967,7 @@ - ############################################################################### - - ### Note that some functions (such as const) are normally disabled anyway. --echo "$as_me:8881: checking if you want to build with function extensions" >&5 -+echo "$as_me:8970: checking if you want to build with function extensions" >&5 - echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6 - - # Check whether --enable-ext-funcs or --disable-ext-funcs was given. -@@ -8888,7 +8977,7 @@ - else - with_ext_funcs=yes - fi; --echo "$as_me:8891: result: $with_ext_funcs" >&5 -+echo "$as_me:8980: result: $with_ext_funcs" >&5 - echo "${ECHO_T}$with_ext_funcs" >&6 - if test "$with_ext_funcs" = yes ; then - NCURSES_EXT_FUNCS=1 -@@ -8905,7 +8994,7 @@ - fi - - ### use option --enable-const to turn on use of const beyond that in XSI. --echo "$as_me:8908: checking for extended use of const keyword" >&5 -+echo "$as_me:8997: checking for extended use of const keyword" >&5 - echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6 - - # Check whether --enable-const or --disable-const was given. -@@ -8915,7 +9004,7 @@ - else - with_ext_const=no - fi; --echo "$as_me:8918: result: $with_ext_const" >&5 -+echo "$as_me:9007: result: $with_ext_const" >&5 - echo "${ECHO_T}$with_ext_const" >&6 - NCURSES_CONST='/*nothing*/' - if test "$with_ext_const" = yes ; then -@@ -8925,7 +9014,7 @@ - ############################################################################### - # These options are relatively safe to experiment with. - --echo "$as_me:8928: checking if you want all development code" >&5 -+echo "$as_me:9017: checking if you want all development code" >&5 - echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6 - - # Check whether --with-develop or --without-develop was given. -@@ -8935,7 +9024,7 @@ - else - with_develop=no - fi; --echo "$as_me:8938: result: $with_develop" >&5 -+echo "$as_me:9027: result: $with_develop" >&5 - echo "${ECHO_T}$with_develop" >&6 - - ############################################################################### -@@ -8944,7 +9033,7 @@ - # This is still experimental (20080329), but should ultimately be moved to - # the script-block --with-normal, etc. - --echo "$as_me:8947: checking if you want to link with the pthread library" >&5 -+echo "$as_me:9036: checking if you want to link with the pthread library" >&5 - echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6 - - # Check whether --with-pthread or --without-pthread was given. -@@ -8954,27 +9043,27 @@ - else - with_pthread=no - fi; --echo "$as_me:8957: result: $with_pthread" >&5 -+echo "$as_me:9046: result: $with_pthread" >&5 - echo "${ECHO_T}$with_pthread" >&6 - - if test "$with_pthread" != no ; then -- echo "$as_me:8961: checking for pthread.h" >&5 -+ echo "$as_me:9050: checking for pthread.h" >&5 - echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6 - if test "${ac_cv_header_pthread_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 8967 "configure" -+#line 9056 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:8971: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:9060: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:8977: \$? = $ac_status" >&5 -+ echo "$as_me:9066: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -8993,7 +9082,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:8996: result: $ac_cv_header_pthread_h" >&5 -+echo "$as_me:9085: result: $ac_cv_header_pthread_h" >&5 - echo "${ECHO_T}$ac_cv_header_pthread_h" >&6 - if test $ac_cv_header_pthread_h = yes; then - -@@ -9001,12 +9090,12 @@ - #define HAVE_PTHREADS_H 1 - EOF - -- echo "$as_me:9004: checking if we can link with the pthread library" >&5 -+ echo "$as_me:9093: checking if we can link with the pthread library" >&5 - echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6 - cf_save_LIBS="$LIBS" - LIBS="-lpthread $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9009 "configure" -+#line 9098 "configure" - #include "confdefs.h" - - #include -@@ -9022,16 +9111,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9025: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9114: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9028: \$? = $ac_status" >&5 -+ echo "$as_me:9117: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9031: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9120: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9034: \$? = $ac_status" >&5 -+ echo "$as_me:9123: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - with_pthread=yes - else -@@ -9041,7 +9130,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS="$cf_save_LIBS" -- echo "$as_me:9044: result: $with_pthread" >&5 -+ echo "$as_me:9133: result: $with_pthread" >&5 - echo "${ECHO_T}$with_pthread" >&6 - - if test "$with_pthread" = yes ; then -@@ -9051,7 +9140,7 @@ - EOF - - else -- { { echo "$as_me:9054: error: Cannot link with pthread library" >&5 -+ { { echo "$as_me:9143: error: Cannot link with pthread library" >&5 - echo "$as_me: error: Cannot link with pthread library" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -9060,7 +9149,7 @@ - - fi - --echo "$as_me:9063: checking if you want to use weak-symbols for pthreads" >&5 -+echo "$as_me:9152: checking if you want to use weak-symbols for pthreads" >&5 - echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6 - - # Check whether --enable-weak-symbols or --disable-weak-symbols was given. -@@ -9070,18 +9159,18 @@ - else - use_weak_symbols=no - fi; --echo "$as_me:9073: result: $use_weak_symbols" >&5 -+echo "$as_me:9162: result: $use_weak_symbols" >&5 - echo "${ECHO_T}$use_weak_symbols" >&6 - if test "$use_weak_symbols" = yes ; then - --echo "$as_me:9077: checking if $CC supports weak symbols" >&5 -+echo "$as_me:9166: checking if $CC supports weak symbols" >&5 - echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6 - if test "${cf_cv_weak_symbols+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 9084 "configure" -+#line 9173 "configure" - #include "confdefs.h" - - #include -@@ -9107,16 +9196,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:9110: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:9199: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:9113: \$? = $ac_status" >&5 -+ echo "$as_me:9202: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:9116: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9205: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9119: \$? = $ac_status" >&5 -+ echo "$as_me:9208: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_weak_symbols=yes - else -@@ -9127,7 +9216,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:9130: result: $cf_cv_weak_symbols" >&5 -+echo "$as_me:9219: result: $cf_cv_weak_symbols" >&5 - echo "${ECHO_T}$cf_cv_weak_symbols" >&6 - - else -@@ -9153,11 +9242,76 @@ - fi - fi - -+# OpenSUSE is installing ncurses6, using reentrant option. -+echo "$as_me:9246: checking for _nc_TABSIZE" >&5 -+echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6 -+if test "${ac_cv_func__nc_TABSIZE+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ cat >conftest.$ac_ext <<_ACEOF -+#line 9252 "configure" -+#include "confdefs.h" -+/* System header to define __stub macros and hopefully few prototypes, -+ which can conflict with char _nc_TABSIZE (); below. */ -+#include -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char _nc_TABSIZE (); -+char (*f) (); -+ -+int -+main () -+{ -+/* The GNU C library defines this for functions which it implements -+ to always fail with ENOSYS. Some functions are actually named -+ something starting with __ and the normal name is an alias. */ -+#if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE) -+choke me -+#else -+f = _nc_TABSIZE; -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:9283: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>&5 -+ ac_status=$? -+ echo "$as_me:9286: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:9289: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:9292: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_func__nc_TABSIZE=yes -+else -+ echo "$as_me: failed program was:" >&5 -+cat conftest.$ac_ext >&5 -+ac_cv_func__nc_TABSIZE=no -+fi -+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -+fi -+echo "$as_me:9302: result: $ac_cv_func__nc_TABSIZE" >&5 -+echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6 -+if test $ac_cv_func__nc_TABSIZE = yes; then -+ assume_reentrant=yes -+else -+ assume_reentrant=no -+fi -+ - # Reentrant code has to be opaque; there's little advantage to making ncurses - # opaque outside of that, so there is no --enable-opaque option. We can use - # this option without --with-pthreads, but this will be always set for - # pthreads. --echo "$as_me:9160: checking if you want experimental reentrant code" >&5 -+echo "$as_me:9314: checking if you want experimental reentrant code" >&5 - echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6 - - # Check whether --enable-reentrant or --disable-reentrant was given. -@@ -9165,9 +9319,9 @@ - enableval="$enable_reentrant" - with_reentrant=$enableval - else -- with_reentrant=no -+ with_reentrant=$assume_reentrant - fi; --echo "$as_me:9170: result: $with_reentrant" >&5 -+echo "$as_me:9324: result: $with_reentrant" >&5 - echo "${ECHO_T}$with_reentrant" >&6 - if test "$with_reentrant" = yes ; then - cf_cv_enable_reentrant=1 -@@ -9176,7 +9330,7 @@ - # remove pthread library from $LIBS - LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'` - -- else -+ elif test "$assume_reentrant" = no ; then - LIB_SUFFIX="t${LIB_SUFFIX}" - fi - cat >>confdefs.h <<\EOF -@@ -9189,7 +9343,7 @@ - - ### Allow using a different wrap-prefix - if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then -- echo "$as_me:9192: checking for prefix used to wrap public variables" >&5 -+ echo "$as_me:9346: checking for prefix used to wrap public variables" >&5 - echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6 - - # Check whether --with-wrap-prefix or --without-wrap-prefix was given. -@@ -9199,7 +9353,7 @@ - else - NCURSES_WRAP_PREFIX=_nc_ - fi; -- echo "$as_me:9202: result: $NCURSES_WRAP_PREFIX" >&5 -+ echo "$as_me:9356: result: $NCURSES_WRAP_PREFIX" >&5 - echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6 - else - NCURSES_WRAP_PREFIX=_nc_ -@@ -9212,7 +9366,7 @@ - ############################################################################### - - ### use option --disable-echo to suppress full display compiling commands --echo "$as_me:9215: checking if you want to display full commands during build" >&5 -+echo "$as_me:9369: checking if you want to display full commands during build" >&5 - echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6 - - # Check whether --enable-echo or --disable-echo was given. -@@ -9227,11 +9381,11 @@ - else - ECHO_LINK='@ echo linking $@ ... ;' - fi --echo "$as_me:9230: result: $with_echo" >&5 -+echo "$as_me:9384: result: $with_echo" >&5 - echo "${ECHO_T}$with_echo" >&6 - - ### use option --enable-warnings to turn on all gcc warnings --echo "$as_me:9234: checking if you want to see compiler warnings" >&5 -+echo "$as_me:9388: checking if you want to see compiler warnings" >&5 - echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6 - - # Check whether --enable-warnings or --disable-warnings was given. -@@ -9239,10 +9393,11 @@ - enableval="$enable_warnings" - with_warnings=$enableval - fi; --echo "$as_me:9242: result: $with_warnings" >&5 -+echo "$as_me:9396: result: $with_warnings" >&5 - echo "${ECHO_T}$with_warnings" >&6 - - if test "x$with_warnings" = "xyes"; then -+ - ADAFLAGS="$ADAFLAGS -gnatg" - - INTEL_COMPILER=no -@@ -9250,12 +9405,12 @@ - if test "$GCC" = yes ; then - case $host_os in - linux*|gnu*) -- echo "$as_me:9253: checking if this is really Intel C compiler" >&5 -+ echo "$as_me:9408: checking if this is really Intel C compiler" >&5 - echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 - cf_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -no-gcc" - cat >conftest.$ac_ext <<_ACEOF --#line 9258 "configure" -+#line 9413 "configure" - #include "confdefs.h" - - int -@@ -9272,16 +9427,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:9275: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:9430: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:9278: \$? = $ac_status" >&5 -+ echo "$as_me:9433: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:9281: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9436: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9284: \$? = $ac_status" >&5 -+ echo "$as_me:9439: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - INTEL_COMPILER=yes - cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc" -@@ -9292,14 +9447,14 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - CFLAGS="$cf_save_CFLAGS" -- echo "$as_me:9295: result: $INTEL_COMPILER" >&5 -+ echo "$as_me:9450: result: $INTEL_COMPILER" >&5 - echo "${ECHO_T}$INTEL_COMPILER" >&6 - ;; - esac - fi - - cat > conftest.$ac_ext <&5 -+ { echo "$as_me:9474: checking for $CC warning options..." >&5 - echo "$as_me: checking for $CC warning options..." >&6;} - cf_save_CFLAGS="$CFLAGS" - EXTRA_CFLAGS="-Wall" -@@ -9332,12 +9487,12 @@ - wd981 - do - CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" -- if { (eval echo "$as_me:9335: \"$ac_compile\"") >&5 -+ if { (eval echo "$as_me:9490: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:9338: \$? = $ac_status" >&5 -+ echo "$as_me:9493: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- test -n "$verbose" && echo "$as_me:9340: result: ... -$cf_opt" >&5 -+ test -n "$verbose" && echo "$as_me:9495: result: ... -$cf_opt" >&5 - echo "${ECHO_T}... -$cf_opt" >&6 - EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" - fi -@@ -9346,7 +9501,7 @@ - - elif test "$GCC" = yes - then -- { echo "$as_me:9349: checking for $CC warning options..." >&5 -+ { echo "$as_me:9504: checking for $CC warning options..." >&5 - echo "$as_me: checking for $CC warning options..." >&6;} - cf_save_CFLAGS="$CFLAGS" - EXTRA_CFLAGS= -@@ -9366,12 +9521,12 @@ - Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum - do - CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" -- if { (eval echo "$as_me:9369: \"$ac_compile\"") >&5 -+ if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:9372: \$? = $ac_status" >&5 -+ echo "$as_me:9527: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- test -n "$verbose" && echo "$as_me:9374: result: ... -$cf_opt" >&5 -+ test -n "$verbose" && echo "$as_me:9529: result: ... -$cf_opt" >&5 - echo "${ECHO_T}... -$cf_opt" >&6 - case $cf_opt in #(vi - Wcast-qual) #(vi -@@ -9382,7 +9537,7 @@ - [34].*) - test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 - --echo "${as_me:-configure}:9385: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 -+echo "${as_me:-configure}:9540: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 - - continue;; - esac -@@ -9415,10 +9570,10 @@ - EOF - if test "$GCC" = yes - then -- { echo "$as_me:9418: checking for $CC __attribute__ directives..." >&5 -+ { echo "$as_me:9573: checking for $CC __attribute__ directives..." >&5 - echo "$as_me: checking for $CC __attribute__ directives..." >&6;} - cat > conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:9625: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:9473: \$? = $ac_status" >&5 -+ echo "$as_me:9628: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- test -n "$verbose" && echo "$as_me:9475: result: ... $cf_attribute" >&5 -+ test -n "$verbose" && echo "$as_me:9630: result: ... $cf_attribute" >&5 - echo "${ECHO_T}... $cf_attribute" >&6 - cat conftest.h >>confdefs.h - case $cf_attribute in #(vi -@@ -9508,7 +9663,7 @@ - fi - - ### use option --enable-assertions to turn on generation of assertion code --echo "$as_me:9511: checking if you want to enable runtime assertions" >&5 -+echo "$as_me:9666: checking if you want to enable runtime assertions" >&5 - echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6 - - # Check whether --enable-assertions or --disable-assertions was given. -@@ -9518,7 +9673,7 @@ - else - with_assertions=no - fi; --echo "$as_me:9521: result: $with_assertions" >&5 -+echo "$as_me:9676: result: $with_assertions" >&5 - echo "${ECHO_T}$with_assertions" >&6 - if test -n "$GCC" - then -@@ -9530,7 +9685,9 @@ - - CPPFLAGS="$CPPFLAGS -DNDEBUG" - else -- ADAFLAGS="$ADAFLAGS -gnata" -+ -+ ADAFLAGS="$ADAFLAGS -gnata" -+ - fi - fi - -@@ -9570,7 +9727,7 @@ - ;; - esac - --echo "$as_me:9573: checking whether to add trace feature to all models" >&5 -+echo "$as_me:9730: checking whether to add trace feature to all models" >&5 - echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6 - - # Check whether --with-trace or --without-trace was given. -@@ -9580,7 +9737,7 @@ - else - cf_with_trace=$cf_all_traces - fi; --echo "$as_me:9583: result: $cf_with_trace" >&5 -+echo "$as_me:9740: result: $cf_with_trace" >&5 - echo "${ECHO_T}$cf_with_trace" >&6 - - if test "$cf_with_trace" = yes ; then -@@ -9673,13 +9830,13 @@ - *mingw32*) #(vi - ;; - *) --echo "$as_me:9676: checking for gettimeofday" >&5 -+echo "$as_me:9833: checking for gettimeofday" >&5 - echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6 - if test "${ac_cv_func_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 9682 "configure" -+#line 9839 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gettimeofday (); below. */ -@@ -9710,16 +9867,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9713: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9870: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9716: \$? = $ac_status" >&5 -+ echo "$as_me:9873: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9719: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9876: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9722: \$? = $ac_status" >&5 -+ echo "$as_me:9879: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_gettimeofday=yes - else -@@ -9729,7 +9886,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:9732: result: $ac_cv_func_gettimeofday" >&5 -+echo "$as_me:9889: result: $ac_cv_func_gettimeofday" >&5 - echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6 - if test $ac_cv_func_gettimeofday = yes; then - cat >>confdefs.h <<\EOF -@@ -9738,7 +9895,7 @@ - - else - --echo "$as_me:9741: checking for gettimeofday in -lbsd" >&5 -+echo "$as_me:9898: checking for gettimeofday in -lbsd" >&5 - echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6 - if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9746,7 +9903,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lbsd $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9749 "configure" -+#line 9906 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9765,16 +9922,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9768: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9925: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9771: \$? = $ac_status" >&5 -+ echo "$as_me:9928: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9774: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9931: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9777: \$? = $ac_status" >&5 -+ echo "$as_me:9934: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_bsd_gettimeofday=yes - else -@@ -9785,7 +9942,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:9788: result: $ac_cv_lib_bsd_gettimeofday" >&5 -+echo "$as_me:9945: result: $ac_cv_lib_bsd_gettimeofday" >&5 - echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6 - if test $ac_cv_lib_bsd_gettimeofday = yes; then - cat >>confdefs.h <<\EOF -@@ -9800,13 +9957,13 @@ - esac - - ### Checks for header files. --echo "$as_me:9803: checking for ANSI C header files" >&5 -+echo "$as_me:9960: checking for ANSI C header files" >&5 - echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 - if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 9809 "configure" -+#line 9966 "configure" - #include "confdefs.h" - #include - #include -@@ -9814,13 +9971,13 @@ - #include - - _ACEOF --if { (eval echo "$as_me:9817: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:9974: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:9823: \$? = $ac_status" >&5 -+ echo "$as_me:9980: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -9842,7 +9999,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line 9845 "configure" -+#line 10002 "configure" - #include "confdefs.h" - #include - -@@ -9860,7 +10017,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line 9863 "configure" -+#line 10020 "configure" - #include "confdefs.h" - #include - -@@ -9881,7 +10038,7 @@ - : - else - cat >conftest.$ac_ext <<_ACEOF --#line 9884 "configure" -+#line 10041 "configure" - #include "confdefs.h" - #include - #if ((' ' & 0x0FF) == 0x020) -@@ -9907,15 +10064,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:9910: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10067: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9913: \$? = $ac_status" >&5 -+ echo "$as_me:10070: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:9915: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10072: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9918: \$? = $ac_status" >&5 -+ echo "$as_me:10075: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -9928,7 +10085,7 @@ - fi - fi - fi --echo "$as_me:9931: result: $ac_cv_header_stdc" >&5 -+echo "$as_me:10088: result: $ac_cv_header_stdc" >&5 - echo "${ECHO_T}$ac_cv_header_stdc" >&6 - if test $ac_cv_header_stdc = yes; then - -@@ -9941,13 +10098,13 @@ - ac_header_dirent=no - for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` --echo "$as_me:9944: checking for $ac_hdr that defines DIR" >&5 -+echo "$as_me:10101: checking for $ac_hdr that defines DIR" >&5 - echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 9950 "configure" -+#line 10107 "configure" - #include "confdefs.h" - #include - #include <$ac_hdr> -@@ -9962,16 +10119,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:9965: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:10122: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:9968: \$? = $ac_status" >&5 -+ echo "$as_me:10125: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:9971: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10128: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9974: \$? = $ac_status" >&5 -+ echo "$as_me:10131: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" - else -@@ -9981,7 +10138,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:9984: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:10141: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+ echo "$as_me:10154: checking for opendir in -ldir" >&5 - echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 - if test "${ac_cv_lib_dir_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10002,7 +10159,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldir $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 10005 "configure" -+#line 10162 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -10021,16 +10178,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10024: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10181: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10027: \$? = $ac_status" >&5 -+ echo "$as_me:10184: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10030: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10187: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10033: \$? = $ac_status" >&5 -+ echo "$as_me:10190: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dir_opendir=yes - else -@@ -10041,14 +10198,14 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:10044: result: $ac_cv_lib_dir_opendir" >&5 -+echo "$as_me:10201: result: $ac_cv_lib_dir_opendir" >&5 - echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 - if test $ac_cv_lib_dir_opendir = yes; then - LIBS="$LIBS -ldir" - fi - - else -- echo "$as_me:10051: checking for opendir in -lx" >&5 -+ echo "$as_me:10208: checking for opendir in -lx" >&5 - echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 - if test "${ac_cv_lib_x_opendir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10056,7 +10213,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lx $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 10059 "configure" -+#line 10216 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -10075,16 +10232,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10078: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10235: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10081: \$? = $ac_status" >&5 -+ echo "$as_me:10238: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10084: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10241: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10087: \$? = $ac_status" >&5 -+ echo "$as_me:10244: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_x_opendir=yes - else -@@ -10095,7 +10252,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:10098: result: $ac_cv_lib_x_opendir" >&5 -+echo "$as_me:10255: result: $ac_cv_lib_x_opendir" >&5 - echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 - if test $ac_cv_lib_x_opendir = yes; then - LIBS="$LIBS -lx" -@@ -10103,13 +10260,13 @@ - - fi - --echo "$as_me:10106: checking whether time.h and sys/time.h may both be included" >&5 -+echo "$as_me:10263: checking whether time.h and sys/time.h may both be included" >&5 - echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 - if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 10112 "configure" -+#line 10269 "configure" - #include "confdefs.h" - #include - #include -@@ -10125,16 +10282,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:10128: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:10131: \$? = $ac_status" >&5 -+ echo "$as_me:10288: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:10134: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10291: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10137: \$? = $ac_status" >&5 -+ echo "$as_me:10294: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_time=yes - else -@@ -10144,7 +10301,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:10147: result: $ac_cv_header_time" >&5 -+echo "$as_me:10304: result: $ac_cv_header_time" >&5 - echo "${ECHO_T}$ac_cv_header_time" >&6 - if test $ac_cv_header_time = yes; then - -@@ -10162,7 +10319,7 @@ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_main_return=return - --echo "$as_me:10165: checking for $CC option to accept ANSI C" >&5 -+echo "$as_me:10322: checking for $CC option to accept ANSI C" >&5 - echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 - if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10170,7 +10327,7 @@ - ac_cv_prog_cc_stdc=no - ac_save_CC=$CC - cat >conftest.$ac_ext <<_ACEOF --#line 10173 "configure" -+#line 10330 "configure" - #include "confdefs.h" - #include - #include -@@ -10219,16 +10376,16 @@ - do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext --if { (eval echo "$as_me:10222: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:10379: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:10225: \$? = $ac_status" >&5 -+ echo "$as_me:10382: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:10228: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10385: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10231: \$? = $ac_status" >&5 -+ echo "$as_me:10388: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg - break -@@ -10245,21 +10402,21 @@ - - case "x$ac_cv_prog_cc_stdc" in - x|xno) -- echo "$as_me:10248: result: none needed" >&5 -+ echo "$as_me:10405: result: none needed" >&5 - echo "${ECHO_T}none needed" >&6 ;; - *) -- echo "$as_me:10251: result: $ac_cv_prog_cc_stdc" >&5 -+ echo "$as_me:10408: result: $ac_cv_prog_cc_stdc" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; - esac - --echo "$as_me:10256: checking for an ANSI C-conforming const" >&5 -+echo "$as_me:10413: checking for an ANSI C-conforming const" >&5 - echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 - if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 10262 "configure" -+#line 10419 "configure" - #include "confdefs.h" - - int -@@ -10317,16 +10474,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:10320: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:10323: \$? = $ac_status" >&5 -+ echo "$as_me:10480: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:10326: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10483: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10329: \$? = $ac_status" >&5 -+ echo "$as_me:10486: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes - else -@@ -10336,7 +10493,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:10339: result: $ac_cv_c_const" >&5 -+echo "$as_me:10496: result: $ac_cv_c_const" >&5 - echo "${ECHO_T}$ac_cv_c_const" >&6 - if test $ac_cv_c_const = no; then - -@@ -10348,7 +10505,7 @@ - - ### Checks for external-data - --echo "$as_me:10351: checking if data-only library module links" >&5 -+echo "$as_me:10508: checking if data-only library module links" >&5 - echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6 - if test "${cf_cv_link_dataonly+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10356,20 +10513,20 @@ - - rm -f conftest.a - cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:10519: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:10365: \$? = $ac_status" >&5 -+ echo "$as_me:10522: \$? = $ac_status" >&5 - (exit $ac_status); } ; then - mv conftest.o data.o && \ - ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null - fi - rm -f conftest.$ac_ext data.o - cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:10542: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:10388: \$? = $ac_status" >&5 -+ echo "$as_me:10545: \$? = $ac_status" >&5 - (exit $ac_status); }; then - mv conftest.o func.o && \ - ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null -@@ -10398,7 +10555,7 @@ - cf_cv_link_dataonly=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 10401 "configure" -+#line 10558 "configure" - #include "confdefs.h" - - int main() -@@ -10409,15 +10566,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:10412: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10569: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10415: \$? = $ac_status" >&5 -+ echo "$as_me:10572: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:10417: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10574: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10420: \$? = $ac_status" >&5 -+ echo "$as_me:10577: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_link_dataonly=yes - else -@@ -10432,7 +10589,7 @@ - - fi - --echo "$as_me:10435: result: $cf_cv_link_dataonly" >&5 -+echo "$as_me:10592: result: $cf_cv_link_dataonly" >&5 - echo "${ECHO_T}$cf_cv_link_dataonly" >&6 - - if test "$cf_cv_link_dataonly" = no ; then -@@ -10445,7 +10602,7 @@ - - ### Checks for library functions. - --echo "$as_me:10448: checking for working mkstemp" >&5 -+echo "$as_me:10605: checking for working mkstemp" >&5 - echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 - if test "${cf_cv_func_mkstemp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10453,13 +10610,13 @@ - - rm -rf conftest* - if test "$cross_compiling" = yes; then -- echo "$as_me:10456: checking for mkstemp" >&5 -+ echo "$as_me:10613: checking for mkstemp" >&5 - echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 - if test "${ac_cv_func_mkstemp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 10462 "configure" -+#line 10619 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mkstemp (); below. */ -@@ -10490,16 +10647,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10493: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10650: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10496: \$? = $ac_status" >&5 -+ echo "$as_me:10653: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10499: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10656: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10502: \$? = $ac_status" >&5 -+ echo "$as_me:10659: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_mkstemp=yes - else -@@ -10509,12 +10666,12 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:10512: result: $ac_cv_func_mkstemp" >&5 -+echo "$as_me:10669: result: $ac_cv_func_mkstemp" >&5 - echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 - - else - cat >conftest.$ac_ext <<_ACEOF --#line 10517 "configure" -+#line 10674 "configure" - #include "confdefs.h" - - #include -@@ -10552,15 +10709,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:10555: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10712: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10558: \$? = $ac_status" >&5 -+ echo "$as_me:10715: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:10560: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10717: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10563: \$? = $ac_status" >&5 -+ echo "$as_me:10720: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_mkstemp=yes - -@@ -10575,7 +10732,7 @@ - fi - - fi --echo "$as_me:10578: result: $cf_cv_func_mkstemp" >&5 -+echo "$as_me:10735: result: $cf_cv_func_mkstemp" >&5 - echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 - if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then - cat >>confdefs.h <<\EOF -@@ -10584,13 +10741,13 @@ - - fi - --echo "$as_me:10587: checking return type of signal handlers" >&5 -+echo "$as_me:10744: checking return type of signal handlers" >&5 - echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 - if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 10593 "configure" -+#line 10750 "configure" - #include "confdefs.h" - #include - #include -@@ -10612,16 +10769,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:10615: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:10772: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:10618: \$? = $ac_status" >&5 -+ echo "$as_me:10775: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:10621: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10778: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10624: \$? = $ac_status" >&5 -+ echo "$as_me:10781: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void - else -@@ -10631,7 +10788,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:10634: result: $ac_cv_type_signal" >&5 -+echo "$as_me:10791: result: $ac_cv_type_signal" >&5 - echo "${ECHO_T}$ac_cv_type_signal" >&6 - - cat >>confdefs.h <&5 -+echo "$as_me:10808: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_gnat_exists+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10663,7 +10820,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_gnat_exists="yes" --echo "$as_me:10666: found $ac_dir/$ac_word" >&5 -+echo "$as_me:10823: found $ac_dir/$ac_word" >&5 - break - done - -@@ -10672,10 +10829,10 @@ - fi - gnat_exists=$ac_cv_prog_gnat_exists - if test -n "$gnat_exists"; then -- echo "$as_me:10675: result: $gnat_exists" >&5 -+ echo "$as_me:10832: result: $gnat_exists" >&5 - echo "${ECHO_T}$gnat_exists" >&6 - else -- echo "$as_me:10678: result: no" >&5 -+ echo "$as_me:10835: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -10683,12 +10840,12 @@ - cf_ada_make= - else - --echo "$as_me:10686: checking for gnat version" >&5 -+echo "$as_me:10843: checking for gnat version" >&5 - echo $ECHO_N "checking for gnat version... $ECHO_C" >&6 - cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \ - grep '[0-9].[0-9][0-9]*' |\ - sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` --echo "$as_me:10691: result: $cf_gnat_version" >&5 -+echo "$as_me:10848: result: $cf_gnat_version" >&5 - echo "${ECHO_T}$cf_gnat_version" >&6 - - case $cf_gnat_version in #(vi -@@ -10696,66 +10853,15 @@ - cf_cv_prog_gnat_correct=yes - ;; - *) -- { echo "$as_me:10699: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 -+ { echo "$as_me:10856: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 - echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;} - cf_cv_prog_gnat_correct=no - ;; - esac - --echo "$as_me:10705: checking if GNAT supports generics" >&5 --echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6 --case $cf_gnat_version in #(vi --3.[1-9]*|[4-9].*) #(vi -- cf_gnat_generics=yes -- ;; --*) -- cf_gnat_generics=no -- ;; --esac --echo "$as_me:10715: result: $cf_gnat_generics" >&5 --echo "${ECHO_T}$cf_gnat_generics" >&6 -- --if test "$cf_gnat_generics" = yes --then -- cf_compile_generics=generics -- cf_generic_objects="\${GENOBJS}" --else -- cf_compile_generics= -- cf_generic_objects= --fi -- --echo "$as_me:10727: checking if GNAT supports project files" >&5 --echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6 --case $cf_gnat_version in #(vi --3.[0-9]*) #(vi -- cf_gnat_projects=no -- ;; --*) -- case $cf_cv_system_name in #(vi -- cygwin*) #(vi -- cf_gnat_projects=no -- ;; -- *) -- cf_gnat_projects=yes -- ;; -- esac -- ;; --esac --echo "$as_me:10744: result: $cf_gnat_projects" >&5 --echo "${ECHO_T}$cf_gnat_projects" >&6 -- --if test "$cf_gnat_projects" = yes --then -- USE_OLD_MAKERULES="#" -- USE_GNAT_PROJECTS="" --else -- USE_OLD_MAKERULES="" -- USE_GNAT_PROJECTS="#" --fi -- - # Extract the first word of "m4", so it can be a program name with args. - set dummy m4; ac_word=$2 --echo "$as_me:10758: checking for $ac_word" >&5 -+echo "$as_me:10864: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_M4_exists+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10770,7 +10876,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_M4_exists="yes" --echo "$as_me:10773: found $ac_dir/$ac_word" >&5 -+echo "$as_me:10879: found $ac_dir/$ac_word" >&5 - break - done - -@@ -10779,10 +10885,10 @@ - fi - M4_exists=$ac_cv_prog_M4_exists - if test -n "$M4_exists"; then -- echo "$as_me:10782: result: $M4_exists" >&5 -+ echo "$as_me:10888: result: $M4_exists" >&5 - echo "${ECHO_T}$M4_exists" >&6 - else -- echo "$as_me:10785: result: no" >&5 -+ echo "$as_me:10891: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -10791,10 +10897,10 @@ - echo Ada95 binding required program m4 not found. Ada95 binding disabled. - fi - if test "$cf_cv_prog_gnat_correct" = yes; then -- echo "$as_me:10794: checking if GNAT works" >&5 -+ echo "$as_me:10900: checking if GNAT works" >&5 - echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 - --rm -rf conftest* -+rm -rf conftest* *~conftest* - cat >>conftest.ads <&5 -+ echo "$as_me:10928: result: $cf_cv_prog_gnat_correct" >&5 - echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6 - fi - fi - - if test "$cf_cv_prog_gnat_correct" = yes; then - -- ADAFLAGS="$ADAFLAGS -O3 -gnatpn" -+ # make ADAFLAGS consistent with CFLAGS -+ case "$CFLAGS" in -+ *-g*) -+ -+ ADAFLAGS="$ADAFLAGS -g" -+ -+ ;; -+ esac -+ case "$CFLAGS" in -+ *-O*) -+ -+ ADAFLAGS="$ADAFLAGS -O3" -+ -+ ;; -+ esac -+ -+echo "$as_me:10951: checking if GNAT supports generics" >&5 -+echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6 -+case $cf_gnat_version in #(vi -+3.[1-9]*|[4-9].*) #(vi -+ cf_gnat_generics=yes -+ ;; -+*) -+ cf_gnat_generics=no -+ ;; -+esac -+echo "$as_me:10961: result: $cf_gnat_generics" >&5 -+echo "${ECHO_T}$cf_gnat_generics" >&6 -+ -+if test "$cf_gnat_generics" = yes -+then -+ cf_compile_generics=generics -+ cf_generic_objects="\${GENOBJS}" -+else -+ cf_compile_generics= -+ cf_generic_objects= -+fi - --echo "$as_me:10831: checking if GNAT pragma Unreferenced works" >&5 -+echo "$as_me:10973: checking if GNAT supports SIGINT" >&5 -+echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6 -+if test "${cf_cv_gnat_sigint+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+rm -rf conftest* *~conftest* -+cat >>conftest.ads <>conftest.adb <&5 2>&1 ) ; then -+ cf_cv_gnat_sigint=yes -+else -+ cf_cv_gnat_sigint=no -+fi -+rm -rf conftest* *~conftest* -+ -+fi -+echo "$as_me:11021: result: $cf_cv_gnat_sigint" >&5 -+echo "${ECHO_T}$cf_cv_gnat_sigint" >&6 -+ -+if test $cf_cv_gnat_sigint = yes ; then -+ USE_GNAT_SIGINT="" -+else -+ USE_GNAT_SIGINT="#" -+fi -+ -+echo "$as_me:11030: checking if GNAT pragma Unreferenced works" >&5 - echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6 - if test "${cf_cv_pragma_unreferenced+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - --rm -rf conftest* -+rm -rf conftest* *~conftest* - cat >>conftest.ads <&5 -+echo "$as_me:11061: result: $cf_cv_pragma_unreferenced" >&5 - echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6 - - # if the pragma is supported, use it (needed in the Trace code). -@@ -10869,7 +11068,105 @@ - PRAGMA_UNREF=FALSE - fi - --echo "$as_me:10872: checking for ada-compiler" >&5 -+cf_gnat_libraries=no -+cf_gnat_projects=no -+ -+echo "$as_me:11074: checking if GNAT supports project files" >&5 -+echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6 -+case $cf_gnat_version in #(vi -+3.[0-9]*) #(vi -+ ;; -+*) -+ case $cf_cv_system_name in #(vi -+ cygwin*) #(vi -+ ;; -+ *) -+ mkdir conftest.src conftest.bin conftest.lib -+ cd conftest.src -+ rm -rf conftest* *~conftest* -+ cat >>library.gpr <>confpackage.ads <>confpackage.adb <&5 2>&1 ) ; then -+ cf_gnat_projects=yes -+ fi -+ cd .. -+ if test -f conftest.lib/confpackage.ali -+ then -+ cf_gnat_libraries=yes -+ fi -+ rm -rf conftest* *~conftest* -+ ;; -+ esac -+ ;; -+esac -+echo "$as_me:11142: result: $cf_gnat_projects" >&5 -+echo "${ECHO_T}$cf_gnat_projects" >&6 -+ -+if test $cf_gnat_projects = yes -+then -+ echo "$as_me:11147: checking if GNAT supports libraries" >&5 -+echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6 -+ echo "$as_me:11149: result: $cf_gnat_libraries" >&5 -+echo "${ECHO_T}$cf_gnat_libraries" >&6 -+fi -+ -+if test "$cf_gnat_projects" = yes -+then -+ USE_OLD_MAKERULES="#" -+ USE_GNAT_PROJECTS="" -+else -+ USE_OLD_MAKERULES="" -+ USE_GNAT_PROJECTS="#" -+fi -+ -+if test "$cf_gnat_libraries" = yes -+then -+ USE_GNAT_LIBRARIES="" -+else -+ USE_GNAT_LIBRARIES="#" -+fi -+ -+echo "$as_me:11169: checking for ada-compiler" >&5 - echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6 - - # Check whether --with-ada-compiler or --without-ada-compiler was given. -@@ -10880,12 +11177,12 @@ - cf_ada_compiler=gnatmake - fi; - --echo "$as_me:10883: result: $cf_ada_compiler" >&5 -+echo "$as_me:11180: result: $cf_ada_compiler" >&5 - echo "${ECHO_T}$cf_ada_compiler" >&6 - - cf_ada_package=terminal_interface - --echo "$as_me:10888: checking for ada-include" >&5 -+echo "$as_me:11185: checking for ada-include" >&5 - echo $ECHO_N "checking for ada-include... $ECHO_C" >&6 - - # Check whether --with-ada-include or --without-ada-include was given. -@@ -10921,7 +11218,7 @@ - withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:10924: error: expected a pathname, not \"$withval\"" >&5 -+ { { echo "$as_me:11221: error: expected a pathname, not \"$withval\"" >&5 - echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -10930,10 +11227,10 @@ - fi - ADA_INCLUDE="$withval" - --echo "$as_me:10933: result: $ADA_INCLUDE" >&5 -+echo "$as_me:11230: result: $ADA_INCLUDE" >&5 - echo "${ECHO_T}$ADA_INCLUDE" >&6 - --echo "$as_me:10936: checking for ada-objects" >&5 -+echo "$as_me:11233: checking for ada-objects" >&5 - echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6 - - # Check whether --with-ada-objects or --without-ada-objects was given. -@@ -10969,7 +11266,7 @@ - withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:10972: error: expected a pathname, not \"$withval\"" >&5 -+ { { echo "$as_me:11269: error: expected a pathname, not \"$withval\"" >&5 - echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -10978,10 +11275,10 @@ - fi - ADA_OBJECTS="$withval" - --echo "$as_me:10981: result: $ADA_OBJECTS" >&5 -+echo "$as_me:11278: result: $ADA_OBJECTS" >&5 - echo "${ECHO_T}$ADA_OBJECTS" >&6 - --echo "$as_me:10984: checking if an Ada95 shared-library should be built" >&5 -+echo "$as_me:11281: checking if an Ada95 shared-library should be built" >&5 - echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6 - - # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given. -@@ -10991,7 +11288,7 @@ - else - with_ada_sharedlib=no - fi; --echo "$as_me:10994: result: $with_ada_sharedlib" >&5 -+echo "$as_me:11291: result: $with_ada_sharedlib" >&5 - echo "${ECHO_T}$with_ada_sharedlib" >&6 - - ADA_SHAREDLIB='lib$(LIB_NAME).so.1' -@@ -11006,7 +11303,15 @@ - fi - fi - -+ else -+ { { echo "$as_me:11307: error: No usable Ada compiler found" >&5 -+echo "$as_me: error: No usable Ada compiler found" >&2;} -+ { (exit 1); exit 1; }; } - fi -+else -+ { { echo "$as_me:11312: error: The Ada compiler is needed for this package" >&5 -+echo "$as_me: error: The Ada compiler is needed for this package" >&2;} -+ { (exit 1); exit 1; }; } - fi - - ################################################################################ -@@ -11049,7 +11354,7 @@ - fi - - ### Build up pieces for makefile rules --echo "$as_me:11052: checking default library suffix" >&5 -+echo "$as_me:11357: checking default library suffix" >&5 - echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 - - case $DFT_LWR_MODEL in -@@ -11060,10 +11365,10 @@ - shared) DFT_ARG_SUFFIX='' ;; - esac - test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" --echo "$as_me:11063: result: $DFT_ARG_SUFFIX" >&5 -+echo "$as_me:11368: result: $DFT_ARG_SUFFIX" >&5 - echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 - --echo "$as_me:11066: checking default library-dependency suffix" >&5 -+echo "$as_me:11371: checking default library-dependency suffix" >&5 - echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 - - case $DFT_LWR_MODEL in #(vi -@@ -11116,10 +11421,10 @@ - esac - test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}" - test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}" --echo "$as_me:11119: result: $DFT_DEP_SUFFIX" >&5 -+echo "$as_me:11424: result: $DFT_DEP_SUFFIX" >&5 - echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 - --echo "$as_me:11122: checking default object directory" >&5 -+echo "$as_me:11427: checking default object directory" >&5 - echo $ECHO_N "checking default object directory... $ECHO_C" >&6 - - case $DFT_LWR_MODEL in -@@ -11135,7 +11440,7 @@ - DFT_OBJ_SUBDIR='obj_s' ;; - esac - esac --echo "$as_me:11138: result: $DFT_OBJ_SUBDIR" >&5 -+echo "$as_me:11443: result: $DFT_OBJ_SUBDIR" >&5 - echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6 - - ### Set up low-level terminfo dependencies for makefiles. -@@ -11254,7 +11559,7 @@ - - NCURSES_SHLIB2="sh -c" - --ADA_SUBDIRS="include gen src" -+ADA_SUBDIRS="include gen src doc" - if test "x$cf_with_tests" != "xno" ; then - ADA_SUBDIRS="$ADA_SUBDIRS samples" - fi -@@ -11267,7 +11572,10 @@ - - EXTERNAL_TREE= - --ac_config_files="$ac_config_files $SUB_MAKEFILES Makefile" -+# match layout used by make-tar.sh -+ADAHTML_DIR=../doc/ada -+ -+ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile" - ac_config_commands="$ac_config_commands default" - cat >confcache <<\_ACEOF - # This file is a shell script that caches the results of configure -@@ -11348,7 +11656,7 @@ - : ${CONFIG_STATUS=./config.status} - ac_clean_files_save=$ac_clean_files - ac_clean_files="$ac_clean_files $CONFIG_STATUS" --{ echo "$as_me:11351: creating $CONFIG_STATUS" >&5 -+{ echo "$as_me:11659: creating $CONFIG_STATUS" >&5 - echo "$as_me: creating $CONFIG_STATUS" >&6;} - cat >$CONFIG_STATUS <<_ACEOF - #! $SHELL -@@ -11480,7 +11788,7 @@ - cat >>$CONFIG_STATUS <&5 - echo "$as_me: error: ambiguous option: $1 - Try \`$0 --help' for more information." >&2;} -@@ -11543,7 +11851,7 @@ - ac_need_defaults=false;; - - # This is an error. -- -*) { { echo "$as_me:11546: error: unrecognized option: $1 -+ -*) { { echo "$as_me:11854: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&5 - echo "$as_me: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&2;} -@@ -11562,7 +11870,7 @@ - ## Running config.status. ## - ## ----------------------- ## - --This file was extended by $as_me 2.52.20101001, executed with -+This file was extended by $as_me 2.52.20101002, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS -@@ -11610,10 +11918,11 @@ - case "$ac_config_target" in - # Handling of arguments. - "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;; -+ "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; -- *) { { echo "$as_me:11616: error: invalid argument: $ac_config_target" >&5 -+ *) { { echo "$as_me:11925: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -@@ -11725,6 +12034,7 @@ - s,@INSTALL_DATA@,$INSTALL_DATA,;t t - s,@LN_S@,$LN_S,;t t - s,@PKG_CONFIG@,$PKG_CONFIG,;t t -+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t - s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t - s,@SET_MAKE@,$SET_MAKE,;t t - s,@CTAGS@,$CTAGS,;t t -@@ -11780,17 +12090,19 @@ - s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t - s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t - s,@ECHO_LINK@,$ECHO_LINK,;t t -+s,@ADAFLAGS@,$ADAFLAGS,;t t - s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t - s,@ADA_TRACE@,$ADA_TRACE,;t t - s,@gnat_exists@,$gnat_exists,;t t -+s,@M4_exists@,$M4_exists,;t t -+s,@cf_ada_make@,$cf_ada_make,;t t - s,@cf_compile_generics@,$cf_compile_generics,;t t - s,@cf_generic_objects@,$cf_generic_objects,;t t -+s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t -+s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t - s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t - s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t --s,@M4_exists@,$M4_exists,;t t --s,@cf_ada_make@,$cf_ada_make,;t t --s,@ADAFLAGS@,$ADAFLAGS,;t t --s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t -+s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t - s,@cf_ada_compiler@,$cf_ada_compiler,;t t - s,@cf_ada_package@,$cf_ada_package,;t t - s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t -@@ -11810,6 +12122,7 @@ - s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t - s,@NCURSES_TREE@,$NCURSES_TREE,;t t - s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t -+s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t - CEOF - - EOF -@@ -11924,7 +12237,7 @@ - esac - - if test x"$ac_file" != x-; then -- { echo "$as_me:11927: creating $ac_file" >&5 -+ { echo "$as_me:12240: creating $ac_file" >&5 - echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi -@@ -11942,7 +12255,7 @@ - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:11945: error: cannot find input file: $f" >&5 -+ test -f "$f" || { { echo "$as_me:12258: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; -@@ -11955,7 +12268,7 @@ - echo $srcdir/$f - else - # /dev/null tree -- { { echo "$as_me:11958: error: cannot find input file: $f" >&5 -+ { { echo "$as_me:12271: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; -@@ -12021,7 +12334,7 @@ - * ) ac_file_in=$ac_file.in ;; - esac - -- test x"$ac_file" != x- && { echo "$as_me:12024: creating $ac_file" >&5 -+ test x"$ac_file" != x- && { echo "$as_me:12337: creating $ac_file" >&5 - echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the -@@ -12032,7 +12345,7 @@ - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:12035: error: cannot find input file: $f" >&5 -+ test -f "$f" || { { echo "$as_me:12348: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; -@@ -12045,7 +12358,7 @@ - echo $srcdir/$f - else - # /dev/null tree -- { { echo "$as_me:12048: error: cannot find input file: $f" >&5 -+ { { echo "$as_me:12361: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; -@@ -12103,7 +12416,7 @@ - rm -f $tmp/in - if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then -- { echo "$as_me:12106: $ac_file is unchanged" >&5 -+ { echo "$as_me:12419: $ac_file is unchanged" >&5 - echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -diff -Naur ncurses-5.8/Ada95/configure.in ncurses-5.8-20110402/Ada95/configure.in ---- ncurses-5.8/Ada95/configure.in 2010-11-06 23:11:21.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/configure.in 2011-04-01 00:49:22.000000000 +0200 -@@ -1,5 +1,5 @@ - dnl*************************************************************************** --dnl Copyright (c) 2010 Free Software Foundation, Inc. * -+dnl Copyright (c) 2010,2011 Free Software Foundation, Inc. * - dnl * - dnl Permission is hereby granted, free of charge, to any person obtaining a * - dnl copy of this software and associated documentation files (the * -@@ -28,14 +28,14 @@ - dnl - dnl Author: Thomas E. Dickey - dnl --dnl $Id: configure.in,v 1.21 2010/11/06 22:11:21 tom Exp $ -+dnl $Id: configure.in,v 1.30 2011/03/31 22:49:22 tom Exp $ - dnl Process this file with autoconf to produce a configure script. - dnl - dnl See http://invisible-island.net/autoconf/ for additional information. - dnl - dnl --------------------------------------------------------------------------- - AC_PREREQ(2.13.20020210) --AC_REVISION($Revision: 1.21 $) -+AC_REVISION($Revision: 1.30 $) - AC_INIT(gen/gen.c) - AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) - -@@ -76,7 +76,7 @@ - # if we find pkg-config, check if we should install the ".pc" files. - CF_PKG_CONFIG - --if test "$PKG_CONFIG" != no ; then -+if test "$PKG_CONFIG" != none ; then - AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG) - - # Leave this as something that can be overridden in the environment. -@@ -160,6 +160,15 @@ - ### Use "--without-normal --with-shared" to allow the default model to be - ### shared, for example. - cf_list_models="" -+ -+AC_MSG_CHECKING(if you want to build shared C-objects) -+AC_ARG_WITH(shared, -+ [ --with-shared generate shared C-objects (needed for --with-ada-sharedlib)], -+ [with_shared=$withval], -+ [with_shared=no]) -+AC_MSG_RESULT($with_shared) -+test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" -+ - AC_MSG_CHECKING(for specified models) - test -z "$cf_list_models" && cf_list_models=normal - AC_MSG_RESULT($cf_list_models) -@@ -206,6 +215,23 @@ - - CF_SHARED_OPTS - -+# The test/sample programs in the original tree link using rpath option. -+# Make it optional for packagers. -+if test -n "$LOCAL_LDFLAGS" -+then -+ AC_MSG_CHECKING(if you want to link sample programs with rpath option) -+ AC_ARG_ENABLE(rpath-link, -+ [ --enable-rpath-link link sample programs with rpath option], -+ [with_rpath_link=$enableval], -+ [with_rpath_link=yes]) -+ AC_MSG_RESULT($with_rpath_link) -+ if test "$with_rpath_link" = no -+ then -+ LOCAL_LDFLAGS= -+ LOCAL_LDFLAGS2= -+ fi -+fi -+ - ############################################################################### - CF_HELP_MESSAGE(Fine-Tuning Your Configuration:) - -@@ -324,6 +350,9 @@ - fi - AC_SUBST(PTHREAD) - -+# OpenSUSE is installing ncurses6, using reentrant option. -+AC_CHECK_FUNC(_nc_TABSIZE,[assume_reentrant=yes], [assume_reentrant=no]) -+ - # Reentrant code has to be opaque; there's little advantage to making ncurses - # opaque outside of that, so there is no --enable-opaque option. We can use - # this option without --with-pthreads, but this will be always set for -@@ -332,13 +361,13 @@ - AC_ARG_ENABLE(reentrant, - [ --enable-reentrant compile with experimental reentrant code], - [with_reentrant=$enableval], -- [with_reentrant=no]) -+ [with_reentrant=$assume_reentrant]) - AC_MSG_RESULT($with_reentrant) - if test "$with_reentrant" = yes ; then - cf_cv_enable_reentrant=1 - if test $cf_cv_weak_symbols = yes ; then - CF_REMOVE_LIB(LIBS,$LIBS,pthread) -- else -+ elif test "$assume_reentrant" = no ; then - LIB_SUFFIX="t${LIB_SUFFIX}" - fi - AC_DEFINE(USE_REENTRANT) -@@ -386,7 +415,7 @@ - AC_MSG_RESULT($with_warnings) - - if test "x$with_warnings" = "xyes"; then -- ADAFLAGS="$ADAFLAGS -gnatg" -+ CF_ADD_ADAFLAGS(-gnatg) - CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum) - fi - CF_GCC_ATTRIBUTES -@@ -405,7 +434,7 @@ - AC_DEFINE(NDEBUG) - CPPFLAGS="$CPPFLAGS -DNDEBUG" - else -- ADAFLAGS="$ADAFLAGS -gnata" -+ CF_ADD_ADAFLAGS(-gnata) - fi - fi - -@@ -491,9 +520,23 @@ - if test "$cf_with_ada" != "no" ; then - CF_PROG_GNAT - if test "$cf_cv_prog_gnat_correct" = yes; then -- CF_ADD_ADAFLAGS(-O3 -gnatpn) - -+ # make ADAFLAGS consistent with CFLAGS -+ case "$CFLAGS" in -+ *-g*) -+ CF_ADD_ADAFLAGS(-g) -+ ;; -+ esac -+ case "$CFLAGS" in -+ *-O*) -+ CF_ADD_ADAFLAGS(-O3) -+ ;; -+ esac -+ -+ CF_GNAT_GENERICS -+ CF_GNAT_SIGINT - CF_GNAT_PRAGMA_UNREF -+ CF_GNAT_PROJECTS - - CF_WITH_ADA_COMPILER - -@@ -503,7 +546,11 @@ - CF_WITH_ADA_INCLUDE - CF_WITH_ADA_OBJECTS - CF_WITH_ADA_SHAREDLIB -+ else -+ AC_MSG_ERROR(No usable Ada compiler found) - fi -+else -+ AC_MSG_ERROR(The Ada compiler is needed for this package) - fi - - ################################################################################ -@@ -575,7 +622,7 @@ - NCURSES_SHLIB2="sh -c" - AC_SUBST(NCURSES_SHLIB2) - --ADA_SUBDIRS="include gen src" -+ADA_SUBDIRS="include gen src doc" - if test "x$cf_with_tests" != "xno" ; then - ADA_SUBDIRS="$ADA_SUBDIRS samples" - fi -@@ -591,8 +638,13 @@ - EXTERNAL_TREE= - AC_SUBST(EXTERNAL_TREE) - -+# match layout used by make-tar.sh -+ADAHTML_DIR=../doc/ada -+AC_SUBST(ADAHTML_DIR) -+ - AC_OUTPUT( \ - $SUB_MAKEFILES \ -+ doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in \ - Makefile,[ - if test -z "$USE_OLD_MAKERULES" ; then - $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile -diff -Naur ncurses-5.8/Ada95/doc/Makefile.in ncurses-5.8-20110402/Ada95/doc/Makefile.in ---- ncurses-5.8/Ada95/doc/Makefile.in 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/doc/Makefile.in 2011-03-26 20:26:17.000000000 +0100 -@@ -0,0 +1,81 @@ -+# $Id: Makefile.in,v 1.2 2011/03/26 19:26:17 tom Exp $ -+############################################################################## -+# Copyright (c) 2011 Free Software Foundation, Inc. # -+# # -+# Permission is hereby granted, free of charge, to any person obtaining a # -+# copy of this software and associated documentation files (the "Software"), # -+# to deal in the Software without restriction, including without limitation # -+# the rights to use, copy, modify, merge, publish, distribute, distribute # -+# with modifications, sublicense, and/or sell copies of the Software, and to # -+# permit persons to whom the Software is furnished to do so, subject to the # -+# following conditions: # -+# # -+# The above copyright notice and this permission notice shall be included in # -+# all copies or substantial portions of the Software. # -+# # -+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # -+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # -+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # -+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # -+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # -+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # -+# DEALINGS IN THE SOFTWARE. # -+# # -+# Except as contained in this notice, the name(s) of the above copyright # -+# holders shall not be used in advertising or otherwise to promote the sale, # -+# use or other dealings in this Software without prior written # -+# authorization. # -+############################################################################## -+# -+# Author: Thomas E. Dickey -+# -+# Makefile for AdaCurses manual pages. -+ -+SHELL = /bin/sh -+VPATH = @srcdir@ -+ -+DESTDIR = @DESTDIR@ -+srcdir = @srcdir@ -+prefix = @prefix@ -+exec_prefix = @exec_prefix@ -+datadir = @datadir@ -+mandir = @mandir@ -+ -+INSTALL = @INSTALL@ -+INSTALL_DATA = @INSTALL_DATA@ -+ -+DFT_ARG_SUFFIX = @DFT_ARG_SUFFIX@ -+ -+THIS = AdaCurses -+DOCDIR = $(DESTDIR)$(datadir)/doc/$(THIS) -+MANDIR = $(DESTDIR)$(mandir)/man1 -+ -+all \ -+sources \ -+depend \ -+tags : -+ -+$(DOCDIR) \ -+$(MANDIR) : -+ mkdir -p $@ -+ -+install install.man : $(MANDIR) -+ $(INSTALL_DATA) adacurses${DFT_ARG_SUFFIX}-config.1 $(MANDIR) -+ -+uninstall uninstall.man : -+ -rm -f $(MANDIR)/adacurses${DFT_ARG_SUFFIX}-config.1 -+ -+# HTML documentation is optional, usually in a separate package. -+install.html : $(DOCDIR) -+ cd $(srcdir) && tar -cf - *.htm* ada | tar -C $(DOCDIR) -xf - -+ -+uninstall.html : -+ -rm -rf $(DOCDIR) -+ -+mostlyclean : -+ -rm -f core tags TAGS *~ *.bak *.ln *.atac trace -+ -+clean: mostlyclean -+ -+distclean realclean: clean -+ -rm -f Makefile *-config.1 -diff -Naur ncurses-5.8/Ada95/gen/gen.c ncurses-5.8-20110402/Ada95/gen/gen.c ---- ncurses-5.8/Ada95/gen/gen.c 2010-09-04 23:19:50.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/gen/gen.c 2011-04-01 01:50:24.000000000 +0200 -@@ -1,5 +1,5 @@ - /**************************************************************************** -- * Copyright (c) 1998,2009,2010 Free Software Foundation, Inc. * -+ * Copyright (c) 1998,2010,2011 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * -@@ -32,7 +32,7 @@ - - /* - Version Control -- $Id: gen.c,v 1.54 2010/09/04 21:19:50 tom Exp $ -+ $Id: gen.c,v 1.59 2011/03/31 23:50:24 tom Exp $ - --------------------------------------------------------------------------*/ - /* - This program generates various record structures and constants from the -@@ -124,7 +124,10 @@ - int len, /* size of the record in bytes */ - int bias) - { -- int i, n, l, cnt = 0, low, high; -+ const char *unused_name = "Unused"; -+ int long_bits = (8 * (int)sizeof(unsigned long)); -+ int len_bits = (8 * len); -+ int i, j, n, l, cnt = 0, low, high; - int width = strlen(RES_NAME) + 3; - unsigned long a; - unsigned long mask = 0; -@@ -144,8 +147,32 @@ - printf(" record\n"); - for (i = 0; nap[i].name != (char *)0; i++) - { -+ mask |= nap[i].attr; - printf(" %-*s : Boolean;\n", width, nap[i].name); - } -+ -+ /* -+ * Compute a mask for the unused bits in this target. -+ */ -+ mask = ~mask; -+ /* -+ * Bits in the biased area are unused by the target. -+ */ -+ for (j = 0; j < bias; ++j) -+ { -+ mask &= (unsigned long)(~(1L << j)); -+ } -+ /* -+ * Bits past the target's size are really unused. -+ */ -+ for (j = len_bits + bias; j < long_bits; ++j) -+ { -+ mask &= (unsigned long)(~(1L << j)); -+ } -+ if (mask != 0) -+ { -+ printf(" %-*s : Boolean;\n", width, unused_name); -+ } - printf(" end record;\n"); - printf(" pragma Convention (C, %s);\n\n", name); - -@@ -155,16 +182,22 @@ - for (i = 0; nap[i].name != (char *)0; i++) - { - a = nap[i].attr; -- mask |= a; - l = find_pos((char *)&a, sizeof(a), &low, &high); - if (l >= 0) - printf(" %-*s at 0 range %2d .. %2d;\n", width, nap[i].name, - low - bias, high - bias); - } -+ if (mask != 0) -+ { -+ l = find_pos((char *)&mask, sizeof(mask), &low, &high); -+ if (l >= 0) -+ printf(" %-*s at 0 range %2d .. %2d;\n", width, unused_name, -+ low - bias, high - bias); -+ } - i = 1; - n = cnt; - printf(" end record;\n"); -- printf(" for %s'Size use %d;\n", name, 8 * len); -+ printf(" for %s'Size use %d;\n", name, len_bits); - printf(" -- Please note: this rep. clause is generated and may be\n"); - printf(" -- different on your system."); - } -@@ -241,7 +274,10 @@ - gen_attr_set(const char *name) - { - /* All of the A_xxx symbols are defined in ncurses, but not all are nonzero -- * if "configure --enable-widec" is specified. -+ * if "configure --enable-widec" is not specified. Originally (in -+ * 1999-2000), the ifdef's also were needed since the proposed bit-layout -+ * for wide characters allocated 16-bits for A_CHARTEXT, leaving too few -+ * bits for a few of the A_xxx symbols. - */ - static const name_attribute_pair nap[] = - { -@@ -332,6 +368,7 @@ - {"Internal_Calls", TRACE_ICALLS}, - {"Character_Calls", TRACE_CCALLS}, - {"Termcap_TermInfo", TRACE_DATABASE}, -+ {"Attributes_And_Colors", TRACE_ATTRS}, - {(char *)0, 0} - }; - gen_reps(nap, name, sizeof(int), 0); -@@ -770,7 +807,7 @@ - static void - acs_def(const char *name, chtype *a) - { -- int c = a - &acs_map[0]; -+ int c = (int)(a - &acs_map[0]); - - printf(" %-24s : constant Character := ", name); - if (isprint(UChar(c)) && (c != '`')) -@@ -1278,12 +1315,6 @@ - printf(" Sizeof%-*s : constant Natural := %2ld; -- %s\n", - 12, "_bool", (long)sizeof(bool), "bool"); - -- /* In ncurses _maxy and _maxx needs an offset for the "public" -- * value -- */ -- printf(" Offset%-*s : constant Natural := %2d; -- %s\n", -- 12, "_XY", 1, "int"); -- printf("\n"); - printf(" type Curses_Bool is mod 2 ** Interfaces.C.%s'Size;\n", s_bool); - } - -diff -Naur ncurses-5.8/Ada95/gen/Makefile.in ncurses-5.8-20110402/Ada95/gen/Makefile.in ---- ncurses-5.8/Ada95/gen/Makefile.in 2011-01-22 20:47:09.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/gen/Makefile.in 2011-03-27 00:36:30.000000000 +0100 -@@ -28,7 +28,7 @@ - # - # Author: Juergen Pfeifer, 1996 - # --# $Id: Makefile.in,v 1.71 2011/01/22 19:47:09 tom Exp $ -+# $Id: Makefile.in,v 1.74 2011/03/26 23:36:30 tom Exp $ - # - .SUFFIXES: - -@@ -57,7 +57,7 @@ - HOST_CC = @BUILD_CC@ - CFLAGS = @CFLAGS@ - --CPPFLAGS = @ACPPFLAGS@ \ -+CPPFLAGS = @ACPPFLAGS@ @CPPFLAGS@ \ - -DHAVE_CONFIG_H -I$(srcdir) - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) -@@ -88,7 +88,7 @@ - GENERATE = $(PROG_GENERATE) '@DFT_ARG_SUFFIX@' - DEL_ADAMODE = sed -e '/^\-\-\ \ \-\*\-\ ada\ \-\*\-.*/d' - --GNATHTML = `type -p gnathtml || type -p gnathtml.pl` -+GNATHTML = `type -p gnathtml || type -p gnathtml.pl 2>/dev/null` - GNATHP = www.gnat.com - - ################################################################################ -@@ -305,6 +305,7 @@ - $(DEL_ADAMODE) >$@ - - $(ADA_SRCDIR)/$(ABASE)-panels.ads: $(srcdir)/$(ABASE)-panels.ads.m4 \ -+ $(GEN_FILES4) \ - $(srcdir)/normal.m4 - $(M4) $(M4FLAGS) -DM4MACRO=$(srcdir)/normal.m4 \ - $(srcdir)/$(ABASE)-panels.ads.m4 |\ -@@ -377,7 +378,7 @@ - - realclean :: distclean - --HTML_DIR = ../../doc/html/ada -+HTML_DIR = @ADAHTML_DIR@ - - instab.tmp : table.m4 $(GEN_SRC) - @rm -f $@ -@@ -405,6 +406,7 @@ - @rm -f instab.tmp - - adahtml: -+ test -n "$(GNATHTML)" || exit 1 - @find $(HTML_DIR) -type f -exec rm -f {} \; - @mkdir -p $(HTML_DIR) - cp -p ../src/*.ad[sb] . && chmod +w *.ad[sb] -diff -Naur ncurses-5.8/Ada95/gen/terminal_interface-curses.adb.m4 ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses.adb.m4 ---- ncurses-5.8/Ada95/gen/terminal_interface-curses.adb.m4 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses.adb.m4 2011-03-23 00:02:14.000000000 +0100 -@@ -9,7 +9,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -37,8 +37,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.6 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.8 $ -+-- $Date: 2011/03/22 23:02:14 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with System; -@@ -1208,6 +1208,7 @@ - X : Column_Position; - begin - Get_Size (Win, Y, X); -+ pragma Unreferenced (X); - Change_Lines_Status (Win, 0, Positive (Y), True); - end Touch; - -@@ -1217,6 +1218,7 @@ - X : Column_Position; - begin - Get_Size (Win, Y, X); -+ pragma Unreferenced (X); - Change_Lines_Status (Win, 0, Positive (Y), False); - end Untouch; - -@@ -1352,10 +1354,8 @@ - function GetMaxX (W : Window) return C_Int; - pragma Import (C, GetMaxX, "getmaxx"); - -- Y : constant C_Int := GetMaxY (Win) -- + C_Int (Offset_XY); -- X : constant C_Int := GetMaxX (Win) -- + C_Int (Offset_XY); -+ Y : constant C_Int := GetMaxY (Win); -+ X : constant C_Int := GetMaxX (Win); - begin - Number_Of_Lines := Line_Count (Y); - Number_Of_Columns := Column_Count (X); -diff -Naur ncurses-5.8/Ada95/gen/terminal_interface-curses.ads.m4 ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses.ads.m4 ---- ncurses-5.8/Ada95/gen/terminal_interface-curses.ads.m4 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses.ads.m4 2011-03-20 00:05:56.000000000 +0100 -@@ -9,7 +9,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -37,8 +37,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.42 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.44 $ -+-- $Date: 2011/03/19 23:05:56 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - include(`Base_Defs') -@@ -52,8 +52,8 @@ - type Window is private; - Null_Window : constant Window; - -- type Line_Position is new Natural; -- line coordinate -- type Column_Position is new Natural; -- column coordinate -+ type Line_Position is new Integer; -- line coordinate -+ type Column_Position is new Integer; -- column coordinate - - subtype Line_Count is Line_Position range 1 .. Line_Position'Last; - -- Type to count lines. We do not allow null windows, so must be positive -@@ -461,7 +461,7 @@ - -- ALIAS(`getch()') - -- Get a character from the keyboard and echo it - if enabled - to the - -- window. -- -- If for any reason (i.e. a timeout) we couldn't get a character the -+ -- If for any reason (i.e. a timeout) we could not get a character the - -- returned keycode is Key_None. - pragma Inline (Get_Keystroke); - -@@ -659,7 +659,7 @@ - -- 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. -+ -- We do not inline this procedure. - - -- ANCHOR(`notimeout()',`Set_Escape_Time_Mode') - procedure Set_Escape_Timer_Mode -@@ -940,7 +940,7 @@ - Top_Left_Column : out Column_Position; - Is_Not_A_Subwindow : out Boolean); - -- AKA -- -- Instead of placing -1 in the coordinates as return, we use a boolean -+ -- 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); - -@@ -1122,7 +1122,7 @@ - -- ALIAS(`mvwinchstr()') - -- ALIAS(`mvinchnstr()') - -- ALIAS(`mvinchstr()') -- -- We don't inline the Peek procedures -+ -- We do not inline the Peek procedures - - -- MANPAGE(`curs_getstr.3x') - -@@ -1171,7 +1171,7 @@ - Text : String; - Fmt : Label_Justification := Left); - -- AKA -- -- We don't inline this procedure -+ -- We do not inline this procedure - - -- ANCHOR(`slk_refresh()',`Refresh_Soft_Label_Key') - procedure Refresh_Soft_Label_Keys; -@@ -1273,7 +1273,7 @@ - function Key_Name (Key : Real_Key_Code) return String; - -- AKA - -- Same as function -- -- We don't inline this routine -+ -- We do not inline this routine - - -- ANCHOR(`unctrl()',`Un_Control') - procedure Un_Control (Ch : Attributed_Character; -@@ -1443,7 +1443,7 @@ - -- N.B.: to be more precise, this uses a ncurses specific enhancement of - -- 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. -+ -- uses the sign of Lines to remove a single line from bottom or top. - pragma Inline (Rip_Off_Lines); - - type Cursor_Visibility is (Invisible, Normal, Very_Visible); -@@ -1469,10 +1469,10 @@ - Dir : Transform_Direction := From_Screen); - -- This procedure transforms screen coordinates into coordinates relative - -- to the window and vice versa, depending on the Dir parameter. -- -- Screen coordinates are the position informations on the physical device. -+ -- Screen coordinates are the position information for 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 -+ -- We do not inline this procedure - - -- MANPAGE(`default_colors.3x') - -@@ -1529,7 +1529,7 @@ - -- Not implemented: printw, wprintw, mvprintw, mvwprintw, vwprintw, - -- vw_printw - -- Please use the Ada style Text_IO child packages for formatted -- -- printing. It doesn't make a lot of sense to map the printf style -+ -- printing. It does not make a lot of sense to map the printf style - -- C functions to Ada. - - -- MANPAGE(`curs_scanw.3x') -diff -Naur ncurses-5.8/Ada95/gen/terminal_interface-curses-aux.ads.m4 ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses-aux.ads.m4 ---- ncurses-5.8/Ada95/gen/terminal_interface-curses-aux.ads.m4 2009-12-26 19:35:43.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses-aux.ads.m4 2011-03-19 13:37:41.000000000 +0100 -@@ -10,7 +10,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -38,7 +38,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.17 $ -+-- $Revision: 1.18 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - include(`Base_Defs') -@@ -64,7 +64,7 @@ - -- This is how those constants are defined in ncurses. I see them also - -- exactly like this in all ETI implementations I ever tested. So it - -- could be that this is quite general, but please check with your curses. -- -- This is critical, because curses sometime mixes boolean returns with -+ -- This is critical, because curses sometime mixes Boolean returns with - -- returning an error status. - Curses_Ok : constant C_Int := CF_CURSES_OK; - Curses_Err : constant C_Int := CF_CURSES_ERR; -diff -Naur ncurses-5.8/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 ---- ncurses-5.8/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 2009-12-26 18:46:57.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4 2011-03-19 00:10:43.000000000 +0100 -@@ -10,7 +10,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -38,7 +38,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.15 $ -+-- $Revision: 1.16 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -101,15 +101,15 @@ - pragma Convention (C, Freearg_Function); - - type Field_Check_Function is access -- function (Fld : Field; Usr : System.Address) return C_Int; -+ function (Fld : Field; Usr : System.Address) return Curses_Bool; - pragma Convention (C, Field_Check_Function); - - type Char_Check_Function is access -- function (Ch : C_Int; Usr : System.Address) return C_Int; -+ function (Ch : C_Int; Usr : System.Address) return Curses_Bool; - pragma Convention (C, Char_Check_Function); - - type Choice_Function is access -- function (Fld : Field; Usr : System.Address) return C_Int; -+ function (Fld : Field; Usr : System.Address) return Curses_Bool; - pragma Convention (C, Choice_Function); - - -- +---------------------------------------------------------------------- -@@ -117,7 +117,7 @@ - -- | - type Low_Level_Field_Type is - record -- Status : Interfaces.C.short; -+ Status : Interfaces.C.unsigned_short; - Ref_Count : Interfaces.C.long; - Left, Right : System.Address; - Makearg : Makearg_Function; -@@ -159,7 +159,7 @@ - -- Any other value will raise a Form_Exception. - - function Make_Arg (Args : System.Address) return System.Address; -- pragma Convention (C, Make_Arg); -+ pragma Import (C, Make_Arg, "void_star_make_arg"); - -- This is the Makearg_Function for the internal low-level types - -- introduced by this binding. - -@@ -174,7 +174,7 @@ - -- introduced by this binding. - - function Field_Check_Router (Fld : Field; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -@@ -182,7 +182,7 @@ - -- function. - - function Char_Check_Router (Ch : C_Int; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -@@ -190,7 +190,7 @@ - -- function. - - function Next_Router (Fld : Field; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -@@ -198,7 +198,7 @@ - -- function. - - function Prev_Router (Fld : Field; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -diff -Naur ncurses-5.8/Ada95/gen/terminal_interface-curses-mouse.ads.m4 ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses-mouse.ads.m4 ---- ncurses-5.8/Ada95/gen/terminal_interface-curses-mouse.ads.m4 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/gen/terminal_interface-curses-mouse.ads.m4 2011-03-19 13:35:58.000000000 +0100 -@@ -10,7 +10,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -38,8 +38,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.28 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.29 $ -+-- $Date: 2011/03/19 12:35:58 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - include(`Mouse_Base_Defs') -@@ -49,10 +49,6 @@ - pragma Preelaborate (Terminal_Interface.Curses.Mouse); - - -- MANPAGE(`curs_mouse.3x') -- -- Please note, that in ncurses-1.9.9e documentation mouse support -- -- is still marked as experimental. So also this binding will change -- -- if the ncurses methods change. -- -- - -- mouse_trafo, wmouse_trafo are implemented as Transform_Coordinates - -- in the parent package. - -- -@@ -99,7 +95,7 @@ - State : Button_State; - Mask : in out Event_Mask); - -- 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 -+ -- Before you call this the first time, you should initialize the mask - -- with the Empty_Mask constant - pragma Inline (Register_Reportable_Event); - -@@ -108,7 +104,7 @@ - State : Button_States; - Mask : in out Event_Mask); - -- Register all events described by the Button and the State bitmap. -- -- Before you call this the first time, you should init the mask -+ -- Before you call this the first time, you should initialize the mask - -- with the Empty_Mask constant - - -- ANCHOR(`mousemask()',`Start_Mouse') -diff -Naur ncurses-5.8/Ada95/include/Makefile.in ncurses-5.8-20110402/Ada95/include/Makefile.in ---- ncurses-5.8/Ada95/include/Makefile.in 2010-11-27 22:45:27.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/include/Makefile.in 2011-03-20 00:39:59.000000000 +0100 -@@ -1,6 +1,6 @@ --# $Id: Makefile.in,v 1.2 2010/11/27 21:45:27 tom Exp $ -+# $Id: Makefile.in,v 1.3 2011/03/19 23:39:59 tom Exp $ - ############################################################################## --# Copyright (c) 2010 Free Software Foundation, Inc. # -+# Copyright (c) 2010,2011 Free Software Foundation, Inc. # - # # - # Permission is hereby granted, free of charge, to any person obtaining a # - # copy of this software and associated documentation files (the "Software"), # -@@ -65,6 +65,8 @@ - sources \ - install :: $(AUTO_SRC) - -+uninstall :: -+ - ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh - AWK=$(AWK) sh $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@ - -diff -Naur ncurses-5.8/Ada95/make-tar.sh ncurses-5.8-20110402/Ada95/make-tar.sh ---- ncurses-5.8/Ada95/make-tar.sh 2010-11-06 20:59:07.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/make-tar.sh 2011-03-26 20:07:38.000000000 +0100 -@@ -1,7 +1,7 @@ - #!/bin/sh --# $Id: make-tar.sh,v 1.6 2010/11/06 19:59:07 tom Exp $ -+# $Id: make-tar.sh,v 1.12 2011/03/26 19:07:38 tom Exp $ - ############################################################################## --# Copyright (c) 2010 Free Software Foundation, Inc. # -+# Copyright (c) 2010,2011 Free Software Foundation, Inc. # - # # - # Permission is hereby granted, free of charge, to any person obtaining a # - # copy of this software and associated documentation files (the "Software"), # -@@ -31,15 +31,53 @@ - # documentation. The reason for doing that is to simplify distributing the - # ada binding as a separate package. - -+CDPATH=: -+export CDPATH -+ - TARGET=`pwd` - - : ${ROOTNAME:=ncurses-Ada95} -+: ${PKG_NAME:=AdaCurses} - : ${DESTDIR:=$TARGET} - : ${TMPDIR:=/tmp} - --# This can be run from either the Ada95 subdirectory, or from the top-level -+grep_assign() { -+ grep_assign=`egrep "^$2\>" "$1" | sed -e "s/^$2[ ]*=[ ]*//" -e 's/"//g'` -+ eval $2=\"$grep_assign\" -+} -+ -+grep_patchdate() { -+ grep_assign ../dist.mk NCURSES_MAJOR -+ grep_assign ../dist.mk NCURSES_MINOR -+ grep_assign ../dist.mk NCURSES_PATCH -+} -+ -+# The rpm spec-file in the ncurses tree is a template. Fill in the version -+# information from dist.mk -+edit_specfile() { -+ sed \ -+ -e "s/\\/$NCURSES_MAJOR/g" \ -+ -e "s/\\/$NCURSES_MINOR/g" \ -+ -e "s/\\/$NCURSES_PATCH/g" $1 >$1.new -+ chmod u+w $1 -+ mv $1.new $1 -+} -+ -+make_changelog() { -+ test -f $1 && chmod u+w $1 -+ cat >$1 <MANIFEST ) - - cd $BUILD || exit - -+# Remove build-artifacts. -+find . -name RCS -exec rm -rf {} \; -+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null -+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null -+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null -+ - # There is no need for this script in the tar file. - rm -f $ROOTNAME/make-tar.sh - - # Remove build-artifacts. --find . -name RCS -exec rm -rf {} \; - find . -name "*.gz" -exec rm -rf {} \; - - # Make the files writable... -@@ -88,3 +149,5 @@ - - pwd - ls -l $ROOTNAME.tar.gz -+ -+# vi:ts=4 sw=4 -diff -Naur ncurses-5.8/Ada95/package/AdaCurses-doc.spec ncurses-5.8-20110402/Ada95/package/AdaCurses-doc.spec ---- ncurses-5.8/Ada95/package/AdaCurses-doc.spec 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/AdaCurses-doc.spec 2011-03-26 20:22:39.000000000 +0100 -@@ -0,0 +1,48 @@ -+Summary: AdaCurses - Ada95 binding documentation for ncurses -+%define AppProgram AdaCurses -+%define AppVersion MAJOR.MINOR -+%define AppRelease YYYYMMDD -+%define AppPackage %{AppProgram}-doc -+# $Id: AdaCurses-doc.spec,v 1.1 2011/03/26 19:22:39 tom Exp $ -+Name: %{AppPackage} -+Version: %{AppVersion} -+Release: %{AppRelease} -+License: MIT -+Group: Applications/Development -+URL: ftp://invisible-island.net/%{AppProgram} -+Source0: %{AppProgram}-%{AppRelease}.tgz -+Packager: Thomas Dickey -+ -+%description -+This is the Ada95 binding documentation from the ncurses MAJOR.MINOR -+distribution, for patch-date YYYYMMDD. -+%prep -+ -+%setup -q -n %{AppProgram}-%{AppRelease} -+ -+%build -+ -+INSTALL_PROGRAM='${INSTALL}' \ -+ ./configure \ -+ --target %{_target_platform} \ -+ --prefix=%{_prefix} \ -+ --datadir=%{_datadir} \ -+ --with-ada-sharedlib -+ -+%install -+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -+ -+(cd doc && make install.html DESTDIR=$RPM_BUILD_ROOT ) -+ -+%clean -+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -+ -+%files -+%defattr(-,root,root) -+%{_datadir}/doc/AdaCurses -+ -+%changelog -+# each patch should add its ChangeLog entries here -+ -+* Sat Mar 26 2010 Thomas Dickey -+- initial version -diff -Naur ncurses-5.8/Ada95/package/AdaCurses.spec ncurses-5.8-20110402/Ada95/package/AdaCurses.spec ---- ncurses-5.8/Ada95/package/AdaCurses.spec 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/AdaCurses.spec 2011-04-01 02:08:32.000000000 +0200 -@@ -0,0 +1,78 @@ -+Summary: AdaCurses - Ada95 binding for ncurses -+%define AppProgram AdaCurses -+%define AppVersion MAJOR.MINOR -+%define AppRelease YYYYMMDD -+# $Id: AdaCurses.spec,v 1.12 2011/04/01 00:08:32 tom Exp $ -+Name: %{AppProgram} -+Version: %{AppVersion} -+Release: %{AppRelease} -+License: MIT -+Group: Applications/Development -+URL: ftp://invisible-island.net/%{AppProgram} -+Source0: %{AppProgram}-%{AppRelease}.tgz -+Packager: Thomas Dickey -+ -+%description -+This is the Ada95 binding from the ncurses MAJOR.MINOR distribution, for -+patch-date YYYYMMDD. -+ -+In addition to a library, this package installs sample programs in -+"bin/AdaCurses" to avoid conflict with other packages. -+%prep -+ -+%setup -q -n %{AppProgram}-%{AppRelease} -+ -+%build -+ -+%define ada_libdir %{_prefix}/lib/ada/adalib -+ -+INSTALL_PROGRAM='${INSTALL}' \ -+ ./configure \ -+ --target %{_target_platform} \ -+ --prefix=%{_prefix} \ -+ --bindir=%{_bindir} \ -+ --libdir=%{_libdir} \ -+ --mandir=%{_mandir} \ -+ --datadir=%{_datadir} \ -+ --disable-rpath-link \ -+ --with-shared \ -+ --with-ada-sharedlib -+ -+make -+ -+%install -+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -+ -+make install DESTDIR=$RPM_BUILD_ROOT -+ -+( cd samples && -+ make install.examples \ -+ DESTDIR=$RPM_BUILD_ROOT \ -+ BINDIR=$RPM_BUILD_ROOT%{_bindir}/%{AppProgram} -+) -+ -+%clean -+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -+ -+%files -+%defattr(-,root,root) -+%{_bindir}/adacurses*-config -+%{_bindir}/%{AppProgram}/* -+%{_libdir}/libAdaCurses.* -+%{ada_libdir}/libAdaCurses.* -+%{ada_libdir}/terminal_interface* -+%{_mandir}/man1/adacurses*-config.1* -+%{_datadir}/%{AppProgram}/* -+%{_datadir}/ada/adainclude/terminal_interface* -+ -+%changelog -+# each patch should add its ChangeLog entries here -+ -+* Thu Mar 31 2010 Thomas Dickey -+- use --with-shared option for consistency with --with-ada-sharelib -+- ensure that MY_DATADIR is set when installing examples -+- add ada_libdir symbol to handle special case where libdir is /usr/lib64 -+- use --disable-rpath-link to link sample programs without rpath -+ -+* Fri Mar 25 2010 Thomas Dickey -+- initial version -diff -Naur ncurses-5.8/Ada95/package/debian/compat ncurses-5.8-20110402/Ada95/package/debian/compat ---- ncurses-5.8/Ada95/package/debian/compat 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/compat 2010-04-20 21:47:10.000000000 +0200 -@@ -0,0 +1 @@ -+5 -diff -Naur ncurses-5.8/Ada95/package/debian/control ncurses-5.8-20110402/Ada95/package/debian/control ---- ncurses-5.8/Ada95/package/debian/control 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/control 2011-03-25 19:55:48.000000000 +0100 -@@ -0,0 +1,17 @@ -+Source: adacurses -+Maintainer: Thomas E. Dickey -+Section: misc -+Priority: optional -+Standards-Version: 3.8.4 -+Build-Depends: debhelper (>= 5) -+Homepage: http://invisible-island.net/adacurses/ -+ -+Package: adacurses -+Architecture: any -+Depends: ${shlibs:Depends}, ${misc:Depends} -+Description: AdaCurses - Ada95 binding for ncurses -+ This package installs as "adacurses" to avoid conflict with other packages. -+ This is the Ada95 binding from the ncurses distribution. -+ . -+ In addition to a library, this package installs sample programs in -+ "bin/AdaCurses" to avoid conflict with other packages. -diff -Naur ncurses-5.8/Ada95/package/debian/copyright ncurses-5.8-20110402/Ada95/package/debian/copyright ---- ncurses-5.8/Ada95/package/debian/copyright 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/copyright 2011-03-25 01:52:39.000000000 +0100 -@@ -0,0 +1,69 @@ -+Upstream source http://invisible-island.net/ncurses/ncurses-examples.html -+ -+Current ncurses maintainer: Thomas Dickey -+ -+------------------------------------------------------------------------------- -+ Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the -+ "Software"), 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. -+------------------------------------------------------------------------------- -+ -+Files: install-sh -+Copyright: 1994 X Consortium -+Licence: other-BSD -+ 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, 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 -+ X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -+ TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ -+ Except as contained in this notice, the name of the X Consortium shall not -+ be used in advertising or otherwise to promote the sale, use or other deal- -+ ings in this Software without prior written authorization from the X Consor- -+ tium. -+ -+ FSF changes to this file are in the public domain. -+ -+ Calling this script install-sh is preferred over install.sh, to prevent -+ `make' implicit rules from creating a file called install from it -+ when there is no Makefile. -+ -+ This script is compatible with the BSD install script, but was written -+ from scratch. It can only install one file at a time, a restriction -+ shared with many OS's install programs. -+ -+On Debian systems, the complete text of the GNU General -+Public License can be found in '/usr/share/common-licenses/GPL-2' -diff -Naur ncurses-5.8/Ada95/package/debian/docs ncurses-5.8-20110402/Ada95/package/debian/docs ---- ncurses-5.8/Ada95/package/debian/docs 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/docs 2010-06-27 17:51:57.000000000 +0200 -@@ -0,0 +1 @@ -+README -diff -Naur ncurses-5.8/Ada95/package/debian/rules ncurses-5.8-20110402/Ada95/package/debian/rules ---- ncurses-5.8/Ada95/package/debian/rules 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/rules 2011-04-01 02:23:51.000000000 +0200 -@@ -0,0 +1,97 @@ -+#!/usr/bin/make -f -+# MAde with the aid of dh_make, by Craig Small -+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -+# Some lines taken from debmake, by Cristoph Lameter. -+ -+# Uncomment this to turn on verbose mode. -+#export DH_VERBOSE=1 -+ -+# These are used for cross-compiling and for saving the configure script -+# from having to guess our platform (since we know it already) -+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -+ -+TARGET_DIR = $(CURDIR)/debian/adacurses -+SAMPLE_DIR = $(TARGET_DIR)/usr/bin/AdaCurses -+ -+CFLAGS = -+ -+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -+ CFLAGS += -O0 -+else -+ CFLAGS += -O2 -+endif -+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) -+ INSTALL_PROGRAM += -s -+endif -+ -+ -+configure: configure-stamp -+configure-stamp: -+ dh_testdir -+ -+ CFLAGS="$(CFLAGS)" ./configure \ -+ --host=$(DEB_HOST_GNU_TYPE) \ -+ --build=$(DEB_BUILD_GNU_TYPE) \ -+ --prefix=/usr \ -+ --disable-rpath-link \ -+ --with-shared \ -+ --with-ada-sharedlib -+ -+ touch configure-stamp -+ -+build: build-stamp -+build-stamp: configure-stamp -+ dh_testdir -+ -+ $(MAKE) -+ -+ touch build-stamp -+ -+clean: -+ dh_testdir -+ dh_testroot -+ -+ [ ! -f makefile ] || $(MAKE) distclean -+ -+ rm -f configure-stamp build-stamp install-stamp -+ -+ dh_clean -+ -+install: install-stamp -+install-stamp: build-stamp -+ dh_testdir -+ dh_testroot -+ dh_clean -k -+ dh_installdirs -+ -+ $(MAKE) install DESTDIR=$(TARGET_DIR) -+ -+ # FIXME: it would be nice to make these into separate packages -+ ( cd samples && $(MAKE) install.examples DESTDIR=$(TARGET_DIR) BINDIR=$(SAMPLE_DIR) ) -+ ( cd doc && $(MAKE) install.html DESTDIR=$(TARGET_DIR) ) -+ -+ touch install-stamp -+ -+# Build architecture-independent files here. -+binary-indep: build install -+# No binary-indep target. -+ -+# Build architecture-dependent files here. -+binary-arch: build install -+ dh_testdir -+ dh_testroot -+ dh_installdocs -+ dh_installexamples -+ dh_installchangelogs NEWS -+ dh_strip -+ dh_compress -+ dh_fixperms -+ dh_installdeb -+ dh_shlibdeps -+ dh_gencontrol -+ dh_md5sums -+ dh_builddeb -+ -+binary: binary-indep binary-arch -+.PHONY: build clean binary-indep binary-arch binary install install-stamp -diff -Naur ncurses-5.8/Ada95/package/debian/source/format ncurses-5.8-20110402/Ada95/package/debian/source/format ---- ncurses-5.8/Ada95/package/debian/source/format 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/source/format 2010-12-30 15:23:50.000000000 +0100 -@@ -0,0 +1 @@ -+3.0 (native) -diff -Naur ncurses-5.8/Ada95/package/debian/watch ncurses-5.8-20110402/Ada95/package/debian/watch ---- ncurses-5.8/Ada95/package/debian/watch 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/package/debian/watch 2011-03-25 19:41:54.000000000 +0100 -@@ -0,0 +1,4 @@ -+version=3 -+ -+opts=passive ftp://invisible-island.net/AdaCurses/AdaCurses-([\d.]+)\.tgz \ -+ debian uupdate -diff -Naur ncurses-5.8/Ada95/samples/explain.txt ncurses-5.8-20110402/Ada95/samples/explain.txt ---- ncurses-5.8/Ada95/samples/explain.txt 1997-09-09 02:14:40.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/explain.txt 2011-03-19 13:01:41.000000000 +0100 -@@ -54,13 +54,13 @@ - #HELP - #HELPKEYS - You may scroll with the Cursor Up/Down Keys. --You may leave the help with the Function Key labelled 'Quit'. -+You may leave the help with the Function Key labeled 'Quit'. - #INHELP - You are already in the help system. --You may leave the help with the Function Key labelled 'Quit'. -+You may leave the help with the Function Key labeled 'Quit'. - #MAIN - This is the main menu of the sample program for the ncurses Ada95 --binding. The main intention of the demo is not to demonstate or -+binding. The main intention of the demo is not to demonstrate or - test all the features of ncurses and it's subsystems, but to provide - to you some sample code how to use the binding with Ada95. - -@@ -86,23 +86,23 @@ - the item name and the description. - #MENU01 - This is a demo of the some of the menu layout options. One of them --is the spacing functionality. Just press the Key labelled "Flip" to -+is the spacing functionality. Just press the Key labeled "Flip" to - flip between the non-spaced and a spaced version of the menu. Please - note that this functionality is unique for ncurses and is not found - in the SVr4 menu implementation. - --This is a menu that sometimes doesn't fit into it's window and -+This is a menu that sometimes does not fit into it's window and - therefore it becomes a scroll menu. - - You can also see here very nicely the pattern matching functionality - of menus. Type for example a 'J' and you will be positioned to the - next item after the current starting with a 'J'. Any more characters - you type in make the pattern more specific. With CTRL-A and CTRL-Z --(for more details press the Key labelled "Keys") you can browse -+(for more details press the Key labeled "Keys") you can browse - through all the items matching the pattern. - - You may change the format of the menu. Just press one of the keys --labelled "4x1", "4x2" or "4x3" to get a menu with that many rows -+labeled "4x1", "4x2" or "4x3" to get a menu with that many rows - and columns. - - With the Keys "O-Row" or "O-Col" (they occupy the same label and -@@ -121,7 +121,7 @@ - switch on selection) you can change whether or not the descriptions - for each item should be displayed. Please not that this key is - not visible in the "4x3" layout mode, because in this case the --menu wouldn't fit on a typicall 80x24 screen. -+menu would not fit on a typical 80x24 screen. - - With the Keys "Disab" or "Enab" (they occupy the same label and - switch on selection) you can dis- or enable the selectability of -@@ -131,13 +131,13 @@ - The Keys "4x1", "4x2" and "4x3" will change the format of the menu. - Please note that this is a scrolling menu. You may also play with the - pattern matching functionality or try to change the format of the menu. --For more details press the Key labelled "Help". -+For more details press the Key labeled "Help". - #FORM00 - This is a demo of the forms package. - #FORM-PAD00 - Please note that this demo is far from being complete. It really shows - only a small part of the functionality of the forms package. Let's hope --the next version will have a richer demo (You wan't to contribute ?). -+the next version will have a richer demo (You want to contribute ?). - #NOTIMPL - Sorry this functionality of the demo is not implemented at the moment. - Remember this is a freeware project, so I can use only my very rare -@@ -149,13 +149,13 @@ - #CURSES-PAD00 - Please note that this demo is far from being complete. It really shows - only a small part of the functionality of the curses package. Let's hope --the next version will have a richer demo (You wan't to contribute ?). -+the next version will have a richer demo (You want to contribute ?). - #MOUSEKEYS - In this demo you may use this keys: - -- - Key labelled "Help" to get a help -- - Key labelled "Keys" is what you are reading now -- - Key labelled "Quit" to leave the demo -+ - Key labeled "Help" to get a help -+ - Key labeled "Keys" is what you are reading now -+ - Key labeled "Quit" to leave the demo - - You may click the mouse buttons at any location at the screen and look - at the protocol window ! -@@ -179,7 +179,7 @@ - You may press one of the three well known standard keys of this demo. - #ATTRIB-PAD00 - Again this is a more than simple demo and just here to give you the --sourcecode. Feel free to contribute more. -+source code. Feel free to contribute more. - #TEXTIO - #TEXTIOKEYS - #TEXTIO-PAD00 -diff -Naur ncurses-5.8/Ada95/samples/Makefile.in ncurses-5.8-20110402/Ada95/samples/Makefile.in ---- ncurses-5.8/Ada95/samples/Makefile.in 2010-11-27 22:45:27.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/Makefile.in 2011-03-29 01:45:08.000000000 +0200 -@@ -1,5 +1,5 @@ - ############################################################################## --# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. # -+# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. # - # # - # Permission is hereby granted, free of charge, to any person obtaining a # - # copy of this software and associated documentation files (the "Software"), # -@@ -28,7 +28,7 @@ - # - # Author: Juergen Pfeifer, 1996 - # --# $Id: Makefile.in,v 1.40 2010/11/27 21:45:27 tom Exp $ -+# $Id: Makefile.in,v 1.46 2011/03/28 23:45:08 tom Exp $ - # - .SUFFIXES: - -@@ -41,6 +41,8 @@ - srcdir = @srcdir@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ -+bindir = @bindir@ -+datadir = @datadir@ - libdir = @libdir@ - includedir = @includedir@ - -@@ -74,6 +76,13 @@ - - RANLIB = @RANLIB@ - ################################################################################ -+BINDIR = $(DESTDIR)$(bindir) -+DATADIR = $(DESTDIR)$(datadir) -+LIBDIR = $(DESTDIR)$(libdir) -+ -+MY_DATADIR = $(DATADIR)/AdaCurses -+ -+################################################################################ - ada_srcdir=../src - - LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) -@@ -88,11 +97,11 @@ - ABASE = $(ALIB)-curses - - CARGS =-cargs $(ADAFLAGS) --LARGS =-largs @TEST_ARG2@ $(LD_FLAGS) -L../lib -lAdaCurses @TEST_LIBS2@ -+LARGS =-largs -L../lib -lAdaCurses @TEST_ARG2@ $(LD_FLAGS) @TEST_LIBS2@ - --PROGS = tour rain ncurses -+PROGS = tour$x ncurses$x @USE_GNAT_SIGINT@ rain$x - --all :: tour$x rain$x ncurses$x -+all :: $(PROGS) - @echo made $@ - - sources : -@@ -107,15 +116,28 @@ - uninstall.libs :: - @echo made $@ - -+install.examples :: $(BINDIR) $(PROGS) -+ $(INSTALL) $(PROGS) $(BINDIR) -+ -+install.examples :: $(MY_DATADIR) -+ $(INSTALL_DATA) explain.txt $(MY_DATADIR) -+ -+uninstall.examples :: -+ -cd $(BINDIR) && rm -f $(PROGS) -+ -rmdir $(BINDIR) -+ -rm -f $(MY_DATADIR)/explain.txt -+ -rmdir $(MY_DATADIR) -+ -+$(BINDIR) \ -+$(MY_DATADIR) : -+ mkdir -p $@ -+ - ncurses$x : - $(ADAMAKE) $(ADAMAKEFLAGS) ncurses $(CARGS) $(LARGS) - --tour$x : explain.msg -+tour$x : - $(ADAMAKE) $(ADAMAKEFLAGS) tour $(CARGS) $(LARGS) - --explain.msg: $(srcdir)/explain.txt -- cp $(srcdir)/explain.txt $@ -- - rain$x : - $(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS) - -@@ -124,7 +146,7 @@ - - clean :: mostlyclean - rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \ -- explain.msg trace screendump b~*.ad[bs] -+ trace screendump b~*.ad[bs] - - distclean :: clean - rm -f Makefile -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-acs_and_scroll.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-acs_and_scroll.adb ---- ncurses-5.8/Ada95/samples/ncurses2-acs_and_scroll.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-acs_and_scroll.adb 2011-03-23 01:33:00.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.9 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.11 $ -+-- $Date: 2011/03/23 00:33:00 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - -- Windows and scrolling tester. -@@ -345,7 +345,7 @@ - return; - when KEY_UP => - i := i + si - 1; -- -- same as i := i - 1 because of Modulus arithetic, -+ -- same as i := i - 1 because of Modulus arithmetic, - -- on Line_Position, which is a Natural - -- the C version uses this form too, interestingly. - when KEY_DOWN => -@@ -452,19 +452,19 @@ - function delete_framed (fp : FrameA; showit : Boolean) return FrameA is - np : FrameA; - begin -- fp.last.next := fp.next; -- fp.next.last := fp.last; -+ fp.all.last.all.next := fp.all.next; -+ fp.all.next.all.last := fp.all.last; - - if showit then -- Erase (fp.wind); -- Refresh (fp.wind); -+ Erase (fp.all.wind); -+ Refresh (fp.all.wind); - end if; -- Delete (fp.wind); -+ Delete (fp.all.wind); - -- if fp = fp.next then -+ if fp = fp.all.next then - np := null; - else -- np := fp.next; -+ np := fp.all.next; - end if; - -- TODO free(fp); - return np; -@@ -494,64 +494,64 @@ - False, False, - Null_Window); - begin -- neww.wind := getwindow; -- if neww.wind = Null_Window then -+ neww.all.wind := getwindow; -+ if neww.all.wind = Null_Window then - exit; - -- was goto breakout; ha ha ha - else - - if current = null then -- neww.next := neww; -- neww.last := neww; -+ neww.all.next := neww; -+ neww.all.last := neww; - else -- neww.next := current.next; -- neww.last := current; -- neww.last.next := neww; -- neww.next.last := neww; -+ neww.all.next := current.all.next; -+ neww.all.last := current; -+ neww.all.last.all.next := neww; -+ neww.all.next.all.last := neww; - end if; - current := neww; - -- Set_KeyPad_Mode (current.wind, True); -- current.do_keypad := HaveKeyPad (current.wind); -- current.do_scroll := HaveScroll (current.wind); -+ Set_KeyPad_Mode (current.all.wind, True); -+ current.all.do_keypad := HaveKeyPad (current.all.wind); -+ current.all.do_scroll := HaveScroll (current.all.wind); - end if; - end; - when Character'Pos ('N') mod 16#20# => -- Ctrl('N') - if current /= null then -- current := current.next; -+ current := current.all.next; - end if; - when Character'Pos ('P') mod 16#20# => -- Ctrl('P') - if current /= null then -- current := current.last; -+ current := current.all.last; - end if; - when Character'Pos ('F') mod 16#20# => -- Ctrl('F') -- if current /= null and then HaveScroll (current.wind) then -- Scroll (current.wind, 1); -+ if current /= null and then HaveScroll (current.all.wind) then -+ Scroll (current.all.wind, 1); - end if; - when Character'Pos ('B') mod 16#20# => -- Ctrl('B') -- if current /= null and then HaveScroll (current.wind) then -+ if current /= null and then HaveScroll (current.all.wind) then - -- The C version of Scroll may return ERR which is ignored - -- we need to avoid the exception - -- with the 'and HaveScroll(current.wind)' -- Scroll (current.wind, -1); -+ Scroll (current.all.wind, -1); - end if; - when Character'Pos ('K') mod 16#20# => -- Ctrl('K') - if current /= null then -- current.do_keypad := not current.do_keypad; -- Set_KeyPad_Mode (current.wind, current.do_keypad); -+ current.all.do_keypad := not current.all.do_keypad; -+ Set_KeyPad_Mode (current.all.wind, current.all.do_keypad); - end if; - when Character'Pos ('S') mod 16#20# => -- Ctrl('S') - if current /= null then -- current.do_scroll := not current.do_scroll; -- Allow_Scrolling (current.wind, current.do_scroll); -+ current.all.do_scroll := not current.all.do_scroll; -+ Allow_Scrolling (current.all.wind, current.all.do_scroll); - end if; - when Character'Pos ('W') mod 16#20# => -- Ctrl('W') -- if current /= current.next then -+ if current /= current.all.next then - Create (f, Name => dumpfile); -- TODO error checking - if not Is_Open (f) then - raise Curses_Exception; - end if; -- Put_Window (current.wind, f); -+ Put_Window (current.all.wind, f); - Close (f); - current := delete_framed (current, True); - end if; -@@ -563,15 +563,15 @@ - Open (f, Mode => In_File, Name => dumpfile); - neww := new Frame'(null, null, False, False, Null_Window); - -- neww.next := current.next; -- neww.last := current; -- neww.last.next := neww; -- neww.next.last := neww; -+ neww.all.next := current.all.next; -+ neww.all.last := current; -+ neww.all.last.all.next := neww; -+ neww.all.next.all.last := neww; - -- neww.wind := Get_Window (f); -+ neww.all.wind := Get_Window (f); - Close (f); - -- Refresh (neww.wind); -+ Refresh (neww.all.wind); - end; - when Character'Pos ('X') mod 16#20# => -- Ctrl('X') - if current /= null then -@@ -587,7 +587,7 @@ - "to mark new corner"); - Refresh; - -- Get_Window_Position (current.wind, ul.y, ul.x); -+ Get_Window_Position (current.all.wind, ul.y, ul.x); - - selectcell (ul.y, ul.x, Lines - Botlines - 2, Columns - 2, - tmp, tmpbool); -@@ -595,43 +595,43 @@ - -- the C version had a goto. I refuse gotos. - Beep; - else -- Get_Size (current.wind, lr.y, lr.x); -+ Get_Size (current.all.wind, lr.y, lr.x); - lr.y := lr.y + ul.y - 1; - lr.x := lr.x + ul.x - 1; - Outerbox (ul, lr, False); - Refresh_Without_Update; - -- Get_Size (current.wind, my, mx); -+ Get_Size (current.all.wind, my, mx); - if my > tmp.y - ul.y then -- Get_Cursor_Position (current.wind, lr.y, lr.x); -- Move_Cursor (current.wind, tmp.y - ul.y + 1, 0); -- Clear_To_End_Of_Screen (current.wind); -- Move_Cursor (current.wind, lr.y, lr.x); -+ Get_Cursor_Position (current.all.wind, lr.y, lr.x); -+ Move_Cursor (current.all.wind, tmp.y - ul.y + 1, 0); -+ Clear_To_End_Of_Screen (current.all.wind); -+ Move_Cursor (current.all.wind, lr.y, lr.x); - end if; - if mx > tmp.x - ul.x then - for i in 0 .. my - 1 loop -- Move_Cursor (current.wind, i, tmp.x - ul.x + 1); -- Clear_To_End_Of_Line (current.wind); -+ Move_Cursor (current.all.wind, i, tmp.x - ul.x + 1); -+ Clear_To_End_Of_Line (current.all.wind); - end loop; - end if; -- Refresh_Without_Update (current.wind); -+ Refresh_Without_Update (current.all.wind); - - lr := tmp; - -- The C version passes invalid args to resize - -- which returns an ERR. For Ada we avoid the exception. - if lr.y /= ul.y and lr.x /= ul.x then -- Resize (current.wind, lr.y - ul.y + 0, -+ Resize (current.all.wind, lr.y - ul.y + 0, - lr.x - ul.x + 0); - end if; - -- Get_Window_Position (current.wind, ul.y, ul.x); -- Get_Size (current.wind, lr.y, lr.x); -+ Get_Window_Position (current.all.wind, ul.y, ul.x); -+ Get_Size (current.all.wind, lr.y, lr.x); - lr.y := lr.y + ul.y - 1; - lr.x := lr.x + ul.x - 1; - Outerbox (ul, lr, True); - Refresh_Without_Update; - -- Refresh_Without_Update (current.wind); -+ Refresh_Without_Update (current.all.wind); - Move_Cursor (Line => 0, Column => 0); - Clear_To_End_Of_Line; - Update_Screen; -@@ -647,30 +647,30 @@ - Refresh; - end; - when Key_Cursor_Up => -- newwin_move (current.wind, -1, 0); -+ newwin_move (current.all.wind, -1, 0); - when Key_Cursor_Down => -- newwin_move (current.wind, 1, 0); -+ newwin_move (current.all.wind, 1, 0); - when Key_Cursor_Left => -- newwin_move (current.wind, 0, -1); -+ newwin_move (current.all.wind, 0, -1); - when Key_Cursor_Right => -- newwin_move (current.wind, 0, 1); -+ newwin_move (current.all.wind, 0, 1); - when Key_Backspace | Key_Delete_Char => - declare - y : Line_Position; - x : Column_Position; - tmp : Line_Position; - begin -- Get_Cursor_Position (current.wind, y, x); -+ Get_Cursor_Position (current.all.wind, y, x); - -- x := x - 1; - -- I got tricked by the -1 = Max_Natural - 1 result - -- y := y - 1; - if not (x = 0 and y = 0) then - if x = 0 then - y := y - 1; -- Get_Size (current.wind, tmp, x); -+ Get_Size (current.all.wind, tmp, x); - end if; - x := x - 1; -- Delete_Character (current.wind, y, x); -+ Delete_Character (current.all.wind, y, x); - end if; - end; - when others => -@@ -678,7 +678,7 @@ - if current /= null then - declare - begin -- Add (current.wind, Ch => Code_To_Char (c)); -+ Add (current.all.wind, Ch => Code_To_Char (c)); - exception - when Curses_Exception => null; - -- this happens if we are at the -@@ -688,9 +688,9 @@ - Beep; - end if; - end case; -- newwin_report (current.wind); -+ newwin_report (current.all.wind); - if current /= null then -- usescr := current.wind; -+ usescr := current.all.wind; - else - usescr := Standard_Window; - end if; -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-demo_forms.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-demo_forms.adb ---- ncurses-5.8/Ada95/samples/ncurses2-demo_forms.adb 2006-06-25 16:24:40.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-demo_forms.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2006,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.5 $ ---- $Date: 2006/06/25 14:24:40 $ -+-- $Revision: 1.6 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -451,19 +451,19 @@ - Refresh; - - -- describe the form -- f (1) := make_label (0, 15, "Sample Form"); -- f (2) := make_label (2, 0, "Last Name"); -- f (3) := make_field (3, 0, 1, 18, False); -- f (4) := make_label (2, 20, "First Name"); -- f (5) := make_field (3, 20, 1, 12, False); -- f (6) := make_label (2, 34, "Middle Name"); -- f (7) := make_field (3, 34, 1, 12, False); -- f (8) := make_label (5, 0, "Comments"); -- f (9) := make_field (6, 0, 4, 46, False); -- f (10) := make_label (5, 20, "Password:"); -- f (11) := make_field (5, 30, 1, 9, True); -- secure := f (11); -- f (12) := Null_Field; -+ f.all (1) := make_label (0, 15, "Sample Form"); -+ f.all (2) := make_label (2, 0, "Last Name"); -+ f.all (3) := make_field (3, 0, 1, 18, False); -+ f.all (4) := make_label (2, 20, "First Name"); -+ f.all (5) := make_field (3, 20, 1, 12, False); -+ f.all (6) := make_label (2, 34, "Middle Name"); -+ f.all (7) := make_field (3, 34, 1, 12, False); -+ f.all (8) := make_label (5, 0, "Comments"); -+ f.all (9) := make_field (6, 0, 4, 46, False); -+ f.all (10) := make_label (5, 20, "Password:"); -+ f.all (11) := make_field (5, 30, 1, 9, True); -+ secure := f.all (11); -+ f.all (12) := Null_Field; - - myform := New_Form (f); - -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-demo_pad.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-demo_pad.adb ---- ncurses-5.8/Ada95/samples/ncurses2-demo_pad.adb 2008-07-26 20:47:06.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-demo_pad.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.7 $ ---- $Date: 2008/07/26 18:47:06 $ -+-- $Revision: 1.8 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -121,8 +121,8 @@ - retval.seconds := 0; - retval.microseconds := 0; - else -- retval.seconds := Integer (t.tv_sec); -- retval.microseconds := Integer (t.tv_usec); -+ retval.seconds := Integer (t.all.tv_sec); -+ retval.microseconds := Integer (t.all.tv_usec); - end if; - return retval; - end gettime; -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-demo_panels.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-demo_panels.adb ---- ncurses-5.8/Ada95/samples/ncurses2-demo_panels.adb 2008-08-31 01:35:01.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-demo_panels.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2004,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.6 $ ---- $Date: 2008/08/30 23:35:01 $ -+-- $Revision: 1.7 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -139,7 +139,7 @@ - - procedure fill_panel (pan : Panel) is - win : constant Window := Panel_Window (pan); -- num : constant Character := Get_User_Data (pan) (2); -+ num : constant Character := Get_User_Data (pan).all (2); - tmp6 : String (1 .. 6) := "-panx-"; - maxy : Line_Count; - maxx : Column_Count; -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-getopt.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-getopt.adb ---- ncurses-5.8/Ada95/samples/ncurses2-getopt.adb 2008-07-26 20:46:44.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-getopt.adb 2011-03-19 13:09:51.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2004,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.7 $ ---- $Date: 2008/07/26 18:46:44 $ -+-- $Revision: 1.8 $ -+-- $Date: 2011/03/19 12:09:51 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - -- A simplified version of the GNU getopt function -@@ -56,7 +56,7 @@ - -- also the user is not allowed to modify argv or argc - -- Doing so is Erroneous execution. - -- -- longoptions are not handled. -+ -- long options are not handled. - - procedure Qgetopt (retval : out Integer; - argc : Integer; -@@ -67,7 +67,7 @@ - -- ignored for ncurses, must be initialized to 1 by - -- the caller - Optarg : out stringa -- -- a garbage colector would be useful here. -+ -- a garbage collector would be useful here. - ) is - - package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (200); -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-menu_test.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-menu_test.adb ---- ncurses-5.8/Ada95/samples/ncurses2-menu_test.adb 2006-06-25 16:24:40.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-menu_test.adb 2011-03-23 01:39:28.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2004,2006 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2006,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.6 $ ---- $Date: 2006/06/25 14:24:40 $ -+-- $Revision: 1.8 $ -+-- $Date: 2011/03/23 00:39:28 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -46,10 +46,10 @@ - with Terminal_Interface.Curses.Mouse; use Terminal_Interface.Curses.Mouse; - - procedure ncurses2.menu_test is -- function menu_virtualize (c : Key_Code) return Menu_Request_Code; -+ function menu_virtualize (c : Key_Code) return Key_Code; - procedure xAdd (l : Line_Position; c : Column_Position; s : String); - -- function menu_virtualize (c : Key_Code) return Menu_Request_Code is -+ function menu_virtualize (c : Key_Code) return Key_Code is - begin - case c is - when Character'Pos (newl) | Key_Exit => -@@ -110,7 +110,7 @@ - c1 : Key_Code; - - c : Driver_Result; -- r : Menu_Request_Code; -+ r : Key_Code; - begin - tmp := Start_Mouse; - xAdd (0, 0, "This is the menu test:"); -@@ -121,9 +121,9 @@ - Refresh; - - for i in animals'Range loop -- items_a (i) := New_Item (animals (i).all); -+ items_a.all (i) := New_Item (animals (i).all); - end loop; -- items_a (animals'Last + 1) := Null_Item; -+ items_a.all (animals'Last + 1) := Null_Item; - - m := New_Menu (items_a); - -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-overlap_test.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-overlap_test.adb ---- ncurses-5.8/Ada95/samples/ncurses2-overlap_test.adb 2004-08-21 23:37:00.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-overlap_test.adb 2011-03-19 13:07:18.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000,2004 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2004,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.4 $ ---- $Date: 2004/08/21 21:37:00 $ -+-- $Revision: 1.5 $ -+-- $Date: 2011/03/19 12:07:18 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -101,7 +101,7 @@ - - Move_Cursor (Line => 18, Column => 0); - Add (Str => "a = refresh A, then B, then doupdate. b = refresh B, " & -- "then A, then doupdaute"); -+ "then A, then doupdate"); - Add (Ch => newl); - Add (Str => "c = fill window A with letter A. d = fill window B " & - "with letter B."); -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-slk_test.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-slk_test.adb ---- ncurses-5.8/Ada95/samples/ncurses2-slk_test.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-slk_test.adb 2011-03-19 13:03:08.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.8 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.9 $ -+-- $Date: 2011/03/19 12:03:08 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -161,7 +161,7 @@ - when 'x' | 'q' => - exit; - -- the C version needed a goto, ha ha -- -- breaks exit the case not the loop because fall-throuh -+ -- breaks exit the case not the loop because fall-through - -- happens in C! - when others => - Beep; -diff -Naur ncurses-5.8/Ada95/samples/ncurses2-trace_set.adb ncurses-5.8-20110402/Ada95/samples/ncurses2-trace_set.adb ---- ncurses-5.8/Ada95/samples/ncurses2-trace_set.adb 2008-07-26 20:46:18.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/ncurses2-trace_set.adb 2011-03-23 01:40:33.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 2000-2006,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 2000-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Eugene V. Melaragno 2000 - -- Version Control ---- $Revision: 1.3 $ ---- $Date: 2008/07/26 18:46:18 $ -+-- $Revision: 1.5 $ -+-- $Date: 2011/03/23 00:40:33 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with ncurses2.util; use ncurses2.util; -@@ -50,14 +50,14 @@ - - procedure ncurses2.trace_set is - -- function menu_virtualize (c : Key_Code) return Menu_Request_Code; -+ function menu_virtualize (c : Key_Code) return Key_Code; - function subset (super, sub : Trace_Attribute_Set) return Boolean; - function trace_or (a, b : Trace_Attribute_Set) return Trace_Attribute_Set; - function trace_num (tlevel : Trace_Attribute_Set) return String; - function tracetrace (tlevel : Trace_Attribute_Set) return String; - function run_trace_menu (m : Menu; count : Integer) return Boolean; - -- function menu_virtualize (c : Key_Code) return Menu_Request_Code is -+ function menu_virtualize (c : Key_Code) return Key_Code is - begin - case c is - when Character'Pos (newl) | Key_Exit => -@@ -416,9 +416,9 @@ - Refresh; - - for n in t_tbl'Range loop -- items_a (n) := New_Item (t_tbl (n).name.all); -+ items_a.all (n) := New_Item (t_tbl (n).name.all); - end loop; -- items_a (t_tbl'Last + 1) := Null_Item; -+ items_a.all (t_tbl'Last + 1) := Null_Item; - - m := New_Menu (items_a); - -diff -Naur ncurses-5.8/Ada95/samples/sample.adb ncurses-5.8-20110402/Ada95/samples/sample.adb ---- ncurses-5.8/Ada95/samples/sample.adb 2008-09-27 16:42:40.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/sample.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.17 $ ---- $Date: 2008/09/27 14:42:40 $ -+-- $Revision: 1.18 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Text_IO; -@@ -143,7 +143,7 @@ - Ud.Set_User_Data (M, D1); - - I1 := new User_Data'(Data => 1174); -- Id.Set_User_Data (I (1), I1); -+ Id.Set_User_Data (I.all (1), I1); - - Set_Spacing (Men => M, Row => 2); - -@@ -156,7 +156,7 @@ - pragma Assert (D1 = D2); - pragma Assert (D1.Data = D2.Data); - -- Id.Get_User_Data (I (1), I2); -+ Id.Get_User_Data (I.all (1), I2); - pragma Assert (I1 = I2); - pragma Assert (I1.Data = I2.Data); - -diff -Naur ncurses-5.8/Ada95/samples/sample-curses_demo.adb ncurses-5.8-20110402/Ada95/samples/sample-curses_demo.adb ---- ncurses-5.8/Ada95/samples/sample-curses_demo.adb 2004-08-21 23:37:00.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/sample-curses_demo.adb 2011-03-23 01:29:04.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2004,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.15 $ ---- $Date: 2004/08/21 21:37:00 $ -+-- $Revision: 1.17 $ -+-- $Date: 2011/03/23 00:29:04 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; -@@ -61,7 +61,7 @@ - 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. -+ -- demonstrate and test the use of the user data mechanism. - - procedure Demo - is -@@ -122,9 +122,9 @@ - declare - O : Item_Option_Set; - begin -- Get_Options (Itm (2), O); -+ Get_Options (Itm.all (2), O); - O.Selectable := False; -- Set_Options (Itm (2), O); -+ Set_Options (Itm.all (2), O); - end; - end if; - -diff -Naur ncurses-5.8/Ada95/samples/sample-explanation.adb ncurses-5.8-20110402/Ada95/samples/sample-explanation.adb ---- ncurses-5.8/Ada95/samples/sample-explanation.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-explanation.adb 2011-03-26 23:33:29.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.21 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.26 $ -+-- $Date: 2011/03/26 22:33:29 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - -- Poor mans help system. This scans a sequential file for key lines and -@@ -58,7 +58,7 @@ - Help_Keys : constant String := "HELPKEYS"; - In_Help : constant String := "INHELP"; - -- File_Name : constant String := "explain.msg"; -+ File_Name : constant String := "explain.txt"; - F : File_Type; - - type Help_Line; -@@ -86,6 +86,8 @@ - function Search (Key : String) return Help_Line_Access; - procedure Release_Help (Root : in out Help_Line_Access); - -+ function Check_File (Name : String) return Boolean; -+ - procedure Explain (Key : String) - is - begin -@@ -126,7 +128,7 @@ - Add (W, Key); - Add (W, " not found."); - Add (W, Character'Val (10)); -- Add (W, "Press the Function key labelled 'Quit' key to continue."); -+ Add (W, "Press the Function key labeled 'Quit' key to continue."); - end Unknown_Key; - - procedure Redo -@@ -135,9 +137,9 @@ - begin - if Top_Line /= null then - for L in 0 .. (Height - 1) loop -- Add (W, L, 0, H.Line.all); -- exit when H.Next = null; -- H := H.Next; -+ Add (W, L, 0, H.all.Line.all); -+ exit when H.all.Next = null; -+ H := H.all.Next; - end loop; - else - Unknown_Key; -@@ -181,12 +183,12 @@ - L : Line_Position := 0; - begin - loop -- Add (W, L, 0, C.Line.all); -+ Add (W, L, 0, C.all.Line.all); - L := L + 1; -- exit when C.Next = null or else L = Height; -- C := C.Next; -+ exit when C.all.Next = null or else L = Height; -+ C := C.all.Next; - end loop; -- if C.Next /= null then -+ if C.all.Next /= null then - pragma Assert (L = Height); - More := True; - else -@@ -248,20 +250,20 @@ - if K in Special_Key_Code'Range then - case K is - when Key_Cursor_Down => -- if Current.Next /= null then -+ if Current.all.Next /= null then - Move_Cursor (W, Height - 1, 0); - Scroll (W, 1); -- Current := Current.Next; -- Top_Line := Top_Line.Next; -- Add (W, Current.Line.all); -+ Current := Current.all.Next; -+ Top_Line := Top_Line.all.Next; -+ Add (W, Current.all.Line.all); - end if; - when Key_Cursor_Up => -- if Top_Line.Prev /= null then -+ if Top_Line.all.Prev /= null then - Move_Cursor (W, 0, 0); - Scroll (W, -1); -- Top_Line := Top_Line.Prev; -- Current := Current.Prev; -- Add (W, Top_Line.Line.all); -+ Top_Line := Top_Line.all.Prev; -+ Current := Current.all.Prev; -+ Add (W, Top_Line.all.Line.all); - end if; - when QUIT_CODE => exit; - when others => null; -@@ -330,8 +332,8 @@ - Release_Help (Root); - Root := Current; - else -- Tail.Next := Current; -- Current.Prev := Tail; -+ Tail.all.Next := Current; -+ Current.all.Prev := Tail; - end if; - Tail := Current; - end loop; -@@ -347,8 +349,8 @@ - begin - loop - exit when Root = null; -- Next := Root.Next; -- Release_String (Root.Line); -+ Next := Root.all.Next; -+ Release_String (Root.all.Line); - Release_Help_Line (Root); - Root := Next; - end loop; -@@ -371,7 +373,7 @@ - begin - if H /= null then - loop -- T := T.Next; -+ T := T.all.Next; - exit when T = null; - N := N + 1; - end loop; -@@ -391,9 +393,9 @@ - P := New_Panel (W); - T := H; - loop -- Add (W, L + 1, 1, T.Line.all, Integer (Columns - 2)); -+ Add (W, L + 1, 1, T.all.Line.all, Integer (Columns - 2)); - L := L + 1; -- T := T.Next; -+ T := T.all.Next; - exit when T = null; - end loop; - T := H; -@@ -403,6 +405,26 @@ - end if; - end Notepad; - -+ function Check_File (Name : String) return Boolean is -+ The_File : File_Type; -+ begin -+ Open (The_File, In_File, Name); -+ Close (The_File); -+ return True; -+ exception -+ when Name_Error => -+ return False; -+ end Check_File; -+ - begin -- Open (F, In_File, File_Name); -+ if Check_File ("/usr/share/AdaCurses/" & File_Name) then -+ Open (F, In_File, "/usr/share/AdaCurses/" & File_Name); -+ elsif Check_File (File_Name) then -+ Open (F, In_File, File_Name); -+ else -+ Put_Line (Standard_Error, -+ "The file explain.txt was not found in the current directory." -+ ); -+ raise Name_Error; -+ end if; - end Sample.Explanation; -diff -Naur ncurses-5.8/Ada95/samples/sample-form_demo.adb ncurses-5.8-20110402/Ada95/samples/sample-form_demo.adb ---- ncurses-5.8/Ada95/samples/sample-form_demo.adb 2006-06-25 16:30:22.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/sample-form_demo.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.15 $ ---- $Date: 2006/06/25 14:30:22 $ -+-- $Revision: 1.16 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; -@@ -108,16 +108,16 @@ - Notepad ("FORM-PAD00"); - Default_Labels; - -- Set_Field_Type (FA (6), Enum_Field); -- Set_Field_Type (FA (7), I_F); -- Set_Field_Type (FA (8), Mft); -+ Set_Field_Type (FA.all (6), Enum_Field); -+ Set_Field_Type (FA.all (7), I_F); -+ Set_Field_Type (FA.all (8), Mft); - - F1 := new User_Data'(Data => 4711); -- Fld_U.Set_User_Data (FA (1), F1); -+ Fld_U.Set_User_Data (FA.all (1), F1); - - Fh.Drive_Me (Frm); - -- Fld_U.Get_User_Data (FA (1), F2); -+ Fld_U.Get_User_Data (FA.all (1), F2); - pragma Assert (F1 = F2); - pragma Assert (F1.Data = F2.Data); - -diff -Naur ncurses-5.8/Ada95/samples/sample-form_demo-aux.ads ncurses-5.8-20110402/Ada95/samples/sample-form_demo-aux.ads ---- ncurses-5.8/Ada95/samples/sample-form_demo-aux.ads 2009-12-26 18:44:09.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-form_demo-aux.ads 2011-03-19 13:17:32.000000000 +0100 -@@ -7,7 +7,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,7 +35,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.10 $ -+-- $Revision: 1.11 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; -@@ -49,7 +49,7 @@ - C : out Column_Count; - Y : out Line_Position; - X : out Column_Position); -- -- Calculate the geometry for a panel beeing able to be used to display -+ -- Calculate the geometry for a panel being able to be used to display - -- the menu. - - function Create (F : Form; -diff -Naur ncurses-5.8/Ada95/samples/sample-function_key_setting.adb ncurses-5.8-20110402/Ada95/samples/sample-function_key_setting.adb ---- ncurses-5.8/Ada95/samples/sample-function_key_setting.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-function_key_setting.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2004,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.14 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.15 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -88,18 +88,18 @@ - begin - -- Store the current labels in the environment - for I in 1 .. Number_Of_Keys loop -- Get_Soft_Label_Key (I, P.Labels (I)); -+ Get_Soft_Label_Key (I, P.all.Labels (I)); - if Reset then - Set_Soft_Label_Key (I, " "); - end if; - end loop; -- P.Prev := Top_Of_Stack; -+ P.all.Prev := Top_Of_Stack; - -- now store active help context and notepad -- P.Help := Active_Context; -- P.Notepad := Active_Notepad; -+ P.all.Help := Active_Context; -+ P.all.Notepad := Active_Notepad; - -- The notepad must now vanish and the new notepad is empty. -- if P.Notepad /= Null_Panel then -- Hide (P.Notepad); -+ if P.all.Notepad /= Null_Panel then -+ Hide (P.all.Notepad); - Update_Panels; - end if; - Active_Notepad := Null_Panel; -@@ -119,14 +119,14 @@ - raise Function_Key_Stack_Error; - else - for I in 1 .. Number_Of_Keys loop -- Set_Soft_Label_Key (I, P.Labels (I), Justification); -+ Set_Soft_Label_Key (I, P.all.Labels (I), Justification); - end loop; - pragma Assert (Active_Context /= null); - Release_String (Active_Context); -- Active_Context := P.Help; -+ Active_Context := P.all.Help; - Refresh_Soft_Label_Keys_Without_Update; -- Notepad_To_Context (P.Notepad); -- Top_Of_Stack := P.Prev; -+ Notepad_To_Context (P.all.Notepad); -+ Top_Of_Stack := P.all.Prev; - Release_Environment (P); - end if; - end Pop_Environment; -@@ -150,10 +150,10 @@ - else - loop - exit when P = null; -- if P.Help.all = Key then -+ if P.all.Help.all = Key then - return True; - else -- P := P.Prev; -+ P := P.all.Prev; - end if; - end loop; - return False; -diff -Naur ncurses-5.8/Ada95/samples/sample-function_key_setting.ads ncurses-5.8-20110402/Ada95/samples/sample-function_key_setting.ads ---- ncurses-5.8/Ada95/samples/sample-function_key_setting.ads 2009-12-26 18:44:09.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-function_key_setting.ads 2011-03-19 13:17:07.000000000 +0100 -@@ -7,7 +7,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,7 +35,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.10 $ -+-- $Revision: 1.11 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; -@@ -62,7 +62,7 @@ - -- Initialize the environment - - function Context return String; -- -- Return the current context identitfier -+ -- Return the current context identifier - - function Find_Context (Key : String) return Boolean; - -- Look for a context, return true if it is in the stack, -diff -Naur ncurses-5.8/Ada95/samples/sample-header_handler.adb ncurses-5.8-20110402/Ada95/samples/sample-header_handler.adb ---- ncurses-5.8/Ada95/samples/sample-header_handler.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-header_handler.adb 2011-03-23 00:54:38.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,14 +35,16 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.17 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.19 $ -+-- $Date: 2011/03/22 23:54:38 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Calendar; use Ada.Calendar; - with Terminal_Interface.Curses.Text_IO.Integer_IO; - with Sample.Manifest; use Sample.Manifest; - -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Integer_IO); -+ - -- This package handles the painting of the header line of the screen. - -- - package body Sample.Header_Handler is -@@ -169,7 +171,7 @@ - Pos := Columns - Column_Position (Title'Length); - Add (Win, 0, Pos / 2, Title); - -- In this phase we must not allow a physical update, because -- -- ncurses isnt properly initialized at this point. -+ -- ncurses is not properly initialized at this point. - Internal_Update_Header_Window (False); - return 0; - else -diff -Naur ncurses-5.8/Ada95/samples/sample-helpers.adb ncurses-5.8-20110402/Ada95/samples/sample-helpers.adb ---- ncurses-5.8/Ada95/samples/sample-helpers.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-helpers.adb 2011-03-19 13:13:21.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,13 +35,13 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.13 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.14 $ -+-- $Date: 2011/03/19 12:13:21 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Sample.Explanation; use Sample.Explanation; - ---- This package contains some conveniant helper routines used throughout -+-- This package contains some convenient helper routines used throughout - -- this example. - -- - package body Sample.Helpers is -diff -Naur ncurses-5.8/Ada95/samples/sample-helpers.ads ncurses-5.8-20110402/Ada95/samples/sample-helpers.ads ---- ncurses-5.8/Ada95/samples/sample-helpers.ads 2009-12-26 18:44:36.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-helpers.ads 2011-03-19 13:18:15.000000000 +0100 -@@ -7,7 +7,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,12 +35,12 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.10 $ -+-- $Revision: 1.11 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; - ---- This package contains some conveniant helper routines used throughout -+-- This package contains some convenient helper routines used throughout - -- this example. - -- - package Sample.Helpers is -diff -Naur ncurses-5.8/Ada95/samples/sample-keyboard_handler.adb ncurses-5.8-20110402/Ada95/samples/sample-keyboard_handler.adb ---- ncurses-5.8/Ada95/samples/sample-keyboard_handler.adb 2006-06-25 16:30:22.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/sample-keyboard_handler.adb 2011-03-23 01:34:24.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.14 $ ---- $Date: 2006/06/25 14:30:22 $ -+-- $Revision: 1.16 $ -+-- $Date: 2011/03/23 00:34:24 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Strings; use Ada.Strings; -@@ -111,7 +111,7 @@ - Buffer : String (1 .. Positive (Columns - 11)); - Cmdc : String (1 .. 8); - begin -- Get_Buffer (Fld => FA (2), Str => Buffer); -+ Get_Buffer (Fld => FA.all (2), Str => Buffer); - Trim (Buffer, Left); - if Buffer (1) /= ' ' then - Cmdc := To_Upper (Buffer (Cmdc'Range)); -@@ -157,8 +157,8 @@ - end if; - end loop; - Enum_Field := Create (Enum_Info, True); -- Set_Field_Type (FA (2), Enum_Field); -- Set_Background (FA (2), Normal_Video); -+ Set_Field_Type (FA.all (2), Enum_Field); -+ Set_Background (FA.all (2), Normal_Video); - - Fh.Drive_Me (Frm, Lines - 3, 0); - Delete (Frm); -@@ -174,7 +174,7 @@ - Set_Timeout_Mode (Win, Delayed, 30000); - loop - K := Get_Keystroke (Win); -- if K = Key_None then -- a timeout occured -+ if K = Key_None then -- a timeout occurred - Update_Header_Window; - elsif K = 3 and then not In_Command then -- CTRL-C - K := Command; -diff -Naur ncurses-5.8/Ada95/samples/sample-menu_demo.adb ncurses-5.8-20110402/Ada95/samples/sample-menu_demo.adb ---- ncurses-5.8/Ada95/samples/sample-menu_demo.adb 2008-07-26 20:48:30.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/sample-menu_demo.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2004,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.18 $ ---- $Date: 2008/07/26 18:48:30 $ -+-- $Revision: 1.19 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; -@@ -154,7 +154,7 @@ - O : Item_Option_Set; - begin - for J in I'Range loop -- Get_Options (I (J), O); -+ Get_Options (I.all (J), O); - O.Selectable := True; - if Hide_Long then - case J is -@@ -163,7 +163,7 @@ - when others => null; - end case; - end if; -- Set_Options (I (J), O); -+ Set_Options (I.all (J), O); - end loop; - end; - return False; -@@ -378,14 +378,14 @@ - Set_Pad_Character (M, '|'); - - MUD.Set_User_Data (M, U1); -- IUD.Set_User_Data (Itm (1), U3); -+ IUD.Set_User_Data (Itm.all (1), U3); - - Mh.Drive_Me (M); - - MUD.Get_User_Data (M, U2); - pragma Assert (U1 = U2 and U1.all = 4711); - -- IUD.Get_User_Data (Itm (1), U4); -+ IUD.Get_User_Data (Itm.all (1), U4); - pragma Assert (U3 = U4 and U3.all = 4712); - - Pop_Environment; -diff -Naur ncurses-5.8/Ada95/samples/sample-menu_demo-aux.ads ncurses-5.8-20110402/Ada95/samples/sample-menu_demo-aux.ads ---- ncurses-5.8/Ada95/samples/sample-menu_demo-aux.ads 2009-12-26 18:44:36.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/samples/sample-menu_demo-aux.ads 2011-03-19 13:17:59.000000000 +0100 -@@ -7,7 +7,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,7 +35,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.10 $ -+-- $Revision: 1.11 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses; use Terminal_Interface.Curses; -@@ -49,7 +49,7 @@ - C : out Column_Count; - Y : out Line_Position; - X : out Column_Position); -- -- Calculate the geometry for a panel beeing able to be used to display -+ -- Calculate the geometry for a panel being able to be used to display - -- the menu. - - function Create (M : Menu; -diff -Naur ncurses-5.8/Ada95/samples/sample-text_io_demo.adb ncurses-5.8-20110402/Ada95/samples/sample-text_io_demo.adb ---- ncurses-5.8/Ada95/samples/sample-text_io_demo.adb 2006-06-25 16:30:22.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/samples/sample-text_io_demo.adb 2011-03-23 01:44:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,18 +35,24 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control ---- $Revision: 1.16 $ ---- $Date: 2006/06/25 14:30:22 $ -+-- $Revision: 1.17 $ -+-- $Date: 2011/03/23 00:44:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Numerics.Generic_Elementary_Functions; -+ - with Ada.Numerics.Complex_Types; - use Ada.Numerics.Complex_Types; - --with Terminal_Interface.Curses; use Terminal_Interface.Curses; --with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; -+with Terminal_Interface.Curses; -+use Terminal_Interface.Curses; -+ -+with Terminal_Interface.Curses.Panels; -+use Terminal_Interface.Curses.Panels; -+ - with Terminal_Interface.Curses.Text_IO; - use Terminal_Interface.Curses.Text_IO; -+ - with Terminal_Interface.Curses.Text_IO.Integer_IO; - with Terminal_Interface.Curses.Text_IO.Float_IO; - with Terminal_Interface.Curses.Text_IO.Enumeration_IO; -@@ -60,6 +66,14 @@ - with Sample.Keyboard_Handler; use Sample.Keyboard_Handler; - with Sample.Explanation; use Sample.Explanation; - -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Complex_IO); -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Decimal_IO); -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Enumeration_IO); -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Fixed_IO); -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Float_IO); -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Integer_IO); -+pragma Elaborate_All (Terminal_Interface.Curses.Text_Io.Modular_IO); -+ - package body Sample.Text_IO_Demo is - - type Weekday is (Sunday, -diff -Naur ncurses-5.8/Ada95/src/c_varargs_to_ada.c ncurses-5.8-20110402/Ada95/src/c_varargs_to_ada.c ---- ncurses-5.8/Ada95/src/c_varargs_to_ada.c 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/c_varargs_to_ada.c 2011-03-19 20:07:39.000000000 +0100 -@@ -0,0 +1,117 @@ -+/**************************************************************************** -+ * Copyright (c) 2011 Free Software Foundation, Inc. * -+ * * -+ * Permission is hereby granted, free of charge, to any person obtaining a * -+ * copy of this software and associated documentation files (the * -+ * "Software"), to deal in the Software without restriction, including * -+ * without limitation the rights to use, copy, modify, merge, publish, * -+ * distribute, distribute with modifications, sublicense, and/or sell * -+ * copies of the Software, and to permit persons to whom the Software is * -+ * furnished to do so, subject to the following conditions: * -+ * * -+ * The above copyright notice and this permission notice shall be included * -+ * in all copies or substantial portions of the Software. * -+ * * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * -+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * -+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * -+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * -+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -+ * * -+ * Except as contained in this notice, the name(s) of the above copyright * -+ * holders shall not be used in advertising or otherwise to promote the * -+ * sale, use or other dealings in this Software without prior written * -+ * authorization. * -+ ****************************************************************************/ -+ -+/**************************************************************************** -+ * Author: Nicolas Boulenguez, 2011 * -+ ****************************************************************************/ -+ -+/* -+ Version Control -+ $Id: c_varargs_to_ada.c,v 1.4 2011/03/19 19:07:39 tom Exp $ -+ --------------------------------------------------------------------------*/ -+/* -+ */ -+ -+#include -+ -+int -+set_field_type_alnum(FIELD *field, -+ int minimum_width) -+{ -+ return set_field_type(field, TYPE_ALNUM, minimum_width); -+} -+ -+int -+set_field_type_alpha(FIELD *field, -+ int minimum_width) -+{ -+ return set_field_type(field, TYPE_ALPHA, minimum_width); -+} -+ -+int -+set_field_type_enum(FIELD *field, -+ char **value_list, -+ int case_sensitive, -+ int unique_match) -+{ -+ return set_field_type(field, TYPE_ENUM, value_list, case_sensitive, -+ unique_match); -+} -+ -+int -+set_field_type_integer(FIELD *field, -+ int precision, -+ long minimum, -+ long maximum) -+{ -+ return set_field_type(field, TYPE_INTEGER, precision, minimum, maximum); -+} -+ -+int -+set_field_type_numeric(FIELD *field, -+ int precision, -+ double minimum, -+ double maximum) -+{ -+ return set_field_type(field, TYPE_NUMERIC, precision, minimum, maximum); -+} -+ -+int -+set_field_type_regexp(FIELD *field, -+ char *regular_expression) -+{ -+ return set_field_type(field, TYPE_REGEXP, regular_expression); -+} -+ -+int -+set_field_type_ipv4(FIELD *field) -+{ -+ return set_field_type(field, TYPE_IPV4); -+} -+ -+int -+set_field_type_user(FIELD *field, -+ FIELDTYPE *fieldtype, -+ void *arg) -+{ -+ return set_field_type(field, fieldtype, arg); -+} -+ -+void * -+void_star_make_arg(va_list *list) -+{ -+ return va_arg(*list, void *); -+} -+ -+#ifdef TRACE -+void -+_traces(const char *fmt, char *arg) -+{ -+ _tracef(fmt, arg); -+} -+#endif -diff -Naur ncurses-5.8/Ada95/src/c_varargs_to_ada.h ncurses-5.8-20110402/Ada95/src/c_varargs_to_ada.h ---- ncurses-5.8/Ada95/src/c_varargs_to_ada.h 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/c_varargs_to_ada.h 2011-03-19 20:07:41.000000000 +0100 -@@ -0,0 +1,73 @@ -+/**************************************************************************** -+ * Copyright (c) 2011 Free Software Foundation, Inc. * -+ * * -+ * Permission is hereby granted, free of charge, to any person obtaining a * -+ * copy of this software and associated documentation files (the * -+ * "Software"), to deal in the Software without restriction, including * -+ * without limitation the rights to use, copy, modify, merge, publish, * -+ * distribute, distribute with modifications, sublicense, and/or sell * -+ * copies of the Software, and to permit persons to whom the Software is * -+ * furnished to do so, subject to the following conditions: * -+ * * -+ * The above copyright notice and this permission notice shall be included * -+ * in all copies or substantial portions of the Software. * -+ * * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * -+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * -+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * -+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * -+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -+ * * -+ * Except as contained in this notice, the name(s) of the above copyright * -+ * holders shall not be used in advertising or otherwise to promote the * -+ * sale, use or other dealings in this Software without prior written * -+ * authorization. * -+ ****************************************************************************/ -+ -+/* $Id: c_varargs_to_ada.h,v 1.3 2011/03/19 19:07:41 tom Exp $ */ -+ -+#ifndef __C_VARARGS_TO_ADA_H -+#define __C_VARARGS_TO_ADA_H -+ -+#include -+ -+extern int set_field_type_alnum(FIELD * /* field */ , -+ int /* minimum_width */ ); -+ -+extern int set_field_type_alpha(FIELD * /* field */ , -+ int /* minimum_width */ ); -+ -+extern int set_field_type_enum(FIELD * /* field */ , -+ char ** /* value_list */ , -+ int /* case_sensitive */ , -+ int /* unique_match */ ); -+ -+extern int set_field_type_integer(FIELD * /* field */ , -+ int /* precision */ , -+ long /* minimum */ , -+ long /* maximum */ ); -+ -+extern int set_field_type_numeric(FIELD * /* field */ , -+ int /* precision */ , -+ double /* minimum */ , -+ double /* maximum */ ); -+ -+extern int set_field_type_regexp(FIELD * /* field */ , -+ char * /* regular_expression */ ); -+ -+extern int set_field_type_ipv4(FIELD * /* field */ ); -+ -+extern int set_field_type_user(FIELD * /* field */ , -+ FIELDTYPE * /* fieldtype */ , -+ void * /* arg */ ); -+ -+extern void *void_star_make_arg(va_list * /* list */ ); -+ -+#ifdef TRACE -+extern void _traces(const char * /* fmt */ -+ ,char * /* arg */ ); -+#endif -+ -+#endif /* __C_VARARGS_TO_ADA_H */ -diff -Naur ncurses-5.8/Ada95/src/library.gpr ncurses-5.8-20110402/Ada95/src/library.gpr ---- ncurses-5.8/Ada95/src/library.gpr 2010-11-27 23:15:04.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/library.gpr 2011-03-19 00:10:28.000000000 +0100 -@@ -1,5 +1,5 @@ - ------------------------------------------------------------------------------ ---- Copyright (c) 2010 Free Software Foundation, Inc. -- -+-- Copyright (c) 2010,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -25,7 +25,7 @@ - -- sale, use or other dealings in this Software without prior written -- - -- authorization. -- - ------------------------------------------------------------------------------ ---- $Id: library.gpr,v 1.5 2010/11/27 22:15:04 tom Exp $ -+-- $Id: library.gpr,v 1.7 2011/03/18 23:10:28 Nicolas.Boulenguez Exp $ - -- http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Library-Projects.html - -- http://www.adaworld.com/debian/debian-ada-policy.html - project Library is -@@ -43,6 +43,7 @@ - for Source_Dirs use (Source_Dir & "/src", - Source_Dir2, - Build_Dir & "/src"); -+ for Library_Options use ("-lncurses", "-lpanel", "-lmenu", "-lform"); - package Compiler is - for Default_Switches ("Ada") use - ("-g", -@@ -51,5 +52,5 @@ - "-gnatVa", -- All validity checks - "-gnatwa"); -- Activate all optional errors - end Compiler; -- -+ for Languages use ("C", "Ada"); - end Library; -diff -Naur ncurses-5.8/Ada95/src/Makefile.in ncurses-5.8-20110402/Ada95/src/Makefile.in ---- ncurses-5.8/Ada95/src/Makefile.in 2010-11-27 23:14:16.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/Makefile.in 2011-03-31 11:46:16.000000000 +0200 -@@ -1,5 +1,5 @@ - ############################################################################## --# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. # -+# Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. # - # # - # Permission is hereby granted, free of charge, to any person obtaining a # - # copy of this software and associated documentation files (the "Software"), # -@@ -28,7 +28,7 @@ - # - # Author: Juergen Pfeifer, 1996 - # --# $Id: Makefile.in,v 1.53 2010/11/27 22:14:16 tom Exp $ -+# $Id: Makefile.in,v 1.60 2011/03/31 09:46:16 tom Exp $ - # - .SUFFIXES: - -@@ -44,7 +44,8 @@ - srcdir = @srcdir@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ --libdir = ${exec_prefix}/lib -+includedir = @includedir@ -+libdir = @libdir@ - - LIBDIR = $(DESTDIR)$(libdir) - ADA_INCLUDE = $(DESTDIR)@ADA_INCLUDE@ -@@ -61,7 +62,7 @@ - CC = @CC@ - CFLAGS = @CFLAGS@ - --CPPFLAGS = @ACPPFLAGS@ \ -+CPPFLAGS = @ACPPFLAGS@ @CPPFLAGS@ \ - -DHAVE_CONFIG_H -I$(srcdir) - - CCFLAGS = $(CPPFLAGS) $(CFLAGS) -@@ -217,11 +218,22 @@ - $(ADAPREP) -DADA_TRACE=@ADA_TRACE@ -DPRAGMA_UNREF=@PRAGMA_UNREF@ $(srcdir)/$(ABASE)-trace.adb_p $@ - - ############################################################################### -+C_OBJS = c_varargs_to_ada.o ncurses_compat.o -+ -+c_varargs_to_ada.o : $(srcdir)/c_varargs_to_ada.c -+ $(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/c_varargs_to_ada.c -+ -+ncurses_compat.o : $(srcdir)/ncurses_compat.c -+ $(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/ncurses_compat.c -+ -+############################################################################### -+ -+MIXED_OBJS = $(C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@ - - @USE_OLD_MAKERULES@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \ - @USE_OLD_MAKERULES@ $(BUILD_DIR_LIB) \ --@USE_OLD_MAKERULES@ $(LIBOBJS) @cf_generic_objects@ --@USE_OLD_MAKERULES@ $(AR) $(ARFLAGS) $@ $(LIBOBJS) @cf_generic_objects@ -+@USE_OLD_MAKERULES@ $(MIXED_OBJS) -+@USE_OLD_MAKERULES@ $(AR) $(ARFLAGS) $@ $(MIXED_OBJS) - - $(BUILD_DIR)/static-ali : ; mkdir -p $@ - $(BUILD_DIR)/static-obj : ; mkdir -p $@ -@@ -233,23 +245,25 @@ - - @USE_GNAT_PROJECTS@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \ - @USE_GNAT_PROJECTS@ $(ABASE)-trace.adb \ -+@USE_GNAT_PROJECTS@ $(C_OBJS) \ - @USE_GNAT_PROJECTS@ $(STATIC_DIRS) - @USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static -+@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(C_OBJS) - @USE_GNAT_PROJECTS@ --@USE_GNAT_PROJECTS@install \ --@USE_GNAT_PROJECTS@install.libs :: \ --@USE_GNAT_PROJECTS@ $(ADA_OBJECTS) --@USE_GNAT_PROJECTS@ $(INSTALL_LIB) \ --@USE_GNAT_PROJECTS@ $(BUILD_DIR)/static-ali/*.ali \ --@USE_GNAT_PROJECTS@ $(ADA_OBJECTS) -+@USE_GNAT_LIBRARIES@install \ -+@USE_GNAT_LIBRARIES@install.libs :: \ -+@USE_GNAT_LIBRARIES@ $(ADA_OBJECTS) -+@USE_GNAT_LIBRARIES@ $(INSTALL_LIB) \ -+@USE_GNAT_LIBRARIES@ $(BUILD_DIR)/static-ali/*.ali \ -+@USE_GNAT_LIBRARIES@ $(ADA_OBJECTS) - - uninstall \ - uninstall.libs :: - @rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME) - --@USE_GNAT_PROJECTS@uninstall \ --@USE_GNAT_PROJECTS@uninstall.libs :: --@USE_GNAT_PROJECTS@ @$(SHELL) -c 'for name in $(BUILD_DIR)/static-ali/*.ali ; do rm -f $(ADA_OBJECTS)/`basename $$name`; done' -+@USE_GNAT_LIBRARIES@uninstall \ -+@USE_GNAT_LIBRARIES@uninstall.libs :: -+@USE_GNAT_LIBRARIES@ @$(SHELL) -c 'for name in $(BUILD_DIR)/static-ali/*.ali ; do rm -f $(ADA_OBJECTS)/`basename $$name`; done' - - $(BUILD_DIR)/dynamic-ali : ; mkdir -p $@ - $(BUILD_DIR)/dynamic-obj : ; mkdir -p $@ -@@ -259,8 +273,9 @@ - $(BUILD_DIR)/dynamic-ali \ - $(BUILD_DIR)/dynamic-obj - --@MAKE_ADA_SHAREDLIB@all \ -+@MAKE_ADA_SHAREDLIB@all :: $(BUILD_DIR_LIB)/$(SHARED_LIBNAME) - @MAKE_ADA_SHAREDLIB@$(BUILD_DIR_LIB)/$(SHARED_LIBNAME) :: $(ABASE)-trace.adb $(SHARED_DIRS) -+@MAKE_ADA_SHAREDLIB@ cp $(MIXED_OBJS) $(BUILD_DIR)/dynamic-obj/ - @MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic - - install \ -@@ -280,14 +295,14 @@ - $(SHELL) -c 'for name in $(SOURCE_DIR_SRC)/*.ad[sb] $(GENERATED_SOURCES); do rm -f $(ADA_INCLUDE)/`basename $$name`; done' - - @MAKE_ADA_SHAREDLIB@install \ --@MAKE_ADA_SHAREDLIB@install.libs :: $(ADA_OBJECTS) -+@MAKE_ADA_SHAREDLIB@install.libs :: $(ADA_OBJECTS) $(LIBDIR) - @MAKE_ADA_SHAREDLIB@ $(INSTALL_LIB) \ - @MAKE_ADA_SHAREDLIB@ $(BUILD_DIR)/dynamic-ali/* \ - @MAKE_ADA_SHAREDLIB@ $(ADA_OBJECTS) - @MAKE_ADA_SHAREDLIB@ $(INSTALL_LIB) \ - @MAKE_ADA_SHAREDLIB@ $(BUILD_DIR_LIB)/$(SHARED_LIBNAME) \ - @MAKE_ADA_SHAREDLIB@ $(LIBDIR) --@MAKE_ADA_SHAREDLIB@ cd $(LIBDIR) && ln -s $(SHARED_LIBNAME) $(SHARED_SYMLINK) -+@MAKE_ADA_SHAREDLIB@ cd $(LIBDIR) && $(LN_S) $(SHARED_LIBNAME) $(SHARED_SYMLINK) - @MAKE_ADA_SHAREDLIB@ - @MAKE_ADA_SHAREDLIB@uninstall \ - @MAKE_ADA_SHAREDLIB@uninstall.libs :: -diff -Naur ncurses-5.8/Ada95/src/ncurses_compat.c ncurses-5.8-20110402/Ada95/src/ncurses_compat.c ---- ncurses-5.8/Ada95/src/ncurses_compat.c 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/ncurses_compat.c 2011-03-28 02:29:04.000000000 +0200 -@@ -0,0 +1,135 @@ -+/**************************************************************************** -+ * Copyright (c) 2011 Free Software Foundation, Inc. * -+ * * -+ * Permission is hereby granted, free of charge, to any person obtaining a * -+ * copy of this software and associated documentation files (the * -+ * "Software"), to deal in the Software without restriction, including * -+ * without limitation the rights to use, copy, modify, merge, publish, * -+ * distribute, distribute with modifications, sublicense, and/or sell * -+ * copies of the Software, and to permit persons to whom the Software is * -+ * furnished to do so, subject to the following conditions: * -+ * * -+ * The above copyright notice and this permission notice shall be included * -+ * in all copies or substantial portions of the Software. * -+ * * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * -+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * -+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * -+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * -+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * -+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * -+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -+ * * -+ * Except as contained in this notice, the name(s) of the above copyright * -+ * holders shall not be used in advertising or otherwise to promote the * -+ * sale, use or other dealings in this Software without prior written * -+ * authorization. * -+ ****************************************************************************/ -+ -+/**************************************************************************** -+ * Author: Thomas E. Dickey, 2011 * -+ ****************************************************************************/ -+ -+/* -+ Version Control -+ $Id: ncurses_compat.c,v 1.2 2011/03/28 00:29:04 tom Exp $ -+ --------------------------------------------------------------------------*/ -+ -+/* -+ * Provide compatibility with older versions of ncurses. -+ */ -+#include -+ -+#if defined(NCURSES_VERSION_PATCH) -+ -+#if NCURSES_VERSION_PATCH < 20081122 -+extern bool has_mouse(void); -+extern int _nc_has_mouse(void); -+ -+bool -+has_mouse(void) -+{ -+ return (bool) _nc_has_mouse(); -+} -+#endif -+ -+/* -+ * These are provided by lib_gen.c: -+ */ -+#if NCURSES_VERSION_PATCH < 20070331 -+extern bool (is_keypad) (const WINDOW *); -+extern bool (is_scrollok) (const WINDOW *); -+ -+bool -+is_keypad(const WINDOW *win) -+{ -+ return ((win)->_use_keypad); -+} -+ -+bool -+ (is_scrollok) (const WINDOW *win) -+{ -+ return ((win)->_scroll); -+} -+#endif -+ -+#if NCURSES_VERSION_PATCH < 20060107 -+extern int (getbegx) (WINDOW *); -+extern int (getbegy) (WINDOW *); -+extern int (getcurx) (WINDOW *); -+extern int (getcury) (WINDOW *); -+extern int (getmaxx) (WINDOW *); -+extern int (getmaxy) (WINDOW *); -+extern int (getparx) (WINDOW *); -+extern int (getpary) (WINDOW *); -+ -+int -+ (getbegy) (WINDOW *win) -+{ -+ return ((win) ? (win)->_begy : ERR); -+} -+ -+int -+ (getbegx) (WINDOW *win) -+{ -+ return ((win) ? (win)->_begx : ERR); -+} -+ -+int -+ (getcury) (WINDOW *win) -+{ -+ return ((win) ? (win)->_cury : ERR); -+} -+ -+int -+ (getcurx) (WINDOW *win) -+{ -+ return ((win) ? (win)->_curx : ERR); -+} -+ -+int -+ (getmaxy) (WINDOW *win) -+{ -+ return ((win) ? ((win)->_maxy + 1) : ERR); -+} -+ -+int -+ (getmaxx) (WINDOW *win) -+{ -+ return ((win) ? ((win)->_maxx + 1) : ERR); -+} -+ -+int -+ (getpary) (WINDOW *win) -+{ -+ return ((win) ? (win)->_pary : ERR); -+} -+ -+int -+ (getparx) (WINDOW *win) -+{ -+ return ((win) ? (win)->_parx : ERR); -+} -+#endif -+ -+#endif -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms.adb 2011-03-23 00:37:32.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.27 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.28 $ -+-- $Date: 2011/03/22 23:37:32 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -736,11 +736,11 @@ - - Res : Eti_Error; - begin -- pragma Assert (Flds (Flds'Last) = Null_Field); -- if Flds (Flds'Last) /= Null_Field then -+ pragma Assert (Flds.all (Flds'Last) = Null_Field); -+ if Flds.all (Flds'Last) /= Null_Field then - raise Form_Exception; - else -- Res := Set_Frm_Fields (Frm, Flds (Flds'First)'Address); -+ Res := Set_Frm_Fields (Frm, Flds.all (Flds'First)'Address); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -@@ -806,11 +806,11 @@ - - M : Form; - begin -- pragma Assert (Fields (Fields'Last) = Null_Field); -- if Fields (Fields'Last) /= Null_Field then -+ pragma Assert (Fields.all (Fields'Last) = Null_Field); -+ if Fields.all (Fields'Last) /= Null_Field then - raise Form_Exception; - else -- M := NewForm (Fields (Fields'First)'Address); -+ M := NewForm (Fields.all (Fields'First)'Address); - if M = Null_Form then - raise Form_Exception; - end if; -@@ -1136,8 +1136,8 @@ - begin - 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)); -+ if FA.all (I) /= Null_Field then -+ Delete (FA.all (I)); - end if; - end loop; - end if; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types.adb 2011-03-23 00:22:27.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,13 +35,14 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.21 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.25 $ -+-- $Date: 2011/03/22 23:22:27 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; - with Ada.Unchecked_Deallocation; --with Ada.Unchecked_Conversion; -+with System.Address_To_Access_Conversions; -+ - -- | - -- |===================================================================== - -- | man page form_fieldtype.3x -@@ -51,10 +52,8 @@ - - use type System.Address; - -- pragma Warnings (Off); -- function To_Argument_Access is new Ada.Unchecked_Conversion -- (System.Address, Argument_Access); -- pragma Warnings (On); -+ package Argument_Conversions is -+ new System.Address_To_Access_Conversions (Argument); - - function Get_Fieldtype (F : Field) return C_Field_Type; - pragma Import (C, Get_Fieldtype, "field_type"); -@@ -80,11 +79,12 @@ - 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)); -+ Arg := Argument_Access -+ (Argument_Conversions.To_Pointer (Get_Arg (Fld))); - if Arg = null then - raise Form_Exception; - else -- return Arg.Typ; -+ return Arg.all.Typ; - end if; - else - raise Form_Exception; -@@ -92,24 +92,6 @@ - end if; - end Get_Type; - -- function Make_Arg (Args : System.Address) return System.Address -- is -- -- Actually args is a double indirected pointer to the arguments -- -- of a C variable argument list. In theory it is now quite -- -- complicated to write portable routine that reads the arguments, -- -- because one has to know the growth direction of the stack and -- -- the sizes of the individual arguments. -- -- Fortunately we are only interested in the first argument (#0), -- -- we know its size and for the first arg we don't care about -- -- into which stack direction we have to proceed. We simply -- -- resolve the double indirection and thats it. -- type V is access all System.Address; -- function To_Access is new Ada.Unchecked_Conversion (System.Address, -- V); -- begin -- return To_Access (To_Access (Args).all).all; -- end Make_Arg; -- - function Copy_Arg (Usr : System.Address) return System.Address - is - begin -@@ -123,18 +105,19 @@ - procedure Freeargs is new Ada.Unchecked_Deallocation - (Argument, Argument_Access); - -- To_Be_Free : Argument_Access := To_Argument_Access (Usr); -+ To_Be_Free : Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (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); -+ if To_Be_Free.all.Usr /= System.Null_Address then -+ Low_Level := To_Be_Free.all.Cft; -+ if Low_Level.all.Freearg /= null then -+ Low_Level.all.Freearg (To_Be_Free.all.Usr); - end if; - end if; -- if To_Be_Free.Typ /= null then -- Free_Type (To_Be_Free.Typ); -+ if To_Be_Free.all.Typ /= null then -+ Free_Type (To_Be_Free.all.Typ); - end if; - Freeargs (To_Be_Free); - end if; -@@ -151,7 +134,7 @@ - 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"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_user"); - - begin - pragma Assert (Low_Level /= Null_Field_Type); -@@ -162,10 +145,10 @@ - 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); -+ if Low_Level.all.Copyarg /= null then -+ Arg.all.Usr := Low_Level.all.Copyarg (Usr_Arg); - else -- Arg.Usr := Usr_Arg; -+ Arg.all.Usr := Usr_Arg; - end if; - end if; - -@@ -177,56 +160,60 @@ - end Wrap_Builtin; - - function Field_Check_Router (Fld : Field; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Fcheck /= null then -+ return Arg.all.Cft.all.Fcheck (Fld, Arg.all.Usr); - else - return 1; - end if; - end Field_Check_Router; - - function Char_Check_Router (Ch : C_Int; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Ccheck /= null then -+ return Arg.all.Cft.all.Ccheck (Ch, Arg.all.Usr); - else - return 1; - end if; - end Char_Check_Router; - - function Next_Router (Fld : Field; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Next /= null then -+ return Arg.all.Cft.all.Next (Fld, Arg.all.Usr); - else - return 1; - end if; - end Next_Router; - - function Prev_Router (Fld : Field; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access := -+ Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Prev /= null then -+ return Arg.all.Cft.all.Prev (Fld, Arg.all.Usr); - else - return 1; - end if; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb 2011-03-19 01:45:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.10 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.11 $ -+-- $Date: 2011/03/19 00:45:37 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -46,13 +46,9 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_alpha"); - - Res : Eti_Error; - begin -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-alphanumeric.adb 2011-03-19 01:45:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.10 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.11 $ -+-- $Date: 2011/03/19 00:45:37 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -46,13 +46,9 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_alnum"); - - Res : Eti_Error; - begin -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb 2004-08-21 23:37:00.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-enumeration-ada.adb 2011-03-23 00:36:20.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2004,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.10 $ ---- $Date: 2004/08/21 21:37:00 $ -+-- $Revision: 1.11 $ -+-- $Date: 2011/03/22 23:36:20 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Characters.Handling; use Ada.Characters.Handling; -@@ -61,8 +61,8 @@ - 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)); -+ I.Names (J).all (I.Names (J).all'First) := -+ To_Upper (I.Names (J).all (I.Names (J).all'First)); - end if; - end if; - J := J + 1; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb 2009-12-26 18:45:26.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-enumeration.adb 2011-03-23 00:03:27.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,7 +35,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.8 $ -+-- $Revision: 1.10 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -63,13 +63,13 @@ - if Info.Names (I) = null then - raise Form_Exception; - end if; -- E.Arr (size_t (I)) := New_String (Info.Names (I).all); -+ E.Arr.all (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; -+ E.Arr.all (L) := Null_Ptr; - return E; - end Create; - -@@ -79,10 +79,10 @@ - P : chars_ptr; - begin - loop -- P := Enum.Arr (I); -+ P := Enum.Arr.all (I); - exit when P = Null_Ptr; - Free (P); -- Enum.Arr (I) := Null_Ptr; -+ Enum.Arr.all (I) := Null_Ptr; - I := I + 1; - end loop; - Enum.Arr := null; -@@ -91,15 +91,11 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_enum"); - - Res : Eti_Error; - begin -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-intfield.adb 2011-03-19 01:45:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.10 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.11 $ -+-- $Date: 2011/03/19 00:45:37 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -46,15 +46,11 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_integer"); - - Res : Eti_Error; - begin -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-ipv4_address.adb 2011-03-19 01:45:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.10 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.11 $ -+-- $Date: 2011/03/19 00:45:37 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -46,13 +46,9 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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) -+ function Set_Fld_Type (F : Field := Fld) - return C_Int; -- pragma Import (C, Set_Fld_Type, "set_field_type"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_ipv4"); - - Res : Eti_Error; - begin -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-numeric.adb 2011-03-19 01:45:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.11 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.12 $ -+-- $Date: 2011/03/19 00:45:37 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -49,15 +49,11 @@ - 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"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_numeric"); - - Res : Eti_Error; - begin -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb 2009-12-26 18:45:34.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-regexp.adb 2011-03-19 01:45:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,7 +35,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.9 $ -+-- $Revision: 1.10 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; use Interfaces.C; -@@ -48,13 +48,9 @@ - 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"); -+ pragma Import (C, Set_Ftyp, "set_field_type_regexp"); - - Txt : char_array (0 .. Typ.Regular_Expression.all'Length); - Len : size_t; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user.adb 2011-03-23 01:44:58.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,11 +35,11 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.16 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.21 $ -+-- $Date: 2011/03/23 00:44:58 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ --with Ada.Unchecked_Conversion; -+with System.Address_To_Access_Conversions; - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; - - package body Terminal_Interface.Curses.Forms.Field_Types.User is -@@ -54,7 +54,7 @@ - Cft : C_Field_Type := C_Generic_Type; - Arg1 : Argument_Access) - return C_Int; -- pragma Import (C, Set_Fld_Type, "set_field_type"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_user"); - - Res : Eti_Error; - -@@ -76,31 +76,31 @@ - end if; - end Set_Field_Type; - -- pragma Warnings (Off); -- function To_Argument_Access is new Ada.Unchecked_Conversion -- (System.Address, Argument_Access); -- pragma Warnings (On); -+ package Argument_Conversions is -+ new System.Address_To_Access_Conversions (Argument); - - function Generic_Field_Check (Fld : Field; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is - Result : Boolean; - Udf : constant User_Defined_Field_Type_Access := -- User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); -+ User_Defined_Field_Type_Access -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ); - begin - Result := Field_Check (Fld, Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Field_Check; - - function Generic_Char_Check (Ch : C_Int; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is - Result : Boolean; - Udf : constant User_Defined_Field_Type_Access := -- User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); -+ User_Defined_Field_Type_Access -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ); - begin - Result := Character_Check (Character'Val (Ch), Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Char_Check; - - -- ----------------------------------------------------------------------- -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user.ads ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user.ads ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user.ads 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user.ads 2011-03-19 13:27:21.000000000 +0100 -@@ -7,7 +7,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.13 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.15 $ -+-- $Date: 2011/03/19 12:27:21 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -79,17 +79,17 @@ - function C_Generic_Type return C_Field_Type; - - function Generic_Field_Check (Fld : Field; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. 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; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. It routes - -- the call to the Character_Check implementation for the type. - - end Terminal_Interface.Curses.Forms.Field_Types.User; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb 2008-07-26 20:48:58.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.adb 2011-03-22 11:53:37.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,42 +35,40 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.15 $ ---- $Date: 2008/07/26 18:48:58 $ -+-- $Revision: 1.17 $ -+-- $Date: 2011/03/22 10:53:37 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ --with Ada.Unchecked_Conversion; -+with System.Address_To_Access_Conversions; - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; - - package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is - -- pragma Warnings (Off); -- function To_Argument_Access is new Ada.Unchecked_Conversion -- (System.Address, Argument_Access); -- pragma Warnings (On); -+ package Argument_Conversions is -+ new System.Address_To_Access_Conversions (Argument); - - function Generic_Next (Fld : Field; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is - Result : Boolean; - Udf : constant User_Defined_Field_Type_With_Choice_Access := - User_Defined_Field_Type_With_Choice_Access -- (To_Argument_Access (Usr).Typ); -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).Typ); - begin - Result := Next (Fld, Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Next; - - function Generic_Prev (Fld : Field; -- Usr : System.Address) return C_Int -+ Usr : System.Address) return Curses_Bool - is - Result : Boolean; - Udf : constant User_Defined_Field_Type_With_Choice_Access := - User_Defined_Field_Type_With_Choice_Access -- (To_Argument_Access (Usr).Typ); -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).Typ); - begin - Result := Previous (Fld, Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Prev; - - -- ----------------------------------------------------------------------- -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads ---- ncurses-5.8/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads 2008-07-26 20:49:20.000000000 +0200 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-forms-field_types-user-choice.ads 2011-03-19 13:27:47.000000000 +0100 -@@ -7,7 +7,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.12 $ ---- $Date: 2008/07/26 18:49:20 $ -+-- $Revision: 1.14 $ -+-- $Date: 2011/03/19 12:27:47 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -78,17 +78,17 @@ - function C_Generic_Choice return C_Field_Type; - - function Generic_Next (Fld : Field; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. It routes - -- the call to the Next implementation for the type. - - function Generic_Prev (Fld : Field; -- Usr : System.Address) return C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. It routes - -- the call to the Previous implementation for the type. - - end Terminal_Interface.Curses.Forms.Field_Types.User.Choice; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-menus.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-menus.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-menus.adb 2009-12-26 18:38:58.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-menus.adb 2011-03-23 00:38:12.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.27 $ ---- $Date: 2009/12/26 17:38:58 $ -+-- $Revision: 1.28 $ -+-- $Date: 2011/03/22 23:38:12 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -896,8 +896,8 @@ - - Res : Eti_Error; - begin -- pragma Assert (Items (Items'Last) = Null_Item); -- if Items (Items'Last) /= Null_Item then -+ pragma Assert (Items.all (Items'Last) = Null_Item); -+ if Items.all (Items'Last) /= Null_Item then - raise Menu_Exception; - else - Res := Set_Items (Men, Items.all'Address); -@@ -941,8 +941,8 @@ - - M : Menu; - begin -- pragma Assert (Items (Items'Last) = Null_Item); -- if Items (Items'Last) /= Null_Item then -+ pragma Assert (Items.all (Items'Last) = Null_Item); -+ if Items.all (Items'Last) /= Null_Item then - raise Menu_Exception; - else - M := Newmenu (Items.all'Address); -@@ -997,8 +997,8 @@ - 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)); -+ if IA.all (I) /= Null_Item then -+ Delete (IA.all (I)); - end if; - end loop; - end if; -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-text_io.adb ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-text_io.adb ---- ncurses-5.8/Ada95/src/terminal_interface-curses-text_io.adb 2009-12-26 18:40:46.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-text_io.adb 2011-03-23 00:38:49.000000000 +0100 -@@ -7,7 +7,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -35,8 +35,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.19 $ ---- $Date: 2009/12/26 17:40:46 $ -+-- $Revision: 1.20 $ -+-- $Date: 2011/03/22 23:38:49 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - package body Terminal_Interface.Curses.Text_IO is -@@ -205,6 +205,7 @@ - end if; - - Get_Cursor_Position (Win, Y1, X); -+ pragma Unreferenced (X); - N := Natural (To); N := N - 1; - Y2 := Line_Position (N); - if Y2 < Y1 then -diff -Naur ncurses-5.8/Ada95/src/terminal_interface-curses-trace.adb_p ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-trace.adb_p ---- ncurses-5.8/Ada95/src/terminal_interface-curses-trace.adb_p 2009-12-26 18:41:14.000000000 +0100 -+++ ncurses-5.8-20110402/Ada95/src/terminal_interface-curses-trace.adb_p 2011-03-19 19:16:43.000000000 +0100 -@@ -35,7 +35,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- $Revision: 1.6 $ -+-- $Revision: 1.7 $ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - #if ADA_TRACE then -@@ -66,7 +66,7 @@ - - procedure Trace_Put (str : String) is - procedure tracef (format : char_array; s : char_array); -- pragma Import (C, tracef, "_tracef"); -+ pragma Import (C, tracef, "_traces"); - Txt : char_array (0 .. str'Length); - Length : size_t; - formatstr : constant String := "%s" & ASCII.NUL; -diff -Naur ncurses-5.8/configure ncurses-5.8-20110402/configure ---- ncurses-5.8/configure 2011-02-21 02:40:36.000000000 +0100 -+++ ncurses-5.8-20110402/configure 2011-04-01 01:35:51.000000000 +0200 -@@ -1,5 +1,5 @@ - #! /bin/sh --# From configure.in Revision: 1.514 . -+# From configure.in Revision: 1.520 . - # Guess values for system-dependent variables and create Makefiles. - # Generated by Autoconf 2.52.20101002. - # -@@ -3904,7 +3904,7 @@ - all : - @ echo '.$cf_option' - CF_EOF -- cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[ ]*$,,'` -+ cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'` - case "$cf_result" in - .*k) - cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` -@@ -13376,6 +13376,7 @@ - getopt.h \ - limits.h \ - locale.h \ -+math.h \ - poll.h \ - sys/bsdtypes.h \ - sys/ioctl.h \ -@@ -13390,23 +13391,23 @@ - - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:13393: checking for $ac_header" >&5 -+echo "$as_me:13394: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 13399 "configure" -+#line 13400 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:13403: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:13404: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:13409: \$? = $ac_status" >&5 -+ echo "$as_me:13410: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -13425,7 +13426,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:13428: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:13429: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h < to declare fd_set - if test "$ISC" = yes ; then - --echo "$as_me:13442: checking for main in -lcposix" >&5 -+echo "$as_me:13443: checking for main in -lcposix" >&5 - echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6 - if test "${ac_cv_lib_cposix_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13447,7 +13448,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcposix $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 13450 "configure" -+#line 13451 "configure" - #include "confdefs.h" - - int -@@ -13459,16 +13460,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13462: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13463: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13465: \$? = $ac_status" >&5 -+ echo "$as_me:13466: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13468: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13469: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13471: \$? = $ac_status" >&5 -+ echo "$as_me:13472: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_cposix_main=yes - else -@@ -13479,7 +13480,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:13482: result: $ac_cv_lib_cposix_main" >&5 -+echo "$as_me:13483: result: $ac_cv_lib_cposix_main" >&5 - echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6 - if test $ac_cv_lib_cposix_main = yes; then - cat >>confdefs.h <&5 -+ echo "$as_me:13494: checking for bzero in -linet" >&5 - echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6 - if test "${ac_cv_lib_inet_bzero+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13498,7 +13499,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-linet $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 13501 "configure" -+#line 13502 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -13517,16 +13518,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13520: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13521: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13523: \$? = $ac_status" >&5 -+ echo "$as_me:13524: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13526: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13527: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13529: \$? = $ac_status" >&5 -+ echo "$as_me:13530: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_inet_bzero=yes - else -@@ -13537,21 +13538,21 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:13540: result: $ac_cv_lib_inet_bzero" >&5 -+echo "$as_me:13541: result: $ac_cv_lib_inet_bzero" >&5 - echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6 - if test $ac_cv_lib_inet_bzero = yes; then - LIBS="-linet $LIBS" - fi - fi - --echo "$as_me:13547: checking if sys/time.h works with sys/select.h" >&5 -+echo "$as_me:13548: checking if sys/time.h works with sys/select.h" >&5 - echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6 - if test "${cf_cv_sys_time_select+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 13554 "configure" -+#line 13555 "configure" - #include "confdefs.h" - - #include -@@ -13571,16 +13572,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13574: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13575: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13577: \$? = $ac_status" >&5 -+ echo "$as_me:13578: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13580: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13581: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13583: \$? = $ac_status" >&5 -+ echo "$as_me:13584: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_sys_time_select=yes - else -@@ -13592,7 +13593,7 @@ - - fi - --echo "$as_me:13595: result: $cf_cv_sys_time_select" >&5 -+echo "$as_me:13596: result: $cf_cv_sys_time_select" >&5 - echo "${ECHO_T}$cf_cv_sys_time_select" >&6 - test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF - #define HAVE_SYS_TIME_SELECT 1 -@@ -13606,7 +13607,7 @@ - ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_main_return=return - --echo "$as_me:13609: checking for $CC option to accept ANSI C" >&5 -+echo "$as_me:13610: checking for $CC option to accept ANSI C" >&5 - echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 - if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13614,7 +13615,7 @@ - ac_cv_prog_cc_stdc=no - ac_save_CC=$CC - cat >conftest.$ac_ext <<_ACEOF --#line 13617 "configure" -+#line 13618 "configure" - #include "confdefs.h" - #include - #include -@@ -13663,16 +13664,16 @@ - do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13666: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13667: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13669: \$? = $ac_status" >&5 -+ echo "$as_me:13670: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13672: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13673: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13675: \$? = $ac_status" >&5 -+ echo "$as_me:13676: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg - break -@@ -13689,21 +13690,21 @@ - - case "x$ac_cv_prog_cc_stdc" in - x|xno) -- echo "$as_me:13692: result: none needed" >&5 -+ echo "$as_me:13693: result: none needed" >&5 - echo "${ECHO_T}none needed" >&6 ;; - *) -- echo "$as_me:13695: result: $ac_cv_prog_cc_stdc" >&5 -+ echo "$as_me:13696: result: $ac_cv_prog_cc_stdc" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; - esac - --echo "$as_me:13700: checking for an ANSI C-conforming const" >&5 -+echo "$as_me:13701: checking for an ANSI C-conforming const" >&5 - echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 - if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 13706 "configure" -+#line 13707 "configure" - #include "confdefs.h" - - int -@@ -13761,16 +13762,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13764: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13765: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13767: \$? = $ac_status" >&5 -+ echo "$as_me:13768: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13770: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13771: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13773: \$? = $ac_status" >&5 -+ echo "$as_me:13774: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes - else -@@ -13780,7 +13781,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:13783: result: $ac_cv_c_const" >&5 -+echo "$as_me:13784: result: $ac_cv_c_const" >&5 - echo "${ECHO_T}$ac_cv_c_const" >&6 - if test $ac_cv_c_const = no; then - -@@ -13790,7 +13791,7 @@ - - fi - --echo "$as_me:13793: checking for inline" >&5 -+echo "$as_me:13794: checking for inline" >&5 - echo $ECHO_N "checking for inline... $ECHO_C" >&6 - if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13798,7 +13799,7 @@ - ac_cv_c_inline=no - for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF --#line 13801 "configure" -+#line 13802 "configure" - #include "confdefs.h" - #ifndef __cplusplus - static $ac_kw int static_foo () {return 0; } -@@ -13807,16 +13808,16 @@ - - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13810: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13811: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13813: \$? = $ac_status" >&5 -+ echo "$as_me:13814: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13816: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13817: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13819: \$? = $ac_status" >&5 -+ echo "$as_me:13820: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_inline=$ac_kw; break - else -@@ -13827,7 +13828,7 @@ - done - - fi --echo "$as_me:13830: result: $ac_cv_c_inline" >&5 -+echo "$as_me:13831: result: $ac_cv_c_inline" >&5 - echo "${ECHO_T}$ac_cv_c_inline" >&6 - case $ac_cv_c_inline in - inline | yes) ;; -@@ -13850,7 +13851,7 @@ - : - elif test "$GCC" = yes - then -- echo "$as_me:13853: checking if $CC supports options to tune inlining" >&5 -+ echo "$as_me:13854: checking if $CC supports options to tune inlining" >&5 - echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6 - if test "${cf_cv_gcc_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13859,7 +13860,7 @@ - cf_save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS --param max-inline-insns-single=1200" - cat >conftest.$ac_ext <<_ACEOF --#line 13862 "configure" -+#line 13863 "configure" - #include "confdefs.h" - inline int foo(void) { return 1; } - int -@@ -13871,16 +13872,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13874: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13875: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13877: \$? = $ac_status" >&5 -+ echo "$as_me:13878: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13880: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13881: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13883: \$? = $ac_status" >&5 -+ echo "$as_me:13884: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_gcc_inline=yes - else -@@ -13892,7 +13893,7 @@ - CFLAGS=$cf_save_CFLAGS - - fi --echo "$as_me:13895: result: $cf_cv_gcc_inline" >&5 -+echo "$as_me:13896: result: $cf_cv_gcc_inline" >&5 - echo "${ECHO_T}$cf_cv_gcc_inline" >&6 - if test "$cf_cv_gcc_inline" = yes ; then - -@@ -13978,7 +13979,7 @@ - fi - fi - --echo "$as_me:13981: checking for signal global datatype" >&5 -+echo "$as_me:13982: checking for signal global datatype" >&5 - echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 - if test "${cf_cv_sig_atomic_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13990,7 +13991,7 @@ - "int" - do - cat >conftest.$ac_ext <<_ACEOF --#line 13993 "configure" -+#line 13994 "configure" - #include "confdefs.h" - - #include -@@ -14013,16 +14014,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14016: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14019: \$? = $ac_status" >&5 -+ echo "$as_me:14020: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14022: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14023: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14025: \$? = $ac_status" >&5 -+ echo "$as_me:14026: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_sig_atomic_t=$cf_type - else -@@ -14036,7 +14037,7 @@ - - fi - --echo "$as_me:14039: result: $cf_cv_sig_atomic_t" >&5 -+echo "$as_me:14040: result: $cf_cv_sig_atomic_t" >&5 - echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 - test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <&5 -+echo "$as_me:14048: checking for type of chtype" >&5 - echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6 - if test "${cf_cv_typeof_chtype+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -14054,7 +14055,7 @@ - cf_cv_typeof_chtype=long - else - cat >conftest.$ac_ext <<_ACEOF --#line 14057 "configure" -+#line 14058 "configure" - #include "confdefs.h" - - #define WANT_BITS 31 -@@ -14089,15 +14090,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:14092: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14093: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14095: \$? = $ac_status" >&5 -+ echo "$as_me:14096: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:14097: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14098: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14100: \$? = $ac_status" >&5 -+ echo "$as_me:14101: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_typeof_chtype=`cat cf_test.out` - else -@@ -14112,7 +14113,7 @@ - - fi - --echo "$as_me:14115: result: $cf_cv_typeof_chtype" >&5 -+echo "$as_me:14116: result: $cf_cv_typeof_chtype" >&5 - echo "${ECHO_T}$cf_cv_typeof_chtype" >&6 - - cat >>confdefs.h <&5 -+echo "$as_me:14128: checking if unsigned literals are legal" >&5 - echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6 - if test "${cf_cv_unsigned_literals+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14134 "configure" -+#line 14135 "configure" - #include "confdefs.h" - - int -@@ -14143,16 +14144,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14146: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14147: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14149: \$? = $ac_status" >&5 -+ echo "$as_me:14150: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14152: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14153: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14155: \$? = $ac_status" >&5 -+ echo "$as_me:14156: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_unsigned_literals=yes - else -@@ -14164,7 +14165,7 @@ - - fi - --echo "$as_me:14167: result: $cf_cv_unsigned_literals" >&5 -+echo "$as_me:14168: result: $cf_cv_unsigned_literals" >&5 - echo "${ECHO_T}$cf_cv_unsigned_literals" >&6 - - cf_cv_1UL="1" -@@ -14180,14 +14181,14 @@ - - ### Checks for external-data - --echo "$as_me:14183: checking if external errno is declared" >&5 -+echo "$as_me:14184: checking if external errno is declared" >&5 - echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6 - if test "${cf_cv_dcl_errno+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14190 "configure" -+#line 14191 "configure" - #include "confdefs.h" - - #ifdef HAVE_STDLIB_H -@@ -14205,16 +14206,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14208: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14209: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14211: \$? = $ac_status" >&5 -+ echo "$as_me:14212: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14214: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14215: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14217: \$? = $ac_status" >&5 -+ echo "$as_me:14218: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_dcl_errno=yes - else -@@ -14225,7 +14226,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:14228: result: $cf_cv_dcl_errno" >&5 -+echo "$as_me:14229: result: $cf_cv_dcl_errno" >&5 - echo "${ECHO_T}$cf_cv_dcl_errno" >&6 - - if test "$cf_cv_dcl_errno" = no ; then -@@ -14240,14 +14241,14 @@ - - # It's possible (for near-UNIX clones) that the data doesn't exist - --echo "$as_me:14243: checking if external errno exists" >&5 -+echo "$as_me:14244: checking if external errno exists" >&5 - echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6 - if test "${cf_cv_have_errno+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14250 "configure" -+#line 14251 "configure" - #include "confdefs.h" - - #undef errno -@@ -14262,16 +14263,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14265: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14266: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14268: \$? = $ac_status" >&5 -+ echo "$as_me:14269: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14271: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14272: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14274: \$? = $ac_status" >&5 -+ echo "$as_me:14275: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_have_errno=yes - else -@@ -14282,7 +14283,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - fi --echo "$as_me:14285: result: $cf_cv_have_errno" >&5 -+echo "$as_me:14286: result: $cf_cv_have_errno" >&5 - echo "${ECHO_T}$cf_cv_have_errno" >&6 - - if test "$cf_cv_have_errno" = yes ; then -@@ -14295,7 +14296,7 @@ - - fi - --echo "$as_me:14298: checking if data-only library module links" >&5 -+echo "$as_me:14299: checking if data-only library module links" >&5 - echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6 - if test "${cf_cv_link_dataonly+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -14303,20 +14304,20 @@ - - rm -f conftest.a - cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:14310: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14312: \$? = $ac_status" >&5 -+ echo "$as_me:14313: \$? = $ac_status" >&5 - (exit $ac_status); } ; then - mv conftest.o data.o && \ - ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null - fi - rm -f conftest.$ac_ext data.o - cat >conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:14333: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14335: \$? = $ac_status" >&5 -+ echo "$as_me:14336: \$? = $ac_status" >&5 - (exit $ac_status); }; then - mv conftest.o func.o && \ - ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null -@@ -14345,7 +14346,7 @@ - cf_cv_link_dataonly=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 14348 "configure" -+#line 14349 "configure" - #include "confdefs.h" - - int main() -@@ -14356,15 +14357,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:14359: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14360: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14362: \$? = $ac_status" >&5 -+ echo "$as_me:14363: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:14364: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14365: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14367: \$? = $ac_status" >&5 -+ echo "$as_me:14368: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_link_dataonly=yes - else -@@ -14379,7 +14380,7 @@ - - fi - --echo "$as_me:14382: result: $cf_cv_link_dataonly" >&5 -+echo "$as_me:14383: result: $cf_cv_link_dataonly" >&5 - echo "${ECHO_T}$cf_cv_link_dataonly" >&6 - - if test "$cf_cv_link_dataonly" = no ; then -@@ -14414,13 +14415,13 @@ - - do - as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` --echo "$as_me:14417: checking for $ac_func" >&5 -+echo "$as_me:14418: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 14423 "configure" -+#line 14424 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -@@ -14451,16 +14452,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14454: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14455: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14457: \$? = $ac_status" >&5 -+ echo "$as_me:14458: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14460: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14461: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14463: \$? = $ac_status" >&5 -+ echo "$as_me:14464: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" - else -@@ -14470,7 +14471,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:14473: result: `eval echo '${'$as_ac_var'}'`" >&5 -+echo "$as_me:14474: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:14486: checking for terminal-capability database functions" >&5 - echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6 - if test "${cf_cv_cgetent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14492 "configure" -+#line 14493 "configure" - #include "confdefs.h" - - #include -@@ -14509,16 +14510,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14512: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14513: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14515: \$? = $ac_status" >&5 -+ echo "$as_me:14516: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14518: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14519: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14521: \$? = $ac_status" >&5 -+ echo "$as_me:14522: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_cgetent=yes - else -@@ -14530,7 +14531,7 @@ - - fi - --echo "$as_me:14533: result: $cf_cv_cgetent" >&5 -+echo "$as_me:14534: result: $cf_cv_cgetent" >&5 - echo "${ECHO_T}$cf_cv_cgetent" >&6 - test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF - #define HAVE_BSD_CGETENT 1 -@@ -14538,14 +14539,14 @@ - - fi - --echo "$as_me:14541: checking for isascii" >&5 -+echo "$as_me:14542: checking for isascii" >&5 - echo $ECHO_N "checking for isascii... $ECHO_C" >&6 - if test "${cf_cv_have_isascii+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14548 "configure" -+#line 14549 "configure" - #include "confdefs.h" - #include - int -@@ -14557,16 +14558,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14560: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14561: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14563: \$? = $ac_status" >&5 -+ echo "$as_me:14564: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14566: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14567: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14569: \$? = $ac_status" >&5 -+ echo "$as_me:14570: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_have_isascii=yes - else -@@ -14577,17 +14578,17 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - fi --echo "$as_me:14580: result: $cf_cv_have_isascii" >&5 -+echo "$as_me:14581: result: $cf_cv_have_isascii" >&5 - echo "${ECHO_T}$cf_cv_have_isascii" >&6 - test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF - #define HAVE_ISASCII 1 - EOF - - if test "$ac_cv_func_sigaction" = yes; then --echo "$as_me:14587: checking whether sigaction needs _POSIX_SOURCE" >&5 -+echo "$as_me:14588: checking whether sigaction needs _POSIX_SOURCE" >&5 - echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 14590 "configure" -+#line 14591 "configure" - #include "confdefs.h" - - #include -@@ -14601,16 +14602,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14604: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14605: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14607: \$? = $ac_status" >&5 -+ echo "$as_me:14608: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14610: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14611: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14613: \$? = $ac_status" >&5 -+ echo "$as_me:14614: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - sigact_bad=no - else -@@ -14618,7 +14619,7 @@ - cat conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 14621 "configure" -+#line 14622 "configure" - #include "confdefs.h" - - #define _POSIX_SOURCE -@@ -14633,16 +14634,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14636: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14637: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14639: \$? = $ac_status" >&5 -+ echo "$as_me:14640: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14642: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14643: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14645: \$? = $ac_status" >&5 -+ echo "$as_me:14646: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - sigact_bad=yes - cat >>confdefs.h <<\EOF -@@ -14657,11 +14658,11 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14660: result: $sigact_bad" >&5 -+echo "$as_me:14661: result: $sigact_bad" >&5 - echo "${ECHO_T}$sigact_bad" >&6 - fi - --echo "$as_me:14664: checking if nanosleep really works" >&5 -+echo "$as_me:14665: checking if nanosleep really works" >&5 - echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6 - if test "${cf_cv_func_nanosleep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -14671,7 +14672,7 @@ - cf_cv_func_nanosleep=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 14674 "configure" -+#line 14675 "configure" - #include "confdefs.h" - - #include -@@ -14696,15 +14697,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:14699: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14700: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14702: \$? = $ac_status" >&5 -+ echo "$as_me:14703: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:14704: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14705: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14707: \$? = $ac_status" >&5 -+ echo "$as_me:14708: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_nanosleep=yes - else -@@ -14716,7 +14717,7 @@ - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi --echo "$as_me:14719: result: $cf_cv_func_nanosleep" >&5 -+echo "$as_me:14720: result: $cf_cv_func_nanosleep" >&5 - echo "${ECHO_T}$cf_cv_func_nanosleep" >&6 - - test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF -@@ -14730,23 +14731,23 @@ - - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:14733: checking for $ac_header" >&5 -+echo "$as_me:14734: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 14739 "configure" -+#line 14740 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:14743: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:14744: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:14749: \$? = $ac_status" >&5 -+ echo "$as_me:14750: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -14765,7 +14766,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:14768: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:14769: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:14784: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 14789 "configure" -+#line 14790 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:14793: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:14794: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:14799: \$? = $ac_status" >&5 -+ echo "$as_me:14800: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -14815,7 +14816,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:14818: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:14819: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+ echo "$as_me:14837: checking whether termios.h needs _POSIX_SOURCE" >&5 - echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 14839 "configure" -+#line 14840 "configure" - #include "confdefs.h" - #include - int -@@ -14848,16 +14849,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14851: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14852: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14854: \$? = $ac_status" >&5 -+ echo "$as_me:14855: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14857: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14858: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14860: \$? = $ac_status" >&5 -+ echo "$as_me:14861: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - termios_bad=no - else -@@ -14865,7 +14866,7 @@ - cat conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 14868 "configure" -+#line 14869 "configure" - #include "confdefs.h" - - #define _POSIX_SOURCE -@@ -14879,16 +14880,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14882: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14883: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14885: \$? = $ac_status" >&5 -+ echo "$as_me:14886: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14888: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14889: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14891: \$? = $ac_status" >&5 -+ echo "$as_me:14892: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - termios_bad=unknown - else -@@ -14903,19 +14904,19 @@ - - fi - rm -f conftest.$ac_objext conftest.$ac_ext -- echo "$as_me:14906: result: $termios_bad" >&5 -+ echo "$as_me:14907: result: $termios_bad" >&5 - echo "${ECHO_T}$termios_bad" >&6 - fi - fi - --echo "$as_me:14911: checking for tcgetattr" >&5 -+echo "$as_me:14912: checking for tcgetattr" >&5 - echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6 - if test "${cf_cv_have_tcgetattr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14918 "configure" -+#line 14919 "configure" - #include "confdefs.h" - - #include -@@ -14943,16 +14944,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14946: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14947: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14949: \$? = $ac_status" >&5 -+ echo "$as_me:14950: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14952: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14953: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14955: \$? = $ac_status" >&5 -+ echo "$as_me:14956: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_have_tcgetattr=yes - else -@@ -14962,20 +14963,20 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:14965: result: $cf_cv_have_tcgetattr" >&5 -+echo "$as_me:14966: result: $cf_cv_have_tcgetattr" >&5 - echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6 - test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF - #define HAVE_TCGETATTR 1 - EOF - --echo "$as_me:14971: checking for vsscanf function or workaround" >&5 -+echo "$as_me:14972: checking for vsscanf function or workaround" >&5 - echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6 - if test "${cf_cv_func_vsscanf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14978 "configure" -+#line 14979 "configure" - #include "confdefs.h" - - #include -@@ -14991,16 +14992,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14994: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14995: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14997: \$? = $ac_status" >&5 -+ echo "$as_me:14998: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15000: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15001: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15003: \$? = $ac_status" >&5 -+ echo "$as_me:15004: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_vsscanf=vsscanf - else -@@ -15008,7 +15009,7 @@ - cat conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 15011 "configure" -+#line 15012 "configure" - #include "confdefs.h" - - #include -@@ -15030,16 +15031,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15033: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15034: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15036: \$? = $ac_status" >&5 -+ echo "$as_me:15037: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15039: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15040: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15042: \$? = $ac_status" >&5 -+ echo "$as_me:15043: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_vsscanf=vfscanf - else -@@ -15047,7 +15048,7 @@ - cat conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 15050 "configure" -+#line 15051 "configure" - #include "confdefs.h" - - #include -@@ -15069,16 +15070,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15072: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15073: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15075: \$? = $ac_status" >&5 -+ echo "$as_me:15076: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15078: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15079: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15081: \$? = $ac_status" >&5 -+ echo "$as_me:15082: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_vsscanf=_doscan - else -@@ -15093,7 +15094,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:15096: result: $cf_cv_func_vsscanf" >&5 -+echo "$as_me:15097: result: $cf_cv_func_vsscanf" >&5 - echo "${ECHO_T}$cf_cv_func_vsscanf" >&6 - - case $cf_cv_func_vsscanf in #(vi -@@ -15111,7 +15112,7 @@ - ;; - esac - --echo "$as_me:15114: checking for working mkstemp" >&5 -+echo "$as_me:15115: checking for working mkstemp" >&5 - echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 - if test "${cf_cv_func_mkstemp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -15119,13 +15120,13 @@ - - rm -rf conftest* - if test "$cross_compiling" = yes; then -- echo "$as_me:15122: checking for mkstemp" >&5 -+ echo "$as_me:15123: checking for mkstemp" >&5 - echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 - if test "${ac_cv_func_mkstemp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15128 "configure" -+#line 15129 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char mkstemp (); below. */ -@@ -15156,16 +15157,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15159: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15160: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15162: \$? = $ac_status" >&5 -+ echo "$as_me:15163: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15165: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15166: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15168: \$? = $ac_status" >&5 -+ echo "$as_me:15169: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_mkstemp=yes - else -@@ -15175,12 +15176,12 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:15178: result: $ac_cv_func_mkstemp" >&5 -+echo "$as_me:15179: result: $ac_cv_func_mkstemp" >&5 - echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 - - else - cat >conftest.$ac_ext <<_ACEOF --#line 15183 "configure" -+#line 15184 "configure" - #include "confdefs.h" - - #include -@@ -15218,15 +15219,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:15221: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15222: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15224: \$? = $ac_status" >&5 -+ echo "$as_me:15225: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:15226: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15227: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15229: \$? = $ac_status" >&5 -+ echo "$as_me:15230: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_mkstemp=yes - -@@ -15241,7 +15242,7 @@ - fi - - fi --echo "$as_me:15244: result: $cf_cv_func_mkstemp" >&5 -+echo "$as_me:15245: result: $cf_cv_func_mkstemp" >&5 - echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 - if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then - cat >>confdefs.h <<\EOF -@@ -15259,21 +15260,21 @@ - fi - - if test "$cross_compiling" = yes ; then -- { echo "$as_me:15262: WARNING: cross compiling: assume setvbuf params not reversed" >&5 -+ { echo "$as_me:15263: WARNING: cross compiling: assume setvbuf params not reversed" >&5 - echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;} - else -- echo "$as_me:15265: checking whether setvbuf arguments are reversed" >&5 -+ echo "$as_me:15266: checking whether setvbuf arguments are reversed" >&5 - echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 - if test "${ac_cv_func_setvbuf_reversed+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - if test "$cross_compiling" = yes; then -- { { echo "$as_me:15271: error: cannot run test program while cross compiling" >&5 -+ { { echo "$as_me:15272: error: cannot run test program while cross compiling" >&5 - echo "$as_me: error: cannot run test program while cross compiling" >&2;} - { (exit 1); exit 1; }; } - else - cat >conftest.$ac_ext <<_ACEOF --#line 15276 "configure" -+#line 15277 "configure" - #include "confdefs.h" - #include - /* If setvbuf has the reversed format, exit 0. */ -@@ -15290,15 +15291,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:15293: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15294: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15296: \$? = $ac_status" >&5 -+ echo "$as_me:15297: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:15298: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15299: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15301: \$? = $ac_status" >&5 -+ echo "$as_me:15302: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_setvbuf_reversed=yes - else -@@ -15311,7 +15312,7 @@ - fi - rm -f core core.* *.core - fi --echo "$as_me:15314: result: $ac_cv_func_setvbuf_reversed" >&5 -+echo "$as_me:15315: result: $ac_cv_func_setvbuf_reversed" >&5 - echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 - if test $ac_cv_func_setvbuf_reversed = yes; then - -@@ -15322,13 +15323,13 @@ - fi - - fi --echo "$as_me:15325: checking return type of signal handlers" >&5 -+echo "$as_me:15326: checking return type of signal handlers" >&5 - echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 - if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15331 "configure" -+#line 15332 "configure" - #include "confdefs.h" - #include - #include -@@ -15350,16 +15351,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:15353: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:15354: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:15356: \$? = $ac_status" >&5 -+ echo "$as_me:15357: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:15359: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15360: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15362: \$? = $ac_status" >&5 -+ echo "$as_me:15363: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void - else -@@ -15369,21 +15370,21 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:15372: result: $ac_cv_type_signal" >&5 -+echo "$as_me:15373: result: $ac_cv_type_signal" >&5 - echo "${ECHO_T}$ac_cv_type_signal" >&6 - - cat >>confdefs.h <&5 -+echo "$as_me:15380: checking for type sigaction_t" >&5 - echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6 - if test "${cf_cv_type_sigaction+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 15386 "configure" -+#line 15387 "configure" - #include "confdefs.h" - - #include -@@ -15396,16 +15397,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:15399: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:15400: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:15402: \$? = $ac_status" >&5 -+ echo "$as_me:15403: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:15405: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15406: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15408: \$? = $ac_status" >&5 -+ echo "$as_me:15409: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_type_sigaction=yes - else -@@ -15416,13 +15417,13 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - fi - --echo "$as_me:15419: result: $cf_cv_type_sigaction" >&5 -+echo "$as_me:15420: result: $cf_cv_type_sigaction" >&5 - echo "${ECHO_T}$cf_cv_type_sigaction" >&6 - test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF - #define HAVE_TYPE_SIGACTION 1 - EOF - --echo "$as_me:15425: checking declaration of size-change" >&5 -+echo "$as_me:15426: checking declaration of size-change" >&5 - echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6 - if test "${cf_cv_sizechange+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -15437,7 +15438,7 @@ - CPPFLAGS="$cf_save_CPPFLAGS" - test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts" - cat >conftest.$ac_ext <<_ACEOF --#line 15440 "configure" -+#line 15441 "configure" - #include "confdefs.h" - #include - #ifdef HAVE_TERMIOS_H -@@ -15481,16 +15482,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:15484: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:15485: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:15487: \$? = $ac_status" >&5 -+ echo "$as_me:15488: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:15490: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15491: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15493: \$? = $ac_status" >&5 -+ echo "$as_me:15494: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_sizechange=yes - else -@@ -15509,7 +15510,7 @@ - done - - fi --echo "$as_me:15512: result: $cf_cv_sizechange" >&5 -+echo "$as_me:15513: result: $cf_cv_sizechange" >&5 - echo "${ECHO_T}$cf_cv_sizechange" >&6 - if test "$cf_cv_sizechange" != no ; then - cat >>confdefs.h <<\EOF -@@ -15526,13 +15527,13 @@ - esac - fi - --echo "$as_me:15529: checking for memmove" >&5 -+echo "$as_me:15530: checking for memmove" >&5 - echo $ECHO_N "checking for memmove... $ECHO_C" >&6 - if test "${ac_cv_func_memmove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15535 "configure" -+#line 15536 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char memmove (); below. */ -@@ -15563,16 +15564,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15566: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15567: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15569: \$? = $ac_status" >&5 -+ echo "$as_me:15570: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15572: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15573: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15575: \$? = $ac_status" >&5 -+ echo "$as_me:15576: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_memmove=yes - else -@@ -15582,19 +15583,19 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:15585: result: $ac_cv_func_memmove" >&5 -+echo "$as_me:15586: result: $ac_cv_func_memmove" >&5 - echo "${ECHO_T}$ac_cv_func_memmove" >&6 - if test $ac_cv_func_memmove = yes; then - : - else - --echo "$as_me:15591: checking for bcopy" >&5 -+echo "$as_me:15592: checking for bcopy" >&5 - echo $ECHO_N "checking for bcopy... $ECHO_C" >&6 - if test "${ac_cv_func_bcopy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15597 "configure" -+#line 15598 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char bcopy (); below. */ -@@ -15625,16 +15626,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15628: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15629: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15631: \$? = $ac_status" >&5 -+ echo "$as_me:15632: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15634: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15635: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15637: \$? = $ac_status" >&5 -+ echo "$as_me:15638: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_bcopy=yes - else -@@ -15644,11 +15645,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:15647: result: $ac_cv_func_bcopy" >&5 -+echo "$as_me:15648: result: $ac_cv_func_bcopy" >&5 - echo "${ECHO_T}$ac_cv_func_bcopy" >&6 - if test $ac_cv_func_bcopy = yes; then - -- echo "$as_me:15651: checking if bcopy does overlapping moves" >&5 -+ echo "$as_me:15652: checking if bcopy does overlapping moves" >&5 - echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6 - if test "${cf_cv_good_bcopy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -15658,7 +15659,7 @@ - cf_cv_good_bcopy=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 15661 "configure" -+#line 15662 "configure" - #include "confdefs.h" - - int main() { -@@ -15672,15 +15673,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:15675: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15676: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15678: \$? = $ac_status" >&5 -+ echo "$as_me:15679: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:15680: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15681: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15683: \$? = $ac_status" >&5 -+ echo "$as_me:15684: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_good_bcopy=yes - else -@@ -15693,7 +15694,7 @@ - fi - - fi --echo "$as_me:15696: result: $cf_cv_good_bcopy" >&5 -+echo "$as_me:15697: result: $cf_cv_good_bcopy" >&5 - echo "${ECHO_T}$cf_cv_good_bcopy" >&6 - - else -@@ -15714,7 +15715,7 @@ - - fi - --echo "$as_me:15717: checking if poll really works" >&5 -+echo "$as_me:15718: checking if poll really works" >&5 - echo $ECHO_N "checking if poll really works... $ECHO_C" >&6 - if test "${cf_cv_working_poll+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -15724,7 +15725,7 @@ - cf_cv_working_poll=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 15727 "configure" -+#line 15728 "configure" - #include "confdefs.h" - - #include -@@ -15745,15 +15746,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:15748: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15749: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15751: \$? = $ac_status" >&5 -+ echo "$as_me:15752: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:15753: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15754: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15756: \$? = $ac_status" >&5 -+ echo "$as_me:15757: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_working_poll=yes - else -@@ -15765,20 +15766,20 @@ - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi --echo "$as_me:15768: result: $cf_cv_working_poll" >&5 -+echo "$as_me:15769: result: $cf_cv_working_poll" >&5 - echo "${ECHO_T}$cf_cv_working_poll" >&6 - test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF - #define HAVE_WORKING_POLL 1 - EOF - --echo "$as_me:15774: checking for va_copy" >&5 -+echo "$as_me:15775: checking for va_copy" >&5 - echo $ECHO_N "checking for va_copy... $ECHO_C" >&6 - if test "${cf_cv_have_va_copy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 15781 "configure" -+#line 15782 "configure" - #include "confdefs.h" - - #include -@@ -15795,16 +15796,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15798: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15799: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15801: \$? = $ac_status" >&5 -+ echo "$as_me:15802: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15804: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15805: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15807: \$? = $ac_status" >&5 -+ echo "$as_me:15808: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_have_va_copy=yes - else -@@ -15814,21 +15815,21 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:15817: result: $cf_cv_have_va_copy" >&5 -+echo "$as_me:15818: result: $cf_cv_have_va_copy" >&5 - echo "${ECHO_T}$cf_cv_have_va_copy" >&6 - - test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF - #define HAVE_VA_COPY 1 - EOF - --echo "$as_me:15824: checking for __va_copy" >&5 -+echo "$as_me:15825: checking for __va_copy" >&5 - echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6 - if test "${cf_cv_have___va_copy+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 15831 "configure" -+#line 15832 "configure" - #include "confdefs.h" - - #include -@@ -15845,16 +15846,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:15848: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15849: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:15851: \$? = $ac_status" >&5 -+ echo "$as_me:15852: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:15854: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15855: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15857: \$? = $ac_status" >&5 -+ echo "$as_me:15858: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_have___va_copy=yes - else -@@ -15864,20 +15865,20 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:15867: result: $cf_cv_have___va_copy" >&5 -+echo "$as_me:15868: result: $cf_cv_have___va_copy" >&5 - echo "${ECHO_T}$cf_cv_have___va_copy" >&6 - - test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF - #define HAVE___VA_COPY 1 - EOF - --echo "$as_me:15874: checking for pid_t" >&5 -+echo "$as_me:15875: checking for pid_t" >&5 - echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 - if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15880 "configure" -+#line 15881 "configure" - #include "confdefs.h" - $ac_includes_default - int -@@ -15892,16 +15893,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:15895: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:15896: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:15898: \$? = $ac_status" >&5 -+ echo "$as_me:15899: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:15901: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15902: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:15904: \$? = $ac_status" >&5 -+ echo "$as_me:15905: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_pid_t=yes - else -@@ -15911,7 +15912,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:15914: result: $ac_cv_type_pid_t" >&5 -+echo "$as_me:15915: result: $ac_cv_type_pid_t" >&5 - echo "${ECHO_T}$ac_cv_type_pid_t" >&6 - if test $ac_cv_type_pid_t = yes; then - : -@@ -15926,23 +15927,23 @@ - for ac_header in unistd.h vfork.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:15929: checking for $ac_header" >&5 -+echo "$as_me:15930: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15935 "configure" -+#line 15936 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:15939: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:15940: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:15945: \$? = $ac_status" >&5 -+ echo "$as_me:15946: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -15961,7 +15962,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:15964: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:15965: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:15978: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 15983 "configure" -+#line 15984 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -@@ -16011,16 +16012,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:16014: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16015: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16017: \$? = $ac_status" >&5 -+ echo "$as_me:16018: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:16020: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16021: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16023: \$? = $ac_status" >&5 -+ echo "$as_me:16024: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" - else -@@ -16030,7 +16031,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:16033: result: `eval echo '${'$as_ac_var'}'`" >&5 -+echo "$as_me:16034: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <&5 -+ echo "$as_me:16046: checking for working fork" >&5 - echo $ECHO_N "checking for working fork... $ECHO_C" >&6 - if test "${ac_cv_func_fork_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16065,15 +16066,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:16068: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16069: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16071: \$? = $ac_status" >&5 -+ echo "$as_me:16072: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:16073: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16074: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16076: \$? = $ac_status" >&5 -+ echo "$as_me:16077: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fork_works=yes - else -@@ -16085,7 +16086,7 @@ - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi --echo "$as_me:16088: result: $ac_cv_func_fork_works" >&5 -+echo "$as_me:16089: result: $ac_cv_func_fork_works" >&5 - echo "${ECHO_T}$ac_cv_func_fork_works" >&6 - - fi -@@ -16099,12 +16100,12 @@ - ac_cv_func_fork_works=yes - ;; - esac -- { echo "$as_me:16102: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 -+ { echo "$as_me:16103: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 - echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;} - fi - ac_cv_func_vfork_works=$ac_cv_func_vfork - if test "x$ac_cv_func_vfork" = xyes; then -- echo "$as_me:16107: checking for working vfork" >&5 -+ echo "$as_me:16108: checking for working vfork" >&5 - echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 - if test "${ac_cv_func_vfork_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16113,7 +16114,7 @@ - ac_cv_func_vfork_works=cross - else - cat >conftest.$ac_ext <<_ACEOF --#line 16116 "configure" -+#line 16117 "configure" - #include "confdefs.h" - /* Thanks to Paul Eggert for this test. */ - #include -@@ -16210,15 +16211,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:16213: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16214: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16216: \$? = $ac_status" >&5 -+ echo "$as_me:16217: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:16218: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16219: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16221: \$? = $ac_status" >&5 -+ echo "$as_me:16222: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_vfork_works=yes - else -@@ -16230,13 +16231,13 @@ - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi --echo "$as_me:16233: result: $ac_cv_func_vfork_works" >&5 -+echo "$as_me:16234: result: $ac_cv_func_vfork_works" >&5 - echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 - - fi; - if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=ac_cv_func_vfork -- { echo "$as_me:16239: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 -+ { echo "$as_me:16240: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 - echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;} - fi - -@@ -16263,7 +16264,7 @@ - - # special check for test/ditto.c - --echo "$as_me:16266: checking for openpty in -lutil" >&5 -+echo "$as_me:16267: checking for openpty in -lutil" >&5 - echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 - if test "${ac_cv_lib_util_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16271,7 +16272,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lutil $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 16274 "configure" -+#line 16275 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -16290,16 +16291,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:16293: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16294: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16296: \$? = $ac_status" >&5 -+ echo "$as_me:16297: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:16299: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16300: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16302: \$? = $ac_status" >&5 -+ echo "$as_me:16303: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_util_openpty=yes - else -@@ -16310,7 +16311,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:16313: result: $ac_cv_lib_util_openpty" >&5 -+echo "$as_me:16314: result: $ac_cv_lib_util_openpty" >&5 - echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 - if test $ac_cv_lib_util_openpty = yes; then - cf_cv_lib_util=yes -@@ -16318,7 +16319,7 @@ - cf_cv_lib_util=no - fi - --echo "$as_me:16321: checking for openpty header" >&5 -+echo "$as_me:16322: checking for openpty header" >&5 - echo $ECHO_N "checking for openpty header... $ECHO_C" >&6 - if test "${cf_cv_func_openpty+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16329,7 +16330,7 @@ - for cf_header in pty.h libutil.h util.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 16332 "configure" -+#line 16333 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -16346,16 +16347,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:16349: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16350: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16352: \$? = $ac_status" >&5 -+ echo "$as_me:16353: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:16355: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16356: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16358: \$? = $ac_status" >&5 -+ echo "$as_me:16359: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_func_openpty=$cf_header -@@ -16373,7 +16374,7 @@ - LIBS="$cf_save_LIBS" - - fi --echo "$as_me:16376: result: $cf_cv_func_openpty" >&5 -+echo "$as_me:16377: result: $cf_cv_func_openpty" >&5 - echo "${ECHO_T}$cf_cv_func_openpty" >&6 - - if test "$cf_cv_func_openpty" != no ; then -@@ -16425,7 +16426,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 16428 "configure" -+#line 16429 "configure" - #include "confdefs.h" - #include - int -@@ -16437,16 +16438,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:16440: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:16441: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:16443: \$? = $ac_status" >&5 -+ echo "$as_me:16444: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:16446: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16447: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16449: \$? = $ac_status" >&5 -+ echo "$as_me:16450: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -16463,7 +16464,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:16466: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:16467: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -16497,7 +16498,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:16500: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:16501: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -16508,23 +16509,23 @@ - fi - esac - --echo "$as_me:16511: checking for db.h" >&5 -+echo "$as_me:16512: checking for db.h" >&5 - echo $ECHO_N "checking for db.h... $ECHO_C" >&6 - if test "${ac_cv_header_db_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 16517 "configure" -+#line 16518 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:16521: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:16522: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:16527: \$? = $ac_status" >&5 -+ echo "$as_me:16528: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -16543,11 +16544,11 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:16546: result: $ac_cv_header_db_h" >&5 -+echo "$as_me:16547: result: $ac_cv_header_db_h" >&5 - echo "${ECHO_T}$ac_cv_header_db_h" >&6 - if test $ac_cv_header_db_h = yes; then - --echo "$as_me:16550: checking for version of db" >&5 -+echo "$as_me:16551: checking for version of db" >&5 - echo $ECHO_N "checking for version of db... $ECHO_C" >&6 - if test "${cf_cv_hashed_db_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16558,10 +16559,10 @@ - for cf_db_version in 1 2 3 4 5 - do - --echo "${as_me:-configure}:16561: testing checking for db version $cf_db_version ..." 1>&5 -+echo "${as_me:-configure}:16562: testing checking for db version $cf_db_version ..." 1>&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 16564 "configure" -+#line 16565 "configure" - #include "confdefs.h" - - $ac_includes_default -@@ -16591,16 +16592,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:16594: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:16595: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:16597: \$? = $ac_status" >&5 -+ echo "$as_me:16598: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:16600: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16601: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16603: \$? = $ac_status" >&5 -+ echo "$as_me:16604: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_hashed_db_version=$cf_db_version -@@ -16614,16 +16615,16 @@ - done - - fi --echo "$as_me:16617: result: $cf_cv_hashed_db_version" >&5 -+echo "$as_me:16618: result: $cf_cv_hashed_db_version" >&5 - echo "${ECHO_T}$cf_cv_hashed_db_version" >&6 - - if test "$cf_cv_hashed_db_version" = unknown ; then -- { { echo "$as_me:16621: error: Cannot determine version of db" >&5 -+ { { echo "$as_me:16622: error: Cannot determine version of db" >&5 - echo "$as_me: error: Cannot determine version of db" >&2;} - { (exit 1); exit 1; }; } - else - --echo "$as_me:16626: checking for db libraries" >&5 -+echo "$as_me:16627: checking for db libraries" >&5 - echo $ECHO_N "checking for db libraries... $ECHO_C" >&6 - if test "${cf_cv_hashed_db_libs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16637,10 +16638,10 @@ - LIBS="-l$cf_db_libs $LIBS" - fi - --echo "${as_me:-configure}:16640: testing checking for library "$cf_db_libs" ..." 1>&5 -+echo "${as_me:-configure}:16641: testing checking for library "$cf_db_libs" ..." 1>&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 16643 "configure" -+#line 16644 "configure" - #include "confdefs.h" - - $ac_includes_default -@@ -16695,16 +16696,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:16698: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16699: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16701: \$? = $ac_status" >&5 -+ echo "$as_me:16702: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:16704: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16705: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16707: \$? = $ac_status" >&5 -+ echo "$as_me:16708: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - if test -n "$cf_db_libs" ; then -@@ -16724,11 +16725,11 @@ - done - - fi --echo "$as_me:16727: result: $cf_cv_hashed_db_libs" >&5 -+echo "$as_me:16728: result: $cf_cv_hashed_db_libs" >&5 - echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6 - - if test "$cf_cv_hashed_db_libs" = unknown ; then -- { { echo "$as_me:16731: error: Cannot determine library for db" >&5 -+ { { echo "$as_me:16732: error: Cannot determine library for db" >&5 - echo "$as_me: error: Cannot determine library for db" >&2;} - { (exit 1); exit 1; }; } - elif test "$cf_cv_hashed_db_libs" != default ; then -@@ -16738,7 +16739,7 @@ - - else - -- { { echo "$as_me:16741: error: Cannot find db.h" >&5 -+ { { echo "$as_me:16742: error: Cannot find db.h" >&5 - echo "$as_me: error: Cannot find db.h" >&2;} - { (exit 1); exit 1; }; } - -@@ -16753,7 +16754,7 @@ - - # Just in case, check if the C compiler has a bool type. - --echo "$as_me:16756: checking if we should include stdbool.h" >&5 -+echo "$as_me:16757: checking if we should include stdbool.h" >&5 - echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6 - - if test "${cf_cv_header_stdbool_h+set}" = set; then -@@ -16761,7 +16762,7 @@ - else - - cat >conftest.$ac_ext <<_ACEOF --#line 16764 "configure" -+#line 16765 "configure" - #include "confdefs.h" - - int -@@ -16773,23 +16774,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:16777: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:16779: \$? = $ac_status" >&5 -+ echo "$as_me:16780: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:16782: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16783: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16785: \$? = $ac_status" >&5 -+ echo "$as_me:16786: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_header_stdbool_h=0 - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 16792 "configure" -+#line 16793 "configure" - #include "confdefs.h" - - #ifndef __BEOS__ -@@ -16805,16 +16806,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:16808: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:16811: \$? = $ac_status" >&5 -+ echo "$as_me:16812: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:16814: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16815: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16817: \$? = $ac_status" >&5 -+ echo "$as_me:16818: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_header_stdbool_h=1 - else -@@ -16828,13 +16829,13 @@ - fi - - if test "$cf_cv_header_stdbool_h" = 1 --then echo "$as_me:16831: result: yes" >&5 -+then echo "$as_me:16832: result: yes" >&5 - echo "${ECHO_T}yes" >&6 --else echo "$as_me:16833: result: no" >&5 -+else echo "$as_me:16834: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - --echo "$as_me:16837: checking for builtin bool type" >&5 -+echo "$as_me:16838: checking for builtin bool type" >&5 - echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6 - - if test "${cf_cv_cc_bool_type+set}" = set; then -@@ -16842,7 +16843,7 @@ - else - - cat >conftest.$ac_ext <<_ACEOF --#line 16845 "configure" -+#line 16846 "configure" - #include "confdefs.h" - - #include -@@ -16857,16 +16858,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:16860: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:16861: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:16863: \$? = $ac_status" >&5 -+ echo "$as_me:16864: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:16866: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16867: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16869: \$? = $ac_status" >&5 -+ echo "$as_me:16870: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_cc_bool_type=1 - else -@@ -16879,9 +16880,9 @@ - fi - - if test "$cf_cv_cc_bool_type" = 1 --then echo "$as_me:16882: result: yes" >&5 -+then echo "$as_me:16883: result: yes" >&5 - echo "${ECHO_T}yes" >&6 --else echo "$as_me:16884: result: no" >&5 -+else echo "$as_me:16885: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -16903,7 +16904,7 @@ - cf_stdcpp_libname=stdc++ - ;; - esac --echo "$as_me:16906: checking for library $cf_stdcpp_libname" >&5 -+echo "$as_me:16907: checking for library $cf_stdcpp_libname" >&5 - echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6 - if test "${cf_cv_libstdcpp+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16912,7 +16913,7 @@ - cf_save="$LIBS" - LIBS="-l$cf_stdcpp_libname $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 16915 "configure" -+#line 16916 "configure" - #include "confdefs.h" - - #include -@@ -16928,16 +16929,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:16931: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:16932: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:16934: \$? = $ac_status" >&5 -+ echo "$as_me:16935: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:16937: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:16938: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16940: \$? = $ac_status" >&5 -+ echo "$as_me:16941: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_libstdcpp=yes - else -@@ -16949,12 +16950,12 @@ - LIBS="$cf_save" - - fi --echo "$as_me:16952: result: $cf_cv_libstdcpp" >&5 -+echo "$as_me:16953: result: $cf_cv_libstdcpp" >&5 - echo "${ECHO_T}$cf_cv_libstdcpp" >&6 - test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS" - fi - -- echo "$as_me:16957: checking whether $CXX understands -c and -o together" >&5 -+ echo "$as_me:16958: checking whether $CXX understands -c and -o together" >&5 - echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6 - if test "${cf_cv_prog_CXX_c_o+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -16970,15 +16971,15 @@ - # We do the test twice because some compilers refuse to overwrite an - # existing .o file with -o, though they will create one. - ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5' --if { (eval echo "$as_me:16973: \"$ac_try\"") >&5 -+if { (eval echo "$as_me:16974: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16976: \$? = $ac_status" >&5 -+ echo "$as_me:16977: \$? = $ac_status" >&5 - (exit $ac_status); } && -- test -f conftest2.$ac_objext && { (eval echo "$as_me:16978: \"$ac_try\"") >&5 -+ test -f conftest2.$ac_objext && { (eval echo "$as_me:16979: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:16981: \$? = $ac_status" >&5 -+ echo "$as_me:16982: \$? = $ac_status" >&5 - (exit $ac_status); }; - then - eval cf_cv_prog_CXX_c_o=yes -@@ -16989,10 +16990,10 @@ - - fi - if test $cf_cv_prog_CXX_c_o = yes; then -- echo "$as_me:16992: result: yes" >&5 -+ echo "$as_me:16993: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else -- echo "$as_me:16995: result: no" >&5 -+ echo "$as_me:16996: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -17012,12 +17013,12 @@ - ;; - esac - if test "$GXX" = yes; then -- echo "$as_me:17015: checking for lib$cf_gpp_libname" >&5 -+ echo "$as_me:17016: checking for lib$cf_gpp_libname" >&5 - echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6 - cf_save="$LIBS" - LIBS="-l$cf_gpp_libname $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 17020 "configure" -+#line 17021 "configure" - #include "confdefs.h" - - #include <$cf_gpp_libname/builtin.h> -@@ -17031,16 +17032,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:17034: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:17035: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:17037: \$? = $ac_status" >&5 -+ echo "$as_me:17038: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:17040: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17041: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17043: \$? = $ac_status" >&5 -+ echo "$as_me:17044: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cxx_library=yes - CXXLIBS="-l$cf_gpp_libname $CXXLIBS" -@@ -17059,7 +17060,7 @@ - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 17062 "configure" -+#line 17063 "configure" - #include "confdefs.h" - - #include -@@ -17073,16 +17074,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:17076: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:17077: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:17079: \$? = $ac_status" >&5 -+ echo "$as_me:17080: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:17082: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17083: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17085: \$? = $ac_status" >&5 -+ echo "$as_me:17086: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cxx_library=yes - CXXLIBS="-l$cf_gpp_libname $CXXLIBS" -@@ -17099,7 +17100,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS="$cf_save" -- echo "$as_me:17102: result: $cf_cxx_library" >&5 -+ echo "$as_me:17103: result: $cf_cxx_library" >&5 - echo "${ECHO_T}$cf_cxx_library" >&6 - fi - -@@ -17115,7 +17116,7 @@ - ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' - ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - ac_main_return=return --echo "$as_me:17118: checking how to run the C++ preprocessor" >&5 -+echo "$as_me:17119: checking how to run the C++ preprocessor" >&5 - echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 - if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then -@@ -17132,18 +17133,18 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line 17135 "configure" -+#line 17136 "configure" - #include "confdefs.h" - #include - Syntax error - _ACEOF --if { (eval echo "$as_me:17140: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:17141: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:17146: \$? = $ac_status" >&5 -+ echo "$as_me:17147: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -@@ -17166,17 +17167,17 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line 17169 "configure" -+#line 17170 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:17173: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:17174: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:17179: \$? = $ac_status" >&5 -+ echo "$as_me:17180: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -@@ -17213,7 +17214,7 @@ - else - ac_cv_prog_CXXCPP=$CXXCPP - fi --echo "$as_me:17216: result: $CXXCPP" >&5 -+echo "$as_me:17217: result: $CXXCPP" >&5 - echo "${ECHO_T}$CXXCPP" >&6 - ac_preproc_ok=false - for ac_cxx_preproc_warn_flag in '' yes -@@ -17223,18 +17224,18 @@ - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF --#line 17226 "configure" -+#line 17227 "configure" - #include "confdefs.h" - #include - Syntax error - _ACEOF --if { (eval echo "$as_me:17231: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:17232: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:17237: \$? = $ac_status" >&5 -+ echo "$as_me:17238: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -@@ -17257,17 +17258,17 @@ - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF --#line 17260 "configure" -+#line 17261 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:17264: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:17265: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:17270: \$? = $ac_status" >&5 -+ echo "$as_me:17271: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -@@ -17295,7 +17296,7 @@ - if $ac_preproc_ok; then - : - else -- { { echo "$as_me:17298: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 -+ { { echo "$as_me:17299: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 - echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -17310,23 +17311,23 @@ - for ac_header in iostream typeinfo - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:17313: checking for $ac_header" >&5 -+echo "$as_me:17314: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 17319 "configure" -+#line 17320 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:17323: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:17324: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:17329: \$? = $ac_status" >&5 -+ echo "$as_me:17330: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag -@@ -17345,7 +17346,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:17348: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:17349: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+ echo "$as_me:17360: checking if iostream uses std-namespace" >&5 - echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 17362 "configure" -+#line 17363 "configure" - #include "confdefs.h" - - #include -@@ -17376,16 +17377,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:17379: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:17380: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:17382: \$? = $ac_status" >&5 -+ echo "$as_me:17383: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:17385: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17386: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17388: \$? = $ac_status" >&5 -+ echo "$as_me:17389: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_iostream_namespace=yes - else -@@ -17394,7 +17395,7 @@ - cf_iostream_namespace=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext -- echo "$as_me:17397: result: $cf_iostream_namespace" >&5 -+ echo "$as_me:17398: result: $cf_iostream_namespace" >&5 - echo "${ECHO_T}$cf_iostream_namespace" >&6 - if test "$cf_iostream_namespace" = yes ; then - cat >>confdefs.h <<\EOF -@@ -17404,7 +17405,7 @@ - fi - fi - --echo "$as_me:17407: checking if we should include stdbool.h" >&5 -+echo "$as_me:17408: checking if we should include stdbool.h" >&5 - echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6 - - if test "${cf_cv_header_stdbool_h+set}" = set; then -@@ -17412,7 +17413,7 @@ - else - - cat >conftest.$ac_ext <<_ACEOF --#line 17415 "configure" -+#line 17416 "configure" - #include "confdefs.h" - - int -@@ -17424,23 +17425,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:17427: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:17428: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:17430: \$? = $ac_status" >&5 -+ echo "$as_me:17431: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:17433: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17434: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17436: \$? = $ac_status" >&5 -+ echo "$as_me:17437: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_header_stdbool_h=0 - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 17443 "configure" -+#line 17444 "configure" - #include "confdefs.h" - - #ifndef __BEOS__ -@@ -17456,16 +17457,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:17459: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:17460: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:17462: \$? = $ac_status" >&5 -+ echo "$as_me:17463: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:17465: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17466: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17468: \$? = $ac_status" >&5 -+ echo "$as_me:17469: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_header_stdbool_h=1 - else -@@ -17479,13 +17480,13 @@ - fi - - if test "$cf_cv_header_stdbool_h" = 1 --then echo "$as_me:17482: result: yes" >&5 -+then echo "$as_me:17483: result: yes" >&5 - echo "${ECHO_T}yes" >&6 --else echo "$as_me:17484: result: no" >&5 -+else echo "$as_me:17485: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - --echo "$as_me:17488: checking for builtin bool type" >&5 -+echo "$as_me:17489: checking for builtin bool type" >&5 - echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6 - - if test "${cf_cv_builtin_bool+set}" = set; then -@@ -17493,7 +17494,7 @@ - else - - cat >conftest.$ac_ext <<_ACEOF --#line 17496 "configure" -+#line 17497 "configure" - #include "confdefs.h" - - #include -@@ -17508,16 +17509,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:17511: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:17512: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:17514: \$? = $ac_status" >&5 -+ echo "$as_me:17515: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:17517: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17518: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17520: \$? = $ac_status" >&5 -+ echo "$as_me:17521: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_builtin_bool=1 - else -@@ -17530,13 +17531,13 @@ - fi - - if test "$cf_cv_builtin_bool" = 1 --then echo "$as_me:17533: result: yes" >&5 -+then echo "$as_me:17534: result: yes" >&5 - echo "${ECHO_T}yes" >&6 --else echo "$as_me:17535: result: no" >&5 -+else echo "$as_me:17536: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - --echo "$as_me:17539: checking for size of bool" >&5 -+echo "$as_me:17540: checking for size of bool" >&5 - echo $ECHO_N "checking for size of bool... $ECHO_C" >&6 - if test "${cf_cv_type_of_bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -17547,7 +17548,7 @@ - cf_cv_type_of_bool=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 17550 "configure" -+#line 17551 "configure" - #include "confdefs.h" - - #include -@@ -17589,15 +17590,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:17592: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:17593: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:17595: \$? = $ac_status" >&5 -+ echo "$as_me:17596: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:17597: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17598: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17600: \$? = $ac_status" >&5 -+ echo "$as_me:17601: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_type_of_bool=`cat cf_test.out` - if test -z "$cf_cv_type_of_bool"; then -@@ -17615,18 +17616,18 @@ - fi - - rm -f cf_test.out --echo "$as_me:17618: result: $cf_cv_type_of_bool" >&5 -+echo "$as_me:17619: result: $cf_cv_type_of_bool" >&5 - echo "${ECHO_T}$cf_cv_type_of_bool" >&6 - if test "$cf_cv_type_of_bool" = unknown ; then - case .$NCURSES_BOOL in #(vi - .auto|.) NCURSES_BOOL=unsigned;; - esac -- { echo "$as_me:17624: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 -+ { echo "$as_me:17625: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 - echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;} - cf_cv_type_of_bool=$NCURSES_BOOL - fi - --echo "$as_me:17629: checking for special defines needed for etip.h" >&5 -+echo "$as_me:17630: checking for special defines needed for etip.h" >&5 - echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6 - cf_save_CXXFLAGS="$CXXFLAGS" - cf_result="none" -@@ -17638,7 +17639,7 @@ - test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}" - test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}" - cat >conftest.$ac_ext <<_ACEOF --#line 17641 "configure" -+#line 17642 "configure" - #include "confdefs.h" - - #include -@@ -17652,16 +17653,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:17655: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:17656: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:17658: \$? = $ac_status" >&5 -+ echo "$as_me:17659: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:17661: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17662: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17664: \$? = $ac_status" >&5 -+ echo "$as_me:17665: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - test -n "$cf_math" && cat >>confdefs.h <&5 -+echo "$as_me:17686: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - CXXFLAGS="$cf_save_CXXFLAGS" - - if test -n "$CXX"; then --echo "$as_me:17690: checking if $CXX accepts parameter initialization" >&5 -+echo "$as_me:17691: checking if $CXX accepts parameter initialization" >&5 - echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6 - if test "${cf_cv_cpp_param_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -17704,7 +17705,7 @@ - cf_cv_cpp_param_init=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 17707 "configure" -+#line 17708 "configure" - #include "confdefs.h" - - class TEST { -@@ -17723,15 +17724,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:17726: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:17727: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:17729: \$? = $ac_status" >&5 -+ echo "$as_me:17730: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:17731: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17732: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17734: \$? = $ac_status" >&5 -+ echo "$as_me:17735: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_cpp_param_init=yes - else -@@ -17750,7 +17751,7 @@ - ac_main_return=return - - fi --echo "$as_me:17753: result: $cf_cv_cpp_param_init" >&5 -+echo "$as_me:17754: result: $cf_cv_cpp_param_init" >&5 - echo "${ECHO_T}$cf_cv_cpp_param_init" >&6 - fi - test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF -@@ -17759,7 +17760,7 @@ - - if test -n "$CXX"; then - --echo "$as_me:17762: checking if $CXX accepts static_cast" >&5 -+echo "$as_me:17763: checking if $CXX accepts static_cast" >&5 - echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6 - if test "${cf_cv_cpp_static_cast+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -17773,7 +17774,7 @@ - ac_main_return=return - - cat >conftest.$ac_ext <<_ACEOF --#line 17776 "configure" -+#line 17777 "configure" - #include "confdefs.h" - - class NCursesPanel -@@ -17817,16 +17818,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:17820: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:17821: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:17823: \$? = $ac_status" >&5 -+ echo "$as_me:17824: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:17826: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17827: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17829: \$? = $ac_status" >&5 -+ echo "$as_me:17830: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_cpp_static_cast=yes - else -@@ -17844,7 +17845,7 @@ - ac_main_return=return - - fi --echo "$as_me:17847: result: $cf_cv_cpp_static_cast" >&5 -+echo "$as_me:17848: result: $cf_cv_cpp_static_cast" >&5 - echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6 - - fi -@@ -17892,7 +17893,7 @@ - else - if test "$cf_cv_header_stdbool_h" = 1 ; then - --echo "$as_me:17895: checking for size of bool" >&5 -+echo "$as_me:17896: checking for size of bool" >&5 - echo $ECHO_N "checking for size of bool... $ECHO_C" >&6 - if test "${cf_cv_type_of_bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -17903,7 +17904,7 @@ - cf_cv_type_of_bool=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 17906 "configure" -+#line 17907 "configure" - #include "confdefs.h" - - #include -@@ -17945,15 +17946,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:17948: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:17949: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:17951: \$? = $ac_status" >&5 -+ echo "$as_me:17952: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:17953: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:17954: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:17956: \$? = $ac_status" >&5 -+ echo "$as_me:17957: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_type_of_bool=`cat cf_test.out` - if test -z "$cf_cv_type_of_bool"; then -@@ -17971,25 +17972,25 @@ - fi - - rm -f cf_test.out --echo "$as_me:17974: result: $cf_cv_type_of_bool" >&5 -+echo "$as_me:17975: result: $cf_cv_type_of_bool" >&5 - echo "${ECHO_T}$cf_cv_type_of_bool" >&6 - if test "$cf_cv_type_of_bool" = unknown ; then - case .$NCURSES_BOOL in #(vi - .auto|.) NCURSES_BOOL=unsigned;; - esac -- { echo "$as_me:17980: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 -+ { echo "$as_me:17981: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 - echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;} - cf_cv_type_of_bool=$NCURSES_BOOL - fi - - else -- echo "$as_me:17986: checking for fallback type of bool" >&5 -+ echo "$as_me:17987: checking for fallback type of bool" >&5 - echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6 - case "$host_cpu" in #(vi - i?86) cf_cv_type_of_bool=char ;; #(vi - *) cf_cv_type_of_bool=int ;; - esac -- echo "$as_me:17992: result: $cf_cv_type_of_bool" >&5 -+ echo "$as_me:17993: result: $cf_cv_type_of_bool" >&5 - echo "${ECHO_T}$cf_cv_type_of_bool" >&6 - fi - fi -@@ -18018,7 +18019,7 @@ - - if test "$cf_with_ada" != "no" ; then - if test "$with_libtool" != "no"; then -- { echo "$as_me:18021: WARNING: libtool does not support Ada - disabling feature" >&5 -+ { echo "$as_me:18022: WARNING: libtool does not support Ada - disabling feature" >&5 - echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;} - cf_with_ada=no - fi -@@ -18029,7 +18030,7 @@ - cf_ada_make=gnatmake - # Extract the first word of "$cf_ada_make", so it can be a program name with args. - set dummy $cf_ada_make; ac_word=$2 --echo "$as_me:18032: checking for $ac_word" >&5 -+echo "$as_me:18033: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_gnat_exists+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -18044,7 +18045,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_gnat_exists="yes" --echo "$as_me:18047: found $ac_dir/$ac_word" >&5 -+echo "$as_me:18048: found $ac_dir/$ac_word" >&5 - break - done - -@@ -18053,10 +18054,10 @@ - fi - gnat_exists=$ac_cv_prog_gnat_exists - if test -n "$gnat_exists"; then -- echo "$as_me:18056: result: $gnat_exists" >&5 -+ echo "$as_me:18057: result: $gnat_exists" >&5 - echo "${ECHO_T}$gnat_exists" >&6 - else -- echo "$as_me:18059: result: no" >&5 -+ echo "$as_me:18060: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -18064,12 +18065,12 @@ - cf_ada_make= - else - --echo "$as_me:18067: checking for gnat version" >&5 -+echo "$as_me:18068: checking for gnat version" >&5 - echo $ECHO_N "checking for gnat version... $ECHO_C" >&6 - cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \ - grep '[0-9].[0-9][0-9]*' |\ - sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` --echo "$as_me:18072: result: $cf_gnat_version" >&5 -+echo "$as_me:18073: result: $cf_gnat_version" >&5 - echo "${ECHO_T}$cf_gnat_version" >&6 - - case $cf_gnat_version in #(vi -@@ -18077,66 +18078,15 @@ - cf_cv_prog_gnat_correct=yes - ;; - *) -- { echo "$as_me:18080: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 -+ { echo "$as_me:18081: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5 - echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;} - cf_cv_prog_gnat_correct=no - ;; - esac - --echo "$as_me:18086: checking if GNAT supports generics" >&5 --echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6 --case $cf_gnat_version in #(vi --3.[1-9]*|[4-9].*) #(vi -- cf_gnat_generics=yes -- ;; --*) -- cf_gnat_generics=no -- ;; --esac --echo "$as_me:18096: result: $cf_gnat_generics" >&5 --echo "${ECHO_T}$cf_gnat_generics" >&6 -- --if test "$cf_gnat_generics" = yes --then -- cf_compile_generics=generics -- cf_generic_objects="\${GENOBJS}" --else -- cf_compile_generics= -- cf_generic_objects= --fi -- --echo "$as_me:18108: checking if GNAT supports project files" >&5 --echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6 --case $cf_gnat_version in #(vi --3.[0-9]*) #(vi -- cf_gnat_projects=no -- ;; --*) -- case $cf_cv_system_name in #(vi -- cygwin*) #(vi -- cf_gnat_projects=no -- ;; -- *) -- cf_gnat_projects=yes -- ;; -- esac -- ;; --esac --echo "$as_me:18125: result: $cf_gnat_projects" >&5 --echo "${ECHO_T}$cf_gnat_projects" >&6 -- --if test "$cf_gnat_projects" = yes --then -- USE_OLD_MAKERULES="#" -- USE_GNAT_PROJECTS="" --else -- USE_OLD_MAKERULES="" -- USE_GNAT_PROJECTS="#" --fi -- - # Extract the first word of "m4", so it can be a program name with args. - set dummy m4; ac_word=$2 --echo "$as_me:18139: checking for $ac_word" >&5 -+echo "$as_me:18089: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_prog_M4_exists+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -18151,7 +18101,7 @@ - test -z "$ac_dir" && ac_dir=. - $as_executable_p "$ac_dir/$ac_word" || continue - ac_cv_prog_M4_exists="yes" --echo "$as_me:18154: found $ac_dir/$ac_word" >&5 -+echo "$as_me:18104: found $ac_dir/$ac_word" >&5 - break - done - -@@ -18160,10 +18110,10 @@ - fi - M4_exists=$ac_cv_prog_M4_exists - if test -n "$M4_exists"; then -- echo "$as_me:18163: result: $M4_exists" >&5 -+ echo "$as_me:18113: result: $M4_exists" >&5 - echo "${ECHO_T}$M4_exists" >&6 - else -- echo "$as_me:18166: result: no" >&5 -+ echo "$as_me:18116: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -18172,10 +18122,10 @@ - echo Ada95 binding required program m4 not found. Ada95 binding disabled. - fi - if test "$cf_cv_prog_gnat_correct" = yes; then -- echo "$as_me:18175: checking if GNAT works" >&5 -+ echo "$as_me:18125: checking if GNAT works" >&5 - echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 - --rm -rf conftest* -+rm -rf conftest* *~conftest* - cat >>conftest.ads <&5 -+ echo "$as_me:18153: result: $cf_cv_prog_gnat_correct" >&5 - echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6 - fi - fi - - if test "$cf_cv_prog_gnat_correct" = yes; then - -- ADAFLAGS="$ADAFLAGS -O3 -gnatpn" -+ ADAFLAGS="$ADAFLAGS -gnatpn" -+ -+ # make ADAFLAGS consistent with CFLAGS -+ case "$CFLAGS" in -+ *-g*) -+ -+ ADAFLAGS="$ADAFLAGS -g" -+ -+ ;; -+ esac -+ case "$CFLAGS" in -+ *-O*) -+ -+ ADAFLAGS="$ADAFLAGS -O3" -+ -+ ;; -+ esac -+ -+echo "$as_me:18178: checking if GNAT supports generics" >&5 -+echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6 -+case $cf_gnat_version in #(vi -+3.[1-9]*|[4-9].*) #(vi -+ cf_gnat_generics=yes -+ ;; -+*) -+ cf_gnat_generics=no -+ ;; -+esac -+echo "$as_me:18188: result: $cf_gnat_generics" >&5 -+echo "${ECHO_T}$cf_gnat_generics" >&6 -+ -+if test "$cf_gnat_generics" = yes -+then -+ cf_compile_generics=generics -+ cf_generic_objects="\${GENOBJS}" -+else -+ cf_compile_generics= -+ cf_generic_objects= -+fi -+ -+echo "$as_me:18200: checking if GNAT supports SIGINT" >&5 -+echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6 -+if test "${cf_cv_gnat_sigint+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+rm -rf conftest* *~conftest* -+cat >>conftest.ads <>conftest.adb <&5 2>&1 ) ; then -+ cf_cv_gnat_sigint=yes -+else -+ cf_cv_gnat_sigint=no -+fi -+rm -rf conftest* *~conftest* -+ -+fi -+echo "$as_me:18248: result: $cf_cv_gnat_sigint" >&5 -+echo "${ECHO_T}$cf_cv_gnat_sigint" >&6 -+ -+if test $cf_cv_gnat_sigint = yes ; then -+ USE_GNAT_SIGINT="" -+else -+ USE_GNAT_SIGINT="#" -+fi - --echo "$as_me:18212: checking if GNAT pragma Unreferenced works" >&5 -+echo "$as_me:18257: checking if GNAT pragma Unreferenced works" >&5 - echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6 - if test "${cf_cv_pragma_unreferenced+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - --rm -rf conftest* -+rm -rf conftest* *~conftest* - cat >>conftest.ads <&5 -+echo "$as_me:18288: result: $cf_cv_pragma_unreferenced" >&5 - echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6 - - # if the pragma is supported, use it (needed in the Trace code). -@@ -18250,7 +18295,105 @@ - PRAGMA_UNREF=FALSE - fi - --echo "$as_me:18253: checking for ada-compiler" >&5 -+cf_gnat_libraries=no -+cf_gnat_projects=no -+ -+echo "$as_me:18301: checking if GNAT supports project files" >&5 -+echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6 -+case $cf_gnat_version in #(vi -+3.[0-9]*) #(vi -+ ;; -+*) -+ case $cf_cv_system_name in #(vi -+ cygwin*) #(vi -+ ;; -+ *) -+ mkdir conftest.src conftest.bin conftest.lib -+ cd conftest.src -+ rm -rf conftest* *~conftest* -+ cat >>library.gpr <>confpackage.ads <>confpackage.adb <&5 2>&1 ) ; then -+ cf_gnat_projects=yes -+ fi -+ cd .. -+ if test -f conftest.lib/confpackage.ali -+ then -+ cf_gnat_libraries=yes -+ fi -+ rm -rf conftest* *~conftest* -+ ;; -+ esac -+ ;; -+esac -+echo "$as_me:18369: result: $cf_gnat_projects" >&5 -+echo "${ECHO_T}$cf_gnat_projects" >&6 -+ -+if test $cf_gnat_projects = yes -+then -+ echo "$as_me:18374: checking if GNAT supports libraries" >&5 -+echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6 -+ echo "$as_me:18376: result: $cf_gnat_libraries" >&5 -+echo "${ECHO_T}$cf_gnat_libraries" >&6 -+fi -+ -+if test "$cf_gnat_projects" = yes -+then -+ USE_OLD_MAKERULES="#" -+ USE_GNAT_PROJECTS="" -+else -+ USE_OLD_MAKERULES="" -+ USE_GNAT_PROJECTS="#" -+fi -+ -+if test "$cf_gnat_libraries" = yes -+then -+ USE_GNAT_LIBRARIES="" -+else -+ USE_GNAT_LIBRARIES="#" -+fi -+ -+echo "$as_me:18396: checking for ada-compiler" >&5 - echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6 - - # Check whether --with-ada-compiler or --without-ada-compiler was given. -@@ -18261,12 +18404,12 @@ - cf_ada_compiler=gnatmake - fi; - --echo "$as_me:18264: result: $cf_ada_compiler" >&5 -+echo "$as_me:18407: result: $cf_ada_compiler" >&5 - echo "${ECHO_T}$cf_ada_compiler" >&6 - - cf_ada_package=terminal_interface - --echo "$as_me:18269: checking for ada-include" >&5 -+echo "$as_me:18412: checking for ada-include" >&5 - echo $ECHO_N "checking for ada-include... $ECHO_C" >&6 - - # Check whether --with-ada-include or --without-ada-include was given. -@@ -18302,7 +18445,7 @@ - withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:18305: error: expected a pathname, not \"$withval\"" >&5 -+ { { echo "$as_me:18448: error: expected a pathname, not \"$withval\"" >&5 - echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -18311,10 +18454,10 @@ - fi - ADA_INCLUDE="$withval" - --echo "$as_me:18314: result: $ADA_INCLUDE" >&5 -+echo "$as_me:18457: result: $ADA_INCLUDE" >&5 - echo "${ECHO_T}$ADA_INCLUDE" >&6 - --echo "$as_me:18317: checking for ada-objects" >&5 -+echo "$as_me:18460: checking for ada-objects" >&5 - echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6 - - # Check whether --with-ada-objects or --without-ada-objects was given. -@@ -18350,7 +18493,7 @@ - withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:18353: error: expected a pathname, not \"$withval\"" >&5 -+ { { echo "$as_me:18496: error: expected a pathname, not \"$withval\"" >&5 - echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -18359,10 +18502,10 @@ - fi - ADA_OBJECTS="$withval" - --echo "$as_me:18362: result: $ADA_OBJECTS" >&5 -+echo "$as_me:18505: result: $ADA_OBJECTS" >&5 - echo "${ECHO_T}$ADA_OBJECTS" >&6 - --echo "$as_me:18365: checking if an Ada95 shared-library should be built" >&5 -+echo "$as_me:18508: checking if an Ada95 shared-library should be built" >&5 - echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6 - - # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given. -@@ -18372,7 +18515,7 @@ - else - with_ada_sharedlib=no - fi; --echo "$as_me:18375: result: $with_ada_sharedlib" >&5 -+echo "$as_me:18518: result: $with_ada_sharedlib" >&5 - echo "${ECHO_T}$with_ada_sharedlib" >&6 - - ADA_SHAREDLIB='lib$(LIB_NAME).so.1' -@@ -18403,7 +18546,7 @@ - ### chooses to split module lists into libraries. - ### - ### (see CF_LIB_RULES). --echo "$as_me:18406: checking for library subsets" >&5 -+echo "$as_me:18549: checking for library subsets" >&5 - echo $ECHO_N "checking for library subsets... $ECHO_C" >&6 - LIB_SUBSETS= - -@@ -18444,7 +18587,7 @@ - test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar" - test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" - --echo "$as_me:18447: result: $LIB_SUBSETS" >&5 -+echo "$as_me:18590: result: $LIB_SUBSETS" >&5 - echo "${ECHO_T}$LIB_SUBSETS" >&6 - - ### Construct the list of include-directories to be generated -@@ -18482,7 +18625,7 @@ - fi - - ### Build up pieces for makefile rules --echo "$as_me:18485: checking default library suffix" >&5 -+echo "$as_me:18628: checking default library suffix" >&5 - echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 - - case $DFT_LWR_MODEL in -@@ -18493,10 +18636,10 @@ - shared) DFT_ARG_SUFFIX='' ;; - esac - test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" --echo "$as_me:18496: result: $DFT_ARG_SUFFIX" >&5 -+echo "$as_me:18639: result: $DFT_ARG_SUFFIX" >&5 - echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 - --echo "$as_me:18499: checking default library-dependency suffix" >&5 -+echo "$as_me:18642: checking default library-dependency suffix" >&5 - echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 - - case $DFT_LWR_MODEL in #(vi -@@ -18549,10 +18692,10 @@ - esac - test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}" - test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}" --echo "$as_me:18552: result: $DFT_DEP_SUFFIX" >&5 -+echo "$as_me:18695: result: $DFT_DEP_SUFFIX" >&5 - echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 - --echo "$as_me:18555: checking default object directory" >&5 -+echo "$as_me:18698: checking default object directory" >&5 - echo $ECHO_N "checking default object directory... $ECHO_C" >&6 - - case $DFT_LWR_MODEL in -@@ -18568,12 +18711,12 @@ - DFT_OBJ_SUBDIR='obj_s' ;; - esac - esac --echo "$as_me:18571: result: $DFT_OBJ_SUBDIR" >&5 -+echo "$as_me:18714: result: $DFT_OBJ_SUBDIR" >&5 - echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6 - - # libtool thinks it can make c++ shared libraries (perhaps only g++) - if test "$cf_with_cxx" = yes ; then --echo "$as_me:18576: checking c++ library-dependency suffix" >&5 -+echo "$as_me:18719: checking c++ library-dependency suffix" >&5 - echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6 - if test "$with_libtool" != "no"; then - CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX -@@ -18630,7 +18773,7 @@ - test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}" - test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}" - fi --echo "$as_me:18633: result: $CXX_LIB_SUFFIX" >&5 -+echo "$as_me:18776: result: $CXX_LIB_SUFFIX" >&5 - echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6 - - fi -@@ -18784,19 +18927,19 @@ - - if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED" - then -- echo "$as_me:18787: checking if linker supports switching between static/dynamic" >&5 -+ echo "$as_me:18930: checking if linker supports switching between static/dynamic" >&5 - echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6 - - rm -f libconftest.a - cat >conftest.$ac_ext < - int cf_ldflags_static(FILE *fp) { return fflush(fp); } - EOF -- if { (eval echo "$as_me:18796: \"$ac_compile\"") >&5 -+ if { (eval echo "$as_me:18939: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:18799: \$? = $ac_status" >&5 -+ echo "$as_me:18942: \$? = $ac_status" >&5 - (exit $ac_status); } ; then - ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null - ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null -@@ -18807,10 +18950,10 @@ - - LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 18810 "configure" -+#line 18953 "configure" - #include "confdefs.h" - --#line 18813 "configure" -+#line 18956 "configure" - #include - int cf_ldflags_static(FILE *fp); - -@@ -18825,16 +18968,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:18828: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:18971: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:18831: \$? = $ac_status" >&5 -+ echo "$as_me:18974: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:18834: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:18977: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:18837: \$? = $ac_status" >&5 -+ echo "$as_me:18980: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_ldflags_static=yes - else -@@ -18847,7 +18990,7 @@ - rm -f libconftest.* - LIBS="$cf_save_LIBS" - -- echo "$as_me:18850: result: $cf_ldflags_static" >&5 -+ echo "$as_me:18993: result: $cf_ldflags_static" >&5 - echo "${ECHO_T}$cf_ldflags_static" >&6 - - if test $cf_ldflags_static != yes -@@ -18863,12 +19006,12 @@ - ;; - esac - --echo "$as_me:18866: checking where we will install curses.h" >&5 -+echo "$as_me:19009: checking where we will install curses.h" >&5 - echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6 - test "$with_overwrite" = no && \ - test "x$includedir" = 'x${prefix}/include' && \ - includedir='${prefix}/include/ncurses'${LIB_SUFFIX} --echo "$as_me:18871: result: $includedir" >&5 -+echo "$as_me:19014: result: $includedir" >&5 - echo "${ECHO_T}$includedir" >&6 - - ### Resolve a conflict between normal and wide-curses by forcing applications -@@ -18876,7 +19019,7 @@ - if test "$with_overwrite" != no ; then - if test "$NCURSES_LIBUTF8" = 1 ; then - NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' -- { echo "$as_me:18879: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 -+ { echo "$as_me:19022: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 - echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;} - fi - fi -@@ -18893,7 +19036,7 @@ - ### Construct the list of subdirectories for which we'll customize makefiles - ### with the appropriate compile-rules. - --echo "$as_me:18896: checking for src modules" >&5 -+echo "$as_me:19039: checking for src modules" >&5 - echo $ECHO_N "checking for src modules... $ECHO_C" >&6 - - # dependencies and linker-arguments for test-programs -@@ -18956,7 +19099,7 @@ - fi - fi - done --echo "$as_me:18959: result: $cf_cv_src_modules" >&5 -+echo "$as_me:19102: result: $cf_cv_src_modules" >&5 - echo "${ECHO_T}$cf_cv_src_modules" >&6 - - TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" -@@ -19162,7 +19305,7 @@ - - # Extract the first word of "tic", so it can be a program name with args. - set dummy tic; ac_word=$2 --echo "$as_me:19165: checking for $ac_word" >&5 -+echo "$as_me:19308: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_TIC_PATH+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -19179,7 +19322,7 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_TIC_PATH="$ac_dir/$ac_word" -- echo "$as_me:19182: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:19325: found $ac_dir/$ac_word" >&5 - break - fi - done -@@ -19191,10 +19334,10 @@ - TIC_PATH=$ac_cv_path_TIC_PATH - - if test -n "$TIC_PATH"; then -- echo "$as_me:19194: result: $TIC_PATH" >&5 -+ echo "$as_me:19337: result: $TIC_PATH" >&5 - echo "${ECHO_T}$TIC_PATH" >&6 - else -- echo "$as_me:19197: result: no" >&5 -+ echo "$as_me:19340: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -19202,7 +19345,7 @@ - then - if test "$TIC_PATH" = unknown - then -- { echo "$as_me:19205: WARNING: no tic program found for fallbacks" >&5 -+ { echo "$as_me:19348: WARNING: no tic program found for fallbacks" >&5 - echo "$as_me: WARNING: no tic program found for fallbacks" >&2;} - fi - fi -@@ -19213,6 +19356,8 @@ - MAKE_TESTS="#" - fi - -+ADAHTML_DIR=../../doc/html/ada -+ - SUB_SCRIPTS= - case $cf_cv_system_name in #(vi - *mingw32*) #(vi -@@ -19301,7 +19446,7 @@ - : ${CONFIG_STATUS=./config.status} - ac_clean_files_save=$ac_clean_files - ac_clean_files="$ac_clean_files $CONFIG_STATUS" --{ echo "$as_me:19304: creating $CONFIG_STATUS" >&5 -+{ echo "$as_me:19449: creating $CONFIG_STATUS" >&5 - echo "$as_me: creating $CONFIG_STATUS" >&6;} - cat >$CONFIG_STATUS <<_ACEOF - #! $SHELL -@@ -19477,7 +19622,7 @@ - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header -- { { echo "$as_me:19480: error: ambiguous option: $1 -+ { { echo "$as_me:19625: error: ambiguous option: $1 - Try \`$0 --help' for more information." >&5 - echo "$as_me: error: ambiguous option: $1 - Try \`$0 --help' for more information." >&2;} -@@ -19496,7 +19641,7 @@ - ac_need_defaults=false;; - - # This is an error. -- -*) { { echo "$as_me:19499: error: unrecognized option: $1 -+ -*) { { echo "$as_me:19644: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&5 - echo "$as_me: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&2;} -@@ -19602,7 +19747,7 @@ - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; -- *) { { echo "$as_me:19605: error: invalid argument: $ac_config_target" >&5 -+ *) { { echo "$as_me:19750: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -@@ -19847,13 +19992,15 @@ - s,@CXXLIBS@,$CXXLIBS,;t t - s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t - s,@gnat_exists@,$gnat_exists,;t t -+s,@M4_exists@,$M4_exists,;t t -+s,@cf_ada_make@,$cf_ada_make,;t t - s,@cf_compile_generics@,$cf_compile_generics,;t t - s,@cf_generic_objects@,$cf_generic_objects,;t t -+s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t -+s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t - s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t - s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t --s,@M4_exists@,$M4_exists,;t t --s,@cf_ada_make@,$cf_ada_make,;t t --s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t -+s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t - s,@cf_ada_compiler@,$cf_ada_compiler,;t t - s,@cf_ada_package@,$cf_ada_package,;t t - s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t -@@ -19895,6 +20042,7 @@ - s,@cross_compiling@,$cross_compiling,;t t - s,@TIC_PATH@,$TIC_PATH,;t t - s,@MAKE_TESTS@,$MAKE_TESTS,;t t -+s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t - CEOF - - EOF -@@ -20009,7 +20157,7 @@ - esac - - if test x"$ac_file" != x-; then -- { echo "$as_me:20012: creating $ac_file" >&5 -+ { echo "$as_me:20160: creating $ac_file" >&5 - echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi -@@ -20027,7 +20175,7 @@ - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:20030: error: cannot find input file: $f" >&5 -+ test -f "$f" || { { echo "$as_me:20178: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; -@@ -20040,7 +20188,7 @@ - echo $srcdir/$f - else - # /dev/null tree -- { { echo "$as_me:20043: error: cannot find input file: $f" >&5 -+ { { echo "$as_me:20191: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; -@@ -20106,7 +20254,7 @@ - * ) ac_file_in=$ac_file.in ;; - esac - -- test x"$ac_file" != x- && { echo "$as_me:20109: creating $ac_file" >&5 -+ test x"$ac_file" != x- && { echo "$as_me:20257: creating $ac_file" >&5 - echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the -@@ -20117,7 +20265,7 @@ - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:20120: error: cannot find input file: $f" >&5 -+ test -f "$f" || { { echo "$as_me:20268: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; -@@ -20130,7 +20278,7 @@ - echo $srcdir/$f - else - # /dev/null tree -- { { echo "$as_me:20133: error: cannot find input file: $f" >&5 -+ { { echo "$as_me:20281: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; -@@ -20188,7 +20336,7 @@ - rm -f $tmp/in - if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then -- { echo "$as_me:20191: $ac_file is unchanged" >&5 -+ { echo "$as_me:20339: $ac_file is unchanged" >&5 - echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -diff -Naur ncurses-5.8/configure.in ncurses-5.8-20110402/configure.in ---- ncurses-5.8/configure.in 2010-11-28 01:12:45.000000000 +0100 -+++ ncurses-5.8-20110402/configure.in 2011-03-28 02:22:26.000000000 +0200 -@@ -1,5 +1,5 @@ - dnl*************************************************************************** --dnl Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * -+dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. * - dnl * - dnl Permission is hereby granted, free of charge, to any person obtaining a * - dnl copy of this software and associated documentation files (the * -@@ -28,14 +28,14 @@ - dnl - dnl Author: Thomas E. Dickey 1995-on - dnl --dnl $Id: configure.in,v 1.514 2010/11/28 00:12:45 tom Exp $ -+dnl $Id: configure.in,v 1.520 2011/03/28 00:22:26 tom Exp $ - dnl Process this file with autoconf to produce a configure script. - dnl - dnl See http://invisible-island.net/autoconf/ for additional information. - dnl - dnl --------------------------------------------------------------------------- - AC_PREREQ(2.13.20020210) --AC_REVISION($Revision: 1.514 $) -+AC_REVISION($Revision: 1.520 $) - AC_INIT(ncurses/base/lib_initscr.c) - AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) - -@@ -1330,6 +1330,7 @@ - getopt.h \ - limits.h \ - locale.h \ -+math.h \ - poll.h \ - sys/bsdtypes.h \ - sys/ioctl.h \ -@@ -1593,9 +1594,24 @@ - if test "$cf_with_ada" != "no" ; then - CF_PROG_GNAT - if test "$cf_cv_prog_gnat_correct" = yes; then -- CF_ADD_ADAFLAGS(-O3 -gnatpn) -+ CF_ADD_ADAFLAGS(-gnatpn) - -+ # make ADAFLAGS consistent with CFLAGS -+ case "$CFLAGS" in -+ *-g*) -+ CF_ADD_ADAFLAGS(-g) -+ ;; -+ esac -+ case "$CFLAGS" in -+ *-O*) -+ CF_ADD_ADAFLAGS(-O3) -+ ;; -+ esac -+ -+ CF_GNAT_GENERICS -+ CF_GNAT_SIGINT - CF_GNAT_PRAGMA_UNREF -+ CF_GNAT_PROJECTS - - CF_WITH_ADA_COMPILER - -@@ -1898,6 +1914,9 @@ - fi - AC_SUBST(MAKE_TESTS) - -+ADAHTML_DIR=../../doc/html/ada -+AC_SUBST(ADAHTML_DIR) -+ - SUB_SCRIPTS= - case $cf_cv_system_name in #(vi - *mingw32*) #(vi -diff -Naur ncurses-5.8/dist.mk ncurses-5.8-20110402/dist.mk ---- ncurses-5.8/dist.mk 2011-02-25 23:11:00.000000000 +0100 -+++ ncurses-5.8-20110402/dist.mk 2011-03-31 02:42:12.000000000 +0200 -@@ -25,7 +25,7 @@ - # use or other dealings in this Software without prior written # - # authorization. # - ############################################################################## --# $Id: dist.mk,v 1.800 2011/02/25 22:11:00 tom Exp $ -+# $Id: dist.mk,v 1.808 2011/03/31 00:42:12 tom Exp $ - # Makefile for creating ncurses distributions. - # - # This only needs to be used directly as a makefile by developers, but -@@ -37,7 +37,7 @@ - # These define the major/minor/patch versions of ncurses. - NCURSES_MAJOR = 5 - NCURSES_MINOR = 8 --NCURSES_PATCH = 20110226 -+NCURSES_PATCH = 20110402 - - # We don't append the patch to the version, since this only applies to releases - VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) -diff -Naur ncurses-5.8/doc/html/ada/funcs/A.htm ncurses-5.8-20110402/doc/html/ada/funcs/A.htm ---- ncurses-5.8/doc/html/ada/funcs/A.htm 2008-10-11 23:36:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/A.htm 2011-03-20 00:18:38.000000000 +0100 -@@ -5,20 +5,20 @@ - [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/B.htm ncurses-5.8-20110402/doc/html/ada/funcs/B.htm ---- ncurses-5.8/doc/html/ada/funcs/B.htm 2007-09-02 01:56:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/B.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -4,18 +4,18 @@ -

Functions - B

- [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/C.htm ncurses-5.8-20110402/doc/html/ada/funcs/C.htm ---- ncurses-5.8/doc/html/ada/funcs/C.htm 2011-02-26 00:43:48.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/C.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -5,46 +5,46 @@ - [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/H.htm ncurses-5.8-20110402/doc/html/ada/funcs/H.htm ---- ncurses-5.8/doc/html/ada/funcs/H.htm 2008-10-11 23:36:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/H.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -5,18 +5,18 @@ - [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/I.htm ncurses-5.8-20110402/doc/html/ada/funcs/I.htm ---- ncurses-5.8/doc/html/ada/funcs/I.htm 2008-10-11 23:36:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/I.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -6,40 +6,40 @@ - -diff -Naur ncurses-5.8/doc/html/ada/funcs/L.htm ncurses-5.8-20110402/doc/html/ada/funcs/L.htm ---- ncurses-5.8/doc/html/ada/funcs/L.htm 2007-09-02 01:56:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/L.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -4,17 +4,17 @@ -

Functions - L

- [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/M.htm ncurses-5.8-20110402/doc/html/ada/funcs/M.htm ---- ncurses-5.8/doc/html/ada/funcs/M.htm 2008-10-11 23:36:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/M.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -5,8 +5,8 @@ - [index] -
    -
  • Make_Arg --
  • Mark - terminal_interface-curses-menus.ads:409 -
  • Mark - terminal_interface-curses-menus.ads:413 -+
  • Mark - terminal_interface-curses-menus.ads:417 -
  • Menu_Back - terminal_interface-curses-menus.adb:608 -
  • Menu_Back - terminal_interface-curses-menus.adb:618 -
  • Menu_Fmt -@@ -27,14 +27,14 @@ -
  • MMask -
  • Mouseinterval -
  • Mouse_Avail --
  • Mouse_Interval --
  • Move - terminal_interface-curses-forms.ads:612 -+
  • Mouse_Interval -+
  • Move - terminal_interface-curses-forms.ads:616 -
  • Move - terminal_interface-curses-panels.ads:117 -
  • Move - terminal_interface-curses-forms.adb:786 -
  • Move - terminal_interface-curses-panels.adb:132 --
  • Move_Cursor --
  • Move_Derived_Window --
  • Move_Window -+
  • Move_Cursor -+
  • Move_Derived_Window -+
  • Move_Window -
  • Mvderwin -
  • mvwaddch -
  • Mvwdelch -diff -Naur ncurses-5.8/doc/html/ada/funcs/N.htm ncurses-5.8-20110402/doc/html/ada/funcs/N.htm ---- ncurses-5.8/doc/html/ada/funcs/N.htm 2008-10-11 23:36:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/N.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -4,10 +4,10 @@ -

    Functions - N

    - [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/O.htm ncurses-5.8-20110402/doc/html/ada/funcs/O.htm ---- ncurses-5.8/doc/html/ada/funcs/O.htm 2007-09-02 01:56:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/O.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -5,8 +5,8 @@ - [index] - -diff -Naur ncurses-5.8/doc/html/ada/funcs/P.htm ncurses-5.8-20110402/doc/html/ada/funcs/P.htm ---- ncurses-5.8/doc/html/ada/funcs/P.htm 2011-02-26 00:43:48.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/funcs/P.htm 2011-03-26 22:54:28.000000000 +0100 -@@ -4,29 +4,29 @@ -

    Functions - P

    - [index] - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses__adb.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses__adb.htm 2011-03-26 22:54:31.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.6 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.8 @ -+-- @Date: 2011/03/22 23:02:14 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with System; -@@ -60,23 +60,23 @@ - package ASF renames Ada.Strings.Fixed; - - type chtype_array is array (size_t range <>) -- of aliased Attributed_Character; -+ of aliased Attributed_Character; - pragma Convention (C, chtype_array); - - ------------------------------------------------------------------------------ -- function Key_Name (Key : Real_Key_Code) return String -+ function Key_Name (Key : Real_Key_Code) return String - is - function Keyname (K : C_Int) return chars_ptr; - pragma Import (C, Keyname, "keyname"); - - Ch : Character; - begin -- if Key <= Character'Pos (Character'Last) then -- Ch := Character'Val (Key); -+ if Key <= Character'Pos (Character'Last) then -+ Ch := Character'Val (Key); - if Is_Control (Ch) then -- return Un_Control (Attributed_Character'(Ch => Ch, -- Color => Color_Pair'First, -- Attr => Normal_Video)); -+ return Un_Control (Attributed_Character'(Ch => Ch, -+ Color => Color_Pair'First, -+ Attr => Normal_Video)); - elsif Is_Graphic (Ch) then - declare - S : String (1 .. 1); -@@ -88,19 +88,19 @@ - return ""; - end if; - else -- return Fill_String (Keyname (C_Int (Key))); -+ return Fill_String (Keyname (C_Int (Key))); - end if; -- end Key_Name; -+ end Key_Name; - -- procedure Key_Name (Key : Real_Key_Code; -- Name : out String) -+ procedure Key_Name (Key : Real_Key_Code; -+ Name : out String) - is - begin -- ASF.Move (Key_Name (Key), Name); -- end Key_Name; -+ ASF.Move (Key_Name (Key), Name); -+ end Key_Name; - - ------------------------------------------------------------------------------ -- procedure Init_Screen -+ procedure Init_Screen - is - function Initscr return Window; - pragma Import (C, Initscr, "initscr"); -@@ -109,21 +109,21 @@ - begin - W := Initscr; - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Init_Screen; -+ end Init_Screen; - -- procedure End_Windows -+ procedure End_Windows - is - function Endwin return C_Int; - pragma Import (C, Endwin, "endwin"); - begin - if Endwin = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end End_Windows; -+ end End_Windows; - -- function Is_End_Window return Boolean -+ function Is_End_Window return Boolean - is - function Isendwin return Curses_Bool; - pragma Import (C, Isendwin, "isendwin"); -@@ -133,11 +133,11 @@ - else - return True; - end if; -- end Is_End_Window; -+ end Is_End_Window; - ------------------------------------------------------------------------------ -- procedure Move_Cursor (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position) -+ procedure Move_Cursor (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position) - is - function Wmove (Win : Window; - Line : C_Int; -@@ -145,38 +145,38 @@ - ) return C_Int; - pragma Import (C, Wmove, "wmove"); - begin -- if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -- raise Curses_Exception; -+ if Wmove (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Move_Cursor; -+ end Move_Cursor; - ------------------------------------------------------------------------------ -- procedure Add (Win : Window := Standard_Window; -- Ch : Attributed_Character) -+ procedure Add (Win : Window := Standard_Window; -+ Ch : Attributed_Character) - is - function Waddch (W : Window; - Ch : C_Chtype) return C_Int; - pragma Import (C, Waddch, "waddch"); - begin -- if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -+ if Waddch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Add; -+ end Add; - -- procedure Add (Win : Window := Standard_Window; -- Ch : Character) -+ procedure Add (Win : Window := Standard_Window; -+ Ch : Character) - is - begin -- Add (Win, -- Attributed_Character'(Ch => Ch, -- Color => Color_Pair'First, -- Attr => Normal_Video)); -- end Add; -- -- procedure Add -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Ch : Attributed_Character) -+ Add (Win, -+ Attributed_Character'(Ch => Ch, -+ Color => Color_Pair'First, -+ Attr => Normal_Video)); -+ end Add; -+ -+ procedure Add -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Ch : Attributed_Character) - is - function mvwaddch (W : Window; - Y : C_Int; -@@ -184,57 +184,57 @@ - Ch : C_Chtype) return C_Int; - pragma Import (C, mvwaddch, "mvwaddch"); - begin -- if mvwaddch (Win, C_Int (Line), -- C_Int (Column), -- AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Add; -- -- procedure Add -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Ch : Character) -- is -- begin -- Add (Win, -- Line, -- Column, -- Attributed_Character'(Ch => Ch, -- Color => Color_Pair'First, -- Attr => Normal_Video)); -- end Add; -- -- procedure Add_With_Immediate_Echo -- (Win : Window := Standard_Window; -- Ch : Attributed_Character) -+ if mvwaddch (Win, C_Int (Line), -+ C_Int (Column), -+ AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Add; -+ -+ procedure Add -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Ch : Character) -+ is -+ begin -+ Add (Win, -+ Line, -+ Column, -+ Attributed_Character'(Ch => Ch, -+ Color => Color_Pair'First, -+ Attr => Normal_Video)); -+ end Add; -+ -+ procedure Add_With_Immediate_Echo -+ (Win : Window := Standard_Window; -+ Ch : Attributed_Character) - is - function Wechochar (W : Window; - Ch : C_Chtype) return C_Int; - pragma Import (C, Wechochar, "wechochar"); - begin -- if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -+ if Wechochar (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Add_With_Immediate_Echo; -+ end Add_With_Immediate_Echo; - -- procedure Add_With_Immediate_Echo -- (Win : Window := Standard_Window; -- Ch : Character) -- is -- begin -- Add_With_Immediate_Echo -- (Win, -- Attributed_Character'(Ch => Ch, -- Color => Color_Pair'First, -- Attr => Normal_Video)); -- end Add_With_Immediate_Echo; -------------------------------------------------------------------------------- -- function Create (Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window -+ procedure Add_With_Immediate_Echo -+ (Win : Window := Standard_Window; -+ Ch : Character) -+ is -+ begin -+ Add_With_Immediate_Echo -+ (Win, -+ Attributed_Character'(Ch => Ch, -+ Color => Color_Pair'First, -+ Attr => Normal_Video)); -+ end Add_With_Immediate_Echo; -+------------------------------------------------------------------------------ -+ function Create (Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window - is - function Newwin (Number_Of_Lines : C_Int; - Number_Of_Columns : C_Int; -@@ -244,33 +244,33 @@ - - W : Window; - begin -- W := Newwin (C_Int (Number_Of_Lines), -- C_Int (Number_Of_Columns), -- C_Int (First_Line_Position), -- C_Int (First_Column_Position)); -+ W := Newwin (C_Int (Number_Of_Lines), -+ C_Int (Number_Of_Columns), -+ C_Int (First_Line_Position), -+ C_Int (First_Column_Position)); - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return W; -- end Create; -+ end Create; - -- procedure Delete (Win : in out Window) -+ procedure Delete (Win : in out Window) - is - function Wdelwin (W : Window) return C_Int; - pragma Import (C, Wdelwin, "delwin"); - begin -- if Wdelwin (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wdelwin (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- Win := Null_Window; -- end Delete; -+ Win := Null_Window; -+ end Delete; - -- function Sub_Window -- (Win : Window := Standard_Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window -+ function Sub_Window -+ (Win : Window := Standard_Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window - is - function Subwin - (Win : Window; -@@ -282,23 +282,23 @@ - - W : Window; - begin -- W := Subwin (Win, -- C_Int (Number_Of_Lines), -- C_Int (Number_Of_Columns), -- C_Int (First_Line_Position), -- C_Int (First_Column_Position)); -+ W := Subwin (Win, -+ C_Int (Number_Of_Lines), -+ C_Int (Number_Of_Columns), -+ C_Int (First_Line_Position), -+ C_Int (First_Column_Position)); - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return W; -- end Sub_Window; -+ end Sub_Window; - -- function Derived_Window -- (Win : Window := Standard_Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window -+ function Derived_Window -+ (Win : Window := Standard_Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window - is - function Derwin - (Win : Window; -@@ -310,145 +310,145 @@ - - W : Window; - begin -- W := Derwin (Win, -- C_Int (Number_Of_Lines), -- C_Int (Number_Of_Columns), -- C_Int (First_Line_Position), -- C_Int (First_Column_Position)); -+ W := Derwin (Win, -+ C_Int (Number_Of_Lines), -+ C_Int (Number_Of_Columns), -+ C_Int (First_Line_Position), -+ C_Int (First_Column_Position)); - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return W; -- end Derived_Window; -+ end Derived_Window; - -- function Duplicate (Win : Window) return Window -+ function Duplicate (Win : Window) return Window - is - function Dupwin (Win : Window) return Window; - pragma Import (C, Dupwin, "dupwin"); - -- W : constant Window := Dupwin (Win); -+ W : constant Window := Dupwin (Win); - begin - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return W; -- end Duplicate; -+ end Duplicate; - -- procedure Move_Window (Win : Window; -- Line : Line_Position; -- Column : Column_Position) -+ procedure Move_Window (Win : Window; -+ Line : Line_Position; -+ Column : Column_Position) - is - function Mvwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Mvwin, "mvwin"); - begin -- if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -- raise Curses_Exception; -+ if Mvwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Move_Window; -+ end Move_Window; - -- procedure Move_Derived_Window (Win : Window; -- Line : Line_Position; -- Column : Column_Position) -+ procedure Move_Derived_Window (Win : Window; -+ Line : Line_Position; -+ Column : Column_Position) - is - function Mvderwin (Win : Window; - Line : C_Int; - Column : C_Int) return C_Int; - pragma Import (C, Mvderwin, "mvderwin"); - begin -- if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -- raise Curses_Exception; -+ if Mvderwin (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Move_Derived_Window; -+ end Move_Derived_Window; - -- procedure Set_Synch_Mode (Win : Window := Standard_Window; -- Mode : Boolean := False) -+ procedure Set_Synch_Mode (Win : Window := Standard_Window; -+ Mode : Boolean := False) - is - function Syncok (Win : Window; - Mode : Curses_Bool) return C_Int; - pragma Import (C, Syncok, "syncok"); - begin -- if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -- raise Curses_Exception; -+ if Syncok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_Synch_Mode; -+ end Set_Synch_Mode; - ------------------------------------------------------------------------------ -- procedure Add (Win : Window := Standard_Window; -- Str : String; -- Len : Integer := -1) -+ procedure Add (Win : Window := Standard_Window; -+ Str : String; -+ Len : Integer := -1) - is - function Waddnstr (Win : Window; - Str : char_array; - Len : C_Int := -1) return C_Int; - pragma Import (C, Waddnstr, "waddnstr"); - -- Txt : char_array (0 .. Str'Length); -+ Txt : char_array (0 .. Str'Length); - Length : size_t; - begin -- To_C (Str, Txt, Length); -- if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Add; -- -- procedure Add -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : String; -- Len : Integer := -1) -- is -- begin -- Move_Cursor (Win, Line, Column); -- Add (Win, Str, Len); -- end Add; -------------------------------------------------------------------------------- -- procedure Add -- (Win : Window := Standard_Window; -- Str : Attributed_String; -- Len : Integer := -1) -+ To_C (Str, Txt, Length); -+ if Waddnstr (Win, Txt, C_Int (Len)) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Add; -+ -+ procedure Add -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : String; -+ Len : Integer := -1) -+ is -+ begin -+ Move_Cursor (Win, Line, Column); -+ Add (Win, Str, Len); -+ end Add; -+------------------------------------------------------------------------------ -+ procedure Add -+ (Win : Window := Standard_Window; -+ Str : Attributed_String; -+ Len : Integer := -1) - is - function Waddchnstr (Win : Window; - Str : chtype_array; - Len : C_Int := -1) return C_Int; - pragma Import (C, Waddchnstr, "waddchnstr"); - -- Txt : chtype_array (0 .. Str'Length); -+ Txt : chtype_array (0 .. Str'Length); - begin -- for Length in 1 .. size_t (Str'Length) loop -- Txt (Length - 1) := Str (Natural (Length)); -+ for Length in 1 .. size_t (Str'Length) loop -+ Txt (Length - 1) := Str (Natural (Length)); - end loop; -- Txt (Str'Length) := Default_Character; -- if Waddchnstr (Win, -+ Txt (Str'Length) := Default_Character; -+ if Waddchnstr (Win, - Txt, -- C_Int (Len)) = Curses_Err then -- raise Curses_Exception; -+ C_Int (Len)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Add; -+ end Add; - -- procedure Add -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : Attributed_String; -- Len : Integer := -1) -- is -- begin -- Move_Cursor (Win, Line, Column); -- Add (Win, Str, Len); -- end Add; -------------------------------------------------------------------------------- -- procedure Border -- (Win : Window := Standard_Window; -- Left_Side_Symbol : Attributed_Character := Default_Character; -- Right_Side_Symbol : Attributed_Character := Default_Character; -- Top_Side_Symbol : Attributed_Character := Default_Character; -- Bottom_Side_Symbol : Attributed_Character := Default_Character; -- Upper_Left_Corner_Symbol : Attributed_Character := Default_Character; -- Upper_Right_Corner_Symbol : Attributed_Character := Default_Character; -- Lower_Left_Corner_Symbol : Attributed_Character := Default_Character; -- Lower_Right_Corner_Symbol : Attributed_Character := Default_Character) -+ procedure Add -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : Attributed_String; -+ Len : Integer := -1) -+ is -+ begin -+ Move_Cursor (Win, Line, Column); -+ Add (Win, Str, Len); -+ end Add; -+------------------------------------------------------------------------------ -+ procedure Border -+ (Win : Window := Standard_Window; -+ Left_Side_Symbol : Attributed_Character := Default_Character; -+ Right_Side_Symbol : Attributed_Character := Default_Character; -+ Top_Side_Symbol : Attributed_Character := Default_Character; -+ Bottom_Side_Symbol : Attributed_Character := Default_Character; -+ Upper_Left_Corner_Symbol : Attributed_Character := Default_Character; -+ Upper_Right_Corner_Symbol : Attributed_Character := Default_Character; -+ Lower_Left_Corner_Symbol : Attributed_Character := Default_Character; -+ Lower_Right_Corner_Symbol : Attributed_Character := Default_Character) - is - function Wborder (W : Window; - LS : C_Chtype; -@@ -461,135 +461,135 @@ - LRC : C_Chtype) return C_Int; - pragma Import (C, Wborder, "wborder"); - begin -- if Wborder (Win, -- AttrChar_To_Chtype (Left_Side_Symbol), -- AttrChar_To_Chtype (Right_Side_Symbol), -- AttrChar_To_Chtype (Top_Side_Symbol), -- AttrChar_To_Chtype (Bottom_Side_Symbol), -- AttrChar_To_Chtype (Upper_Left_Corner_Symbol), -- AttrChar_To_Chtype (Upper_Right_Corner_Symbol), -- AttrChar_To_Chtype (Lower_Left_Corner_Symbol), -- AttrChar_To_Chtype (Lower_Right_Corner_Symbol) -+ if Wborder (Win, -+ AttrChar_To_Chtype (Left_Side_Symbol), -+ AttrChar_To_Chtype (Right_Side_Symbol), -+ AttrChar_To_Chtype (Top_Side_Symbol), -+ AttrChar_To_Chtype (Bottom_Side_Symbol), -+ AttrChar_To_Chtype (Upper_Left_Corner_Symbol), -+ AttrChar_To_Chtype (Upper_Right_Corner_Symbol), -+ AttrChar_To_Chtype (Lower_Left_Corner_Symbol), -+ AttrChar_To_Chtype (Lower_Right_Corner_Symbol) - ) = Curses_Err - then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Border; -+ end Border; - -- procedure Box -- (Win : Window := Standard_Window; -- Vertical_Symbol : Attributed_Character := Default_Character; -- Horizontal_Symbol : Attributed_Character := Default_Character) -+ procedure Box -+ (Win : Window := Standard_Window; -+ Vertical_Symbol : Attributed_Character := Default_Character; -+ Horizontal_Symbol : Attributed_Character := Default_Character) - is - begin -- Border (Win, -- Vertical_Symbol, Vertical_Symbol, -- Horizontal_Symbol, Horizontal_Symbol); -- end Box; -+ Border (Win, -+ Vertical_Symbol, Vertical_Symbol, -+ Horizontal_Symbol, Horizontal_Symbol); -+ end Box; - -- procedure Horizontal_Line -- (Win : Window := Standard_Window; -- Line_Size : Natural; -- Line_Symbol : Attributed_Character := Default_Character) -+ procedure Horizontal_Line -+ (Win : Window := Standard_Window; -+ Line_Size : Natural; -+ Line_Symbol : Attributed_Character := Default_Character) - is - function Whline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; - pragma Import (C, Whline, "whline"); - begin -- if Whline (Win, -- AttrChar_To_Chtype (Line_Symbol), -- C_Int (Line_Size)) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Horizontal_Line; -- -- procedure Vertical_Line -- (Win : Window := Standard_Window; -- Line_Size : Natural; -- Line_Symbol : Attributed_Character := Default_Character) -+ if Whline (Win, -+ AttrChar_To_Chtype (Line_Symbol), -+ C_Int (Line_Size)) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Horizontal_Line; -+ -+ procedure Vertical_Line -+ (Win : Window := Standard_Window; -+ Line_Size : Natural; -+ Line_Symbol : Attributed_Character := Default_Character) - is - function Wvline (W : Window; - Ch : C_Chtype; - Len : C_Int) return C_Int; - pragma Import (C, Wvline, "wvline"); - begin -- if Wvline (Win, -- AttrChar_To_Chtype (Line_Symbol), -- C_Int (Line_Size)) = Curses_Err then -- raise Curses_Exception; -+ if Wvline (Win, -+ AttrChar_To_Chtype (Line_Symbol), -+ C_Int (Line_Size)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Vertical_Line; -+ end Vertical_Line; - - ------------------------------------------------------------------------------ -- function Get_Keystroke (Win : Window := Standard_Window) -+ function Get_Keystroke (Win : Window := Standard_Window) - return Real_Key_Code - is - function Wgetch (W : Window) return C_Int; - pragma Import (C, Wgetch, "wgetch"); - -- C : constant C_Int := Wgetch (Win); -+ C : constant C_Int := Wgetch (Win); - begin - if C = Curses_Err then - return Key_None; - else - return Real_Key_Code (C); - end if; -- end Get_Keystroke; -+ end Get_Keystroke; - -- procedure Undo_Keystroke (Key : Real_Key_Code) -+ procedure Undo_Keystroke (Key : Real_Key_Code) - is - function Ungetch (Ch : C_Int) return C_Int; - pragma Import (C, Ungetch, "ungetch"); - begin -- if Ungetch (C_Int (Key)) = Curses_Err then -- raise Curses_Exception; -+ if Ungetch (C_Int (Key)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Undo_Keystroke; -+ end Undo_Keystroke; - -- function Has_Key (Key : Special_Key_Code) return Boolean -+ function Has_Key (Key : Special_Key_Code) return Boolean - is - function Haskey (Key : C_Int) return C_Int; - pragma Import (C, Haskey, "has_key"); - begin -- if Haskey (C_Int (Key)) = Curses_False then -+ if Haskey (C_Int (Key)) = Curses_False then - return False; - else - return True; - end if; -- end Has_Key; -+ end Has_Key; - -- function Is_Function_Key (Key : Special_Key_Code) return Boolean -+ function Is_Function_Key (Key : Special_Key_Code) return Boolean - is - L : constant Special_Key_Code := Special_Key_Code (Natural (Key_F0) + -- Natural (Function_Key_Number'Last)); -+ Natural (Function_Key_Number'Last)); - begin -- if (Key >= Key_F0) and then (Key <= L) then -+ if (Key >= Key_F0) and then (Key <= L) then - return True; - else - return False; - end if; -- end Is_Function_Key; -+ end Is_Function_Key; - -- function Function_Key (Key : Real_Key_Code) -- return Function_Key_Number -+ function Function_Key (Key : Real_Key_Code) -+ return Function_Key_Number - is - begin -- if Is_Function_Key (Key) then -- return Function_Key_Number (Key - Key_F0); -+ if Is_Function_Key (Key) then -+ return Function_Key_Number (Key - Key_F0); - else - raise Constraint_Error; - end if; -- end Function_Key; -+ end Function_Key; - -- function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code -+ function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code - is - begin -- return Real_Key_Code (Natural (Key_F0) + Natural (Key)); -- end Function_Key_Code; -+ return Real_Key_Code (Natural (Key_F0) + Natural (Key)); -+ end Function_Key_Code; - ------------------------------------------------------------------------------ -- procedure Standout (Win : Window := Standard_Window; -- On : Boolean := True) -+ procedure Standout (Win : Window := Standard_Window; -+ On : Boolean := True) - is - function wstandout (Win : Window) return C_Int; - pragma Import (C, wstandout, "wstandout"); -@@ -598,20 +598,20 @@ - - Err : C_Int; - begin -- if On then -- Err := wstandout (Win); -+ if On then -+ Err := wstandout (Win); - else -- Err := wstandend (Win); -+ Err := wstandend (Win); - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Standout; -+ end Standout; - -- procedure Switch_Character_Attribute -- (Win : Window := Standard_Window; -- Attr : Character_Attribute_Set := Normal_Video; -- On : Boolean := True) -+ procedure Switch_Character_Attribute -+ (Win : Window := Standard_Window; -+ Attr : Character_Attribute_Set := Normal_Video; -+ On : Boolean := True) - is - function Wattron (Win : Window; - C_Attr : C_AttrType) return C_Int; -@@ -622,39 +622,39 @@ - -- In Ada we use the On Boolean to control whether or not we want to - -- switch on or off the attributes in the set. - Err : C_Int; -- AC : constant Attributed_Character := (Ch => Character'First, -- Color => Color_Pair'First, -- Attr => Attr); -+ AC : constant Attributed_Character := (Ch => Character'First, -+ Color => Color_Pair'First, -+ Attr => Attr); - begin -- if On then -- Err := Wattron (Win, AttrChar_To_AttrType (AC)); -+ if On then -+ Err := Wattron (Win, AttrChar_To_AttrType (AC)); - else -- Err := Wattroff (Win, AttrChar_To_AttrType (AC)); -+ Err := Wattroff (Win, AttrChar_To_AttrType (AC)); - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Switch_Character_Attribute; -+ end Switch_Character_Attribute; - -- procedure Set_Character_Attributes -- (Win : Window := Standard_Window; -- Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Set_Character_Attributes -+ (Win : Window := Standard_Window; -+ Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Wattrset (Win : Window; - C_Attr : C_AttrType) return C_Int; - pragma Import (C, Wattrset, "wattrset"); -- ??? wattr_set - begin -- if Wattrset (Win, -- AttrChar_To_AttrType (Attributed_Character' -- (Ch => Character'First, -- Color => Color, -- Attr => Attr))) = Curses_Err then -- raise Curses_Exception; -+ if Wattrset (Win, -+ AttrChar_To_AttrType (Attributed_Character' -+ (Ch => Character'First, -+ Color => Color, -+ Attr => Attr))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_Character_Attributes; -+ end Set_Character_Attributes; - -- function Get_Character_Attribute (Win : Window := Standard_Window) -+ function Get_Character_Attribute (Win : Window := Standard_Window) - return Character_Attribute_Set - is - function Wattrget (Win : Window; -@@ -665,19 +665,19 @@ - - Attr : aliased C_AttrType; - Col : aliased C_Short; -- Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, -+ Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, - System.Null_Address); -- Ch : Attributed_Character; -+ Ch : Attributed_Character; - begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); -- return Ch.Attr; -+ return Ch.Attr; - else -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Get_Character_Attribute; -+ end Get_Character_Attribute; - -- function Get_Character_Attribute (Win : Window := Standard_Window) -+ function Get_Character_Attribute (Win : Window := Standard_Window) - return Color_Pair - is - function Wattrget (Win : Window; -@@ -688,38 +688,38 @@ - - Attr : aliased C_AttrType; - Col : aliased C_Short; -- Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, -+ Res : constant C_Int := Wattrget (Win, Attr'Access, Col'Access, - System.Null_Address); -- Ch : Attributed_Character; -+ Ch : Attributed_Character; - begin - if Res = Curses_Ok then - Ch := AttrType_To_AttrChar (Attr); -- return Ch.Color; -+ return Ch.Color; - else -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Get_Character_Attribute; -+ end Get_Character_Attribute; - -- procedure Set_Color (Win : Window := Standard_Window; -- Pair : Color_Pair) -+ procedure Set_Color (Win : Window := Standard_Window; -+ Pair : Color_Pair) - is - function Wset_Color (Win : Window; - Color : C_Short; - Opts : C_Void_Ptr) return C_Int; - pragma Import (C, Wset_Color, "wcolor_set"); - begin -- if Wset_Color (Win, -- C_Short (Pair), -+ if Wset_Color (Win, -+ C_Short (Pair), - C_Void_Ptr (System.Null_Address)) = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Color; -+ end Set_Color; - -- procedure Change_Attributes -- (Win : Window := Standard_Window; -- Count : Integer := -1; -- Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Change_Attributes -+ (Win : Window := Standard_Window; -+ Count : Integer := -1; -+ Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Wchgat (Win : Window; - Cnt : C_Int; -@@ -729,49 +729,49 @@ - return C_Int; - pragma Import (C, Wchgat, "wchgat"); - -- Ch : constant Attributed_Character := -- (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); -+ Ch : constant Attributed_Character := -+ (Ch => Character'First, Color => Color_Pair'First, Attr => Attr); - begin -- if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), -- C_Short (Color)) = Curses_Err then -- raise Curses_Exception; -+ if Wchgat (Win, C_Int (Count), AttrChar_To_AttrType (Ch), -+ C_Short (Color)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Change_Attributes; -+ end Change_Attributes; - -- procedure Change_Attributes -- (Win : Window := Standard_Window; -- Line : Line_Position := Line_Position'First; -- Column : Column_Position := Column_Position'First; -- Count : Integer := -1; -- Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Change_Attributes -+ (Win : Window := Standard_Window; -+ Line : Line_Position := Line_Position'First; -+ Column : Column_Position := Column_Position'First; -+ Count : Integer := -1; -+ Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - begin -- Move_Cursor (Win, Line, Column); -- Change_Attributes (Win, Count, Attr, Color); -- end Change_Attributes; -+ Move_Cursor (Win, Line, Column); -+ Change_Attributes (Win, Count, Attr, Color); -+ end Change_Attributes; - ------------------------------------------------------------------------------ -- procedure Beep -+ procedure Beep - is - function Beeper return C_Int; - pragma Import (C, Beeper, "beep"); - begin - if Beeper = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Beep; -+ end Beep; - -- procedure Flash_Screen -+ procedure Flash_Screen - is - function Flash return C_Int; - pragma Import (C, Flash, "flash"); - begin - if Flash = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Flash_Screen; -+ end Flash_Screen; - ------------------------------------------------------------------------------ -- procedure Set_Cbreak_Mode (SwitchOn : Boolean := True) -+ procedure Set_Cbreak_Mode (SwitchOn : Boolean := True) - is - function Cbreak return C_Int; - pragma Import (C, Cbreak, "cbreak"); -@@ -780,17 +780,17 @@ - - Err : C_Int; - begin -- if SwitchOn then -+ if SwitchOn then - Err := Cbreak; - else - Err := NoCbreak; - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Cbreak_Mode; -+ end Set_Cbreak_Mode; - -- procedure Set_Raw_Mode (SwitchOn : Boolean := True) -+ procedure Set_Raw_Mode (SwitchOn : Boolean := True) - is - function Raw return C_Int; - pragma Import (C, Raw, "raw"); -@@ -799,17 +799,17 @@ - - Err : C_Int; - begin -- if SwitchOn then -+ if SwitchOn then - Err := Raw; - else - Err := NoRaw; - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Raw_Mode; -+ end Set_Raw_Mode; - -- procedure Set_Echo_Mode (SwitchOn : Boolean := True) -+ procedure Set_Echo_Mode (SwitchOn : Boolean := True) - is - function Echo return C_Int; - pragma Import (C, Echo, "echo"); -@@ -818,136 +818,136 @@ - - Err : C_Int; - begin -- if SwitchOn then -+ if SwitchOn then - Err := Echo; - else - Err := NoEcho; - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Echo_Mode; -+ end Set_Echo_Mode; - -- procedure Set_Meta_Mode (Win : Window := Standard_Window; -- SwitchOn : Boolean := True) -+ procedure Set_Meta_Mode (Win : Window := Standard_Window; -+ SwitchOn : Boolean := True) - is - function Meta (W : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Meta, "meta"); - begin -- if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then -- raise Curses_Exception; -+ if Meta (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_Meta_Mode; -+ end Set_Meta_Mode; - -- procedure Set_KeyPad_Mode (Win : Window := Standard_Window; -- SwitchOn : Boolean := True) -+ procedure Set_KeyPad_Mode (Win : Window := Standard_Window; -+ SwitchOn : Boolean := True) - is - function Keypad (W : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Keypad, "keypad"); - begin -- if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then -- raise Curses_Exception; -+ if Keypad (Win, Curses_Bool (Boolean'Pos (SwitchOn))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_KeyPad_Mode; -+ end Set_KeyPad_Mode; - -- function Get_KeyPad_Mode (Win : Window := Standard_Window) -+ function Get_KeyPad_Mode (Win : Window := Standard_Window) - return Boolean - is - function Is_Keypad (W : Window) return Curses_Bool; - pragma Import (C, Is_Keypad, "is_keypad"); - begin -- return (Is_Keypad (Win) /= Curses_Bool_False); -- end Get_KeyPad_Mode; -+ return (Is_Keypad (Win) /= Curses_Bool_False); -+ end Get_KeyPad_Mode; - -- procedure Half_Delay (Amount : Half_Delay_Amount) -+ procedure Half_Delay (Amount : Half_Delay_Amount) - is - function Halfdelay (Amount : C_Int) return C_Int; - pragma Import (C, Halfdelay, "halfdelay"); - begin -- if Halfdelay (C_Int (Amount)) = Curses_Err then -- raise Curses_Exception; -+ if Halfdelay (C_Int (Amount)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Half_Delay; -+ end Half_Delay; - -- procedure Set_Flush_On_Interrupt_Mode -- (Win : Window := Standard_Window; -- Mode : Boolean := True) -+ procedure Set_Flush_On_Interrupt_Mode -+ (Win : Window := Standard_Window; -+ Mode : Boolean := True) - is - function Intrflush (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Intrflush, "intrflush"); - begin -- if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -- raise Curses_Exception; -+ if Intrflush (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_Flush_On_Interrupt_Mode; -+ end Set_Flush_On_Interrupt_Mode; - -- procedure Set_Queue_Interrupt_Mode -- (Win : Window := Standard_Window; -- Flush : Boolean := True) -+ procedure Set_Queue_Interrupt_Mode -+ (Win : Window := Standard_Window; -+ Flush : Boolean := True) - is - procedure Qiflush; - pragma Import (C, Qiflush, "qiflush"); - procedure No_Qiflush; - pragma Import (C, No_Qiflush, "noqiflush"); - begin -- if Win = Null_Window then -- raise Curses_Exception; -+ if Win = Null_Window then -+ raise Curses_Exception; - end if; -- if Flush then -+ if Flush then - Qiflush; - else - No_Qiflush; - end if; -- end Set_Queue_Interrupt_Mode; -+ end Set_Queue_Interrupt_Mode; - -- procedure Set_NoDelay_Mode -- (Win : Window := Standard_Window; -- Mode : Boolean := False) -+ procedure Set_NoDelay_Mode -+ (Win : Window := Standard_Window; -+ Mode : Boolean := False) - is - function Nodelay (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Nodelay, "nodelay"); - begin -- if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -- raise Curses_Exception; -+ if Nodelay (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_NoDelay_Mode; -+ end Set_NoDelay_Mode; - -- procedure Set_Timeout_Mode (Win : Window := Standard_Window; -- Mode : Timeout_Mode; -- Amount : Natural) -+ procedure Set_Timeout_Mode (Win : Window := Standard_Window; -+ Mode : Timeout_Mode; -+ Amount : Natural) - is - procedure Wtimeout (Win : Window; Amount : C_Int); - pragma Import (C, Wtimeout, "wtimeout"); - - Time : C_Int; - begin -- case Mode is -- when Blocking => Time := -1; -- when Non_Blocking => Time := 0; -- when Delayed => -- if Amount = 0 then -+ case Mode is -+ when Blocking => Time := -1; -+ when Non_Blocking => Time := 0; -+ when Delayed => -+ if Amount = 0 then - raise Constraint_Error; - end if; -- Time := C_Int (Amount); -+ Time := C_Int (Amount); - end case; -- Wtimeout (Win, Time); -- end Set_Timeout_Mode; -+ Wtimeout (Win, Time); -+ end Set_Timeout_Mode; - -- procedure Set_Escape_Timer_Mode -- (Win : Window := Standard_Window; -- Timer_Off : Boolean := False) -+ procedure Set_Escape_Timer_Mode -+ (Win : Window := Standard_Window; -+ Timer_Off : Boolean := False) - is - function Notimeout (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Notimeout, "notimeout"); - begin -- if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) -+ if Notimeout (Win, Curses_Bool (Boolean'Pos (Timer_Off))) - = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Escape_Timer_Mode; -+ end Set_Escape_Timer_Mode; - - ------------------------------------------------------------------------------ -- procedure Set_NL_Mode (SwitchOn : Boolean := True) -+ procedure Set_NL_Mode (SwitchOn : Boolean := True) - is - function NL return C_Int; - pragma Import (C, NL, "nl"); -@@ -956,242 +956,242 @@ - - Err : C_Int; - begin -- if SwitchOn then -+ if SwitchOn then - Err := NL; - else - Err := NoNL; - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_NL_Mode; -+ end Set_NL_Mode; - -- procedure Clear_On_Next_Update -- (Win : Window := Standard_Window; -- Do_Clear : Boolean := True) -+ procedure Clear_On_Next_Update -+ (Win : Window := Standard_Window; -+ Do_Clear : Boolean := True) - is - function Clear_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, Clear_Ok, "clearok"); - begin -- if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then -- raise Curses_Exception; -+ if Clear_Ok (Win, Curses_Bool (Boolean'Pos (Do_Clear))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Clear_On_Next_Update; -+ end Clear_On_Next_Update; - -- procedure Use_Insert_Delete_Line -- (Win : Window := Standard_Window; -- Do_Idl : Boolean := True) -+ procedure Use_Insert_Delete_Line -+ (Win : Window := Standard_Window; -+ Do_Idl : Boolean := True) - is - function IDL_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, IDL_Ok, "idlok"); - begin -- if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then -- raise Curses_Exception; -+ if IDL_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idl))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Use_Insert_Delete_Line; -+ end Use_Insert_Delete_Line; - -- procedure Use_Insert_Delete_Character -- (Win : Window := Standard_Window; -- Do_Idc : Boolean := True) -+ procedure Use_Insert_Delete_Character -+ (Win : Window := Standard_Window; -+ Do_Idc : Boolean := True) - is - procedure IDC_Ok (W : Window; Flag : Curses_Bool); - pragma Import (C, IDC_Ok, "idcok"); - begin -- IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))); -- end Use_Insert_Delete_Character; -+ IDC_Ok (Win, Curses_Bool (Boolean'Pos (Do_Idc))); -+ end Use_Insert_Delete_Character; - -- procedure Leave_Cursor_After_Update -- (Win : Window := Standard_Window; -- Do_Leave : Boolean := True) -+ procedure Leave_Cursor_After_Update -+ (Win : Window := Standard_Window; -+ Do_Leave : Boolean := True) - is - function Leave_Ok (W : Window; Flag : Curses_Bool) return C_Int; - pragma Import (C, Leave_Ok, "leaveok"); - begin -- if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then -- raise Curses_Exception; -+ if Leave_Ok (Win, Curses_Bool (Boolean'Pos (Do_Leave))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Leave_Cursor_After_Update; -+ end Leave_Cursor_After_Update; - -- procedure Immediate_Update_Mode -- (Win : Window := Standard_Window; -- Mode : Boolean := False) -+ procedure Immediate_Update_Mode -+ (Win : Window := Standard_Window; -+ Mode : Boolean := False) - is - procedure Immedok (Win : Window; Mode : Curses_Bool); - pragma Import (C, Immedok, "immedok"); - begin -- Immedok (Win, Curses_Bool (Boolean'Pos (Mode))); -- end Immediate_Update_Mode; -+ Immedok (Win, Curses_Bool (Boolean'Pos (Mode))); -+ end Immediate_Update_Mode; - -- procedure Allow_Scrolling -- (Win : Window := Standard_Window; -- Mode : Boolean := False) -+ procedure Allow_Scrolling -+ (Win : Window := Standard_Window; -+ Mode : Boolean := False) - is - function Scrollok (Win : Window; Mode : Curses_Bool) return C_Int; - pragma Import (C, Scrollok, "scrollok"); - begin -- if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -- raise Curses_Exception; -+ if Scrollok (Win, Curses_Bool (Boolean'Pos (Mode))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Allow_Scrolling; -+ end Allow_Scrolling; - -- function Scrolling_Allowed (Win : Window := Standard_Window) -+ function Scrolling_Allowed (Win : Window := Standard_Window) - return Boolean - is - function Is_Scroll_Ok (W : Window) return Curses_Bool; - pragma Import (C, Is_Scroll_Ok, "is_scrollok"); - begin -- return (Is_Scroll_Ok (Win) /= Curses_Bool_False); -- end Scrolling_Allowed; -+ return (Is_Scroll_Ok (Win) /= Curses_Bool_False); -+ end Scrolling_Allowed; - -- procedure Set_Scroll_Region -- (Win : Window := Standard_Window; -- Top_Line : Line_Position; -- Bottom_Line : Line_Position) -+ procedure Set_Scroll_Region -+ (Win : Window := Standard_Window; -+ Top_Line : Line_Position; -+ Bottom_Line : Line_Position) - is - function Wsetscrreg (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Wsetscrreg, "wsetscrreg"); - begin -- if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) -+ if Wsetscrreg (Win, C_Int (Top_Line), C_Int (Bottom_Line)) - = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Scroll_Region; -+ end Set_Scroll_Region; - ------------------------------------------------------------------------------ -- procedure Update_Screen -+ procedure Update_Screen - is - function Do_Update return C_Int; - pragma Import (C, Do_Update, "doupdate"); - begin - if Do_Update = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Update_Screen; -+ end Update_Screen; - -- procedure Refresh (Win : Window := Standard_Window) -+ procedure Refresh (Win : Window := Standard_Window) - is - function Wrefresh (W : Window) return C_Int; - pragma Import (C, Wrefresh, "wrefresh"); - begin -- if Wrefresh (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wrefresh (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Refresh; -+ end Refresh; - -- procedure Refresh_Without_Update -- (Win : Window := Standard_Window) -+ procedure Refresh_Without_Update -+ (Win : Window := Standard_Window) - is - function Wnoutrefresh (W : Window) return C_Int; - pragma Import (C, Wnoutrefresh, "wnoutrefresh"); - begin -- if Wnoutrefresh (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wnoutrefresh (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Refresh_Without_Update; -+ end Refresh_Without_Update; - -- procedure Redraw (Win : Window := Standard_Window) -+ procedure Redraw (Win : Window := Standard_Window) - is - function Redrawwin (Win : Window) return C_Int; - pragma Import (C, Redrawwin, "redrawwin"); - begin -- if Redrawwin (Win) = Curses_Err then -- raise Curses_Exception; -+ if Redrawwin (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Redraw; -+ end Redraw; - -- procedure Redraw -- (Win : Window := Standard_Window; -- Begin_Line : Line_Position; -- Line_Count : Positive) -+ procedure Redraw -+ (Win : Window := Standard_Window; -+ Begin_Line : Line_Position; -+ Line_Count : Positive) - is - function Wredrawln (Win : Window; First : C_Int; Cnt : C_Int) - return C_Int; - pragma Import (C, Wredrawln, "wredrawln"); - begin -- if Wredrawln (Win, -- C_Int (Begin_Line), -- C_Int (Line_Count)) = Curses_Err then -- raise Curses_Exception; -+ if Wredrawln (Win, -+ C_Int (Begin_Line), -+ C_Int (Line_Count)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Redraw; -+ end Redraw; - - ------------------------------------------------------------------------------ -- procedure Erase (Win : Window := Standard_Window) -+ procedure Erase (Win : Window := Standard_Window) - is - function Werase (W : Window) return C_Int; - pragma Import (C, Werase, "werase"); - begin -- if Werase (Win) = Curses_Err then -- raise Curses_Exception; -+ if Werase (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Erase; -+ end Erase; - -- procedure Clear (Win : Window := Standard_Window) -+ procedure Clear (Win : Window := Standard_Window) - is - function Wclear (W : Window) return C_Int; - pragma Import (C, Wclear, "wclear"); - begin -- if Wclear (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wclear (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Clear; -+ end Clear; - -- procedure Clear_To_End_Of_Screen (Win : Window := Standard_Window) -+ procedure Clear_To_End_Of_Screen (Win : Window := Standard_Window) - is - function Wclearbot (W : Window) return C_Int; - pragma Import (C, Wclearbot, "wclrtobot"); - begin -- if Wclearbot (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wclearbot (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Clear_To_End_Of_Screen; -+ end Clear_To_End_Of_Screen; - -- procedure Clear_To_End_Of_Line (Win : Window := Standard_Window) -+ procedure Clear_To_End_Of_Line (Win : Window := Standard_Window) - is - function Wcleareol (W : Window) return C_Int; - pragma Import (C, Wcleareol, "wclrtoeol"); - begin -- if Wcleareol (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wcleareol (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Clear_To_End_Of_Line; -+ end Clear_To_End_Of_Line; - ------------------------------------------------------------------------------ -- procedure Set_Background -- (Win : Window := Standard_Window; -- Ch : Attributed_Character) -+ procedure Set_Background -+ (Win : Window := Standard_Window; -+ Ch : Attributed_Character) - is - procedure WBackground (W : Window; Ch : C_Chtype); - pragma Import (C, WBackground, "wbkgdset"); - begin -- WBackground (Win, AttrChar_To_Chtype (Ch)); -- end Set_Background; -+ WBackground (Win, AttrChar_To_Chtype (Ch)); -+ end Set_Background; - -- procedure Change_Background -- (Win : Window := Standard_Window; -- Ch : Attributed_Character) -+ procedure Change_Background -+ (Win : Window := Standard_Window; -+ Ch : Attributed_Character) - is - function WChangeBkgd (W : Window; Ch : C_Chtype) return C_Int; - pragma Import (C, WChangeBkgd, "wbkgd"); - begin -- if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -+ if WChangeBkgd (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Change_Background; -+ end Change_Background; - -- function Get_Background (Win : Window := Standard_Window) -- return Attributed_Character -+ function Get_Background (Win : Window := Standard_Window) -+ return Attributed_Character - is - function Wgetbkgd (Win : Window) return C_Chtype; - pragma Import (C, Wgetbkgd, "getbkgd"); - begin -- return Chtype_To_AttrChar (Wgetbkgd (Win)); -- end Get_Background; -+ return Chtype_To_AttrChar (Wgetbkgd (Win)); -+ end Get_Background; - ------------------------------------------------------------------------------ -- procedure Change_Lines_Status (Win : Window := Standard_Window; -- Start : Line_Position; -- Count : Positive; -- State : Boolean) -+ procedure Change_Lines_Status (Win : Window := Standard_Window; -+ Start : Line_Position; -+ Count : Positive; -+ State : Boolean) - is - function Wtouchln (Win : Window; - Sta : C_Int; -@@ -1199,175 +1199,175 @@ - Chg : C_Int) return C_Int; - pragma Import (C, Wtouchln, "wtouchln"); - begin -- if Wtouchln (Win, C_Int (Start), C_Int (Count), -- C_Int (Boolean'Pos (State))) = Curses_Err then -- raise Curses_Exception; -+ if Wtouchln (Win, C_Int (Start), C_Int (Count), -+ C_Int (Boolean'Pos (State))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Change_Lines_Status; -+ end Change_Lines_Status; - -- procedure Touch (Win : Window := Standard_Window) -+ procedure Touch (Win : Window := Standard_Window) - is - Y : Line_Position; - X : Column_Position; - begin -- Get_Size (Win, Y, X); -- Change_Lines_Status (Win, 0, Positive (Y), True); -- end Touch; -+ Get_Size (Win, Y, X); -+ pragma Unreferenced (X); -+ Change_Lines_Status (Win, 0, Positive (Y), True); -+ end Touch; - -- procedure Untouch (Win : Window := Standard_Window) -+ procedure Untouch (Win : Window := Standard_Window) - is -- Y : Line_Position; -- X : Column_Position; -+ Y : Line_Position; -+ X : Column_Position; - begin -- Get_Size (Win, Y, X); -- Change_Lines_Status (Win, 0, Positive (Y), False); -- end Untouch; -+ Get_Size (Win, Y, X); -+ pragma Unreferenced (X); -+ Change_Lines_Status (Win, 0, Positive (Y), False); -+ end Untouch; - -- procedure Touch (Win : Window := Standard_Window; -- Start : Line_Position; -- Count : Positive) -+ procedure Touch (Win : Window := Standard_Window; -+ Start : Line_Position; -+ Count : Positive) - is - begin -- Change_Lines_Status (Win, Start, Count, True); -- end Touch; -+ Change_Lines_Status (Win, Start, Count, True); -+ end Touch; - -- function Is_Touched -- (Win : Window := Standard_Window; -- Line : Line_Position) return Boolean -+ function Is_Touched -+ (Win : Window := Standard_Window; -+ Line : Line_Position) return Boolean - is -- function WLineTouched (W : Window; L : C_Int) return Curses_Bool; -+ function WLineTouched (W : Window; L : C_Int) return Curses_Bool; - pragma Import (C, WLineTouched, "is_linetouched"); - begin -- if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then -+ if WLineTouched (Win, C_Int (Line)) = Curses_Bool_False then - return False; - else - return True; - end if; -- end Is_Touched; -+ end Is_Touched; - -- function Is_Touched -- (Win : Window := Standard_Window) return Boolean -+ function Is_Touched -+ (Win : Window := Standard_Window) return Boolean - is -- function WWinTouched (W : Window) return Curses_Bool; -+ function WWinTouched (W : Window) return Curses_Bool; - pragma Import (C, WWinTouched, "is_wintouched"); - begin -- if WWinTouched (Win) = Curses_Bool_False then -+ if WWinTouched (Win) = Curses_Bool_False then - return False; - else - return True; - end if; -- end Is_Touched; -+ end Is_Touched; - ------------------------------------------------------------------------------ -- procedure Copy -- (Source_Window : Window; -- Destination_Window : Window; -- Source_Top_Row : Line_Position; -- Source_Left_Column : Column_Position; -- Destination_Top_Row : Line_Position; -- Destination_Left_Column : Column_Position; -- Destination_Bottom_Row : Line_Position; -- Destination_Right_Column : Column_Position; -- Non_Destructive_Mode : Boolean := True) -- is -- function Copywin (Src : Window; -- Dst : Window; -- Str : C_Int; -- Slc : C_Int; -- Dtr : C_Int; -- Dlc : C_Int; -- Dbr : C_Int; -- Drc : C_Int; -- Ndm : C_Int) return C_Int; -+ procedure Copy -+ (Source_Window : Window; -+ Destination_Window : Window; -+ Source_Top_Row : Line_Position; -+ Source_Left_Column : Column_Position; -+ Destination_Top_Row : Line_Position; -+ Destination_Left_Column : Column_Position; -+ Destination_Bottom_Row : Line_Position; -+ Destination_Right_Column : Column_Position; -+ Non_Destructive_Mode : Boolean := True) -+ is -+ function Copywin (Src : Window; -+ Dst : Window; -+ Str : C_Int; -+ Slc : C_Int; -+ Dtr : C_Int; -+ Dlc : C_Int; -+ Dbr : C_Int; -+ Drc : C_Int; -+ Ndm : C_Int) return C_Int; - pragma Import (C, Copywin, "copywin"); - begin -- if Copywin (Source_Window, -- Destination_Window, -- C_Int (Source_Top_Row), -- C_Int (Source_Left_Column), -- C_Int (Destination_Top_Row), -- C_Int (Destination_Left_Column), -- C_Int (Destination_Bottom_Row), -- C_Int (Destination_Right_Column), -- Boolean'Pos (Non_Destructive_Mode) -+ if Copywin (Source_Window, -+ Destination_Window, -+ C_Int (Source_Top_Row), -+ C_Int (Source_Left_Column), -+ C_Int (Destination_Top_Row), -+ C_Int (Destination_Left_Column), -+ C_Int (Destination_Bottom_Row), -+ C_Int (Destination_Right_Column), -+ Boolean'Pos (Non_Destructive_Mode) - ) = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Copy; -+ end Copy; - -- procedure Overwrite -- (Source_Window : Window; -- Destination_Window : Window) -+ procedure Overwrite -+ (Source_Window : Window; -+ Destination_Window : Window) - is -- function Overwrite (Src : Window; Dst : Window) return C_Int; -+ function Overwrite (Src : Window; Dst : Window) return C_Int; - pragma Import (C, Overwrite, "overwrite"); - begin -- if Overwrite (Source_Window, Destination_Window) = Curses_Err then -- raise Curses_Exception; -+ if Overwrite (Source_Window, Destination_Window) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Overwrite; -+ end Overwrite; - -- procedure Overlay -- (Source_Window : Window; -- Destination_Window : Window) -+ procedure Overlay -+ (Source_Window : Window; -+ Destination_Window : Window) - is -- function Overlay (Src : Window; Dst : Window) return C_Int; -+ function Overlay (Src : Window; Dst : Window) return C_Int; - pragma Import (C, Overlay, "overlay"); - begin -- if Overlay (Source_Window, Destination_Window) = Curses_Err then -- raise Curses_Exception; -+ if Overlay (Source_Window, Destination_Window) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Overlay; -+ end Overlay; - - ------------------------------------------------------------------------------ -- procedure Insert_Delete_Lines -- (Win : Window := Standard_Window; -- Lines : Integer := 1) -- default is to insert one line above -+ procedure Insert_Delete_Lines -+ (Win : Window := Standard_Window; -+ Lines : Integer := 1) -- default is to insert one line above - is -- function Winsdelln (W : Window; N : C_Int) return C_Int; -+ function Winsdelln (W : Window; N : C_Int) return C_Int; - pragma Import (C, Winsdelln, "winsdelln"); - begin -- if Winsdelln (Win, C_Int (Lines)) = Curses_Err then -- raise Curses_Exception; -+ if Winsdelln (Win, C_Int (Lines)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Insert_Delete_Lines; -+ end Insert_Delete_Lines; - -- procedure Delete_Line (Win : Window := Standard_Window) -+ procedure Delete_Line (Win : Window := Standard_Window) - is - begin -- Insert_Delete_Lines (Win, -1); -- end Delete_Line; -+ Insert_Delete_Lines (Win, -1); -+ end Delete_Line; - -- procedure Insert_Line (Win : Window := Standard_Window) -+ procedure Insert_Line (Win : Window := Standard_Window) - is - begin -- Insert_Delete_Lines (Win, 1); -- end Insert_Line; -+ Insert_Delete_Lines (Win, 1); -+ end Insert_Line; - ------------------------------------------------------------------------------ - -- procedure Get_Size -- (Win : Window := Standard_Window; -- Number_Of_Lines : out Line_Count; -- Number_Of_Columns : out Column_Count) -+ procedure Get_Size -+ (Win : Window := Standard_Window; -+ Number_Of_Lines : out Line_Count; -+ Number_Of_Columns : out Column_Count) - is -- function GetMaxY (W : Window) return C_Int; -+ function GetMaxY (W : Window) return C_Int; - pragma Import (C, GetMaxY, "getmaxy"); - -- function GetMaxX (W : Window) return C_Int; -+ function GetMaxX (W : Window) return C_Int; - pragma Import (C, GetMaxX, "getmaxx"); - -- Y : constant C_Int := GetMaxY (Win) -- + C_Int (Offset_XY); -- X : constant C_Int := GetMaxX (Win) -- + C_Int (Offset_XY); -- begin -- Number_Of_Lines := Line_Count (Y); -- Number_Of_Columns := Column_Count (X); -- end Get_Size; -- -- procedure Get_Window_Position -- (Win : Window := Standard_Window; -- Top_Left_Line : out Line_Position; -- Top_Left_Column : out Column_Position) -+ Y : constant C_Int := GetMaxY (Win); -+ X : constant C_Int := GetMaxX (Win); -+ begin -+ Number_Of_Lines := Line_Count (Y); -+ Number_Of_Columns := Column_Count (X); -+ end Get_Size; -+ -+ procedure Get_Window_Position -+ (Win : Window := Standard_Window; -+ Top_Left_Line : out Line_Position; -+ Top_Left_Column : out Column_Position) - is - function GetBegY (W : Window) return C_Int; - pragma Import (C, GetBegY, "getbegy"); -@@ -1375,17 +1375,17 @@ - function GetBegX (W : Window) return C_Int; - pragma Import (C, GetBegX, "getbegx"); - -- Y : constant C_Short := C_Short (GetBegY (Win)); -- X : constant C_Short := C_Short (GetBegX (Win)); -+ Y : constant C_Short := C_Short (GetBegY (Win)); -+ X : constant C_Short := C_Short (GetBegX (Win)); - begin -- Top_Left_Line := Line_Position (Y); -- Top_Left_Column := Column_Position (X); -- end Get_Window_Position; -- -- procedure Get_Cursor_Position -- (Win : Window := Standard_Window; -- Line : out Line_Position; -- Column : out Column_Position) -+ Top_Left_Line := Line_Position (Y); -+ Top_Left_Column := Column_Position (X); -+ end Get_Window_Position; -+ -+ procedure Get_Cursor_Position -+ (Win : Window := Standard_Window; -+ Line : out Line_Position; -+ Column : out Column_Position) - is - function GetCurY (W : Window) return C_Int; - pragma Import (C, GetCurY, "getcury"); -@@ -1393,18 +1393,18 @@ - function GetCurX (W : Window) return C_Int; - pragma Import (C, GetCurX, "getcurx"); - -- Y : constant C_Short := C_Short (GetCurY (Win)); -- X : constant C_Short := C_Short (GetCurX (Win)); -+ Y : constant C_Short := C_Short (GetCurY (Win)); -+ X : constant C_Short := C_Short (GetCurX (Win)); - begin -- Line := Line_Position (Y); -- Column := Column_Position (X); -- end Get_Cursor_Position; -- -- procedure Get_Origin_Relative_To_Parent -- (Win : Window; -- Top_Left_Line : out Line_Position; -- Top_Left_Column : out Column_Position; -- Is_Not_A_Subwindow : out Boolean) -+ Line := Line_Position (Y); -+ Column := Column_Position (X); -+ end Get_Cursor_Position; -+ -+ procedure Get_Origin_Relative_To_Parent -+ (Win : Window; -+ Top_Left_Line : out Line_Position; -+ Top_Left_Column : out Column_Position; -+ Is_Not_A_Subwindow : out Boolean) - is - function GetParY (W : Window) return C_Int; - pragma Import (C, GetParY, "getpary"); -@@ -1412,41 +1412,41 @@ - function GetParX (W : Window) return C_Int; - pragma Import (C, GetParX, "getparx"); - -- Y : constant C_Int := GetParY (Win); -- X : constant C_Int := GetParX (Win); -+ Y : constant C_Int := GetParY (Win); -+ X : constant C_Int := GetParX (Win); - begin - if Y = -1 then -- Top_Left_Line := Line_Position'Last; -- Top_Left_Column := Column_Position'Last; -- Is_Not_A_Subwindow := True; -- else -- Top_Left_Line := Line_Position (Y); -- Top_Left_Column := Column_Position (X); -- Is_Not_A_Subwindow := False; -+ Top_Left_Line := Line_Position'Last; -+ Top_Left_Column := Column_Position'Last; -+ Is_Not_A_Subwindow := True; -+ else -+ Top_Left_Line := Line_Position (Y); -+ Top_Left_Column := Column_Position (X); -+ Is_Not_A_Subwindow := False; - end if; -- end Get_Origin_Relative_To_Parent; -+ end Get_Origin_Relative_To_Parent; - ------------------------------------------------------------------------------ -- function New_Pad (Lines : Line_Count; -- Columns : Column_Count) return Window -+ function New_Pad (Lines : Line_Count; -+ Columns : Column_Count) return Window - is - function Newpad (Lines : C_Int; Columns : C_Int) return Window; - pragma Import (C, Newpad, "newpad"); - - W : Window; - begin -- W := Newpad (C_Int (Lines), C_Int (Columns)); -+ W := Newpad (C_Int (Lines), C_Int (Columns)); - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return W; -- end New_Pad; -+ end New_Pad; - -- function Sub_Pad -- (Pad : Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window -+ function Sub_Pad -+ (Pad : Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window - is - function Subpad - (Pad : Window; -@@ -1458,25 +1458,25 @@ - - W : Window; - begin -- W := Subpad (Pad, -- C_Int (Number_Of_Lines), -- C_Int (Number_Of_Columns), -- C_Int (First_Line_Position), -- C_Int (First_Column_Position)); -+ W := Subpad (Pad, -+ C_Int (Number_Of_Lines), -+ C_Int (Number_Of_Columns), -+ C_Int (First_Line_Position), -+ C_Int (First_Column_Position)); - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return W; -- end Sub_Pad; -+ end Sub_Pad; - -- procedure Refresh -- (Pad : Window; -- Source_Top_Row : Line_Position; -- Source_Left_Column : Column_Position; -- Destination_Top_Row : Line_Position; -- Destination_Left_Column : Column_Position; -- Destination_Bottom_Row : Line_Position; -- Destination_Right_Column : Column_Position) -+ procedure Refresh -+ (Pad : Window; -+ Source_Top_Row : Line_Position; -+ Source_Left_Column : Column_Position; -+ Destination_Top_Row : Line_Position; -+ Destination_Left_Column : Column_Position; -+ Destination_Bottom_Row : Line_Position; -+ Destination_Right_Column : Column_Position) - is - function Prefresh - (Pad : Window; -@@ -1488,25 +1488,25 @@ - Destination_Right_Column : C_Int) return C_Int; - pragma Import (C, Prefresh, "prefresh"); - begin -- if Prefresh (Pad, -- C_Int (Source_Top_Row), -- C_Int (Source_Left_Column), -- C_Int (Destination_Top_Row), -- C_Int (Destination_Left_Column), -- C_Int (Destination_Bottom_Row), -- C_Int (Destination_Right_Column)) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Refresh; -- -- procedure Refresh_Without_Update -- (Pad : Window; -- Source_Top_Row : Line_Position; -- Source_Left_Column : Column_Position; -- Destination_Top_Row : Line_Position; -- Destination_Left_Column : Column_Position; -- Destination_Bottom_Row : Line_Position; -- Destination_Right_Column : Column_Position) -+ if Prefresh (Pad, -+ C_Int (Source_Top_Row), -+ C_Int (Source_Left_Column), -+ C_Int (Destination_Top_Row), -+ C_Int (Destination_Left_Column), -+ C_Int (Destination_Bottom_Row), -+ C_Int (Destination_Right_Column)) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Refresh; -+ -+ procedure Refresh_Without_Update -+ (Pad : Window; -+ Source_Top_Row : Line_Position; -+ Source_Left_Column : Column_Position; -+ Destination_Top_Row : Line_Position; -+ Destination_Left_Column : Column_Position; -+ Destination_Bottom_Row : Line_Position; -+ Destination_Right_Column : Column_Position) - is - function Pnoutrefresh - (Pad : Window; -@@ -1518,118 +1518,118 @@ - Destination_Right_Column : C_Int) return C_Int; - pragma Import (C, Pnoutrefresh, "pnoutrefresh"); - begin -- if Pnoutrefresh (Pad, -- C_Int (Source_Top_Row), -- C_Int (Source_Left_Column), -- C_Int (Destination_Top_Row), -- C_Int (Destination_Left_Column), -- C_Int (Destination_Bottom_Row), -- C_Int (Destination_Right_Column)) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Refresh_Without_Update; -- -- procedure Add_Character_To_Pad_And_Echo_It -- (Pad : Window; -- Ch : Attributed_Character) -+ if Pnoutrefresh (Pad, -+ C_Int (Source_Top_Row), -+ C_Int (Source_Left_Column), -+ C_Int (Destination_Top_Row), -+ C_Int (Destination_Left_Column), -+ C_Int (Destination_Bottom_Row), -+ C_Int (Destination_Right_Column)) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Refresh_Without_Update; -+ -+ procedure Add_Character_To_Pad_And_Echo_It -+ (Pad : Window; -+ Ch : Attributed_Character) - is - function Pechochar (Pad : Window; Ch : C_Chtype) - return C_Int; - pragma Import (C, Pechochar, "pechochar"); - begin -- if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -+ if Pechochar (Pad, AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Add_Character_To_Pad_And_Echo_It; -+ end Add_Character_To_Pad_And_Echo_It; - -- procedure Add_Character_To_Pad_And_Echo_It -- (Pad : Window; -- Ch : Character) -+ procedure Add_Character_To_Pad_And_Echo_It -+ (Pad : Window; -+ Ch : Character) - is - begin -- Add_Character_To_Pad_And_Echo_It -- (Pad, -- Attributed_Character'(Ch => Ch, -- Color => Color_Pair'First, -- Attr => Normal_Video)); -- end Add_Character_To_Pad_And_Echo_It; -+ Add_Character_To_Pad_And_Echo_It -+ (Pad, -+ Attributed_Character'(Ch => Ch, -+ Color => Color_Pair'First, -+ Attr => Normal_Video)); -+ end Add_Character_To_Pad_And_Echo_It; - ------------------------------------------------------------------------------ -- procedure Scroll (Win : Window := Standard_Window; -- Amount : Integer := 1) -+ procedure Scroll (Win : Window := Standard_Window; -+ Amount : Integer := 1) - is - function Wscrl (Win : Window; N : C_Int) return C_Int; - pragma Import (C, Wscrl, "wscrl"); - - begin -- if Wscrl (Win, C_Int (Amount)) = Curses_Err then -- raise Curses_Exception; -+ if Wscrl (Win, C_Int (Amount)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Scroll; -+ end Scroll; - - ------------------------------------------------------------------------------ -- procedure Delete_Character (Win : Window := Standard_Window) -+ procedure Delete_Character (Win : Window := Standard_Window) - is - function Wdelch (Win : Window) return C_Int; - pragma Import (C, Wdelch, "wdelch"); - begin -- if Wdelch (Win) = Curses_Err then -- raise Curses_Exception; -+ if Wdelch (Win) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Delete_Character; -+ end Delete_Character; - -- procedure Delete_Character -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position) -+ procedure Delete_Character -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position) - is - function Mvwdelch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Mvwdelch, "mvwdelch"); - begin -- if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -- raise Curses_Exception; -+ if Mvwdelch (Win, C_Int (Line), C_Int (Column)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Delete_Character; -+ end Delete_Character; - ------------------------------------------------------------------------------ -- function Peek (Win : Window := Standard_Window) -- return Attributed_Character -+ function Peek (Win : Window := Standard_Window) -+ return Attributed_Character - is - function Winch (Win : Window) return C_Chtype; - pragma Import (C, Winch, "winch"); - begin -- return Chtype_To_AttrChar (Winch (Win)); -- end Peek; -+ return Chtype_To_AttrChar (Winch (Win)); -+ end Peek; - -- function Peek -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position) return Attributed_Character -+ function Peek -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position) return Attributed_Character - is - function Mvwinch (Win : Window; - Lin : C_Int; - Col : C_Int) return C_Chtype; - pragma Import (C, Mvwinch, "mvwinch"); - begin -- return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); -- end Peek; -+ return Chtype_To_AttrChar (Mvwinch (Win, C_Int (Line), C_Int (Column))); -+ end Peek; - ------------------------------------------------------------------------------ -- procedure Insert (Win : Window := Standard_Window; -- Ch : Attributed_Character) -+ procedure Insert (Win : Window := Standard_Window; -+ Ch : Attributed_Character) - is - function Winsch (Win : Window; Ch : C_Chtype) return C_Int; - pragma Import (C, Winsch, "winsch"); - begin -- if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -+ if Winsch (Win, AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Insert; -+ end Insert; - -- procedure Insert -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Ch : Attributed_Character) -+ procedure Insert -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Ch : Attributed_Character) - is - function Mvwinsch (Win : Window; - Lin : C_Int; -@@ -1637,38 +1637,38 @@ - Ch : C_Chtype) return C_Int; - pragma Import (C, Mvwinsch, "mvwinsch"); - begin -- if Mvwinsch (Win, -- C_Int (Line), -- C_Int (Column), -- AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Insert; -------------------------------------------------------------------------------- -- procedure Insert (Win : Window := Standard_Window; -- Str : String; -- Len : Integer := -1) -+ if Mvwinsch (Win, -+ C_Int (Line), -+ C_Int (Column), -+ AttrChar_To_Chtype (Ch)) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Insert; -+------------------------------------------------------------------------------ -+ procedure Insert (Win : Window := Standard_Window; -+ Str : String; -+ Len : Integer := -1) - is - function Winsnstr (Win : Window; - Str : char_array; - Len : Integer := -1) return C_Int; - pragma Import (C, Winsnstr, "winsnstr"); - -- Txt : char_array (0 .. Str'Length); -+ Txt : char_array (0 .. Str'Length); - Length : size_t; - begin -- To_C (Str, Txt, Length); -- if Winsnstr (Win, Txt, Len) = Curses_Err then -- raise Curses_Exception; -- end if; -- end Insert; -- -- procedure Insert -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : String; -- Len : Integer := -1) -+ To_C (Str, Txt, Length); -+ if Winsnstr (Win, Txt, Len) = Curses_Err then -+ raise Curses_Exception; -+ end if; -+ end Insert; -+ -+ procedure Insert -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : String; -+ Len : Integer := -1) - is - function Mvwinsnstr (Win : Window; - Line : C_Int; -@@ -1677,247 +1677,247 @@ - Len : C_Int) return C_Int; - pragma Import (C, Mvwinsnstr, "mvwinsnstr"); - -- Txt : char_array (0 .. Str'Length); -+ Txt : char_array (0 .. Str'Length); - Length : size_t; - begin -- To_C (Str, Txt, Length); -- if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) -+ To_C (Str, Txt, Length); -+ if Mvwinsnstr (Win, C_Int (Line), C_Int (Column), Txt, C_Int (Len)) - = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Insert; -+ end Insert; - ------------------------------------------------------------------------------ -- procedure Peek (Win : Window := Standard_Window; -- Str : out String; -- Len : Integer := -1) -+ procedure Peek (Win : Window := Standard_Window; -+ Str : out String; -+ Len : Integer := -1) - is - function Winnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Winnstr, "winnstr"); - -- N : Integer := Len; -- Txt : char_array (0 .. Str'Length); -+ N : Integer := Len; -+ Txt : char_array (0 .. Str'Length); - Cnt : Natural; - begin - if N < 0 then -- N := Str'Length; -+ N := Str'Length; - end if; -- if N > Str'Length then -+ if N > Str'Length then - raise Constraint_Error; - end if; - Txt (0) := Interfaces.C.char'First; -- if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then -- raise Curses_Exception; -+ if Winnstr (Win, Txt, C_Int (N)) = Curses_Err then -+ raise Curses_Exception; - end if; -- To_Ada (Txt, Str, Cnt, True); -- if Cnt < Str'Length then -- Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); -- end if; -- end Peek; -- -- procedure Peek -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : out String; -- Len : Integer := -1) -- is -- begin -- Move_Cursor (Win, Line, Column); -- Peek (Win, Str, Len); -- end Peek; -------------------------------------------------------------------------------- -- procedure Peek -- (Win : Window := Standard_Window; -- Str : out Attributed_String; -- Len : Integer := -1) -+ To_Ada (Txt, Str, Cnt, True); -+ if Cnt < Str'Length then -+ Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); -+ end if; -+ end Peek; -+ -+ procedure Peek -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : out String; -+ Len : Integer := -1) -+ is -+ begin -+ Move_Cursor (Win, Line, Column); -+ Peek (Win, Str, Len); -+ end Peek; -+------------------------------------------------------------------------------ -+ procedure Peek -+ (Win : Window := Standard_Window; -+ Str : out Attributed_String; -+ Len : Integer := -1) - is - function Winchnstr (Win : Window; - Str : chtype_array; -- out - Len : C_Int) return C_Int; - pragma Import (C, Winchnstr, "winchnstr"); - -- N : Integer := Len; -- Txt : constant chtype_array (0 .. Str'Length) -- := (0 => Default_Character); -+ N : Integer := Len; -+ Txt : constant chtype_array (0 .. Str'Length) -+ := (0 => Default_Character); - Cnt : Natural := 0; - begin - if N < 0 then -- N := Str'Length; -+ N := Str'Length; - end if; -- if N > Str'Length then -+ if N > Str'Length then - raise Constraint_Error; - end if; -- if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then -- raise Curses_Exception; -+ if Winchnstr (Win, Txt, C_Int (N)) = Curses_Err then -+ raise Curses_Exception; - end if; -- for To in Str'Range loop -- exit when Txt (size_t (Cnt)) = Default_Character; -- Str (To) := Txt (size_t (Cnt)); -+ for To in Str'Range loop -+ exit when Txt (size_t (Cnt)) = Default_Character; -+ Str (To) := Txt (size_t (Cnt)); - Cnt := Cnt + 1; - end loop; -- if Cnt < Str'Length then -- Str ((Str'First + Cnt) .. Str'Last) := -- (others => (Ch => ' ', -- Color => Color_Pair'First, -- Attr => Normal_Video)); -- end if; -- end Peek; -- -- procedure Peek -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : out Attributed_String; -- Len : Integer := -1) -- is -- begin -- Move_Cursor (Win, Line, Column); -- Peek (Win, Str, Len); -- end Peek; -------------------------------------------------------------------------------- -- procedure Get (Win : Window := Standard_Window; -- Str : out String; -- Len : Integer := -1) -+ if Cnt < Str'Length then -+ Str ((Str'First + Cnt) .. Str'Last) := -+ (others => (Ch => ' ', -+ Color => Color_Pair'First, -+ Attr => Normal_Video)); -+ end if; -+ end Peek; -+ -+ procedure Peek -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : out Attributed_String; -+ Len : Integer := -1) -+ is -+ begin -+ Move_Cursor (Win, Line, Column); -+ Peek (Win, Str, Len); -+ end Peek; -+------------------------------------------------------------------------------ -+ procedure Get (Win : Window := Standard_Window; -+ Str : out String; -+ Len : Integer := -1) - is - function Wgetnstr (Win : Window; - Str : char_array; - Len : C_Int) return C_Int; - pragma Import (C, Wgetnstr, "wgetnstr"); - -- N : Integer := Len; -- Txt : char_array (0 .. Str'Length); -+ N : Integer := Len; -+ Txt : char_array (0 .. Str'Length); - Cnt : Natural; - begin - if N < 0 then -- N := Str'Length; -+ N := Str'Length; - end if; -- if N > Str'Length then -+ if N > Str'Length then - raise Constraint_Error; - end if; - Txt (0) := Interfaces.C.char'First; -- if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then -- raise Curses_Exception; -+ if Wgetnstr (Win, Txt, C_Int (N)) = Curses_Err then -+ raise Curses_Exception; - end if; -- To_Ada (Txt, Str, Cnt, True); -- if Cnt < Str'Length then -- Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); -+ To_Ada (Txt, Str, Cnt, True); -+ if Cnt < Str'Length then -+ Str ((Str'First + Cnt) .. Str'Last) := (others => ' '); - end if; -- end Get; -+ end Get; - -- procedure Get -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : out String; -- Len : Integer := -1) -+ procedure Get -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : out String; -+ Len : Integer := -1) - is - begin -- Move_Cursor (Win, Line, Column); -- Get (Win, Str, Len); -- end Get; -+ Move_Cursor (Win, Line, Column); -+ Get (Win, Str, Len); -+ end Get; - ------------------------------------------------------------------------------ -- procedure Init_Soft_Label_Keys -- (Format : Soft_Label_Key_Format := Three_Two_Three) -+ procedure Init_Soft_Label_Keys -+ (Format : Soft_Label_Key_Format := Three_Two_Three) - is - function Slk_Init (Fmt : C_Int) return C_Int; - pragma Import (C, Slk_Init, "slk_init"); - begin -- if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then -- raise Curses_Exception; -+ if Slk_Init (Soft_Label_Key_Format'Pos (Format)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Init_Soft_Label_Keys; -+ end Init_Soft_Label_Keys; - -- procedure Set_Soft_Label_Key (Label : Label_Number; -- Text : String; -- Fmt : Label_Justification := Left) -+ procedure Set_Soft_Label_Key (Label : Label_Number; -+ Text : String; -+ Fmt : Label_Justification := Left) - is - function Slk_Set (Label : C_Int; - Txt : char_array; - Fmt : C_Int) return C_Int; - pragma Import (C, Slk_Set, "slk_set"); - -- Txt : char_array (0 .. Text'Length); -+ Txt : char_array (0 .. Text'Length); - Len : size_t; - begin -- To_C (Text, Txt, Len); -- if Slk_Set (C_Int (Label), Txt, -- C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then -- raise Curses_Exception; -+ To_C (Text, Txt, Len); -+ if Slk_Set (C_Int (Label), Txt, -+ C_Int (Label_Justification'Pos (Fmt))) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_Soft_Label_Key; -+ end Set_Soft_Label_Key; - -- procedure Refresh_Soft_Label_Keys -+ procedure Refresh_Soft_Label_Keys - is - function Slk_Refresh return C_Int; - pragma Import (C, Slk_Refresh, "slk_refresh"); - begin - if Slk_Refresh = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Refresh_Soft_Label_Keys; -+ end Refresh_Soft_Label_Keys; - -- procedure Refresh_Soft_Label_Keys_Without_Update -+ procedure Refresh_Soft_Label_Keys_Without_Update - is - function Slk_Noutrefresh return C_Int; - pragma Import (C, Slk_Noutrefresh, "slk_noutrefresh"); - begin - if Slk_Noutrefresh = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Refresh_Soft_Label_Keys_Without_Update; -+ end Refresh_Soft_Label_Keys_Without_Update; - -- procedure Get_Soft_Label_Key (Label : Label_Number; -- Text : out String) -+ procedure Get_Soft_Label_Key (Label : Label_Number; -+ Text : out String) - is - function Slk_Label (Label : C_Int) return chars_ptr; - pragma Import (C, Slk_Label, "slk_label"); - begin -- Fill_String (Slk_Label (C_Int (Label)), Text); -- end Get_Soft_Label_Key; -+ Fill_String (Slk_Label (C_Int (Label)), Text); -+ end Get_Soft_Label_Key; - -- function Get_Soft_Label_Key (Label : Label_Number) return String -+ function Get_Soft_Label_Key (Label : 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; -+ return Fill_String (Slk_Label (C_Int (Label))); -+ end Get_Soft_Label_Key; - -- procedure Clear_Soft_Label_Keys -+ procedure Clear_Soft_Label_Keys - is - function Slk_Clear return C_Int; - pragma Import (C, Slk_Clear, "slk_clear"); - begin - if Slk_Clear = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Clear_Soft_Label_Keys; -+ end Clear_Soft_Label_Keys; - -- procedure Restore_Soft_Label_Keys -+ procedure Restore_Soft_Label_Keys - is - function Slk_Restore return C_Int; - pragma Import (C, Slk_Restore, "slk_restore"); - begin - if Slk_Restore = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Restore_Soft_Label_Keys; -+ end Restore_Soft_Label_Keys; - -- procedure Touch_Soft_Label_Keys -+ procedure Touch_Soft_Label_Keys - is - function Slk_Touch return C_Int; - pragma Import (C, Slk_Touch, "slk_touch"); - begin - if Slk_Touch = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Touch_Soft_Label_Keys; -+ end Touch_Soft_Label_Keys; - -- procedure Switch_Soft_Label_Key_Attributes -- (Attr : Character_Attribute_Set; -- On : Boolean := True) -+ procedure Switch_Soft_Label_Key_Attributes -+ (Attr : Character_Attribute_Set; -+ On : Boolean := True) - is - function Slk_Attron (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attron, "slk_attron"); -@@ -1925,158 +1925,158 @@ - pragma Import (C, Slk_Attroff, "slk_attroff"); - - Err : C_Int; -- Ch : constant Attributed_Character := (Ch => Character'First, -- Attr => Attr, -- Color => Color_Pair'First); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Attr => Attr, -+ Color => Color_Pair'First); - begin -- if On then -+ if On then - Err := Slk_Attron (AttrChar_To_Chtype (Ch)); - else - Err := Slk_Attroff (AttrChar_To_Chtype (Ch)); - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Switch_Soft_Label_Key_Attributes; -+ end Switch_Soft_Label_Key_Attributes; - -- procedure Set_Soft_Label_Key_Attributes -- (Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Set_Soft_Label_Key_Attributes -+ (Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Slk_Attrset (Ch : C_Chtype) return C_Int; - pragma Import (C, Slk_Attrset, "slk_attrset"); - -- Ch : constant Attributed_Character := (Ch => Character'First, -- Attr => Attr, -- Color => Color); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Attr => Attr, -+ Color => Color); - begin - if Slk_Attrset (AttrChar_To_Chtype (Ch)) = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Set_Soft_Label_Key_Attributes; -+ end Set_Soft_Label_Key_Attributes; - -- function Get_Soft_Label_Key_Attributes return Character_Attribute_Set -+ function Get_Soft_Label_Key_Attributes return Character_Attribute_Set - is - function Slk_Attr return C_Chtype; - pragma Import (C, Slk_Attr, "slk_attr"); - - Attr : constant C_Chtype := Slk_Attr; - begin -- return Chtype_To_AttrChar (Attr).Attr; -- end Get_Soft_Label_Key_Attributes; -+ return Chtype_To_AttrChar (Attr).Attr; -+ end Get_Soft_Label_Key_Attributes; - -- function Get_Soft_Label_Key_Attributes return Color_Pair -+ function Get_Soft_Label_Key_Attributes return Color_Pair - is - function Slk_Attr return C_Chtype; - pragma Import (C, Slk_Attr, "slk_attr"); - - Attr : constant C_Chtype := Slk_Attr; - begin -- return Chtype_To_AttrChar (Attr).Color; -- end Get_Soft_Label_Key_Attributes; -+ return Chtype_To_AttrChar (Attr).Color; -+ end Get_Soft_Label_Key_Attributes; - -- procedure Set_Soft_Label_Key_Color (Pair : Color_Pair) -+ procedure Set_Soft_Label_Key_Color (Pair : Color_Pair) - is - function Slk_Color (Color : C_Short) return C_Int; - pragma Import (C, Slk_Color, "slk_color"); - begin -- if Slk_Color (C_Short (Pair)) = Curses_Err then -- raise Curses_Exception; -+ if Slk_Color (C_Short (Pair)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Set_Soft_Label_Key_Color; -+ end Set_Soft_Label_Key_Color; - - ------------------------------------------------------------------------------ -- procedure Enable_Key (Key : Special_Key_Code; -- Enable : Boolean := True) -+ procedure Enable_Key (Key : Special_Key_Code; -+ Enable : Boolean := True) - is - function Keyok (Keycode : C_Int; - On_Off : Curses_Bool) return C_Int; - pragma Import (C, Keyok, "keyok"); - begin -- if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) -+ if Keyok (C_Int (Key), Curses_Bool (Boolean'Pos (Enable))) - = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Enable_Key; -+ end Enable_Key; - ------------------------------------------------------------------------------ -- procedure Define_Key (Definition : String; -- Key : Special_Key_Code) -+ procedure Define_Key (Definition : String; -+ Key : Special_Key_Code) - is - function Defkey (Def : char_array; - Key : C_Int) return C_Int; - pragma Import (C, Defkey, "define_key"); - -- Txt : char_array (0 .. Definition'Length); -+ Txt : char_array (0 .. Definition'Length); - Length : size_t; - begin -- To_C (Definition, Txt, Length); -- if Defkey (Txt, C_Int (Key)) = Curses_Err then -- raise Curses_Exception; -+ To_C (Definition, Txt, Length); -+ if Defkey (Txt, C_Int (Key)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Define_Key; -+ end Define_Key; - ------------------------------------------------------------------------------ -- procedure Un_Control (Ch : Attributed_Character; -- Str : out String) -+ procedure Un_Control (Ch : Attributed_Character; -+ Str : out String) - is - function Unctrl (Ch : C_Chtype) return chars_ptr; - pragma Import (C, Unctrl, "unctrl"); - begin -- Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); -- end Un_Control; -+ Fill_String (Unctrl (AttrChar_To_Chtype (Ch)), Str); -+ end Un_Control; - -- function Un_Control (Ch : Attributed_Character) return String -+ function Un_Control (Ch : Attributed_Character) return String - is - function Unctrl (Ch : C_Chtype) return chars_ptr; - pragma Import (C, Unctrl, "unctrl"); - begin -- return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); -- end Un_Control; -+ return Fill_String (Unctrl (AttrChar_To_Chtype (Ch))); -+ end Un_Control; - -- procedure Delay_Output (Msecs : Natural) -+ procedure Delay_Output (Msecs : Natural) - is - function Delayoutput (Msecs : C_Int) return C_Int; - pragma Import (C, Delayoutput, "delay_output"); - begin -- if Delayoutput (C_Int (Msecs)) = Curses_Err then -- raise Curses_Exception; -+ if Delayoutput (C_Int (Msecs)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Delay_Output; -+ end Delay_Output; - -- procedure Flush_Input -+ procedure Flush_Input - is - function Flushinp return C_Int; - pragma Import (C, Flushinp, "flushinp"); - begin - if Flushinp = Curses_Err then -- docu says that never happens, but... -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Flush_Input; -+ end Flush_Input; - ------------------------------------------------------------------------------ -- function Baudrate return Natural -+ function Baudrate return Natural - is - function Baud return C_Int; - pragma Import (C, Baud, "baudrate"); - begin - return Natural (Baud); -- end Baudrate; -+ end Baudrate; - -- function Erase_Character return Character -+ function Erase_Character return Character - is - function Erasechar return C_Int; - pragma Import (C, Erasechar, "erasechar"); - begin - return Character'Val (Erasechar); -- end Erase_Character; -+ end Erase_Character; - -- function Kill_Character return Character -+ function Kill_Character return Character - is - function Killchar return C_Int; - pragma Import (C, Killchar, "killchar"); - begin - return Character'Val (Killchar); -- end Kill_Character; -+ end Kill_Character; - -- function Has_Insert_Character return Boolean -+ function Has_Insert_Character return Boolean - is - function Has_Ic return Curses_Bool; - pragma Import (C, Has_Ic, "has_ic"); -@@ -2086,9 +2086,9 @@ - else - return True; - end if; -- end Has_Insert_Character; -+ end Has_Insert_Character; - -- function Has_Insert_Line return Boolean -+ function Has_Insert_Line return Boolean - is - function Has_Il return Curses_Bool; - pragma Import (C, Has_Il, "has_il"); -@@ -2098,75 +2098,75 @@ - else - return True; - end if; -- end Has_Insert_Line; -+ end Has_Insert_Line; - -- function Supported_Attributes return Character_Attribute_Set -+ function Supported_Attributes return Character_Attribute_Set - is - function Termattrs return C_Chtype; - pragma Import (C, Termattrs, "termattrs"); - -- Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); -+ Ch : constant Attributed_Character := Chtype_To_AttrChar (Termattrs); - begin -- return Ch.Attr; -- end Supported_Attributes; -+ return Ch.Attr; -+ end Supported_Attributes; - -- procedure Long_Name (Name : out String) -+ procedure Long_Name (Name : out String) - is - function Longname return chars_ptr; - pragma Import (C, Longname, "longname"); - begin -- Fill_String (Longname, Name); -- end Long_Name; -+ Fill_String (Longname, Name); -+ end Long_Name; - -- function Long_Name return String -+ function Long_Name return String - is - function Longname return chars_ptr; - pragma Import (C, Longname, "longname"); - begin - return Fill_String (Longname); -- end Long_Name; -+ end Long_Name; - -- procedure Terminal_Name (Name : out String) -+ procedure Terminal_Name (Name : out String) - is - function Termname return chars_ptr; - pragma Import (C, Termname, "termname"); - begin -- Fill_String (Termname, Name); -- end Terminal_Name; -+ Fill_String (Termname, Name); -+ end Terminal_Name; - -- function Terminal_Name return String -+ function Terminal_Name return String - is - function Termname return chars_ptr; - pragma Import (C, Termname, "termname"); - begin - return Fill_String (Termname); -- end Terminal_Name; -+ end Terminal_Name; - ------------------------------------------------------------------------------ -- procedure Init_Pair (Pair : Redefinable_Color_Pair; -- Fore : Color_Number; -- Back : Color_Number) -+ procedure Init_Pair (Pair : Redefinable_Color_Pair; -+ Fore : Color_Number; -+ Back : Color_Number) - is - function Initpair (Pair : C_Short; - Fore : C_Short; - Back : C_Short) return C_Int; - pragma Import (C, Initpair, "init_pair"); - begin -- if Integer (Pair) >= Number_Of_Color_Pairs then -+ if Integer (Pair) >= Number_Of_Color_Pairs then - raise Constraint_Error; - end if; -- if Integer (Fore) >= Number_Of_Colors or else -- Integer (Back) >= Number_Of_Colors then -+ if Integer (Fore) >= Number_Of_Colors or else -+ Integer (Back) >= Number_Of_Colors then - raise Constraint_Error; - end if; -- if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) -+ if Initpair (C_Short (Pair), C_Short (Fore), C_Short (Back)) - = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Init_Pair; -+ end Init_Pair; - -- procedure Pair_Content (Pair : Color_Pair; -- Fore : out Color_Number; -- Back : out Color_Number) -+ procedure Pair_Content (Pair : Color_Pair; -+ Fore : out Color_Number; -+ Back : out Color_Number) - is - type C_Short_Access is access all C_Short; - function Paircontent (Pair : C_Short; -@@ -2176,15 +2176,15 @@ - - F, B : aliased C_Short; - begin -- if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then -- raise Curses_Exception; -+ if Paircontent (C_Short (Pair), F'Access, B'Access) = Curses_Err then -+ raise Curses_Exception; - else -- Fore := Color_Number (F); -- Back := Color_Number (B); -+ Fore := Color_Number (F); -+ Back := Color_Number (B); - end if; -- end Pair_Content; -+ end Pair_Content; - -- function Has_Colors return Boolean -+ function Has_Colors return Boolean - is - function Hascolors return Curses_Bool; - pragma Import (C, Hascolors, "has_colors"); -@@ -2194,12 +2194,12 @@ - else - return True; - end if; -- end Has_Colors; -+ end Has_Colors; - -- procedure Init_Color (Color : Color_Number; -- Red : RGB_Value; -- Green : RGB_Value; -- Blue : RGB_Value) -+ procedure Init_Color (Color : Color_Number; -+ Red : RGB_Value; -+ Green : RGB_Value; -+ Blue : RGB_Value) - is - function Initcolor (Col : C_Short; - Red : C_Short; -@@ -2207,13 +2207,13 @@ - Blue : C_Short) return C_Int; - pragma Import (C, Initcolor, "init_color"); - begin -- if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), -- C_Short (Blue)) = Curses_Err then -- raise Curses_Exception; -+ if Initcolor (C_Short (Color), C_Short (Red), C_Short (Green), -+ C_Short (Blue)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Init_Color; -+ end Init_Color; - -- function Can_Change_Color return Boolean -+ function Can_Change_Color return Boolean - is - function Canchangecolor return Curses_Bool; - pragma Import (C, Canchangecolor, "can_change_color"); -@@ -2223,12 +2223,12 @@ - else - return True; - end if; -- end Can_Change_Color; -+ end Can_Change_Color; - -- procedure Color_Content (Color : Color_Number; -- Red : out RGB_Value; -- Green : out RGB_Value; -- Blue : out RGB_Value) -+ procedure Color_Content (Color : Color_Number; -+ Red : out RGB_Value; -+ Green : out RGB_Value; -+ Blue : out RGB_Value) - is - type C_Short_Access is access all C_Short; - -@@ -2238,18 +2238,18 @@ - - R, G, B : aliased C_Short; - begin -- if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = -+ if Colorcontent (C_Short (Color), R'Access, G'Access, B'Access) = - Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - else -- Red := RGB_Value (R); -- Green := RGB_Value (G); -- Blue := RGB_Value (B); -+ Red := RGB_Value (R); -+ Green := RGB_Value (G); -+ Blue := RGB_Value (B); - end if; -- end Color_Content; -+ end Color_Content; - - ------------------------------------------------------------------------------ -- procedure Save_Curses_Mode (Mode : Curses_Mode) -+ procedure Save_Curses_Mode (Mode : Curses_Mode) - is - function Def_Prog_Mode return C_Int; - pragma Import (C, Def_Prog_Mode, "def_prog_mode"); -@@ -2258,16 +2258,16 @@ - - Err : C_Int; - begin -- case Mode is -- when Curses => Err := Def_Prog_Mode; -- when Shell => Err := Def_Shell_Mode; -+ case Mode is -+ when Curses => Err := Def_Prog_Mode; -+ when Shell => Err := Def_Shell_Mode; - end case; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Save_Curses_Mode; -+ end Save_Curses_Mode; - -- procedure Reset_Curses_Mode (Mode : Curses_Mode) -+ procedure Reset_Curses_Mode (Mode : Curses_Mode) - is - function Reset_Prog_Mode return C_Int; - pragma Import (C, Reset_Prog_Mode, "reset_prog_mode"); -@@ -2276,133 +2276,133 @@ - - Err : C_Int; - begin -- case Mode is -- when Curses => Err := Reset_Prog_Mode; -- when Shell => Err := Reset_Shell_Mode; -+ case Mode is -+ when Curses => Err := Reset_Prog_Mode; -+ when Shell => Err := Reset_Shell_Mode; - end case; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Reset_Curses_Mode; -+ end Reset_Curses_Mode; - -- procedure Save_Terminal_State -+ procedure Save_Terminal_State - is - function Savetty return C_Int; - pragma Import (C, Savetty, "savetty"); - begin - if Savetty = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Save_Terminal_State; -+ end Save_Terminal_State; - -- procedure Reset_Terminal_State -+ procedure Reset_Terminal_State - is - function Resetty return C_Int; - pragma Import (C, Resetty, "resetty"); - begin - if Resetty = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Reset_Terminal_State; -+ end Reset_Terminal_State; - -- procedure Rip_Off_Lines (Lines : Integer; -- Proc : Stdscr_Init_Proc) -+ procedure Rip_Off_Lines (Lines : Integer; -+ Proc : Stdscr_Init_Proc) - is - function Ripoffline (Lines : C_Int; -- Proc : Stdscr_Init_Proc) return C_Int; -+ Proc : Stdscr_Init_Proc) return C_Int; - pragma Import (C, Ripoffline, "_nc_ripoffline"); - begin -- if Ripoffline (C_Int (Lines), Proc) = Curses_Err then -- raise Curses_Exception; -+ if Ripoffline (C_Int (Lines), Proc) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Rip_Off_Lines; -+ end Rip_Off_Lines; - -- procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) -+ procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility) - is - function Curs_Set (Curs : C_Int) return C_Int; - pragma Import (C, Curs_Set, "curs_set"); - - Res : C_Int; - begin -- Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); -+ Res := Curs_Set (Cursor_Visibility'Pos (Visibility)); - if Res /= Curses_Err then -- Visibility := Cursor_Visibility'Val (Res); -+ Visibility := Cursor_Visibility'Val (Res); - end if; -- end Set_Cursor_Visibility; -+ end Set_Cursor_Visibility; - -- procedure Nap_Milli_Seconds (Ms : Natural) -+ procedure Nap_Milli_Seconds (Ms : Natural) - is - function Napms (Ms : C_Int) return C_Int; - pragma Import (C, Napms, "napms"); - begin -- if Napms (C_Int (Ms)) = Curses_Err then -- raise Curses_Exception; -+ if Napms (C_Int (Ms)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Nap_Milli_Seconds; -+ end Nap_Milli_Seconds; - ------------------------------------------------------------------------------ - -- function Standard_Window return Window -+ function Standard_Window return Window - is - Result : Window; - pragma Import (C, Result, "stdscr"); - begin - return Result; -- end Standard_Window; -+ end Standard_Window; - -- function Current_Window return Window -+ function Current_Window return Window - is - Result : Window; - pragma Import (C, Result, "curscr"); - begin - return Result; -- end Current_Window; -+ end Current_Window; - -- function Lines return Line_Count -+ function Lines return Line_Count - is - Result : C_Int; - pragma Import (C, Result, "LINES"); - begin - return Line_Count (Result); -- end Lines; -+ end Lines; - -- function Columns return Column_Count -+ function Columns return Column_Count - is - Result : C_Int; - pragma Import (C, Result, "COLS"); - begin - return Column_Count (Result); -- end Columns; -+ end Columns; - -- function Tab_Size return Natural -+ function Tab_Size return Natural - is - Result : C_Int; - pragma Import (C, Result, "TABSIZE"); - begin - return Natural (Result); -- end Tab_Size; -+ end Tab_Size; - -- function Number_Of_Colors return Natural -+ function Number_Of_Colors return Natural - is - Result : C_Int; - pragma Import (C, Result, "COLORS"); - begin - return Natural (Result); -- end Number_Of_Colors; -+ end Number_Of_Colors; - -- function Number_Of_Color_Pairs return Natural -+ function Number_Of_Color_Pairs return Natural - is - Result : C_Int; - pragma Import (C, Result, "COLOR_PAIRS"); - begin - return Natural (Result); -- end Number_Of_Color_Pairs; -+ end Number_Of_Color_Pairs; - - ------------------------------------------------------------------------------ -- procedure Transform_Coordinates -- (W : Window := Standard_Window; -- Line : in out Line_Position; -- Column : in out Column_Position; -- Dir : Transform_Direction := From_Screen) -+ procedure Transform_Coordinates -+ (W : Window := Standard_Window; -+ Line : in out Line_Position; -+ Column : in out Column_Position; -+ Dir : Transform_Direction := From_Screen) - is - type Int_Access is access all C_Int; - function Transform (W : Window; -@@ -2410,58 +2410,58 @@ - Dir : Curses_Bool) return C_Int; - pragma Import (C, Transform, "wmouse_trafo"); - -- X : aliased C_Int := C_Int (Column); -- Y : aliased C_Int := C_Int (Line); -+ X : aliased C_Int := C_Int (Column); -+ Y : aliased C_Int := C_Int (Line); - D : Curses_Bool := Curses_Bool_False; - R : C_Int; - begin -- if Dir = To_Screen then -+ if Dir = To_Screen then - D := 1; - end if; -- R := Transform (W, Y'Access, X'Access, D); -+ R := Transform (W, Y'Access, X'Access, D); - if R = Curses_False then -- raise Curses_Exception; -+ raise Curses_Exception; - else -- Line := Line_Position (Y); -- Column := Column_Position (X); -+ Line := Line_Position (Y); -+ Column := Column_Position (X); - end if; -- end Transform_Coordinates; -+ end Transform_Coordinates; - ------------------------------------------------------------------------------ -- procedure Use_Default_Colors is -+ procedure Use_Default_Colors is - function C_Use_Default_Colors return C_Int; - pragma Import (C, C_Use_Default_Colors, "use_default_colors"); - Err : constant C_Int := C_Use_Default_Colors; - begin - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Use_Default_Colors; -+ end Use_Default_Colors; - -- procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; -- Back : Color_Number := Default_Color) -+ procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; -+ Back : Color_Number := Default_Color) - is - function C_Assume_Default_Colors (Fore : C_Int; - Back : C_Int) return C_Int; - pragma Import (C, C_Assume_Default_Colors, "assume_default_colors"); - -- Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), -- C_Int (Back)); -+ Err : constant C_Int := C_Assume_Default_Colors (C_Int (Fore), -+ C_Int (Back)); - begin - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Assume_Default_Colors; -+ end Assume_Default_Colors; - ------------------------------------------------------------------------------ -- function Curses_Version return String -+ function Curses_Version return String - is - function curses_versionC return chars_ptr; - pragma Import (C, curses_versionC, "curses_version"); - Result : constant chars_ptr := curses_versionC; - begin - return Fill_String (Result); -- end Curses_Version; -+ end Curses_Version; - ------------------------------------------------------------------------------ -- procedure Curses_Free_All is -+ procedure Curses_Free_All is - procedure curses_freeall; - pragma Import (C, curses_freeall, "_nc_freeall"); - begin -@@ -2473,89 +2473,89 @@ - -- safely only from C - and again, that only as the "last" thing done - -- before exiting the program. - curses_freeall; -- end Curses_Free_All; -+ end Curses_Free_All; - ------------------------------------------------------------------------------ -- function Use_Extended_Names (Enable : Boolean) return Boolean -+ function Use_Extended_Names (Enable : Boolean) return Boolean - is - function use_extended_namesC (e : Curses_Bool) return C_Int; - pragma Import (C, use_extended_namesC, "use_extended_names"); - - Res : constant C_Int := -- use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); -+ use_extended_namesC (Curses_Bool (Boolean'Pos (Enable))); - begin - if Res = C_Int (Curses_Bool_False) then - return False; - else - return True; - end if; -- end Use_Extended_Names; -+ end Use_Extended_Names; - ------------------------------------------------------------------------------ -- procedure Screen_Dump_To_File (Filename : String) -+ procedure Screen_Dump_To_File (Filename : String) - is - function scr_dump (f : char_array) return C_Int; - pragma Import (C, scr_dump, "scr_dump"); -- Txt : char_array (0 .. Filename'Length); -+ Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin -- To_C (Filename, Txt, Length); -+ To_C (Filename, Txt, Length); - if Curses_Err = scr_dump (Txt) then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Screen_Dump_To_File; -+ end Screen_Dump_To_File; - -- procedure Screen_Restore_From_File (Filename : String) -+ procedure Screen_Restore_From_File (Filename : String) - is - function scr_restore (f : char_array) return C_Int; - pragma Import (C, scr_restore, "scr_restore"); -- Txt : char_array (0 .. Filename'Length); -+ Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin -- To_C (Filename, Txt, Length); -+ To_C (Filename, Txt, Length); - if Curses_Err = scr_restore (Txt) then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Screen_Restore_From_File; -+ end Screen_Restore_From_File; - -- procedure Screen_Init_From_File (Filename : String) -+ procedure Screen_Init_From_File (Filename : String) - is - function scr_init (f : char_array) return C_Int; - pragma Import (C, scr_init, "scr_init"); -- Txt : char_array (0 .. Filename'Length); -+ Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin -- To_C (Filename, Txt, Length); -+ To_C (Filename, Txt, Length); - if Curses_Err = scr_init (Txt) then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Screen_Init_From_File; -+ end Screen_Init_From_File; - -- procedure Screen_Set_File (Filename : String) -+ procedure Screen_Set_File (Filename : String) - is - function scr_set (f : char_array) return C_Int; - pragma Import (C, scr_set, "scr_set"); -- Txt : char_array (0 .. Filename'Length); -+ Txt : char_array (0 .. Filename'Length); - Length : size_t; - begin -- To_C (Filename, Txt, Length); -+ To_C (Filename, Txt, Length); - if Curses_Err = scr_set (Txt) then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; -- end Screen_Set_File; -+ end Screen_Set_File; - ------------------------------------------------------------------------------ -- procedure Resize (Win : Window := Standard_Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count) is -+ procedure Resize (Win : Window := Standard_Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count) is - function wresize (win : Window; - lines : C_Int; - columns : C_Int) return C_Int; - pragma Import (C, wresize); - begin -- if wresize (Win, -- C_Int (Number_Of_Lines), -- C_Int (Number_Of_Columns)) = Curses_Err then -- raise Curses_Exception; -+ if wresize (Win, -+ C_Int (Number_Of_Lines), -+ C_Int (Number_Of_Columns)) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Resize; -+ end Resize; - ------------------------------------------------------------------------------ - - end Terminal_Interface.Curses; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses__ads.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses__ads.htm 2011-03-26 22:54:31.000000000 +0100 -@@ -12,7 +12,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.42 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.44 @ -+-- @Date: 2011/03/19 23:05:56 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - -- curses binding. -@@ -62,8 +62,8 @@ - type Window is private; - Null_Window : constant Window; - -- type Line_Position is new Natural; -- line coordinate -- type Column_Position is new Natural; -- column coordinate -+ type Line_Position is new Integer; -- line coordinate -+ type Column_Position is new Integer; -- column coordinate - - subtype Line_Count is Line_Position range 1 .. Line_Position'Last; - -- Type to count lines. We do not allow null windows, so must be positive -@@ -326,6 +326,7 @@ - Right : Boolean; - Top : Boolean; - Vertical : Boolean; -+ Unused : Boolean; - end record; - pragma Convention (C, Character_Attribute_Set); - -@@ -346,65 +347,66 @@ - Right at 0 range 12 .. 12; - Top at 0 range 13 .. 13; - Vertical at 0 range 14 .. 14; -+ Unused at 0 range 15 .. 15; - end record; - for Character_Attribute_Set'Size use 16; - -- Please note: this rep. clause is generated and may be - -- different on your system. - -- (n)curses uses all but the lowest 16 Bits for Attributes. - -- Normal_Video : constant Character_Attribute_Set := (others => False); -+ Normal_Video : constant Character_Attribute_Set := (others => False); - -- type Attributed_Character is -+ type Attributed_Character is - record -- Attr : Character_Attribute_Set; -- Color : Color_Pair; -- Ch : Character; -+ Attr : Character_Attribute_Set; -+ Color : Color_Pair; -+ Ch : Character; - end record; -- pragma Convention (C, Attributed_Character); -+ pragma Convention (C, Attributed_Character); - -- This is the counterpart for the chtype in C. - -- for Attributed_Character use -+ for Attributed_Character use - record -- Ch at 0 range 0 .. 7; -- Color at 0 range 8 .. 15; -- Attr at 0 range 16 .. 31; -+ Ch at 0 range 0 .. 7; -+ Color at 0 range 8 .. 15; -+ Attr at 0 range 16 .. 31; - end record; -- for Attributed_Character'Size use 32; -+ for Attributed_Character'Size use 32; - -- Please note: this rep. clause is generated and may be - -- different on your system. - -- Default_Character : constant Attributed_Character -- := (Ch => Character'First, -- Color => Color_Pair'First, -- Attr => (others => False)); -- preelaboratable Normal_Video -+ Default_Character : constant Attributed_Character -+ := (Ch => Character'First, -+ Color => Color_Pair'First, -+ Attr => (others => False)); -- preelaboratable Normal_Video - -- type Attributed_String is array (Positive range <>) of Attributed_Character; -+ type Attributed_String is array (Positive range <>) of Attributed_Character; - pragma Pack (Attributed_String); - -- In this binding we allow strings of attributed characters. - - ------------------ - -- Exceptions -- - ------------------ -- Curses_Exception : exception; -- Wrong_Curses_Version : exception; -+ Curses_Exception : exception; -+ Wrong_Curses_Version : exception; - - -- Those exceptions are raised by the ETI (Extended Terminal Interface) - -- subpackets for Menu and Forms handling. - -- -- Eti_System_Error : exception; -- Eti_Bad_Argument : exception; -- Eti_Posted : exception; -- Eti_Connected : exception; -- Eti_Bad_State : exception; -- Eti_No_Room : exception; -- Eti_Not_Posted : exception; -- Eti_Unknown_Command : exception; -- Eti_No_Match : exception; -- Eti_Not_Selectable : exception; -- Eti_Not_Connected : exception; -- Eti_Request_Denied : exception; -- Eti_Invalid_Field : exception; -- Eti_Current : exception; -+ Eti_System_Error : exception; -+ Eti_Bad_Argument : exception; -+ Eti_Posted : exception; -+ Eti_Connected : exception; -+ Eti_Bad_State : exception; -+ Eti_No_Room : exception; -+ Eti_Not_Posted : exception; -+ Eti_Unknown_Command : exception; -+ Eti_No_Match : exception; -+ Eti_Not_Selectable : exception; -+ Eti_Not_Connected : exception; -+ Eti_Request_Denied : exception; -+ Eti_Invalid_Field : exception; -+ Eti_Current : exception; - - -------------------------------------------------------------------------- - -- External C variables -@@ -414,63 +416,63 @@ - -- this is to use functions. - -------------------------------------------------------------------------- - -- function Lines return Line_Count; -- pragma Inline (Lines); -+ function Lines return Line_Count; -+ pragma Inline (Lines); - -- function Columns return Column_Count; -- pragma Inline (Columns); -+ function Columns return Column_Count; -+ pragma Inline (Columns); - -- function Tab_Size return Natural; -- pragma Inline (Tab_Size); -+ function Tab_Size return Natural; -+ pragma Inline (Tab_Size); - -- function Number_Of_Colors return Natural; -- pragma Inline (Number_Of_Colors); -+ function Number_Of_Colors return Natural; -+ pragma Inline (Number_Of_Colors); - -- function Number_Of_Color_Pairs return Natural; -- pragma Inline (Number_Of_Color_Pairs); -+ function Number_Of_Color_Pairs return Natural; -+ pragma Inline (Number_Of_Color_Pairs); - - type C_ACS_Map is array (Character'Val (0) .. Character'Val (127)) -- of Attributed_Character; -- ACS_Map : C_ACS_Map; -- pragma Import (C, ACS_Map, "acs_map"); -+ of Attributed_Character; -+ ACS_Map : C_ACS_Map; -+ pragma Import (C, ACS_Map, "acs_map"); - -- - -- - -- Constants for several characters from the Alternate Character Set - -- You must use these constants as indices into the ACS_Map array - -- to get the corresponding attributed character at runtime. - -- -- ACS_Upper_Left_Corner : constant Character := 'l'; -- ACS_Lower_Left_Corner : constant Character := 'm'; -- ACS_Upper_Right_Corner : constant Character := 'k'; -- ACS_Lower_Right_Corner : constant Character := 'j'; -- ACS_Left_Tee : constant Character := 't'; -- ACS_Right_Tee : constant Character := 'u'; -- ACS_Bottom_Tee : constant Character := 'v'; -- ACS_Top_Tee : constant Character := 'w'; -- ACS_Horizontal_Line : constant Character := 'q'; -- ACS_Vertical_Line : constant Character := 'x'; -- ACS_Plus_Symbol : constant Character := 'n'; -- ACS_Scan_Line_1 : constant Character := 'o'; -- ACS_Scan_Line_9 : constant Character := 's'; -- ACS_Diamond : constant Character := Character'Val (96); -- ACS_Checker_Board : constant Character := 'a'; -- ACS_Degree : constant Character := 'f'; -- ACS_Plus_Minus : constant Character := 'g'; -- ACS_Bullet : constant Character := '~'; -- ACS_Left_Arrow : constant Character := ','; -- ACS_Right_Arrow : constant Character := '+'; -- ACS_Down_Arrow : constant Character := '.'; -- ACS_Up_Arrow : constant Character := '-'; -- ACS_Board_Of_Squares : constant Character := 'h'; -- 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'; -- ACS_Less_Or_Equal : constant Character := 'y'; -- ACS_Greater_Or_Equal : constant Character := 'z'; -- ACS_PI : constant Character := '{'; -- ACS_Not_Equal : constant Character := '|'; -- ACS_Sterling : constant Character := '}'; -+ ACS_Upper_Left_Corner : constant Character := 'l'; -+ ACS_Lower_Left_Corner : constant Character := 'm'; -+ ACS_Upper_Right_Corner : constant Character := 'k'; -+ ACS_Lower_Right_Corner : constant Character := 'j'; -+ ACS_Left_Tee : constant Character := 't'; -+ ACS_Right_Tee : constant Character := 'u'; -+ ACS_Bottom_Tee : constant Character := 'v'; -+ ACS_Top_Tee : constant Character := 'w'; -+ ACS_Horizontal_Line : constant Character := 'q'; -+ ACS_Vertical_Line : constant Character := 'x'; -+ ACS_Plus_Symbol : constant Character := 'n'; -+ ACS_Scan_Line_1 : constant Character := 'o'; -+ ACS_Scan_Line_9 : constant Character := 's'; -+ ACS_Diamond : constant Character := Character'Val (96); -+ ACS_Checker_Board : constant Character := 'a'; -+ ACS_Degree : constant Character := 'f'; -+ ACS_Plus_Minus : constant Character := 'g'; -+ ACS_Bullet : constant Character := '~'; -+ ACS_Left_Arrow : constant Character := ','; -+ ACS_Right_Arrow : constant Character := '+'; -+ ACS_Down_Arrow : constant Character := '.'; -+ ACS_Up_Arrow : constant Character := '-'; -+ ACS_Board_Of_Squares : constant Character := 'h'; -+ 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'; -+ ACS_Less_Or_Equal : constant Character := 'y'; -+ ACS_Greater_Or_Equal : constant Character := 'z'; -+ ACS_PI : constant Character := '{'; -+ ACS_Not_Equal : constant Character := '|'; -+ ACS_Sterling : constant Character := '}'; - - -- |===================================================================== - -- | Man page curs_initscr.3x -@@ -478,90 +480,90 @@ - -- | Not implemented: newterm, set_term, delscreen - - -- #1A NAME="AFU_1"#2| -- function Standard_Window return Window; -+ function Standard_Window return Window; - -- AKA: stdscr -- pragma Inline (Standard_Window); -+ pragma Inline (Standard_Window); - - -- #1A NAME="AFU_2"#2| -- function Current_Window return Window; -+ function Current_Window return Window; - -- AKA: curscr -- pragma Inline (Current_Window); -+ pragma Inline (Current_Window); - - -- #1A NAME="AFU_3"#2| -- procedure Init_Screen; -+ procedure Init_Screen; - - -- #1A NAME="AFU_4"#2| -- procedure Init_Windows renames Init_Screen; -+ procedure Init_Windows renames Init_Screen; - -- AKA: initscr() -- pragma Inline (Init_Screen); -+ pragma Inline (Init_Screen); - -- pragma Inline (Init_Windows); - - -- #1A NAME="AFU_5"#2| -- procedure End_Windows; -+ procedure End_Windows; - -- AKA: endwin() -- procedure End_Screen renames End_Windows; -- pragma Inline (End_Windows); -+ procedure End_Screen renames End_Windows; -+ pragma Inline (End_Windows); - -- pragma Inline (End_Screen); - - -- #1A NAME="AFU_6"#2| -- function Is_End_Window return Boolean; -+ function Is_End_Window return Boolean; - -- AKA: isendwin() -- pragma Inline (Is_End_Window); -+ pragma Inline (Is_End_Window); - - -- |===================================================================== - -- | Man page curs_move.3x - -- |===================================================================== - - -- #1A NAME="AFU_7"#2| -- procedure Move_Cursor (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position); -+ procedure Move_Cursor (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position); - -- AKA: wmove() - -- AKA: move() -- pragma Inline (Move_Cursor); -+ pragma Inline (Move_Cursor); - - -- |===================================================================== - -- | Man page curs_addch.3x - -- |===================================================================== - - -- #1A NAME="AFU_8"#2| -- procedure Add (Win : Window := Standard_Window; -- Ch : Attributed_Character); -+ procedure Add (Win : Window := Standard_Window; -+ Ch : Attributed_Character); - -- AKA: waddch() - -- AKA: addch() - -- procedure Add (Win : Window := Standard_Window; -- Ch : Character); -+ procedure Add (Win : Window := Standard_Window; -+ Ch : Character); - -- Add a single character at the current logical cursor position to - -- the window. Use the current windows attributes. - - -- #1A NAME="AFU_9"#2| -- procedure Add -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Ch : Attributed_Character); -+ procedure Add -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Ch : Attributed_Character); - -- AKA: mvwaddch() - -- AKA: mvaddch() - -- procedure Add -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Ch : Character); -+ procedure Add -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Ch : Character); - -- Move to the position and add a single character into the window - -- There are more Add routines, so the Inline pragma follows later - - -- #1A NAME="AFU_10"#2| -- procedure Add_With_Immediate_Echo -- (Win : Window := Standard_Window; -- Ch : Attributed_Character); -+ procedure Add_With_Immediate_Echo -+ (Win : Window := Standard_Window; -+ Ch : Attributed_Character); - -- AKA: wechochar() - -- AKA: echochar() - -- procedure Add_With_Immediate_Echo -- (Win : Window := Standard_Window; -- Ch : Character); -+ procedure Add_With_Immediate_Echo -+ (Win : Window := Standard_Window; -+ Ch : Character); - -- Add a character and do an immediate refresh of the screen. - pragma Inline (Add_With_Immediate_Echo); - -@@ -571,104 +573,104 @@ - -- Not Implemented: wcursyncup - - -- #1A NAME="AFU_11"#2| -- function Create -- (Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window; -+ function Create -+ (Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window; - -- Not Implemented: Default Number_Of_Lines, Number_Of_Columns - -- the C version lets them be 0, see the man page. - -- AKA: newwin() -- pragma Inline (Create); -+ pragma Inline (Create); - - function New_Window -- (Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window -- renames Create; -+ (Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window -+ renames Create; - -- pragma Inline (New_Window); - - -- #1A NAME="AFU_12"#2| -- procedure Delete (Win : in out Window); -+ procedure Delete (Win : in out Window); - -- AKA: delwin() - -- Reset Win to Null_Window -- pragma Inline (Delete); -+ pragma Inline (Delete); - - -- #1A NAME="AFU_13"#2| -- function Sub_Window -- (Win : Window := Standard_Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window; -+ function Sub_Window -+ (Win : Window := Standard_Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window; - -- AKA: subwin() -- pragma Inline (Sub_Window); -+ pragma Inline (Sub_Window); - - -- #1A NAME="AFU_14"#2| -- function Derived_Window -- (Win : Window := Standard_Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window; -+ function Derived_Window -+ (Win : Window := Standard_Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window; - -- AKA: derwin() -- pragma Inline (Derived_Window); -+ pragma Inline (Derived_Window); - - -- #1A NAME="AFU_15"#2| -- function Duplicate (Win : Window) return Window; -+ function Duplicate (Win : Window) return Window; - -- AKA: dupwin() -- pragma Inline (Duplicate); -+ pragma Inline (Duplicate); - - -- #1A NAME="AFU_16"#2| -- procedure Move_Window (Win : Window; -- Line : Line_Position; -- Column : Column_Position); -+ procedure Move_Window (Win : Window; -+ Line : Line_Position; -+ Column : Column_Position); - -- AKA: mvwin() -- pragma Inline (Move_Window); -+ pragma Inline (Move_Window); - - -- #1A NAME="AFU_17"#2| -- procedure Move_Derived_Window (Win : Window; -- Line : Line_Position; -- Column : Column_Position); -+ procedure Move_Derived_Window (Win : Window; -+ Line : Line_Position; -+ Column : Column_Position); - -- AKA: mvderwin() -- pragma Inline (Move_Derived_Window); -+ pragma Inline (Move_Derived_Window); - - -- #1A NAME="AFU_18"#2| -- procedure Synchronize_Upwards (Win : Window); -+ procedure Synchronize_Upwards (Win : Window); - -- AKA: wsyncup() - pragma Import (C, Synchronize_Upwards, "wsyncup"); - - -- #1A NAME="AFU_19"#2| -- procedure Synchronize_Downwards (Win : Window); -+ procedure Synchronize_Downwards (Win : Window); - -- AKA: wsyncdown() - pragma Import (C, Synchronize_Downwards, "wsyncdown"); - - -- #1A NAME="AFU_20"#2| -- procedure Set_Synch_Mode (Win : Window := Standard_Window; -- Mode : Boolean := False); -+ procedure Set_Synch_Mode (Win : Window := Standard_Window; -+ Mode : Boolean := False); - -- AKA: syncok() -- pragma Inline (Set_Synch_Mode); -+ pragma Inline (Set_Synch_Mode); - - -- |===================================================================== - -- | Man page curs_addstr.3x - -- |===================================================================== - - -- #1A NAME="AFU_21"#2| -- procedure Add (Win : Window := Standard_Window; -- Str : String; -- Len : Integer := -1); -+ procedure Add (Win : Window := Standard_Window; -+ Str : String; -+ Len : Integer := -1); - -- AKA: waddnstr() - -- AKA: waddstr() - -- AKA: addnstr() - -- AKA: addstr() - - -- #1A NAME="AFU_22"#2| -- procedure Add (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : String; -- Len : Integer := -1); -+ procedure Add (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : String; -+ Len : Integer := -1); - -- AKA: mvwaddnstr() - -- AKA: mvwaddstr() - -- AKA: mvaddnstr() -@@ -679,20 +681,20 @@ - -- |===================================================================== - - -- #1A NAME="AFU_23"#2| -- procedure Add (Win : Window := Standard_Window; -- Str : Attributed_String; -- Len : Integer := -1); -+ procedure Add (Win : Window := Standard_Window; -+ Str : Attributed_String; -+ Len : Integer := -1); - -- AKA: waddchnstr() - -- AKA: waddchstr() - -- AKA: addchnstr() - -- AKA: addchstr() - - -- #1A NAME="AFU_24"#2| -- procedure Add (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : Attributed_String; -- Len : Integer := -1); -+ procedure Add (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : Attributed_String; -+ Len : Integer := -1); - -- AKA: mvwaddchnstr() - -- AKA: mvwaddchstr() - -- AKA: mvaddchnstr() -@@ -706,46 +708,46 @@ - -- | use Move_Cursor then Horizontal_Line or Vertical_Line - - -- #1A NAME="AFU_25"#2| -- procedure Border -- (Win : Window := Standard_Window; -- Left_Side_Symbol : Attributed_Character := Default_Character; -- Right_Side_Symbol : Attributed_Character := Default_Character; -- Top_Side_Symbol : Attributed_Character := Default_Character; -- Bottom_Side_Symbol : Attributed_Character := Default_Character; -- Upper_Left_Corner_Symbol : Attributed_Character := Default_Character; -- Upper_Right_Corner_Symbol : Attributed_Character := Default_Character; -- Lower_Left_Corner_Symbol : Attributed_Character := Default_Character; -- Lower_Right_Corner_Symbol : Attributed_Character := Default_Character -+ procedure Border -+ (Win : Window := Standard_Window; -+ Left_Side_Symbol : Attributed_Character := Default_Character; -+ Right_Side_Symbol : Attributed_Character := Default_Character; -+ Top_Side_Symbol : Attributed_Character := Default_Character; -+ Bottom_Side_Symbol : Attributed_Character := Default_Character; -+ Upper_Left_Corner_Symbol : Attributed_Character := Default_Character; -+ Upper_Right_Corner_Symbol : Attributed_Character := Default_Character; -+ Lower_Left_Corner_Symbol : Attributed_Character := Default_Character; -+ Lower_Right_Corner_Symbol : Attributed_Character := Default_Character - ); - -- AKA: wborder() - -- AKA: border() -- pragma Inline (Border); -+ pragma Inline (Border); - - -- #1A NAME="AFU_26"#2| -- procedure Box -- (Win : Window := Standard_Window; -- Vertical_Symbol : Attributed_Character := Default_Character; -- Horizontal_Symbol : Attributed_Character := Default_Character); -+ procedure Box -+ (Win : Window := Standard_Window; -+ Vertical_Symbol : Attributed_Character := Default_Character; -+ Horizontal_Symbol : Attributed_Character := Default_Character); - -- AKA: box() -- pragma Inline (Box); -+ pragma Inline (Box); - - -- #1A NAME="AFU_27"#2| -- procedure Horizontal_Line -- (Win : Window := Standard_Window; -- Line_Size : Natural; -- Line_Symbol : Attributed_Character := Default_Character); -+ procedure Horizontal_Line -+ (Win : Window := Standard_Window; -+ Line_Size : Natural; -+ Line_Symbol : Attributed_Character := Default_Character); - -- AKA: whline() - -- AKA: hline() -- pragma Inline (Horizontal_Line); -+ pragma Inline (Horizontal_Line); - - -- #1A NAME="AFU_28"#2| -- procedure Vertical_Line -- (Win : Window := Standard_Window; -- Line_Size : Natural; -- Line_Symbol : Attributed_Character := Default_Character); -+ procedure Vertical_Line -+ (Win : Window := Standard_Window; -+ Line_Size : Natural; -+ Line_Symbol : Attributed_Character := Default_Character); - -- AKA: wvline() - -- AKA: vline() -- pragma Inline (Vertical_Line); -+ pragma Inline (Vertical_Line); - - -- |===================================================================== - -- | Man page curs_getch.3x -@@ -753,44 +755,44 @@ - -- Not implemented: mvgetch, mvwgetch - - -- #1A NAME="AFU_29"#2| -- function Get_Keystroke (Win : Window := Standard_Window) -+ function Get_Keystroke (Win : Window := Standard_Window) - return Real_Key_Code; - -- AKA: wgetch() - -- AKA: getch() - -- Get a character from the keyboard and echo it - if enabled - to the - -- window. -- -- If for any reason (i.e. a timeout) we couldn't get a character the -+ -- If for any reason (i.e. a timeout) we could not get a character the - -- returned keycode is Key_None. -- pragma Inline (Get_Keystroke); -+ pragma Inline (Get_Keystroke); - - -- #1A NAME="AFU_30"#2| -- procedure Undo_Keystroke (Key : Real_Key_Code); -+ procedure Undo_Keystroke (Key : Real_Key_Code); - -- AKA: ungetch() -- pragma Inline (Undo_Keystroke); -+ pragma Inline (Undo_Keystroke); - - -- #1A NAME="AFU_31"#2| -- function Has_Key (Key : Special_Key_Code) return Boolean; -+ function Has_Key (Key : Special_Key_Code) return Boolean; - -- AKA: has_key() -- pragma Inline (Has_Key); -+ pragma Inline (Has_Key); - - -- | - -- | Some helper functions - -- | -- function Is_Function_Key (Key : Special_Key_Code) return Boolean; -+ 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); -+ pragma Inline (Is_Function_Key); - -- subtype Function_Key_Number is Integer range 0 .. 63; -+ subtype Function_Key_Number is Integer range 0 .. 63; - -- (n)curses allows for 64 function keys. - -- function Function_Key (Key : Real_Key_Code) return Function_Key_Number; -+ 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); -+ pragma Inline (Function_Key); - -- function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code; -+ function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code; - -- Return the key code for a given function-key number. -- pragma Inline (Function_Key_Code); -+ pragma Inline (Function_Key_Code); - - -- |===================================================================== - -- | Man page curs_attr.3x -@@ -802,16 +804,16 @@ - -- PAIR_NUMBER(c) is the same as c.Color - - -- #1A NAME="AFU_32"#2| -- procedure Standout (Win : Window := Standard_Window; -- On : Boolean := True); -+ procedure Standout (Win : Window := Standard_Window; -+ On : Boolean := True); - -- AKA: wstandout() - -- AKA: wstandend() - - -- #1A NAME="AFU_33"#2| -- procedure Switch_Character_Attribute -- (Win : Window := Standard_Window; -- Attr : Character_Attribute_Set := Normal_Video; -- On : Boolean := True); -- if False we switch Off. -+ procedure Switch_Character_Attribute -+ (Win : Window := Standard_Window; -+ Attr : Character_Attribute_Set := Normal_Video; -+ On : Boolean := True); -- if False we switch Off. - -- Switches those Attributes set to true in the list. - -- AKA: wattron() - -- AKA: wattroff() -@@ -819,50 +821,50 @@ - -- AKA: attroff() - - -- #1A NAME="AFU_34"#2| -- procedure Set_Character_Attributes -- (Win : Window := Standard_Window; -- Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Character_Attributes -+ (Win : Window := Standard_Window; -+ Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: wattrset() - -- AKA: attrset() -- pragma Inline (Set_Character_Attributes); -+ pragma Inline (Set_Character_Attributes); - - -- #1A NAME="AFU_35"#2| -- function Get_Character_Attribute -- (Win : Window := Standard_Window) return Character_Attribute_Set; -+ function Get_Character_Attribute -+ (Win : Window := Standard_Window) return Character_Attribute_Set; - -- AKA: wattr_get() - -- AKA: attr_get() - - -- #1A NAME="AFU_36"#2| -- function Get_Character_Attribute -- (Win : Window := Standard_Window) return Color_Pair; -+ function Get_Character_Attribute -+ (Win : Window := Standard_Window) return Color_Pair; - -- AKA: wattr_get() - pragma Inline (Get_Character_Attribute); - - -- #1A NAME="AFU_37"#2| -- procedure Set_Color (Win : Window := Standard_Window; -- Pair : Color_Pair); -+ procedure Set_Color (Win : Window := Standard_Window; -+ Pair : Color_Pair); - -- AKA: wcolor_set() - -- AKA: color_set() -- pragma Inline (Set_Color); -+ pragma Inline (Set_Color); - - -- #1A NAME="AFU_38"#2| -- procedure Change_Attributes -- (Win : Window := Standard_Window; -- Count : Integer := -1; -- Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Change_Attributes -+ (Win : Window := Standard_Window; -+ Count : Integer := -1; -+ Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: wchgat() - -- AKA: chgat() - - -- #1A NAME="AFU_39"#2| -- procedure Change_Attributes -- (Win : Window := Standard_Window; -- Line : Line_Position := Line_Position'First; -- Column : Column_Position := Column_Position'First; -- Count : Integer := -1; -- Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Change_Attributes -+ (Win : Window := Standard_Window; -+ Line : Line_Position := Line_Position'First; -+ Column : Column_Position := Column_Position'First; -+ Count : Integer := -1; -+ Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: mvwchgat() - -- AKA: mvchgat() - pragma Inline (Change_Attributes); -@@ -872,14 +874,14 @@ - -- |===================================================================== - - -- #1A NAME="AFU_40"#2| -- procedure Beep; -+ procedure Beep; - -- AKA: beep() -- pragma Inline (Beep); -+ pragma Inline (Beep); - - -- #1A NAME="AFU_41"#2| -- procedure Flash_Screen; -+ procedure Flash_Screen; - -- AKA: flash() -- pragma Inline (Flash_Screen); -+ pragma Inline (Flash_Screen); - - -- |===================================================================== - -- | Man page curs_inopts.3x -@@ -888,186 +890,186 @@ - -- | Not implemented : typeahead - -- - -- #1A NAME="AFU_42"#2| -- procedure Set_Cbreak_Mode (SwitchOn : Boolean := True); -+ procedure Set_Cbreak_Mode (SwitchOn : Boolean := True); - -- AKA: cbreak() - -- AKA: nocbreak() -- pragma Inline (Set_Cbreak_Mode); -+ pragma Inline (Set_Cbreak_Mode); - - -- #1A NAME="AFU_43"#2| -- procedure Set_Raw_Mode (SwitchOn : Boolean := True); -+ procedure Set_Raw_Mode (SwitchOn : Boolean := True); - -- AKA: raw() - -- AKA: noraw() -- pragma Inline (Set_Raw_Mode); -+ pragma Inline (Set_Raw_Mode); - - -- #1A NAME="AFU_44"#2| -- procedure Set_Echo_Mode (SwitchOn : Boolean := True); -+ procedure Set_Echo_Mode (SwitchOn : Boolean := True); - -- AKA: echo() - -- AKA: noecho() -- pragma Inline (Set_Echo_Mode); -+ pragma Inline (Set_Echo_Mode); - - -- #1A NAME="AFU_45"#2| -- procedure Set_Meta_Mode (Win : Window := Standard_Window; -- SwitchOn : Boolean := True); -+ procedure Set_Meta_Mode (Win : Window := Standard_Window; -+ SwitchOn : Boolean := True); - -- AKA: meta() -- pragma Inline (Set_Meta_Mode); -+ pragma Inline (Set_Meta_Mode); - - -- #1A NAME="AFU_46"#2| -- procedure Set_KeyPad_Mode (Win : Window := Standard_Window; -- SwitchOn : Boolean := True); -+ procedure Set_KeyPad_Mode (Win : Window := Standard_Window; -+ SwitchOn : Boolean := True); - -- AKA: keypad() -- pragma Inline (Set_KeyPad_Mode); -+ pragma Inline (Set_KeyPad_Mode); - -- function Get_KeyPad_Mode (Win : Window := Standard_Window) -+ function Get_KeyPad_Mode (Win : Window := Standard_Window) - return Boolean; - -- This has no pendant in C. There you've to look into the WINDOWS - -- structure to get the value. Bad practice, not repeated in Ada. - -- type Half_Delay_Amount is range 1 .. 255; -+ type Half_Delay_Amount is range 1 .. 255; - - -- #1A NAME="AFU_47"#2| -- procedure Half_Delay (Amount : Half_Delay_Amount); -+ procedure Half_Delay (Amount : Half_Delay_Amount); - -- AKA: halfdelay() -- pragma Inline (Half_Delay); -+ pragma Inline (Half_Delay); - - -- #1A NAME="AFU_48"#2| -- procedure Set_Flush_On_Interrupt_Mode -- (Win : Window := Standard_Window; -- Mode : Boolean := True); -+ procedure Set_Flush_On_Interrupt_Mode -+ (Win : Window := Standard_Window; -+ Mode : Boolean := True); - -- AKA: intrflush() -- pragma Inline (Set_Flush_On_Interrupt_Mode); -+ pragma Inline (Set_Flush_On_Interrupt_Mode); - - -- #1A NAME="AFU_49"#2| -- procedure Set_Queue_Interrupt_Mode -- (Win : Window := Standard_Window; -- Flush : Boolean := True); -+ procedure Set_Queue_Interrupt_Mode -+ (Win : Window := Standard_Window; -+ Flush : Boolean := True); - -- AKA: qiflush() - -- AKA: noqiflush() -- pragma Inline (Set_Queue_Interrupt_Mode); -+ pragma Inline (Set_Queue_Interrupt_Mode); - - -- #1A NAME="AFU_50"#2| -- procedure Set_NoDelay_Mode -- (Win : Window := Standard_Window; -- Mode : Boolean := False); -+ procedure Set_NoDelay_Mode -+ (Win : Window := Standard_Window; -+ Mode : Boolean := False); - -- AKA: nodelay() -- pragma Inline (Set_NoDelay_Mode); -+ pragma Inline (Set_NoDelay_Mode); - -- type Timeout_Mode is (Blocking, Non_Blocking, Delayed); -+ type Timeout_Mode is (Blocking, Non_Blocking, Delayed); - - -- #1A NAME="AFU_51"#2| -- procedure Set_Timeout_Mode (Win : Window := Standard_Window; -- Mode : Timeout_Mode; -- Amount : Natural); -- in Milliseconds -+ procedure Set_Timeout_Mode (Win : Window := Standard_Window; -+ Mode : Timeout_Mode; -+ Amount : Natural); -- in Milliseconds - -- AKA: wtimeout() - -- AKA: timeout() - -- Instead of overloading the semantic of the sign of amount, we - -- 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. -+ -- We do not inline this procedure. - - -- #1A NAME="AFU_52"#2| -- procedure Set_Escape_Timer_Mode -- (Win : Window := Standard_Window; -- Timer_Off : Boolean := False); -+ procedure Set_Escape_Timer_Mode -+ (Win : Window := Standard_Window; -+ Timer_Off : Boolean := False); - -- AKA: notimeout() -- pragma Inline (Set_Escape_Timer_Mode); -+ pragma Inline (Set_Escape_Timer_Mode); - - -- |===================================================================== - -- | Man page curs_outopts.3x - -- |===================================================================== - - -- #1A NAME="AFU_53"#2| -- procedure Set_NL_Mode (SwitchOn : Boolean := True); -+ procedure Set_NL_Mode (SwitchOn : Boolean := True); - -- AKA: nl() - -- AKA: nonl() -- pragma Inline (Set_NL_Mode); -+ pragma Inline (Set_NL_Mode); - - -- #1A NAME="AFU_54"#2| -- procedure Clear_On_Next_Update -- (Win : Window := Standard_Window; -- Do_Clear : Boolean := True); -+ procedure Clear_On_Next_Update -+ (Win : Window := Standard_Window; -+ Do_Clear : Boolean := True); - -- AKA: clearok() -- pragma Inline (Clear_On_Next_Update); -+ pragma Inline (Clear_On_Next_Update); - - -- #1A NAME="AFU_55"#2| -- procedure Use_Insert_Delete_Line -- (Win : Window := Standard_Window; -- Do_Idl : Boolean := True); -+ procedure Use_Insert_Delete_Line -+ (Win : Window := Standard_Window; -+ Do_Idl : Boolean := True); - -- AKA: idlok() -- pragma Inline (Use_Insert_Delete_Line); -+ pragma Inline (Use_Insert_Delete_Line); - - -- #1A NAME="AFU_56"#2| -- procedure Use_Insert_Delete_Character -- (Win : Window := Standard_Window; -- Do_Idc : Boolean := True); -+ procedure Use_Insert_Delete_Character -+ (Win : Window := Standard_Window; -+ Do_Idc : Boolean := True); - -- AKA: idcok() -- pragma Inline (Use_Insert_Delete_Character); -+ pragma Inline (Use_Insert_Delete_Character); - - -- #1A NAME="AFU_57"#2| -- procedure Leave_Cursor_After_Update -- (Win : Window := Standard_Window; -- Do_Leave : Boolean := True); -+ procedure Leave_Cursor_After_Update -+ (Win : Window := Standard_Window; -+ Do_Leave : Boolean := True); - -- AKA: leaveok() -- pragma Inline (Leave_Cursor_After_Update); -+ pragma Inline (Leave_Cursor_After_Update); - - -- #1A NAME="AFU_58"#2| -- procedure Immediate_Update_Mode -- (Win : Window := Standard_Window; -- Mode : Boolean := False); -+ procedure Immediate_Update_Mode -+ (Win : Window := Standard_Window; -+ Mode : Boolean := False); - -- AKA: immedok() -- pragma Inline (Immediate_Update_Mode); -+ pragma Inline (Immediate_Update_Mode); - - -- #1A NAME="AFU_59"#2| -- procedure Allow_Scrolling -- (Win : Window := Standard_Window; -- Mode : Boolean := False); -+ procedure Allow_Scrolling -+ (Win : Window := Standard_Window; -+ Mode : Boolean := False); - -- AKA: scrollok() -- pragma Inline (Allow_Scrolling); -+ pragma Inline (Allow_Scrolling); - -- function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean; -+ function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean; - -- There is no such function in the C interface. -- pragma Inline (Scrolling_Allowed); -+ pragma Inline (Scrolling_Allowed); - - -- #1A NAME="AFU_60"#2| -- procedure Set_Scroll_Region -- (Win : Window := Standard_Window; -- Top_Line : Line_Position; -- Bottom_Line : Line_Position); -+ procedure Set_Scroll_Region -+ (Win : Window := Standard_Window; -+ Top_Line : Line_Position; -+ Bottom_Line : Line_Position); - -- AKA: wsetscrreg() - -- AKA: setscrreg() -- pragma Inline (Set_Scroll_Region); -+ pragma Inline (Set_Scroll_Region); - - -- |===================================================================== - -- | Man page curs_refresh.3x - -- |===================================================================== - - -- #1A NAME="AFU_61"#2| -- procedure Update_Screen; -+ procedure Update_Screen; - -- AKA: doupdate() -- pragma Inline (Update_Screen); -+ pragma Inline (Update_Screen); - - -- #1A NAME="AFU_62"#2| -- procedure Refresh (Win : Window := Standard_Window); -+ procedure Refresh (Win : Window := Standard_Window); - -- AKA: wrefresh() - -- There is an overloaded Refresh for Pads. - -- The Inline pragma appears there - -- AKA: refresh() - - -- #1A NAME="AFU_63"#2| -- procedure Refresh_Without_Update -- (Win : Window := Standard_Window); -+ procedure Refresh_Without_Update -+ (Win : Window := Standard_Window); - -- AKA: wnoutrefresh() - -- There is an overloaded Refresh_Without_Update for Pads. - -- The Inline pragma appears there - - -- #1A NAME="AFU_64"#2| -- procedure Redraw (Win : Window := Standard_Window); -+ procedure Redraw (Win : Window := Standard_Window); - -- AKA: redrawwin() - - -- #1A NAME="AFU_65"#2| -- procedure Redraw (Win : Window := Standard_Window; -- Begin_Line : Line_Position; -- Line_Count : Positive); -+ procedure Redraw (Win : Window := Standard_Window; -+ Begin_Line : Line_Position; -+ Line_Count : Positive); - -- AKA: wredrawln() - pragma Inline (Redraw); - -@@ -1076,31 +1078,31 @@ - -- |===================================================================== - - -- #1A NAME="AFU_66"#2| -- procedure Erase (Win : Window := Standard_Window); -+ procedure Erase (Win : Window := Standard_Window); - -- AKA: werase() - -- AKA: erase() -- pragma Inline (Erase); -+ pragma Inline (Erase); - - -- #1A NAME="AFU_67"#2| -- procedure Clear -- (Win : Window := Standard_Window); -+ procedure Clear -+ (Win : Window := Standard_Window); - -- AKA: wclear() - -- AKA: clear() -- pragma Inline (Clear); -+ pragma Inline (Clear); - - -- #1A NAME="AFU_68"#2| -- procedure Clear_To_End_Of_Screen -- (Win : Window := Standard_Window); -+ procedure Clear_To_End_Of_Screen -+ (Win : Window := Standard_Window); - -- AKA: wclrtobot() - -- AKA: clrtobot() -- pragma Inline (Clear_To_End_Of_Screen); -+ pragma Inline (Clear_To_End_Of_Screen); - - -- #1A NAME="AFU_69"#2| -- procedure Clear_To_End_Of_Line -- (Win : Window := Standard_Window); -+ procedure Clear_To_End_Of_Line -+ (Win : Window := Standard_Window); - -- AKA: wclrtoeol() - -- AKA: clrtoeol() -- pragma Inline (Clear_To_End_Of_Line); -+ pragma Inline (Clear_To_End_Of_Line); - - -- |===================================================================== - -- | Man page curs_bkgd.3x -@@ -1110,64 +1112,64 @@ - -- TODO: we could have Set_Background(Window; Character_Attribute_Set) - -- because in C it is common to see bkgdset(A_BOLD) or - -- bkgdset(COLOR_PAIR(n)) -- procedure Set_Background -- (Win : Window := Standard_Window; -- Ch : Attributed_Character); -+ procedure Set_Background -+ (Win : Window := Standard_Window; -+ Ch : Attributed_Character); - -- AKA: wbkgdset() - -- AKA: bkgdset() -- pragma Inline (Set_Background); -+ pragma Inline (Set_Background); - - -- #1A NAME="AFU_71"#2| -- procedure Change_Background -- (Win : Window := Standard_Window; -- Ch : Attributed_Character); -+ procedure Change_Background -+ (Win : Window := Standard_Window; -+ Ch : Attributed_Character); - -- AKA: wbkgd() - -- AKA: bkgd() -- pragma Inline (Change_Background); -+ pragma Inline (Change_Background); - - -- #1A NAME="AFU_72"#2| - -- ? wbkgdget is not listed in curs_bkgd, getbkgd is thpough. -- function Get_Background (Win : Window := Standard_Window) -- return Attributed_Character; -+ function Get_Background (Win : Window := Standard_Window) -+ return Attributed_Character; - -- AKA: wbkgdget() - -- AKA: bkgdget() -- pragma Inline (Get_Background); -+ pragma Inline (Get_Background); - - -- |===================================================================== - -- | Man page curs_touch.3x - -- |===================================================================== - - -- #1A NAME="AFU_73"#2| -- procedure Untouch (Win : Window := Standard_Window); -+ procedure Untouch (Win : Window := Standard_Window); - -- AKA: untouchwin() -- pragma Inline (Untouch); -+ pragma Inline (Untouch); - - -- #1A NAME="AFU_74"#2| -- procedure Touch (Win : Window := Standard_Window); -+ procedure Touch (Win : Window := Standard_Window); - -- AKA: touchwin() - - -- #1A NAME="AFU_75"#2| -- procedure Touch (Win : Window := Standard_Window; -- Start : Line_Position; -- Count : Positive); -+ procedure Touch (Win : Window := Standard_Window; -+ Start : Line_Position; -+ Count : Positive); - -- AKA: touchline() - pragma Inline (Touch); - - -- #1A NAME="AFU_76"#2| -- procedure Change_Lines_Status (Win : Window := Standard_Window; -- Start : Line_Position; -- Count : Positive; -- State : Boolean); -+ procedure Change_Lines_Status (Win : Window := Standard_Window; -+ Start : Line_Position; -+ Count : Positive; -+ State : Boolean); - -- AKA: wtouchln() -- pragma Inline (Change_Lines_Status); -+ pragma Inline (Change_Lines_Status); - - -- #1A NAME="AFU_77"#2| -- function Is_Touched (Win : Window := Standard_Window; -- Line : Line_Position) return Boolean; -+ function Is_Touched (Win : Window := Standard_Window; -+ Line : Line_Position) return Boolean; - -- AKA: is_linetouched() - - -- #1A NAME="AFU_78"#2| -- function Is_Touched (Win : Window := Standard_Window) return Boolean; -+ function Is_Touched (Win : Window := Standard_Window) return Boolean; - -- AKA: is_wintouched() - pragma Inline (Is_Touched); - -@@ -1176,147 +1178,147 @@ - -- |===================================================================== - - -- #1A NAME="AFU_79"#2| -- procedure Copy -- (Source_Window : Window; -- Destination_Window : Window; -- Source_Top_Row : Line_Position; -- Source_Left_Column : Column_Position; -- Destination_Top_Row : Line_Position; -- Destination_Left_Column : Column_Position; -- Destination_Bottom_Row : Line_Position; -- Destination_Right_Column : Column_Position; -- Non_Destructive_Mode : Boolean := True); -+ procedure Copy -+ (Source_Window : Window; -+ Destination_Window : Window; -+ Source_Top_Row : Line_Position; -+ Source_Left_Column : Column_Position; -+ Destination_Top_Row : Line_Position; -+ Destination_Left_Column : Column_Position; -+ Destination_Bottom_Row : Line_Position; -+ Destination_Right_Column : Column_Position; -+ Non_Destructive_Mode : Boolean := True); - -- AKA: copywin() -- pragma Inline (Copy); -+ pragma Inline (Copy); - - -- #1A NAME="AFU_80"#2| -- procedure Overwrite (Source_Window : Window; -- Destination_Window : Window); -+ procedure Overwrite (Source_Window : Window; -+ Destination_Window : Window); - -- AKA: overwrite() -- pragma Inline (Overwrite); -+ pragma Inline (Overwrite); - - -- #1A NAME="AFU_81"#2| -- procedure Overlay (Source_Window : Window; -- Destination_Window : Window); -+ procedure Overlay (Source_Window : Window; -+ Destination_Window : Window); - -- AKA: overlay() -- pragma Inline (Overlay); -+ pragma Inline (Overlay); - - -- |===================================================================== - -- | Man page curs_deleteln.3x - -- |===================================================================== - - -- #1A NAME="AFU_82"#2| -- procedure Insert_Delete_Lines -- (Win : Window := Standard_Window; -- Lines : Integer := 1); -- default is to insert one line above -+ procedure Insert_Delete_Lines -+ (Win : Window := Standard_Window; -+ Lines : Integer := 1); -- default is to insert one line above - -- AKA: winsdelln() - -- AKA: insdelln() -- pragma Inline (Insert_Delete_Lines); -+ pragma Inline (Insert_Delete_Lines); - - -- #1A NAME="AFU_83"#2| -- procedure Delete_Line (Win : Window := Standard_Window); -+ procedure Delete_Line (Win : Window := Standard_Window); - -- AKA: wdeleteln() - -- AKA: deleteln() -- pragma Inline (Delete_Line); -+ pragma Inline (Delete_Line); - - -- #1A NAME="AFU_84"#2| -- procedure Insert_Line (Win : Window := Standard_Window); -+ procedure Insert_Line (Win : Window := Standard_Window); - -- AKA: winsertln() - -- AKA: insertln() -- pragma Inline (Insert_Line); -+ pragma Inline (Insert_Line); - - -- |===================================================================== - -- | Man page curs_getyx.3x - -- |===================================================================== - - -- #1A NAME="AFU_85"#2| -- procedure Get_Size -- (Win : Window := Standard_Window; -- Number_Of_Lines : out Line_Count; -- Number_Of_Columns : out Column_Count); -+ procedure Get_Size -+ (Win : Window := Standard_Window; -+ Number_Of_Lines : out Line_Count; -+ Number_Of_Columns : out Column_Count); - -- AKA: getmaxyx() -- pragma Inline (Get_Size); -+ pragma Inline (Get_Size); - - -- #1A NAME="AFU_86"#2| -- procedure Get_Window_Position -- (Win : Window := Standard_Window; -- Top_Left_Line : out Line_Position; -- Top_Left_Column : out Column_Position); -+ procedure Get_Window_Position -+ (Win : Window := Standard_Window; -+ Top_Left_Line : out Line_Position; -+ Top_Left_Column : out Column_Position); - -- AKA: getbegyx() -- pragma Inline (Get_Window_Position); -+ pragma Inline (Get_Window_Position); - - -- #1A NAME="AFU_87"#2| -- procedure Get_Cursor_Position -- (Win : Window := Standard_Window; -- Line : out Line_Position; -- Column : out Column_Position); -+ procedure Get_Cursor_Position -+ (Win : Window := Standard_Window; -+ Line : out Line_Position; -+ Column : out Column_Position); - -- AKA: getyx() -- pragma Inline (Get_Cursor_Position); -+ pragma Inline (Get_Cursor_Position); - - -- #1A NAME="AFU_88"#2| -- procedure Get_Origin_Relative_To_Parent -- (Win : Window; -- Top_Left_Line : out Line_Position; -- Top_Left_Column : out Column_Position; -- Is_Not_A_Subwindow : out Boolean); -+ procedure Get_Origin_Relative_To_Parent -+ (Win : Window; -+ Top_Left_Line : out Line_Position; -+ Top_Left_Column : out Column_Position; -+ Is_Not_A_Subwindow : out Boolean); - -- AKA: getparyx() -- -- Instead of placing -1 in the coordinates as return, we use a boolean -+ -- 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); -+ pragma Inline (Get_Origin_Relative_To_Parent); - - -- |===================================================================== - -- | Man page curs_pad.3x - -- |===================================================================== - - -- #1A NAME="AFU_89"#2| -- function New_Pad (Lines : Line_Count; -- Columns : Column_Count) return Window; -+ function New_Pad (Lines : Line_Count; -+ Columns : Column_Count) return Window; - -- AKA: newpad() -- pragma Inline (New_Pad); -+ pragma Inline (New_Pad); - - -- #1A NAME="AFU_90"#2| -- function Sub_Pad -- (Pad : Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count; -- First_Line_Position : Line_Position; -- First_Column_Position : Column_Position) return Window; -+ function Sub_Pad -+ (Pad : Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count; -+ First_Line_Position : Line_Position; -+ First_Column_Position : Column_Position) return Window; - -- AKA: subpad() -- pragma Inline (Sub_Pad); -+ pragma Inline (Sub_Pad); - - -- #1A NAME="AFU_91"#2| -- procedure Refresh -- (Pad : Window; -- Source_Top_Row : Line_Position; -- Source_Left_Column : Column_Position; -- Destination_Top_Row : Line_Position; -- Destination_Left_Column : Column_Position; -- Destination_Bottom_Row : Line_Position; -- Destination_Right_Column : Column_Position); -+ procedure Refresh -+ (Pad : Window; -+ Source_Top_Row : Line_Position; -+ Source_Left_Column : Column_Position; -+ Destination_Top_Row : Line_Position; -+ Destination_Left_Column : Column_Position; -+ Destination_Bottom_Row : Line_Position; -+ Destination_Right_Column : Column_Position); - -- AKA: prefresh() - pragma Inline (Refresh); - - -- #1A NAME="AFU_92"#2| -- procedure Refresh_Without_Update -- (Pad : Window; -- Source_Top_Row : Line_Position; -- Source_Left_Column : Column_Position; -- Destination_Top_Row : Line_Position; -- Destination_Left_Column : Column_Position; -- Destination_Bottom_Row : Line_Position; -- Destination_Right_Column : Column_Position); -+ procedure Refresh_Without_Update -+ (Pad : Window; -+ Source_Top_Row : Line_Position; -+ Source_Left_Column : Column_Position; -+ Destination_Top_Row : Line_Position; -+ Destination_Left_Column : Column_Position; -+ Destination_Bottom_Row : Line_Position; -+ Destination_Right_Column : Column_Position); - -- AKA: pnoutrefresh() - pragma Inline (Refresh_Without_Update); - - -- #1A NAME="AFU_93"#2| -- procedure Add_Character_To_Pad_And_Echo_It -- (Pad : Window; -- Ch : Attributed_Character); -+ procedure Add_Character_To_Pad_And_Echo_It -+ (Pad : Window; -+ Ch : Attributed_Character); - -- AKA: pechochar() - -- procedure Add_Character_To_Pad_And_Echo_It -- (Pad : Window; -- Ch : Character); -+ procedure Add_Character_To_Pad_And_Echo_It -+ (Pad : Window; -+ Ch : Character); - pragma Inline (Add_Character_To_Pad_And_Echo_It); - - -- |===================================================================== -@@ -1324,27 +1326,27 @@ - -- |===================================================================== - - -- #1A NAME="AFU_94"#2| -- procedure Scroll (Win : Window := Standard_Window; -- Amount : Integer := 1); -+ procedure Scroll (Win : Window := Standard_Window; -+ Amount : Integer := 1); - -- AKA: wscrl() - -- AKA: scroll() - -- AKA: scrl() -- pragma Inline (Scroll); -+ pragma Inline (Scroll); - - -- |===================================================================== - -- | Man page curs_delch.3x - -- |===================================================================== - - -- #1A NAME="AFU_95"#2| -- procedure Delete_Character (Win : Window := Standard_Window); -+ procedure Delete_Character (Win : Window := Standard_Window); - -- AKA: wdelch() - -- AKA: delch() - - -- #1A NAME="AFU_96"#2| -- procedure Delete_Character -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position); -+ procedure Delete_Character -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position); - -- AKA: mvwdelch() - -- AKA: mvdelch() - pragma Inline (Delete_Character); -@@ -1354,16 +1356,16 @@ - -- |===================================================================== - - -- #1A NAME="AFU_97"#2| -- function Peek (Win : Window := Standard_Window) -- return Attributed_Character; -+ function Peek (Win : Window := Standard_Window) -+ return Attributed_Character; - -- AKA: inch() - -- AKA: winch() - - -- #1A NAME="AFU_98"#2| -- function Peek -- (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position) return Attributed_Character; -+ function Peek -+ (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position) return Attributed_Character; - -- AKA: mvwinch() - -- AKA: mvinch() - -- More Peek's follow, pragma Inline appears later. -@@ -1373,16 +1375,16 @@ - -- |===================================================================== - - -- #1A NAME="AFU_99"#2| -- procedure Insert (Win : Window := Standard_Window; -- Ch : Attributed_Character); -+ procedure Insert (Win : Window := Standard_Window; -+ Ch : Attributed_Character); - -- AKA: winsch() - -- AKA: insch() - - -- #1A NAME="AFU_100"#2| -- procedure Insert (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Ch : Attributed_Character); -+ procedure Insert (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Ch : Attributed_Character); - -- AKA: mvwinsch() - -- AKA: mvinsch() - -@@ -1391,20 +1393,20 @@ - -- |===================================================================== - - -- #1A NAME="AFU_101"#2| -- procedure Insert (Win : Window := Standard_Window; -- Str : String; -- Len : Integer := -1); -+ procedure Insert (Win : Window := Standard_Window; -+ Str : String; -+ Len : Integer := -1); - -- AKA: winsnstr() - -- AKA: winsstr() - -- AKA: insnstr() - -- AKA: insstr() - - -- #1A NAME="AFU_102"#2| -- procedure Insert (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : String; -- Len : Integer := -1); -+ procedure Insert (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : String; -+ Len : Integer := -1); - -- AKA: mvwinsnstr() - -- AKA: mvwinsstr() - -- AKA: mvinsnstr() -@@ -1416,20 +1418,20 @@ - -- |===================================================================== - - -- #1A NAME="AFU_103"#2| -- procedure Peek (Win : Window := Standard_Window; -- Str : out String; -- Len : Integer := -1); -+ procedure Peek (Win : Window := Standard_Window; -+ Str : out String; -+ Len : Integer := -1); - -- AKA: winnstr() - -- AKA: winstr() - -- AKA: innstr() - -- AKA: instr() - - -- #1A NAME="AFU_104"#2| -- procedure Peek (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : out String; -- Len : Integer := -1); -+ procedure Peek (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : out String; -+ Len : Integer := -1); - -- AKA: mvwinnstr() - -- AKA: mvwinstr() - -- AKA: mvinnstr() -@@ -1440,34 +1442,34 @@ - -- |===================================================================== - - -- #1A NAME="AFU_105"#2| -- procedure Peek (Win : Window := Standard_Window; -- Str : out Attributed_String; -- Len : Integer := -1); -+ procedure Peek (Win : Window := Standard_Window; -+ Str : out Attributed_String; -+ Len : Integer := -1); - -- AKA: winchnstr() - -- AKA: winchstr() - -- AKA: inchnstr() - -- AKA: inchstr() - - -- #1A NAME="AFU_106"#2| -- procedure Peek (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : out Attributed_String; -- Len : Integer := -1); -+ procedure Peek (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : out Attributed_String; -+ Len : Integer := -1); - -- AKA: mvwinchnstr() - -- AKA: mvwinchstr() - -- AKA: mvinchnstr() - -- AKA: mvinchstr() -- -- We don't inline the Peek procedures -+ -- We do not inline the Peek procedures - - -- |===================================================================== - -- | Man page curs_getstr.3x - -- |===================================================================== - - -- #1A NAME="AFU_107"#2| -- procedure Get (Win : Window := Standard_Window; -- Str : out String; -- Len : Integer := -1); -+ procedure Get (Win : Window := Standard_Window; -+ Str : out String; -+ Len : Integer := -1); - -- AKA: wgetnstr() - -- AKA: wgetstr() - -- AKA: getnstr() -@@ -1476,11 +1478,11 @@ - -- overflows. - - -- #1A NAME="AFU_108"#2| -- procedure Get (Win : Window := Standard_Window; -- Line : Line_Position; -- Column : Column_Position; -- Str : out String; -- Len : Integer := -1); -+ procedure Get (Win : Window := Standard_Window; -+ Line : Line_Position; -+ Column : Column_Position; -+ Str : out String; -+ Len : Integer := -1); - -- AKA: mvwgetnstr() - -- AKA: mvwgetstr() - -- AKA: mvgetnstr() -@@ -1493,90 +1495,90 @@ - - -- Not Implemented: slk_attr_on, slk_attr_off, slk_attr_set - -- type Soft_Label_Key_Format is (Three_Two_Three, -- Four_Four, -- PC_Style, -- ncurses specific -- PC_Style_With_Index); -- " -- type Label_Number is new Positive range 1 .. 12; -- type Label_Justification is (Left, Centered, Right); -+ type Soft_Label_Key_Format is (Three_Two_Three, -+ Four_Four, -+ PC_Style, -- ncurses specific -+ PC_Style_With_Index); -- " -+ type Label_Number is new Positive range 1 .. 12; -+ type Label_Justification is (Left, Centered, Right); - - -- #1A NAME="AFU_109"#2| -- procedure Init_Soft_Label_Keys -- (Format : Soft_Label_Key_Format := Three_Two_Three); -+ procedure Init_Soft_Label_Keys -+ (Format : Soft_Label_Key_Format := Three_Two_Three); - -- AKA: slk_init() -- pragma Inline (Init_Soft_Label_Keys); -+ pragma Inline (Init_Soft_Label_Keys); - - -- #1A NAME="AFU_110"#2| -- procedure Set_Soft_Label_Key (Label : Label_Number; -- Text : String; -- Fmt : Label_Justification := Left); -+ procedure Set_Soft_Label_Key (Label : Label_Number; -+ Text : String; -+ Fmt : Label_Justification := Left); - -- AKA: slk_set() -- -- We don't inline this procedure -+ -- We do not inline this procedure - - -- #1A NAME="AFU_111"#2| -- procedure Refresh_Soft_Label_Keys; -+ procedure Refresh_Soft_Label_Keys; - -- AKA: slk_refresh() -- pragma Inline (Refresh_Soft_Label_Keys); -+ pragma Inline (Refresh_Soft_Label_Keys); - - -- #1A NAME="AFU_112"#2| -- procedure Refresh_Soft_Label_Keys_Without_Update; -+ procedure Refresh_Soft_Label_Keys_Without_Update; - -- AKA: slk_noutrefresh() -- pragma Inline (Refresh_Soft_Label_Keys_Without_Update); -+ pragma Inline (Refresh_Soft_Label_Keys_Without_Update); - - -- #1A NAME="AFU_113"#2| -- procedure Get_Soft_Label_Key (Label : Label_Number; -- Text : out String); -+ procedure Get_Soft_Label_Key (Label : Label_Number; -+ Text : out String); - -- AKA: slk_label() - - -- #1A NAME="AFU_114"#2| -- function Get_Soft_Label_Key (Label : Label_Number) return String; -+ function Get_Soft_Label_Key (Label : Label_Number) return String; - -- AKA: slk_label() - -- Same as function - pragma Inline (Get_Soft_Label_Key); - - -- #1A NAME="AFU_115"#2| -- procedure Clear_Soft_Label_Keys; -+ procedure Clear_Soft_Label_Keys; - -- AKA: slk_clear() -- pragma Inline (Clear_Soft_Label_Keys); -+ pragma Inline (Clear_Soft_Label_Keys); - - -- #1A NAME="AFU_116"#2| -- procedure Restore_Soft_Label_Keys; -+ procedure Restore_Soft_Label_Keys; - -- AKA: slk_restore() -- pragma Inline (Restore_Soft_Label_Keys); -+ pragma Inline (Restore_Soft_Label_Keys); - - -- #1A NAME="AFU_117"#2| -- procedure Touch_Soft_Label_Keys; -+ procedure Touch_Soft_Label_Keys; - -- AKA: slk_touch() -- pragma Inline (Touch_Soft_Label_Keys); -+ pragma Inline (Touch_Soft_Label_Keys); - - -- #1A NAME="AFU_118"#2| -- procedure Switch_Soft_Label_Key_Attributes -- (Attr : Character_Attribute_Set; -- On : Boolean := True); -+ procedure Switch_Soft_Label_Key_Attributes -+ (Attr : Character_Attribute_Set; -+ On : Boolean := True); - -- AKA: slk_attron() - -- AKA: slk_attroff() -- pragma Inline (Switch_Soft_Label_Key_Attributes); -+ pragma Inline (Switch_Soft_Label_Key_Attributes); - - -- #1A NAME="AFU_119"#2| -- procedure Set_Soft_Label_Key_Attributes -- (Attr : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Soft_Label_Key_Attributes -+ (Attr : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: slk_attrset() -- pragma Inline (Set_Soft_Label_Key_Attributes); -+ pragma Inline (Set_Soft_Label_Key_Attributes); - - -- #1A NAME="AFU_120"#2| -- function Get_Soft_Label_Key_Attributes return Character_Attribute_Set; -+ function Get_Soft_Label_Key_Attributes return Character_Attribute_Set; - -- AKA: slk_attr() - - -- #1A NAME="AFU_121"#2| -- function Get_Soft_Label_Key_Attributes return Color_Pair; -+ function Get_Soft_Label_Key_Attributes return Color_Pair; - -- AKA: slk_attr() - pragma Inline (Get_Soft_Label_Key_Attributes); - - -- #1A NAME="AFU_122"#2| -- procedure Set_Soft_Label_Key_Color (Pair : Color_Pair); -+ procedure Set_Soft_Label_Key_Color (Pair : Color_Pair); - -- AKA: slk_color() -- pragma Inline (Set_Soft_Label_Key_Color); -+ pragma Inline (Set_Soft_Label_Key_Color); - - -- |===================================================================== - -- | Man page keybound.3x -@@ -1588,20 +1590,20 @@ - -- |===================================================================== - - -- #1A NAME="AFU_123"#2| -- procedure Enable_Key (Key : Special_Key_Code; -- Enable : Boolean := True); -+ procedure Enable_Key (Key : Special_Key_Code; -+ Enable : Boolean := True); - -- AKA: keyok() -- pragma Inline (Enable_Key); -+ pragma Inline (Enable_Key); - - -- |===================================================================== - -- | Man page define_key.3x - -- |===================================================================== - - -- #1A NAME="AFU_124"#2| -- procedure Define_Key (Definition : String; -- Key : Special_Key_Code); -+ procedure Define_Key (Definition : String; -+ Key : Special_Key_Code); - -- AKA: define_key() -- pragma Inline (Define_Key); -+ pragma Inline (Define_Key); - - -- |===================================================================== - -- | Man page curs_util.3x -@@ -1612,88 +1614,88 @@ - -- - - -- #1A NAME="AFU_125"#2| -- procedure Key_Name (Key : Real_Key_Code; -- Name : out String); -+ procedure Key_Name (Key : Real_Key_Code; -+ Name : out String); - -- AKA: keyname() - -- The external name for a real keystroke. - - -- #1A NAME="AFU_126"#2| -- function Key_Name (Key : Real_Key_Code) return String; -+ function Key_Name (Key : Real_Key_Code) return String; - -- AKA: keyname() - -- Same as function -- -- We don't inline this routine -+ -- We do not inline this routine - - -- #1A NAME="AFU_127"#2| -- procedure Un_Control (Ch : Attributed_Character; -- Str : out String); -+ procedure Un_Control (Ch : Attributed_Character; -+ Str : out String); - -- AKA: unctrl() - - -- #1A NAME="AFU_128"#2| -- function Un_Control (Ch : Attributed_Character) return String; -+ function Un_Control (Ch : Attributed_Character) return String; - -- AKA: unctrl() - -- Same as function - pragma Inline (Un_Control); - - -- #1A NAME="AFU_129"#2| -- procedure Delay_Output (Msecs : Natural); -+ procedure Delay_Output (Msecs : Natural); - -- AKA: delay_output() -- pragma Inline (Delay_Output); -+ pragma Inline (Delay_Output); - - -- #1A NAME="AFU_130"#2| -- procedure Flush_Input; -+ procedure Flush_Input; - -- AKA: flushinp() -- pragma Inline (Flush_Input); -+ pragma Inline (Flush_Input); - - -- |===================================================================== - -- | Man page curs_termattrs.3x - -- |===================================================================== - - -- #1A NAME="AFU_131"#2| -- function Baudrate return Natural; -+ function Baudrate return Natural; - -- AKA: baudrate() -- pragma Inline (Baudrate); -+ pragma Inline (Baudrate); - - -- #1A NAME="AFU_132"#2| -- function Erase_Character return Character; -+ function Erase_Character return Character; - -- AKA: erasechar() -- pragma Inline (Erase_Character); -+ pragma Inline (Erase_Character); - - -- #1A NAME="AFU_133"#2| -- function Kill_Character return Character; -+ function Kill_Character return Character; - -- AKA: killchar() -- pragma Inline (Kill_Character); -+ pragma Inline (Kill_Character); - - -- #1A NAME="AFU_134"#2| -- function Has_Insert_Character return Boolean; -+ function Has_Insert_Character return Boolean; - -- AKA: has_ic() -- pragma Inline (Has_Insert_Character); -+ pragma Inline (Has_Insert_Character); - - -- #1A NAME="AFU_135"#2| -- function Has_Insert_Line return Boolean; -+ function Has_Insert_Line return Boolean; - -- AKA: has_il() -- pragma Inline (Has_Insert_Line); -+ pragma Inline (Has_Insert_Line); - - -- #1A NAME="AFU_136"#2| -- function Supported_Attributes return Character_Attribute_Set; -+ function Supported_Attributes return Character_Attribute_Set; - -- AKA: termattrs() -- pragma Inline (Supported_Attributes); -+ pragma Inline (Supported_Attributes); - - -- #1A NAME="AFU_137"#2| -- procedure Long_Name (Name : out String); -+ procedure Long_Name (Name : out String); - -- AKA: longname() - - -- #1A NAME="AFU_138"#2| -- function Long_Name return String; -+ function Long_Name return String; - -- AKA: longname() - -- Same as function - pragma Inline (Long_Name); - - -- #1A NAME="AFU_139"#2| -- procedure Terminal_Name (Name : out String); -+ procedure Terminal_Name (Name : out String); - -- AKA: termname() - - -- #1A NAME="AFU_140"#2| -- function Terminal_Name return String; -+ function Terminal_Name return String; - -- AKA: termname() - -- Same as function - pragma Inline (Terminal_Name); -@@ -1709,151 +1711,151 @@ - -- This is equivalent to c.Color := n; - - -- #1A NAME="AFU_141"#2| -- procedure Start_Color; -+ procedure Start_Color; - -- AKA: start_color() - pragma Import (C, Start_Color, "start_color"); - - -- #1A NAME="AFU_142"#2| -- procedure Init_Pair (Pair : Redefinable_Color_Pair; -- Fore : Color_Number; -- Back : Color_Number); -+ procedure Init_Pair (Pair : Redefinable_Color_Pair; -+ Fore : Color_Number; -+ Back : Color_Number); - -- AKA: init_pair() -- pragma Inline (Init_Pair); -+ pragma Inline (Init_Pair); - - -- #1A NAME="AFU_143"#2| -- procedure Pair_Content (Pair : Color_Pair; -- Fore : out Color_Number; -- Back : out Color_Number); -+ procedure Pair_Content (Pair : Color_Pair; -+ Fore : out Color_Number; -+ Back : out Color_Number); - -- AKA: pair_content() -- pragma Inline (Pair_Content); -+ pragma Inline (Pair_Content); - - -- #1A NAME="AFU_144"#2| -- function Has_Colors return Boolean; -+ function Has_Colors return Boolean; - -- AKA: has_colors() -- pragma Inline (Has_Colors); -+ pragma Inline (Has_Colors); - - -- #1A NAME="AFU_145"#2| -- procedure Init_Color (Color : Color_Number; -- Red : RGB_Value; -- Green : RGB_Value; -- Blue : RGB_Value); -+ procedure Init_Color (Color : Color_Number; -+ Red : RGB_Value; -+ Green : RGB_Value; -+ Blue : RGB_Value); - -- AKA: init_color() -- pragma Inline (Init_Color); -+ pragma Inline (Init_Color); - - -- #1A NAME="AFU_146"#2| -- function Can_Change_Color return Boolean; -+ function Can_Change_Color return Boolean; - -- AKA: can_change_color() -- pragma Inline (Can_Change_Color); -+ pragma Inline (Can_Change_Color); - - -- #1A NAME="AFU_147"#2| -- procedure Color_Content (Color : Color_Number; -- Red : out RGB_Value; -- Green : out RGB_Value; -- Blue : out RGB_Value); -+ procedure Color_Content (Color : Color_Number; -+ Red : out RGB_Value; -+ Green : out RGB_Value; -+ Blue : out RGB_Value); - -- AKA: color_content() -- pragma Inline (Color_Content); -+ pragma Inline (Color_Content); - - -- |===================================================================== - -- | Man page curs_kernel.3x - -- |===================================================================== - -- | Not implemented: getsyx, setsyx - -- -- type Curses_Mode is (Curses, Shell); -+ type Curses_Mode is (Curses, Shell); - - -- #1A NAME="AFU_148"#2| -- procedure Save_Curses_Mode (Mode : Curses_Mode); -+ procedure Save_Curses_Mode (Mode : Curses_Mode); - -- AKA: def_prog_mode() - -- AKA: def_shell_mode() -- pragma Inline (Save_Curses_Mode); -+ pragma Inline (Save_Curses_Mode); - - -- #1A NAME="AFU_149"#2| -- procedure Reset_Curses_Mode (Mode : Curses_Mode); -+ procedure Reset_Curses_Mode (Mode : Curses_Mode); - -- AKA: reset_prog_mode() - -- AKA: reset_shell_mode() -- pragma Inline (Reset_Curses_Mode); -+ pragma Inline (Reset_Curses_Mode); - - -- #1A NAME="AFU_150"#2| -- procedure Save_Terminal_State; -+ procedure Save_Terminal_State; - -- AKA: savetty() -- pragma Inline (Save_Terminal_State); -+ pragma Inline (Save_Terminal_State); - - -- #1A NAME="AFU_151"#2| -- procedure Reset_Terminal_State; -+ procedure Reset_Terminal_State; - -- AKA: resetty(); -- pragma Inline (Reset_Terminal_State); -+ pragma Inline (Reset_Terminal_State); - -- type Stdscr_Init_Proc is access -- function (Win : Window; -- Columns : Column_Count) return Integer; -- pragma Convention (C, Stdscr_Init_Proc); -+ type Stdscr_Init_Proc is access -+ function (Win : Window; -+ Columns : Column_Count) return Integer; -+ pragma Convention (C, Stdscr_Init_Proc); - -- N.B.: the return value is actually ignored, but it seems to be - -- a good practice to return 0 if you think all went fine - -- and -1 otherwise. - - -- #1A NAME="AFU_152"#2| -- procedure Rip_Off_Lines (Lines : Integer; -- Proc : Stdscr_Init_Proc); -+ procedure Rip_Off_Lines (Lines : Integer; -+ Proc : Stdscr_Init_Proc); - -- AKA: ripoffline() - -- N.B.: to be more precise, this uses a ncurses specific enhancement of - -- 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); -+ -- uses the sign of Lines to remove a single line from bottom or top. -+ pragma Inline (Rip_Off_Lines); - -- type Cursor_Visibility is (Invisible, Normal, Very_Visible); -+ type Cursor_Visibility is (Invisible, Normal, Very_Visible); - - -- #1A NAME="AFU_153"#2| -- procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility); -+ procedure Set_Cursor_Visibility (Visibility : in out Cursor_Visibility); - -- AKA: curs_set() -- pragma Inline (Set_Cursor_Visibility); -+ pragma Inline (Set_Cursor_Visibility); - - -- #1A NAME="AFU_154"#2| -- procedure Nap_Milli_Seconds (Ms : Natural); -+ procedure Nap_Milli_Seconds (Ms : Natural); - -- AKA: napms() -- pragma Inline (Nap_Milli_Seconds); -+ pragma Inline (Nap_Milli_Seconds); - - -- |===================================================================== - -- | Some useful helpers. - -- |===================================================================== -- type Transform_Direction is (From_Screen, To_Screen); -- procedure Transform_Coordinates -- (W : Window := Standard_Window; -- Line : in out Line_Position; -- Column : in out Column_Position; -- Dir : Transform_Direction := From_Screen); -+ type Transform_Direction is (From_Screen, To_Screen); -+ procedure Transform_Coordinates -+ (W : Window := Standard_Window; -+ Line : in out Line_Position; -+ Column : in out Column_Position; -+ Dir : Transform_Direction := From_Screen); - -- This procedure transforms screen coordinates into coordinates relative - -- to the window and vice versa, depending on the Dir parameter. -- -- Screen coordinates are the position informations on the physical device. -+ -- Screen coordinates are the position information for 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 -+ -- We do not inline this procedure - - -- |===================================================================== - -- | Man page default_colors.3x - -- |===================================================================== - - -- #1A NAME="AFU_155"#2| -- procedure Use_Default_Colors; -+ procedure Use_Default_Colors; - -- AKA: use_default_colors() -- pragma Inline (Use_Default_Colors); -+ pragma Inline (Use_Default_Colors); - - -- #1A NAME="AFU_156"#2| -- procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; -- Back : Color_Number := Default_Color); -+ procedure Assume_Default_Colors (Fore : Color_Number := Default_Color; -+ Back : Color_Number := Default_Color); - -- AKA: assume_default_colors() -- pragma Inline (Assume_Default_Colors); -+ pragma Inline (Assume_Default_Colors); - - -- |===================================================================== - -- | Man page curs_extend.3x - -- |===================================================================== - - -- #1A NAME="AFU_157"#2| -- function Curses_Version return String; -+ function Curses_Version return String; - -- AKA: curses_version() - - -- #1A NAME="AFU_158"#2| - -- The returnvalue is the previous setting of the flag -- function Use_Extended_Names (Enable : Boolean) return Boolean; -+ function Use_Extended_Names (Enable : Boolean) return Boolean; - -- AKA: use_extended_names() - - -- |===================================================================== -@@ -1861,7 +1863,7 @@ - -- |===================================================================== - - -- #1A NAME="AFU_159"#2| -- procedure Curses_Free_All; -+ procedure Curses_Free_All; - -- AKA: _nc_freeall() - - -- |===================================================================== -@@ -1869,19 +1871,19 @@ - -- |===================================================================== - - -- #1A NAME="AFU_160"#2| -- procedure Screen_Dump_To_File (Filename : String); -+ procedure Screen_Dump_To_File (Filename : String); - -- AKA: scr_dump() - - -- #1A NAME="AFU_161"#2| -- procedure Screen_Restore_From_File (Filename : String); -+ procedure Screen_Restore_From_File (Filename : String); - -- AKA: scr_restore() - - -- #1A NAME="AFU_162"#2| -- procedure Screen_Init_From_File (Filename : String); -+ procedure Screen_Init_From_File (Filename : String); - -- AKA: scr_init() - - -- #1A NAME="AFU_163"#2| -- procedure Screen_Set_File (Filename : String); -+ procedure Screen_Set_File (Filename : String); - -- AKA: scr_set() - - -- |===================================================================== -@@ -1895,7 +1897,7 @@ - -- Not implemented: printw, wprintw, mvprintw, mvwprintw, vwprintw, - -- vw_printw - -- Please use the Ada style Text_IO child packages for formatted -- -- printing. It doesn't make a lot of sense to map the printf style -+ -- printing. It does not make a lot of sense to map the printf style - -- C functions to Ada. - - -- |===================================================================== -@@ -1913,9 +1915,9 @@ - -- |===================================================================== - - -- #1A NAME="AFU_164"#2| -- procedure Resize (Win : Window := Standard_Window; -- Number_Of_Lines : Line_Count; -- Number_Of_Columns : Column_Count); -+ procedure Resize (Win : Window := Standard_Window; -+ Number_Of_Lines : Line_Count; -+ Number_Of_Columns : Column_Count); - -- AKA: wresize() - - private -@@ -1925,9 +1927,7 @@ - -- The next constants are generated and may be different on your - -- architecture. - -- -- Sizeof_bool : constant Natural := 1; -- bool -- Offset_XY : constant Natural := 1; -- int -- -+ Sizeof_bool : constant Natural := 1; -- bool - type Curses_Bool is mod 2 ** Interfaces.C.char'Size; - Curses_Bool_False : constant Curses_Bool := 0; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-aux__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-aux__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-aux__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-aux__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -101,20 +101,20 @@ - begin - case Code is - when E_Ok => null; -- when E_System_Error => raise Eti_System_Error; -- when E_Bad_Argument => raise Eti_Bad_Argument; -- when E_Posted => raise Eti_Posted; -- when E_Connected => raise Eti_Connected; -- when E_Bad_State => raise Eti_Bad_State; -- when E_No_Room => raise Eti_No_Room; -- when E_Not_Posted => raise Eti_Not_Posted; -- when E_Unknown_Command => raise Eti_Unknown_Command; -- when E_No_Match => raise Eti_No_Match; -- when E_Not_Selectable => raise Eti_Not_Selectable; -- when E_Not_Connected => raise Eti_Not_Connected; -- when E_Request_Denied => raise Eti_Request_Denied; -- when E_Invalid_Field => raise Eti_Invalid_Field; -- when E_Current => raise Eti_Current; -+ when E_System_Error => raise Eti_System_Error; -+ when E_Bad_Argument => raise Eti_Bad_Argument; -+ when E_Posted => raise Eti_Posted; -+ when E_Connected => raise Eti_Connected; -+ when E_Bad_State => raise Eti_Bad_State; -+ when E_No_Room => raise Eti_No_Room; -+ when E_Not_Posted => raise Eti_Not_Posted; -+ when E_Unknown_Command => raise Eti_Unknown_Command; -+ when E_No_Match => raise Eti_No_Match; -+ when E_Not_Selectable => raise Eti_Not_Selectable; -+ when E_Not_Connected => raise Eti_Not_Connected; -+ when E_Request_Denied => raise Eti_Request_Denied; -+ when E_Invalid_Field => raise Eti_Invalid_Field; -+ when E_Current => raise Eti_Current; - end case; - end Eti_Exception; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-aux__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-aux__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-aux__ads.htm 2011-02-26 00:43:48.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-aux__ads.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,7 +40,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.17 @ -+-- @Revision: 1.18 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - -- curses binding. -@@ -71,7 +71,7 @@ - -- This is how those constants are defined in ncurses. I see them also - -- exactly like this in all ETI implementations I ever tested. So it - -- could be that this is quite general, but please check with your curses. -- -- This is critical, because curses sometime mixes boolean returns with -+ -- This is critical, because curses sometime mixes Boolean returns with - -- returning an error status. - Curses_Ok : constant C_Int := 0; - Curses_Err : constant C_Int := -1; -@@ -105,18 +105,18 @@ - -- Some helpers - function Chtype_To_AttrChar is new - Unchecked_Conversion (Source => C_Chtype, -- Target => Attributed_Character); -+ Target => Attributed_Character); - function AttrChar_To_Chtype is new -- Unchecked_Conversion (Source => Attributed_Character, -+ Unchecked_Conversion (Source => Attributed_Character, - Target => C_Chtype); - - function AttrChar_To_AttrType is new -- Unchecked_Conversion (Source => Attributed_Character, -+ Unchecked_Conversion (Source => Attributed_Character, - Target => C_AttrType); - - function AttrType_To_AttrChar is new - Unchecked_Conversion (Source => C_AttrType, -- Target => Attributed_Character); -+ Target => Attributed_Character); - - procedure Fill_String (Cp : chars_ptr; - Str : out String); -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms__adb.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.27 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.28 @ -+-- @Date: 2011/03/22 23:37:32 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -76,29 +76,29 @@ - Field_Option_Set); - - function FrmOS_2_CInt is new -- Ada.Unchecked_Conversion (Form_Option_Set, -+ Ada.Unchecked_Conversion (Form_Option_Set, - C_Int); - - function CInt_2_FrmOS is new - Ada.Unchecked_Conversion (C_Int, -- Form_Option_Set); -+ Form_Option_Set); - -- procedure Request_Name (Key : Form_Request_Code; -- Name : out String) -+ procedure Request_Name (Key : Form_Request_Code; -+ Name : out String) - is - function Form_Request_Name (Key : C_Int) return chars_ptr; - pragma Import (C, Form_Request_Name, "form_request_name"); - begin -- Fill_String (Form_Request_Name (C_Int (Key)), Name); -- end Request_Name; -+ Fill_String (Form_Request_Name (C_Int (Key)), Name); -+ end Request_Name; - -- function Request_Name (Key : Form_Request_Code) return String -+ 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 -- return Fill_String (Form_Request_Name (C_Int (Key))); -- end Request_Name; -+ return Fill_String (Form_Request_Name (C_Int (Key))); -+ end Request_Name; - ------------------------------------------------------------------------------ - -- | - -- | -@@ -110,84 +110,84 @@ - -- | - -- | - -- | -- function Create (Height : Line_Count; -- Width : Column_Count; -- Top : Line_Position; -- Left : Column_Position; -- Off_Screen : Natural := 0; -- More_Buffers : Buffer_Number := Buffer_Number'First) -+ function Create (Height : Line_Count; -+ Width : Column_Count; -+ Top : Line_Position; -+ Left : Column_Position; -+ Off_Screen : Natural := 0; -+ More_Buffers : Buffer_Number := Buffer_Number'First) - return Field - is - function Newfield (H, W, T, L, O, M : C_Int) return Field; - pragma Import (C, Newfield, "new_field"); -- Fld : constant Field := Newfield (C_Int (Height), C_Int (Width), -- C_Int (Top), C_Int (Left), -- C_Int (Off_Screen), -- C_Int (More_Buffers)); -+ Fld : constant Field := Newfield (C_Int (Height), C_Int (Width), -+ C_Int (Top), C_Int (Left), -+ C_Int (Off_Screen), -+ C_Int (More_Buffers)); - begin - if Fld = Null_Field then -- raise Form_Exception; -+ raise Form_Exception; - end if; - return Fld; -- end Create; -+ end Create; - -- | - -- | - -- | -- procedure Delete (Fld : in out Field) -+ procedure Delete (Fld : in out Field) - is - function Free_Field (Fld : Field) return C_Int; - pragma Import (C, Free_Field, "free_field"); - - Res : Eti_Error; - begin -- Res := Free_Field (Fld); -+ Res := Free_Field (Fld); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- Fld := Null_Field; -- end Delete; -+ Fld := Null_Field; -+ end Delete; - -- | - -- | - -- | -- function Duplicate (Fld : Field; -- Top : Line_Position; -- Left : Column_Position) return Field -+ function Duplicate (Fld : Field; -+ Top : Line_Position; -+ Left : Column_Position) return Field - is - function Dup_Field (Fld : Field; - Top : C_Int; - Left : C_Int) return Field; - pragma Import (C, Dup_Field, "dup_field"); - -- F : constant Field := Dup_Field (Fld, -- C_Int (Top), -- C_Int (Left)); -+ F : constant Field := Dup_Field (Fld, -+ C_Int (Top), -+ C_Int (Left)); - begin - if F = Null_Field then -- raise Form_Exception; -+ raise Form_Exception; - end if; - return F; -- end Duplicate; -+ end Duplicate; - -- | - -- | - -- | -- function Link (Fld : Field; -- Top : Line_Position; -- Left : Column_Position) return Field -+ function Link (Fld : Field; -+ Top : Line_Position; -+ Left : Column_Position) return Field - is - function Lnk_Field (Fld : Field; - Top : C_Int; - Left : C_Int) return Field; - pragma Import (C, Lnk_Field, "link_field"); - -- F : constant Field := Lnk_Field (Fld, -- C_Int (Top), -- C_Int (Left)); -+ F : constant Field := Lnk_Field (Fld, -+ C_Int (Top), -+ C_Int (Left)); - begin - if F = Null_Field then -- raise Form_Exception; -+ raise Form_Exception; - end if; - return F; -- end Link; -+ end Link; - -- | - -- |===================================================================== - -- | man page form_field_just.3x -@@ -195,31 +195,31 @@ - -- | - -- | - -- | -- procedure Set_Justification (Fld : Field; -- Just : Field_Justification := None) -+ procedure Set_Justification (Fld : Field; -+ Just : Field_Justification := None) - is - function Set_Field_Just (Fld : Field; - Just : C_Int) return C_Int; - pragma Import (C, Set_Field_Just, "set_field_just"); - - Res : constant Eti_Error := -- Set_Field_Just (Fld, -- C_Int (Field_Justification'Pos (Just))); -+ Set_Field_Just (Fld, -+ C_Int (Field_Justification'Pos (Just))); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Justification; -+ end Set_Justification; - -- | - -- | - -- | -- function Get_Justification (Fld : Field) return Field_Justification -+ function Get_Justification (Fld : Field) return Field_Justification - is - function Field_Just (Fld : Field) return C_Int; - pragma Import (C, Field_Just, "field_just"); - begin -- return Field_Justification'Val (Field_Just (Fld)); -- end Get_Justification; -+ return Field_Justification'Val (Field_Just (Fld)); -+ end Get_Justification; - -- | - -- |===================================================================== - -- | man page form_field_buffer.3x -@@ -227,10 +227,10 @@ - -- | - -- | - -- | -- procedure Set_Buffer -- (Fld : Field; -- Buffer : Buffer_Number := Buffer_Number'First; -- Str : String) -+ procedure Set_Buffer -+ (Fld : Field; -+ Buffer : Buffer_Number := Buffer_Number'First; -+ Str : String) - is - type Char_Ptr is access all Interfaces.C.char; - function Set_Fld_Buffer (Fld : Field; -@@ -239,89 +239,89 @@ - return C_Int; - pragma Import (C, Set_Fld_Buffer, "set_field_buffer"); - -- Txt : char_array (0 .. Str'Length); -+ Txt : char_array (0 .. Str'Length); - Len : size_t; - Res : Eti_Error; - begin -- To_C (Str, Txt, Len); -- Res := Set_Fld_Buffer (Fld, C_Int (Buffer), Txt (Txt'First)'Access); -+ To_C (Str, Txt, Len); -+ Res := Set_Fld_Buffer (Fld, C_Int (Buffer), Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Buffer; -+ end Set_Buffer; - -- | - -- | - -- | -- procedure Get_Buffer -- (Fld : Field; -- Buffer : Buffer_Number := Buffer_Number'First; -- Str : out String) -+ procedure Get_Buffer -+ (Fld : Field; -+ Buffer : Buffer_Number := Buffer_Number'First; -+ Str : out String) - is - function Field_Buffer (Fld : Field; - B : C_Int) return chars_ptr; - pragma Import (C, Field_Buffer, "field_buffer"); - begin -- Fill_String (Field_Buffer (Fld, C_Int (Buffer)), Str); -- end Get_Buffer; -+ Fill_String (Field_Buffer (Fld, C_Int (Buffer)), Str); -+ end Get_Buffer; - -- function Get_Buffer -- (Fld : Field; -- Buffer : Buffer_Number := Buffer_Number'First) return String -+ function Get_Buffer -+ (Fld : Field; -+ Buffer : 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; -+ return Fill_String (Field_Buffer (Fld, C_Int (Buffer))); -+ end Get_Buffer; - -- | - -- | - -- | -- procedure Set_Status (Fld : Field; -- Status : Boolean := True) -+ procedure Set_Status (Fld : Field; -+ Status : Boolean := True) - is - function Set_Fld_Status (Fld : Field; - St : C_Int) return C_Int; - pragma Import (C, Set_Fld_Status, "set_field_status"); - -- Res : constant Eti_Error := Set_Fld_Status (Fld, Boolean'Pos (Status)); -+ Res : constant Eti_Error := Set_Fld_Status (Fld, Boolean'Pos (Status)); - begin - if Res /= E_Ok then -- raise Form_Exception; -+ raise Form_Exception; - end if; -- end Set_Status; -+ end Set_Status; - -- | - -- | - -- | -- function Changed (Fld : Field) return Boolean -+ function Changed (Fld : Field) return Boolean - is - function Field_Status (Fld : Field) return C_Int; - pragma Import (C, Field_Status, "field_status"); - -- Res : constant C_Int := Field_Status (Fld); -+ Res : constant C_Int := Field_Status (Fld); - begin - if Res = Curses_False then - return False; - else - return True; - end if; -- end Changed; -+ end Changed; - -- | - -- | - -- | -- procedure Set_Maximum_Size (Fld : Field; -- Max : Natural := 0) -+ procedure Set_Maximum_Size (Fld : Field; -+ Max : Natural := 0) - is - function Set_Field_Max (Fld : Field; - M : C_Int) return C_Int; - pragma Import (C, Set_Field_Max, "set_max_field"); - -- Res : constant Eti_Error := Set_Field_Max (Fld, C_Int (Max)); -+ Res : constant Eti_Error := Set_Field_Max (Fld, C_Int (Max)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Maximum_Size; -+ end Set_Maximum_Size; - -- | - -- |===================================================================== - -- | man page form_field_opts.3x -@@ -329,27 +329,27 @@ - -- | - -- | - -- | -- procedure Set_Options (Fld : Field; -- Options : Field_Option_Set) -+ procedure Set_Options (Fld : Field; -+ Options : Field_Option_Set) - is - function Set_Field_Opts (Fld : Field; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Field_Opts, "set_field_opts"); - -- Opt : constant C_Int := FOS_2_CInt (Options); -+ Opt : constant C_Int := FOS_2_CInt (Options); - Res : Eti_Error; - begin -- Res := Set_Field_Opts (Fld, Opt); -+ Res := Set_Field_Opts (Fld, Opt); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Options; -+ end Set_Options; - -- | - -- | - -- | -- procedure Switch_Options (Fld : Field; -- Options : Field_Option_Set; -- On : Boolean := True) -+ procedure Switch_Options (Fld : Field; -+ Options : Field_Option_Set; -+ On : Boolean := True) - is - function Field_Opts_On (Fld : Field; - Opt : C_Int) return C_Int; -@@ -359,41 +359,41 @@ - pragma Import (C, Field_Opts_Off, "field_opts_off"); - - Err : Eti_Error; -- Opt : constant C_Int := FOS_2_CInt (Options); -+ Opt : constant C_Int := FOS_2_CInt (Options); - begin -- if On then -- Err := Field_Opts_On (Fld, Opt); -+ if On then -+ Err := Field_Opts_On (Fld, Opt); - else -- Err := Field_Opts_Off (Fld, Opt); -+ Err := Field_Opts_Off (Fld, Opt); - end if; - if Err /= E_Ok then - Eti_Exception (Err); - end if; -- end Switch_Options; -+ end Switch_Options; - -- | - -- | - -- | -- procedure Get_Options (Fld : Field; -- Options : out Field_Option_Set) -+ procedure Get_Options (Fld : Field; -+ Options : out Field_Option_Set) - is - function Field_Opts (Fld : Field) return C_Int; - pragma Import (C, Field_Opts, "field_opts"); - -- Res : constant C_Int := Field_Opts (Fld); -+ Res : constant C_Int := Field_Opts (Fld); - begin -- Options := CInt_2_FOS (Res); -- end Get_Options; -+ Options := CInt_2_FOS (Res); -+ end Get_Options; - -- | - -- | - -- | -- function Get_Options (Fld : Field := Null_Field) -+ function Get_Options (Fld : Field := Null_Field) - return Field_Option_Set - is - Fos : Field_Option_Set; - begin -- Get_Options (Fld, Fos); -+ Get_Options (Fld, Fos); - return Fos; -- end Get_Options; -+ end Get_Options; - -- | - -- |===================================================================== - -- | man page form_field_attributes.3x -@@ -401,119 +401,119 @@ - -- | - -- | - -- | -- procedure Set_Foreground -- (Fld : Field; -- Fore : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Set_Foreground -+ (Fld : Field; -+ Fore : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Set_Field_Fore (Fld : Field; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Field_Fore, "set_field_fore"); - -- Ch : constant Attributed_Character := (Ch => Character'First, -- Color => Color, -- Attr => Fore); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Color => Color, -+ Attr => Fore); - Res : constant Eti_Error := -- Set_Field_Fore (Fld, AttrChar_To_Chtype (Ch)); -+ Set_Field_Fore (Fld, AttrChar_To_Chtype (Ch)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Foreground; -+ end Set_Foreground; - -- | - -- | - -- | -- procedure Foreground (Fld : Field; -- Fore : out Character_Attribute_Set) -+ procedure Foreground (Fld : Field; -+ Fore : out Character_Attribute_Set) - is - function Field_Fore (Fld : Field) return C_Chtype; - pragma Import (C, Field_Fore, "field_fore"); - begin -- Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; -- end Foreground; -+ Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; -+ end Foreground; - -- procedure Foreground (Fld : Field; -- Fore : out Character_Attribute_Set; -- Color : out Color_Pair) -+ procedure Foreground (Fld : Field; -+ Fore : out Character_Attribute_Set; -+ Color : out Color_Pair) - is - function Field_Fore (Fld : Field) return C_Chtype; - pragma Import (C, Field_Fore, "field_fore"); - begin -- Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; -- Color := Chtype_To_AttrChar (Field_Fore (Fld)).Color; -- end Foreground; -+ Fore := Chtype_To_AttrChar (Field_Fore (Fld)).Attr; -+ Color := Chtype_To_AttrChar (Field_Fore (Fld)).Color; -+ end Foreground; - -- | - -- | - -- | -- procedure Set_Background -- (Fld : Field; -- Back : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Set_Background -+ (Fld : Field; -+ Back : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Set_Field_Back (Fld : Field; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Field_Back, "set_field_back"); - -- Ch : constant Attributed_Character := (Ch => Character'First, -- Color => Color, -- Attr => Back); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Color => Color, -+ Attr => Back); - Res : constant Eti_Error := -- Set_Field_Back (Fld, AttrChar_To_Chtype (Ch)); -+ Set_Field_Back (Fld, AttrChar_To_Chtype (Ch)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Background; -+ end Set_Background; - -- | - -- | - -- | -- procedure Background (Fld : Field; -- Back : out Character_Attribute_Set) -+ procedure Background (Fld : Field; -+ Back : out Character_Attribute_Set) - is - function Field_Back (Fld : Field) return C_Chtype; - pragma Import (C, Field_Back, "field_back"); - begin -- Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; -- end Background; -+ Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; -+ end Background; - -- procedure Background (Fld : Field; -- Back : out Character_Attribute_Set; -- Color : out Color_Pair) -+ procedure Background (Fld : Field; -+ Back : out Character_Attribute_Set; -+ Color : out Color_Pair) - is - function Field_Back (Fld : Field) return C_Chtype; - pragma Import (C, Field_Back, "field_back"); - begin -- Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; -- Color := Chtype_To_AttrChar (Field_Back (Fld)).Color; -- end Background; -+ Back := Chtype_To_AttrChar (Field_Back (Fld)).Attr; -+ Color := Chtype_To_AttrChar (Field_Back (Fld)).Color; -+ end Background; - -- | - -- | - -- | -- procedure Set_Pad_Character (Fld : Field; -- Pad : Character := Space) -+ procedure Set_Pad_Character (Fld : Field; -+ Pad : Character := Space) - is - function Set_Field_Pad (Fld : Field; - Ch : C_Int) return C_Int; - pragma Import (C, Set_Field_Pad, "set_field_pad"); - -- Res : constant Eti_Error := Set_Field_Pad (Fld, -- C_Int (Character'Pos (Pad))); -+ Res : constant Eti_Error := Set_Field_Pad (Fld, -+ C_Int (Character'Pos (Pad))); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Pad_Character; -+ end Set_Pad_Character; - -- | - -- | - -- | -- procedure Pad_Character (Fld : Field; -- Pad : out Character) -+ procedure Pad_Character (Fld : Field; -+ Pad : out Character) - is - function Field_Pad (Fld : Field) return C_Int; - pragma Import (C, Field_Pad, "field_pad"); - begin -- Pad := Character'Val (Field_Pad (Fld)); -- end Pad_Character; -+ Pad := Character'Val (Field_Pad (Fld)); -+ end Pad_Character; - -- | - -- |===================================================================== - -- | man page form_field_info.3x -@@ -521,13 +521,13 @@ - -- | - -- | - -- | -- procedure Info (Fld : Field; -- Lines : out Line_Count; -- Columns : out Column_Count; -- First_Row : out Line_Position; -- First_Column : out Column_Position; -- Off_Screen : out Natural; -- Additional_Buffers : out Buffer_Number) -+ procedure Info (Fld : Field; -+ Lines : out Line_Count; -+ Columns : out Column_Count; -+ First_Row : out Line_Position; -+ First_Column : out Column_Position; -+ Off_Screen : out Natural; -+ Additional_Buffers : out Buffer_Number) - is - type C_Int_Access is access all C_Int; - function Fld_Info (Fld : Field; -@@ -536,7 +536,7 @@ - pragma Import (C, Fld_Info, "field_info"); - - L, C, Fr, Fc, Os, Ab : aliased C_Int; -- Res : constant Eti_Error := Fld_Info (Fld, -+ Res : constant Eti_Error := Fld_Info (Fld, - L'Access, C'Access, - Fr'Access, Fc'Access, - Os'Access, Ab'Access); -@@ -544,39 +544,39 @@ - if Res /= E_Ok then - Eti_Exception (Res); - else -- Lines := Line_Count (L); -- Columns := Column_Count (C); -- First_Row := Line_Position (Fr); -- First_Column := Column_Position (Fc); -- Off_Screen := Natural (Os); -- Additional_Buffers := Buffer_Number (Ab); -+ Lines := Line_Count (L); -+ Columns := Column_Count (C); -+ First_Row := Line_Position (Fr); -+ First_Column := Column_Position (Fc); -+ Off_Screen := Natural (Os); -+ Additional_Buffers := Buffer_Number (Ab); - end if; -- end Info; -+ end Info; - -- | - -- | - -- | -- procedure Dynamic_Info (Fld : Field; -- Lines : out Line_Count; -- Columns : out Column_Count; -- Max : out Natural) -+ procedure Dynamic_Info (Fld : Field; -+ Lines : out Line_Count; -+ Columns : out Column_Count; -+ Max : out Natural) - is - type C_Int_Access is access all C_Int; - function Dyn_Info (Fld : Field; L, C, M : C_Int_Access) return C_Int; - pragma Import (C, Dyn_Info, "dynamic_field_info"); - - L, C, M : aliased C_Int; -- Res : constant Eti_Error := Dyn_Info (Fld, -+ Res : constant Eti_Error := Dyn_Info (Fld, - L'Access, C'Access, - M'Access); - begin - if Res /= E_Ok then - Eti_Exception (Res); - else -- Lines := Line_Count (L); -- Columns := Column_Count (C); -- Max := Natural (M); -+ Lines := Line_Count (L); -+ Columns := Column_Count (C); -+ Max := Natural (M); - end if; -- end Dynamic_Info; -+ end Dynamic_Info; - -- | - -- |===================================================================== - -- | man page form_win.3x -@@ -584,79 +584,79 @@ - -- | - -- | - -- | -- procedure Set_Window (Frm : Form; -- Win : Window) -+ procedure Set_Window (Frm : Form; -+ Win : Window) - is - function Set_Form_Win (Frm : Form; - Win : Window) return C_Int; - pragma Import (C, Set_Form_Win, "set_form_win"); - -- Res : constant Eti_Error := Set_Form_Win (Frm, Win); -+ Res : constant Eti_Error := Set_Form_Win (Frm, Win); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Window; -+ end Set_Window; - -- | - -- | - -- | -- function Get_Window (Frm : Form) return Window -+ function Get_Window (Frm : Form) return Window - is - function Form_Win (Frm : Form) return Window; - pragma Import (C, Form_Win, "form_win"); - -- W : constant Window := Form_Win (Frm); -+ W : constant Window := Form_Win (Frm); - begin - return W; -- end Get_Window; -+ end Get_Window; - -- | - -- | - -- | -- procedure Set_Sub_Window (Frm : Form; -- Win : Window) -+ procedure Set_Sub_Window (Frm : Form; -+ Win : Window) - is - function Set_Form_Sub (Frm : Form; - Win : Window) return C_Int; - pragma Import (C, Set_Form_Sub, "set_form_sub"); - -- Res : constant Eti_Error := Set_Form_Sub (Frm, Win); -+ Res : constant Eti_Error := Set_Form_Sub (Frm, Win); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Sub_Window; -+ end Set_Sub_Window; - -- | - -- | - -- | -- function Get_Sub_Window (Frm : Form) return Window -+ function Get_Sub_Window (Frm : Form) return Window - is - function Form_Sub (Frm : Form) return Window; - pragma Import (C, Form_Sub, "form_sub"); - -- W : constant Window := Form_Sub (Frm); -+ W : constant Window := Form_Sub (Frm); - begin - return W; -- end Get_Sub_Window; -+ end Get_Sub_Window; - -- | - -- | - -- | -- procedure Scale (Frm : Form; -- Lines : out Line_Count; -- Columns : out Column_Count) -+ procedure Scale (Frm : Form; -+ Lines : out Line_Count; -+ Columns : out Column_Count) - is - type C_Int_Access is access all C_Int; - function M_Scale (Frm : Form; Yp, Xp : C_Int_Access) return C_Int; - pragma Import (C, M_Scale, "scale_form"); - - X, Y : aliased C_Int; -- Res : constant Eti_Error := M_Scale (Frm, Y'Access, X'Access); -+ Res : constant Eti_Error := M_Scale (Frm, Y'Access, X'Access); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- Lines := Line_Count (Y); -- Columns := Column_Count (X); -- end Scale; -+ Lines := Line_Count (Y); -+ Columns := Column_Count (X); -+ end Scale; - -- | - -- |===================================================================== - -- | man page menu_hook.3x -@@ -664,67 +664,67 @@ - -- | - -- | - -- | -- procedure Set_Field_Init_Hook (Frm : Form; -- Proc : Form_Hook_Function) -+ procedure Set_Field_Init_Hook (Frm : Form; -+ Proc : Form_Hook_Function) - is - function Set_Field_Init (Frm : Form; -- Proc : Form_Hook_Function) return C_Int; -+ Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Field_Init, "set_field_init"); - -- Res : constant Eti_Error := Set_Field_Init (Frm, Proc); -+ Res : constant Eti_Error := Set_Field_Init (Frm, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Field_Init_Hook; -+ end Set_Field_Init_Hook; - -- | - -- | - -- | -- procedure Set_Field_Term_Hook (Frm : Form; -- Proc : Form_Hook_Function) -+ procedure Set_Field_Term_Hook (Frm : Form; -+ Proc : Form_Hook_Function) - is - function Set_Field_Term (Frm : Form; -- Proc : Form_Hook_Function) return C_Int; -+ Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Field_Term, "set_field_term"); - -- Res : constant Eti_Error := Set_Field_Term (Frm, Proc); -+ Res : constant Eti_Error := Set_Field_Term (Frm, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Field_Term_Hook; -+ end Set_Field_Term_Hook; - -- | - -- | - -- | -- procedure Set_Form_Init_Hook (Frm : Form; -- Proc : Form_Hook_Function) -+ procedure Set_Form_Init_Hook (Frm : Form; -+ Proc : Form_Hook_Function) - is - function Set_Form_Init (Frm : Form; -- Proc : Form_Hook_Function) return C_Int; -+ Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Form_Init, "set_form_init"); - -- Res : constant Eti_Error := Set_Form_Init (Frm, Proc); -+ Res : constant Eti_Error := Set_Form_Init (Frm, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Form_Init_Hook; -+ end Set_Form_Init_Hook; - -- | - -- | - -- | -- procedure Set_Form_Term_Hook (Frm : Form; -- Proc : Form_Hook_Function) -+ procedure Set_Form_Term_Hook (Frm : Form; -+ Proc : Form_Hook_Function) - is - function Set_Form_Term (Frm : Form; -- Proc : Form_Hook_Function) return C_Int; -+ Proc : Form_Hook_Function) return C_Int; - pragma Import (C, Set_Form_Term, "set_form_term"); - -- Res : constant Eti_Error := Set_Form_Term (Frm, Proc); -+ Res : constant Eti_Error := Set_Form_Term (Frm, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Form_Term_Hook; -+ end Set_Form_Term_Hook; - -- | - -- |===================================================================== - -- | man page form_fields.3x -@@ -732,8 +732,8 @@ - -- | - -- | - -- | -- procedure Redefine (Frm : Form; -- Flds : Field_Array_Access) -+ procedure Redefine (Frm : Form; -+ Flds : Field_Array_Access) - is - function Set_Frm_Fields (Frm : Form; - Items : System.Address) return C_Int; -@@ -741,62 +741,62 @@ - - Res : Eti_Error; - begin -- pragma Assert (Flds (Flds'Last) = Null_Field); -- if Flds (Flds'Last) /= Null_Field then -- raise Form_Exception; -+ pragma Assert (Flds.all (Flds'Last) = Null_Field); -+ if Flds.all (Flds'Last) /= Null_Field then -+ raise Form_Exception; - else -- Res := Set_Frm_Fields (Frm, Flds (Flds'First)'Address); -+ Res := Set_Frm_Fields (Frm, Flds.all (Flds'First)'Address); - if Res /= E_Ok then - Eti_Exception (Res); - end if; - end if; -- end Redefine; -+ end Redefine; - -- | - -- | - -- | -- function Fields (Frm : Form; -- Index : Positive) return Field -+ function Fields (Frm : Form; -+ Index : Positive) return Field - is - use F_Array; - - function C_Fields (Frm : Form) return Pointer; - pragma Import (C, C_Fields, "form_fields"); - -- P : Pointer := C_Fields (Frm); -+ P : Pointer := C_Fields (Frm); - begin -- if P = null or else Index > Field_Count (Frm) then -- raise Form_Exception; -+ if P = null or else Index > Field_Count (Frm) then -+ raise Form_Exception; - else -- P := P + ptrdiff_t (C_Int (Index) - 1); -+ P := P + ptrdiff_t (C_Int (Index) - 1); - return P.all; - end if; -- end Fields; -+ end Fields; - -- | - -- | - -- | -- function Field_Count (Frm : Form) return Natural -+ function Field_Count (Frm : Form) return Natural - is - function Count (Frm : Form) return C_Int; - pragma Import (C, Count, "field_count"); - begin -- return Natural (Count (Frm)); -- end Field_Count; -+ return Natural (Count (Frm)); -+ end Field_Count; - -- | - -- | - -- | -- procedure Move (Fld : Field; -- Line : Line_Position; -- Column : Column_Position) -+ procedure Move (Fld : Field; -+ Line : Line_Position; -+ Column : Column_Position) - is - function Move (Fld : Field; L, C : C_Int) return C_Int; - pragma Import (C, Move, "move_field"); - -- Res : constant Eti_Error := Move (Fld, C_Int (Line), C_Int (Column)); -+ Res : constant Eti_Error := Move (Fld, C_Int (Line), C_Int (Column)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Move; -+ end Move; - -- | - -- |===================================================================== - -- | man page form_new.3x -@@ -804,39 +804,39 @@ - -- | - -- | - -- | -- function Create (Fields : Field_Array_Access) return Form -+ function Create (Fields : Field_Array_Access) return Form - is - function NewForm (Fields : System.Address) return Form; - pragma Import (C, NewForm, "new_form"); - - M : Form; - begin -- pragma Assert (Fields (Fields'Last) = Null_Field); -- if Fields (Fields'Last) /= Null_Field then -- raise Form_Exception; -+ pragma Assert (Fields.all (Fields'Last) = Null_Field); -+ if Fields.all (Fields'Last) /= Null_Field then -+ raise Form_Exception; - else -- M := NewForm (Fields (Fields'First)'Address); -+ M := NewForm (Fields.all (Fields'First)'Address); - if M = Null_Form then -- raise Form_Exception; -+ raise Form_Exception; - end if; - return M; - end if; -- end Create; -+ end Create; - -- | - -- | - -- | -- procedure Delete (Frm : in out Form) -+ procedure Delete (Frm : in out Form) - is - function Free (Frm : Form) return C_Int; - pragma Import (C, Free, "free_form"); - -- Res : constant Eti_Error := Free (Frm); -+ Res : constant Eti_Error := Free (Frm); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- Frm := Null_Form; -- end Delete; -+ Frm := Null_Form; -+ end Delete; - -- | - -- |===================================================================== - -- | man page form_opts.3x -@@ -844,27 +844,27 @@ - -- | - -- | - -- | -- procedure Set_Options (Frm : Form; -- Options : Form_Option_Set) -+ procedure Set_Options (Frm : Form; -+ Options : Form_Option_Set) - is - function Set_Form_Opts (Frm : Form; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Form_Opts, "set_form_opts"); - -- Opt : constant C_Int := FrmOS_2_CInt (Options); -+ Opt : constant C_Int := FrmOS_2_CInt (Options); - Res : Eti_Error; - begin -- Res := Set_Form_Opts (Frm, Opt); -+ Res := Set_Form_Opts (Frm, Opt); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Options; -+ end Set_Options; - -- | - -- | - -- | -- procedure Switch_Options (Frm : Form; -- Options : Form_Option_Set; -- On : Boolean := True) -+ procedure Switch_Options (Frm : Form; -+ Options : Form_Option_Set; -+ On : Boolean := True) - is - function Form_Opts_On (Frm : Form; - Opt : C_Int) return C_Int; -@@ -874,40 +874,40 @@ - pragma Import (C, Form_Opts_Off, "form_opts_off"); - - Err : Eti_Error; -- Opt : constant C_Int := FrmOS_2_CInt (Options); -+ Opt : constant C_Int := FrmOS_2_CInt (Options); - begin -- if On then -- Err := Form_Opts_On (Frm, Opt); -+ if On then -+ Err := Form_Opts_On (Frm, Opt); - else -- Err := Form_Opts_Off (Frm, Opt); -+ Err := Form_Opts_Off (Frm, Opt); - end if; - if Err /= E_Ok then - Eti_Exception (Err); - end if; -- end Switch_Options; -+ end Switch_Options; - -- | - -- | - -- | -- procedure Get_Options (Frm : Form; -- Options : out Form_Option_Set) -+ procedure Get_Options (Frm : Form; -+ Options : out Form_Option_Set) - is - function Form_Opts (Frm : Form) return C_Int; - pragma Import (C, Form_Opts, "form_opts"); - -- Res : constant C_Int := Form_Opts (Frm); -+ Res : constant C_Int := Form_Opts (Frm); - begin -- Options := CInt_2_FrmOS (Res); -- end Get_Options; -+ Options := CInt_2_FrmOS (Res); -+ end Get_Options; - -- | - -- | - -- | -- function Get_Options (Frm : Form := Null_Form) return Form_Option_Set -+ function Get_Options (Frm : Form := Null_Form) return Form_Option_Set - is -- Fos : Form_Option_Set; -+ Fos : Form_Option_Set; - begin -- Get_Options (Frm, Fos); -+ Get_Options (Frm, Fos); - return Fos; -- end Get_Options; -+ end Get_Options; - -- | - -- |===================================================================== - -- | man page form_post.3x -@@ -915,8 +915,8 @@ - -- | - -- | - -- | -- procedure Post (Frm : Form; -- Post : Boolean := True) -+ procedure Post (Frm : Form; -+ Post : Boolean := True) - is - function M_Post (Frm : Form) return C_Int; - pragma Import (C, M_Post, "post_form"); -@@ -925,15 +925,15 @@ - - Res : Eti_Error; - begin -- if Post then -- Res := M_Post (Frm); -+ if Post then -+ Res := M_Post (Frm); - else -- Res := M_Unpost (Frm); -+ Res := M_Unpost (Frm); - end if; - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Post; -+ end Post; - -- | - -- |===================================================================== - -- | man page form_cursor.3x -@@ -941,17 +941,17 @@ - -- | - -- | - -- | -- procedure Position_Cursor (Frm : Form) -+ procedure Position_Cursor (Frm : Form) - is - function Pos_Form_Cursor (Frm : Form) return C_Int; - pragma Import (C, Pos_Form_Cursor, "pos_form_cursor"); - -- Res : constant Eti_Error := Pos_Form_Cursor (Frm); -+ Res : constant Eti_Error := Pos_Form_Cursor (Frm); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Position_Cursor; -+ end Position_Cursor; - -- | - -- |===================================================================== - -- | man page form_data.3x -@@ -959,35 +959,35 @@ - -- | - -- | - -- | -- function Data_Ahead (Frm : Form) return Boolean -+ function Data_Ahead (Frm : Form) return Boolean - is - function Ahead (Frm : Form) return C_Int; - pragma Import (C, Ahead, "data_ahead"); - -- Res : constant C_Int := Ahead (Frm); -+ Res : constant C_Int := Ahead (Frm); - begin - if Res = Curses_False then - return False; - else - return True; - end if; -- end Data_Ahead; -+ end Data_Ahead; - -- | - -- | - -- | -- function Data_Behind (Frm : Form) return Boolean -+ function Data_Behind (Frm : Form) return Boolean - is - function Behind (Frm : Form) return C_Int; - pragma Import (C, Behind, "data_behind"); - -- Res : constant C_Int := Behind (Frm); -+ Res : constant C_Int := Behind (Frm); - begin - if Res = Curses_False then - return False; - else - return True; - end if; -- end Data_Behind; -+ end Data_Behind; - -- | - -- |===================================================================== - -- | man page form_driver.3x -@@ -995,29 +995,29 @@ - -- | - -- | - -- | -- function Driver (Frm : Form; -- Key : Key_Code) return Driver_Result -+ function Driver (Frm : Form; -+ Key : Key_Code) return Driver_Result - is - function Frm_Driver (Frm : Form; Key : C_Int) return C_Int; - pragma Import (C, Frm_Driver, "form_driver"); - -- R : constant Eti_Error := Frm_Driver (Frm, C_Int (Key)); -+ R : constant Eti_Error := Frm_Driver (Frm, C_Int (Key)); - begin - if R /= E_Ok then - if R = E_Unknown_Command then -- return Unknown_Request; -+ return Unknown_Request; - elsif R = E_Invalid_Field then -- return Invalid_Field; -+ return Invalid_Field; - elsif R = E_Request_Denied then -- return Request_Denied; -+ return Request_Denied; - else - Eti_Exception (R); -- return Form_Ok; -+ return Form_Ok; - end if; - else -- return Form_Ok; -+ return Form_Ok; - end if; -- end Driver; -+ end Driver; - -- | - -- |===================================================================== - -- | man page form_page.3x -@@ -1025,77 +1025,77 @@ - -- | - -- | - -- | -- procedure Set_Current (Frm : Form; -- Fld : Field) -+ procedure Set_Current (Frm : Form; -+ Fld : Field) - is - function Set_Current_Fld (Frm : Form; Fld : Field) return C_Int; - pragma Import (C, Set_Current_Fld, "set_current_field"); - -- Res : constant Eti_Error := Set_Current_Fld (Frm, Fld); -+ Res : constant Eti_Error := Set_Current_Fld (Frm, Fld); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Current; -+ end Set_Current; - -- | - -- | - -- | -- function Current (Frm : Form) return Field -+ function Current (Frm : Form) return Field - is - function Current_Fld (Frm : Form) return Field; - pragma Import (C, Current_Fld, "current_field"); - -- Fld : constant Field := Current_Fld (Frm); -+ Fld : constant Field := Current_Fld (Frm); - begin - if Fld = Null_Field then -- raise Form_Exception; -+ raise Form_Exception; - end if; - return Fld; -- end Current; -+ end Current; - -- | - -- | - -- | -- procedure Set_Page (Frm : Form; -- Page : Page_Number := Page_Number'First) -+ procedure Set_Page (Frm : Form; -+ Page : Page_Number := Page_Number'First) - is - function Set_Frm_Page (Frm : Form; Pg : C_Int) return C_Int; - pragma Import (C, Set_Frm_Page, "set_form_page"); - -- Res : constant Eti_Error := Set_Frm_Page (Frm, C_Int (Page)); -+ Res : constant Eti_Error := Set_Frm_Page (Frm, C_Int (Page)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Page; -+ end Set_Page; - -- | - -- | - -- | -- function Page (Frm : Form) return Page_Number -+ function Page (Frm : Form) return Page_Number - is - function Get_Page (Frm : Form) return C_Int; - pragma Import (C, Get_Page, "form_page"); - -- P : constant C_Int := Get_Page (Frm); -+ P : constant C_Int := Get_Page (Frm); - begin - if P < 0 then -- raise Form_Exception; -+ raise Form_Exception; - else -- return Page_Number (P); -+ return Page_Number (P); - end if; -- end Page; -+ end Page; - -- function Get_Index (Fld : Field) return Positive -+ function Get_Index (Fld : Field) return Positive - is - function Get_Fieldindex (Fld : Field) return C_Int; - pragma Import (C, Get_Fieldindex, "field_index"); - -- Res : constant C_Int := Get_Fieldindex (Fld); -+ Res : constant C_Int := Get_Fieldindex (Fld); - begin - if Res = Curses_Err then -- raise Form_Exception; -+ raise Form_Exception; - end if; - return Positive (Natural (Res) + Positive'First); -- end Get_Index; -+ end Get_Index; - - -- | - -- |===================================================================== -@@ -1104,64 +1104,64 @@ - -- | - -- | - -- | -- procedure Set_New_Page (Fld : Field; -- New_Page : Boolean := True) -+ procedure Set_New_Page (Fld : Field; -+ New_Page : Boolean := True) - is - function Set_Page (Fld : Field; Flg : C_Int) return C_Int; - pragma Import (C, Set_Page, "set_new_page"); - -- Res : constant Eti_Error := Set_Page (Fld, Boolean'Pos (New_Page)); -+ Res : constant Eti_Error := Set_Page (Fld, Boolean'Pos (New_Page)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_New_Page; -+ end Set_New_Page; - -- | - -- | - -- | -- function Is_New_Page (Fld : Field) return Boolean -+ function Is_New_Page (Fld : Field) return Boolean - is - function Is_New (Fld : Field) return C_Int; - pragma Import (C, Is_New, "new_page"); - -- Res : constant C_Int := Is_New (Fld); -+ Res : constant C_Int := Is_New (Fld); - begin - if Res = Curses_False then - return False; - else - return True; - end if; -- end Is_New_Page; -+ end Is_New_Page; - -- procedure Free (FA : in out Field_Array_Access; -- Free_Fields : Boolean := False) -+ procedure Free (FA : in out Field_Array_Access; -+ Free_Fields : Boolean := False) - is - procedure Release is new Ada.Unchecked_Deallocation -- (Field_Array, Field_Array_Access); -+ (Field_Array, Field_Array_Access); - begin -- 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)); -+ if FA /= null and then Free_Fields then -+ for I in FA'First .. (FA'Last - 1) loop -+ if FA.all (I) /= Null_Field then -+ Delete (FA.all (I)); - end if; - end loop; - end if; -- Release (FA); -- end Free; -+ Release (FA); -+ end Free; - - -- |===================================================================== - -- function Default_Field_Options return Field_Option_Set -+ function Default_Field_Options return Field_Option_Set - is - begin -- return Get_Options (Null_Field); -- end Default_Field_Options; -+ return Get_Options (Null_Field); -+ end Default_Field_Options; - -- function Default_Form_Options return Form_Option_Set -+ function Default_Form_Options return Form_Option_Set - is - begin -- return Get_Options (Null_Form); -- end Default_Form_Options; -+ return Get_Options (Null_Form); -+ end Default_Form_Options; - - end Terminal_Interface.Curses.Forms; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms__ads.htm 2010-05-29 23:56:05.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms__ads.htm 2011-03-20 00:18:40.000000000 +0100 -@@ -82,6 +82,7 @@ - Null_Ok : Boolean; - Pass_Ok : Boolean; - Static : Boolean; -+ Unused : Boolean; - end record; - pragma Convention (C, Field_Option_Set); - -@@ -97,6 +98,7 @@ - Null_Ok at 0 range 7 .. 7; - Pass_Ok at 0 range 8 .. 8; - Static at 0 range 9 .. 9; -+ Unused at 0 range 10 .. 31; - end record; - for Field_Option_Set'Size use 32; - -- Please note: this rep. clause is generated and may be -@@ -104,321 +106,323 @@ - - pragma Warnings (On); - -- function Default_Field_Options return Field_Option_Set; -+ function Default_Field_Options return Field_Option_Set; - -- The initial defaults for the field options. -- pragma Inline (Default_Field_Options); -+ pragma Inline (Default_Field_Options); - - pragma Warnings (Off); -- type Form_Option_Set is -+ type Form_Option_Set is - record -- NL_Overload : Boolean; -- BS_Overload : Boolean; -+ NL_Overload : Boolean; -+ BS_Overload : Boolean; -+ Unused : Boolean; - end record; -- pragma Convention (C, Form_Option_Set); -+ pragma Convention (C, Form_Option_Set); - -- for Form_Option_Set use -+ for Form_Option_Set use - record -- NL_Overload at 0 range 0 .. 0; -- BS_Overload at 0 range 1 .. 1; -+ NL_Overload at 0 range 0 .. 0; -+ BS_Overload at 0 range 1 .. 1; -+ Unused at 0 range 2 .. 31; - end record; -- for Form_Option_Set'Size use 32; -+ for Form_Option_Set'Size use 32; - -- Please note: this rep. clause is generated and may be - -- different on your system.Dnl - - pragma Warnings (On); - -- function Default_Form_Options return Form_Option_Set; -+ function Default_Form_Options return Form_Option_Set; - -- The initial defaults for the form options. -- pragma Inline (Default_Form_Options); -+ pragma Inline (Default_Form_Options); - -- type Buffer_Number is new Natural; -+ 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 Field_Array; -+ type Field_Array_Access is access Field_Array; - -- procedure Free (FA : in out Field_Array_Access; -- Free_Fields : Boolean := False); -+ procedure Free (FA : in out Field_Array_Access; -+ Free_Fields : 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); -+ subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57); - - -- The prefix F_ stands for "Form Request" -- F_Next_Page : constant Form_Request_Code := Key_Max + 1; -- F_Previous_Page : constant Form_Request_Code := Key_Max + 2; -- F_First_Page : constant Form_Request_Code := Key_Max + 3; -- F_Last_Page : constant Form_Request_Code := Key_Max + 4; -- -- F_Next_Field : constant Form_Request_Code := Key_Max + 5; -- F_Previous_Field : constant Form_Request_Code := Key_Max + 6; -- F_First_Field : constant Form_Request_Code := Key_Max + 7; -- F_Last_Field : constant Form_Request_Code := Key_Max + 8; -- F_Sorted_Next_Field : constant Form_Request_Code := Key_Max + 9; -- F_Sorted_Previous_Field : constant Form_Request_Code := Key_Max + 10; -- F_Sorted_First_Field : constant Form_Request_Code := Key_Max + 11; -- F_Sorted_Last_Field : constant Form_Request_Code := Key_Max + 12; -- F_Left_Field : constant Form_Request_Code := Key_Max + 13; -- F_Right_Field : constant Form_Request_Code := Key_Max + 14; -- F_Up_Field : constant Form_Request_Code := Key_Max + 15; -- F_Down_Field : constant Form_Request_Code := Key_Max + 16; -- -- F_Next_Char : constant Form_Request_Code := Key_Max + 17; -- F_Previous_Char : constant Form_Request_Code := Key_Max + 18; -- F_Next_Line : constant Form_Request_Code := Key_Max + 19; -- F_Previous_Line : constant Form_Request_Code := Key_Max + 20; -- F_Next_Word : constant Form_Request_Code := Key_Max + 21; -- F_Previous_Word : constant Form_Request_Code := Key_Max + 22; -- F_Begin_Field : constant Form_Request_Code := Key_Max + 23; -- F_End_Field : constant Form_Request_Code := Key_Max + 24; -- F_Begin_Line : constant Form_Request_Code := Key_Max + 25; -- F_End_Line : constant Form_Request_Code := Key_Max + 26; -- F_Left_Char : constant Form_Request_Code := Key_Max + 27; -- F_Right_Char : constant Form_Request_Code := Key_Max + 28; -- F_Up_Char : constant Form_Request_Code := Key_Max + 29; -- F_Down_Char : constant Form_Request_Code := Key_Max + 30; -- -- F_New_Line : constant Form_Request_Code := Key_Max + 31; -- F_Insert_Char : constant Form_Request_Code := Key_Max + 32; -- F_Insert_Line : constant Form_Request_Code := Key_Max + 33; -- F_Delete_Char : constant Form_Request_Code := Key_Max + 34; -- F_Delete_Previous : constant Form_Request_Code := Key_Max + 35; -- F_Delete_Line : constant Form_Request_Code := Key_Max + 36; -- F_Delete_Word : constant Form_Request_Code := Key_Max + 37; -- F_Clear_EOL : constant Form_Request_Code := Key_Max + 38; -- F_Clear_EOF : constant Form_Request_Code := Key_Max + 39; -- F_Clear_Field : constant Form_Request_Code := Key_Max + 40; -- F_Overlay_Mode : constant Form_Request_Code := Key_Max + 41; -- F_Insert_Mode : constant Form_Request_Code := Key_Max + 42; -+ F_Next_Page : constant Form_Request_Code := Key_Max + 1; -+ F_Previous_Page : constant Form_Request_Code := Key_Max + 2; -+ F_First_Page : constant Form_Request_Code := Key_Max + 3; -+ F_Last_Page : constant Form_Request_Code := Key_Max + 4; -+ -+ F_Next_Field : constant Form_Request_Code := Key_Max + 5; -+ F_Previous_Field : constant Form_Request_Code := Key_Max + 6; -+ F_First_Field : constant Form_Request_Code := Key_Max + 7; -+ F_Last_Field : constant Form_Request_Code := Key_Max + 8; -+ F_Sorted_Next_Field : constant Form_Request_Code := Key_Max + 9; -+ F_Sorted_Previous_Field : constant Form_Request_Code := Key_Max + 10; -+ F_Sorted_First_Field : constant Form_Request_Code := Key_Max + 11; -+ F_Sorted_Last_Field : constant Form_Request_Code := Key_Max + 12; -+ F_Left_Field : constant Form_Request_Code := Key_Max + 13; -+ F_Right_Field : constant Form_Request_Code := Key_Max + 14; -+ F_Up_Field : constant Form_Request_Code := Key_Max + 15; -+ F_Down_Field : constant Form_Request_Code := Key_Max + 16; -+ -+ F_Next_Char : constant Form_Request_Code := Key_Max + 17; -+ F_Previous_Char : constant Form_Request_Code := Key_Max + 18; -+ F_Next_Line : constant Form_Request_Code := Key_Max + 19; -+ F_Previous_Line : constant Form_Request_Code := Key_Max + 20; -+ F_Next_Word : constant Form_Request_Code := Key_Max + 21; -+ F_Previous_Word : constant Form_Request_Code := Key_Max + 22; -+ F_Begin_Field : constant Form_Request_Code := Key_Max + 23; -+ F_End_Field : constant Form_Request_Code := Key_Max + 24; -+ F_Begin_Line : constant Form_Request_Code := Key_Max + 25; -+ F_End_Line : constant Form_Request_Code := Key_Max + 26; -+ F_Left_Char : constant Form_Request_Code := Key_Max + 27; -+ F_Right_Char : constant Form_Request_Code := Key_Max + 28; -+ F_Up_Char : constant Form_Request_Code := Key_Max + 29; -+ F_Down_Char : constant Form_Request_Code := Key_Max + 30; -+ -+ F_New_Line : constant Form_Request_Code := Key_Max + 31; -+ F_Insert_Char : constant Form_Request_Code := Key_Max + 32; -+ F_Insert_Line : constant Form_Request_Code := Key_Max + 33; -+ F_Delete_Char : constant Form_Request_Code := Key_Max + 34; -+ F_Delete_Previous : constant Form_Request_Code := Key_Max + 35; -+ F_Delete_Line : constant Form_Request_Code := Key_Max + 36; -+ F_Delete_Word : constant Form_Request_Code := Key_Max + 37; -+ F_Clear_EOL : constant Form_Request_Code := Key_Max + 38; -+ F_Clear_EOF : constant Form_Request_Code := Key_Max + 39; -+ F_Clear_Field : constant Form_Request_Code := Key_Max + 40; -+ F_Overlay_Mode : constant Form_Request_Code := Key_Max + 41; -+ F_Insert_Mode : constant Form_Request_Code := Key_Max + 42; - - -- Vertical Scrolling -- F_ScrollForward_Line : constant Form_Request_Code := Key_Max + 43; -- F_ScrollBackward_Line : constant Form_Request_Code := Key_Max + 44; -- F_ScrollForward_Page : constant Form_Request_Code := Key_Max + 45; -- F_ScrollBackward_Page : constant Form_Request_Code := Key_Max + 46; -- F_ScrollForward_HalfPage : constant Form_Request_Code := Key_Max + 47; -- F_ScrollBackward_HalfPage : constant Form_Request_Code := Key_Max + 48; -+ F_ScrollForward_Line : constant Form_Request_Code := Key_Max + 43; -+ F_ScrollBackward_Line : constant Form_Request_Code := Key_Max + 44; -+ F_ScrollForward_Page : constant Form_Request_Code := Key_Max + 45; -+ F_ScrollBackward_Page : constant Form_Request_Code := Key_Max + 46; -+ F_ScrollForward_HalfPage : constant Form_Request_Code := Key_Max + 47; -+ F_ScrollBackward_HalfPage : constant Form_Request_Code := Key_Max + 48; - - -- Horizontal Scrolling -- F_HScrollForward_Char : constant Form_Request_Code := Key_Max + 49; -- F_HScrollBackward_Char : constant Form_Request_Code := Key_Max + 50; -- F_HScrollForward_Line : constant Form_Request_Code := Key_Max + 51; -- F_HScrollBackward_Line : constant Form_Request_Code := Key_Max + 52; -- F_HScrollForward_HalfLine : constant Form_Request_Code := Key_Max + 53; -- F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54; -- -- F_Validate_Field : constant Form_Request_Code := Key_Max + 55; -- F_Next_Choice : constant Form_Request_Code := Key_Max + 56; -- F_Previous_Choice : constant Form_Request_Code := Key_Max + 57; -+ F_HScrollForward_Char : constant Form_Request_Code := Key_Max + 49; -+ F_HScrollBackward_Char : constant Form_Request_Code := Key_Max + 50; -+ F_HScrollForward_Line : constant Form_Request_Code := Key_Max + 51; -+ F_HScrollBackward_Line : constant Form_Request_Code := Key_Max + 52; -+ F_HScrollForward_HalfLine : constant Form_Request_Code := Key_Max + 53; -+ F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54; -+ -+ F_Validate_Field : constant Form_Request_Code := Key_Max + 55; -+ F_Next_Choice : constant Form_Request_Code := Key_Max + 56; -+ F_Previous_Choice : constant Form_Request_Code := Key_Max + 57; - - -- For those who like the old 'C' style request names -- REQ_NEXT_PAGE : Form_Request_Code renames F_Next_Page; -- REQ_PREV_PAGE : Form_Request_Code renames F_Previous_Page; -- REQ_FIRST_PAGE : Form_Request_Code renames F_First_Page; -- REQ_LAST_PAGE : Form_Request_Code renames F_Last_Page; -- -- REQ_NEXT_FIELD : Form_Request_Code renames F_Next_Field; -- REQ_PREV_FIELD : Form_Request_Code renames F_Previous_Field; -- REQ_FIRST_FIELD : Form_Request_Code renames F_First_Field; -- REQ_LAST_FIELD : Form_Request_Code renames F_Last_Field; -- REQ_SNEXT_FIELD : Form_Request_Code renames F_Sorted_Next_Field; -- REQ_SPREV_FIELD : Form_Request_Code renames F_Sorted_Previous_Field; -- REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field; -- REQ_SLAST_FIELD : Form_Request_Code renames F_Sorted_Last_Field; -- REQ_LEFT_FIELD : Form_Request_Code renames F_Left_Field; -- REQ_RIGHT_FIELD : Form_Request_Code renames F_Right_Field; -- REQ_UP_FIELD : Form_Request_Code renames F_Up_Field; -- REQ_DOWN_FIELD : Form_Request_Code renames F_Down_Field; -- -- REQ_NEXT_CHAR : Form_Request_Code renames F_Next_Char; -- REQ_PREV_CHAR : Form_Request_Code renames F_Previous_Char; -- REQ_NEXT_LINE : Form_Request_Code renames F_Next_Line; -- REQ_PREV_LINE : Form_Request_Code renames F_Previous_Line; -- REQ_NEXT_WORD : Form_Request_Code renames F_Next_Word; -- REQ_PREV_WORD : Form_Request_Code renames F_Previous_Word; -- REQ_BEG_FIELD : Form_Request_Code renames F_Begin_Field; -- REQ_END_FIELD : Form_Request_Code renames F_End_Field; -- REQ_BEG_LINE : Form_Request_Code renames F_Begin_Line; -- REQ_END_LINE : Form_Request_Code renames F_End_Line; -- REQ_LEFT_CHAR : Form_Request_Code renames F_Left_Char; -- REQ_RIGHT_CHAR : Form_Request_Code renames F_Right_Char; -- REQ_UP_CHAR : Form_Request_Code renames F_Up_Char; -- REQ_DOWN_CHAR : Form_Request_Code renames F_Down_Char; -- -- REQ_NEW_LINE : Form_Request_Code renames F_New_Line; -- REQ_INS_CHAR : Form_Request_Code renames F_Insert_Char; -- REQ_INS_LINE : Form_Request_Code renames F_Insert_Line; -- REQ_DEL_CHAR : Form_Request_Code renames F_Delete_Char; -- REQ_DEL_PREV : Form_Request_Code renames F_Delete_Previous; -- REQ_DEL_LINE : Form_Request_Code renames F_Delete_Line; -- REQ_DEL_WORD : Form_Request_Code renames F_Delete_Word; -- REQ_CLR_EOL : Form_Request_Code renames F_Clear_EOL; -- REQ_CLR_EOF : Form_Request_Code renames F_Clear_EOF; -- REQ_CLR_FIELD : Form_Request_Code renames F_Clear_Field; -- REQ_OVL_MODE : Form_Request_Code renames F_Overlay_Mode; -- REQ_INS_MODE : Form_Request_Code renames F_Insert_Mode; -- -- REQ_SCR_FLINE : Form_Request_Code renames F_ScrollForward_Line; -- REQ_SCR_BLINE : Form_Request_Code renames F_ScrollBackward_Line; -- REQ_SCR_FPAGE : Form_Request_Code renames F_ScrollForward_Page; -- REQ_SCR_BPAGE : Form_Request_Code renames F_ScrollBackward_Page; -- REQ_SCR_FHPAGE : Form_Request_Code renames F_ScrollForward_HalfPage; -- REQ_SCR_BHPAGE : Form_Request_Code renames F_ScrollBackward_HalfPage; -- -- REQ_SCR_FCHAR : Form_Request_Code renames F_HScrollForward_Char; -- REQ_SCR_BCHAR : Form_Request_Code renames F_HScrollBackward_Char; -- REQ_SCR_HFLINE : Form_Request_Code renames F_HScrollForward_Line; -- REQ_SCR_HBLINE : Form_Request_Code renames F_HScrollBackward_Line; -- REQ_SCR_HFHALF : Form_Request_Code renames F_HScrollForward_HalfLine; -- REQ_SCR_HBHALF : Form_Request_Code renames F_HScrollBackward_HalfLine; -- -- REQ_VALIDATION : Form_Request_Code renames F_Validate_Field; -- REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice; -- REQ_PREV_CHOICE : Form_Request_Code renames F_Previous_Choice; -+ REQ_NEXT_PAGE : Form_Request_Code renames F_Next_Page; -+ REQ_PREV_PAGE : Form_Request_Code renames F_Previous_Page; -+ REQ_FIRST_PAGE : Form_Request_Code renames F_First_Page; -+ REQ_LAST_PAGE : Form_Request_Code renames F_Last_Page; -+ -+ REQ_NEXT_FIELD : Form_Request_Code renames F_Next_Field; -+ REQ_PREV_FIELD : Form_Request_Code renames F_Previous_Field; -+ REQ_FIRST_FIELD : Form_Request_Code renames F_First_Field; -+ REQ_LAST_FIELD : Form_Request_Code renames F_Last_Field; -+ REQ_SNEXT_FIELD : Form_Request_Code renames F_Sorted_Next_Field; -+ REQ_SPREV_FIELD : Form_Request_Code renames F_Sorted_Previous_Field; -+ REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field; -+ REQ_SLAST_FIELD : Form_Request_Code renames F_Sorted_Last_Field; -+ REQ_LEFT_FIELD : Form_Request_Code renames F_Left_Field; -+ REQ_RIGHT_FIELD : Form_Request_Code renames F_Right_Field; -+ REQ_UP_FIELD : Form_Request_Code renames F_Up_Field; -+ REQ_DOWN_FIELD : Form_Request_Code renames F_Down_Field; -+ -+ REQ_NEXT_CHAR : Form_Request_Code renames F_Next_Char; -+ REQ_PREV_CHAR : Form_Request_Code renames F_Previous_Char; -+ REQ_NEXT_LINE : Form_Request_Code renames F_Next_Line; -+ REQ_PREV_LINE : Form_Request_Code renames F_Previous_Line; -+ REQ_NEXT_WORD : Form_Request_Code renames F_Next_Word; -+ REQ_PREV_WORD : Form_Request_Code renames F_Previous_Word; -+ REQ_BEG_FIELD : Form_Request_Code renames F_Begin_Field; -+ REQ_END_FIELD : Form_Request_Code renames F_End_Field; -+ REQ_BEG_LINE : Form_Request_Code renames F_Begin_Line; -+ REQ_END_LINE : Form_Request_Code renames F_End_Line; -+ REQ_LEFT_CHAR : Form_Request_Code renames F_Left_Char; -+ REQ_RIGHT_CHAR : Form_Request_Code renames F_Right_Char; -+ REQ_UP_CHAR : Form_Request_Code renames F_Up_Char; -+ REQ_DOWN_CHAR : Form_Request_Code renames F_Down_Char; -+ -+ REQ_NEW_LINE : Form_Request_Code renames F_New_Line; -+ REQ_INS_CHAR : Form_Request_Code renames F_Insert_Char; -+ REQ_INS_LINE : Form_Request_Code renames F_Insert_Line; -+ REQ_DEL_CHAR : Form_Request_Code renames F_Delete_Char; -+ REQ_DEL_PREV : Form_Request_Code renames F_Delete_Previous; -+ REQ_DEL_LINE : Form_Request_Code renames F_Delete_Line; -+ REQ_DEL_WORD : Form_Request_Code renames F_Delete_Word; -+ REQ_CLR_EOL : Form_Request_Code renames F_Clear_EOL; -+ REQ_CLR_EOF : Form_Request_Code renames F_Clear_EOF; -+ REQ_CLR_FIELD : Form_Request_Code renames F_Clear_Field; -+ REQ_OVL_MODE : Form_Request_Code renames F_Overlay_Mode; -+ REQ_INS_MODE : Form_Request_Code renames F_Insert_Mode; -+ -+ REQ_SCR_FLINE : Form_Request_Code renames F_ScrollForward_Line; -+ REQ_SCR_BLINE : Form_Request_Code renames F_ScrollBackward_Line; -+ REQ_SCR_FPAGE : Form_Request_Code renames F_ScrollForward_Page; -+ REQ_SCR_BPAGE : Form_Request_Code renames F_ScrollBackward_Page; -+ REQ_SCR_FHPAGE : Form_Request_Code renames F_ScrollForward_HalfPage; -+ REQ_SCR_BHPAGE : Form_Request_Code renames F_ScrollBackward_HalfPage; -+ -+ REQ_SCR_FCHAR : Form_Request_Code renames F_HScrollForward_Char; -+ REQ_SCR_BCHAR : Form_Request_Code renames F_HScrollBackward_Char; -+ REQ_SCR_HFLINE : Form_Request_Code renames F_HScrollForward_Line; -+ REQ_SCR_HBLINE : Form_Request_Code renames F_HScrollBackward_Line; -+ REQ_SCR_HFHALF : Form_Request_Code renames F_HScrollForward_HalfLine; -+ REQ_SCR_HBHALF : Form_Request_Code renames F_HScrollBackward_HalfLine; -+ -+ REQ_VALIDATION : Form_Request_Code renames F_Validate_Field; -+ REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice; -+ REQ_PREV_CHOICE : Form_Request_Code renames F_Previous_Choice; - -- procedure Request_Name (Key : Form_Request_Code; -- Name : out String); -+ procedure Request_Name (Key : Form_Request_Code; -+ Name : out String); - -- function Request_Name (Key : Form_Request_Code) return String; -+ function Request_Name (Key : Form_Request_Code) return String; - -- Same as function - pragma Inline (Request_Name); - - ------------------ - -- Exceptions -- - ------------------ -- Form_Exception : exception; -+ Form_Exception : exception; - - -- |===================================================================== - -- | Man page form_field_new.3x - -- |===================================================================== - - -- #1A NAME="AFU_1"#2| -- function Create (Height : Line_Count; -- Width : Column_Count; -- Top : Line_Position; -- Left : Column_Position; -- Off_Screen : Natural := 0; -- More_Buffers : Buffer_Number := Buffer_Number'First) -+ function Create (Height : Line_Count; -+ Width : Column_Count; -+ Top : Line_Position; -+ Left : Column_Position; -+ Off_Screen : Natural := 0; -+ More_Buffers : Buffer_Number := Buffer_Number'First) - return Field; - -- AKA: new_field() - -- An overloaded Create is defined later. Pragma Inline appears there. - - -- #1A NAME="AFU_2"#2| -- function New_Field (Height : Line_Count; -- Width : Column_Count; -- Top : Line_Position; -- Left : Column_Position; -- Off_Screen : Natural := 0; -- More_Buffers : Buffer_Number := Buffer_Number'First) -- return Field renames Create; -+ function New_Field (Height : Line_Count; -+ Width : Column_Count; -+ Top : Line_Position; -+ Left : Column_Position; -+ Off_Screen : Natural := 0; -+ More_Buffers : Buffer_Number := Buffer_Number'First) -+ return Field renames Create; - -- AKA: new_field() - pragma Inline (New_Field); - - -- #1A NAME="AFU_3"#2| -- procedure Delete (Fld : in out Field); -+ procedure Delete (Fld : in out Field); - -- AKA: free_field() - -- Reset Fld to Null_Field - -- An overloaded Delete is defined later. Pragma Inline appears there. - - -- #1A NAME="AFU_4"#2| -- function Duplicate (Fld : Field; -- Top : Line_Position; -- Left : Column_Position) return Field; -+ function Duplicate (Fld : Field; -+ Top : Line_Position; -+ Left : Column_Position) return Field; - -- AKA: dup_field() - pragma Inline (Duplicate); - - -- #1A NAME="AFU_5"#2| -- function Link (Fld : Field; -- Top : Line_Position; -- Left : Column_Position) return Field; -+ function Link (Fld : Field; -+ Top : Line_Position; -+ Left : Column_Position) return Field; - -- AKA: link_field() -- pragma Inline (Link); -+ pragma Inline (Link); - - -- |===================================================================== - -- | Man page form_field_just.3x - -- |===================================================================== - - -- #1A NAME="AFU_6"#2| -- procedure Set_Justification (Fld : Field; -- Just : Field_Justification := None); -+ procedure Set_Justification (Fld : Field; -+ Just : Field_Justification := None); - -- AKA: set_field_just() -- pragma Inline (Set_Justification); -+ pragma Inline (Set_Justification); - - -- #1A NAME="AFU_7"#2| -- function Get_Justification (Fld : Field) return Field_Justification; -+ function Get_Justification (Fld : Field) return Field_Justification; - -- AKA: field_just() -- pragma Inline (Get_Justification); -+ pragma Inline (Get_Justification); - - -- |===================================================================== - -- | Man page form_field_buffer.3x - -- |===================================================================== - - -- #1A NAME="AFU_8"#2| -- procedure Set_Buffer -- (Fld : Field; -- Buffer : Buffer_Number := Buffer_Number'First; -- Str : String); -+ procedure Set_Buffer -+ (Fld : Field; -+ Buffer : Buffer_Number := Buffer_Number'First; -+ Str : String); - -- AKA: set_field_buffer() - -- Not inlined - - -- #1A NAME="AFU_9"#2| -- procedure Get_Buffer -- (Fld : Field; -- Buffer : Buffer_Number := Buffer_Number'First; -- Str : out String); -+ procedure Get_Buffer -+ (Fld : Field; -+ Buffer : Buffer_Number := Buffer_Number'First; -+ Str : out String); - -- AKA: field_buffer() - -- function Get_Buffer -- (Fld : Field; -- Buffer : Buffer_Number := Buffer_Number'First) return String; -+ function Get_Buffer -+ (Fld : Field; -+ Buffer : Buffer_Number := Buffer_Number'First) return String; - -- AKA: field_buffer() - -- Same but as function - pragma Inline (Get_Buffer); - - -- #1A NAME="AFU_10"#2| -- procedure Set_Status (Fld : Field; -- Status : Boolean := True); -+ procedure Set_Status (Fld : Field; -+ Status : Boolean := True); - -- AKA: set_field_status() -- pragma Inline (Set_Status); -+ pragma Inline (Set_Status); - - -- #1A NAME="AFU_11"#2| -- function Changed (Fld : Field) return Boolean; -+ function Changed (Fld : Field) return Boolean; - -- AKA: field_status() -- pragma Inline (Changed); -+ pragma Inline (Changed); - - -- #1A NAME="AFU_12"#2| -- procedure Set_Maximum_Size (Fld : Field; -- Max : Natural := 0); -+ procedure Set_Maximum_Size (Fld : Field; -+ Max : Natural := 0); - -- AKA: set_field_max() -- pragma Inline (Set_Maximum_Size); -+ pragma Inline (Set_Maximum_Size); - - -- |===================================================================== - -- | Man page form_field_opts.3x - -- |===================================================================== - - -- #1A NAME="AFU_13"#2| -- procedure Set_Options (Fld : Field; -- Options : Field_Option_Set); -+ procedure Set_Options (Fld : Field; -+ Options : Field_Option_Set); - -- AKA: set_field_opts() - -- An overloaded version is defined later. Pragma Inline appears there - - -- #1A NAME="AFU_14"#2| -- procedure Switch_Options (Fld : Field; -- Options : Field_Option_Set; -- On : Boolean := True); -+ procedure Switch_Options (Fld : Field; -+ Options : Field_Option_Set; -+ On : Boolean := True); - -- AKA: field_opts_on() - -- AKA: field_opts_off() - -- An overloaded version is defined later. Pragma Inline appears there - - -- #1A NAME="AFU_15"#2| -- procedure Get_Options (Fld : Field; -- Options : out Field_Option_Set); -+ procedure Get_Options (Fld : Field; -+ Options : out Field_Option_Set); - -- AKA: field_opts() - - -- #1A NAME="AFU_16"#2| -- function Get_Options (Fld : Field := Null_Field) -+ function Get_Options (Fld : Field := Null_Field) - return Field_Option_Set; - -- AKA: field_opts() - -- An overloaded version is defined later. Pragma Inline appears there -@@ -428,161 +432,161 @@ - -- |===================================================================== - - -- #1A NAME="AFU_17"#2| -- procedure Set_Foreground -- (Fld : Field; -- Fore : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Foreground -+ (Fld : Field; -+ Fore : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: set_field_fore() -- pragma Inline (Set_Foreground); -+ pragma Inline (Set_Foreground); - - -- #1A NAME="AFU_18"#2| -- procedure Foreground (Fld : Field; -- Fore : out Character_Attribute_Set); -+ procedure Foreground (Fld : Field; -+ Fore : out Character_Attribute_Set); - -- AKA: field_fore() - - -- #1A NAME="AFU_19"#2| -- procedure Foreground (Fld : Field; -- Fore : out Character_Attribute_Set; -- Color : out Color_Pair); -+ procedure Foreground (Fld : Field; -+ Fore : out Character_Attribute_Set; -+ Color : out Color_Pair); - -- AKA: field_fore() - pragma Inline (Foreground); - - -- #1A NAME="AFU_20"#2| -- procedure Set_Background -- (Fld : Field; -- Back : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Background -+ (Fld : Field; -+ Back : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: set_field_back() - pragma Inline (Set_Background); - - -- #1A NAME="AFU_21"#2| -- procedure Background (Fld : Field; -- Back : out Character_Attribute_Set); -+ procedure Background (Fld : Field; -+ Back : out Character_Attribute_Set); - -- AKA: field_back() - - -- #1A NAME="AFU_22"#2| -- procedure Background (Fld : Field; -- Back : out Character_Attribute_Set; -- Color : out Color_Pair); -+ procedure Background (Fld : Field; -+ Back : out Character_Attribute_Set; -+ Color : out Color_Pair); - -- AKA: field_back() - pragma Inline (Background); - - -- #1A NAME="AFU_23"#2| -- procedure Set_Pad_Character (Fld : Field; -- Pad : Character := Space); -+ procedure Set_Pad_Character (Fld : Field; -+ Pad : Character := Space); - -- AKA: set_field_pad() -- pragma Inline (Set_Pad_Character); -+ pragma Inline (Set_Pad_Character); - - -- #1A NAME="AFU_24"#2| -- procedure Pad_Character (Fld : Field; -- Pad : out Character); -+ procedure Pad_Character (Fld : Field; -+ Pad : out Character); - -- AKA: field_pad() -- pragma Inline (Pad_Character); -+ pragma Inline (Pad_Character); - - -- |===================================================================== - -- | Man page form_field_info.3x - -- |===================================================================== - - -- #1A NAME="AFU_25"#2| -- procedure Info (Fld : Field; -- Lines : out Line_Count; -- Columns : out Column_Count; -- First_Row : out Line_Position; -- First_Column : out Column_Position; -- Off_Screen : out Natural; -- Additional_Buffers : out Buffer_Number); -+ procedure Info (Fld : Field; -+ Lines : out Line_Count; -+ Columns : out Column_Count; -+ First_Row : out Line_Position; -+ First_Column : out Column_Position; -+ Off_Screen : out Natural; -+ Additional_Buffers : out Buffer_Number); - -- AKA: field_info() -- pragma Inline (Info); -+ pragma Inline (Info); - - -- #1A NAME="AFU_26"#2| -- procedure Dynamic_Info (Fld : Field; -- Lines : out Line_Count; -- Columns : out Column_Count; -- Max : out Natural); -+ procedure Dynamic_Info (Fld : Field; -+ Lines : out Line_Count; -+ Columns : out Column_Count; -+ Max : out Natural); - -- AKA: dynamic_field_info() -- pragma Inline (Dynamic_Info); -+ pragma Inline (Dynamic_Info); - - -- |===================================================================== - -- | Man page form_win.3x - -- |===================================================================== - - -- #1A NAME="AFU_27"#2| -- procedure Set_Window (Frm : Form; -- Win : Window); -+ procedure Set_Window (Frm : Form; -+ Win : Window); - -- AKA: set_form_win() -- pragma Inline (Set_Window); -+ pragma Inline (Set_Window); - - -- #1A NAME="AFU_28"#2| -- function Get_Window (Frm : Form) return Window; -+ function Get_Window (Frm : Form) return Window; - -- AKA: form_win() -- pragma Inline (Get_Window); -+ pragma Inline (Get_Window); - - -- #1A NAME="AFU_29"#2| -- procedure Set_Sub_Window (Frm : Form; -- Win : Window); -+ procedure Set_Sub_Window (Frm : Form; -+ Win : Window); - -- AKA: set_form_sub() -- pragma Inline (Set_Sub_Window); -+ pragma Inline (Set_Sub_Window); - - -- #1A NAME="AFU_30"#2| -- function Get_Sub_Window (Frm : Form) return Window; -+ function Get_Sub_Window (Frm : Form) return Window; - -- AKA: form_sub() -- pragma Inline (Get_Sub_Window); -+ pragma Inline (Get_Sub_Window); - - -- #1A NAME="AFU_31"#2| -- procedure Scale (Frm : Form; -- Lines : out Line_Count; -- Columns : out Column_Count); -+ procedure Scale (Frm : Form; -+ Lines : out Line_Count; -+ Columns : out Column_Count); - -- AKA: scale_form() -- pragma Inline (Scale); -+ pragma Inline (Scale); - - -- |===================================================================== - -- | Man page form_hook.3x - -- |===================================================================== - -- type Form_Hook_Function is access procedure (Frm : Form); -- pragma Convention (C, Form_Hook_Function); -+ type Form_Hook_Function is access procedure (Frm : Form); -+ pragma Convention (C, Form_Hook_Function); - - -- #1A NAME="AFU_32"#2| -- procedure Set_Field_Init_Hook (Frm : Form; -- Proc : Form_Hook_Function); -+ procedure Set_Field_Init_Hook (Frm : Form; -+ Proc : Form_Hook_Function); - -- AKA: set_field_init() -- pragma Inline (Set_Field_Init_Hook); -+ pragma Inline (Set_Field_Init_Hook); - - -- #1A NAME="AFU_33"#2| -- procedure Set_Field_Term_Hook (Frm : Form; -- Proc : Form_Hook_Function); -+ procedure Set_Field_Term_Hook (Frm : Form; -+ Proc : Form_Hook_Function); - -- AKA: set_field_term() -- pragma Inline (Set_Field_Term_Hook); -+ pragma Inline (Set_Field_Term_Hook); - - -- #1A NAME="AFU_34"#2| -- procedure Set_Form_Init_Hook (Frm : Form; -- Proc : Form_Hook_Function); -+ procedure Set_Form_Init_Hook (Frm : Form; -+ Proc : Form_Hook_Function); - -- AKA: set_form_init() -- pragma Inline (Set_Form_Init_Hook); -+ pragma Inline (Set_Form_Init_Hook); - - -- #1A NAME="AFU_35"#2| -- procedure Set_Form_Term_Hook (Frm : Form; -- Proc : Form_Hook_Function); -+ procedure Set_Form_Term_Hook (Frm : Form; -+ Proc : Form_Hook_Function); - -- AKA: set_form_term() -- pragma Inline (Set_Form_Term_Hook); -+ pragma Inline (Set_Form_Term_Hook); - - -- #1A NAME="AFU_36"#2| -- function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function; -+ function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function; - -- AKA: field_init() - pragma Import (C, Get_Field_Init_Hook, "field_init"); - - -- #1A NAME="AFU_37"#2| -- function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function; -+ function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function; - -- AKA: field_term() - pragma Import (C, Get_Field_Term_Hook, "field_term"); - - -- #1A NAME="AFU_38"#2| -- function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function; -+ function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function; - -- AKA: form_init() - pragma Import (C, Get_Form_Init_Hook, "form_init"); - - -- #1A NAME="AFU_39"#2| -- function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function; -+ function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function; - -- AKA: form_term() - pragma Import (C, Get_Form_Term_Hook, "form_term"); - -@@ -591,52 +595,52 @@ - -- |===================================================================== - - -- #1A NAME="AFU_40"#2| -- procedure Redefine (Frm : Form; -- Flds : Field_Array_Access); -+ procedure Redefine (Frm : Form; -+ Flds : Field_Array_Access); - -- AKA: set_form_fields() -- pragma Inline (Redefine); -+ pragma Inline (Redefine); - - -- #1A NAME="AFU_41"#2| -- procedure Set_Fields (Frm : Form; -- Flds : Field_Array_Access) renames Redefine; -+ procedure Set_Fields (Frm : Form; -+ Flds : Field_Array_Access) renames Redefine; - -- AKA: set_form_fields() - -- pragma Inline (Set_Fields); - - -- #1A NAME="AFU_42"#2| -- function Fields (Frm : Form; -- Index : Positive) return Field; -+ function Fields (Frm : Form; -+ Index : Positive) return Field; - -- AKA: form_fields() -- pragma Inline (Fields); -+ pragma Inline (Fields); - - -- #1A NAME="AFU_43"#2| -- function Field_Count (Frm : Form) return Natural; -+ function Field_Count (Frm : Form) return Natural; - -- AKA: field_count() -- pragma Inline (Field_Count); -+ pragma Inline (Field_Count); - - -- #1A NAME="AFU_44"#2| -- procedure Move (Fld : Field; -- Line : Line_Position; -- Column : Column_Position); -+ procedure Move (Fld : Field; -+ Line : Line_Position; -+ Column : Column_Position); - -- AKA: move_field() -- pragma Inline (Move); -+ pragma Inline (Move); - - -- |===================================================================== - -- | Man page form_new.3x - -- |===================================================================== - - -- #1A NAME="AFU_45"#2| -- function Create (Fields : Field_Array_Access) return Form; -+ function Create (Fields : Field_Array_Access) return Form; - -- AKA: new_form() - pragma Inline (Create); - - -- #1A NAME="AFU_46"#2| -- function New_Form (Fields : Field_Array_Access) return Form -- renames Create; -+ function New_Form (Fields : Field_Array_Access) return Form -+ renames Create; - -- AKA: new_form() - -- pragma Inline (New_Form); - - -- #1A NAME="AFU_47"#2| -- procedure Delete (Frm : in out Form); -+ procedure Delete (Frm : in out Form); - -- AKA: free_form() - -- Reset Frm to Null_Form - pragma Inline (Delete); -@@ -646,26 +650,26 @@ - -- |===================================================================== - - -- #1A NAME="AFU_48"#2| -- procedure Set_Options (Frm : Form; -- Options : Form_Option_Set); -+ procedure Set_Options (Frm : Form; -+ Options : Form_Option_Set); - -- AKA: set_form_opts() - pragma Inline (Set_Options); - - -- #1A NAME="AFU_49"#2| -- procedure Switch_Options (Frm : Form; -- Options : Form_Option_Set; -- On : Boolean := True); -+ procedure Switch_Options (Frm : Form; -+ Options : Form_Option_Set; -+ On : Boolean := True); - -- AKA: form_opts_on() - -- AKA: form_opts_off() - pragma Inline (Switch_Options); - - -- #1A NAME="AFU_50"#2| -- procedure Get_Options (Frm : Form; -- Options : out Form_Option_Set); -+ procedure Get_Options (Frm : Form; -+ Options : out Form_Option_Set); - -- AKA: form_opts() - - -- #1A NAME="AFU_51"#2| -- function Get_Options (Frm : Form := Null_Form) return Form_Option_Set; -+ function Get_Options (Frm : Form := Null_Form) return Form_Option_Set; - -- AKA: form_opts() - pragma Inline (Get_Options); - -@@ -674,47 +678,47 @@ - -- |===================================================================== - - -- #1A NAME="AFU_52"#2| -- procedure Post (Frm : Form; -- Post : Boolean := True); -+ procedure Post (Frm : Form; -+ Post : Boolean := True); - -- AKA: post_form() - -- AKA: unpost_form() -- pragma Inline (Post); -+ pragma Inline (Post); - - -- |===================================================================== - -- | Man page form_cursor.3x - -- |===================================================================== - - -- #1A NAME="AFU_53"#2| -- procedure Position_Cursor (Frm : Form); -+ procedure Position_Cursor (Frm : Form); - -- AKA: pos_form_cursor() -- pragma Inline (Position_Cursor); -+ pragma Inline (Position_Cursor); - - -- |===================================================================== - -- | Man page form_data.3x - -- |===================================================================== - - -- #1A NAME="AFU_54"#2| -- function Data_Ahead (Frm : Form) return Boolean; -+ function Data_Ahead (Frm : Form) return Boolean; - -- AKA: data_ahead() -- pragma Inline (Data_Ahead); -+ pragma Inline (Data_Ahead); - - -- #1A NAME="AFU_55"#2| -- function Data_Behind (Frm : Form) return Boolean; -+ function Data_Behind (Frm : Form) return Boolean; - -- AKA: data_behind() -- pragma Inline (Data_Behind); -+ pragma Inline (Data_Behind); - - -- |===================================================================== - -- | Man page form_driver.3x - -- |===================================================================== - -- type Driver_Result is (Form_Ok, -- Request_Denied, -- Unknown_Request, -- Invalid_Field); -+ type Driver_Result is (Form_Ok, -+ Request_Denied, -+ Unknown_Request, -+ Invalid_Field); - - -- #1A NAME="AFU_56"#2| -- function Driver (Frm : Form; -- Key : Key_Code) return Driver_Result; -+ function Driver (Frm : Form; -+ Key : Key_Code) return Driver_Result; - -- AKA: form_driver() - -- Driver not inlined - -@@ -722,52 +726,52 @@ - -- | Man page form_page.3x - -- |===================================================================== - -- type Page_Number is new Natural; -+ type Page_Number is new Natural; - - -- #1A NAME="AFU_57"#2| -- procedure Set_Current (Frm : Form; -- Fld : Field); -+ procedure Set_Current (Frm : Form; -+ Fld : Field); - -- AKA: set_current_field() -- pragma Inline (Set_Current); -+ pragma Inline (Set_Current); - - -- #1A NAME="AFU_58"#2| -- function Current (Frm : Form) return Field; -+ function Current (Frm : Form) return Field; - -- AKA: current_field() -- pragma Inline (Current); -+ pragma Inline (Current); - - -- #1A NAME="AFU_59"#2| -- procedure Set_Page (Frm : Form; -- Page : Page_Number := Page_Number'First); -+ procedure Set_Page (Frm : Form; -+ Page : Page_Number := Page_Number'First); - -- AKA: set_form_page() -- pragma Inline (Set_Page); -+ pragma Inline (Set_Page); - - -- #1A NAME="AFU_60"#2| -- function Page (Frm : Form) return Page_Number; -+ function Page (Frm : Form) return Page_Number; - -- AKA: form_page() -- pragma Inline (Page); -+ pragma Inline (Page); - - -- #1A NAME="AFU_61"#2| -- function Get_Index (Fld : Field) return Positive; -+ function Get_Index (Fld : Field) return Positive; - -- AKA: field_index() - -- 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); -+ pragma Inline (Get_Index); - - -- |===================================================================== - -- | Man page form_new_page.3x - -- |===================================================================== - - -- #1A NAME="AFU_62"#2| -- procedure Set_New_Page (Fld : Field; -- New_Page : Boolean := True); -+ procedure Set_New_Page (Fld : Field; -+ New_Page : Boolean := True); - -- AKA: set_new_page() -- pragma Inline (Set_New_Page); -+ pragma Inline (Set_New_Page); - - -- #1A NAME="AFU_63"#2| -- function Is_New_Page (Fld : Field) return Boolean; -+ function Is_New_Page (Fld : Field) return Boolean; - -- AKA: new_page() -- pragma Inline (Is_New_Page); -+ pragma Inline (Is_New_Page); - - -- |===================================================================== - -- | Man page form_requestname.3x -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,31 +40,30 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.21 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.25 @ -+-- @Date: 2011/03/22 23:22:27 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; - with Ada.Unchecked_Deallocation; --with Ada.Unchecked_Conversion; -+with System.Address_To_Access_Conversions; -+ - -- | - -- |===================================================================== - -- | man page form_fieldtype.3x - -- |===================================================================== - -- | --package body Terminal_Interface.Curses.Forms.Field_Types is -+package body Terminal_Interface.Curses.Forms.Field_Types is - - use type System.Address; - -- pragma Warnings (Off); -- function To_Argument_Access is new Ada.Unchecked_Conversion -- (System.Address, Argument_Access); -- pragma Warnings (On); -+ package Argument_Conversions is -+ new System.Address_To_Access_Conversions (Argument); - -- function Get_Fieldtype (F : Field) return C_Field_Type; -+ function Get_Fieldtype (F : Field) return C_Field_Type; - pragma Import (C, Get_Fieldtype, "field_type"); - -- function Get_Arg (F : Field) return System.Address; -+ function Get_Arg (F : Field) return System.Address; - pragma Import (C, Get_Arg, "field_arg"); - -- | - -- |===================================================================== -@@ -73,165 +72,153 @@ - -- | - -- | - -- | -- function Get_Type (Fld : Field) return Field_Type_Access -+ function Get_Type (Fld : Field) return Field_Type_Access - is -- Low_Level : constant C_Field_Type := Get_Fieldtype (Fld); -- Arg : Argument_Access; -+ Low_Level : constant C_Field_Type := Get_Fieldtype (Fld); -+ Arg : Argument_Access; - begin -- if Low_Level = Null_Field_Type then -+ 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; -+ 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 := Argument_Access -+ (Argument_Conversions.To_Pointer (Get_Arg (Fld))); -+ if Arg = null then -+ raise Form_Exception; - else -- return Arg.Typ; -+ return Arg.all.Typ; - end if; - else -- raise Form_Exception; -+ raise Form_Exception; - end if; - end if; - end Get_Type; - -- function Make_Arg (Args : System.Address) return System.Address -- is -- -- Actually args is a double indirected pointer to the arguments -- -- of a C variable argument list. In theory it is now quite -- -- complicated to write portable routine that reads the arguments, -- -- because one has to know the growth direction of the stack and -- -- the sizes of the individual arguments. -- -- Fortunately we are only interested in the first argument (#0), -- -- we know its size and for the first arg we don't care about -- -- into which stack direction we have to proceed. We simply -- -- resolve the double indirection and thats it. -- type V is access all System.Address; -- function To_Access is new Ada.Unchecked_Conversion (System.Address, -- V); -- begin -- return To_Access (To_Access (Args).all).all; -- end Make_Arg; -- -- function Copy_Arg (Usr : System.Address) return System.Address -+ function Copy_Arg (Usr : System.Address) return System.Address - is - begin - return Usr; - end Copy_Arg; - -- procedure Free_Arg (Usr : System.Address) -+ procedure Free_Arg (Usr : 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); - -- 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); -+ To_Be_Free : Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); -+ Low_Level : C_Field_Type; -+ begin -+ if To_Be_Free /= null then -+ if To_Be_Free.all.Usr /= System.Null_Address then -+ Low_Level := To_Be_Free.all.Cft; -+ if Low_Level.all.Freearg /= null then -+ Low_Level.all.Freearg (To_Be_Free.all.Usr); - end if; - end if; -- if To_Be_Free.Typ /= null then -- Free_Type (To_Be_Free.Typ); -+ if To_Be_Free.all.Typ /= null then -+ Free_Type (To_Be_Free.all.Typ); - end if; -- Freeargs (To_Be_Free); -+ Freeargs (To_Be_Free); - end if; - end Free_Arg; - -- procedure Wrap_Builtin (Fld : Field; -- Typ : Field_Type'Class; -- Cft : C_Field_Type := C_Builtin_Router) -- is -- Usr_Arg : constant 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"); -+ procedure Wrap_Builtin (Fld : Field; -+ Typ : Field_Type'Class; -+ Cft : C_Field_Type := C_Builtin_Router) -+ is -+ Usr_Arg : constant 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_user"); - - begin -- pragma Assert (Low_Level /= Null_Field_Type); -+ pragma Assert (Low_Level /= Null_Field_Type); - if Cft /= C_Builtin_Router and then Cft /= C_Choice_Router then -- raise Form_Exception; -+ raise Form_Exception; - else -- Arg := new Argument'(Usr => System.Null_Address, -+ 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); -+ Cft => Get_Fieldtype (Fld)); -+ if Usr_Arg /= System.Null_Address then -+ if Low_Level.all.Copyarg /= null then -+ Arg.all.Usr := Low_Level.all.Copyarg (Usr_Arg); - else -- Arg.Usr := Usr_Arg; -+ Arg.all.Usr := Usr_Arg; - end if; - end if; - -- Res := Set_Fld_Type (Arg1 => Arg); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ 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 -+ function Field_Check_Router (Fld : Field; -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Fcheck /= null then -+ return Arg.all.Cft.all.Fcheck (Fld, Arg.all.Usr); - else - return 1; - end if; - end Field_Check_Router; - -- function Char_Check_Router (Ch : C_Int; -- Usr : System.Address) return C_Int -+ function Char_Check_Router (Ch : C_Int; -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Ccheck /= null then -+ return Arg.all.Cft.all.Ccheck (Ch, Arg.all.Usr); - else - return 1; - end if; - end Char_Check_Router; - -- function Next_Router (Fld : Field; -- Usr : System.Address) return C_Int -+ function Next_Router (Fld : Field; -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access -+ := Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Next /= null then -+ return Arg.all.Cft.all.Next (Fld, Arg.all.Usr); - else - return 1; - end if; - end Next_Router; - -- function Prev_Router (Fld : Field; -- Usr : System.Address) return C_Int -+ function Prev_Router (Fld : Field; -+ Usr : System.Address) return Curses_Bool - is -- Arg : constant Argument_Access := To_Argument_Access (Usr); -+ Arg : constant Argument_Access := -+ Argument_Access (Argument_Conversions.To_Pointer (Usr)); - begin -- 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); -+ pragma Assert (Arg /= null and then Arg.all.Cft /= Null_Field_Type -+ and then Arg.all.Typ /= null); -+ if Arg.all.Cft.all.Prev /= null then -+ return Arg.all.Cft.all.Prev (Fld, Arg.all.Usr); - else - return 1; - end if; -@@ -239,26 +226,26 @@ - - -- ----------------------------------------------------------------------- - -- -- function C_Builtin_Router return C_Field_Type -+ function C_Builtin_Router return C_Field_Type - is -- Res : Eti_Error; -- T : C_Field_Type; -+ Res : Eti_Error; -+ T : C_Field_Type; - begin - if M_Builtin_Router = Null_Field_Type then -- T := New_Fieldtype (Field_Check_Router'Access, -+ T := New_Fieldtype (Field_Check_Router'Access, - Char_Check_Router'Access); -- if T = Null_Field_Type then -- raise Form_Exception; -+ if T = Null_Field_Type then -+ raise Form_Exception; - else -- Res := Set_Fieldtype_Arg (T, -+ Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - end if; -- M_Builtin_Router := T; -+ M_Builtin_Router := T; - end if; - pragma Assert (M_Builtin_Router /= Null_Field_Type); - return M_Builtin_Router; -@@ -266,33 +253,33 @@ - - -- ----------------------------------------------------------------------- - -- -- function C_Choice_Router return C_Field_Type -+ function C_Choice_Router return C_Field_Type - is -- Res : Eti_Error; -- T : C_Field_Type; -+ Res : Eti_Error; -+ T : C_Field_Type; - begin - if M_Choice_Router = Null_Field_Type then -- T := New_Fieldtype (Field_Check_Router'Access, -+ T := New_Fieldtype (Field_Check_Router'Access, - Char_Check_Router'Access); -- if T = Null_Field_Type then -- raise Form_Exception; -+ if T = Null_Field_Type then -+ raise Form_Exception; - else -- Res := Set_Fieldtype_Arg (T, -+ Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - -- Res := Set_Fieldtype_Choice (T, -+ Res := Set_Fieldtype_Choice (T, - Next_Router'Access, - Prev_Router'Access); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - end if; -- M_Choice_Router := T; -+ M_Choice_Router := T; - end if; - pragma Assert (M_Choice_Router /= Null_Field_Type); - return M_Choice_Router; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,12 +40,12 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.15 @ -+-- @Revision: 1.16 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; - --package Terminal_Interface.Curses.Forms.Field_Types is -+package Terminal_Interface.Curses.Forms.Field_Types is - pragma Preelaborate (Terminal_Interface.Curses.Forms.Field_Types); - use type Interfaces.C.int; - subtype C_Int is Interfaces.C.int; -@@ -81,7 +81,7 @@ - -- |===================================================================== - - -- #1A NAME="AFU_2"#2| -- function Get_Type (Fld : Field) return Field_Type_Access; -+ function Get_Type (Fld : 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 -@@ -107,15 +107,15 @@ - pragma Convention (C, Freearg_Function); - - type Field_Check_Function is access -- function (Fld : Field; Usr : System.Address) return C_Int; -+ function (Fld : Field; Usr : System.Address) return Curses_Bool; - pragma Convention (C, Field_Check_Function); - - type Char_Check_Function is access -- function (Ch : C_Int; Usr : System.Address) return C_Int; -+ function (Ch : C_Int; Usr : System.Address) return Curses_Bool; - pragma Convention (C, Char_Check_Function); - - type Choice_Function is access -- function (Fld : Field; Usr : System.Address) return C_Int; -+ function (Fld : Field; Usr : System.Address) return Curses_Bool; - pragma Convention (C, Choice_Function); - - -- +---------------------------------------------------------------------- -@@ -123,7 +123,7 @@ - -- | - type Low_Level_Field_Type is - record -- Status : Interfaces.C.short; -+ Status : Interfaces.C.unsigned_short; - Ref_Count : Interfaces.C.long; - Left, Right : System.Address; - Makearg : Makearg_Function; -@@ -150,12 +150,12 @@ - - -- 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; -+ 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); -+ 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. -@@ -164,47 +164,47 @@ - -- 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); -+ function Make_Arg (Args : System.Address) return System.Address; -+ pragma Import (C, Make_Arg, "void_star_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; -+ 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); -+ 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; -+ function Field_Check_Router (Fld : Field; -+ Usr : System.Address) return Curses_Bool; - 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; -+ function Char_Check_Router (Ch : C_Int; -+ Usr : System.Address) return Curses_Bool; - 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; -+ function Next_Router (Fld : Field; -+ Usr : System.Address) return Curses_Bool; - 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; -+ function Prev_Router (Fld : Field; -+ Usr : System.Address) return Curses_Bool; - 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 -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.10 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.11 @ -+-- @Date: 2011/03/19 00:45:37 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -51,19 +51,15 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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; -+ Arg1 : C_Int) return C_Int; -+ pragma Import (C, Set_Fld_Type, "set_field_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; -+ Res : Eti_Error; - begin -- Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ 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; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.10 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.11 @ -+-- @Date: 2011/03/19 00:45:37 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -51,19 +51,15 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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; -+ Arg1 : C_Int) return C_Int; -+ pragma Import (C, Set_Fld_Type, "set_field_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; -+ Res : Eti_Error; - begin -- Res := Set_Fld_Type (Arg1 => C_Int (Typ.Minimum_Field_Width)); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ 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; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm 2006-09-23 22:31:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998,2004 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2004,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.10 @ ---- @Date: 2004/08/21 21:37:00 @ -+-- @Revision: 1.11 @ -+-- @Date: 2011/03/22 23:36:20 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Characters.Handling; use Ada.Characters.Handling; -@@ -66,8 +66,8 @@ - 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)); -+ I.Names (J).all (I.Names (J).all'First) := -+ To_Upper (I.Names (J).all (I.Names (J).all'First)); - end if; - end if; - J := J + 1; -@@ -77,10 +77,10 @@ - end Create; - - function Value (Fld : Field; -- Buf : Buffer_Number := Buffer_Number'First) return T -+ Buf : Buffer_Number := Buffer_Number'First) return T - is - begin -- return T'Value (Get_Buffer (Fld, Buf)); -+ return T'Value (Get_Buffer (Fld, Buf)); - end Value; - - end Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm 2006-09-23 22:31:30.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -56,7 +56,7 @@ - return Enumeration_Field; - - function Value (Fld : Field; -- Buf : Buffer_Number := Buffer_Number'First) return T; -+ 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. -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm 2011-02-26 00:43:48.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,7 +40,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.8 @ -+-- @Revision: 1.10 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -66,15 +66,15 @@ - 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; -+ raise Form_Exception; - end if; -- E.Arr (size_t (I)) := New_String (Info.Names (I).all); -+ E.Arr.all (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; -+ E.Arr.all (L) := Null_Ptr; - return E; - end Create; - -@@ -84,10 +84,10 @@ - P : chars_ptr; - begin - loop -- P := Enum.Arr (I); -+ P := Enum.Arr.all (I); - exit when P = Null_Ptr; - Free (P); -- Enum.Arr (I) := Null_Ptr; -+ Enum.Arr.all (I) := Null_Ptr; - I := I + 1; - end loop; - Enum.Arr := null; -@@ -96,27 +96,23 @@ - procedure Set_Field_Type (Fld : Field; - Typ : Enumeration_Field) - is -- C_Enum_Type : C_Field_Type; -- pragma Import (C, C_Enum_Type, "TYPE_ENUM"); -+ function Set_Fld_Type (F : Field := Fld; -+ Arg1 : chars_ptr_array; -+ Arg2 : C_Int; -+ Arg3 : C_Int) return C_Int; -+ pragma Import (C, Set_Fld_Type, "set_field_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; -+ Res : Eti_Error; - begin - if Typ.Arr = null then -- raise Form_Exception; -+ 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 -+ 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); -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - Wrap_Builtin (Fld, Typ, C_Choice_Router); - end Set_Field_Type; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.10 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.11 @ -+-- @Date: 2011/03/19 00:45:37 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -51,23 +51,19 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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; -+ Arg1 : C_Int; -+ Arg2 : C_Long_Int; -+ Arg3 : C_Long_Int) return C_Int; -+ pragma Import (C, Set_Fld_Type, "set_field_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; -+ 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); -+ 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; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.10 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.11 @ -+-- @Date: 2011/03/19 00:45:37 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; -@@ -51,19 +51,15 @@ - procedure Set_Field_Type (Fld : Field; - Typ : 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) -+ function Set_Fld_Type (F : Field := Fld) - return C_Int; -- pragma Import (C, Set_Fld_Type, "set_field_type"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_ipv4"); - -- Res : Eti_Error; -+ Res : Eti_Error; - begin -- Res := Set_Fld_Type; -- if Res /= E_Ok then -- Eti_Exception (Res); -+ Res := Set_Fld_Type; -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - Wrap_Builtin (Fld, Typ); - end Set_Field_Type; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.11 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.12 @ -+-- @Date: 2011/03/19 00:45:37 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -54,23 +54,19 @@ - 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; -+ Arg1 : C_Int; -+ Arg2 : Double; -+ Arg3 : Double) return C_Int; -+ pragma Import (C, Set_Fld_Type, "set_field_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; -+ 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); -+ 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; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm 2011-03-20 00:18:39.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,7 +40,7 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.9 @ -+-- @Revision: 1.10 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; use Interfaces.C; -@@ -53,22 +53,18 @@ - 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; -+ function Set_Ftyp (F : Field := Fld; -+ Arg1 : Char_Ptr) return C_Int; -+ pragma Import (C, Set_Ftyp, "set_field_type_regexp"); -+ -+ 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); -+ 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; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm 2010-01-09 21:31:26.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,11 +40,11 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.16 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.21 @ -+-- @Date: 2011/03/23 00:44:58 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ --with Ada.Unchecked_Conversion; -+with System.Address_To_Access_Conversions; - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; - - package body Terminal_Interface.Curses.Forms.Field_Types.User is -@@ -59,7 +59,7 @@ - Cft : C_Field_Type := C_Generic_Type; - Arg1 : Argument_Access) - return C_Int; -- pragma Import (C, Set_Fld_Type, "set_field_type"); -+ pragma Import (C, Set_Fld_Type, "set_field_type_user"); - - Res : Eti_Error; - -@@ -81,31 +81,31 @@ - end if; - end Set_Field_Type; - -- pragma Warnings (Off); -- function To_Argument_Access is new Ada.Unchecked_Conversion -- (System.Address, Argument_Access); -- pragma Warnings (On); -+ package Argument_Conversions is -+ new System.Address_To_Access_Conversions (Argument); - -- function Generic_Field_Check (Fld : Field; -- Usr : System.Address) return C_Int -+ function Generic_Field_Check (Fld : Field; -+ Usr : System.Address) return Curses_Bool - is -- Result : Boolean; -- Udf : constant User_Defined_Field_Type_Access := -- User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); -+ Result : Boolean; -+ Udf : constant User_Defined_Field_Type_Access := -+ User_Defined_Field_Type_Access -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ); - begin -- Result := Field_Check (Fld, Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ Result := Field_Check (Fld, Udf.all); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Field_Check; - -- function Generic_Char_Check (Ch : C_Int; -- Usr : System.Address) return C_Int -+ function Generic_Char_Check (Ch : C_Int; -+ Usr : System.Address) return Curses_Bool - is -- Result : Boolean; -- Udf : constant User_Defined_Field_Type_Access := -- User_Defined_Field_Type_Access (To_Argument_Access (Usr).Typ); -+ Result : Boolean; -+ Udf : constant User_Defined_Field_Type_Access := -+ User_Defined_Field_Type_Access -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).all.Typ); - begin -- Result := Character_Check (Character'Val (Ch), Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ Result := Character_Check (Character'Val (Ch), Udf.all); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Char_Check; - - -- ----------------------------------------------------------------------- -@@ -119,7 +119,7 @@ - T := New_Fieldtype (Generic_Field_Check'Access, - Generic_Char_Check'Access); - if T = Null_Field_Type then -- raise Form_Exception; -+ raise Form_Exception; - else - Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.13 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.15 @ -+-- @Date: 2011/03/19 12:27:21 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -83,18 +83,18 @@ - private - function C_Generic_Type return C_Field_Type; - -- function Generic_Field_Check (Fld : Field; -- Usr : System.Address) return C_Int; -+ function Generic_Field_Check (Fld : Field; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. 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; -+ function Generic_Char_Check (Ch : C_Int; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. It routes - -- the call to the Character_Check implementation for the type. - - end Terminal_Interface.Curses.Forms.Field_Types.User; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm 2008-10-11 23:36:31.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,73 +40,71 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.15 @ ---- @Date: 2008/07/26 18:48:58 @ -+-- @Revision: 1.17 @ -+-- @Date: 2011/03/22 10:53:37 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ --with Ada.Unchecked_Conversion; -+with System.Address_To_Access_Conversions; - with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; - - package body Terminal_Interface.Curses.Forms.Field_Types.User.Choice is - -- pragma Warnings (Off); -- function To_Argument_Access is new Ada.Unchecked_Conversion -- (System.Address, Argument_Access); -- pragma Warnings (On); -+ package Argument_Conversions is -+ new System.Address_To_Access_Conversions (Argument); - -- function Generic_Next (Fld : Field; -- Usr : System.Address) return C_Int -+ function Generic_Next (Fld : Field; -+ Usr : System.Address) return Curses_Bool - is -- Result : Boolean; -- Udf : constant User_Defined_Field_Type_With_Choice_Access := -+ Result : Boolean; -+ Udf : constant User_Defined_Field_Type_With_Choice_Access := - User_Defined_Field_Type_With_Choice_Access -- (To_Argument_Access (Usr).Typ); -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).Typ); - begin -- Result := Next (Fld, Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ Result := Next (Fld, Udf.all); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Next; - -- function Generic_Prev (Fld : Field; -- Usr : System.Address) return C_Int -+ function Generic_Prev (Fld : Field; -+ Usr : System.Address) return Curses_Bool - is -- Result : Boolean; -- Udf : constant User_Defined_Field_Type_With_Choice_Access := -+ Result : Boolean; -+ Udf : constant User_Defined_Field_Type_With_Choice_Access := - User_Defined_Field_Type_With_Choice_Access -- (To_Argument_Access (Usr).Typ); -+ (Argument_Access (Argument_Conversions.To_Pointer (Usr)).Typ); - begin -- Result := Previous (Fld, Udf.all); -- return C_Int (Boolean'Pos (Result)); -+ Result := Previous (Fld, Udf.all); -+ return Curses_Bool (Boolean'Pos (Result)); - end Generic_Prev; - - -- ----------------------------------------------------------------------- - -- -- function C_Generic_Choice return C_Field_Type -+ function C_Generic_Choice return C_Field_Type - is -- Res : Eti_Error; -- T : C_Field_Type; -+ Res : Eti_Error; -+ T : C_Field_Type; - begin - if M_Generic_Choice = Null_Field_Type then -- T := New_Fieldtype (Generic_Field_Check'Access, -+ T := New_Fieldtype (Generic_Field_Check'Access, - Generic_Char_Check'Access); -- if T = Null_Field_Type then -- raise Form_Exception; -+ if T = Null_Field_Type then -+ raise Form_Exception; - else -- Res := Set_Fieldtype_Arg (T, -+ Res := Set_Fieldtype_Arg (T, - Make_Arg'Access, - Copy_Arg'Access, - Free_Arg'Access); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - -- Res := Set_Fieldtype_Choice (T, -+ Res := Set_Fieldtype_Choice (T, - Generic_Next'Access, - Generic_Prev'Access); -- if Res /= E_Ok then -- Eti_Exception (Res); -+ if Res /= E_Ok then -+ Eti_Exception (Res); - end if; - end if; -- M_Generic_Choice := T; -+ M_Generic_Choice := T; - end if; - pragma Assert (M_Generic_Choice /= Null_Field_Type); - return M_Generic_Choice; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998,2008 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2008,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.12 @ ---- @Date: 2008/07/26 18:49:20 @ -+-- @Revision: 1.14 @ -+-- @Date: 2011/03/19 12:27:47 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Interfaces.C; -@@ -80,20 +80,20 @@ - -- | Private Part. - -- | - private -- function C_Generic_Choice return C_Field_Type; -+ function C_Generic_Choice return C_Field_Type; - -- function Generic_Next (Fld : Field; -- Usr : System.Address) return C_Int; -+ function Generic_Next (Fld : Field; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. It routes - -- the call to the Next implementation for the type. - -- function Generic_Prev (Fld : Field; -- Usr : System.Address) return C_Int; -+ function Generic_Prev (Fld : Field; -+ Usr : System.Address) return Curses_Bool; - 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 -+ -- representing all the User_Defined_Field_Type derivatives. It routes - -- the call to the Previous implementation for the type. - - end Terminal_Interface.Curses.Forms.Field_Types.User.Choice; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-menus__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-menus__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-menus__adb.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-menus__adb.htm 2011-03-26 22:54:29.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.27 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.28 @ -+-- @Date: 2011/03/22 23:38:12 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - with Ada.Unchecked_Deallocation; -@@ -71,12 +71,12 @@ - Menu_Option_Set); - - function IOS_2_CInt is new -- Ada.Unchecked_Conversion (Item_Option_Set, -+ Ada.Unchecked_Conversion (Item_Option_Set, - C_Int); - - function CInt_2_IOS is new - Ada.Unchecked_Conversion (C_Int, -- Item_Option_Set); -+ Item_Option_Set); - - ------------------------------------------------------------------------------ - procedure Request_Name (Key : Menu_Request_Code; -@@ -96,18 +96,18 @@ - return Fill_String (Request_Name (C_Int (Key))); - end Request_Name; - -- function Create (Name : String; -- Description : String := "") return Item -+ function Create (Name : String; -+ Description : String := "") return Item - is - type Char_Ptr is access all Interfaces.C.char; - function Newitem (Name, Desc : Char_Ptr) return Item; - pragma Import (C, Newitem, "new_item"); - -- type Name_String is new char_array (0 .. Name'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 is new char_array (0 .. Description'Length); - type Desc_String_Ptr is access Desc_String; - pragma Controlled (Desc_String_Ptr); - -@@ -116,17 +116,17 @@ - Name_Len, Desc_Len : size_t; - Result : Item; - begin -- To_C (Name, Name_Str.all, Name_Len); -- To_C (Description, Desc_Str.all, Desc_Len); -+ 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; -+ raise Eti_System_Error; - end if; - return Result; -- end Create; -+ end Create; - -- procedure Delete (Itm : in out Item) -+ procedure Delete (Itm : in out Item) - is - function Descname (Itm : Item) return chars_ptr; - pragma Import (C, Descname, "item_description"); -@@ -139,79 +139,79 @@ - Res : Eti_Error; - Ptr : chars_ptr; - begin -- Ptr := Descname (Itm); -+ Ptr := Descname (Itm); - if Ptr /= Null_Ptr then - Interfaces.C.Strings.Free (Ptr); - end if; -- Ptr := Itemname (Itm); -+ Ptr := Itemname (Itm); - if Ptr /= Null_Ptr then - Interfaces.C.Strings.Free (Ptr); - end if; -- Res := Freeitem (Itm); -+ Res := Freeitem (Itm); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- Itm := Null_Item; -- end Delete; -+ Itm := Null_Item; -+ end Delete; - ------------------------------------------------------------------------------- -- procedure Set_Value (Itm : Item; -- Value : Boolean := True) -+ procedure Set_Value (Itm : Item; -+ Value : Boolean := True) - is - function Set_Item_Val (Itm : Item; - Val : C_Int) return C_Int; - pragma Import (C, Set_Item_Val, "set_item_value"); - -- Res : constant Eti_Error := Set_Item_Val (Itm, Boolean'Pos (Value)); -+ Res : constant Eti_Error := Set_Item_Val (Itm, Boolean'Pos (Value)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Value; -+ end Set_Value; - -- function Value (Itm : Item) return Boolean -+ function Value (Itm : Item) return Boolean - is - function Item_Val (Itm : Item) return C_Int; - pragma Import (C, Item_Val, "item_value"); - begin -- if Item_Val (Itm) = Curses_False then -+ if Item_Val (Itm) = Curses_False then - return False; - else - return True; - end if; -- end Value; -+ end Value; - - ------------------------------------------------------------------------------- -- function Visible (Itm : Item) return Boolean -+ function Visible (Itm : Item) return Boolean - is - function Item_Vis (Itm : Item) return C_Int; - pragma Import (C, Item_Vis, "item_visible"); - begin -- if Item_Vis (Itm) = Curses_False then -+ if Item_Vis (Itm) = Curses_False then - return False; - else - return True; - end if; -- end Visible; -+ end Visible; - ------------------------------------------------------------------------------- -- procedure Set_Options (Itm : Item; -- Options : Item_Option_Set) -+ procedure Set_Options (Itm : Item; -+ Options : Item_Option_Set) - is - function Set_Item_Opts (Itm : Item; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Item_Opts, "set_item_opts"); - -- Opt : constant C_Int := IOS_2_CInt (Options); -+ Opt : constant C_Int := IOS_2_CInt (Options); - Res : Eti_Error; - begin -- Res := Set_Item_Opts (Itm, Opt); -+ Res := Set_Item_Opts (Itm, Opt); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Options; -+ end Set_Options; - -- procedure Switch_Options (Itm : Item; -- Options : Item_Option_Set; -- On : Boolean := True) -+ procedure Switch_Options (Itm : Item; -+ Options : Item_Option_Set; -+ On : Boolean := True) - is - function Item_Opts_On (Itm : Item; - Opt : C_Int) return C_Int; -@@ -220,141 +220,141 @@ - Opt : C_Int) return C_Int; - pragma Import (C, Item_Opts_Off, "item_opts_off"); - -- Opt : constant C_Int := IOS_2_CInt (Options); -+ Opt : constant C_Int := IOS_2_CInt (Options); - Err : Eti_Error; - begin -- if On then -- Err := Item_Opts_On (Itm, Opt); -+ if On then -+ Err := Item_Opts_On (Itm, Opt); - else -- Err := Item_Opts_Off (Itm, Opt); -+ Err := Item_Opts_Off (Itm, Opt); - end if; - if Err /= E_Ok then - Eti_Exception (Err); - end if; -- end Switch_Options; -+ end Switch_Options; - -- procedure Get_Options (Itm : Item; -- Options : out Item_Option_Set) -+ procedure Get_Options (Itm : Item; -+ Options : out Item_Option_Set) - is - function Item_Opts (Itm : Item) return C_Int; - pragma Import (C, Item_Opts, "item_opts"); - -- Res : constant C_Int := Item_Opts (Itm); -+ Res : constant C_Int := Item_Opts (Itm); - begin -- Options := CInt_2_IOS (Res); -- end Get_Options; -+ Options := CInt_2_IOS (Res); -+ end Get_Options; - -- function Get_Options (Itm : Item := Null_Item) return Item_Option_Set -+ function Get_Options (Itm : Item := Null_Item) return Item_Option_Set - is -- Ios : Item_Option_Set; -+ Ios : Item_Option_Set; - begin -- Get_Options (Itm, Ios); -+ Get_Options (Itm, Ios); - return Ios; -- end Get_Options; -+ end Get_Options; - ------------------------------------------------------------------------------- -- procedure Name (Itm : Item; -- Name : out String) -+ procedure Name (Itm : Item; -+ Name : out String) - is - function Itemname (Itm : Item) return chars_ptr; - pragma Import (C, Itemname, "item_name"); - begin -- Fill_String (Itemname (Itm), Name); -- end Name; -+ Fill_String (Itemname (Itm), Name); -+ end Name; - -- function Name (Itm : Item) return String -+ function Name (Itm : 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; -+ return Fill_String (Itemname (Itm)); -+ end Name; - -- procedure Description (Itm : Item; -- Description : out String) -+ procedure Description (Itm : Item; -+ Description : out String) - is - function Descname (Itm : Item) return chars_ptr; - pragma Import (C, Descname, "item_description"); - begin -- Fill_String (Descname (Itm), Description); -- end Description; -+ Fill_String (Descname (Itm), Description); -+ end Description; - -- function Description (Itm : Item) return String -+ function Description (Itm : 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; -+ return Fill_String (Descname (Itm)); -+ end Description; - ------------------------------------------------------------------------------- -- procedure Set_Current (Men : Menu; -- Itm : Item) -+ procedure Set_Current (Men : Menu; -+ Itm : Item) - is - function Set_Curr_Item (Men : Menu; - Itm : Item) return C_Int; - pragma Import (C, Set_Curr_Item, "set_current_item"); - -- Res : constant Eti_Error := Set_Curr_Item (Men, Itm); -+ Res : constant Eti_Error := Set_Curr_Item (Men, Itm); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Current; -+ end Set_Current; - -- function Current (Men : Menu) return Item -+ function Current (Men : Menu) return Item - is - function Curr_Item (Men : Menu) return Item; - pragma Import (C, Curr_Item, "current_item"); - -- Res : constant Item := Curr_Item (Men); -+ Res : constant Item := Curr_Item (Men); - begin - if Res = Null_Item then - raise Menu_Exception; - end if; - return Res; -- end Current; -+ end Current; - -- procedure Set_Top_Row (Men : Menu; -- Line : Line_Position) -+ procedure Set_Top_Row (Men : Menu; -+ Line : Line_Position) - is - function Set_Toprow (Men : Menu; - Line : C_Int) return C_Int; - pragma Import (C, Set_Toprow, "set_top_row"); - -- Res : constant Eti_Error := Set_Toprow (Men, C_Int (Line)); -+ Res : constant Eti_Error := Set_Toprow (Men, C_Int (Line)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Top_Row; -+ end Set_Top_Row; - -- function Top_Row (Men : Menu) return Line_Position -+ function Top_Row (Men : Menu) return Line_Position - is - function Toprow (Men : Menu) return C_Int; - pragma Import (C, Toprow, "top_row"); - -- Res : constant C_Int := Toprow (Men); -+ Res : constant C_Int := Toprow (Men); - begin - if Res = Curses_Err then - raise Menu_Exception; - end if; - return Line_Position (Res); -- end Top_Row; -+ end Top_Row; - -- function Get_Index (Itm : Item) return Positive -+ function Get_Index (Itm : Item) return Positive - is - function Get_Itemindex (Itm : Item) return C_Int; - pragma Import (C, Get_Itemindex, "item_index"); - -- Res : constant C_Int := Get_Itemindex (Itm); -+ Res : constant C_Int := Get_Itemindex (Itm); - begin - if Res = Curses_Err then - raise Menu_Exception; - end if; - return Positive (Natural (Res) + Positive'First); -- end Get_Index; -+ end Get_Index; - ------------------------------------------------------------------------------- -- procedure Post (Men : Menu; -- Post : Boolean := True) -+ procedure Post (Men : Menu; -+ Post : Boolean := True) - is - function M_Post (Men : Menu) return C_Int; - pragma Import (C, M_Post, "post_menu"); -@@ -363,35 +363,35 @@ - - Res : Eti_Error; - begin -- if Post then -- Res := M_Post (Men); -+ if Post then -+ Res := M_Post (Men); - else -- Res := M_Unpost (Men); -+ Res := M_Unpost (Men); - end if; - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Post; -+ end Post; - ------------------------------------------------------------------------------- -- procedure Set_Options (Men : Menu; -- Options : Menu_Option_Set) -+ procedure Set_Options (Men : Menu; -+ Options : Menu_Option_Set) - is - function Set_Menu_Opts (Men : Menu; - Opt : C_Int) return C_Int; - pragma Import (C, Set_Menu_Opts, "set_menu_opts"); - -- Opt : constant C_Int := MOS_2_CInt (Options); -+ Opt : constant C_Int := MOS_2_CInt (Options); - Res : Eti_Error; - begin -- Res := Set_Menu_Opts (Men, Opt); -+ Res := Set_Menu_Opts (Men, Opt); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Options; -+ end Set_Options; - -- procedure Switch_Options (Men : Menu; -- Options : Menu_Option_Set; -- On : Boolean := True) -+ procedure Switch_Options (Men : Menu; -+ Options : Menu_Option_Set; -+ On : Boolean := True) - is - function Menu_Opts_On (Men : Menu; - Opt : C_Int) return C_Int; -@@ -400,89 +400,89 @@ - Opt : C_Int) return C_Int; - pragma Import (C, Menu_Opts_Off, "menu_opts_off"); - -- Opt : constant C_Int := MOS_2_CInt (Options); -+ Opt : constant C_Int := MOS_2_CInt (Options); - Err : Eti_Error; - begin -- if On then -- Err := Menu_Opts_On (Men, Opt); -+ if On then -+ Err := Menu_Opts_On (Men, Opt); - else -- Err := Menu_Opts_Off (Men, Opt); -+ Err := Menu_Opts_Off (Men, Opt); - end if; - if Err /= E_Ok then - Eti_Exception (Err); - end if; -- end Switch_Options; -+ end Switch_Options; - -- procedure Get_Options (Men : Menu; -- Options : out Menu_Option_Set) -+ procedure Get_Options (Men : Menu; -+ Options : out Menu_Option_Set) - is - function Menu_Opts (Men : Menu) return C_Int; - pragma Import (C, Menu_Opts, "menu_opts"); - -- Res : constant C_Int := Menu_Opts (Men); -+ Res : constant C_Int := Menu_Opts (Men); - begin -- Options := CInt_2_MOS (Res); -- end Get_Options; -+ Options := CInt_2_MOS (Res); -+ end Get_Options; - -- function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set -+ function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set - is - Mos : Menu_Option_Set; - begin -- Get_Options (Men, Mos); -+ Get_Options (Men, Mos); - return Mos; -- end Get_Options; -+ end Get_Options; - ------------------------------------------------------------------------------- -- procedure Set_Window (Men : Menu; -- Win : Window) -+ procedure Set_Window (Men : Menu; -+ Win : Window) - is - function Set_Menu_Win (Men : Menu; - Win : Window) return C_Int; - pragma Import (C, Set_Menu_Win, "set_menu_win"); - -- Res : constant Eti_Error := Set_Menu_Win (Men, Win); -+ Res : constant Eti_Error := Set_Menu_Win (Men, Win); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Window; -+ end Set_Window; - -- function Get_Window (Men : Menu) return Window -+ function Get_Window (Men : Menu) return Window - is - function Menu_Win (Men : Menu) return Window; - pragma Import (C, Menu_Win, "menu_win"); - -- W : constant Window := Menu_Win (Men); -+ W : constant Window := Menu_Win (Men); - begin - return W; -- end Get_Window; -+ end Get_Window; - -- procedure Set_Sub_Window (Men : Menu; -- Win : Window) -+ procedure Set_Sub_Window (Men : Menu; -+ Win : Window) - is - function Set_Menu_Sub (Men : Menu; - Win : Window) return C_Int; - pragma Import (C, Set_Menu_Sub, "set_menu_sub"); - -- Res : constant Eti_Error := Set_Menu_Sub (Men, Win); -+ Res : constant Eti_Error := Set_Menu_Sub (Men, Win); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Sub_Window; -+ end Set_Sub_Window; - -- function Get_Sub_Window (Men : Menu) return Window -+ function Get_Sub_Window (Men : Menu) return Window - is - function Menu_Sub (Men : Menu) return Window; - pragma Import (C, Menu_Sub, "menu_sub"); - -- W : constant Window := Menu_Sub (Men); -+ W : constant Window := Menu_Sub (Men); - begin - return W; -- end Get_Sub_Window; -+ end Get_Sub_Window; - -- procedure Scale (Men : Menu; -- Lines : out Line_Count; -- Columns : out Column_Count) -+ procedure Scale (Men : Menu; -+ Lines : out Line_Count; -+ Columns : out Column_Count) - is - type C_Int_Access is access all C_Int; - function M_Scale (Men : Menu; -@@ -490,229 +490,229 @@ - pragma Import (C, M_Scale, "scale_menu"); - - X, Y : aliased C_Int; -- Res : constant Eti_Error := M_Scale (Men, Y'Access, X'Access); -+ Res : constant Eti_Error := M_Scale (Men, Y'Access, X'Access); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- Lines := Line_Count (Y); -- Columns := Column_Count (X); -- end Scale; -+ Lines := Line_Count (Y); -+ Columns := Column_Count (X); -+ end Scale; - ------------------------------------------------------------------------------- -- procedure Position_Cursor (Men : Menu) -+ procedure Position_Cursor (Men : Menu) - is - function Pos_Menu_Cursor (Men : Menu) return C_Int; - pragma Import (C, Pos_Menu_Cursor, "pos_menu_cursor"); - -- Res : constant Eti_Error := Pos_Menu_Cursor (Men); -+ Res : constant Eti_Error := Pos_Menu_Cursor (Men); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Position_Cursor; -+ end Position_Cursor; - - ------------------------------------------------------------------------------- -- procedure Set_Mark (Men : Menu; -- Mark : String) -+ procedure Set_Mark (Men : Menu; -+ Mark : String) - is - type Char_Ptr is access all Interfaces.C.char; - function Set_Mark (Men : Menu; - Mark : Char_Ptr) return C_Int; - pragma Import (C, Set_Mark, "set_menu_mark"); - -- Txt : char_array (0 .. Mark'Length); -+ Txt : char_array (0 .. Mark'Length); - Len : size_t; - Res : Eti_Error; - begin -- To_C (Mark, Txt, Len); -- Res := Set_Mark (Men, Txt (Txt'First)'Access); -+ To_C (Mark, Txt, Len); -+ Res := Set_Mark (Men, Txt (Txt'First)'Access); - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Mark; -+ end Set_Mark; - -- procedure Mark (Men : Menu; -- Mark : out String) -+ procedure Mark (Men : Menu; -+ Mark : out String) - is - function Get_Menu_Mark (Men : Menu) return chars_ptr; - pragma Import (C, Get_Menu_Mark, "menu_mark"); - begin -- Fill_String (Get_Menu_Mark (Men), Mark); -- end Mark; -+ Fill_String (Get_Menu_Mark (Men), Mark); -+ end Mark; - -- function Mark (Men : Menu) return String -+ 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; -+ return Fill_String (Get_Menu_Mark (Men)); -+ end Mark; - - ------------------------------------------------------------------------------- -- procedure Set_Foreground -- (Men : Menu; -- Fore : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ procedure Set_Foreground -+ (Men : Menu; -+ Fore : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Set_Menu_Fore (Men : Menu; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Menu_Fore, "set_menu_fore"); - -- Ch : constant Attributed_Character := (Ch => Character'First, -- Color => Color, -- Attr => Fore); -- Res : constant Eti_Error := Set_Menu_Fore (Men, AttrChar_To_Chtype (Ch)); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Color => Color, -+ Attr => Fore); -+ Res : constant Eti_Error := Set_Menu_Fore (Men, AttrChar_To_Chtype (Ch)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Foreground; -+ end Set_Foreground; - -- procedure Foreground (Men : Menu; -- Fore : out Character_Attribute_Set) -+ procedure Foreground (Men : Menu; -+ Fore : out Character_Attribute_Set) - is - function Menu_Fore (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Fore, "menu_fore"); - begin -- Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; -- end Foreground; -+ Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; -+ end Foreground; - -- procedure Foreground (Men : Menu; -- Fore : out Character_Attribute_Set; -- Color : out Color_Pair) -+ procedure Foreground (Men : Menu; -+ Fore : out Character_Attribute_Set; -+ Color : out Color_Pair) - is - function Menu_Fore (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Fore, "menu_fore"); - begin -- Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; -- Color := Chtype_To_AttrChar (Menu_Fore (Men)).Color; -- end Foreground; -- -- procedure Set_Background -- (Men : Menu; -- Back : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ Fore := Chtype_To_AttrChar (Menu_Fore (Men)).Attr; -+ Color := Chtype_To_AttrChar (Menu_Fore (Men)).Color; -+ end Foreground; -+ -+ procedure Set_Background -+ (Men : Menu; -+ Back : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Set_Menu_Back (Men : Menu; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Menu_Back, "set_menu_back"); - -- Ch : constant Attributed_Character := (Ch => Character'First, -- Color => Color, -- Attr => Back); -- Res : constant Eti_Error := Set_Menu_Back (Men, AttrChar_To_Chtype (Ch)); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Color => Color, -+ Attr => Back); -+ Res : constant Eti_Error := Set_Menu_Back (Men, AttrChar_To_Chtype (Ch)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Background; -+ end Set_Background; - -- procedure Background (Men : Menu; -- Back : out Character_Attribute_Set) -+ procedure Background (Men : Menu; -+ Back : out Character_Attribute_Set) - is - function Menu_Back (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Back, "menu_back"); - begin -- Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; -- end Background; -+ Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; -+ end Background; - -- procedure Background (Men : Menu; -- Back : out Character_Attribute_Set; -- Color : out Color_Pair) -+ procedure Background (Men : Menu; -+ Back : out Character_Attribute_Set; -+ Color : out Color_Pair) - is - function Menu_Back (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Back, "menu_back"); - begin -- Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; -- Color := Chtype_To_AttrChar (Menu_Back (Men)).Color; -- end Background; -- -- procedure Set_Grey (Men : Menu; -- Grey : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First) -+ Back := Chtype_To_AttrChar (Menu_Back (Men)).Attr; -+ Color := Chtype_To_AttrChar (Menu_Back (Men)).Color; -+ end Background; -+ -+ procedure Set_Grey (Men : Menu; -+ Grey : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First) - is - function Set_Menu_Grey (Men : Menu; - Attr : C_Chtype) return C_Int; - pragma Import (C, Set_Menu_Grey, "set_menu_grey"); - -- Ch : constant Attributed_Character := (Ch => Character'First, -- Color => Color, -- Attr => Grey); -+ Ch : constant Attributed_Character := (Ch => Character'First, -+ Color => Color, -+ Attr => Grey); - -- Res : constant Eti_Error := Set_Menu_Grey (Men, AttrChar_To_Chtype (Ch)); -+ Res : constant Eti_Error := Set_Menu_Grey (Men, AttrChar_To_Chtype (Ch)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Grey; -+ end Set_Grey; - -- procedure Grey (Men : Menu; -- Grey : out Character_Attribute_Set) -+ procedure Grey (Men : Menu; -+ Grey : out Character_Attribute_Set) - is - function Menu_Grey (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Grey, "menu_grey"); - begin -- Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; -- end Grey; -+ Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; -+ end Grey; - -- procedure Grey (Men : Menu; -- Grey : out Character_Attribute_Set; -- Color : out Color_Pair) -+ procedure Grey (Men : Menu; -+ Grey : out Character_Attribute_Set; -+ Color : out Color_Pair) - is - function Menu_Grey (Men : Menu) return C_Chtype; - pragma Import (C, Menu_Grey, "menu_grey"); - begin -- Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; -- Color := Chtype_To_AttrChar (Menu_Grey (Men)).Color; -- end Grey; -+ Grey := Chtype_To_AttrChar (Menu_Grey (Men)).Attr; -+ Color := Chtype_To_AttrChar (Menu_Grey (Men)).Color; -+ end Grey; - -- procedure Set_Pad_Character (Men : Menu; -- Pad : Character := Space) -+ procedure Set_Pad_Character (Men : Menu; -+ Pad : Character := Space) - is - function Set_Menu_Pad (Men : Menu; - Ch : C_Int) return C_Int; - pragma Import (C, Set_Menu_Pad, "set_menu_pad"); - -- Res : constant Eti_Error := Set_Menu_Pad (Men, -- C_Int (Character'Pos (Pad))); -+ Res : constant Eti_Error := Set_Menu_Pad (Men, -+ C_Int (Character'Pos (Pad))); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Pad_Character; -+ end Set_Pad_Character; - -- procedure Pad_Character (Men : Menu; -- Pad : out Character) -+ procedure Pad_Character (Men : Menu; -+ Pad : out Character) - is - function Menu_Pad (Men : Menu) return C_Int; - pragma Import (C, Menu_Pad, "menu_pad"); - begin -- Pad := Character'Val (Menu_Pad (Men)); -- end Pad_Character; -+ Pad := Character'Val (Menu_Pad (Men)); -+ end Pad_Character; - ------------------------------------------------------------------------------- -- procedure Set_Spacing (Men : Menu; -- Descr : Column_Position := 0; -- Row : Line_Position := 0; -- Col : Column_Position := 0) -+ procedure Set_Spacing (Men : Menu; -+ Descr : Column_Position := 0; -+ Row : Line_Position := 0; -+ Col : Column_Position := 0) - is - function Set_Spacing (Men : Menu; - D, R, C : C_Int) return C_Int; - pragma Import (C, Set_Spacing, "set_menu_spacing"); - -- Res : constant Eti_Error := Set_Spacing (Men, -- C_Int (Descr), -- C_Int (Row), -- C_Int (Col)); -+ Res : constant Eti_Error := Set_Spacing (Men, -+ C_Int (Descr), -+ C_Int (Row), -+ C_Int (Col)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Spacing; -+ end Set_Spacing; - -- procedure Spacing (Men : Menu; -- Descr : out Column_Position; -- Row : out Line_Position; -- Col : out Column_Position) -+ procedure Spacing (Men : Menu; -+ Descr : out Column_Position; -+ Row : out Line_Position; -+ Col : out Column_Position) - is - type C_Int_Access is access all C_Int; - function Get_Spacing (Men : Menu; -@@ -720,7 +720,7 @@ - pragma Import (C, Get_Spacing, "menu_spacing"); - - D, R, C : aliased C_Int; -- Res : constant Eti_Error := Get_Spacing (Men, -+ Res : constant Eti_Error := Get_Spacing (Men, - D'Access, - R'Access, - C'Access); -@@ -728,26 +728,26 @@ - if Res /= E_Ok then - Eti_Exception (Res); - else -- Descr := Column_Position (D); -- Row := Line_Position (R); -- Col := Column_Position (C); -+ Descr := Column_Position (D); -+ Row := Line_Position (R); -+ Col := Column_Position (C); - end if; -- end Spacing; -+ end Spacing; - ------------------------------------------------------------------------------- -- function Set_Pattern (Men : Menu; -- Text : String) return Boolean -+ function Set_Pattern (Men : Menu; -+ Text : String) return Boolean - is - type Char_Ptr is access all Interfaces.C.char; - function Set_Pattern (Men : Menu; - Pattern : Char_Ptr) return C_Int; - pragma Import (C, Set_Pattern, "set_menu_pattern"); - -- S : char_array (0 .. Text'Length); -+ S : char_array (0 .. Text'Length); - L : size_t; - Res : Eti_Error; - begin -- To_C (Text, S, L); -- Res := Set_Pattern (Men, S (S'First)'Access); -+ To_C (Text, S, L); -+ Res := Set_Pattern (Men, S (S'First)'Access); - case Res is - when E_No_Match => return False; - when E_Ok => return True; -@@ -755,38 +755,38 @@ - Eti_Exception (Res); - return False; - end case; -- end Set_Pattern; -+ end Set_Pattern; - -- procedure Pattern (Men : Menu; -- Text : out String) -+ procedure Pattern (Men : Menu; -+ Text : out String) - is - function Get_Pattern (Men : Menu) return chars_ptr; - pragma Import (C, Get_Pattern, "menu_pattern"); - begin -- Fill_String (Get_Pattern (Men), Text); -- end Pattern; -+ Fill_String (Get_Pattern (Men), Text); -+ end Pattern; - ------------------------------------------------------------------------------- -- procedure Set_Format (Men : Menu; -- Lines : Line_Count; -- Columns : Column_Count) -+ procedure Set_Format (Men : Menu; -+ Lines : Line_Count; -+ Columns : Column_Count) - is - function Set_Menu_Fmt (Men : Menu; - Lin : C_Int; - Col : C_Int) return C_Int; - pragma Import (C, Set_Menu_Fmt, "set_menu_format"); - -- Res : constant Eti_Error := Set_Menu_Fmt (Men, -- C_Int (Lines), -- C_Int (Columns)); -+ Res : constant Eti_Error := Set_Menu_Fmt (Men, -+ C_Int (Lines), -+ C_Int (Columns)); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Format; -+ end Set_Format; - -- procedure Format (Men : Menu; -- Lines : out Line_Count; -- Columns : out Column_Count) -+ procedure Format (Men : Menu; -+ Lines : out Line_Count; -+ Columns : out Column_Count) - is - type C_Int_Access is access all C_Int; - function Menu_Fmt (Men : Menu; -@@ -794,106 +794,106 @@ - pragma Import (C, Menu_Fmt, "menu_format"); - - L, C : aliased C_Int; -- Res : constant Eti_Error := Menu_Fmt (Men, L'Access, C'Access); -+ Res : constant Eti_Error := Menu_Fmt (Men, L'Access, C'Access); - begin - if Res /= E_Ok then - Eti_Exception (Res); - else -- Lines := Line_Count (L); -- Columns := Column_Count (C); -+ Lines := Line_Count (L); -+ Columns := Column_Count (C); - end if; -- end Format; -+ end Format; - ------------------------------------------------------------------------------- -- procedure Set_Item_Init_Hook (Men : Menu; -- Proc : Menu_Hook_Function) -+ procedure Set_Item_Init_Hook (Men : Menu; -+ Proc : Menu_Hook_Function) - is - function Set_Item_Init (Men : Menu; -- Proc : Menu_Hook_Function) return C_Int; -+ Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Item_Init, "set_item_init"); - -- Res : constant Eti_Error := Set_Item_Init (Men, Proc); -+ Res : constant Eti_Error := Set_Item_Init (Men, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Item_Init_Hook; -+ end Set_Item_Init_Hook; - -- procedure Set_Item_Term_Hook (Men : Menu; -- Proc : Menu_Hook_Function) -+ procedure Set_Item_Term_Hook (Men : Menu; -+ Proc : Menu_Hook_Function) - is - function Set_Item_Term (Men : Menu; -- Proc : Menu_Hook_Function) return C_Int; -+ Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Item_Term, "set_item_term"); - -- Res : constant Eti_Error := Set_Item_Term (Men, Proc); -+ Res : constant Eti_Error := Set_Item_Term (Men, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Item_Term_Hook; -+ end Set_Item_Term_Hook; - -- procedure Set_Menu_Init_Hook (Men : Menu; -- Proc : Menu_Hook_Function) -+ procedure Set_Menu_Init_Hook (Men : Menu; -+ Proc : Menu_Hook_Function) - is - function Set_Menu_Init (Men : Menu; -- Proc : Menu_Hook_Function) return C_Int; -+ Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Menu_Init, "set_menu_init"); - -- Res : constant Eti_Error := Set_Menu_Init (Men, Proc); -+ Res : constant Eti_Error := Set_Menu_Init (Men, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Menu_Init_Hook; -+ end Set_Menu_Init_Hook; - -- procedure Set_Menu_Term_Hook (Men : Menu; -- Proc : Menu_Hook_Function) -+ procedure Set_Menu_Term_Hook (Men : Menu; -+ Proc : Menu_Hook_Function) - is - function Set_Menu_Term (Men : Menu; -- Proc : Menu_Hook_Function) return C_Int; -+ Proc : Menu_Hook_Function) return C_Int; - pragma Import (C, Set_Menu_Term, "set_menu_term"); - -- Res : constant Eti_Error := Set_Menu_Term (Men, Proc); -+ Res : constant Eti_Error := Set_Menu_Term (Men, Proc); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- end Set_Menu_Term_Hook; -+ end Set_Menu_Term_Hook; - -- function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function -+ function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function - is -- function Item_Init (Men : Menu) return Menu_Hook_Function; -+ function Item_Init (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Item_Init, "item_init"); - begin -- return Item_Init (Men); -- end Get_Item_Init_Hook; -+ return Item_Init (Men); -+ end Get_Item_Init_Hook; - -- function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function -+ function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function - is -- function Item_Term (Men : Menu) return Menu_Hook_Function; -+ function Item_Term (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Item_Term, "item_term"); - begin -- return Item_Term (Men); -- end Get_Item_Term_Hook; -+ return Item_Term (Men); -+ end Get_Item_Term_Hook; - -- function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function -+ function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function - is -- function Menu_Init (Men : Menu) return Menu_Hook_Function; -+ function Menu_Init (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Menu_Init, "menu_init"); - begin -- return Menu_Init (Men); -- end Get_Menu_Init_Hook; -+ return Menu_Init (Men); -+ end Get_Menu_Init_Hook; - -- function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function -+ function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function - is -- function Menu_Term (Men : Menu) return Menu_Hook_Function; -+ function Menu_Term (Men : Menu) return Menu_Hook_Function; - pragma Import (C, Menu_Term, "menu_term"); - begin -- return Menu_Term (Men); -- end Get_Menu_Term_Hook; -+ return Menu_Term (Men); -+ end Get_Menu_Term_Hook; - ------------------------------------------------------------------------------- -- procedure Redefine (Men : Menu; -- Items : Item_Array_Access) -+ procedure Redefine (Men : Menu; -+ Items : Item_Array_Access) - is - function Set_Items (Men : Menu; - Items : System.Address) return C_Int; -@@ -901,127 +901,127 @@ - - Res : Eti_Error; - begin -- pragma Assert (Items (Items'Last) = Null_Item); -- if Items (Items'Last) /= Null_Item then -+ pragma Assert (Items.all (Items'Last) = Null_Item); -+ if Items.all (Items'Last) /= Null_Item then - raise Menu_Exception; - else -- Res := Set_Items (Men, Items.all'Address); -+ Res := Set_Items (Men, Items.all'Address); - if Res /= E_Ok then - Eti_Exception (Res); - end if; - end if; -- end Redefine; -+ end Redefine; - -- function Item_Count (Men : Menu) return Natural -+ function Item_Count (Men : Menu) return Natural - is - function Count (Men : Menu) return C_Int; - pragma Import (C, Count, "item_count"); - begin -- return Natural (Count (Men)); -- end Item_Count; -+ return Natural (Count (Men)); -+ end Item_Count; - -- function Items (Men : Menu; -- Index : Positive) return Item -+ function Items (Men : Menu; -+ Index : Positive) return Item - is - use I_Array; - - function C_Mitems (Men : Menu) return Pointer; - pragma Import (C, C_Mitems, "menu_items"); - -- P : Pointer := C_Mitems (Men); -+ P : Pointer := C_Mitems (Men); - begin -- if P = null or else Index > Item_Count (Men) then -+ if P = null or else Index > Item_Count (Men) then - raise Menu_Exception; - else -- P := P + ptrdiff_t (C_Int (Index) - 1); -+ P := P + ptrdiff_t (C_Int (Index) - 1); - return P.all; - end if; -- end Items; -+ end Items; - - ------------------------------------------------------------------------------- -- function Create (Items : Item_Array_Access) return Menu -+ function Create (Items : Item_Array_Access) return Menu - is - function Newmenu (Items : System.Address) return Menu; - pragma Import (C, Newmenu, "new_menu"); - - M : Menu; - begin -- pragma Assert (Items (Items'Last) = Null_Item); -- if Items (Items'Last) /= Null_Item then -+ pragma Assert (Items.all (Items'Last) = Null_Item); -+ if Items.all (Items'Last) /= Null_Item then - raise Menu_Exception; - else -- M := Newmenu (Items.all'Address); -+ M := Newmenu (Items.all'Address); - if M = Null_Menu then - raise Menu_Exception; - end if; - return M; - end if; -- end Create; -+ end Create; - -- procedure Delete (Men : in out Menu) -+ procedure Delete (Men : in out Menu) - is - function Free (Men : Menu) return C_Int; - pragma Import (C, Free, "free_menu"); - -- Res : constant Eti_Error := Free (Men); -+ Res : constant Eti_Error := Free (Men); - begin - if Res /= E_Ok then - Eti_Exception (Res); - end if; -- Men := Null_Menu; -- end Delete; -+ Men := Null_Menu; -+ end Delete; - - ------------------------------------------------------------------------------ -- function Driver (Men : Menu; -- Key : Key_Code) return Driver_Result -+ function Driver (Men : Menu; -+ Key : Key_Code) return Driver_Result - is - function Driver (Men : Menu; - Key : C_Int) return C_Int; - pragma Import (C, Driver, "menu_driver"); - -- R : constant Eti_Error := Driver (Men, C_Int (Key)); -+ R : constant Eti_Error := Driver (Men, C_Int (Key)); - begin - if R /= E_Ok then - case R is -- when E_Unknown_Command => return Unknown_Request; -- when E_No_Match => return No_Match; -+ when E_Unknown_Command => return Unknown_Request; -+ when E_No_Match => return No_Match; - when E_Request_Denied | -- E_Not_Selectable => return Request_Denied; -+ E_Not_Selectable => return Request_Denied; - when others => - Eti_Exception (R); - end case; - end if; -- return Menu_Ok; -- end Driver; -+ return Menu_Ok; -+ end Driver; - -- procedure Free (IA : in out Item_Array_Access; -- Free_Items : Boolean := False) -+ procedure Free (IA : in out Item_Array_Access; -+ Free_Items : Boolean := False) - is - procedure Release is new Ada.Unchecked_Deallocation -- (Item_Array, Item_Array_Access); -+ (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)); -+ if IA /= null and then Free_Items then -+ for I in IA'First .. (IA'Last - 1) loop -+ if IA.all (I) /= Null_Item then -+ Delete (IA.all (I)); - end if; - end loop; - end if; -- Release (IA); -- end Free; -+ Release (IA); -+ end Free; - - ------------------------------------------------------------------------------- -- function Default_Menu_Options return Menu_Option_Set -+ function Default_Menu_Options return Menu_Option_Set - is - begin -- return Get_Options (Null_Menu); -- end Default_Menu_Options; -+ return Get_Options (Null_Menu); -+ end Default_Menu_Options; - -- function Default_Item_Options return Item_Option_Set -+ function Default_Item_Options return Item_Option_Set - is - begin -- return Get_Options (Null_Item); -- end Default_Item_Options; -+ return Get_Options (Null_Item); -+ end Default_Item_Options; - ------------------------------------------------------------------------------- - - end Terminal_Interface.Curses.Menus; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-menus__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-menus__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-menus__ads.htm 2010-05-29 23:56:06.000000000 +0200 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-menus__ads.htm 2011-03-20 00:18:40.000000000 +0100 -@@ -131,6 +131,7 @@ - Ignore_Case : Boolean; - Show_Matches : Boolean; - Non_Cyclic : Boolean; -+ Unused : Boolean; - end record; - pragma Convention (C, Menu_Option_Set); - -@@ -142,37 +143,40 @@ - Ignore_Case at 0 range 3 .. 3; - Show_Matches at 0 range 4 .. 4; - Non_Cyclic at 0 range 5 .. 5; -+ Unused at 0 range 6 .. 31; - end record; - for Menu_Option_Set'Size use 32; - -- Please note: this rep. clause is generated and may be - -- different on your system. - pragma Warnings (On); - -- function Default_Menu_Options return Menu_Option_Set; -+ function Default_Menu_Options return Menu_Option_Set; - -- Initial default options for a menu. -- pragma Inline (Default_Menu_Options); -+ pragma Inline (Default_Menu_Options); - -- - -- Item options - -- - pragma Warnings (Off); -- type Item_Option_Set is -+ type Item_Option_Set is - record -- Selectable : Boolean; -+ Selectable : Boolean; -+ Unused : Boolean; - end record; -- pragma Convention (C, Item_Option_Set); -+ pragma Convention (C, Item_Option_Set); - -- for Item_Option_Set use -+ for Item_Option_Set use - record -- Selectable at 0 range 0 .. 0; -+ Selectable at 0 range 0 .. 0; -+ Unused at 0 range 1 .. 31; - end record; -- for Item_Option_Set'Size use 32; -+ for Item_Option_Set'Size use 32; - -- Please note: this rep. clause is generated and may be - -- different on your system. - pragma Warnings (On); - -- function Default_Item_Options return Item_Option_Set; -+ function Default_Item_Options return Item_Option_Set; - -- Initial default options for an item. -- pragma Inline (Default_Item_Options); -+ pragma Inline (Default_Item_Options); - - -- - -- Item Array -@@ -180,10 +184,10 @@ - type Item_Array is array (Positive range <>) of aliased Item; - pragma Convention (C, Item_Array); - -- type Item_Array_Access is access Item_Array; -+ type Item_Array_Access is access Item_Array; - -- procedure Free (IA : in out Item_Array_Access; -- Free_Items : Boolean := False); -+ 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. -@@ -193,19 +197,19 @@ - -- |===================================================================== - - -- #1A NAME="AFU_1"#2| -- function Create (Name : String; -- Description : String := "") return Item; -+ function Create (Name : String; -+ Description : String := "") return Item; - -- AKA: new_item() - -- Not inlined. - - -- #1A NAME="AFU_2"#2| -- function New_Item (Name : String; -- Description : String := "") return Item -- renames Create; -+ function New_Item (Name : String; -+ Description : String := "") return Item -+ renames Create; - -- AKA: new_item() - - -- #1A NAME="AFU_3"#2| -- procedure Delete (Itm : in out Item); -+ procedure Delete (Itm : in out Item); - -- AKA: free_item() - -- Resets Itm to Null_Item - -@@ -214,51 +218,51 @@ - -- |===================================================================== - - -- #1A NAME="AFU_4"#2| -- procedure Set_Value (Itm : Item; -- Value : Boolean := True); -+ procedure Set_Value (Itm : Item; -+ Value : Boolean := True); - -- AKA: set_item_value() -- pragma Inline (Set_Value); -+ pragma Inline (Set_Value); - - -- #1A NAME="AFU_5"#2| -- function Value (Itm : Item) return Boolean; -+ function Value (Itm : Item) return Boolean; - -- AKA: item_value() -- pragma Inline (Value); -+ pragma Inline (Value); - - -- |===================================================================== - -- | Man page mitem_visible.3x - -- |===================================================================== - - -- #1A NAME="AFU_6"#2| -- function Visible (Itm : Item) return Boolean; -+ function Visible (Itm : Item) return Boolean; - -- AKA: item_visible() -- pragma Inline (Visible); -+ pragma Inline (Visible); - - -- |===================================================================== - -- | Man page mitem_opts.3x - -- |===================================================================== - - -- #1A NAME="AFU_7"#2| -- procedure Set_Options (Itm : Item; -- Options : Item_Option_Set); -+ procedure Set_Options (Itm : Item; -+ Options : Item_Option_Set); - -- AKA: set_item_opts() - -- An overloaded Set_Options is defined later. Pragma Inline appears there - - -- #1A NAME="AFU_8"#2| -- procedure Switch_Options (Itm : Item; -- Options : Item_Option_Set; -- On : Boolean := True); -+ procedure Switch_Options (Itm : Item; -+ Options : Item_Option_Set; -+ On : Boolean := True); - -- AKA: item_opts_on() - -- AKA: item_opts_off() - -- An overloaded Switch_Options is defined later. - -- Pragma Inline appears there - - -- #1A NAME="AFU_9"#2| -- procedure Get_Options (Itm : Item; -- Options : out Item_Option_Set); -+ procedure Get_Options (Itm : Item; -+ Options : out Item_Option_Set); - -- AKA: item_opts() - - -- #1A NAME="AFU_10"#2| -- function Get_Options (Itm : Item := Null_Item) return Item_Option_Set; -+ function Get_Options (Itm : Item := Null_Item) return Item_Option_Set; - -- AKA: item_opts() - -- An overloaded Get_Options is defined later. Pragma Inline appears there - -@@ -267,20 +271,20 @@ - -- |===================================================================== - - -- #1A NAME="AFU_11"#2| -- procedure Name (Itm : Item; -- Name : out String); -+ procedure Name (Itm : Item; -+ Name : out String); - -- AKA: item_name() -- function Name (Itm : Item) return String; -+ function Name (Itm : Item) return String; - -- AKA: item_name() - -- Implemented as function - pragma Inline (Name); - - -- #1A NAME="AFU_12"#2| -- procedure Description (Itm : Item; -- Description : out String); -+ procedure Description (Itm : Item; -+ Description : out String); - -- AKA: item_description(); - -- function Description (Itm : Item) return String; -+ function Description (Itm : Item) return String; - -- AKA: item_description(); - -- Implemented as function - pragma Inline (Description); -@@ -290,71 +294,71 @@ - -- |===================================================================== - - -- #1A NAME="AFU_13"#2| -- procedure Set_Current (Men : Menu; -- Itm : Item); -+ procedure Set_Current (Men : Menu; -+ Itm : Item); - -- AKA: set_current_item() -- pragma Inline (Set_Current); -+ pragma Inline (Set_Current); - - -- #1A NAME="AFU_14"#2| -- function Current (Men : Menu) return Item; -+ function Current (Men : Menu) return Item; - -- AKA: current_item() -- pragma Inline (Current); -+ pragma Inline (Current); - - -- #1A NAME="AFU_15"#2| -- procedure Set_Top_Row (Men : Menu; -- Line : Line_Position); -+ procedure Set_Top_Row (Men : Menu; -+ Line : Line_Position); - -- AKA: set_top_row() -- pragma Inline (Set_Top_Row); -+ pragma Inline (Set_Top_Row); - - -- #1A NAME="AFU_16"#2| -- function Top_Row (Men : Menu) return Line_Position; -+ function Top_Row (Men : Menu) return Line_Position; - -- AKA: top_row() -- pragma Inline (Top_Row); -+ pragma Inline (Top_Row); - - -- #1A NAME="AFU_17"#2| -- function Get_Index (Itm : Item) return Positive; -+ function Get_Index (Itm : Item) return Positive; - -- AKA: item_index() - -- 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); -+ pragma Inline (Get_Index); - - -- |===================================================================== - -- | Man page menu_post.3x - -- |===================================================================== - - -- #1A NAME="AFU_18"#2| -- procedure Post (Men : Menu; -- Post : Boolean := True); -+ procedure Post (Men : Menu; -+ Post : Boolean := True); - -- AKA: post_menu() - -- AKA: unpost_menu() -- pragma Inline (Post); -+ pragma Inline (Post); - - -- |===================================================================== - -- | Man page menu_opts.3x - -- |===================================================================== - - -- #1A NAME="AFU_19"#2| -- procedure Set_Options (Men : Menu; -- Options : Menu_Option_Set); -+ procedure Set_Options (Men : Menu; -+ Options : Menu_Option_Set); - -- AKA: set_menu_opts() - pragma Inline (Set_Options); - - -- #1A NAME="AFU_20"#2| -- procedure Switch_Options (Men : Menu; -- Options : Menu_Option_Set; -- On : Boolean := True); -+ procedure Switch_Options (Men : Menu; -+ Options : Menu_Option_Set; -+ On : Boolean := True); - -- AKA: menu_opts_on() - -- AKA: menu_opts_off() - pragma Inline (Switch_Options); - - -- #1A NAME="AFU_21"#2| -- procedure Get_Options (Men : Menu; -- Options : out Menu_Option_Set); -+ procedure Get_Options (Men : Menu; -+ Options : out Menu_Option_Set); - -- AKA: menu_opts() - - -- #1A NAME="AFU_22"#2| -- function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set; -+ function Get_Options (Men : Menu := Null_Menu) return Menu_Option_Set; - -- AKA: menu_opts() - pragma Inline (Get_Options); - -@@ -363,59 +367,59 @@ - -- |===================================================================== - - -- #1A NAME="AFU_23"#2| -- procedure Set_Window (Men : Menu; -- Win : Window); -+ procedure Set_Window (Men : Menu; -+ Win : Window); - -- AKA: set_menu_win() -- pragma Inline (Set_Window); -+ pragma Inline (Set_Window); - - -- #1A NAME="AFU_24"#2| -- function Get_Window (Men : Menu) return Window; -+ function Get_Window (Men : Menu) return Window; - -- AKA: menu_win() -- pragma Inline (Get_Window); -+ pragma Inline (Get_Window); - - -- #1A NAME="AFU_25"#2| -- procedure Set_Sub_Window (Men : Menu; -- Win : Window); -+ procedure Set_Sub_Window (Men : Menu; -+ Win : Window); - -- AKA: set_menu_sub() -- pragma Inline (Set_Sub_Window); -+ pragma Inline (Set_Sub_Window); - - -- #1A NAME="AFU_26"#2| -- function Get_Sub_Window (Men : Menu) return Window; -+ function Get_Sub_Window (Men : Menu) return Window; - -- AKA: menu_sub() -- pragma Inline (Get_Sub_Window); -+ pragma Inline (Get_Sub_Window); - - -- #1A NAME="AFU_27"#2| -- procedure Scale (Men : Menu; -- Lines : out Line_Count; -- Columns : out Column_Count); -+ procedure Scale (Men : Menu; -+ Lines : out Line_Count; -+ Columns : out Column_Count); - -- AKA: scale_menu() -- pragma Inline (Scale); -+ pragma Inline (Scale); - - -- |===================================================================== - -- | Man page menu_cursor.3x - -- |===================================================================== - - -- #1A NAME="AFU_28"#2| -- procedure Position_Cursor (Men : Menu); -+ procedure Position_Cursor (Men : Menu); - -- AKA: pos_menu_cursor() -- pragma Inline (Position_Cursor); -+ pragma Inline (Position_Cursor); - - -- |===================================================================== - -- | Man page menu_mark.3x - -- |===================================================================== - - -- #1A NAME="AFU_29"#2| -- procedure Set_Mark (Men : Menu; -- Mark : String); -+ procedure Set_Mark (Men : Menu; -+ Mark : String); - -- AKA: set_menu_mark() -- pragma Inline (Set_Mark); -+ pragma Inline (Set_Mark); - - -- #1A NAME="AFU_30"#2| -- procedure Mark (Men : Menu; -- Mark : out String); -+ procedure Mark (Men : Menu; -+ Mark : out String); - -- AKA: menu_mark() - -- function Mark (Men : Menu) return String; -+ function Mark (Men : Menu) return String; - -- AKA: menu_mark() - -- Implemented as function - pragma Inline (Mark); -@@ -425,123 +429,123 @@ - -- |===================================================================== - - -- #1A NAME="AFU_31"#2| -- procedure Set_Foreground -- (Men : Menu; -- Fore : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Foreground -+ (Men : Menu; -+ Fore : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: set_menu_fore() -- pragma Inline (Set_Foreground); -+ pragma Inline (Set_Foreground); - - -- #1A NAME="AFU_32"#2| -- procedure Foreground (Men : Menu; -- Fore : out Character_Attribute_Set); -+ procedure Foreground (Men : Menu; -+ Fore : out Character_Attribute_Set); - -- AKA: menu_fore() - - -- #1A NAME="AFU_33"#2| -- procedure Foreground (Men : Menu; -- Fore : out Character_Attribute_Set; -- Color : out Color_Pair); -+ procedure Foreground (Men : Menu; -+ Fore : out Character_Attribute_Set; -+ Color : out Color_Pair); - -- AKA: menu_fore() - pragma Inline (Foreground); - - -- #1A NAME="AFU_34"#2| -- procedure Set_Background -- (Men : Menu; -- Back : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Background -+ (Men : Menu; -+ Back : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: set_menu_back() - pragma Inline (Set_Background); - - -- #1A NAME="AFU_35"#2| -- procedure Background (Men : Menu; -- Back : out Character_Attribute_Set); -+ procedure Background (Men : Menu; -+ Back : out Character_Attribute_Set); - -- AKA: menu_back() - -- #1A NAME="AFU_36"#2| - -- procedure Background (Men : Menu; -- Back : out Character_Attribute_Set; -- Color : out Color_Pair); -+ procedure Background (Men : Menu; -+ Back : out Character_Attribute_Set; -+ Color : out Color_Pair); - -- AKA: menu_back() - pragma Inline (Background); - - -- #1A NAME="AFU_37"#2| -- procedure Set_Grey -- (Men : Menu; -- Grey : Character_Attribute_Set := Normal_Video; -- Color : Color_Pair := Color_Pair'First); -+ procedure Set_Grey -+ (Men : Menu; -+ Grey : Character_Attribute_Set := Normal_Video; -+ Color : Color_Pair := Color_Pair'First); - -- AKA: set_menu_grey() -- pragma Inline (Set_Grey); -+ pragma Inline (Set_Grey); - - -- #1A NAME="AFU_38"#2| -- procedure Grey (Men : Menu; -- Grey : out Character_Attribute_Set); -+ procedure Grey (Men : Menu; -+ Grey : out Character_Attribute_Set); - -- AKA: menu_grey() - - -- #1A NAME="AFU_39"#2| -- procedure Grey -- (Men : Menu; -- Grey : out Character_Attribute_Set; -- Color : out Color_Pair); -+ procedure Grey -+ (Men : Menu; -+ Grey : out Character_Attribute_Set; -+ Color : out Color_Pair); - -- AKA: menu_grey() - pragma Inline (Grey); - - -- #1A NAME="AFU_40"#2| -- procedure Set_Pad_Character (Men : Menu; -- Pad : Character := Space); -+ procedure Set_Pad_Character (Men : Menu; -+ Pad : Character := Space); - -- AKA: set_menu_pad() -- pragma Inline (Set_Pad_Character); -+ pragma Inline (Set_Pad_Character); - - -- #1A NAME="AFU_41"#2| -- procedure Pad_Character (Men : Menu; -- Pad : out Character); -+ procedure Pad_Character (Men : Menu; -+ Pad : out Character); - -- AKA: menu_pad() -- pragma Inline (Pad_Character); -+ pragma Inline (Pad_Character); - - -- |===================================================================== - -- | Man page menu_spacing.3x - -- |===================================================================== - - -- #1A NAME="AFU_42"#2| -- procedure Set_Spacing (Men : Menu; -- Descr : Column_Position := 0; -- Row : Line_Position := 0; -- Col : Column_Position := 0); -+ procedure Set_Spacing (Men : Menu; -+ Descr : Column_Position := 0; -+ Row : Line_Position := 0; -+ Col : Column_Position := 0); - -- AKA: set_menu_spacing() -- pragma Inline (Set_Spacing); -+ pragma Inline (Set_Spacing); - - -- #1A NAME="AFU_43"#2| -- procedure Spacing (Men : Menu; -- Descr : out Column_Position; -- Row : out Line_Position; -- Col : out Column_Position); -+ procedure Spacing (Men : Menu; -+ Descr : out Column_Position; -+ Row : out Line_Position; -+ Col : out Column_Position); - -- AKA: menu_spacing() -- pragma Inline (Spacing); -+ pragma Inline (Spacing); - - -- |===================================================================== - -- | Man page menu_pattern.3x - -- |===================================================================== - - -- #1A NAME="AFU_44"#2| -- function Set_Pattern (Men : Menu; -- Text : String) return Boolean; -+ function Set_Pattern (Men : Menu; -+ Text : String) return Boolean; - -- AKA: set_menu_pattern() - -- Return TRUE if the pattern matches, FALSE otherwise -- pragma Inline (Set_Pattern); -+ pragma Inline (Set_Pattern); - - -- #1A NAME="AFU_45"#2| -- procedure Pattern (Men : Menu; -- Text : out String); -+ procedure Pattern (Men : Menu; -+ Text : out String); - -- AKA: menu_pattern() -- pragma Inline (Pattern); -+ pragma Inline (Pattern); - - -- |===================================================================== - -- | Man page menu_format.3x - -- |===================================================================== - - -- #1A NAME="AFU_46"#2| -- procedure Set_Format (Men : Menu; -- Lines : Line_Count; -- Columns : Column_Count); -+ procedure Set_Format (Men : Menu; -+ Lines : Line_Count; -+ Columns : Column_Count); - -- Not implemented: 0 argument for Lines or Columns; - -- instead use Format to get the current sizes - -- The default format is 16 rows, 1 column. Calling -@@ -550,104 +554,104 @@ - -- is interpreted as a request not to change the current - -- value. - -- AKA: set_menu_format() -- pragma Inline (Set_Format); -+ pragma Inline (Set_Format); - - -- #1A NAME="AFU_47"#2| -- procedure Format (Men : Menu; -- Lines : out Line_Count; -- Columns : out Column_Count); -+ procedure Format (Men : Menu; -+ Lines : out Line_Count; -+ Columns : out Column_Count); - -- AKA: menu_format() -- pragma Inline (Format); -+ pragma Inline (Format); - - -- |===================================================================== - -- | Man page menu_hook.3x - -- |===================================================================== - -- type Menu_Hook_Function is access procedure (Men : Menu); -- pragma Convention (C, Menu_Hook_Function); -+ type Menu_Hook_Function is access procedure (Men : Menu); -+ pragma Convention (C, Menu_Hook_Function); - - -- #1A NAME="AFU_48"#2| -- procedure Set_Item_Init_Hook (Men : Menu; -- Proc : Menu_Hook_Function); -+ procedure Set_Item_Init_Hook (Men : Menu; -+ Proc : Menu_Hook_Function); - -- AKA: set_item_init() -- pragma Inline (Set_Item_Init_Hook); -+ pragma Inline (Set_Item_Init_Hook); - - -- #1A NAME="AFU_49"#2| -- procedure Set_Item_Term_Hook (Men : Menu; -- Proc : Menu_Hook_Function); -+ procedure Set_Item_Term_Hook (Men : Menu; -+ Proc : Menu_Hook_Function); - -- AKA: set_item_term() -- pragma Inline (Set_Item_Term_Hook); -+ pragma Inline (Set_Item_Term_Hook); - - -- #1A NAME="AFU_50"#2| -- procedure Set_Menu_Init_Hook (Men : Menu; -- Proc : Menu_Hook_Function); -+ procedure Set_Menu_Init_Hook (Men : Menu; -+ Proc : Menu_Hook_Function); - -- AKA: set_menu_init() -- pragma Inline (Set_Menu_Init_Hook); -+ pragma Inline (Set_Menu_Init_Hook); - - -- #1A NAME="AFU_51"#2| -- procedure Set_Menu_Term_Hook (Men : Menu; -- Proc : Menu_Hook_Function); -+ procedure Set_Menu_Term_Hook (Men : Menu; -+ Proc : Menu_Hook_Function); - -- AKA: set_menu_term() -- pragma Inline (Set_Menu_Term_Hook); -+ pragma Inline (Set_Menu_Term_Hook); - - -- #1A NAME="AFU_52"#2| -- function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function; -+ function Get_Item_Init_Hook (Men : Menu) return Menu_Hook_Function; - -- AKA: item_init() -- pragma Inline (Get_Item_Init_Hook); -+ pragma Inline (Get_Item_Init_Hook); - - -- #1A NAME="AFU_53"#2| -- function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function; -+ function Get_Item_Term_Hook (Men : Menu) return Menu_Hook_Function; - -- AKA: item_term() -- pragma Inline (Get_Item_Term_Hook); -+ pragma Inline (Get_Item_Term_Hook); - - -- #1A NAME="AFU_54"#2| -- function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function; -+ function Get_Menu_Init_Hook (Men : Menu) return Menu_Hook_Function; - -- AKA: menu_init() -- pragma Inline (Get_Menu_Init_Hook); -+ pragma Inline (Get_Menu_Init_Hook); - - -- #1A NAME="AFU_55"#2| -- function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function; -+ function Get_Menu_Term_Hook (Men : Menu) return Menu_Hook_Function; - -- AKA: menu_term() -- pragma Inline (Get_Menu_Term_Hook); -+ pragma Inline (Get_Menu_Term_Hook); - - -- |===================================================================== - -- | Man page menu_items.3x - -- |===================================================================== - - -- #1A NAME="AFU_56"#2| -- procedure Redefine (Men : Menu; -- Items : Item_Array_Access); -+ procedure Redefine (Men : Menu; -+ Items : Item_Array_Access); - -- AKA: set_menu_items() -- pragma Inline (Redefine); -+ pragma Inline (Redefine); - -- procedure Set_Items (Men : Menu; -- Items : Item_Array_Access) renames Redefine; -+ procedure Set_Items (Men : Menu; -+ Items : Item_Array_Access) renames Redefine; - -- pragma Inline (Set_Items); - - -- #1A NAME="AFU_57"#2| -- function Items (Men : Menu; -- Index : Positive) return Item; -+ function Items (Men : Menu; -+ Index : Positive) return Item; - -- AKA: menu_items() -- pragma Inline (Items); -+ pragma Inline (Items); - - -- #1A NAME="AFU_58"#2| -- function Item_Count (Men : Menu) return Natural; -+ function Item_Count (Men : Menu) return Natural; - -- AKA: item_count() -- pragma Inline (Item_Count); -+ pragma Inline (Item_Count); - - -- |===================================================================== - -- | Man page menu_new.3x - -- |===================================================================== - - -- #1A NAME="AFU_59"#2| -- function Create (Items : Item_Array_Access) return Menu; -+ function Create (Items : Item_Array_Access) return Menu; - -- AKA: new_menu() - -- Not inlined - -- function New_Menu (Items : Item_Array_Access) return Menu renames Create; -+ function New_Menu (Items : Item_Array_Access) return Menu renames Create; - - -- #1A NAME="AFU_60"#2| -- procedure Delete (Men : in out Menu); -+ procedure Delete (Men : in out Menu); - -- AKA: free_menu() - -- Reset Men to Null_Menu - -- Not inlined -@@ -656,14 +660,14 @@ - -- | Man page menu_driver.3x - -- |===================================================================== - -- type Driver_Result is (Menu_Ok, -- Request_Denied, -- Unknown_Request, -- No_Match); -+ type Driver_Result is (Menu_Ok, -+ Request_Denied, -+ Unknown_Request, -+ No_Match); - - -- #1A NAME="AFU_61"#2| -- function Driver (Men : Menu; -- Key : Key_Code) return Driver_Result; -+ function Driver (Men : Menu; -+ Key : Key_Code) return Driver_Result; - -- AKA: menu_driver() - -- Driver is not inlined - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-mouse__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-mouse__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-mouse__adb.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-mouse__adb.htm 2011-03-20 00:18:40.000000000 +0100 -@@ -52,109 +52,109 @@ - - use type System.Bit_Order; - -- function Has_Mouse return Boolean -+ function Has_Mouse return Boolean - is - function Mouse_Avail return C_Int; - pragma Import (C, Mouse_Avail, "has_mouse"); - begin -- if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then -+ if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then - return True; - else - return False; - end if; -- end Has_Mouse; -+ end Has_Mouse; - -- function Get_Mouse return Mouse_Event -+ function Get_Mouse return Mouse_Event - is -- type Event_Access is access all Mouse_Event; -+ type Event_Access is access all Mouse_Event; - - function Getmouse (Ev : Event_Access) return C_Int; - pragma Import (C, Getmouse, "getmouse"); - -- Event : aliased Mouse_Event; -+ Event : aliased Mouse_Event; - begin - if Getmouse (Event'Access) = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - return Event; -- end Get_Mouse; -+ end Get_Mouse; - -- procedure Register_Reportable_Event (Button : Mouse_Button; -- State : Button_State; -- Mask : in out Event_Mask) -+ procedure Register_Reportable_Event (Button : Mouse_Button; -+ State : Button_State; -+ Mask : in out Event_Mask) - is -- Button_Nr : constant Natural := Mouse_Button'Pos (Button); -- State_Nr : constant Natural := Button_State'Pos (State); -+ Button_Nr : constant Natural := Mouse_Button'Pos (Button); -+ State_Nr : constant Natural := Button_State'Pos (State); - begin -- if Button in Modifier_Keys and then State /= Pressed then -- raise Curses_Exception; -+ if Button in Modifier_Keys and then State /= Pressed then -+ raise Curses_Exception; - else -- if Button in Real_Buttons then -- Mask := Mask or ((2 ** (6 * Button_Nr)) ** State_Nr); -+ if Button in Real_Buttons then -+ Mask := Mask or ((2 ** (6 * Button_Nr)) ** State_Nr); - else -- Mask := Mask or (BUTTON_CTRL ** (Button_Nr - 4)); -+ Mask := Mask or (BUTTON_CTRL ** (Button_Nr - 4)); - end if; - end if; -- end Register_Reportable_Event; -+ end Register_Reportable_Event; - -- procedure Register_Reportable_Events (Button : Mouse_Button; -- State : Button_States; -- Mask : in out Event_Mask) -+ procedure Register_Reportable_Events (Button : Mouse_Button; -+ State : Button_States; -+ Mask : in out Event_Mask) - is - begin - for S in Button_States'Range loop -- if State (S) then -- Register_Reportable_Event (Button, S, Mask); -+ if State (S) then -+ Register_Reportable_Event (Button, S, Mask); - end if; - end loop; -- end Register_Reportable_Events; -+ end Register_Reportable_Events; - -- function Start_Mouse (Mask : Event_Mask := All_Events) -- return Event_Mask -+ function Start_Mouse (Mask : Event_Mask := All_Events) -+ return Event_Mask - is -- function MMask (M : Event_Mask; -- O : access Event_Mask) return Event_Mask; -+ function MMask (M : Event_Mask; -+ O : access Event_Mask) return Event_Mask; - pragma Import (C, MMask, "mousemask"); -- R : Event_Mask; -- Old : aliased Event_Mask; -+ R : Event_Mask; -+ Old : aliased Event_Mask; - begin -- R := MMask (Mask, Old'Access); -- if R = No_Events then -- Beep; -+ R := MMask (Mask, Old'Access); -+ if R = No_Events then -+ Beep; - end if; - return Old; -- end Start_Mouse; -+ end Start_Mouse; - -- procedure End_Mouse (Mask : Event_Mask := No_Events) -+ procedure End_Mouse (Mask : Event_Mask := No_Events) - is - begin -- if Mask /= No_Events then -- Beep; -+ if Mask /= No_Events then -+ Beep; - end if; -- end End_Mouse; -- -- procedure Dispatch_Event (Mask : Event_Mask; -- Button : out Mouse_Button; -- State : out Button_State); -- -- procedure Dispatch_Event (Mask : Event_Mask; -- Button : out Mouse_Button; -- State : out Button_State) is -- L : Event_Mask; -- begin -- Button := Alt; -- preset to non real button; -- if (Mask and BUTTON1_EVENTS) /= 0 then -- Button := Left; -- elsif (Mask and BUTTON2_EVENTS) /= 0 then -- Button := Middle; -- elsif (Mask and BUTTON3_EVENTS) /= 0 then -- Button := Right; -- elsif (Mask and BUTTON4_EVENTS) /= 0 then -- Button := Button4; -- end if; -- if Button in Real_Buttons then -- L := 2 ** (6 * Mouse_Button'Pos (Button)); -- for I in Button_State'Range loop -+ end End_Mouse; -+ -+ procedure Dispatch_Event (Mask : Event_Mask; -+ Button : out Mouse_Button; -+ State : out Button_State); -+ -+ procedure Dispatch_Event (Mask : Event_Mask; -+ Button : out Mouse_Button; -+ State : out Button_State) is -+ L : Event_Mask; -+ begin -+ Button := Alt; -- preset to non real button; -+ if (Mask and BUTTON1_EVENTS) /= 0 then -+ Button := Left; -+ elsif (Mask and BUTTON2_EVENTS) /= 0 then -+ Button := Middle; -+ elsif (Mask and BUTTON3_EVENTS) /= 0 then -+ Button := Right; -+ elsif (Mask and BUTTON4_EVENTS) /= 0 then -+ Button := Button4; -+ end if; -+ if Button in Real_Buttons then -+ L := 2 ** (6 * Mouse_Button'Pos (Button)); -+ for I in Button_State'Range loop - if (Mask and L) /= 0 then - State := I; - exit; -@@ -162,62 +162,62 @@ - L := 2 * L; - end loop; - else -- State := Pressed; -- if (Mask and BUTTON_CTRL) /= 0 then -- Button := Control; -- elsif (Mask and BUTTON_SHIFT) /= 0 then -- Button := Shift; -- elsif (Mask and BUTTON_ALT) /= 0 then -- Button := Alt; -+ State := Pressed; -+ if (Mask and BUTTON_CTRL) /= 0 then -+ Button := Control; -+ elsif (Mask and BUTTON_SHIFT) /= 0 then -+ Button := Shift; -+ elsif (Mask and BUTTON_ALT) /= 0 then -+ Button := Alt; - end if; - end if; - end Dispatch_Event; - -- procedure Get_Event (Event : Mouse_Event; -- Y : out Line_Position; -- X : out Column_Position; -- Button : out Mouse_Button; -- State : out Button_State) -- is -- Mask : constant Event_Mask := Event.Bstate; -- begin -- X := Column_Position (Event.X); -- Y := Line_Position (Event.Y); -- Dispatch_Event (Mask, Button, State); -- end Get_Event; -+ procedure Get_Event (Event : Mouse_Event; -+ Y : out Line_Position; -+ X : out Column_Position; -+ Button : out Mouse_Button; -+ State : out Button_State) -+ is -+ Mask : constant Event_Mask := Event.Bstate; -+ begin -+ X := Column_Position (Event.X); -+ Y := Line_Position (Event.Y); -+ Dispatch_Event (Mask, Button, State); -+ end Get_Event; - -- procedure Unget_Mouse (Event : Mouse_Event) -+ procedure Unget_Mouse (Event : Mouse_Event) - is -- function Ungetmouse (Ev : Mouse_Event) return C_Int; -+ function Ungetmouse (Ev : Mouse_Event) return C_Int; - pragma Import (C, Ungetmouse, "ungetmouse"); - begin -- if Ungetmouse (Event) = Curses_Err then -- raise Curses_Exception; -+ if Ungetmouse (Event) = Curses_Err then -+ raise Curses_Exception; - end if; -- end Unget_Mouse; -+ end Unget_Mouse; - -- function Enclosed_In_Window (Win : Window := Standard_Window; -- Event : Mouse_Event) return Boolean -+ function Enclosed_In_Window (Win : Window := Standard_Window; -+ Event : Mouse_Event) return Boolean - is - function Wenclose (Win : Window; Y : C_Int; X : C_Int) - return Curses_Bool; - pragma Import (C, Wenclose, "wenclose"); - begin -- if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) -+ if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) - = Curses_Bool_False then - return False; - else - return True; - end if; -- end Enclosed_In_Window; -+ end Enclosed_In_Window; - -- function Mouse_Interval (Msec : Natural := 200) return Natural -+ function Mouse_Interval (Msec : Natural := 200) return Natural - is - function Mouseinterval (Msec : C_Int) return C_Int; - pragma Import (C, Mouseinterval, "mouseinterval"); - begin -- return Natural (Mouseinterval (C_Int (Msec))); -- end Mouse_Interval; -+ return Natural (Mouseinterval (C_Int (Msec))); -+ end Mouse_Interval; - - end Terminal_Interface.Curses.Mouse; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-mouse__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-mouse__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-mouse__ads.htm 2011-02-26 00:43:49.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-mouse__ads.htm 2011-03-20 00:18:40.000000000 +0100 -@@ -12,7 +12,7 @@ - -- S P E C -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.28 @ ---- @Date: 2009/12/26 17:38:58 @ -+-- @Revision: 1.29 @ -+-- @Date: 2011/03/19 12:35:58 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - -- mouse binding. -@@ -56,68 +56,64 @@ - -- |===================================================================== - -- | Man page curs_mouse.3x - -- |===================================================================== -- -- Please note, that in ncurses-1.9.9e documentation mouse support -- -- is still marked as experimental. So also this binding will change -- -- if the ncurses methods change. -- -- - -- mouse_trafo, wmouse_trafo are implemented as Transform_Coordinates - -- in the parent package. - -- - -- Not implemented: - -- REPORT_MOUSE_POSITION (i.e. as a parameter to Register_Reportable_Event - -- or Start_Mouse) -- type Event_Mask is private; -- No_Events : constant Event_Mask; -- All_Events : constant Event_Mask; -- -- type Mouse_Button is (Left, -- aka: Button 1 -- Middle, -- aka: Button 2 -- Right, -- aka: Button 3 -- Button4, -- aka: Button 4 -- Control, -- Control Key -- Shift, -- Shift Key -- Alt); -- ALT Key -- -- subtype Real_Buttons is Mouse_Button range Left .. Button4; -- subtype Modifier_Keys is Mouse_Button range Control .. Alt; -- -- type Button_State is (Released, -- Pressed, -- Clicked, -- Double_Clicked, -- Triple_Clicked); -+ type Event_Mask is private; -+ No_Events : constant Event_Mask; -+ All_Events : constant Event_Mask; -+ -+ type Mouse_Button is (Left, -- aka: Button 1 -+ Middle, -- aka: Button 2 -+ Right, -- aka: Button 3 -+ Button4, -- aka: Button 4 -+ Control, -- Control Key -+ Shift, -- Shift Key -+ Alt); -- ALT Key -+ -+ subtype Real_Buttons is Mouse_Button range Left .. Button4; -+ subtype Modifier_Keys is Mouse_Button range Control .. Alt; -+ -+ type Button_State is (Released, -+ Pressed, -+ Clicked, -+ Double_Clicked, -+ Triple_Clicked); - -- type Button_States is array (Button_State) of Boolean; -+ type Button_States is array (Button_State) of Boolean; - pragma Pack (Button_States); - -- All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True, -+ All_Clicks : constant Button_States := (Clicked .. Triple_Clicked => True, - others => False); -- All_States : constant Button_States := (others => True); -+ All_States : constant Button_States := (others => True); - -- type Mouse_Event is private; -+ type Mouse_Event is private; - - -- |===================================================================== - -- | Man page curs_mouse.3x - -- |===================================================================== - -- function Has_Mouse return Boolean; -+ function Has_Mouse return Boolean; - -- Return true if a mouse device is supported, false otherwise. - -- procedure Register_Reportable_Event -- (Button : Mouse_Button; -- State : Button_State; -- Mask : in out Event_Mask); -+ procedure Register_Reportable_Event -+ (Button : Mouse_Button; -+ State : Button_State; -+ Mask : in out Event_Mask); - -- 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 -+ -- Before you call this the first time, you should initialize the mask - -- with the Empty_Mask constant -- pragma Inline (Register_Reportable_Event); -+ pragma Inline (Register_Reportable_Event); - -- procedure Register_Reportable_Events -- (Button : Mouse_Button; -- State : Button_States; -- Mask : in out Event_Mask); -+ procedure Register_Reportable_Events -+ (Button : Mouse_Button; -+ State : Button_States; -+ Mask : in out Event_Mask); - -- Register all events described by the Button and the State bitmap. -- -- Before you call this the first time, you should init the mask -+ -- Before you call this the first time, you should initialize the mask - -- with the Empty_Mask constant - - -- #1A NAME="AFU_1"#2| -@@ -125,111 +121,111 @@ - -- old mask, that means the event mask value before this call. - -- Not Implemented: The library version - -- returns a Mouse_Mask that tells which events are reported. -- function Start_Mouse (Mask : Event_Mask := All_Events) -- return Event_Mask; -+ function Start_Mouse (Mask : Event_Mask := All_Events) -+ return Event_Mask; - -- AKA: mousemask() -- pragma Inline (Start_Mouse); -+ pragma Inline (Start_Mouse); - -- procedure End_Mouse (Mask : Event_Mask := No_Events); -+ procedure End_Mouse (Mask : Event_Mask := No_Events); - -- Terminates the mouse, restores the specified event mask -- pragma Inline (End_Mouse); -+ pragma Inline (End_Mouse); - - -- #1A NAME="AFU_2"#2| -- function Get_Mouse return Mouse_Event; -+ function Get_Mouse return Mouse_Event; - -- AKA: getmouse() -- pragma Inline (Get_Mouse); -+ pragma Inline (Get_Mouse); - -- procedure Get_Event (Event : Mouse_Event; -- Y : out Line_Position; -- X : out Column_Position; -- Button : out Mouse_Button; -- State : out Button_State); -+ procedure Get_Event (Event : Mouse_Event; -+ Y : out Line_Position; -+ X : out Column_Position; -+ Button : out Mouse_Button; -+ State : out Button_State); - -- !!! Warning: X and Y are screen coordinates. Due to ripped of lines they - -- may not be identical to window coordinates. - -- Not Implemented: Get_Event only reports one event, the C library - -- version supports multiple events, e.g. {click-1, click-3} -- pragma Inline (Get_Event); -+ pragma Inline (Get_Event); - - -- #1A NAME="AFU_3"#2| -- procedure Unget_Mouse (Event : Mouse_Event); -+ procedure Unget_Mouse (Event : Mouse_Event); - -- AKA: ungetmouse() -- pragma Inline (Unget_Mouse); -+ pragma Inline (Unget_Mouse); - - -- #1A NAME="AFU_4"#2| -- function Enclosed_In_Window (Win : Window := Standard_Window; -- Event : Mouse_Event) return Boolean; -+ function Enclosed_In_Window (Win : Window := Standard_Window; -+ Event : Mouse_Event) return Boolean; - -- AKA: wenclose() - -- But : use event instead of screen coordinates. -- pragma Inline (Enclosed_In_Window); -+ pragma Inline (Enclosed_In_Window); - - -- #1A NAME="AFU_5"#2| -- function Mouse_Interval (Msec : Natural := 200) return Natural; -+ function Mouse_Interval (Msec : Natural := 200) return Natural; - -- AKA: mouseinterval() -- pragma Inline (Mouse_Interval); -+ pragma Inline (Mouse_Interval); - - private -- type Event_Mask is new Interfaces.C.unsigned_long; -+ type Event_Mask is new Interfaces.C.unsigned_long; - -- type Mouse_Event is -+ type Mouse_Event is - record -- Id : Integer range Integer (Interfaces.C.short'First) .. -+ Id : Integer range Integer (Interfaces.C.short'First) .. - Integer (Interfaces.C.short'Last); -- X, Y, Z : Integer range Integer (Interfaces.C.int'First) .. -+ X, Y, Z : Integer range Integer (Interfaces.C.int'First) .. - Integer (Interfaces.C.int'Last); -- Bstate : Event_Mask; -+ Bstate : Event_Mask; - end record; -- pragma Convention (C, Mouse_Event); -+ pragma Convention (C, Mouse_Event); - -- for Mouse_Event use -+ for Mouse_Event use - record -- Id at 0 range 0 .. 15; -- X at 0 range 32 .. 63; -- Y at 0 range 64 .. 95; -- Z at 0 range 96 .. 127; -- Bstate at 0 range 128 .. 159; -+ Id at 0 range 0 .. 15; -+ X at 0 range 32 .. 63; -+ Y at 0 range 64 .. 95; -+ Z at 0 range 96 .. 127; -+ Bstate at 0 range 128 .. 159; - end record; - -- Please note: this rep. clause is generated and may be - -- different on your system. - -- Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First; -+ Generation_Bit_Order : constant System.Bit_Order := System.Low_Order_First; - -- This constant may be different on your system. - -- BUTTON1_RELEASED : constant Event_Mask := 8#00000000001#; -- BUTTON1_PRESSED : constant Event_Mask := 8#00000000002#; -- BUTTON1_CLICKED : constant Event_Mask := 8#00000000004#; -- BUTTON1_DOUBLE_CLICKED : constant Event_Mask := 8#00000000010#; -- BUTTON1_TRIPLE_CLICKED : constant Event_Mask := 8#00000000020#; -- BUTTON1_RESERVED_EVENT : constant Event_Mask := 8#00000000040#; -- BUTTON2_RELEASED : constant Event_Mask := 8#00000000100#; -- BUTTON2_PRESSED : constant Event_Mask := 8#00000000200#; -- BUTTON2_CLICKED : constant Event_Mask := 8#00000000400#; -- BUTTON2_DOUBLE_CLICKED : constant Event_Mask := 8#00000001000#; -- BUTTON2_TRIPLE_CLICKED : constant Event_Mask := 8#00000002000#; -- BUTTON2_RESERVED_EVENT : constant Event_Mask := 8#00000004000#; -- BUTTON3_RELEASED : constant Event_Mask := 8#00000010000#; -- BUTTON3_PRESSED : constant Event_Mask := 8#00000020000#; -- BUTTON3_CLICKED : constant Event_Mask := 8#00000040000#; -- BUTTON3_DOUBLE_CLICKED : constant Event_Mask := 8#00000100000#; -- BUTTON3_TRIPLE_CLICKED : constant Event_Mask := 8#00000200000#; -- BUTTON3_RESERVED_EVENT : constant Event_Mask := 8#00000400000#; -- BUTTON4_RELEASED : constant Event_Mask := 8#00001000000#; -- BUTTON4_PRESSED : constant Event_Mask := 8#00002000000#; -- BUTTON4_CLICKED : constant Event_Mask := 8#00004000000#; -- BUTTON4_DOUBLE_CLICKED : constant Event_Mask := 8#00010000000#; -- BUTTON4_TRIPLE_CLICKED : constant Event_Mask := 8#00020000000#; -- BUTTON4_RESERVED_EVENT : constant Event_Mask := 8#00040000000#; -- BUTTON_CTRL : constant Event_Mask := 8#00100000000#; -- BUTTON_SHIFT : constant Event_Mask := 8#00200000000#; -- BUTTON_ALT : constant Event_Mask := 8#00400000000#; -- REPORT_MOUSE_POSITION : constant Event_Mask := 8#01000000000#; -- ALL_MOUSE_EVENTS : constant Event_Mask := 8#00777777777#; -- BUTTON1_EVENTS : constant Event_Mask := 8#00000000077#; -- BUTTON2_EVENTS : constant Event_Mask := 8#00000007700#; -- BUTTON3_EVENTS : constant Event_Mask := 8#00000770000#; -- BUTTON4_EVENTS : constant Event_Mask := 8#00077000000#; -+ BUTTON1_RELEASED : constant Event_Mask := 8#00000000001#; -+ BUTTON1_PRESSED : constant Event_Mask := 8#00000000002#; -+ BUTTON1_CLICKED : constant Event_Mask := 8#00000000004#; -+ BUTTON1_DOUBLE_CLICKED : constant Event_Mask := 8#00000000010#; -+ BUTTON1_TRIPLE_CLICKED : constant Event_Mask := 8#00000000020#; -+ BUTTON1_RESERVED_EVENT : constant Event_Mask := 8#00000000040#; -+ BUTTON2_RELEASED : constant Event_Mask := 8#00000000100#; -+ BUTTON2_PRESSED : constant Event_Mask := 8#00000000200#; -+ BUTTON2_CLICKED : constant Event_Mask := 8#00000000400#; -+ BUTTON2_DOUBLE_CLICKED : constant Event_Mask := 8#00000001000#; -+ BUTTON2_TRIPLE_CLICKED : constant Event_Mask := 8#00000002000#; -+ BUTTON2_RESERVED_EVENT : constant Event_Mask := 8#00000004000#; -+ BUTTON3_RELEASED : constant Event_Mask := 8#00000010000#; -+ BUTTON3_PRESSED : constant Event_Mask := 8#00000020000#; -+ BUTTON3_CLICKED : constant Event_Mask := 8#00000040000#; -+ BUTTON3_DOUBLE_CLICKED : constant Event_Mask := 8#00000100000#; -+ BUTTON3_TRIPLE_CLICKED : constant Event_Mask := 8#00000200000#; -+ BUTTON3_RESERVED_EVENT : constant Event_Mask := 8#00000400000#; -+ BUTTON4_RELEASED : constant Event_Mask := 8#00001000000#; -+ BUTTON4_PRESSED : constant Event_Mask := 8#00002000000#; -+ BUTTON4_CLICKED : constant Event_Mask := 8#00004000000#; -+ BUTTON4_DOUBLE_CLICKED : constant Event_Mask := 8#00010000000#; -+ BUTTON4_TRIPLE_CLICKED : constant Event_Mask := 8#00020000000#; -+ BUTTON4_RESERVED_EVENT : constant Event_Mask := 8#00040000000#; -+ BUTTON_CTRL : constant Event_Mask := 8#00100000000#; -+ BUTTON_SHIFT : constant Event_Mask := 8#00200000000#; -+ BUTTON_ALT : constant Event_Mask := 8#00400000000#; -+ REPORT_MOUSE_POSITION : constant Event_Mask := 8#01000000000#; -+ ALL_MOUSE_EVENTS : constant Event_Mask := 8#00777777777#; -+ BUTTON1_EVENTS : constant Event_Mask := 8#00000000077#; -+ BUTTON2_EVENTS : constant Event_Mask := 8#00000007700#; -+ BUTTON3_EVENTS : constant Event_Mask := 8#00000770000#; -+ BUTTON4_EVENTS : constant Event_Mask := 8#00077000000#; - -- No_Events : constant Event_Mask := 0; -- All_Events : constant Event_Mask := ALL_MOUSE_EVENTS; -+ No_Events : constant Event_Mask := 0; -+ All_Events : constant Event_Mask := ALL_MOUSE_EVENTS; - - end Terminal_Interface.Curses.Mouse; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-putwin__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-putwin__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-putwin__adb.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-putwin__adb.htm 2011-03-20 00:18:41.000000000 +0100 -@@ -61,7 +61,7 @@ - R : constant C_Int := putwin (Win, ACS.C_Stream (File)); - begin - if R /= Curses_Ok then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - end Put_Window; - -@@ -73,7 +73,7 @@ - W : constant Window := getwin (ACS.C_Stream (File)); - begin - if W = Null_Window then -- raise Curses_Exception; -+ raise Curses_Exception; - else - return W; - end if; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-termcap__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-termcap__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-termcap__adb.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-termcap__adb.htm 2011-03-20 00:18:41.000000000 +0100 -@@ -64,7 +64,7 @@ - To_C (Name, NameTxt, Length); - result := tgetent (char_array (ignored), NameTxt); - if result = -1 then -- raise Curses_Exception; -+ raise Curses_Exception; - else - return Boolean'Val (result); - end if; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-terminfo__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-terminfo__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-terminfo__adb.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-terminfo__adb.htm 2011-03-20 00:18:41.000000000 +0100 -@@ -100,7 +100,7 @@ - if Txt2 = Null_Ptr then - Result := False; - elsif Is_MinusOne_Pointer (Txt2) then -- raise Curses_Exception; -+ raise Curses_Exception; - else - Value := Terminfo_String (Fill_String (Txt2)); - Result := True; -@@ -121,7 +121,7 @@ - if Txt2 = Null_Ptr then - return False; - elsif Is_MinusOne_Pointer (Txt2) then -- raise Curses_Exception; -+ raise Curses_Exception; - else - return True; - end if; -@@ -159,7 +159,7 @@ - Err := tputs (Txt, C_Int (affcnt), putc); - end if; - if Err = Curses_Err then -- raise Curses_Exception; -+ raise Curses_Exception; - end if; - end Put_String; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-text_io__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-text_io__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-text_io__adb.htm 2010-01-09 21:31:27.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-text_io__adb.htm 2011-03-26 22:54:30.000000000 +0100 -@@ -12,7 +12,7 @@ - -- B O D Y -- - -- -- - ------------------------------------------------------------------------------ ---- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -40,8 +40,8 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.19 @ ---- @Date: 2009/12/26 17:40:46 @ -+-- @Revision: 1.20 @ -+-- @Date: 2011/03/22 23:38:49 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - package body Terminal_Interface.Curses.Text_IO is -@@ -58,7 +58,7 @@ - is - begin - if Default_Window = Null_Window then -- return Standard_Window; -+ return Standard_Window; - else - return Default_Window; - end if; -@@ -68,7 +68,7 @@ - procedure Flush (Win : Window) - is - begin -- Refresh (Win); -+ Refresh (Win); - end Flush; - - procedure Flush -@@ -91,7 +91,7 @@ - N_Lines : Line_Count; - N_Cols : Column_Count; - begin -- Get_Size (Win, N_Lines, N_Cols); -+ Get_Size (Win, N_Lines, N_Cols); - -- if Natural (N_Cols) > Natural (Count'Last) then - -- raise Layout_Error; - -- end if; -@@ -109,10 +109,10 @@ - N_Lines : Line_Count; - N_Cols : Column_Count; - begin -- if Scrolling_Allowed (Win) then -+ if Scrolling_Allowed (Win) then - return 0; - else -- Get_Size (Win, N_Lines, N_Cols); -+ Get_Size (Win, N_Lines, N_Cols); - -- if Natural (N_Lines) > Natural (Count'Last) then - -- raise Layout_Error; - -- end if; -@@ -141,7 +141,7 @@ - if P_Size > 0 and then Line (Win) >= P_Size then - New_Page (Win); - else -- Add (Win, ASCII.LF); -+ Add (Win, ASCII.LF); - end if; - end loop; - end New_Line; -@@ -155,7 +155,7 @@ - procedure New_Page (Win : Window) - is - begin -- Clear (Win); -+ Clear (Win); - end New_Page; - - procedure New_Page -@@ -175,7 +175,7 @@ - raise Constraint_Error; - end if; - -- Get_Cursor_Position (Win, Y, X1); -+ Get_Cursor_Position (Win, Y, X1); - N := Natural (To); N := N - 1; - X2 := Column_Position (N); - if X1 > X2 then -@@ -209,7 +209,8 @@ - raise Constraint_Error; - end if; - -- Get_Cursor_Position (Win, Y1, X); -+ Get_Cursor_Position (Win, Y1, X); -+ pragma Unreferenced (X); - N := Natural (To); N := N - 1; - Y2 := Line_Position (N); - if Y2 < Y1 then -@@ -221,47 +222,47 @@ - end if; - end Set_Line; - -- procedure Set_Line (To : Positive_Count) -+ procedure Set_Line (To : Positive_Count) - is - begin - Set_Line (Get_Window, To); - end Set_Line; - -- function Col (Win : Window) return Positive_Count -+ function Col (Win : Window) return Positive_Count - is -- Y : Line_Position; -- X : Column_Position; -- N : Natural; -+ Y : Line_Position; -+ X : Column_Position; -+ N : Natural; - begin -- Get_Cursor_Position (Win, Y, X); -- N := Natural (X); N := N + 1; -+ Get_Cursor_Position (Win, Y, X); -+ N := Natural (X); N := N + 1; - -- if N > Natural (Count'Last) then - -- raise Layout_Error; - -- end if; -- return Positive_Count (N); -+ return Positive_Count (N); - end Col; - -- function Col return Positive_Count -+ function Col return Positive_Count - is - begin - return Col (Get_Window); - end Col; - -- function Line (Win : Window) return Positive_Count -+ function Line (Win : Window) return Positive_Count - is -- Y : Line_Position; -- X : Column_Position; -- N : Natural; -+ Y : Line_Position; -+ X : Column_Position; -+ N : Natural; - begin -- Get_Cursor_Position (Win, Y, X); -- N := Natural (Y); N := N + 1; -+ Get_Cursor_Position (Win, Y, X); -+ N := Natural (Y); N := N + 1; - -- if N > Natural (Count'Last) then - -- raise Layout_Error; - -- end if; -- return Positive_Count (N); -+ return Positive_Count (N); - end Line; - -- function Line return Positive_Count -+ function Line return Positive_Count - is - begin - return Line (Get_Window); -@@ -271,25 +272,25 @@ - -- Characters Output -- - ----------------------- - -- procedure Put (Win : Window; Item : Character) -+ procedure Put (Win : Window; Item : Character) - is -- P_Size : constant Count := Page_Length (Win); -- Y : Line_Position; -- X : Column_Position; -- L : Line_Count; -- C : Column_Count; -- begin -- if P_Size > 0 then -- Get_Cursor_Position (Win, Y, X); -- Get_Size (Win, L, C); -- if (Y + 1) = L and then (X + 1) = C then -+ P_Size : constant Count := Page_Length (Win); -+ Y : Line_Position; -+ X : Column_Position; -+ L : Line_Count; -+ C : Column_Count; -+ begin -+ if P_Size > 0 then -+ Get_Cursor_Position (Win, Y, X); -+ Get_Size (Win, L, C); -+ if (Y + 1) = L and then (X + 1) = C then - New_Page (Win); - end if; - end if; -- Add (Win, Item); -+ Add (Win, Item); - end Put; - -- procedure Put (Item : Character) -+ procedure Put (Item : Character) - is - begin - Put (Get_Window, Item); -@@ -299,41 +300,41 @@ - -- Strings-Output -- - -------------------- - -- procedure Put (Win : Window; Item : String) -+ procedure Put (Win : Window; Item : String) - is -- P_Size : constant Count := Page_Length (Win); -- Y : Line_Position; -- X : Column_Position; -- L : Line_Count; -- C : Column_Count; -- begin -- if P_Size > 0 then -- Get_Cursor_Position (Win, Y, X); -- Get_Size (Win, L, C); -- if (Y + 1) = L and then (X + 1 + Item'Length) >= C then -+ P_Size : constant Count := Page_Length (Win); -+ Y : Line_Position; -+ X : Column_Position; -+ L : Line_Count; -+ C : Column_Count; -+ begin -+ if P_Size > 0 then -+ Get_Cursor_Position (Win, Y, X); -+ Get_Size (Win, L, C); -+ if (Y + 1) = L and then (X + 1 + Item'Length) >= C then - New_Page (Win); - end if; - end if; -- Add (Win, Item); -+ Add (Win, Item); - end Put; - -- procedure Put (Item : String) -+ procedure Put (Item : String) - is - begin - Put (Get_Window, Item); - end Put; - -- procedure Put_Line -- (Win : Window; -- Item : String) -+ procedure Put_Line -+ (Win : Window; -+ Item : String) - is - begin - Put (Win, Item); - New_Line (Win, 1); - end Put_Line; - -- procedure Put_Line -- (Item : String) -+ procedure Put_Line -+ (Item : String) - is - begin - Put_Line (Get_Window, Item); -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-text_io__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-text_io__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-text_io__ads.htm 2010-01-09 21:31:27.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-text_io__ads.htm 2011-03-26 22:54:30.000000000 +0100 -@@ -98,34 +98,34 @@ - procedure Set_Col (To : Positive_Count); - - procedure Set_Line (Win : Window; To : Positive_Count); -- procedure Set_Line (To : Positive_Count); -+ procedure Set_Line (To : Positive_Count); - -- function Col (Win : Window) return Positive_Count; -- function Col return Positive_Count; -+ function Col (Win : Window) return Positive_Count; -+ function Col return Positive_Count; - -- function Line (Win : Window) return Positive_Count; -- function Line return Positive_Count; -+ function Line (Win : Window) return Positive_Count; -+ function Line return Positive_Count; - - ----------------------- - -- Characters-Output -- - ----------------------- - -- procedure Put (Win : Window; Item : Character); -- procedure Put (Item : Character); -+ procedure Put (Win : Window; Item : Character); -+ procedure Put (Item : Character); - - -------------------- - -- Strings-Output -- - -------------------- - -- procedure Put (Win : Window; Item : String); -- procedure Put (Item : String); -+ procedure Put (Win : Window; Item : String); -+ procedure Put (Item : String); - -- procedure Put_Line -- (Win : Window; -- Item : String); -+ procedure Put_Line -+ (Win : Window; -+ Item : String); - -- procedure Put_Line -- (Item : String); -+ procedure Put_Line -+ (Item : String); - - -- Exceptions - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm 2010-01-09 21:31:27.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm 2011-03-20 00:18:41.000000000 +0100 -@@ -76,7 +76,7 @@ - end if; - - pragma Assert (Len <= W); -- Get_Size (Win, LC, CC); -+ Get_Size (Win, LC, CC); - if Column_Count (Len) > CC then - if Signal then - raise Layout_Error; -@@ -92,7 +92,7 @@ - Put (Win, Filler); - end; - end if; -- Get_Cursor_Position (Win, Y, X); -+ Get_Cursor_Position (Win, Y, X); - if (X + Column_Position (Len)) > CC then - New_Line (Win); - end if; -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-trace__adb.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-trace__adb.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-trace__adb.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-trace__adb.htm 2011-03-20 00:18:42.000000000 +0100 -@@ -40,44 +40,23 @@ - ------------------------------------------------------------------------------ - -- Author: Juergen Pfeifer, 1996 - -- Version Control: ---- @Revision: 1.6 @ -+-- @Revision: 1.7 @ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ --with Interfaces.C; use Interfaces.C; --with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; --with Ada.Unchecked_Conversion; - --package body Terminal_Interface.Curses.Trace is -+package body Terminal_Interface.Curses.Trace is - -- type C_TraceType is new C_UInt; -- -- function TraceAda_To_TraceC is new -- Ada.Unchecked_Conversion (Source => Trace_Attribute_Set, -- Target => C_TraceType); -- -- procedure Trace_On (x : Trace_Attribute_Set) is -- procedure traceC (y : C_TraceType); -- pragma Import (C, traceC, "trace"); -+ procedure Trace_On (x : Trace_Attribute_Set) is -+ pragma Unreferenced (x); - begin -- traceC (TraceAda_To_TraceC (x)); -- end Trace_On; -- -- -- 75. (12) A C function that takes a variable number of arguments can -- -- correspond to several Ada subprograms, taking various specific -- -- numbers and types of parameters. -+ null; -+ end Trace_On; - -- procedure Trace_Put (str : String) is -- procedure tracef (format : char_array; s : char_array); -- pragma Import (C, tracef, "_tracef"); -- Txt : char_array (0 .. str'Length); -- Length : size_t; -- formatstr : constant String := "%s" & ASCII.NUL; -- formattxt : char_array (0 .. formatstr'Length); -+ procedure Trace_Put (str : String) is -+ pragma Unreferenced (str); - begin -- To_C (formatstr, formattxt, Length); -- To_C (str, Txt, Length); -- tracef (formattxt, Txt); -- end Trace_Put; -+ null; -+ end Trace_Put; - - end Terminal_Interface.Curses.Trace; - -diff -Naur ncurses-5.8/doc/html/ada/terminal_interface-curses-trace__ads.htm ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-trace__ads.htm ---- ncurses-5.8/doc/html/ada/terminal_interface-curses-trace__ads.htm 2011-02-26 00:43:50.000000000 +0100 -+++ ncurses-5.8-20110402/doc/html/ada/terminal_interface-curses-trace__ads.htm 2011-03-20 00:18:42.000000000 +0100 -@@ -44,41 +44,45 @@ - -- Binding Version 01.00 - ------------------------------------------------------------------------------ - --package Terminal_Interface.Curses.Trace is -+package Terminal_Interface.Curses.Trace is - pragma Preelaborate (Terminal_Interface.Curses.Trace); - - pragma Warnings (Off); - type Trace_Attribute_Set is - record -- Times : Boolean; -- Tputs : Boolean; -- Update : Boolean; -- Cursor_Move : Boolean; -- Character_Output : Boolean; -- Calls : Boolean; -- Virtual_Puts : Boolean; -- Input_Events : Boolean; -- TTY_State : Boolean; -- Internal_Calls : Boolean; -- Character_Calls : Boolean; -- Termcap_TermInfo : Boolean; -+ Times : Boolean; -+ Tputs : Boolean; -+ Update : Boolean; -+ Cursor_Move : Boolean; -+ Character_Output : Boolean; -+ Calls : Boolean; -+ Virtual_Puts : Boolean; -+ Input_Events : Boolean; -+ TTY_State : Boolean; -+ Internal_Calls : Boolean; -+ Character_Calls : Boolean; -+ Termcap_TermInfo : Boolean; -+ Attributes_And_Colors : Boolean; -+ Unused : Boolean; - end record; - pragma Convention (C, Trace_Attribute_Set); - - for Trace_Attribute_Set use - record -- Times at 0 range 0 .. 0; -- Tputs at 0 range 1 .. 1; -- Update at 0 range 2 .. 2; -- Cursor_Move at 0 range 3 .. 3; -- Character_Output at 0 range 4 .. 4; -- Calls at 0 range 5 .. 5; -- Virtual_Puts at 0 range 6 .. 6; -- Input_Events at 0 range 7 .. 7; -- TTY_State at 0 range 8 .. 8; -- Internal_Calls at 0 range 9 .. 9; -- Character_Calls at 0 range 10 .. 10; -- Termcap_TermInfo at 0 range 11 .. 11; -+ Times at 0 range 0 .. 0; -+ Tputs at 0 range 1 .. 1; -+ Update at 0 range 2 .. 2; -+ Cursor_Move at 0 range 3 .. 3; -+ Character_Output at 0 range 4 .. 4; -+ Calls at 0 range 5 .. 5; -+ Virtual_Puts at 0 range 6 .. 6; -+ Input_Events at 0 range 7 .. 7; -+ TTY_State at 0 range 8 .. 8; -+ Internal_Calls at 0 range 9 .. 9; -+ Character_Calls at 0 range 10 .. 10; -+ Termcap_TermInfo at 0 range 11 .. 11; -+ Attributes_And_Colors at 0 range 12 .. 12; -+ Unused at 0 range 13 .. 31; - end record; - for Trace_Attribute_Set'Size use 32; - -- Please note: this rep. clause is generated and may be -@@ -86,16 +90,16 @@ - - pragma Warnings (On); - -- Trace_Disable : constant Trace_Attribute_Set := (others => False); -+ Trace_Disable : constant Trace_Attribute_Set := (others => False); - -- Trace_Ordinary : constant Trace_Attribute_Set := -+ Trace_Ordinary : constant Trace_Attribute_Set := - (Times => True, - Tputs => True, - Update => True, - Cursor_Move => True, - Character_Output => True, - others => False); -- Trace_Maximum : constant Trace_Attribute_Set := (others => True); -+ Trace_Maximum : constant Trace_Attribute_Set := (others => True); - - ------------------------------------------------------------------------------ - -@@ -104,15 +108,15 @@ - -- |===================================================================== - - -- #1A NAME="AFU_1"#2| -- procedure Trace_On (x : Trace_Attribute_Set); -+ procedure Trace_On (x : Trace_Attribute_Set); - -- The debugging library has trace. - - -- #1A NAME="AFU_2"#2| -- procedure Trace_Put (str : String); -+ procedure Trace_Put (str : String); - -- AKA: _tracef() - -- Current_Trace_Setting : Trace_Attribute_Set; -- pragma Import (C, Current_Trace_Setting, "_nc_tracing"); -+ Current_Trace_Setting : Trace_Attribute_Set; -+ pragma Import (C, Current_Trace_Setting, "_nc_tracing"); - - end Terminal_Interface.Curses.Trace; - -diff -Naur ncurses-5.8/include/ncurses_defs ncurses-5.8-20110402/include/ncurses_defs ---- ncurses-5.8/include/ncurses_defs 2011-01-15 19:19:51.000000000 +0100 -+++ ncurses-5.8-20110402/include/ncurses_defs 2011-03-22 10:17:59.000000000 +0100 -@@ -1,4 +1,4 @@ --# $Id: ncurses_defs,v 1.45 2011/01/15 18:19:51 tom Exp $ -+# $Id: ncurses_defs,v 1.46 2011/03/22 09:17:59 tom Exp $ - ############################################################################## - # Copyright (c) 2000-2010,2011 Free Software Foundation, Inc. # - # # -@@ -85,6 +85,7 @@ - HAVE_LINK - HAVE_LOCALE_H - HAVE_LONG_FILE_NAMES -+HAVE_MATH_H - HAVE_MBLEN - HAVE_MBRLEN - HAVE_MBRTOWC -@@ -141,8 +142,8 @@ - HAVE_TERMIOS_H - HAVE_TERMIO_H - HAVE_TERMNAME 1 --HAVE_TERM_H 1 - HAVE_TERM_ENTRY_H 1 -+HAVE_TERM_H 1 - HAVE_TGETENT 1 - HAVE_TIGETNUM 1 - HAVE_TIGETSTR 1 -@@ -164,9 +165,9 @@ - HAVE_WCTOMB - HAVE_WCTYPE_H - HAVE_WINSSTR 1 --HAVE_WSYNCDOWN 1 - HAVE_WORKING_POLL - HAVE_WRESIZE -+HAVE_WSYNCDOWN 1 - HAVE__DOSCAN - MIXEDCASE_FILENAMES - NCURSES_CHAR_EQ -diff -Naur ncurses-5.8/INSTALL ncurses-5.8-20110402/INSTALL ---- ncurses-5.8/INSTALL 2011-02-25 23:10:53.000000000 +0100 -+++ ncurses-5.8-20110402/INSTALL 2011-03-31 10:27:24.000000000 +0200 -@@ -1,5 +1,5 @@ - ------------------------------------------------------------------------------- ---- Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. -- -+-- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. -- - -- -- - -- Permission is hereby granted, free of charge, to any person obtaining a -- - -- copy of this software and associated documentation files (the -- -@@ -25,7 +25,7 @@ - -- sale, use or other dealings in this Software without prior written -- - -- authorization. -- - ------------------------------------------------------------------------------- ---- $Id: INSTALL,v 1.152 2011/02/25 22:10:53 tom Exp $ -+-- $Id: INSTALL,v 1.155 2011/03/31 08:27:24 tom Exp $ - --------------------------------------------------------------------- - How to install Ncurses/Terminfo on your system - --------------------------------------------------------------------- -@@ -433,7 +433,7 @@ - changes several data references to functions to work around this - problem. - -- NOTE: With ncurses 5.1, this may not be necessary, since we are -+ NOTE: With ncurses 5.1, this may not be necessary, since we are - told that some linkers interpret uninitialized global data as a - different type of reference which behaves as described above. We have - explicitly initialized all of the global data to work around the -@@ -462,7 +462,7 @@ - warning. There will still be warnings due to subtle inconsistencies - in the interface, but at a lower level. - -- NOTE: configuring ncurses with this option may detract from the -+ NOTE: configuring ncurses with this option may detract from the - portability of your applications by encouraging you to use const in - places where the XSI curses interface would not allow them. Similar - issues arise when porting to SVr4 curses, which uses const in even -@@ -483,7 +483,7 @@ - encoded. This applies only to the wide-character (--enable-widec) - configuration. - -- NOTE: using this option will make libraries which are not binary- -+ NOTE: using this option will make libraries which are not binary- - compatible with libncursesw 5.4. None of the interfaces change, but - applications which have an array of cchar_t's must be recompiled. - -@@ -492,7 +492,7 @@ - That allows one to use ncurses with a wheel mouse with xterm or - similar X terminal emulators. - -- NOTE: using this option will make libraries which are not binary- -+ NOTE: using this option will make libraries which are not binary- - compatible with libncursesw 5.4. None of the interfaces change, but - applications which have mouse mask mmask_t's must be recompiled. - -@@ -512,7 +512,7 @@ - --enable-getcap-cache - Cache translated termcaps under the directory $HOME/.terminfo - -- NOTE: this sounds good - it makes ncurses run faster the second time. -+ NOTE: this sounds good - it makes ncurses run faster the second time. - But look where the data comes from - an /etc/termcap containing lots of - entries that are not up to date. If you configure with this option and - forget to install the terminfo database before running an ncurses -@@ -668,6 +668,10 @@ - --with-ada-sharedlib - Build a shared library for Ada95 binding, if the compiler permits. - -+ NOTE: You must also set the --with-shared option on some platforms -+ for a successful build. You need not use this option when you set -+ --with-shared, unless you want to use the Ada shared library. -+ - --with-bool=TYPE - If --without-cxx is specified, override the type used for the "bool" - declared in curses.h (normally the type is automatically chosen to -@@ -733,7 +737,8 @@ - --enable-widec is not given) a character. Prior to ncurses 5.5, this - was always unsigned long, but with ncurses 5.5, it may be unsigned. - Use this option if you need to preserve compatibility with 64-bit -- executables. -+ executables, e.g., by setting "--with-chtype=long" (the configure -+ script supplies "unsigned"). - - --with-database=XXX - Specify the terminfo source file to install. Usually you will wish -@@ -816,7 +821,7 @@ - make install DESTDIR=XXX - since the makefiles pass that variable to subordinate makes. - -- NOTE: a few systems build shared libraries with fixed pathnames; this -+ NOTE: a few systems build shared libraries with fixed pathnames; this - option probably will not work for those configurations. - - --with-libtool[=XXX] -@@ -922,7 +927,7 @@ - which you are building, typically using a ".so" suffix, along with - symbolic links that refer to the release version. - -- NOTE: Unless you override the configure script by setting the $CFLAGS -+ NOTE: Unless you override the configure script by setting the $CFLAGS - environment variable, these will not be built with the -g debugging - option. - -@@ -936,6 +941,10 @@ - $LD_LIBRARY_PATH to point to the build tree, e.g., - ./misc/shlib make install - -+ NOTE: If you use the --with-ada-sharedlib option, you should also -+ set this option, to ensure that C-language modules needed for the -+ Ada binding use appropriate compiler options. -+ - --with-shlib-version=XXX - Specify whether to use the release or ABI version for shared libraries. - This is normally chosen automatically based on the type of system -diff -Naur ncurses-5.8/man/MKada_config.in ncurses-5.8-20110402/man/MKada_config.in ---- ncurses-5.8/man/MKada_config.in 2010-03-06 23:29:06.000000000 +0100 -+++ ncurses-5.8-20110402/man/MKada_config.in 2011-03-26 15:44:51.000000000 +0100 -@@ -1,5 +1,5 @@ - .\"*************************************************************************** --.\" Copyright (c) 2010 Free Software Foundation, Inc. * -+.\" Copyright (c) 2010,2011 Free Software Foundation, Inc. * - .\" * - .\" Permission is hereby granted, free of charge, to any person obtaining a * - .\" copy of this software and associated documentation files (the * -@@ -26,12 +26,12 @@ - .\" authorization. * - .\"*************************************************************************** - .\" --.\" $Id: MKada_config.in,v 1.3 2010/03/06 22:29:06 tom Exp $ -+.\" $Id: MKada_config.in,v 1.5 2011/03/26 14:44:51 tom Exp $ - .TH ADACURSES "1" "" "" "User Commands" - .SH NAME --adacurses-config \- helper script for AdaCurses libraries -+adacurses\-config \- helper script for AdaCurses libraries - .SH SYNOPSIS --.B adacurses-config -+.B adacurses\-config - [\fIoptions\fR] - .SH DESCRIPTION - This is a shell script which simplifies configuring an application to use -@@ -39,16 +39,17 @@ - .SH OPTIONS - .TP - \fB\-\-cflags\fR --echos the gnat (Ada compiler) flags needed to compile with adacurses -+echos the gnat (Ada compiler) flags needed to compile with AdaCurses. - .TP - \fB\-\-libs\fR --echos the gnat libraries needed to link with adacurses -+echos the gnat libraries needed to link with AdaCurses. - .TP - \fB\-\-version\fR --echos the release+patchdate version of adacurses -+echos the release+patchdate version of the ncurses libraries used -+to configure and build AdaCurses. - .TP - \fB\-\-help\fR --prints this message -+prints a list of the \fBadacurses\-config\fP script's options. - .SH "SEE ALSO" - \fBcurses\fR(3X) - .PP -diff -Naur ncurses-5.8/MANIFEST ncurses-5.8-20110402/MANIFEST ---- ncurses-5.8/MANIFEST 2010-10-09 19:52:25.000000000 +0200 -+++ ncurses-5.8-20110402/MANIFEST 2011-03-28 02:29:04.000000000 +0200 -@@ -6,6 +6,7 @@ - ./Ada95/aclocal.m4 - ./Ada95/configure - ./Ada95/configure.in -+./Ada95/doc/Makefile.in - ./Ada95/gen/Makefile.in - ./Ada95/gen/adacurses-config.in - ./Ada95/gen/gen.c -@@ -32,6 +33,15 @@ - ./Ada95/include/ncurses_defs - ./Ada95/make-tar.sh - ./Ada95/mk-1st.awk -+./Ada95/package/AdaCurses-doc.spec -+./Ada95/package/AdaCurses.spec -+./Ada95/package/debian/compat -+./Ada95/package/debian/control -+./Ada95/package/debian/copyright -+./Ada95/package/debian/docs -+./Ada95/package/debian/rules -+./Ada95/package/debian/source/format -+./Ada95/package/debian/watch - ./Ada95/samples/Makefile.in - ./Ada95/samples/README - ./Ada95/samples/explain.txt -@@ -118,8 +128,11 @@ - ./Ada95/samples/tour.adb - ./Ada95/samples/tour.ads - ./Ada95/src/Makefile.in -+./Ada95/src/c_varargs_to_ada.c -+./Ada95/src/c_varargs_to_ada.h - ./Ada95/src/library.gpr - ./Ada95/src/modules -+./Ada95/src/ncurses_compat.c - ./Ada95/src/terminal_interface-curses-aux.adb - ./Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb - ./Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads -@@ -1053,6 +1066,14 @@ - ./test/ncurses.c - ./test/ncurses_tst.hin - ./test/newdemo.c -+./test/package/debian/compat -+./test/package/debian/control -+./test/package/debian/copyright -+./test/package/debian/docs -+./test/package/debian/rules -+./test/package/debian/source/format -+./test/package/debian/watch -+./test/package/ncurses-examples.spec - ./test/programs - ./test/railroad.c - ./test/rain.c -diff -Naur ncurses-5.8/misc/ncurses-config.in ncurses-5.8-20110402/misc/ncurses-config.in ---- ncurses-5.8/misc/ncurses-config.in 2010-02-06 23:12:16.000000000 +0100 -+++ ncurses-5.8-20110402/misc/ncurses-config.in 2011-03-19 23:43:38.000000000 +0100 -@@ -1,7 +1,7 @@ - #!@SHELL@ --# $Id: ncurses-config.in,v 1.24 2010/02/06 22:12:16 Miroslav.Lichvar Exp $ -+# $Id: ncurses-config.in,v 1.25 2011/03/19 22:43:38 tom Exp $ - ############################################################################## --# Copyright (c) 2006-2009,2010 Free Software Foundation, Inc. # -+# Copyright (c) 2006-2010,2011 Free Software Foundation, Inc. # - # # - # Permission is hereby granted, free of charge, to any person obtaining a # - # copy of this software and associated documentation files (the "Software"), # -@@ -72,12 +72,12 @@ - # compile/link - --cflags) - INCS= -- if test "${includedir}" != /usr/include ; then -- INCS="-I${includedir}" -- fi - if test "x@WITH_OVERWRITE@" = xno ; then - INCS="$INCS -I${includedir}/${THIS}" - fi -+ if test "${includedir}" != /usr/include ; then -+ INCS="$INCS -I${includedir}" -+ fi - sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO - $INCS - ENDECHO -diff -Naur ncurses-5.8/ncurses/base/lib_newwin.c ncurses-5.8-20110402/ncurses/base/lib_newwin.c ---- ncurses-5.8/ncurses/base/lib_newwin.c 2011-01-22 21:34:15.000000000 +0100 -+++ ncurses-5.8-20110402/ncurses/base/lib_newwin.c 2011-03-07 22:58:17.000000000 +0100 -@@ -43,7 +43,7 @@ - #include - #include - --MODULE_ID("$Id: lib_newwin.c,v 1.68 2011/01/22 20:34:15 tom Exp $") -+MODULE_ID("$Id: lib_newwin.c,v 1.69 2011/03/07 21:58:17 tom Exp $") - - #define window_is(name) ((sp)->_##name == win) - -@@ -141,7 +141,7 @@ - T((T_CALLED("newwin(%p, %d,%d,%d,%d)"), (void *) SP_PARM, num_lines, num_columns, - begy, begx)); - -- if (begy < 0 || begx < 0 || num_lines <= 0 || num_columns <= 0) -+ if (begy < 0 || begx < 0 || num_lines < 0 || num_columns < 0) - returnWin(0); - - if (num_lines == 0) -@@ -198,7 +198,7 @@ - /* - * make sure window fits inside the original one - */ -- if (begy < 0 || begx < 0 || orig == 0 || num_lines <= 0 || num_columns <= 0) -+ if (begy < 0 || begx < 0 || orig == 0 || num_lines < 0 || num_columns < 0) - returnWin(0); - if (begy + num_lines > orig->_maxy + 1 - || begx + num_columns > orig->_maxx + 1) -diff -Naur ncurses-5.8/ncurses/base/lib_slk.c ncurses-5.8-20110402/ncurses/base/lib_slk.c ---- ncurses-5.8/ncurses/base/lib_slk.c 2010-12-25 23:58:58.000000000 +0100 -+++ ncurses-5.8-20110402/ncurses/base/lib_slk.c 2011-03-05 22:21:52.000000000 +0100 -@@ -1,5 +1,5 @@ - /**************************************************************************** -- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * -+ * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * -@@ -47,7 +47,7 @@ - #define CUR SP_TERMTYPE - #endif - --MODULE_ID("$Id: lib_slk.c,v 1.47 2010/12/25 22:58:58 tom Exp $") -+MODULE_ID("$Id: lib_slk.c,v 1.48 2011/03/05 21:21:52 tom Exp $") - - #ifdef USE_TERM_DRIVER - #define NumLabels InfoOf(SP_PARM).numlabels -@@ -138,7 +138,7 @@ - { - int i; - int res = OK; -- int max_length; -+ size_t max_length; - SCREEN *sp; - int numlab; - -@@ -189,9 +189,9 @@ - == NULL) - returnCode(slk_failed(NCURSES_SP_ARG)); - -- max_length = SP_PARM->_slk->maxlen; -+ max_length = (size_t) SP_PARM->_slk->maxlen; - for (i = 0; i < SP_PARM->_slk->labcnt; i++) { -- size_t used = (size_t) max_length + 1; -+ size_t used = max_length + 1; - - SP_PARM->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used); - if (SP_PARM->_slk->ent[i].ent_text == 0) -@@ -202,8 +202,10 @@ - if (SP_PARM->_slk->ent[i].form_text == 0) - returnCode(slk_failed(NCURSES_SP_ARG)); - -- memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1); -- SP_PARM->_slk->ent[i].form_text[used] = '\0'; -+ if (used > 1) { -+ memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1); -+ } -+ SP_PARM->_slk->ent[i].form_text[used - 1] = '\0'; - - SP_PARM->_slk->ent[i].visible = (char) (i < SP_PARM->_slk->maxlab); - } -diff -Naur ncurses-5.8/ncurses/widechar/lib_add_wch.c ncurses-5.8-20110402/ncurses/widechar/lib_add_wch.c ---- ncurses-5.8/ncurses/widechar/lib_add_wch.c 2010-12-19 02:32:55.000000000 +0100 -+++ ncurses-5.8-20110402/ncurses/widechar/lib_add_wch.c 2011-03-22 10:31:15.000000000 +0100 -@@ -1,5 +1,5 @@ - /**************************************************************************** -- * Copyright (c) 2004-2009,2010 Free Software Foundation, Inc. * -+ * Copyright (c) 2004-2010,2011 Free Software Foundation, Inc. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a * - * copy of this software and associated documentation files (the * -@@ -39,7 +39,7 @@ - #include - #endif - --MODULE_ID("$Id: lib_add_wch.c,v 1.11 2010/12/19 01:32:55 tom Exp $") -+MODULE_ID("$Id: lib_add_wch.c,v 1.12 2011/03/22 09:31:15 Petr.Pavlu Exp $") - - /* clone/adapt lib_addch.c */ - static const cchar_t blankchar = NewChar(BLANK_TEXT); -@@ -308,7 +308,7 @@ - - /* - * If we are using the alternate character set, forget about locale. -- * Otherwise, if the locale * claims the code is printable, treat it that -+ * Otherwise, if the locale claims the code is printable, treat it that - * way. - */ - if ((AttrOf(ch) & A_ALTCHARSET) -diff -Naur ncurses-5.8/NEWS ncurses-5.8-20110402/NEWS ---- ncurses-5.8/NEWS 2011-02-26 17:54:31.000000000 +0100 -+++ ncurses-5.8-20110402/NEWS 2011-04-01 00:44:04.000000000 +0200 -@@ -25,7 +25,7 @@ - -- sale, use or other dealings in this Software without prior written -- - -- authorization. -- - ------------------------------------------------------------------------------- ---- $Id: NEWS,v 1.1651 2011/02/26 16:54:31 tom Exp $ -+-- $Id: NEWS,v 1.1680 2011/03/31 22:44:04 tom Exp $ - ------------------------------------------------------------------------------- - - This is a log of changes that ncurses has gone through since Zeyd started -@@ -45,6 +45,92 @@ - Changes through 1.9.9e did not credit all contributions; - it is not possible to add this information. - -+20110402 -+ + various build-fixes for the rpm/dpkg scripts. -+ + add "--enable-rpath-link" option to Ada95/configure, to allow -+ packages to suppress the rpath feature which is normally used for -+ the in-tree build of sample programs. -+ + corrected definition of libdir variable in Ada95/src/Makefile.in, -+ needed for rpm script. -+ + add "--with-shared" option to Ada95/configure script, to allow -+ making the C-language parts of the binding use appropriate compiler -+ options if building a shared library with gnat. -+ -+20110329 -+ > portability fixes for Ada95 binding: -+ + add configure check to ensure that SIGINT works with gnat. This is -+ needed for the "rain" sample program. If SIGINT does not work, omit -+ that sample program. -+ + correct typo in check of $PKG_CONFIG variable in Ada95/configure -+ + add ncurses_compat.c, to supply functions used in the Ada95 binding -+ which were added in 5.7 and later. -+ + modify sed expression in CF_NCURSES_ADDON to eliminate a dependency -+ upon GNU sed. -+ -+20110326 -+ + add special check in Ada95/configure script for ncurses6 reentrant -+ code. -+ + regen Ada html documentation. -+ + build-fix for Ada shared libraries versus the varargs workaround. -+ + add rpm and dpkg scripts for Ada95 and test directories, for test -+ builds. -+ + update test/configure macros CF_CURSES_LIBS, CF_XOPEN_SOURCE and -+ CF_X_ATHENA_LIBS. -+ + add configure check to determine if gnat's project feature supports -+ libraries, i.e., collections of .ali files. -+ + make all dereferences in Ada95 samples explicit. -+ + fix typo in comment in lib_add_wch.c (patch by Petr Pavlu). -+ + add configure check for, ifdef's for math.h which is in a separate -+ package on Solaris and potentially not installed (report by Petr -+ Pavlu). -+ > fixes for Ada95 binding (Nicolas Boulenguez): -+ + improve type-checking in Ada95 by eliminating a few warning-suppress -+ pragmas. -+ + suppress unreferenced warnings. -+ + make all dereferences in binding explicit. -+ -+20110319 -+ + regen Ada html documentation. -+ + change order of -I options from ncurses*-config script when the -+ --disable-overwrite option was used, so that the subdirectory include -+ is listed first. -+ + modify the make-tar.sh scripts to add a MANIFEST and NEWS file. -+ + modify configure script to provide value for HTML_DIR in -+ Ada95/gen/Makefile.in, which depends on whether the Ada95 binding is -+ distributed separately (report by Nicolas Boulenguez). -+ + modify configure script to add -g and/or -O3 to ADAFLAGS if the -+ CFLAGS for the build has these options. -+ + amend change from 20070324, to not add 1 to the result of getmaxx -+ and getmaxy in the Ada binding (report by Nicolas Boulenguez for -+ thread in comp.lang.ada). -+ + build-fix Ada95/samples for gnat 4.5 -+ + spelling fixes for Ada95/samples/explain.txt -+ > fixes for Ada95 binding (Nicolas Boulenguez): -+ + add item in Trace_Attribute_Set corresponding to TRACE_ATTRS. -+ + add workaround for binding to set_field_type(), which uses varargs. -+ The original binding from 990220 relied on the prevalent -+ implementation of varargs which did not support or need va_copy(). -+ + add dependency on gen/Makefile.in needed for *-panels.ads -+ + add Library_Options to library.gpr -+ + add Languages to library.gpr, for gprbuild -+ -+20110307 -+ + revert changes to limit-checks from 20110122 (Debian #616711). -+ > minor type-cleanup of Ada95 binding (Nicolas Boulenguez): -+ + corrected a minor sign error in a field of Low_Level_Field_Type, to -+ conform to form.h. -+ + replaced C_Int by Curses_Bool as return type for some callbacks, see -+ fieldtype(3FORM). -+ + modify samples/sample-explain.adb to provide explicit message when -+ explain.txt is not found. -+ -+20110305 -+ + improve makefiles for Ada95 tree (patch by Nicolas Boulenguez). -+ + fix an off-by-one error in _nc_slk_initialize() from 20100605 fixes -+ for compiler warnings (report by Nicolas Boulenguez). -+ + modify Ada95/gen/gen.c to declare unused bits in generated layouts, -+ needed to compile when chtype is 64-bits using gnat 4.4.5 -+ - 20110226 5.8 release for upload to ftp.gnu.org - - 20110226 -diff -Naur ncurses-5.8/test/aclocal.m4 ncurses-5.8-20110402/test/aclocal.m4 ---- ncurses-5.8/test/aclocal.m4 2011-01-16 00:47:10.000000000 +0100 -+++ ncurses-5.8-20110402/test/aclocal.m4 2011-03-24 09:28:07.000000000 +0100 -@@ -26,7 +26,7 @@ - dnl authorization. * - dnl*************************************************************************** - dnl --dnl $Id: aclocal.m4,v 1.49 2011/01/15 23:47:10 tom Exp $ -+dnl $Id: aclocal.m4,v 1.50 2011/03/24 08:28:07 tom Exp $ - dnl - dnl Author: Thomas E. Dickey - dnl -@@ -624,7 +624,7 @@ - AC_CHECK_HEADERS($cf_cv_ncurses_header) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_CURSES_LIBS version: 31 updated: 2010/10/23 15:54:49 -+dnl CF_CURSES_LIBS version: 33 updated: 2011/03/06 12:37:18 - dnl -------------- - dnl Look for the curses libraries. Older curses implementations may require - dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. -@@ -655,8 +655,20 @@ - ac_cv_func_initscr=yes - ])]) - ;; --linux*) # Suse Linux does not follow /usr/lib convention -- CF_ADD_LIBDIR(/lib) -+linux*) -+ case `arch 2>/dev/null` in -+ x86_64) -+ if test -d /lib64 -+ then -+ CF_ADD_LIBDIR(/lib64) -+ else -+ CF_ADD_LIBDIR(/lib) -+ fi -+ ;; -+ *) -+ CF_ADD_LIBDIR(/lib) -+ ;; -+ esac - ;; - sunos3*|sunos4*) - if test -d /usr/5lib ; then -@@ -2164,7 +2176,7 @@ - fi - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_PKG_CONFIG version: 3 updated: 2009/01/25 10:55:09 -+dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24 - dnl ------------- - dnl Check for the package-config program, unless disabled by command-line. - AC_DEFUN([CF_PKG_CONFIG], -@@ -2181,7 +2193,7 @@ - PKG_CONFIG=none - ;; - yes) #(vi -- AC_PATH_PROG(PKG_CONFIG, pkg-config, none) -+ AC_PATH_TOOL(PKG_CONFIG, pkg-config, none) - ;; - *) - PKG_CONFIG=$withval -@@ -2663,7 +2675,7 @@ - [USE_VALGRIND]) - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_XOPEN_CURSES version: 10 updated: 2010/10/23 15:54:49 -+dnl CF_XOPEN_CURSES version: 11 updated: 2011/01/18 18:15:30 - dnl --------------- - dnl Test if we should define X/Open source for curses, needed on Digital Unix - dnl 4.x, to see the extended functions, but breaks on IRIX 6.x. -@@ -2678,7 +2690,7 @@ - #include - #include <${cf_cv_ncurses_header:-curses.h}>],[ - #if defined(NCURSES_VERSION_PATCH) --if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) -+#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) - make an error - #endif - #endif -@@ -2702,7 +2714,7 @@ - test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" - ])dnl - dnl --------------------------------------------------------------------------- --dnl CF_XOPEN_SOURCE version: 34 updated: 2010/05/26 05:38:42 -+dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37 - dnl --------------- - dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, - dnl or adapt to the vendor's definitions to get equivalent functionality, -@@ -2721,6 +2733,9 @@ - aix[[456]]*) #(vi - cf_xopen_source="-D_ALL_SOURCE" - ;; -+cygwin) #(vi -+ cf_XOPEN_SOURCE=600 -+ ;; - darwin[[0-8]].*) #(vi - cf_xopen_source="-D_APPLE_C_SOURCE" - ;; -@@ -2942,7 +2957,7 @@ - fi - ]) - dnl --------------------------------------------------------------------------- --dnl CF_X_ATHENA_LIBS version: 9 updated: 2010/06/02 05:03:05 -+dnl CF_X_ATHENA_LIBS version: 10 updated: 2011/02/13 13:31:33 - dnl ---------------- - dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of - dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. -@@ -2972,7 +2987,11 @@ - CF_ADD_LIBS($cf_lib) - AC_MSG_CHECKING(for $cf_test in $cf_lib) - fi -- AC_TRY_LINK([],[$cf_test()], -+ AC_TRY_LINK([ -+#include -+#include -+],[ -+$cf_test((XtAppContext) 0)], - [cf_result=yes], - [cf_result=no]) - AC_MSG_RESULT($cf_result) -diff -Naur ncurses-5.8/test/configure ncurses-5.8-20110402/test/configure ---- ncurses-5.8/test/configure 2011-01-16 00:47:42.000000000 +0100 -+++ ncurses-5.8-20110402/test/configure 2011-03-24 09:29:40.000000000 +0100 -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by Autoconf 2.52.20101001. -+# Generated by Autoconf 2.52.20101002. - # - # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 - # Free Software Foundation, Inc. -@@ -767,7 +767,7 @@ - running configure, to aid debugging if configure makes a mistake. - - It was created by $as_me, which was --generated by GNU Autoconf 2.52.20101001. Invocation command line was -+generated by GNU Autoconf 2.52.20101002. Invocation command line was - - $ $0 $@ - -@@ -2842,6 +2842,9 @@ - aix[456]*) #(vi - cf_xopen_source="-D_ALL_SOURCE" - ;; -+cygwin) #(vi -+ cf_XOPEN_SOURCE=600 -+ ;; - darwin[0-8].*) #(vi - cf_xopen_source="-D_APPLE_C_SOURCE" - ;; -@@ -2867,14 +2870,14 @@ - ;; - linux*|gnu*|mint*|k*bsd*-gnu) #(vi - --echo "$as_me:2870: checking if we must define _GNU_SOURCE" >&5 -+echo "$as_me:2873: checking if we must define _GNU_SOURCE" >&5 - echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 - if test "${cf_cv_gnu_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 2877 "configure" -+#line 2880 "configure" - #include "confdefs.h" - #include - int -@@ -2889,16 +2892,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:2892: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:2895: \$? = $ac_status" >&5 -+ echo "$as_me:2898: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:2898: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:2901: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:2901: \$? = $ac_status" >&5 -+ echo "$as_me:2904: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_gnu_source=no - else -@@ -2907,7 +2910,7 @@ - cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - cat >conftest.$ac_ext <<_ACEOF --#line 2910 "configure" -+#line 2913 "configure" - #include "confdefs.h" - #include - int -@@ -2922,16 +2925,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:2925: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:2928: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:2928: \$? = $ac_status" >&5 -+ echo "$as_me:2931: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:2931: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:2934: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:2934: \$? = $ac_status" >&5 -+ echo "$as_me:2937: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_gnu_source=no - else -@@ -2946,7 +2949,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:2949: result: $cf_cv_gnu_source" >&5 -+echo "$as_me:2952: result: $cf_cv_gnu_source" >&5 - echo "${ECHO_T}$cf_cv_gnu_source" >&6 - test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" - -@@ -2976,14 +2979,14 @@ - cf_xopen_source="-D__EXTENSIONS__" - ;; - *) -- echo "$as_me:2979: checking if we should define _XOPEN_SOURCE" >&5 -+ echo "$as_me:2982: checking if we should define _XOPEN_SOURCE" >&5 - echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 - if test "${cf_cv_xopen_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 2986 "configure" -+#line 2989 "configure" - #include "confdefs.h" - #include - int -@@ -2998,16 +3001,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3001: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3004: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3004: \$? = $ac_status" >&5 -+ echo "$as_me:3007: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3007: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3010: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3010: \$? = $ac_status" >&5 -+ echo "$as_me:3013: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xopen_source=no - else -@@ -3016,7 +3019,7 @@ - cf_save="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" - cat >conftest.$ac_ext <<_ACEOF --#line 3019 "configure" -+#line 3022 "configure" - #include "confdefs.h" - #include - int -@@ -3031,16 +3034,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3034: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3037: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3037: \$? = $ac_status" >&5 -+ echo "$as_me:3040: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3040: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3043: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3043: \$? = $ac_status" >&5 -+ echo "$as_me:3046: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xopen_source=no - else -@@ -3055,7 +3058,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:3058: result: $cf_cv_xopen_source" >&5 -+echo "$as_me:3061: result: $cf_cv_xopen_source" >&5 - echo "${ECHO_T}$cf_cv_xopen_source" >&6 - if test "$cf_cv_xopen_source" != no ; then - -@@ -3162,16 +3165,16 @@ - sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ - -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` - --echo "$as_me:3165: checking if we should define _POSIX_C_SOURCE" >&5 -+echo "$as_me:3168: checking if we should define _POSIX_C_SOURCE" >&5 - echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 - if test "${cf_cv_posix_c_source+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - --echo "${as_me:-configure}:3171: testing if the symbol is already defined go no further ..." 1>&5 -+echo "${as_me:-configure}:3174: testing if the symbol is already defined go no further ..." 1>&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 3174 "configure" -+#line 3177 "configure" - #include "confdefs.h" - #include - int -@@ -3186,16 +3189,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3189: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3192: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3192: \$? = $ac_status" >&5 -+ echo "$as_me:3195: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3195: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3198: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3198: \$? = $ac_status" >&5 -+ echo "$as_me:3201: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_posix_c_source=no - else -@@ -3216,7 +3219,7 @@ - esac - if test "$cf_want_posix_source" = yes ; then - cat >conftest.$ac_ext <<_ACEOF --#line 3219 "configure" -+#line 3222 "configure" - #include "confdefs.h" - #include - int -@@ -3231,16 +3234,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3234: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3237: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3237: \$? = $ac_status" >&5 -+ echo "$as_me:3240: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3240: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3243: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3243: \$? = $ac_status" >&5 -+ echo "$as_me:3246: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -3251,15 +3254,15 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - fi - --echo "${as_me:-configure}:3254: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 -+echo "${as_me:-configure}:3257: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 - - CFLAGS="$cf_trim_CFLAGS" - CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" - --echo "${as_me:-configure}:3259: testing if the second compile does not leave our definition intact error ..." 1>&5 -+echo "${as_me:-configure}:3262: testing if the second compile does not leave our definition intact error ..." 1>&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 3262 "configure" -+#line 3265 "configure" - #include "confdefs.h" - #include - int -@@ -3274,16 +3277,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3277: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3280: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3280: \$? = $ac_status" >&5 -+ echo "$as_me:3283: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3283: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3286: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3286: \$? = $ac_status" >&5 -+ echo "$as_me:3289: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -3299,7 +3302,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:3302: result: $cf_cv_posix_c_source" >&5 -+echo "$as_me:3305: result: $cf_cv_posix_c_source" >&5 - echo "${ECHO_T}$cf_cv_posix_c_source" >&6 - - if test "$cf_cv_posix_c_source" != no ; then -@@ -3471,7 +3474,7 @@ - - fi - --echo "$as_me:3474: checking for $CC option to accept ANSI C" >&5 -+echo "$as_me:3477: checking for $CC option to accept ANSI C" >&5 - echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 - if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3479,7 +3482,7 @@ - ac_cv_prog_cc_stdc=no - ac_save_CC=$CC - cat >conftest.$ac_ext <<_ACEOF --#line 3482 "configure" -+#line 3485 "configure" - #include "confdefs.h" - #include - #include -@@ -3528,16 +3531,16 @@ - do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3531: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3534: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3534: \$? = $ac_status" >&5 -+ echo "$as_me:3537: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3537: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3540: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3540: \$? = $ac_status" >&5 -+ echo "$as_me:3543: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg - break -@@ -3554,21 +3557,21 @@ - - case "x$ac_cv_prog_cc_stdc" in - x|xno) -- echo "$as_me:3557: result: none needed" >&5 -+ echo "$as_me:3560: result: none needed" >&5 - echo "${ECHO_T}none needed" >&6 ;; - *) -- echo "$as_me:3560: result: $ac_cv_prog_cc_stdc" >&5 -+ echo "$as_me:3563: result: $ac_cv_prog_cc_stdc" >&5 - echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; - esac - --echo "$as_me:3565: checking for an ANSI C-conforming const" >&5 -+echo "$as_me:3568: checking for an ANSI C-conforming const" >&5 - echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 - if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 3571 "configure" -+#line 3574 "configure" - #include "confdefs.h" - - int -@@ -3626,16 +3629,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3629: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3632: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3632: \$? = $ac_status" >&5 -+ echo "$as_me:3635: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3635: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3638: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3638: \$? = $ac_status" >&5 -+ echo "$as_me:3641: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_const=yes - else -@@ -3645,7 +3648,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:3648: result: $ac_cv_c_const" >&5 -+echo "$as_me:3651: result: $ac_cv_c_const" >&5 - echo "${ECHO_T}$ac_cv_c_const" >&6 - if test $ac_cv_c_const = no; then - -@@ -3655,7 +3658,7 @@ - - fi - --echo "$as_me:3658: checking for signal global datatype" >&5 -+echo "$as_me:3661: checking for signal global datatype" >&5 - echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 - if test "${cf_cv_sig_atomic_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -3667,7 +3670,7 @@ - "int" - do - cat >conftest.$ac_ext <<_ACEOF --#line 3670 "configure" -+#line 3673 "configure" - #include "confdefs.h" - - #include -@@ -3690,16 +3693,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3693: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3696: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3696: \$? = $ac_status" >&5 -+ echo "$as_me:3699: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3699: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3702: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3702: \$? = $ac_status" >&5 -+ echo "$as_me:3705: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_sig_atomic_t=$cf_type - else -@@ -3713,13 +3716,13 @@ - - fi - --echo "$as_me:3716: result: $cf_cv_sig_atomic_t" >&5 -+echo "$as_me:3719: result: $cf_cv_sig_atomic_t" >&5 - echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 - test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <&5 -+echo "$as_me:3725: checking if you want to see long compiling messages" >&5 - echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6 - - # Check whether --enable-echo or --disable-echo was given. -@@ -3753,22 +3756,22 @@ - ECHO_CC='' - - fi; --echo "$as_me:3756: result: $enableval" >&5 -+echo "$as_me:3759: result: $enableval" >&5 - echo "${ECHO_T}$enableval" >&6 - - GCC_VERSION=none - if test "$GCC" = yes ; then -- echo "$as_me:3761: checking version of $CC" >&5 -+ echo "$as_me:3764: checking version of $CC" >&5 - echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 - GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" - test -z "$GCC_VERSION" && GCC_VERSION=unknown -- echo "$as_me:3765: result: $GCC_VERSION" >&5 -+ echo "$as_me:3768: result: $GCC_VERSION" >&5 - echo "${ECHO_T}$GCC_VERSION" >&6 - fi - - if ( test "$GCC" = yes || test "$GXX" = yes ) - then --echo "$as_me:3771: checking if you want to turn on gcc warnings" >&5 -+echo "$as_me:3774: checking if you want to turn on gcc warnings" >&5 - echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6 - - # Check whether --enable-warnings or --disable-warnings was given. -@@ -3785,7 +3788,7 @@ - with_warnings=no - - fi; --echo "$as_me:3788: result: $with_warnings" >&5 -+echo "$as_me:3791: result: $with_warnings" >&5 - echo "${ECHO_T}$with_warnings" >&6 - if test "$with_warnings" = "yes" - then -@@ -3808,10 +3811,10 @@ - EOF - if test "$GCC" = yes - then -- { echo "$as_me:3811: checking for $CC __attribute__ directives..." >&5 -+ { echo "$as_me:3814: checking for $CC __attribute__ directives..." >&5 - echo "$as_me: checking for $CC __attribute__ directives..." >&6;} - cat > conftest.$ac_ext <&5 -+ if { (eval echo "$as_me:3866: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3866: \$? = $ac_status" >&5 -+ echo "$as_me:3869: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- test -n "$verbose" && echo "$as_me:3868: result: ... $cf_attribute" >&5 -+ test -n "$verbose" && echo "$as_me:3871: result: ... $cf_attribute" >&5 - echo "${ECHO_T}... $cf_attribute" >&6 - cat conftest.h >>confdefs.h - case $cf_attribute in #(vi -@@ -3905,12 +3908,12 @@ - if test "$GCC" = yes ; then - case $host_os in - linux*|gnu*) -- echo "$as_me:3908: checking if this is really Intel C compiler" >&5 -+ echo "$as_me:3911: checking if this is really Intel C compiler" >&5 - echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 - cf_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -no-gcc" - cat >conftest.$ac_ext <<_ACEOF --#line 3913 "configure" -+#line 3916 "configure" - #include "confdefs.h" - - int -@@ -3927,16 +3930,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:3930: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:3933: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3933: \$? = $ac_status" >&5 -+ echo "$as_me:3936: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:3936: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:3939: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:3939: \$? = $ac_status" >&5 -+ echo "$as_me:3942: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - INTEL_COMPILER=yes - cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc" -@@ -3947,14 +3950,14 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - CFLAGS="$cf_save_CFLAGS" -- echo "$as_me:3950: result: $INTEL_COMPILER" >&5 -+ echo "$as_me:3953: result: $INTEL_COMPILER" >&5 - echo "${ECHO_T}$INTEL_COMPILER" >&6 - ;; - esac - fi - - cat > conftest.$ac_ext <&5 -+ { echo "$as_me:3977: checking for $CC warning options..." >&5 - echo "$as_me: checking for $CC warning options..." >&6;} - cf_save_CFLAGS="$CFLAGS" - EXTRA_CFLAGS="-Wall" -@@ -3987,12 +3990,12 @@ - wd981 - do - CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" -- if { (eval echo "$as_me:3990: \"$ac_compile\"") >&5 -+ if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:3993: \$? = $ac_status" >&5 -+ echo "$as_me:3996: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- test -n "$verbose" && echo "$as_me:3995: result: ... -$cf_opt" >&5 -+ test -n "$verbose" && echo "$as_me:3998: result: ... -$cf_opt" >&5 - echo "${ECHO_T}... -$cf_opt" >&6 - EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" - fi -@@ -4001,7 +4004,7 @@ - - elif test "$GCC" = yes - then -- { echo "$as_me:4004: checking for $CC warning options..." >&5 -+ { echo "$as_me:4007: checking for $CC warning options..." >&5 - echo "$as_me: checking for $CC warning options..." >&6;} - cf_save_CFLAGS="$CFLAGS" - EXTRA_CFLAGS= -@@ -4021,12 +4024,12 @@ - Wundef $cf_warn_CONST - do - CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" -- if { (eval echo "$as_me:4024: \"$ac_compile\"") >&5 -+ if { (eval echo "$as_me:4027: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4027: \$? = $ac_status" >&5 -+ echo "$as_me:4030: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- test -n "$verbose" && echo "$as_me:4029: result: ... -$cf_opt" >&5 -+ test -n "$verbose" && echo "$as_me:4032: result: ... -$cf_opt" >&5 - echo "${ECHO_T}... -$cf_opt" >&6 - case $cf_opt in #(vi - Wcast-qual) #(vi -@@ -4037,7 +4040,7 @@ - [34].*) - test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 - --echo "${as_me:-configure}:4040: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 -+echo "${as_me:-configure}:4043: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 - - continue;; - esac -@@ -4053,7 +4056,7 @@ - fi - fi - --echo "$as_me:4056: checking if you want to use dmalloc for testing" >&5 -+echo "$as_me:4059: checking if you want to use dmalloc for testing" >&5 - echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 - - # Check whether --with-dmalloc or --without-dmalloc was given. -@@ -4069,7 +4072,7 @@ - else - with_dmalloc= - fi; --echo "$as_me:4072: result: ${with_dmalloc:-no}" >&5 -+echo "$as_me:4075: result: ${with_dmalloc:-no}" >&5 - echo "${ECHO_T}${with_dmalloc:-no}" >&6 - - case .$with_cflags in #(vi -@@ -4163,23 +4166,23 @@ - esac - - if test "$with_dmalloc" = yes ; then -- echo "$as_me:4166: checking for dmalloc.h" >&5 -+ echo "$as_me:4169: checking for dmalloc.h" >&5 - echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 - if test "${ac_cv_header_dmalloc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 4172 "configure" -+#line 4175 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:4176: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:4179: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:4182: \$? = $ac_status" >&5 -+ echo "$as_me:4185: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -4198,11 +4201,11 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:4201: result: $ac_cv_header_dmalloc_h" >&5 -+echo "$as_me:4204: result: $ac_cv_header_dmalloc_h" >&5 - echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 - if test $ac_cv_header_dmalloc_h = yes; then - --echo "$as_me:4205: checking for dmalloc_debug in -ldmalloc" >&5 -+echo "$as_me:4208: checking for dmalloc_debug in -ldmalloc" >&5 - echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 - if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4210,7 +4213,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldmalloc $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 4213 "configure" -+#line 4216 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -4229,16 +4232,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:4232: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:4235: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:4235: \$? = $ac_status" >&5 -+ echo "$as_me:4238: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:4238: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4241: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4241: \$? = $ac_status" >&5 -+ echo "$as_me:4244: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dmalloc_dmalloc_debug=yes - else -@@ -4249,7 +4252,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:4252: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 -+echo "$as_me:4255: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 - echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 - if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:4270: checking if you want to use dbmalloc for testing" >&5 - echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 - - # Check whether --with-dbmalloc or --without-dbmalloc was given. -@@ -4280,7 +4283,7 @@ - else - with_dbmalloc= - fi; --echo "$as_me:4283: result: ${with_dbmalloc:-no}" >&5 -+echo "$as_me:4286: result: ${with_dbmalloc:-no}" >&5 - echo "${ECHO_T}${with_dbmalloc:-no}" >&6 - - case .$with_cflags in #(vi -@@ -4374,23 +4377,23 @@ - esac - - if test "$with_dbmalloc" = yes ; then -- echo "$as_me:4377: checking for dbmalloc.h" >&5 -+ echo "$as_me:4380: checking for dbmalloc.h" >&5 - echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 - if test "${ac_cv_header_dbmalloc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 4383 "configure" -+#line 4386 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:4387: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:4390: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:4393: \$? = $ac_status" >&5 -+ echo "$as_me:4396: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -4409,11 +4412,11 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:4412: result: $ac_cv_header_dbmalloc_h" >&5 -+echo "$as_me:4415: result: $ac_cv_header_dbmalloc_h" >&5 - echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 - if test $ac_cv_header_dbmalloc_h = yes; then - --echo "$as_me:4416: checking for debug_malloc in -ldbmalloc" >&5 -+echo "$as_me:4419: checking for debug_malloc in -ldbmalloc" >&5 - echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 - if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4421,7 +4424,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldbmalloc $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 4424 "configure" -+#line 4427 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -4440,16 +4443,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:4443: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:4446: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:4446: \$? = $ac_status" >&5 -+ echo "$as_me:4449: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:4449: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4452: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4452: \$? = $ac_status" >&5 -+ echo "$as_me:4455: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dbmalloc_debug_malloc=yes - else -@@ -4460,7 +4463,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:4463: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 -+echo "$as_me:4466: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 - echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 - if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:4481: checking if you want to use valgrind for testing" >&5 - echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 - - # Check whether --with-valgrind or --without-valgrind was given. -@@ -4491,7 +4494,7 @@ - else - with_valgrind= - fi; --echo "$as_me:4494: result: ${with_valgrind:-no}" >&5 -+echo "$as_me:4497: result: ${with_valgrind:-no}" >&5 - echo "${ECHO_T}${with_valgrind:-no}" >&6 - - case .$with_cflags in #(vi -@@ -4584,7 +4587,7 @@ - ;; - esac - --echo "$as_me:4587: checking if you want to perform memory-leak testing" >&5 -+echo "$as_me:4590: checking if you want to perform memory-leak testing" >&5 - echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 - - # Check whether --enable-leaks or --disable-leaks was given. -@@ -4594,7 +4597,7 @@ - else - : ${with_no_leaks:=no} - fi; --echo "$as_me:4597: result: $with_no_leaks" >&5 -+echo "$as_me:4600: result: $with_no_leaks" >&5 - echo "${ECHO_T}$with_no_leaks" >&6 - - if test "$with_no_leaks" = yes ; then -@@ -4608,7 +4611,7 @@ - - fi - --echo "$as_me:4611: checking for specific curses-directory" >&5 -+echo "$as_me:4614: checking for specific curses-directory" >&5 - echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6 - - # Check whether --with-curses-dir or --without-curses-dir was given. -@@ -4618,7 +4621,7 @@ - else - cf_cv_curses_dir=no - fi; --echo "$as_me:4621: result: $cf_cv_curses_dir" >&5 -+echo "$as_me:4624: result: $cf_cv_curses_dir" >&5 - echo "${ECHO_T}$cf_cv_curses_dir" >&6 - - if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" ) -@@ -4649,7 +4652,7 @@ - withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:4652: error: expected a pathname, not \"$withval\"" >&5 -+ { { echo "$as_me:4655: error: expected a pathname, not \"$withval\"" >&5 - echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -4682,7 +4685,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 4685 "configure" -+#line 4688 "configure" - #include "confdefs.h" - #include - int -@@ -4694,16 +4697,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4697: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4700: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4700: \$? = $ac_status" >&5 -+ echo "$as_me:4703: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4703: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4706: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4706: \$? = $ac_status" >&5 -+ echo "$as_me:4709: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -4720,7 +4723,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:4723: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:4726: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -4754,7 +4757,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:4757: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:4760: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -4795,7 +4798,7 @@ - case $cf_cv_screen in - curses) - --echo "$as_me:4798: checking for extra include directories" >&5 -+echo "$as_me:4801: checking for extra include directories" >&5 - echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6 - if test "${cf_cv_curses_incdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4815,11 +4818,11 @@ - esac - - fi --echo "$as_me:4818: result: $cf_cv_curses_incdir" >&5 -+echo "$as_me:4821: result: $cf_cv_curses_incdir" >&5 - echo "${ECHO_T}$cf_cv_curses_incdir" >&6 - test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir" - --echo "$as_me:4822: checking if we have identified curses headers" >&5 -+echo "$as_me:4825: checking if we have identified curses headers" >&5 - echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 - if test "${cf_cv_ncurses_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4831,7 +4834,7 @@ - ncurses.h ncurses/curses.h ncurses/ncurses.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 4834 "configure" -+#line 4837 "configure" - #include "confdefs.h" - #include <${cf_header}> - int -@@ -4843,16 +4846,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4846: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4849: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4849: \$? = $ac_status" >&5 -+ echo "$as_me:4852: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4852: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4855: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4855: \$? = $ac_status" >&5 -+ echo "$as_me:4858: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_header=$cf_header; break - else -@@ -4863,11 +4866,11 @@ - done - - fi --echo "$as_me:4866: result: $cf_cv_ncurses_header" >&5 -+echo "$as_me:4869: result: $cf_cv_ncurses_header" >&5 - echo "${ECHO_T}$cf_cv_ncurses_header" >&6 - - if test "$cf_cv_ncurses_header" = none ; then -- { { echo "$as_me:4870: error: No curses header-files found" >&5 -+ { { echo "$as_me:4873: error: No curses header-files found" >&5 - echo "$as_me: error: No curses header-files found" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -4877,23 +4880,23 @@ - for ac_header in $cf_cv_ncurses_header - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:4880: checking for $ac_header" >&5 -+echo "$as_me:4883: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 4886 "configure" -+#line 4889 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:4890: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:4893: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:4896: \$? = $ac_status" >&5 -+ echo "$as_me:4899: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -4912,7 +4915,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:4915: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:4918: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:4928: checking for terminfo header" >&5 - echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 - if test "${cf_cv_term_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -4940,7 +4943,7 @@ - for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" - do - cat >conftest.$ac_ext <<_ACEOF --#line 4943 "configure" -+#line 4946 "configure" - #include "confdefs.h" - #include - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -4955,16 +4958,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:4958: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:4961: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:4961: \$? = $ac_status" >&5 -+ echo "$as_me:4964: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:4964: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:4967: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:4967: \$? = $ac_status" >&5 -+ echo "$as_me:4970: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_term_header="$cf_test" -@@ -4980,7 +4983,7 @@ - done - - fi --echo "$as_me:4983: result: $cf_cv_term_header" >&5 -+echo "$as_me:4986: result: $cf_cv_term_header" >&5 - echo "${ECHO_T}$cf_cv_term_header" >&6 - - # Set definitions to allow ifdef'ing to accommodate subdirectories -@@ -5009,7 +5012,7 @@ - ;; - esac - --echo "$as_me:5012: checking for ncurses version" >&5 -+echo "$as_me:5015: checking for ncurses version" >&5 - echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 - if test "${cf_cv_ncurses_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5035,10 +5038,10 @@ - #endif - EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" -- { (eval echo "$as_me:5038: \"$cf_try\"") >&5 -+ { (eval echo "$as_me:5041: \"$cf_try\"") >&5 - (eval $cf_try) 2>&5 - ac_status=$? -- echo "$as_me:5041: \$? = $ac_status" >&5 -+ echo "$as_me:5044: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f conftest.out ; then - cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` -@@ -5048,7 +5051,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 5051 "configure" -+#line 5054 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -5073,15 +5076,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:5076: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5079: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5079: \$? = $ac_status" >&5 -+ echo "$as_me:5082: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:5081: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5084: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5084: \$? = $ac_status" >&5 -+ echo "$as_me:5087: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_ncurses_version=`cat $cf_tempfile` -@@ -5095,16 +5098,16 @@ - rm -f $cf_tempfile - - fi --echo "$as_me:5098: result: $cf_cv_ncurses_version" >&5 -+echo "$as_me:5101: result: $cf_cv_ncurses_version" >&5 - echo "${ECHO_T}$cf_cv_ncurses_version" >&6 - test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF - #define NCURSES 1 - EOF - --echo "$as_me:5104: checking if we have identified curses libraries" >&5 -+echo "$as_me:5107: checking if we have identified curses libraries" >&5 - echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 5107 "configure" -+#line 5110 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5116,16 +5119,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5119: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5122: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5122: \$? = $ac_status" >&5 -+ echo "$as_me:5125: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5125: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5128: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5128: \$? = $ac_status" >&5 -+ echo "$as_me:5131: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -5134,13 +5137,13 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext --echo "$as_me:5137: result: $cf_result" >&5 -+echo "$as_me:5140: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - - if test "$cf_result" = no ; then - case $host_os in #(vi - freebsd*) #(vi -- echo "$as_me:5143: checking for tgoto in -lmytinfo" >&5 -+ echo "$as_me:5146: checking for tgoto in -lmytinfo" >&5 - echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 - if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5148,7 +5151,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lmytinfo $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5151 "configure" -+#line 5154 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5167,16 +5170,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5170: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5173: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5173: \$? = $ac_status" >&5 -+ echo "$as_me:5176: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5176: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5179: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5179: \$? = $ac_status" >&5 -+ echo "$as_me:5182: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_mytinfo_tgoto=yes - else -@@ -5187,7 +5190,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5190: result: $ac_cv_lib_mytinfo_tgoto" >&5 -+echo "$as_me:5193: result: $ac_cv_lib_mytinfo_tgoto" >&5 - echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 - if test $ac_cv_lib_mytinfo_tgoto = yes; then - LIBS="-lmytinfo $LIBS" -@@ -5195,7 +5198,7 @@ - - ;; - hpux10.*) #(vi -- echo "$as_me:5198: checking for initscr in -lcur_colr" >&5 -+ echo "$as_me:5201: checking for initscr in -lcur_colr" >&5 - echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6 - if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5203,7 +5206,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lcur_colr $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5206 "configure" -+#line 5209 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5222,16 +5225,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5225: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5228: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5228: \$? = $ac_status" >&5 -+ echo "$as_me:5231: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5231: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5234: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5234: \$? = $ac_status" >&5 -+ echo "$as_me:5237: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_cur_colr_initscr=yes - else -@@ -5242,7 +5245,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5245: result: $ac_cv_lib_cur_colr_initscr" >&5 -+echo "$as_me:5248: result: $ac_cv_lib_cur_colr_initscr" >&5 - echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6 - if test $ac_cv_lib_cur_colr_initscr = yes; then - -@@ -5251,7 +5254,7 @@ - - else - -- echo "$as_me:5254: checking for initscr in -lHcurses" >&5 -+ echo "$as_me:5257: checking for initscr in -lHcurses" >&5 - echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6 - if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5259,7 +5262,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lHcurses $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5262 "configure" -+#line 5265 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5278,16 +5281,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5281: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5284: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5284: \$? = $ac_status" >&5 -+ echo "$as_me:5287: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5287: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5290: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5290: \$? = $ac_status" >&5 -+ echo "$as_me:5293: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_Hcurses_initscr=yes - else -@@ -5298,7 +5301,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5301: result: $ac_cv_lib_Hcurses_initscr" >&5 -+echo "$as_me:5304: result: $ac_cv_lib_Hcurses_initscr" >&5 - echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6 - if test $ac_cv_lib_Hcurses_initscr = yes; then - -@@ -5312,7 +5315,71 @@ - fi - - ;; --linux*) # Suse Linux does not follow /usr/lib convention -+linux*) -+ case `arch 2>/dev/null` in -+ x86_64) -+ if test -d /lib64 -+ then -+ -+if test -n "/lib64" ; then -+ for cf_add_libdir in /lib64 -+ do -+ if test $cf_add_libdir = /usr/lib ; then -+ : -+ elif test -d $cf_add_libdir -+ then -+ cf_have_libdir=no -+ if test -n "$LDFLAGS$LIBS" ; then -+ # a loop is needed to ensure we can add subdirs of existing dirs -+ for cf_test_libdir in $LDFLAGS $LIBS ; do -+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then -+ cf_have_libdir=yes; break -+ fi -+ done -+ fi -+ if test "$cf_have_libdir" = no ; then -+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -+ -+echo "${as_me:-configure}:5343: testing adding $cf_add_libdir to library-path ..." 1>&5 -+ -+ LDFLAGS="-L$cf_add_libdir $LDFLAGS" -+ fi -+ fi -+ done -+fi -+ -+ else -+ -+if test -n "/lib" ; then -+ for cf_add_libdir in /lib -+ do -+ if test $cf_add_libdir = /usr/lib ; then -+ : -+ elif test -d $cf_add_libdir -+ then -+ cf_have_libdir=no -+ if test -n "$LDFLAGS$LIBS" ; then -+ # a loop is needed to ensure we can add subdirs of existing dirs -+ for cf_test_libdir in $LDFLAGS $LIBS ; do -+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then -+ cf_have_libdir=yes; break -+ fi -+ done -+ fi -+ if test "$cf_have_libdir" = no ; then -+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -+ -+echo "${as_me:-configure}:5372: testing adding $cf_add_libdir to library-path ..." 1>&5 -+ -+ LDFLAGS="-L$cf_add_libdir $LDFLAGS" -+ fi -+ fi -+ done -+fi -+ -+ fi -+ ;; -+ *) - - if test -n "/lib" ; then - for cf_add_libdir in /lib -@@ -5333,7 +5400,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:5336: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:5403: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -5341,6 +5408,8 @@ - done - fi - -+ ;; -+ esac - ;; - sunos3*|sunos4*) - if test -d /usr/5lib ; then -@@ -5364,7 +5433,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:5367: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:5436: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -5392,13 +5461,13 @@ - - # Check for library containing tgoto. Do this before curses library - # because it may be needed to link the test-case for initscr. -- echo "$as_me:5395: checking for tgoto" >&5 -+ echo "$as_me:5464: checking for tgoto" >&5 - echo $ECHO_N "checking for tgoto... $ECHO_C" >&6 - if test "${ac_cv_func_tgoto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 5401 "configure" -+#line 5470 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char tgoto (); below. */ -@@ -5429,16 +5498,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5432: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5501: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5435: \$? = $ac_status" >&5 -+ echo "$as_me:5504: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5438: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5507: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5441: \$? = $ac_status" >&5 -+ echo "$as_me:5510: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_tgoto=yes - else -@@ -5448,7 +5517,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:5451: result: $ac_cv_func_tgoto" >&5 -+echo "$as_me:5520: result: $ac_cv_func_tgoto" >&5 - echo "${ECHO_T}$ac_cv_func_tgoto" >&6 - if test $ac_cv_func_tgoto = yes; then - cf_term_lib=predefined -@@ -5457,7 +5526,7 @@ - for cf_term_lib in $cf_check_list termcap termlib unknown - do - as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh` --echo "$as_me:5460: checking for tgoto in -l$cf_term_lib" >&5 -+echo "$as_me:5529: checking for tgoto in -l$cf_term_lib" >&5 - echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Lib+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5465,7 +5534,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-l$cf_term_lib $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5468 "configure" -+#line 5537 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5484,16 +5553,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5487: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5556: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5490: \$? = $ac_status" >&5 -+ echo "$as_me:5559: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5493: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5562: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5496: \$? = $ac_status" >&5 -+ echo "$as_me:5565: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" - else -@@ -5504,7 +5573,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5507: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -+echo "$as_me:5576: result: `eval echo '${'$as_ac_Lib'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 - if test `eval echo '${'$as_ac_Lib'}'` = yes; then - break -@@ -5519,7 +5588,7 @@ - for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown - do - as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh` --echo "$as_me:5522: checking for initscr in -l$cf_curs_lib" >&5 -+echo "$as_me:5591: checking for initscr in -l$cf_curs_lib" >&5 - echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Lib+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5527,7 +5596,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-l$cf_curs_lib $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5530 "configure" -+#line 5599 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -5546,16 +5615,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5549: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5618: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5552: \$? = $ac_status" >&5 -+ echo "$as_me:5621: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5555: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5624: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5558: \$? = $ac_status" >&5 -+ echo "$as_me:5627: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" - else -@@ -5566,23 +5635,23 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:5569: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -+echo "$as_me:5638: result: `eval echo '${'$as_ac_Lib'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 - if test `eval echo '${'$as_ac_Lib'}'` = yes; then - break - fi - - done -- test $cf_curs_lib = unknown && { { echo "$as_me:5576: error: no curses library found" >&5 -+ test $cf_curs_lib = unknown && { { echo "$as_me:5645: error: no curses library found" >&5 - echo "$as_me: error: no curses library found" >&2;} - { (exit 1); exit 1; }; } - - LIBS="-l$cf_curs_lib $cf_save_LIBS" - if test "$cf_term_lib" = unknown ; then -- echo "$as_me:5582: checking if we can link with $cf_curs_lib library" >&5 -+ echo "$as_me:5651: checking if we can link with $cf_curs_lib library" >&5 - echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 5585 "configure" -+#line 5654 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5594,16 +5663,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5597: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5666: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5600: \$? = $ac_status" >&5 -+ echo "$as_me:5669: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5603: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5672: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5606: \$? = $ac_status" >&5 -+ echo "$as_me:5675: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -5612,18 +5681,18 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- echo "$as_me:5615: result: $cf_result" >&5 -+ echo "$as_me:5684: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 -- test $cf_result = no && { { echo "$as_me:5617: error: Cannot link curses library" >&5 -+ test $cf_result = no && { { echo "$as_me:5686: error: Cannot link curses library" >&5 - echo "$as_me: error: Cannot link curses library" >&2;} - { (exit 1); exit 1; }; } - elif test "$cf_curs_lib" = "$cf_term_lib" ; then - : - elif test "$cf_term_lib" != predefined ; then -- echo "$as_me:5623: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 -+ echo "$as_me:5692: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 - echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 5626 "configure" -+#line 5695 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5635,16 +5704,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5638: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5707: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5641: \$? = $ac_status" >&5 -+ echo "$as_me:5710: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5644: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5713: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5647: \$? = $ac_status" >&5 -+ echo "$as_me:5716: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=no - else -@@ -5653,7 +5722,7 @@ - - LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 5656 "configure" -+#line 5725 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -5665,16 +5734,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:5668: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:5737: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:5671: \$? = $ac_status" >&5 -+ echo "$as_me:5740: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:5674: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5743: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5677: \$? = $ac_status" >&5 -+ echo "$as_me:5746: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -5686,20 +5755,20 @@ - - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- echo "$as_me:5689: result: $cf_result" >&5 -+ echo "$as_me:5758: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - fi - fi - fi - --echo "$as_me:5695: checking for NetBSD form.h" >&5 -+echo "$as_me:5764: checking for NetBSD form.h" >&5 - echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6 - if test "${cf_cv_netbsd_form_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 5702 "configure" -+#line 5771 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -5718,16 +5787,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5721: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5790: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5724: \$? = $ac_status" >&5 -+ echo "$as_me:5793: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5727: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5796: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5730: \$? = $ac_status" >&5 -+ echo "$as_me:5799: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_netbsd_form_h=yes - -@@ -5739,21 +5808,21 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:5742: result: $cf_cv_netbsd_form_h" >&5 -+echo "$as_me:5811: result: $cf_cv_netbsd_form_h" >&5 - echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6 - - test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF - #define HAVE_NETBSD_FORM_H 1 - EOF - --echo "$as_me:5749: checking for NetBSD menu.h" >&5 -+echo "$as_me:5818: checking for NetBSD menu.h" >&5 - echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6 - if test "${cf_cv_netbsd_menu_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 5756 "configure" -+#line 5825 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -5771,16 +5840,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5774: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5843: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5777: \$? = $ac_status" >&5 -+ echo "$as_me:5846: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5780: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5849: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5783: \$? = $ac_status" >&5 -+ echo "$as_me:5852: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_netbsd_menu_h=yes - -@@ -5792,7 +5861,7 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:5795: result: $cf_cv_netbsd_menu_h" >&5 -+echo "$as_me:5864: result: $cf_cv_netbsd_menu_h" >&5 - echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6 - - test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF -@@ -5809,7 +5878,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:5812: checking for $ac_word" >&5 -+echo "$as_me:5881: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5826,7 +5895,7 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:5829: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:5898: found $ac_dir/$ac_word" >&5 - break - fi - done -@@ -5837,10 +5906,10 @@ - NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG - - if test -n "$NCURSES_CONFIG"; then -- echo "$as_me:5840: result: $NCURSES_CONFIG" >&5 -+ echo "$as_me:5909: result: $NCURSES_CONFIG" >&5 - echo "${ECHO_T}$NCURSES_CONFIG" >&6 - else -- echo "$as_me:5843: result: no" >&5 -+ echo "$as_me:5912: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -5855,7 +5924,7 @@ - - # even with config script, some packages use no-override for curses.h - --echo "$as_me:5858: checking if we have identified curses headers" >&5 -+echo "$as_me:5927: checking if we have identified curses headers" >&5 - echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 - if test "${cf_cv_ncurses_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -5869,7 +5938,7 @@ - ncurses.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 5872 "configure" -+#line 5941 "configure" - #include "confdefs.h" - #include <${cf_header}> - int -@@ -5881,16 +5950,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:5884: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:5953: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:5887: \$? = $ac_status" >&5 -+ echo "$as_me:5956: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:5890: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:5959: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:5893: \$? = $ac_status" >&5 -+ echo "$as_me:5962: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_header=$cf_header; break - else -@@ -5901,11 +5970,11 @@ - done - - fi --echo "$as_me:5904: result: $cf_cv_ncurses_header" >&5 -+echo "$as_me:5973: result: $cf_cv_ncurses_header" >&5 - echo "${ECHO_T}$cf_cv_ncurses_header" >&6 - - if test "$cf_cv_ncurses_header" = none ; then -- { { echo "$as_me:5908: error: No curses header-files found" >&5 -+ { { echo "$as_me:5977: error: No curses header-files found" >&5 - echo "$as_me: error: No curses header-files found" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -5915,23 +5984,23 @@ - for ac_header in $cf_cv_ncurses_header - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:5918: checking for $ac_header" >&5 -+echo "$as_me:5987: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 5924 "configure" -+#line 5993 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:5928: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:5997: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:5934: \$? = $ac_status" >&5 -+ echo "$as_me:6003: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -5950,7 +6019,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:5953: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:6022: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <conftest.$ac_ext <<_ACEOF --#line 6006 "configure" -+#line 6075 "configure" - #include "confdefs.h" - #include - int -@@ -6015,16 +6084,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6018: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6087: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6021: \$? = $ac_status" >&5 -+ echo "$as_me:6090: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6024: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6093: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6027: \$? = $ac_status" >&5 -+ echo "$as_me:6096: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -6041,7 +6110,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:6044: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:6113: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -6058,7 +6127,7 @@ - - } - --echo "$as_me:6061: checking for $cf_ncuhdr_root header in include-path" >&5 -+echo "$as_me:6130: checking for $cf_ncuhdr_root header in include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6070,7 +6139,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 6073 "configure" -+#line 6142 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -6094,16 +6163,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6097: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6166: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6100: \$? = $ac_status" >&5 -+ echo "$as_me:6169: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6103: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6172: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6106: \$? = $ac_status" >&5 -+ echo "$as_me:6175: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h=$cf_header - -@@ -6118,14 +6187,14 @@ - done - - fi --echo "$as_me:6121: result: $cf_cv_ncurses_h" >&5 -+echo "$as_me:6190: result: $cf_cv_ncurses_h" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h" >&6 - - if test "$cf_cv_ncurses_h" != no ; then - cf_cv_ncurses_header=$cf_cv_ncurses_h - else - --echo "$as_me:6128: checking for $cf_ncuhdr_root include-path" >&5 -+echo "$as_me:6197: checking for $cf_ncuhdr_root include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6265,7 +6334,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 6268 "configure" -+#line 6337 "configure" - #include "confdefs.h" - #include - int -@@ -6277,16 +6346,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6280: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6349: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6283: \$? = $ac_status" >&5 -+ echo "$as_me:6352: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6286: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6355: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6289: \$? = $ac_status" >&5 -+ echo "$as_me:6358: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -6303,7 +6372,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:6306: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:6375: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -6324,7 +6393,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 6327 "configure" -+#line 6396 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -6348,16 +6417,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6351: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6420: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6354: \$? = $ac_status" >&5 -+ echo "$as_me:6423: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6357: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6426: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6360: \$? = $ac_status" >&5 -+ echo "$as_me:6429: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h2=$cf_header - -@@ -6378,12 +6447,12 @@ - CPPFLAGS="$cf_save2_CPPFLAGS" - test "$cf_cv_ncurses_h2" != no && break - done -- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6381: error: not found" >&5 -+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6450: error: not found" >&5 - echo "$as_me: error: not found" >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:6386: result: $cf_cv_ncurses_h2" >&5 -+echo "$as_me:6455: result: $cf_cv_ncurses_h2" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 - - cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'` -@@ -6416,7 +6485,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 6419 "configure" -+#line 6488 "configure" - #include "confdefs.h" - #include - int -@@ -6428,16 +6497,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6431: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6500: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6434: \$? = $ac_status" >&5 -+ echo "$as_me:6503: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6437: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6506: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6440: \$? = $ac_status" >&5 -+ echo "$as_me:6509: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -6454,7 +6523,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:6457: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:6526: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -6497,7 +6566,7 @@ - ;; - esac - --echo "$as_me:6500: checking for terminfo header" >&5 -+echo "$as_me:6569: checking for terminfo header" >&5 - echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 - if test "${cf_cv_term_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6515,7 +6584,7 @@ - for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" - do - cat >conftest.$ac_ext <<_ACEOF --#line 6518 "configure" -+#line 6587 "configure" - #include "confdefs.h" - #include - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -6530,16 +6599,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:6533: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:6602: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:6536: \$? = $ac_status" >&5 -+ echo "$as_me:6605: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:6539: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6608: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6542: \$? = $ac_status" >&5 -+ echo "$as_me:6611: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_term_header="$cf_test" -@@ -6555,7 +6624,7 @@ - done - - fi --echo "$as_me:6558: result: $cf_cv_term_header" >&5 -+echo "$as_me:6627: result: $cf_cv_term_header" >&5 - echo "${ECHO_T}$cf_cv_term_header" >&6 - - # Set definitions to allow ifdef'ing to accommodate subdirectories -@@ -6589,7 +6658,7 @@ - #define NCURSES 1 - EOF - --echo "$as_me:6592: checking for ncurses version" >&5 -+echo "$as_me:6661: checking for ncurses version" >&5 - echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 - if test "${cf_cv_ncurses_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6615,10 +6684,10 @@ - #endif - EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" -- { (eval echo "$as_me:6618: \"$cf_try\"") >&5 -+ { (eval echo "$as_me:6687: \"$cf_try\"") >&5 - (eval $cf_try) 2>&5 - ac_status=$? -- echo "$as_me:6621: \$? = $ac_status" >&5 -+ echo "$as_me:6690: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f conftest.out ; then - cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` -@@ -6628,7 +6697,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 6631 "configure" -+#line 6700 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -6653,15 +6722,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:6656: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6725: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6659: \$? = $ac_status" >&5 -+ echo "$as_me:6728: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:6661: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6730: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6664: \$? = $ac_status" >&5 -+ echo "$as_me:6733: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_ncurses_version=`cat $cf_tempfile` -@@ -6675,7 +6744,7 @@ - rm -f $cf_tempfile - - fi --echo "$as_me:6678: result: $cf_cv_ncurses_version" >&5 -+echo "$as_me:6747: result: $cf_cv_ncurses_version" >&5 - echo "${ECHO_T}$cf_cv_ncurses_version" >&6 - test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF - #define NCURSES 1 -@@ -6687,7 +6756,7 @@ - # to link gpm. - cf_ncurses_LIBS="" - cf_ncurses_SAVE="$LIBS" --echo "$as_me:6690: checking for Gpm_Open in -lgpm" >&5 -+echo "$as_me:6759: checking for Gpm_Open in -lgpm" >&5 - echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6695,7 +6764,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6698 "configure" -+#line 6767 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -6714,16 +6783,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6717: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6786: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6720: \$? = $ac_status" >&5 -+ echo "$as_me:6789: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6723: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6792: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6726: \$? = $ac_status" >&5 -+ echo "$as_me:6795: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_Gpm_Open=yes - else -@@ -6734,10 +6803,10 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:6737: result: $ac_cv_lib_gpm_Gpm_Open" >&5 -+echo "$as_me:6806: result: $ac_cv_lib_gpm_Gpm_Open" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 - if test $ac_cv_lib_gpm_Gpm_Open = yes; then -- echo "$as_me:6740: checking for initscr in -lgpm" >&5 -+ echo "$as_me:6809: checking for initscr in -lgpm" >&5 - echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6745,7 +6814,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6748 "configure" -+#line 6817 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -6764,16 +6833,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6767: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6836: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6770: \$? = $ac_status" >&5 -+ echo "$as_me:6839: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6773: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6842: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6776: \$? = $ac_status" >&5 -+ echo "$as_me:6845: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_initscr=yes - else -@@ -6784,7 +6853,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:6787: result: $ac_cv_lib_gpm_initscr" >&5 -+echo "$as_me:6856: result: $ac_cv_lib_gpm_initscr" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 - if test $ac_cv_lib_gpm_initscr = yes; then - LIBS="$cf_ncurses_SAVE" -@@ -6799,7 +6868,7 @@ - # This is only necessary if you are linking against an obsolete - # version of ncurses (but it should do no harm, since it's static). - if test "$cf_nculib_root" = ncurses ; then -- echo "$as_me:6802: checking for tgoto in -lmytinfo" >&5 -+ echo "$as_me:6871: checking for tgoto in -lmytinfo" >&5 - echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 - if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -6807,7 +6876,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lmytinfo $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6810 "configure" -+#line 6879 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -6826,16 +6895,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6829: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6898: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6832: \$? = $ac_status" >&5 -+ echo "$as_me:6901: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6835: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6904: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6838: \$? = $ac_status" >&5 -+ echo "$as_me:6907: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_mytinfo_tgoto=yes - else -@@ -6846,7 +6915,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:6849: result: $ac_cv_lib_mytinfo_tgoto" >&5 -+echo "$as_me:6918: result: $ac_cv_lib_mytinfo_tgoto" >&5 - echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 - if test $ac_cv_lib_mytinfo_tgoto = yes; then - cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" -@@ -6865,13 +6934,13 @@ - - eval 'cf_cv_have_lib_'$cf_nculib_root'=no' - cf_libdir="" -- echo "$as_me:6868: checking for initscr" >&5 -+ echo "$as_me:6937: checking for initscr" >&5 - echo $ECHO_N "checking for initscr... $ECHO_C" >&6 - if test "${ac_cv_func_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 6874 "configure" -+#line 6943 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char initscr (); below. */ -@@ -6902,16 +6971,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6905: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:6974: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6908: \$? = $ac_status" >&5 -+ echo "$as_me:6977: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6911: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:6980: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6914: \$? = $ac_status" >&5 -+ echo "$as_me:6983: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_initscr=yes - else -@@ -6921,18 +6990,18 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:6924: result: $ac_cv_func_initscr" >&5 -+echo "$as_me:6993: result: $ac_cv_func_initscr" >&5 - echo "${ECHO_T}$ac_cv_func_initscr" >&6 - if test $ac_cv_func_initscr = yes; then - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - else - - cf_save_LIBS="$LIBS" -- echo "$as_me:6931: checking for initscr in -l$cf_nculib_root" >&5 -+ echo "$as_me:7000: checking for initscr in -l$cf_nculib_root" >&5 - echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 - LIBS="-l$cf_nculib_root $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 6935 "configure" -+#line 7004 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -6944,25 +7013,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:6947: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7016: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:6950: \$? = $ac_status" >&5 -+ echo "$as_me:7019: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:6953: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7022: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:6956: \$? = $ac_status" >&5 -+ echo "$as_me:7025: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:6958: result: yes" >&5 -+ echo "$as_me:7027: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:6965: result: no" >&5 -+echo "$as_me:7034: result: no" >&5 - echo "${ECHO_T}no" >&6 - - cf_search= -@@ -7052,11 +7121,11 @@ - - for cf_libdir in $cf_search - do -- echo "$as_me:7055: checking for -l$cf_nculib_root in $cf_libdir" >&5 -+ echo "$as_me:7124: checking for -l$cf_nculib_root in $cf_libdir" >&5 - echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 - LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 7059 "configure" -+#line 7128 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -7068,25 +7137,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7071: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7140: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7074: \$? = $ac_status" >&5 -+ echo "$as_me:7143: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7077: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7146: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7080: \$? = $ac_status" >&5 -+ echo "$as_me:7149: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:7082: result: yes" >&5 -+ echo "$as_me:7151: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - break - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:7089: result: no" >&5 -+echo "$as_me:7158: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_save_LIBS" - fi -@@ -7101,7 +7170,7 @@ - eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root - - if test $cf_found_library = no ; then -- { { echo "$as_me:7104: error: Cannot link $cf_nculib_root library" >&5 -+ { { echo "$as_me:7173: error: Cannot link $cf_nculib_root library" >&5 - echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -7109,7 +7178,7 @@ - fi - - if test -n "$cf_ncurses_LIBS" ; then -- echo "$as_me:7112: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 -+ echo "$as_me:7181: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 - echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 - cf_ncurses_SAVE="$LIBS" - for p in $cf_ncurses_LIBS ; do -@@ -7119,7 +7188,7 @@ - fi - done - cat >conftest.$ac_ext <<_ACEOF --#line 7122 "configure" -+#line 7191 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -7131,23 +7200,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7134: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7203: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7137: \$? = $ac_status" >&5 -+ echo "$as_me:7206: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7140: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7209: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7143: \$? = $ac_status" >&5 -+ echo "$as_me:7212: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:7145: result: yes" >&5 -+ echo "$as_me:7214: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:7150: result: no" >&5 -+echo "$as_me:7219: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_ncurses_SAVE" - fi -@@ -7166,7 +7235,7 @@ - ncursesw) - cf_cv_libtype=w - --echo "$as_me:7169: checking for multibyte character support" >&5 -+echo "$as_me:7238: checking for multibyte character support" >&5 - echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6 - if test "${cf_cv_utf8_lib+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -7174,7 +7243,7 @@ - - cf_save_LIBS="$LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 7177 "configure" -+#line 7246 "configure" - #include "confdefs.h" - - #include -@@ -7187,16 +7256,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7190: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7259: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7193: \$? = $ac_status" >&5 -+ echo "$as_me:7262: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7196: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7265: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7199: \$? = $ac_status" >&5 -+ echo "$as_me:7268: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_utf8_lib=yes - else -@@ -7208,12 +7277,12 @@ - cf_cv_header_path_utf8= - cf_cv_library_path_utf8= - --echo "${as_me:-configure}:7211: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 -+echo "${as_me:-configure}:7280: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 - - cf_save_LIBS="$LIBS" - - cat >conftest.$ac_ext <<_ACEOF --#line 7216 "configure" -+#line 7285 "configure" - #include "confdefs.h" - - #include -@@ -7226,16 +7295,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7229: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7298: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7232: \$? = $ac_status" >&5 -+ echo "$as_me:7301: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7235: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7304: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7238: \$? = $ac_status" >&5 -+ echo "$as_me:7307: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_find_linkage_utf8=yes -@@ -7249,7 +7318,7 @@ - LIBS="-lutf8 $cf_save_LIBS" - - cat >conftest.$ac_ext <<_ACEOF --#line 7252 "configure" -+#line 7321 "configure" - #include "confdefs.h" - - #include -@@ -7262,16 +7331,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7265: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7334: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7268: \$? = $ac_status" >&5 -+ echo "$as_me:7337: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7271: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7340: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7274: \$? = $ac_status" >&5 -+ echo "$as_me:7343: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_find_linkage_utf8=yes -@@ -7288,9 +7357,9 @@ - - test -n "$verbose" && echo " find linkage for utf8 library" 1>&6 - --echo "${as_me:-configure}:7291: testing find linkage for utf8 library ..." 1>&5 -+echo "${as_me:-configure}:7360: testing find linkage for utf8 library ..." 1>&5 - --echo "${as_me:-configure}:7293: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 -+echo "${as_me:-configure}:7362: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 - - cf_save_CPPFLAGS="$CPPFLAGS" - cf_test_CPPFLAGS="$CPPFLAGS" -@@ -7403,11 +7472,11 @@ - if test -d $cf_cv_header_path_utf8 ; then - test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6 - --echo "${as_me:-configure}:7406: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:7475: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 - - CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8" - cat >conftest.$ac_ext <<_ACEOF --#line 7410 "configure" -+#line 7479 "configure" - #include "confdefs.h" - - #include -@@ -7420,21 +7489,21 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7423: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7492: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7426: \$? = $ac_status" >&5 -+ echo "$as_me:7495: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7429: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7498: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7432: \$? = $ac_status" >&5 -+ echo "$as_me:7501: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6 - --echo "${as_me:-configure}:7437: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:7506: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 - - cf_cv_find_linkage_utf8=maybe - cf_test_CPPFLAGS="$CPPFLAGS" -@@ -7452,7 +7521,7 @@ - - if test "$cf_cv_find_linkage_utf8" = maybe ; then - --echo "${as_me:-configure}:7455: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 -+echo "${as_me:-configure}:7524: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 - - cf_save_LIBS="$LIBS" - cf_save_LDFLAGS="$LDFLAGS" -@@ -7549,13 +7618,13 @@ - if test -d $cf_cv_library_path_utf8 ; then - test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6 - --echo "${as_me:-configure}:7552: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:7621: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 - - CPPFLAGS="$cf_test_CPPFLAGS" - LIBS="-lutf8 $cf_save_LIBS" - LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8" - cat >conftest.$ac_ext <<_ACEOF --#line 7558 "configure" -+#line 7627 "configure" - #include "confdefs.h" - - #include -@@ -7568,21 +7637,21 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:7571: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:7640: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:7574: \$? = $ac_status" >&5 -+ echo "$as_me:7643: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:7577: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7646: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7580: \$? = $ac_status" >&5 -+ echo "$as_me:7649: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6 - --echo "${as_me:-configure}:7585: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 -+echo "${as_me:-configure}:7654: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 - - cf_cv_find_linkage_utf8=yes - cf_cv_library_file_utf8="-lutf8" -@@ -7624,7 +7693,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:7627: result: $cf_cv_utf8_lib" >&5 -+echo "$as_me:7696: result: $cf_cv_utf8_lib" >&5 - echo "${ECHO_T}$cf_cv_utf8_lib" >&6 - - # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between -@@ -7658,7 +7727,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 7661 "configure" -+#line 7730 "configure" - #include "confdefs.h" - #include - int -@@ -7670,16 +7739,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7673: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7742: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7676: \$? = $ac_status" >&5 -+ echo "$as_me:7745: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7679: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7748: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7682: \$? = $ac_status" >&5 -+ echo "$as_me:7751: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -7696,7 +7765,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:7699: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:7768: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -7730,7 +7799,7 @@ - if test "$cf_have_libdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 - --echo "${as_me:-configure}:7733: testing adding $cf_add_libdir to library-path ..." 1>&5 -+echo "${as_me:-configure}:7802: testing adding $cf_add_libdir to library-path ..." 1>&5 - - LDFLAGS="-L$cf_add_libdir $LDFLAGS" - fi -@@ -7748,7 +7817,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:7751: checking for $ac_word" >&5 -+echo "$as_me:7820: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -7765,7 +7834,7 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:7768: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:7837: found $ac_dir/$ac_word" >&5 - break - fi - done -@@ -7776,10 +7845,10 @@ - NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG - - if test -n "$NCURSES_CONFIG"; then -- echo "$as_me:7779: result: $NCURSES_CONFIG" >&5 -+ echo "$as_me:7848: result: $NCURSES_CONFIG" >&5 - echo "${ECHO_T}$NCURSES_CONFIG" >&6 - else -- echo "$as_me:7782: result: no" >&5 -+ echo "$as_me:7851: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -7794,7 +7863,7 @@ - - # even with config script, some packages use no-override for curses.h - --echo "$as_me:7797: checking if we have identified curses headers" >&5 -+echo "$as_me:7866: checking if we have identified curses headers" >&5 - echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 - if test "${cf_cv_ncurses_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -7808,7 +7877,7 @@ - ncurses.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 7811 "configure" -+#line 7880 "configure" - #include "confdefs.h" - #include <${cf_header}> - int -@@ -7820,16 +7889,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7823: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:7892: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7826: \$? = $ac_status" >&5 -+ echo "$as_me:7895: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7829: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:7898: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7832: \$? = $ac_status" >&5 -+ echo "$as_me:7901: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_header=$cf_header; break - else -@@ -7840,11 +7909,11 @@ - done - - fi --echo "$as_me:7843: result: $cf_cv_ncurses_header" >&5 -+echo "$as_me:7912: result: $cf_cv_ncurses_header" >&5 - echo "${ECHO_T}$cf_cv_ncurses_header" >&6 - - if test "$cf_cv_ncurses_header" = none ; then -- { { echo "$as_me:7847: error: No curses header-files found" >&5 -+ { { echo "$as_me:7916: error: No curses header-files found" >&5 - echo "$as_me: error: No curses header-files found" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -7854,23 +7923,23 @@ - for ac_header in $cf_cv_ncurses_header - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:7857: checking for $ac_header" >&5 -+echo "$as_me:7926: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 7863 "configure" -+#line 7932 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:7867: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:7936: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:7873: \$? = $ac_status" >&5 -+ echo "$as_me:7942: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -7889,7 +7958,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:7892: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:7961: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <conftest.$ac_ext <<_ACEOF --#line 7945 "configure" -+#line 8014 "configure" - #include "confdefs.h" - #include - int -@@ -7954,16 +8023,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:7957: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8026: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:7960: \$? = $ac_status" >&5 -+ echo "$as_me:8029: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:7963: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8032: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:7966: \$? = $ac_status" >&5 -+ echo "$as_me:8035: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -7980,7 +8049,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:7983: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:8052: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -7997,7 +8066,7 @@ - - } - --echo "$as_me:8000: checking for $cf_ncuhdr_root header in include-path" >&5 -+echo "$as_me:8069: checking for $cf_ncuhdr_root header in include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8009,7 +8078,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 8012 "configure" -+#line 8081 "configure" - #include "confdefs.h" - - #define _XOPEN_SOURCE_EXTENDED -@@ -8041,16 +8110,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8044: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8047: \$? = $ac_status" >&5 -+ echo "$as_me:8116: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8050: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8119: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8053: \$? = $ac_status" >&5 -+ echo "$as_me:8122: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h=$cf_header - -@@ -8065,14 +8134,14 @@ - done - - fi --echo "$as_me:8068: result: $cf_cv_ncurses_h" >&5 -+echo "$as_me:8137: result: $cf_cv_ncurses_h" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h" >&6 - - if test "$cf_cv_ncurses_h" != no ; then - cf_cv_ncurses_header=$cf_cv_ncurses_h - else - --echo "$as_me:8075: checking for $cf_ncuhdr_root include-path" >&5 -+echo "$as_me:8144: checking for $cf_ncuhdr_root include-path" >&5 - echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 - if test "${cf_cv_ncurses_h2+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8212,7 +8281,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 8215 "configure" -+#line 8284 "configure" - #include "confdefs.h" - #include - int -@@ -8224,16 +8293,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8227: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8296: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8230: \$? = $ac_status" >&5 -+ echo "$as_me:8299: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8233: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8302: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8236: \$? = $ac_status" >&5 -+ echo "$as_me:8305: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -8250,7 +8319,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:8253: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:8322: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -8271,7 +8340,7 @@ - do - - cat >conftest.$ac_ext <<_ACEOF --#line 8274 "configure" -+#line 8343 "configure" - #include "confdefs.h" - - #include <$cf_header> -@@ -8295,16 +8364,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8298: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8367: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8301: \$? = $ac_status" >&5 -+ echo "$as_me:8370: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8304: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8373: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8307: \$? = $ac_status" >&5 -+ echo "$as_me:8376: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_h2=$cf_header - -@@ -8325,12 +8394,12 @@ - CPPFLAGS="$cf_save2_CPPFLAGS" - test "$cf_cv_ncurses_h2" != no && break - done -- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8328: error: not found" >&5 -+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8397: error: not found" >&5 - echo "$as_me: error: not found" >&2;} - { (exit 1); exit 1; }; } - - fi --echo "$as_me:8333: result: $cf_cv_ncurses_h2" >&5 -+echo "$as_me:8402: result: $cf_cv_ncurses_h2" >&5 - echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 - - cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'` -@@ -8363,7 +8432,7 @@ - cf_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - cat >conftest.$ac_ext <<_ACEOF --#line 8366 "configure" -+#line 8435 "configure" - #include "confdefs.h" - #include - int -@@ -8375,16 +8444,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8378: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8447: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8381: \$? = $ac_status" >&5 -+ echo "$as_me:8450: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8384: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8453: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8387: \$? = $ac_status" >&5 -+ echo "$as_me:8456: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -8401,7 +8470,7 @@ - if test "$cf_have_incdir" = no ; then - test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 - --echo "${as_me:-configure}:8404: testing adding $cf_add_incdir to include-path ..." 1>&5 -+echo "${as_me:-configure}:8473: testing adding $cf_add_incdir to include-path ..." 1>&5 - - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" - -@@ -8444,7 +8513,7 @@ - ;; - esac - --echo "$as_me:8447: checking for terminfo header" >&5 -+echo "$as_me:8516: checking for terminfo header" >&5 - echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 - if test "${cf_cv_term_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8462,7 +8531,7 @@ - for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" - do - cat >conftest.$ac_ext <<_ACEOF --#line 8465 "configure" -+#line 8534 "configure" - #include "confdefs.h" - #include - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -8477,16 +8546,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:8480: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:8549: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:8483: \$? = $ac_status" >&5 -+ echo "$as_me:8552: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:8486: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8555: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8489: \$? = $ac_status" >&5 -+ echo "$as_me:8558: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_term_header="$cf_test" -@@ -8502,7 +8571,7 @@ - done - - fi --echo "$as_me:8505: result: $cf_cv_term_header" >&5 -+echo "$as_me:8574: result: $cf_cv_term_header" >&5 - echo "${ECHO_T}$cf_cv_term_header" >&6 - - # Set definitions to allow ifdef'ing to accommodate subdirectories -@@ -8536,7 +8605,7 @@ - #define NCURSES 1 - EOF - --echo "$as_me:8539: checking for ncurses version" >&5 -+echo "$as_me:8608: checking for ncurses version" >&5 - echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 - if test "${cf_cv_ncurses_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8562,10 +8631,10 @@ - #endif - EOF - cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" -- { (eval echo "$as_me:8565: \"$cf_try\"") >&5 -+ { (eval echo "$as_me:8634: \"$cf_try\"") >&5 - (eval $cf_try) 2>&5 - ac_status=$? -- echo "$as_me:8568: \$? = $ac_status" >&5 -+ echo "$as_me:8637: \$? = $ac_status" >&5 - (exit $ac_status); } - if test -f conftest.out ; then - cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` -@@ -8575,7 +8644,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 8578 "configure" -+#line 8647 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -8600,15 +8669,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:8603: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8672: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8606: \$? = $ac_status" >&5 -+ echo "$as_me:8675: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:8608: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8677: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8611: \$? = $ac_status" >&5 -+ echo "$as_me:8680: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - - cf_cv_ncurses_version=`cat $cf_tempfile` -@@ -8622,7 +8691,7 @@ - rm -f $cf_tempfile - - fi --echo "$as_me:8625: result: $cf_cv_ncurses_version" >&5 -+echo "$as_me:8694: result: $cf_cv_ncurses_version" >&5 - echo "${ECHO_T}$cf_cv_ncurses_version" >&6 - test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF - #define NCURSES 1 -@@ -8634,7 +8703,7 @@ - # to link gpm. - cf_ncurses_LIBS="" - cf_ncurses_SAVE="$LIBS" --echo "$as_me:8637: checking for Gpm_Open in -lgpm" >&5 -+echo "$as_me:8706: checking for Gpm_Open in -lgpm" >&5 - echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8642,7 +8711,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 8645 "configure" -+#line 8714 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -8661,16 +8730,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:8664: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8733: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8667: \$? = $ac_status" >&5 -+ echo "$as_me:8736: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:8670: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8739: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8673: \$? = $ac_status" >&5 -+ echo "$as_me:8742: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_Gpm_Open=yes - else -@@ -8681,10 +8750,10 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:8684: result: $ac_cv_lib_gpm_Gpm_Open" >&5 -+echo "$as_me:8753: result: $ac_cv_lib_gpm_Gpm_Open" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 - if test $ac_cv_lib_gpm_Gpm_Open = yes; then -- echo "$as_me:8687: checking for initscr in -lgpm" >&5 -+ echo "$as_me:8756: checking for initscr in -lgpm" >&5 - echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 - if test "${ac_cv_lib_gpm_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8692,7 +8761,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lgpm $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 8695 "configure" -+#line 8764 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -8711,16 +8780,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:8714: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8783: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8717: \$? = $ac_status" >&5 -+ echo "$as_me:8786: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:8720: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8789: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8723: \$? = $ac_status" >&5 -+ echo "$as_me:8792: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gpm_initscr=yes - else -@@ -8731,7 +8800,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:8734: result: $ac_cv_lib_gpm_initscr" >&5 -+echo "$as_me:8803: result: $ac_cv_lib_gpm_initscr" >&5 - echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 - if test $ac_cv_lib_gpm_initscr = yes; then - LIBS="$cf_ncurses_SAVE" -@@ -8746,7 +8815,7 @@ - # This is only necessary if you are linking against an obsolete - # version of ncurses (but it should do no harm, since it's static). - if test "$cf_nculib_root" = ncurses ; then -- echo "$as_me:8749: checking for tgoto in -lmytinfo" >&5 -+ echo "$as_me:8818: checking for tgoto in -lmytinfo" >&5 - echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 - if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -8754,7 +8823,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lmytinfo $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 8757 "configure" -+#line 8826 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -8773,16 +8842,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:8776: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8845: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8779: \$? = $ac_status" >&5 -+ echo "$as_me:8848: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:8782: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8851: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8785: \$? = $ac_status" >&5 -+ echo "$as_me:8854: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_mytinfo_tgoto=yes - else -@@ -8793,7 +8862,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:8796: result: $ac_cv_lib_mytinfo_tgoto" >&5 -+echo "$as_me:8865: result: $ac_cv_lib_mytinfo_tgoto" >&5 - echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 - if test $ac_cv_lib_mytinfo_tgoto = yes; then - cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" -@@ -8812,13 +8881,13 @@ - - eval 'cf_cv_have_lib_'$cf_nculib_root'=no' - cf_libdir="" -- echo "$as_me:8815: checking for initscr" >&5 -+ echo "$as_me:8884: checking for initscr" >&5 - echo $ECHO_N "checking for initscr... $ECHO_C" >&6 - if test "${ac_cv_func_initscr+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 8821 "configure" -+#line 8890 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char initscr (); below. */ -@@ -8849,16 +8918,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:8852: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8921: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8855: \$? = $ac_status" >&5 -+ echo "$as_me:8924: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:8858: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8927: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8861: \$? = $ac_status" >&5 -+ echo "$as_me:8930: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_initscr=yes - else -@@ -8868,18 +8937,18 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:8871: result: $ac_cv_func_initscr" >&5 -+echo "$as_me:8940: result: $ac_cv_func_initscr" >&5 - echo "${ECHO_T}$ac_cv_func_initscr" >&6 - if test $ac_cv_func_initscr = yes; then - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - else - - cf_save_LIBS="$LIBS" -- echo "$as_me:8878: checking for initscr in -l$cf_nculib_root" >&5 -+ echo "$as_me:8947: checking for initscr in -l$cf_nculib_root" >&5 - echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 - LIBS="-l$cf_nculib_root $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 8882 "configure" -+#line 8951 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -8891,25 +8960,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:8894: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:8963: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:8897: \$? = $ac_status" >&5 -+ echo "$as_me:8966: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:8900: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:8969: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:8903: \$? = $ac_status" >&5 -+ echo "$as_me:8972: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:8905: result: yes" >&5 -+ echo "$as_me:8974: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:8912: result: no" >&5 -+echo "$as_me:8981: result: no" >&5 - echo "${ECHO_T}no" >&6 - - cf_search= -@@ -8999,11 +9068,11 @@ - - for cf_libdir in $cf_search - do -- echo "$as_me:9002: checking for -l$cf_nculib_root in $cf_libdir" >&5 -+ echo "$as_me:9071: checking for -l$cf_nculib_root in $cf_libdir" >&5 - echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 - LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9006 "configure" -+#line 9075 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -9015,25 +9084,25 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9018: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9087: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9021: \$? = $ac_status" >&5 -+ echo "$as_me:9090: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9024: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9093: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9027: \$? = $ac_status" >&5 -+ echo "$as_me:9096: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:9029: result: yes" >&5 -+ echo "$as_me:9098: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' - break - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:9036: result: no" >&5 -+echo "$as_me:9105: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_save_LIBS" - fi -@@ -9048,7 +9117,7 @@ - eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root - - if test $cf_found_library = no ; then -- { { echo "$as_me:9051: error: Cannot link $cf_nculib_root library" >&5 -+ { { echo "$as_me:9120: error: Cannot link $cf_nculib_root library" >&5 - echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -9056,7 +9125,7 @@ - fi - - if test -n "$cf_ncurses_LIBS" ; then -- echo "$as_me:9059: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 -+ echo "$as_me:9128: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 - echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 - cf_ncurses_SAVE="$LIBS" - for p in $cf_ncurses_LIBS ; do -@@ -9066,7 +9135,7 @@ - fi - done - cat >conftest.$ac_ext <<_ACEOF --#line 9069 "configure" -+#line 9138 "configure" - #include "confdefs.h" - #include <${cf_cv_ncurses_header:-curses.h}> - int -@@ -9078,23 +9147,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9081: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9150: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9084: \$? = $ac_status" >&5 -+ echo "$as_me:9153: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9087: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9156: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9090: \$? = $ac_status" >&5 -+ echo "$as_me:9159: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then -- echo "$as_me:9092: result: yes" >&5 -+ echo "$as_me:9161: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:9097: result: no" >&5 -+echo "$as_me:9166: result: no" >&5 - echo "${ECHO_T}no" >&6 - LIBS="$cf_ncurses_SAVE" - fi -@@ -9112,7 +9181,7 @@ - ;; - pdcurses) #(vi - --echo "$as_me:9115: checking if you want to use pkg-config" >&5 -+echo "$as_me:9184: checking if you want to use pkg-config" >&5 - echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6 - - # Check whether --with-pkg-config or --without-pkg-config was given. -@@ -9122,7 +9191,7 @@ - else - cf_pkg_config=yes - fi; --echo "$as_me:9125: result: $cf_pkg_config" >&5 -+echo "$as_me:9194: result: $cf_pkg_config" >&5 - echo "${ECHO_T}$cf_pkg_config" >&6 - - case $cf_pkg_config in #(vi -@@ -9130,9 +9199,10 @@ - PKG_CONFIG=none - ;; - yes) #(vi -- # Extract the first word of "pkg-config", so it can be a program name with args. --set dummy pkg-config; ac_word=$2 --echo "$as_me:9135: checking for $ac_word" >&5 -+ if test -n "$ac_tool_prefix"; then -+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -+echo "$as_me:9205: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9149,25 +9219,70 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:9152: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:9222: found $ac_dir/$ac_word" >&5 - break - fi - done - -- test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none" - ;; - esac - fi - PKG_CONFIG=$ac_cv_path_PKG_CONFIG - - if test -n "$PKG_CONFIG"; then -- echo "$as_me:9164: result: $PKG_CONFIG" >&5 -+ echo "$as_me:9233: result: $PKG_CONFIG" >&5 - echo "${ECHO_T}$PKG_CONFIG" >&6 - else -- echo "$as_me:9167: result: no" >&5 -+ echo "$as_me:9236: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -+fi -+if test -z "$ac_cv_path_PKG_CONFIG"; then -+ ac_pt_PKG_CONFIG=$PKG_CONFIG -+ # Extract the first word of "pkg-config", so it can be a program name with args. -+set dummy pkg-config; ac_word=$2 -+echo "$as_me:9245: checking for $ac_word" >&5 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ case $ac_pt_PKG_CONFIG in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. -+ ;; -+ *) -+ ac_save_IFS=$IFS; IFS=$ac_path_separator -+ac_dummy="$PATH" -+for ac_dir in $ac_dummy; do -+ IFS=$ac_save_IFS -+ test -z "$ac_dir" && ac_dir=. -+ if $as_executable_p "$ac_dir/$ac_word"; then -+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word" -+ echo "$as_me:9262: found $ac_dir/$ac_word" >&5 -+ break -+fi -+done -+ -+ test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none" -+ ;; -+esac -+fi -+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -+ -+if test -n "$ac_pt_PKG_CONFIG"; then -+ echo "$as_me:9274: result: $ac_pt_PKG_CONFIG" >&5 -+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 -+else -+ echo "$as_me:9277: result: no" >&5 -+echo "${ECHO_T}no" >&6 -+fi -+ -+ PKG_CONFIG=$ac_pt_PKG_CONFIG -+else -+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -+fi -+ - ;; - *) - PKG_CONFIG=$withval -@@ -9202,7 +9317,7 @@ - PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%` - ;; - *) -- { { echo "$as_me:9205: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 -+ { { echo "$as_me:9320: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 - echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;} - { (exit 1); exit 1; }; } - ;; -@@ -9210,7 +9325,7 @@ - - fi - --echo "$as_me:9213: checking for X" >&5 -+echo "$as_me:9328: checking for X" >&5 - echo $ECHO_N "checking for X... $ECHO_C" >&6 - - # Check whether --with-x or --without-x was given. -@@ -9307,17 +9422,17 @@ - # Guess where to find include files, by looking for Intrinsic.h. - # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF --#line 9310 "configure" -+#line 9425 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:9314: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:9429: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:9320: \$? = $ac_status" >&5 -+ echo "$as_me:9435: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -9350,7 +9465,7 @@ - ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9353 "configure" -+#line 9468 "configure" - #include "confdefs.h" - #include - int -@@ -9362,16 +9477,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9365: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9480: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9368: \$? = $ac_status" >&5 -+ echo "$as_me:9483: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9371: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9486: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9374: \$? = $ac_status" >&5 -+ echo "$as_me:9489: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - LIBS=$ac_save_LIBS - # We can link X programs with no special library path. -@@ -9409,7 +9524,7 @@ - fi # $with_x != no - - if test "$have_x" != yes; then -- echo "$as_me:9412: result: $have_x" >&5 -+ echo "$as_me:9527: result: $have_x" >&5 - echo "${ECHO_T}$have_x" >&6 - no_x=yes - else -@@ -9419,7 +9534,7 @@ - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes \ - ac_x_includes=$x_includes ac_x_libraries=$x_libraries" -- echo "$as_me:9422: result: libraries $x_libraries, headers $x_includes" >&5 -+ echo "$as_me:9537: result: libraries $x_libraries, headers $x_includes" >&5 - echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 - fi - -@@ -9443,11 +9558,11 @@ - # others require no space. Words are not sufficient . . . . - case `(uname -sr) 2>/dev/null` in - "SunOS 5"*) -- echo "$as_me:9446: checking whether -R must be followed by a space" >&5 -+ echo "$as_me:9561: checking whether -R must be followed by a space" >&5 - echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - cat >conftest.$ac_ext <<_ACEOF --#line 9450 "configure" -+#line 9565 "configure" - #include "confdefs.h" - - int -@@ -9459,16 +9574,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9462: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9577: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9465: \$? = $ac_status" >&5 -+ echo "$as_me:9580: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9468: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9583: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9471: \$? = $ac_status" >&5 -+ echo "$as_me:9586: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_nospace=yes - else -@@ -9478,13 +9593,13 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - if test $ac_R_nospace = yes; then -- echo "$as_me:9481: result: no" >&5 -+ echo "$as_me:9596: result: no" >&5 - echo "${ECHO_T}no" >&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF --#line 9487 "configure" -+#line 9602 "configure" - #include "confdefs.h" - - int -@@ -9496,16 +9611,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9499: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9614: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9502: \$? = $ac_status" >&5 -+ echo "$as_me:9617: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9505: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9620: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9508: \$? = $ac_status" >&5 -+ echo "$as_me:9623: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_R_space=yes - else -@@ -9515,11 +9630,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - if test $ac_R_space = yes; then -- echo "$as_me:9518: result: yes" >&5 -+ echo "$as_me:9633: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - X_LIBS="$X_LIBS -R $x_libraries" - else -- echo "$as_me:9522: result: neither works" >&5 -+ echo "$as_me:9637: result: neither works" >&5 - echo "${ECHO_T}neither works" >&6 - fi - fi -@@ -9539,7 +9654,7 @@ - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF --#line 9542 "configure" -+#line 9657 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9558,22 +9673,22 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9561: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9676: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9564: \$? = $ac_status" >&5 -+ echo "$as_me:9679: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9567: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9682: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9570: \$? = $ac_status" >&5 -+ echo "$as_me:9685: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 --echo "$as_me:9576: checking for dnet_ntoa in -ldnet" >&5 -+echo "$as_me:9691: checking for dnet_ntoa in -ldnet" >&5 - echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 - if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9581,7 +9696,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldnet $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9584 "configure" -+#line 9699 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9600,16 +9715,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9603: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9718: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9606: \$? = $ac_status" >&5 -+ echo "$as_me:9721: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9609: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9724: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9612: \$? = $ac_status" >&5 -+ echo "$as_me:9727: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dnet_dnet_ntoa=yes - else -@@ -9620,14 +9735,14 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:9623: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -+echo "$as_me:9738: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 - echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 - if test $ac_cv_lib_dnet_dnet_ntoa = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" - fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then -- echo "$as_me:9630: checking for dnet_ntoa in -ldnet_stub" >&5 -+ echo "$as_me:9745: checking for dnet_ntoa in -ldnet_stub" >&5 - echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 - if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9635,7 +9750,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-ldnet_stub $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9638 "configure" -+#line 9753 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9654,16 +9769,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9657: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9772: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9660: \$? = $ac_status" >&5 -+ echo "$as_me:9775: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9663: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9778: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9666: \$? = $ac_status" >&5 -+ echo "$as_me:9781: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_dnet_stub_dnet_ntoa=yes - else -@@ -9674,7 +9789,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:9677: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -+echo "$as_me:9792: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 - echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 - if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -@@ -9693,13 +9808,13 @@ - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. -- echo "$as_me:9696: checking for gethostbyname" >&5 -+ echo "$as_me:9811: checking for gethostbyname" >&5 - echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 - if test "${ac_cv_func_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 9702 "configure" -+#line 9817 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. */ -@@ -9730,16 +9845,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9733: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9848: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9736: \$? = $ac_status" >&5 -+ echo "$as_me:9851: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9739: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9854: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9742: \$? = $ac_status" >&5 -+ echo "$as_me:9857: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_gethostbyname=yes - else -@@ -9749,11 +9864,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:9752: result: $ac_cv_func_gethostbyname" >&5 -+echo "$as_me:9867: result: $ac_cv_func_gethostbyname" >&5 - echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 - - if test $ac_cv_func_gethostbyname = no; then -- echo "$as_me:9756: checking for gethostbyname in -lnsl" >&5 -+ echo "$as_me:9871: checking for gethostbyname in -lnsl" >&5 - echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 - if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9761,7 +9876,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lnsl $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9764 "configure" -+#line 9879 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9780,16 +9895,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9783: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9898: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9786: \$? = $ac_status" >&5 -+ echo "$as_me:9901: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9789: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9904: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9792: \$? = $ac_status" >&5 -+ echo "$as_me:9907: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_nsl_gethostbyname=yes - else -@@ -9800,14 +9915,14 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:9803: result: $ac_cv_lib_nsl_gethostbyname" >&5 -+echo "$as_me:9918: result: $ac_cv_lib_nsl_gethostbyname" >&5 - echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 - if test $ac_cv_lib_nsl_gethostbyname = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" - fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then -- echo "$as_me:9810: checking for gethostbyname in -lbsd" >&5 -+ echo "$as_me:9925: checking for gethostbyname in -lbsd" >&5 - echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 - if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9815,7 +9930,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lbsd $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9818 "configure" -+#line 9933 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9834,16 +9949,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9837: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:9952: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9840: \$? = $ac_status" >&5 -+ echo "$as_me:9955: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9843: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:9958: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9846: \$? = $ac_status" >&5 -+ echo "$as_me:9961: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_bsd_gethostbyname=yes - else -@@ -9854,7 +9969,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:9857: result: $ac_cv_lib_bsd_gethostbyname" >&5 -+echo "$as_me:9972: result: $ac_cv_lib_bsd_gethostbyname" >&5 - echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 - if test $ac_cv_lib_bsd_gethostbyname = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -@@ -9870,13 +9985,13 @@ - # variants that don't use the nameserver (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. -- echo "$as_me:9873: checking for connect" >&5 -+ echo "$as_me:9988: checking for connect" >&5 - echo $ECHO_N "checking for connect... $ECHO_C" >&6 - if test "${ac_cv_func_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 9879 "configure" -+#line 9994 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. */ -@@ -9907,16 +10022,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9910: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10025: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9913: \$? = $ac_status" >&5 -+ echo "$as_me:10028: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9916: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10031: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9919: \$? = $ac_status" >&5 -+ echo "$as_me:10034: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_connect=yes - else -@@ -9926,11 +10041,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:9929: result: $ac_cv_func_connect" >&5 -+echo "$as_me:10044: result: $ac_cv_func_connect" >&5 - echo "${ECHO_T}$ac_cv_func_connect" >&6 - - if test $ac_cv_func_connect = no; then -- echo "$as_me:9933: checking for connect in -lsocket" >&5 -+ echo "$as_me:10048: checking for connect in -lsocket" >&5 - echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 - if test "${ac_cv_lib_socket_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -9938,7 +10053,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lsocket $X_EXTRA_LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 9941 "configure" -+#line 10056 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -9957,16 +10072,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:9960: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10075: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:9963: \$? = $ac_status" >&5 -+ echo "$as_me:10078: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:9966: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10081: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:9969: \$? = $ac_status" >&5 -+ echo "$as_me:10084: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_socket_connect=yes - else -@@ -9977,7 +10092,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:9980: result: $ac_cv_lib_socket_connect" >&5 -+echo "$as_me:10095: result: $ac_cv_lib_socket_connect" >&5 - echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 - if test $ac_cv_lib_socket_connect = yes; then - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -@@ -9986,13 +10101,13 @@ - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. -- echo "$as_me:9989: checking for remove" >&5 -+ echo "$as_me:10104: checking for remove" >&5 - echo $ECHO_N "checking for remove... $ECHO_C" >&6 - if test "${ac_cv_func_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 9995 "configure" -+#line 10110 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. */ -@@ -10023,16 +10138,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10026: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10141: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10029: \$? = $ac_status" >&5 -+ echo "$as_me:10144: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10032: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10147: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10035: \$? = $ac_status" >&5 -+ echo "$as_me:10150: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_remove=yes - else -@@ -10042,11 +10157,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:10045: result: $ac_cv_func_remove" >&5 -+echo "$as_me:10160: result: $ac_cv_func_remove" >&5 - echo "${ECHO_T}$ac_cv_func_remove" >&6 - - if test $ac_cv_func_remove = no; then -- echo "$as_me:10049: checking for remove in -lposix" >&5 -+ echo "$as_me:10164: checking for remove in -lposix" >&5 - echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 - if test "${ac_cv_lib_posix_remove+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10054,7 +10169,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lposix $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 10057 "configure" -+#line 10172 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -10073,16 +10188,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10076: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10191: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10079: \$? = $ac_status" >&5 -+ echo "$as_me:10194: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10082: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10197: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10085: \$? = $ac_status" >&5 -+ echo "$as_me:10200: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_posix_remove=yes - else -@@ -10093,7 +10208,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:10096: result: $ac_cv_lib_posix_remove" >&5 -+echo "$as_me:10211: result: $ac_cv_lib_posix_remove" >&5 - echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 - if test $ac_cv_lib_posix_remove = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -@@ -10102,13 +10217,13 @@ - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. -- echo "$as_me:10105: checking for shmat" >&5 -+ echo "$as_me:10220: checking for shmat" >&5 - echo $ECHO_N "checking for shmat... $ECHO_C" >&6 - if test "${ac_cv_func_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 10111 "configure" -+#line 10226 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. */ -@@ -10139,16 +10254,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10142: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10257: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10145: \$? = $ac_status" >&5 -+ echo "$as_me:10260: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10148: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10263: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10151: \$? = $ac_status" >&5 -+ echo "$as_me:10266: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_shmat=yes - else -@@ -10158,11 +10273,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:10161: result: $ac_cv_func_shmat" >&5 -+echo "$as_me:10276: result: $ac_cv_func_shmat" >&5 - echo "${ECHO_T}$ac_cv_func_shmat" >&6 - - if test $ac_cv_func_shmat = no; then -- echo "$as_me:10165: checking for shmat in -lipc" >&5 -+ echo "$as_me:10280: checking for shmat in -lipc" >&5 - echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 - if test "${ac_cv_lib_ipc_shmat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10170,7 +10285,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lipc $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 10173 "configure" -+#line 10288 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -10189,16 +10304,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10192: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10307: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10195: \$? = $ac_status" >&5 -+ echo "$as_me:10310: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10198: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10313: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10201: \$? = $ac_status" >&5 -+ echo "$as_me:10316: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_ipc_shmat=yes - else -@@ -10209,7 +10324,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:10212: result: $ac_cv_lib_ipc_shmat" >&5 -+echo "$as_me:10327: result: $ac_cv_lib_ipc_shmat" >&5 - echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 - if test $ac_cv_lib_ipc_shmat = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -@@ -10227,7 +10342,7 @@ - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry -- echo "$as_me:10230: checking for IceConnectionNumber in -lICE" >&5 -+ echo "$as_me:10345: checking for IceConnectionNumber in -lICE" >&5 - echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 - if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10235,7 +10350,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lICE $X_EXTRA_LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 10238 "configure" -+#line 10353 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -10254,16 +10369,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10257: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10372: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10260: \$? = $ac_status" >&5 -+ echo "$as_me:10375: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10263: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10378: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10266: \$? = $ac_status" >&5 -+ echo "$as_me:10381: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_ICE_IceConnectionNumber=yes - else -@@ -10274,7 +10389,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:10277: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -+echo "$as_me:10392: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 - echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 - if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -@@ -10286,7 +10401,7 @@ - - cf_x_athena=${cf_x_athena:-Xaw} - --echo "$as_me:10289: checking if you want to link with Xaw 3d library" >&5 -+echo "$as_me:10404: checking if you want to link with Xaw 3d library" >&5 - echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6 - withval= - -@@ -10297,14 +10412,14 @@ - fi; - if test "$withval" = yes ; then - cf_x_athena=Xaw3d -- echo "$as_me:10300: result: yes" >&5 -+ echo "$as_me:10415: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else -- echo "$as_me:10303: result: no" >&5 -+ echo "$as_me:10418: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - --echo "$as_me:10307: checking if you want to link with neXT Athena library" >&5 -+echo "$as_me:10422: checking if you want to link with neXT Athena library" >&5 - echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6 - withval= - -@@ -10315,14 +10430,14 @@ - fi; - if test "$withval" = yes ; then - cf_x_athena=neXtaw -- echo "$as_me:10318: result: yes" >&5 -+ echo "$as_me:10433: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else -- echo "$as_me:10321: result: no" >&5 -+ echo "$as_me:10436: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - --echo "$as_me:10325: checking if you want to link with Athena-Plus library" >&5 -+echo "$as_me:10440: checking if you want to link with Athena-Plus library" >&5 - echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6 - withval= - -@@ -10333,10 +10448,10 @@ - fi; - if test "$withval" = yes ; then - cf_x_athena=XawPlus -- echo "$as_me:10336: result: yes" >&5 -+ echo "$as_me:10451: result: yes" >&5 - echo "${ECHO_T}yes" >&6 - else -- echo "$as_me:10339: result: no" >&5 -+ echo "$as_me:10454: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -10356,17 +10471,17 @@ - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then - test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6 - --echo "${as_me:-configure}:10359: testing found package $cf_athena_pkg ..." 1>&5 -+echo "${as_me:-configure}:10474: testing found package $cf_athena_pkg ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`" - test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:10365: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:10480: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:10369: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:10484: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -10456,14 +10571,14 @@ - #define $cf_x_athena_LIBS 1 - EOF - --echo "$as_me:10459: checking for usable $cf_x_athena/Xmu package" >&5 -+echo "$as_me:10574: checking for usable $cf_x_athena/Xmu package" >&5 - echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6 - if test "${cf_cv_xaw_compat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 10466 "configure" -+#line 10581 "configure" - #include "confdefs.h" - - #include -@@ -10479,16 +10594,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10482: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10597: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10485: \$? = $ac_status" >&5 -+ echo "$as_me:10600: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10488: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10603: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10491: \$? = $ac_status" >&5 -+ echo "$as_me:10606: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xaw_compat=yes - else -@@ -10498,7 +10613,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:10501: result: $cf_cv_xaw_compat" >&5 -+echo "$as_me:10616: result: $cf_cv_xaw_compat" >&5 - echo "${ECHO_T}$cf_cv_xaw_compat" >&6 - - if test "$cf_cv_xaw_compat" = no -@@ -10510,22 +10625,22 @@ - *) - test -n "$verbose" && echo " work around broken package" 1>&6 - --echo "${as_me:-configure}:10513: testing work around broken package ..." 1>&5 -+echo "${as_me:-configure}:10628: testing work around broken package ..." 1>&5 - - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then - test -n "$verbose" && echo " found package xmu" 1>&6 - --echo "${as_me:-configure}:10518: testing found package xmu ..." 1>&5 -+echo "${as_me:-configure}:10633: testing found package xmu ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`" - test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:10524: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:10639: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:10528: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:10643: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -10611,12 +10726,12 @@ - - test -n "$verbose" && echo " ...before $LIBS" 1>&6 - --echo "${as_me:-configure}:10614: testing ...before $LIBS ..." 1>&5 -+echo "${as_me:-configure}:10729: testing ...before $LIBS ..." 1>&5 - - LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/ / /g'` - test -n "$verbose" && echo " ...after $LIBS" 1>&6 - --echo "${as_me:-configure}:10619: testing ...after $LIBS ..." 1>&5 -+echo "${as_me:-configure}:10734: testing ...after $LIBS ..." 1>&5 - - fi - -@@ -10637,17 +10752,17 @@ - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then - test -n "$verbose" && echo " found package Xext" 1>&6 - --echo "${as_me:-configure}:10640: testing found package Xext ..." 1>&5 -+echo "${as_me:-configure}:10755: testing found package Xext ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`" - test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:10646: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:10761: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:10650: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:10765: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -10731,7 +10846,7 @@ - : - else - -- echo "$as_me:10734: checking for XextCreateExtension in -lXext" >&5 -+ echo "$as_me:10849: checking for XextCreateExtension in -lXext" >&5 - echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6 - if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -10739,7 +10854,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lXext $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 10742 "configure" -+#line 10857 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -10758,16 +10873,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10761: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:10876: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10764: \$? = $ac_status" >&5 -+ echo "$as_me:10879: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10767: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:10882: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10770: \$? = $ac_status" >&5 -+ echo "$as_me:10885: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_Xext_XextCreateExtension=yes - else -@@ -10778,7 +10893,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:10781: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 -+echo "$as_me:10896: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 - echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6 - if test $ac_cv_lib_Xext_XextCreateExtension = yes; then - LIBS="-lXext $LIBS" -@@ -10791,17 +10906,17 @@ - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then - test -n "$verbose" && echo " found package xt" 1>&6 - --echo "${as_me:-configure}:10794: testing found package xt ..." 1>&5 -+echo "${as_me:-configure}:10909: testing found package xt ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`" - test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:10800: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:10915: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:10804: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:10919: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -10888,14 +11003,14 @@ - ;; - *) - # we have an "xt" package, but it may omit Xt's dependency on X11 --echo "$as_me:10891: checking for usable X dependency" >&5 -+echo "$as_me:11006: checking for usable X dependency" >&5 - echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6 - if test "${cf_cv_xt_x11_compat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 10898 "configure" -+#line 11013 "configure" - #include "confdefs.h" - - #include -@@ -10914,16 +11029,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:10917: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11032: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:10920: \$? = $ac_status" >&5 -+ echo "$as_me:11035: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:10923: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11038: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:10926: \$? = $ac_status" >&5 -+ echo "$as_me:11041: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xt_x11_compat=yes - else -@@ -10933,30 +11048,30 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:10936: result: $cf_cv_xt_x11_compat" >&5 -+echo "$as_me:11051: result: $cf_cv_xt_x11_compat" >&5 - echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6 - if test "$cf_cv_xt_x11_compat" = no - then - test -n "$verbose" && echo " work around broken X11 dependency" 1>&6 - --echo "${as_me:-configure}:10942: testing work around broken X11 dependency ..." 1>&5 -+echo "${as_me:-configure}:11057: testing work around broken X11 dependency ..." 1>&5 - - # 2010/11/19 - good enough until a working Xt on Xcb is delivered. - - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then - test -n "$verbose" && echo " found package x11" 1>&6 - --echo "${as_me:-configure}:10949: testing found package x11 ..." 1>&5 -+echo "${as_me:-configure}:11064: testing found package x11 ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`" - test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:10955: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:11070: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:10959: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:11074: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -11042,12 +11157,12 @@ - - test -n "$verbose" && echo " ...before $LIBS" 1>&6 - --echo "${as_me:-configure}:11045: testing ...before $LIBS ..." 1>&5 -+echo "${as_me:-configure}:11160: testing ...before $LIBS ..." 1>&5 - - LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/ / /g'` - test -n "$verbose" && echo " ...after $LIBS" 1>&6 - --echo "${as_me:-configure}:11050: testing ...after $LIBS ..." 1>&5 -+echo "${as_me:-configure}:11165: testing ...after $LIBS ..." 1>&5 - - fi - -@@ -11055,14 +11170,14 @@ - ;; - esac - --echo "$as_me:11058: checking for usable X Toolkit package" >&5 -+echo "$as_me:11173: checking for usable X Toolkit package" >&5 - echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6 - if test "${cf_cv_xt_ice_compat+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 11065 "configure" -+#line 11180 "configure" - #include "confdefs.h" - - #include -@@ -11077,16 +11192,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11080: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11195: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11083: \$? = $ac_status" >&5 -+ echo "$as_me:11198: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11086: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11201: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11089: \$? = $ac_status" >&5 -+ echo "$as_me:11204: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_xt_ice_compat=yes - else -@@ -11096,7 +11211,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:11099: result: $cf_cv_xt_ice_compat" >&5 -+echo "$as_me:11214: result: $cf_cv_xt_ice_compat" >&5 - echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6 - - if test "$cf_cv_xt_ice_compat" = no -@@ -11110,22 +11225,22 @@ - *) - test -n "$verbose" && echo " work around broken ICE dependency" 1>&6 - --echo "${as_me:-configure}:11113: testing work around broken ICE dependency ..." 1>&5 -+echo "${as_me:-configure}:11228: testing work around broken ICE dependency ..." 1>&5 - - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then - test -n "$verbose" && echo " found package ice" 1>&6 - --echo "${as_me:-configure}:11118: testing found package ice ..." 1>&5 -+echo "${as_me:-configure}:11233: testing found package ice ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`" - test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:11124: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:11239: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:11128: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:11243: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -11210,17 +11325,17 @@ - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then - test -n "$verbose" && echo " found package sm" 1>&6 - --echo "${as_me:-configure}:11213: testing found package sm ..." 1>&5 -+echo "${as_me:-configure}:11328: testing found package sm ..." 1>&5 - - cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`" - cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`" - test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6 - --echo "${as_me:-configure}:11219: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 -+echo "${as_me:-configure}:11334: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 - - test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6 - --echo "${as_me:-configure}:11223: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 -+echo "${as_me:-configure}:11338: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 - - cf_fix_cppflags=no - cf_new_cflags= -@@ -11310,12 +11425,12 @@ - - test -n "$verbose" && echo " ...before $LIBS" 1>&6 - --echo "${as_me:-configure}:11313: testing ...before $LIBS ..." 1>&5 -+echo "${as_me:-configure}:11428: testing ...before $LIBS ..." 1>&5 - - LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'` - test -n "$verbose" && echo " ...after $LIBS" 1>&6 - --echo "${as_me:-configure}:11318: testing ...after $LIBS ..." 1>&5 -+echo "${as_me:-configure}:11433: testing ...after $LIBS ..." 1>&5 - - fi - -@@ -11333,7 +11448,7 @@ - - test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 - --echo "${as_me:-configure}:11336: testing checking additions to CFLAGS ..." 1>&5 -+echo "${as_me:-configure}:11451: testing checking additions to CFLAGS ..." 1>&5 - - cf_check_cflags="$CFLAGS" - cf_check_cppflags="$CPPFLAGS" -@@ -11404,7 +11519,7 @@ - if test -n "$cf_new_cflags" ; then - test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 - --echo "${as_me:-configure}:11407: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 -+echo "${as_me:-configure}:11522: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 - - CFLAGS="$CFLAGS $cf_new_cflags" - fi -@@ -11412,7 +11527,7 @@ - if test -n "$cf_new_cppflags" ; then - test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 - --echo "${as_me:-configure}:11415: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 -+echo "${as_me:-configure}:11530: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 - - CPPFLAGS="$CPPFLAGS $cf_new_cppflags" - fi -@@ -11420,14 +11535,14 @@ - if test -n "$cf_new_extra_cppflags" ; then - test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 - --echo "${as_me:-configure}:11423: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 -+echo "${as_me:-configure}:11538: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 - - EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" - fi - - if test "$cf_check_cflags" != "$CFLAGS" ; then - cat >conftest.$ac_ext <<_ACEOF --#line 11430 "configure" -+#line 11545 "configure" - #include "confdefs.h" - #include - int -@@ -11439,16 +11554,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11442: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11557: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11445: \$? = $ac_status" >&5 -+ echo "$as_me:11560: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11448: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11563: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11451: \$? = $ac_status" >&5 -+ echo "$as_me:11566: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -11456,12 +11571,12 @@ - cat conftest.$ac_ext >&5 - test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 - --echo "${as_me:-configure}:11459: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 -+echo "${as_me:-configure}:11574: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 - - if test "$cf_check_cppflags" != "$CPPFLAGS" ; then - test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 - --echo "${as_me:-configure}:11464: testing but keeping change to \$CPPFLAGS ..." 1>&5 -+echo "${as_me:-configure}:11579: testing but keeping change to \$CPPFLAGS ..." 1>&5 - - fi - CFLAGS="$cf_check_flags" -@@ -11469,13 +11584,13 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi - -- echo "$as_me:11472: checking for XOpenDisplay" >&5 -+ echo "$as_me:11587: checking for XOpenDisplay" >&5 - echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6 - if test "${ac_cv_func_XOpenDisplay+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 11478 "configure" -+#line 11593 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char XOpenDisplay (); below. */ -@@ -11506,16 +11621,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11509: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11624: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11512: \$? = $ac_status" >&5 -+ echo "$as_me:11627: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11515: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11630: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11518: \$? = $ac_status" >&5 -+ echo "$as_me:11633: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_XOpenDisplay=yes - else -@@ -11525,13 +11640,13 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:11528: result: $ac_cv_func_XOpenDisplay" >&5 -+echo "$as_me:11643: result: $ac_cv_func_XOpenDisplay" >&5 - echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6 - if test $ac_cv_func_XOpenDisplay = yes; then - : - else - -- echo "$as_me:11534: checking for XOpenDisplay in -lX11" >&5 -+ echo "$as_me:11649: checking for XOpenDisplay in -lX11" >&5 - echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 - if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -11539,7 +11654,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 11542 "configure" -+#line 11657 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -11558,16 +11673,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11561: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11676: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11564: \$? = $ac_status" >&5 -+ echo "$as_me:11679: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11567: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11682: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11570: \$? = $ac_status" >&5 -+ echo "$as_me:11685: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_X11_XOpenDisplay=yes - else -@@ -11578,7 +11693,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:11581: result: $ac_cv_lib_X11_XOpenDisplay" >&5 -+echo "$as_me:11696: result: $ac_cv_lib_X11_XOpenDisplay" >&5 - echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 - if test $ac_cv_lib_X11_XOpenDisplay = yes; then - LIBS="-lX11 $LIBS" -@@ -11586,13 +11701,13 @@ - - fi - -- echo "$as_me:11589: checking for XtAppInitialize" >&5 -+ echo "$as_me:11704: checking for XtAppInitialize" >&5 - echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6 - if test "${ac_cv_func_XtAppInitialize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 11595 "configure" -+#line 11710 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char XtAppInitialize (); below. */ -@@ -11623,16 +11738,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11626: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11741: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11629: \$? = $ac_status" >&5 -+ echo "$as_me:11744: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11632: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11747: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11635: \$? = $ac_status" >&5 -+ echo "$as_me:11750: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_XtAppInitialize=yes - else -@@ -11642,13 +11757,13 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:11645: result: $ac_cv_func_XtAppInitialize" >&5 -+echo "$as_me:11760: result: $ac_cv_func_XtAppInitialize" >&5 - echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6 - if test $ac_cv_func_XtAppInitialize = yes; then - : - else - -- echo "$as_me:11651: checking for XtAppInitialize in -lXt" >&5 -+ echo "$as_me:11766: checking for XtAppInitialize in -lXt" >&5 - echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6 - if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -11656,7 +11771,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 11659 "configure" -+#line 11774 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -11675,16 +11790,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11678: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11793: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11681: \$? = $ac_status" >&5 -+ echo "$as_me:11796: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11684: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11799: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11687: \$? = $ac_status" >&5 -+ echo "$as_me:11802: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_Xt_XtAppInitialize=yes - else -@@ -11695,7 +11810,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:11698: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 -+echo "$as_me:11813: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 - echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6 - if test $ac_cv_lib_Xt_XtAppInitialize = yes; then - cat >>confdefs.h <<\EOF -@@ -11711,7 +11826,7 @@ - fi - - if test $cf_have_X_LIBS = no ; then -- { echo "$as_me:11714: WARNING: Unable to successfully link X Toolkit library (-lXt) with -+ { echo "$as_me:11829: WARNING: Unable to successfully link X Toolkit library (-lXt) with - test program. You will have to check and add the proper libraries by hand - to makefile." >&5 - echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with -@@ -11733,14 +11848,14 @@ - cf_test=X11/$cf_x_athena_root/SimpleMenu.h - if test $cf_path != default ; then - CPPFLAGS="$cf_save -I$cf_path/include" -- echo "$as_me:11736: checking for $cf_test in $cf_path" >&5 -+ echo "$as_me:11851: checking for $cf_test in $cf_path" >&5 - echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6 - else -- echo "$as_me:11739: checking for $cf_test" >&5 -+ echo "$as_me:11854: checking for $cf_test" >&5 - echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6 - fi - cat >conftest.$ac_ext <<_ACEOF --#line 11743 "configure" -+#line 11858 "configure" - #include "confdefs.h" - - #include -@@ -11754,16 +11869,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:11757: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:11872: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:11760: \$? = $ac_status" >&5 -+ echo "$as_me:11875: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:11763: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11878: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11766: \$? = $ac_status" >&5 -+ echo "$as_me:11881: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -11772,7 +11887,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext -- echo "$as_me:11775: result: $cf_result" >&5 -+ echo "$as_me:11890: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test "$cf_result" = yes ; then - cf_x_athena_inc=$cf_path -@@ -11784,7 +11899,7 @@ - done - - if test -z "$cf_x_athena_inc" ; then -- { echo "$as_me:11787: WARNING: Unable to successfully find Athena header files with test program" >&5 -+ { echo "$as_me:11902: WARNING: Unable to successfully find Athena header files with test program" >&5 - echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;} - elif test "$cf_x_athena_inc" != default ; then - CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc" -@@ -11809,36 +11924,40 @@ - cf_test=XawSimpleMenuAddGlobalActions - if test $cf_path != default ; then - LIBS="-L$cf_path/lib $cf_lib $LIBS" -- echo "$as_me:11812: checking for $cf_lib in $cf_path" >&5 -+ echo "$as_me:11927: checking for $cf_lib in $cf_path" >&5 - echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6 - else - LIBS="$cf_lib $LIBS" -- echo "$as_me:11816: checking for $cf_test in $cf_lib" >&5 -+ echo "$as_me:11931: checking for $cf_test in $cf_lib" >&5 - echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6 - fi - cat >conftest.$ac_ext <<_ACEOF --#line 11820 "configure" -+#line 11935 "configure" - #include "confdefs.h" - -+#include -+#include -+ - int - main () - { --$cf_test() -+ -+$cf_test((XtAppContext) 0) - ; - return 0; - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:11832: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:11951: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:11835: \$? = $ac_status" >&5 -+ echo "$as_me:11954: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:11838: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:11957: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:11841: \$? = $ac_status" >&5 -+ echo "$as_me:11960: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -11847,7 +11966,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -- echo "$as_me:11850: result: $cf_result" >&5 -+ echo "$as_me:11969: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test "$cf_result" = yes ; then - cf_x_athena_lib="$cf_lib" -@@ -11859,7 +11978,7 @@ - done - - if test -z "$cf_x_athena_lib" ; then -- { { echo "$as_me:11862: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 -+ { { echo "$as_me:11981: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 - echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -11876,7 +11995,7 @@ - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 --echo "$as_me:11879: checking for $ac_word" >&5 -+echo "$as_me:11998: checking for $ac_word" >&5 - echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 - if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -11893,7 +12012,7 @@ - test -z "$ac_dir" && ac_dir=. - if $as_executable_p "$ac_dir/$ac_word"; then - ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word" -- echo "$as_me:11896: found $ac_dir/$ac_word" >&5 -+ echo "$as_me:12015: found $ac_dir/$ac_word" >&5 - break - fi - done -@@ -11904,10 +12023,10 @@ - XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG - - if test -n "$XCURSES_CONFIG"; then -- echo "$as_me:11907: result: $XCURSES_CONFIG" >&5 -+ echo "$as_me:12026: result: $XCURSES_CONFIG" >&5 - echo "${ECHO_T}$XCURSES_CONFIG" >&6 - else -- echo "$as_me:11910: result: no" >&5 -+ echo "$as_me:12029: result: no" >&5 - echo "${ECHO_T}no" >&6 - fi - -@@ -11928,7 +12047,7 @@ - - test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 - --echo "${as_me:-configure}:11931: testing checking additions to CFLAGS ..." 1>&5 -+echo "${as_me:-configure}:12050: testing checking additions to CFLAGS ..." 1>&5 - - cf_check_cflags="$CFLAGS" - cf_check_cppflags="$CPPFLAGS" -@@ -11999,7 +12118,7 @@ - if test -n "$cf_new_cflags" ; then - test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 - --echo "${as_me:-configure}:12002: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 -+echo "${as_me:-configure}:12121: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 - - CFLAGS="$CFLAGS $cf_new_cflags" - fi -@@ -12007,7 +12126,7 @@ - if test -n "$cf_new_cppflags" ; then - test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 - --echo "${as_me:-configure}:12010: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 -+echo "${as_me:-configure}:12129: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 - - CPPFLAGS="$CPPFLAGS $cf_new_cppflags" - fi -@@ -12015,14 +12134,14 @@ - if test -n "$cf_new_extra_cppflags" ; then - test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 - --echo "${as_me:-configure}:12018: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 -+echo "${as_me:-configure}:12137: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 - - EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS" - fi - - if test "$cf_check_cflags" != "$CFLAGS" ; then - cat >conftest.$ac_ext <<_ACEOF --#line 12025 "configure" -+#line 12144 "configure" - #include "confdefs.h" - #include - int -@@ -12034,16 +12153,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12037: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12156: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12040: \$? = $ac_status" >&5 -+ echo "$as_me:12159: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12043: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12162: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12046: \$? = $ac_status" >&5 -+ echo "$as_me:12165: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -12051,12 +12170,12 @@ - cat conftest.$ac_ext >&5 - test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 - --echo "${as_me:-configure}:12054: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 -+echo "${as_me:-configure}:12173: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 - - if test "$cf_check_cppflags" != "$CPPFLAGS" ; then - test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 - --echo "${as_me:-configure}:12059: testing but keeping change to \$CPPFLAGS ..." 1>&5 -+echo "${as_me:-configure}:12178: testing but keeping change to \$CPPFLAGS ..." 1>&5 - - fi - CFLAGS="$cf_check_flags" -@@ -12064,7 +12183,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi - --echo "$as_me:12067: checking for XOpenDisplay in -lX11" >&5 -+echo "$as_me:12186: checking for XOpenDisplay in -lX11" >&5 - echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 - if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -12072,7 +12191,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 12075 "configure" -+#line 12194 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -12091,16 +12210,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12094: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12213: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12097: \$? = $ac_status" >&5 -+ echo "$as_me:12216: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12100: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12219: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12103: \$? = $ac_status" >&5 -+ echo "$as_me:12222: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_X11_XOpenDisplay=yes - else -@@ -12111,13 +12230,13 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:12114: result: $ac_cv_lib_X11_XOpenDisplay" >&5 -+echo "$as_me:12233: result: $ac_cv_lib_X11_XOpenDisplay" >&5 - echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 - if test $ac_cv_lib_X11_XOpenDisplay = yes; then - LIBS="-lX11 $LIBS" - fi - --echo "$as_me:12120: checking for XCurses library" >&5 -+echo "$as_me:12239: checking for XCurses library" >&5 - echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6 - if test "${cf_cv_lib_XCurses+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -12125,7 +12244,7 @@ - - LIBS="-lXCurses $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 12128 "configure" -+#line 12247 "configure" - #include "confdefs.h" - - #include -@@ -12140,16 +12259,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12143: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12262: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12146: \$? = $ac_status" >&5 -+ echo "$as_me:12265: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12149: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12268: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12152: \$? = $ac_status" >&5 -+ echo "$as_me:12271: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_lib_XCurses=yes - else -@@ -12160,7 +12279,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - fi --echo "$as_me:12163: result: $cf_cv_lib_XCurses" >&5 -+echo "$as_me:12282: result: $cf_cv_lib_XCurses" >&5 - echo "${ECHO_T}$cf_cv_lib_XCurses" >&6 - - fi -@@ -12174,23 +12293,23 @@ - #define XCURSES 1 - EOF - -- echo "$as_me:12177: checking for xcurses.h" >&5 -+ echo "$as_me:12296: checking for xcurses.h" >&5 - echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6 - if test "${ac_cv_header_xcurses_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12183 "configure" -+#line 12302 "configure" - #include "confdefs.h" - #include - _ACEOF --if { (eval echo "$as_me:12187: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:12306: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:12193: \$? = $ac_status" >&5 -+ echo "$as_me:12312: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -12209,7 +12328,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:12212: result: $ac_cv_header_xcurses_h" >&5 -+echo "$as_me:12331: result: $ac_cv_header_xcurses_h" >&5 - echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6 - if test $ac_cv_header_xcurses_h = yes; then - cat >>confdefs.h <<\EOF -@@ -12219,7 +12338,7 @@ - fi - - else -- { { echo "$as_me:12222: error: Cannot link with XCurses" >&5 -+ { { echo "$as_me:12341: error: Cannot link with XCurses" >&5 - echo "$as_me: error: Cannot link with XCurses" >&2;} - { (exit 1); exit 1; }; } - fi -@@ -12234,7 +12353,7 @@ - # look for curses-related libraries - - as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh` --echo "$as_me:12237: checking for new_panel in -lpanel$cf_cv_libtype" >&5 -+echo "$as_me:12356: checking for new_panel in -lpanel$cf_cv_libtype" >&5 - echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Lib+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -12242,7 +12361,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lpanel$cf_cv_libtype $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 12245 "configure" -+#line 12364 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -12261,16 +12380,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12264: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12383: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12267: \$? = $ac_status" >&5 -+ echo "$as_me:12386: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12270: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12389: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12273: \$? = $ac_status" >&5 -+ echo "$as_me:12392: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" - else -@@ -12281,7 +12400,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:12284: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -+echo "$as_me:12403: result: `eval echo '${'$as_ac_Lib'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 - if test `eval echo '${'$as_ac_Lib'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:12415: checking for menu_driver in -lmenu$cf_cv_libtype" >&5 - echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Lib+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -12301,7 +12420,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lmenu$cf_cv_libtype $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 12304 "configure" -+#line 12423 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -12320,16 +12439,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12323: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12442: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12326: \$? = $ac_status" >&5 -+ echo "$as_me:12445: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12329: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12448: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12332: \$? = $ac_status" >&5 -+ echo "$as_me:12451: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" - else -@@ -12340,7 +12459,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:12343: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -+echo "$as_me:12462: result: `eval echo '${'$as_ac_Lib'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 - if test `eval echo '${'$as_ac_Lib'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:12474: checking for form_driver in -lform$cf_cv_libtype" >&5 - echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Lib+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -12360,7 +12479,7 @@ - ac_check_lib_save_LIBS=$LIBS - LIBS="-lform$cf_cv_libtype $LIBS" - cat >conftest.$ac_ext <<_ACEOF --#line 12363 "configure" -+#line 12482 "configure" - #include "confdefs.h" - - /* Override any gcc2 internal prototype to avoid an error. */ -@@ -12379,16 +12498,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12382: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12501: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12385: \$? = $ac_status" >&5 -+ echo "$as_me:12504: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12388: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12507: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12391: \$? = $ac_status" >&5 -+ echo "$as_me:12510: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Lib=yes" - else -@@ -12399,7 +12518,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - LIBS=$ac_check_lib_save_LIBS - fi --echo "$as_me:12402: result: `eval echo '${'$as_ac_Lib'}'`" >&5 -+echo "$as_me:12521: result: `eval echo '${'$as_ac_Lib'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 - if test `eval echo '${'$as_ac_Lib'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:12544: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12431 "configure" -+#line 12550 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:12435: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:12554: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:12441: \$? = $ac_status" >&5 -+ echo "$as_me:12560: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -12457,7 +12576,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:12460: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:12579: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:12592: checking return type of signal handlers" >&5 - echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 - if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12479 "configure" -+#line 12598 "configure" - #include "confdefs.h" - #include - #include -@@ -12498,16 +12617,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:12501: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:12620: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:12504: \$? = $ac_status" >&5 -+ echo "$as_me:12623: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:12507: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12626: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12510: \$? = $ac_status" >&5 -+ echo "$as_me:12629: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void - else -@@ -12517,20 +12636,20 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:12520: result: $ac_cv_type_signal" >&5 -+echo "$as_me:12639: result: $ac_cv_type_signal" >&5 - echo "${ECHO_T}$ac_cv_type_signal" >&6 - - cat >>confdefs.h <&5 -+echo "$as_me:12646: checking for ANSI C header files" >&5 - echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 - if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12533 "configure" -+#line 12652 "configure" - #include "confdefs.h" - #include - #include -@@ -12538,13 +12657,13 @@ - #include - - _ACEOF --if { (eval echo "$as_me:12541: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:12660: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:12547: \$? = $ac_status" >&5 -+ echo "$as_me:12666: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -12566,7 +12685,7 @@ - if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line 12569 "configure" -+#line 12688 "configure" - #include "confdefs.h" - #include - -@@ -12584,7 +12703,7 @@ - if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF --#line 12587 "configure" -+#line 12706 "configure" - #include "confdefs.h" - #include - -@@ -12605,7 +12724,7 @@ - : - else - cat >conftest.$ac_ext <<_ACEOF --#line 12608 "configure" -+#line 12727 "configure" - #include "confdefs.h" - #include - #if ((' ' & 0x0FF) == 0x020) -@@ -12631,15 +12750,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:12634: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12753: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12637: \$? = $ac_status" >&5 -+ echo "$as_me:12756: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:12639: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12758: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12642: \$? = $ac_status" >&5 -+ echo "$as_me:12761: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : - else -@@ -12652,7 +12771,7 @@ - fi - fi - fi --echo "$as_me:12655: result: $ac_cv_header_stdc" >&5 -+echo "$as_me:12774: result: $ac_cv_header_stdc" >&5 - echo "${ECHO_T}$ac_cv_header_stdc" >&6 - if test $ac_cv_header_stdc = yes; then - -@@ -12662,13 +12781,13 @@ - - fi - --echo "$as_me:12665: checking whether time.h and sys/time.h may both be included" >&5 -+echo "$as_me:12784: checking whether time.h and sys/time.h may both be included" >&5 - echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 - if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12671 "configure" -+#line 12790 "configure" - #include "confdefs.h" - #include - #include -@@ -12684,16 +12803,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:12687: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:12806: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:12690: \$? = $ac_status" >&5 -+ echo "$as_me:12809: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:12693: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12812: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12696: \$? = $ac_status" >&5 -+ echo "$as_me:12815: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_time=yes - else -@@ -12703,7 +12822,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:12706: result: $ac_cv_header_time" >&5 -+echo "$as_me:12825: result: $ac_cv_header_time" >&5 - echo "${ECHO_T}$ac_cv_header_time" >&6 - if test $ac_cv_header_time = yes; then - -@@ -12716,6 +12835,7 @@ - for ac_header in \ - getopt.h \ - locale.h \ -+math.h \ - stdarg.h \ - sys/ioctl.h \ - sys/select.h \ -@@ -12725,23 +12845,23 @@ - - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:12728: checking for $ac_header" >&5 -+echo "$as_me:12848: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12734 "configure" -+#line 12854 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:12738: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:12858: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:12744: \$? = $ac_status" >&5 -+ echo "$as_me:12864: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -12760,7 +12880,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:12763: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:12883: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:12907: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 12793 "configure" -+#line 12913 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -@@ -12821,16 +12941,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12824: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:12944: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12827: \$? = $ac_status" >&5 -+ echo "$as_me:12947: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12830: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:12950: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12833: \$? = $ac_status" >&5 -+ echo "$as_me:12953: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" - else -@@ -12840,7 +12960,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:12843: result: `eval echo '${'$as_ac_var'}'`" >&5 -+echo "$as_me:12963: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:12973: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 - echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6 - if test "${cf_cv_need_xopen_extension+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 12860 "configure" -+#line 12980 "configure" - #include "confdefs.h" - - #include -@@ -12867,7 +12987,7 @@ - { - - #if defined(NCURSES_VERSION_PATCH) --if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) -+#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403) - make an error - #endif - #endif -@@ -12879,23 +12999,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12882: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13002: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12885: \$? = $ac_status" >&5 -+ echo "$as_me:13005: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12888: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13008: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12891: \$? = $ac_status" >&5 -+ echo "$as_me:13011: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_need_xopen_extension=no - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 12898 "configure" -+#line 13018 "configure" - #include "confdefs.h" - - #define _XOPEN_SOURCE_EXTENDED -@@ -12917,16 +13037,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:12920: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13040: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:12923: \$? = $ac_status" >&5 -+ echo "$as_me:13043: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:12926: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13046: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12929: \$? = $ac_status" >&5 -+ echo "$as_me:13049: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_need_xopen_extension=yes - else -@@ -12938,11 +13058,11 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:12941: result: $cf_cv_need_xopen_extension" >&5 -+echo "$as_me:13061: result: $cf_cv_need_xopen_extension" >&5 - echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6 - test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED" - --echo "$as_me:12945: checking for term.h" >&5 -+echo "$as_me:13065: checking for term.h" >&5 - echo $ECHO_N "checking for term.h... $ECHO_C" >&6 - if test "${cf_cv_term_header+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -12955,7 +13075,7 @@ - term.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 12958 "configure" -+#line 13078 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -12969,16 +13089,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:12972: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13092: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:12975: \$? = $ac_status" >&5 -+ echo "$as_me:13095: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:12978: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13098: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:12981: \$? = $ac_status" >&5 -+ echo "$as_me:13101: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_term_header=$cf_header - break -@@ -12997,7 +13117,7 @@ - for cf_header in ncurses/term.h ncursesw/term.h - do - cat >conftest.$ac_ext <<_ACEOF --#line 13000 "configure" -+#line 13120 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -13015,16 +13135,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13018: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13138: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13021: \$? = $ac_status" >&5 -+ echo "$as_me:13141: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13024: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13144: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13027: \$? = $ac_status" >&5 -+ echo "$as_me:13147: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_term_header=$cf_header - break -@@ -13039,7 +13159,7 @@ - esac - - fi --echo "$as_me:13042: result: $cf_cv_term_header" >&5 -+echo "$as_me:13162: result: $cf_cv_term_header" >&5 - echo "${ECHO_T}$cf_cv_term_header" >&6 - - case $cf_cv_term_header in #(vi -@@ -13101,10 +13221,10 @@ - - cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` - -- echo "$as_me:13104: checking for ${cf_func}" >&5 -+ echo "$as_me:13224: checking for ${cf_func}" >&5 - echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6 - --echo "${as_me:-configure}:13107: testing ${cf_func} ..." 1>&5 -+echo "${as_me:-configure}:13227: testing ${cf_func} ..." 1>&5 - - if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13113,7 +13233,7 @@ - eval cf_result='$ac_cv_func_'$cf_func - if test ".$cf_result" != ".no"; then - cat >conftest.$ac_ext <<_ACEOF --#line 13116 "configure" -+#line 13236 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -13144,16 +13264,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13147: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13267: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13150: \$? = $ac_status" >&5 -+ echo "$as_me:13270: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13153: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13273: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13156: \$? = $ac_status" >&5 -+ echo "$as_me:13276: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -13169,7 +13289,7 @@ - - # use the computed/retrieved cache-value: - eval 'cf_result=$cf_cv_func_'$cf_func -- echo "$as_me:13172: result: $cf_result" >&5 -+ echo "$as_me:13292: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result != no; then - cat >>confdefs.h <&5 -+echo "$as_me:13302: checking for ncurses extended functions" >&5 - echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6 - if test "${cf_cv_ncurses_ext_funcs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 13189 "configure" -+#line 13309 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -13201,16 +13321,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13204: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13207: \$? = $ac_status" >&5 -+ echo "$as_me:13327: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13210: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13330: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13213: \$? = $ac_status" >&5 -+ echo "$as_me:13333: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_ext_funcs=defined - else -@@ -13218,7 +13338,7 @@ - cat conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF --#line 13221 "configure" -+#line 13341 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -13243,16 +13363,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13246: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13366: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13249: \$? = $ac_status" >&5 -+ echo "$as_me:13369: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13252: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13372: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13255: \$? = $ac_status" >&5 -+ echo "$as_me:13375: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_ncurses_ext_funcs=yes - else -@@ -13266,20 +13386,20 @@ - rm -f conftest.$ac_objext conftest.$ac_ext - - fi --echo "$as_me:13269: result: $cf_cv_ncurses_ext_funcs" >&5 -+echo "$as_me:13389: result: $cf_cv_ncurses_ext_funcs" >&5 - echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6 - test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF - #define NCURSES_EXT_FUNCS 1 - EOF - --echo "$as_me:13275: checking for wide-character functions" >&5 -+echo "$as_me:13395: checking for wide-character functions" >&5 - echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6 - if test "${cf_cv_widechar_funcs+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 13282 "configure" -+#line 13402 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -13296,16 +13416,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13299: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13419: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13302: \$? = $ac_status" >&5 -+ echo "$as_me:13422: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13305: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13425: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13308: \$? = $ac_status" >&5 -+ echo "$as_me:13428: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_widechar_funcs=yes - else -@@ -13316,7 +13436,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - - fi --echo "$as_me:13319: result: $cf_cv_widechar_funcs" >&5 -+echo "$as_me:13439: result: $cf_cv_widechar_funcs" >&5 - echo "${ECHO_T}$cf_cv_widechar_funcs" >&6 - if test "$cf_cv_widechar_funcs" != no ; then - cat >>confdefs.h <<\EOF -@@ -13336,28 +13456,28 @@ - inttypes.h stdint.h unistd.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:13339: checking for $ac_header" >&5 -+echo "$as_me:13459: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 13345 "configure" -+#line 13465 "configure" - #include "confdefs.h" - $ac_includes_default - #include <$ac_header> - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13351: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13471: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13354: \$? = $ac_status" >&5 -+ echo "$as_me:13474: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13357: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13477: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13360: \$? = $ac_status" >&5 -+ echo "$as_me:13480: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" - else -@@ -13367,7 +13487,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:13370: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:13490: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:13500: checking for pid_t" >&5 - echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 - if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 13386 "configure" -+#line 13506 "configure" - #include "confdefs.h" - $ac_includes_default - int -@@ -13398,16 +13518,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13401: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13404: \$? = $ac_status" >&5 -+ echo "$as_me:13524: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13407: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13527: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13410: \$? = $ac_status" >&5 -+ echo "$as_me:13530: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_pid_t=yes - else -@@ -13417,7 +13537,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:13420: result: $ac_cv_type_pid_t" >&5 -+echo "$as_me:13540: result: $ac_cv_type_pid_t" >&5 - echo "${ECHO_T}$ac_cv_type_pid_t" >&6 - if test $ac_cv_type_pid_t = yes; then - : -@@ -13432,23 +13552,23 @@ - for ac_header in unistd.h vfork.h - do - as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` --echo "$as_me:13435: checking for $ac_header" >&5 -+echo "$as_me:13555: checking for $ac_header" >&5 - echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 - if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 13441 "configure" -+#line 13561 "configure" - #include "confdefs.h" - #include <$ac_header> - _ACEOF --if { (eval echo "$as_me:13445: \"$ac_cpp conftest.$ac_ext\"") >&5 -+if { (eval echo "$as_me:13565: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - egrep -v '^ *\+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 -- echo "$as_me:13451: \$? = $ac_status" >&5 -+ echo "$as_me:13571: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag -@@ -13467,7 +13587,7 @@ - fi - rm -f conftest.err conftest.$ac_ext - fi --echo "$as_me:13470: result: `eval echo '${'$as_ac_Header'}'`" >&5 -+echo "$as_me:13590: result: `eval echo '${'$as_ac_Header'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 - if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <&5 -+echo "$as_me:13603: checking for $ac_func" >&5 - echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 - if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - cat >conftest.$ac_ext <<_ACEOF --#line 13489 "configure" -+#line 13609 "configure" - #include "confdefs.h" - /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. */ -@@ -13517,16 +13637,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13520: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13640: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13523: \$? = $ac_status" >&5 -+ echo "$as_me:13643: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13526: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13646: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13529: \$? = $ac_status" >&5 -+ echo "$as_me:13649: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" - else -@@ -13536,7 +13656,7 @@ - fi - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - fi --echo "$as_me:13539: result: `eval echo '${'$as_ac_var'}'`" >&5 -+echo "$as_me:13659: result: `eval echo '${'$as_ac_var'}'`" >&5 - echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 - if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <&5 -+ echo "$as_me:13671: checking for working fork" >&5 - echo $ECHO_N "checking for working fork... $ECHO_C" >&6 - if test "${ac_cv_func_fork_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13571,15 +13691,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:13574: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13694: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13577: \$? = $ac_status" >&5 -+ echo "$as_me:13697: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:13579: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13699: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13582: \$? = $ac_status" >&5 -+ echo "$as_me:13702: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fork_works=yes - else -@@ -13591,7 +13711,7 @@ - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi --echo "$as_me:13594: result: $ac_cv_func_fork_works" >&5 -+echo "$as_me:13714: result: $ac_cv_func_fork_works" >&5 - echo "${ECHO_T}$ac_cv_func_fork_works" >&6 - - fi -@@ -13605,12 +13725,12 @@ - ac_cv_func_fork_works=yes - ;; - esac -- { echo "$as_me:13608: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 -+ { echo "$as_me:13728: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5 - echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;} - fi - ac_cv_func_vfork_works=$ac_cv_func_vfork - if test "x$ac_cv_func_vfork" = xyes; then -- echo "$as_me:13613: checking for working vfork" >&5 -+ echo "$as_me:13733: checking for working vfork" >&5 - echo $ECHO_N "checking for working vfork... $ECHO_C" >&6 - if test "${ac_cv_func_vfork_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13619,7 +13739,7 @@ - ac_cv_func_vfork_works=cross - else - cat >conftest.$ac_ext <<_ACEOF --#line 13622 "configure" -+#line 13742 "configure" - #include "confdefs.h" - /* Thanks to Paul Eggert for this test. */ - #include -@@ -13716,15 +13836,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:13719: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13839: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13722: \$? = $ac_status" >&5 -+ echo "$as_me:13842: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:13724: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13844: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13727: \$? = $ac_status" >&5 -+ echo "$as_me:13847: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_vfork_works=yes - else -@@ -13736,13 +13856,13 @@ - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi - fi --echo "$as_me:13739: result: $ac_cv_func_vfork_works" >&5 -+echo "$as_me:13859: result: $ac_cv_func_vfork_works" >&5 - echo "${ECHO_T}$ac_cv_func_vfork_works" >&6 - - fi; - if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=ac_cv_func_vfork -- { echo "$as_me:13745: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 -+ { echo "$as_me:13865: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5 - echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;} - fi - -@@ -13767,14 +13887,14 @@ - - fi - --echo "$as_me:13770: checking if sys/time.h works with sys/select.h" >&5 -+echo "$as_me:13890: checking if sys/time.h works with sys/select.h" >&5 - echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6 - if test "${cf_cv_sys_time_select+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 13777 "configure" -+#line 13897 "configure" - #include "confdefs.h" - - #include -@@ -13794,16 +13914,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:13797: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:13917: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:13800: \$? = $ac_status" >&5 -+ echo "$as_me:13920: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:13803: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13923: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13806: \$? = $ac_status" >&5 -+ echo "$as_me:13926: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_sys_time_select=yes - else -@@ -13815,13 +13935,13 @@ - - fi - --echo "$as_me:13818: result: $cf_cv_sys_time_select" >&5 -+echo "$as_me:13938: result: $cf_cv_sys_time_select" >&5 - echo "${ECHO_T}$cf_cv_sys_time_select" >&6 - test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF - #define HAVE_SYS_TIME_SELECT 1 - EOF - --echo "$as_me:13824: checking for function curses_version" >&5 -+echo "$as_me:13944: checking for function curses_version" >&5 - echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6 - if test "${cf_cv_func_curses_version+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13831,7 +13951,7 @@ - cf_cv_func_curses_version=unknown - else - cat >conftest.$ac_ext <<_ACEOF --#line 13834 "configure" -+#line 13954 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -13844,15 +13964,15 @@ - - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:13847: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:13967: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13850: \$? = $ac_status" >&5 -+ echo "$as_me:13970: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:13852: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:13972: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13855: \$? = $ac_status" >&5 -+ echo "$as_me:13975: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_func_curses_version=yes - -@@ -13867,13 +13987,13 @@ - fi - rm -f core - fi --echo "$as_me:13870: result: $cf_cv_func_curses_version" >&5 -+echo "$as_me:13990: result: $cf_cv_func_curses_version" >&5 - echo "${ECHO_T}$cf_cv_func_curses_version" >&6 - test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF - #define HAVE_CURSES_VERSION 1 - EOF - --echo "$as_me:13876: checking for ncurses wrap-prefix" >&5 -+echo "$as_me:13996: checking for ncurses wrap-prefix" >&5 - echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6 - - # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given. -@@ -13883,10 +14003,10 @@ - else - NCURSES_WRAP_PREFIX=_nc_ - fi; --echo "$as_me:13886: result: $NCURSES_WRAP_PREFIX" >&5 -+echo "$as_me:14006: result: $NCURSES_WRAP_PREFIX" >&5 - echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6 - --echo "$as_me:13889: checking for alternate character set array" >&5 -+echo "$as_me:14009: checking for alternate character set array" >&5 - echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6 - if test "${cf_cv_curses_acs_map+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13896,7 +14016,7 @@ - for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map - do - cat >conftest.$ac_ext <<_ACEOF --#line 13899 "configure" -+#line 14019 "configure" - #include "confdefs.h" - - #include <${cf_cv_ncurses_header:-curses.h}> -@@ -13912,16 +14032,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13915: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14035: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13918: \$? = $ac_status" >&5 -+ echo "$as_me:14038: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13921: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14041: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13924: \$? = $ac_status" >&5 -+ echo "$as_me:14044: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_curses_acs_map=$name; break - else -@@ -13932,14 +14052,14 @@ - done - - fi --echo "$as_me:13935: result: $cf_cv_curses_acs_map" >&5 -+echo "$as_me:14055: result: $cf_cv_curses_acs_map" >&5 - echo "${ECHO_T}$cf_cv_curses_acs_map" >&6 - - test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <&5 -+echo "$as_me:14062: checking for wide alternate character set array" >&5 - echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6 - if test "${cf_cv_curses_wacs_map+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -13949,7 +14069,7 @@ - for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char - do - cat >conftest.$ac_ext <<_ACEOF --#line 13952 "configure" -+#line 14072 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -13965,16 +14085,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:13968: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14088: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:13971: \$? = $ac_status" >&5 -+ echo "$as_me:14091: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:13974: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14094: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:13977: \$? = $ac_status" >&5 -+ echo "$as_me:14097: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_curses_wacs_map=$name - break -@@ -13985,14 +14105,14 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - done - fi --echo "$as_me:13988: result: $cf_cv_curses_wacs_map" >&5 -+echo "$as_me:14108: result: $cf_cv_curses_wacs_map" >&5 - echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6 - - test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <&5 -+echo "$as_me:14115: checking for wide alternate character constants" >&5 - echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6 - if test "${cf_cv_curses_wacs_symbols+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -@@ -14002,7 +14122,7 @@ - if test "$cf_cv_curses_wacs_map" != unknown - then - cat >conftest.$ac_ext <<_ACEOF --#line 14005 "configure" -+#line 14125 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -14019,16 +14139,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14022: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14142: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14025: \$? = $ac_status" >&5 -+ echo "$as_me:14145: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14028: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14148: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14031: \$? = $ac_status" >&5 -+ echo "$as_me:14151: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_curses_wacs_symbols=yes - else -@@ -14038,7 +14158,7 @@ - rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext - else - cat >conftest.$ac_ext <<_ACEOF --#line 14041 "configure" -+#line 14161 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -14054,16 +14174,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14057: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14177: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14060: \$? = $ac_status" >&5 -+ echo "$as_me:14180: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14063: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14183: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14066: \$? = $ac_status" >&5 -+ echo "$as_me:14186: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_curses_wacs_symbols=yes - else -@@ -14074,17 +14194,17 @@ - fi - - fi --echo "$as_me:14077: result: $cf_cv_curses_wacs_symbols" >&5 -+echo "$as_me:14197: result: $cf_cv_curses_wacs_symbols" >&5 - echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6 - - test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF - #define CURSES_WACS_SYMBOLS 1 - EOF - --echo "$as_me:14084: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5 -+echo "$as_me:14204: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5 - echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 14087 "configure" -+#line 14207 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -14102,16 +14222,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14105: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14225: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14108: \$? = $ac_status" >&5 -+ echo "$as_me:14228: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14111: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14231: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14114: \$? = $ac_status" >&5 -+ echo "$as_me:14234: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14120,7 +14240,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14123: result: $cf_result" >&5 -+echo "$as_me:14243: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result = yes ; then - -@@ -14138,14 +14258,14 @@ - fi - - # This is needed on Tru64 5.0 to declare mbstate_t --echo "$as_me:14141: checking if we must include wchar.h to declare mbstate_t" >&5 -+echo "$as_me:14261: checking if we must include wchar.h to declare mbstate_t" >&5 - echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6 - if test "${cf_cv_mbstate_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14148 "configure" -+#line 14268 "configure" - #include "confdefs.h" - - #include -@@ -14163,23 +14283,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14166: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14286: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14169: \$? = $ac_status" >&5 -+ echo "$as_me:14289: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14172: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14292: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14175: \$? = $ac_status" >&5 -+ echo "$as_me:14295: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_mbstate_t=no - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 14182 "configure" -+#line 14302 "configure" - #include "confdefs.h" - - #include -@@ -14198,16 +14318,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14201: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14321: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14204: \$? = $ac_status" >&5 -+ echo "$as_me:14324: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14207: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14327: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14210: \$? = $ac_status" >&5 -+ echo "$as_me:14330: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_mbstate_t=yes - else -@@ -14219,7 +14339,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:14222: result: $cf_cv_mbstate_t" >&5 -+echo "$as_me:14342: result: $cf_cv_mbstate_t" >&5 - echo "${ECHO_T}$cf_cv_mbstate_t" >&6 - - if test "$cf_cv_mbstate_t" = yes ; then -@@ -14241,14 +14361,14 @@ - fi - - # This is needed on Tru64 5.0 to declare wchar_t --echo "$as_me:14244: checking if we must include wchar.h to declare wchar_t" >&5 -+echo "$as_me:14364: checking if we must include wchar.h to declare wchar_t" >&5 - echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6 - if test "${cf_cv_wchar_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14251 "configure" -+#line 14371 "configure" - #include "confdefs.h" - - #include -@@ -14266,23 +14386,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14269: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14389: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14272: \$? = $ac_status" >&5 -+ echo "$as_me:14392: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14275: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14395: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14278: \$? = $ac_status" >&5 -+ echo "$as_me:14398: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_wchar_t=no - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 14285 "configure" -+#line 14405 "configure" - #include "confdefs.h" - - #include -@@ -14301,16 +14421,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14304: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14424: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14307: \$? = $ac_status" >&5 -+ echo "$as_me:14427: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14310: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14430: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14313: \$? = $ac_status" >&5 -+ echo "$as_me:14433: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_wchar_t=yes - else -@@ -14322,7 +14442,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:14325: result: $cf_cv_wchar_t" >&5 -+echo "$as_me:14445: result: $cf_cv_wchar_t" >&5 - echo "${ECHO_T}$cf_cv_wchar_t" >&6 - - if test "$cf_cv_wchar_t" = yes ; then -@@ -14344,14 +14464,14 @@ - fi - - # This is needed on Tru64 5.0 to declare wint_t --echo "$as_me:14347: checking if we must include wchar.h to declare wint_t" >&5 -+echo "$as_me:14467: checking if we must include wchar.h to declare wint_t" >&5 - echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6 - if test "${cf_cv_wint_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - - cat >conftest.$ac_ext <<_ACEOF --#line 14354 "configure" -+#line 14474 "configure" - #include "confdefs.h" - - #include -@@ -14369,23 +14489,23 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14372: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14492: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14375: \$? = $ac_status" >&5 -+ echo "$as_me:14495: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14378: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14498: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14381: \$? = $ac_status" >&5 -+ echo "$as_me:14501: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_wint_t=no - else - echo "$as_me: failed program was:" >&5 - cat conftest.$ac_ext >&5 - cat >conftest.$ac_ext <<_ACEOF --#line 14388 "configure" -+#line 14508 "configure" - #include "confdefs.h" - - #include -@@ -14404,16 +14524,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14407: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14527: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14410: \$? = $ac_status" >&5 -+ echo "$as_me:14530: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14413: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14533: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14416: \$? = $ac_status" >&5 -+ echo "$as_me:14536: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_cv_wint_t=yes - else -@@ -14425,7 +14545,7 @@ - fi - rm -f conftest.$ac_objext conftest.$ac_ext - fi --echo "$as_me:14428: result: $cf_cv_wint_t" >&5 -+echo "$as_me:14548: result: $cf_cv_wint_t" >&5 - echo "${ECHO_T}$cf_cv_wint_t" >&6 - - if test "$cf_cv_wint_t" = yes ; then -@@ -14448,10 +14568,10 @@ - - if test "$NCURSES_OK_MBSTATE_T" = 0 ; then - --echo "$as_me:14451: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5 -+echo "$as_me:14571: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5 - echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 14454 "configure" -+#line 14574 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -14469,16 +14589,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14472: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14592: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14475: \$? = $ac_status" >&5 -+ echo "$as_me:14595: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14478: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14598: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14481: \$? = $ac_status" >&5 -+ echo "$as_me:14601: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14487,7 +14607,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14490: result: $cf_result" >&5 -+echo "$as_me:14610: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result = yes ; then - -@@ -14508,10 +14628,10 @@ - - if test "$NCURSES_OK_WCHAR_T" = 0 ; then - --echo "$as_me:14511: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5 -+echo "$as_me:14631: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5 - echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 14514 "configure" -+#line 14634 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -14529,16 +14649,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14532: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14652: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14535: \$? = $ac_status" >&5 -+ echo "$as_me:14655: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14538: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14658: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14541: \$? = $ac_status" >&5 -+ echo "$as_me:14661: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14547,7 +14667,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14550: result: $cf_result" >&5 -+echo "$as_me:14670: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result = yes ; then - -@@ -14568,10 +14688,10 @@ - - if test "$NCURSES_OK_WINT_T" = 0 ; then - --echo "$as_me:14571: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5 -+echo "$as_me:14691: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5 - echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF --#line 14574 "configure" -+#line 14694 "configure" - #include "confdefs.h" - - #ifndef _XOPEN_SOURCE_EXTENDED -@@ -14589,16 +14709,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14592: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14712: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14595: \$? = $ac_status" >&5 -+ echo "$as_me:14715: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14598: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14718: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14601: \$? = $ac_status" >&5 -+ echo "$as_me:14721: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14607,7 +14727,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14610: result: $cf_result" >&5 -+echo "$as_me:14730: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result = yes ; then - -@@ -14626,11 +14746,11 @@ - - fi - --echo "$as_me:14629: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5 -+echo "$as_me:14749: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5 - echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 - - cat >conftest.$ac_ext <<_ACEOF --#line 14633 "configure" -+#line 14753 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -14658,16 +14778,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14661: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14781: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14664: \$? = $ac_status" >&5 -+ echo "$as_me:14784: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14667: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14787: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14670: \$? = $ac_status" >&5 -+ echo "$as_me:14790: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14676,7 +14796,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14679: result: $cf_result" >&5 -+echo "$as_me:14799: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - - if test $cf_result = yes ; then -@@ -14688,14 +14808,14 @@ - EOF - - else -- echo "$as_me:14691: checking for data boolnames in library" >&5 -+ echo "$as_me:14811: checking for data boolnames in library" >&5 - echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6 - # BSD linkers insist on making weak linkage, but resolve at runtime. - if test "$cross_compiling" = yes; then - - # cross-compiling - cat >conftest.$ac_ext <<_ACEOF --#line 14698 "configure" -+#line 14818 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -14727,16 +14847,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14730: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14850: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14733: \$? = $ac_status" >&5 -+ echo "$as_me:14853: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14736: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14856: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14739: \$? = $ac_status" >&5 -+ echo "$as_me:14859: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14748,7 +14868,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 14751 "configure" -+#line 14871 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -14773,15 +14893,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:14776: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:14896: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14779: \$? = $ac_status" >&5 -+ echo "$as_me:14899: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:14781: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14901: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14784: \$? = $ac_status" >&5 -+ echo "$as_me:14904: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14792,7 +14912,7 @@ - fi - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -- echo "$as_me:14795: result: $cf_result" >&5 -+ echo "$as_me:14915: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result = yes ; then - -@@ -14805,11 +14925,11 @@ - fi - fi - --echo "$as_me:14808: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5 -+echo "$as_me:14928: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5 - echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6 - - cat >conftest.$ac_ext <<_ACEOF --#line 14812 "configure" -+#line 14932 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -14837,16 +14957,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext --if { (eval echo "$as_me:14840: \"$ac_compile\"") >&5 -+if { (eval echo "$as_me:14960: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -- echo "$as_me:14843: \$? = $ac_status" >&5 -+ echo "$as_me:14963: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest.$ac_objext' -- { (eval echo "$as_me:14846: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:14966: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14849: \$? = $ac_status" >&5 -+ echo "$as_me:14969: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14855,7 +14975,7 @@ - cf_result=no - fi - rm -f conftest.$ac_objext conftest.$ac_ext --echo "$as_me:14858: result: $cf_result" >&5 -+echo "$as_me:14978: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - - if test $cf_result = yes ; then -@@ -14867,14 +14987,14 @@ - EOF - - else -- echo "$as_me:14870: checking for data boolfnames in library" >&5 -+ echo "$as_me:14990: checking for data boolfnames in library" >&5 - echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6 - # BSD linkers insist on making weak linkage, but resolve at runtime. - if test "$cross_compiling" = yes; then - - # cross-compiling - cat >conftest.$ac_ext <<_ACEOF --#line 14877 "configure" -+#line 14997 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -14906,16 +15026,16 @@ - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext --if { (eval echo "$as_me:14909: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15029: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14912: \$? = $ac_status" >&5 -+ echo "$as_me:15032: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' -- { (eval echo "$as_me:14915: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15035: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14918: \$? = $ac_status" >&5 -+ echo "$as_me:15038: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14927,7 +15047,7 @@ - - else - cat >conftest.$ac_ext <<_ACEOF --#line 14930 "configure" -+#line 15050 "configure" - #include "confdefs.h" - - #ifdef HAVE_XCURSES -@@ -14952,15 +15072,15 @@ - } - _ACEOF - rm -f conftest$ac_exeext --if { (eval echo "$as_me:14955: \"$ac_link\"") >&5 -+if { (eval echo "$as_me:15075: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? -- echo "$as_me:14958: \$? = $ac_status" >&5 -+ echo "$as_me:15078: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' -- { (eval echo "$as_me:14960: \"$ac_try\"") >&5 -+ { (eval echo "$as_me:15080: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? -- echo "$as_me:14963: \$? = $ac_status" >&5 -+ echo "$as_me:15083: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cf_result=yes - else -@@ -14971,7 +15091,7 @@ - fi - rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext - fi -- echo "$as_me:14974: result: $cf_result" >&5 -+ echo "$as_me:15094: result: $cf_result" >&5 - echo "${ECHO_T}$cf_result" >&6 - if test $cf_result = yes ; then - -@@ -15068,7 +15188,7 @@ - : ${CONFIG_STATUS=./config.status} - ac_clean_files_save=$ac_clean_files - ac_clean_files="$ac_clean_files $CONFIG_STATUS" --{ echo "$as_me:15071: creating $CONFIG_STATUS" >&5 -+{ echo "$as_me:15191: creating $CONFIG_STATUS" >&5 - echo "$as_me: creating $CONFIG_STATUS" >&6;} - cat >$CONFIG_STATUS <<_ACEOF - #! $SHELL -@@ -15200,7 +15320,7 @@ - cat >>$CONFIG_STATUS <&5 - echo "$as_me: error: ambiguous option: $1 - Try \`$0 --help' for more information." >&2;} -@@ -15263,7 +15383,7 @@ - ac_need_defaults=false;; - - # This is an error. -- -*) { { echo "$as_me:15266: error: unrecognized option: $1 -+ -*) { { echo "$as_me:15386: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&5 - echo "$as_me: error: unrecognized option: $1 - Try \`$0 --help' for more information." >&2;} -@@ -15282,7 +15402,7 @@ - ## Running config.status. ## - ## ----------------------- ## - --This file was extended by $as_me 2.52.20101001, executed with -+This file was extended by $as_me 2.52.20101002, executed with - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS -@@ -15311,7 +15431,7 @@ - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;; -- *) { { echo "$as_me:15314: error: invalid argument: $ac_config_target" >&5 -+ *) { { echo "$as_me:15434: error: invalid argument: $ac_config_target" >&5 - echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -@@ -15453,6 +15573,7 @@ - s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t - s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t - s,@PKG_CONFIG@,$PKG_CONFIG,;t t -+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t - s,@X_CFLAGS@,$X_CFLAGS,;t t - s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t - s,@X_LIBS@,$X_LIBS,;t t -@@ -15573,7 +15694,7 @@ - esac - - if test x"$ac_file" != x-; then -- { echo "$as_me:15576: creating $ac_file" >&5 -+ { echo "$as_me:15697: creating $ac_file" >&5 - echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi -@@ -15591,7 +15712,7 @@ - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:15594: error: cannot find input file: $f" >&5 -+ test -f "$f" || { { echo "$as_me:15715: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; -@@ -15604,7 +15725,7 @@ - echo $srcdir/$f - else - # /dev/null tree -- { { echo "$as_me:15607: error: cannot find input file: $f" >&5 -+ { { echo "$as_me:15728: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; -@@ -15670,7 +15791,7 @@ - * ) ac_file_in=$ac_file.in ;; - esac - -- test x"$ac_file" != x- && { echo "$as_me:15673: creating $ac_file" >&5 -+ test x"$ac_file" != x- && { echo "$as_me:15794: creating $ac_file" >&5 - echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the -@@ -15681,7 +15802,7 @@ - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) -- test -f "$f" || { { echo "$as_me:15684: error: cannot find input file: $f" >&5 -+ test -f "$f" || { { echo "$as_me:15805: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo $f;; -@@ -15694,7 +15815,7 @@ - echo $srcdir/$f - else - # /dev/null tree -- { { echo "$as_me:15697: error: cannot find input file: $f" >&5 -+ { { echo "$as_me:15818: error: cannot find input file: $f" >&5 - echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; -@@ -15752,7 +15873,7 @@ - rm -f $tmp/in - if test x"$ac_file" != x-; then - if cmp -s $ac_file $tmp/config.h 2>/dev/null; then -- { echo "$as_me:15755: $ac_file is unchanged" >&5 -+ { echo "$as_me:15876: $ac_file is unchanged" >&5 - echo "$as_me: $ac_file is unchanged" >&6;} - else - ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ -diff -Naur ncurses-5.8/test/configure.in ncurses-5.8-20110402/test/configure.in ---- ncurses-5.8/test/configure.in 2011-01-15 20:41:30.000000000 +0100 -+++ ncurses-5.8-20110402/test/configure.in 2011-03-22 10:15:08.000000000 +0100 -@@ -28,7 +28,7 @@ - dnl - dnl Author: Thomas E. Dickey 1996, etc. - dnl --dnl $Id: configure.in,v 1.89 2011/01/15 19:41:30 tom Exp $ -+dnl $Id: configure.in,v 1.90 2011/03/22 09:15:08 tom Exp $ - dnl This is a simple configuration-script for the ncurses test programs that - dnl allows the test-directory to be separately configured against a reference - dnl system (i.e., sysvr4 curses) -@@ -176,6 +176,7 @@ - AC_CHECK_HEADERS( \ - getopt.h \ - locale.h \ -+math.h \ - stdarg.h \ - sys/ioctl.h \ - sys/select.h \ -diff -Naur ncurses-5.8/test/make-tar.sh ncurses-5.8-20110402/test/make-tar.sh ---- ncurses-5.8/test/make-tar.sh 2010-11-06 19:31:46.000000000 +0100 -+++ ncurses-5.8-20110402/test/make-tar.sh 2011-03-26 21:46:51.000000000 +0100 -@@ -1,7 +1,7 @@ - #!/bin/sh --# $Id: make-tar.sh,v 1.4 2010/11/06 18:31:46 tom Exp $ -+# $Id: make-tar.sh,v 1.10 2011/03/26 20:46:51 tom Exp $ - ############################################################################## --# Copyright (c) 2010 Free Software Foundation, Inc. # -+# Copyright (c) 2010,2011 Free Software Foundation, Inc. # - # # - # Permission is hereby granted, free of charge, to any person obtaining a # - # copy of this software and associated documentation files (the "Software"), # -@@ -31,15 +31,53 @@ - # scripts. The reason for doing that is to simplify distributing the test - # programs as a separate package. - -+CDPATH=: -+export CDPATH -+ - TARGET=`pwd` - -+: ${PKG_NAME:=ncurses-examples} - : ${ROOTNAME:=ncurses-test} - : ${DESTDIR:=$TARGET} - : ${TMPDIR:=/tmp} - --# This can be run from either the test subdirectory, or from the top-level -+grep_assign() { -+ grep_assign=`egrep "^$2\>" "$1" | sed -e "s/^$2[ ]*=[ ]*//" -e 's/"//g'` -+ eval $2=\"$grep_assign\" -+} -+ -+grep_patchdate() { -+ grep_assign ../dist.mk NCURSES_MAJOR -+ grep_assign ../dist.mk NCURSES_MINOR -+ grep_assign ../dist.mk NCURSES_PATCH -+} -+ -+# The rpm spec-file in the ncurses tree is a template. Fill in the version -+# information from dist.mk -+edit_specfile() { -+ sed \ -+ -e "s/\\/$NCURSES_MAJOR/g" \ -+ -e "s/\\/$NCURSES_MINOR/g" \ -+ -e "s/\\/$NCURSES_PATCH/g" $1 >$1.new -+ chmod u+w $1 -+ mv $1.new $1 -+} -+ -+make_changelog() { -+ test -f $1 && chmod u+w $1 -+ cat >$1 <MANIFEST ) -+ - cd $BUILD || exit - -+# Remove build-artifacts. -+find . -name RCS -exec rm -rf {} \; -+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null -+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null -+find $BUILD/$ROOTNAME -type d -exec rmdir {} \; 2>/dev/null -+ - # There is no need for this script in the tar file. - rm -f $ROOTNAME/make-tar.sh - - # Remove build-artifacts. --find . -name RCS -exec rm -rf {} \; - find . -name "*.gz" -exec rm -rf {} \; - - # Make the files writable... -@@ -81,3 +139,5 @@ - - pwd - ls -l $ROOTNAME.tar.gz -+ -+# vi:ts=4 sw=4 -diff -Naur ncurses-5.8/test/package/debian/compat ncurses-5.8-20110402/test/package/debian/compat ---- ncurses-5.8/test/package/debian/compat 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/compat 2010-04-20 21:47:10.000000000 +0200 -@@ -0,0 +1 @@ -+5 -diff -Naur ncurses-5.8/test/package/debian/control ncurses-5.8-20110402/test/package/debian/control ---- ncurses-5.8/test/package/debian/control 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/control 2011-03-25 01:59:15.000000000 +0100 -@@ -0,0 +1,16 @@ -+Source: ncurses-examples -+Maintainer: Thomas E. Dickey -+Section: misc -+Priority: optional -+Standards-Version: 3.8.4 -+Build-Depends: debhelper (>= 5) -+Homepage: http://invisible-island.net/ncurses/ncurses-examples.html -+ -+Package: ncurses-examples -+Architecture: any -+Depends: ${shlibs:Depends}, ${misc:Depends} -+Description: ncurses-examples - example/test programs from ncurses -+ These are the example/test programs from the ncurses distribution. -+ . -+ This package installs in "bin/ncurses-examples" to avoid conflict with other -+ packages. -diff -Naur ncurses-5.8/test/package/debian/copyright ncurses-5.8-20110402/test/package/debian/copyright ---- ncurses-5.8/test/package/debian/copyright 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/copyright 2011-03-25 01:52:39.000000000 +0100 -@@ -0,0 +1,69 @@ -+Upstream source http://invisible-island.net/ncurses/ncurses-examples.html -+ -+Current ncurses maintainer: Thomas Dickey -+ -+------------------------------------------------------------------------------- -+ Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the -+ "Software"), 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. -+------------------------------------------------------------------------------- -+ -+Files: install-sh -+Copyright: 1994 X Consortium -+Licence: other-BSD -+ 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, 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 -+ X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -+ TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ -+ Except as contained in this notice, the name of the X Consortium shall not -+ be used in advertising or otherwise to promote the sale, use or other deal- -+ ings in this Software without prior written authorization from the X Consor- -+ tium. -+ -+ FSF changes to this file are in the public domain. -+ -+ Calling this script install-sh is preferred over install.sh, to prevent -+ `make' implicit rules from creating a file called install from it -+ when there is no Makefile. -+ -+ This script is compatible with the BSD install script, but was written -+ from scratch. It can only install one file at a time, a restriction -+ shared with many OS's install programs. -+ -+On Debian systems, the complete text of the GNU General -+Public License can be found in '/usr/share/common-licenses/GPL-2' -diff -Naur ncurses-5.8/test/package/debian/docs ncurses-5.8-20110402/test/package/debian/docs ---- ncurses-5.8/test/package/debian/docs 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/docs 2010-06-27 17:51:57.000000000 +0200 -@@ -0,0 +1 @@ -+README -diff -Naur ncurses-5.8/test/package/debian/rules ncurses-5.8-20110402/test/package/debian/rules ---- ncurses-5.8/test/package/debian/rules 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/rules 2011-03-25 17:25:17.000000000 +0100 -@@ -0,0 +1,90 @@ -+#!/usr/bin/make -f -+# MAde with the aid of dh_make, by Craig Small -+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -+# Some lines taken from debmake, by Cristoph Lameter. -+ -+# Uncomment this to turn on verbose mode. -+#export DH_VERBOSE=1 -+ -+# These are used for cross-compiling and for saving the configure script -+# from having to guess our platform (since we know it already) -+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -+ -+CFLAGS = -+ -+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -+ CFLAGS += -O0 -+else -+ CFLAGS += -O2 -+endif -+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) -+ INSTALL_PROGRAM += -s -+endif -+ -+ -+configure: configure-stamp -+configure-stamp: -+ dh_testdir -+ -+ CFLAGS="$(CFLAGS)" ./configure \ -+ --host=$(DEB_HOST_GNU_TYPE) \ -+ --build=$(DEB_BUILD_GNU_TYPE) \ -+ --bindir=\$${prefix}/bin/ncurses-examples \ -+ --prefix=/usr \ -+ --with-ncursesw \ -+ --disable-rpath-hack -+ -+ touch configure-stamp -+ -+build: build-stamp -+build-stamp: configure-stamp -+ dh_testdir -+ -+ $(MAKE) -+ -+ touch build-stamp -+ -+clean: -+ dh_testdir -+ dh_testroot -+ -+ [ ! -f makefile ] || $(MAKE) distclean -+ -+ rm -f configure-stamp build-stamp install-stamp -+ -+ dh_clean -+ -+install: install-stamp -+install-stamp: build-stamp -+ dh_testdir -+ dh_testroot -+ dh_clean -k -+ dh_installdirs -+ -+ $(MAKE) install DESTDIR=$(CURDIR)/debian/ncurses-examples -+ -+ touch install-stamp -+ -+# Build architecture-independent files here. -+binary-indep: build install -+# No binary-indep target. -+ -+# Build architecture-dependent files here. -+binary-arch: build install -+ dh_testdir -+ dh_testroot -+ dh_installdocs -+ dh_installexamples -+ dh_installchangelogs NEWS -+ dh_strip -+ dh_compress -+ dh_fixperms -+ dh_installdeb -+ dh_shlibdeps -+ dh_gencontrol -+ dh_md5sums -+ dh_builddeb -+ -+binary: binary-indep binary-arch -+.PHONY: build clean binary-indep binary-arch binary install install-stamp -diff -Naur ncurses-5.8/test/package/debian/source/format ncurses-5.8-20110402/test/package/debian/source/format ---- ncurses-5.8/test/package/debian/source/format 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/source/format 2010-12-30 15:23:50.000000000 +0100 -@@ -0,0 +1 @@ -+3.0 (native) -diff -Naur ncurses-5.8/test/package/debian/watch ncurses-5.8-20110402/test/package/debian/watch ---- ncurses-5.8/test/package/debian/watch 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/debian/watch 2011-03-25 01:59:53.000000000 +0100 -@@ -0,0 +1,4 @@ -+version=3 -+ -+opts=passive ftp://invisible-island.net/ncurses-examples/ncurses-examples-([\d.]+)\.tgz \ -+ debian uupdate -diff -Naur ncurses-5.8/test/package/ncurses-examples.spec ncurses-5.8-20110402/test/package/ncurses-examples.spec ---- ncurses-5.8/test/package/ncurses-examples.spec 1970-01-01 01:00:00.000000000 +0100 -+++ ncurses-5.8-20110402/test/package/ncurses-examples.spec 2011-03-25 18:46:44.000000000 +0100 -@@ -0,0 +1,55 @@ -+Summary: ncurses-examples - example/test programs from ncurses -+%define AppProgram ncurses-examples -+%define AppVersion MAJOR.MINOR -+%define AppRelease YYYYMMDD -+# $Id: ncurses-examples.spec,v 1.2 2011/03/25 17:46:44 tom Exp $ -+Name: %{AppProgram} -+Version: %{AppVersion} -+Release: %{AppRelease} -+License: MIT -+Group: Applications/Development -+URL: ftp://invisible-island.net/%{AppProgram} -+Source0: %{AppProgram}-%{AppRelease}.tgz -+Packager: Thomas Dickey -+ -+%description -+These are the example/test programs from the ncurses MAJOR.MINOR distribution, -+for patch-date YYYYMMDD. -+ -+This package installs in "bin/ncurses-examples" to avoid conflict with other -+packages. -+%prep -+ -+%setup -q -n %{AppProgram}-%{AppRelease} -+ -+%build -+ -+INSTALL_PROGRAM='${INSTALL}' \ -+ ./configure \ -+ --target %{_target_platform} \ -+ --prefix=%{_prefix} \ -+ --bindir=%{_bindir}/%{AppProgram} \ -+ --with-ncursesw \ -+ --disable-rpath-hack -+ -+make -+ -+%install -+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -+ -+make install DESTDIR=$RPM_BUILD_ROOT -+ -+strip $RPM_BUILD_ROOT%{_bindir}/%{AppProgram}/* -+ -+%clean -+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -+ -+%files -+%defattr(-,root,root) -+%{_bindir}/%{AppProgram}/* -+ -+%changelog -+# each patch should add its ChangeLog entries here -+ -+* Fri Mar 25 2010 Thomas Dickey -+- initial version -diff -Naur ncurses-5.8/test/tclock.c ncurses-5.8-20110402/test/tclock.c ---- ncurses-5.8/test/tclock.c 2010-11-14 02:04:52.000000000 +0100 -+++ ncurses-5.8-20110402/test/tclock.c 2011-03-22 10:16:00.000000000 +0100 -@@ -1,7 +1,9 @@ --/* $Id: tclock.c,v 1.29 2010/11/14 01:04:52 tom Exp $ */ -+/* $Id: tclock.c,v 1.30 2011/03/22 09:16:00 tom Exp $ */ - - #include - -+#if HAVE_MATH_H -+ - #include - - #if TIME_WITH_SYS_TIME -@@ -256,3 +258,11 @@ - endwin(); - ExitProgram(EXIT_SUCCESS); - } -+#else -+int -+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) -+{ -+ printf("This program requires the development header math.h\n"); -+ ExitProgram(EXIT_FAILURE); -+} -+#endif -diff -Naur ncurses-5.8/test/test.priv.h ncurses-5.8-20110402/test/test.priv.h ---- ncurses-5.8/test/test.priv.h 2011-01-16 00:50:33.000000000 +0100 -+++ ncurses-5.8-20110402/test/test.priv.h 2011-03-22 10:15:45.000000000 +0100 -@@ -29,7 +29,7 @@ - /**************************************************************************** - * Author: Thomas E. Dickey 1996-on * - ****************************************************************************/ --/* $Id: test.priv.h,v 1.102 2011/01/15 23:50:33 tom Exp $ */ -+/* $Id: test.priv.h,v 1.103 2011/03/22 09:15:45 tom Exp $ */ - - #ifndef __TEST_PRIV_H - #define __TEST_PRIV_H 1 -@@ -118,6 +118,10 @@ - #define HAVE_LOCALE_H 0 - #endif - -+#ifndef HAVE_MATH_H -+#define HAVE_MATH_H 0 -+#endif -+ - #ifndef HAVE_MENU_H - #define HAVE_MENU_H 0 - #endif -diff -Naur ncurses-5.8/TO-DO ncurses-5.8-20110402/TO-DO ---- ncurses-5.8/TO-DO 2011-02-26 17:58:53.000000000 +0100 -+++ ncurses-5.8-20110402/TO-DO 2011-03-28 02:23:02.000000000 +0200 -@@ -25,7 +25,7 @@ - -- sale, use or other dealings in this Software without prior written -- - -- authorization. -- - ------------------------------------------------------------------------------- ---- $Id: TO-DO,v 1.56 2011/02/26 16:58:53 tom Exp $ -+-- $Id: TO-DO,v 1.57 2011/03/28 00:23:02 tom Exp $ - ------------------------------------------------------------------------------- - - SHORT-TERM TO-DO ITEMS: -@@ -66,24 +66,6 @@ - + the --with-pthread configuration builds for Cygwin, but does not work - properly (test/worm.c shows all of the worms in the same location). - --+ the Ada95 tree may require a small fix to build on Cygwin, since the GNAT -- port to that platform for 3.4.4 provides an incomplete Interrupts.Names -- package. For instance (your gcc version may be different): -- /usr/lib/gcc/i686-pc-cygwin/3.4.4/adainclude/a-intnam.ads -- -- cut here... --------------------------------------------------------------------------------- ----- a-intnam.ads.orig 2003-10-21 13:41:51.000000000 +0000 --+++ a-intnam.ads 2007-05-05 22:40:02.609375000 +0000 --@@ -44,5 +44,6 @@ -- -- DUMMY_INTERRUPT_1 : constant Interrupt_ID := 1; -- DUMMY_INTERRUPT_2 : constant Interrupt_ID := 2; --+ SIGINT : constant Interrupt_ID := 2; -- -- end Ada.Interrupts.Names; --------------------------------------------------------------------------------- -- - + the --enable-rpath configure option builds for the corresponding platforms; - however combining it with --with-ticlib and --with-termlib does not always - produce libraries that can be run without setting environment variables. diff --git a/packages/graphics/Mesa/meta b/packages/graphics/Mesa/meta index 4e79422140..7af629d1ed 100644 --- a/packages/graphics/Mesa/meta +++ b/packages/graphics/Mesa/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="Mesa" -PKG_VERSION="7.10.1" +PKG_VERSION="7.10.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/graphics/Mesa/patches/Mesa-7.10.1-__atom.patch b/packages/graphics/Mesa/patches/Mesa-7.10.2-__atom.patch similarity index 100% rename from packages/graphics/Mesa/patches/Mesa-7.10.1-__atom.patch rename to packages/graphics/Mesa/patches/Mesa-7.10.2-__atom.patch diff --git a/packages/graphics/Mesa/patches/Mesa-7.10.1-libdrm_nouveau.patch b/packages/graphics/Mesa/patches/Mesa-7.10.2-libdrm_nouveau.patch similarity index 100% rename from packages/graphics/Mesa/patches/Mesa-7.10.1-libdrm_nouveau.patch rename to packages/graphics/Mesa/patches/Mesa-7.10.2-libdrm_nouveau.patch diff --git a/packages/linux/meta b/packages/linux/meta index 301a39cbba..ec67f06f15 100644 --- a/packages/linux/meta +++ b/packages/linux/meta @@ -37,7 +37,7 @@ PKG_IS_ADDON="no" PKG_AUTORECONF="no" if [ "$LINUX_NEXT" = "yes" -a "$LINUX" = "default" ]; then - PKG_VERSION="2.6.39-rc1" + PKG_VERSION="2.6.39-rc2" # PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="http://www.kernel.org/pub/linux/kernel/v2.6/testing/$PKG_NAME-$PKG_VERSION.tar.bz2" fi diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-008-014-linux-2.6.35-01-add_lirc_drivers-20100407-0.1.patch b/packages/linux/patches/linux-2.6.35-ti.980.1r14-008-014-linux-2.6.35-01-add_lirc_drivers-20100407-0.1.patch deleted file mode 100644 index 5fba624388..0000000000 --- a/packages/linux/patches/linux-2.6.35-ti.980.1r14-008-014-linux-2.6.35-01-add_lirc_drivers-20100407-0.1.patch +++ /dev/null @@ -1,17337 +0,0 @@ -diff -Naur linux-2.6.35-rc6/drivers/input/Kconfig linux-2.6.35-rc6.patch/drivers/input/Kconfig ---- linux-2.6.35-rc6/drivers/input/Kconfig 2010-07-22 21:13:38.000000000 +0200 -+++ linux-2.6.35-rc6.patch/drivers/input/Kconfig 2010-08-02 09:28:03.918052011 +0200 -@@ -183,6 +183,8 @@ - - source "drivers/input/touchscreen/Kconfig" - -+source "drivers/input/lirc/Kconfig" -+ - source "drivers/input/misc/Kconfig" - - endif -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/Kconfig linux-2.6.35-rc6.patch/drivers/input/lirc/Kconfig ---- linux-2.6.35-rc6/drivers/input/lirc/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/Kconfig 2010-08-02 09:28:03.919051573 +0200 -@@ -0,0 +1,116 @@ -+# -+# LIRC driver(s) configuration -+# -+menuconfig INPUT_LIRC -+ tristate "Linux Infrared Remote Control IR receiver/transmitter drivers" -+ help -+ Say Y here, and all supported Linux Infrared Remote Control IR and -+ RF receiver and transmitter drivers will be displayed. When paired -+ with a remote control and the lirc daemon, the receiver drivers -+ allow control of your Linux system via remote control. -+ -+if INPUT_LIRC -+ -+config LIRC_BT829 -+ tristate "BT829 based hardware" -+ depends on INPUT_LIRC -+ help -+ Driver for the IR interface on BT829-based hardware -+ -+config LIRC_ENE0100 -+ tristate "ENE KB3924/ENE0100 CIR Port Reciever" -+ depends on INPUT_LIRC -+ help -+ This is a driver for CIR port handled by ENE KB3924 embedded -+ controller found on some notebooks. -+ It appears on PNP list as ENE0100. -+ -+config LIRC_I2C -+ tristate "I2C Based IR Receivers" -+ depends on INPUT_LIRC -+ help -+ Driver for I2C-based IR receivers, such as those commonly -+ found onboard Hauppauge PVR-150/250/350 video capture cards -+ -+config LIRC_IGORPLUGUSB -+ tristate "Igor Cesko's USB IR Receiver" -+ depends on INPUT_LIRC && USB -+ help -+ Driver for Igor Cesko's USB IR Receiver -+ -+config LIRC_IMON -+ tristate "Legacy SoundGraph iMON Receiver and Display" -+ depends on INPUT_LIRC -+ help -+ Driver for the original SoundGraph iMON IR Receiver and Display -+ -+ Current generation iMON devices use the input layer imon driver. -+ -+config LIRC_IT87 -+ tristate "ITE IT87XX CIR Port Receiver" -+ depends on INPUT_LIRC -+ help -+ Driver for the ITE IT87xx IR Receiver -+ -+config LIRC_ITE8709 -+ tristate "ITE8709 CIR Port Receiver" -+ depends on INPUT_LIRC && PNP -+ help -+ Driver for the ITE8709 IR Receiver -+ -+config LIRC_MCEUSB -+ tristate "Windows Media Center Ed. USB IR Transceiver" -+ depends on INPUT_LIRC && USB -+ help -+ Driver for Windows Media Center Ed. USB IR Transceivers -+ -+config LIRC_PARALLEL -+ tristate "Homebrew Parallel Port Receiver" -+ depends on INPUT_LIRC && !SMP -+ help -+ Driver for Homebrew Parallel Port Receivers -+ -+config LIRC_SASEM -+ tristate "Sasem USB IR Remote" -+ depends on INPUT_LIRC -+ help -+ Driver for the Sasem OnAir Remocon-V or Dign HV5 HTPC IR/VFD Module -+ -+config LIRC_SERIAL -+ tristate "Homebrew Serial Port Receiver" -+ depends on INPUT_LIRC -+ help -+ Driver for Homebrew Serial Port Receivers -+ -+config LIRC_SERIAL_TRANSMITTER -+ bool "Serial Port Transmitter" -+ default y -+ depends on LIRC_SERIAL -+ help -+ Serial Port Transmitter support -+ -+config LIRC_SIR -+ tristate "Built-in SIR IrDA port" -+ depends on INPUT_LIRC -+ help -+ Driver for the SIR IrDA port -+ -+config LIRC_STREAMZAP -+ tristate "Streamzap PC Receiver" -+ depends on INPUT_LIRC -+ help -+ Driver for the Streamzap PC Receiver -+ -+config LIRC_TTUSBIR -+ tristate "Technotrend USB IR Receiver" -+ depends on INPUT_LIRC && USB -+ help -+ Driver for the Technotrend USB IR Receiver -+ -+config LIRC_ZILOG -+ tristate "Zilog/Hauppauge IR Transmitter" -+ depends on INPUT_LIRC -+ help -+ Driver for the Zilog/Hauppauge IR Transmitter, found on -+ PVR-150/500, HVR-1200/1250/1700/1800, HD-PVR and other cards -+endif -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_bt829.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_bt829.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_bt829.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_bt829.c 2010-08-02 09:28:03.925051670 +0200 -@@ -0,0 +1,383 @@ -+/* -+ * Remote control driver for the TV-card based on bt829 -+ * -+ * by Leonid Froenchenko -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+*/ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "lirc_dev.h" -+ -+static int poll_main(void); -+static int atir_init_start(void); -+ -+static void write_index(unsigned char index, unsigned int value); -+static unsigned int read_index(unsigned char index); -+ -+static void do_i2c_start(void); -+static void do_i2c_stop(void); -+ -+static void seems_wr_byte(unsigned char al); -+static unsigned char seems_rd_byte(void); -+ -+static unsigned int read_index(unsigned char al); -+static void write_index(unsigned char ah, unsigned int edx); -+ -+static void cycle_delay(int cycle); -+ -+static void do_set_bits(unsigned char bl); -+static unsigned char do_get_bits(void); -+ -+#define DATA_PCI_OFF 0x7FFC00 -+#define WAIT_CYCLE 20 -+ -+#define DRIVER_NAME "lirc_bt829" -+ -+static int debug; -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG DRIVER_NAME ": "fmt, ## args); \ -+ } while (0) -+ -+static int atir_minor; -+static unsigned long pci_addr_phys; -+static unsigned char *pci_addr_lin; -+ -+static struct lirc_driver atir_driver; -+ -+static struct pci_dev *do_pci_probe(void) -+{ -+ struct pci_dev *my_dev; -+ my_dev = pci_get_device(PCI_VENDOR_ID_ATI, -+ PCI_DEVICE_ID_ATI_264VT, NULL); -+ if (my_dev) { -+ printk(KERN_ERR DRIVER_NAME ": Using device: %s\n", -+ pci_name(my_dev)); -+ pci_addr_phys = 0; -+ if (my_dev->resource[0].flags & IORESOURCE_MEM) { -+ pci_addr_phys = my_dev->resource[0].start; -+ printk(KERN_INFO DRIVER_NAME ": memory at 0x%08X \n", -+ (unsigned int)pci_addr_phys); -+ } -+ if (pci_addr_phys == 0) { -+ printk(KERN_ERR DRIVER_NAME ": no memory resource ?\n"); -+ return NULL; -+ } -+ } else { -+ printk(KERN_ERR DRIVER_NAME ": pci_probe failed\n"); -+ return NULL; -+ } -+ return my_dev; -+} -+ -+static int atir_add_to_buf(void *data, struct lirc_buffer *buf) -+{ -+ unsigned char key; -+ int status; -+ status = poll_main(); -+ key = (status >> 8) & 0xFF; -+ if (status & 0xFF) { -+ dprintk("reading key %02X\n", key); -+ lirc_buffer_write(buf, &key); -+ return 0; -+ } -+ return -ENODATA; -+} -+ -+static int atir_set_use_inc(void *data) -+{ -+ dprintk("driver is opened\n"); -+ return 0; -+} -+ -+static void atir_set_use_dec(void *data) -+{ -+ dprintk("driver is closed\n"); -+} -+ -+int init_module(void) -+{ -+ struct pci_dev *pdev; -+ -+ pdev = do_pci_probe(); -+ if (pdev == NULL) -+ return 1; -+ -+ if (!atir_init_start()) -+ return 1; -+ -+ strcpy(atir_driver.name, "ATIR"); -+ atir_driver.minor = -1; -+ atir_driver.code_length = 8; -+ atir_driver.sample_rate = 10; -+ atir_driver.data = 0; -+ atir_driver.add_to_buf = atir_add_to_buf; -+ atir_driver.set_use_inc = atir_set_use_inc; -+ atir_driver.set_use_dec = atir_set_use_dec; -+ atir_driver.dev = &pdev->dev; -+ atir_driver.owner = THIS_MODULE; -+ -+ atir_minor = lirc_register_driver(&atir_driver); -+ if (atir_minor < 0) { -+ printk(KERN_ERR DRIVER_NAME ": failed to register driver!\n"); -+ return atir_minor; -+ } -+ dprintk("driver is registered on minor %d\n", atir_minor); -+ -+ return 0; -+} -+ -+ -+void cleanup_module(void) -+{ -+ lirc_unregister_driver(atir_minor); -+} -+ -+ -+static int atir_init_start(void) -+{ -+ pci_addr_lin = ioremap(pci_addr_phys + DATA_PCI_OFF, 0x400); -+ if (pci_addr_lin == 0) { -+ printk(KERN_INFO DRIVER_NAME ": pci mem must be mapped\n"); -+ return 0; -+ } -+ return 1; -+} -+ -+static void cycle_delay(int cycle) -+{ -+ udelay(WAIT_CYCLE*cycle); -+} -+ -+ -+static int poll_main() -+{ -+ unsigned char status_high, status_low; -+ -+ do_i2c_start(); -+ -+ seems_wr_byte(0xAA); -+ seems_wr_byte(0x01); -+ -+ do_i2c_start(); -+ -+ seems_wr_byte(0xAB); -+ -+ status_low = seems_rd_byte(); -+ status_high = seems_rd_byte(); -+ -+ do_i2c_stop(); -+ -+ return (status_high << 8) | status_low; -+} -+ -+static void do_i2c_start(void) -+{ -+ do_set_bits(3); -+ cycle_delay(4); -+ -+ do_set_bits(1); -+ cycle_delay(7); -+ -+ do_set_bits(0); -+ cycle_delay(2); -+} -+ -+static void do_i2c_stop(void) -+{ -+ unsigned char bits; -+ bits = do_get_bits() & 0xFD; -+ do_set_bits(bits); -+ cycle_delay(1); -+ -+ bits |= 1; -+ do_set_bits(bits); -+ cycle_delay(2); -+ -+ bits |= 2; -+ do_set_bits(bits); -+ bits = 3; -+ do_set_bits(bits); -+ cycle_delay(2); -+} -+ -+static void seems_wr_byte(unsigned char value) -+{ -+ int i; -+ unsigned char reg; -+ -+ reg = do_get_bits(); -+ for (i = 0; i < 8; i++) { -+ if (value & 0x80) -+ reg |= 0x02; -+ else -+ reg &= 0xFD; -+ -+ do_set_bits(reg); -+ cycle_delay(1); -+ -+ reg |= 1; -+ do_set_bits(reg); -+ cycle_delay(1); -+ -+ reg &= 0xFE; -+ do_set_bits(reg); -+ cycle_delay(1); -+ value <<= 1; -+ } -+ cycle_delay(2); -+ -+ reg |= 2; -+ do_set_bits(reg); -+ -+ reg |= 1; -+ do_set_bits(reg); -+ -+ cycle_delay(1); -+ do_get_bits(); -+ -+ reg &= 0xFE; -+ do_set_bits(reg); -+ cycle_delay(3); -+} -+ -+static unsigned char seems_rd_byte(void) -+{ -+ int i; -+ int rd_byte; -+ unsigned char bits_2, bits_1; -+ -+ bits_1 = do_get_bits() | 2; -+ do_set_bits(bits_1); -+ -+ rd_byte = 0; -+ for (i = 0; i < 8; i++) { -+ bits_1 &= 0xFE; -+ do_set_bits(bits_1); -+ cycle_delay(2); -+ -+ bits_1 |= 1; -+ do_set_bits(bits_1); -+ cycle_delay(1); -+ -+ bits_2 = do_get_bits(); -+ if (bits_2 & 2) -+ rd_byte |= 1; -+ -+ rd_byte <<= 1; -+ } -+ -+ bits_1 = 0; -+ if (bits_2 == 0) -+ bits_1 |= 2; -+ -+ do_set_bits(bits_1); -+ cycle_delay(2); -+ -+ bits_1 |= 1; -+ do_set_bits(bits_1); -+ cycle_delay(3); -+ -+ bits_1 &= 0xFE; -+ do_set_bits(bits_1); -+ cycle_delay(2); -+ -+ rd_byte >>= 1; -+ rd_byte &= 0xFF; -+ return rd_byte; -+} -+ -+static void do_set_bits(unsigned char new_bits) -+{ -+ int reg_val; -+ reg_val = read_index(0x34); -+ if (new_bits & 2) { -+ reg_val &= 0xFFFFFFDF; -+ reg_val |= 1; -+ } else { -+ reg_val &= 0xFFFFFFFE; -+ reg_val |= 0x20; -+ } -+ reg_val |= 0x10; -+ write_index(0x34, reg_val); -+ -+ reg_val = read_index(0x31); -+ if (new_bits & 1) -+ reg_val |= 0x1000000; -+ else -+ reg_val &= 0xFEFFFFFF; -+ -+ reg_val |= 0x8000000; -+ write_index(0x31, reg_val); -+} -+ -+static unsigned char do_get_bits(void) -+{ -+ unsigned char bits; -+ int reg_val; -+ -+ reg_val = read_index(0x34); -+ reg_val |= 0x10; -+ reg_val &= 0xFFFFFFDF; -+ write_index(0x34, reg_val); -+ -+ reg_val = read_index(0x34); -+ bits = 0; -+ if (reg_val & 8) -+ bits |= 2; -+ else -+ bits &= 0xFD; -+ -+ reg_val = read_index(0x31); -+ if (reg_val & 0x1000000) -+ bits |= 1; -+ else -+ bits &= 0xFE; -+ -+ return bits; -+} -+ -+static unsigned int read_index(unsigned char index) -+{ -+ unsigned char *addr; -+ unsigned int value; -+ /* addr = pci_addr_lin + DATA_PCI_OFF + ((index & 0xFF) << 2); */ -+ addr = pci_addr_lin + ((index & 0xFF) << 2); -+ value = readl(addr); -+ return value; -+} -+ -+static void write_index(unsigned char index, unsigned int reg_val) -+{ -+ unsigned char *addr; -+ addr = pci_addr_lin + ((index & 0xFF) << 2); -+ writel(reg_val, addr); -+} -+ -+MODULE_AUTHOR("Froenchenko Leonid"); -+MODULE_DESCRIPTION("IR remote driver for bt829 based TV cards"); -+MODULE_LICENSE("GPL"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Debug enabled or not"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_dev.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_dev.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_dev.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_dev.c 2010-08-02 09:28:03.928052591 +0200 -@@ -0,0 +1,850 @@ -+/* -+ * LIRC base driver -+ * -+ * by Artur Lipowski -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#ifdef CONFIG_COMPAT -+#include -+#endif -+ -+#include -+#include "lirc_dev.h" -+ -+static int debug; -+ -+#define IRCTL_DEV_NAME "BaseRemoteCtl" -+#define NOPLUG -1 -+#define LOGHEAD "lirc_dev (%s[%d]): " -+ -+static dev_t lirc_base_dev; -+ -+struct irctl { -+ struct lirc_driver d; -+ int attached; -+ int open; -+ -+ struct mutex irctl_lock; -+ struct lirc_buffer *buf; -+ unsigned int chunk_size; -+ -+ struct task_struct *task; -+ long jiffies_to_wait; -+ -+ struct cdev cdev; -+}; -+ -+static DEFINE_MUTEX(lirc_dev_lock); -+ -+static struct irctl *irctls[MAX_IRCTL_DEVICES]; -+ -+/* Only used for sysfs but defined to void otherwise */ -+static struct class *lirc_class; -+ -+/* helper function -+ * initializes the irctl structure -+ */ -+static void init_irctl(struct irctl *ir) -+{ -+ dev_dbg(ir->d.dev, LOGHEAD "initializing irctl\n", -+ ir->d.name, ir->d.minor); -+ mutex_init(&ir->irctl_lock); -+ ir->d.minor = NOPLUG; -+} -+ -+static void cleanup(struct irctl *ir) -+{ -+ dev_dbg(ir->d.dev, LOGHEAD "cleaning up\n", ir->d.name, ir->d.minor); -+ -+ device_destroy(lirc_class, MKDEV(MAJOR(lirc_base_dev), ir->d.minor)); -+ -+ if (ir->buf != ir->d.rbuf) { -+ lirc_buffer_free(ir->buf); -+ kfree(ir->buf); -+ } -+ ir->buf = NULL; -+} -+ -+/* helper function -+ * reads key codes from driver and puts them into buffer -+ * returns 0 on success -+ */ -+static int add_to_buf(struct irctl *ir) -+{ -+ if (ir->d.add_to_buf) { -+ int res = -ENODATA; -+ int got_data = 0; -+ -+ /* -+ * service the device as long as it is returning -+ * data and we have space -+ */ -+get_data: -+ res = ir->d.add_to_buf(ir->d.data, ir->buf); -+ if (res == 0) { -+ got_data++; -+ goto get_data; -+ } -+ -+ if (res == -ENODEV) -+ kthread_stop(ir->task); -+ -+ return got_data ? 0 : res; -+ } -+ -+ return 0; -+} -+ -+/* main function of the polling thread -+ */ -+static int lirc_thread(void *irctl) -+{ -+ struct irctl *ir = irctl; -+ -+ dev_dbg(ir->d.dev, LOGHEAD "poll thread started\n", -+ ir->d.name, ir->d.minor); -+ -+ do { -+ if (ir->open) { -+ if (ir->jiffies_to_wait) { -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule_timeout(ir->jiffies_to_wait); -+ } -+ if (kthread_should_stop()) -+ break; -+ if (!add_to_buf(ir)) -+ wake_up_interruptible(&ir->buf->wait_poll); -+ } else { -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule(); -+ } -+ } while (!kthread_should_stop()); -+ -+ dev_dbg(ir->d.dev, LOGHEAD "poll thread ended\n", -+ ir->d.name, ir->d.minor); -+ -+ return 0; -+} -+ -+ -+static struct file_operations fops = { -+ .owner = THIS_MODULE, -+ .read = lirc_dev_fop_read, -+ .write = lirc_dev_fop_write, -+ .poll = lirc_dev_fop_poll, -+ .ioctl = lirc_dev_fop_ioctl, -+#ifdef CONFIG_COMPAT -+ .compat_ioctl = lirc_dev_fop_compat_ioctl, -+#endif -+ .open = lirc_dev_fop_open, -+ .release = lirc_dev_fop_close, -+}; -+ -+static int lirc_cdev_add(struct irctl *ir) -+{ -+ int retval; -+ struct lirc_driver *d = &ir->d; -+ -+ if (d->fops) { -+ cdev_init(&ir->cdev, d->fops); -+ ir->cdev.owner = d->owner; -+ } else { -+ cdev_init(&ir->cdev, &fops); -+ ir->cdev.owner = THIS_MODULE; -+ } -+ kobject_set_name(&ir->cdev.kobj, "lirc%d", d->minor); -+ -+ retval = cdev_add(&ir->cdev, MKDEV(MAJOR(lirc_base_dev), d->minor), 1); -+ if (retval) -+ kobject_put(&ir->cdev.kobj); -+ -+ return retval; -+} -+ -+int lirc_register_driver(struct lirc_driver *d) -+{ -+ struct irctl *ir; -+ int minor; -+ int bytes_in_key; -+ unsigned int chunk_size; -+ unsigned int buffer_size; -+ int err; -+ -+ if (!d) { -+ printk(KERN_ERR "lirc_dev: lirc_register_driver: " -+ "driver pointer must be not NULL!\n"); -+ err = -EBADRQC; -+ goto out; -+ } -+ -+ if (MAX_IRCTL_DEVICES <= d->minor) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "\"minor\" must be between 0 and %d (%d)!\n", -+ MAX_IRCTL_DEVICES-1, d->minor); -+ err = -EBADRQC; -+ goto out; -+ } -+ -+ if (1 > d->code_length || (BUFLEN * 8) < d->code_length) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "code length in bits for minor (%d) " -+ "must be less than %d!\n", -+ d->minor, BUFLEN * 8); -+ err = -EBADRQC; -+ goto out; -+ } -+ -+ dev_dbg(d->dev, "lirc_dev: lirc_register_driver: sample_rate: %d\n", -+ d->sample_rate); -+ if (d->sample_rate) { -+ if (2 > d->sample_rate || HZ < d->sample_rate) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "sample_rate must be between 2 and %d!\n", HZ); -+ err = -EBADRQC; -+ goto out; -+ } -+ if (!d->add_to_buf) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "add_to_buf cannot be NULL when " -+ "sample_rate is set\n"); -+ err = -EBADRQC; -+ goto out; -+ } -+ } else if (!(d->fops && d->fops->read) && !d->rbuf) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "fops->read and rbuf cannot all be NULL!\n"); -+ err = -EBADRQC; -+ goto out; -+ } else if (!d->rbuf) { -+ if (!(d->fops && d->fops->read && d->fops->poll && -+ d->fops->ioctl)) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "neither read, poll nor ioctl can be NULL!\n"); -+ err = -EBADRQC; -+ goto out; -+ } -+ } -+ -+ mutex_lock(&lirc_dev_lock); -+ -+ minor = d->minor; -+ -+ if (minor < 0) { -+ /* find first free slot for driver */ -+ for (minor = 0; minor < MAX_IRCTL_DEVICES; minor++) -+ if (!irctls[minor]) -+ break; -+ if (MAX_IRCTL_DEVICES == minor) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "no free slots for drivers!\n"); -+ err = -ENOMEM; -+ goto out_lock; -+ } -+ } else if (irctls[minor]) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "minor (%d) just registered!\n", minor); -+ err = -EBUSY; -+ goto out_lock; -+ } -+ -+ ir = kzalloc(sizeof(struct irctl), GFP_KERNEL); -+ if (!ir) { -+ err = -ENOMEM; -+ goto out_lock; -+ } -+ init_irctl(ir); -+ irctls[minor] = ir; -+ d->minor = minor; -+ -+ if (d->sample_rate) { -+ ir->jiffies_to_wait = HZ / d->sample_rate; -+ } else { -+ /* it means - wait for external event in task queue */ -+ ir->jiffies_to_wait = 0; -+ } -+ -+ /* some safety check 8-) */ -+ d->name[sizeof(d->name)-1] = '\0'; -+ -+ bytes_in_key = BITS_TO_LONGS(d->code_length) + -+ (d->code_length % 8 ? 1 : 0); -+ buffer_size = d->buffer_size ? d->buffer_size : BUFLEN / bytes_in_key; -+ chunk_size = d->chunk_size ? d->chunk_size : bytes_in_key; -+ -+ if (d->rbuf) { -+ ir->buf = d->rbuf; -+ } else { -+ ir->buf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!ir->buf) { -+ err = -ENOMEM; -+ goto out_lock; -+ } -+ err = lirc_buffer_init(ir->buf, chunk_size, buffer_size); -+ if (err) { -+ kfree(ir->buf); -+ goto out_lock; -+ } -+ } -+ ir->chunk_size = ir->buf->chunk_size; -+ -+ if (d->features == 0) -+ d->features = LIRC_CAN_REC_LIRCCODE; -+ -+ ir->d = *d; -+ ir->d.minor = minor; -+ -+ device_create(lirc_class, ir->d.dev, -+ MKDEV(MAJOR(lirc_base_dev), ir->d.minor), NULL, -+ "lirc%u", ir->d.minor); -+ -+ if (d->sample_rate) { -+ /* try to fire up polling thread */ -+ ir->task = kthread_run(lirc_thread, (void *)ir, "lirc_dev"); -+ if (IS_ERR(ir->task)) { -+ dev_err(d->dev, "lirc_dev: lirc_register_driver: " -+ "cannot run poll thread for minor = %d\n", -+ d->minor); -+ err = -ECHILD; -+ goto out_sysfs; -+ } -+ } -+ -+ err = lirc_cdev_add(ir); -+ if (err) -+ goto out_sysfs; -+ -+ ir->attached = 1; -+ mutex_unlock(&lirc_dev_lock); -+ -+ dev_info(ir->d.dev, "lirc_dev: driver %s registered at minor = %d\n", -+ ir->d.name, ir->d.minor); -+ return minor; -+ -+out_sysfs: -+ device_destroy(lirc_class, MKDEV(MAJOR(lirc_base_dev), ir->d.minor)); -+out_lock: -+ mutex_unlock(&lirc_dev_lock); -+out: -+ return err; -+} -+EXPORT_SYMBOL(lirc_register_driver); -+ -+int lirc_unregister_driver(int minor) -+{ -+ struct irctl *ir; -+ -+ if (minor < 0 || minor >= MAX_IRCTL_DEVICES) { -+ printk(KERN_ERR "lirc_dev: lirc_unregister_driver: " -+ "\"minor (%d)\" must be between 0 and %d!\n", -+ minor, MAX_IRCTL_DEVICES-1); -+ return -EBADRQC; -+ } -+ -+ ir = irctls[minor]; -+ -+ mutex_lock(&lirc_dev_lock); -+ -+ if (ir->d.minor != minor) { -+ printk(KERN_ERR "lirc_dev: lirc_unregister_driver: " -+ "minor (%d) device not registered!", minor); -+ mutex_unlock(&lirc_dev_lock); -+ return -ENOENT; -+ } -+ -+ /* end up polling thread */ -+ if (ir->task) -+ kthread_stop(ir->task); -+ -+ dev_dbg(ir->d.dev, "lirc_dev: driver %s unregistered from minor = %d\n", -+ ir->d.name, ir->d.minor); -+ -+ ir->attached = 0; -+ if (ir->open) { -+ dev_dbg(ir->d.dev, LOGHEAD "releasing opened driver\n", -+ ir->d.name, ir->d.minor); -+ wake_up_interruptible(&ir->buf->wait_poll); -+ mutex_lock(&ir->irctl_lock); -+ ir->d.set_use_dec(ir->d.data); -+ module_put(ir->d.owner); -+ mutex_unlock(&ir->irctl_lock); -+ cdev_del(&ir->cdev); -+ } else { -+ cleanup(ir); -+ cdev_del(&ir->cdev); -+ kfree(ir); -+ irctls[minor] = NULL; -+ } -+ -+ mutex_unlock(&lirc_dev_lock); -+ -+ return 0; -+} -+EXPORT_SYMBOL(lirc_unregister_driver); -+ -+int lirc_dev_fop_open(struct inode *inode, struct file *file) -+{ -+ struct irctl *ir; -+ int retval = 0; -+ -+ if (iminor(inode) >= MAX_IRCTL_DEVICES) { -+ printk(KERN_WARNING "lirc_dev [%d]: open result = -ENODEV\n", -+ iminor(inode)); -+ return -ENODEV; -+ } -+ -+ if (mutex_lock_interruptible(&lirc_dev_lock)) -+ return -ERESTARTSYS; -+ -+ ir = irctls[iminor(inode)]; -+ if (!ir) { -+ retval = -ENODEV; -+ goto error; -+ } -+ -+ dev_dbg(ir->d.dev, LOGHEAD "open called\n", ir->d.name, ir->d.minor); -+ -+ if (ir->d.minor == NOPLUG) { -+ retval = -ENODEV; -+ goto error; -+ } -+ -+ if (ir->open) { -+ retval = -EBUSY; -+ goto error; -+ } -+ -+ if (try_module_get(ir->d.owner)) { -+ ++ir->open; -+ retval = ir->d.set_use_inc(ir->d.data); -+ -+ if (retval) { -+ module_put(ir->d.owner); -+ --ir->open; -+ } else { -+ lirc_buffer_clear(ir->buf); -+ } -+ if (ir->task) -+ wake_up_process(ir->task); -+ } -+ -+error: -+ if (ir) -+ dev_dbg(ir->d.dev, LOGHEAD "open result = %d\n", -+ ir->d.name, ir->d.minor, retval); -+ -+ mutex_unlock(&lirc_dev_lock); -+ -+ return retval; -+} -+EXPORT_SYMBOL(lirc_dev_fop_open); -+ -+int lirc_dev_fop_close(struct inode *inode, struct file *file) -+{ -+ struct irctl *ir = irctls[iminor(inode)]; -+ -+ dev_dbg(ir->d.dev, LOGHEAD "close called\n", ir->d.name, ir->d.minor); -+ -+ WARN_ON(mutex_lock_killable(&lirc_dev_lock)); -+ -+ --ir->open; -+ if (ir->attached) { -+ ir->d.set_use_dec(ir->d.data); -+ module_put(ir->d.owner); -+ } else { -+ cleanup(ir); -+ irctls[ir->d.minor] = NULL; -+ kfree(ir); -+ } -+ -+ mutex_unlock(&lirc_dev_lock); -+ -+ return 0; -+} -+EXPORT_SYMBOL(lirc_dev_fop_close); -+ -+unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait) -+{ -+ struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; -+ unsigned int ret; -+ -+ dev_dbg(ir->d.dev, LOGHEAD "poll called\n", ir->d.name, ir->d.minor); -+ -+ if (!ir->attached) { -+ mutex_unlock(&ir->irctl_lock); -+ return POLLERR; -+ } -+ -+ poll_wait(file, &ir->buf->wait_poll, wait); -+ -+ if (ir->buf) -+ if (lirc_buffer_empty(ir->buf)) -+ ret = 0; -+ else -+ ret = POLLIN | POLLRDNORM; -+ else -+ ret = POLLERR; -+ -+ dev_dbg(ir->d.dev, LOGHEAD "poll result = %d\n", -+ ir->d.name, ir->d.minor, ret); -+ -+ return ret; -+} -+EXPORT_SYMBOL(lirc_dev_fop_poll); -+ -+int lirc_dev_fop_ioctl(struct inode *inode, struct file *file, -+ unsigned int cmd, unsigned long arg) -+{ -+ unsigned long mode; -+ int result = 0; -+ struct irctl *ir = irctls[iminor(inode)]; -+ -+ dev_dbg(ir->d.dev, LOGHEAD "ioctl called (0x%x)\n", -+ ir->d.name, ir->d.minor, cmd); -+ -+ if (ir->d.minor == NOPLUG || !ir->attached) { -+ dev_dbg(ir->d.dev, LOGHEAD "ioctl result = -ENODEV\n", -+ ir->d.name, ir->d.minor); -+ return -ENODEV; -+ } -+ -+ switch (cmd) { -+ case LIRC_GET_FEATURES: -+ result = put_user(ir->d.features, (unsigned long *)arg); -+ break; -+ case LIRC_GET_REC_MODE: -+ if (!(ir->d.features & LIRC_CAN_REC_MASK)) -+ return -ENOSYS; -+ -+ result = put_user(LIRC_REC2MODE -+ (ir->d.features & LIRC_CAN_REC_MASK), -+ (unsigned long *)arg); -+ break; -+ case LIRC_SET_REC_MODE: -+ if (!(ir->d.features & LIRC_CAN_REC_MASK)) -+ return -ENOSYS; -+ -+ result = get_user(mode, (unsigned long *)arg); -+ if (!result && !(LIRC_MODE2REC(mode) & ir->d.features)) -+ result = -EINVAL; -+ /* -+ * FIXME: We should actually set the mode somehow but -+ * for now, lirc_serial doesn't support mode changing either -+ */ -+ break; -+ case LIRC_GET_LENGTH: -+ result = put_user(ir->d.code_length, (unsigned long *)arg); -+ break; -+ case LIRC_GET_MIN_TIMEOUT: -+ if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) || -+ ir->d.min_timeout == 0) -+ return -ENOSYS; -+ -+ result = put_user(ir->d.min_timeout, (int *) arg); -+ break; -+ case LIRC_GET_MAX_TIMEOUT: -+ if (!(ir->d.features & LIRC_CAN_SET_REC_TIMEOUT) || -+ ir->d.max_timeout == 0) -+ return -ENOSYS; -+ -+ result = put_user(ir->d.max_timeout, (int *) arg); -+ break; -+ default: -+ result = -EINVAL; -+ } -+ -+ dev_dbg(ir->d.dev, LOGHEAD "ioctl result = %d\n", -+ ir->d.name, ir->d.minor, result); -+ -+ return result; -+} -+EXPORT_SYMBOL(lirc_dev_fop_ioctl); -+ -+#ifdef CONFIG_COMPAT -+#define LIRC_GET_FEATURES_COMPAT32 _IOR('i', 0x00000000, __u32) -+ -+#define LIRC_GET_SEND_MODE_COMPAT32 _IOR('i', 0x00000001, __u32) -+#define LIRC_GET_REC_MODE_COMPAT32 _IOR('i', 0x00000002, __u32) -+ -+#define LIRC_GET_LENGTH_COMPAT32 _IOR('i', 0x0000000f, __u32) -+ -+#define LIRC_SET_SEND_MODE_COMPAT32 _IOW('i', 0x00000011, __u32) -+#define LIRC_SET_REC_MODE_COMPAT32 _IOW('i', 0x00000012, __u32) -+ -+long lirc_dev_fop_compat_ioctl(struct file *file, -+ unsigned int cmd32, -+ unsigned long arg) -+{ -+ mm_segment_t old_fs; -+ int ret; -+ unsigned long val; -+ unsigned int cmd; -+ -+ switch (cmd32) { -+ case LIRC_GET_FEATURES_COMPAT32: -+ case LIRC_GET_SEND_MODE_COMPAT32: -+ case LIRC_GET_REC_MODE_COMPAT32: -+ case LIRC_GET_LENGTH_COMPAT32: -+ case LIRC_SET_SEND_MODE_COMPAT32: -+ case LIRC_SET_REC_MODE_COMPAT32: -+ /* -+ * These commands expect (unsigned long *) arg -+ * but the 32-bit app supplied (__u32 *). -+ * Conversion is required. -+ */ -+ if (get_user(val, (__u32 *)compat_ptr(arg))) -+ return -EFAULT; -+ lock_kernel(); -+ /* -+ * tell lirc_dev_fop_ioctl that it's safe to use the pointer -+ * to val which is in kernel address space and not in -+ * user address space. -+ */ -+ old_fs = get_fs(); -+ set_fs(KERNEL_DS); -+ -+ cmd = _IOC(_IOC_DIR(cmd32), _IOC_TYPE(cmd32), _IOC_NR(cmd32), -+ (_IOC_TYPECHECK(unsigned long))); -+ ret = lirc_dev_fop_ioctl(file->f_path.dentry->d_inode, file, -+ cmd, (unsigned long)(&val)); -+ -+ set_fs(old_fs); -+ unlock_kernel(); -+ switch (cmd) { -+ case LIRC_GET_FEATURES: -+ case LIRC_GET_SEND_MODE: -+ case LIRC_GET_REC_MODE: -+ case LIRC_GET_LENGTH: -+ if (!ret && put_user(val, (__u32 *)compat_ptr(arg))) -+ return -EFAULT; -+ break; -+ } -+ return ret; -+ -+ case LIRC_GET_SEND_CARRIER: -+ case LIRC_GET_REC_CARRIER: -+ case LIRC_GET_SEND_DUTY_CYCLE: -+ case LIRC_GET_REC_DUTY_CYCLE: -+ case LIRC_GET_REC_RESOLUTION: -+ case LIRC_SET_SEND_CARRIER: -+ case LIRC_SET_REC_CARRIER: -+ case LIRC_SET_SEND_DUTY_CYCLE: -+ case LIRC_SET_REC_DUTY_CYCLE: -+ case LIRC_SET_TRANSMITTER_MASK: -+ case LIRC_SET_REC_DUTY_CYCLE_RANGE: -+ case LIRC_SET_REC_CARRIER_RANGE: -+ /* -+ * These commands expect (unsigned int *)arg -+ * so no problems here. Just handle the locking. -+ */ -+ lock_kernel(); -+ cmd = cmd32; -+ ret = lirc_dev_fop_ioctl(file->f_path.dentry->d_inode, -+ file, cmd, arg); -+ unlock_kernel(); -+ return ret; -+ default: -+ /* unknown */ -+ printk(KERN_ERR "lirc_dev: %s(%s:%d): Unknown cmd %08x\n", -+ __func__, current->comm, current->pid, cmd32); -+ return -ENOIOCTLCMD; -+ } -+} -+EXPORT_SYMBOL(lirc_dev_fop_compat_ioctl); -+#endif -+ -+ -+ssize_t lirc_dev_fop_read(struct file *file, -+ char *buffer, -+ size_t length, -+ loff_t *ppos) -+{ -+ struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; -+ unsigned char buf[ir->chunk_size]; -+ int ret = 0, written = 0; -+ DECLARE_WAITQUEUE(wait, current); -+ -+ dev_dbg(ir->d.dev, LOGHEAD "read called\n", ir->d.name, ir->d.minor); -+ -+ if (mutex_lock_interruptible(&ir->irctl_lock)) -+ return -ERESTARTSYS; -+ if (!ir->attached) { -+ mutex_unlock(&ir->irctl_lock); -+ return -ENODEV; -+ } -+ -+ if (length % ir->chunk_size) { -+ dev_dbg(ir->d.dev, LOGHEAD "read result = -EINVAL\n", -+ ir->d.name, ir->d.minor); -+ mutex_unlock(&ir->irctl_lock); -+ return -EINVAL; -+ } -+ -+ /* -+ * we add ourselves to the task queue before buffer check -+ * to avoid losing scan code (in case when queue is awaken somewhere -+ * between while condition checking and scheduling) -+ */ -+ add_wait_queue(&ir->buf->wait_poll, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* -+ * while we didn't provide 'length' bytes, device is opened in blocking -+ * mode and 'copy_to_user' is happy, wait for data. -+ */ -+ while (written < length && ret == 0) { -+ if (lirc_buffer_empty(ir->buf)) { -+ /* According to the read(2) man page, 'written' can be -+ * returned as less than 'length', instead of blocking -+ * again, returning -EWOULDBLOCK, or returning -+ * -ERESTARTSYS */ -+ if (written) -+ break; -+ if (file->f_flags & O_NONBLOCK) { -+ ret = -EWOULDBLOCK; -+ break; -+ } -+ if (signal_pending(current)) { -+ ret = -ERESTARTSYS; -+ break; -+ } -+ -+ mutex_unlock(&ir->irctl_lock); -+ schedule(); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ if (mutex_lock_interruptible(&ir->irctl_lock)) { -+ ret = -ERESTARTSYS; -+ break; -+ } -+ -+ if (!ir->attached) { -+ ret = -ENODEV; -+ break; -+ } -+ } else { -+ lirc_buffer_read(ir->buf, buf); -+ ret = copy_to_user((void *)buffer+written, buf, -+ ir->buf->chunk_size); -+ written += ir->buf->chunk_size; -+ } -+ } -+ -+ remove_wait_queue(&ir->buf->wait_poll, &wait); -+ set_current_state(TASK_RUNNING); -+ mutex_unlock(&ir->irctl_lock); -+ -+ dev_dbg(ir->d.dev, LOGHEAD "read result = %s (%d)\n", -+ ir->d.name, ir->d.minor, ret ? "-EFAULT" : "OK", ret); -+ -+ return ret ? ret : written; -+} -+EXPORT_SYMBOL(lirc_dev_fop_read); -+ -+void *lirc_get_pdata(struct file *file) -+{ -+ void *data = NULL; -+ -+ if (file && file->f_dentry && file->f_dentry->d_inode && -+ file->f_dentry->d_inode->i_rdev) { -+ struct irctl *ir; -+ ir = irctls[iminor(file->f_dentry->d_inode)]; -+ data = ir->d.data; -+ } -+ -+ return data; -+} -+EXPORT_SYMBOL(lirc_get_pdata); -+ -+ -+ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, -+ size_t length, loff_t *ppos) -+{ -+ struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)]; -+ -+ dev_dbg(ir->d.dev, LOGHEAD "write called\n", ir->d.name, ir->d.minor); -+ -+ if (!ir->attached) -+ return -ENODEV; -+ -+ return -EINVAL; -+} -+EXPORT_SYMBOL(lirc_dev_fop_write); -+ -+ -+static int __init lirc_dev_init(void) -+{ -+ int retval; -+ -+ lirc_class = class_create(THIS_MODULE, "lirc"); -+ if (IS_ERR(lirc_class)) { -+ retval = PTR_ERR(lirc_class); -+ printk(KERN_ERR "lirc_dev: class_create failed\n"); -+ goto error; -+ } -+ -+ retval = alloc_chrdev_region(&lirc_base_dev, 0, MAX_IRCTL_DEVICES, -+ IRCTL_DEV_NAME); -+ if (retval) { -+ class_destroy(lirc_class); -+ printk(KERN_ERR "lirc_dev: alloc_chrdev_region failed\n"); -+ goto error; -+ } -+ -+ -+ printk(KERN_INFO "lirc_dev: IR Remote Control driver registered, " -+ "major %d \n", MAJOR(lirc_base_dev)); -+ -+error: -+ return retval; -+} -+ -+ -+ -+static void __exit lirc_dev_exit(void) -+{ -+ class_destroy(lirc_class); -+ unregister_chrdev_region(lirc_base_dev, MAX_IRCTL_DEVICES); -+ printk(KERN_INFO "lirc_dev: module unloaded\n"); -+} -+ -+module_init(lirc_dev_init); -+module_exit(lirc_dev_exit); -+ -+MODULE_DESCRIPTION("LIRC base driver module"); -+MODULE_AUTHOR("Artur Lipowski"); -+MODULE_LICENSE("GPL"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_dev.h linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_dev.h ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_dev.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_dev.h 2010-08-02 09:28:03.929052362 +0200 -@@ -0,0 +1,228 @@ -+/* -+ * LIRC base driver -+ * -+ * by Artur Lipowski -+ * This code is licensed under GNU GPL -+ * -+ */ -+ -+#ifndef _LINUX_LIRC_DEV_H -+#define _LINUX_LIRC_DEV_H -+ -+#define MAX_IRCTL_DEVICES 4 -+#define BUFLEN 16 -+ -+#define mod(n, div) ((n) % (div)) -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+struct lirc_buffer { -+ wait_queue_head_t wait_poll; -+ spinlock_t fifo_lock; -+ unsigned int chunk_size; -+ unsigned int size; /* in chunks */ -+ /* Using chunks instead of bytes pretends to simplify boundary checking -+ * And should allow for some performance fine tunning later */ -+ struct kfifo fifo; -+ u8 fifo_initialized; -+}; -+ -+static inline void lirc_buffer_clear(struct lirc_buffer *buf) -+{ -+ unsigned long flags; -+ -+ if (buf->fifo_initialized) { -+ spin_lock_irqsave(&buf->fifo_lock, flags); -+ kfifo_reset(&buf->fifo); -+ spin_unlock_irqrestore(&buf->fifo_lock, flags); -+ } else -+ WARN(1, "calling %s on an uninitialized lirc_buffer\n", -+ __func__); -+} -+ -+static inline int lirc_buffer_init(struct lirc_buffer *buf, -+ unsigned int chunk_size, -+ unsigned int size) -+{ -+ int ret; -+ -+ init_waitqueue_head(&buf->wait_poll); -+ spin_lock_init(&buf->fifo_lock); -+ buf->chunk_size = chunk_size; -+ buf->size = size; -+ ret = kfifo_alloc(&buf->fifo, size * chunk_size, GFP_KERNEL); -+ if (ret == 0) -+ buf->fifo_initialized = 1; -+ -+ return ret; -+} -+ -+static inline void lirc_buffer_free(struct lirc_buffer *buf) -+{ -+ if (buf->fifo_initialized) { -+ kfifo_free(&buf->fifo); -+ buf->fifo_initialized = 0; -+ } else -+ WARN(1, "calling %s on an uninitialized lirc_buffer\n", -+ __func__); -+} -+ -+static inline int lirc_buffer_len(struct lirc_buffer *buf) -+{ -+ int len; -+ unsigned long flags; -+ -+ spin_lock_irqsave(&buf->fifo_lock, flags); -+ len = kfifo_len(&buf->fifo); -+ spin_unlock_irqrestore(&buf->fifo_lock, flags); -+ -+ return len; -+} -+ -+static inline int lirc_buffer_full(struct lirc_buffer *buf) -+{ -+ return lirc_buffer_len(buf) == buf->size * buf->chunk_size; -+} -+ -+static inline int lirc_buffer_empty(struct lirc_buffer *buf) -+{ -+ return !lirc_buffer_len(buf); -+} -+ -+static inline int lirc_buffer_available(struct lirc_buffer *buf) -+{ -+ return buf->size - (lirc_buffer_len(buf) / buf->chunk_size); -+} -+ -+static inline unsigned int lirc_buffer_read(struct lirc_buffer *buf, -+ unsigned char *dest) -+{ -+ unsigned int ret = 0; -+ -+ if (lirc_buffer_len(buf) >= buf->chunk_size) -+ ret = kfifo_out_locked(&buf->fifo, dest, buf->chunk_size, -+ &buf->fifo_lock); -+ return ret; -+ -+} -+ -+static inline unsigned int lirc_buffer_write(struct lirc_buffer *buf, -+ unsigned char *orig) -+{ -+ unsigned int ret; -+ -+ ret = kfifo_in_locked(&buf->fifo, orig, buf->chunk_size, -+ &buf->fifo_lock); -+ -+ return ret; -+} -+ -+struct lirc_driver { -+ char name[40]; -+ int minor; -+ unsigned long code_length; -+ unsigned int buffer_size; /* in chunks holding one code each */ -+ int sample_rate; -+ unsigned long features; -+ -+ unsigned int chunk_size; -+ -+ void *data; -+ int min_timeout; -+ int max_timeout; -+ int (*add_to_buf) (void *data, struct lirc_buffer *buf); -+ struct lirc_buffer *rbuf; -+ int (*set_use_inc) (void *data); -+ void (*set_use_dec) (void *data); -+ struct file_operations *fops; -+ struct device *dev; -+ struct module *owner; -+}; -+ -+/* name: -+ * this string will be used for logs -+ * -+ * minor: -+ * indicates minor device (/dev/lirc) number for registered driver -+ * if caller fills it with negative value, then the first free minor -+ * number will be used (if available) -+ * -+ * code_length: -+ * length of the remote control key code expressed in bits -+ * -+ * sample_rate: -+ * -+ * data: -+ * it may point to any driver data and this pointer will be passed to -+ * all callback functions -+ * -+ * add_to_buf: -+ * add_to_buf will be called after specified period of the time or -+ * triggered by the external event, this behavior depends on value of -+ * the sample_rate this function will be called in user context. This -+ * routine should return 0 if data was added to the buffer and -+ * -ENODATA if none was available. This should add some number of bits -+ * evenly divisible by code_length to the buffer -+ * -+ * rbuf: -+ * if not NULL, it will be used as a read buffer, you will have to -+ * write to the buffer by other means, like irq's (see also -+ * lirc_serial.c). -+ * -+ * set_use_inc: -+ * set_use_inc will be called after device is opened -+ * -+ * set_use_dec: -+ * set_use_dec will be called after device is closed -+ * -+ * fops: -+ * file_operations for drivers which don't fit the current driver model. -+ * -+ * Some ioctl's can be directly handled by lirc_dev if the driver's -+ * ioctl function is NULL or if it returns -ENOIOCTLCMD (see also -+ * lirc_serial.c). -+ * -+ * owner: -+ * the module owning this struct -+ * -+ */ -+ -+ -+/* following functions can be called ONLY from user context -+ * -+ * returns negative value on error or minor number -+ * of the registered device if success -+ * contents of the structure pointed by p is copied -+ */ -+extern int lirc_register_driver(struct lirc_driver *d); -+ -+/* returns negative value on error or 0 if success -+*/ -+extern int lirc_unregister_driver(int minor); -+ -+/* Returns the private data stored in the lirc_driver -+ * associated with the given device file pointer. -+ */ -+void *lirc_get_pdata(struct file *file); -+ -+/* default file operations -+ * used by drivers if they override only some operations -+ */ -+int lirc_dev_fop_open(struct inode *inode, struct file *file); -+int lirc_dev_fop_close(struct inode *inode, struct file *file); -+unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait); -+int lirc_dev_fop_ioctl(struct inode *inode, struct file *file, -+ unsigned int cmd, unsigned long arg); -+ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length, -+ loff_t *ppos); -+ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length, -+ loff_t *ppos); -+long lirc_dev_fop_compat_ioctl(struct file *file, unsigned int cmd32, -+ unsigned long arg); -+ -+#endif -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_ene0100.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ene0100.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_ene0100.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ene0100.c 2010-08-02 09:28:03.931051836 +0200 -@@ -0,0 +1,646 @@ -+/* -+ * driver for ENE KB3926 B/C/D CIR (also known as ENE0100) -+ * -+ * Copyright (C) 2009 Maxim Levitsky -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+ * USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include "lirc_ene0100.h" -+ -+static int sample_period = 75; -+static int enable_idle = 1; -+static int enable_learning; -+ -+static void ene_set_idle(struct ene_device *dev, int idle); -+static void ene_set_inputs(struct ene_device *dev, int enable); -+ -+/* read a hardware register */ -+static u8 ene_hw_read_reg(struct ene_device *dev, u16 reg) -+{ -+ outb(reg >> 8, dev->hw_io + ENE_ADDR_HI); -+ outb(reg & 0xFF, dev->hw_io + ENE_ADDR_LO); -+ return inb(dev->hw_io + ENE_IO); -+} -+ -+/* write a hardware register */ -+static void ene_hw_write_reg(struct ene_device *dev, u16 reg, u8 value) -+{ -+ outb(reg >> 8, dev->hw_io + ENE_ADDR_HI); -+ outb(reg & 0xFF, dev->hw_io + ENE_ADDR_LO); -+ outb(value, dev->hw_io + ENE_IO); -+} -+ -+/* change specific bits in hardware register */ -+static void ene_hw_write_reg_mask(struct ene_device *dev, -+ u16 reg, u8 value, u8 mask) -+{ -+ u8 regvalue; -+ -+ outb(reg >> 8, dev->hw_io + ENE_ADDR_HI); -+ outb(reg & 0xFF, dev->hw_io + ENE_ADDR_LO); -+ -+ regvalue = inb(dev->hw_io + ENE_IO) & ~mask; -+ regvalue |= (value & mask); -+ outb(regvalue, dev->hw_io + ENE_IO); -+} -+ -+/* read irq status and ack it */ -+static int ene_hw_irq_status(struct ene_device *dev, int *buffer_pointer) -+{ -+ u8 irq_status; -+ u8 fw_flags1, fw_flags2; -+ -+ fw_flags2 = ene_hw_read_reg(dev, ENE_FW2); -+ -+ if (buffer_pointer) -+ *buffer_pointer = 4 * (fw_flags2 & ENE_FW2_BUF_HIGH); -+ -+ if (dev->hw_revision < ENE_HW_C) { -+ irq_status = ene_hw_read_reg(dev, ENEB_IRQ_STATUS); -+ -+ if (!(irq_status & ENEB_IRQ_STATUS_IR)) -+ return 0; -+ ene_hw_write_reg(dev, ENEB_IRQ_STATUS, -+ irq_status & ~ENEB_IRQ_STATUS_IR); -+ -+ /* rev B support only recieving */ -+ return ENE_IRQ_RX; -+ } -+ -+ irq_status = ene_hw_read_reg(dev, ENEC_IRQ); -+ -+ if (!(irq_status & ENEC_IRQ_STATUS)) -+ return 0; -+ -+ /* original driver does that twice - a workaround ? */ -+ ene_hw_write_reg(dev, ENEC_IRQ, irq_status & ~ENEC_IRQ_STATUS); -+ ene_hw_write_reg(dev, ENEC_IRQ, irq_status & ~ENEC_IRQ_STATUS); -+ -+ /* clear unknown flag in F8F9 */ -+ if (fw_flags2 & ENE_FW2_IRQ_CLR) -+ ene_hw_write_reg(dev, ENE_FW2, fw_flags2 & ~ENE_FW2_IRQ_CLR); -+ -+ /* check if this is a TX interrupt */ -+ fw_flags1 = ene_hw_read_reg(dev, ENE_FW1); -+ -+ if (fw_flags1 & ENE_FW1_TXIRQ) { -+ ene_hw_write_reg(dev, ENE_FW1, fw_flags1 & ~ENE_FW1_TXIRQ); -+ return ENE_IRQ_TX; -+ } else -+ return ENE_IRQ_RX; -+} -+ -+static int ene_hw_detect(struct ene_device *dev) -+{ -+ u8 chip_major, chip_minor; -+ u8 hw_revision, old_ver; -+ u8 tmp; -+ u8 fw_capabilities; -+ -+ tmp = ene_hw_read_reg(dev, ENE_HW_UNK); -+ ene_hw_write_reg(dev, ENE_HW_UNK, tmp & ~ENE_HW_UNK_CLR); -+ -+ chip_major = ene_hw_read_reg(dev, ENE_HW_VER_MAJOR); -+ chip_minor = ene_hw_read_reg(dev, ENE_HW_VER_MINOR); -+ -+ ene_hw_write_reg(dev, ENE_HW_UNK, tmp); -+ hw_revision = ene_hw_read_reg(dev, ENE_HW_VERSION); -+ old_ver = ene_hw_read_reg(dev, ENE_HW_VER_OLD); -+ -+ if (hw_revision == 0xFF) { -+ -+ ene_printk(KERN_WARNING, "device seems to be disabled\n"); -+ ene_printk(KERN_WARNING, -+ "send a mail to lirc-list@lists.sourceforge.net\n"); -+ ene_printk(KERN_WARNING, "please attach output of acpidump\n"); -+ -+ return -ENODEV; -+ } -+ -+ if (chip_major == 0x33) { -+ ene_printk(KERN_WARNING, "chips 0x33xx aren't supported yet\n"); -+ return -ENODEV; -+ } -+ -+ if (chip_major == 0x39 && chip_minor == 0x26 && hw_revision == 0xC0) { -+ dev->hw_revision = ENE_HW_C; -+ ene_printk(KERN_WARNING, -+ "KB3926C detected, driver support is not complete!\n"); -+ -+ } else if (old_ver == 0x24 && hw_revision == 0xC0) { -+ dev->hw_revision = ENE_HW_B; -+ ene_printk(KERN_NOTICE, "KB3926B detected\n"); -+ } else { -+ dev->hw_revision = ENE_HW_D; -+ ene_printk(KERN_WARNING, -+ "unknown ENE chip detected, assuming KB3926D\n"); -+ ene_printk(KERN_WARNING, "driver support incomplete"); -+ -+ } -+ -+ ene_printk(KERN_DEBUG, "chip is 0x%02x%02x - 0x%02x, 0x%02x\n", -+ chip_major, chip_minor, old_ver, hw_revision); -+ -+ -+ /* detect features hardware supports */ -+ -+ if (dev->hw_revision < ENE_HW_C) -+ return 0; -+ -+ fw_capabilities = ene_hw_read_reg(dev, ENE_FW2); -+ -+ dev->hw_gpio40_learning = fw_capabilities & ENE_FW2_GP40_AS_LEARN; -+ dev->hw_learning_and_tx_capable = fw_capabilities & ENE_FW2_LEARNING; -+ -+ dev->hw_fan_as_normal_input = dev->hw_learning_and_tx_capable && -+ fw_capabilities & ENE_FW2_FAN_AS_NRML_IN; -+ -+ ene_printk(KERN_NOTICE, "hardware features:\n"); -+ ene_printk(KERN_NOTICE, -+ "learning and tx %s, gpio40_learn %s, fan_in %s\n", -+ dev->hw_learning_and_tx_capable ? "on" : "off", -+ dev->hw_gpio40_learning ? "on" : "off", -+ dev->hw_fan_as_normal_input ? "on" : "off"); -+ -+ if (!dev->hw_learning_and_tx_capable && enable_learning) -+ enable_learning = 0; -+ -+ if (dev->hw_learning_and_tx_capable) { -+ ene_printk(KERN_WARNING, -+ "Device supports transmitting, but the driver doesn't\n"); -+ ene_printk(KERN_WARNING, -+ "due to lack of hardware to test against.\n"); -+ ene_printk(KERN_WARNING, -+ "Send a mail to: lirc-list@lists.sourceforge.net\n"); -+ } -+ return 0; -+} -+ -+/* hardware initialization */ -+static int ene_hw_init(void *data) -+{ -+ u8 reg_value; -+ struct ene_device *dev = (struct ene_device *)data; -+ dev->in_use = 1; -+ -+ if (dev->hw_revision < ENE_HW_C) { -+ ene_hw_write_reg(dev, ENEB_IRQ, dev->irq << 1); -+ ene_hw_write_reg(dev, ENEB_IRQ_UNK1, 0x01); -+ } else { -+ reg_value = ene_hw_read_reg(dev, ENEC_IRQ) & 0xF0; -+ reg_value |= ENEC_IRQ_UNK_EN; -+ reg_value &= ~ENEC_IRQ_STATUS; -+ reg_value |= (dev->irq & ENEC_IRQ_MASK); -+ ene_hw_write_reg(dev, ENEC_IRQ, reg_value); -+ ene_hw_write_reg(dev, ENE_TX_UNK1, 0x63); -+ } -+ -+ ene_hw_write_reg(dev, ENE_CIR_CONF2, 0x00); -+ ene_set_inputs(dev, enable_learning); -+ -+ /* set sampling period */ -+ ene_hw_write_reg(dev, ENE_CIR_SAMPLE_PERIOD, sample_period); -+ -+ /* ack any pending irqs - just in case */ -+ ene_hw_irq_status(dev, NULL); -+ -+ /* enter idle mode */ -+ ene_set_idle(dev, 1); -+ -+ /* enable firmware bits */ -+ ene_hw_write_reg_mask(dev, ENE_FW1, -+ ENE_FW1_ENABLE | ENE_FW1_IRQ, -+ ENE_FW1_ENABLE | ENE_FW1_IRQ); -+ /* clear stats */ -+ dev->sample = 0; -+ return 0; -+} -+ -+/* this enables gpio40 signal, used if connected to wide band input*/ -+static void ene_enable_gpio40(struct ene_device *dev, int enable) -+{ -+ ene_hw_write_reg_mask(dev, ENE_CIR_CONF1, enable ? -+ 0 : ENE_CIR_CONF2_GPIO40DIS, -+ ENE_CIR_CONF2_GPIO40DIS); -+} -+ -+/* this enables the classic sampler */ -+static void ene_enable_normal_recieve(struct ene_device *dev, int enable) -+{ -+ ene_hw_write_reg(dev, ENE_CIR_CONF1, enable ? ENE_CIR_CONF1_ADC_ON : 0); -+} -+ -+/* this enables recieve via fan input */ -+static void ene_enable_fan_recieve(struct ene_device *dev, int enable) -+{ -+ if (!enable) -+ ene_hw_write_reg(dev, ENE_FAN_AS_IN1, 0); -+ else { -+ ene_hw_write_reg(dev, ENE_FAN_AS_IN1, ENE_FAN_AS_IN1_EN); -+ ene_hw_write_reg(dev, ENE_FAN_AS_IN2, ENE_FAN_AS_IN2_EN); -+ } -+ dev->fan_input_inuse = enable; -+} -+ -+/* determine which input to use*/ -+static void ene_set_inputs(struct ene_device *dev, int learning_enable) -+{ -+ ene_enable_normal_recieve(dev, 1); -+ -+ /* old hardware doesn't support learning mode for sure */ -+ if (dev->hw_revision <= ENE_HW_B) -+ return; -+ -+ /* reciever not learning capable, still set gpio40 correctly */ -+ if (!dev->hw_learning_and_tx_capable) { -+ ene_enable_gpio40(dev, !dev->hw_gpio40_learning); -+ return; -+ } -+ -+ /* enable learning mode */ -+ if (learning_enable) { -+ ene_enable_gpio40(dev, dev->hw_gpio40_learning); -+ -+ /* fan input is not used for learning */ -+ if (dev->hw_fan_as_normal_input) -+ ene_enable_fan_recieve(dev, 0); -+ -+ /* disable learning mode */ -+ } else { -+ if (dev->hw_fan_as_normal_input) { -+ ene_enable_fan_recieve(dev, 1); -+ ene_enable_normal_recieve(dev, 0); -+ } else -+ ene_enable_gpio40(dev, !dev->hw_gpio40_learning); -+ } -+ -+ /* set few additional settings for this mode */ -+ ene_hw_write_reg_mask(dev, ENE_CIR_CONF1, learning_enable ? -+ ENE_CIR_CONF1_LEARN1 : 0, ENE_CIR_CONF1_LEARN1); -+ -+ ene_hw_write_reg_mask(dev, ENE_CIR_CONF2, learning_enable ? -+ ENE_CIR_CONF2_LEARN2 : 0, ENE_CIR_CONF2_LEARN2); -+} -+ -+/* deinitialization */ -+static void ene_hw_deinit(void *data) -+{ -+ struct ene_device *dev = (struct ene_device *)data; -+ -+ /* disable samplers */ -+ ene_enable_normal_recieve(dev, 0); -+ -+ if (dev->hw_fan_as_normal_input) -+ ene_enable_fan_recieve(dev, 0); -+ -+ /* disable hardware IRQ and firmware flag */ -+ ene_hw_write_reg_mask(dev, ENE_FW1, 0, ENE_FW1_ENABLE | ENE_FW1_IRQ); -+ -+ ene_set_idle(dev, 1); -+ dev->in_use = 0; -+} -+ -+/* sends current sample to userspace */ -+static void send_sample(struct ene_device *dev) -+{ -+ int value = abs(dev->sample) & PULSE_MASK; -+ -+ if (dev->sample > 0) -+ value |= PULSE_BIT; -+ -+ if (!lirc_buffer_full(dev->lirc_driver->rbuf)) { -+ lirc_buffer_write(dev->lirc_driver->rbuf, (void *)&value); -+ wake_up(&dev->lirc_driver->rbuf->wait_poll); -+ } -+ dev->sample = 0; -+} -+ -+/* this updates current sample */ -+static void update_sample(struct ene_device *dev, int sample) -+{ -+ if (!dev->sample) -+ dev->sample = sample; -+ else if (same_sign(dev->sample, sample)) -+ dev->sample += sample; -+ else { -+ send_sample(dev); -+ dev->sample = sample; -+ } -+} -+ -+/* enable or disable idle mode */ -+static void ene_set_idle(struct ene_device *dev, int idle) -+{ -+ struct timeval now; -+ int disable = idle && enable_idle && (dev->hw_revision < ENE_HW_C); -+ -+ ene_hw_write_reg_mask(dev, ENE_CIR_SAMPLE_PERIOD, -+ disable ? 0 : ENE_CIR_SAMPLE_OVERFLOW, -+ ENE_CIR_SAMPLE_OVERFLOW); -+ dev->idle = idle; -+ -+ /* remember when we have entered the idle mode */ -+ if (idle) { -+ do_gettimeofday(&dev->gap_start); -+ return; -+ } -+ -+ /* send the gap between keypresses now */ -+ do_gettimeofday(&now); -+ -+ if (now.tv_sec - dev->gap_start.tv_sec > 16) -+ dev->sample = space(PULSE_MASK); -+ else -+ dev->sample = dev->sample + -+ space(1000000ull * (now.tv_sec - dev->gap_start.tv_sec)) -+ + space(now.tv_usec - dev->gap_start.tv_usec); -+ -+ if (abs(dev->sample) > PULSE_MASK) -+ dev->sample = space(PULSE_MASK); -+ send_sample(dev); -+} -+ -+/* interrupt handler */ -+static irqreturn_t ene_hw_irq(int irq, void *data) -+{ -+ u16 hw_value; -+ int i, hw_sample; -+ int space; -+ int buffer_pointer; -+ int irq_status; -+ -+ struct ene_device *dev = (struct ene_device *)data; -+ irq_status = ene_hw_irq_status(dev, &buffer_pointer); -+ -+ if (!irq_status) -+ return IRQ_NONE; -+ -+ /* TODO: only RX for now */ -+ if (irq_status == ENE_IRQ_TX) -+ return IRQ_HANDLED; -+ -+ for (i = 0; i < ENE_SAMPLES_SIZE; i++) { -+ -+ hw_value = ene_hw_read_reg(dev, -+ ENE_SAMPLE_BUFFER + buffer_pointer + i); -+ -+ if (dev->fan_input_inuse) { -+ /* read high part of the sample */ -+ hw_value |= ene_hw_read_reg(dev, -+ ENE_SAMPLE_BUFFER_FAN + buffer_pointer + i) << 8; -+ -+ /* test for _space_ bit */ -+ space = !(hw_value & ENE_FAN_SMPL_PULS_MSK); -+ -+ /* clear space bit, and other unused bits */ -+ hw_value &= ENE_FAN_VALUE_MASK; -+ hw_sample = hw_value * ENE_SAMPLE_PERIOD_FAN; -+ -+ } else { -+ space = hw_value & ENE_SAMPLE_SPC_MASK; -+ hw_value &= ENE_SAMPLE_VALUE_MASK; -+ hw_sample = hw_value * sample_period; -+ } -+ -+ /* no more data */ -+ if (!(hw_value)) -+ break; -+ -+ if (space) -+ hw_sample *= -1; -+ -+ /* overflow sample recieved, handle it */ -+ -+ if (!dev->fan_input_inuse && hw_value == ENE_SAMPLE_OVERFLOW) { -+ -+ if (dev->idle) -+ continue; -+ -+ if (dev->sample > 0 || abs(dev->sample) <= ENE_MAXGAP) -+ update_sample(dev, hw_sample); -+ else -+ ene_set_idle(dev, 1); -+ -+ continue; -+ } -+ -+ /* normal first sample recieved */ -+ if (!dev->fan_input_inuse && dev->idle) { -+ ene_set_idle(dev, 0); -+ -+ /* discard first recieved value, its random -+ since its the time signal was off before -+ first pulse if idle mode is enabled, HW -+ does that for us */ -+ -+ if (!enable_idle) -+ continue; -+ } -+ update_sample(dev, hw_sample); -+ send_sample(dev); -+ } -+ return IRQ_HANDLED; -+} -+ -+static int ene_probe(struct pnp_dev *pnp_dev, -+ const struct pnp_device_id *dev_id) -+{ -+ struct ene_device *dev; -+ struct lirc_driver *lirc_driver; -+ int error = -ENOMEM; -+ -+ dev = kzalloc(sizeof(struct ene_device), GFP_KERNEL); -+ -+ if (!dev) -+ goto err1; -+ -+ dev->pnp_dev = pnp_dev; -+ pnp_set_drvdata(pnp_dev, dev); -+ -+ -+ /* prepare lirc interface */ -+ error = -ENOMEM; -+ lirc_driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); -+ -+ if (!lirc_driver) -+ goto err2; -+ -+ dev->lirc_driver = lirc_driver; -+ -+ strcpy(lirc_driver->name, ENE_DRIVER_NAME); -+ lirc_driver->minor = -1; -+ lirc_driver->code_length = sizeof(int) * 8; -+ lirc_driver->features = LIRC_CAN_REC_MODE2; -+ lirc_driver->data = dev; -+ lirc_driver->set_use_inc = ene_hw_init; -+ lirc_driver->set_use_dec = ene_hw_deinit; -+ lirc_driver->dev = &pnp_dev->dev; -+ lirc_driver->owner = THIS_MODULE; -+ -+ lirc_driver->rbuf = kzalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ -+ if (!lirc_driver->rbuf) -+ goto err3; -+ -+ if (lirc_buffer_init(lirc_driver->rbuf, sizeof(int), sizeof(int) * 256)) -+ goto err4; -+ -+ error = -ENODEV; -+ if (lirc_register_driver(lirc_driver)) -+ goto err5; -+ -+ /* validate resources */ -+ if (!pnp_port_valid(pnp_dev, 0) || -+ pnp_port_len(pnp_dev, 0) < ENE_MAX_IO) -+ goto err6; -+ -+ if (!pnp_irq_valid(pnp_dev, 0)) -+ goto err6; -+ -+ dev->hw_io = pnp_port_start(pnp_dev, 0); -+ dev->irq = pnp_irq(pnp_dev, 0); -+ -+ /* claim the resources */ -+ error = -EBUSY; -+ if (!request_region(dev->hw_io, ENE_MAX_IO, ENE_DRIVER_NAME)) -+ goto err6; -+ -+ if (request_irq(dev->irq, ene_hw_irq, -+ IRQF_SHARED, ENE_DRIVER_NAME, (void *)dev)) -+ goto err7; -+ -+ /* detect hardware version and features */ -+ error = ene_hw_detect(dev); -+ if (error) -+ goto err8; -+ -+ ene_printk(KERN_NOTICE, "driver has been succesfully loaded\n"); -+ return 0; -+ -+err8: -+ free_irq(dev->irq, dev); -+err7: -+ release_region(dev->hw_io, ENE_MAX_IO); -+err6: -+ lirc_unregister_driver(lirc_driver->minor); -+err5: -+ lirc_buffer_free(lirc_driver->rbuf); -+err4: -+ kfree(lirc_driver->rbuf); -+err3: -+ kfree(lirc_driver); -+err2: -+ kfree(dev); -+err1: -+ return error; -+} -+ -+static void ene_remove(struct pnp_dev *pnp_dev) -+{ -+ struct ene_device *dev = pnp_get_drvdata(pnp_dev); -+ ene_hw_deinit(dev); -+ free_irq(dev->irq, dev); -+ release_region(dev->hw_io, ENE_MAX_IO); -+ lirc_unregister_driver(dev->lirc_driver->minor); -+ lirc_buffer_free(dev->lirc_driver->rbuf); -+ kfree(dev->lirc_driver); -+ kfree(dev); -+} -+ -+#ifdef CONFIG_PM -+ -+/* TODO: make 'wake on IR' configurable and add .shutdown */ -+/* currently impossible due to lack of kernel support */ -+ -+static int ene_suspend(struct pnp_dev *pnp_dev, pm_message_t state) -+{ -+ struct ene_device *dev = pnp_get_drvdata(pnp_dev); -+ ene_hw_write_reg_mask(dev, ENE_FW1, ENE_FW1_WAKE, ENE_FW1_WAKE); -+ return 0; -+} -+ -+static int ene_resume(struct pnp_dev *pnp_dev) -+{ -+ struct ene_device *dev = pnp_get_drvdata(pnp_dev); -+ if (dev->in_use) -+ ene_hw_init(dev); -+ -+ ene_hw_write_reg_mask(dev, ENE_FW1, 0, ENE_FW1_WAKE); -+ return 0; -+} -+ -+#endif -+ -+static const struct pnp_device_id ene_ids[] = { -+ {.id = "ENE0100",}, -+ {}, -+}; -+ -+static struct pnp_driver ene_driver = { -+ .name = ENE_DRIVER_NAME, -+ .id_table = ene_ids, -+ .flags = PNP_DRIVER_RES_DO_NOT_CHANGE, -+ -+ .probe = ene_probe, -+ .remove = __devexit_p(ene_remove), -+ -+#ifdef CONFIG_PM -+ .suspend = ene_suspend, -+ .resume = ene_resume, -+#endif -+}; -+ -+static int __init ene_init(void) -+{ -+ if (sample_period < 5) { -+ ene_printk(KERN_ERR, "sample period must be at\n"); -+ ene_printk(KERN_ERR, "least 5 us, (at least 30 recommended)\n"); -+ return -EINVAL; -+ } -+ return pnp_register_driver(&ene_driver); -+} -+ -+static void ene_exit(void) -+{ -+ pnp_unregister_driver(&ene_driver); -+} -+ -+module_param(sample_period, int, S_IRUGO); -+MODULE_PARM_DESC(sample_period, "Hardware sample period (75 us default)"); -+ -+module_param(enable_idle, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(enable_idle, -+ "Enables turning off signal sampling after long inactivity time; " -+ "if disabled might help detecting input signal (default: enabled)"); -+ -+module_param(enable_learning, bool, S_IRUGO); -+MODULE_PARM_DESC(enable_learning, "Use wide band (learning) reciever"); -+ -+MODULE_DEVICE_TABLE(pnp, ene_ids); -+MODULE_DESCRIPTION -+ ("LIRC driver for KB3926B/KB3926C/KB3926D (aka ENE0100) CIR port"); -+MODULE_AUTHOR("Maxim Levitsky"); -+MODULE_LICENSE("GPL"); -+ -+module_init(ene_init); -+module_exit(ene_exit); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_ene0100.h linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ene0100.h ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_ene0100.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ene0100.h 2010-08-02 09:28:03.933051519 +0200 -@@ -0,0 +1,169 @@ -+/* -+ * driver for ENE KB3926 B/C/D CIR (also known as ENE0100) -+ * -+ * Copyright (C) 2009 Maxim Levitsky -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+ * USA -+ */ -+ -+#include -+#include "lirc_dev.h" -+ -+/* hardware address */ -+#define ENE_STATUS 0 /* hardware status - unused */ -+#define ENE_ADDR_HI 1 /* hi byte of register address */ -+#define ENE_ADDR_LO 2 /* low byte of register address */ -+#define ENE_IO 3 /* read/write window */ -+#define ENE_MAX_IO 4 -+ -+/* 8 bytes of samples, divided in 2 halfs*/ -+#define ENE_SAMPLE_BUFFER 0xF8F0 /* regular sample buffer */ -+#define ENE_SAMPLE_SPC_MASK (1 << 7) /* sample is space */ -+#define ENE_SAMPLE_VALUE_MASK 0x7F -+#define ENE_SAMPLE_OVERFLOW 0x7F -+#define ENE_SAMPLES_SIZE 4 -+ -+/* fan input sample buffer */ -+#define ENE_SAMPLE_BUFFER_FAN 0xF8FB /* this buffer holds high byte of */ -+ /* each sample of normal buffer */ -+ -+#define ENE_FAN_SMPL_PULS_MSK 0x8000 /* this bit of combined sample */ -+ /* if set, says that sample is pulse */ -+#define ENE_FAN_VALUE_MASK 0x0FFF /* mask for valid bits of the value */ -+ -+/* first firmware register */ -+#define ENE_FW1 0xF8F8 -+#define ENE_FW1_ENABLE (1 << 0) /* enable fw processing */ -+#define ENE_FW1_TXIRQ (1 << 1) /* TX interrupt pending */ -+#define ENE_FW1_WAKE (1 << 6) /* enable wake from S3 */ -+#define ENE_FW1_IRQ (1 << 7) /* enable interrupt */ -+ -+/* second firmware register */ -+#define ENE_FW2 0xF8F9 -+#define ENE_FW2_BUF_HIGH (1 << 0) /* which half of the buffer to read */ -+#define ENE_FW2_IRQ_CLR (1 << 2) /* clear this on IRQ */ -+#define ENE_FW2_GP40_AS_LEARN (1 << 4) /* normal input is used as */ -+ /* learning input */ -+#define ENE_FW2_FAN_AS_NRML_IN (1 << 6) /* fan is used as normal input */ -+#define ENE_FW2_LEARNING (1 << 7) /* hardware supports learning and TX */ -+ -+/* fan as input settings - only if learning capable */ -+#define ENE_FAN_AS_IN1 0xFE30 /* fan init reg 1 */ -+#define ENE_FAN_AS_IN1_EN 0xCD -+#define ENE_FAN_AS_IN2 0xFE31 /* fan init reg 2 */ -+#define ENE_FAN_AS_IN2_EN 0x03 -+#define ENE_SAMPLE_PERIOD_FAN 61 /* fan input has fixed sample period */ -+ -+/* IRQ registers block (for revision B) */ -+#define ENEB_IRQ 0xFD09 /* IRQ number */ -+#define ENEB_IRQ_UNK1 0xFD17 /* unknown setting = 1 */ -+#define ENEB_IRQ_STATUS 0xFD80 /* irq status */ -+#define ENEB_IRQ_STATUS_IR (1 << 5) /* IR irq */ -+ -+/* IRQ registers block (for revision C,D) */ -+#define ENEC_IRQ 0xFE9B /* new irq settings register */ -+#define ENEC_IRQ_MASK 0x0F /* irq number mask */ -+#define ENEC_IRQ_UNK_EN (1 << 4) /* always enabled */ -+#define ENEC_IRQ_STATUS (1 << 5) /* irq status and ACK */ -+ -+/* CIR block settings */ -+#define ENE_CIR_CONF1 0xFEC0 -+#define ENE_CIR_CONF1_ADC_ON 0x7 /* reciever on gpio40 enabled */ -+#define ENE_CIR_CONF1_LEARN1 (1 << 3) /* enabled on learning mode */ -+#define ENE_CIR_CONF1_TX_ON 0x30 /* enabled on transmit */ -+#define ENE_CIR_CONF1_TX_CARR (1 << 7) /* send TX carrier or not */ -+ -+#define ENE_CIR_CONF2 0xFEC1 /* unknown setting = 0 */ -+#define ENE_CIR_CONF2_LEARN2 (1 << 4) /* set on enable learning */ -+#define ENE_CIR_CONF2_GPIO40DIS (1 << 5) /* disable normal input via gpio40 */ -+ -+#define ENE_CIR_SAMPLE_PERIOD 0xFEC8 /* sample period in us */ -+#define ENE_CIR_SAMPLE_OVERFLOW (1 << 7) /* interrupt on overflows if set */ -+ -+ -+/* transmitter - not implemented yet */ -+/* KB3926C and higher */ -+/* transmission is very similiar to recieving, a byte is written to */ -+/* ENE_TX_INPUT, in same manner as it is read from sample buffer */ -+/* sample period is fixed*/ -+ -+ -+/* transmitter ports */ -+#define ENE_TX_PORT1 0xFC01 /* this enables one or both */ -+#define ENE_TX_PORT1_EN (1 << 5) /* TX ports */ -+#define ENE_TX_PORT2 0xFC08 -+#define ENE_TX_PORT2_EN (1 << 1) -+ -+#define ENE_TX_INPUT 0xFEC9 /* next byte to transmit */ -+#define ENE_TX_SPC_MASK (1 << 7) /* Transmitted sample is space */ -+#define ENE_TX_UNK1 0xFECB /* set to 0x63 */ -+#define ENE_TX_SMPL_PERIOD 50 /* transmit sample period */ -+ -+ -+#define ENE_TX_CARRIER 0xFECE /* TX carrier * 2 (khz) */ -+#define ENE_TX_CARRIER_UNKBIT 0x80 /* This bit set on transmit */ -+#define ENE_TX_CARRIER_LOW 0xFECF /* TX carrier / 2 */ -+ -+/* Hardware versions */ -+#define ENE_HW_VERSION 0xFF00 /* hardware revision */ -+#define ENE_HW_UNK 0xFF1D -+#define ENE_HW_UNK_CLR (1 << 2) -+#define ENE_HW_VER_MAJOR 0xFF1E /* chip version */ -+#define ENE_HW_VER_MINOR 0xFF1F -+#define ENE_HW_VER_OLD 0xFD00 -+ -+#define same_sign(a, b) ((((a) > 0) && (b) > 0) || ((a) < 0 && (b) < 0)) -+ -+#define ENE_DRIVER_NAME "enecir" -+#define ENE_MAXGAP 250000 /* this is amount of time we wait -+ before turning the sampler, chosen -+ arbitry */ -+ -+#define space(len) (-(len)) /* add a space */ -+ -+/* software defines */ -+#define ENE_IRQ_RX 1 -+#define ENE_IRQ_TX 2 -+ -+#define ENE_HW_B 1 /* 3926B */ -+#define ENE_HW_C 2 /* 3926C */ -+#define ENE_HW_D 3 /* 3926D */ -+ -+#define ene_printk(level, text, ...) \ -+ printk(level ENE_DRIVER_NAME ": " text, ## __VA_ARGS__) -+ -+struct ene_device { -+ struct pnp_dev *pnp_dev; -+ struct lirc_driver *lirc_driver; -+ -+ /* hw settings */ -+ unsigned long hw_io; -+ int irq; -+ -+ int hw_revision; /* hardware revision */ -+ int hw_learning_and_tx_capable; /* learning capable */ -+ int hw_gpio40_learning; /* gpio40 is learning */ -+ int hw_fan_as_normal_input; /* fan input is used as regular input */ -+ -+ /* device data */ -+ int idle; -+ int fan_input_inuse; -+ -+ int sample; -+ int in_use; -+ -+ struct timeval gap_start; -+}; -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_i2c.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_i2c.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_i2c.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_i2c.c 2010-08-02 09:28:03.935051970 +0200 -@@ -0,0 +1,536 @@ -+/* -+ * lirc_i2c.c -+ * -+ * i2c IR driver for the onboard IR port on many TV tuner cards, including: -+ * -Flavors of the Hauppauge PVR-150/250/350 -+ * -Hauppauge HVR-1300 -+ * -PixelView (BT878P+W/FM) -+ * -KNC ONE TV Station/Anubis Typhoon TView Tuner -+ * -Asus TV-Box and Creative/VisionTek BreakOut-Box -+ * -Leadtek Winfast PVR2000 -+ * -+ * Copyright (c) 2000 Gerd Knorr -+ * modified for PixelView (BT878P+W/FM) by -+ * Michal Kochanowicz -+ * Christoph Bartelmus -+ * modified for KNC ONE TV Station/Anubis Typhoon TView Tuner by -+ * Ulrich Mueller -+ * modified for Asus TV-Box and Creative/VisionTek BreakOut-Box by -+ * Stefan Jahn -+ * modified for inclusion into kernel sources by -+ * Jerome Brock -+ * modified for Leadtek Winfast PVR2000 by -+ * Thomas Reitmayr (treitmayr@yahoo.com) -+ * modified for Hauppauge HVR-1300 by -+ * Jan Frey (jfrey@gmx.de) -+ * -+ * parts are cut&pasted from the old lirc_haup.c driver -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "lirc_dev.h" -+ -+struct IR { -+ struct lirc_driver l; -+ struct i2c_client c; -+ int nextkey; -+ unsigned char b[3]; -+ unsigned char bits; -+ unsigned char flag; -+}; -+ -+#define DEVICE_NAME "lirc_i2c" -+ -+/* module parameters */ -+static int debug; /* debug output */ -+static int minor = -1; /* minor number */ -+ -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG DEVICE_NAME ": " fmt, \ -+ ## args); \ -+ } while (0) -+ -+static int reverse(int data, int bits) -+{ -+ int i; -+ int c; -+ -+ for (c = 0, i = 0; i < bits; i++) -+ c |= ((data & (1<c, keybuf, 1); -+ /* poll IR chip */ -+ if (i2c_master_recv(&ir->c, keybuf, sizeof(keybuf)) != sizeof(keybuf)) { -+ dprintk("read error\n"); -+ return -EIO; -+ } -+ -+ dprintk("key (0x%02x%02x%02x%02x)\n", -+ keybuf[0], keybuf[1], keybuf[2], keybuf[3]); -+ -+ /* key pressed ? */ -+ if (keybuf[2] == 0xff) -+ return -ENODATA; -+ -+ /* remove repeat bit */ -+ keybuf[2] &= 0x7f; -+ keybuf[3] |= 0x80; -+ -+ lirc_buffer_write(buf, keybuf); -+ return 0; -+} -+ -+static int add_to_buf_pcf8574(void *data, struct lirc_buffer *buf) -+{ -+ struct IR *ir = data; -+ int rc; -+ unsigned char all, mask; -+ unsigned char key; -+ -+ /* compute all valid bits (key code + pressed/release flag) */ -+ all = ir->bits | ir->flag; -+ -+ /* save IR writable mask bits */ -+ mask = i2c_smbus_read_byte(&ir->c) & ~all; -+ -+ /* send bit mask */ -+ rc = i2c_smbus_write_byte(&ir->c, (0xff & all) | mask); -+ -+ /* receive scan code */ -+ rc = i2c_smbus_read_byte(&ir->c); -+ -+ if (rc == -1) { -+ dprintk("%s read error\n", ir->c.name); -+ return -EIO; -+ } -+ -+ /* drop duplicate polls */ -+ if (ir->b[0] == (rc & all)) -+ return -ENODATA; -+ -+ ir->b[0] = rc & all; -+ -+ dprintk("%s key 0x%02X %s\n", ir->c.name, rc & ir->bits, -+ (rc & ir->flag) ? "released" : "pressed"); -+ -+ /* ignore released buttons */ -+ if (rc & ir->flag) -+ return -ENODATA; -+ -+ /* set valid key code */ -+ key = rc & ir->bits; -+ lirc_buffer_write(buf, &key); -+ return 0; -+} -+ -+/* common for Hauppauge IR receivers */ -+static int add_to_buf_haup_common(void *data, struct lirc_buffer *buf, -+ unsigned char *keybuf, int size, int offset) -+{ -+ struct IR *ir = data; -+ __u16 code; -+ unsigned char codes[2]; -+ int ret; -+ -+ /* poll IR chip */ -+ ret = i2c_master_recv(&ir->c, keybuf, size); -+ if (ret == size) { -+ ir->b[0] = keybuf[offset]; -+ ir->b[1] = keybuf[offset+1]; -+ ir->b[2] = keybuf[offset+2]; -+ if (ir->b[0] != 0x00 && ir->b[1] != 0x00) -+ dprintk("key (0x%02x/0x%02x)\n", ir->b[0], ir->b[1]); -+ } else { -+ dprintk("read error (ret=%d)\n", ret); -+ /* keep last successful read buffer */ -+ } -+ -+ /* key pressed ? */ -+ if ((ir->b[0] & 0x80) == 0) -+ return -ENODATA; -+ -+ /* look what we have */ -+ code = (((__u16)ir->b[0]&0x7f)<<6) | (ir->b[1]>>2); -+ -+ codes[0] = (code >> 8) & 0xff; -+ codes[1] = code & 0xff; -+ -+ /* return it */ -+ dprintk("sending code 0x%02x%02x to lirc\n", codes[0], codes[1]); -+ lirc_buffer_write(buf, codes); -+ return 0; -+} -+ -+/* specific for the Hauppauge PVR150 IR receiver */ -+static int add_to_buf_haup_pvr150(void *data, struct lirc_buffer *buf) -+{ -+ unsigned char keybuf[6]; -+ /* fetch 6 bytes, first relevant is at offset 3 */ -+ return add_to_buf_haup_common(data, buf, keybuf, 6, 3); -+} -+ -+/* used for all Hauppauge IR receivers but the PVR150 */ -+static int add_to_buf_haup(void *data, struct lirc_buffer *buf) -+{ -+ unsigned char keybuf[3]; -+ /* fetch 3 bytes, first relevant is at offset 0 */ -+ return add_to_buf_haup_common(data, buf, keybuf, 3, 0); -+} -+ -+ -+static int add_to_buf_pvr2000(void *data, struct lirc_buffer *buf) -+{ -+ struct IR *ir = data; -+ unsigned char key; -+ s32 flags; -+ s32 code; -+ -+ /* poll IR chip */ -+ flags = i2c_smbus_read_byte_data(&ir->c, 0x10); -+ if (-1 == flags) { -+ dprintk("read error\n"); -+ return -ENODATA; -+ } -+ /* key pressed ? */ -+ if (0 == (flags & 0x80)) -+ return -ENODATA; -+ -+ /* read actual key code */ -+ code = i2c_smbus_read_byte_data(&ir->c, 0x00); -+ if (-1 == code) { -+ dprintk("read error\n"); -+ return -ENODATA; -+ } -+ -+ key = code & 0xFF; -+ -+ dprintk("IR Key/Flags: (0x%02x/0x%02x)\n", key, flags & 0xFF); -+ -+ /* return it */ -+ lirc_buffer_write(buf, &key); -+ return 0; -+} -+ -+static int add_to_buf_pixelview(void *data, struct lirc_buffer *buf) -+{ -+ struct IR *ir = data; -+ unsigned char key; -+ -+ /* poll IR chip */ -+ if (1 != i2c_master_recv(&ir->c, &key, 1)) { -+ dprintk("read error\n"); -+ return -1; -+ } -+ dprintk("key %02x\n", key); -+ -+ /* return it */ -+ lirc_buffer_write(buf, &key); -+ return 0; -+} -+ -+static int add_to_buf_pv951(void *data, struct lirc_buffer *buf) -+{ -+ struct IR *ir = data; -+ unsigned char key; -+ unsigned char codes[4]; -+ -+ /* poll IR chip */ -+ if (1 != i2c_master_recv(&ir->c, &key, 1)) { -+ dprintk("read error\n"); -+ return -ENODATA; -+ } -+ /* ignore 0xaa */ -+ if (key == 0xaa) -+ return -ENODATA; -+ dprintk("key %02x\n", key); -+ -+ codes[0] = 0x61; -+ codes[1] = 0xD6; -+ codes[2] = reverse(key, 8); -+ codes[3] = (~codes[2])&0xff; -+ -+ lirc_buffer_write(buf, codes); -+ return 0; -+} -+ -+static int add_to_buf_knc1(void *data, struct lirc_buffer *buf) -+{ -+ static unsigned char last_key = 0xFF; -+ struct IR *ir = data; -+ unsigned char key; -+ -+ /* poll IR chip */ -+ if (1 != i2c_master_recv(&ir->c, &key, 1)) { -+ dprintk("read error\n"); -+ return -ENODATA; -+ } -+ -+ /* -+ * it seems that 0xFE indicates that a button is still held -+ * down, while 0xFF indicates that no button is held -+ * down. 0xFE sequences are sometimes interrupted by 0xFF -+ */ -+ -+ dprintk("key %02x\n", key); -+ -+ if (key == 0xFF) -+ return -ENODATA; -+ -+ if (key == 0xFE) -+ key = last_key; -+ -+ last_key = key; -+ lirc_buffer_write(buf, &key); -+ -+ return 0; -+} -+ -+static int set_use_inc(void *data) -+{ -+ struct IR *ir = data; -+ -+ dprintk("%s called\n", __func__); -+ -+ /* lock bttv in memory while /dev/lirc is in use */ -+ i2c_use_client(&ir->c); -+ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+ struct IR *ir = data; -+ -+ dprintk("%s called\n", __func__); -+ -+ i2c_release_client(&ir->c); -+} -+ -+static struct lirc_driver lirc_template = { -+ .name = "lirc_i2c", -+ .set_use_inc = set_use_inc, -+ .set_use_dec = set_use_dec, -+ .dev = NULL, -+ .owner = THIS_MODULE, -+}; -+ -+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id); -+static int ir_remove(struct i2c_client *client); -+static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg); -+ -+static const struct i2c_device_id ir_receiver_id[] = { -+ /* Generic entry for any IR receiver */ -+ { "ir_video", 0 }, -+ /* IR device specific entries could be added here */ -+ { } -+}; -+ -+static struct i2c_driver driver = { -+ .driver = { -+ .owner = THIS_MODULE, -+ .name = "i2c ir driver", -+ }, -+ .probe = ir_probe, -+ .remove = ir_remove, -+ .id_table = ir_receiver_id, -+ .command = ir_command, -+}; -+ -+static void pcf_probe(struct i2c_client *client, struct IR *ir) -+{ -+ int ret1, ret2, ret3, ret4; -+ -+ ret1 = i2c_smbus_write_byte(client, 0xff); -+ ret2 = i2c_smbus_read_byte(client); -+ ret3 = i2c_smbus_write_byte(client, 0x00); -+ ret4 = i2c_smbus_read_byte(client); -+ -+ /* in the Asus TV-Box: bit 1-0 */ -+ if (((ret2 & 0x03) == 0x03) && ((ret4 & 0x03) == 0x00)) { -+ ir->bits = (unsigned char) ~0x07; -+ ir->flag = 0x04; -+ /* in the Creative/VisionTek BreakOut-Box: bit 7-6 */ -+ } else if (((ret2 & 0xc0) == 0xc0) && ((ret4 & 0xc0) == 0x00)) { -+ ir->bits = (unsigned char) ~0xe0; -+ ir->flag = 0x20; -+ } -+ -+ return; -+} -+ -+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) -+{ -+ struct IR *ir; -+ struct i2c_adapter *adap = client->adapter; -+ unsigned short addr = client->addr; -+ int retval; -+ -+ ir = kzalloc(sizeof(struct IR), GFP_KERNEL); -+ if (!ir) -+ return -ENOMEM; -+ memcpy(&ir->l, &lirc_template, sizeof(struct lirc_driver)); -+ memcpy(&ir->c, client, sizeof(struct i2c_client)); -+ -+ i2c_set_clientdata(client, ir); -+ ir->l.data = ir; -+ ir->l.minor = minor; -+ ir->l.sample_rate = 10; -+ ir->l.dev = &ir->c.dev; -+ ir->nextkey = -1; -+ -+ switch (addr) { -+ case 0x64: -+ strlcpy(ir->c.name, "Pixelview IR", I2C_NAME_SIZE); -+ ir->l.code_length = 8; -+ ir->l.add_to_buf = add_to_buf_pixelview; -+ break; -+ case 0x4b: -+ strlcpy(ir->c.name, "PV951 IR", I2C_NAME_SIZE); -+ ir->l.code_length = 32; -+ ir->l.add_to_buf = add_to_buf_pv951; -+ break; -+ case 0x71: -+ if (adap->id == I2C_HW_B_CX2388x) -+ strlcpy(ir->c.name, "Hauppauge HVR1300", I2C_NAME_SIZE); -+ else /* bt8xx or cx2341x */ -+ /* -+ * The PVR150 IR receiver uses the same protocol as -+ * other Hauppauge cards, but the data flow is -+ * different, so we need to deal with it by its own. -+ */ -+ strlcpy(ir->c.name, "Hauppauge PVR150", I2C_NAME_SIZE); -+ ir->l.code_length = 13; -+ ir->l.add_to_buf = add_to_buf_haup_pvr150; -+ break; -+ case 0x6b: -+ strlcpy(ir->c.name, "Adaptec IR", I2C_NAME_SIZE); -+ ir->l.code_length = 32; -+ ir->l.add_to_buf = add_to_buf_adap; -+ break; -+ case 0x18: -+ case 0x1a: -+ if (adap->id == I2C_HW_B_CX2388x) { -+ strlcpy(ir->c.name, "Leadtek IR", I2C_NAME_SIZE); -+ ir->l.code_length = 8; -+ ir->l.add_to_buf = add_to_buf_pvr2000; -+ } else { /* bt8xx or cx2341x */ -+ strlcpy(ir->c.name, "Hauppauge IR", I2C_NAME_SIZE); -+ ir->l.code_length = 13; -+ ir->l.add_to_buf = add_to_buf_haup; -+ } -+ break; -+ case 0x30: -+ strlcpy(ir->c.name, "KNC ONE IR", I2C_NAME_SIZE); -+ ir->l.code_length = 8; -+ ir->l.add_to_buf = add_to_buf_knc1; -+ break; -+ case 0x21: -+ case 0x23: -+ pcf_probe(client, ir); -+ strlcpy(ir->c.name, "TV-Box IR", I2C_NAME_SIZE); -+ ir->l.code_length = 8; -+ ir->l.add_to_buf = add_to_buf_pcf8574; -+ break; -+ default: -+ /* shouldn't happen */ -+ printk("lirc_i2c: Huh? unknown i2c address (0x%02x)?\n", addr); -+ kfree(ir); -+ return -EINVAL; -+ } -+ printk(KERN_INFO "lirc_i2c: chip 0x%x found @ 0x%02x (%s)\n", -+ adap->id, addr, ir->c.name); -+ -+ retval = lirc_register_driver(&ir->l); -+ -+ if (retval < 0) { -+ printk(KERN_ERR "lirc_i2c: failed to register driver!\n"); -+ kfree(ir); -+ return retval; -+ } -+ -+ ir->l.minor = retval; -+ -+ return 0; -+} -+ -+static int ir_remove(struct i2c_client *client) -+{ -+ struct IR *ir = i2c_get_clientdata(client); -+ -+ /* unregister device */ -+ lirc_unregister_driver(ir->l.minor); -+ -+ /* free memory */ -+ kfree(ir); -+ return 0; -+} -+ -+static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg) -+{ -+ /* nothing */ -+ return 0; -+} -+ -+static int __init lirc_i2c_init(void) -+{ -+ i2c_add_driver(&driver); -+ return 0; -+} -+ -+static void __exit lirc_i2c_exit(void) -+{ -+ i2c_del_driver(&driver); -+} -+ -+MODULE_DESCRIPTION("Infrared receiver driver for Hauppauge and " -+ "Pixelview cards (i2c stack)"); -+MODULE_AUTHOR("Gerd Knorr, Michal Kochanowicz, Christoph Bartelmus, " -+ "Ulrich Mueller, Stefan Jahn, Jerome Brock"); -+MODULE_LICENSE("GPL"); -+ -+module_param(minor, int, S_IRUGO); -+MODULE_PARM_DESC(minor, "Preferred minor device number"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -+ -+module_init(lirc_i2c_init); -+module_exit(lirc_i2c_exit); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_igorplugusb.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_igorplugusb.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_igorplugusb.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_igorplugusb.c 2010-08-02 09:30:58.093051447 +0200 -@@ -0,0 +1,555 @@ -+/* -+ * lirc_igorplugusb - USB remote support for LIRC -+ * -+ * Supports the standard homebrew IgorPlugUSB receiver with Igor's firmware. -+ * See http://www.cesko.host.sk/IgorPlugUSB/IgorPlug-USB%20(AVR)_eng.htm -+ * -+ * The device can only record bursts of up to 36 pulses/spaces. -+ * Works fine with RC5. Longer commands lead to device buffer overrun. -+ * (Maybe a better firmware or a microcontroller with more ram can help?) -+ * -+ * Version 0.1 [beta status] -+ * -+ * Copyright (C) 2004 Jan M. Hochstein -+ * -+ * -+ * This driver was derived from: -+ * Paul Miller -+ * "lirc_atiusb" module -+ * Vladimir Dergachev 's 2002 -+ * "USB ATI Remote support" (input device) -+ * Adrian Dewhurst 's 2002 -+ * "USB StreamZap remote driver" (LIRC) -+ * Artur Lipowski 's 2002 -+ * "lirc_dev" and "lirc_gpio" LIRC modules -+ */ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+ -+/* module identification */ -+#define DRIVER_VERSION "0.1" -+#define DRIVER_AUTHOR \ -+ "Jan M. Hochstein " -+#define DRIVER_DESC "USB remote driver for LIRC" -+#define DRIVER_NAME "lirc_igorplugusb" -+ -+/* debugging support */ -+#ifdef CONFIG_USB_DEBUG -+static int debug = 1; -+#else -+static int debug; -+#endif -+ -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG fmt, ## args); \ -+ } while (0) -+ -+/* One mode2 pulse/space has 4 bytes. */ -+#define CODE_LENGTH sizeof(int) -+ -+/* Igor's firmware cannot record bursts longer than 36. */ -+#define DEVICE_BUFLEN 36 -+ -+/* -+ * Header at the beginning of the device's buffer: -+ * unsigned char data_length -+ * unsigned char data_start (!=0 means ring-buffer overrun) -+ * unsigned char counter (incremented by each burst) -+ */ -+#define DEVICE_HEADERLEN 3 -+ -+/* This is for the gap */ -+#define ADDITIONAL_LIRC_BYTES 2 -+ -+/* times to poll per second */ -+#define SAMPLE_RATE 100 -+static int sample_rate = SAMPLE_RATE; -+ -+ -+/**** Igor's USB Request Codes */ -+ -+#define SET_INFRABUFFER_EMPTY 1 -+/** -+ * Params: none -+ * Answer: empty -+ */ -+ -+#define GET_INFRACODE 2 -+/** -+ * Params: -+ * wValue: offset to begin reading infra buffer -+ * -+ * Answer: infra data -+ */ -+ -+#define SET_DATAPORT_DIRECTION 3 -+/** -+ * Params: -+ * wValue: (byte) 1 bit for each data port pin (0=in, 1=out) -+ * -+ * Answer: empty -+ */ -+ -+#define GET_DATAPORT_DIRECTION 4 -+/** -+ * Params: none -+ * -+ * Answer: (byte) 1 bit for each data port pin (0=in, 1=out) -+ */ -+ -+#define SET_OUT_DATAPORT 5 -+/** -+ * Params: -+ * wValue: byte to write to output data port -+ * -+ * Answer: empty -+ */ -+ -+#define GET_OUT_DATAPORT 6 -+/** -+ * Params: none -+ * -+ * Answer: least significant 3 bits read from output data port -+ */ -+ -+#define GET_IN_DATAPORT 7 -+/** -+ * Params: none -+ * -+ * Answer: least significant 3 bits read from input data port -+ */ -+ -+#define READ_EEPROM 8 -+/** -+ * Params: -+ * wValue: offset to begin reading EEPROM -+ * -+ * Answer: EEPROM bytes -+ */ -+ -+#define WRITE_EEPROM 9 -+/** -+ * Params: -+ * wValue: offset to EEPROM byte -+ * wIndex: byte to write -+ * -+ * Answer: empty -+ */ -+ -+#define SEND_RS232 10 -+/** -+ * Params: -+ * wValue: byte to send -+ * -+ * Answer: empty -+ */ -+ -+#define RECV_RS232 11 -+/** -+ * Params: none -+ * -+ * Answer: byte received -+ */ -+ -+#define SET_RS232_BAUD 12 -+/** -+ * Params: -+ * wValue: byte to write to UART bit rate register (UBRR) -+ * -+ * Answer: empty -+ */ -+ -+#define GET_RS232_BAUD 13 -+/** -+ * Params: none -+ * -+ * Answer: byte read from UART bit rate register (UBRR) -+ */ -+ -+ -+/* data structure for each usb remote */ -+struct igorplug { -+ -+ /* usb */ -+ struct usb_device *usbdev; -+ struct urb *urb_in; -+ int devnum; -+ -+ unsigned char *buf_in; -+ unsigned int len_in; -+ int in_space; -+ struct timeval last_time; -+ -+ dma_addr_t dma_in; -+ -+ /* lirc */ -+ struct lirc_driver *d; -+ -+ /* handle sending (init strings) */ -+ int send_flags; -+ wait_queue_head_t wait_out; -+}; -+ -+static int unregister_from_lirc(struct igorplug *ir) -+{ -+ struct lirc_driver *d = ir->d; -+ int devnum; -+ -+ if (!ir->d) -+ return -EINVAL; -+ -+ devnum = ir->devnum; -+ dprintk(DRIVER_NAME "[%d]: unregister from lirc called\n", devnum); -+ -+ lirc_unregister_driver(d->minor); -+ -+ printk(DRIVER_NAME "[%d]: usb remote disconnected\n", devnum); -+ -+ kfree(d); -+ ir->d = NULL; -+ kfree(ir); -+ return 0; -+} -+ -+static int set_use_inc(void *data) -+{ -+ struct igorplug *ir = data; -+ -+ if (!ir) { -+ printk(DRIVER_NAME "[?]: set_use_inc called with no context\n"); -+ return -EIO; -+ } -+ dprintk(DRIVER_NAME "[%d]: set use inc\n", ir->devnum); -+ -+ if (!ir->usbdev) -+ return -ENODEV; -+ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+ struct igorplug *ir = data; -+ -+ if (!ir) { -+ printk(DRIVER_NAME "[?]: set_use_dec called with no context\n"); -+ return; -+ } -+ dprintk(DRIVER_NAME "[%d]: set use dec\n", ir->devnum); -+} -+ -+ -+/** -+ * Called in user context. -+ * return 0 if data was added to the buffer and -+ * -ENODATA if none was available. This should add some number of bits -+ * evenly divisible by code_length to the buffer -+ */ -+static int usb_remote_poll(void *data, struct lirc_buffer *buf) -+{ -+ int ret; -+ struct igorplug *ir = (struct igorplug *)data; -+ -+ if (!ir->usbdev) /* Has the device been removed? */ -+ return -ENODEV; -+ -+ memset(ir->buf_in, 0, ir->len_in); -+ -+ ret = usb_control_msg( -+ ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0), -+ GET_INFRACODE, USB_TYPE_VENDOR|USB_DIR_IN, -+ 0/* offset */, /*unused*/0, -+ ir->buf_in, ir->len_in, -+ /*timeout*/HZ * USB_CTRL_GET_TIMEOUT); -+ if (ret > 0) { -+ int i = DEVICE_HEADERLEN; -+ int code, timediff; -+ struct timeval now; -+ -+ if (ret <= 1) /* ACK packet has 1 byte --> ignore */ -+ return -ENODATA; -+ -+ dprintk(DRIVER_NAME ": Got %d bytes. Header: %02x %02x %02x\n", -+ ret, ir->buf_in[0], ir->buf_in[1], ir->buf_in[2]); -+ -+ if (ir->buf_in[2] != 0) { -+ printk(DRIVER_NAME "[%d]: Device buffer overrun.\n", -+ ir->devnum); -+ /* start at earliest byte */ -+ i = DEVICE_HEADERLEN + ir->buf_in[2]; -+ /* where are we now? space, gap or pulse? */ -+ } -+ -+ do_gettimeofday(&now); -+ timediff = now.tv_sec - ir->last_time.tv_sec; -+ if (timediff + 1 > PULSE_MASK / 1000000) -+ timediff = PULSE_MASK; -+ else { -+ timediff *= 1000000; -+ timediff += now.tv_usec - ir->last_time.tv_usec; -+ } -+ ir->last_time.tv_sec = now.tv_sec; -+ ir->last_time.tv_usec = now.tv_usec; -+ -+ /* create leading gap */ -+ code = timediff; -+ lirc_buffer_write(buf, (unsigned char *)&code); -+ ir->in_space = 1; /* next comes a pulse */ -+ -+ /* MODE2: pulse/space (PULSE_BIT) in 1us units */ -+ -+ while (i < ret) { -+ /* 1 Igor-tick = 85.333333 us */ -+ code = (unsigned int)ir->buf_in[i] * 85 -+ + (unsigned int)ir->buf_in[i] / 3; -+ if (ir->in_space) -+ code |= PULSE_BIT; -+ lirc_buffer_write(buf, (unsigned char *)&code); -+ /* 1 chunk = CODE_LENGTH bytes */ -+ ir->in_space ^= 1; -+ ++i; -+ } -+ -+ ret = usb_control_msg( -+ ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0), -+ SET_INFRABUFFER_EMPTY, USB_TYPE_VENDOR|USB_DIR_IN, -+ /*unused*/0, /*unused*/0, -+ /*dummy*/ir->buf_in, /*dummy*/ir->len_in, -+ /*timeout*/HZ * USB_CTRL_GET_TIMEOUT); -+ if (ret < 0) -+ printk(DRIVER_NAME "[%d]: SET_INFRABUFFER_EMPTY: " -+ "error %d\n", ir->devnum, ret); -+ return 0; -+ } else if (ret < 0) -+ printk(DRIVER_NAME "[%d]: GET_INFRACODE: error %d\n", -+ ir->devnum, ret); -+ -+ return -ENODATA; -+} -+ -+ -+ -+static int usb_remote_probe(struct usb_interface *intf, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *dev = NULL; -+ struct usb_host_interface *idesc = NULL; -+ struct usb_host_endpoint *ep_ctl2; -+ struct igorplug *ir = NULL; -+ struct lirc_driver *driver = NULL; -+ int devnum, pipe, maxp; -+ int minor = 0; -+ char buf[63], name[128] = ""; -+ int mem_failure = 0; -+ int ret; -+ -+ dprintk(DRIVER_NAME ": usb probe called.\n"); -+ -+ dev = interface_to_usbdev(intf); -+ -+ idesc = intf->cur_altsetting; -+ -+ if (idesc->desc.bNumEndpoints != 1) -+ return -ENODEV; -+ ep_ctl2 = idesc->endpoint; -+ if (((ep_ctl2->desc.bEndpointAddress & USB_ENDPOINT_DIR_MASK) -+ != USB_DIR_IN) -+ || (ep_ctl2->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -+ != USB_ENDPOINT_XFER_CONTROL) -+ return -ENODEV; -+ pipe = usb_rcvctrlpipe(dev, ep_ctl2->desc.bEndpointAddress); -+ devnum = dev->devnum; -+ maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); -+ -+ dprintk(DRIVER_NAME "[%d]: bytes_in_key=%lu maxp=%d\n", -+ devnum, CODE_LENGTH, maxp); -+ -+ -+ mem_failure = 0; -+ ir = kzalloc(sizeof(struct igorplug), GFP_KERNEL); -+ if (!ir) { -+ mem_failure = 1; -+ goto mem_failure_switch; -+ } -+ driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); -+ if (!driver) { -+ mem_failure = 2; -+ goto mem_failure_switch; -+ } -+ -+ ir->buf_in = usb_alloc_coherent(dev, -+ DEVICE_BUFLEN+DEVICE_HEADERLEN, -+ GFP_ATOMIC, &ir->dma_in); -+ if (!ir->buf_in) { -+ mem_failure = 3; -+ goto mem_failure_switch; -+ } -+ -+ strcpy(driver->name, DRIVER_NAME " "); -+ driver->minor = -1; -+ driver->code_length = CODE_LENGTH * 8; /* in bits */ -+ driver->features = LIRC_CAN_REC_MODE2; -+ driver->data = ir; -+ driver->chunk_size = CODE_LENGTH; -+ driver->buffer_size = DEVICE_BUFLEN + ADDITIONAL_LIRC_BYTES; -+ driver->set_use_inc = &set_use_inc; -+ driver->set_use_dec = &set_use_dec; -+ driver->sample_rate = sample_rate; /* per second */ -+ driver->add_to_buf = &usb_remote_poll; -+ driver->dev = &intf->dev; -+ driver->owner = THIS_MODULE; -+ -+ init_waitqueue_head(&ir->wait_out); -+ -+ minor = lirc_register_driver(driver); -+ if (minor < 0) -+ mem_failure = 9; -+ -+mem_failure_switch: -+ -+ switch (mem_failure) { -+ case 9: -+ usb_alloc_coherent(dev, DEVICE_BUFLEN+DEVICE_HEADERLEN, -+ ir->buf_in, ir->dma_in); -+ case 3: -+ kfree(driver); -+ case 2: -+ kfree(ir); -+ case 1: -+ printk(DRIVER_NAME "[%d]: out of memory (code=%d)\n", -+ devnum, mem_failure); -+ return -ENOMEM; -+ } -+ -+ driver->minor = minor; -+ ir->d = driver; -+ ir->devnum = devnum; -+ ir->usbdev = dev; -+ ir->len_in = DEVICE_BUFLEN+DEVICE_HEADERLEN; -+ ir->in_space = 1; /* First mode2 event is a space. */ -+ do_gettimeofday(&ir->last_time); -+ -+ if (dev->descriptor.iManufacturer -+ && usb_string(dev, dev->descriptor.iManufacturer, -+ buf, sizeof(buf)) > 0) -+ strlcpy(name, buf, sizeof(name)); -+ if (dev->descriptor.iProduct -+ && usb_string(dev, dev->descriptor.iProduct, buf, sizeof(buf)) > 0) -+ snprintf(name + strlen(name), sizeof(name) - strlen(name), -+ " %s", buf); -+ printk(DRIVER_NAME "[%d]: %s on usb%d:%d\n", devnum, name, -+ dev->bus->busnum, devnum); -+ -+ /* clear device buffer */ -+ ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0), -+ SET_INFRABUFFER_EMPTY, USB_TYPE_VENDOR|USB_DIR_IN, -+ /*unused*/0, /*unused*/0, -+ /*dummy*/ir->buf_in, /*dummy*/ir->len_in, -+ /*timeout*/HZ * USB_CTRL_GET_TIMEOUT); -+ if (ret < 0) -+ printk(DRIVER_NAME "[%d]: SET_INFRABUFFER_EMPTY: error %d\n", -+ devnum, ret); -+ -+ usb_set_intfdata(intf, ir); -+ return 0; -+} -+ -+ -+static void usb_remote_disconnect(struct usb_interface *intf) -+{ -+ struct usb_device *dev = interface_to_usbdev(intf); -+ struct igorplug *ir = usb_get_intfdata(intf); -+ usb_set_intfdata(intf, NULL); -+ -+ if (!ir || !ir->d) -+ return; -+ -+ ir->usbdev = NULL; -+ wake_up_all(&ir->wait_out); -+ -+ usb_alloc_coherent(dev, ir->len_in, ir->buf_in, ir->dma_in); -+ -+ unregister_from_lirc(ir); -+} -+ -+static struct usb_device_id usb_remote_id_table[] = { -+ /* Igor Plug USB (Atmel's Manufact. ID) */ -+ { USB_DEVICE(0x03eb, 0x0002) }, -+ -+ /* Terminating entry */ -+ { } -+}; -+ -+static struct usb_driver usb_remote_driver = { -+ .name = DRIVER_NAME, -+ .probe = usb_remote_probe, -+ .disconnect = usb_remote_disconnect, -+ .id_table = usb_remote_id_table -+}; -+ -+static int __init usb_remote_init(void) -+{ -+ int i; -+ -+ printk(KERN_INFO "\n" -+ DRIVER_NAME ": " DRIVER_DESC " v" DRIVER_VERSION "\n"); -+ printk(DRIVER_NAME ": " DRIVER_AUTHOR "\n"); -+ dprintk(DRIVER_NAME ": debug mode enabled\n"); -+ -+ i = usb_register(&usb_remote_driver); -+ if (i < 0) { -+ printk(DRIVER_NAME ": usb register failed, result = %d\n", i); -+ return -ENODEV; -+ } -+ -+ return 0; -+} -+ -+static void __exit usb_remote_exit(void) -+{ -+ usb_deregister(&usb_remote_driver); -+} -+ -+module_init(usb_remote_init); -+module_exit(usb_remote_exit); -+ -+#include -+MODULE_INFO(vermagic, VERMAGIC_STRING); -+ -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_AUTHOR(DRIVER_AUTHOR); -+MODULE_LICENSE("GPL"); -+MODULE_DEVICE_TABLE(usb, usb_remote_id_table); -+ -+module_param(sample_rate, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(sample_rate, "Sampling rate in Hz (default: 100)"); -+ -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_imon.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_imon.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_imon.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_imon.c 2010-08-02 09:28:03.940927260 +0200 -@@ -0,0 +1,1053 @@ -+/* -+ * lirc_imon.c: LIRC/VFD/LCD driver for SoundGraph iMON IR/VFD/LCD -+ * including the iMON PAD model -+ * -+ * Copyright(C) 2004 Venky Raju(dev@venky.ws) -+ * Copyright(C) 2009 Jarod Wilson -+ * -+ * lirc_imon is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+ -+#define MOD_AUTHOR "Venky Raju " -+#define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" -+#define MOD_NAME "lirc_imon" -+#define MOD_VERSION "0.8" -+ -+#define DISPLAY_MINOR_BASE 144 -+#define DEVICE_NAME "lcd%d" -+ -+#define BUF_CHUNK_SIZE 4 -+#define BUF_SIZE 128 -+ -+#define BIT_DURATION 250 /* each bit received is 250us */ -+ -+/*** P R O T O T Y P E S ***/ -+ -+/* USB Callback prototypes */ -+static int imon_probe(struct usb_interface *interface, -+ const struct usb_device_id *id); -+static void imon_disconnect(struct usb_interface *interface); -+static void usb_rx_callback(struct urb *urb); -+static void usb_tx_callback(struct urb *urb); -+ -+/* suspend/resume support */ -+static int imon_resume(struct usb_interface *intf); -+static int imon_suspend(struct usb_interface *intf, pm_message_t message); -+ -+/* Display file_operations function prototypes */ -+static int display_open(struct inode *inode, struct file *file); -+static int display_close(struct inode *inode, struct file *file); -+ -+/* VFD write operation */ -+static ssize_t vfd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos); -+ -+/* LIRC driver function prototypes */ -+static int ir_open(void *data); -+static void ir_close(void *data); -+ -+/* Driver init/exit prototypes */ -+static int __init imon_init(void); -+static void __exit imon_exit(void); -+ -+/*** G L O B A L S ***/ -+ -+struct imon_context { -+ struct usb_device *usbdev; -+ /* Newer devices have two interfaces */ -+ int display; /* not all controllers do */ -+ int display_isopen; /* display port has been opened */ -+ int ir_isopen; /* IR port open */ -+ int dev_present; /* USB device presence */ -+ struct mutex ctx_lock; /* to lock this object */ -+ wait_queue_head_t remove_ok; /* For unexpected USB disconnects */ -+ -+ int vfd_proto_6p; /* some VFD require a 6th packet */ -+ -+ struct lirc_driver *driver; -+ struct usb_endpoint_descriptor *rx_endpoint; -+ struct usb_endpoint_descriptor *tx_endpoint; -+ struct urb *rx_urb; -+ struct urb *tx_urb; -+ unsigned char usb_rx_buf[8]; -+ unsigned char usb_tx_buf[8]; -+ -+ struct rx_data { -+ int count; /* length of 0 or 1 sequence */ -+ int prev_bit; /* logic level of sequence */ -+ int initial_space; /* initial space flag */ -+ } rx; -+ -+ struct tx_t { -+ unsigned char data_buf[35]; /* user data buffer */ -+ struct completion finished; /* wait for write to finish */ -+ atomic_t busy; /* write in progress */ -+ int status; /* status of tx completion */ -+ } tx; -+}; -+ -+static struct file_operations display_fops = { -+ .owner = THIS_MODULE, -+ .open = &display_open, -+ .write = &vfd_write, -+ .release = &display_close -+}; -+ -+/* -+ * USB Device ID for iMON USB Control Boards -+ * -+ * The Windows drivers contain 6 different inf files, more or less one for -+ * each new device until the 0x0034-0x0046 devices, which all use the same -+ * driver. Some of the devices in the 34-46 range haven't been definitively -+ * identified yet. Early devices have either a TriGem Computer, Inc. or a -+ * Samsung vendor ID (0x0aa8 and 0x04e8 respectively), while all later -+ * devices use the SoundGraph vendor ID (0x15c2). -+ */ -+static struct usb_device_id imon_usb_id_table[] = { -+ /* TriGem iMON (IR only) -- TG_iMON.inf */ -+ { USB_DEVICE(0x0aa8, 0x8001) }, -+ -+ /* SoundGraph iMON (IR only) -- sg_imon.inf */ -+ { USB_DEVICE(0x04e8, 0xff30) }, -+ -+ /* SoundGraph iMON VFD (IR & VFD) -- iMON_VFD.inf */ -+ { USB_DEVICE(0x0aa8, 0xffda) }, -+ -+ /* SoundGraph iMON SS (IR & VFD) -- iMON_SS.inf */ -+ { USB_DEVICE(0x15c2, 0xffda) }, -+ -+ {} -+}; -+ -+/* Some iMON VFD models requires a 6th packet for VFD writes */ -+static struct usb_device_id vfd_proto_6p_list[] = { -+ { USB_DEVICE(0x15c2, 0xffda) }, -+ {} -+}; -+ -+/* Some iMON devices have no lcd/vfd, don't set one up */ -+static struct usb_device_id ir_only_list[] = { -+ { USB_DEVICE(0x0aa8, 0x8001) }, -+ { USB_DEVICE(0x04e8, 0xff30) }, -+ {} -+}; -+ -+/* USB Device data */ -+static struct usb_driver imon_driver = { -+ .name = MOD_NAME, -+ .probe = imon_probe, -+ .disconnect = imon_disconnect, -+ .suspend = imon_suspend, -+ .resume = imon_resume, -+ .id_table = imon_usb_id_table, -+}; -+ -+static struct usb_class_driver imon_class = { -+ .name = DEVICE_NAME, -+ .fops = &display_fops, -+ .minor_base = DISPLAY_MINOR_BASE, -+}; -+ -+/* to prevent races between open() and disconnect(), probing, etc */ -+static DEFINE_MUTEX(driver_lock); -+ -+static int debug; -+ -+/*** M O D U L E C O D E ***/ -+ -+MODULE_AUTHOR(MOD_AUTHOR); -+MODULE_DESCRIPTION(MOD_DESC); -+MODULE_VERSION(MOD_VERSION); -+MODULE_LICENSE("GPL"); -+MODULE_DEVICE_TABLE(usb, imon_usb_id_table); -+module_param(debug, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes(default: no)"); -+ -+static void free_imon_context(struct imon_context *context) -+{ -+ struct device *dev = context->driver->dev; -+ usb_free_urb(context->tx_urb); -+ usb_free_urb(context->rx_urb); -+ lirc_buffer_free(context->driver->rbuf); -+ kfree(context->driver->rbuf); -+ kfree(context->driver); -+ kfree(context); -+ -+ dev_dbg(dev, "%s: iMON context freed\n", __func__); -+} -+ -+static void deregister_from_lirc(struct imon_context *context) -+{ -+ int retval; -+ int minor = context->driver->minor; -+ -+ retval = lirc_unregister_driver(minor); -+ if (retval) -+ err("%s: unable to deregister from lirc(%d)", -+ __func__, retval); -+ else -+ printk(KERN_INFO MOD_NAME ": Deregistered iMON driver " -+ "(minor:%d)\n", minor); -+ -+} -+ -+/** -+ * Called when the Display device (e.g. /dev/lcd0) -+ * is opened by the application. -+ */ -+static int display_open(struct inode *inode, struct file *file) -+{ -+ struct usb_interface *interface; -+ struct imon_context *context = NULL; -+ int subminor; -+ int retval = 0; -+ -+ /* prevent races with disconnect */ -+ mutex_lock(&driver_lock); -+ -+ subminor = iminor(inode); -+ interface = usb_find_interface(&imon_driver, subminor); -+ if (!interface) { -+ err("%s: could not find interface for minor %d", -+ __func__, subminor); -+ retval = -ENODEV; -+ goto exit; -+ } -+ context = usb_get_intfdata(interface); -+ -+ if (!context) { -+ err("%s: no context found for minor %d", -+ __func__, subminor); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (!context->display) { -+ err("%s: display not supported by device", __func__); -+ retval = -ENODEV; -+ } else if (context->display_isopen) { -+ err("%s: display port is already open", __func__); -+ retval = -EBUSY; -+ } else { -+ context->display_isopen = 1; -+ file->private_data = context; -+ dev_info(context->driver->dev, "display port opened\n"); -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ -+exit: -+ mutex_unlock(&driver_lock); -+ return retval; -+} -+ -+/** -+ * Called when the display device (e.g. /dev/lcd0) -+ * is closed by the application. -+ */ -+static int display_close(struct inode *inode, struct file *file) -+{ -+ struct imon_context *context = NULL; -+ int retval = 0; -+ -+ context = (struct imon_context *)file->private_data; -+ -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (!context->display) { -+ err("%s: display not supported by device", __func__); -+ retval = -ENODEV; -+ } else if (!context->display_isopen) { -+ err("%s: display is not open", __func__); -+ retval = -EIO; -+ } else { -+ context->display_isopen = 0; -+ dev_info(context->driver->dev, "display port closed\n"); -+ if (!context->dev_present && !context->ir_isopen) { -+ /* -+ * Device disconnected before close and IR port is not -+ * open. If IR port is open, context will be deleted by -+ * ir_close. -+ */ -+ mutex_unlock(&context->ctx_lock); -+ free_imon_context(context); -+ return retval; -+ } -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ return retval; -+} -+ -+/** -+ * Sends a packet to the device -- this function must be called -+ * with context->ctx_lock held. -+ */ -+static int send_packet(struct imon_context *context) -+{ -+ unsigned int pipe; -+ int interval = 0; -+ int retval = 0; -+ struct usb_ctrlrequest *control_req = NULL; -+ -+ /* Check if we need to use control or interrupt urb */ -+ pipe = usb_sndintpipe(context->usbdev, -+ context->tx_endpoint->bEndpointAddress); -+ interval = context->tx_endpoint->bInterval; -+ -+ usb_fill_int_urb(context->tx_urb, context->usbdev, pipe, -+ context->usb_tx_buf, -+ sizeof(context->usb_tx_buf), -+ usb_tx_callback, context, interval); -+ -+ context->tx_urb->actual_length = 0; -+ -+ init_completion(&context->tx.finished); -+ atomic_set(&(context->tx.busy), 1); -+ -+ retval = usb_submit_urb(context->tx_urb, GFP_KERNEL); -+ if (retval) { -+ atomic_set(&(context->tx.busy), 0); -+ err("%s: error submitting urb(%d)", __func__, retval); -+ } else { -+ /* Wait for transmission to complete (or abort) */ -+ mutex_unlock(&context->ctx_lock); -+ retval = wait_for_completion_interruptible( -+ &context->tx.finished); -+ if (retval) -+ err("%s: task interrupted", __func__); -+ mutex_lock(&context->ctx_lock); -+ -+ retval = context->tx.status; -+ if (retval) -+ err("%s: packet tx failed (%d)", __func__, retval); -+ } -+ -+ kfree(control_req); -+ -+ return retval; -+} -+ -+/** -+ * Writes data to the VFD. The iMON VFD is 2x16 characters -+ * and requires data in 5 consecutive USB interrupt packets, -+ * each packet but the last carrying 7 bytes. -+ * -+ * I don't know if the VFD board supports features such as -+ * scrolling, clearing rows, blanking, etc. so at -+ * the caller must provide a full screen of data. If fewer -+ * than 32 bytes are provided spaces will be appended to -+ * generate a full screen. -+ */ -+static ssize_t vfd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos) -+{ -+ int i; -+ int offset; -+ int seq; -+ int retval = 0; -+ struct imon_context *context; -+ const unsigned char vfd_packet6[] = { -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; -+ -+ context = (struct imon_context *)file->private_data; -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (!context->dev_present) { -+ err("%s: no iMON device present", __func__); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ if (n_bytes <= 0 || n_bytes > 32) { -+ err("%s: invalid payload size", __func__); -+ retval = -EINVAL; -+ goto exit; -+ } -+ -+ if (copy_from_user(context->tx.data_buf, buf, n_bytes)) { -+ retval = -EFAULT; -+ goto exit; -+ } -+ -+ /* Pad with spaces */ -+ for (i = n_bytes; i < 32; ++i) -+ context->tx.data_buf[i] = ' '; -+ -+ for (i = 32; i < 35; ++i) -+ context->tx.data_buf[i] = 0xFF; -+ -+ offset = 0; -+ seq = 0; -+ -+ do { -+ memcpy(context->usb_tx_buf, context->tx.data_buf + offset, 7); -+ context->usb_tx_buf[7] = (unsigned char) seq; -+ -+ retval = send_packet(context); -+ if (retval) { -+ err("%s: send packet failed for packet #%d", -+ __func__, seq/2); -+ goto exit; -+ } else { -+ seq += 2; -+ offset += 7; -+ } -+ -+ } while (offset < 35); -+ -+ if (context->vfd_proto_6p) { -+ /* Send packet #6 */ -+ memcpy(context->usb_tx_buf, &vfd_packet6, sizeof(vfd_packet6)); -+ context->usb_tx_buf[7] = (unsigned char) seq; -+ retval = send_packet(context); -+ if (retval) -+ err("%s: send packet failed for packet #%d", -+ __func__, seq/2); -+ } -+ -+exit: -+ mutex_unlock(&context->ctx_lock); -+ -+ return (!retval) ? n_bytes : retval; -+} -+ -+/** -+ * Callback function for USB core API: transmit data -+ */ -+static void usb_tx_callback(struct urb *urb) -+{ -+ struct imon_context *context; -+ -+ if (!urb) -+ return; -+ context = (struct imon_context *)urb->context; -+ if (!context) -+ return; -+ -+ context->tx.status = urb->status; -+ -+ /* notify waiters that write has finished */ -+ atomic_set(&context->tx.busy, 0); -+ complete(&context->tx.finished); -+ -+ return; -+} -+ -+/** -+ * Called by lirc_dev when the application opens /dev/lirc -+ */ -+static int ir_open(void *data) -+{ -+ int retval = 0; -+ struct imon_context *context; -+ -+ /* prevent races with disconnect */ -+ mutex_lock(&driver_lock); -+ -+ context = (struct imon_context *)data; -+ -+ /* initial IR protocol decode variables */ -+ context->rx.count = 0; -+ context->rx.initial_space = 1; -+ context->rx.prev_bit = 0; -+ -+ context->ir_isopen = 1; -+ dev_info(context->driver->dev, "IR port opened\n"); -+ -+ mutex_unlock(&driver_lock); -+ return retval; -+} -+ -+/** -+ * Called by lirc_dev when the application closes /dev/lirc -+ */ -+static void ir_close(void *data) -+{ -+ struct imon_context *context; -+ -+ context = (struct imon_context *)data; -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ context->ir_isopen = 0; -+ dev_info(context->driver->dev, "IR port closed\n"); -+ -+ if (!context->dev_present) { -+ /* -+ * Device disconnected while IR port was still open. Driver -+ * was not deregistered at disconnect time, so do it now. -+ */ -+ deregister_from_lirc(context); -+ -+ if (!context->display_isopen) { -+ mutex_unlock(&context->ctx_lock); -+ free_imon_context(context); -+ return; -+ } -+ /* -+ * If display port is open, context will be deleted by -+ * display_close -+ */ -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ return; -+} -+ -+/** -+ * Convert bit count to time duration (in us) and submit -+ * the value to lirc_dev. -+ */ -+static void submit_data(struct imon_context *context) -+{ -+ unsigned char buf[4]; -+ int value = context->rx.count; -+ int i; -+ -+ dev_dbg(context->driver->dev, "submitting data to LIRC\n"); -+ -+ value *= BIT_DURATION; -+ value &= PULSE_MASK; -+ if (context->rx.prev_bit) -+ value |= PULSE_BIT; -+ -+ for (i = 0; i < 4; ++i) -+ buf[i] = value>>(i*8); -+ -+ lirc_buffer_write(context->driver->rbuf, buf); -+ wake_up(&context->driver->rbuf->wait_poll); -+ return; -+} -+ -+static inline int tv2int(const struct timeval *a, const struct timeval *b) -+{ -+ int usecs = 0; -+ int sec = 0; -+ -+ if (b->tv_usec > a->tv_usec) { -+ usecs = 1000000; -+ sec--; -+ } -+ -+ usecs += a->tv_usec - b->tv_usec; -+ -+ sec += a->tv_sec - b->tv_sec; -+ sec *= 1000; -+ usecs /= 1000; -+ sec += usecs; -+ -+ if (sec < 0) -+ sec = 1000; -+ -+ return sec; -+} -+ -+/** -+ * Process the incoming packet -+ */ -+static void imon_incoming_packet(struct imon_context *context, -+ struct urb *urb, int intf) -+{ -+ int len = urb->actual_length; -+ unsigned char *buf = urb->transfer_buffer; -+ struct device *dev = context->driver->dev; -+ int octet, bit; -+ unsigned char mask; -+ int i, chunk_num; -+ -+ /* -+ * just bail out if no listening IR client -+ */ -+ if (!context->ir_isopen) -+ return; -+ -+ if (len != 8) { -+ dev_warn(dev, "imon %s: invalid incoming packet " -+ "size (len = %d, intf%d)\n", __func__, len, intf); -+ return; -+ } -+ -+ if (debug) { -+ printk(KERN_INFO "raw packet: "); -+ for (i = 0; i < len; ++i) -+ printk("%02x ", buf[i]); -+ printk("\n"); -+ } -+ -+ /* -+ * Translate received data to pulse and space lengths. -+ * Received data is active low, i.e. pulses are 0 and -+ * spaces are 1. -+ * -+ * My original algorithm was essentially similar to -+ * Changwoo Ryu's with the exception that he switched -+ * the incoming bits to active high and also fed an -+ * initial space to LIRC at the start of a new sequence -+ * if the previous bit was a pulse. -+ * -+ * I've decided to adopt his algorithm. -+ */ -+ -+ if (buf[7] == 1 && context->rx.initial_space) { -+ /* LIRC requires a leading space */ -+ context->rx.prev_bit = 0; -+ context->rx.count = 4; -+ submit_data(context); -+ context->rx.count = 0; -+ } -+ -+ for (octet = 0; octet < 5; ++octet) { -+ mask = 0x80; -+ for (bit = 0; bit < 8; ++bit) { -+ int curr_bit = !(buf[octet] & mask); -+ if (curr_bit != context->rx.prev_bit) { -+ if (context->rx.count) { -+ submit_data(context); -+ context->rx.count = 0; -+ } -+ context->rx.prev_bit = curr_bit; -+ } -+ ++context->rx.count; -+ mask >>= 1; -+ } -+ } -+ -+ if (chunk_num == 10) { -+ if (context->rx.count) { -+ submit_data(context); -+ context->rx.count = 0; -+ } -+ context->rx.initial_space = context->rx.prev_bit; -+ } -+} -+ -+/** -+ * Callback function for USB core API: receive data -+ */ -+static void usb_rx_callback(struct urb *urb) -+{ -+ struct imon_context *context; -+ unsigned char *buf; -+ int len; -+ int intfnum = 0; -+ -+ if (!urb) -+ return; -+ -+ context = (struct imon_context *)urb->context; -+ if (!context) -+ return; -+ -+ buf = urb->transfer_buffer; -+ len = urb->actual_length; -+ -+ switch (urb->status) { -+ case -ENOENT: /* usbcore unlink successful! */ -+ return; -+ -+ case 0: -+ imon_incoming_packet(context, urb, intfnum); -+ break; -+ -+ default: -+ dev_warn(context->driver->dev, "imon %s: status(%d): ignored\n", -+ __func__, urb->status); -+ break; -+ } -+ -+ usb_submit_urb(context->rx_urb, GFP_ATOMIC); -+ -+ return; -+} -+ -+/** -+ * Callback function for USB core API: Probe -+ */ -+static int imon_probe(struct usb_interface *interface, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *usbdev = NULL; -+ struct usb_host_interface *iface_desc = NULL; -+ struct usb_endpoint_descriptor *rx_endpoint = NULL; -+ struct usb_endpoint_descriptor *tx_endpoint = NULL; -+ struct urb *rx_urb = NULL; -+ struct urb *tx_urb = NULL; -+ struct lirc_driver *driver = NULL; -+ struct lirc_buffer *rbuf = NULL; -+ struct device *dev = &interface->dev; -+ int ifnum; -+ int lirc_minor = 0; -+ int num_endpts; -+ int retval = 0; -+ int display_ep_found = 0; -+ int ir_ep_found = 0; -+ int alloc_status = 0; -+ int vfd_proto_6p = 0; -+ int code_length; -+ struct imon_context *context = NULL; -+ int i; -+ u16 vendor, product; -+ -+ context = kzalloc(sizeof(struct imon_context), GFP_KERNEL); -+ if (!context) { -+ err("%s: kzalloc failed for context", __func__); -+ alloc_status = 1; -+ goto alloc_status_switch; -+ } -+ -+ /* -+ * Try to auto-detect the type of display if the user hasn't set -+ * it by hand via the display_type modparam. Default is VFD. -+ */ -+ if (usb_match_id(interface, ir_only_list)) -+ context->display = 0; -+ else -+ context->display = 1; -+ -+ code_length = BUF_CHUNK_SIZE * 8; -+ -+ usbdev = usb_get_dev(interface_to_usbdev(interface)); -+ iface_desc = interface->cur_altsetting; -+ num_endpts = iface_desc->desc.bNumEndpoints; -+ ifnum = iface_desc->desc.bInterfaceNumber; -+ vendor = le16_to_cpu(usbdev->descriptor.idVendor); -+ product = le16_to_cpu(usbdev->descriptor.idProduct); -+ -+ dev_dbg(dev, "%s: found iMON device (%04x:%04x, intf%d)\n", -+ __func__, vendor, product, ifnum); -+ -+ /* prevent races probing devices w/multiple interfaces */ -+ mutex_lock(&driver_lock); -+ -+ /* -+ * Scan the endpoint list and set: -+ * first input endpoint = IR endpoint -+ * first output endpoint = display endpoint -+ */ -+ for (i = 0; i < num_endpts && !(ir_ep_found && display_ep_found); ++i) { -+ struct usb_endpoint_descriptor *ep; -+ int ep_dir; -+ int ep_type; -+ ep = &iface_desc->endpoint[i].desc; -+ ep_dir = ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK; -+ ep_type = ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; -+ -+ if (!ir_ep_found && -+ ep_dir == USB_DIR_IN && -+ ep_type == USB_ENDPOINT_XFER_INT) { -+ -+ rx_endpoint = ep; -+ ir_ep_found = 1; -+ dev_dbg(dev, "%s: found IR endpoint\n", __func__); -+ -+ } else if (!display_ep_found && ep_dir == USB_DIR_OUT && -+ ep_type == USB_ENDPOINT_XFER_INT) { -+ tx_endpoint = ep; -+ display_ep_found = 1; -+ dev_dbg(dev, "%s: found display endpoint\n", __func__); -+ } -+ } -+ -+ /* -+ * Some iMON receivers have no display. Unfortunately, it seems -+ * that SoundGraph recycles device IDs between devices both with -+ * and without... :\ -+ */ -+ if (context->display == 0) { -+ display_ep_found = 0; -+ dev_dbg(dev, "%s: device has no display\n", __func__); -+ } -+ -+ /* Input endpoint is mandatory */ -+ if (!ir_ep_found) { -+ err("%s: no valid input (IR) endpoint found.", __func__); -+ retval = -ENODEV; -+ alloc_status = 2; -+ goto alloc_status_switch; -+ } -+ -+ /* Determine if display requires 6 packets */ -+ if (display_ep_found) { -+ if (usb_match_id(interface, vfd_proto_6p_list)) -+ vfd_proto_6p = 1; -+ -+ dev_dbg(dev, "%s: vfd_proto_6p: %d\n", -+ __func__, vfd_proto_6p); -+ } -+ -+ driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); -+ if (!driver) { -+ err("%s: kzalloc failed for lirc_driver", __func__); -+ alloc_status = 2; -+ goto alloc_status_switch; -+ } -+ rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!rbuf) { -+ err("%s: kmalloc failed for lirc_buffer", __func__); -+ alloc_status = 3; -+ goto alloc_status_switch; -+ } -+ if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) { -+ err("%s: lirc_buffer_init failed", __func__); -+ alloc_status = 4; -+ goto alloc_status_switch; -+ } -+ rx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!rx_urb) { -+ err("%s: usb_alloc_urb failed for IR urb", __func__); -+ alloc_status = 5; -+ goto alloc_status_switch; -+ } -+ tx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!tx_urb) { -+ err("%s: usb_alloc_urb failed for display urb", -+ __func__); -+ alloc_status = 6; -+ goto alloc_status_switch; -+ } -+ -+ mutex_init(&context->ctx_lock); -+ context->vfd_proto_6p = vfd_proto_6p; -+ -+ strcpy(driver->name, MOD_NAME); -+ driver->minor = -1; -+ driver->code_length = sizeof(int) * 8; -+ driver->sample_rate = 0; -+ driver->features = LIRC_CAN_REC_MODE2; -+ driver->data = context; -+ driver->rbuf = rbuf; -+ driver->set_use_inc = ir_open; -+ driver->set_use_dec = ir_close; -+ driver->dev = &interface->dev; -+ driver->owner = THIS_MODULE; -+ -+ mutex_lock(&context->ctx_lock); -+ -+ context->driver = driver; -+ /* start out in keyboard mode */ -+ -+ lirc_minor = lirc_register_driver(driver); -+ if (lirc_minor < 0) { -+ err("%s: lirc_register_driver failed", __func__); -+ alloc_status = 7; -+ goto alloc_status_switch; -+ } else -+ dev_info(dev, "Registered iMON driver " -+ "(lirc minor: %d)\n", lirc_minor); -+ -+ /* Needed while unregistering! */ -+ driver->minor = lirc_minor; -+ -+ context->usbdev = usbdev; -+ context->dev_present = 1; -+ context->rx_endpoint = rx_endpoint; -+ context->rx_urb = rx_urb; -+ -+ /* -+ * tx is used to send characters to lcd/vfd, associate RF -+ * remotes, set IR protocol, and maybe more... -+ */ -+ context->tx_endpoint = tx_endpoint; -+ context->tx_urb = tx_urb; -+ -+ if (display_ep_found) -+ context->display = 1; -+ -+ usb_fill_int_urb(context->rx_urb, context->usbdev, -+ usb_rcvintpipe(context->usbdev, -+ context->rx_endpoint->bEndpointAddress), -+ context->usb_rx_buf, sizeof(context->usb_rx_buf), -+ usb_rx_callback, context, -+ context->rx_endpoint->bInterval); -+ -+ retval = usb_submit_urb(context->rx_urb, GFP_KERNEL); -+ -+ if (retval) { -+ err("%s: usb_submit_urb failed for intf0 (%d)", -+ __func__, retval); -+ mutex_unlock(&context->ctx_lock); -+ goto exit; -+ } -+ -+ usb_set_intfdata(interface, context); -+ -+ if (context->display && ifnum == 0) { -+ dev_dbg(dev, "%s: Registering iMON display with sysfs\n", -+ __func__); -+ -+ if (usb_register_dev(interface, &imon_class)) { -+ /* Not a fatal error, so ignore */ -+ dev_info(dev, "%s: could not get a minor number for " -+ "display\n", __func__); -+ } -+ } -+ -+ dev_info(dev, "iMON device (%04x:%04x, intf%d) on " -+ "usb<%d:%d> initialized\n", vendor, product, ifnum, -+ usbdev->bus->busnum, usbdev->devnum); -+ -+alloc_status_switch: -+ mutex_unlock(&context->ctx_lock); -+ -+ switch (alloc_status) { -+ case 7: -+ usb_free_urb(tx_urb); -+ case 6: -+ usb_free_urb(rx_urb); -+ case 5: -+ if (rbuf) -+ lirc_buffer_free(rbuf); -+ case 4: -+ kfree(rbuf); -+ case 3: -+ kfree(driver); -+ case 2: -+ kfree(context); -+ context = NULL; -+ case 1: -+ if (retval != -ENODEV) -+ retval = -ENOMEM; -+ break; -+ case 0: -+ retval = 0; -+ } -+ -+exit: -+ mutex_unlock(&driver_lock); -+ -+ return retval; -+} -+ -+/** -+ * Callback function for USB core API: disconnect -+ */ -+static void imon_disconnect(struct usb_interface *interface) -+{ -+ struct imon_context *context; -+ int ifnum; -+ -+ /* prevent races with ir_open()/display_open() */ -+ mutex_lock(&driver_lock); -+ -+ context = usb_get_intfdata(interface); -+ ifnum = interface->cur_altsetting->desc.bInterfaceNumber; -+ -+ mutex_lock(&context->ctx_lock); -+ -+ usb_set_intfdata(interface, NULL); -+ -+ /* Abort ongoing write */ -+ if (atomic_read(&context->tx.busy)) { -+ usb_kill_urb(context->tx_urb); -+ complete_all(&context->tx.finished); -+ } -+ -+ context->dev_present = 0; -+ usb_kill_urb(context->rx_urb); -+ if (context->display) -+ usb_deregister_dev(interface, &imon_class); -+ -+ if (!context->ir_isopen && !context->dev_present) { -+ deregister_from_lirc(context); -+ mutex_unlock(&context->ctx_lock); -+ if (!context->display_isopen) -+ free_imon_context(context); -+ } else -+ mutex_unlock(&context->ctx_lock); -+ -+ mutex_unlock(&driver_lock); -+ -+ printk(KERN_INFO "%s: iMON device (intf%d) disconnected\n", -+ __func__, ifnum); -+} -+ -+static int imon_suspend(struct usb_interface *intf, pm_message_t message) -+{ -+ struct imon_context *context = usb_get_intfdata(intf); -+ -+ usb_kill_urb(context->rx_urb); -+ -+ return 0; -+} -+ -+static int imon_resume(struct usb_interface *intf) -+{ -+ int rc = 0; -+ struct imon_context *context = usb_get_intfdata(intf); -+ -+ usb_fill_int_urb(context->rx_urb, context->usbdev, -+ usb_rcvintpipe(context->usbdev, -+ context->rx_endpoint->bEndpointAddress), -+ context->usb_rx_buf, sizeof(context->usb_rx_buf), -+ usb_rx_callback, context, -+ context->rx_endpoint->bInterval); -+ -+ rc = usb_submit_urb(context->rx_urb, GFP_ATOMIC); -+ -+ return rc; -+} -+ -+static int __init imon_init(void) -+{ -+ int rc; -+ -+ printk(KERN_INFO MOD_NAME ": " MOD_DESC ", v" MOD_VERSION "\n"); -+ -+ rc = usb_register(&imon_driver); -+ if (rc) { -+ err("%s: usb register failed(%d)", __func__, rc); -+ return -ENODEV; -+ } -+ -+ return 0; -+} -+ -+static void __exit imon_exit(void) -+{ -+ usb_deregister(&imon_driver); -+ printk(KERN_INFO MOD_NAME ": module removed. Goodbye!\n"); -+} -+ -+module_init(imon_init); -+module_exit(imon_exit); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_it87.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_it87.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_it87.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_it87.c 2010-08-02 09:28:03.947926779 +0200 -@@ -0,0 +1,1021 @@ -+/* -+ * LIRC driver for ITE IT8712/IT8705 CIR port -+ * -+ * Copyright (C) 2001 Hans-Gunter Lutke Uphues -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+ * USA -+ * -+ * ITE IT8705 and IT8712(not tested) and IT8720 CIR-port support for lirc based -+ * via cut and paste from lirc_sir.c (C) 2000 Milan Pikula -+ * -+ * Attention: Sendmode only tested with debugging logs -+ * -+ * 2001/02/27 Christoph Bartelmus : -+ * reimplemented read function -+ * 2005/06/05 Andrew Calkin implemented support for Asus Digimatrix, -+ * based on work of the following member of the Outertrack Digimatrix -+ * Forum: Art103 -+ * 2009/12/24 James Edwards implemeted support -+ * for ITE8704/ITE8718, on my machine, the DSDT reports 8704, but the -+ * chip identifies as 18. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+#include "lirc_it87.h" -+ -+#ifdef LIRC_IT87_DIGIMATRIX -+static int digimatrix = 1; -+static int it87_freq = 36; /* kHz */ -+static int irq = 9; -+#else -+static int digimatrix; -+static int it87_freq = 38; /* kHz */ -+static int irq = IT87_CIR_DEFAULT_IRQ; -+#endif -+ -+static unsigned long it87_bits_in_byte_out; -+static unsigned long it87_send_counter; -+static unsigned char it87_RXEN_mask = IT87_CIR_RCR_RXEN; -+ -+#define RBUF_LEN 1024 -+#define WBUF_LEN 1024 -+ -+#define LIRC_DRIVER_NAME "lirc_it87" -+ -+/* timeout for sequences in jiffies (=5/100s) */ -+/* must be longer than TIME_CONST */ -+#define IT87_TIMEOUT (HZ*5/100) -+ -+/* module parameters */ -+static int debug; -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ -+ fmt, ## args); \ -+ } while (0) -+ -+static int io = IT87_CIR_DEFAULT_IOBASE; -+/* receiver demodulator default: off */ -+static int it87_enable_demodulator; -+ -+static int timer_enabled; -+static DEFINE_SPINLOCK(timer_lock); -+static struct timer_list timerlist; -+/* time of last signal change detected */ -+static struct timeval last_tv = {0, 0}; -+/* time of last UART data ready interrupt */ -+static struct timeval last_intr_tv = {0, 0}; -+static int last_value; -+ -+static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue); -+ -+static DEFINE_SPINLOCK(hardware_lock); -+static DEFINE_SPINLOCK(dev_lock); -+ -+static int rx_buf[RBUF_LEN]; -+unsigned int rx_tail, rx_head; -+static int tx_buf[WBUF_LEN]; -+ -+static struct pnp_driver it87_pnp_driver; -+ -+/* SECTION: Prototypes */ -+ -+/* Communication with user-space */ -+static int lirc_open(struct inode *inode, struct file *file); -+static int lirc_close(struct inode *inode, struct file *file); -+static unsigned int lirc_poll(struct file *file, poll_table *wait); -+static ssize_t lirc_read(struct file *file, char *buf, -+ size_t count, loff_t *ppos); -+static ssize_t lirc_write(struct file *file, const char *buf, -+ size_t n, loff_t *pos); -+static int lirc_ioctl(struct inode *node, struct file *filep, -+ unsigned int cmd, unsigned long arg); -+static void add_read_queue(int flag, unsigned long val); -+static int init_chrdev(void); -+static void drop_chrdev(void); -+/* Hardware */ -+static irqreturn_t it87_interrupt(int irq, void *dev_id); -+static void send_space(unsigned long len); -+static void send_pulse(unsigned long len); -+static void init_send(void); -+static void terminate_send(unsigned long len); -+static int init_hardware(void); -+static void drop_hardware(void); -+/* Initialisation */ -+static int init_port(void); -+static void drop_port(void); -+ -+ -+/* SECTION: Communication with user-space */ -+ -+static int lirc_open(struct inode *inode, struct file *file) -+{ -+ spin_lock(&dev_lock); -+ if (module_refcount(THIS_MODULE)) { -+ spin_unlock(&dev_lock); -+ return -EBUSY; -+ } -+ spin_unlock(&dev_lock); -+ return 0; -+} -+ -+ -+static int lirc_close(struct inode *inode, struct file *file) -+{ -+ return 0; -+} -+ -+ -+static unsigned int lirc_poll(struct file *file, poll_table *wait) -+{ -+ poll_wait(file, &lirc_read_queue, wait); -+ if (rx_head != rx_tail) -+ return POLLIN | POLLRDNORM; -+ return 0; -+} -+ -+ -+static ssize_t lirc_read(struct file *file, char *buf, -+ size_t count, loff_t *ppos) -+{ -+ int n = 0; -+ int retval = 0; -+ -+ while (n < count) { -+ if (file->f_flags & O_NONBLOCK && rx_head == rx_tail) { -+ retval = -EAGAIN; -+ break; -+ } -+ retval = wait_event_interruptible(lirc_read_queue, -+ rx_head != rx_tail); -+ if (retval) -+ break; -+ -+ if (copy_to_user((void *) buf + n, (void *) (rx_buf + rx_head), -+ sizeof(int))) { -+ retval = -EFAULT; -+ break; -+ } -+ rx_head = (rx_head + 1) & (RBUF_LEN - 1); -+ n += sizeof(int); -+ } -+ if (n) -+ return n; -+ return retval; -+} -+ -+ -+static ssize_t lirc_write(struct file *file, const char *buf, -+ size_t n, loff_t *pos) -+{ -+ int i = 0; -+ -+ if (n % sizeof(int) || (n / sizeof(int)) > WBUF_LEN) -+ return -EINVAL; -+ if (copy_from_user(tx_buf, buf, n)) -+ return -EFAULT; -+ n /= sizeof(int); -+ init_send(); -+ while (1) { -+ if (i >= n) -+ break; -+ if (tx_buf[i]) -+ send_pulse(tx_buf[i]); -+ i++; -+ if (i >= n) -+ break; -+ if (tx_buf[i]) -+ send_space(tx_buf[i]); -+ i++; -+ } -+ terminate_send(tx_buf[i - 1]); -+ return n; -+} -+ -+ -+static int lirc_ioctl(struct inode *node, struct file *filep, -+ unsigned int cmd, unsigned long arg) -+{ -+ int retval = 0; -+ unsigned long value = 0; -+ unsigned int ivalue; -+ unsigned long hw_flags; -+ -+ if (cmd == LIRC_GET_FEATURES) -+ value = LIRC_CAN_SEND_PULSE | -+ LIRC_CAN_SET_SEND_CARRIER | -+ LIRC_CAN_REC_MODE2; -+ else if (cmd == LIRC_GET_SEND_MODE) -+ value = LIRC_MODE_PULSE; -+ else if (cmd == LIRC_GET_REC_MODE) -+ value = LIRC_MODE_MODE2; -+ -+ switch (cmd) { -+ case LIRC_GET_FEATURES: -+ case LIRC_GET_SEND_MODE: -+ case LIRC_GET_REC_MODE: -+ retval = put_user(value, (unsigned long *) arg); -+ break; -+ -+ case LIRC_SET_SEND_MODE: -+ case LIRC_SET_REC_MODE: -+ retval = get_user(value, (unsigned long *) arg); -+ break; -+ -+ case LIRC_SET_SEND_CARRIER: -+ retval = get_user(ivalue, (unsigned int *) arg); -+ if (retval) -+ return retval; -+ ivalue /= 1000; -+ if (ivalue > IT87_CIR_FREQ_MAX || -+ ivalue < IT87_CIR_FREQ_MIN) -+ return -EINVAL; -+ -+ it87_freq = ivalue; -+ -+ spin_lock_irqsave(&hardware_lock, hw_flags); -+ outb(((inb(io + IT87_CIR_TCR2) & IT87_CIR_TCR2_TXMPW) | -+ (it87_freq - IT87_CIR_FREQ_MIN) << 3), -+ io + IT87_CIR_TCR2); -+ spin_unlock_irqrestore(&hardware_lock, hw_flags); -+ dprintk("demodulation frequency: %d kHz\n", it87_freq); -+ -+ break; -+ -+ default: -+ retval = -EINVAL; -+ } -+ -+ if (retval) -+ return retval; -+ -+ if (cmd == LIRC_SET_REC_MODE) { -+ if (value != LIRC_MODE_MODE2) -+ retval = -ENOSYS; -+ } else if (cmd == LIRC_SET_SEND_MODE) { -+ if (value != LIRC_MODE_PULSE) -+ retval = -ENOSYS; -+ } -+ return retval; -+} -+ -+static void add_read_queue(int flag, unsigned long val) -+{ -+ unsigned int new_rx_tail; -+ int newval; -+ -+ dprintk("add flag %d with val %lu\n", flag, val); -+ -+ newval = val & PULSE_MASK; -+ -+ /* -+ * statistically, pulses are ~TIME_CONST/2 too long. we could -+ * maybe make this more exact, but this is good enough -+ */ -+ if (flag) { -+ /* pulse */ -+ if (newval > TIME_CONST / 2) -+ newval -= TIME_CONST / 2; -+ else /* should not ever happen */ -+ newval = 1; -+ newval |= PULSE_BIT; -+ } else -+ newval += TIME_CONST / 2; -+ new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1); -+ if (new_rx_tail == rx_head) { -+ dprintk("Buffer overrun.\n"); -+ return; -+ } -+ rx_buf[rx_tail] = newval; -+ rx_tail = new_rx_tail; -+ wake_up_interruptible(&lirc_read_queue); -+} -+ -+ -+static struct file_operations lirc_fops = { -+ .owner = THIS_MODULE, -+ .read = lirc_read, -+ .write = lirc_write, -+ .poll = lirc_poll, -+ .ioctl = lirc_ioctl, -+ .open = lirc_open, -+ .release = lirc_close, -+}; -+ -+static int set_use_inc(void *data) -+{ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+} -+ -+static struct lirc_driver driver = { -+ .name = LIRC_DRIVER_NAME, -+ .minor = -1, -+ .code_length = 1, -+ .sample_rate = 0, -+ .data = NULL, -+ .add_to_buf = NULL, -+ .set_use_inc = set_use_inc, -+ .set_use_dec = set_use_dec, -+ .fops = &lirc_fops, -+ .dev = NULL, -+ .owner = THIS_MODULE, -+}; -+ -+ -+#ifdef MODULE -+static int init_chrdev(void) -+{ -+ driver.minor = lirc_register_driver(&driver); -+ -+ if (driver.minor < 0) { -+ printk(KERN_ERR LIRC_DRIVER_NAME ": init_chrdev() failed.\n"); -+ return -EIO; -+ } -+ return 0; -+} -+ -+ -+static void drop_chrdev(void) -+{ -+ lirc_unregister_driver(driver.minor); -+} -+#endif -+ -+ -+/* SECTION: Hardware */ -+static long delta(struct timeval *tv1, struct timeval *tv2) -+{ -+ unsigned long deltv; -+ -+ deltv = tv2->tv_sec - tv1->tv_sec; -+ if (deltv > 15) -+ deltv = 0xFFFFFF; -+ else -+ deltv = deltv*1000000 + tv2->tv_usec - tv1->tv_usec; -+ return deltv; -+} -+ -+static void it87_timeout(unsigned long data) -+{ -+ unsigned long flags; -+ -+ /* avoid interference with interrupt */ -+ spin_lock_irqsave(&timer_lock, flags); -+ -+ if (digimatrix) { -+ /* We have timed out. Disable the RX mechanism. */ -+ -+ outb((inb(io + IT87_CIR_RCR) & ~IT87_CIR_RCR_RXEN) | -+ IT87_CIR_RCR_RXACT, io + IT87_CIR_RCR); -+ if (it87_RXEN_mask) -+ outb(inb(io + IT87_CIR_RCR) | IT87_CIR_RCR_RXEN, -+ io + IT87_CIR_RCR); -+ dprintk(" TIMEOUT\n"); -+ timer_enabled = 0; -+ -+ /* fifo clear */ -+ outb(inb(io + IT87_CIR_TCR1) | IT87_CIR_TCR1_FIFOCLR, -+ io+IT87_CIR_TCR1); -+ -+ } else { -+ /* -+ * if last received signal was a pulse, but receiving stopped -+ * within the 9 bit frame, we need to finish this pulse and -+ * simulate a signal change to from pulse to space. Otherwise -+ * upper layers will receive two sequences next time. -+ */ -+ -+ if (last_value) { -+ unsigned long pulse_end; -+ -+ /* determine 'virtual' pulse end: */ -+ pulse_end = delta(&last_tv, &last_intr_tv); -+ dprintk("timeout add %d for %lu usec\n", -+ last_value, pulse_end); -+ add_read_queue(last_value, pulse_end); -+ last_value = 0; -+ last_tv = last_intr_tv; -+ } -+ } -+ spin_unlock_irqrestore(&timer_lock, flags); -+} -+ -+static irqreturn_t it87_interrupt(int irq, void *dev_id) -+{ -+ unsigned char data; -+ struct timeval curr_tv; -+ static unsigned long deltv; -+ unsigned long deltintrtv; -+ unsigned long flags, hw_flags; -+ int iir, lsr; -+ int fifo = 0; -+ static char lastbit; -+ char bit; -+ -+ /* Bit duration in microseconds */ -+ const unsigned long bit_duration = 1000000ul / -+ (115200 / IT87_CIR_BAUDRATE_DIVISOR); -+ -+ -+ iir = inb(io + IT87_CIR_IIR); -+ -+ switch (iir & IT87_CIR_IIR_IID) { -+ case 0x4: -+ case 0x6: -+ lsr = inb(io + IT87_CIR_RSR) & (IT87_CIR_RSR_RXFTO | -+ IT87_CIR_RSR_RXFBC); -+ fifo = lsr & IT87_CIR_RSR_RXFBC; -+ dprintk("iir: 0x%x fifo: 0x%x\n", iir, lsr); -+ -+ /* avoid interference with timer */ -+ spin_lock_irqsave(&timer_lock, flags); -+ spin_lock_irqsave(&hardware_lock, hw_flags); -+ if (digimatrix) { -+ static unsigned long acc_pulse; -+ static unsigned long acc_space; -+ -+ do { -+ data = inb(io + IT87_CIR_DR); -+ data = ~data; -+ fifo--; -+ if (data != 0x00) { -+ if (timer_enabled) -+ del_timer(&timerlist); -+ /* -+ * start timer for end of -+ * sequence detection -+ */ -+ timerlist.expires = jiffies + -+ IT87_TIMEOUT; -+ add_timer(&timerlist); -+ timer_enabled = 1; -+ } -+ /* Loop through */ -+ for (bit = 0; bit < 8; ++bit) { -+ if ((data >> bit) & 1) { -+ ++acc_pulse; -+ if (lastbit == 0) { -+ add_read_queue(0, -+ acc_space * -+ bit_duration); -+ acc_space = 0; -+ } -+ } else { -+ ++acc_space; -+ if (lastbit == 1) { -+ add_read_queue(1, -+ acc_pulse * -+ bit_duration); -+ acc_pulse = 0; -+ } -+ } -+ lastbit = (data >> bit) & 1; -+ } -+ -+ } while (fifo != 0); -+ } else { /* Normal Operation */ -+ do { -+ del_timer(&timerlist); -+ data = inb(io + IT87_CIR_DR); -+ -+ dprintk("data=%02x\n", data); -+ do_gettimeofday(&curr_tv); -+ deltv = delta(&last_tv, &curr_tv); -+ deltintrtv = delta(&last_intr_tv, &curr_tv); -+ -+ dprintk("t %lu , d %d\n", -+ deltintrtv, (int)data); -+ -+ /* -+ * if nothing came in last 2 cycles, -+ * it was gap -+ */ -+ if (deltintrtv > TIME_CONST * 2) { -+ if (last_value) { -+ dprintk("GAP\n"); -+ -+ /* simulate signal change */ -+ add_read_queue(last_value, -+ deltv - -+ deltintrtv); -+ last_value = 0; -+ last_tv.tv_sec = -+ last_intr_tv.tv_sec; -+ last_tv.tv_usec = -+ last_intr_tv.tv_usec; -+ deltv = deltintrtv; -+ } -+ } -+ data = 1; -+ if (data ^ last_value) { -+ /* -+ * deltintrtv > 2*TIME_CONST, -+ * remember ? the other case is -+ * timeout -+ */ -+ add_read_queue(last_value, -+ deltv-TIME_CONST); -+ last_value = data; -+ last_tv = curr_tv; -+ if (last_tv.tv_usec >= TIME_CONST) -+ last_tv.tv_usec -= TIME_CONST; -+ else { -+ last_tv.tv_sec--; -+ last_tv.tv_usec += 1000000 - -+ TIME_CONST; -+ } -+ } -+ last_intr_tv = curr_tv; -+ if (data) { -+ /* -+ * start timer for end of -+ * sequence detection -+ */ -+ timerlist.expires = -+ jiffies + IT87_TIMEOUT; -+ add_timer(&timerlist); -+ } -+ outb((inb(io + IT87_CIR_RCR) & -+ ~IT87_CIR_RCR_RXEN) | -+ IT87_CIR_RCR_RXACT, -+ io + IT87_CIR_RCR); -+ if (it87_RXEN_mask) -+ outb(inb(io + IT87_CIR_RCR) | -+ IT87_CIR_RCR_RXEN, -+ io + IT87_CIR_RCR); -+ fifo--; -+ } while (fifo != 0); -+ } -+ spin_unlock_irqrestore(&hardware_lock, hw_flags); -+ spin_unlock_irqrestore(&timer_lock, flags); -+ -+ return IRQ_RETVAL(IRQ_HANDLED); -+ -+ default: -+ /* not our irq */ -+ dprintk("unknown IRQ (shouldn't happen) !!\n"); -+ return IRQ_RETVAL(IRQ_NONE); -+ } -+} -+ -+ -+static void send_it87(unsigned long len, unsigned long stime, -+ unsigned char send_byte, unsigned int count_bits) -+{ -+ long count = len / stime; -+ long time_left = 0; -+ static unsigned char byte_out; -+ unsigned long hw_flags; -+ -+ dprintk("%s: len=%ld, sb=%d\n", __func__, len, send_byte); -+ -+ time_left = (long)len - (long)count * (long)stime; -+ count += ((2 * time_left) / stime); -+ while (count) { -+ long i = 0; -+ for (i = 0; i < count_bits; i++) { -+ byte_out = (byte_out << 1) | (send_byte & 1); -+ it87_bits_in_byte_out++; -+ } -+ if (it87_bits_in_byte_out == 8) { -+ dprintk("out=0x%x, tsr_txfbc: 0x%x\n", -+ byte_out, -+ inb(io + IT87_CIR_TSR) & -+ IT87_CIR_TSR_TXFBC); -+ -+ while ((inb(io + IT87_CIR_TSR) & -+ IT87_CIR_TSR_TXFBC) >= IT87_CIR_FIFO_SIZE) -+ ; -+ -+ spin_lock_irqsave(&hardware_lock, hw_flags); -+ outb(byte_out, io + IT87_CIR_DR); -+ spin_unlock_irqrestore(&hardware_lock, hw_flags); -+ -+ it87_bits_in_byte_out = 0; -+ it87_send_counter++; -+ byte_out = 0; -+ } -+ count--; -+ } -+} -+ -+ -+/*TODO: maybe exchange space and pulse because it8705 only modulates 0-bits */ -+ -+static void send_space(unsigned long len) -+{ -+ send_it87(len, TIME_CONST, IT87_CIR_SPACE, IT87_CIR_BAUDRATE_DIVISOR); -+} -+ -+static void send_pulse(unsigned long len) -+{ -+ send_it87(len, TIME_CONST, IT87_CIR_PULSE, IT87_CIR_BAUDRATE_DIVISOR); -+} -+ -+ -+static void init_send() -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&hardware_lock, flags); -+ /* RXEN=0: receiver disable */ -+ it87_RXEN_mask = 0; -+ outb(inb(io + IT87_CIR_RCR) & ~IT87_CIR_RCR_RXEN, -+ io + IT87_CIR_RCR); -+ spin_unlock_irqrestore(&hardware_lock, flags); -+ it87_bits_in_byte_out = 0; -+ it87_send_counter = 0; -+} -+ -+ -+static void terminate_send(unsigned long len) -+{ -+ unsigned long flags; -+ unsigned long last = 0; -+ -+ last = it87_send_counter; -+ /* make sure all necessary data has been sent */ -+ while (last == it87_send_counter) -+ send_space(len); -+ /* wait until all data sent */ -+ while ((inb(io + IT87_CIR_TSR) & IT87_CIR_TSR_TXFBC) != 0) -+ ; -+ /* then re-enable receiver */ -+ spin_lock_irqsave(&hardware_lock, flags); -+ it87_RXEN_mask = IT87_CIR_RCR_RXEN; -+ outb(inb(io + IT87_CIR_RCR) | IT87_CIR_RCR_RXEN, -+ io + IT87_CIR_RCR); -+ spin_unlock_irqrestore(&hardware_lock, flags); -+} -+ -+ -+static int init_hardware(void) -+{ -+ unsigned long flags; -+ unsigned char it87_rcr = 0; -+ -+ spin_lock_irqsave(&hardware_lock, flags); -+ /* init cir-port */ -+ /* enable r/w-access to Baudrate-Register */ -+ outb(IT87_CIR_IER_BR, io + IT87_CIR_IER); -+ outb(IT87_CIR_BAUDRATE_DIVISOR % 0x100, io+IT87_CIR_BDLR); -+ outb(IT87_CIR_BAUDRATE_DIVISOR / 0x100, io+IT87_CIR_BDHR); -+ /* Baudrate Register off, define IRQs: Input only */ -+ if (digimatrix) { -+ outb(IT87_CIR_IER_IEC | IT87_CIR_IER_RFOIE, io + IT87_CIR_IER); -+ /* RX: HCFS=0, RXDCR = 001b (33,75..38,25 kHz), RXEN=1 */ -+ } else { -+ outb(IT87_CIR_IER_IEC | IT87_CIR_IER_RDAIE, io + IT87_CIR_IER); -+ /* RX: HCFS=0, RXDCR = 001b (35,6..40,3 kHz), RXEN=1 */ -+ } -+ it87_rcr = (IT87_CIR_RCR_RXEN & it87_RXEN_mask) | 0x1; -+ if (it87_enable_demodulator) -+ it87_rcr |= IT87_CIR_RCR_RXEND; -+ outb(it87_rcr, io + IT87_CIR_RCR); -+ if (digimatrix) { -+ /* Set FIFO depth to 1 byte, and disable TX */ -+ outb(inb(io + IT87_CIR_TCR1) | 0x00, -+ io + IT87_CIR_TCR1); -+ -+ /* -+ * TX: it87_freq (36kHz), 'reserved' sensitivity -+ * setting (0x00) -+ */ -+ outb(((it87_freq - IT87_CIR_FREQ_MIN) << 3) | 0x00, -+ io + IT87_CIR_TCR2); -+ } else { -+ /* TX: 38kHz, 13,3us (pulse-width) */ -+ outb(((it87_freq - IT87_CIR_FREQ_MIN) << 3) | 0x06, -+ io + IT87_CIR_TCR2); -+ } -+ spin_unlock_irqrestore(&hardware_lock, flags); -+ return 0; -+} -+ -+ -+static void drop_hardware(void) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&hardware_lock, flags); -+ disable_irq(irq); -+ /* receiver disable */ -+ it87_RXEN_mask = 0; -+ outb(0x1, io + IT87_CIR_RCR); -+ /* turn off irqs */ -+ outb(0, io + IT87_CIR_IER); -+ /* fifo clear */ -+ outb(IT87_CIR_TCR1_FIFOCLR, io+IT87_CIR_TCR1); -+ /* reset */ -+ outb(IT87_CIR_IER_RESET, io+IT87_CIR_IER); -+ enable_irq(irq); -+ spin_unlock_irqrestore(&hardware_lock, flags); -+} -+ -+ -+static unsigned char it87_read(unsigned char port) -+{ -+ outb(port, IT87_ADRPORT); -+ return inb(IT87_DATAPORT); -+} -+ -+ -+static void it87_write(unsigned char port, unsigned char data) -+{ -+ outb(port, IT87_ADRPORT); -+ outb(data, IT87_DATAPORT); -+} -+ -+ -+/* SECTION: Initialisation */ -+ -+static int init_port(void) -+{ -+ unsigned long hw_flags; -+ int retval = 0; -+ -+ unsigned char init_bytes[4] = IT87_INIT; -+ unsigned char it87_chipid = 0; -+ unsigned char ldn = 0; -+ unsigned int it87_io = 0; -+ unsigned int it87_irq = 0; -+ -+ /* Enter MB PnP Mode */ -+ outb(init_bytes[0], IT87_ADRPORT); -+ outb(init_bytes[1], IT87_ADRPORT); -+ outb(init_bytes[2], IT87_ADRPORT); -+ outb(init_bytes[3], IT87_ADRPORT); -+ -+ /* 8712 or 8705 ? */ -+ it87_chipid = it87_read(IT87_CHIP_ID1); -+ if (it87_chipid != 0x87) { -+ retval = -ENXIO; -+ return retval; -+ } -+ it87_chipid = it87_read(IT87_CHIP_ID2); -+ if ((it87_chipid != 0x05) && -+ (it87_chipid != 0x12) && -+ (it87_chipid != 0x18) && -+ (it87_chipid != 0x20)) { -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": no IT8704/05/12/18/20 found (claimed IT87%02x), " -+ "exiting..\n", it87_chipid); -+ retval = -ENXIO; -+ return retval; -+ } -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": found IT87%02x.\n", -+ it87_chipid); -+ -+ /* get I/O-Port and IRQ */ -+ if (it87_chipid == 0x12 || it87_chipid == 0x18) -+ ldn = IT8712_CIR_LDN; -+ else -+ ldn = IT8705_CIR_LDN; -+ it87_write(IT87_LDN, ldn); -+ -+ it87_io = it87_read(IT87_CIR_BASE_MSB) * 256 + -+ it87_read(IT87_CIR_BASE_LSB); -+ if (it87_io == 0) { -+ if (io == 0) -+ io = IT87_CIR_DEFAULT_IOBASE; -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": set default io 0x%x\n", -+ io); -+ it87_write(IT87_CIR_BASE_MSB, io / 0x100); -+ it87_write(IT87_CIR_BASE_LSB, io % 0x100); -+ } else -+ io = it87_io; -+ -+ it87_irq = it87_read(IT87_CIR_IRQ); -+ if (digimatrix || it87_irq == 0) { -+ if (irq == 0) -+ irq = IT87_CIR_DEFAULT_IRQ; -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": set default irq 0x%x\n", -+ irq); -+ it87_write(IT87_CIR_IRQ, irq); -+ } else -+ irq = it87_irq; -+ -+ spin_lock_irqsave(&hardware_lock, hw_flags); -+ /* reset */ -+ outb(IT87_CIR_IER_RESET, io+IT87_CIR_IER); -+ /* fifo clear */ -+ outb(IT87_CIR_TCR1_FIFOCLR | -+ /* IT87_CIR_TCR1_ILE | */ -+ IT87_CIR_TCR1_TXRLE | -+ IT87_CIR_TCR1_TXENDF, io+IT87_CIR_TCR1); -+ spin_unlock_irqrestore(&hardware_lock, hw_flags); -+ -+ /* get I/O port access and IRQ line */ -+ if (request_region(io, 8, LIRC_DRIVER_NAME) == NULL) { -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": i/o port 0x%.4x already in use.\n", io); -+ /* Leaving MB PnP Mode */ -+ it87_write(IT87_CFGCTRL, 0x2); -+ return -EBUSY; -+ } -+ -+ /* activate CIR-Device */ -+ it87_write(IT87_CIR_ACT, 0x1); -+ -+ /* Leaving MB PnP Mode */ -+ it87_write(IT87_CFGCTRL, 0x2); -+ -+ retval = request_irq(irq, it87_interrupt, 0 /*IRQF_DISABLED*/, -+ LIRC_DRIVER_NAME, NULL); -+ if (retval < 0) { -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": IRQ %d already in use.\n", -+ irq); -+ release_region(io, 8); -+ return retval; -+ } -+ -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": I/O port 0x%.4x, IRQ %d.\n", io, irq); -+ -+ init_timer(&timerlist); -+ timerlist.function = it87_timeout; -+ timerlist.data = 0xabadcafe; -+ -+ return 0; -+} -+ -+ -+static void drop_port(void) -+{ -+#if 0 -+ unsigned char init_bytes[4] = IT87_INIT; -+ -+ /* Enter MB PnP Mode */ -+ outb(init_bytes[0], IT87_ADRPORT); -+ outb(init_bytes[1], IT87_ADRPORT); -+ outb(init_bytes[2], IT87_ADRPORT); -+ outb(init_bytes[3], IT87_ADRPORT); -+ -+ /* deactivate CIR-Device */ -+ it87_write(IT87_CIR_ACT, 0x0); -+ -+ /* Leaving MB PnP Mode */ -+ it87_write(IT87_CFGCTRL, 0x2); -+#endif -+ -+ del_timer_sync(&timerlist); -+ free_irq(irq, NULL); -+ release_region(io, 8); -+} -+ -+ -+static int init_lirc_it87(void) -+{ -+ int retval; -+ -+ init_waitqueue_head(&lirc_read_queue); -+ retval = init_port(); -+ if (retval < 0) -+ return retval; -+ init_hardware(); -+ printk(KERN_INFO LIRC_DRIVER_NAME ": Installed.\n"); -+ return 0; -+} -+ -+static int it87_probe(struct pnp_dev *pnp_dev, -+ const struct pnp_device_id *dev_id) -+{ -+ int retval; -+ -+ driver.dev = &pnp_dev->dev; -+ -+ retval = init_chrdev(); -+ if (retval < 0) -+ return retval; -+ -+ retval = init_lirc_it87(); -+ if (retval) -+ goto init_lirc_it87_failed; -+ -+ return 0; -+ -+init_lirc_it87_failed: -+ drop_chrdev(); -+ -+ return retval; -+} -+ -+static int __init lirc_it87_init(void) -+{ -+ return pnp_register_driver(&it87_pnp_driver); -+} -+ -+ -+static void __exit lirc_it87_exit(void) -+{ -+ drop_hardware(); -+ drop_chrdev(); -+ drop_port(); -+ pnp_unregister_driver(&it87_pnp_driver); -+ printk(KERN_INFO LIRC_DRIVER_NAME ": Uninstalled.\n"); -+} -+ -+/* SECTION: PNP for ITE8704/18 */ -+ -+static const struct pnp_device_id pnp_dev_table[] = { -+ {"ITE8704", 0}, -+ {} -+}; -+ -+MODULE_DEVICE_TABLE(pnp, pnp_dev_table); -+ -+static struct pnp_driver it87_pnp_driver = { -+ .name = LIRC_DRIVER_NAME, -+ .id_table = pnp_dev_table, -+ .probe = it87_probe, -+}; -+ -+module_init(lirc_it87_init); -+module_exit(lirc_it87_exit); -+ -+MODULE_DESCRIPTION("LIRC driver for ITE IT8704/05/12/18/20 CIR port"); -+MODULE_AUTHOR("Hans-Gunter Lutke Uphues"); -+MODULE_LICENSE("GPL"); -+ -+module_param(io, int, S_IRUGO); -+MODULE_PARM_DESC(io, "I/O base address (default: 0x310)"); -+ -+module_param(irq, int, S_IRUGO); -+#ifdef LIRC_IT87_DIGIMATRIX -+MODULE_PARM_DESC(irq, "Interrupt (1,3-12) (default: 9)"); -+#else -+MODULE_PARM_DESC(irq, "Interrupt (1,3-12) (default: 7)"); -+#endif -+ -+module_param(it87_enable_demodulator, bool, S_IRUGO); -+MODULE_PARM_DESC(it87_enable_demodulator, -+ "Receiver demodulator enable/disable (1/0), default: 0"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -+ -+module_param(digimatrix, bool, S_IRUGO | S_IWUSR); -+#ifdef LIRC_IT87_DIGIMATRIX -+MODULE_PARM_DESC(digimatrix, -+ "Asus Digimatrix it87 compat. enable/disable (1/0), default: 1"); -+#else -+MODULE_PARM_DESC(digimatrix, -+ "Asus Digimatrix it87 compat. enable/disable (1/0), default: 0"); -+#endif -+ -+ -+module_param(it87_freq, int, S_IRUGO); -+#ifdef LIRC_IT87_DIGIMATRIX -+MODULE_PARM_DESC(it87_freq, -+ "Carrier demodulator frequency (kHz), (default: 36)"); -+#else -+MODULE_PARM_DESC(it87_freq, -+ "Carrier demodulator frequency (kHz), (default: 38)"); -+#endif -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_it87.h linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_it87.h ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_it87.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_it87.h 2010-08-02 09:28:03.948926690 +0200 -@@ -0,0 +1,116 @@ -+/* lirc_it87.h */ -+/* SECTION: Definitions */ -+ -+/********************************* ITE IT87xx ************************/ -+ -+/* based on the following documentation from ITE: -+ a) IT8712F Preliminary CIR Programming Guide V0.1 -+ b) IT8705F Simple LPC I/O Preliminary Specification V0.3 -+ c) IT8712F EC-LPC I/O Preliminary Specification V0.5 -+*/ -+ -+/* IT8712/05 Ports: */ -+#define IT87_ADRPORT 0x2e -+#define IT87_DATAPORT 0x2f -+#define IT87_INIT {0x87, 0x01, 0x55, 0x55} -+ -+/* alternate Ports: */ -+/* -+#define IT87_ADRPORT 0x4e -+#define IT87_DATAPORT 0x4f -+#define IT87_INIT {0x87, 0x01, 0x55, 0xaa} -+ */ -+ -+/* IT8712/05 Registers */ -+#define IT87_CFGCTRL 0x2 -+#define IT87_LDN 0x7 -+#define IT87_CHIP_ID1 0x20 -+#define IT87_CHIP_ID2 0x21 -+#define IT87_CFG_VERSION 0x22 -+#define IT87_SWSUSPEND 0x23 -+ -+#define IT8712_CIR_LDN 0xa -+#define IT8705_CIR_LDN 0x7 -+ -+/* CIR Configuration Registers: */ -+#define IT87_CIR_ACT 0x30 -+#define IT87_CIR_BASE_MSB 0x60 -+#define IT87_CIR_BASE_LSB 0x61 -+#define IT87_CIR_IRQ 0x70 -+#define IT87_CIR_CONFIG 0xf0 -+ -+/* List of IT87_CIR registers: offset to BaseAddr */ -+#define IT87_CIR_DR 0 -+#define IT87_CIR_IER 1 -+#define IT87_CIR_RCR 2 -+#define IT87_CIR_TCR1 3 -+#define IT87_CIR_TCR2 4 -+#define IT87_CIR_TSR 5 -+#define IT87_CIR_RSR 6 -+#define IT87_CIR_BDLR 5 -+#define IT87_CIR_BDHR 6 -+#define IT87_CIR_IIR 7 -+ -+/* Bit Definition */ -+/* IER: */ -+#define IT87_CIR_IER_TM_EN 0x80 -+#define IT87_CIR_IER_RESEVED 0x40 -+#define IT87_CIR_IER_RESET 0x20 -+#define IT87_CIR_IER_BR 0x10 -+#define IT87_CIR_IER_IEC 0x8 -+#define IT87_CIR_IER_RFOIE 0x4 -+#define IT87_CIR_IER_RDAIE 0x2 -+#define IT87_CIR_IER_TLDLIE 0x1 -+ -+/* RCR: */ -+#define IT87_CIR_RCR_RDWOS 0x80 -+#define IT87_CIR_RCR_HCFS 0x40 -+#define IT87_CIR_RCR_RXEN 0x20 -+#define IT87_CIR_RCR_RXEND 0x10 -+#define IT87_CIR_RCR_RXACT 0x8 -+#define IT87_CIR_RCR_RXDCR 0x7 -+ -+/* TCR1: */ -+#define IT87_CIR_TCR1_FIFOCLR 0x80 -+#define IT87_CIR_TCR1_ILE 0x40 -+#define IT87_CIR_TCR1_FIFOTL 0x30 -+#define IT87_CIR_TCR1_TXRLE 0x8 -+#define IT87_CIR_TCR1_TXENDF 0x4 -+#define IT87_CIR_TCR1_TXMPM 0x3 -+ -+/* TCR2: */ -+#define IT87_CIR_TCR2_CFQ 0xf8 -+#define IT87_CIR_TCR2_TXMPW 0x7 -+ -+/* TSR: */ -+#define IT87_CIR_TSR_RESERVED 0xc0 -+#define IT87_CIR_TSR_TXFBC 0x3f -+ -+/* RSR: */ -+#define IT87_CIR_RSR_RXFTO 0x80 -+#define IT87_CIR_RSR_RESERVED 0x40 -+#define IT87_CIR_RSR_RXFBC 0x3f -+ -+/* IIR: */ -+#define IT87_CIR_IIR_RESERVED 0xf8 -+#define IT87_CIR_IIR_IID 0x6 -+#define IT87_CIR_IIR_IIP 0x1 -+ -+/* TM: */ -+#define IT87_CIR_TM_IL_SEL 0x80 -+#define IT87_CIR_TM_RESERVED 0x40 -+#define IT87_CIR_TM_TM_REG 0x3f -+ -+#define IT87_CIR_FIFO_SIZE 32 -+ -+/* Baudratedivisor for IT87: power of 2: only 1,2,4 or 8) */ -+#define IT87_CIR_BAUDRATE_DIVISOR 0x1 -+#define IT87_CIR_DEFAULT_IOBASE 0x310 -+#define IT87_CIR_DEFAULT_IRQ 0x7 -+#define IT87_CIR_SPACE 0x00 -+#define IT87_CIR_PULSE 0xff -+#define IT87_CIR_FREQ_MIN 27 -+#define IT87_CIR_FREQ_MAX 58 -+#define TIME_CONST (IT87_CIR_BAUDRATE_DIVISOR * 8000000ul / 115200ul) -+ -+/********************************* ITE IT87xx ************************/ -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_ite8709.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ite8709.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_ite8709.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ite8709.c 2010-08-02 09:28:03.950926583 +0200 -@@ -0,0 +1,540 @@ -+/* -+ * LIRC driver for ITE8709 CIR port -+ * -+ * Copyright (C) 2008 Grégory Lardière -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+ * USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+#define LIRC_DRIVER_NAME "lirc_ite8709" -+ -+#define BUF_CHUNK_SIZE sizeof(int) -+#define BUF_SIZE (128*BUF_CHUNK_SIZE) -+ -+/* -+ * The ITE8709 device seems to be the combination of IT8512 superIO chip and -+ * a specific firmware running on the IT8512's embedded micro-controller. -+ * In addition of the embedded micro-controller, the IT8512 chip contains a -+ * CIR module and several other modules. A few modules are directly accessible -+ * by the host CPU, but most of them are only accessible by the -+ * micro-controller. The CIR module is only accessible by the micro-controller. -+ * The battery-backed SRAM module is accessible by the host CPU and the -+ * micro-controller. So one of the MC's firmware role is to act as a bridge -+ * between the host CPU and the CIR module. The firmware implements a kind of -+ * communication protocol using the SRAM module as a shared memory. The IT8512 -+ * specification is publicly available on ITE's web site, but the communication -+ * protocol is not, so it was reverse-engineered. -+ */ -+ -+/* ITE8709 Registers addresses and values (reverse-engineered) */ -+#define ITE8709_MODE 0x1a -+#define ITE8709_REG_ADR 0x1b -+#define ITE8709_REG_VAL 0x1c -+#define ITE8709_IIR 0x1e /* Interrupt identification register */ -+#define ITE8709_RFSR 0x1f /* Receiver FIFO status register */ -+#define ITE8709_FIFO_START 0x20 -+ -+#define ITE8709_MODE_READY 0X00 -+#define ITE8709_MODE_WRITE 0X01 -+#define ITE8709_MODE_READ 0X02 -+#define ITE8709_IIR_RDAI 0x02 /* Receiver data available interrupt */ -+#define ITE8709_IIR_RFOI 0x04 /* Receiver FIFO overrun interrupt */ -+#define ITE8709_RFSR_MASK 0x3f /* FIFO byte count mask */ -+ -+/* -+ * IT8512 CIR-module registers addresses and values -+ * (from IT8512 E/F specification v0.4.1) -+ */ -+#define IT8512_REG_MSTCR 0x01 /* Master control register */ -+#define IT8512_REG_IER 0x02 /* Interrupt enable register */ -+#define IT8512_REG_CFR 0x04 /* Carrier frequency register */ -+#define IT8512_REG_RCR 0x05 /* Receive control register */ -+#define IT8512_REG_BDLR 0x08 /* Baud rate divisor low byte register */ -+#define IT8512_REG_BDHR 0x09 /* Baud rate divisor high byte register */ -+ -+#define IT8512_MSTCR_RESET 0x01 /* Reset registers to default value */ -+#define IT8512_MSTCR_FIFOCLR 0x02 /* Clear FIFO */ -+#define IT8512_MSTCR_FIFOTL_7 0x04 /* FIFO threshold level : 7 */ -+#define IT8512_MSTCR_FIFOTL_25 0x0c /* FIFO threshold level : 25 */ -+#define IT8512_IER_RDAIE 0x02 /* Enable data interrupt request */ -+#define IT8512_IER_RFOIE 0x04 /* Enable FIFO overrun interrupt req */ -+#define IT8512_IER_IEC 0x80 /* Enable interrupt request */ -+#define IT8512_CFR_CF_36KHZ 0x09 /* Carrier freq : low speed, 36kHz */ -+#define IT8512_RCR_RXDCR_1 0x01 /* Demodulation carrier range : 1 */ -+#define IT8512_RCR_RXACT 0x08 /* Receiver active */ -+#define IT8512_RCR_RXEN 0x80 /* Receiver enable */ -+#define IT8512_BDR_6 6 /* Baud rate divisor : 6 */ -+ -+/* Actual values used by this driver */ -+#define CFG_FIFOTL IT8512_MSTCR_FIFOTL_25 -+#define CFG_CR_FREQ IT8512_CFR_CF_36KHZ -+#define CFG_DCR IT8512_RCR_RXDCR_1 -+#define CFG_BDR IT8512_BDR_6 -+#define CFG_TIMEOUT 100000 /* Rearm interrupt when a space is > 100 ms */ -+ -+static int debug; -+ -+struct ite8709_device { -+ int use_count; -+ int io; -+ int irq; -+ spinlock_t hardware_lock; -+ unsigned long long acc_pulse; -+ unsigned long long acc_space; -+ char lastbit; -+ struct timeval last_tv; -+ struct lirc_driver driver; -+ struct tasklet_struct tasklet; -+ char force_rearm; -+ char rearmed; -+ char device_busy; -+}; -+ -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ -+ fmt, ## args); \ -+ } while (0) -+ -+ -+static unsigned char ite8709_read(struct ite8709_device *dev, -+ unsigned char port) -+{ -+ outb(port, dev->io); -+ return inb(dev->io+1); -+} -+ -+static void ite8709_write(struct ite8709_device *dev, unsigned char port, -+ unsigned char data) -+{ -+ outb(port, dev->io); -+ outb(data, dev->io+1); -+} -+ -+static void ite8709_wait_device(struct ite8709_device *dev) -+{ -+ int i = 0; -+ /* -+ * loop until device tells it's ready to continue -+ * iterations count is usually ~750 but can sometimes achieve 13000 -+ */ -+ for (i = 0; i < 15000; i++) { -+ udelay(2); -+ if (ite8709_read(dev, ITE8709_MODE) == ITE8709_MODE_READY) -+ break; -+ } -+} -+ -+static void ite8709_write_register(struct ite8709_device *dev, -+ unsigned char reg_adr, unsigned char reg_value) -+{ -+ ite8709_wait_device(dev); -+ -+ ite8709_write(dev, ITE8709_REG_VAL, reg_value); -+ ite8709_write(dev, ITE8709_REG_ADR, reg_adr); -+ ite8709_write(dev, ITE8709_MODE, ITE8709_MODE_WRITE); -+} -+ -+static void ite8709_init_hardware(struct ite8709_device *dev) -+{ -+ spin_lock_irq(&dev->hardware_lock); -+ dev->device_busy = 1; -+ spin_unlock_irq(&dev->hardware_lock); -+ -+ ite8709_write_register(dev, IT8512_REG_BDHR, (CFG_BDR >> 8) & 0xff); -+ ite8709_write_register(dev, IT8512_REG_BDLR, CFG_BDR & 0xff); -+ ite8709_write_register(dev, IT8512_REG_CFR, CFG_CR_FREQ); -+ ite8709_write_register(dev, IT8512_REG_IER, -+ IT8512_IER_IEC | IT8512_IER_RFOIE | IT8512_IER_RDAIE); -+ ite8709_write_register(dev, IT8512_REG_RCR, CFG_DCR); -+ ite8709_write_register(dev, IT8512_REG_MSTCR, -+ CFG_FIFOTL | IT8512_MSTCR_FIFOCLR); -+ ite8709_write_register(dev, IT8512_REG_RCR, -+ IT8512_RCR_RXEN | IT8512_RCR_RXACT | CFG_DCR); -+ -+ spin_lock_irq(&dev->hardware_lock); -+ dev->device_busy = 0; -+ spin_unlock_irq(&dev->hardware_lock); -+ -+ tasklet_enable(&dev->tasklet); -+} -+ -+static void ite8709_drop_hardware(struct ite8709_device *dev) -+{ -+ tasklet_disable(&dev->tasklet); -+ -+ spin_lock_irq(&dev->hardware_lock); -+ dev->device_busy = 1; -+ spin_unlock_irq(&dev->hardware_lock); -+ -+ ite8709_write_register(dev, IT8512_REG_RCR, 0); -+ ite8709_write_register(dev, IT8512_REG_MSTCR, -+ IT8512_MSTCR_RESET | IT8512_MSTCR_FIFOCLR); -+ -+ spin_lock_irq(&dev->hardware_lock); -+ dev->device_busy = 0; -+ spin_unlock_irq(&dev->hardware_lock); -+} -+ -+static int ite8709_set_use_inc(void *data) -+{ -+ struct ite8709_device *dev; -+ dev = data; -+ if (dev->use_count == 0) -+ ite8709_init_hardware(dev); -+ dev->use_count++; -+ return 0; -+} -+ -+static void ite8709_set_use_dec(void *data) -+{ -+ struct ite8709_device *dev; -+ dev = data; -+ dev->use_count--; -+ if (dev->use_count == 0) -+ ite8709_drop_hardware(dev); -+} -+ -+static void ite8709_add_read_queue(struct ite8709_device *dev, int flag, -+ unsigned long long val) -+{ -+ int value; -+ -+ dprintk("add a %llu usec %s\n", val, flag ? "pulse" : "space"); -+ -+ value = (val > PULSE_MASK) ? PULSE_MASK : val; -+ if (flag) -+ value |= PULSE_BIT; -+ -+ if (!lirc_buffer_full(dev->driver.rbuf)) { -+ lirc_buffer_write(dev->driver.rbuf, (void *) &value); -+ wake_up(&dev->driver.rbuf->wait_poll); -+ } -+} -+ -+static irqreturn_t ite8709_interrupt(int irq, void *dev_id) -+{ -+ unsigned char data; -+ int iir, rfsr, i; -+ int fifo = 0; -+ char bit; -+ struct timeval curr_tv; -+ -+ /* Bit duration in microseconds */ -+ const unsigned long bit_duration = 1000000ul / (115200 / CFG_BDR); -+ -+ struct ite8709_device *dev; -+ dev = dev_id; -+ -+ /* -+ * If device is busy, we simply discard data because we are in one of -+ * these two cases : shutting down or rearming the device, so this -+ * doesn't really matter and this avoids waiting too long in IRQ ctx -+ */ -+ spin_lock(&dev->hardware_lock); -+ if (dev->device_busy) { -+ spin_unlock(&dev->hardware_lock); -+ return IRQ_RETVAL(IRQ_HANDLED); -+ } -+ -+ iir = ite8709_read(dev, ITE8709_IIR); -+ -+ switch (iir) { -+ case ITE8709_IIR_RFOI: -+ dprintk("fifo overrun, scheduling forced rearm just in case\n"); -+ dev->force_rearm = 1; -+ tasklet_schedule(&dev->tasklet); -+ spin_unlock(&dev->hardware_lock); -+ return IRQ_RETVAL(IRQ_HANDLED); -+ -+ case ITE8709_IIR_RDAI: -+ rfsr = ite8709_read(dev, ITE8709_RFSR); -+ fifo = rfsr & ITE8709_RFSR_MASK; -+ if (fifo > 32) -+ fifo = 32; -+ dprintk("iir: 0x%x rfsr: 0x%x fifo: %d\n", iir, rfsr, fifo); -+ -+ if (dev->rearmed) { -+ do_gettimeofday(&curr_tv); -+ dev->acc_space += 1000000ull -+ * (curr_tv.tv_sec - dev->last_tv.tv_sec) -+ + (curr_tv.tv_usec - dev->last_tv.tv_usec); -+ dev->rearmed = 0; -+ } -+ for (i = 0; i < fifo; i++) { -+ data = ite8709_read(dev, i+ITE8709_FIFO_START); -+ data = ~data; -+ /* Loop through */ -+ for (bit = 0; bit < 8; ++bit) { -+ if ((data >> bit) & 1) { -+ dev->acc_pulse += bit_duration; -+ if (dev->lastbit == 0) { -+ ite8709_add_read_queue(dev, 0, -+ dev->acc_space); -+ dev->acc_space = 0; -+ } -+ } else { -+ dev->acc_space += bit_duration; -+ if (dev->lastbit == 1) { -+ ite8709_add_read_queue(dev, 1, -+ dev->acc_pulse); -+ dev->acc_pulse = 0; -+ } -+ } -+ dev->lastbit = (data >> bit) & 1; -+ } -+ } -+ ite8709_write(dev, ITE8709_RFSR, 0); -+ -+ if (dev->acc_space > CFG_TIMEOUT) { -+ dprintk("scheduling rearm IRQ\n"); -+ do_gettimeofday(&dev->last_tv); -+ dev->force_rearm = 0; -+ tasklet_schedule(&dev->tasklet); -+ } -+ -+ spin_unlock(&dev->hardware_lock); -+ return IRQ_RETVAL(IRQ_HANDLED); -+ -+ default: -+ /* not our irq */ -+ dprintk("unknown IRQ (shouldn't happen) !!\n"); -+ spin_unlock(&dev->hardware_lock); -+ return IRQ_RETVAL(IRQ_NONE); -+ } -+} -+ -+static void ite8709_rearm_irq(unsigned long data) -+{ -+ struct ite8709_device *dev; -+ unsigned long flags; -+ dev = (struct ite8709_device *) data; -+ -+ spin_lock_irqsave(&dev->hardware_lock, flags); -+ dev->device_busy = 1; -+ spin_unlock_irqrestore(&dev->hardware_lock, flags); -+ -+ if (dev->force_rearm || dev->acc_space > CFG_TIMEOUT) { -+ dprintk("rearming IRQ\n"); -+ ite8709_write_register(dev, IT8512_REG_RCR, -+ IT8512_RCR_RXACT | CFG_DCR); -+ ite8709_write_register(dev, IT8512_REG_MSTCR, -+ CFG_FIFOTL | IT8512_MSTCR_FIFOCLR); -+ ite8709_write_register(dev, IT8512_REG_RCR, -+ IT8512_RCR_RXEN | IT8512_RCR_RXACT | CFG_DCR); -+ if (!dev->force_rearm) -+ dev->rearmed = 1; -+ dev->force_rearm = 0; -+ } -+ -+ spin_lock_irqsave(&dev->hardware_lock, flags); -+ dev->device_busy = 0; -+ spin_unlock_irqrestore(&dev->hardware_lock, flags); -+} -+ -+static int ite8709_cleanup(struct ite8709_device *dev, int stage, int errno, -+ char *msg) -+{ -+ if (msg != NULL) -+ printk(KERN_ERR LIRC_DRIVER_NAME ": %s\n", msg); -+ -+ switch (stage) { -+ case 6: -+ if (dev->use_count > 0) -+ ite8709_drop_hardware(dev); -+ case 5: -+ free_irq(dev->irq, dev); -+ case 4: -+ release_region(dev->io, 2); -+ case 3: -+ lirc_unregister_driver(dev->driver.minor); -+ case 2: -+ lirc_buffer_free(dev->driver.rbuf); -+ kfree(dev->driver.rbuf); -+ case 1: -+ kfree(dev); -+ case 0: -+ ; -+ } -+ -+ return errno; -+} -+ -+static int __devinit ite8709_pnp_probe(struct pnp_dev *dev, -+ const struct pnp_device_id *dev_id) -+{ -+ struct lirc_driver *driver; -+ struct ite8709_device *ite8709_dev; -+ int ret; -+ -+ /* Check resources validity */ -+ if (!pnp_irq_valid(dev, 0)) -+ return ite8709_cleanup(NULL, 0, -ENODEV, "invalid IRQ"); -+ if (!pnp_port_valid(dev, 2)) -+ return ite8709_cleanup(NULL, 0, -ENODEV, "invalid IO port"); -+ -+ /* Allocate memory for device struct */ -+ ite8709_dev = kzalloc(sizeof(struct ite8709_device), GFP_KERNEL); -+ if (ite8709_dev == NULL) -+ return ite8709_cleanup(NULL, 0, -ENOMEM, "kzalloc failed"); -+ pnp_set_drvdata(dev, ite8709_dev); -+ -+ /* Initialize device struct */ -+ ite8709_dev->use_count = 0; -+ ite8709_dev->irq = pnp_irq(dev, 0); -+ ite8709_dev->io = pnp_port_start(dev, 2); -+ ite8709_dev->hardware_lock = -+ __SPIN_LOCK_UNLOCKED(ite8709_dev->hardware_lock); -+ ite8709_dev->acc_pulse = 0; -+ ite8709_dev->acc_space = 0; -+ ite8709_dev->lastbit = 0; -+ do_gettimeofday(&ite8709_dev->last_tv); -+ tasklet_init(&ite8709_dev->tasklet, ite8709_rearm_irq, -+ (long) ite8709_dev); -+ ite8709_dev->force_rearm = 0; -+ ite8709_dev->rearmed = 0; -+ ite8709_dev->device_busy = 0; -+ -+ /* Initialize driver struct */ -+ driver = &ite8709_dev->driver; -+ strcpy(driver->name, LIRC_DRIVER_NAME); -+ driver->minor = -1; -+ driver->code_length = sizeof(int) * 8; -+ driver->sample_rate = 0; -+ driver->features = LIRC_CAN_REC_MODE2; -+ driver->data = ite8709_dev; -+ driver->add_to_buf = NULL; -+ driver->set_use_inc = ite8709_set_use_inc; -+ driver->set_use_dec = ite8709_set_use_dec; -+ driver->dev = &dev->dev; -+ driver->owner = THIS_MODULE; -+ -+ /* Initialize LIRC buffer */ -+ driver->rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!driver->rbuf) -+ return ite8709_cleanup(ite8709_dev, 1, -ENOMEM, -+ "can't allocate lirc_buffer"); -+ if (lirc_buffer_init(driver->rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) -+ return ite8709_cleanup(ite8709_dev, 1, -ENOMEM, -+ "lirc_buffer_init() failed"); -+ -+ /* Register LIRC driver */ -+ ret = lirc_register_driver(driver); -+ if (ret < 0) -+ return ite8709_cleanup(ite8709_dev, 2, ret, -+ "lirc_register_driver() failed"); -+ -+ /* Reserve I/O port access */ -+ if (!request_region(ite8709_dev->io, 2, LIRC_DRIVER_NAME)) -+ return ite8709_cleanup(ite8709_dev, 3, -EBUSY, -+ "i/o port already in use"); -+ -+ /* Reserve IRQ line */ -+ ret = request_irq(ite8709_dev->irq, ite8709_interrupt, 0, -+ LIRC_DRIVER_NAME, ite8709_dev); -+ if (ret < 0) -+ return ite8709_cleanup(ite8709_dev, 4, ret, -+ "IRQ already in use"); -+ -+ /* Initialize hardware */ -+ ite8709_drop_hardware(ite8709_dev); /* Shutdown hw until first use */ -+ -+ printk(KERN_INFO LIRC_DRIVER_NAME ": device found : irq=%d io=0x%x\n", -+ ite8709_dev->irq, ite8709_dev->io); -+ -+ return 0; -+} -+ -+static void __devexit ite8709_pnp_remove(struct pnp_dev *dev) -+{ -+ struct ite8709_device *ite8709_dev; -+ ite8709_dev = pnp_get_drvdata(dev); -+ -+ ite8709_cleanup(ite8709_dev, 6, 0, NULL); -+ -+ printk(KERN_INFO LIRC_DRIVER_NAME ": device removed\n"); -+} -+ -+#ifdef CONFIG_PM -+static int ite8709_pnp_suspend(struct pnp_dev *dev, pm_message_t state) -+{ -+ struct ite8709_device *ite8709_dev; -+ ite8709_dev = pnp_get_drvdata(dev); -+ -+ if (ite8709_dev->use_count > 0) -+ ite8709_drop_hardware(ite8709_dev); -+ -+ return 0; -+} -+ -+static int ite8709_pnp_resume(struct pnp_dev *dev) -+{ -+ struct ite8709_device *ite8709_dev; -+ ite8709_dev = pnp_get_drvdata(dev); -+ -+ if (ite8709_dev->use_count > 0) -+ ite8709_init_hardware(ite8709_dev); -+ -+ return 0; -+} -+#else -+#define ite8709_pnp_suspend NULL -+#define ite8709_pnp_resume NULL -+#endif -+ -+static const struct pnp_device_id pnp_dev_table[] = { -+ {"ITE8709", 0}, -+ {} -+}; -+ -+MODULE_DEVICE_TABLE(pnp, pnp_dev_table); -+ -+static struct pnp_driver ite8709_pnp_driver = { -+ .name = LIRC_DRIVER_NAME, -+ .probe = ite8709_pnp_probe, -+ .remove = __devexit_p(ite8709_pnp_remove), -+ .suspend = ite8709_pnp_suspend, -+ .resume = ite8709_pnp_resume, -+ .id_table = pnp_dev_table, -+}; -+ -+int init_module(void) -+{ -+ return pnp_register_driver(&ite8709_pnp_driver); -+} -+ -+void cleanup_module(void) -+{ -+ pnp_unregister_driver(&ite8709_pnp_driver); -+} -+ -+MODULE_DESCRIPTION("LIRC driver for ITE8709 CIR port"); -+MODULE_AUTHOR("Grégory Lardière"); -+MODULE_LICENSE("GPL"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_mceusb.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_mceusb.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_mceusb.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_mceusb.c 2010-08-02 09:31:40.968050721 +0200 -@@ -0,0 +1,1385 @@ -+/* -+ * LIRC driver for Windows Media Center Edition USB Infrared Transceivers -+ * -+ * (C) by Martin A. Blatter -+ * -+ * Transmitter support and reception code cleanup. -+ * (C) by Daniel Melander -+ * -+ * Original lirc_mceusb driver for 1st-gen device: -+ * Copyright (c) 2003-2004 Dan Conti -+ * -+ * Original lirc_mceusb driver deprecated in favor of this driver, which -+ * supports the 1st-gen device now too. Transmit and receive support for -+ * the 1st-gen device added June-September 2009, -+ * by Jarod Wilson and Patrick Calhoun -+ * -+ * Derived from ATI USB driver by Paul Miller and the original -+ * MCE USB driver by Dan Conti (and now including chunks of the latter -+ * relevant to the 1st-gen device initialization) -+ * -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+#define DRIVER_VERSION "1.90" -+#define DRIVER_AUTHOR "Daniel Melander , " \ -+ "Martin Blatter , " \ -+ "Dan Conti " -+#define DRIVER_DESC "Windows Media Center Edition USB IR Transceiver " \ -+ "driver for LIRC" -+#define DRIVER_NAME "lirc_mceusb" -+ -+#define USB_BUFLEN 32 /* USB reception buffer length */ -+#define LIRCBUF_SIZE 256 /* LIRC work buffer length */ -+ -+/* MCE constants */ -+#define MCE_CMDBUF_SIZE 384 /* MCE Command buffer length */ -+#define MCE_TIME_UNIT 50 /* Approx 50us resolution */ -+#define MCE_CODE_LENGTH 5 /* Normal length of packet (with header) */ -+#define MCE_PACKET_SIZE 4 /* Normal length of packet (without header) */ -+#define MCE_PACKET_HEADER 0x84 /* Actual header format is 0x80 + num_bytes */ -+#define MCE_CONTROL_HEADER 0x9F /* MCE status header */ -+#define MCE_TX_HEADER_LENGTH 3 /* # of bytes in the initializing tx header */ -+#define MCE_MAX_CHANNELS 2 /* Two transmitters, hardware dependent? */ -+#define MCE_DEFAULT_TX_MASK 0x03 /* Val opts: TX1=0x01, TX2=0x02, ALL=0x03 */ -+#define MCE_PULSE_BIT 0x80 /* Pulse bit, MSB set == PULSE else SPACE */ -+#define MCE_PULSE_MASK 0x7F /* Pulse mask */ -+#define MCE_MAX_PULSE_LENGTH 0x7F /* Longest transmittable pulse symbol */ -+#define MCE_PACKET_LENGTH_MASK 0x7F /* Pulse mask */ -+ -+ -+/* module parameters */ -+#ifdef CONFIG_USB_DEBUG -+static int debug = 1; -+#else -+static int debug; -+#endif -+ -+/* general constants */ -+#define SEND_FLAG_IN_PROGRESS 1 -+#define SEND_FLAG_COMPLETE 2 -+#define RECV_FLAG_IN_PROGRESS 3 -+#define RECV_FLAG_COMPLETE 4 -+ -+#define MCEUSB_INBOUND 1 -+#define MCEUSB_OUTBOUND 2 -+ -+#define VENDOR_PHILIPS 0x0471 -+#define VENDOR_SMK 0x0609 -+#define VENDOR_TATUNG 0x1460 -+#define VENDOR_GATEWAY 0x107b -+#define VENDOR_SHUTTLE 0x1308 -+#define VENDOR_SHUTTLE2 0x051c -+#define VENDOR_MITSUMI 0x03ee -+#define VENDOR_TOPSEED 0x1784 -+#define VENDOR_RICAVISION 0x179d -+#define VENDOR_ITRON 0x195d -+#define VENDOR_FIC 0x1509 -+#define VENDOR_LG 0x043e -+#define VENDOR_MICROSOFT 0x045e -+#define VENDOR_FORMOSA 0x147a -+#define VENDOR_FINTEK 0x1934 -+#define VENDOR_PINNACLE 0x2304 -+#define VENDOR_ECS 0x1019 -+#define VENDOR_WISTRON 0x0fb8 -+#define VENDOR_COMPRO 0x185b -+#define VENDOR_NORTHSTAR 0x04eb -+#define VENDOR_REALTEK 0x0bda -+#define VENDOR_TIVO 0x105a -+ -+static struct usb_device_id mceusb_dev_table[] = { -+ /* Original Microsoft MCE IR Transceiver (often HP-branded) */ -+ { USB_DEVICE(VENDOR_MICROSOFT, 0x006d) }, -+ /* Philips Infrared Transceiver - Sahara branded */ -+ { USB_DEVICE(VENDOR_PHILIPS, 0x0608) }, -+ /* Philips Infrared Transceiver - HP branded */ -+ { USB_DEVICE(VENDOR_PHILIPS, 0x060c) }, -+ /* Philips SRM5100 */ -+ { USB_DEVICE(VENDOR_PHILIPS, 0x060d) }, -+ /* Philips Infrared Transceiver - Omaura */ -+ { USB_DEVICE(VENDOR_PHILIPS, 0x060f) }, -+ /* Philips Infrared Transceiver - Spinel plus */ -+ { USB_DEVICE(VENDOR_PHILIPS, 0x0613) }, -+ /* Philips eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_PHILIPS, 0x0815) }, -+ /* Realtek MCE IR Receiver */ -+ { USB_DEVICE(VENDOR_REALTEK, 0x0161) }, -+ /* SMK/Toshiba G83C0004D410 */ -+ { USB_DEVICE(VENDOR_SMK, 0x031d) }, -+ /* SMK eHome Infrared Transceiver (Sony VAIO) */ -+ { USB_DEVICE(VENDOR_SMK, 0x0322) }, -+ /* bundled with Hauppauge PVR-150 */ -+ { USB_DEVICE(VENDOR_SMK, 0x0334) }, -+ /* SMK eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_SMK, 0x0338) }, -+ /* Tatung eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TATUNG, 0x9150) }, -+ /* Shuttle eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_SHUTTLE, 0xc001) }, -+ /* Shuttle eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_SHUTTLE2, 0xc001) }, -+ /* Gateway eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_GATEWAY, 0x3009) }, -+ /* Mitsumi */ -+ { USB_DEVICE(VENDOR_MITSUMI, 0x2501) }, -+ /* Topseed eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0001) }, -+ /* Topseed HP eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0006) }, -+ /* Topseed eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0007) }, -+ /* Topseed eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0008) }, -+ /* Topseed eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TOPSEED, 0x000a) }, -+ /* Topseed eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0011) }, -+ /* Ricavision internal Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_RICAVISION, 0x0010) }, -+ /* Itron ione Libra Q-11 */ -+ { USB_DEVICE(VENDOR_ITRON, 0x7002) }, -+ /* FIC eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_FIC, 0x9242) }, -+ /* LG eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_LG, 0x9803) }, -+ /* Microsoft MCE Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_MICROSOFT, 0x00a0) }, -+ /* Formosa eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_FORMOSA, 0xe015) }, -+ /* Formosa21 / eHome Infrared Receiver */ -+ { USB_DEVICE(VENDOR_FORMOSA, 0xe016) }, -+ /* Formosa aim / Trust MCE Infrared Receiver */ -+ { USB_DEVICE(VENDOR_FORMOSA, 0xe017) }, -+ /* Formosa Industrial Computing / Beanbag Emulation Device */ -+ { USB_DEVICE(VENDOR_FORMOSA, 0xe018) }, -+ /* Formosa21 / eHome Infrared Receiver */ -+ { USB_DEVICE(VENDOR_FORMOSA, 0xe03a) }, -+ /* Formosa Industrial Computing AIM IR605/A */ -+ { USB_DEVICE(VENDOR_FORMOSA, 0xe03c) }, -+ /* Fintek eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_FINTEK, 0x0602) }, -+ /* Fintek eHome Infrared Transceiver (in the AOpen MP45) */ -+ { USB_DEVICE(VENDOR_FINTEK, 0x0702) }, -+ /* Pinnacle Remote Kit */ -+ { USB_DEVICE(VENDOR_PINNACLE, 0x0225) }, -+ /* Elitegroup Computer Systems IR */ -+ { USB_DEVICE(VENDOR_ECS, 0x0f38) }, -+ /* Wistron Corp. eHome Infrared Receiver */ -+ { USB_DEVICE(VENDOR_WISTRON, 0x0002) }, -+ /* Compro K100 */ -+ { USB_DEVICE(VENDOR_COMPRO, 0x3020) }, -+ /* Compro K100 v2 */ -+ { USB_DEVICE(VENDOR_COMPRO, 0x3082) }, -+ /* Northstar Systems, Inc. eHome Infrared Transceiver */ -+ { USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) }, -+ /* TiVo PC IR Receiver */ -+ { USB_DEVICE(VENDOR_TIVO, 0x2000) }, -+ /* Terminating entry */ -+ { } -+}; -+ -+static struct usb_device_id gen3_list[] = { -+ { USB_DEVICE(VENDOR_PINNACLE, 0x0225) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0008) }, -+ {} -+}; -+ -+static struct usb_device_id pinnacle_list[] = { -+ { USB_DEVICE(VENDOR_PINNACLE, 0x0225) }, -+ {} -+}; -+ -+static struct usb_device_id microsoft_gen1_list[] = { -+ { USB_DEVICE(VENDOR_MICROSOFT, 0x006d) }, -+ {} -+}; -+ -+static struct usb_device_id transmitter_mask_list[] = { -+ { USB_DEVICE(VENDOR_MICROSOFT, 0x006d) }, -+ { USB_DEVICE(VENDOR_PHILIPS, 0x060c) }, -+ { USB_DEVICE(VENDOR_SMK, 0x031d) }, -+ { USB_DEVICE(VENDOR_SMK, 0x0322) }, -+ { USB_DEVICE(VENDOR_SMK, 0x0334) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0001) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0006) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0007) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0008) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x000a) }, -+ { USB_DEVICE(VENDOR_TOPSEED, 0x0011) }, -+ { USB_DEVICE(VENDOR_PINNACLE, 0x0225) }, -+ {} -+}; -+ -+/* data structure for each usb transceiver */ -+struct mceusb_dev { -+ -+ /* usb */ -+ struct usb_device *usbdev; -+ struct urb *urb_in; -+ int devnum; -+ struct usb_endpoint_descriptor *usb_ep_in; -+ struct usb_endpoint_descriptor *usb_ep_out; -+ -+ /* buffers and dma */ -+ unsigned char *buf_in; -+ unsigned int len_in; -+ dma_addr_t dma_in; -+ dma_addr_t dma_out; -+ unsigned int overflow_len; -+ -+ /* lirc */ -+ struct lirc_driver *d; -+ int lircdata; -+ unsigned char is_pulse; -+ struct { -+ u32 connected:1; -+ u32 gen3:1; -+ u32 transmitter_mask_inverted:1; -+ u32 microsoft_gen1:1; -+ u32 reserved:28; -+ } flags; -+ -+ unsigned char transmitter_mask; -+ unsigned int carrier_freq; -+ -+ /* handle sending (init strings) */ -+ int send_flags; -+ wait_queue_head_t wait_out; -+ -+ struct mutex dev_lock; -+}; -+ -+/* -+ * MCE Device Command Strings -+ * Device command responses vary from device to device... -+ * - DEVICE_RESET resets the hardware to its default state -+ * - GET_REVISION fetches the hardware/software revision, common -+ * replies are ff 0b 45 ff 1b 08 and ff 0b 50 ff 1b 42 -+ * - GET_CARRIER_FREQ gets the carrier mode and frequency of the -+ * device, with replies in the form of 9f 06 MM FF, where MM is 0-3, -+ * meaning clk of 10000000, 2500000, 625000 or 156250, and FF is -+ * ((clk / frequency) - 1) -+ * - GET_RX_TIMEOUT fetches the receiver timeout in units of 50us, -+ * response in the form of 9f 0c msb lsb -+ * - GET_TX_BITMASK fetches the transmitter bitmask, replies in -+ * the form of 9f 08 bm, where bm is the bitmask -+ * - GET_RX_SENSOR fetches the RX sensor setting -- long-range -+ * general use one or short-range learning one, in the form of -+ * 9f 14 ss, where ss is either 01 for long-range or 02 for short -+ * - SET_CARRIER_FREQ sets a new carrier mode and frequency -+ * - SET_TX_BITMASK sets the transmitter bitmask -+ * - SET_RX_TIMEOUT sets the receiver timeout -+ * - SET_RX_SENSOR sets which receiver sensor to use -+ */ -+static char DEVICE_RESET[] = {0x00, 0xff, 0xaa}; -+static char GET_REVISION[] = {0xff, 0x0b}; -+static char GET_UNKNOWN[] = {0xff, 0x18}; -+static char GET_CARRIER_FREQ[] = {0x9f, 0x07}; -+static char GET_RX_TIMEOUT[] = {0x9f, 0x0d}; -+static char GET_TX_BITMASK[] = {0x9f, 0x13}; -+static char GET_RX_SENSOR[] = {0x9f, 0x15}; -+/* sub in desired values in lower byte or bytes for full command */ -+//static char SET_CARRIER_FREQ[] = {0x9f, 0x06, 0x00, 0x00}; -+//static char SET_TX_BITMASK[] = {0x9f, 0x08, 0x00}; -+//static char SET_RX_TIMEOUT[] = {0x9f, 0x0c, 0x00, 0x00}; -+//static char SET_RX_SENSOR[] = {0x9f, 0x14, 0x00}; -+ -+static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf, -+ int len, bool out) -+{ -+ char codes[USB_BUFLEN * 3 + 1]; -+ char inout[9]; -+ int i; -+ u8 cmd, subcmd, data1, data2; -+ struct device *dev = ir->d->dev; -+ -+ if (len <= 0) -+ return; -+ -+ if (ir->flags.microsoft_gen1 && len <= 2) -+ return; -+ -+ for (i = 0; i < len && i < USB_BUFLEN; i++) -+ snprintf(codes + i * 3, 4, "%02x ", buf[i] & 0xFF); -+ -+ dev_info(dev, "%sbound data: %s (length=%d)\n", -+ (out ? "out" : " in"), codes, len); -+ -+ if (out) -+ strcpy(inout, "Request\0"); -+ else -+ strcpy(inout, "Got\0"); -+ -+ cmd = buf[0] & 0xff; -+ subcmd = buf[1] & 0xff; -+ data1 = buf[2] & 0xff; -+ data2 = buf[3] & 0xff; -+ -+ switch (cmd) { -+ case 0x00: -+ if (subcmd == 0xff && data1 == 0xaa) -+ dev_info(dev, "Device reset requested\n"); -+ else -+ dev_info(dev, "Unknown command 0x%02x 0x%02x\n", -+ cmd, subcmd); -+ break; -+ case 0xff: -+ switch (subcmd) { -+ case 0x0b: -+ if (len == 2) -+ dev_info(dev, "Get hw/sw rev?\n"); -+ else -+ dev_info(dev, "hw/sw rev 0x%02x 0x%02x " -+ "0x%02x 0x%02x\n", data1, data2, -+ buf[4], buf[5]); -+ break; -+ case 0xaa: -+ dev_info(dev, "Device reset requested\n"); -+ break; -+ case 0xfe: -+ dev_info(dev, "Previous command not supported\n"); -+ break; -+ case 0x18: -+ case 0x1b: -+ default: -+ dev_info(dev, "Unknown command 0x%02x 0x%02x\n", -+ cmd, subcmd); -+ break; -+ } -+ break; -+ case 0x9f: -+ switch (subcmd) { -+ case 0x03: -+ dev_info(dev, "Ping\n"); -+ break; -+ case 0x04: -+ dev_info(dev, "Resp to 9f 05 of 0x%02x 0x%02x\n", -+ data1, data2); -+ break; -+ case 0x06: -+ dev_info(dev, "%s carrier mode and freq of 0x%02x 0x%02x\n", -+ inout, data1, data2); -+ break; -+ case 0x07: -+ dev_info(dev, "Get carrier mode and freq\n"); -+ break; -+ case 0x08: -+ dev_info(dev, "%s transmit blaster mask of 0x%02x\n", -+ inout, data1); -+ break; -+ case 0x0c: -+ /* value is in units of 50us, so x*50/100 or x/2 ms */ -+ dev_info(dev, "%s receive timeout of %d ms\n", -+ inout, ((data1 << 8) | data2) / 2); -+ break; -+ case 0x0d: -+ dev_info(dev, "Get receive timeout\n"); -+ break; -+ case 0x13: -+ dev_info(dev, "Get transmit blaster mask\n"); -+ break; -+ case 0x14: -+ dev_info(dev, "%s %s-range receive sensor in use\n", -+ inout, data1 == 0x02 ? "short" : "long"); -+ break; -+ case 0x15: -+ if (len == 2) -+ dev_info(dev, "Get receive sensor\n"); -+ else -+ dev_info(dev, "Received pulse count is %d\n", -+ ((data1 << 8) | data2)); -+ break; -+ case 0xfe: -+ dev_info(dev, "Error! Hardware is likely wedged...\n"); -+ break; -+ case 0x05: -+ case 0x09: -+ case 0x0f: -+ default: -+ dev_info(dev, "Unknown command 0x%02x 0x%02x\n", -+ cmd, subcmd); -+ break; -+ } -+ break; -+ default: -+ break; -+ } -+} -+ -+static void usb_async_callback(struct urb *urb, struct pt_regs *regs) -+{ -+ struct mceusb_dev *ir; -+ int len; -+ -+ if (!urb) -+ return; -+ -+ ir = urb->context; -+ if (ir) { -+ len = urb->actual_length; -+ -+ dev_dbg(ir->d->dev, "callback called (status=%d len=%d)\n", -+ urb->status, len); -+ -+ if (debug) -+ mceusb_dev_printdata(ir, urb->transfer_buffer, len, true); -+ } -+ -+} -+ -+/* request incoming or send outgoing usb packet - used to initialize remote */ -+static void mce_request_packet(struct mceusb_dev *ir, -+ struct usb_endpoint_descriptor *ep, -+ unsigned char *data, int size, int urb_type) -+{ -+ int res; -+ struct urb *async_urb; -+ unsigned char *async_buf; -+ -+ if (urb_type == MCEUSB_OUTBOUND) { -+ async_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (unlikely(!async_urb)) { -+ dev_err(ir->d->dev, "Error, couldn't allocate urb!\n"); -+ return; -+ } -+ -+ async_buf = kzalloc(size, GFP_KERNEL); -+ if (!async_buf) { -+ dev_err(ir->d->dev, "Error, couldn't allocate buf!\n"); -+ usb_free_urb(async_urb); -+ return; -+ } -+ -+ /* outbound data */ -+ usb_fill_int_urb(async_urb, ir->usbdev, -+ usb_sndintpipe(ir->usbdev, ep->bEndpointAddress), -+ async_buf, size, (usb_complete_t) usb_async_callback, -+ ir, ep->bInterval); -+ memcpy(async_buf, data, size); -+ -+ } else if (urb_type == MCEUSB_INBOUND) { -+ /* standard request */ -+ async_urb = ir->urb_in; -+ ir->send_flags = RECV_FLAG_IN_PROGRESS; -+ -+ } else { -+ dev_err(ir->d->dev, "Error! Unknown urb type %d\n", urb_type); -+ return; -+ } -+ -+ dev_dbg(ir->d->dev, "receive request called (size=%#x)\n", size); -+ -+ async_urb->transfer_buffer_length = size; -+ async_urb->dev = ir->usbdev; -+ -+ res = usb_submit_urb(async_urb, GFP_ATOMIC); -+ if (res) { -+ dev_dbg(ir->d->dev, "receive request FAILED! (res=%d)\n", res); -+ return; -+ } -+ dev_dbg(ir->d->dev, "receive request complete (res=%d)\n", res); -+} -+ -+static void mce_async_out(struct mceusb_dev *ir, unsigned char *data, int size) -+{ -+ mce_request_packet(ir, ir->usb_ep_out, data, size, MCEUSB_OUTBOUND); -+} -+ -+static void mce_sync_in(struct mceusb_dev *ir, unsigned char *data, int size) -+{ -+ mce_request_packet(ir, ir->usb_ep_in, data, size, MCEUSB_INBOUND); -+} -+ -+static int unregister_from_lirc(struct mceusb_dev *ir) -+{ -+ struct lirc_driver *d = ir->d; -+ int devnum; -+ int rtn; -+ -+ devnum = ir->devnum; -+ dev_dbg(ir->d->dev, "unregister from lirc called\n"); -+ -+ rtn = lirc_unregister_driver(d->minor); -+ if (rtn > 0) { -+ dev_info(ir->d->dev, "error in lirc_unregister minor: %d\n" -+ "Trying again...\n", d->minor); -+ if (rtn == -EBUSY) { -+ dev_info(ir->d->dev, "device is opened, will " -+ "unregister on close\n"); -+ return -EAGAIN; -+ } -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule_timeout(HZ); -+ -+ rtn = lirc_unregister_driver(d->minor); -+ if (rtn > 0) -+ dev_info(ir->d->dev, "lirc_unregister failed\n"); -+ } -+ -+ if (rtn) { -+ dev_info(ir->d->dev, "didn't free resources\n"); -+ return -EAGAIN; -+ } -+ -+ dev_info(ir->d->dev, "usb remote disconnected\n"); -+ -+ lirc_buffer_free(d->rbuf); -+ kfree(d->rbuf); -+ kfree(d); -+ kfree(ir); -+ return 0; -+} -+ -+static int mceusb_ir_open(void *data) -+{ -+ struct mceusb_dev *ir = data; -+ -+ if (!ir) { -+ printk(KERN_WARNING DRIVER_NAME -+ "[?]: %s called with no context\n", __func__); -+ return -EIO; -+ } -+ -+ dev_dbg(ir->d->dev, "mceusb IR device opened\n"); -+ -+ if (!ir->flags.connected) { -+ if (!ir->usbdev) -+ return -ENOENT; -+ ir->flags.connected = 1; -+ } -+ -+ return 0; -+} -+ -+static void mceusb_ir_close(void *data) -+{ -+ struct mceusb_dev *ir = data; -+ -+ if (!ir) { -+ printk(KERN_WARNING DRIVER_NAME -+ "[?]: %s called with no context\n", __func__); -+ return; -+ } -+ -+ dev_dbg(ir->d->dev, "mceusb IR device closed\n"); -+ -+ if (ir->flags.connected) { -+ mutex_lock(&ir->dev_lock); -+ ir->flags.connected = 0; -+ mutex_unlock(&ir->dev_lock); -+ } -+} -+ -+static void send_packet_to_lirc(struct mceusb_dev *ir) -+{ -+ if (ir->lircdata) { -+ lirc_buffer_write(ir->d->rbuf, -+ (unsigned char *) &ir->lircdata); -+ wake_up(&ir->d->rbuf->wait_poll); -+ ir->lircdata = 0; -+ } -+} -+ -+static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len) -+{ -+ int i, j; -+ int packet_len = 0; -+ int start_index = 0; -+ -+ /* skip meaningless 0xb1 0x60 header bytes on orig receiver */ -+ if (ir->flags.microsoft_gen1) -+ start_index = 2; -+ -+ /* this should only trigger w/the 1st-gen mce receiver */ -+ for (i = start_index; i < (start_index + ir->overflow_len) && -+ i < buf_len; i++) { -+ /* rising/falling flank */ -+ if (ir->is_pulse != (ir->buf_in[i] & MCE_PULSE_BIT)) { -+ send_packet_to_lirc(ir); -+ ir->is_pulse = ir->buf_in[i] & MCE_PULSE_BIT; -+ } -+ -+ /* accumulate mce pulse/space values */ -+ ir->lircdata += (ir->buf_in[i] & MCE_PULSE_MASK) * -+ MCE_TIME_UNIT; -+ ir->lircdata |= (ir->is_pulse ? PULSE_BIT : 0); -+ } -+ start_index += ir->overflow_len; -+ ir->overflow_len = 0; -+ -+ for (i = start_index; i < buf_len; i++) { -+ /* decode mce packets of the form (84),AA,BB,CC,DD */ -+ -+ /* data headers */ -+ if (ir->buf_in[i] >= 0x80 && ir->buf_in[i] <= 0x9e) { -+ /* decode packet data */ -+ packet_len = ir->buf_in[i] & MCE_PACKET_LENGTH_MASK; -+ ir->overflow_len = i + 1 + packet_len - buf_len; -+ for (j = 1; j <= packet_len && (i + j < buf_len); j++) { -+ /* rising/falling flank */ -+ if (ir->is_pulse != -+ (ir->buf_in[i + j] & MCE_PULSE_BIT)) { -+ send_packet_to_lirc(ir); -+ ir->is_pulse = -+ ir->buf_in[i + j] & -+ MCE_PULSE_BIT; -+ } -+ -+ /* accumulate mce pulse/space values */ -+ ir->lircdata += -+ (ir->buf_in[i + j] & MCE_PULSE_MASK) * -+ MCE_TIME_UNIT; -+ ir->lircdata |= (ir->is_pulse ? PULSE_BIT : 0); -+ } -+ -+ i += packet_len; -+ -+ /* status header (0x9F) */ -+ } else if (ir->buf_in[i] == MCE_CONTROL_HEADER) { -+ /* -+ * A transmission containing one or more consecutive ir -+ * commands always ends with a GAP of 100ms followed by -+ * the sequence 0x9F 0x01 0x01 0x9F 0x15 0x00 0x00 0x80 -+ */ -+ -+#if 0 -+ Uncomment this if the last 100ms "infinity"-space should be transmitted -+ to lirc directly instead of at the beginning of the next transmission. -+ Changes pulse/space order. -+ -+ if (++i < buf_len && ir->buf_in[i] == 0x01) -+ send_packet_to_lirc(ir); -+ -+#endif -+ -+ /* end decode loop */ -+ dev_dbg(ir->d->dev, "[%d] %s: found control header\n", -+ ir->devnum, __func__); -+ ir->overflow_len = 0; -+ break; -+ } else { -+ dev_dbg(ir->d->dev, "[%d] %s: stray packet?\n", -+ ir->devnum, __func__); -+ ir->overflow_len = 0; -+ } -+ } -+ -+ return; -+} -+ -+static void mceusb_dev_recv(struct urb *urb, struct pt_regs *regs) -+{ -+ struct mceusb_dev *ir; -+ int buf_len; -+ -+ if (!urb) -+ return; -+ -+ ir = urb->context; -+ if (!ir) { -+ usb_unlink_urb(urb); -+ return; -+ } -+ -+ buf_len = urb->actual_length; -+ -+ if (debug) -+ mceusb_dev_printdata(ir, urb->transfer_buffer, buf_len, false); -+ -+ if (ir->send_flags == RECV_FLAG_IN_PROGRESS) { -+ ir->send_flags = SEND_FLAG_COMPLETE; -+ dev_dbg(ir->d->dev, "setup answer received %d bytes\n", -+ buf_len); -+ } -+ -+ switch (urb->status) { -+ /* success */ -+ case 0: -+ mceusb_process_ir_data(ir, buf_len); -+ break; -+ -+ case -ECONNRESET: -+ case -ENOENT: -+ case -ESHUTDOWN: -+ usb_unlink_urb(urb); -+ return; -+ -+ case -EPIPE: -+ default: -+ break; -+ } -+ -+ usb_submit_urb(urb, GFP_ATOMIC); -+} -+ -+ -+static ssize_t mceusb_transmit_ir(struct file *file, const char *buf, -+ size_t n, loff_t *ppos) -+{ -+ int i, count = 0, cmdcount = 0; -+ struct mceusb_dev *ir = NULL; -+ int wbuf[LIRCBUF_SIZE]; /* Workbuffer with values from lirc */ -+ unsigned char cmdbuf[MCE_CMDBUF_SIZE]; /* MCE command buffer */ -+ unsigned long signal_duration = 0; /* Singnal length in us */ -+ struct timeval start_time, end_time; -+ -+ do_gettimeofday(&start_time); -+ -+ /* Retrieve lirc_driver data for the device */ -+ ir = lirc_get_pdata(file); -+ if (!ir || !ir->usb_ep_out) -+ return -EFAULT; -+ -+ if (n % sizeof(int)) -+ return -EINVAL; -+ count = n / sizeof(int); -+ -+ /* Check if command is within limits */ -+ if (count > LIRCBUF_SIZE || count%2 == 0) -+ return -EINVAL; -+ if (copy_from_user(wbuf, buf, n)) -+ return -EFAULT; -+ -+ /* MCE tx init header */ -+ cmdbuf[cmdcount++] = MCE_CONTROL_HEADER; -+ cmdbuf[cmdcount++] = 0x08; -+ cmdbuf[cmdcount++] = ir->transmitter_mask; -+ -+ /* Generate mce packet data */ -+ for (i = 0; (i < count) && (cmdcount < MCE_CMDBUF_SIZE); i++) { -+ signal_duration += wbuf[i]; -+ wbuf[i] = wbuf[i] / MCE_TIME_UNIT; -+ -+ do { /* loop to support long pulses/spaces > 127*50us=6.35ms */ -+ -+ /* Insert mce packet header every 4th entry */ -+ if ((cmdcount < MCE_CMDBUF_SIZE) && -+ (cmdcount - MCE_TX_HEADER_LENGTH) % -+ MCE_CODE_LENGTH == 0) -+ cmdbuf[cmdcount++] = MCE_PACKET_HEADER; -+ -+ /* Insert mce packet data */ -+ if (cmdcount < MCE_CMDBUF_SIZE) -+ cmdbuf[cmdcount++] = -+ (wbuf[i] < MCE_PULSE_BIT ? -+ wbuf[i] : MCE_MAX_PULSE_LENGTH) | -+ (i & 1 ? 0x00 : MCE_PULSE_BIT); -+ else -+ return -EINVAL; -+ } while ((wbuf[i] > MCE_MAX_PULSE_LENGTH) && -+ (wbuf[i] -= MCE_MAX_PULSE_LENGTH)); -+ } -+ -+ /* Fix packet length in last header */ -+ cmdbuf[cmdcount - (cmdcount - MCE_TX_HEADER_LENGTH) % MCE_CODE_LENGTH] = -+ 0x80 + (cmdcount - MCE_TX_HEADER_LENGTH) % MCE_CODE_LENGTH - 1; -+ -+ /* Check if we have room for the empty packet at the end */ -+ if (cmdcount >= MCE_CMDBUF_SIZE) -+ return -EINVAL; -+ -+ /* All mce commands end with an empty packet (0x80) */ -+ cmdbuf[cmdcount++] = 0x80; -+ -+ /* Transmit the command to the mce device */ -+ mce_async_out(ir, cmdbuf, cmdcount); -+ -+ /* -+ * The lircd gap calculation expects the write function to -+ * wait the time it takes for the ircommand to be sent before -+ * it returns. -+ */ -+ do_gettimeofday(&end_time); -+ signal_duration -= (end_time.tv_usec - start_time.tv_usec) + -+ (end_time.tv_sec - start_time.tv_sec) * 1000000; -+ -+ /* delay with the closest number of ticks */ -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule_timeout(usecs_to_jiffies(signal_duration)); -+ -+ return n; -+} -+ -+static void set_transmitter_mask(struct mceusb_dev *ir, unsigned int mask) -+{ -+ if (ir->flags.transmitter_mask_inverted) -+ ir->transmitter_mask = (mask != 0x03 ? mask ^ 0x03 : mask) << 1; -+ else -+ ir->transmitter_mask = mask; -+} -+ -+ -+/* Sets the send carrier frequency */ -+static int set_send_carrier(struct mceusb_dev *ir, int carrier) -+{ -+ int clk = 10000000; -+ int prescaler = 0, divisor = 0; -+ unsigned char cmdbuf[] = { 0x9F, 0x06, 0x01, 0x80 }; -+ -+ /* Carrier is changed */ -+ if (ir->carrier_freq != carrier) { -+ -+ if (carrier <= 0) { -+ ir->carrier_freq = carrier; -+ dev_dbg(ir->d->dev, "SET_CARRIER disabling carrier " -+ "modulation\n"); -+ mce_async_out(ir, cmdbuf, sizeof(cmdbuf)); -+ return carrier; -+ } -+ -+ for (prescaler = 0; prescaler < 4; ++prescaler) { -+ divisor = (clk >> (2 * prescaler)) / carrier; -+ if (divisor <= 0xFF) { -+ ir->carrier_freq = carrier; -+ cmdbuf[2] = prescaler; -+ cmdbuf[3] = divisor; -+ dev_dbg(ir->d->dev, "SET_CARRIER requesting " -+ "%d Hz\n", carrier); -+ -+ /* Transmit new carrier to mce device */ -+ mce_async_out(ir, cmdbuf, sizeof(cmdbuf)); -+ return carrier; -+ } -+ } -+ -+ return -EINVAL; -+ -+ } -+ -+ return carrier; -+} -+ -+ -+static int mceusb_lirc_ioctl(struct inode *node, struct file *filep, -+ unsigned int cmd, unsigned long arg) -+{ -+ int result; -+ unsigned int ivalue; -+ unsigned long lvalue; -+ struct mceusb_dev *ir = NULL; -+ -+ /* Retrieve lirc_driver data for the device */ -+ ir = lirc_get_pdata(filep); -+ if (!ir || !ir->usb_ep_out) -+ return -EFAULT; -+ -+ -+ switch (cmd) { -+ case LIRC_SET_TRANSMITTER_MASK: -+ -+ result = get_user(ivalue, (unsigned int *) arg); -+ if (result) -+ return result; -+ switch (ivalue) { -+ case 0x01: /* Transmitter 1 => 0x04 */ -+ case 0x02: /* Transmitter 2 => 0x02 */ -+ case 0x03: /* Transmitter 1 & 2 => 0x06 */ -+ set_transmitter_mask(ir, ivalue); -+ break; -+ -+ default: /* Unsupported transmitter mask */ -+ return MCE_MAX_CHANNELS; -+ } -+ -+ dev_dbg(ir->d->dev, ": SET_TRANSMITTERS mask=%d\n", ivalue); -+ break; -+ -+ case LIRC_GET_SEND_MODE: -+ -+ result = put_user(LIRC_SEND2MODE(LIRC_CAN_SEND_PULSE & -+ LIRC_CAN_SEND_MASK), -+ (unsigned long *) arg); -+ -+ if (result) -+ return result; -+ break; -+ -+ case LIRC_SET_SEND_MODE: -+ -+ result = get_user(lvalue, (unsigned long *) arg); -+ -+ if (result) -+ return result; -+ if (lvalue != (LIRC_MODE_PULSE&LIRC_CAN_SEND_MASK)) -+ return -EINVAL; -+ break; -+ -+ case LIRC_SET_SEND_CARRIER: -+ -+ result = get_user(ivalue, (unsigned int *) arg); -+ if (result) -+ return result; -+ -+ set_send_carrier(ir, ivalue); -+ break; -+ -+ default: -+ return lirc_dev_fop_ioctl(node, filep, cmd, arg); -+ } -+ -+ return 0; -+} -+ -+static struct file_operations lirc_fops = { -+ .owner = THIS_MODULE, -+ .write = mceusb_transmit_ir, -+ .ioctl = mceusb_lirc_ioctl, -+ .read = lirc_dev_fop_read, -+ .poll = lirc_dev_fop_poll, -+ .open = lirc_dev_fop_open, -+ .release = lirc_dev_fop_close, -+}; -+ -+static int mceusb_gen1_init(struct mceusb_dev *ir) -+{ -+ int i, ret; -+ char junk[64], data[8]; -+ int partial = 0; -+ -+ /* -+ * Clear off the first few messages. These look like calibration -+ * or test data, I can't really tell. This also flushes in case -+ * we have random ir data queued up. -+ */ -+ for (i = 0; i < 40; i++) -+ usb_bulk_msg(ir->usbdev, -+ usb_rcvbulkpipe(ir->usbdev, -+ ir->usb_ep_in->bEndpointAddress), -+ junk, 64, &partial, HZ * 10); -+ -+ ir->is_pulse = 1; -+ -+ memset(data, 0, 8); -+ -+ /* Get Status */ -+ ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0), -+ USB_REQ_GET_STATUS, USB_DIR_IN, -+ 0, 0, data, 2, HZ * 3); -+ -+ /* ret = usb_get_status( ir->usbdev, 0, 0, data ); */ -+ dev_dbg(ir->d->dev, "%s - ret = %d status = 0x%x 0x%x\n", __func__, -+ ret, data[0], data[1]); -+ -+ /* -+ * This is a strange one. They issue a set address to the device -+ * on the receive control pipe and expect a certain value pair back -+ */ -+ memset(data, 0, 8); -+ -+ ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0), -+ USB_REQ_SET_ADDRESS, USB_TYPE_VENDOR, 0, 0, -+ data, 2, HZ * 3); -+ dev_dbg(ir->d->dev, "%s - ret = %d, devnum = %d\n", -+ __func__, ret, ir->usbdev->devnum); -+ dev_dbg(ir->d->dev, "%s - data[0] = %d, data[1] = %d\n", -+ __func__, data[0], data[1]); -+ -+ /* set feature: bit rate 38400 bps */ -+ ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), -+ USB_REQ_SET_FEATURE, USB_TYPE_VENDOR, -+ 0xc04e, 0x0000, NULL, 0, HZ * 3); -+ -+ dev_dbg(ir->d->dev, "%s - ret = %d\n", __func__, ret); -+ -+ /* bRequest 4: set char length to 8 bits */ -+ ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), -+ 4, USB_TYPE_VENDOR, -+ 0x0808, 0x0000, NULL, 0, HZ * 3); -+ dev_dbg(ir->d->dev, "%s - retB = %d\n", __func__, ret); -+ -+ /* bRequest 2: set handshaking to use DTR/DSR */ -+ ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), -+ 2, USB_TYPE_VENDOR, -+ 0x0000, 0x0100, NULL, 0, HZ * 3); -+ dev_dbg(ir->d->dev, "%s - retC = %d\n", __func__, ret); -+ -+ return ret; -+ -+}; -+ -+static int mceusb_dev_probe(struct usb_interface *intf, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *dev = interface_to_usbdev(intf); -+ struct usb_host_interface *idesc; -+ struct usb_endpoint_descriptor *ep = NULL; -+ struct usb_endpoint_descriptor *ep_in = NULL; -+ struct usb_endpoint_descriptor *ep_out = NULL; -+ struct usb_host_config *config; -+ struct mceusb_dev *ir = NULL; -+ struct lirc_driver *driver = NULL; -+ struct lirc_buffer *rbuf = NULL; -+ int devnum, pipe, maxp; -+ int minor = 0; -+ int i; -+ char buf[63], name[128] = ""; -+ int mem_failure = 0; -+ bool is_gen3; -+ bool is_microsoft_gen1; -+ bool is_pinnacle; -+ -+ dev_dbg(&intf->dev, ": %s called\n", __func__); -+ -+ usb_reset_device(dev); -+ -+ config = dev->actconfig; -+ -+ idesc = intf->cur_altsetting; -+ -+ is_gen3 = usb_match_id(intf, gen3_list) ? 1 : 0; -+ -+ is_microsoft_gen1 = usb_match_id(intf, microsoft_gen1_list) ? 1 : 0; -+ -+ is_pinnacle = usb_match_id(intf, pinnacle_list) ? 1 : 0; -+ -+ /* step through the endpoints to find first bulk in and out endpoint */ -+ for (i = 0; i < idesc->desc.bNumEndpoints; ++i) { -+ ep = &idesc->endpoint[i].desc; -+ -+ if ((ep_in == NULL) -+ && ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) -+ == USB_DIR_IN) -+ && (((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -+ == USB_ENDPOINT_XFER_BULK) -+ || ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -+ == USB_ENDPOINT_XFER_INT))) { -+ -+ dev_dbg(&intf->dev, ": acceptable inbound endpoint " -+ "found\n"); -+ ep_in = ep; -+ ep_in->bmAttributes = USB_ENDPOINT_XFER_INT; -+ if (!is_pinnacle) -+ /* -+ * Ideally, we'd use what the device offers up, -+ * but that leads to non-functioning first and -+ * second-gen devices, and many devices have an -+ * invalid bInterval of 0. Pinnacle devices -+ * don't work witha bInterval of 1 though. -+ */ -+ ep_in->bInterval = 1; -+ } -+ -+ if ((ep_out == NULL) -+ && ((ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK) -+ == USB_DIR_OUT) -+ && (((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -+ == USB_ENDPOINT_XFER_BULK) -+ || ((ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -+ == USB_ENDPOINT_XFER_INT))) { -+ -+ dev_dbg(&intf->dev, ": acceptable outbound endpoint " -+ "found\n"); -+ ep_out = ep; -+ ep_out->bmAttributes = USB_ENDPOINT_XFER_INT; -+ if (!is_pinnacle) -+ /* -+ * Ideally, we'd use what the device offers up, -+ * but that leads to non-functioning first and -+ * second-gen devices, and many devices have an -+ * invalid bInterval of 0. Pinnacle devices -+ * don't work witha bInterval of 1 though. -+ */ -+ ep_out->bInterval = 1; -+ } -+ } -+ if (ep_in == NULL) { -+ dev_dbg(&intf->dev, ": inbound and/or endpoint not found\n"); -+ return -ENODEV; -+ } -+ -+ devnum = dev->devnum; -+ pipe = usb_rcvintpipe(dev, ep_in->bEndpointAddress); -+ maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); -+ -+ mem_failure = 0; -+ ir = kzalloc(sizeof(struct mceusb_dev), GFP_KERNEL); -+ if (!ir) -+ goto mem_alloc_fail; -+ -+ driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); -+ if (!driver) -+ goto mem_alloc_fail; -+ -+ rbuf = kzalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!rbuf) -+ goto mem_alloc_fail; -+ -+ if (lirc_buffer_init(rbuf, sizeof(int), LIRCBUF_SIZE)) -+ goto mem_alloc_fail; -+ -+ ir->buf_in = usb_alloc_coherent(dev, maxp, GFP_ATOMIC, &ir->dma_in); -+ if (!ir->buf_in) -+ goto buf_in_alloc_fail; -+ -+ ir->urb_in = usb_alloc_urb(0, GFP_KERNEL); -+ if (!ir->urb_in) -+ goto urb_in_alloc_fail; -+ -+ strcpy(driver->name, DRIVER_NAME); -+ driver->minor = -1; -+ driver->features = LIRC_CAN_SEND_PULSE | -+ LIRC_CAN_SET_TRANSMITTER_MASK | -+ LIRC_CAN_REC_MODE2 | -+ LIRC_CAN_SET_SEND_CARRIER; -+ driver->data = ir; -+ driver->rbuf = rbuf; -+ driver->set_use_inc = &mceusb_ir_open; -+ driver->set_use_dec = &mceusb_ir_close; -+ driver->code_length = sizeof(int) * 8; -+ driver->fops = &lirc_fops; -+ driver->dev = &intf->dev; -+ driver->owner = THIS_MODULE; -+ -+ mutex_init(&ir->dev_lock); -+ init_waitqueue_head(&ir->wait_out); -+ -+ minor = lirc_register_driver(driver); -+ if (minor < 0) -+ goto lirc_register_fail; -+ -+ driver->minor = minor; -+ ir->d = driver; -+ ir->devnum = devnum; -+ ir->usbdev = dev; -+ ir->len_in = maxp; -+ ir->overflow_len = 0; -+ ir->flags.connected = 0; -+ ir->flags.gen3 = is_gen3; -+ ir->flags.microsoft_gen1 = is_microsoft_gen1; -+ ir->flags.transmitter_mask_inverted = -+ usb_match_id(intf, transmitter_mask_list) ? 0 : 1; -+ -+ ir->lircdata = PULSE_MASK; -+ ir->is_pulse = 0; -+ -+ /* ir->flags.transmitter_mask_inverted must be set */ -+ set_transmitter_mask(ir, MCE_DEFAULT_TX_MASK); -+ /* Saving usb interface data for use by the transmitter routine */ -+ ir->usb_ep_in = ep_in; -+ ir->usb_ep_out = ep_out; -+ -+ if (dev->descriptor.iManufacturer -+ && usb_string(dev, dev->descriptor.iManufacturer, -+ buf, sizeof(buf)) > 0) -+ strlcpy(name, buf, sizeof(name)); -+ if (dev->descriptor.iProduct -+ && usb_string(dev, dev->descriptor.iProduct, -+ buf, sizeof(buf)) > 0) -+ snprintf(name + strlen(name), sizeof(name) - strlen(name), -+ " %s", buf); -+ -+ /* inbound data */ -+ usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, -+ maxp, (usb_complete_t) mceusb_dev_recv, ir, ep_in->bInterval); -+ ir->urb_in->transfer_dma = ir->dma_in; -+ ir->urb_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; -+ -+ if (is_pinnacle) { -+ int usbret; -+ -+ /* -+ * I have no idea why but this reset seems to be crucial to -+ * getting the device to do outbound IO correctly - without -+ * this the device seems to hang, ignoring all input - although -+ * IR signals are correctly sent from the device, no input is -+ * interpreted by the device and the host never does the -+ * completion routine -+ */ -+ usbret = usb_reset_configuration(dev); -+ dev_info(ir->d->dev, "usb reset config ret %x\n", usbret); -+ } -+ -+ /* initialize device */ -+ if (ir->flags.gen3) { -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* device reset */ -+ mce_async_out(ir, DEVICE_RESET, sizeof(DEVICE_RESET)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* get the carrier and frequency */ -+ mce_async_out(ir, GET_CARRIER_FREQ, sizeof(GET_CARRIER_FREQ)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* get the transmitter bitmask */ -+ mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* get receiver timeout value */ -+ mce_async_out(ir, GET_RX_TIMEOUT, sizeof(GET_RX_TIMEOUT)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* get receiver sensor setting */ -+ mce_async_out(ir, GET_RX_SENSOR, sizeof(GET_RX_SENSOR)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ } else if (ir->flags.microsoft_gen1) { -+ /* original ms mce device requires some additional setup */ -+ mceusb_gen1_init(ir); -+ -+ } else { -+ mce_sync_in(ir, NULL, maxp); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* device reset */ -+ mce_async_out(ir, DEVICE_RESET, sizeof(DEVICE_RESET)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* get hw/sw revision? */ -+ mce_async_out(ir, GET_REVISION, sizeof(GET_REVISION)); -+ mce_sync_in(ir, NULL, maxp); -+ -+ /* unknown what this actually returns... */ -+ mce_async_out(ir, GET_UNKNOWN, sizeof(GET_UNKNOWN)); -+ mce_sync_in(ir, NULL, maxp); -+ } -+ -+ /* -+ * if we don't issue the correct number of receives (mce_sync_in()) -+ * for each outbound, then the first few ir pulses will be interpreted -+ * by the usb_async_callback routine - we should ensure we have the -+ * right amount OR less - as the mceusb_dev_recv routine will handle -+ * the control packets OK - they start with 0x9f - but the async -+ * callback doesn't handle ir pulse packets -+ */ -+ mce_sync_in(ir, NULL, maxp); -+ -+ usb_set_intfdata(intf, ir); -+ -+ dev_info(ir->d->dev, "Registered %s on usb%d:%d\n", name, -+ dev->bus->busnum, devnum); -+ -+ return 0; -+ -+ /* Error-handling path */ -+lirc_register_fail: -+ usb_free_urb(ir->urb_in); -+urb_in_alloc_fail: -+ usb_alloc_coherent(dev, maxp, ir->buf_in, ir->dma_in); -+buf_in_alloc_fail: -+ lirc_buffer_free(rbuf); -+mem_alloc_fail: -+ kfree(rbuf); -+ kfree(driver); -+ kfree(ir); -+ dev_info(&intf->dev, "out of memory (code=%d)\n", mem_failure); -+ -+ return -ENOMEM; -+} -+ -+ -+static void mceusb_dev_disconnect(struct usb_interface *intf) -+{ -+ struct usb_device *dev = interface_to_usbdev(intf); -+ struct mceusb_dev *ir = usb_get_intfdata(intf); -+ -+ usb_set_intfdata(intf, NULL); -+ -+ if (!ir || !ir->d) -+ return; -+ -+ ir->usbdev = NULL; -+ wake_up_all(&ir->wait_out); -+ -+ mutex_lock(&ir->dev_lock); -+ usb_kill_urb(ir->urb_in); -+ usb_free_urb(ir->urb_in); -+ usb_alloc_coherent(dev, ir->len_in, ir->buf_in, ir->dma_in); -+ mutex_unlock(&ir->dev_lock); -+ -+ unregister_from_lirc(ir); -+} -+ -+static int mceusb_dev_suspend(struct usb_interface *intf, pm_message_t message) -+{ -+ struct mceusb_dev *ir = usb_get_intfdata(intf); -+ dev_info(ir->d->dev, "suspend\n"); -+ usb_kill_urb(ir->urb_in); -+ return 0; -+} -+ -+static int mceusb_dev_resume(struct usb_interface *intf) -+{ -+ struct mceusb_dev *ir = usb_get_intfdata(intf); -+ dev_info(ir->d->dev, "resume\n"); -+ if (usb_submit_urb(ir->urb_in, GFP_ATOMIC)) -+ return -EIO; -+ return 0; -+} -+ -+static struct usb_driver mceusb_dev_driver = { -+ .name = DRIVER_NAME, -+ .probe = mceusb_dev_probe, -+ .disconnect = mceusb_dev_disconnect, -+ .suspend = mceusb_dev_suspend, -+ .resume = mceusb_dev_resume, -+ .reset_resume = mceusb_dev_resume, -+ .id_table = mceusb_dev_table -+}; -+ -+static int __init mceusb_dev_init(void) -+{ -+ int i; -+ -+ printk(KERN_INFO DRIVER_NAME ": " DRIVER_DESC " " DRIVER_VERSION "\n"); -+ printk(KERN_INFO DRIVER_NAME ": " DRIVER_AUTHOR "\n"); -+ if (debug) -+ printk(KERN_DEBUG DRIVER_NAME ": debug mode enabled\n"); -+ -+ i = usb_register(&mceusb_dev_driver); -+ if (i < 0) { -+ printk(KERN_ERR DRIVER_NAME -+ ": usb register failed, result = %d\n", i); -+ return -ENODEV; -+ } -+ -+ return 0; -+} -+ -+static void __exit mceusb_dev_exit(void) -+{ -+ usb_deregister(&mceusb_dev_driver); -+} -+ -+module_init(mceusb_dev_init); -+module_exit(mceusb_dev_exit); -+ -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_AUTHOR(DRIVER_AUTHOR); -+MODULE_LICENSE("GPL"); -+MODULE_DEVICE_TABLE(usb, mceusb_dev_table); -+/* this was originally lirc_mceusb2, lirc_mceusb and lirc_mceusb2 merged now */ -+MODULE_ALIAS("lirc_mceusb2"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Debug enabled or not"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_parallel.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_parallel.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_parallel.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_parallel.c 2010-08-02 09:28:03.957927009 +0200 -@@ -0,0 +1,709 @@ -+/* -+ * lirc_parallel.c -+ * -+ * lirc_parallel - device driver for infra-red signal receiving and -+ * transmitting unit built by the author -+ * -+ * Copyright (C) 1998 Christoph Bartelmus -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+/*** Includes ***/ -+ -+#ifdef CONFIG_SMP -+#error "--- Sorry, this driver is not SMP safe. ---" -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+#include "lirc_parallel.h" -+ -+#define LIRC_DRIVER_NAME "lirc_parallel" -+ -+#ifndef LIRC_IRQ -+#define LIRC_IRQ 7 -+#endif -+#ifndef LIRC_PORT -+#define LIRC_PORT 0x378 -+#endif -+#ifndef LIRC_TIMER -+#define LIRC_TIMER 65536 -+#endif -+ -+/*** Global Variables ***/ -+ -+static int debug; -+static int check_pselecd; -+ -+unsigned int irq = LIRC_IRQ; -+unsigned int io = LIRC_PORT; -+#ifdef LIRC_TIMER -+unsigned int timer; -+unsigned int default_timer = LIRC_TIMER; -+#endif -+ -+#define WBUF_SIZE (256) -+#define RBUF_SIZE (256) /* this must be a power of 2 larger than 1 */ -+ -+static int wbuf[WBUF_SIZE]; -+static int rbuf[RBUF_SIZE]; -+ -+DECLARE_WAIT_QUEUE_HEAD(lirc_wait); -+ -+unsigned int rptr; -+unsigned int wptr; -+unsigned int lost_irqs; -+int is_open; -+ -+struct parport *pport; -+struct pardevice *ppdevice; -+int is_claimed; -+ -+unsigned int tx_mask = 1; -+ -+/*** Internal Functions ***/ -+ -+static unsigned int in(int offset) -+{ -+ switch (offset) { -+ case LIRC_LP_BASE: -+ return parport_read_data(pport); -+ case LIRC_LP_STATUS: -+ return parport_read_status(pport); -+ case LIRC_LP_CONTROL: -+ return parport_read_control(pport); -+ } -+ return 0; /* make compiler happy */ -+} -+ -+static void out(int offset, int value) -+{ -+ switch (offset) { -+ case LIRC_LP_BASE: -+ parport_write_data(pport, value); -+ break; -+ case LIRC_LP_CONTROL: -+ parport_write_control(pport, value); -+ break; -+ case LIRC_LP_STATUS: -+ printk(KERN_INFO "%s: attempt to write to status register\n", -+ LIRC_DRIVER_NAME); -+ break; -+ } -+} -+ -+static unsigned int lirc_get_timer(void) -+{ -+ return in(LIRC_PORT_TIMER) & LIRC_PORT_TIMER_BIT; -+} -+ -+static unsigned int lirc_get_signal(void) -+{ -+ return in(LIRC_PORT_SIGNAL) & LIRC_PORT_SIGNAL_BIT; -+} -+ -+static void lirc_on(void) -+{ -+ out(LIRC_PORT_DATA, tx_mask); -+} -+ -+static void lirc_off(void) -+{ -+ out(LIRC_PORT_DATA, 0); -+} -+ -+static unsigned int init_lirc_timer(void) -+{ -+ struct timeval tv, now; -+ unsigned int level, newlevel, timeelapsed, newtimer; -+ int count = 0; -+ -+ do_gettimeofday(&tv); -+ tv.tv_sec++; /* wait max. 1 sec. */ -+ level = lirc_get_timer(); -+ do { -+ newlevel = lirc_get_timer(); -+ if (level == 0 && newlevel != 0) -+ count++; -+ level = newlevel; -+ do_gettimeofday(&now); -+ } while (count < 1000 && (now.tv_sec < tv.tv_sec -+ || (now.tv_sec == tv.tv_sec -+ && now.tv_usec < tv.tv_usec))); -+ -+ timeelapsed = ((now.tv_sec + 1 - tv.tv_sec)*1000000 -+ + (now.tv_usec - tv.tv_usec)); -+ if (count >= 1000 && timeelapsed > 0) { -+ if (default_timer == 0) { -+ /* autodetect timer */ -+ newtimer = (1000000*count)/timeelapsed; -+ printk(KERN_INFO "%s: %u Hz timer detected\n", -+ LIRC_DRIVER_NAME, newtimer); -+ return newtimer; -+ } else { -+ newtimer = (1000000*count)/timeelapsed; -+ if (abs(newtimer - default_timer) > default_timer/10) { -+ /* bad timer */ -+ printk(KERN_NOTICE "%s: bad timer: %u Hz\n", -+ LIRC_DRIVER_NAME, newtimer); -+ printk(KERN_NOTICE "%s: using default timer: " -+ "%u Hz\n", -+ LIRC_DRIVER_NAME, default_timer); -+ return default_timer; -+ } else { -+ printk(KERN_INFO "%s: %u Hz timer detected\n", -+ LIRC_DRIVER_NAME, newtimer); -+ return newtimer; /* use detected value */ -+ } -+ } -+ } else { -+ printk(KERN_NOTICE "%s: no timer detected\n", LIRC_DRIVER_NAME); -+ return 0; -+ } -+} -+ -+static int lirc_claim(void) -+{ -+ if (parport_claim(ppdevice) != 0) { -+ printk(KERN_WARNING "%s: could not claim port\n", -+ LIRC_DRIVER_NAME); -+ printk(KERN_WARNING "%s: waiting for port becoming available" -+ "\n", LIRC_DRIVER_NAME); -+ if (parport_claim_or_block(ppdevice) < 0) { -+ printk(KERN_NOTICE "%s: could not claim port, giving" -+ " up\n", LIRC_DRIVER_NAME); -+ return 0; -+ } -+ } -+ out(LIRC_LP_CONTROL, LP_PSELECP|LP_PINITP); -+ is_claimed = 1; -+ return 1; -+} -+ -+/*** interrupt handler ***/ -+ -+static void rbuf_write(int signal) -+{ -+ unsigned int nwptr; -+ -+ nwptr = (wptr + 1) & (RBUF_SIZE - 1); -+ if (nwptr == rptr) { -+ /* no new signals will be accepted */ -+ lost_irqs++; -+ printk(KERN_NOTICE "%s: buffer overrun\n", LIRC_DRIVER_NAME); -+ return; -+ } -+ rbuf[wptr] = signal; -+ wptr = nwptr; -+} -+ -+static void irq_handler(void *blah) -+{ -+ struct timeval tv; -+ static struct timeval lasttv; -+ static int init; -+ long signal; -+ int data; -+ unsigned int level, newlevel; -+ unsigned int timeout; -+ -+ if (!module_refcount(THIS_MODULE)) -+ return; -+ -+ if (!is_claimed) -+ return; -+ -+#if 0 -+ /* disable interrupt */ -+ disable_irq(irq); -+ out(LIRC_PORT_IRQ, in(LIRC_PORT_IRQ) & (~LP_PINTEN)); -+#endif -+ if (check_pselecd && (in(1) & LP_PSELECD)) -+ return; -+ -+#ifdef LIRC_TIMER -+ if (init) { -+ do_gettimeofday(&tv); -+ -+ signal = tv.tv_sec - lasttv.tv_sec; -+ if (signal > 15) -+ /* really long time */ -+ data = PULSE_MASK; -+ else -+ data = (int) (signal*1000000 + -+ tv.tv_usec - lasttv.tv_usec + -+ LIRC_SFH506_DELAY); -+ -+ rbuf_write(data); /* space */ -+ } else { -+ if (timer == 0) { -+ /* -+ * wake up; we'll lose this signal, but it will be -+ * garbage if the device is turned on anyway -+ */ -+ timer = init_lirc_timer(); -+ /* enable_irq(irq); */ -+ return; -+ } -+ init = 1; -+ } -+ -+ timeout = timer/10; /* timeout after 1/10 sec. */ -+ signal = 1; -+ level = lirc_get_timer(); -+ do { -+ newlevel = lirc_get_timer(); -+ if (level == 0 && newlevel != 0) -+ signal++; -+ level = newlevel; -+ -+ /* giving up */ -+ if (signal > timeout -+ || (check_pselecd && (in(1) & LP_PSELECD))) { -+ signal = 0; -+ printk(KERN_NOTICE "%s: timeout\n", LIRC_DRIVER_NAME); -+ break; -+ } -+ } while (lirc_get_signal()); -+ -+ if (signal != 0) { -+ /* ajust value to usecs */ -+ unsigned long long helper; -+ -+ helper = ((unsigned long long) signal)*1000000; -+ do_div(helper, timer); -+ signal = (long) helper; -+ -+ if (signal > LIRC_SFH506_DELAY) -+ data = signal - LIRC_SFH506_DELAY; -+ else -+ data = 1; -+ rbuf_write(PULSE_BIT|data); /* pulse */ -+ } -+ do_gettimeofday(&lasttv); -+#else -+ /* add your code here */ -+#endif -+ -+ wake_up_interruptible(&lirc_wait); -+ -+ /* enable interrupt */ -+ /* -+ enable_irq(irq); -+ out(LIRC_PORT_IRQ, in(LIRC_PORT_IRQ)|LP_PINTEN); -+ */ -+} -+ -+/*** file operations ***/ -+ -+static loff_t lirc_lseek(struct file *filep, loff_t offset, int orig) -+{ -+ return -ESPIPE; -+} -+ -+static ssize_t lirc_read(struct file *filep, char *buf, size_t n, loff_t *ppos) -+{ -+ int result = 0; -+ int count = 0; -+ DECLARE_WAITQUEUE(wait, current); -+ -+ if (n % sizeof(int)) -+ return -EINVAL; -+ -+ add_wait_queue(&lirc_wait, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ while (count < n) { -+ if (rptr != wptr) { -+ if (copy_to_user(buf+count, (char *) &rbuf[rptr], -+ sizeof(int))) { -+ result = -EFAULT; -+ break; -+ } -+ rptr = (rptr + 1) & (RBUF_SIZE - 1); -+ count += sizeof(int); -+ } else { -+ if (filep->f_flags & O_NONBLOCK) { -+ result = -EAGAIN; -+ break; -+ } -+ if (signal_pending(current)) { -+ result = -ERESTARTSYS; -+ break; -+ } -+ schedule(); -+ set_current_state(TASK_INTERRUPTIBLE); -+ } -+ } -+ remove_wait_queue(&lirc_wait, &wait); -+ set_current_state(TASK_RUNNING); -+ return count ? count : result; -+} -+ -+static ssize_t lirc_write(struct file *filep, const char *buf, size_t n, -+ loff_t *ppos) -+{ -+ int count; -+ unsigned int i; -+ unsigned int level, newlevel; -+ unsigned long flags; -+ int counttimer; -+ -+ if (!is_claimed) -+ return -EBUSY; -+ -+ if (n % sizeof(int)) -+ return -EINVAL; -+ -+ count = n / sizeof(int); -+ -+ if (count > WBUF_SIZE || count % 2 == 0) -+ return -EINVAL; -+ -+ if (copy_from_user(wbuf, buf, n)) -+ return -EFAULT; -+ -+#ifdef LIRC_TIMER -+ if (timer == 0) { -+ /* try again if device is ready */ -+ timer = init_lirc_timer(); -+ if (timer == 0) -+ return -EIO; -+ } -+ -+ /* adjust values from usecs */ -+ for (i = 0; i < count; i++) { -+ unsigned long long helper; -+ -+ helper = ((unsigned long long) wbuf[i])*timer; -+ do_div(helper, 1000000); -+ wbuf[i] = (int) helper; -+ } -+ -+ local_irq_save(flags); -+ i = 0; -+ while (i < count) { -+ level = lirc_get_timer(); -+ counttimer = 0; -+ lirc_on(); -+ do { -+ newlevel = lirc_get_timer(); -+ if (level == 0 && newlevel != 0) -+ counttimer++; -+ level = newlevel; -+ if (check_pselecd && (in(1) & LP_PSELECD)) { -+ lirc_off(); -+ local_irq_restore(flags); -+ return -EIO; -+ } -+ } while (counttimer < wbuf[i]); -+ i++; -+ -+ lirc_off(); -+ if (i == count) -+ break; -+ counttimer = 0; -+ do { -+ newlevel = lirc_get_timer(); -+ if (level == 0 && newlevel != 0) -+ counttimer++; -+ level = newlevel; -+ if (check_pselecd && (in(1) & LP_PSELECD)) { -+ local_irq_restore(flags); -+ return -EIO; -+ } -+ } while (counttimer < wbuf[i]); -+ i++; -+ } -+ local_irq_restore(flags); -+#else -+ /* place code that handles write without external timer here */ -+#endif -+ return n; -+} -+ -+static unsigned int lirc_poll(struct file *file, poll_table *wait) -+{ -+ poll_wait(file, &lirc_wait, wait); -+ if (rptr != wptr) -+ return POLLIN | POLLRDNORM; -+ return 0; -+} -+ -+static int lirc_ioctl(struct inode *node, struct file *filep, unsigned int cmd, -+ unsigned long arg) -+{ -+ int result; -+ unsigned long features = LIRC_CAN_SET_TRANSMITTER_MASK | -+ LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2; -+ unsigned long mode; -+ unsigned int ivalue; -+ -+ switch (cmd) { -+ case LIRC_GET_FEATURES: -+ result = put_user(features, (unsigned long *) arg); -+ if (result) -+ return result; -+ break; -+ case LIRC_GET_SEND_MODE: -+ result = put_user(LIRC_MODE_PULSE, (unsigned long *) arg); -+ if (result) -+ return result; -+ break; -+ case LIRC_GET_REC_MODE: -+ result = put_user(LIRC_MODE_MODE2, (unsigned long *) arg); -+ if (result) -+ return result; -+ break; -+ case LIRC_SET_SEND_MODE: -+ result = get_user(mode, (unsigned long *) arg); -+ if (result) -+ return result; -+ if (mode != LIRC_MODE_PULSE) -+ return -EINVAL; -+ break; -+ case LIRC_SET_REC_MODE: -+ result = get_user(mode, (unsigned long *) arg); -+ if (result) -+ return result; -+ if (mode != LIRC_MODE_MODE2) -+ return -ENOSYS; -+ break; -+ case LIRC_SET_TRANSMITTER_MASK: -+ result = get_user(ivalue, (unsigned int *) arg); -+ if (result) -+ return result; -+ if ((ivalue & LIRC_PARALLEL_TRANSMITTER_MASK) != ivalue) -+ return LIRC_PARALLEL_MAX_TRANSMITTERS; -+ tx_mask = ivalue; -+ break; -+ default: -+ return -ENOIOCTLCMD; -+ } -+ return 0; -+} -+ -+static int lirc_open(struct inode *node, struct file *filep) -+{ -+ if (module_refcount(THIS_MODULE) || !lirc_claim()) -+ return -EBUSY; -+ -+ parport_enable_irq(pport); -+ -+ /* init read ptr */ -+ rptr = 0; -+ wptr = 0; -+ lost_irqs = 0; -+ -+ is_open = 1; -+ return 0; -+} -+ -+static int lirc_close(struct inode *node, struct file *filep) -+{ -+ if (is_claimed) { -+ is_claimed = 0; -+ parport_release(ppdevice); -+ } -+ is_open = 0; -+ return 0; -+} -+ -+static struct file_operations lirc_fops = { -+ .owner = THIS_MODULE, -+ .llseek = lirc_lseek, -+ .read = lirc_read, -+ .write = lirc_write, -+ .poll = lirc_poll, -+ .ioctl = lirc_ioctl, -+ .open = lirc_open, -+ .release = lirc_close -+}; -+ -+static int set_use_inc(void *data) -+{ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+} -+ -+static struct lirc_driver driver = { -+ .name = LIRC_DRIVER_NAME, -+ .minor = -1, -+ .code_length = 1, -+ .sample_rate = 0, -+ .data = NULL, -+ .add_to_buf = NULL, -+ .set_use_inc = set_use_inc, -+ .set_use_dec = set_use_dec, -+ .fops = &lirc_fops, -+ .dev = NULL, -+ .owner = THIS_MODULE, -+}; -+ -+static int pf(void *handle); -+static void kf(void *handle); -+ -+static struct timer_list poll_timer; -+static void poll_state(unsigned long ignored); -+ -+static void poll_state(unsigned long ignored) -+{ -+ printk(KERN_NOTICE "%s: time\n", -+ LIRC_DRIVER_NAME); -+ del_timer(&poll_timer); -+ if (is_claimed) -+ return; -+ kf(NULL); -+ if (!is_claimed) { -+ printk(KERN_NOTICE "%s: could not claim port, giving up\n", -+ LIRC_DRIVER_NAME); -+ init_timer(&poll_timer); -+ poll_timer.expires = jiffies + HZ; -+ poll_timer.data = (unsigned long)current; -+ poll_timer.function = poll_state; -+ add_timer(&poll_timer); -+ } -+} -+ -+static int pf(void *handle) -+{ -+ parport_disable_irq(pport); -+ is_claimed = 0; -+ return 0; -+} -+ -+static void kf(void *handle) -+{ -+ if (!is_open) -+ return; -+ if (!lirc_claim()) -+ return; -+ parport_enable_irq(pport); -+ lirc_off(); -+ /* this is a bit annoying when you actually print...*/ -+ /* -+ printk(KERN_INFO "%s: reclaimed port\n", LIRC_DRIVER_NAME); -+ */ -+} -+ -+/*** module initialization and cleanup ***/ -+ -+static int __init lirc_parallel_init(void) -+{ -+ pport = parport_find_base(io); -+ if (pport == NULL) { -+ printk(KERN_NOTICE "%s: no port at %x found\n", -+ LIRC_DRIVER_NAME, io); -+ return -ENXIO; -+ } -+ ppdevice = parport_register_device(pport, LIRC_DRIVER_NAME, -+ pf, kf, irq_handler, 0, NULL); -+ parport_put_port(pport); -+ if (ppdevice == NULL) { -+ printk(KERN_NOTICE "%s: parport_register_device() failed\n", -+ LIRC_DRIVER_NAME); -+ return -ENXIO; -+ } -+ if (parport_claim(ppdevice) != 0) -+ goto skip_init; -+ is_claimed = 1; -+ out(LIRC_LP_CONTROL, LP_PSELECP|LP_PINITP); -+ -+#ifdef LIRC_TIMER -+ if (debug) -+ out(LIRC_PORT_DATA, tx_mask); -+ -+ timer = init_lirc_timer(); -+ -+#if 0 /* continue even if device is offline */ -+ if (timer == 0) { -+ is_claimed = 0; -+ parport_release(pport); -+ parport_unregister_device(ppdevice); -+ return -EIO; -+ } -+ -+#endif -+ if (debug) -+ out(LIRC_PORT_DATA, 0); -+#endif -+ -+ is_claimed = 0; -+ parport_release(ppdevice); -+ skip_init: -+ driver.minor = lirc_register_driver(&driver); -+ if (driver.minor < 0) { -+ printk(KERN_NOTICE "%s: register_chrdev() failed\n", -+ LIRC_DRIVER_NAME); -+ parport_unregister_device(ppdevice); -+ return -EIO; -+ } -+ printk(KERN_INFO "%s: installed using port 0x%04x irq %d\n", -+ LIRC_DRIVER_NAME, io, irq); -+ return 0; -+} -+ -+static void __exit lirc_parallel_exit(void) -+{ -+ parport_unregister_device(ppdevice); -+ lirc_unregister_driver(driver.minor); -+} -+ -+module_init(lirc_parallel_init); -+module_exit(lirc_parallel_exit); -+ -+MODULE_DESCRIPTION("Infrared receiver driver for parallel ports."); -+MODULE_AUTHOR("Christoph Bartelmus"); -+MODULE_LICENSE("GPL"); -+ -+module_param(io, int, S_IRUGO); -+MODULE_PARM_DESC(io, "I/O address base (0x3bc, 0x378 or 0x278)"); -+ -+module_param(irq, int, S_IRUGO); -+MODULE_PARM_DESC(irq, "Interrupt (7 or 5)"); -+ -+module_param(tx_mask, int, S_IRUGO); -+MODULE_PARM_DESC(tx_maxk, "Transmitter mask (default: 0x01)"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -+ -+module_param(check_pselecd, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Check for printer (default: 0)"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_parallel.h linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_parallel.h ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_parallel.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_parallel.h 2010-08-02 09:28:03.958926641 +0200 -@@ -0,0 +1,26 @@ -+/* lirc_parallel.h */ -+ -+#ifndef _LIRC_PARALLEL_H -+#define _LIRC_PARALLEL_H -+ -+#include -+ -+#define LIRC_PORT_LEN 3 -+ -+#define LIRC_LP_BASE 0 -+#define LIRC_LP_STATUS 1 -+#define LIRC_LP_CONTROL 2 -+ -+#define LIRC_PORT_DATA LIRC_LP_BASE /* base */ -+#define LIRC_PORT_TIMER LIRC_LP_STATUS /* status port */ -+#define LIRC_PORT_TIMER_BIT LP_PBUSY /* busy signal */ -+#define LIRC_PORT_SIGNAL LIRC_LP_STATUS /* status port */ -+#define LIRC_PORT_SIGNAL_BIT LP_PACK /* ack signal */ -+#define LIRC_PORT_IRQ LIRC_LP_CONTROL /* control port */ -+ -+#define LIRC_SFH506_DELAY 0 /* delay t_phl in usecs */ -+ -+#define LIRC_PARALLEL_MAX_TRANSMITTERS 8 -+#define LIRC_PARALLEL_TRANSMITTER_MASK ((1< -+ * Tim Davies -+ * -+ * This driver was derived from: -+ * Venky Raju -+ * "lirc_imon - "LIRC/VFD driver for Ahanix/Soundgraph IMON IR/VFD" -+ * Paul Miller 's 2003-2004 -+ * "lirc_atiusb - USB remote support for LIRC" -+ * Culver Consulting Services 's 2003 -+ * "Sasem OnAir VFD/IR USB driver" -+ * -+ * -+ * NOTE - The LCDproc iMon driver should work with this module. More info at -+ * http://www.frogstorm.info/sasem -+ */ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+ -+#define MOD_AUTHOR "Oliver Stabel , " \ -+ "Tim Davies " -+#define MOD_DESC "USB Driver for Sasem Remote Controller V1.1" -+#define MOD_NAME "lirc_sasem" -+#define MOD_VERSION "0.5" -+ -+#define VFD_MINOR_BASE 144 /* Same as LCD */ -+#define DEVICE_NAME "lcd%d" -+ -+#define BUF_CHUNK_SIZE 8 -+#define BUF_SIZE 128 -+ -+#define IOCTL_LCD_CONTRAST 1 -+ -+/*** P R O T O T Y P E S ***/ -+ -+/* USB Callback prototypes */ -+static int sasem_probe(struct usb_interface *interface, -+ const struct usb_device_id *id); -+static void sasem_disconnect(struct usb_interface *interface); -+static void usb_rx_callback(struct urb *urb); -+static void usb_tx_callback(struct urb *urb); -+ -+/* VFD file_operations function prototypes */ -+static int vfd_open(struct inode *inode, struct file *file); -+static int vfd_ioctl(struct inode *inode, struct file *file, -+ unsigned cmd, unsigned long arg); -+static int vfd_close(struct inode *inode, struct file *file); -+static ssize_t vfd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos); -+ -+/* LIRC driver function prototypes */ -+static int ir_open(void *data); -+static void ir_close(void *data); -+ -+/* Driver init/exit prototypes */ -+static int __init sasem_init(void); -+static void __exit sasem_exit(void); -+ -+/*** G L O B A L S ***/ -+ -+struct sasem_context { -+ -+ struct usb_device *dev; -+ int vfd_isopen; /* VFD port has been opened */ -+ unsigned int vfd_contrast; /* VFD contrast */ -+ int ir_isopen; /* IR port has been opened */ -+ int dev_present; /* USB device presence */ -+ struct mutex ctx_lock; /* to lock this object */ -+ wait_queue_head_t remove_ok; /* For unexpected USB disconnects */ -+ -+ struct lirc_driver *driver; -+ struct usb_endpoint_descriptor *rx_endpoint; -+ struct usb_endpoint_descriptor *tx_endpoint; -+ struct urb *rx_urb; -+ struct urb *tx_urb; -+ unsigned char usb_rx_buf[8]; -+ unsigned char usb_tx_buf[8]; -+ -+ struct tx_t { -+ unsigned char data_buf[32]; /* user data buffer */ -+ struct completion finished; /* wait for write to finish */ -+ atomic_t busy; /* write in progress */ -+ int status; /* status of tx completion */ -+ } tx; -+ -+ /* for dealing with repeat codes (wish there was a toggle bit!) */ -+ struct timeval presstime; -+ char lastcode[8]; -+ int codesaved; -+}; -+ -+/* VFD file operations */ -+static struct file_operations vfd_fops = { -+ .owner = THIS_MODULE, -+ .open = &vfd_open, -+ .write = &vfd_write, -+ .ioctl = &vfd_ioctl, -+ .release = &vfd_close, -+}; -+ -+/* USB Device ID for Sasem USB Control Board */ -+static struct usb_device_id sasem_usb_id_table[] = { -+ /* Sasem USB Control Board */ -+ { USB_DEVICE(0x11ba, 0x0101) }, -+ /* Terminating entry */ -+ {} -+}; -+ -+/* USB Device data */ -+static struct usb_driver sasem_driver = { -+ .name = MOD_NAME, -+ .probe = sasem_probe, -+ .disconnect = sasem_disconnect, -+ .id_table = sasem_usb_id_table, -+}; -+ -+static struct usb_class_driver sasem_class = { -+ .name = DEVICE_NAME, -+ .fops = &vfd_fops, -+ .minor_base = VFD_MINOR_BASE, -+}; -+ -+/* to prevent races between open() and disconnect() */ -+static DEFINE_MUTEX(disconnect_lock); -+ -+static int debug; -+ -+ -+/*** M O D U L E C O D E ***/ -+ -+MODULE_AUTHOR(MOD_AUTHOR); -+MODULE_DESCRIPTION(MOD_DESC); -+MODULE_LICENSE("GPL"); -+module_param(debug, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes (default: no)"); -+ -+static void delete_context(struct sasem_context *context) -+{ -+ usb_free_urb(context->tx_urb); /* VFD */ -+ usb_free_urb(context->rx_urb); /* IR */ -+ lirc_buffer_free(context->driver->rbuf); -+ kfree(context->driver->rbuf); -+ kfree(context->driver); -+ kfree(context); -+ -+ if (debug) -+ printk(KERN_INFO "%s: context deleted\n", __func__); -+} -+ -+static void deregister_from_lirc(struct sasem_context *context) -+{ -+ int retval; -+ int minor = context->driver->minor; -+ -+ retval = lirc_unregister_driver(minor); -+ if (retval) -+ err("%s: unable to deregister from lirc (%d)", -+ __func__, retval); -+ else -+ printk(KERN_INFO "Deregistered Sasem driver (minor:%d)\n", -+ minor); -+ -+} -+ -+/** -+ * Called when the VFD device (e.g. /dev/usb/lcd) -+ * is opened by the application. -+ */ -+static int vfd_open(struct inode *inode, struct file *file) -+{ -+ struct usb_interface *interface; -+ struct sasem_context *context = NULL; -+ int subminor; -+ int retval = 0; -+ -+ /* prevent races with disconnect */ -+ mutex_lock(&disconnect_lock); -+ -+ subminor = iminor(inode); -+ interface = usb_find_interface(&sasem_driver, subminor); -+ if (!interface) { -+ err("%s: could not find interface for minor %d", -+ __func__, subminor); -+ retval = -ENODEV; -+ goto exit; -+ } -+ context = usb_get_intfdata(interface); -+ -+ if (!context) { -+ err("%s: no context found for minor %d", -+ __func__, subminor); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (context->vfd_isopen) { -+ err("%s: VFD port is already open", __func__); -+ retval = -EBUSY; -+ } else { -+ context->vfd_isopen = 1; -+ file->private_data = context; -+ printk(KERN_INFO "VFD port opened\n"); -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ -+exit: -+ mutex_unlock(&disconnect_lock); -+ return retval; -+} -+ -+/** -+ * Called when the VFD device (e.g. /dev/usb/lcd) -+ * is closed by the application. -+ */ -+static int vfd_ioctl(struct inode *inode, struct file *file, -+ unsigned cmd, unsigned long arg) -+{ -+ struct sasem_context *context = NULL; -+ -+ context = (struct sasem_context *) file->private_data; -+ -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ switch (cmd) { -+ case IOCTL_LCD_CONTRAST: -+ if (arg > 1000) -+ arg = 1000; -+ context->vfd_contrast = (unsigned int)arg; -+ break; -+ default: -+ printk(KERN_INFO "Unknown IOCTL command\n"); -+ mutex_unlock(&context->ctx_lock); -+ return -ENOIOCTLCMD; /* not supported */ -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ return 0; -+} -+ -+/** -+ * Called when the VFD device (e.g. /dev/usb/lcd) -+ * is closed by the application. -+ */ -+static int vfd_close(struct inode *inode, struct file *file) -+{ -+ struct sasem_context *context = NULL; -+ int retval = 0; -+ -+ context = (struct sasem_context *) file->private_data; -+ -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (!context->vfd_isopen) { -+ err("%s: VFD is not open", __func__); -+ retval = -EIO; -+ } else { -+ context->vfd_isopen = 0; -+ printk(KERN_INFO "VFD port closed\n"); -+ if (!context->dev_present && !context->ir_isopen) { -+ -+ /* Device disconnected before close and IR port is -+ * not open. If IR port is open, context will be -+ * deleted by ir_close. */ -+ mutex_unlock(&context->ctx_lock); -+ delete_context(context); -+ return retval; -+ } -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ return retval; -+} -+ -+/** -+ * Sends a packet to the VFD. -+ */ -+static int send_packet(struct sasem_context *context) -+{ -+ unsigned int pipe; -+ int interval = 0; -+ int retval = 0; -+ -+ pipe = usb_sndintpipe(context->dev, -+ context->tx_endpoint->bEndpointAddress); -+ interval = context->tx_endpoint->bInterval; -+ -+ usb_fill_int_urb(context->tx_urb, context->dev, pipe, -+ context->usb_tx_buf, sizeof(context->usb_tx_buf), -+ usb_tx_callback, context, interval); -+ -+ context->tx_urb->actual_length = 0; -+ -+ init_completion(&context->tx.finished); -+ atomic_set(&(context->tx.busy), 1); -+ -+ retval = usb_submit_urb(context->tx_urb, GFP_KERNEL); -+ if (retval) { -+ atomic_set(&(context->tx.busy), 0); -+ err("%s: error submitting urb (%d)", __func__, retval); -+ } else { -+ /* Wait for transmission to complete (or abort) */ -+ mutex_unlock(&context->ctx_lock); -+ wait_for_completion(&context->tx.finished); -+ mutex_lock(&context->ctx_lock); -+ -+ retval = context->tx.status; -+ if (retval) -+ err("%s: packet tx failed (%d)", __func__, retval); -+ } -+ -+ return retval; -+} -+ -+/** -+ * Writes data to the VFD. The Sasem VFD is 2x16 characters -+ * and requires data in 9 consecutive USB interrupt packets, -+ * each packet carrying 8 bytes. -+ */ -+static ssize_t vfd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos) -+{ -+ int i; -+ int retval = 0; -+ struct sasem_context *context; -+ -+ context = (struct sasem_context *) file->private_data; -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (!context->dev_present) { -+ err("%s: no Sasem device present", __func__); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ if (n_bytes <= 0 || n_bytes > 32) { -+ err("%s: invalid payload size", __func__); -+ retval = -EINVAL; -+ goto exit; -+ } -+ -+ retval = copy_from_user(context->tx.data_buf, buf, n_bytes); -+ if (retval < 0) -+ goto exit; -+ -+ /* Pad with spaces */ -+ for (i = n_bytes; i < 32; ++i) -+ context->tx.data_buf[i] = ' '; -+ -+ /* Nine 8 byte packets to be sent */ -+ /* NOTE: "\x07\x01\0\0\0\0\0\0" or "\x0c\0\0\0\0\0\0\0" -+ * will clear the VFD */ -+ for (i = 0; i < 9; i++) { -+ switch (i) { -+ case 0: -+ memcpy(context->usb_tx_buf, "\x07\0\0\0\0\0\0\0", 8); -+ context->usb_tx_buf[1] = (context->vfd_contrast) ? -+ (0x2B - (context->vfd_contrast - 1) / 250) -+ : 0x2B; -+ break; -+ case 1: -+ memcpy(context->usb_tx_buf, "\x09\x01\0\0\0\0\0\0", 8); -+ break; -+ case 2: -+ memcpy(context->usb_tx_buf, "\x0b\x01\0\0\0\0\0\0", 8); -+ break; -+ case 3: -+ memcpy(context->usb_tx_buf, context->tx.data_buf, 8); -+ break; -+ case 4: -+ memcpy(context->usb_tx_buf, -+ context->tx.data_buf + 8, 8); -+ break; -+ case 5: -+ memcpy(context->usb_tx_buf, "\x09\x01\0\0\0\0\0\0", 8); -+ break; -+ case 6: -+ memcpy(context->usb_tx_buf, "\x0b\x02\0\0\0\0\0\0", 8); -+ break; -+ case 7: -+ memcpy(context->usb_tx_buf, -+ context->tx.data_buf + 16, 8); -+ break; -+ case 8: -+ memcpy(context->usb_tx_buf, -+ context->tx.data_buf + 24, 8); -+ break; -+ } -+ retval = send_packet(context); -+ if (retval) { -+ -+ err("%s: send packet failed for packet #%d", -+ __func__, i); -+ goto exit; -+ } -+ } -+exit: -+ -+ mutex_unlock(&context->ctx_lock); -+ -+ return (!retval) ? n_bytes : retval; -+} -+ -+/** -+ * Callback function for USB core API: transmit data -+ */ -+static void usb_tx_callback(struct urb *urb) -+{ -+ struct sasem_context *context; -+ -+ if (!urb) -+ return; -+ context = (struct sasem_context *) urb->context; -+ if (!context) -+ return; -+ -+ context->tx.status = urb->status; -+ -+ /* notify waiters that write has finished */ -+ atomic_set(&context->tx.busy, 0); -+ complete(&context->tx.finished); -+ -+ return; -+} -+ -+/** -+ * Called by lirc_dev when the application opens /dev/lirc -+ */ -+static int ir_open(void *data) -+{ -+ int retval = 0; -+ struct sasem_context *context; -+ -+ /* prevent races with disconnect */ -+ mutex_lock(&disconnect_lock); -+ -+ context = (struct sasem_context *) data; -+ -+ mutex_lock(&context->ctx_lock); -+ -+ if (context->ir_isopen) { -+ err("%s: IR port is already open", __func__); -+ retval = -EBUSY; -+ goto exit; -+ } -+ -+ usb_fill_int_urb(context->rx_urb, context->dev, -+ usb_rcvintpipe(context->dev, -+ context->rx_endpoint->bEndpointAddress), -+ context->usb_rx_buf, sizeof(context->usb_rx_buf), -+ usb_rx_callback, context, context->rx_endpoint->bInterval); -+ -+ retval = usb_submit_urb(context->rx_urb, GFP_KERNEL); -+ -+ if (retval) -+ err("%s: usb_submit_urb failed for ir_open (%d)", -+ __func__, retval); -+ else { -+ context->ir_isopen = 1; -+ printk(KERN_INFO "IR port opened\n"); -+ } -+ -+exit: -+ mutex_unlock(&context->ctx_lock); -+ -+ mutex_unlock(&disconnect_lock); -+ return 0; -+} -+ -+/** -+ * Called by lirc_dev when the application closes /dev/lirc -+ */ -+static void ir_close(void *data) -+{ -+ struct sasem_context *context; -+ -+ context = (struct sasem_context *)data; -+ if (!context) { -+ err("%s: no context for device", __func__); -+ return; -+ } -+ -+ mutex_lock(&context->ctx_lock); -+ -+ usb_kill_urb(context->rx_urb); -+ context->ir_isopen = 0; -+ printk(KERN_INFO "IR port closed\n"); -+ -+ if (!context->dev_present) { -+ -+ /* -+ * Device disconnected while IR port was -+ * still open. Driver was not deregistered -+ * at disconnect time, so do it now. -+ */ -+ deregister_from_lirc(context); -+ -+ if (!context->vfd_isopen) { -+ -+ mutex_unlock(&context->ctx_lock); -+ delete_context(context); -+ return; -+ } -+ /* If VFD port is open, context will be deleted by vfd_close */ -+ } -+ -+ mutex_unlock(&context->ctx_lock); -+ return; -+} -+ -+/** -+ * Process the incoming packet -+ */ -+static void incoming_packet(struct sasem_context *context, -+ struct urb *urb) -+{ -+ int len = urb->actual_length; -+ unsigned char *buf = urb->transfer_buffer; -+ long ms; -+ struct timeval tv; -+ -+ if (len != 8) { -+ printk(KERN_WARNING "%s: invalid incoming packet size (%d)\n", -+ __func__, len); -+ return; -+ } -+ -+#ifdef DEBUG -+ int i; -+ for (i = 0; i < 8; ++i) -+ printk(KERN_INFO "%02x ", buf[i]); -+ printk(KERN_INFO "\n"); -+#endif -+ -+ /* -+ * Lirc could deal with the repeat code, but we really need to block it -+ * if it arrives too late. Otherwise we could repeat the wrong code. -+ */ -+ -+ /* get the time since the last button press */ -+ do_gettimeofday(&tv); -+ ms = (tv.tv_sec - context->presstime.tv_sec) * 1000 + -+ (tv.tv_usec - context->presstime.tv_usec) / 1000; -+ -+ if (memcmp(buf, "\x08\0\0\0\0\0\0\0", 8) == 0) { -+ /* -+ * the repeat code is being sent, so we copy -+ * the old code to LIRC -+ */ -+ -+ /* -+ * NOTE: Only if the last code was less than 250ms ago -+ * - no one should be able to push another (undetected) button -+ * in that time and then get a false repeat of the previous -+ * press but it is long enough for a genuine repeat -+ */ -+ if ((ms < 250) && (context->codesaved != 0)) { -+ memcpy(buf, &context->lastcode, 8); -+ context->presstime.tv_sec = tv.tv_sec; -+ context->presstime.tv_usec = tv.tv_usec; -+ } -+ } else { -+ /* save the current valid code for repeats */ -+ memcpy(&context->lastcode, buf, 8); -+ /* -+ * set flag to signal a valid code was save; -+ * just for safety reasons -+ */ -+ context->codesaved = 1; -+ context->presstime.tv_sec = tv.tv_sec; -+ context->presstime.tv_usec = tv.tv_usec; -+ } -+ -+ lirc_buffer_write(context->driver->rbuf, buf); -+ wake_up(&context->driver->rbuf->wait_poll); -+} -+ -+/** -+ * Callback function for USB core API: receive data -+ */ -+static void usb_rx_callback(struct urb *urb) -+{ -+ struct sasem_context *context; -+ -+ if (!urb) -+ return; -+ context = (struct sasem_context *) urb->context; -+ if (!context) -+ return; -+ -+ switch (urb->status) { -+ -+ case -ENOENT: /* usbcore unlink successful! */ -+ return; -+ -+ case 0: -+ if (context->ir_isopen) -+ incoming_packet(context, urb); -+ break; -+ -+ default: -+ printk(KERN_WARNING "%s: status (%d): ignored", -+ __func__, urb->status); -+ break; -+ } -+ -+ usb_submit_urb(context->rx_urb, GFP_ATOMIC); -+ return; -+} -+ -+ -+ -+/** -+ * Callback function for USB core API: Probe -+ */ -+static int sasem_probe(struct usb_interface *interface, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *dev = NULL; -+ struct usb_host_interface *iface_desc = NULL; -+ struct usb_endpoint_descriptor *rx_endpoint = NULL; -+ struct usb_endpoint_descriptor *tx_endpoint = NULL; -+ struct urb *rx_urb = NULL; -+ struct urb *tx_urb = NULL; -+ struct lirc_driver *driver = NULL; -+ struct lirc_buffer *rbuf = NULL; -+ int lirc_minor = 0; -+ int num_endpoints; -+ int retval = 0; -+ int vfd_ep_found; -+ int ir_ep_found; -+ int alloc_status; -+ struct sasem_context *context = NULL; -+ int i; -+ -+ printk(KERN_INFO "%s: found Sasem device\n", __func__); -+ -+ -+ dev = usb_get_dev(interface_to_usbdev(interface)); -+ iface_desc = interface->cur_altsetting; -+ num_endpoints = iface_desc->desc.bNumEndpoints; -+ -+ /* -+ * Scan the endpoint list and set: -+ * first input endpoint = IR endpoint -+ * first output endpoint = VFD endpoint -+ */ -+ -+ ir_ep_found = 0; -+ vfd_ep_found = 0; -+ -+ for (i = 0; i < num_endpoints && !(ir_ep_found && vfd_ep_found); ++i) { -+ -+ struct usb_endpoint_descriptor *ep; -+ int ep_dir; -+ int ep_type; -+ ep = &iface_desc->endpoint [i].desc; -+ ep_dir = ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK; -+ ep_type = ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; -+ -+ if (!ir_ep_found && -+ ep_dir == USB_DIR_IN && -+ ep_type == USB_ENDPOINT_XFER_INT) { -+ -+ rx_endpoint = ep; -+ ir_ep_found = 1; -+ if (debug) -+ printk(KERN_INFO "%s: found IR endpoint\n", -+ __func__); -+ -+ } else if (!vfd_ep_found && -+ ep_dir == USB_DIR_OUT && -+ ep_type == USB_ENDPOINT_XFER_INT) { -+ -+ tx_endpoint = ep; -+ vfd_ep_found = 1; -+ if (debug) -+ printk(KERN_INFO "%s: found VFD endpoint\n", -+ __func__); -+ } -+ } -+ -+ /* Input endpoint is mandatory */ -+ if (!ir_ep_found) { -+ -+ err("%s: no valid input (IR) endpoint found.", __func__); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ if (!vfd_ep_found) -+ printk(KERN_INFO "%s: no valid output (VFD) endpoint found.\n", -+ __func__); -+ -+ -+ /* Allocate memory */ -+ alloc_status = 0; -+ -+ context = kzalloc(sizeof(struct sasem_context), GFP_KERNEL); -+ if (!context) { -+ err("%s: kzalloc failed for context", __func__); -+ alloc_status = 1; -+ goto alloc_status_switch; -+ } -+ driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); -+ if (!driver) { -+ err("%s: kzalloc failed for lirc_driver", __func__); -+ alloc_status = 2; -+ goto alloc_status_switch; -+ } -+ rbuf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!rbuf) { -+ err("%s: kmalloc failed for lirc_buffer", __func__); -+ alloc_status = 3; -+ goto alloc_status_switch; -+ } -+ if (lirc_buffer_init(rbuf, BUF_CHUNK_SIZE, BUF_SIZE)) { -+ err("%s: lirc_buffer_init failed", __func__); -+ alloc_status = 4; -+ goto alloc_status_switch; -+ } -+ rx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!rx_urb) { -+ err("%s: usb_alloc_urb failed for IR urb", __func__); -+ alloc_status = 5; -+ goto alloc_status_switch; -+ } -+ if (vfd_ep_found) { -+ tx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!tx_urb) { -+ err("%s: usb_alloc_urb failed for VFD urb", -+ __func__); -+ alloc_status = 6; -+ goto alloc_status_switch; -+ } -+ } -+ -+ mutex_init(&context->ctx_lock); -+ -+ strcpy(driver->name, MOD_NAME); -+ driver->minor = -1; -+ driver->code_length = 64; -+ driver->sample_rate = 0; -+ driver->features = LIRC_CAN_REC_LIRCCODE; -+ driver->data = context; -+ driver->rbuf = rbuf; -+ driver->set_use_inc = ir_open; -+ driver->set_use_dec = ir_close; -+ driver->dev = &interface->dev; -+ driver->owner = THIS_MODULE; -+ -+ mutex_lock(&context->ctx_lock); -+ -+ lirc_minor = lirc_register_driver(driver); -+ if (lirc_minor < 0) { -+ err("%s: lirc_register_driver failed", __func__); -+ alloc_status = 7; -+ mutex_unlock(&context->ctx_lock); -+ } else -+ printk(KERN_INFO "%s: Registered Sasem driver (minor:%d)\n", -+ __func__, lirc_minor); -+ -+alloc_status_switch: -+ -+ switch (alloc_status) { -+ -+ case 7: -+ if (vfd_ep_found) -+ usb_free_urb(tx_urb); -+ case 6: -+ usb_free_urb(rx_urb); -+ case 5: -+ lirc_buffer_free(rbuf); -+ case 4: -+ kfree(rbuf); -+ case 3: -+ kfree(driver); -+ case 2: -+ kfree(context); -+ context = NULL; -+ case 1: -+ retval = -ENOMEM; -+ goto exit; -+ } -+ -+ /* Needed while unregistering! */ -+ driver->minor = lirc_minor; -+ -+ context->dev = dev; -+ context->dev_present = 1; -+ context->rx_endpoint = rx_endpoint; -+ context->rx_urb = rx_urb; -+ if (vfd_ep_found) { -+ context->tx_endpoint = tx_endpoint; -+ context->tx_urb = tx_urb; -+ context->vfd_contrast = 1000; /* range 0 - 1000 */ -+ } -+ context->driver = driver; -+ -+ usb_set_intfdata(interface, context); -+ -+ if (vfd_ep_found) { -+ -+ if (debug) -+ printk(KERN_INFO "Registering VFD with sysfs\n"); -+ if (usb_register_dev(interface, &sasem_class)) -+ /* Not a fatal error, so ignore */ -+ printk(KERN_INFO "%s: could not get a minor number " -+ "for VFD\n", __func__); -+ } -+ -+ printk(KERN_INFO "%s: Sasem device on usb<%d:%d> initialized\n", -+ __func__, dev->bus->busnum, dev->devnum); -+ -+ mutex_unlock(&context->ctx_lock); -+exit: -+ return retval; -+} -+ -+/** -+ * Callback function for USB core API: disonnect -+ */ -+static void sasem_disconnect(struct usb_interface *interface) -+{ -+ struct sasem_context *context; -+ -+ /* prevent races with ir_open()/vfd_open() */ -+ mutex_lock(&disconnect_lock); -+ -+ context = usb_get_intfdata(interface); -+ mutex_lock(&context->ctx_lock); -+ -+ printk(KERN_INFO "%s: Sasem device disconnected\n", __func__); -+ -+ usb_set_intfdata(interface, NULL); -+ context->dev_present = 0; -+ -+ /* Stop reception */ -+ usb_kill_urb(context->rx_urb); -+ -+ /* Abort ongoing write */ -+ if (atomic_read(&context->tx.busy)) { -+ -+ usb_kill_urb(context->tx_urb); -+ wait_for_completion(&context->tx.finished); -+ } -+ -+ /* De-register from lirc_dev if IR port is not open */ -+ if (!context->ir_isopen) -+ deregister_from_lirc(context); -+ -+ usb_deregister_dev(interface, &sasem_class); -+ -+ mutex_unlock(&context->ctx_lock); -+ -+ if (!context->ir_isopen && !context->vfd_isopen) -+ delete_context(context); -+ -+ mutex_unlock(&disconnect_lock); -+} -+ -+static int __init sasem_init(void) -+{ -+ int rc; -+ -+ printk(KERN_INFO MOD_DESC ", v" MOD_VERSION "\n"); -+ printk(KERN_INFO MOD_AUTHOR "\n"); -+ -+ rc = usb_register(&sasem_driver); -+ if (rc < 0) { -+ err("%s: usb register failed (%d)", __func__, rc); -+ return -ENODEV; -+ } -+ return 0; -+} -+ -+static void __exit sasem_exit(void) -+{ -+ usb_deregister(&sasem_driver); -+ printk(KERN_INFO "module removed. Goodbye!\n"); -+} -+ -+ -+module_init(sasem_init); -+module_exit(sasem_exit); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_serial.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_serial.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_serial.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_serial.c 2010-08-02 09:28:03.961924699 +0200 -@@ -0,0 +1,1317 @@ -+/* -+ * lirc_serial.c -+ * -+ * lirc_serial - Device driver that records pulse- and pause-lengths -+ * (space-lengths) between DDCD event on a serial port. -+ * -+ * Copyright (C) 1996,97 Ralph Metzler -+ * Copyright (C) 1998 Trent Piepho -+ * Copyright (C) 1998 Ben Pfaff -+ * Copyright (C) 1999 Christoph Bartelmus -+ * Copyright (C) 2007 Andrei Tanas (suspend/resume support) -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+/* -+ * Steve's changes to improve transmission fidelity: -+ * - for systems with the rdtsc instruction and the clock counter, a -+ * send_pule that times the pulses directly using the counter. -+ * This means that the LIRC_SERIAL_TRANSMITTER_LATENCY fudge is -+ * not needed. Measurement shows very stable waveform, even where -+ * PCI activity slows the access to the UART, which trips up other -+ * versions. -+ * - For other system, non-integer-microsecond pulse/space lengths, -+ * done using fixed point binary. So, much more accurate carrier -+ * frequency. -+ * - fine tuned transmitter latency, taking advantage of fractional -+ * microseconds in previous change -+ * - Fixed bug in the way transmitter latency was accounted for by -+ * tuning the pulse lengths down - the send_pulse routine ignored -+ * this overhead as it timed the overall pulse length - so the -+ * pulse frequency was right but overall pulse length was too -+ * long. Fixed by accounting for latency on each pulse/space -+ * iteration. -+ * -+ * Steve Davies July 2001 -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+#include -+#endif -+/* From Intel IXP42X Developer's Manual (#252480-005): */ -+/* ftp://download.intel.com/design/network/manuals/25248005.pdf */ -+#define UART_IE_IXP42X_UUE 0x40 /* IXP42X UART Unit enable */ -+#define UART_IE_IXP42X_RTOIE 0x10 /* IXP42X Receiver Data Timeout int.enable */ -+ -+#include -+#include "lirc_dev.h" -+ -+#define LIRC_DRIVER_NAME "lirc_serial" -+ -+struct lirc_serial { -+ int signal_pin; -+ int signal_pin_change; -+ u8 on; -+ u8 off; -+ long (*send_pulse)(unsigned long length); -+ void (*send_space)(long length); -+ int features; -+ spinlock_t lock; -+}; -+ -+#define LIRC_HOMEBREW 0 -+#define LIRC_IRDEO 1 -+#define LIRC_IRDEO_REMOTE 2 -+#define LIRC_ANIMAX 3 -+#define LIRC_IGOR 4 -+#define LIRC_NSLU2 5 -+ -+/*** module parameters ***/ -+static int type; -+static int io; -+static int irq; -+static int iommap; -+static int ioshift; -+static int softcarrier = 1; -+static int share_irq; -+static int debug; -+static int sense = -1; /* -1 = auto, 0 = active high, 1 = active low */ -+static int txsense; /* 0 = active high, 1 = active low */ -+ -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ -+ fmt, ## args); \ -+ } while (0) -+ -+/* forward declarations */ -+static long send_pulse_irdeo(unsigned long length); -+static long send_pulse_homebrew(unsigned long length); -+static void send_space_irdeo(long length); -+static void send_space_homebrew(long length); -+ -+static struct lirc_serial hardware[] = { -+ [LIRC_HOMEBREW] = { -+ .signal_pin = UART_MSR_DCD, -+ .signal_pin_change = UART_MSR_DDCD, -+ .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), -+ .off = (UART_MCR_RTS | UART_MCR_OUT2), -+ .send_pulse = send_pulse_homebrew, -+ .send_space = send_space_homebrew, -+#ifdef CONFIG_LIRC_SERIAL_TRANSMITTER -+ .features = (LIRC_CAN_SET_SEND_DUTY_CYCLE | -+ LIRC_CAN_SET_SEND_CARRIER | -+ LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2) -+#else -+ .features = LIRC_CAN_REC_MODE2 -+#endif -+ }, -+ -+ [LIRC_IRDEO] = { -+ .signal_pin = UART_MSR_DSR, -+ .signal_pin_change = UART_MSR_DDSR, -+ .on = UART_MCR_OUT2, -+ .off = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), -+ .send_pulse = send_pulse_irdeo, -+ .send_space = send_space_irdeo, -+ .features = (LIRC_CAN_SET_SEND_DUTY_CYCLE | -+ LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2) -+ }, -+ -+ [LIRC_IRDEO_REMOTE] = { -+ .signal_pin = UART_MSR_DSR, -+ .signal_pin_change = UART_MSR_DDSR, -+ .on = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), -+ .off = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), -+ .send_pulse = send_pulse_irdeo, -+ .send_space = send_space_irdeo, -+ .features = (LIRC_CAN_SET_SEND_DUTY_CYCLE | -+ LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2) -+ }, -+ -+ [LIRC_ANIMAX] = { -+ .signal_pin = UART_MSR_DCD, -+ .signal_pin_change = UART_MSR_DDCD, -+ .on = 0, -+ .off = (UART_MCR_RTS | UART_MCR_DTR | UART_MCR_OUT2), -+ .send_pulse = NULL, -+ .send_space = NULL, -+ .features = LIRC_CAN_REC_MODE2 -+ }, -+ -+ [LIRC_IGOR] = { -+ .signal_pin = UART_MSR_DSR, -+ .signal_pin_change = UART_MSR_DDSR, -+ .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), -+ .off = (UART_MCR_RTS | UART_MCR_OUT2), -+ .send_pulse = send_pulse_homebrew, -+ .send_space = send_space_homebrew, -+#ifdef CONFIG_LIRC_SERIAL_TRANSMITTER -+ .features = (LIRC_CAN_SET_SEND_DUTY_CYCLE | -+ LIRC_CAN_SET_SEND_CARRIER | -+ LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2) -+#else -+ .features = LIRC_CAN_REC_MODE2 -+#endif -+ }, -+ -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+ /* -+ * Modified Linksys Network Storage Link USB 2.0 (NSLU2): -+ * We receive on CTS of the 2nd serial port (R142,LHS), we -+ * transmit with a IR diode between GPIO[1] (green status LED), -+ * and ground (Matthias Goebl ). -+ * See also http://www.nslu2-linux.org for this device -+ */ -+ [LIRC_NSLU2] = { -+ .signal_pin = UART_MSR_CTS, -+ .signal_pin_change = UART_MSR_DCTS, -+ .on = (UART_MCR_RTS | UART_MCR_OUT2 | UART_MCR_DTR), -+ .off = (UART_MCR_RTS | UART_MCR_OUT2), -+ .send_pulse = send_pulse_homebrew, -+ .send_space = send_space_homebrew, -+#ifdef CONFIG_LIRC_SERIAL_TRANSMITTER -+ .features = (LIRC_CAN_SET_SEND_DUTY_CYCLE | -+ LIRC_CAN_SET_SEND_CARRIER | -+ LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2) -+#else -+ .features = LIRC_CAN_REC_MODE2 -+#endif -+ }, -+#endif -+ -+}; -+ -+#define RS_ISR_PASS_LIMIT 256 -+ -+/* -+ * A long pulse code from a remote might take up to 300 bytes. The -+ * daemon should read the bytes as soon as they are generated, so take -+ * the number of keys you think you can push before the daemon runs -+ * and multiply by 300. The driver will warn you if you overrun this -+ * buffer. If you have a slow computer or non-busmastering IDE disks, -+ * maybe you will need to increase this. -+ */ -+ -+/* This MUST be a power of two! It has to be larger than 1 as well. */ -+ -+#define RBUF_LEN 256 -+#define WBUF_LEN 256 -+ -+static struct timeval lasttv = {0, 0}; -+ -+static struct lirc_buffer rbuf; -+ -+static int wbuf[WBUF_LEN]; -+ -+static unsigned int freq = 38000; -+static unsigned int duty_cycle = 50; -+ -+/* Initialized in init_timing_params() */ -+static unsigned long period; -+static unsigned long pulse_width; -+static unsigned long space_width; -+ -+#if defined(__i386__) -+/* -+ * From: -+ * Linux I/O port programming mini-HOWTO -+ * Author: Riku Saikkonen -+ * v, 28 December 1997 -+ * -+ * [...] -+ * Actually, a port I/O instruction on most ports in the 0-0x3ff range -+ * takes almost exactly 1 microsecond, so if you're, for example, using -+ * the parallel port directly, just do additional inb()s from that port -+ * to delay. -+ * [...] -+ */ -+/* transmitter latency 1.5625us 0x1.90 - this figure arrived at from -+ * comment above plus trimming to match actual measured frequency. -+ * This will be sensitive to cpu speed, though hopefully most of the 1.5us -+ * is spent in the uart access. Still - for reference test machine was a -+ * 1.13GHz Athlon system - Steve -+ */ -+ -+/* -+ * changed from 400 to 450 as this works better on slower machines; -+ * faster machines will use the rdtsc code anyway -+ */ -+#define LIRC_SERIAL_TRANSMITTER_LATENCY 450 -+ -+#else -+ -+/* does anybody have information on other platforms ? */ -+/* 256 = 1<<8 */ -+#define LIRC_SERIAL_TRANSMITTER_LATENCY 256 -+ -+#endif /* __i386__ */ -+/* -+ * FIXME: should we be using hrtimers instead of this -+ * LIRC_SERIAL_TRANSMITTER_LATENCY nonsense? -+ */ -+ -+/* fetch serial input packet (1 byte) from register offset */ -+static u8 sinp(int offset) -+{ -+ if (iommap != 0) -+ /* the register is memory-mapped */ -+ offset <<= ioshift; -+ -+ return inb(io + offset); -+} -+ -+/* write serial output packet (1 byte) of value to register offset */ -+static void soutp(int offset, u8 value) -+{ -+ if (iommap != 0) -+ /* the register is memory-mapped */ -+ offset <<= ioshift; -+ -+ outb(value, io + offset); -+} -+ -+static void on(void) -+{ -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+ /* -+ * On NSLU2, we put the transmit diode between the output of the green -+ * status LED and ground -+ */ -+ if (type == LIRC_NSLU2) { -+ gpio_line_set(NSLU2_LED_GRN, IXP4XX_GPIO_LOW); -+ return; -+ } -+#endif -+ if (txsense) -+ soutp(UART_MCR, hardware[type].off); -+ else -+ soutp(UART_MCR, hardware[type].on); -+} -+ -+static void off(void) -+{ -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+ if (type == LIRC_NSLU2) { -+ gpio_line_set(NSLU2_LED_GRN, IXP4XX_GPIO_HIGH); -+ return; -+ } -+#endif -+ if (txsense) -+ soutp(UART_MCR, hardware[type].on); -+ else -+ soutp(UART_MCR, hardware[type].off); -+} -+ -+#ifndef MAX_UDELAY_MS -+#define MAX_UDELAY_US 5000 -+#else -+#define MAX_UDELAY_US (MAX_UDELAY_MS*1000) -+#endif -+ -+static void safe_udelay(unsigned long usecs) -+{ -+ while (usecs > MAX_UDELAY_US) { -+ udelay(MAX_UDELAY_US); -+ usecs -= MAX_UDELAY_US; -+ } -+ udelay(usecs); -+} -+ -+#ifdef USE_RDTSC -+/* -+ * This is an overflow/precision juggle, complicated in that we can't -+ * do long long divide in the kernel -+ */ -+ -+/* -+ * When we use the rdtsc instruction to measure clocks, we keep the -+ * pulse and space widths as clock cycles. As this is CPU speed -+ * dependent, the widths must be calculated in init_port and ioctl -+ * time -+ */ -+ -+/* So send_pulse can quickly convert microseconds to clocks */ -+static unsigned long conv_us_to_clocks; -+ -+static int init_timing_params(unsigned int new_duty_cycle, -+ unsigned int new_freq) -+{ -+ unsigned long long loops_per_sec, work; -+ -+ duty_cycle = new_duty_cycle; -+ freq = new_freq; -+ -+ loops_per_sec = current_cpu_data.loops_per_jiffy; -+ loops_per_sec *= HZ; -+ -+ /* How many clocks in a microsecond?, avoiding long long divide */ -+ work = loops_per_sec; -+ work *= 4295; /* 4295 = 2^32 / 1e6 */ -+ conv_us_to_clocks = (work >> 32); -+ -+ /* -+ * Carrier period in clocks, approach good up to 32GHz clock, -+ * gets carrier frequency within 8Hz -+ */ -+ period = loops_per_sec >> 3; -+ period /= (freq >> 3); -+ -+ /* Derive pulse and space from the period */ -+ pulse_width = period * duty_cycle / 100; -+ space_width = period - pulse_width; -+ dprintk("in init_timing_params, freq=%d, duty_cycle=%d, " -+ "clk/jiffy=%ld, pulse=%ld, space=%ld, " -+ "conv_us_to_clocks=%ld\n", -+ freq, duty_cycle, current_cpu_data.loops_per_jiffy, -+ pulse_width, space_width, conv_us_to_clocks); -+ return 0; -+} -+#else /* ! USE_RDTSC */ -+static int init_timing_params(unsigned int new_duty_cycle, -+ unsigned int new_freq) -+{ -+/* -+ * period, pulse/space width are kept with 8 binary places - -+ * IE multiplied by 256. -+ */ -+ if (256 * 1000000L / new_freq * new_duty_cycle / 100 <= -+ LIRC_SERIAL_TRANSMITTER_LATENCY) -+ return -EINVAL; -+ if (256 * 1000000L / new_freq * (100 - new_duty_cycle) / 100 <= -+ LIRC_SERIAL_TRANSMITTER_LATENCY) -+ return -EINVAL; -+ duty_cycle = new_duty_cycle; -+ freq = new_freq; -+ period = 256 * 1000000L / freq; -+ pulse_width = period * duty_cycle / 100; -+ space_width = period - pulse_width; -+ dprintk("in init_timing_params, freq=%d pulse=%ld, " -+ "space=%ld\n", freq, pulse_width, space_width); -+ return 0; -+} -+#endif /* USE_RDTSC */ -+ -+ -+/* return value: space length delta */ -+ -+static long send_pulse_irdeo(unsigned long length) -+{ -+ long rawbits, ret; -+ int i; -+ unsigned char output; -+ unsigned char chunk, shifted; -+ -+ /* how many bits have to be sent ? */ -+ rawbits = length * 1152 / 10000; -+ if (duty_cycle > 50) -+ chunk = 3; -+ else -+ chunk = 1; -+ for (i = 0, output = 0x7f; rawbits > 0; rawbits -= 3) { -+ shifted = chunk << (i * 3); -+ shifted >>= 1; -+ output &= (~shifted); -+ i++; -+ if (i == 3) { -+ soutp(UART_TX, output); -+ while (!(sinp(UART_LSR) & UART_LSR_THRE)) -+ ; -+ output = 0x7f; -+ i = 0; -+ } -+ } -+ if (i != 0) { -+ soutp(UART_TX, output); -+ while (!(sinp(UART_LSR) & UART_LSR_TEMT)) -+ ; -+ } -+ -+ if (i == 0) -+ ret = (-rawbits) * 10000 / 1152; -+ else -+ ret = (3 - i) * 3 * 10000 / 1152 + (-rawbits) * 10000 / 1152; -+ -+ return ret; -+} -+ -+#ifdef USE_RDTSC -+/* Version that uses Pentium rdtsc instruction to measure clocks */ -+ -+/* -+ * This version does sub-microsecond timing using rdtsc instruction, -+ * and does away with the fudged LIRC_SERIAL_TRANSMITTER_LATENCY -+ * Implicitly i586 architecture... - Steve -+ */ -+ -+static long send_pulse_homebrew_softcarrier(unsigned long length) -+{ -+ int flag; -+ unsigned long target, start, now; -+ -+ /* Get going quick as we can */ -+ rdtscl(start); -+ on(); -+ /* Convert length from microseconds to clocks */ -+ length *= conv_us_to_clocks; -+ /* And loop till time is up - flipping at right intervals */ -+ now = start; -+ target = pulse_width; -+ flag = 1; -+ /* -+ * FIXME: This looks like a hard busy wait, without even an occasional, -+ * polite, cpu_relax() call. There's got to be a better way? -+ * -+ * The i2c code has the result of a lot of bit-banging work, I wonder if -+ * there's something there which could be helpful here. -+ */ -+ while ((now - start) < length) { -+ /* Delay till flip time */ -+ do { -+ rdtscl(now); -+ } while ((now - start) < target); -+ -+ /* flip */ -+ if (flag) { -+ rdtscl(now); -+ off(); -+ target += space_width; -+ } else { -+ rdtscl(now); on(); -+ target += pulse_width; -+ } -+ flag = !flag; -+ } -+ rdtscl(now); -+ return ((now - start) - length) / conv_us_to_clocks; -+} -+#else /* ! USE_RDTSC */ -+/* Version using udelay() */ -+ -+/* -+ * here we use fixed point arithmetic, with 8 -+ * fractional bits. that gets us within 0.1% or so of the right average -+ * frequency, albeit with some jitter in pulse length - Steve -+ */ -+ -+/* To match 8 fractional bits used for pulse/space length */ -+ -+static long send_pulse_homebrew_softcarrier(unsigned long length) -+{ -+ int flag; -+ unsigned long actual, target, d; -+ length <<= 8; -+ -+ actual = 0; target = 0; flag = 0; -+ while (actual < length) { -+ if (flag) { -+ off(); -+ target += space_width; -+ } else { -+ on(); -+ target += pulse_width; -+ } -+ d = (target - actual - -+ LIRC_SERIAL_TRANSMITTER_LATENCY + 128) >> 8; -+ /* -+ * Note - we've checked in ioctl that the pulse/space -+ * widths are big enough so that d is > 0 -+ */ -+ udelay(d); -+ actual += (d << 8) + LIRC_SERIAL_TRANSMITTER_LATENCY; -+ flag = !flag; -+ } -+ return (actual-length) >> 8; -+} -+#endif /* USE_RDTSC */ -+ -+static long send_pulse_homebrew(unsigned long length) -+{ -+ if (length <= 0) -+ return 0; -+ -+ if (softcarrier) -+ return send_pulse_homebrew_softcarrier(length); -+ else { -+ on(); -+ safe_udelay(length); -+ return 0; -+ } -+} -+ -+static void send_space_irdeo(long length) -+{ -+ if (length <= 0) -+ return; -+ -+ safe_udelay(length); -+} -+ -+static void send_space_homebrew(long length) -+{ -+ off(); -+ if (length <= 0) -+ return; -+ safe_udelay(length); -+} -+ -+static void rbwrite(int l) -+{ -+ if (lirc_buffer_full(&rbuf)) { -+ /* no new signals will be accepted */ -+ dprintk("Buffer overrun\n"); -+ return; -+ } -+ lirc_buffer_write(&rbuf, (void *)&l); -+} -+ -+static void frbwrite(int l) -+{ -+ /* simple noise filter */ -+ static int pulse, space; -+ static unsigned int ptr; -+ -+ if (ptr > 0 && (l & PULSE_BIT)) { -+ pulse += l & PULSE_MASK; -+ if (pulse > 250) { -+ rbwrite(space); -+ rbwrite(pulse | PULSE_BIT); -+ ptr = 0; -+ pulse = 0; -+ } -+ return; -+ } -+ if (!(l & PULSE_BIT)) { -+ if (ptr == 0) { -+ if (l > 20000) { -+ space = l; -+ ptr++; -+ return; -+ } -+ } else { -+ if (l > 20000) { -+ space += pulse; -+ if (space > PULSE_MASK) -+ space = PULSE_MASK; -+ space += l; -+ if (space > PULSE_MASK) -+ space = PULSE_MASK; -+ pulse = 0; -+ return; -+ } -+ rbwrite(space); -+ rbwrite(pulse | PULSE_BIT); -+ ptr = 0; -+ pulse = 0; -+ } -+ } -+ rbwrite(l); -+} -+ -+static irqreturn_t irq_handler(int i, void *blah) -+{ -+ struct timeval tv; -+ int counter, dcd; -+ u8 status; -+ long deltv; -+ int data; -+ static int last_dcd = -1; -+ -+ if ((sinp(UART_IIR) & UART_IIR_NO_INT)) { -+ /* not our interrupt */ -+ return IRQ_NONE; -+ } -+ -+ counter = 0; -+ do { -+ counter++; -+ status = sinp(UART_MSR); -+ if (counter > RS_ISR_PASS_LIMIT) { -+ printk(KERN_WARNING LIRC_DRIVER_NAME ": AIEEEE: " -+ "We're caught!\n"); -+ break; -+ } -+ if ((status & hardware[type].signal_pin_change) -+ && sense != -1) { -+ /* get current time */ -+ do_gettimeofday(&tv); -+ -+ /* New mode, written by Trent Piepho -+ . */ -+ -+ /* -+ * The old format was not very portable. -+ * We now use an int to pass pulses -+ * and spaces to user space. -+ * -+ * If PULSE_BIT is set a pulse has been -+ * received, otherwise a space has been -+ * received. The driver needs to know if your -+ * receiver is active high or active low, or -+ * the space/pulse sense could be -+ * inverted. The bits denoted by PULSE_MASK are -+ * the length in microseconds. Lengths greater -+ * than or equal to 16 seconds are clamped to -+ * PULSE_MASK. All other bits are unused. -+ * This is a much simpler interface for user -+ * programs, as well as eliminating "out of -+ * phase" errors with space/pulse -+ * autodetection. -+ */ -+ -+ /* calc time since last interrupt in microseconds */ -+ dcd = (status & hardware[type].signal_pin) ? 1 : 0; -+ -+ if (dcd == last_dcd) { -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": ignoring spike: %d %d %lx %lx %lx %lx\n", -+ dcd, sense, -+ tv.tv_sec, lasttv.tv_sec, -+ tv.tv_usec, lasttv.tv_usec); -+ continue; -+ } -+ -+ deltv = tv.tv_sec-lasttv.tv_sec; -+ if (tv.tv_sec < lasttv.tv_sec || -+ (tv.tv_sec == lasttv.tv_sec && -+ tv.tv_usec < lasttv.tv_usec)) { -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": AIEEEE: your clock just jumped " -+ "backwards\n"); -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": %d %d %lx %lx %lx %lx\n", -+ dcd, sense, -+ tv.tv_sec, lasttv.tv_sec, -+ tv.tv_usec, lasttv.tv_usec); -+ data = PULSE_MASK; -+ } else if (deltv > 15) { -+ data = PULSE_MASK; /* really long time */ -+ if (!(dcd^sense)) { -+ /* sanity check */ -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": AIEEEE: " -+ "%d %d %lx %lx %lx %lx\n", -+ dcd, sense, -+ tv.tv_sec, lasttv.tv_sec, -+ tv.tv_usec, lasttv.tv_usec); -+ /* -+ * detecting pulse while this -+ * MUST be a space! -+ */ -+ sense = sense ? 0 : 1; -+ } -+ } else -+ data = (int) (deltv*1000000 + -+ tv.tv_usec - -+ lasttv.tv_usec); -+ frbwrite(dcd^sense ? data : (data|PULSE_BIT)); -+ lasttv = tv; -+ last_dcd = dcd; -+ wake_up_interruptible(&rbuf.wait_poll); -+ } -+ } while (!(sinp(UART_IIR) & UART_IIR_NO_INT)); /* still pending ? */ -+ return IRQ_HANDLED; -+} -+ -+ -+static int hardware_init_port(void) -+{ -+ u8 scratch, scratch2, scratch3; -+ -+ /* -+ * This is a simple port existence test, borrowed from the autoconfig -+ * function in drivers/serial/8250.c -+ */ -+ scratch = sinp(UART_IER); -+ soutp(UART_IER, 0); -+#ifdef __i386__ -+ outb(0xff, 0x080); -+#endif -+ scratch2 = sinp(UART_IER) & 0x0f; -+ soutp(UART_IER, 0x0f); -+#ifdef __i386__ -+ outb(0x00, 0x080); -+#endif -+ scratch3 = sinp(UART_IER) & 0x0f; -+ soutp(UART_IER, scratch); -+ if (scratch2 != 0 || scratch3 != 0x0f) { -+ /* we fail, there's nothing here */ -+ printk(KERN_ERR LIRC_DRIVER_NAME ": port existence test " -+ "failed, cannot continue\n"); -+ return -EINVAL; -+ } -+ -+ -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ /* First of all, disable all interrupts */ -+ soutp(UART_IER, sinp(UART_IER) & -+ (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI))); -+ -+ /* Clear registers. */ -+ sinp(UART_LSR); -+ sinp(UART_RX); -+ sinp(UART_IIR); -+ sinp(UART_MSR); -+ -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+ if (type == LIRC_NSLU2) { -+ /* Setup NSLU2 UART */ -+ -+ /* Enable UART */ -+ soutp(UART_IER, sinp(UART_IER) | UART_IE_IXP42X_UUE); -+ /* Disable Receiver data Time out interrupt */ -+ soutp(UART_IER, sinp(UART_IER) & ~UART_IE_IXP42X_RTOIE); -+ /* set out2 = interrupt unmask; off() doesn't set MCR -+ on NSLU2 */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); -+ } -+#endif -+ -+ /* Set line for power source */ -+ off(); -+ -+ /* Clear registers again to be sure. */ -+ sinp(UART_LSR); -+ sinp(UART_RX); -+ sinp(UART_IIR); -+ sinp(UART_MSR); -+ -+ switch (type) { -+ case LIRC_IRDEO: -+ case LIRC_IRDEO_REMOTE: -+ /* setup port to 7N1 @ 115200 Baud */ -+ /* 7N1+start = 9 bits at 115200 ~ 3 bits at 38kHz */ -+ -+ /* Set DLAB 1. */ -+ soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); -+ /* Set divisor to 1 => 115200 Baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 1); -+ /* Set DLAB 0 + 7N1 */ -+ soutp(UART_LCR, UART_LCR_WLEN7); -+ /* THR interrupt already disabled at this point */ -+ break; -+ default: -+ break; -+ } -+ -+ return 0; -+} -+ -+static int init_port(void) -+{ -+ int i, nlow, nhigh; -+ -+ /* Reserve io region. */ -+ /* -+ * Future MMAP-Developers: Attention! -+ * For memory mapped I/O you *might* need to use ioremap() first, -+ * for the NSLU2 it's done in boot code. -+ */ -+ if (((iommap != 0) -+ && (request_mem_region(iommap, 8 << ioshift, -+ LIRC_DRIVER_NAME) == NULL)) -+ || ((iommap == 0) -+ && (request_region(io, 8, LIRC_DRIVER_NAME) == NULL))) { -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": port %04x already in use\n", io); -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": use 'setserial /dev/ttySX uart none'\n"); -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": or compile the serial port driver as module and\n"); -+ printk(KERN_WARNING LIRC_DRIVER_NAME -+ ": make sure this module is loaded first\n"); -+ return -EBUSY; -+ } -+ -+ if (hardware_init_port() < 0) -+ return -EINVAL; -+ -+ /* Initialize pulse/space widths */ -+ init_timing_params(duty_cycle, freq); -+ -+ /* If pin is high, then this must be an active low receiver. */ -+ if (sense == -1) { -+ /* wait 1/2 sec for the power supply */ -+ msleep(500); -+ -+ /* -+ * probe 9 times every 0.04s, collect "votes" for -+ * active high/low -+ */ -+ nlow = 0; -+ nhigh = 0; -+ for (i = 0; i < 9; i++) { -+ if (sinp(UART_MSR) & hardware[type].signal_pin) -+ nlow++; -+ else -+ nhigh++; -+ msleep(40); -+ } -+ sense = (nlow >= nhigh ? 1 : 0); -+ printk(KERN_INFO LIRC_DRIVER_NAME ": auto-detected active " -+ "%s receiver\n", sense ? "low" : "high"); -+ } else -+ printk(KERN_INFO LIRC_DRIVER_NAME ": Manually using active " -+ "%s receiver\n", sense ? "low" : "high"); -+ -+ return 0; -+} -+ -+static int set_use_inc(void *data) -+{ -+ int result; -+ unsigned long flags; -+ -+ /* initialize timestamp */ -+ do_gettimeofday(&lasttv); -+ -+ result = request_irq(irq, irq_handler, -+ IRQF_DISABLED | (share_irq ? IRQF_SHARED : 0), -+ LIRC_DRIVER_NAME, (void *)&hardware); -+ -+ switch (result) { -+ case -EBUSY: -+ printk(KERN_ERR LIRC_DRIVER_NAME ": IRQ %d busy\n", irq); -+ return -EBUSY; -+ case -EINVAL: -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": Bad irq number or handler\n"); -+ return -EINVAL; -+ default: -+ dprintk("Interrupt %d, port %04x obtained\n", irq, io); -+ break; -+ }; -+ -+ spin_lock_irqsave(&hardware[type].lock, flags); -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ soutp(UART_IER, sinp(UART_IER)|UART_IER_MSI); -+ -+ spin_unlock_irqrestore(&hardware[type].lock, flags); -+ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ unsigned long flags; -+ -+ spin_lock_irqsave(&hardware[type].lock, flags); -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ /* First of all, disable all interrupts */ -+ soutp(UART_IER, sinp(UART_IER) & -+ (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI))); -+ spin_unlock_irqrestore(&hardware[type].lock, flags); -+ -+ free_irq(irq, (void *)&hardware); -+ -+ dprintk("freed IRQ %d\n", irq); -+} -+ -+static ssize_t lirc_write(struct file *file, const char *buf, -+ size_t n, loff_t *ppos) -+{ -+ int i, count; -+ unsigned long flags; -+ long delta = 0; -+ -+ if (!(hardware[type].features&LIRC_CAN_SEND_PULSE)) -+ return -EBADF; -+ -+ if (n % sizeof(int)) -+ return -EINVAL; -+ count = n / sizeof(int); -+ if (count > WBUF_LEN || count % 2 == 0) -+ return -EINVAL; -+ if (copy_from_user(wbuf, buf, n)) -+ return -EFAULT; -+ spin_lock_irqsave(&hardware[type].lock, flags); -+ if (type == LIRC_IRDEO) { -+ /* DTR, RTS down */ -+ on(); -+ } -+ for (i = 0; i < count; i++) { -+ if (i%2) -+ hardware[type].send_space(wbuf[i]-delta); -+ else -+ delta = hardware[type].send_pulse(wbuf[i]); -+ } -+ off(); -+ spin_unlock_irqrestore(&hardware[type].lock, flags); -+ return n; -+} -+ -+static int lirc_ioctl(struct inode *node, struct file *filep, unsigned int cmd, -+ unsigned long arg) -+{ -+ int result; -+ unsigned long value; -+ unsigned int ivalue; -+ -+ switch (cmd) { -+ case LIRC_GET_SEND_MODE: -+ if (!(hardware[type].features&LIRC_CAN_SEND_MASK)) -+ return -ENOIOCTLCMD; -+ -+ result = put_user(LIRC_SEND2MODE -+ (hardware[type].features&LIRC_CAN_SEND_MASK), -+ (unsigned long *) arg); -+ if (result) -+ return result; -+ break; -+ -+ case LIRC_SET_SEND_MODE: -+ if (!(hardware[type].features&LIRC_CAN_SEND_MASK)) -+ return -ENOIOCTLCMD; -+ -+ result = get_user(value, (unsigned long *) arg); -+ if (result) -+ return result; -+ /* only LIRC_MODE_PULSE supported */ -+ if (value != LIRC_MODE_PULSE) -+ return -ENOSYS; -+ break; -+ -+ case LIRC_GET_LENGTH: -+ return -ENOSYS; -+ break; -+ -+ case LIRC_SET_SEND_DUTY_CYCLE: -+ dprintk("SET_SEND_DUTY_CYCLE\n"); -+ if (!(hardware[type].features&LIRC_CAN_SET_SEND_DUTY_CYCLE)) -+ return -ENOIOCTLCMD; -+ -+ result = get_user(ivalue, (unsigned int *) arg); -+ if (result) -+ return result; -+ if (ivalue <= 0 || ivalue > 100) -+ return -EINVAL; -+ return init_timing_params(ivalue, freq); -+ break; -+ -+ case LIRC_SET_SEND_CARRIER: -+ dprintk("SET_SEND_CARRIER\n"); -+ if (!(hardware[type].features&LIRC_CAN_SET_SEND_CARRIER)) -+ return -ENOIOCTLCMD; -+ -+ result = get_user(ivalue, (unsigned int *) arg); -+ if (result) -+ return result; -+ if (ivalue > 500000 || ivalue < 20000) -+ return -EINVAL; -+ return init_timing_params(duty_cycle, ivalue); -+ break; -+ -+ default: -+ return lirc_dev_fop_ioctl(node, filep, cmd, arg); -+ } -+ return 0; -+} -+ -+static struct file_operations lirc_fops = { -+ .owner = THIS_MODULE, -+ .write = lirc_write, -+ .ioctl = lirc_ioctl, -+ .read = lirc_dev_fop_read, -+ .poll = lirc_dev_fop_poll, -+ .open = lirc_dev_fop_open, -+ .release = lirc_dev_fop_close, -+}; -+ -+static struct lirc_driver driver = { -+ .name = LIRC_DRIVER_NAME, -+ .minor = -1, -+ .code_length = 1, -+ .sample_rate = 0, -+ .data = NULL, -+ .add_to_buf = NULL, -+ .rbuf = &rbuf, -+ .set_use_inc = set_use_inc, -+ .set_use_dec = set_use_dec, -+ .fops = &lirc_fops, -+ .dev = NULL, -+ .owner = THIS_MODULE, -+}; -+ -+static struct platform_device *lirc_serial_dev; -+ -+static int __devinit lirc_serial_probe(struct platform_device *dev) -+{ -+ return 0; -+} -+ -+static int __devexit lirc_serial_remove(struct platform_device *dev) -+{ -+ return 0; -+} -+ -+static int lirc_serial_suspend(struct platform_device *dev, -+ pm_message_t state) -+{ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ /* Disable all interrupts */ -+ soutp(UART_IER, sinp(UART_IER) & -+ (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI))); -+ -+ /* Clear registers. */ -+ sinp(UART_LSR); -+ sinp(UART_RX); -+ sinp(UART_IIR); -+ sinp(UART_MSR); -+ -+ return 0; -+} -+ -+/* twisty maze... need a forward-declaration here... */ -+static void lirc_serial_exit(void); -+ -+static int lirc_serial_resume(struct platform_device *dev) -+{ -+ unsigned long flags; -+ -+ if (hardware_init_port() < 0) { -+ lirc_serial_exit(); -+ return -EINVAL; -+ } -+ -+ spin_lock_irqsave(&hardware[type].lock, flags); -+ /* Enable Interrupt */ -+ do_gettimeofday(&lasttv); -+ soutp(UART_IER, sinp(UART_IER)|UART_IER_MSI); -+ off(); -+ -+ lirc_buffer_clear(&rbuf); -+ -+ spin_unlock_irqrestore(&hardware[type].lock, flags); -+ -+ return 0; -+} -+ -+static struct platform_driver lirc_serial_driver = { -+ .probe = lirc_serial_probe, -+ .remove = __devexit_p(lirc_serial_remove), -+ .suspend = lirc_serial_suspend, -+ .resume = lirc_serial_resume, -+ .driver = { -+ .name = "lirc_serial", -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init lirc_serial_init(void) -+{ -+ int result; -+ -+ /* Init read buffer. */ -+ result = lirc_buffer_init(&rbuf, sizeof(int), RBUF_LEN); -+ if (result < 0) -+ return -ENOMEM; -+ -+ result = platform_driver_register(&lirc_serial_driver); -+ if (result) { -+ printk("lirc register returned %d\n", result); -+ goto exit_buffer_free; -+ } -+ -+ lirc_serial_dev = platform_device_alloc("lirc_serial", 0); -+ if (!lirc_serial_dev) { -+ result = -ENOMEM; -+ goto exit_driver_unregister; -+ } -+ -+ result = platform_device_add(lirc_serial_dev); -+ if (result) -+ goto exit_device_put; -+ -+ return 0; -+ -+exit_device_put: -+ platform_device_put(lirc_serial_dev); -+exit_driver_unregister: -+ platform_driver_unregister(&lirc_serial_driver); -+exit_buffer_free: -+ lirc_buffer_free(&rbuf); -+ return result; -+} -+ -+static void lirc_serial_exit(void) -+{ -+ platform_device_unregister(lirc_serial_dev); -+ platform_driver_unregister(&lirc_serial_driver); -+ lirc_buffer_free(&rbuf); -+} -+ -+static int __init lirc_serial_init_module(void) -+{ -+ int result; -+ -+ result = lirc_serial_init(); -+ if (result) -+ return result; -+ -+ switch (type) { -+ case LIRC_HOMEBREW: -+ case LIRC_IRDEO: -+ case LIRC_IRDEO_REMOTE: -+ case LIRC_ANIMAX: -+ case LIRC_IGOR: -+ /* if nothing specified, use ttyS0/com1 and irq 4 */ -+ io = io ? io : 0x3f8; -+ irq = irq ? irq : 4; -+ break; -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+ case LIRC_NSLU2: -+ io = io ? io : IRQ_IXP4XX_UART2; -+ irq = irq ? irq : (IXP4XX_UART2_BASE_VIRT + REG_OFFSET); -+ iommap = iommap ? iommap : IXP4XX_UART2_BASE_PHYS; -+ ioshift = ioshift ? ioshift : 2; -+ break; -+#endif -+ default: -+ result = -EINVAL; -+ goto exit_serial_exit; -+ } -+ if (!softcarrier) { -+ switch (type) { -+ case LIRC_HOMEBREW: -+ case LIRC_IGOR: -+#ifdef CONFIG_LIRC_SERIAL_NSLU2 -+ case LIRC_NSLU2: -+#endif -+ hardware[type].features &= -+ ~(LIRC_CAN_SET_SEND_DUTY_CYCLE| -+ LIRC_CAN_SET_SEND_CARRIER); -+ break; -+ } -+ } -+ -+ result = init_port(); -+ if (result < 0) -+ goto exit_serial_exit; -+ driver.features = hardware[type].features; -+ driver.dev = &lirc_serial_dev->dev; -+ driver.minor = lirc_register_driver(&driver); -+ if (driver.minor < 0) { -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": register_chrdev failed!\n"); -+ result = -EIO; -+ goto exit_release; -+ } -+ return 0; -+exit_release: -+ release_region(io, 8); -+exit_serial_exit: -+ lirc_serial_exit(); -+ return result; -+} -+ -+static void __exit lirc_serial_exit_module(void) -+{ -+ lirc_serial_exit(); -+ if (iommap != 0) -+ release_mem_region(iommap, 8 << ioshift); -+ else -+ release_region(io, 8); -+ lirc_unregister_driver(driver.minor); -+ dprintk("cleaned up module\n"); -+} -+ -+ -+module_init(lirc_serial_init_module); -+module_exit(lirc_serial_exit_module); -+ -+MODULE_DESCRIPTION("Infra-red receiver driver for serial ports."); -+MODULE_AUTHOR("Ralph Metzler, Trent Piepho, Ben Pfaff, " -+ "Christoph Bartelmus, Andrei Tanas"); -+MODULE_LICENSE("GPL"); -+ -+module_param(type, int, S_IRUGO); -+MODULE_PARM_DESC(type, "Hardware type (0 = home-brew, 1 = IRdeo," -+ " 2 = IRdeo Remote, 3 = AnimaX, 4 = IgorPlug," -+ " 5 = NSLU2 RX:CTS2/TX:GreenLED)"); -+ -+module_param(io, int, S_IRUGO); -+MODULE_PARM_DESC(io, "I/O address base (0x3f8 or 0x2f8)"); -+ -+/* some architectures (e.g. intel xscale) have memory mapped registers */ -+module_param(iommap, bool, S_IRUGO); -+MODULE_PARM_DESC(iommap, "physical base for memory mapped I/O" -+ " (0 = no memory mapped io)"); -+ -+/* -+ * some architectures (e.g. intel xscale) align the 8bit serial registers -+ * on 32bit word boundaries. -+ * See linux-kernel/serial/8250.c serial_in()/out() -+ */ -+module_param(ioshift, int, S_IRUGO); -+MODULE_PARM_DESC(ioshift, "shift I/O register offset (0 = no shift)"); -+ -+module_param(irq, int, S_IRUGO); -+MODULE_PARM_DESC(irq, "Interrupt (4 or 3)"); -+ -+module_param(share_irq, bool, S_IRUGO); -+MODULE_PARM_DESC(share_irq, "Share interrupts (0 = off, 1 = on)"); -+ -+module_param(sense, bool, S_IRUGO); -+MODULE_PARM_DESC(sense, "Override autodetection of IR receiver circuit" -+ " (0 = active high, 1 = active low )"); -+ -+#ifdef CONFIG_LIRC_SERIAL_TRANSMITTER -+module_param(txsense, bool, S_IRUGO); -+MODULE_PARM_DESC(txsense, "Sense of transmitter circuit" -+ " (0 = active high, 1 = active low )"); -+#endif -+ -+module_param(softcarrier, bool, S_IRUGO); -+MODULE_PARM_DESC(softcarrier, "Software carrier (0 = off, 1 = on, default on)"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_sir.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_sir.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_sir.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_sir.c 2010-08-02 09:28:03.981051171 +0200 -@@ -0,0 +1,1283 @@ -+/* -+ * LIRC SIR driver, (C) 2000 Milan Pikula -+ * -+ * lirc_sir - Device driver for use with SIR (serial infra red) -+ * mode of IrDA on many notebooks. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ * -+ * 2000/09/16 Frank Przybylski : -+ * added timeout and relaxed pulse detection, removed gap bug -+ * -+ * 2000/12/15 Christoph Bartelmus : -+ * added support for Tekram Irmate 210 (sending does not work yet, -+ * kind of disappointing that nobody was able to implement that -+ * before), -+ * major clean-up -+ * -+ * 2001/02/27 Christoph Bartelmus : -+ * added support for StrongARM SA1100 embedded microprocessor -+ * parts cut'n'pasted from sa1100_ir.c (C) 2000 Russell King -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#ifdef LIRC_ON_SA1100 -+#include -+#ifdef CONFIG_SA1100_COLLIE -+#include -+#include -+#endif -+#endif -+ -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+/* SECTION: Definitions */ -+ -+/*** Tekram dongle ***/ -+#ifdef LIRC_SIR_TEKRAM -+/* stolen from kernel source */ -+/* definitions for Tekram dongle */ -+#define TEKRAM_115200 0x00 -+#define TEKRAM_57600 0x01 -+#define TEKRAM_38400 0x02 -+#define TEKRAM_19200 0x03 -+#define TEKRAM_9600 0x04 -+#define TEKRAM_2400 0x08 -+ -+#define TEKRAM_PW 0x10 /* Pulse select bit */ -+ -+/* 10bit * 1s/115200bit in milliseconds = 87ms*/ -+#define TIME_CONST (10000000ul/115200ul) -+ -+#endif -+ -+#ifdef LIRC_SIR_ACTISYS_ACT200L -+static void init_act200(void); -+#elif defined(LIRC_SIR_ACTISYS_ACT220L) -+static void init_act220(void); -+#endif -+ -+/*** SA1100 ***/ -+#ifdef LIRC_ON_SA1100 -+struct sa1100_ser2_registers { -+ /* HSSP control register */ -+ unsigned char hscr0; -+ /* UART registers */ -+ unsigned char utcr0; -+ unsigned char utcr1; -+ unsigned char utcr2; -+ unsigned char utcr3; -+ unsigned char utcr4; -+ unsigned char utdr; -+ unsigned char utsr0; -+ unsigned char utsr1; -+} sr; -+ -+static int irq = IRQ_Ser2ICP; -+ -+#define LIRC_ON_SA1100_TRANSMITTER_LATENCY 0 -+ -+/* pulse/space ratio of 50/50 */ -+static unsigned long pulse_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY); -+/* 1000000/freq-pulse_width */ -+static unsigned long space_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY); -+static unsigned int freq = 38000; /* modulation frequency */ -+static unsigned int duty_cycle = 50; /* duty cycle of 50% */ -+ -+#endif -+ -+#define RBUF_LEN 1024 -+#define WBUF_LEN 1024 -+ -+#define LIRC_DRIVER_NAME "lirc_sir" -+ -+#define PULSE '[' -+ -+#ifndef LIRC_SIR_TEKRAM -+/* 9bit * 1s/115200bit in milli seconds = 78.125ms*/ -+#define TIME_CONST (9000000ul/115200ul) -+#endif -+ -+ -+/* timeout for sequences in jiffies (=5/100s), must be longer than TIME_CONST */ -+#define SIR_TIMEOUT (HZ*5/100) -+ -+#ifndef LIRC_ON_SA1100 -+#ifndef LIRC_IRQ -+#define LIRC_IRQ 4 -+#endif -+#ifndef LIRC_PORT -+/* for external dongles, default to com1 */ -+#if defined(LIRC_SIR_ACTISYS_ACT200L) || \ -+ defined(LIRC_SIR_ACTISYS_ACT220L) || \ -+ defined(LIRC_SIR_TEKRAM) -+#define LIRC_PORT 0x3f8 -+#else -+/* onboard sir ports are typically com3 */ -+#define LIRC_PORT 0x3e8 -+#endif -+#endif -+ -+static int io = LIRC_PORT; -+static int irq = LIRC_IRQ; -+static int threshold = 3; -+#endif -+ -+static DEFINE_SPINLOCK(timer_lock); -+static struct timer_list timerlist; -+/* time of last signal change detected */ -+static struct timeval last_tv = {0, 0}; -+/* time of last UART data ready interrupt */ -+static struct timeval last_intr_tv = {0, 0}; -+static int last_value; -+ -+static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue); -+ -+static DEFINE_SPINLOCK(hardware_lock); -+ -+static int rx_buf[RBUF_LEN]; -+static unsigned int rx_tail, rx_head; -+static int tx_buf[WBUF_LEN]; -+ -+static int debug; -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ -+ fmt, ## args); \ -+ } while (0) -+ -+/* SECTION: Prototypes */ -+ -+/* Communication with user-space */ -+static unsigned int lirc_poll(struct file *file, poll_table *wait); -+static ssize_t lirc_read(struct file *file, char *buf, size_t count, -+ loff_t *ppos); -+static ssize_t lirc_write(struct file *file, const char *buf, size_t n, -+ loff_t *pos); -+static int lirc_ioctl(struct inode *node, struct file *filep, unsigned int cmd, -+ unsigned long arg); -+static void add_read_queue(int flag, unsigned long val); -+static int init_chrdev(void); -+static void drop_chrdev(void); -+/* Hardware */ -+static irqreturn_t sir_interrupt(int irq, void *dev_id); -+static void send_space(unsigned long len); -+static void send_pulse(unsigned long len); -+static int init_hardware(void); -+static void drop_hardware(void); -+/* Initialisation */ -+static int init_port(void); -+static void drop_port(void); -+ -+#ifdef LIRC_ON_SA1100 -+static void on(void) -+{ -+ PPSR |= PPC_TXD2; -+} -+ -+static void off(void) -+{ -+ PPSR &= ~PPC_TXD2; -+} -+#else -+static inline unsigned int sinp(int offset) -+{ -+ return inb(io + offset); -+} -+ -+static inline void soutp(int offset, int value) -+{ -+ outb(value, io + offset); -+} -+#endif -+ -+#ifndef MAX_UDELAY_MS -+#define MAX_UDELAY_US 5000 -+#else -+#define MAX_UDELAY_US (MAX_UDELAY_MS*1000) -+#endif -+ -+static void safe_udelay(unsigned long usecs) -+{ -+ while (usecs > MAX_UDELAY_US) { -+ udelay(MAX_UDELAY_US); -+ usecs -= MAX_UDELAY_US; -+ } -+ udelay(usecs); -+} -+ -+/* SECTION: Communication with user-space */ -+ -+static unsigned int lirc_poll(struct file *file, poll_table *wait) -+{ -+ poll_wait(file, &lirc_read_queue, wait); -+ if (rx_head != rx_tail) -+ return POLLIN | POLLRDNORM; -+ return 0; -+} -+ -+static ssize_t lirc_read(struct file *file, char *buf, size_t count, -+ loff_t *ppos) -+{ -+ int n = 0; -+ int retval = 0; -+ DECLARE_WAITQUEUE(wait, current); -+ -+ if (count % sizeof(int)) -+ return -EINVAL; -+ -+ add_wait_queue(&lirc_read_queue, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ while (n < count) { -+ if (rx_head != rx_tail) { -+ if (copy_to_user((void *) buf + n, -+ (void *) (rx_buf + rx_head), -+ sizeof(int))) { -+ retval = -EFAULT; -+ break; -+ } -+ rx_head = (rx_head + 1) & (RBUF_LEN - 1); -+ n += sizeof(int); -+ } else { -+ if (file->f_flags & O_NONBLOCK) { -+ retval = -EAGAIN; -+ break; -+ } -+ if (signal_pending(current)) { -+ retval = -ERESTARTSYS; -+ break; -+ } -+ schedule(); -+ set_current_state(TASK_INTERRUPTIBLE); -+ } -+ } -+ remove_wait_queue(&lirc_read_queue, &wait); -+ set_current_state(TASK_RUNNING); -+ return n ? n : retval; -+} -+static ssize_t lirc_write(struct file *file, const char *buf, size_t n, -+ loff_t *pos) -+{ -+ unsigned long flags; -+ int i; -+ -+ if (n % sizeof(int) || (n / sizeof(int)) > WBUF_LEN) -+ return -EINVAL; -+ if (copy_from_user(tx_buf, buf, n)) -+ return -EFAULT; -+ i = 0; -+ n /= sizeof(int); -+#ifdef LIRC_ON_SA1100 -+ /* disable receiver */ -+ Ser2UTCR3 = 0; -+#endif -+ local_irq_save(flags); -+ while (1) { -+ if (i >= n) -+ break; -+ if (tx_buf[i]) -+ send_pulse(tx_buf[i]); -+ i++; -+ if (i >= n) -+ break; -+ if (tx_buf[i]) -+ send_space(tx_buf[i]); -+ i++; -+ } -+ local_irq_restore(flags); -+#ifdef LIRC_ON_SA1100 -+ off(); -+ udelay(1000); /* wait 1ms for IR diode to recover */ -+ Ser2UTCR3 = 0; -+ /* clear status register to prevent unwanted interrupts */ -+ Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); -+ /* enable receiver */ -+ Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE; -+#endif -+ return n; -+} -+ -+static int lirc_ioctl(struct inode *node, struct file *filep, unsigned int cmd, -+ unsigned long arg) -+{ -+ int retval = 0; -+ unsigned long value = 0; -+#ifdef LIRC_ON_SA1100 -+ unsigned int ivalue; -+ -+ if (cmd == LIRC_GET_FEATURES) -+ value = LIRC_CAN_SEND_PULSE | -+ LIRC_CAN_SET_SEND_DUTY_CYCLE | -+ LIRC_CAN_SET_SEND_CARRIER | -+ LIRC_CAN_REC_MODE2; -+ else if (cmd == LIRC_GET_SEND_MODE) -+ value = LIRC_MODE_PULSE; -+ else if (cmd == LIRC_GET_REC_MODE) -+ value = LIRC_MODE_MODE2; -+#else -+ if (cmd == LIRC_GET_FEATURES) -+ value = LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2; -+ else if (cmd == LIRC_GET_SEND_MODE) -+ value = LIRC_MODE_PULSE; -+ else if (cmd == LIRC_GET_REC_MODE) -+ value = LIRC_MODE_MODE2; -+#endif -+ -+ switch (cmd) { -+ case LIRC_GET_FEATURES: -+ case LIRC_GET_SEND_MODE: -+ case LIRC_GET_REC_MODE: -+ retval = put_user(value, (unsigned long *) arg); -+ break; -+ -+ case LIRC_SET_SEND_MODE: -+ case LIRC_SET_REC_MODE: -+ retval = get_user(value, (unsigned long *) arg); -+ break; -+#ifdef LIRC_ON_SA1100 -+ case LIRC_SET_SEND_DUTY_CYCLE: -+ retval = get_user(ivalue, (unsigned int *) arg); -+ if (retval) -+ return retval; -+ if (ivalue <= 0 || ivalue > 100) -+ return -EINVAL; -+ /* (ivalue/100)*(1000000/freq) */ -+ duty_cycle = ivalue; -+ pulse_width = (unsigned long) duty_cycle*10000/freq; -+ space_width = (unsigned long) 1000000L/freq-pulse_width; -+ if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) -+ pulse_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; -+ if (space_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) -+ space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; -+ break; -+ case LIRC_SET_SEND_CARRIER: -+ retval = get_user(ivalue, (unsigned int *) arg); -+ if (retval) -+ return retval; -+ if (ivalue > 500000 || ivalue < 20000) -+ return -EINVAL; -+ freq = ivalue; -+ pulse_width = (unsigned long) duty_cycle*10000/freq; -+ space_width = (unsigned long) 1000000L/freq-pulse_width; -+ if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) -+ pulse_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; -+ if (space_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY) -+ space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY; -+ break; -+#endif -+ default: -+ retval = -ENOIOCTLCMD; -+ -+ } -+ -+ if (retval) -+ return retval; -+ if (cmd == LIRC_SET_REC_MODE) { -+ if (value != LIRC_MODE_MODE2) -+ retval = -ENOSYS; -+ } else if (cmd == LIRC_SET_SEND_MODE) { -+ if (value != LIRC_MODE_PULSE) -+ retval = -ENOSYS; -+ } -+ -+ return retval; -+} -+ -+static void add_read_queue(int flag, unsigned long val) -+{ -+ unsigned int new_rx_tail; -+ int newval; -+ -+ dprintk("add flag %d with val %lu\n", flag, val); -+ -+ newval = val & PULSE_MASK; -+ -+ /* -+ * statistically, pulses are ~TIME_CONST/2 too long. we could -+ * maybe make this more exact, but this is good enough -+ */ -+ if (flag) { -+ /* pulse */ -+ if (newval > TIME_CONST/2) -+ newval -= TIME_CONST/2; -+ else /* should not ever happen */ -+ newval = 1; -+ newval |= PULSE_BIT; -+ } else { -+ newval += TIME_CONST/2; -+ } -+ new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1); -+ if (new_rx_tail == rx_head) { -+ dprintk("Buffer overrun.\n"); -+ return; -+ } -+ rx_buf[rx_tail] = newval; -+ rx_tail = new_rx_tail; -+ wake_up_interruptible(&lirc_read_queue); -+} -+ -+static struct file_operations lirc_fops = { -+ .owner = THIS_MODULE, -+ .read = lirc_read, -+ .write = lirc_write, -+ .poll = lirc_poll, -+ .ioctl = lirc_ioctl, -+ .open = lirc_dev_fop_open, -+ .release = lirc_dev_fop_close, -+}; -+ -+static int set_use_inc(void *data) -+{ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+} -+ -+static struct lirc_driver driver = { -+ .name = LIRC_DRIVER_NAME, -+ .minor = -1, -+ .code_length = 1, -+ .sample_rate = 0, -+ .data = NULL, -+ .add_to_buf = NULL, -+ .set_use_inc = set_use_inc, -+ .set_use_dec = set_use_dec, -+ .fops = &lirc_fops, -+ .dev = NULL, -+ .owner = THIS_MODULE, -+}; -+ -+ -+static int init_chrdev(void) -+{ -+ driver.minor = lirc_register_driver(&driver); -+ if (driver.minor < 0) { -+ printk(KERN_ERR LIRC_DRIVER_NAME ": init_chrdev() failed.\n"); -+ return -EIO; -+ } -+ return 0; -+} -+ -+static void drop_chrdev(void) -+{ -+ lirc_unregister_driver(driver.minor); -+} -+ -+/* SECTION: Hardware */ -+static long delta(struct timeval *tv1, struct timeval *tv2) -+{ -+ unsigned long deltv; -+ -+ deltv = tv2->tv_sec - tv1->tv_sec; -+ if (deltv > 15) -+ deltv = 0xFFFFFF; -+ else -+ deltv = deltv*1000000 + -+ tv2->tv_usec - -+ tv1->tv_usec; -+ return deltv; -+} -+ -+static void sir_timeout(unsigned long data) -+{ -+ /* -+ * if last received signal was a pulse, but receiving stopped -+ * within the 9 bit frame, we need to finish this pulse and -+ * simulate a signal change to from pulse to space. Otherwise -+ * upper layers will receive two sequences next time. -+ */ -+ -+ unsigned long flags; -+ unsigned long pulse_end; -+ -+ /* avoid interference with interrupt */ -+ spin_lock_irqsave(&timer_lock, flags); -+ if (last_value) { -+#ifndef LIRC_ON_SA1100 -+ /* clear unread bits in UART and restart */ -+ outb(UART_FCR_CLEAR_RCVR, io + UART_FCR); -+#endif -+ /* determine 'virtual' pulse end: */ -+ pulse_end = delta(&last_tv, &last_intr_tv); -+ dprintk("timeout add %d for %lu usec\n", last_value, pulse_end); -+ add_read_queue(last_value, pulse_end); -+ last_value = 0; -+ last_tv = last_intr_tv; -+ } -+ spin_unlock_irqrestore(&timer_lock, flags); -+} -+ -+static irqreturn_t sir_interrupt(int irq, void *dev_id) -+{ -+ unsigned char data; -+ struct timeval curr_tv; -+ static unsigned long deltv; -+#ifdef LIRC_ON_SA1100 -+ int status; -+ static int n; -+ -+ status = Ser2UTSR0; -+ /* -+ * Deal with any receive errors first. The bytes in error may be -+ * the only bytes in the receive FIFO, so we do this first. -+ */ -+ while (status & UTSR0_EIF) { -+ int bstat; -+ -+ if (debug) { -+ dprintk("EIF\n"); -+ bstat = Ser2UTSR1; -+ -+ if (bstat & UTSR1_FRE) -+ dprintk("frame error\n"); -+ if (bstat & UTSR1_ROR) -+ dprintk("receive fifo overrun\n"); -+ if (bstat & UTSR1_PRE) -+ dprintk("parity error\n"); -+ } -+ -+ bstat = Ser2UTDR; -+ n++; -+ status = Ser2UTSR0; -+ } -+ -+ if (status & (UTSR0_RFS | UTSR0_RID)) { -+ do_gettimeofday(&curr_tv); -+ deltv = delta(&last_tv, &curr_tv); -+ do { -+ data = Ser2UTDR; -+ dprintk("%d data: %u\n", n, (unsigned int) data); -+ n++; -+ } while (status & UTSR0_RID && /* do not empty fifo in order to -+ * get UTSR0_RID in any case */ -+ Ser2UTSR1 & UTSR1_RNE); /* data ready */ -+ -+ if (status&UTSR0_RID) { -+ add_read_queue(0 , deltv - n * TIME_CONST); /*space*/ -+ add_read_queue(1, n * TIME_CONST); /*pulse*/ -+ n = 0; -+ last_tv = curr_tv; -+ } -+ } -+ -+ if (status & UTSR0_TFS) -+ printk(KERN_ERR "transmit fifo not full, shouldn't happen\n"); -+ -+ /* We must clear certain bits. */ -+ status &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); -+ if (status) -+ Ser2UTSR0 = status; -+#else -+ unsigned long deltintrtv; -+ unsigned long flags; -+ int iir, lsr; -+ -+ while ((iir = inb(io + UART_IIR) & UART_IIR_ID)) { -+ switch (iir&UART_IIR_ID) { /* FIXME toto treba preriedit */ -+ case UART_IIR_MSI: -+ (void) inb(io + UART_MSR); -+ break; -+ case UART_IIR_RLSI: -+ (void) inb(io + UART_LSR); -+ break; -+ case UART_IIR_THRI: -+#if 0 -+ if (lsr & UART_LSR_THRE) /* FIFO is empty */ -+ outb(data, io + UART_TX) -+#endif -+ break; -+ case UART_IIR_RDI: -+ /* avoid interference with timer */ -+ spin_lock_irqsave(&timer_lock, flags); -+ do { -+ del_timer(&timerlist); -+ data = inb(io + UART_RX); -+ do_gettimeofday(&curr_tv); -+ deltv = delta(&last_tv, &curr_tv); -+ deltintrtv = delta(&last_intr_tv, &curr_tv); -+ dprintk("t %lu, d %d\n", deltintrtv, (int)data); -+ /* -+ * if nothing came in last X cycles, -+ * it was gap -+ */ -+ if (deltintrtv > TIME_CONST * threshold) { -+ if (last_value) { -+ dprintk("GAP\n"); -+ /* simulate signal change */ -+ add_read_queue(last_value, -+ deltv - -+ deltintrtv); -+ last_value = 0; -+ last_tv.tv_sec = -+ last_intr_tv.tv_sec; -+ last_tv.tv_usec = -+ last_intr_tv.tv_usec; -+ deltv = deltintrtv; -+ } -+ } -+ data = 1; -+ if (data ^ last_value) { -+ /* -+ * deltintrtv > 2*TIME_CONST, remember? -+ * the other case is timeout -+ */ -+ add_read_queue(last_value, -+ deltv-TIME_CONST); -+ last_value = data; -+ last_tv = curr_tv; -+ if (last_tv.tv_usec >= TIME_CONST) { -+ last_tv.tv_usec -= TIME_CONST; -+ } else { -+ last_tv.tv_sec--; -+ last_tv.tv_usec += 1000000 - -+ TIME_CONST; -+ } -+ } -+ last_intr_tv = curr_tv; -+ if (data) { -+ /* -+ * start timer for end of -+ * sequence detection -+ */ -+ timerlist.expires = jiffies + -+ SIR_TIMEOUT; -+ add_timer(&timerlist); -+ } -+ -+ lsr = inb(io + UART_LSR); -+ } while (lsr & UART_LSR_DR); /* data ready */ -+ spin_unlock_irqrestore(&timer_lock, flags); -+ break; -+ default: -+ break; -+ } -+ } -+#endif -+ return IRQ_RETVAL(IRQ_HANDLED); -+} -+ -+#ifdef LIRC_ON_SA1100 -+static void send_pulse(unsigned long length) -+{ -+ unsigned long k, delay; -+ int flag; -+ -+ if (length == 0) -+ return; -+ /* -+ * this won't give us the carrier frequency we really want -+ * due to integer arithmetic, but we can accept this inaccuracy -+ */ -+ -+ for (k = flag = 0; k < length; k += delay, flag = !flag) { -+ if (flag) { -+ off(); -+ delay = space_width; -+ } else { -+ on(); -+ delay = pulse_width; -+ } -+ safe_udelay(delay); -+ } -+ off(); -+} -+ -+static void send_space(unsigned long length) -+{ -+ if (length == 0) -+ return; -+ off(); -+ safe_udelay(length); -+} -+#else -+static void send_space(unsigned long len) -+{ -+ safe_udelay(len); -+} -+ -+static void send_pulse(unsigned long len) -+{ -+ long bytes_out = len / TIME_CONST; -+ long time_left; -+ -+ time_left = (long)len - (long)bytes_out * (long)TIME_CONST; -+ if (bytes_out == 0) { -+ bytes_out++; -+ time_left = 0; -+ } -+ while (bytes_out--) { -+ outb(PULSE, io + UART_TX); -+ /* FIXME treba seriozne cakanie z char/serial.c */ -+ while (!(inb(io + UART_LSR) & UART_LSR_THRE)) -+ ; -+ } -+#if 0 -+ if (time_left > 0) -+ safe_udelay(time_left); -+#endif -+} -+#endif -+ -+#ifdef CONFIG_SA1100_COLLIE -+static int sa1100_irda_set_power_collie(int state) -+{ -+ if (state) { -+ /* -+ * 0 - off -+ * 1 - short range, lowest power -+ * 2 - medium range, medium power -+ * 3 - maximum range, high power -+ */ -+ ucb1200_set_io_direction(TC35143_GPIO_IR_ON, -+ TC35143_IODIR_OUTPUT); -+ ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_LOW); -+ udelay(100); -+ } else { -+ /* OFF */ -+ ucb1200_set_io_direction(TC35143_GPIO_IR_ON, -+ TC35143_IODIR_OUTPUT); -+ ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_HIGH); -+ } -+ return 0; -+} -+#endif -+ -+static int init_hardware(void) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&hardware_lock, flags); -+ /* reset UART */ -+#ifdef LIRC_ON_SA1100 -+#ifdef CONFIG_SA1100_BITSY -+ if (machine_is_bitsy()) { -+ printk(KERN_INFO "Power on IR module\n"); -+ set_bitsy_egpio(EGPIO_BITSY_IR_ON); -+ } -+#endif -+#ifdef CONFIG_SA1100_COLLIE -+ sa1100_irda_set_power_collie(3); /* power on */ -+#endif -+ sr.hscr0 = Ser2HSCR0; -+ -+ sr.utcr0 = Ser2UTCR0; -+ sr.utcr1 = Ser2UTCR1; -+ sr.utcr2 = Ser2UTCR2; -+ sr.utcr3 = Ser2UTCR3; -+ sr.utcr4 = Ser2UTCR4; -+ -+ sr.utdr = Ser2UTDR; -+ sr.utsr0 = Ser2UTSR0; -+ sr.utsr1 = Ser2UTSR1; -+ -+ /* configure GPIO */ -+ /* output */ -+ PPDR |= PPC_TXD2; -+ PSDR |= PPC_TXD2; -+ /* set output to 0 */ -+ off(); -+ -+ /* Enable HP-SIR modulation, and ensure that the port is disabled. */ -+ Ser2UTCR3 = 0; -+ Ser2HSCR0 = sr.hscr0 & (~HSCR0_HSSP); -+ -+ /* clear status register to prevent unwanted interrupts */ -+ Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); -+ -+ /* 7N1 */ -+ Ser2UTCR0 = UTCR0_1StpBit|UTCR0_7BitData; -+ /* 115200 */ -+ Ser2UTCR1 = 0; -+ Ser2UTCR2 = 1; -+ /* use HPSIR, 1.6 usec pulses */ -+ Ser2UTCR4 = UTCR4_HPSIR|UTCR4_Z1_6us; -+ -+ /* enable receiver, receive fifo interrupt */ -+ Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE; -+ -+ /* clear status register to prevent unwanted interrupts */ -+ Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB); -+ -+#elif defined(LIRC_SIR_TEKRAM) -+ /* disable FIFO */ -+ soutp(UART_FCR, -+ UART_FCR_CLEAR_RCVR| -+ UART_FCR_CLEAR_XMIT| -+ UART_FCR_TRIGGER_1); -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ /* First of all, disable all interrupts */ -+ soutp(UART_IER, sinp(UART_IER) & -+ (~(UART_IER_MSI|UART_IER_RLSI|UART_IER_THRI|UART_IER_RDI))); -+ -+ /* Set DLAB 1. */ -+ soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); -+ -+ /* Set divisor to 12 => 9600 Baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 12); -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ /* power supply */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ safe_udelay(50*1000); -+ -+ /* -DTR low -> reset PIC */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); -+ udelay(1*1000); -+ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ udelay(100); -+ -+ -+ /* -RTS low -> send control byte */ -+ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2); -+ udelay(7); -+ soutp(UART_TX, TEKRAM_115200|TEKRAM_PW); -+ -+ /* one byte takes ~1042 usec to transmit at 9600,8N1 */ -+ udelay(1500); -+ -+ /* back to normal operation */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ udelay(50); -+ -+ udelay(1500); -+ -+ /* read previous control byte */ -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": 0x%02x\n", sinp(UART_RX)); -+ -+ /* Set DLAB 1. */ -+ soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); -+ -+ /* Set divisor to 1 => 115200 Baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 1); -+ -+ /* Set DLAB 0, 8 Bit */ -+ soutp(UART_LCR, UART_LCR_WLEN8); -+ /* enable interrupts */ -+ soutp(UART_IER, sinp(UART_IER)|UART_IER_RDI); -+#else -+ outb(0, io + UART_MCR); -+ outb(0, io + UART_IER); -+ /* init UART */ -+ /* set DLAB, speed = 115200 */ -+ outb(UART_LCR_DLAB | UART_LCR_WLEN7, io + UART_LCR); -+ outb(1, io + UART_DLL); outb(0, io + UART_DLM); -+ /* 7N1+start = 9 bits at 115200 ~ 3 bits at 44000 */ -+ outb(UART_LCR_WLEN7, io + UART_LCR); -+ /* FIFO operation */ -+ outb(UART_FCR_ENABLE_FIFO, io + UART_FCR); -+ /* interrupts */ -+ /* outb(UART_IER_RLSI|UART_IER_RDI|UART_IER_THRI, io + UART_IER); */ -+ outb(UART_IER_RDI, io + UART_IER); -+ /* turn on UART */ -+ outb(UART_MCR_DTR|UART_MCR_RTS|UART_MCR_OUT2, io + UART_MCR); -+#ifdef LIRC_SIR_ACTISYS_ACT200L -+ init_act200(); -+#elif defined(LIRC_SIR_ACTISYS_ACT220L) -+ init_act220(); -+#endif -+#endif -+ spin_unlock_irqrestore(&hardware_lock, flags); -+ return 0; -+} -+ -+static void drop_hardware(void) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&hardware_lock, flags); -+ -+#ifdef LIRC_ON_SA1100 -+ Ser2UTCR3 = 0; -+ -+ Ser2UTCR0 = sr.utcr0; -+ Ser2UTCR1 = sr.utcr1; -+ Ser2UTCR2 = sr.utcr2; -+ Ser2UTCR4 = sr.utcr4; -+ Ser2UTCR3 = sr.utcr3; -+ -+ Ser2HSCR0 = sr.hscr0; -+#ifdef CONFIG_SA1100_BITSY -+ if (machine_is_bitsy()) -+ clr_bitsy_egpio(EGPIO_BITSY_IR_ON); -+#endif -+#ifdef CONFIG_SA1100_COLLIE -+ sa1100_irda_set_power_collie(0); /* power off */ -+#endif -+#else -+ /* turn off interrupts */ -+ outb(0, io + UART_IER); -+#endif -+ spin_unlock_irqrestore(&hardware_lock, flags); -+} -+ -+/* SECTION: Initialisation */ -+ -+static int init_port(void) -+{ -+ int retval; -+ -+ /* get I/O port access and IRQ line */ -+#ifndef LIRC_ON_SA1100 -+ if (request_region(io, 8, LIRC_DRIVER_NAME) == NULL) { -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": i/o port 0x%.4x already in use.\n", io); -+ return -EBUSY; -+ } -+#endif -+ retval = request_irq(irq, sir_interrupt, IRQF_DISABLED, -+ LIRC_DRIVER_NAME, NULL); -+ if (retval < 0) { -+# ifndef LIRC_ON_SA1100 -+ release_region(io, 8); -+# endif -+ printk(KERN_ERR LIRC_DRIVER_NAME -+ ": IRQ %d already in use.\n", -+ irq); -+ return retval; -+ } -+#ifndef LIRC_ON_SA1100 -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": I/O port 0x%.4x, IRQ %d.\n", -+ io, irq); -+#endif -+ -+ init_timer(&timerlist); -+ timerlist.function = sir_timeout; -+ timerlist.data = 0xabadcafe; -+ -+ return 0; -+} -+ -+static void drop_port(void) -+{ -+ free_irq(irq, NULL); -+ del_timer_sync(&timerlist); -+#ifndef LIRC_ON_SA1100 -+ release_region(io, 8); -+#endif -+} -+ -+#ifdef LIRC_SIR_ACTISYS_ACT200L -+/* Crystal/Cirrus CS8130 IR transceiver, used in Actisys Act200L dongle */ -+/* some code borrowed from Linux IRDA driver */ -+ -+/* Register 0: Control register #1 */ -+#define ACT200L_REG0 0x00 -+#define ACT200L_TXEN 0x01 /* Enable transmitter */ -+#define ACT200L_RXEN 0x02 /* Enable receiver */ -+#define ACT200L_ECHO 0x08 /* Echo control chars */ -+ -+/* Register 1: Control register #2 */ -+#define ACT200L_REG1 0x10 -+#define ACT200L_LODB 0x01 /* Load new baud rate count value */ -+#define ACT200L_WIDE 0x04 /* Expand the maximum allowable pulse */ -+ -+/* Register 3: Transmit mode register #2 */ -+#define ACT200L_REG3 0x30 -+#define ACT200L_B0 0x01 /* DataBits, 0=6, 1=7, 2=8, 3=9(8P) */ -+#define ACT200L_B1 0x02 /* DataBits, 0=6, 1=7, 2=8, 3=9(8P) */ -+#define ACT200L_CHSY 0x04 /* StartBit Synced 0=bittime, 1=startbit */ -+ -+/* Register 4: Output Power register */ -+#define ACT200L_REG4 0x40 -+#define ACT200L_OP0 0x01 /* Enable LED1C output */ -+#define ACT200L_OP1 0x02 /* Enable LED2C output */ -+#define ACT200L_BLKR 0x04 -+ -+/* Register 5: Receive Mode register */ -+#define ACT200L_REG5 0x50 -+#define ACT200L_RWIDL 0x01 /* fixed 1.6us pulse mode */ -+ /*.. other various IRDA bit modes, and TV remote modes..*/ -+ -+/* Register 6: Receive Sensitivity register #1 */ -+#define ACT200L_REG6 0x60 -+#define ACT200L_RS0 0x01 /* receive threshold bit 0 */ -+#define ACT200L_RS1 0x02 /* receive threshold bit 1 */ -+ -+/* Register 7: Receive Sensitivity register #2 */ -+#define ACT200L_REG7 0x70 -+#define ACT200L_ENPOS 0x04 /* Ignore the falling edge */ -+ -+/* Register 8,9: Baud Rate Divider register #1,#2 */ -+#define ACT200L_REG8 0x80 -+#define ACT200L_REG9 0x90 -+ -+#define ACT200L_2400 0x5f -+#define ACT200L_9600 0x17 -+#define ACT200L_19200 0x0b -+#define ACT200L_38400 0x05 -+#define ACT200L_57600 0x03 -+#define ACT200L_115200 0x01 -+ -+/* Register 13: Control register #3 */ -+#define ACT200L_REG13 0xd0 -+#define ACT200L_SHDW 0x01 /* Enable access to shadow registers */ -+ -+/* Register 15: Status register */ -+#define ACT200L_REG15 0xf0 -+ -+/* Register 21: Control register #4 */ -+#define ACT200L_REG21 0x50 -+#define ACT200L_EXCK 0x02 /* Disable clock output driver */ -+#define ACT200L_OSCL 0x04 /* oscillator in low power, medium accuracy mode */ -+ -+static void init_act200(void) -+{ -+ int i; -+ __u8 control[] = { -+ ACT200L_REG15, -+ ACT200L_REG13 | ACT200L_SHDW, -+ ACT200L_REG21 | ACT200L_EXCK | ACT200L_OSCL, -+ ACT200L_REG13, -+ ACT200L_REG7 | ACT200L_ENPOS, -+ ACT200L_REG6 | ACT200L_RS0 | ACT200L_RS1, -+ ACT200L_REG5 | ACT200L_RWIDL, -+ ACT200L_REG4 | ACT200L_OP0 | ACT200L_OP1 | ACT200L_BLKR, -+ ACT200L_REG3 | ACT200L_B0, -+ ACT200L_REG0 | ACT200L_TXEN | ACT200L_RXEN, -+ ACT200L_REG8 | (ACT200L_115200 & 0x0f), -+ ACT200L_REG9 | ((ACT200L_115200 >> 4) & 0x0f), -+ ACT200L_REG1 | ACT200L_LODB | ACT200L_WIDE -+ }; -+ -+ /* Set DLAB 1. */ -+ soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN8); -+ -+ /* Set divisor to 12 => 9600 Baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 12); -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, UART_LCR_WLEN8); -+ /* Set divisor to 12 => 9600 Baud */ -+ -+ /* power supply */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ for (i = 0; i < 50; i++) -+ safe_udelay(1000); -+ -+ /* Reset the dongle : set RTS low for 25 ms */ -+ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2); -+ for (i = 0; i < 25; i++) -+ udelay(1000); -+ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ udelay(100); -+ -+ /* Clear DTR and set RTS to enter command mode */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); -+ udelay(7); -+ -+ /* send out the control register settings for 115K 7N1 SIR operation */ -+ for (i = 0; i < sizeof(control); i++) { -+ soutp(UART_TX, control[i]); -+ /* one byte takes ~1042 usec to transmit at 9600,8N1 */ -+ udelay(1500); -+ } -+ -+ /* back to normal operation */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ udelay(50); -+ -+ udelay(1500); -+ soutp(UART_LCR, sinp(UART_LCR) | UART_LCR_DLAB); -+ -+ /* Set DLAB 1. */ -+ soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN7); -+ -+ /* Set divisor to 1 => 115200 Baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 1); -+ -+ /* Set DLAB 0. */ -+ soutp(UART_LCR, sinp(UART_LCR) & (~UART_LCR_DLAB)); -+ -+ /* Set DLAB 0, 7 Bit */ -+ soutp(UART_LCR, UART_LCR_WLEN7); -+ -+ /* enable interrupts */ -+ soutp(UART_IER, sinp(UART_IER)|UART_IER_RDI); -+} -+#endif -+ -+#ifdef LIRC_SIR_ACTISYS_ACT220L -+/* -+ * Derived from linux IrDA driver (net/irda/actisys.c) -+ * Drop me a mail for any kind of comment: maxx@spaceboyz.net -+ */ -+ -+void init_act220(void) -+{ -+ int i; -+ -+ /* DLAB 1 */ -+ soutp(UART_LCR, UART_LCR_DLAB|UART_LCR_WLEN7); -+ -+ /* 9600 baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 12); -+ -+ /* DLAB 0 */ -+ soutp(UART_LCR, UART_LCR_WLEN7); -+ -+ /* reset the dongle, set DTR low for 10us */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_OUT2); -+ udelay(10); -+ -+ /* back to normal (still 9600) */ -+ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_RTS|UART_MCR_OUT2); -+ -+ /* -+ * send RTS pulses until we reach 115200 -+ * i hope this is really the same for act220l/act220l+ -+ */ -+ for (i = 0; i < 3; i++) { -+ udelay(10); -+ /* set RTS low for 10 us */ -+ soutp(UART_MCR, UART_MCR_DTR|UART_MCR_OUT2); -+ udelay(10); -+ /* set RTS high for 10 us */ -+ soutp(UART_MCR, UART_MCR_RTS|UART_MCR_DTR|UART_MCR_OUT2); -+ } -+ -+ /* back to normal operation */ -+ udelay(1500); /* better safe than sorry ;) */ -+ -+ /* Set DLAB 1. */ -+ soutp(UART_LCR, UART_LCR_DLAB | UART_LCR_WLEN7); -+ -+ /* Set divisor to 1 => 115200 Baud */ -+ soutp(UART_DLM, 0); -+ soutp(UART_DLL, 1); -+ -+ /* Set DLAB 0, 7 Bit */ -+ /* The dongle doesn't seem to have any problems with operation at 7N1 */ -+ soutp(UART_LCR, UART_LCR_WLEN7); -+ -+ /* enable interrupts */ -+ soutp(UART_IER, UART_IER_RDI); -+} -+#endif -+ -+static int init_lirc_sir(void) -+{ -+ int retval; -+ -+ init_waitqueue_head(&lirc_read_queue); -+ retval = init_port(); -+ if (retval < 0) -+ return retval; -+ init_hardware(); -+ printk(KERN_INFO LIRC_DRIVER_NAME -+ ": Installed.\n"); -+ return 0; -+} -+ -+ -+static int __init lirc_sir_init(void) -+{ -+ int retval; -+ -+ retval = init_chrdev(); -+ if (retval < 0) -+ return retval; -+ retval = init_lirc_sir(); -+ if (retval) { -+ drop_chrdev(); -+ return retval; -+ } -+ return 0; -+} -+ -+static void __exit lirc_sir_exit(void) -+{ -+ drop_hardware(); -+ drop_chrdev(); -+ drop_port(); -+ printk(KERN_INFO LIRC_DRIVER_NAME ": Uninstalled.\n"); -+} -+ -+module_init(lirc_sir_init); -+module_exit(lirc_sir_exit); -+ -+#ifdef LIRC_SIR_TEKRAM -+MODULE_DESCRIPTION("Infrared receiver driver for Tekram Irmate 210"); -+MODULE_AUTHOR("Christoph Bartelmus"); -+#elif defined(LIRC_ON_SA1100) -+MODULE_DESCRIPTION("LIRC driver for StrongARM SA1100 embedded microprocessor"); -+MODULE_AUTHOR("Christoph Bartelmus"); -+#elif defined(LIRC_SIR_ACTISYS_ACT200L) -+MODULE_DESCRIPTION("LIRC driver for Actisys Act200L"); -+MODULE_AUTHOR("Karl Bongers"); -+#elif defined(LIRC_SIR_ACTISYS_ACT220L) -+MODULE_DESCRIPTION("LIRC driver for Actisys Act220L(+)"); -+MODULE_AUTHOR("Jan Roemisch"); -+#else -+MODULE_DESCRIPTION("Infrared receiver driver for SIR type serial ports"); -+MODULE_AUTHOR("Milan Pikula"); -+#endif -+MODULE_LICENSE("GPL"); -+ -+#ifdef LIRC_ON_SA1100 -+module_param(irq, int, S_IRUGO); -+MODULE_PARM_DESC(irq, "Interrupt (16)"); -+#else -+module_param(io, int, S_IRUGO); -+MODULE_PARM_DESC(io, "I/O address base (0x3f8 or 0x2f8)"); -+ -+module_param(irq, int, S_IRUGO); -+MODULE_PARM_DESC(irq, "Interrupt (4 or 3)"); -+ -+module_param(threshold, int, S_IRUGO); -+MODULE_PARM_DESC(threshold, "space detection threshold (3)"); -+#endif -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_streamzap.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_streamzap.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_streamzap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_streamzap.c 2010-08-02 09:31:23.651050708 +0200 -@@ -0,0 +1,821 @@ -+/* -+ * Streamzap Remote Control driver -+ * -+ * Copyright (c) 2005 Christoph Bartelmus -+ * -+ * This driver was based on the work of Greg Wickham and Adrian -+ * Dewhurst. It was substantially rewritten to support correct signal -+ * gaps and now maintains a delay buffer, which is used to present -+ * consistent timing behaviour to user space applications. Without the -+ * delay buffer an ugly hack would be required in lircd, which can -+ * cause sluggish signal decoding in certain situations. -+ * -+ * This driver is based on the USB skeleton driver packaged with the -+ * kernel; copyright (C) 2001-2003 Greg Kroah-Hartman (greg@kroah.com) -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+#define DRIVER_VERSION "1.28" -+#define DRIVER_NAME "lirc_streamzap" -+#define DRIVER_DESC "Streamzap Remote Control driver" -+ -+static int debug; -+ -+#define USB_STREAMZAP_VENDOR_ID 0x0e9c -+#define USB_STREAMZAP_PRODUCT_ID 0x0000 -+ -+/* Use our own dbg macro */ -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG DRIVER_NAME "[%d]: " \ -+ fmt "\n", ## args); \ -+ } while (0) -+ -+/* table of devices that work with this driver */ -+static struct usb_device_id streamzap_table[] = { -+ /* Streamzap Remote Control */ -+ { USB_DEVICE(USB_STREAMZAP_VENDOR_ID, USB_STREAMZAP_PRODUCT_ID) }, -+ /* Terminating entry */ -+ { } -+}; -+ -+MODULE_DEVICE_TABLE(usb, streamzap_table); -+ -+#define STREAMZAP_PULSE_MASK 0xf0 -+#define STREAMZAP_SPACE_MASK 0x0f -+#define STREAMZAP_TIMEOUT 0xff -+#define STREAMZAP_RESOLUTION 256 -+ -+/* number of samples buffered */ -+#define STREAMZAP_BUF_LEN 128 -+ -+enum StreamzapDecoderState { -+ PulseSpace, -+ FullPulse, -+ FullSpace, -+ IgnorePulse -+}; -+ -+/* Structure to hold all of our device specific stuff -+ * -+ * some remarks regarding locking: -+ * theoretically this struct can be accessed from three threads: -+ * -+ * - from lirc_dev through set_use_inc/set_use_dec -+ * -+ * - from the USB layer throuh probe/disconnect/irq -+ * -+ * Careful placement of lirc_register_driver/lirc_unregister_driver -+ * calls will prevent conflicts. lirc_dev makes sure that -+ * set_use_inc/set_use_dec are not being executed and will not be -+ * called after lirc_unregister_driver returns. -+ * -+ * - by the timer callback -+ * -+ * The timer is only running when the device is connected and the -+ * LIRC device is open. Making sure the timer is deleted by -+ * set_use_dec will make conflicts impossible. -+ */ -+struct usb_streamzap { -+ -+ /* usb */ -+ /* save off the usb device pointer */ -+ struct usb_device *udev; -+ /* the interface for this device */ -+ struct usb_interface *interface; -+ -+ /* buffer & dma */ -+ unsigned char *buf_in; -+ dma_addr_t dma_in; -+ unsigned int buf_in_len; -+ -+ struct usb_endpoint_descriptor *endpoint; -+ -+ /* IRQ */ -+ struct urb *urb_in; -+ -+ /* lirc */ -+ struct lirc_driver *driver; -+ struct lirc_buffer *delay_buf; -+ -+ /* timer used to support delay buffering */ -+ struct timer_list delay_timer; -+ int timer_running; -+ spinlock_t timer_lock; -+ -+ /* tracks whether we are currently receiving some signal */ -+ int idle; -+ /* sum of signal lengths received since signal start */ -+ unsigned long sum; -+ /* start time of signal; necessary for gap tracking */ -+ struct timeval signal_last; -+ struct timeval signal_start; -+ enum StreamzapDecoderState decoder_state; -+ struct timer_list flush_timer; -+ int flush; -+ int in_use; -+ int timeout_enabled; -+}; -+ -+ -+/* local function prototypes */ -+static int streamzap_probe(struct usb_interface *interface, -+ const struct usb_device_id *id); -+static void streamzap_disconnect(struct usb_interface *interface); -+static void usb_streamzap_irq(struct urb *urb); -+static int streamzap_use_inc(void *data); -+static void streamzap_use_dec(void *data); -+static int streamzap_ioctl(struct inode *node, struct file *filep, -+ unsigned int cmd, unsigned long arg); -+static int streamzap_suspend(struct usb_interface *intf, pm_message_t message); -+static int streamzap_resume(struct usb_interface *intf); -+ -+/* usb specific object needed to register this driver with the usb subsystem */ -+ -+static struct usb_driver streamzap_driver = { -+ .name = DRIVER_NAME, -+ .probe = streamzap_probe, -+ .disconnect = streamzap_disconnect, -+ .suspend = streamzap_suspend, -+ .resume = streamzap_resume, -+ .id_table = streamzap_table, -+}; -+ -+static void stop_timer(struct usb_streamzap *sz) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&sz->timer_lock, flags); -+ if (sz->timer_running) { -+ sz->timer_running = 0; -+ spin_unlock_irqrestore(&sz->timer_lock, flags); -+ del_timer_sync(&sz->delay_timer); -+ } else { -+ spin_unlock_irqrestore(&sz->timer_lock, flags); -+ } -+} -+ -+static void flush_timeout(unsigned long arg) -+{ -+ struct usb_streamzap *sz = (struct usb_streamzap *) arg; -+ -+ /* finally start accepting data */ -+ sz->flush = 0; -+} -+static void delay_timeout(unsigned long arg) -+{ -+ unsigned long flags; -+ /* deliver data every 10 ms */ -+ static unsigned long timer_inc = -+ (10000/(1000000/HZ)) == 0 ? 1 : (10000/(1000000/HZ)); -+ struct usb_streamzap *sz = (struct usb_streamzap *) arg; -+ int data; -+ -+ spin_lock_irqsave(&sz->timer_lock, flags); -+ -+ if (!lirc_buffer_empty(sz->delay_buf) && -+ !lirc_buffer_full(sz->driver->rbuf)) { -+ lirc_buffer_read(sz->delay_buf, (unsigned char *) &data); -+ lirc_buffer_write(sz->driver->rbuf, (unsigned char *) &data); -+ } -+ if (!lirc_buffer_empty(sz->delay_buf)) { -+ while (lirc_buffer_available(sz->delay_buf) < -+ STREAMZAP_BUF_LEN / 2 && -+ !lirc_buffer_full(sz->driver->rbuf)) { -+ lirc_buffer_read(sz->delay_buf, -+ (unsigned char *) &data); -+ lirc_buffer_write(sz->driver->rbuf, -+ (unsigned char *) &data); -+ } -+ if (sz->timer_running) { -+ sz->delay_timer.expires = jiffies + timer_inc; -+ add_timer(&sz->delay_timer); -+ } -+ } else { -+ sz->timer_running = 0; -+ } -+ -+ if (!lirc_buffer_empty(sz->driver->rbuf)) -+ wake_up(&sz->driver->rbuf->wait_poll); -+ -+ spin_unlock_irqrestore(&sz->timer_lock, flags); -+} -+ -+static void flush_delay_buffer(struct usb_streamzap *sz) -+{ -+ int data; -+ int empty = 1; -+ -+ while (!lirc_buffer_empty(sz->delay_buf)) { -+ empty = 0; -+ lirc_buffer_read(sz->delay_buf, (unsigned char *) &data); -+ if (!lirc_buffer_full(sz->driver->rbuf)) { -+ lirc_buffer_write(sz->driver->rbuf, -+ (unsigned char *) &data); -+ } else { -+ dprintk("buffer overflow", sz->driver->minor); -+ } -+ } -+ if (!empty) -+ wake_up(&sz->driver->rbuf->wait_poll); -+} -+ -+static void push(struct usb_streamzap *sz, unsigned char *data) -+{ -+ unsigned long flags; -+ -+ spin_lock_irqsave(&sz->timer_lock, flags); -+ if (lirc_buffer_full(sz->delay_buf)) { -+ int read_data; -+ -+ lirc_buffer_read(sz->delay_buf, -+ (unsigned char *) &read_data); -+ if (!lirc_buffer_full(sz->driver->rbuf)) { -+ lirc_buffer_write(sz->driver->rbuf, -+ (unsigned char *) &read_data); -+ } else { -+ dprintk("buffer overflow", sz->driver->minor); -+ } -+ } -+ -+ lirc_buffer_write(sz->delay_buf, data); -+ -+ if (!sz->timer_running) { -+ sz->delay_timer.expires = jiffies + HZ/10; -+ add_timer(&sz->delay_timer); -+ sz->timer_running = 1; -+ } -+ -+ spin_unlock_irqrestore(&sz->timer_lock, flags); -+} -+ -+static void push_full_pulse(struct usb_streamzap *sz, -+ unsigned char value) -+{ -+ int pulse; -+ -+ if (sz->idle) { -+ long deltv; -+ int tmp; -+ -+ sz->signal_last = sz->signal_start; -+ do_gettimeofday(&sz->signal_start); -+ -+ deltv = sz->signal_start.tv_sec-sz->signal_last.tv_sec; -+ if (deltv > 15) { -+ /* really long time */ -+ tmp = LIRC_SPACE(LIRC_VALUE_MASK); -+ } else { -+ tmp = (int) (deltv*1000000+ -+ sz->signal_start.tv_usec - -+ sz->signal_last.tv_usec); -+ tmp -= sz->sum; -+ tmp = LIRC_SPACE(tmp); -+ } -+ dprintk("ls %u", sz->driver->minor, tmp); -+ push(sz, (char *)&tmp); -+ -+ sz->idle = 0; -+ sz->sum = 0; -+ } -+ -+ pulse = ((int) value) * STREAMZAP_RESOLUTION; -+ pulse += STREAMZAP_RESOLUTION / 2; -+ sz->sum += pulse; -+ pulse = LIRC_PULSE(pulse); -+ -+ dprintk("p %u", sz->driver->minor, pulse & PULSE_MASK); -+ push(sz, (char *)&pulse); -+} -+ -+static void push_half_pulse(struct usb_streamzap *sz, -+ unsigned char value) -+{ -+ push_full_pulse(sz, (value & STREAMZAP_PULSE_MASK)>>4); -+} -+ -+static void push_full_space(struct usb_streamzap *sz, -+ unsigned char value) -+{ -+ int space; -+ -+ space = ((int) value)*STREAMZAP_RESOLUTION; -+ space += STREAMZAP_RESOLUTION/2; -+ sz->sum += space; -+ space = LIRC_SPACE(space); -+ dprintk("s %u", sz->driver->minor, space); -+ push(sz, (char *)&space); -+} -+ -+static void push_half_space(struct usb_streamzap *sz, -+ unsigned char value) -+{ -+ push_full_space(sz, value & STREAMZAP_SPACE_MASK); -+} -+ -+/** -+ * usb_streamzap_irq - IRQ handler -+ * -+ * This procedure is invoked on reception of data from -+ * the usb remote. -+ */ -+static void usb_streamzap_irq(struct urb *urb) -+{ -+ struct usb_streamzap *sz; -+ int len; -+ unsigned int i = 0; -+ -+ if (!urb) -+ return; -+ -+ sz = urb->context; -+ len = urb->actual_length; -+ -+ switch (urb->status) { -+ case -ECONNRESET: -+ case -ENOENT: -+ case -ESHUTDOWN: -+ /* -+ * this urb is terminated, clean up. -+ * sz might already be invalid at this point -+ */ -+ dprintk("urb status: %d", -1, urb->status); -+ return; -+ default: -+ break; -+ } -+ -+ dprintk("received %d", sz->driver->minor, urb->actual_length); -+ if (!sz->flush) { -+ for (i = 0; i < urb->actual_length; i++) { -+ dprintk("%d: %x", sz->driver->minor, -+ i, (unsigned char) sz->buf_in[i]); -+ switch (sz->decoder_state) { -+ case PulseSpace: -+ if ((sz->buf_in[i]&STREAMZAP_PULSE_MASK) == -+ STREAMZAP_PULSE_MASK) { -+ sz->decoder_state = FullPulse; -+ continue; -+ } else if ((sz->buf_in[i]&STREAMZAP_SPACE_MASK) -+ == STREAMZAP_SPACE_MASK) { -+ push_half_pulse(sz, sz->buf_in[i]); -+ sz->decoder_state = FullSpace; -+ continue; -+ } else { -+ push_half_pulse(sz, sz->buf_in[i]); -+ push_half_space(sz, sz->buf_in[i]); -+ } -+ break; -+ case FullPulse: -+ push_full_pulse(sz, sz->buf_in[i]); -+ sz->decoder_state = IgnorePulse; -+ break; -+ case FullSpace: -+ if (sz->buf_in[i] == STREAMZAP_TIMEOUT) { -+ sz->idle = 1; -+ stop_timer(sz); -+ if (sz->timeout_enabled) { -+ int timeout = -+ LIRC_TIMEOUT -+ (STREAMZAP_TIMEOUT * -+ STREAMZAP_RESOLUTION); -+ push(sz, (char *)&timeout); -+ } -+ flush_delay_buffer(sz); -+ } else -+ push_full_space(sz, sz->buf_in[i]); -+ sz->decoder_state = PulseSpace; -+ break; -+ case IgnorePulse: -+ if ((sz->buf_in[i]&STREAMZAP_SPACE_MASK) == -+ STREAMZAP_SPACE_MASK) { -+ sz->decoder_state = FullSpace; -+ continue; -+ } -+ push_half_space(sz, sz->buf_in[i]); -+ sz->decoder_state = PulseSpace; -+ break; -+ } -+ } -+ } -+ -+ usb_submit_urb(urb, GFP_ATOMIC); -+ -+ return; -+} -+ -+static struct file_operations streamzap_fops = { -+ .owner = THIS_MODULE, -+ .ioctl = streamzap_ioctl, -+ .read = lirc_dev_fop_read, -+ .write = lirc_dev_fop_write, -+ .poll = lirc_dev_fop_poll, -+ .open = lirc_dev_fop_open, -+ .release = lirc_dev_fop_close, -+}; -+ -+ -+/** -+ * streamzap_probe -+ * -+ * Called by usb-core to associated with a candidate device -+ * On any failure the return value is the ERROR -+ * On success return 0 -+ */ -+static int streamzap_probe(struct usb_interface *interface, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *udev = interface_to_usbdev(interface); -+ struct usb_host_interface *iface_host; -+ struct usb_streamzap *sz; -+ struct lirc_driver *driver; -+ struct lirc_buffer *lirc_buf; -+ struct lirc_buffer *delay_buf; -+ char buf[63], name[128] = ""; -+ int retval = -ENOMEM; -+ int minor = 0; -+ -+ /* Allocate space for device driver specific data */ -+ sz = kzalloc(sizeof(struct usb_streamzap), GFP_KERNEL); -+ if (sz == NULL) -+ return -ENOMEM; -+ -+ sz->udev = udev; -+ sz->interface = interface; -+ -+ /* Check to ensure endpoint information matches requirements */ -+ iface_host = interface->cur_altsetting; -+ -+ if (iface_host->desc.bNumEndpoints != 1) { -+ err("%s: Unexpected desc.bNumEndpoints (%d)", __func__, -+ iface_host->desc.bNumEndpoints); -+ retval = -ENODEV; -+ goto free_sz; -+ } -+ -+ sz->endpoint = &(iface_host->endpoint[0].desc); -+ if ((sz->endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) -+ != USB_DIR_IN) { -+ err("%s: endpoint doesn't match input device 02%02x", -+ __func__, sz->endpoint->bEndpointAddress); -+ retval = -ENODEV; -+ goto free_sz; -+ } -+ -+ if ((sz->endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) -+ != USB_ENDPOINT_XFER_INT) { -+ err("%s: endpoint attributes don't match xfer 02%02x", -+ __func__, sz->endpoint->bmAttributes); -+ retval = -ENODEV; -+ goto free_sz; -+ } -+ -+ if (sz->endpoint->wMaxPacketSize == 0) { -+ err("%s: endpoint message size==0? ", __func__); -+ retval = -ENODEV; -+ goto free_sz; -+ } -+ -+ /* Allocate the USB buffer and IRQ URB */ -+ -+ sz->buf_in_len = sz->endpoint->wMaxPacketSize; -+ sz->buf_in = usb_alloc_coherent(sz->udev, sz->buf_in_len, -+ GFP_ATOMIC, &sz->dma_in); -+ if (sz->buf_in == NULL) -+ goto free_sz; -+ -+ sz->urb_in = usb_alloc_urb(0, GFP_KERNEL); -+ if (sz->urb_in == NULL) -+ goto free_sz; -+ -+ /* Connect this device to the LIRC sub-system */ -+ driver = kzalloc(sizeof(struct lirc_driver), GFP_KERNEL); -+ if (!driver) -+ goto free_sz; -+ -+ lirc_buf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!lirc_buf) -+ goto free_driver; -+ if (lirc_buffer_init(lirc_buf, sizeof(int), STREAMZAP_BUF_LEN)) -+ goto kfree_lirc_buf; -+ -+ delay_buf = kmalloc(sizeof(struct lirc_buffer), GFP_KERNEL); -+ if (!delay_buf) -+ goto free_lirc_buf; -+ if (lirc_buffer_init(delay_buf, sizeof(int), STREAMZAP_BUF_LEN)) -+ goto kfree_delay_buf; -+ -+ sz->driver = driver; -+ strcpy(sz->driver->name, DRIVER_NAME); -+ sz->driver->minor = -1; -+ sz->driver->sample_rate = 0; -+ sz->driver->code_length = sizeof(int) * 8; -+ sz->driver->features = LIRC_CAN_REC_MODE2 | -+ LIRC_CAN_GET_REC_RESOLUTION | -+ LIRC_CAN_SET_REC_TIMEOUT; -+ sz->driver->data = sz; -+ sz->driver->min_timeout = STREAMZAP_TIMEOUT * STREAMZAP_RESOLUTION; -+ sz->driver->max_timeout = STREAMZAP_TIMEOUT * STREAMZAP_RESOLUTION; -+ sz->driver->rbuf = lirc_buf; -+ sz->delay_buf = delay_buf; -+ sz->driver->set_use_inc = &streamzap_use_inc; -+ sz->driver->set_use_dec = &streamzap_use_dec; -+ sz->driver->fops = &streamzap_fops; -+ sz->driver->dev = &interface->dev; -+ sz->driver->owner = THIS_MODULE; -+ -+ sz->idle = 1; -+ sz->decoder_state = PulseSpace; -+ init_timer(&sz->delay_timer); -+ sz->delay_timer.function = delay_timeout; -+ sz->delay_timer.data = (unsigned long) sz; -+ sz->timer_running = 0; -+ spin_lock_init(&sz->timer_lock); -+ -+ init_timer(&sz->flush_timer); -+ sz->flush_timer.function = flush_timeout; -+ sz->flush_timer.data = (unsigned long) sz; -+ /* Complete final initialisations */ -+ -+ usb_fill_int_urb(sz->urb_in, udev, -+ usb_rcvintpipe(udev, sz->endpoint->bEndpointAddress), -+ sz->buf_in, sz->buf_in_len, usb_streamzap_irq, sz, -+ sz->endpoint->bInterval); -+ sz->urb_in->transfer_dma = sz->dma_in; -+ sz->urb_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; -+ -+ if (udev->descriptor.iManufacturer -+ && usb_string(udev, udev->descriptor.iManufacturer, -+ buf, sizeof(buf)) > 0) -+ strlcpy(name, buf, sizeof(name)); -+ -+ if (udev->descriptor.iProduct -+ && usb_string(udev, udev->descriptor.iProduct, -+ buf, sizeof(buf)) > 0) -+ snprintf(name + strlen(name), sizeof(name) - strlen(name), -+ " %s", buf); -+ -+ minor = lirc_register_driver(driver); -+ -+ if (minor < 0) -+ goto free_delay_buf; -+ -+ sz->driver->minor = minor; -+ -+ usb_set_intfdata(interface, sz); -+ -+ printk(KERN_INFO DRIVER_NAME "[%d]: %s on usb%d:%d attached\n", -+ sz->driver->minor, name, -+ udev->bus->busnum, sz->udev->devnum); -+ -+ return 0; -+ -+free_delay_buf: -+ lirc_buffer_free(sz->delay_buf); -+kfree_delay_buf: -+ kfree(delay_buf); -+free_lirc_buf: -+ lirc_buffer_free(sz->driver->rbuf); -+kfree_lirc_buf: -+ kfree(lirc_buf); -+free_driver: -+ kfree(driver); -+free_sz: -+ if (retval == -ENOMEM) -+ err("Out of memory"); -+ -+ if (sz) { -+ usb_free_urb(sz->urb_in); -+ usb_alloc_coherent(udev, sz->buf_in_len, sz->buf_in, sz->dma_in); -+ kfree(sz); -+ } -+ -+ return retval; -+} -+ -+static int streamzap_use_inc(void *data) -+{ -+ struct usb_streamzap *sz = data; -+ -+ if (!sz) { -+ dprintk("%s called with no context", -1, __func__); -+ return -EINVAL; -+ } -+ dprintk("set use inc", sz->driver->minor); -+ -+ lirc_buffer_clear(sz->driver->rbuf); -+ lirc_buffer_clear(sz->delay_buf); -+ -+ sz->flush_timer.expires = jiffies + HZ; -+ sz->flush = 1; -+ add_timer(&sz->flush_timer); -+ -+ sz->urb_in->dev = sz->udev; -+ if (usb_submit_urb(sz->urb_in, GFP_ATOMIC)) { -+ dprintk("open result = -EIO error submitting urb", -+ sz->driver->minor); -+ return -EIO; -+ } -+ sz->in_use++; -+ -+ return 0; -+} -+ -+static void streamzap_use_dec(void *data) -+{ -+ struct usb_streamzap *sz = data; -+ -+ if (!sz) { -+ dprintk("%s called with no context", -1, __func__); -+ return; -+ } -+ dprintk("set use dec", sz->driver->minor); -+ -+ if (sz->flush) { -+ sz->flush = 0; -+ del_timer_sync(&sz->flush_timer); -+ } -+ -+ usb_kill_urb(sz->urb_in); -+ -+ stop_timer(sz); -+ -+ sz->in_use--; -+} -+ -+static int streamzap_ioctl(struct inode *node, struct file *filep, -+ unsigned int cmd, unsigned long arg) -+{ -+ int result = 0; -+ int val; -+ struct usb_streamzap *sz = lirc_get_pdata(filep); -+ -+ switch (cmd) { -+ case LIRC_GET_REC_RESOLUTION: -+ result = put_user(STREAMZAP_RESOLUTION, (unsigned int *) arg); -+ break; -+ case LIRC_SET_REC_TIMEOUT: -+ result = get_user(val, (int *)arg); -+ if (result == 0) { -+ if (val == STREAMZAP_TIMEOUT * STREAMZAP_RESOLUTION) -+ sz->timeout_enabled = 1; -+ else if (val == 0) -+ sz->timeout_enabled = 0; -+ else -+ result = -EINVAL; -+ } -+ break; -+ default: -+ return lirc_dev_fop_ioctl(node, filep, cmd, arg); -+ } -+ return result; -+} -+ -+/** -+ * streamzap_disconnect -+ * -+ * Called by the usb core when the device is removed from the system. -+ * -+ * This routine guarantees that the driver will not submit any more urbs -+ * by clearing dev->udev. It is also supposed to terminate any currently -+ * active urbs. Unfortunately, usb_bulk_msg(), used in streamzap_read(), -+ * does not provide any way to do this. -+ */ -+static void streamzap_disconnect(struct usb_interface *interface) -+{ -+ struct usb_streamzap *sz; -+ int errnum; -+ int minor; -+ -+ sz = usb_get_intfdata(interface); -+ -+ /* unregister from the LIRC sub-system */ -+ -+ errnum = lirc_unregister_driver(sz->driver->minor); -+ if (errnum != 0) -+ dprintk("error in lirc_unregister: (returned %d)", -+ sz->driver->minor, errnum); -+ -+ lirc_buffer_free(sz->delay_buf); -+ lirc_buffer_free(sz->driver->rbuf); -+ -+ /* unregister from the USB sub-system */ -+ -+ usb_free_urb(sz->urb_in); -+ -+ usb_alloc_coherent(sz->udev, sz->buf_in_len, sz->buf_in, sz->dma_in); -+ -+ minor = sz->driver->minor; -+ kfree(sz->driver->rbuf); -+ kfree(sz->driver); -+ kfree(sz->delay_buf); -+ kfree(sz); -+ -+ printk(KERN_INFO DRIVER_NAME "[%d]: disconnected\n", minor); -+} -+ -+static int streamzap_suspend(struct usb_interface *intf, pm_message_t message) -+{ -+ struct usb_streamzap *sz = usb_get_intfdata(intf); -+ -+ printk(KERN_INFO DRIVER_NAME "[%d]: suspend\n", sz->driver->minor); -+ if (sz->in_use) { -+ if (sz->flush) { -+ sz->flush = 0; -+ del_timer_sync(&sz->flush_timer); -+ } -+ -+ stop_timer(sz); -+ -+ usb_kill_urb(sz->urb_in); -+ } -+ return 0; -+} -+ -+static int streamzap_resume(struct usb_interface *intf) -+{ -+ struct usb_streamzap *sz = usb_get_intfdata(intf); -+ -+ lirc_buffer_clear(sz->driver->rbuf); -+ lirc_buffer_clear(sz->delay_buf); -+ -+ if (sz->in_use) { -+ sz->flush_timer.expires = jiffies + HZ; -+ sz->flush = 1; -+ add_timer(&sz->flush_timer); -+ -+ sz->urb_in->dev = sz->udev; -+ if (usb_submit_urb(sz->urb_in, GFP_ATOMIC)) { -+ dprintk("open result = -EIO error submitting urb", -+ sz->driver->minor); -+ return -EIO; -+ } -+ } -+ return 0; -+} -+ -+/** -+ * usb_streamzap_init -+ */ -+static int __init usb_streamzap_init(void) -+{ -+ int result; -+ -+ /* register this driver with the USB subsystem */ -+ result = usb_register(&streamzap_driver); -+ -+ if (result) { -+ err("usb_register failed. Error number %d", -+ result); -+ return result; -+ } -+ -+ printk(KERN_INFO DRIVER_NAME " " DRIVER_VERSION " registered\n"); -+ return 0; -+} -+ -+/** -+ * usb_streamzap_exit -+ */ -+static void __exit usb_streamzap_exit(void) -+{ -+ usb_deregister(&streamzap_driver); -+} -+ -+ -+module_init(usb_streamzap_init); -+module_exit(usb_streamzap_exit); -+ -+MODULE_AUTHOR("Christoph Bartelmus, Greg Wickham, Adrian Dewhurst"); -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_LICENSE("GPL"); -+ -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_ttusbir.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ttusbir.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_ttusbir.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_ttusbir.c 2010-08-02 09:28:03.986051565 +0200 -@@ -0,0 +1,397 @@ -+/* -+ * lirc_ttusbir.c -+ * -+ * lirc_ttusbir - LIRC device driver for the TechnoTrend USB IR Receiver -+ * -+ * Copyright (C) 2007 Stefan Macher -+ * -+ * This LIRC driver provides access to the TechnoTrend USB IR Receiver. -+ * The receiver delivers the IR signal as raw sampled true/false data in -+ * isochronous USB packets each of size 128 byte. -+ * Currently the driver reduces the sampling rate by factor of 8 as this -+ * is still more than enough to decode RC-5 - others should be analyzed. -+ * But the driver does not rely on RC-5 it should be able to decode every -+ * IR signal that is not too fast. -+ */ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lirc_dev.h" -+ -+MODULE_DESCRIPTION("TechnoTrend USB IR device driver for LIRC"); -+MODULE_AUTHOR("Stefan Macher (st_maker-lirc@yahoo.de)"); -+MODULE_LICENSE("GPL"); -+ -+/* #define DEBUG */ -+#ifdef DEBUG -+#define DPRINTK printk -+#else -+#define DPRINTK(_x_, a...) -+#endif -+ -+/* function declarations */ -+static int probe(struct usb_interface *intf, const struct usb_device_id *id); -+static void disconnect(struct usb_interface *intf); -+static void urb_complete(struct urb *urb); -+static int set_use_inc(void *data); -+static void set_use_dec(void *data); -+ -+static int num_urbs = 2; -+module_param(num_urbs, int, S_IRUGO); -+MODULE_PARM_DESC(num_urbs, -+ "Number of URBs in queue. Try to increase to 4 in case " -+ "of problems (default: 2; minimum: 2)"); -+ -+/* table of devices that work with this driver */ -+static struct usb_device_id device_id_table[] = { -+ /* TechnoTrend USB IR Receiver */ -+ { USB_DEVICE(0x0B48, 0x2003) }, -+ /* Terminating entry */ -+ { } -+}; -+MODULE_DEVICE_TABLE(usb, device_id_table); -+ -+/* USB driver definition */ -+static struct usb_driver usb_driver = { -+ .name = "TTUSBIR", -+ .id_table = &(device_id_table[0]), -+ .probe = probe, -+ .disconnect = disconnect, -+}; -+ -+/* USB device definition */ -+struct ttusbir_device { -+ struct usb_driver *usb_driver; -+ struct usb_device *udev; -+ struct usb_interface *interf; -+ struct usb_class_driver class_driver; -+ unsigned int ifnum; /* Interface number to use */ -+ unsigned int alt_setting; /* alternate setting to use */ -+ unsigned int endpoint; /* Endpoint to use */ -+ struct urb **urb; /* num_urb URB pointers*/ -+ char **buffer; /* 128 byte buffer for each URB */ -+ struct lirc_buffer rbuf; /* Buffer towards LIRC */ -+ struct lirc_driver driver; -+ int minor; -+ int last_pulse; /* remembers if last received byte was pulse or space */ -+ int last_num; /* remembers how many last bytes appeared */ -+ int opened; -+}; -+ -+/*** LIRC specific functions ***/ -+static int set_use_inc(void *data) -+{ -+ int i, retval; -+ struct ttusbir_device *ttusbir = data; -+ -+ DPRINTK("Sending first URBs\n"); -+ /* @TODO Do I need to check if I am already opened */ -+ ttusbir->opened = 1; -+ -+ for (i = 0; i < num_urbs; i++) { -+ retval = usb_submit_urb(ttusbir->urb[i], GFP_KERNEL); -+ if (retval) { -+ err("%s: usb_submit_urb failed on urb %d", -+ __func__, i); -+ return retval; -+ } -+ } -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+ struct ttusbir_device *ttusbir = data; -+ -+ DPRINTK("Device closed\n"); -+ -+ ttusbir->opened = 0; -+} -+ -+/*** USB specific functions ***/ -+ -+/* -+ * This mapping table is used to do a very simple filtering of the -+ * input signal. -+ * For a value with at least 4 bits set it returns 0xFF otherwise -+ * 0x00. For faster IR signals this can not be used. But for RC-5 we -+ * still have about 14 samples per pulse/space, i.e. we sample with 14 -+ * times higher frequency than the signal frequency -+ */ -+const unsigned char map_table[] = -+{ -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, -+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, -+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF -+}; -+ -+static void urb_complete(struct urb *urb) -+{ -+ struct ttusbir_device *ttusbir; -+ unsigned char *buf; -+ int i; -+ int l; -+ -+ ttusbir = urb->context; -+ -+ if (!ttusbir->opened) -+ return; -+ -+ buf = (unsigned char *)urb->transfer_buffer; -+ -+ for (i = 0; i < 128; i++) { -+ /* Here we do the filtering and some kind of down sampling */ -+ buf[i] = ~map_table[buf[i]]; -+ if (ttusbir->last_pulse == buf[i]) { -+ if (ttusbir->last_num < PULSE_MASK/63) -+ ttusbir->last_num++; -+ /* -+ * else we are in a idle period and do not need to -+ * increment any longer -+ */ -+ } else { -+ l = ttusbir->last_num * 62; /* about 62 = us/byte */ -+ if (ttusbir->last_pulse) /* pulse or space? */ -+ l |= PULSE_BIT; -+ if (!lirc_buffer_full(&ttusbir->rbuf)) { -+ lirc_buffer_write(&ttusbir->rbuf, (void *)&l); -+ wake_up_interruptible(&ttusbir->rbuf.wait_poll); -+ } -+ ttusbir->last_num = 0; -+ ttusbir->last_pulse = buf[i]; -+ } -+ } -+ usb_submit_urb(urb, GFP_ATOMIC); /* keep data rolling :-) */ -+} -+ -+/* -+ * Called whenever the USB subsystem thinks we could be the right driver -+ * to handle this device -+ */ -+static int probe(struct usb_interface *intf, const struct usb_device_id *id) -+{ -+ int alt_set, endp; -+ int found = 0; -+ int i, j; -+ int struct_size; -+ struct usb_host_interface *host_interf; -+ struct usb_interface_descriptor *interf_desc; -+ struct usb_host_endpoint *host_endpoint; -+ struct ttusbir_device *ttusbir; -+ -+ DPRINTK("Module ttusbir probe\n"); -+ -+ /* To reduce memory fragmentation we use only one allocation */ -+ struct_size = sizeof(struct ttusbir_device) + -+ (sizeof(struct urb *) * num_urbs) + -+ (sizeof(char *) * num_urbs) + -+ (num_urbs * 128); -+ ttusbir = kzalloc(struct_size, GFP_KERNEL); -+ if (!ttusbir) -+ return -ENOMEM; -+ -+ ttusbir->urb = (struct urb **)((char *)ttusbir + -+ sizeof(struct ttusbir_device)); -+ ttusbir->buffer = (char **)((char *)ttusbir->urb + -+ (sizeof(struct urb *) * num_urbs)); -+ for (i = 0; i < num_urbs; i++) -+ ttusbir->buffer[i] = (char *)ttusbir->buffer + -+ (sizeof(char *)*num_urbs) + (i * 128); -+ -+ ttusbir->usb_driver = &usb_driver; -+ ttusbir->alt_setting = -1; -+ /* @TODO check if error can be returned */ -+ ttusbir->udev = usb_get_dev(interface_to_usbdev(intf)); -+ ttusbir->interf = intf; -+ ttusbir->last_pulse = 0x00; -+ ttusbir->last_num = 0; -+ -+ /* -+ * Now look for interface setting we can handle -+ * We are searching for the alt setting where end point -+ * 0x82 has max packet size 16 -+ */ -+ for (alt_set = 0; alt_set < intf->num_altsetting && !found; alt_set++) { -+ host_interf = &intf->altsetting[alt_set]; -+ interf_desc = &host_interf->desc; -+ for (endp = 0; endp < interf_desc->bNumEndpoints; endp++) { -+ host_endpoint = &host_interf->endpoint[endp]; -+ if ((host_endpoint->desc.bEndpointAddress == 0x82) && -+ (host_endpoint->desc.wMaxPacketSize == 0x10)) { -+ ttusbir->alt_setting = alt_set; -+ ttusbir->endpoint = endp; -+ found = 1; -+ break; -+ } -+ } -+ } -+ if (ttusbir->alt_setting != -1) -+ DPRINTK("alt setting: %d\n", ttusbir->alt_setting); -+ else { -+ err("Could not find alternate setting\n"); -+ kfree(ttusbir); -+ return -EINVAL; -+ } -+ -+ /* OK lets setup this interface setting */ -+ usb_set_interface(ttusbir->udev, 0, ttusbir->alt_setting); -+ -+ /* Store device info in interface structure */ -+ usb_set_intfdata(intf, ttusbir); -+ -+ /* Register as a LIRC driver */ -+ if (lirc_buffer_init(&ttusbir->rbuf, sizeof(int), 256) < 0) { -+ err("Could not get memory for LIRC data buffer\n"); -+ usb_set_intfdata(intf, NULL); -+ kfree(ttusbir); -+ return -ENOMEM; -+ } -+ strcpy(ttusbir->driver.name, "TTUSBIR"); -+ ttusbir->driver.minor = -1; -+ ttusbir->driver.code_length = 1; -+ ttusbir->driver.sample_rate = 0; -+ ttusbir->driver.data = ttusbir; -+ ttusbir->driver.add_to_buf = NULL; -+ ttusbir->driver.rbuf = &ttusbir->rbuf; -+ ttusbir->driver.set_use_inc = set_use_inc; -+ ttusbir->driver.set_use_dec = set_use_dec; -+ ttusbir->driver.dev = &intf->dev; -+ ttusbir->driver.owner = THIS_MODULE; -+ ttusbir->driver.features = LIRC_CAN_REC_MODE2; -+ ttusbir->minor = lirc_register_driver(&ttusbir->driver); -+ if (ttusbir->minor < 0) { -+ err("Error registering as LIRC driver\n"); -+ usb_set_intfdata(intf, NULL); -+ lirc_buffer_free(&ttusbir->rbuf); -+ kfree(ttusbir); -+ return -EIO; -+ } -+ -+ /* Allocate and setup the URB that we will use to talk to the device */ -+ for (i = 0; i < num_urbs; i++) { -+ ttusbir->urb[i] = usb_alloc_urb(8, GFP_KERNEL); -+ if (!ttusbir->urb[i]) { -+ err("Could not allocate memory for the URB\n"); -+ for (j = i - 1; j >= 0; j--) -+ kfree(ttusbir->urb[j]); -+ lirc_buffer_free(&ttusbir->rbuf); -+ lirc_unregister_driver(ttusbir->minor); -+ kfree(ttusbir); -+ usb_set_intfdata(intf, NULL); -+ return -ENOMEM; -+ } -+ ttusbir->urb[i]->dev = ttusbir->udev; -+ ttusbir->urb[i]->context = ttusbir; -+ ttusbir->urb[i]->pipe = usb_rcvisocpipe(ttusbir->udev, -+ ttusbir->endpoint); -+ ttusbir->urb[i]->interval = 1; -+ ttusbir->urb[i]->transfer_flags = URB_ISO_ASAP; -+ ttusbir->urb[i]->transfer_buffer = &ttusbir->buffer[i][0]; -+ ttusbir->urb[i]->complete = urb_complete; -+ ttusbir->urb[i]->number_of_packets = 8; -+ ttusbir->urb[i]->transfer_buffer_length = 128; -+ for (j = 0; j < 8; j++) { -+ ttusbir->urb[i]->iso_frame_desc[j].offset = j*16; -+ ttusbir->urb[i]->iso_frame_desc[j].length = 16; -+ } -+ } -+ return 0; -+} -+ -+/** -+ * Called when the driver is unloaded or the device is unplugged -+ */ -+static void disconnect(struct usb_interface *intf) -+{ -+ int i; -+ struct ttusbir_device *ttusbir; -+ -+ DPRINTK("Module ttusbir disconnect\n"); -+ -+ ttusbir = (struct ttusbir_device *) usb_get_intfdata(intf); -+ usb_set_intfdata(intf, NULL); -+ lirc_unregister_driver(ttusbir->minor); -+ DPRINTK("unregistered\n"); -+ -+ for (i = 0; i < num_urbs; i++) { -+ usb_kill_urb(ttusbir->urb[i]); -+ usb_free_urb(ttusbir->urb[i]); -+ } -+ DPRINTK("URBs killed\n"); -+ lirc_buffer_free(&ttusbir->rbuf); -+ kfree(ttusbir); -+} -+ -+static int ttusbir_init_module(void) -+{ -+ int result; -+ -+ DPRINTK(KERN_DEBUG "Module ttusbir init\n"); -+ -+ /* register this driver with the USB subsystem */ -+ result = usb_register(&usb_driver); -+ if (result) -+ err("usb_register failed. Error number %d", result); -+ return result; -+} -+ -+static void ttusbir_exit_module(void) -+{ -+ printk(KERN_DEBUG "Module ttusbir exit\n"); -+ usb_deregister(&usb_driver); -+} -+ -+module_init(ttusbir_init_module); -+module_exit(ttusbir_exit_module); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/lirc_zilog.c linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_zilog.c ---- linux-2.6.35-rc6/drivers/input/lirc/lirc_zilog.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/lirc_zilog.c 2010-08-02 09:28:03.990051699 +0200 -@@ -0,0 +1,1388 @@ -+/* -+ * i2c IR lirc driver for devices with zilog IR processors -+ * -+ * Copyright (c) 2000 Gerd Knorr -+ * modified for PixelView (BT878P+W/FM) by -+ * Michal Kochanowicz -+ * Christoph Bartelmus -+ * modified for KNC ONE TV Station/Anubis Typhoon TView Tuner by -+ * Ulrich Mueller -+ * modified for Asus TV-Box and Creative/VisionTek BreakOut-Box by -+ * Stefan Jahn -+ * modified for inclusion into kernel sources by -+ * Jerome Brock -+ * modified for Leadtek Winfast PVR2000 by -+ * Thomas Reitmayr (treitmayr@yahoo.com) -+ * modified for Hauppauge PVR-150 IR TX device by -+ * Mark Weaver -+ * changed name from lirc_pvr150 to lirc_zilog, works on more than pvr-150 -+ * Jarod Wilson -+ * -+ * parts are cut&pasted from the lirc_i2c.c driver -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -+ * -+ */ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "lirc_dev.h" -+#include -+ -+struct IR { -+ struct lirc_driver l; -+ -+ /* Device info */ -+ struct mutex ir_lock; -+ int open; -+ -+ /* RX device */ -+ struct i2c_client c_rx; -+ int have_rx; -+ -+ /* RX device buffer & lock */ -+ struct lirc_buffer buf; -+ struct mutex buf_lock; -+ -+ /* RX polling thread data */ -+ struct completion *t_notify; -+ struct completion *t_notify2; -+ int shutdown; -+ struct task_struct *task; -+ -+ /* RX read data */ -+ unsigned char b[3]; -+ -+ /* TX device */ -+ struct i2c_client c_tx; -+ int need_boot; -+ int have_tx; -+}; -+ -+/* Minor -> data mapping */ -+static struct IR *ir_devices[MAX_IRCTL_DEVICES]; -+ -+/* Block size for IR transmitter */ -+#define TX_BLOCK_SIZE 99 -+ -+/* Hauppauge IR transmitter data */ -+struct tx_data_struct { -+ /* Boot block */ -+ unsigned char *boot_data; -+ -+ /* Start of binary data block */ -+ unsigned char *datap; -+ -+ /* End of binary data block */ -+ unsigned char *endp; -+ -+ /* Number of installed codesets */ -+ unsigned int num_code_sets; -+ -+ /* Pointers to codesets */ -+ unsigned char **code_sets; -+ -+ /* Global fixed data template */ -+ int fixed[TX_BLOCK_SIZE]; -+}; -+ -+static struct tx_data_struct *tx_data; -+static struct mutex tx_data_lock; -+ -+#define zilog_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, \ -+ ## args) -+#define zilog_error(s, args...) printk(KERN_ERR KBUILD_MODNAME ": " s, ## args) -+ -+#define ZILOG_HAUPPAUGE_IR_RX_NAME "Zilog/Hauppauge IR RX" -+#define ZILOG_HAUPPAUGE_IR_TX_NAME "Zilog/Hauppauge IR TX" -+ -+/* module parameters */ -+static int debug; /* debug output */ -+static int disable_rx; /* disable RX device */ -+static int disable_tx; /* disable TX device */ -+static int minor = -1; /* minor number */ -+ -+#define dprintk(fmt, args...) \ -+ do { \ -+ if (debug) \ -+ printk(KERN_DEBUG KBUILD_MODNAME ": " fmt, \ -+ ## args); \ -+ } while (0) -+ -+static int add_to_buf(struct IR *ir) -+{ -+ __u16 code; -+ unsigned char codes[2]; -+ unsigned char keybuf[6]; -+ int got_data = 0; -+ int ret; -+ int failures = 0; -+ unsigned char sendbuf[1] = { 0 }; -+ -+ if (lirc_buffer_full(&ir->buf)) { -+ dprintk("buffer overflow\n"); -+ return -EOVERFLOW; -+ } -+ -+ /* -+ * service the device as long as it is returning -+ * data and we have space -+ */ -+ do { -+ /* -+ * Lock i2c bus for the duration. RX/TX chips interfere so -+ * this is worth it -+ */ -+ mutex_lock(&ir->ir_lock); -+ -+ /* -+ * Send random "poll command" (?) Windows driver does this -+ * and it is a good point to detect chip failure. -+ */ -+ ret = i2c_master_send(&ir->c_rx, sendbuf, 1); -+ if (ret != 1) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ if (failures >= 3) { -+ mutex_unlock(&ir->ir_lock); -+ zilog_error("unable to read from the IR chip " -+ "after 3 resets, giving up\n"); -+ return ret; -+ } -+ -+ /* Looks like the chip crashed, reset it */ -+ zilog_error("polling the IR receiver chip failed, " -+ "trying reset\n"); -+ -+ set_current_state(TASK_UNINTERRUPTIBLE); -+ schedule_timeout((100 * HZ + 999) / 1000); -+ ir->need_boot = 1; -+ -+ ++failures; -+ mutex_unlock(&ir->ir_lock); -+ continue; -+ } -+ -+ ret = i2c_master_recv(&ir->c_rx, keybuf, sizeof(keybuf)); -+ mutex_unlock(&ir->ir_lock); -+ if (ret != sizeof(keybuf)) { -+ zilog_error("i2c_master_recv failed with %d -- " -+ "keeping last read buffer\n", ret); -+ } else { -+ ir->b[0] = keybuf[3]; -+ ir->b[1] = keybuf[4]; -+ ir->b[2] = keybuf[5]; -+ dprintk("key (0x%02x/0x%02x)\n", ir->b[0], ir->b[1]); -+ } -+ -+ /* key pressed ? */ -+#ifdef I2C_HW_B_HDPVR -+ if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) { -+ if (got_data && (keybuf[0] == 0x80)) -+ return 0; -+ else if (got_data && (keybuf[0] == 0x00)) -+ return -ENODATA; -+ } else if ((ir->b[0] & 0x80) == 0) -+#else -+ if ((ir->b[0] & 0x80) == 0) -+#endif -+ return got_data ? 0 : -ENODATA; -+ -+ /* look what we have */ -+ code = (((__u16)ir->b[0] & 0x7f) << 6) | (ir->b[1] >> 2); -+ -+ codes[0] = (code >> 8) & 0xff; -+ codes[1] = code & 0xff; -+ -+ /* return it */ -+ lirc_buffer_write(&ir->buf, codes); -+ ++got_data; -+ } while (!lirc_buffer_full(&ir->buf)); -+ -+ return 0; -+} -+ -+/* -+ * Main function of the polling thread -- from lirc_dev. -+ * We don't fit the LIRC model at all anymore. This is horrible, but -+ * basically we have a single RX/TX device with a nasty failure mode -+ * that needs to be accounted for across the pair. lirc lets us provide -+ * fops, but prevents us from using the internal polling, etc. if we do -+ * so. Hence the replication. Might be neater to extend the LIRC model -+ * to account for this but I'd think it's a very special case of seriously -+ * messed up hardware. -+ */ -+static int lirc_thread(void *arg) -+{ -+ struct IR *ir = arg; -+ -+ if (ir->t_notify != NULL) -+ complete(ir->t_notify); -+ -+ dprintk("poll thread started\n"); -+ -+ do { -+ if (ir->open) { -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* -+ * This is ~113*2 + 24 + jitter (2*repeat gap + -+ * code length). We use this interval as the chip -+ * resets every time you poll it (bad!). This is -+ * therefore just sufficient to catch all of the -+ * button presses. It makes the remote much more -+ * responsive. You can see the difference by -+ * running irw and holding down a button. With -+ * 100ms, the old polling interval, you'll notice -+ * breaks in the repeat sequence corresponding to -+ * lost keypresses. -+ */ -+ schedule_timeout((260 * HZ) / 1000); -+ if (ir->shutdown) -+ break; -+ if (!add_to_buf(ir)) -+ wake_up_interruptible(&ir->buf.wait_poll); -+ } else { -+ /* if device not opened so we can sleep half a second */ -+ set_current_state(TASK_INTERRUPTIBLE); -+ schedule_timeout(HZ/2); -+ } -+ } while (!ir->shutdown); -+ -+ if (ir->t_notify2 != NULL) -+ wait_for_completion(ir->t_notify2); -+ -+ ir->task = NULL; -+ if (ir->t_notify != NULL) -+ complete(ir->t_notify); -+ -+ dprintk("poll thread ended\n"); -+ return 0; -+} -+ -+static int set_use_inc(void *data) -+{ -+ struct IR *ir = data; -+ -+ if (ir->l.owner == NULL || try_module_get(ir->l.owner) == 0) -+ return -ENODEV; -+ -+ /* lock bttv in memory while /dev/lirc is in use */ -+ /* -+ * this is completely broken code. lirc_unregister_driver() -+ * must be possible even when the device is open -+ */ -+ if (ir->c_rx.addr) -+ i2c_use_client(&ir->c_rx); -+ if (ir->c_tx.addr) -+ i2c_use_client(&ir->c_tx); -+ -+ return 0; -+} -+ -+static void set_use_dec(void *data) -+{ -+ struct IR *ir = data; -+ -+ if (ir->c_rx.addr) -+ i2c_release_client(&ir->c_rx); -+ if (ir->c_tx.addr) -+ i2c_release_client(&ir->c_tx); -+ if (ir->l.owner != NULL) -+ module_put(ir->l.owner); -+} -+ -+/* safe read of a uint32 (always network byte order) */ -+static int read_uint32(unsigned char **data, -+ unsigned char *endp, unsigned int *val) -+{ -+ if (*data + 4 > endp) -+ return 0; -+ *val = ((*data)[0] << 24) | ((*data)[1] << 16) | -+ ((*data)[2] << 8) | (*data)[3]; -+ *data += 4; -+ return 1; -+} -+ -+/* safe read of a uint8 */ -+static int read_uint8(unsigned char **data, -+ unsigned char *endp, unsigned char *val) -+{ -+ if (*data + 1 > endp) -+ return 0; -+ *val = *((*data)++); -+ return 1; -+} -+ -+/* safe skipping of N bytes */ -+static int skip(unsigned char **data, -+ unsigned char *endp, unsigned int distance) -+{ -+ if (*data + distance > endp) -+ return 0; -+ *data += distance; -+ return 1; -+} -+ -+/* decompress key data into the given buffer */ -+static int get_key_data(unsigned char *buf, -+ unsigned int codeset, unsigned int key) -+{ -+ unsigned char *data, *endp, *diffs, *key_block; -+ unsigned char keys, ndiffs, id; -+ unsigned int base, lim, pos, i; -+ -+ /* Binary search for the codeset */ -+ for (base = 0, lim = tx_data->num_code_sets; lim; lim >>= 1) { -+ pos = base + (lim >> 1); -+ data = tx_data->code_sets[pos]; -+ -+ if (!read_uint32(&data, tx_data->endp, &i)) -+ goto corrupt; -+ -+ if (i == codeset) -+ break; -+ else if (codeset > i) { -+ base = pos + 1; -+ --lim; -+ } -+ } -+ /* Not found? */ -+ if (!lim) -+ return -EPROTO; -+ -+ /* Set end of data block */ -+ endp = pos < tx_data->num_code_sets - 1 ? -+ tx_data->code_sets[pos + 1] : tx_data->endp; -+ -+ /* Read the block header */ -+ if (!read_uint8(&data, endp, &keys) || -+ !read_uint8(&data, endp, &ndiffs) || -+ ndiffs > TX_BLOCK_SIZE || keys == 0) -+ goto corrupt; -+ -+ /* Save diffs & skip */ -+ diffs = data; -+ if (!skip(&data, endp, ndiffs)) -+ goto corrupt; -+ -+ /* Read the id of the first key */ -+ if (!read_uint8(&data, endp, &id)) -+ goto corrupt; -+ -+ /* Unpack the first key's data */ -+ for (i = 0; i < TX_BLOCK_SIZE; ++i) { -+ if (tx_data->fixed[i] == -1) { -+ if (!read_uint8(&data, endp, &buf[i])) -+ goto corrupt; -+ } else { -+ buf[i] = (unsigned char)tx_data->fixed[i]; -+ } -+ } -+ -+ /* Early out key found/not found */ -+ if (key == id) -+ return 0; -+ if (keys == 1) -+ return -EPROTO; -+ -+ /* Sanity check */ -+ key_block = data; -+ if (!skip(&data, endp, (keys - 1) * (ndiffs + 1))) -+ goto corrupt; -+ -+ /* Binary search for the key */ -+ for (base = 0, lim = keys - 1; lim; lim >>= 1) { -+ /* Seek to block */ -+ unsigned char *key_data; -+ pos = base + (lim >> 1); -+ key_data = key_block + (ndiffs + 1) * pos; -+ -+ if (*key_data == key) { -+ /* skip key id */ -+ ++key_data; -+ -+ /* found, so unpack the diffs */ -+ for (i = 0; i < ndiffs; ++i) { -+ unsigned char val; -+ if (!read_uint8(&key_data, endp, &val) || -+ diffs[i] >= TX_BLOCK_SIZE) -+ goto corrupt; -+ buf[diffs[i]] = val; -+ } -+ -+ return 0; -+ } else if (key > *key_data) { -+ base = pos + 1; -+ --lim; -+ } -+ } -+ /* Key not found */ -+ return -EPROTO; -+ -+corrupt: -+ zilog_error("firmware is corrupt\n"); -+ return -EFAULT; -+} -+ -+/* send a block of data to the IR TX device */ -+static int send_data_block(struct IR *ir, unsigned char *data_block) -+{ -+ int i, j, ret; -+ unsigned char buf[5]; -+ -+ for (i = 0; i < TX_BLOCK_SIZE;) { -+ int tosend = TX_BLOCK_SIZE - i; -+ if (tosend > 4) -+ tosend = 4; -+ buf[0] = (unsigned char)(i + 1); -+ for (j = 0; j < tosend; ++j) -+ buf[1 + j] = data_block[i + j]; -+ dprintk("%02x %02x %02x %02x %02x", -+ buf[0], buf[1], buf[2], buf[3], buf[4]); -+ ret = i2c_master_send(&ir->c_tx, buf, tosend + 1); -+ if (ret != tosend + 1) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ i += tosend; -+ } -+ return 0; -+} -+ -+/* send boot data to the IR TX device */ -+static int send_boot_data(struct IR *ir) -+{ -+ int ret; -+ unsigned char buf[4]; -+ -+ /* send the boot block */ -+ ret = send_data_block(ir, tx_data->boot_data); -+ if (ret != 0) -+ return ret; -+ -+ /* kick it off? */ -+ buf[0] = 0x00; -+ buf[1] = 0x20; -+ ret = i2c_master_send(&ir->c_tx, buf, 2); -+ if (ret != 2) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ ret = i2c_master_send(&ir->c_tx, buf, 1); -+ if (ret != 1) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ -+ /* Here comes the firmware version... (hopefully) */ -+ ret = i2c_master_recv(&ir->c_tx, buf, 4); -+ if (ret != 4) { -+ zilog_error("i2c_master_recv failed with %d\n", ret); -+ return 0; -+ } -+ if (buf[0] != 0x80) { -+ zilog_error("unexpected IR TX response: %02x\n", buf[0]); -+ return 0; -+ } -+ zilog_notify("Zilog/Hauppauge IR blaster firmware version " -+ "%d.%d.%d loaded\n", buf[1], buf[2], buf[3]); -+ -+ return 0; -+} -+ -+/* unload "firmware", lock held */ -+static void fw_unload_locked(void) -+{ -+ if (tx_data) { -+ if (tx_data->code_sets) -+ vfree(tx_data->code_sets); -+ -+ if (tx_data->datap) -+ vfree(tx_data->datap); -+ -+ vfree(tx_data); -+ tx_data = NULL; -+ dprintk("successfully unloaded IR blaster firmware\n"); -+ } -+} -+ -+/* unload "firmware" for the IR TX device */ -+static void fw_unload(void) -+{ -+ mutex_lock(&tx_data_lock); -+ fw_unload_locked(); -+ mutex_unlock(&tx_data_lock); -+} -+ -+/* load "firmware" for the IR TX device */ -+static int fw_load(struct IR *ir) -+{ -+ int ret; -+ unsigned int i; -+ unsigned char *data, version, num_global_fixed; -+ const struct firmware *fw_entry; -+ -+ /* Already loaded? */ -+ mutex_lock(&tx_data_lock); -+ if (tx_data) { -+ ret = 0; -+ goto out; -+ } -+ -+ /* Request codeset data file */ -+ ret = request_firmware(&fw_entry, "haup-ir-blaster.bin", &ir->c_tx.dev); -+ if (ret != 0) { -+ zilog_error("firmware haup-ir-blaster.bin not available " -+ "(%d)\n", ret); -+ ret = ret < 0 ? ret : -EFAULT; -+ goto out; -+ } -+ dprintk("firmware of size %zu loaded\n", fw_entry->size); -+ -+ /* Parse the file */ -+ tx_data = vmalloc(sizeof(*tx_data)); -+ if (tx_data == NULL) { -+ zilog_error("out of memory\n"); -+ release_firmware(fw_entry); -+ ret = -ENOMEM; -+ goto out; -+ } -+ tx_data->code_sets = NULL; -+ -+ /* Copy the data so hotplug doesn't get confused and timeout */ -+ tx_data->datap = vmalloc(fw_entry->size); -+ if (tx_data->datap == NULL) { -+ zilog_error("out of memory\n"); -+ release_firmware(fw_entry); -+ vfree(tx_data); -+ ret = -ENOMEM; -+ goto out; -+ } -+ memcpy(tx_data->datap, fw_entry->data, fw_entry->size); -+ tx_data->endp = tx_data->datap + fw_entry->size; -+ release_firmware(fw_entry); fw_entry = NULL; -+ -+ /* Check version */ -+ data = tx_data->datap; -+ if (!read_uint8(&data, tx_data->endp, &version)) -+ goto corrupt; -+ if (version != 1) { -+ zilog_error("unsupported code set file version (%u, expected" -+ "1) -- please upgrade to a newer driver", -+ version); -+ fw_unload_locked(); -+ ret = -EFAULT; -+ goto out; -+ } -+ -+ /* Save boot block for later */ -+ tx_data->boot_data = data; -+ if (!skip(&data, tx_data->endp, TX_BLOCK_SIZE)) -+ goto corrupt; -+ -+ if (!read_uint32(&data, tx_data->endp, -+ &tx_data->num_code_sets)) -+ goto corrupt; -+ -+ dprintk("%u IR blaster codesets loaded\n", tx_data->num_code_sets); -+ -+ tx_data->code_sets = vmalloc( -+ tx_data->num_code_sets * sizeof(char *)); -+ if (tx_data->code_sets == NULL) { -+ fw_unload_locked(); -+ ret = -ENOMEM; -+ goto out; -+ } -+ -+ for (i = 0; i < TX_BLOCK_SIZE; ++i) -+ tx_data->fixed[i] = -1; -+ -+ /* Read global fixed data template */ -+ if (!read_uint8(&data, tx_data->endp, &num_global_fixed) || -+ num_global_fixed > TX_BLOCK_SIZE) -+ goto corrupt; -+ for (i = 0; i < num_global_fixed; ++i) { -+ unsigned char pos, val; -+ if (!read_uint8(&data, tx_data->endp, &pos) || -+ !read_uint8(&data, tx_data->endp, &val) || -+ pos >= TX_BLOCK_SIZE) -+ goto corrupt; -+ tx_data->fixed[pos] = (int)val; -+ } -+ -+ /* Filch out the position of each code set */ -+ for (i = 0; i < tx_data->num_code_sets; ++i) { -+ unsigned int id; -+ unsigned char keys; -+ unsigned char ndiffs; -+ -+ /* Save the codeset position */ -+ tx_data->code_sets[i] = data; -+ -+ /* Read header */ -+ if (!read_uint32(&data, tx_data->endp, &id) || -+ !read_uint8(&data, tx_data->endp, &keys) || -+ !read_uint8(&data, tx_data->endp, &ndiffs) || -+ ndiffs > TX_BLOCK_SIZE || keys == 0) -+ goto corrupt; -+ -+ /* skip diff positions */ -+ if (!skip(&data, tx_data->endp, ndiffs)) -+ goto corrupt; -+ -+ /* -+ * After the diffs we have the first key id + data - -+ * global fixed -+ */ -+ if (!skip(&data, tx_data->endp, -+ 1 + TX_BLOCK_SIZE - num_global_fixed)) -+ goto corrupt; -+ -+ /* Then we have keys-1 blocks of key id+diffs */ -+ if (!skip(&data, tx_data->endp, -+ (ndiffs + 1) * (keys - 1))) -+ goto corrupt; -+ } -+ ret = 0; -+ goto out; -+ -+corrupt: -+ zilog_error("firmware is corrupt\n"); -+ fw_unload_locked(); -+ ret = -EFAULT; -+ -+out: -+ mutex_unlock(&tx_data_lock); -+ return ret; -+} -+ -+/* initialise the IR TX device */ -+static int tx_init(struct IR *ir) -+{ -+ int ret; -+ -+ /* Load 'firmware' */ -+ ret = fw_load(ir); -+ if (ret != 0) -+ return ret; -+ -+ /* Send boot block */ -+ ret = send_boot_data(ir); -+ if (ret != 0) -+ return ret; -+ ir->need_boot = 0; -+ -+ /* Looks good */ -+ return 0; -+} -+ -+/* do nothing stub to make LIRC happy */ -+static loff_t lseek(struct file *filep, loff_t offset, int orig) -+{ -+ return -ESPIPE; -+} -+ -+/* copied from lirc_dev */ -+static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos) -+{ -+ struct IR *ir = (struct IR *)filep->private_data; -+ unsigned char buf[ir->buf.chunk_size]; -+ int ret = 0, written = 0; -+ DECLARE_WAITQUEUE(wait, current); -+ -+ dprintk("read called\n"); -+ if (ir->c_rx.addr == 0) -+ return -ENODEV; -+ -+ if (mutex_lock_interruptible(&ir->buf_lock)) -+ return -ERESTARTSYS; -+ -+ if (n % ir->buf.chunk_size) { -+ dprintk("read result = -EINVAL\n"); -+ mutex_unlock(&ir->buf_lock); -+ return -EINVAL; -+ } -+ -+ /* -+ * we add ourselves to the task queue before buffer check -+ * to avoid losing scan code (in case when queue is awaken somewhere -+ * between while condition checking and scheduling) -+ */ -+ add_wait_queue(&ir->buf.wait_poll, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* -+ * while we didn't provide 'length' bytes, device is opened in blocking -+ * mode and 'copy_to_user' is happy, wait for data. -+ */ -+ while (written < n && ret == 0) { -+ if (lirc_buffer_empty(&ir->buf)) { -+ /* -+ * According to the read(2) man page, 'written' can be -+ * returned as less than 'n', instead of blocking -+ * again, returning -EWOULDBLOCK, or returning -+ * -ERESTARTSYS -+ */ -+ if (written) -+ break; -+ if (filep->f_flags & O_NONBLOCK) { -+ ret = -EWOULDBLOCK; -+ break; -+ } -+ if (signal_pending(current)) { -+ ret = -ERESTARTSYS; -+ break; -+ } -+ schedule(); -+ set_current_state(TASK_INTERRUPTIBLE); -+ } else { -+ lirc_buffer_read(&ir->buf, buf); -+ ret = copy_to_user((void *)outbuf+written, buf, -+ ir->buf.chunk_size); -+ written += ir->buf.chunk_size; -+ } -+ } -+ -+ remove_wait_queue(&ir->buf.wait_poll, &wait); -+ set_current_state(TASK_RUNNING); -+ mutex_unlock(&ir->buf_lock); -+ -+ dprintk("read result = %s (%d)\n", -+ ret ? "-EFAULT" : "OK", ret); -+ -+ return ret ? ret : written; -+} -+ -+/* send a keypress to the IR TX device */ -+static int send_code(struct IR *ir, unsigned int code, unsigned int key) -+{ -+ unsigned char data_block[TX_BLOCK_SIZE]; -+ unsigned char buf[2]; -+ int i, ret; -+ -+ /* Get data for the codeset/key */ -+ ret = get_key_data(data_block, code, key); -+ -+ if (ret == -EPROTO) { -+ zilog_error("failed to get data for code %u, key %u -- check " -+ "lircd.conf entries\n", code, key); -+ return ret; -+ } else if (ret != 0) -+ return ret; -+ -+ /* Send the data block */ -+ ret = send_data_block(ir, data_block); -+ if (ret != 0) -+ return ret; -+ -+ /* Send data block length? */ -+ buf[0] = 0x00; -+ buf[1] = 0x40; -+ ret = i2c_master_send(&ir->c_tx, buf, 2); -+ if (ret != 2) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ ret = i2c_master_send(&ir->c_tx, buf, 1); -+ if (ret != 1) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ -+ /* Send finished download? */ -+ ret = i2c_master_recv(&ir->c_tx, buf, 1); -+ if (ret != 1) { -+ zilog_error("i2c_master_recv failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ if (buf[0] != 0xA0) { -+ zilog_error("unexpected IR TX response #1: %02x\n", -+ buf[0]); -+ return -EFAULT; -+ } -+ -+ /* Send prepare command? */ -+ buf[0] = 0x00; -+ buf[1] = 0x80; -+ ret = i2c_master_send(&ir->c_tx, buf, 2); -+ if (ret != 2) { -+ zilog_error("i2c_master_send failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ -+#ifdef I2C_HW_B_HDPVR -+ /* -+ * The sleep bits aren't necessary on the HD PVR, and in fact, the -+ * last i2c_master_recv always fails with a -5, so for now, we're -+ * going to skip this whole mess and say we're done on the HD PVR -+ */ -+ if (ir->c_rx.adapter->id == I2C_HW_B_HDPVR) -+ goto done; -+#endif -+ -+ /* -+ * This bit NAKs until the device is ready, so we retry it -+ * sleeping a bit each time. This seems to be what the windows -+ * driver does, approximately. -+ * Try for up to 1s. -+ */ -+ for (i = 0; i < 20; ++i) { -+ set_current_state(TASK_UNINTERRUPTIBLE); -+ schedule_timeout((50 * HZ + 999) / 1000); -+ ret = i2c_master_send(&ir->c_tx, buf, 1); -+ if (ret == 1) -+ break; -+ dprintk("NAK expected: i2c_master_send " -+ "failed with %d (try %d)\n", ret, i+1); -+ } -+ if (ret != 1) { -+ zilog_error("IR TX chip never got ready: last i2c_master_send " -+ "failed with %d\n", ret); -+ return ret < 0 ? ret : -EFAULT; -+ } -+ -+ /* Seems to be an 'ok' response */ -+ i = i2c_master_recv(&ir->c_tx, buf, 1); -+ if (i != 1) { -+ zilog_error("i2c_master_recv failed with %d\n", ret); -+ return -EFAULT; -+ } -+ if (buf[0] != 0x80) { -+ zilog_error("unexpected IR TX response #2: %02x\n", buf[0]); -+ return -EFAULT; -+ } -+ -+done: -+ /* Oh good, it worked */ -+ dprintk("sent code %u, key %u\n", code, key); -+ return 0; -+} -+ -+/* -+ * Write a code to the device. We take in a 32-bit number (an int) and then -+ * decode this to a codeset/key index. The key data is then decompressed and -+ * sent to the device. We have a spin lock as per i2c documentation to prevent -+ * multiple concurrent sends which would probably cause the device to explode. -+ */ -+static ssize_t write(struct file *filep, const char *buf, size_t n, -+ loff_t *ppos) -+{ -+ struct IR *ir = (struct IR *)filep->private_data; -+ size_t i; -+ int failures = 0; -+ -+ if (ir->c_tx.addr == 0) -+ return -ENODEV; -+ -+ /* Validate user parameters */ -+ if (n % sizeof(int)) -+ return -EINVAL; -+ -+ /* Lock i2c bus for the duration */ -+ mutex_lock(&ir->ir_lock); -+ -+ /* Send each keypress */ -+ for (i = 0; i < n;) { -+ int ret = 0; -+ int command; -+ -+ if (copy_from_user(&command, buf + i, sizeof(command))) { -+ mutex_unlock(&ir->ir_lock); -+ return -EFAULT; -+ } -+ -+ /* Send boot data first if required */ -+ if (ir->need_boot == 1) { -+ ret = send_boot_data(ir); -+ if (ret == 0) -+ ir->need_boot = 0; -+ } -+ -+ /* Send the code */ -+ if (ret == 0) { -+ ret = send_code(ir, (unsigned)command >> 16, -+ (unsigned)command & 0xFFFF); -+ if (ret == -EPROTO) { -+ mutex_unlock(&ir->ir_lock); -+ return ret; -+ } -+ } -+ -+ /* -+ * Hmm, a failure. If we've had a few then give up, otherwise -+ * try a reset -+ */ -+ if (ret != 0) { -+ /* Looks like the chip crashed, reset it */ -+ zilog_error("sending to the IR transmitter chip " -+ "failed, trying reset\n"); -+ -+ if (failures >= 3) { -+ zilog_error("unable to send to the IR chip " -+ "after 3 resets, giving up\n"); -+ mutex_unlock(&ir->ir_lock); -+ return ret; -+ } -+ set_current_state(TASK_UNINTERRUPTIBLE); -+ schedule_timeout((100 * HZ + 999) / 1000); -+ ir->need_boot = 1; -+ ++failures; -+ } else -+ i += sizeof(int); -+ } -+ -+ /* Release i2c bus */ -+ mutex_unlock(&ir->ir_lock); -+ -+ /* All looks good */ -+ return n; -+} -+ -+/* copied from lirc_dev */ -+static unsigned int poll(struct file *filep, poll_table *wait) -+{ -+ struct IR *ir = (struct IR *)filep->private_data; -+ unsigned int ret; -+ -+ dprintk("poll called\n"); -+ if (ir->c_rx.addr == 0) -+ return -ENODEV; -+ -+ mutex_lock(&ir->buf_lock); -+ -+ poll_wait(filep, &ir->buf.wait_poll, wait); -+ -+ dprintk("poll result = %s\n", -+ lirc_buffer_empty(&ir->buf) ? "0" : "POLLIN|POLLRDNORM"); -+ -+ ret = lirc_buffer_empty(&ir->buf) ? 0 : (POLLIN|POLLRDNORM); -+ -+ mutex_unlock(&ir->buf_lock); -+ return ret; -+} -+ -+static int ioctl(struct inode *node, struct file *filep, unsigned int cmd, -+ unsigned long arg) -+{ -+ struct IR *ir = (struct IR *)filep->private_data; -+ int result; -+ unsigned long mode, features = 0; -+ -+ if (ir->c_rx.addr != 0) -+ features |= LIRC_CAN_REC_LIRCCODE; -+ if (ir->c_tx.addr != 0) -+ features |= LIRC_CAN_SEND_PULSE; -+ -+ switch (cmd) { -+ case LIRC_GET_LENGTH: -+ result = put_user((unsigned long)13, -+ (unsigned long *)arg); -+ break; -+ case LIRC_GET_FEATURES: -+ result = put_user(features, (unsigned long *) arg); -+ break; -+ case LIRC_GET_REC_MODE: -+ if (!(features&LIRC_CAN_REC_MASK)) -+ return -ENOSYS; -+ -+ result = put_user(LIRC_REC2MODE -+ (features&LIRC_CAN_REC_MASK), -+ (unsigned long *)arg); -+ break; -+ case LIRC_SET_REC_MODE: -+ if (!(features&LIRC_CAN_REC_MASK)) -+ return -ENOSYS; -+ -+ result = get_user(mode, (unsigned long *)arg); -+ if (!result && !(LIRC_MODE2REC(mode) & features)) -+ result = -EINVAL; -+ break; -+ case LIRC_GET_SEND_MODE: -+ if (!(features&LIRC_CAN_SEND_MASK)) -+ return -ENOSYS; -+ -+ result = put_user(LIRC_MODE_PULSE, (unsigned long *) arg); -+ break; -+ case LIRC_SET_SEND_MODE: -+ if (!(features&LIRC_CAN_SEND_MASK)) -+ return -ENOSYS; -+ -+ result = get_user(mode, (unsigned long *) arg); -+ if (!result && mode != LIRC_MODE_PULSE) -+ return -EINVAL; -+ break; -+ default: -+ return -EINVAL; -+ } -+ return result; -+} -+ -+/* -+ * Open the IR device. Get hold of our IR structure and -+ * stash it in private_data for the file -+ */ -+static int open(struct inode *node, struct file *filep) -+{ -+ struct IR *ir; -+ int ret; -+ -+ /* find our IR struct */ -+ unsigned minor = MINOR(node->i_rdev); -+ if (minor >= MAX_IRCTL_DEVICES) { -+ dprintk("minor %d: open result = -ENODEV\n", -+ minor); -+ return -ENODEV; -+ } -+ ir = ir_devices[minor]; -+ -+ /* increment in use count */ -+ mutex_lock(&ir->ir_lock); -+ ++ir->open; -+ ret = set_use_inc(ir); -+ if (ret != 0) { -+ --ir->open; -+ mutex_unlock(&ir->ir_lock); -+ return ret; -+ } -+ mutex_unlock(&ir->ir_lock); -+ -+ /* stash our IR struct */ -+ filep->private_data = ir; -+ -+ return 0; -+} -+ -+/* Close the IR device */ -+static int close(struct inode *node, struct file *filep) -+{ -+ /* find our IR struct */ -+ struct IR *ir = (struct IR *)filep->private_data; -+ if (ir == NULL) { -+ zilog_error("close: no private_data attached to the file!\n"); -+ return -ENODEV; -+ } -+ -+ /* decrement in use count */ -+ mutex_lock(&ir->ir_lock); -+ --ir->open; -+ set_use_dec(ir); -+ mutex_unlock(&ir->ir_lock); -+ -+ return 0; -+} -+ -+static struct lirc_driver lirc_template = { -+ .name = "lirc_zilog", -+ .set_use_inc = set_use_inc, -+ .set_use_dec = set_use_dec, -+ .owner = THIS_MODULE -+}; -+ -+static int ir_remove(struct i2c_client *client); -+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id); -+static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg); -+ -+static const struct i2c_device_id ir_transceiver_id[] = { -+ /* Generic entry for any IR transceiver */ -+ { "ir_video", 0 }, -+ /* IR device specific entries should be added here */ -+ { "ir_tx_z8f0811_haup", 0 }, -+ { "ir_rx_z8f0811_haup", 0 }, -+ { } -+}; -+ -+static struct i2c_driver driver = { -+ .driver = { -+ .owner = THIS_MODULE, -+ .name = "Zilog/Hauppauge i2c IR", -+ }, -+ .probe = ir_probe, -+ .remove = ir_remove, -+ .command = ir_command, -+ .id_table = ir_transceiver_id, -+}; -+ -+static struct file_operations lirc_fops = { -+ .owner = THIS_MODULE, -+ .llseek = lseek, -+ .read = read, -+ .write = write, -+ .poll = poll, -+ .ioctl = ioctl, -+ .open = open, -+ .release = close -+}; -+ -+static int ir_remove(struct i2c_client *client) -+{ -+ struct IR *ir = i2c_get_clientdata(client); -+ -+ mutex_lock(&ir->ir_lock); -+ -+ if (ir->have_rx || ir->have_tx) { -+ DECLARE_COMPLETION(tn); -+ DECLARE_COMPLETION(tn2); -+ -+ /* end up polling thread */ -+ if (ir->task && !IS_ERR(ir->task)) { -+ ir->t_notify = &tn; -+ ir->t_notify2 = &tn2; -+ ir->shutdown = 1; -+ wake_up_process(ir->task); -+ complete(&tn2); -+ wait_for_completion(&tn); -+ ir->t_notify = NULL; -+ ir->t_notify2 = NULL; -+ } -+ -+ } else { -+ mutex_unlock(&ir->ir_lock); -+ zilog_error("%s: detached from something we didn't " -+ "attach to\n", __func__); -+ return -ENODEV; -+ } -+ -+ /* unregister lirc driver */ -+ if (ir->l.minor >= 0 && ir->l.minor < MAX_IRCTL_DEVICES) { -+ lirc_unregister_driver(ir->l.minor); -+ ir_devices[ir->l.minor] = NULL; -+ } -+ -+ /* free memory */ -+ lirc_buffer_free(&ir->buf); -+ mutex_unlock(&ir->ir_lock); -+ kfree(ir); -+ -+ return 0; -+} -+ -+static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) -+{ -+ struct IR *ir = NULL; -+ struct i2c_adapter *adap = client->adapter; -+ char buf; -+ int ret; -+ int have_rx = 0, have_tx = 0; -+ -+ dprintk("%s: adapter id=0x%x, client addr=0x%02x\n", -+ __func__, adap->id, client->addr); -+ -+ /* -+ * The external IR receiver is at i2c address 0x71. -+ * The IR transmitter is at 0x70. -+ */ -+ client->addr = 0x70; -+ -+ if (!disable_tx) { -+ if (i2c_master_recv(client, &buf, 1) == 1) -+ have_tx = 1; -+ dprintk("probe 0x70 @ %s: %s\n", -+ adap->name, have_tx ? "success" : "failed"); -+ } -+ -+ if (!disable_rx) { -+ client->addr = 0x71; -+ if (i2c_master_recv(client, &buf, 1) == 1) -+ have_rx = 1; -+ dprintk("probe 0x71 @ %s: %s\n", -+ adap->name, have_rx ? "success" : "failed"); -+ } -+ -+ if (!(have_rx || have_tx)) { -+ zilog_error("%s: no devices found\n", adap->name); -+ goto out_nodev; -+ } -+ -+ printk(KERN_INFO "lirc_zilog: chip found with %s\n", -+ have_rx && have_tx ? "RX and TX" : -+ have_rx ? "RX only" : "TX only"); -+ -+ ir = kzalloc(sizeof(struct IR), GFP_KERNEL); -+ -+ if (!ir) -+ goto out_nomem; -+ -+ ret = lirc_buffer_init(&ir->buf, 2, BUFLEN / 2); -+ if (ret) -+ goto out_nomem; -+ -+ mutex_init(&ir->ir_lock); -+ mutex_init(&ir->buf_lock); -+ ir->need_boot = 1; -+ -+ memcpy(&ir->l, &lirc_template, sizeof(struct lirc_driver)); -+ ir->l.minor = -1; -+ -+ /* I2C attach to device */ -+ i2c_set_clientdata(client, ir); -+ -+ /* initialise RX device */ -+ if (have_rx) { -+ DECLARE_COMPLETION(tn); -+ memcpy(&ir->c_rx, client, sizeof(struct i2c_client)); -+ -+ ir->c_rx.addr = 0x71; -+ strlcpy(ir->c_rx.name, ZILOG_HAUPPAUGE_IR_RX_NAME, -+ I2C_NAME_SIZE); -+ -+ /* try to fire up polling thread */ -+ ir->t_notify = &tn; -+ ir->task = kthread_run(lirc_thread, ir, "lirc_zilog"); -+ if (IS_ERR(ir->task)) { -+ ret = PTR_ERR(ir->task); -+ zilog_error("lirc_register_driver: cannot run " -+ "poll thread %d\n", ret); -+ goto err; -+ } -+ wait_for_completion(&tn); -+ ir->t_notify = NULL; -+ ir->have_rx = 1; -+ } -+ -+ /* initialise TX device */ -+ if (have_tx) { -+ memcpy(&ir->c_tx, client, sizeof(struct i2c_client)); -+ ir->c_tx.addr = 0x70; -+ strlcpy(ir->c_tx.name, ZILOG_HAUPPAUGE_IR_TX_NAME, -+ I2C_NAME_SIZE); -+ ir->have_tx = 1; -+ } -+ -+ /* set lirc_dev stuff */ -+ ir->l.code_length = 13; -+ ir->l.rbuf = &ir->buf; -+ ir->l.fops = &lirc_fops; -+ ir->l.data = ir; -+ ir->l.minor = minor; -+ ir->l.dev = &adap->dev; -+ ir->l.sample_rate = 0; -+ -+ /* register with lirc */ -+ ir->l.minor = lirc_register_driver(&ir->l); -+ if (ir->l.minor < 0 || ir->l.minor >= MAX_IRCTL_DEVICES) { -+ zilog_error("ir_attach: \"minor\" must be between 0 and %d " -+ "(%d)!\n", MAX_IRCTL_DEVICES-1, ir->l.minor); -+ ret = -EBADRQC; -+ goto err; -+ } -+ -+ /* store this for getting back in open() later on */ -+ ir_devices[ir->l.minor] = ir; -+ -+ /* -+ * if we have the tx device, load the 'firmware'. We do this -+ * after registering with lirc as otherwise hotplug seems to take -+ * 10s to create the lirc device. -+ */ -+ if (have_tx) { -+ /* Special TX init */ -+ ret = tx_init(ir); -+ if (ret != 0) -+ goto err; -+ } -+ -+ return 0; -+ -+err: -+ /* undo everything, hopefully... */ -+ if (ir->c_rx.addr) -+ ir_remove(&ir->c_rx); -+ if (ir->c_tx.addr) -+ ir_remove(&ir->c_tx); -+ return ret; -+ -+out_nodev: -+ zilog_error("no device found\n"); -+ return -ENODEV; -+ -+out_nomem: -+ zilog_error("memory allocation failure\n"); -+ kfree(ir); -+ return -ENOMEM; -+} -+ -+static int ir_command(struct i2c_client *client, unsigned int cmd, void *arg) -+{ -+ /* nothing */ -+ return 0; -+} -+ -+static int __init zilog_init(void) -+{ -+ int ret; -+ -+ zilog_notify("Zilog/Hauppauge IR driver initializing\n"); -+ -+ mutex_init(&tx_data_lock); -+ -+ request_module("firmware_class"); -+ -+ ret = i2c_add_driver(&driver); -+ if (ret) -+ zilog_error("initialization failed\n"); -+ else -+ zilog_notify("initialization complete\n"); -+ -+ return ret; -+} -+ -+static void __exit zilog_exit(void) -+{ -+ i2c_del_driver(&driver); -+ /* if loaded */ -+ fw_unload(); -+ zilog_notify("Zilog/Hauppauge IR driver unloaded\n"); -+} -+ -+module_init(zilog_init); -+module_exit(zilog_exit); -+ -+MODULE_DESCRIPTION("Zilog/Hauppauge infrared transmitter driver (i2c stack)"); -+MODULE_AUTHOR("Gerd Knorr, Michal Kochanowicz, Christoph Bartelmus, " -+ "Ulrich Mueller, Stefan Jahn, Jerome Brock, Mark Weaver"); -+MODULE_LICENSE("GPL"); -+/* for compat with old name, which isn't all that accurate anymore */ -+MODULE_ALIAS("lirc_pvr150"); -+ -+module_param(minor, int, 0444); -+MODULE_PARM_DESC(minor, "Preferred minor device number"); -+ -+module_param(debug, bool, 0644); -+MODULE_PARM_DESC(debug, "Enable debugging messages"); -+ -+module_param(disable_rx, bool, 0644); -+MODULE_PARM_DESC(disable_rx, "Disable the IR receiver device"); -+ -+module_param(disable_tx, bool, 0644); -+MODULE_PARM_DESC(disable_tx, "Disable the IR transmitter device"); -diff -Naur linux-2.6.35-rc6/drivers/input/lirc/Makefile linux-2.6.35-rc6.patch/drivers/input/lirc/Makefile ---- linux-2.6.35-rc6/drivers/input/lirc/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/lirc/Makefile 2010-08-02 09:28:03.990051699 +0200 -@@ -0,0 +1,21 @@ -+# Makefile for the lirc drivers. -+# -+ -+# Each configuration option enables a list of files. -+ -+obj-$(CONFIG_INPUT_LIRC) += lirc_dev.o -+obj-$(CONFIG_LIRC_BT829) += lirc_bt829.o -+obj-$(CONFIG_LIRC_ENE0100) += lirc_ene0100.o -+obj-$(CONFIG_LIRC_I2C) += lirc_i2c.o -+obj-$(CONFIG_LIRC_IGORPLUGUSB) += lirc_igorplugusb.o -+obj-$(CONFIG_LIRC_IMON) += lirc_imon.o -+obj-$(CONFIG_LIRC_IT87) += lirc_it87.o -+obj-$(CONFIG_LIRC_ITE8709) += lirc_ite8709.o -+obj-$(CONFIG_LIRC_MCEUSB) += lirc_mceusb.o -+obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o -+obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o -+obj-$(CONFIG_LIRC_SERIAL) += lirc_serial.o -+obj-$(CONFIG_LIRC_SIR) += lirc_sir.o -+obj-$(CONFIG_LIRC_STREAMZAP) += lirc_streamzap.o -+obj-$(CONFIG_LIRC_TTUSBIR) += lirc_ttusbir.o -+obj-$(CONFIG_LIRC_ZILOG) += lirc_zilog.o -diff -Naur linux-2.6.35-rc6/drivers/input/Makefile linux-2.6.35-rc6.patch/drivers/input/Makefile ---- linux-2.6.35-rc6/drivers/input/Makefile 2010-07-22 21:13:38.000000000 +0200 -+++ linux-2.6.35-rc6.patch/drivers/input/Makefile 2010-08-02 09:28:03.991050074 +0200 -@@ -26,3 +26,5 @@ - obj-$(CONFIG_INPUT_APMPOWER) += apm-power.o - - obj-$(CONFIG_XEN_KBDDEV_FRONTEND) += xen-kbdfront.o -+ -+obj-$(CONFIG_INPUT_LIRC) += lirc/ -diff -Naur linux-2.6.35-rc6/drivers/input/misc/imon.c linux-2.6.35-rc6.patch/drivers/input/misc/imon.c ---- linux-2.6.35-rc6/drivers/input/misc/imon.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/drivers/input/misc/imon.c 2010-08-02 09:28:03.993924653 +0200 -@@ -0,0 +1,2537 @@ -+/* -+ * imon.c: input and display driver for SoundGraph iMON IR/VFD/LCD -+ * -+ * Copyright(C) 2009 Jarod Wilson -+ * Portions based on the original lirc_imon driver, -+ * Copyright(C) 2004 Venky Raju(dev@venky.ws) -+ * -+ * imon is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define MOD_AUTHOR "Jarod Wilson " -+#define MOD_DESC "Driver for SoundGraph iMON MultiMedia IR/Display" -+#define MOD_NAME "imon" -+#define MOD_VERSION "0.8" -+ -+#define DISPLAY_MINOR_BASE 144 -+#define DEVICE_NAME "lcd%d" -+ -+#define BUF_CHUNK_SIZE 8 -+#define BUF_SIZE 128 -+ -+#define BIT_DURATION 250 /* each bit received is 250us */ -+ -+#define IMON_CLOCK_ENABLE_PACKETS 2 -+#define IMON_KEY_RELEASE_OFFSET 1000 -+ -+/*** P R O T O T Y P E S ***/ -+ -+/* USB Callback prototypes */ -+static int imon_probe(struct usb_interface *interface, -+ const struct usb_device_id *id); -+static void imon_disconnect(struct usb_interface *interface); -+static void usb_rx_callback_intf0(struct urb *urb); -+static void usb_rx_callback_intf1(struct urb *urb); -+static void usb_tx_callback(struct urb *urb); -+ -+/* suspend/resume support */ -+static int imon_resume(struct usb_interface *intf); -+static int imon_suspend(struct usb_interface *intf, pm_message_t message); -+ -+/* Display file_operations function prototypes */ -+static int display_open(struct inode *inode, struct file *file); -+static int display_close(struct inode *inode, struct file *file); -+ -+/* VFD write operation */ -+static ssize_t vfd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos); -+ -+/* LCD file_operations override function prototypes */ -+static ssize_t lcd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos); -+ -+/*** G L O B A L S ***/ -+ -+struct imon_context { -+ struct device *dev; -+ struct usb_device *usbdev_intf0; -+ /* Newer devices have two interfaces */ -+ struct usb_device *usbdev_intf1; -+ bool display_supported; /* not all controllers do */ -+ bool display_isopen; /* display port has been opened */ -+ bool ir_isassociating; /* IR port open for association */ -+ bool dev_present_intf0; /* USB device presence, interface 0 */ -+ bool dev_present_intf1; /* USB device presence, interface 1 */ -+ struct mutex lock; /* to lock this object */ -+ wait_queue_head_t remove_ok; /* For unexpected USB disconnects */ -+ -+ struct usb_endpoint_descriptor *rx_endpoint_intf0; -+ struct usb_endpoint_descriptor *rx_endpoint_intf1; -+ struct usb_endpoint_descriptor *tx_endpoint; -+ struct urb *rx_urb_intf0; -+ struct urb *rx_urb_intf1; -+ struct urb *tx_urb; -+ bool tx_control; -+ unsigned char usb_rx_buf[8]; -+ unsigned char usb_tx_buf[8]; -+ -+ struct tx_t { -+ unsigned char data_buf[35]; /* user data buffer */ -+ struct completion finished; /* wait for write to finish */ -+ bool busy; /* write in progress */ -+ int status; /* status of tx completion */ -+ } tx; -+ -+ u16 vendor; /* usb vendor ID */ -+ u16 product; /* usb product ID */ -+ int ir_protocol; /* iMON or MCE (RC6) IR protocol? */ -+ struct input_dev *idev; /* input device for remote */ -+ struct input_dev *touch; /* input device for touchscreen */ -+ int ki; /* current input keycode key index */ -+ u16 kc; /* current input keycode */ -+ u16 last_keycode; /* last reported input keycode */ -+ u8 mce_toggle_bit; /* last mce toggle bit */ -+ int display_type; /* store the display type */ -+ bool pad_mouse; /* toggle kbd(0)/mouse(1) mode */ -+ int touch_x; /* x coordinate on touchscreen */ -+ int touch_y; /* y coordinate on touchscreen */ -+ char name_idev[128]; /* input device name */ -+ char phys_idev[64]; /* input device phys path */ -+ struct timer_list itimer; /* input device timer, need for rc6 */ -+ char name_touch[128]; /* touch screen name */ -+ char phys_touch[64]; /* touch screen phys path */ -+ struct timer_list ttimer; /* touch screen timer */ -+}; -+ -+#define TOUCH_TIMEOUT (HZ/30) -+#define MCE_TIMEOUT_MS 200 -+ -+/* vfd character device file operations */ -+static const struct file_operations vfd_fops = { -+ .owner = THIS_MODULE, -+ .open = &display_open, -+ .write = &vfd_write, -+ .release = &display_close -+}; -+ -+/* lcd character device file operations */ -+static const struct file_operations lcd_fops = { -+ .owner = THIS_MODULE, -+ .open = &display_open, -+ .write = &lcd_write, -+ .release = &display_close -+}; -+ -+enum { -+ IMON_DISPLAY_TYPE_AUTO = 0, -+ IMON_DISPLAY_TYPE_VFD = 1, -+ IMON_DISPLAY_TYPE_LCD = 2, -+ IMON_DISPLAY_TYPE_VGA = 3, -+ IMON_DISPLAY_TYPE_NONE = 4, -+}; -+ -+enum { -+ IMON_IR_PROTOCOL_IMON = 0, -+ IMON_IR_PROTOCOL_MCE = 1, -+ IMON_IR_PROTOCOL_IMON_NOPAD = 2, -+}; -+ -+enum { -+ IMON_BUTTON_IMON = 0, -+ IMON_BUTTON_MCE = 1, -+ IMON_BUTTON_PANEL = 2, -+}; -+ -+/* -+ * USB Device ID for iMON USB Control Boards -+ * -+ * The Windows drivers contain 6 different inf files, more or less one for -+ * each new device until the 0x0034-0x0046 devices, which all use the same -+ * driver. Some of the devices in the 34-46 range haven't been definitively -+ * identified yet. Early devices have either a TriGem Computer, Inc. or a -+ * Samsung vendor ID (0x0aa8 and 0x04e8 respectively), while all later -+ * devices use the SoundGraph vendor ID (0x15c2). This driver only supports -+ * the ffdc and later devices, which do onboard decoding. -+ */ -+static struct usb_device_id imon_usb_id_table[] = { -+ /* -+ * Several devices with this same device ID, all use iMON_PAD.inf -+ * SoundGraph iMON PAD (IR & VFD) -+ * SoundGraph iMON PAD (IR & LCD) -+ * SoundGraph iMON Knob (IR only) -+ */ -+ { USB_DEVICE(0x15c2, 0xffdc) }, -+ -+ /* -+ * Newer devices, all driven by the latest iMON Windows driver, full -+ * list of device IDs extracted via 'strings Setup/data1.hdr |grep 15c2' -+ * Need user input to fill in details on unknown devices. -+ */ -+ /* SoundGraph iMON OEM Touch LCD (IR & 7" VGA LCD) */ -+ { USB_DEVICE(0x15c2, 0x0034) }, -+ /* SoundGraph iMON OEM Touch LCD (IR & 4.3" VGA LCD) */ -+ { USB_DEVICE(0x15c2, 0x0035) }, -+ /* SoundGraph iMON OEM VFD (IR & VFD) */ -+ { USB_DEVICE(0x15c2, 0x0036) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x0037) }, -+ /* SoundGraph iMON OEM LCD (IR & LCD) */ -+ { USB_DEVICE(0x15c2, 0x0038) }, -+ /* SoundGraph iMON UltraBay (IR & LCD) */ -+ { USB_DEVICE(0x15c2, 0x0039) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x003a) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x003b) }, -+ /* SoundGraph iMON OEM Inside (IR only) */ -+ { USB_DEVICE(0x15c2, 0x003c) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x003d) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x003e) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x003f) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x0040) }, -+ /* SoundGraph iMON MINI (IR only) */ -+ { USB_DEVICE(0x15c2, 0x0041) }, -+ /* Antec Veris Multimedia Station EZ External (IR only) */ -+ { USB_DEVICE(0x15c2, 0x0042) }, -+ /* Antec Veris Multimedia Station Basic Internal (IR only) */ -+ { USB_DEVICE(0x15c2, 0x0043) }, -+ /* Antec Veris Multimedia Station Elite (IR & VFD) */ -+ { USB_DEVICE(0x15c2, 0x0044) }, -+ /* Antec Veris Multimedia Station Premiere (IR & LCD) */ -+ { USB_DEVICE(0x15c2, 0x0045) }, -+ /* device specifics unknown */ -+ { USB_DEVICE(0x15c2, 0x0046) }, -+ {} -+}; -+ -+/* iMON LCD models use a different write op */ -+static struct usb_device_id lcd_device_list[] = { -+ { USB_DEVICE(0x15c2, 0xffdc) }, -+ { USB_DEVICE(0x15c2, 0x0038) }, -+ { USB_DEVICE(0x15c2, 0x0039) }, -+ { USB_DEVICE(0x15c2, 0x0045) }, -+ {} -+}; -+ -+/* Some iMON devices have no lcd/vfd, don't set one up */ -+static struct usb_device_id ir_only_list[] = { -+ /* the first imon lcd and the knob share this device id. :\ */ -+ /*{ USB_DEVICE(0x15c2, 0xffdc) },*/ -+ { USB_DEVICE(0x15c2, 0x003c) }, -+ { USB_DEVICE(0x15c2, 0x0041) }, -+ { USB_DEVICE(0x15c2, 0x0042) }, -+ { USB_DEVICE(0x15c2, 0x0043) }, -+ {} -+}; -+ -+/* iMON devices with VGA touchscreens */ -+static struct usb_device_id imon_touchscreen_list[] = { -+ { USB_DEVICE(0x15c2, 0x0034) }, -+ { USB_DEVICE(0x15c2, 0x0035) }, -+ {} -+}; -+ -+/* USB Device data */ -+static struct usb_driver imon_driver = { -+ .name = MOD_NAME, -+ .probe = imon_probe, -+ .disconnect = imon_disconnect, -+ .suspend = imon_suspend, -+ .resume = imon_resume, -+ .id_table = imon_usb_id_table, -+}; -+ -+static struct usb_class_driver imon_vfd_class = { -+ .name = DEVICE_NAME, -+ .fops = &vfd_fops, -+ .minor_base = DISPLAY_MINOR_BASE, -+}; -+ -+static struct usb_class_driver imon_lcd_class = { -+ .name = DEVICE_NAME, -+ .fops = &lcd_fops, -+ .minor_base = DISPLAY_MINOR_BASE, -+}; -+ -+/* -+ * standard imon remote key table, which isn't really entirely -+ * "standard", as different receivers decode the same key on the -+ * same remote to different hex codes... ugh. -+ */ -+static const struct key_entry imon_remote_key_table[] = { -+ /* keys sorted mostly by frequency of use to optimize lookups */ -+ { KE_KEY, 0x2a8195b7, { KEY_REWIND } }, -+ { KE_KEY, 0x298315b7, { KEY_REWIND } }, -+ { KE_KEY, 0x2b8115b7, { KEY_FASTFORWARD } }, -+ { KE_KEY, 0x2b8315b7, { KEY_FASTFORWARD } }, -+ { KE_KEY, 0x2b9115b7, { KEY_PREVIOUS } }, -+ { KE_KEY, 0x298195b7, { KEY_NEXT } }, -+ -+ { KE_KEY, 0x2a8115b7, { KEY_PLAY } }, -+ { KE_KEY, 0x2a8315b7, { KEY_PLAY } }, -+ { KE_KEY, 0x2a9115b7, { KEY_PAUSE } }, -+ { KE_KEY, 0x2b9715b7, { KEY_STOP } }, -+ { KE_KEY, 0x298115b7, { KEY_RECORD } }, -+ -+ { KE_KEY, 0x01008000, { KEY_UP } }, -+ { KE_KEY, 0x01007f00, { KEY_DOWN } }, -+ { KE_KEY, 0x01000080, { KEY_LEFT } }, -+ { KE_KEY, 0x0100007f, { KEY_RIGHT } }, -+ -+ { KE_KEY, 0x2aa515b7, { KEY_UP } }, -+ { KE_KEY, 0x289515b7, { KEY_DOWN } }, -+ { KE_KEY, 0x29a515b7, { KEY_LEFT } }, -+ { KE_KEY, 0x2ba515b7, { KEY_RIGHT } }, -+ -+ { KE_KEY, 0x0200002c, { KEY_SPACE } }, /* Select/Space */ -+ { KE_KEY, 0x2a9315b7, { KEY_SPACE } }, /* Select/Space */ -+ { KE_KEY, 0x02000028, { KEY_ENTER } }, -+ { KE_KEY, 0x28a195b7, { KEY_ENTER } }, -+ { KE_KEY, 0x288195b7, { KEY_EXIT } }, -+ { KE_KEY, 0x02000029, { KEY_ESC } }, -+ { KE_KEY, 0x2bb715b7, { KEY_ESC } }, -+ { KE_KEY, 0x0200002a, { KEY_BACKSPACE } }, -+ { KE_KEY, 0x28a115b7, { KEY_BACKSPACE } }, -+ -+ { KE_KEY, 0x2b9595b7, { KEY_MUTE } }, -+ { KE_KEY, 0x28a395b7, { KEY_VOLUMEUP } }, -+ { KE_KEY, 0x28a595b7, { KEY_VOLUMEDOWN } }, -+ { KE_KEY, 0x289395b7, { KEY_CHANNELUP } }, -+ { KE_KEY, 0x288795b7, { KEY_CHANNELDOWN } }, -+ -+ { KE_KEY, 0x0200001e, { KEY_NUMERIC_1 } }, -+ { KE_KEY, 0x0200001f, { KEY_NUMERIC_2 } }, -+ { KE_KEY, 0x02000020, { KEY_NUMERIC_3 } }, -+ { KE_KEY, 0x02000021, { KEY_NUMERIC_4 } }, -+ { KE_KEY, 0x02000022, { KEY_NUMERIC_5 } }, -+ { KE_KEY, 0x02000023, { KEY_NUMERIC_6 } }, -+ { KE_KEY, 0x02000024, { KEY_NUMERIC_7 } }, -+ { KE_KEY, 0x02000025, { KEY_NUMERIC_8 } }, -+ { KE_KEY, 0x02000026, { KEY_NUMERIC_9 } }, -+ { KE_KEY, 0x02000027, { KEY_NUMERIC_0 } }, -+ -+ { KE_KEY, 0x28b595b7, { KEY_NUMERIC_1 } }, -+ { KE_KEY, 0x2bb195b7, { KEY_NUMERIC_2 } }, -+ { KE_KEY, 0x28b195b7, { KEY_NUMERIC_3 } }, -+ { KE_KEY, 0x2a8595b7, { KEY_NUMERIC_4 } }, -+ { KE_KEY, 0x299595b7, { KEY_NUMERIC_5 } }, -+ { KE_KEY, 0x2aa595b7, { KEY_NUMERIC_6 } }, -+ { KE_KEY, 0x2b9395b7, { KEY_NUMERIC_7 } }, -+ { KE_KEY, 0x2a8515b7, { KEY_NUMERIC_8 } }, -+ { KE_KEY, 0x2aa115b7, { KEY_NUMERIC_9 } }, -+ { KE_KEY, 0x2ba595b7, { KEY_NUMERIC_0 } }, -+ -+ { KE_KEY, 0x02200025, { KEY_NUMERIC_STAR } }, -+ { KE_KEY, 0x28b515b7, { KEY_NUMERIC_STAR } }, -+ { KE_KEY, 0x02200020, { KEY_NUMERIC_POUND } }, -+ { KE_KEY, 0x29a115b7, { KEY_NUMERIC_POUND } }, -+ -+ { KE_KEY, 0x2b8515b7, { KEY_VIDEO } }, -+ { KE_KEY, 0x299195b7, { KEY_AUDIO } }, -+ { KE_KEY, 0x2ba115b7, { KEY_CAMERA } }, -+ { KE_KEY, 0x28a515b7, { KEY_TV } }, -+ { KE_KEY, 0x29a395b7, { KEY_DVD } }, -+ { KE_KEY, 0x29a295b7, { KEY_DVD } }, -+ -+ /* the Menu key between DVD and Subtitle on the RM-200... */ -+ { KE_KEY, 0x2ba385b7, { KEY_MENU } }, -+ { KE_KEY, 0x2ba395b7, { KEY_MENU } }, -+ -+ { KE_KEY, 0x288515b7, { KEY_BOOKMARKS } }, -+ { KE_KEY, 0x2ab715b7, { KEY_MEDIA } }, /* Thumbnail */ -+ { KE_KEY, 0x298595b7, { KEY_SUBTITLE } }, -+ { KE_KEY, 0x2b8595b7, { KEY_LANGUAGE } }, -+ -+ { KE_KEY, 0x29a595b7, { KEY_ZOOM } }, -+ { KE_KEY, 0x2aa395b7, { KEY_SCREEN } }, /* FullScreen */ -+ -+ { KE_KEY, 0x299115b7, { KEY_KEYBOARD } }, -+ { KE_KEY, 0x299135b7, { KEY_KEYBOARD } }, -+ -+ { KE_KEY, 0x01010000, { BTN_LEFT } }, -+ { KE_KEY, 0x01020000, { BTN_RIGHT } }, -+ { KE_KEY, 0x01010080, { BTN_LEFT } }, -+ { KE_KEY, 0x01020080, { BTN_RIGHT } }, -+ { KE_KEY, 0x688301b7, { BTN_LEFT } }, -+ { KE_KEY, 0x688481b7, { BTN_RIGHT } }, -+ -+ { KE_KEY, 0x2a9395b7, { KEY_CYCLEWINDOWS } }, /* TaskSwitcher */ -+ { KE_KEY, 0x2b8395b7, { KEY_TIME } }, /* Timer */ -+ -+ { KE_KEY, 0x289115b7, { KEY_POWER } }, -+ { KE_KEY, 0x29b195b7, { KEY_EJECTCD } }, /* the one next to play */ -+ { KE_KEY, 0x299395b7, { KEY_EJECTCLOSECD } }, /* eject (by TaskSw) */ -+ -+ { KE_KEY, 0x02800000, { KEY_CONTEXT_MENU } }, /* Left Menu */ -+ { KE_KEY, 0x2b8195b7, { KEY_CONTEXT_MENU } }, /* Left Menu*/ -+ { KE_KEY, 0x02000065, { KEY_COMPOSE } }, /* RightMenu */ -+ { KE_KEY, 0x28b715b7, { KEY_COMPOSE } }, /* RightMenu */ -+ { KE_KEY, 0x2ab195b7, { KEY_PROG1 } }, /* Go or MultiMon */ -+ { KE_KEY, 0x29b715b7, { KEY_DASHBOARD } }, /* AppLauncher */ -+ { KE_END, 0 } -+}; -+ -+/* mce-mode imon mce remote key table */ -+static const struct key_entry imon_mce_key_table[] = { -+ /* keys sorted mostly by frequency of use to optimize lookups */ -+ { KE_KEY, 0x800ff415, { KEY_REWIND } }, -+ { KE_KEY, 0x800ff414, { KEY_FASTFORWARD } }, -+ { KE_KEY, 0x800ff41b, { KEY_PREVIOUS } }, -+ { KE_KEY, 0x800ff41a, { KEY_NEXT } }, -+ -+ { KE_KEY, 0x800ff416, { KEY_PLAY } }, -+ { KE_KEY, 0x800ff418, { KEY_PAUSE } }, -+ { KE_KEY, 0x800ff419, { KEY_STOP } }, -+ { KE_KEY, 0x800ff417, { KEY_RECORD } }, -+ -+ { KE_KEY, 0x02000052, { KEY_UP } }, -+ { KE_KEY, 0x02000051, { KEY_DOWN } }, -+ { KE_KEY, 0x02000050, { KEY_LEFT } }, -+ { KE_KEY, 0x0200004f, { KEY_RIGHT } }, -+ -+ { KE_KEY, 0x800ff41e, { KEY_UP } }, -+ { KE_KEY, 0x800ff41f, { KEY_DOWN } }, -+ { KE_KEY, 0x800ff420, { KEY_LEFT } }, -+ { KE_KEY, 0x800ff421, { KEY_RIGHT } }, -+ -+ /* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */ -+ { KE_KEY, 0x800ff40b, { KEY_ENTER } }, -+ { KE_KEY, 0x02000028, { KEY_ENTER } }, -+/* the OK and Enter buttons decode to the same value on some remotes -+ { KE_KEY, 0x02000028, { KEY_OK } }, */ -+ { KE_KEY, 0x800ff422, { KEY_OK } }, -+ { KE_KEY, 0x0200002a, { KEY_EXIT } }, -+ { KE_KEY, 0x800ff423, { KEY_EXIT } }, -+ { KE_KEY, 0x02000029, { KEY_DELETE } }, -+ /* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */ -+ { KE_KEY, 0x800ff40a, { KEY_DELETE } }, -+ -+ { KE_KEY, 0x800ff40e, { KEY_MUTE } }, -+ { KE_KEY, 0x800ff410, { KEY_VOLUMEUP } }, -+ { KE_KEY, 0x800ff411, { KEY_VOLUMEDOWN } }, -+ { KE_KEY, 0x800ff412, { KEY_CHANNELUP } }, -+ { KE_KEY, 0x800ff413, { KEY_CHANNELDOWN } }, -+ -+ { KE_KEY, 0x0200001e, { KEY_NUMERIC_1 } }, -+ { KE_KEY, 0x0200001f, { KEY_NUMERIC_2 } }, -+ { KE_KEY, 0x02000020, { KEY_NUMERIC_3 } }, -+ { KE_KEY, 0x02000021, { KEY_NUMERIC_4 } }, -+ { KE_KEY, 0x02000022, { KEY_NUMERIC_5 } }, -+ { KE_KEY, 0x02000023, { KEY_NUMERIC_6 } }, -+ { KE_KEY, 0x02000024, { KEY_NUMERIC_7 } }, -+ { KE_KEY, 0x02000025, { KEY_NUMERIC_8 } }, -+ { KE_KEY, 0x02000026, { KEY_NUMERIC_9 } }, -+ { KE_KEY, 0x02000027, { KEY_NUMERIC_0 } }, -+ -+ { KE_KEY, 0x800ff401, { KEY_NUMERIC_1 } }, -+ { KE_KEY, 0x800ff402, { KEY_NUMERIC_2 } }, -+ { KE_KEY, 0x800ff403, { KEY_NUMERIC_3 } }, -+ { KE_KEY, 0x800ff404, { KEY_NUMERIC_4 } }, -+ { KE_KEY, 0x800ff405, { KEY_NUMERIC_5 } }, -+ { KE_KEY, 0x800ff406, { KEY_NUMERIC_6 } }, -+ { KE_KEY, 0x800ff407, { KEY_NUMERIC_7 } }, -+ { KE_KEY, 0x800ff408, { KEY_NUMERIC_8 } }, -+ { KE_KEY, 0x800ff409, { KEY_NUMERIC_9 } }, -+ { KE_KEY, 0x800ff400, { KEY_NUMERIC_0 } }, -+ -+ { KE_KEY, 0x02200025, { KEY_NUMERIC_STAR } }, -+ { KE_KEY, 0x02200020, { KEY_NUMERIC_POUND } }, -+ /* 0x800ff41d also KEY_BLUE on some receivers */ -+ { KE_KEY, 0x800ff41d, { KEY_NUMERIC_STAR } }, -+ /* 0x800ff41c also KEY_PREVIOUS on some receivers */ -+ { KE_KEY, 0x800ff41c, { KEY_NUMERIC_POUND } }, -+ -+ { KE_KEY, 0x800ff446, { KEY_TV } }, -+ { KE_KEY, 0x800ff447, { KEY_AUDIO } }, /* My Music */ -+ { KE_KEY, 0x800ff448, { KEY_PVR } }, /* RecordedTV */ -+ { KE_KEY, 0x800ff449, { KEY_CAMERA } }, -+ { KE_KEY, 0x800ff44a, { KEY_VIDEO } }, -+ /* 0x800ff424 also KEY_MENU on some receivers */ -+ { KE_KEY, 0x800ff424, { KEY_DVD } }, -+ /* 0x800ff425 also KEY_GREEN on some receivers */ -+ { KE_KEY, 0x800ff425, { KEY_TUNER } }, /* LiveTV */ -+ { KE_KEY, 0x800ff450, { KEY_RADIO } }, -+ -+ { KE_KEY, 0x800ff44c, { KEY_LANGUAGE } }, -+ { KE_KEY, 0x800ff427, { KEY_ZOOM } }, /* Aspect */ -+ -+ { KE_KEY, 0x800ff45b, { KEY_RED } }, -+ { KE_KEY, 0x800ff45c, { KEY_GREEN } }, -+ { KE_KEY, 0x800ff45d, { KEY_YELLOW } }, -+ { KE_KEY, 0x800ff45e, { KEY_BLUE } }, -+ -+ { KE_KEY, 0x800ff466, { KEY_RED } }, -+ /* { KE_KEY, 0x800ff425, { KEY_GREEN } }, */ -+ { KE_KEY, 0x800ff468, { KEY_YELLOW } }, -+ /* { KE_KEY, 0x800ff41d, { KEY_BLUE } }, */ -+ -+ { KE_KEY, 0x800ff40f, { KEY_INFO } }, -+ { KE_KEY, 0x800ff426, { KEY_EPG } }, /* Guide */ -+ { KE_KEY, 0x800ff45a, { KEY_SUBTITLE } }, /* Caption/Teletext */ -+ { KE_KEY, 0x800ff44d, { KEY_TITLE } }, -+ -+ { KE_KEY, 0x800ff40c, { KEY_POWER } }, -+ { KE_KEY, 0x800ff40d, { KEY_PROG1 } }, /* Windows MCE button */ -+ { KE_END, 0 } -+ -+}; -+ -+/* imon receiver front panel/knob key table */ -+static const struct { -+ u64 hw_code; -+ u16 keycode; -+} imon_panel_key_table[] = { -+ { 0x000000000f00ffee, KEY_PROG1 }, /* Go */ -+ { 0x000000001f00ffee, KEY_AUDIO }, -+ { 0x000000002000ffee, KEY_VIDEO }, -+ { 0x000000002100ffee, KEY_CAMERA }, -+ { 0x000000002700ffee, KEY_DVD }, -+ { 0x000000002300ffee, KEY_TV }, -+ { 0x000000000500ffee, KEY_PREVIOUS }, -+ { 0x000000000700ffee, KEY_REWIND }, -+ { 0x000000000400ffee, KEY_STOP }, -+ { 0x000000003c00ffee, KEY_PLAYPAUSE }, -+ { 0x000000000800ffee, KEY_FASTFORWARD }, -+ { 0x000000000600ffee, KEY_NEXT }, -+ { 0x000000010000ffee, KEY_RIGHT }, -+ { 0x000001000000ffee, KEY_LEFT }, -+ { 0x000000003d00ffee, KEY_SELECT }, -+ { 0x000100000000ffee, KEY_VOLUMEUP }, -+ { 0x010000000000ffee, KEY_VOLUMEDOWN }, -+ { 0x000000000100ffee, KEY_MUTE }, -+ /* iMON Knob values */ -+ { 0x000100ffffffffee, KEY_VOLUMEUP }, -+ { 0x010000ffffffffee, KEY_VOLUMEDOWN }, -+ { 0x000008ffffffffee, KEY_MUTE }, -+}; -+ -+/* to prevent races between open() and disconnect(), probing, etc */ -+static DEFINE_MUTEX(driver_lock); -+ -+/* Module bookkeeping bits */ -+MODULE_AUTHOR(MOD_AUTHOR); -+MODULE_DESCRIPTION(MOD_DESC); -+MODULE_VERSION(MOD_VERSION); -+MODULE_LICENSE("GPL"); -+MODULE_DEVICE_TABLE(usb, imon_usb_id_table); -+ -+static bool debug; -+module_param(debug, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes(default: no)"); -+ -+/* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */ -+static int display_type; -+module_param(display_type, int, S_IRUGO); -+MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, " -+ "1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)"); -+ -+/* IR protocol: native iMON, Windows MCE (RC-6), or iMON w/o PAD stabilize */ -+static int ir_protocol; -+module_param(ir_protocol, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(ir_protocol, "Which IR protocol to use. 0=native iMON, " -+ "1=Windows Media Center Ed. (RC-6), 2=iMON w/o PAD stabilize " -+ "(default: native iMON)"); -+ -+/* -+ * In certain use cases, mouse mode isn't really helpful, and could actually -+ * cause confusion, so allow disabling it when the IR device is open. -+ */ -+static bool nomouse; -+module_param(nomouse, bool, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(nomouse, "Disable mouse input device mode when IR device is " -+ "open. 0=don't disable, 1=disable. (default: don't disable)"); -+ -+/* threshold at which a pad push registers as an arrow key in kbd mode */ -+static int pad_thresh; -+module_param(pad_thresh, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(pad_thresh, "Threshold at which a pad push registers as an " -+ "arrow key in kbd mode (default: 28)"); -+ -+ -+static void free_imon_context(struct imon_context *ictx) -+{ -+ struct device *dev = ictx->dev; -+ -+ usb_free_urb(ictx->tx_urb); -+ usb_free_urb(ictx->rx_urb_intf0); -+ usb_free_urb(ictx->rx_urb_intf1); -+ kfree(ictx); -+ -+ dev_dbg(dev, "%s: iMON context freed\n", __func__); -+} -+ -+/** -+ * Called when the Display device (e.g. /dev/lcd0) -+ * is opened by the application. -+ */ -+static int display_open(struct inode *inode, struct file *file) -+{ -+ struct usb_interface *interface; -+ struct imon_context *ictx = NULL; -+ int subminor; -+ int retval = 0; -+ -+ /* prevent races with disconnect */ -+ mutex_lock(&driver_lock); -+ -+ subminor = iminor(inode); -+ interface = usb_find_interface(&imon_driver, subminor); -+ if (!interface) { -+ err("%s: could not find interface for minor %d", -+ __func__, subminor); -+ retval = -ENODEV; -+ goto exit; -+ } -+ ictx = usb_get_intfdata(interface); -+ -+ if (!ictx) { -+ err("%s: no context found for minor %d", __func__, subminor); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ mutex_lock(&ictx->lock); -+ -+ if (!ictx->display_supported) { -+ err("%s: display not supported by device", __func__); -+ retval = -ENODEV; -+ } else if (ictx->display_isopen) { -+ err("%s: display port is already open", __func__); -+ retval = -EBUSY; -+ } else { -+ ictx->display_isopen = 1; -+ file->private_data = ictx; -+ dev_dbg(ictx->dev, "display port opened\n"); -+ } -+ -+ mutex_unlock(&ictx->lock); -+ -+exit: -+ mutex_unlock(&driver_lock); -+ return retval; -+} -+ -+/** -+ * Called when the display device (e.g. /dev/lcd0) -+ * is closed by the application. -+ */ -+static int display_close(struct inode *inode, struct file *file) -+{ -+ struct imon_context *ictx = NULL; -+ int retval = 0; -+ -+ ictx = (struct imon_context *)file->private_data; -+ -+ if (!ictx) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&ictx->lock); -+ -+ if (!ictx->display_supported) { -+ err("%s: display not supported by device", __func__); -+ retval = -ENODEV; -+ } else if (!ictx->display_isopen) { -+ err("%s: display is not open", __func__); -+ retval = -EIO; -+ } else { -+ ictx->display_isopen = 0; -+ dev_dbg(ictx->dev, "display port closed\n"); -+ if (!ictx->dev_present_intf0) { -+ /* -+ * Device disconnected before close and IR port is not -+ * open. If IR port is open, context will be deleted by -+ * ir_close. -+ */ -+ mutex_unlock(&ictx->lock); -+ free_imon_context(ictx); -+ return retval; -+ } -+ } -+ -+ mutex_unlock(&ictx->lock); -+ return retval; -+} -+ -+/** -+ * Sends a packet to the device -- this function must be called -+ * with ictx->lock held. -+ */ -+static int send_packet(struct imon_context *ictx) -+{ -+ unsigned int pipe; -+ int interval = 0; -+ int retval = 0; -+ struct usb_ctrlrequest *control_req = NULL; -+ -+ /* Check if we need to use control or interrupt urb */ -+ if (!ictx->tx_control) { -+ pipe = usb_sndintpipe(ictx->usbdev_intf0, -+ ictx->tx_endpoint->bEndpointAddress); -+ interval = ictx->tx_endpoint->bInterval; -+ -+ usb_fill_int_urb(ictx->tx_urb, ictx->usbdev_intf0, pipe, -+ ictx->usb_tx_buf, -+ sizeof(ictx->usb_tx_buf), -+ usb_tx_callback, ictx, interval); -+ -+ ictx->tx_urb->actual_length = 0; -+ } else { -+ /* fill request into kmalloc'ed space: */ -+ control_req = kmalloc(sizeof(struct usb_ctrlrequest), -+ GFP_KERNEL); -+ if (control_req == NULL) -+ return -ENOMEM; -+ -+ /* setup packet is '21 09 0200 0001 0008' */ -+ control_req->bRequestType = 0x21; -+ control_req->bRequest = 0x09; -+ control_req->wValue = cpu_to_le16(0x0200); -+ control_req->wIndex = cpu_to_le16(0x0001); -+ control_req->wLength = cpu_to_le16(0x0008); -+ -+ /* control pipe is endpoint 0x00 */ -+ pipe = usb_sndctrlpipe(ictx->usbdev_intf0, 0); -+ -+ /* build the control urb */ -+ usb_fill_control_urb(ictx->tx_urb, ictx->usbdev_intf0, -+ pipe, (unsigned char *)control_req, -+ ictx->usb_tx_buf, -+ sizeof(ictx->usb_tx_buf), -+ usb_tx_callback, ictx); -+ ictx->tx_urb->actual_length = 0; -+ } -+ -+ init_completion(&ictx->tx.finished); -+ ictx->tx.busy = 1; -+ smp_rmb(); /* ensure later readers know we're busy */ -+ -+ retval = usb_submit_urb(ictx->tx_urb, GFP_KERNEL); -+ if (retval) { -+ ictx->tx.busy = 0; -+ smp_rmb(); /* ensure later readers know we're not busy */ -+ err("%s: error submitting urb(%d)", __func__, retval); -+ } else { -+ /* Wait for transmission to complete (or abort) */ -+ mutex_unlock(&ictx->lock); -+ retval = wait_for_completion_interruptible( -+ &ictx->tx.finished); -+ if (retval) -+ err("%s: task interrupted", __func__); -+ mutex_lock(&ictx->lock); -+ -+ retval = ictx->tx.status; -+ if (retval) -+ err("%s: packet tx failed (%d)", __func__, retval); -+ } -+ -+ kfree(control_req); -+ -+ return retval; -+} -+ -+/** -+ * Sends an associate packet to the iMON 2.4G. -+ * -+ * This might not be such a good idea, since it has an id collision with -+ * some versions of the "IR & VFD" combo. The only way to determine if it -+ * is an RF version is to look at the product description string. (Which -+ * we currently do not fetch). -+ */ -+static int send_associate_24g(struct imon_context *ictx) -+{ -+ int retval; -+ const unsigned char packet[8] = { 0x01, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x20 }; -+ -+ if (!ictx) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ if (!ictx->dev_present_intf0) { -+ err("%s: no iMON device present", __func__); -+ return -ENODEV; -+ } -+ -+ memcpy(ictx->usb_tx_buf, packet, sizeof(packet)); -+ retval = send_packet(ictx); -+ -+ return retval; -+} -+ -+/** -+ * Sends packets to setup and show clock on iMON display -+ * -+ * Arguments: year - last 2 digits of year, month - 1..12, -+ * day - 1..31, dow - day of the week (0-Sun...6-Sat), -+ * hour - 0..23, minute - 0..59, second - 0..59 -+ */ -+static int send_set_imon_clock(struct imon_context *ictx, -+ unsigned int year, unsigned int month, -+ unsigned int day, unsigned int dow, -+ unsigned int hour, unsigned int minute, -+ unsigned int second) -+{ -+ unsigned char clock_enable_pkt[IMON_CLOCK_ENABLE_PACKETS][8]; -+ int retval = 0; -+ int i; -+ -+ if (!ictx) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ switch (ictx->display_type) { -+ case IMON_DISPLAY_TYPE_LCD: -+ clock_enable_pkt[0][0] = 0x80; -+ clock_enable_pkt[0][1] = year; -+ clock_enable_pkt[0][2] = month-1; -+ clock_enable_pkt[0][3] = day; -+ clock_enable_pkt[0][4] = hour; -+ clock_enable_pkt[0][5] = minute; -+ clock_enable_pkt[0][6] = second; -+ -+ clock_enable_pkt[1][0] = 0x80; -+ clock_enable_pkt[1][1] = 0; -+ clock_enable_pkt[1][2] = 0; -+ clock_enable_pkt[1][3] = 0; -+ clock_enable_pkt[1][4] = 0; -+ clock_enable_pkt[1][5] = 0; -+ clock_enable_pkt[1][6] = 0; -+ -+ if (ictx->product == 0xffdc) { -+ clock_enable_pkt[0][7] = 0x50; -+ clock_enable_pkt[1][7] = 0x51; -+ } else { -+ clock_enable_pkt[0][7] = 0x88; -+ clock_enable_pkt[1][7] = 0x8a; -+ } -+ -+ break; -+ -+ case IMON_DISPLAY_TYPE_VFD: -+ clock_enable_pkt[0][0] = year; -+ clock_enable_pkt[0][1] = month-1; -+ clock_enable_pkt[0][2] = day; -+ clock_enable_pkt[0][3] = dow; -+ clock_enable_pkt[0][4] = hour; -+ clock_enable_pkt[0][5] = minute; -+ clock_enable_pkt[0][6] = second; -+ clock_enable_pkt[0][7] = 0x40; -+ -+ clock_enable_pkt[1][0] = 0; -+ clock_enable_pkt[1][1] = 0; -+ clock_enable_pkt[1][2] = 1; -+ clock_enable_pkt[1][3] = 0; -+ clock_enable_pkt[1][4] = 0; -+ clock_enable_pkt[1][5] = 0; -+ clock_enable_pkt[1][6] = 0; -+ clock_enable_pkt[1][7] = 0x42; -+ -+ break; -+ -+ default: -+ return -ENODEV; -+ } -+ -+ for (i = 0; i < IMON_CLOCK_ENABLE_PACKETS; i++) { -+ memcpy(ictx->usb_tx_buf, clock_enable_pkt[i], 8); -+ retval = send_packet(ictx); -+ if (retval) { -+ err("%s: send_packet failed for packet %d", -+ __func__, i); -+ break; -+ } -+ } -+ -+ return retval; -+} -+ -+/** -+ * These are the sysfs functions to handle the association on the iMON 2.4G LT. -+ */ -+static ssize_t show_associate_remote(struct device *d, -+ struct device_attribute *attr, -+ char *buf) -+{ -+ struct imon_context *ictx = dev_get_drvdata(d); -+ -+ if (!ictx) -+ return -ENODEV; -+ -+ mutex_lock(&ictx->lock); -+ if (ictx->ir_isassociating) -+ strcpy(buf, "associating\n"); -+ else -+ strcpy(buf, "closed\n"); -+ -+ dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for " -+ "instructions on how to associate your iMON 2.4G DT/LT " -+ "remote\n"); -+ mutex_unlock(&ictx->lock); -+ return strlen(buf); -+} -+ -+static ssize_t store_associate_remote(struct device *d, -+ struct device_attribute *attr, -+ const char *buf, size_t count) -+{ -+ struct imon_context *ictx; -+ -+ ictx = dev_get_drvdata(d); -+ -+ if (!ictx) -+ return -ENODEV; -+ -+ mutex_lock(&ictx->lock); -+ ictx->ir_isassociating = 1; -+ send_associate_24g(ictx); -+ mutex_unlock(&ictx->lock); -+ -+ return count; -+} -+ -+/** -+ * sysfs functions to control internal imon clock -+ */ -+static ssize_t show_imon_clock(struct device *d, -+ struct device_attribute *attr, char *buf) -+{ -+ struct imon_context *ictx = dev_get_drvdata(d); -+ size_t len; -+ -+ if (!ictx) -+ return -ENODEV; -+ -+ mutex_lock(&ictx->lock); -+ -+ if (!ictx->display_supported) { -+ len = snprintf(buf, PAGE_SIZE, "Not supported."); -+ } else { -+ len = snprintf(buf, PAGE_SIZE, -+ "To set the clock on your iMON display:\n" -+ "# date \"+%%y %%m %%d %%w %%H %%M %%S\" > imon_clock\n" -+ "%s", ictx->display_isopen ? -+ "\nNOTE: imon device must be closed\n" : ""); -+ } -+ -+ mutex_unlock(&ictx->lock); -+ -+ return len; -+} -+ -+static ssize_t store_imon_clock(struct device *d, -+ struct device_attribute *attr, -+ const char *buf, size_t count) -+{ -+ struct imon_context *ictx = dev_get_drvdata(d); -+ ssize_t retval; -+ unsigned int year, month, day, dow, hour, minute, second; -+ -+ if (!ictx) -+ return -ENODEV; -+ -+ mutex_lock(&ictx->lock); -+ -+ if (!ictx->display_supported) { -+ retval = -ENODEV; -+ goto exit; -+ } else if (ictx->display_isopen) { -+ retval = -EBUSY; -+ goto exit; -+ } -+ -+ if (sscanf(buf, "%u %u %u %u %u %u %u", &year, &month, &day, &dow, -+ &hour, &minute, &second) != 7) { -+ retval = -EINVAL; -+ goto exit; -+ } -+ -+ if ((month < 1 || month > 12) || -+ (day < 1 || day > 31) || (dow > 6) || -+ (hour > 23) || (minute > 59) || (second > 59)) { -+ retval = -EINVAL; -+ goto exit; -+ } -+ -+ retval = send_set_imon_clock(ictx, year, month, day, dow, -+ hour, minute, second); -+ if (retval) -+ goto exit; -+ -+ retval = count; -+exit: -+ mutex_unlock(&ictx->lock); -+ -+ return retval; -+} -+ -+ -+static DEVICE_ATTR(imon_clock, S_IWUSR | S_IRUGO, show_imon_clock, -+ store_imon_clock); -+ -+static DEVICE_ATTR(associate_remote, S_IWUSR | S_IRUGO, show_associate_remote, -+ store_associate_remote); -+ -+static struct attribute *imon_display_sysfs_entries[] = { -+ &dev_attr_imon_clock.attr, -+ NULL -+}; -+ -+static struct attribute_group imon_display_attribute_group = { -+ .attrs = imon_display_sysfs_entries -+}; -+ -+static struct attribute *imon_rf_sysfs_entries[] = { -+ &dev_attr_associate_remote.attr, -+ NULL -+}; -+ -+static struct attribute_group imon_rf_attribute_group = { -+ .attrs = imon_rf_sysfs_entries -+}; -+ -+/** -+ * Writes data to the VFD. The iMON VFD is 2x16 characters -+ * and requires data in 5 consecutive USB interrupt packets, -+ * each packet but the last carrying 7 bytes. -+ * -+ * I don't know if the VFD board supports features such as -+ * scrolling, clearing rows, blanking, etc. so at -+ * the caller must provide a full screen of data. If fewer -+ * than 32 bytes are provided spaces will be appended to -+ * generate a full screen. -+ */ -+static ssize_t vfd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos) -+{ -+ int i; -+ int offset; -+ int seq; -+ int retval = 0; -+ struct imon_context *ictx; -+ const unsigned char vfd_packet6[] = { -+ 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; -+ -+ ictx = (struct imon_context *)file->private_data; -+ if (!ictx) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&ictx->lock); -+ -+ if (!ictx->dev_present_intf0) { -+ err("%s: no iMON device present", __func__); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ if (n_bytes <= 0 || n_bytes > 32) { -+ err("%s: invalid payload size", __func__); -+ retval = -EINVAL; -+ goto exit; -+ } -+ -+ if (copy_from_user(ictx->tx.data_buf, buf, n_bytes)) { -+ retval = -EFAULT; -+ goto exit; -+ } -+ -+ /* Pad with spaces */ -+ for (i = n_bytes; i < 32; ++i) -+ ictx->tx.data_buf[i] = ' '; -+ -+ for (i = 32; i < 35; ++i) -+ ictx->tx.data_buf[i] = 0xFF; -+ -+ offset = 0; -+ seq = 0; -+ -+ do { -+ memcpy(ictx->usb_tx_buf, ictx->tx.data_buf + offset, 7); -+ ictx->usb_tx_buf[7] = (unsigned char) seq; -+ -+ retval = send_packet(ictx); -+ if (retval) { -+ err("%s: send packet failed for packet #%d", -+ __func__, seq/2); -+ goto exit; -+ } else { -+ seq += 2; -+ offset += 7; -+ } -+ -+ } while (offset < 35); -+ -+ /* Send packet #6 */ -+ memcpy(ictx->usb_tx_buf, &vfd_packet6, sizeof(vfd_packet6)); -+ ictx->usb_tx_buf[7] = (unsigned char) seq; -+ retval = send_packet(ictx); -+ if (retval) -+ err("%s: send packet failed for packet #%d", -+ __func__, seq / 2); -+ -+exit: -+ mutex_unlock(&ictx->lock); -+ -+ return (!retval) ? n_bytes : retval; -+} -+ -+/** -+ * Writes data to the LCD. The iMON OEM LCD screen expects 8-byte -+ * packets. We accept data as 16 hexadecimal digits, followed by a -+ * newline (to make it easy to drive the device from a command-line -+ * -- even though the actual binary data is a bit complicated). -+ * -+ * The device itself is not a "traditional" text-mode display. It's -+ * actually a 16x96 pixel bitmap display. That means if you want to -+ * display text, you've got to have your own "font" and translate the -+ * text into bitmaps for display. This is really flexible (you can -+ * display whatever diacritics you need, and so on), but it's also -+ * a lot more complicated than most LCDs... -+ */ -+static ssize_t lcd_write(struct file *file, const char *buf, -+ size_t n_bytes, loff_t *pos) -+{ -+ int retval = 0; -+ struct imon_context *ictx; -+ -+ ictx = (struct imon_context *)file->private_data; -+ if (!ictx) { -+ err("%s: no context for device", __func__); -+ return -ENODEV; -+ } -+ -+ mutex_lock(&ictx->lock); -+ -+ if (!ictx->display_supported) { -+ err("%s: no iMON display present", __func__); -+ retval = -ENODEV; -+ goto exit; -+ } -+ -+ if (n_bytes != 8) { -+ err("%s: invalid payload size: %d (expecting 8)", -+ __func__, (int) n_bytes); -+ retval = -EINVAL; -+ goto exit; -+ } -+ -+ if (copy_from_user(ictx->usb_tx_buf, buf, 8)) { -+ retval = -EFAULT; -+ goto exit; -+ } -+ -+ retval = send_packet(ictx); -+ if (retval) { -+ err("%s: send packet failed!", __func__); -+ goto exit; -+ } else { -+ dev_dbg(ictx->dev, "%s: write %d bytes to LCD\n", -+ __func__, (int) n_bytes); -+ } -+exit: -+ mutex_unlock(&ictx->lock); -+ return (!retval) ? n_bytes : retval; -+} -+ -+/** -+ * Callback function for USB core API: transmit data -+ */ -+static void usb_tx_callback(struct urb *urb) -+{ -+ struct imon_context *ictx; -+ -+ if (!urb) -+ return; -+ ictx = (struct imon_context *)urb->context; -+ if (!ictx) -+ return; -+ -+ ictx->tx.status = urb->status; -+ -+ /* notify waiters that write has finished */ -+ ictx->tx.busy = 0; -+ smp_rmb(); /* ensure later readers know we're not busy */ -+ complete(&ictx->tx.finished); -+} -+ -+/** -+ * iMON IR receivers support two different signal sets -- those used by -+ * the iMON remotes, and those used by the Windows MCE remotes (which is -+ * really just RC-6), but only one or the other at a time, as the signals -+ * are decoded onboard the receiver. -+ */ -+static void imon_set_ir_protocol(struct imon_context *ictx) -+{ -+ int retval; -+ struct device *dev = ictx->dev; -+ unsigned char ir_proto_packet[] = { -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; -+ -+ switch (ir_protocol) { -+ case IMON_IR_PROTOCOL_MCE: -+ dev_dbg(dev, "Configuring IR receiver for MCE protocol\n"); -+ ir_proto_packet[0] = 0x01; -+ ictx->ir_protocol = IMON_IR_PROTOCOL_MCE; -+ ictx->pad_mouse = 0; -+ break; -+ case IMON_IR_PROTOCOL_IMON: -+ dev_dbg(dev, "Configuring IR receiver for iMON protocol\n"); -+ /* ir_proto_packet[0] = 0x00; // already the default */ -+ ictx->ir_protocol = IMON_IR_PROTOCOL_IMON; -+ ictx->pad_mouse = 1; -+ break; -+ case IMON_IR_PROTOCOL_IMON_NOPAD: -+ dev_dbg(dev, "Configuring IR receiver for iMON protocol " -+ "without PAD stabilize function enabled\n"); -+ /* ir_proto_packet[0] = 0x00; // already the default */ -+ ictx->ir_protocol = IMON_IR_PROTOCOL_IMON_NOPAD; -+ ictx->pad_mouse = 0; -+ break; -+ default: -+ dev_info(dev, "%s: unknown IR protocol specified, will " -+ "just default to iMON protocol\n", __func__); -+ ictx->ir_protocol = IMON_IR_PROTOCOL_IMON; -+ ictx->pad_mouse = 1; -+ break; -+ } -+ -+ memcpy(ictx->usb_tx_buf, &ir_proto_packet, sizeof(ir_proto_packet)); -+ -+ retval = send_packet(ictx); -+ if (retval) { -+ dev_info(dev, "%s: failed to set IR protocol, falling back " -+ "to standard iMON protocol mode\n", __func__); -+ ir_protocol = IMON_IR_PROTOCOL_IMON; -+ ictx->ir_protocol = IMON_IR_PROTOCOL_IMON; -+ } -+} -+ -+static inline int tv2int(const struct timeval *a, const struct timeval *b) -+{ -+ int usecs = 0; -+ int sec = 0; -+ -+ if (b->tv_usec > a->tv_usec) { -+ usecs = 1000000; -+ sec--; -+ } -+ -+ usecs += a->tv_usec - b->tv_usec; -+ -+ sec += a->tv_sec - b->tv_sec; -+ sec *= 1000; -+ usecs /= 1000; -+ sec += usecs; -+ -+ if (sec < 0) -+ sec = 1000; -+ -+ return sec; -+} -+ -+/** -+ * The directional pad behaves a bit differently, depending on whether this is -+ * one of the older ffdc devices or a newer device. Newer devices appear to -+ * have a higher resolution matrix for more precise mouse movement, but it -+ * makes things overly sensitive in keyboard mode, so we do some interesting -+ * contortions to make it less touchy. Older devices run through the same -+ * routine with shorter timeout and a smaller threshold. -+ */ -+static int stabilize(int a, int b, u16 timeout, u16 threshold) -+{ -+ struct timeval ct; -+ static struct timeval prev_time = {0, 0}; -+ static struct timeval hit_time = {0, 0}; -+ static int x, y, prev_result, hits; -+ int result = 0; -+ int msec, msec_hit; -+ -+ do_gettimeofday(&ct); -+ msec = tv2int(&ct, &prev_time); -+ msec_hit = tv2int(&ct, &hit_time); -+ -+ if (msec > 100) { -+ x = 0; -+ y = 0; -+ hits = 0; -+ } -+ -+ x += a; -+ y += b; -+ -+ prev_time = ct; -+ -+ if (abs(x) > threshold || abs(y) > threshold) { -+ if (abs(y) > abs(x)) -+ result = (y > 0) ? 0x7F : 0x80; -+ else -+ result = (x > 0) ? 0x7F00 : 0x8000; -+ -+ x = 0; -+ y = 0; -+ -+ if (result == prev_result) { -+ hits++; -+ -+ if (hits > 3) { -+ switch (result) { -+ case 0x7F: -+ y = 17 * threshold / 30; -+ break; -+ case 0x80: -+ y -= 17 * threshold / 30; -+ break; -+ case 0x7F00: -+ x = 17 * threshold / 30; -+ break; -+ case 0x8000: -+ x -= 17 * threshold / 30; -+ break; -+ } -+ } -+ -+ if (hits == 2 && msec_hit < timeout) { -+ result = 0; -+ hits = 1; -+ } -+ } else { -+ prev_result = result; -+ hits = 1; -+ hit_time = ct; -+ } -+ } -+ -+ return result; -+} -+ -+static int imon_remote_key_lookup(u32 hw_code) -+{ -+ int i; -+ u32 code = be32_to_cpu(hw_code); -+ -+ /* Look for the initial press of a button */ -+ for (i = 0; i < ARRAY_SIZE(imon_remote_key_table); i++) -+ if (imon_remote_key_table[i].code == code) -+ return i; -+ -+ /* Look for the release of a button, return index + offset */ -+ for (i = 0; i < ARRAY_SIZE(imon_remote_key_table); i++) -+ if ((imon_remote_key_table[i].code | 0x4000) == code) -+ return i + IMON_KEY_RELEASE_OFFSET; -+ -+ return -1; -+} -+ -+static int imon_mce_key_lookup(u32 hw_code) -+{ -+ int i; -+ u32 code = be32_to_cpu(hw_code); -+ -+#define MCE_KEY_MASK 0x7000 -+#define MCE_TOGGLE_BIT 0x8000 -+ -+ /* -+ * On some receivers, mce keys decode to 0x8000f04xx and 0x8000f84xx -+ * (the toggle bit flipping between alternating key presses), while -+ * on other receivers, we see 0x8000f74xx and 0x8000ff4xx. To keep -+ * the table trim, we always or in the bits to look up 0x8000ff4xx, -+ * but we can't or them into all codes, as some keys are decoded in -+ * a different way w/o the same use of the toggle bit... -+ */ -+ if ((code >> 24) & 0x80) -+ code = code | MCE_KEY_MASK | MCE_TOGGLE_BIT; -+ -+ for (i = 0; i < ARRAY_SIZE(imon_mce_key_table); i++) -+ if (imon_mce_key_table[i].code == code) -+ return i; -+ -+ return -1; -+} -+ -+static int imon_panel_key_lookup(u64 hw_code) -+{ -+ int i; -+ u64 code = be64_to_cpu(hw_code); -+ -+ for (i = 0; i < ARRAY_SIZE(imon_panel_key_table); i++) -+ if (imon_panel_key_table[i].hw_code == (code | 0xffee)) -+ return i; -+ -+ return -1; -+} -+ -+static bool imon_mouse_event(struct imon_context *ictx, -+ unsigned char *buf, int len) -+{ -+ char rel_x = 0x00, rel_y = 0x00; -+ u8 right_shift = 1; -+ bool mouse_input = 1; -+ int dir = 0; -+ -+ /* newer iMON device PAD or mouse button */ -+ if (ictx->product != 0xffdc && (buf[0] & 0x01) && len == 5) { -+ rel_x = buf[2]; -+ rel_y = buf[3]; -+ right_shift = 1; -+ /* 0xffdc iMON PAD or mouse button input */ -+ } else if (ictx->product == 0xffdc && (buf[0] & 0x40) && -+ !((buf[1] & 0x01) || ((buf[1] >> 2) & 0x01))) { -+ rel_x = (buf[1] & 0x08) | (buf[1] & 0x10) >> 2 | -+ (buf[1] & 0x20) >> 4 | (buf[1] & 0x40) >> 6; -+ if (buf[0] & 0x02) -+ rel_x |= ~0x0f; -+ rel_x = rel_x + rel_x / 2; -+ rel_y = (buf[2] & 0x08) | (buf[2] & 0x10) >> 2 | -+ (buf[2] & 0x20) >> 4 | (buf[2] & 0x40) >> 6; -+ if (buf[0] & 0x01) -+ rel_y |= ~0x0f; -+ rel_y = rel_y + rel_y / 2; -+ right_shift = 2; -+ /* some ffdc devices decode mouse buttons differently... */ -+ } else if (ictx->product == 0xffdc && (buf[0] == 0x68)) { -+ right_shift = 2; -+ /* ch+/- buttons, which we use for an emulated scroll wheel */ -+ } else if (ictx->kc == KEY_CHANNELUP && (buf[2] & 0x40) != 0x40) { -+ dir = 1; -+ } else if (ictx->kc == KEY_CHANNELDOWN && (buf[2] & 0x40) != 0x40) { -+ dir = -1; -+ } else -+ mouse_input = 0; -+ -+ if (mouse_input) { -+ dev_dbg(ictx->dev, "sending mouse data via input subsystem\n"); -+ -+ if (dir) { -+ input_report_rel(ictx->idev, REL_WHEEL, dir); -+ } else if (rel_x || rel_y) { -+ input_report_rel(ictx->idev, REL_X, rel_x); -+ input_report_rel(ictx->idev, REL_Y, rel_y); -+ } else { -+ input_report_key(ictx->idev, BTN_LEFT, buf[1] & 0x1); -+ input_report_key(ictx->idev, BTN_RIGHT, -+ buf[1] >> right_shift & 0x1); -+ } -+ input_sync(ictx->idev); -+ ictx->last_keycode = ictx->kc; -+ } -+ -+ return mouse_input; -+} -+ -+static void imon_touch_event(struct imon_context *ictx, unsigned char *buf) -+{ -+ mod_timer(&ictx->ttimer, jiffies + TOUCH_TIMEOUT); -+ ictx->touch_x = (buf[0] << 4) | (buf[1] >> 4); -+ ictx->touch_y = 0xfff - ((buf[2] << 4) | (buf[1] & 0xf)); -+ input_report_abs(ictx->touch, ABS_X, ictx->touch_x); -+ input_report_abs(ictx->touch, ABS_Y, ictx->touch_y); -+ input_report_key(ictx->touch, BTN_TOUCH, 0x01); -+ input_sync(ictx->touch); -+} -+ -+static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf) -+{ -+ int ki = 1; -+ int dir = 0; -+ int offset = IMON_KEY_RELEASE_OFFSET; -+ char rel_x = 0x00, rel_y = 0x00; -+ u16 timeout, threshold; -+ u64 temp_key; -+ u32 remote_key; -+ -+ /* -+ * The imon directional pad functions more like a touchpad. Bytes 3 & 4 -+ * contain a position coordinate (x,y), with each component ranging -+ * from -14 to 14. We want to down-sample this to only 4 discrete values -+ * for up/down/left/right arrow keys. Also, when you get too close to -+ * diagonals, it has a tendancy to jump back and forth, so lets try to -+ * ignore when they get too close. -+ */ -+ if (ictx->product != 0xffdc) { -+ /* first, pad to 8 bytes so it conforms with everything else */ -+ buf[5] = buf[6] = buf[7] = 0; -+ timeout = 500; /* in msecs */ -+ /* (2*threshold) x (2*threshold) square */ -+ threshold = pad_thresh ? pad_thresh : 28; -+ rel_x = buf[2]; -+ rel_y = buf[3]; -+ -+ if (ictx->ir_protocol == IMON_IR_PROTOCOL_IMON) { -+ if ((buf[1] == 0) && ((rel_x != 0) || (rel_y != 0))) { -+ dir = stabilize((int)rel_x, (int)rel_y, -+ timeout, threshold); -+ if (!dir) { -+ ictx->kc = KEY_UNKNOWN; -+ return; -+ } -+ buf[2] = dir & 0xFF; -+ buf[3] = (dir >> 8) & 0xFF; -+ memcpy(&temp_key, buf, sizeof(temp_key)); -+ remote_key = (u32) (le64_to_cpu(temp_key) -+ & 0xffffffff); -+ ki = imon_remote_key_lookup(remote_key); -+ ictx->kc = -+ imon_remote_key_table[ki % offset].keycode; -+ } -+ } else { -+ if (abs(rel_y) > abs(rel_x)) { -+ buf[2] = (rel_y > 0) ? 0x7F : 0x80; -+ buf[3] = 0; -+ ictx->kc = (rel_y > 0) ? KEY_DOWN : KEY_UP; -+ } else { -+ buf[2] = 0; -+ buf[3] = (rel_x > 0) ? 0x7F : 0x80; -+ ictx->kc = (rel_x > 0) ? KEY_RIGHT : KEY_LEFT; -+ } -+ } -+ -+ /* -+ * Handle on-board decoded pad events for e.g. older VFD/iMON-Pad -+ * device (15c2:ffdc). The remote generates various codes from -+ * 0x68nnnnB7 to 0x6AnnnnB7, the left mouse button generates -+ * 0x688301b7 and the right one 0x688481b7. All other keys generate -+ * 0x2nnnnnnn. Position coordinate is encoded in buf[1] and buf[2] with -+ * reversed endianess. Extract direction from buffer, rotate endianess, -+ * adjust sign and feed the values into stabilize(). The resulting codes -+ * will be 0x01008000, 0x01007F00, which match the newer devices. -+ */ -+ } else { -+ timeout = 10; /* in msecs */ -+ /* (2*threshold) x (2*threshold) square */ -+ threshold = pad_thresh ? pad_thresh : 15; -+ -+ /* buf[1] is x */ -+ rel_x = (buf[1] & 0x08) | (buf[1] & 0x10) >> 2 | -+ (buf[1] & 0x20) >> 4 | (buf[1] & 0x40) >> 6; -+ if (buf[0] & 0x02) -+ rel_x |= ~0x10+1; -+ /* buf[2] is y */ -+ rel_y = (buf[2] & 0x08) | (buf[2] & 0x10) >> 2 | -+ (buf[2] & 0x20) >> 4 | (buf[2] & 0x40) >> 6; -+ if (buf[0] & 0x01) -+ rel_y |= ~0x10+1; -+ -+ buf[0] = 0x01; -+ buf[1] = buf[4] = buf[5] = buf[6] = buf[7] = 0; -+ -+ if (ictx->ir_protocol == IMON_IR_PROTOCOL_IMON) { -+ dir = stabilize((int)rel_x, (int)rel_y, -+ timeout, threshold); -+ if (!dir) { -+ ictx->kc = KEY_UNKNOWN; -+ return; -+ } -+ buf[2] = dir & 0xFF; -+ buf[3] = (dir >> 8) & 0xFF; -+ memcpy(&temp_key, buf, sizeof(temp_key)); -+ remote_key = (u32) (le64_to_cpu(temp_key) & 0xffffffff); -+ ki = imon_remote_key_lookup(remote_key); -+ ictx->kc = imon_remote_key_table[ki % offset].keycode; -+ } else { -+ if (abs(rel_y) > abs(rel_x)) { -+ buf[2] = (rel_y > 0) ? 0x7F : 0x80; -+ buf[3] = 0; -+ ictx->kc = (rel_y > 0) ? KEY_DOWN : KEY_UP; -+ } else { -+ buf[2] = 0; -+ buf[3] = (rel_x > 0) ? 0x7F : 0x80; -+ ictx->kc = (rel_x > 0) ? KEY_RIGHT : KEY_LEFT; -+ } -+ } -+ } -+ -+ ictx->ki = ki; -+} -+ -+static int imon_parse_press_type(struct imon_context *ictx, -+ unsigned char *buf, u8 ksrc) -+{ -+ int press_type = 0; -+ -+ /* key release of 0x02XXXXXX key */ -+ if (ictx->ki == -1 && buf[0] == 0x02 && buf[3] == 0x00) -+ ictx->kc = ictx->last_keycode; -+ -+ /* mouse button release on (some) 0xffdc devices */ -+ else if (ictx->ki == -1 && buf[0] == 0x68 && buf[1] == 0x82 && -+ buf[2] == 0x81 && buf[3] == 0xb7) -+ ictx->kc = ictx->last_keycode; -+ -+ /* mouse button release on (some other) 0xffdc devices */ -+ else if (ictx->ki == -1 && buf[0] == 0x01 && buf[1] == 0x00 && -+ buf[2] == 0x81 && buf[3] == 0xb7) -+ ictx->kc = ictx->last_keycode; -+ -+ /* mce-specific button handling */ -+ else if (ksrc == IMON_BUTTON_MCE) { -+ /* initial press */ -+ if (ictx->kc != ictx->last_keycode -+ || buf[2] != ictx->mce_toggle_bit) { -+ ictx->last_keycode = ictx->kc; -+ ictx->mce_toggle_bit = buf[2]; -+ press_type = 1; -+ mod_timer(&ictx->itimer, -+ jiffies + msecs_to_jiffies(MCE_TIMEOUT_MS)); -+ /* repeat */ -+ } else { -+ press_type = 2; -+ mod_timer(&ictx->itimer, -+ jiffies + msecs_to_jiffies(MCE_TIMEOUT_MS)); -+ } -+ -+ /* incoherent or irrelevant data */ -+ } else if (ictx->ki == -1) -+ press_type = -EINVAL; -+ -+ /* key release of 0xXXXXXXb7 key */ -+ else if (ictx->ki >= IMON_KEY_RELEASE_OFFSET) -+ press_type = 0; -+ -+ /* this is a button press */ -+ else -+ press_type = 1; -+ -+ return press_type; -+} -+ -+/** -+ * Process the incoming packet -+ */ -+static void imon_incoming_packet(struct imon_context *ictx, -+ struct urb *urb, int intf) -+{ -+ int len = urb->actual_length; -+ unsigned char *buf = urb->transfer_buffer; -+ struct device *dev = ictx->dev; -+ u16 kc; -+ bool norelease = 0; -+ int i, ki; -+ int offset = IMON_KEY_RELEASE_OFFSET; -+ u64 temp_key; -+ u64 panel_key = 0; -+ u32 remote_key = 0; -+ struct input_dev *idev = NULL; -+ int press_type = 0; -+ int msec; -+ struct timeval t; -+ static struct timeval prev_time = { 0, 0 }; -+ u8 ksrc = IMON_BUTTON_IMON; -+ -+ idev = ictx->idev; -+ -+ /* filter out junk data on the older 0xffdc imon devices */ -+ if ((buf[0] == 0xff) && (buf[7] == 0xff)) -+ return; -+ -+ /* Figure out what key was pressed */ -+ memcpy(&temp_key, buf, sizeof(temp_key)); -+ if (len == 8 && buf[7] == 0xee) { -+ ksrc = IMON_BUTTON_PANEL; -+ panel_key = le64_to_cpu(temp_key); -+ ki = imon_panel_key_lookup(panel_key); -+ if (ki < 0) -+ kc = KEY_UNKNOWN; -+ else -+ kc = imon_panel_key_table[ki].keycode; -+ } else { -+ remote_key = (u32) (le64_to_cpu(temp_key) & 0xffffffff); -+ if (ictx->ir_protocol == IMON_IR_PROTOCOL_MCE) { -+ if (buf[0] == 0x80) -+ ksrc = IMON_BUTTON_MCE; -+ ki = imon_mce_key_lookup(remote_key); -+ if (ki < 0) -+ kc = KEY_UNKNOWN; -+ else -+ kc = imon_mce_key_table[ki].keycode; -+ } else { -+ ki = imon_remote_key_lookup(remote_key); -+ if (ki < 0) -+ kc = KEY_UNKNOWN; -+ else -+ kc = imon_remote_key_table[ki % offset].keycode; -+ } -+ } -+ -+ /* keyboard/mouse mode toggle button */ -+ if (kc == KEY_KEYBOARD && ki < offset) { -+ ictx->last_keycode = kc; -+ if (!nomouse) { -+ ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1; -+ dev_dbg(dev, "toggling to %s mode\n", -+ ictx->pad_mouse ? "mouse" : "keyboard"); -+ return; -+ } else { -+ ictx->pad_mouse = 0; -+ dev_dbg(dev, "mouse mode disabled, passing key value\n"); -+ } -+ } -+ -+ ictx->ki = ki; -+ ictx->kc = kc; -+ -+ /* send touchscreen events through input subsystem if touchpad data */ -+ if (ictx->display_type == IMON_DISPLAY_TYPE_VGA && len == 8 && -+ buf[7] == 0x86) { -+ imon_touch_event(ictx, buf); -+ -+ /* look for mouse events with pad in mouse mode */ -+ } else if (ictx->pad_mouse) { -+ if (imon_mouse_event(ictx, buf, len)) -+ return; -+ } -+ -+ /* Now for some special handling to convert pad input to arrow keys */ -+ if (((len == 5) && (buf[0] == 0x01) && (buf[4] == 0x00)) || -+ ((len == 8) && (buf[0] & 0x40) && -+ !(buf[1] & 0x1 || buf[1] >> 2 & 0x1))) { -+ len = 8; -+ imon_pad_to_keys(ictx, buf); -+ norelease = 1; -+ } -+ -+ if (debug) { -+ printk(KERN_INFO "intf%d decoded packet: ", intf); -+ for (i = 0; i < len; ++i) -+ printk("%02x ", buf[i]); -+ printk("\n"); -+ } -+ -+ press_type = imon_parse_press_type(ictx, buf, ksrc); -+ if (press_type < 0) -+ goto not_input_data; -+ -+ if (ictx->kc == KEY_UNKNOWN) -+ goto unknown_key; -+ -+ /* KEY_MUTE repeats from MCE and knob need to be suppressed */ -+ if ((ictx->kc == KEY_MUTE && ictx->kc == ictx->last_keycode) -+ && (buf[7] == 0xee || ksrc == IMON_BUTTON_MCE)) { -+ do_gettimeofday(&t); -+ msec = tv2int(&t, &prev_time); -+ prev_time = t; -+ if (msec < 200) -+ return; -+ } -+ -+ input_report_key(idev, ictx->kc, press_type); -+ input_sync(idev); -+ -+ /* panel keys and some remote keys don't generate a release */ -+ if (panel_key || norelease) { -+ input_report_key(idev, ictx->kc, 0); -+ input_sync(idev); -+ } -+ -+ ictx->last_keycode = ictx->kc; -+ -+ return; -+ -+unknown_key: -+ dev_info(dev, "%s: unknown keypress, code 0x%llx\n", __func__, -+ (panel_key ? be64_to_cpu(panel_key) : -+ be32_to_cpu(remote_key))); -+ return; -+ -+not_input_data: -+ if (len != 8) { -+ dev_warn(dev, "imon %s: invalid incoming packet " -+ "size (len = %d, intf%d)\n", __func__, len, intf); -+ return; -+ } -+ -+ /* iMON 2.4G associate frame */ -+ if (buf[0] == 0x00 && -+ buf[2] == 0xFF && /* REFID */ -+ buf[3] == 0xFF && -+ buf[4] == 0xFF && -+ buf[5] == 0xFF && /* iMON 2.4G */ -+ ((buf[6] == 0x4E && buf[7] == 0xDF) || /* LT */ -+ (buf[6] == 0x5E && buf[7] == 0xDF))) { /* DT */ -+ dev_warn(dev, "%s: remote associated refid=%02X\n", -+ __func__, buf[1]); -+ ictx->ir_isassociating = 0; -+ } -+} -+ -+/** -+ * mce/rc6 keypresses have no distinct release code, use timer -+ */ -+static void imon_mce_timeout(unsigned long data) -+{ -+ struct imon_context *ictx = (struct imon_context *)data; -+ -+ input_report_key(ictx->idev, ictx->last_keycode, 0); -+ input_sync(ictx->idev); -+} -+ -+/** -+ * report touchscreen input -+ */ -+static void imon_touch_display_timeout(unsigned long data) -+{ -+ struct imon_context *ictx = (struct imon_context *)data; -+ -+ if (!ictx->display_type == IMON_DISPLAY_TYPE_VGA) -+ return; -+ -+ input_report_abs(ictx->touch, ABS_X, ictx->touch_x); -+ input_report_abs(ictx->touch, ABS_Y, ictx->touch_y); -+ input_report_key(ictx->touch, BTN_TOUCH, 0x00); -+ input_sync(ictx->touch); -+} -+ -+/** -+ * Callback function for USB core API: receive data -+ */ -+static void usb_rx_callback_intf0(struct urb *urb) -+{ -+ struct imon_context *ictx; -+ unsigned char *buf; -+ int len; -+ int intfnum = 0; -+ -+ if (!urb) -+ return; -+ -+ ictx = (struct imon_context *)urb->context; -+ if (!ictx) -+ return; -+ -+ buf = urb->transfer_buffer; -+ len = urb->actual_length; -+ -+ switch (urb->status) { -+ case -ENOENT: /* usbcore unlink successful! */ -+ return; -+ -+ case -ESHUTDOWN: /* transport endpoint was shut down */ -+ break; -+ -+ case 0: -+ imon_incoming_packet(ictx, urb, intfnum); -+ break; -+ -+ default: -+ dev_warn(ictx->dev, "imon %s: status(%d): ignored\n", -+ __func__, urb->status); -+ break; -+ } -+ -+ usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); -+} -+ -+static void usb_rx_callback_intf1(struct urb *urb) -+{ -+ struct imon_context *ictx; -+ unsigned char *buf; -+ int len; -+ int intfnum = 1; -+ -+ if (!urb) -+ return; -+ -+ ictx = (struct imon_context *)urb->context; -+ if (!ictx) -+ return; -+ -+ buf = urb->transfer_buffer; -+ len = urb->actual_length; -+ -+ switch (urb->status) { -+ case -ENOENT: /* usbcore unlink successful! */ -+ return; -+ -+ case -ESHUTDOWN: /* transport endpoint was shut down */ -+ break; -+ -+ case 0: -+ imon_incoming_packet(ictx, urb, intfnum); -+ break; -+ -+ default: -+ dev_warn(ictx->dev, "imon %s: status(%d): ignored\n", -+ __func__, urb->status); -+ break; -+ } -+ -+ usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); -+} -+ -+static struct input_dev *imon_init_idev(struct imon_context *ictx) -+{ -+ struct input_dev *idev; -+ int ret, i; -+ -+ idev = input_allocate_device(); -+ if (!idev) { -+ dev_err(ictx->dev, "remote input dev allocation failed\n"); -+ goto idev_alloc_failed; -+ } -+ -+ snprintf(ictx->name_idev, sizeof(ictx->name_idev), -+ "iMON Remote (%04x:%04x)", ictx->vendor, ictx->product); -+ idev->name = ictx->name_idev; -+ -+ usb_make_path(ictx->usbdev_intf0, ictx->phys_idev, -+ sizeof(ictx->phys_idev)); -+ strlcat(ictx->phys_idev, "/input0", sizeof(ictx->phys_idev)); -+ idev->phys = ictx->phys_idev; -+ -+ idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); -+ -+ idev->keybit[BIT_WORD(BTN_MOUSE)] = -+ BIT_MASK(BTN_LEFT) | BIT_MASK(BTN_RIGHT); -+ idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y) | -+ BIT_MASK(REL_WHEEL); -+ -+ input_set_drvdata(idev, ictx); -+ -+ if (ir_protocol == IMON_IR_PROTOCOL_MCE) -+ ret = sparse_keymap_setup(idev, imon_mce_key_table, NULL); -+ else -+ ret = sparse_keymap_setup(idev, imon_remote_key_table, NULL); -+ if (ret) -+ goto keymap_failed; -+ -+ /* can't use sparse keymap atm, 64-bit keycodes */ -+ for (i = 0; i < ARRAY_SIZE(imon_panel_key_table); i++) { -+ u16 kc = imon_panel_key_table[i].keycode; -+ __set_bit(kc, idev->keybit); -+ } -+ -+ usb_to_input_id(ictx->usbdev_intf0, &idev->id); -+ idev->dev.parent = ictx->dev; -+ ret = input_register_device(idev); -+ if (ret < 0) { -+ dev_err(ictx->dev, "remote input dev register failed\n"); -+ goto idev_register_failed; -+ } -+ -+ return idev; -+ -+idev_register_failed: -+ sparse_keymap_free(idev); -+keymap_failed: -+ input_free_device(idev); -+idev_alloc_failed: -+ -+ return NULL; -+} -+ -+static struct input_dev *imon_init_touch(struct imon_context *ictx) -+{ -+ struct input_dev *touch; -+ int ret; -+ -+ touch = input_allocate_device(); -+ if (!touch) { -+ dev_err(ictx->dev, "touchscreen input dev allocation failed\n"); -+ goto touch_alloc_failed; -+ } -+ -+ snprintf(ictx->name_touch, sizeof(ictx->name_touch), -+ "iMON USB Touchscreen (%04x:%04x)", -+ ictx->vendor, ictx->product); -+ touch->name = ictx->name_touch; -+ -+ usb_make_path(ictx->usbdev_intf1, ictx->phys_touch, -+ sizeof(ictx->phys_touch)); -+ strlcat(ictx->phys_touch, "/input1", sizeof(ictx->phys_touch)); -+ touch->phys = ictx->phys_touch; -+ -+ touch->evbit[0] = -+ BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); -+ touch->keybit[BIT_WORD(BTN_TOUCH)] = -+ BIT_MASK(BTN_TOUCH); -+ input_set_abs_params(touch, ABS_X, -+ 0x00, 0xfff, 0, 0); -+ input_set_abs_params(touch, ABS_Y, -+ 0x00, 0xfff, 0, 0); -+ -+ input_set_drvdata(touch, ictx); -+ -+ usb_to_input_id(ictx->usbdev_intf1, &touch->id); -+ touch->dev.parent = ictx->dev; -+ ret = input_register_device(touch); -+ if (ret < 0) { -+ dev_info(ictx->dev, "touchscreen input dev register failed\n"); -+ goto touch_register_failed; -+ } -+ -+ return touch; -+ -+touch_register_failed: -+ input_free_device(ictx->touch); -+ mutex_unlock(&ictx->lock); -+ -+touch_alloc_failed: -+ return NULL; -+} -+ -+static bool imon_find_endpoints(struct imon_context *ictx, -+ struct usb_host_interface *iface_desc) -+{ -+ struct usb_endpoint_descriptor *ep; -+ struct usb_endpoint_descriptor *rx_endpoint = NULL; -+ struct usb_endpoint_descriptor *tx_endpoint = NULL; -+ int ifnum = iface_desc->desc.bInterfaceNumber; -+ int num_endpts = iface_desc->desc.bNumEndpoints; -+ int i, ep_dir, ep_type; -+ bool ir_ep_found = 0; -+ bool display_ep_found = 0; -+ bool tx_control = 0; -+ -+ /* -+ * Scan the endpoint list and set: -+ * first input endpoint = IR endpoint -+ * first output endpoint = display endpoint -+ */ -+ for (i = 0; i < num_endpts && !(ir_ep_found && display_ep_found); ++i) { -+ ep = &iface_desc->endpoint[i].desc; -+ ep_dir = ep->bEndpointAddress & USB_ENDPOINT_DIR_MASK; -+ ep_type = ep->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; -+ -+ if (!ir_ep_found && ep_dir == USB_DIR_IN && -+ ep_type == USB_ENDPOINT_XFER_INT) { -+ -+ rx_endpoint = ep; -+ ir_ep_found = 1; -+ dev_dbg(ictx->dev, "%s: found IR endpoint\n", __func__); -+ -+ } else if (!display_ep_found && ep_dir == USB_DIR_OUT && -+ ep_type == USB_ENDPOINT_XFER_INT) { -+ tx_endpoint = ep; -+ display_ep_found = 1; -+ dev_dbg(ictx->dev, "%s: found display endpoint\n", __func__); -+ } -+ } -+ -+ if (ifnum == 0) { -+ ictx->rx_endpoint_intf0 = rx_endpoint; -+ /* -+ * tx is used to send characters to lcd/vfd, associate RF -+ * remotes, set IR protocol, and maybe more... -+ */ -+ ictx->tx_endpoint = tx_endpoint; -+ } else { -+ ictx->rx_endpoint_intf1 = rx_endpoint; -+ } -+ -+ /* -+ * If we didn't find a display endpoint, this is probably one of the -+ * newer iMON devices that use control urb instead of interrupt -+ */ -+ if (!display_ep_found) { -+ tx_control = 1; -+ display_ep_found = 1; -+ dev_dbg(ictx->dev, "%s: device uses control endpoint, not " -+ "interface OUT endpoint\n", __func__); -+ } -+ -+ /* -+ * Some iMON receivers have no display. Unfortunately, it seems -+ * that SoundGraph recycles device IDs between devices both with -+ * and without... :\ -+ */ -+ if (ictx->display_type == IMON_DISPLAY_TYPE_NONE) { -+ display_ep_found = 0; -+ dev_dbg(ictx->dev, "%s: device has no display\n", __func__); -+ } -+ -+ /* -+ * iMON Touch devices have a VGA touchscreen, but no "display", as -+ * that refers to e.g. /dev/lcd0 (a character device LCD or VFD). -+ */ -+ if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { -+ display_ep_found = 0; -+ dev_dbg(ictx->dev, "%s: iMON Touch device found\n", __func__); -+ } -+ -+ /* Input endpoint is mandatory */ -+ if (!ir_ep_found) -+ err("%s: no valid input (IR) endpoint found.", __func__); -+ -+ ictx->tx_control = tx_control; -+ -+ if (display_ep_found) -+ ictx->display_supported = 1; -+ -+ return ir_ep_found; -+ -+} -+ -+static struct imon_context *imon_init_intf0(struct usb_interface *intf) -+{ -+ struct imon_context *ictx; -+ struct urb *rx_urb; -+ struct urb *tx_urb; -+ struct device *dev = &intf->dev; -+ struct usb_host_interface *iface_desc; -+ int ret; -+ -+ ictx = kzalloc(sizeof(struct imon_context), GFP_KERNEL); -+ if (!ictx) { -+ dev_err(dev, "%s: kzalloc failed for context", __func__); -+ goto exit; -+ } -+ rx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!rx_urb) { -+ dev_err(dev, "%s: usb_alloc_urb failed for IR urb", __func__); -+ goto rx_urb_alloc_failed; -+ } -+ tx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!tx_urb) { -+ dev_err(dev, "%s: usb_alloc_urb failed for display urb", -+ __func__); -+ goto tx_urb_alloc_failed; -+ } -+ -+ mutex_init(&ictx->lock); -+ -+ mutex_lock(&ictx->lock); -+ -+ if (ir_protocol == IMON_IR_PROTOCOL_MCE) { -+ init_timer(&ictx->itimer); -+ ictx->itimer.data = (unsigned long)ictx; -+ ictx->itimer.function = imon_mce_timeout; -+ } -+ -+ ictx->dev = dev; -+ ictx->usbdev_intf0 = usb_get_dev(interface_to_usbdev(intf)); -+ ictx->dev_present_intf0 = 1; -+ ictx->rx_urb_intf0 = rx_urb; -+ ictx->tx_urb = tx_urb; -+ -+ ictx->vendor = le16_to_cpu(ictx->usbdev_intf0->descriptor.idVendor); -+ ictx->product = le16_to_cpu(ictx->usbdev_intf0->descriptor.idProduct); -+ -+ iface_desc = intf->cur_altsetting; -+ if (!imon_find_endpoints(ictx, iface_desc)) -+ goto find_endpoint_failed; -+ -+ ictx->idev = imon_init_idev(ictx); -+ if (!ictx->idev) { -+ dev_err(dev, "%s: input device setup failed\n", __func__); -+ goto idev_setup_failed; -+ } -+ -+ usb_fill_int_urb(ictx->rx_urb_intf0, ictx->usbdev_intf0, -+ usb_rcvintpipe(ictx->usbdev_intf0, -+ ictx->rx_endpoint_intf0->bEndpointAddress), -+ ictx->usb_rx_buf, sizeof(ictx->usb_rx_buf), -+ usb_rx_callback_intf0, ictx, -+ ictx->rx_endpoint_intf0->bInterval); -+ -+ ret = usb_submit_urb(ictx->rx_urb_intf0, GFP_KERNEL); -+ if (ret) { -+ err("%s: usb_submit_urb failed for intf0 (%d)", -+ __func__, ret); -+ goto urb_submit_failed; -+ } -+ -+ return ictx; -+ -+urb_submit_failed: -+ sparse_keymap_free(ictx->idev); -+ input_unregister_device(ictx->idev); -+ input_free_device(ictx->idev); -+idev_setup_failed: -+find_endpoint_failed: -+ mutex_unlock(&ictx->lock); -+ usb_free_urb(tx_urb); -+tx_urb_alloc_failed: -+ usb_free_urb(rx_urb); -+rx_urb_alloc_failed: -+ kfree(ictx); -+exit: -+ dev_err(dev, "unable to initialize intf0, err %d\n", ret); -+ -+ return NULL; -+} -+ -+static struct imon_context *imon_init_intf1(struct usb_interface *intf, -+ struct imon_context *ictx) -+{ -+ struct urb *rx_urb; -+ struct usb_host_interface *iface_desc; -+ int ret; -+ -+ rx_urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!rx_urb) { -+ err("%s: usb_alloc_urb failed for IR urb", __func__); -+ ret = -ENOMEM; -+ goto rx_urb_alloc_failed; -+ } -+ -+ mutex_lock(&ictx->lock); -+ -+ if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { -+ init_timer(&ictx->ttimer); -+ ictx->ttimer.data = (unsigned long)ictx; -+ ictx->ttimer.function = imon_touch_display_timeout; -+ } -+ -+ ictx->usbdev_intf1 = usb_get_dev(interface_to_usbdev(intf)); -+ ictx->dev_present_intf1 = 1; -+ ictx->rx_urb_intf1 = rx_urb; -+ -+ iface_desc = intf->cur_altsetting; -+ if (!imon_find_endpoints(ictx, iface_desc)) -+ goto find_endpoint_failed; -+ -+ if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) { -+ ictx->touch = imon_init_touch(ictx); -+ if (!ictx->touch) -+ goto touch_setup_failed; -+ } else -+ ictx->touch = NULL; -+ -+ usb_fill_int_urb(ictx->rx_urb_intf1, ictx->usbdev_intf1, -+ usb_rcvintpipe(ictx->usbdev_intf1, -+ ictx->rx_endpoint_intf1->bEndpointAddress), -+ ictx->usb_rx_buf, sizeof(ictx->usb_rx_buf), -+ usb_rx_callback_intf1, ictx, -+ ictx->rx_endpoint_intf1->bInterval); -+ -+ ret = usb_submit_urb(ictx->rx_urb_intf1, GFP_KERNEL); -+ -+ if (ret) { -+ err("%s: usb_submit_urb failed for intf1 (%d)", -+ __func__, ret); -+ goto urb_submit_failed; -+ } -+ -+ return ictx; -+ -+urb_submit_failed: -+ if (ictx->touch) { -+ input_unregister_device(ictx->touch); -+ input_free_device(ictx->touch); -+ } -+touch_setup_failed: -+find_endpoint_failed: -+ mutex_unlock(&ictx->lock); -+ usb_free_urb(rx_urb); -+rx_urb_alloc_failed: -+ dev_err(ictx->dev, "unable to initialize intf0, err %d\n", ret); -+ -+ return NULL; -+} -+ -+static void imon_set_display_type(struct imon_context *ictx, -+ struct usb_interface *intf) -+{ -+ int configured_display_type = IMON_DISPLAY_TYPE_VFD; -+ -+ /* -+ * Try to auto-detect the type of display if the user hasn't set -+ * it by hand via the display_type modparam. Default is VFD. -+ */ -+ if (display_type == IMON_DISPLAY_TYPE_AUTO) { -+ if (usb_match_id(intf, lcd_device_list)) -+ configured_display_type = IMON_DISPLAY_TYPE_LCD; -+ else if (usb_match_id(intf, imon_touchscreen_list)) -+ configured_display_type = IMON_DISPLAY_TYPE_VGA; -+ else if (usb_match_id(intf, ir_only_list)) -+ configured_display_type = IMON_DISPLAY_TYPE_NONE; -+ else -+ configured_display_type = IMON_DISPLAY_TYPE_VFD; -+ } else { -+ configured_display_type = display_type; -+ dev_dbg(ictx->dev, "%s: overriding display type to %d via " -+ "modparam\n", __func__, display_type); -+ } -+ -+ ictx->display_type = configured_display_type; -+} -+ -+static void imon_init_display(struct imon_context *ictx, -+ struct usb_interface *intf) -+{ -+ int ret; -+ const unsigned char fp_packet[] = { 0x40, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x88 }; -+ -+ dev_dbg(ictx->dev, "Registering iMON display with sysfs\n"); -+ -+ /* set up sysfs entry for built-in clock */ -+ ret = sysfs_create_group(&intf->dev.kobj, -+ &imon_display_attribute_group); -+ if (ret) -+ dev_err(ictx->dev, "Could not create display sysfs " -+ "entries(%d)", ret); -+ -+ if (ictx->display_type == IMON_DISPLAY_TYPE_LCD) -+ ret = usb_register_dev(intf, &imon_lcd_class); -+ else -+ ret = usb_register_dev(intf, &imon_vfd_class); -+ if (ret) -+ /* Not a fatal error, so ignore */ -+ dev_info(ictx->dev, "could not get a minor number for " -+ "display\n"); -+ -+ /* Enable front-panel buttons and/or knobs */ -+ memcpy(ictx->usb_tx_buf, &fp_packet, sizeof(fp_packet)); -+ ret = send_packet(ictx); -+ /* Not fatal, but warn about it */ -+ if (ret) -+ dev_info(ictx->dev, "failed to enable front-panel " -+ "buttons and/or knobs\n"); -+} -+ -+/** -+ * Callback function for USB core API: Probe -+ */ -+static int __devinit imon_probe(struct usb_interface *interface, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *usbdev = NULL; -+ struct usb_host_interface *iface_desc = NULL; -+ struct usb_interface *first_if; -+ struct device *dev = &interface->dev; -+ int ifnum, code_length, sysfs_err; -+ int ret = 0; -+ struct imon_context *ictx = NULL; -+ struct imon_context *first_if_ctx = NULL; -+ u16 vendor, product; -+ -+ code_length = BUF_CHUNK_SIZE * 8; -+ -+ usbdev = usb_get_dev(interface_to_usbdev(interface)); -+ iface_desc = interface->cur_altsetting; -+ ifnum = iface_desc->desc.bInterfaceNumber; -+ vendor = le16_to_cpu(usbdev->descriptor.idVendor); -+ product = le16_to_cpu(usbdev->descriptor.idProduct); -+ -+ dev_dbg(dev, "%s: found iMON device (%04x:%04x, intf%d)\n", -+ __func__, vendor, product, ifnum); -+ -+ /* prevent races probing devices w/multiple interfaces */ -+ mutex_lock(&driver_lock); -+ -+ first_if = usb_ifnum_to_if(usbdev, 0); -+ first_if_ctx = (struct imon_context *)usb_get_intfdata(first_if); -+ -+ -+ if (ifnum == 0) { -+ ictx = imon_init_intf0(interface); -+ if (!ictx) { -+ err("%s: failed to initialize context!\n", __func__); -+ ret = -ENODEV; -+ goto fail; -+ } -+ -+ imon_set_display_type(ictx, interface); -+ -+ if (ictx->display_supported) -+ imon_init_display(ictx, interface); -+ -+ if (product == 0xffdc) { -+ /* RF products *also* use 0xffdc... sigh... */ -+ sysfs_err = sysfs_create_group(&interface->dev.kobj, -+ &imon_rf_attribute_group); -+ if (sysfs_err) -+ err("%s: Could not create RF sysfs entries(%d)", -+ __func__, sysfs_err); -+ } -+ -+ } else { -+ /* this is the secondary interface on the device */ -+ ictx = imon_init_intf1(interface, first_if_ctx); -+ if (!ictx) { -+ err("%s: failed to attach to context!\n", __func__); -+ ret = -ENODEV; -+ goto fail; -+ } -+ -+ } -+ -+ usb_set_intfdata(interface, ictx); -+ -+ /* set IR protocol/remote type */ -+ imon_set_ir_protocol(ictx); -+ -+ dev_info(dev, "iMON device (%04x:%04x, intf%d) on " -+ "usb<%d:%d> initialized\n", vendor, product, ifnum, -+ usbdev->bus->busnum, usbdev->devnum); -+ -+ mutex_unlock(&ictx->lock); -+ mutex_unlock(&driver_lock); -+ -+ return 0; -+ -+fail: -+ mutex_unlock(&driver_lock); -+ dev_err(dev, "unable to register, err %d\n", ret); -+ -+ return ret; -+} -+ -+/** -+ * Callback function for USB core API: disconnect -+ */ -+static void __devexit imon_disconnect(struct usb_interface *interface) -+{ -+ struct imon_context *ictx; -+ struct device *dev; -+ int ifnum; -+ -+ /* prevent races with multi-interface device probing and display_open */ -+ mutex_lock(&driver_lock); -+ -+ ictx = usb_get_intfdata(interface); -+ dev = ictx->dev; -+ ifnum = interface->cur_altsetting->desc.bInterfaceNumber; -+ -+ mutex_lock(&ictx->lock); -+ -+ /* -+ * sysfs_remove_group is safe to call even if sysfs_create_group -+ * hasn't been called -+ */ -+ sysfs_remove_group(&interface->dev.kobj, -+ &imon_display_attribute_group); -+ sysfs_remove_group(&interface->dev.kobj, -+ &imon_rf_attribute_group); -+ -+ usb_set_intfdata(interface, NULL); -+ -+ /* Abort ongoing write */ -+ if (ictx->tx.busy) { -+ usb_kill_urb(ictx->tx_urb); -+ complete_all(&ictx->tx.finished); -+ } -+ -+ if (ifnum == 0) { -+ ictx->dev_present_intf0 = 0; -+ usb_kill_urb(ictx->rx_urb_intf0); -+ sparse_keymap_free(ictx->idev); -+ input_unregister_device(ictx->idev); -+ if (ictx->display_supported) { -+ if (ictx->display_type == IMON_DISPLAY_TYPE_LCD) -+ usb_deregister_dev(interface, &imon_lcd_class); -+ else -+ usb_deregister_dev(interface, &imon_vfd_class); -+ } -+ } else { -+ ictx->dev_present_intf1 = 0; -+ usb_kill_urb(ictx->rx_urb_intf1); -+ if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) -+ input_unregister_device(ictx->touch); -+ } -+ -+ if (!ictx->dev_present_intf0 && !ictx->dev_present_intf1) { -+ if (ictx->display_type == IMON_DISPLAY_TYPE_VGA) -+ del_timer_sync(&ictx->ttimer); -+ mutex_unlock(&ictx->lock); -+ if (!ictx->display_isopen) -+ free_imon_context(ictx); -+ } else { -+ if (ictx->ir_protocol == IMON_IR_PROTOCOL_MCE) -+ del_timer_sync(&ictx->itimer); -+ mutex_unlock(&ictx->lock); -+ } -+ -+ mutex_unlock(&driver_lock); -+ -+ dev_dbg(dev, "%s: iMON device (intf%d) disconnected\n", -+ __func__, ifnum); -+} -+ -+static int imon_suspend(struct usb_interface *intf, pm_message_t message) -+{ -+ struct imon_context *ictx = usb_get_intfdata(intf); -+ int ifnum = intf->cur_altsetting->desc.bInterfaceNumber; -+ -+ if (ifnum == 0) -+ usb_kill_urb(ictx->rx_urb_intf0); -+ else -+ usb_kill_urb(ictx->rx_urb_intf1); -+ -+ return 0; -+} -+ -+static int imon_resume(struct usb_interface *intf) -+{ -+ int rc = 0; -+ struct imon_context *ictx = usb_get_intfdata(intf); -+ int ifnum = intf->cur_altsetting->desc.bInterfaceNumber; -+ -+ if (ifnum == 0) { -+ usb_fill_int_urb(ictx->rx_urb_intf0, ictx->usbdev_intf0, -+ usb_rcvintpipe(ictx->usbdev_intf0, -+ ictx->rx_endpoint_intf0->bEndpointAddress), -+ ictx->usb_rx_buf, sizeof(ictx->usb_rx_buf), -+ usb_rx_callback_intf0, ictx, -+ ictx->rx_endpoint_intf0->bInterval); -+ -+ rc = usb_submit_urb(ictx->rx_urb_intf0, GFP_ATOMIC); -+ -+ } else { -+ usb_fill_int_urb(ictx->rx_urb_intf1, ictx->usbdev_intf1, -+ usb_rcvintpipe(ictx->usbdev_intf1, -+ ictx->rx_endpoint_intf1->bEndpointAddress), -+ ictx->usb_rx_buf, sizeof(ictx->usb_rx_buf), -+ usb_rx_callback_intf1, ictx, -+ ictx->rx_endpoint_intf1->bInterval); -+ -+ rc = usb_submit_urb(ictx->rx_urb_intf1, GFP_ATOMIC); -+ } -+ -+ return rc; -+} -+ -+static int __init imon_init(void) -+{ -+ int rc; -+ -+ rc = usb_register(&imon_driver); -+ if (rc) { -+ err("%s: usb register failed(%d)", __func__, rc); -+ rc = -ENODEV; -+ } -+ -+ return rc; -+} -+ -+static void __exit imon_exit(void) -+{ -+ usb_deregister(&imon_driver); -+} -+ -+module_init(imon_init); -+module_exit(imon_exit); -diff -Naur linux-2.6.35-rc6/drivers/input/misc/Kconfig linux-2.6.35-rc6.patch/drivers/input/misc/Kconfig ---- linux-2.6.35-rc6/drivers/input/misc/Kconfig 2010-07-22 21:13:38.000000000 +0200 -+++ linux-2.6.35-rc6.patch/drivers/input/misc/Kconfig 2010-08-02 09:28:03.994931619 +0200 -@@ -390,4 +390,16 @@ - To compile this driver as a module, choose M here: the - module will be called pcap_keys. - -+config INPUT_IMON -+ tristate "SoundGraph iMON Receiver and Display" -+ depends on USB_ARCH_HAS_HCD -+ select USB -+ select INPUT_SPARSEKMAP -+ help -+ Say Y here if you want to use a SoundGraph iMON (aka Antec Veris) -+ IR Receiver and/or LCD/VFD/VGA display. -+ -+ To compile this driver as a module, choose M here: the -+ module will be called imon. -+ - endif -diff -Naur linux-2.6.35-rc6/drivers/input/misc/Kconfig.orig linux-2.6.35-rc6.patch/drivers/input/misc/Kconfig.orig -diff -Naur linux-2.6.35-rc6/drivers/input/misc/Makefile linux-2.6.35-rc6.patch/drivers/input/misc/Makefile ---- linux-2.6.35-rc6/drivers/input/misc/Makefile 2010-07-22 21:13:38.000000000 +0200 -+++ linux-2.6.35-rc6.patch/drivers/input/misc/Makefile 2010-08-02 09:28:03.995933276 +0200 -@@ -17,6 +17,7 @@ - obj-$(CONFIG_INPUT_COBALT_BTNS) += cobalt_btns.o - obj-$(CONFIG_INPUT_DM355EVM) += dm355evm_keys.o - obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o -+obj-$(CONFIG_INPUT_IMON) += imon.o - obj-$(CONFIG_INPUT_IXP4XX_BEEPER) += ixp4xx-beeper.o - obj-$(CONFIG_INPUT_KEYSPAN_REMOTE) += keyspan_remote.o - obj-$(CONFIG_INPUT_M68K_BEEP) += m68kspkr.o -diff -Naur linux-2.6.35-rc6/drivers/input/misc/Makefile.orig linux-2.6.35-rc6.patch/drivers/input/misc/Makefile.orig -diff -Naur linux-2.6.35-rc6/include/linux/lirc.h linux-2.6.35-rc6.patch/include/linux/lirc.h ---- linux-2.6.35-rc6/include/linux/lirc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.35-rc6.patch/include/linux/lirc.h 2010-08-02 09:28:03.996942057 +0200 -@@ -0,0 +1,159 @@ -+/* -+ * lirc.h - linux infrared remote control header file -+ * last modified 2007/09/27 -+ */ -+ -+#ifndef _LINUX_LIRC_H -+#define _LINUX_LIRC_H -+ -+#include -+#include -+ -+/* */ -+#define PULSE_BIT 0x01000000 -+#define PULSE_MASK 0x00FFFFFF -+/* */ -+ -+#define LIRC_MODE2_SPACE 0x00000000 -+#define LIRC_MODE2_PULSE 0x01000000 -+#define LIRC_MODE2_FREQUENCY 0x02000000 -+#define LIRC_MODE2_TIMEOUT 0x03000000 -+ -+#define LIRC_VALUE_MASK 0x00FFFFFF -+#define LIRC_MODE2_MASK 0xFF000000 -+ -+#define LIRC_SPACE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_SPACE) -+#define LIRC_PULSE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_PULSE) -+#define LIRC_FREQUENCY(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY) -+#define LIRC_TIMEOUT(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT) -+ -+#define LIRC_VALUE(val) ((val)&LIRC_VALUE_MASK) -+#define LIRC_MODE2(val) ((val)&LIRC_MODE2_MASK) -+ -+#define LIRC_IS_SPACE(val) (LIRC_MODE2(val) == LIRC_MODE2_SPACE) -+#define LIRC_IS_PULSE(val) (LIRC_MODE2(val) == LIRC_MODE2_PULSE) -+#define LIRC_IS_FREQUENCY(val) (LIRC_MODE2(val) == LIRC_MODE2_FREQUENCY) -+#define LIRC_IS_TIMEOUT(val) (LIRC_MODE2(val) == LIRC_MODE2_TIMEOUT) -+ -+/*** lirc compatible hardware features ***/ -+ -+#define LIRC_MODE2SEND(x) (x) -+#define LIRC_SEND2MODE(x) (x) -+#define LIRC_MODE2REC(x) ((x) << 16) -+#define LIRC_REC2MODE(x) ((x) >> 16) -+ -+#define LIRC_MODE_RAW 0x00000001 -+#define LIRC_MODE_PULSE 0x00000002 -+#define LIRC_MODE_MODE2 0x00000004 -+#define LIRC_MODE_LIRCCODE 0x00000010 -+ -+ -+#define LIRC_CAN_SEND_RAW LIRC_MODE2SEND(LIRC_MODE_RAW) -+#define LIRC_CAN_SEND_PULSE LIRC_MODE2SEND(LIRC_MODE_PULSE) -+#define LIRC_CAN_SEND_MODE2 LIRC_MODE2SEND(LIRC_MODE_MODE2) -+#define LIRC_CAN_SEND_LIRCCODE LIRC_MODE2SEND(LIRC_MODE_LIRCCODE) -+ -+#define LIRC_CAN_SEND_MASK 0x0000003f -+ -+#define LIRC_CAN_SET_SEND_CARRIER 0x00000100 -+#define LIRC_CAN_SET_SEND_DUTY_CYCLE 0x00000200 -+#define LIRC_CAN_SET_TRANSMITTER_MASK 0x00000400 -+ -+#define LIRC_CAN_REC_RAW LIRC_MODE2REC(LIRC_MODE_RAW) -+#define LIRC_CAN_REC_PULSE LIRC_MODE2REC(LIRC_MODE_PULSE) -+#define LIRC_CAN_REC_MODE2 LIRC_MODE2REC(LIRC_MODE_MODE2) -+#define LIRC_CAN_REC_LIRCCODE LIRC_MODE2REC(LIRC_MODE_LIRCCODE) -+ -+#define LIRC_CAN_REC_MASK LIRC_MODE2REC(LIRC_CAN_SEND_MASK) -+ -+#define LIRC_CAN_SET_REC_CARRIER (LIRC_CAN_SET_SEND_CARRIER << 16) -+#define LIRC_CAN_SET_REC_DUTY_CYCLE (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16) -+ -+#define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000 -+#define LIRC_CAN_SET_REC_CARRIER_RANGE 0x80000000 -+#define LIRC_CAN_GET_REC_RESOLUTION 0x20000000 -+#define LIRC_CAN_SET_REC_TIMEOUT 0x10000000 -+#define LIRC_CAN_SET_REC_FILTER 0x08000000 -+ -+#define LIRC_CAN_MEASURE_CARRIER 0x02000000 -+ -+#define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK) -+#define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK) -+ -+#define LIRC_CAN_NOTIFY_DECODE 0x01000000 -+ -+/*** IOCTL commands for lirc driver ***/ -+ -+#define LIRC_GET_FEATURES _IOR('i', 0x00000000, unsigned long) -+ -+#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, unsigned long) -+#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, unsigned long) -+#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, unsigned int) -+#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, unsigned int) -+#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, unsigned int) -+#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, unsigned int) -+#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, unsigned int) -+ -+#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, uint32_t) -+#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, uint32_t) -+ -+#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, uint32_t) -+#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, uint32_t) -+#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, uint32_t) -+#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, uint32_t) -+ -+/* code length in bits, currently only for LIRC_MODE_LIRCCODE */ -+#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, unsigned long) -+ -+#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, unsigned long) -+#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, unsigned long) -+/* Note: these can reset the according pulse_width */ -+#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, unsigned int) -+#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, unsigned int) -+#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, unsigned int) -+#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, unsigned int) -+#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, unsigned int) -+ -+/* -+ * when a timeout != 0 is set the driver will send a -+ * LIRC_MODE2_TIMEOUT data packet, otherwise LIRC_MODE2_TIMEOUT is -+ * never sent, timeout is disabled by default -+ */ -+#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, uint32_t) -+ -+/* -+ * pulses shorter than this are filtered out by hardware (software -+ * emulation in lirc_dev?) -+ */ -+#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x00000019, uint32_t) -+/* -+ * spaces shorter than this are filtered out by hardware (software -+ * emulation in lirc_dev?) -+ */ -+#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001a, uint32_t) -+/* -+ * if filter cannot be set independantly for pulse/space, this should -+ * be used -+ */ -+#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001b, uint32_t) -+ -+/* -+ * to set a range use -+ * LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the -+ * lower bound first and later -+ * LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound -+ */ -+ -+#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, unsigned int) -+#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, unsigned int) -+ -+#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020) -+ -+/* -+ * from the next key press on the driver will send -+ * LIRC_MODE2_FREQUENCY packets -+ */ -+#define LIRC_MEASURE_CARRIER_ENABLE _IO('i', 0x00000021) -+#define LIRC_MEASURE_CARRIER_DISABLE _IO('i', 0x00000022) -+ -+#endif diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-321-linux_fix_SMC_instructions.patch b/packages/linux/patches/linux-2.6.35-ti.980.1r14-321-linux_fix_SMC_instructions.patch deleted file mode 100644 index 69b1de8ad4..0000000000 --- a/packages/linux/patches/linux-2.6.35-ti.980.1r14-321-linux_fix_SMC_instructions.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur linux-2.6.35-980.1release14/arch/arm/mach-omap2/Makefile linux-2.6.35-980.1release14a/arch/arm/mach-omap2/Makefile ---- linux-2.6.35-980.1release14/arch/arm/mach-omap2/Makefile 2011-01-19 11:27:25.000000000 +0100 -+++ linux-2.6.35-980.1release14a/arch/arm/mach-omap2/Makefile 2011-02-27 17:50:38.370778859 +0100 -@@ -29,7 +29,9 @@ - obj-$(CONFIG_ARCH_OMAP4) += omap44xx-smc.o omap4-common.o \ - omap4-wakeupgen.o - --AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a -+plus_sec := $(call as-instr,.arch_extension sec,+sec) -+AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec) -+AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) - - # Functions loaded to SRAM - obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o -@@ -63,6 +65,7 @@ - - AFLAGS_sleep24xx.o :=-Wa,-march=armv6 - AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a -+AFLAGS_sleep44xx.o :=-Wa,-march=armv7-a$(plus_sec) - - ifeq ($(CONFIG_PM_VERBOSE),y) - CFLAGS_pm_bus.o += -DDEBUG diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-000_crosscompile.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-000_crosscompile.patch deleted file mode 100644 index b4fc575828..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-000_crosscompile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200 -+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200 -@@ -29,7 +29,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -42,6 +41,11 @@ - #define DEFAULT_MAJOR_ROOT 0 - #define DEFAULT_MINOR_ROOT 0 - -+#undef major -+#define major(dev) ((int)(((dev) >> 8) & 0xff)) -+#undef minor -+#define minor(dev) ((int)((dev) & 0xff)) -+ - /* Minimal number of setup sectors */ - #define SETUP_SECT_MIN 5 - #define SETUP_SECT_MAX 64 diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-002_bash_only_feature.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-002_bash_only_feature.patch deleted file mode 100644 index a1028d15aa..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-002_bash_only_feature.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: linux-2.6.16/scripts/gen_initramfs_list.sh -=================================================================== ---- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100 -+++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100 -@@ -56,9 +56,7 @@ - - parse() { - local location="$1" -- local name="${location/${srcdir}//}" -- # change '//' into '/' -- name="${name//\/\///}" -+ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')" - local mode="$2" - local uid="$3" - local gid="$4" diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-003-no_dev_console.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-003-no_dev_console.patch deleted file mode 100644 index 9b5e51437d..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-003-no_dev_console.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c ---- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200 -+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200 -@@ -886,8 +886,14 @@ - do_basic_setup(); - - /* Open the /dev/console on the rootfs, this should never fail */ -- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) -- printk(KERN_WARNING "Warning: unable to open an initial console.\n"); -+ char *console = "/dev_console"; -+ -+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) { -+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1); -+ if (sys_open(console, O_RDWR, 0) < 0) -+ printk(KERN_WARNING "Warning: unable to open an initial console.\n"); -+ sys_unlink(console); -+ } - - (void) sys_dup(0); - (void) sys_dup(0); diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-004_lower_undefined_mode_timeout.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-004_lower_undefined_mode_timeout.patch deleted file mode 100644 index a0aca61d23..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-004_lower_undefined_mode_timeout.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c ---- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200 -+++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200 -@@ -92,7 +92,7 @@ - - int getchar_timeout(void) - { -- int cnt = 30; -+ int cnt = 3; - int t0, t1; - - t0 = gettime(); -diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c ---- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200 -+++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200 -@@ -329,7 +329,7 @@ - unsigned int sel; - - puts("Press to see video modes available, " -- " to continue, or wait 30 sec\n"); -+ " to continue, or wait 3 sec\n"); - - kbd_flush(); - while (1) { diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-005_kconfig_no_timestamp.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-005_kconfig_no_timestamp.patch deleted file mode 100644 index 332e553831..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-005_kconfig_no_timestamp.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux-2.6.16/scripts/kconfig/confdata.c -=================================================================== ---- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100 -@@ -340,7 +340,7 @@ - int type, l; - const char *str; - time_t now; -- int use_timestamp = 1; -+ int use_timestamp = 0; - char *env; - - dirname[0] = 0; diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-006_enable_utf8.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-006_enable_utf8.patch deleted file mode 100644 index bee1cf3da8..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-006_enable_utf8.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c ---- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200 -+++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200 -@@ -979,7 +979,8 @@ - } - opts->name_check = 'n'; - opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0; -- opts->utf8 = opts->unicode_xlate = 0; -+ opts->utf8 = 1; -+ opts->unicode_xlate = 0; - opts->numtail = 1; - opts->usefree = opts->nocase = 0; - opts->tz_utc = 0; -diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c ---- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200 -+++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200 -@@ -377,7 +377,7 @@ - popt->gid = 0; - popt->uid = 0; - popt->iocharset = NULL; -- popt->utf8 = 0; -+ popt->utf8 = 1; - popt->overriderockperm = 0; - popt->session=-1; - popt->sbsector=-1; diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-007_die_floppy_die.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-007_die_floppy_die.patch deleted file mode 100644 index 76db312182..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-007_die_floppy_die.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001 -From: Kyle McMartin -Date: Tue, 30 Mar 2010 00:04:29 -0400 -Subject: die-floppy-die - -Kill the floppy.ko pnp modalias. We were surviving just fine without -autoloading floppy drivers, tyvm. - -Please feel free to register all complaints in the wastepaper bin. ---- - drivers/block/floppy.c | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) - -diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c -index 90c4038..f4a0b90 100644 ---- a/drivers/block/floppy.c -+++ b/drivers/block/floppy.c -@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = { - {"PNP0700", 0}, - {} - }; -- --MODULE_DEVICE_TABLE(pnp, floppy_pnpids); -+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */ - - #else - --- -1.7.0.1 - diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-050_add_appleir_usb_driver.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-050_add_appleir_usb_driver.patch deleted file mode 100644 index 61edb8061e..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-050_add_appleir_usb_driver.patch +++ /dev/null @@ -1,702 +0,0 @@ -From e11e9e78799a7641fe0dc5289f35f2604a4b71a3 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Sun, 17 Jan 2010 00:40:15 +0000 -Subject: [PATCH] Input: add appleir USB driver - -This driver was originally written by James McKenzie, updated by -Greg Kroah-Hartman, further updated by myself, with suspend support -added. - -More recent versions of the IR receiver are also supported through -a patch by Alex Karpenko. The patch also adds support for the 2nd -and 5th generation of the controller, and the menu key on newer -brushed metal remotes. - -Tested on a MacbookAir1,1 - -Signed-off-by: Bastien Nocera ---- - Documentation/input/appleir.txt | 46 ++++ - drivers/hid/hid-apple.c | 4 - - drivers/hid/hid-core.c | 7 +- - drivers/hid/hid-ids.h | 5 +- - drivers/input/misc/Kconfig | 13 + - drivers/input/misc/Makefile | 1 + - drivers/input/misc/appleir.c | 519 +++++++++++++++++++++++++++++++++++++++ - 7 files changed, 588 insertions(+), 7 deletions(-) - create mode 100644 Documentation/input/appleir.txt - create mode 100644 drivers/input/misc/appleir.c - -diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt -new file mode 100644 -index 0000000..db637fb ---- /dev/null -+++ b/Documentation/input/appleir.txt -@@ -0,0 +1,46 @@ -+Apple IR receiver Driver (appleir) -+---------------------------------- -+ Copyright (C) 2009 Bastien Nocera -+ -+The appleir driver is a kernel input driver to handle Apple's IR -+receivers (and associated remotes) in the kernel. -+ -+The driver is an input driver which only handles "official" remotes -+as built and sold by Apple. -+ -+Authors -+------- -+ -+James McKenzie (original driver) -+Alex Karpenko (05ac:8242 support) -+Greg Kroah-Hartman (cleanups and original submission) -+Bastien Nocera (further cleanups, brushed metal "enter" -+button support and suspend support) -+ -+Supported hardware -+------------------ -+ -+- All Apple laptops and desktops from 2005 onwards, except: -+ - the unibody Macbook (2009) -+ - Mac Pro (all versions) -+- Apple TV (all revisions prior to September 2010) -+ -+The remote will only support the 6 (old white) or 7 (brushed metal) buttons -+of the remotes as sold by Apple. See the next section if you want to use -+other remotes or want to use lirc with the device instead of the kernel driver. -+ -+Using lirc (native) instead of the kernel driver -+------------------------------------------------ -+ -+First, you will need to disable the kernel driver for the receiver. -+ -+This can be achieved by passing quirks to the usbhid driver. -+The quirk line would be: -+usbhid.quirks=0x05ac:0x8242:0x40000010 -+ -+With 0x05ac being the vendor ID (Apple, you shouldn't need to change this) -+With 0x8242 being the product ID (check the output of lsusb for your hardware) -+And 0x10 being "HID_QUIRK_HIDDEV_FORCE" and 0x40000000 being "HID_QUIRK_NO_IGNORE" -+ -+This should force the creation of a hiddev device for the receiver, and -+make it usable under lirc. -diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c -index bba05d0..0059d5a 100644 ---- a/drivers/hid/hid-apple.c -+++ b/drivers/hid/hid-apple.c -@@ -361,10 +361,6 @@ static void apple_remove(struct hid_device *hdev) - } - - static const struct hid_device_id apple_devices[] = { -- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL), -- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT }, -- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4), -- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE), - .driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL }, - -diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c -index baa25ad..abc5bd7 100644 ---- a/drivers/hid/hid-core.c -+++ b/drivers/hid/hid-core.c -@@ -1244,8 +1244,6 @@ static const struct hid_device_id hid_blacklist[] = { - #if defined(CONFIG_HID_ACRUX_FF) || defined(CONFIG_HID_ACRUX_FF_MODULE) - { HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802) }, - #endif -- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) }, -- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) }, - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGICMOUSE) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) }, -@@ -1577,6 +1575,11 @@ static const struct hid_device_id hid_ignore_list[] = { - { HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) }, - { HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) }, - { HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, -+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) }, - { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM)}, - { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_LCM2)}, - { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) }, -diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h -index 11af537..360a5ca 100644 ---- a/drivers/hid/hid-ids.h -+++ b/drivers/hid/hid-ids.h -@@ -100,8 +100,11 @@ - #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b - #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a - #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b --#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241 -+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240 -+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440 -+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241 - #define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242 -+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243 - - #define USB_VENDOR_ID_ASUS 0x0486 - #define USB_DEVICE_ID_ASUS_T91MT 0x0185 -diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig -index 60de906..2f2f2e7 100644 ---- a/drivers/input/misc/Kconfig -+++ b/drivers/input/misc/Kconfig -@@ -209,6 +209,19 @@ config INPUT_KEYSPAN_REMOTE - To compile this driver as a module, choose M here: the module will - be called keyspan_remote. - -+config INPUT_APPLEIR -+ tristate "Apple infrared receiver (built in)" -+ depends on USB_ARCH_HAS_HCD -+ select USB -+ help -+ Say Y here if you want to use a Apple infrared remote control. All -+ the Apple computers from 2005 onwards include such a port, except -+ the unibody Macbook (2009), and Mac Pros. This receiver is also -+ used in the Apple TV set-top box prior to the 2010 model. -+ -+ To compile this driver as a module, choose M here: the module will -+ be called appleir. -+ - config INPUT_POWERMATE - tristate "Griffin PowerMate and Contour Jog support" - depends on USB_ARCH_HAS_HCD -diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile -index 1fe1f6c..d5ef2b9 100644 ---- a/drivers/input/misc/Makefile -+++ b/drivers/input/misc/Makefile -@@ -13,6 +13,7 @@ obj-$(CONFIG_INPUT_ADXL34X) += adxl34x.o - obj-$(CONFIG_INPUT_ADXL34X_I2C) += adxl34x-i2c.o - obj-$(CONFIG_INPUT_ADXL34X_SPI) += adxl34x-spi.o - obj-$(CONFIG_INPUT_APANEL) += apanel.o -+obj-$(CONFIG_INPUT_APPLEIR) += appleir.o - obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o - obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o - obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o -diff --git a/drivers/input/misc/appleir.c b/drivers/input/misc/appleir.c -new file mode 100644 -index 0000000..3817a3c ---- /dev/null -+++ b/drivers/input/misc/appleir.c -@@ -0,0 +1,519 @@ -+/* -+ * appleir: USB driver for the apple ir device -+ * -+ * Original driver written by James McKenzie -+ * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman -+ * -+ * Copyright (C) 2006 James McKenzie -+ * Copyright (C) 2008 Greg Kroah-Hartman -+ * Copyright (C) 2008 Novell Inc. -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the Free -+ * Software Foundation, version 2. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define DRIVER_VERSION "v1.2" -+#define DRIVER_AUTHOR "James McKenzie" -+#define DRIVER_DESC "Apple infrared receiver driver" -+#define DRIVER_LICENSE "GPL" -+ -+MODULE_AUTHOR(DRIVER_AUTHOR); -+MODULE_DESCRIPTION(DRIVER_DESC); -+MODULE_LICENSE(DRIVER_LICENSE); -+ -+#define USB_VENDOR_ID_APPLE 0x05ac -+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240 -+#define USB_DEVICE_ID_APPLE_IRCONTROL2 0x1440 -+#define USB_DEVICE_ID_APPLE_IRCONTROL3 0x8241 -+#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242 -+#define USB_DEVICE_ID_APPLE_IRCONTROL5 0x8243 -+ -+#define URB_SIZE 32 -+ -+#define MAX_KEYS 9 -+#define MAX_KEYS_MASK (MAX_KEYS - 1) -+ -+#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0) -+ -+static int debug; -+module_param(debug, int, 0644); -+MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); -+ -+/* I have two devices both of which report the following */ -+/* 25 87 ee 83 0a + */ -+/* 25 87 ee 83 0c - */ -+/* 25 87 ee 83 09 << */ -+/* 25 87 ee 83 06 >> */ -+/* 25 87 ee 83 05 >" */ -+/* 25 87 ee 83 03 menu */ -+/* 26 00 00 00 00 for key repeat*/ -+ -+/* Thomas Glanzmann reports the following responses */ -+/* 25 87 ee ca 0b + */ -+/* 25 87 ee ca 0d - */ -+/* 25 87 ee ca 08 << */ -+/* 25 87 ee ca 07 >> */ -+/* 25 87 ee ca 04 >" */ -+/* 25 87 ee ca 02 menu */ -+/* 26 00 00 00 00 for key repeat*/ -+/* He also observes the following event sometimes */ -+/* sent after a key is release, which I interpret */ -+/* as a flat battery message */ -+/* 25 87 e0 ca 06 flat battery */ -+ -+/* Alexandre Karpenko reports the following responses for Device ID 0x8242 */ -+/* 25 87 ee 47 0b + */ -+/* 25 87 ee 47 0d - */ -+/* 25 87 ee 47 08 << */ -+/* 25 87 ee 47 07 >> */ -+/* 25 87 ee 47 04 >" */ -+/* 25 87 ee 47 02 menu */ -+/* 26 87 ee 47 ** for key repeat (** is the code of the key being held) */ -+ -+/* Bastien Nocera's "new" remote */ -+/* 25 87 ee 91 5f followed by -+ * 25 87 ee 91 05 gives you >" -+ * -+ * 25 87 ee 91 5c followed by -+ * 25 87 ee 91 05 gives you the middle button */ -+ -+static const unsigned short appleir_key_table[] = { -+ KEY_RESERVED, -+ KEY_MENU, -+ KEY_PLAYPAUSE, -+ KEY_FORWARD, -+ KEY_BACK, -+ KEY_VOLUMEUP, -+ KEY_VOLUMEDOWN, -+ KEY_ENTER, -+ KEY_RESERVED, -+}; -+ -+struct appleir { -+ struct input_dev *input_dev; -+ unsigned short keymap[ARRAY_SIZE(appleir_key_table)]; -+ u8 *data; -+ dma_addr_t dma_buf; -+ struct usb_device *usbdev; -+ unsigned int flags; -+ struct urb *urb; -+ struct timer_list key_up_timer; -+ int current_key; -+ int prev_key_idx; -+ char phys[32]; -+}; -+ -+static DEFINE_MUTEX(appleir_mutex); -+ -+enum { -+ APPLEIR_OPENED = 0x1, -+ APPLEIR_SUSPENDED = 0x2, -+}; -+ -+static struct usb_device_id appleir_ids[] = { -+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) }, -+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL2) }, -+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL3) }, -+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) }, -+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL5) }, -+ {} -+}; -+MODULE_DEVICE_TABLE(usb, appleir_ids); -+ -+static void dump_packet(struct appleir *appleir, char *msg, u8 *data, int len) -+{ -+ int i; -+ -+ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len); -+ -+ for (i = 0; i < len; ++i) -+ printk(" %02x", data[i]); -+ printk(" (should be command %d)\n", (data[4] >> 1) & MAX_KEYS_MASK); -+} -+ -+static int get_key(int data) -+{ -+ switch (data) { -+ case 0x02: -+ case 0x03: -+ /* menu */ -+ return 1; -+ case 0x04: -+ case 0x05: -+ /* >" */ -+ return 2; -+ case 0x06: -+ case 0x07: -+ /* >> */ -+ return 3; -+ case 0x08: -+ case 0x09: -+ /* << */ -+ return 4; -+ case 0x0a: -+ case 0x0b: -+ /* + */ -+ return 5; -+ case 0x0c: -+ case 0x0d: -+ /* - */ -+ return 6; -+ case 0x5c: -+ /* Middle button, on newer remotes, -+ * part of a 2 packet-command */ -+ return -7; -+ default: -+ return -1; -+ } -+} -+ -+static void key_up(struct appleir *appleir, int key) -+{ -+ dbginfo(&appleir->input_dev->dev, "key %d up\n", key); -+ input_report_key(appleir->input_dev, key, 0); -+ input_sync(appleir->input_dev); -+} -+ -+static void key_down(struct appleir *appleir, int key) -+{ -+ dbginfo(&appleir->input_dev->dev, "key %d down\n", key); -+ input_report_key(appleir->input_dev, key, 1); -+ input_sync(appleir->input_dev); -+} -+ -+static void battery_flat(struct appleir *appleir) -+{ -+ dev_err(&appleir->input_dev->dev, "possible flat battery?\n"); -+} -+ -+static void key_up_tick(unsigned long data) -+{ -+ struct appleir *appleir = (struct appleir *)data; -+ -+ if (appleir->current_key) { -+ key_up(appleir, appleir->current_key); -+ appleir->current_key = 0; -+ } -+} -+ -+static void new_data(struct appleir *appleir, u8 *data, int len) -+{ -+ static const u8 keydown[] = { 0x25, 0x87, 0xee }; -+ static const u8 keyrepeat[] = { 0x26, }; -+ static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 }; -+ -+ if (debug) -+ dump_packet(appleir, "received", data, len); -+ -+ if (len != 5) -+ return; -+ -+ if (!memcmp(data, keydown, sizeof(keydown))) { -+ int index; -+ -+ /* If we already have a key down, take it up before marking -+ this one down */ -+ if (appleir->current_key) -+ key_up(appleir, appleir->current_key); -+ -+ /* Handle dual packet commands */ -+ if (appleir->prev_key_idx > 0) -+ index = appleir->prev_key_idx; -+ else -+ index = get_key(data[4]); -+ -+ if (index > 0) { -+ appleir->current_key = appleir->keymap[index]; -+ -+ key_down(appleir, appleir->current_key); -+ /* Remote doesn't do key up, either pull them up, in the test -+ above, or here set a timer which pulls them up after 1/8 s */ -+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8); -+ appleir->prev_key_idx = 0; -+ return; -+ } else if (index == -7) { -+ /* Remember key for next packet */ -+ appleir->prev_key_idx = 0 - index; -+ return; -+ } -+ } -+ -+ appleir->prev_key_idx = 0; -+ -+ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) { -+ key_down(appleir, appleir->current_key); -+ /* Remote doesn't do key up, either pull them up, in the test -+ above, or here set a timer which pulls them up after 1/8 s */ -+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8); -+ return; -+ } -+ -+ if (!memcmp(data, flatbattery, sizeof(flatbattery))) { -+ battery_flat(appleir); -+ /* Fall through */ -+ } -+ -+ dump_packet(appleir, "unknown packet", data, len); -+} -+ -+static void appleir_urb(struct urb *urb) -+{ -+ struct appleir *appleir = urb->context; -+ int status = urb->status; -+ int retval; -+ -+ switch (status) { -+ case 0: -+ new_data(appleir, urb->transfer_buffer, urb->actual_length); -+ break; -+ case -ECONNRESET: -+ case -ENOENT: -+ case -ESHUTDOWN: -+ /* This urb is terminated, clean up */ -+ dbginfo(&appleir->input_dev->dev, "%s - urb shutting down with status: %d", __func__, -+ urb->status); -+ return; -+ default: -+ dbginfo(&appleir->input_dev->dev, "%s - nonzero urb status received: %d", __func__, -+ urb->status); -+ } -+ -+ retval = usb_submit_urb(urb, GFP_ATOMIC); -+ if (retval) -+ err("%s - usb_submit_urb failed with result %d", __func__, -+ retval); -+} -+ -+static int appleir_open(struct input_dev *dev) -+{ -+ struct appleir *appleir = input_get_drvdata(dev); -+ struct usb_interface *intf = usb_ifnum_to_if(appleir->usbdev, 0); -+ int r; -+ -+ r = usb_autopm_get_interface(intf); -+ if (r) { -+ dev_err(&intf->dev, -+ "%s(): usb_autopm_get_interface() = %d\n", __func__, r); -+ return r; -+ } -+ -+ mutex_lock(&appleir_mutex); -+ -+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) { -+ r = -EIO; -+ goto fail; -+ } -+ -+ appleir->flags |= APPLEIR_OPENED; -+ -+ mutex_unlock(&appleir_mutex); -+ -+ usb_autopm_put_interface(intf); -+ -+ return 0; -+fail: -+ mutex_unlock(&appleir_mutex); -+ usb_autopm_put_interface(intf); -+ return r; -+} -+ -+static void appleir_close(struct input_dev *dev) -+{ -+ struct appleir *appleir = input_get_drvdata(dev); -+ -+ mutex_lock(&appleir_mutex); -+ -+ if (!(appleir->flags & APPLEIR_SUSPENDED)) { -+ usb_kill_urb(appleir->urb); -+ del_timer_sync(&appleir->key_up_timer); -+ } -+ -+ appleir->flags &= ~APPLEIR_OPENED; -+ -+ mutex_unlock(&appleir_mutex); -+} -+ -+static int appleir_probe(struct usb_interface *intf, -+ const struct usb_device_id *id) -+{ -+ struct usb_device *dev = interface_to_usbdev(intf); -+ struct usb_endpoint_descriptor *endpoint; -+ struct appleir *appleir = NULL; -+ struct input_dev *input_dev; -+ int retval = -ENOMEM; -+ int i; -+ -+ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL); -+ if (!appleir) -+ goto allocfail; -+ -+ appleir->data = usb_alloc_coherent(dev, URB_SIZE, GFP_KERNEL, -+ &appleir->dma_buf); -+ if (!appleir->data) -+ goto usbfail; -+ -+ appleir->urb = usb_alloc_urb(0, GFP_KERNEL); -+ if (!appleir->urb) -+ goto urbfail; -+ -+ appleir->usbdev = dev; -+ -+ input_dev = input_allocate_device(); -+ if (!input_dev) -+ goto inputfail; -+ -+ appleir->input_dev = input_dev; -+ -+ usb_make_path(dev, appleir->phys, sizeof(appleir->phys)); -+ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys)); -+ -+ input_dev->name = "Apple Infrared Remote Controller"; -+ input_dev->phys = appleir->phys; -+ usb_to_input_id(dev, &input_dev->id); -+ input_dev->dev.parent = &intf->dev; -+ input_dev->keycode = appleir->keymap; -+ input_dev->keycodesize = sizeof(unsigned short); -+ input_dev->keycodemax = ARRAY_SIZE(appleir->keymap); -+ -+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP); -+ -+ memcpy(appleir->keymap, appleir_key_table, sizeof(appleir->keymap)); -+ for (i = 0; i < ARRAY_SIZE(appleir_key_table); i++) -+ set_bit(appleir->keymap[i], input_dev->keybit); -+ clear_bit(KEY_RESERVED, input_dev->keybit); -+ -+ input_set_drvdata(input_dev, appleir); -+ input_dev->open = appleir_open; -+ input_dev->close = appleir_close; -+ -+ endpoint = &intf->cur_altsetting->endpoint[0].desc; -+ -+ usb_fill_int_urb(appleir->urb, dev, -+ usb_rcvintpipe(dev, endpoint->bEndpointAddress), -+ appleir->data, 8, -+ appleir_urb, appleir, endpoint->bInterval); -+ -+ appleir->urb->transfer_dma = appleir->dma_buf; -+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; -+ -+ setup_timer(&appleir->key_up_timer, -+ key_up_tick, (unsigned long) appleir); -+ -+ retval = input_register_device(appleir->input_dev); -+ if (retval) -+ goto inputfail; -+ -+ usb_set_intfdata(intf, appleir); -+ -+ return 0; -+ -+inputfail: -+ input_free_device(appleir->input_dev); -+ -+urbfail: -+ usb_free_urb(appleir->urb); -+ -+usbfail: -+ usb_free_coherent(dev, URB_SIZE, appleir->data, -+ appleir->dma_buf); -+ -+allocfail: -+ kfree(appleir); -+ -+ return retval; -+} -+ -+static void appleir_disconnect(struct usb_interface *intf) -+{ -+ struct appleir *appleir = usb_get_intfdata(intf); -+ -+ usb_set_intfdata(intf, NULL); -+ input_unregister_device(appleir->input_dev); -+ usb_free_urb(appleir->urb); -+ usb_free_coherent(interface_to_usbdev(intf), URB_SIZE, -+ appleir->data, appleir->dma_buf); -+ kfree(appleir); -+} -+ -+static int appleir_suspend(struct usb_interface *interface, -+ pm_message_t message) -+{ -+ struct appleir *appleir = usb_get_intfdata(interface); -+ -+ mutex_lock(&appleir_mutex); -+ if (appleir->flags & APPLEIR_OPENED) -+ usb_kill_urb(appleir->urb); -+ -+ appleir->flags |= APPLEIR_SUSPENDED; -+ -+ mutex_unlock(&appleir_mutex); -+ -+ return 0; -+} -+ -+static int appleir_resume(struct usb_interface *interface) -+{ -+ struct appleir *appleir; -+ int r = 0; -+ -+ appleir = usb_get_intfdata(interface); -+ -+ mutex_lock(&appleir_mutex); -+ if (appleir->flags & APPLEIR_OPENED) { -+ struct usb_endpoint_descriptor *endpoint; -+ -+ endpoint = &interface->cur_altsetting->endpoint[0].desc; -+ usb_fill_int_urb(appleir->urb, appleir->usbdev, -+ usb_rcvintpipe(appleir->usbdev, endpoint->bEndpointAddress), -+ appleir->data, 8, -+ appleir_urb, appleir, endpoint->bInterval); -+ appleir->urb->transfer_dma = appleir->dma_buf; -+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; -+ -+ /* And reset the USB device */ -+ if (usb_submit_urb(appleir->urb, GFP_ATOMIC)) -+ r = -EIO; -+ } -+ -+ appleir->flags &= ~APPLEIR_SUSPENDED; -+ -+ mutex_unlock(&appleir_mutex); -+ -+ return r; -+} -+ -+static struct usb_driver appleir_driver = { -+ .name = "appleir", -+ .probe = appleir_probe, -+ .disconnect = appleir_disconnect, -+ .suspend = appleir_suspend, -+ .resume = appleir_resume, -+ .reset_resume = appleir_resume, -+ .id_table = appleir_ids, -+}; -+ -+static int __init appleir_init(void) -+{ -+ return usb_register(&appleir_driver); -+} -+ -+static void __exit appleir_exit(void) -+{ -+ usb_deregister(&appleir_driver); -+} -+ -+module_init(appleir_init); -+module_exit(appleir_exit); --- -1.7.2.2 - diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-051_add_ite-cir_driver-0.1.patch b/packages/linux/patches/linux-2.6.38-ti-omap4-051_add_ite-cir_driver-0.1.patch deleted file mode 100644 index 338523f3d9..0000000000 --- a/packages/linux/patches/linux-2.6.38-ti-omap4-051_add_ite-cir_driver-0.1.patch +++ /dev/null @@ -1,2998 +0,0 @@ -diff -Naur linux-2.6.38-rc5/drivers/media/rc/ite-cir.c linux-2.6.38-rc5.patch/drivers/media/rc/ite-cir.c ---- linux-2.6.38-rc5/drivers/media/rc/ite-cir.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/media/rc/ite-cir.c 2011-02-22 03:19:26.753636264 +0100 -@@ -0,0 +1,1334 @@ -+/* -+ * Driver for ITE Tech Inc. IT8712F/IT8512 CIR -+ * -+ * Copyright (C) 2010 Juan J. Garcia de Soria -+ * -+ * Based on nuvoton-cir and lirc_it87 drivers. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+ * USA -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "ite-cir.h" -+ -+/* module parameters */ -+ -+/* debug level */ -+static int debug; -+module_param(debug, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Enable debugging output"); -+ -+/* low limit for RX carrier freq, Hz, 0 for no RX demodulation */ -+static int rx_low_carrier_freq; -+module_param(rx_low_carrier_freq, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(rx_low_carrier_freq, "Override low RX carrier frequency, Hz, \ -+0 for no RX demodulation"); -+ -+/* high limit for RX carrier freq, Hz, 0 for no RX demodulation */ -+static int rx_high_carrier_freq; -+module_param(rx_high_carrier_freq, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(rx_high_carrier_freq, "Override high RX carrier frequency, \ -+Hz, 0 for no RX demodulation"); -+ -+/* override tx carrier frequency */ -+static int tx_carrier_freq; -+module_param(tx_carrier_freq, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(tx_carrier_freq, "Override TX carrier frequency, Hz"); -+ -+/* override tx duty cycle */ -+static int tx_duty_cycle; -+module_param(tx_duty_cycle, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(tx_duty_cycle, "Override TX duty cycle, 1-100"); -+ -+/* override default sample period */ -+static long sample_period; -+module_param(sample_period, long, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(sample_period, "Override carrier sample period, \ -+us"); -+ -+/* override detected model id */ -+static int model_number = -1; -+module_param(model_number, int, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(model_number, "Use this model number, don't \ -+autodetect"); -+ -+ -+/* forward declaration */ -+static void ite_set_carrier_params(struct ite_dev *dev); -+ -+ -+/* IT8712F HW-specific functions */ -+ -+/* retrieve a bitmask of the current causes for a pending interrupt; this may -+ * be composed of ITE_IRQ_TX_FIFO, ITE_IRQ_RX_FIFO and ITE_IRQ_RX_FIFO_OVERRUN -+ * */ -+static int it87_get_irq_causes(struct ite_dev *dev) -+{ -+ u8 iflags; -+ int ret = 0; -+ -+ /* read the interrupt flags */ -+ iflags = inb(dev->cir_addr + IT87_IIR) & IT87_II; -+ -+ switch (iflags) { -+ case IT87_II_RXDS: -+ ret = ITE_IRQ_RX_FIFO; -+ break; -+ case IT87_II_RXFO: -+ ret = ITE_IRQ_RX_FIFO_OVERRUN; -+ break; -+ case IT87_II_TXLDL: -+ ret = ITE_IRQ_TX_FIFO; -+ break; -+ } -+ -+ return ret; -+} -+ -+/* set the carrier parameters; to be called with the spinlock held */ -+static void it87_set_carrier_params(struct ite_dev *dev, bool high_freq, -+ bool use_demodulator, u8 carrier_freq_bits, u8 allowance_bits, -+ u8 pulse_width_bits) -+{ -+ u8 val; -+ -+ /* program the RCR register */ -+ val = inb(dev->cir_addr + IT87_RCR) -+ & ~(IT87_HCFS | IT87_RXEND | IT87_RXDCR); -+ -+ if (high_freq) -+ val |= IT87_HCFS; -+ -+ if (use_demodulator) -+ val |= IT87_RXEND; -+ -+ val |= allowance_bits; -+ -+ outb(val, dev->cir_addr + IT87_RCR); -+ -+ /* program the TCR2 register */ -+ outb((carrier_freq_bits << IT87_CFQ_SHIFT) | pulse_width_bits, -+ dev->cir_addr + IT87_TCR2); -+} -+ -+/* read up to buf_size bytes from the RX FIFO; to be called with the spinlock -+ * held */ -+static int it87_get_rx_bytes(struct ite_dev *dev, u8 *buf, int buf_size) -+{ -+ int fifo, read = 0; -+ -+ /* read how many bytes are still in the FIFO */ -+ fifo = inb(dev->cir_addr + IT87_RSR) & IT87_RXBFC; -+ -+ while (fifo > 0 && buf_size > 0) { -+ *(buf++) = inb(dev->cir_addr + IT87_DR); -+ fifo--; -+ read++; -+ buf_size--; -+ } -+ -+ return read; -+} -+ -+/* return how many bytes we can send through the FIFO; this will be called -+ * with the device spinlock NOT HELD while waiting for the TX FIFO to get -+ * empty; let's expect this won't be a problem */ -+static int it87_get_tx_free_slots(struct ite_dev *dev) -+{ -+ return inb(dev->cir_addr + IT87_TSR) & IT87_TXBFC; -+} -+ -+/* put a byte to the TX fifo; this should be called with the spinlock held */ -+static void it87_put_tx_byte(struct ite_dev *dev, u8 value) -+{ -+ outb(value, dev->cir_addr + IT87_DR); -+} -+ -+/* idle the receiver so that we won't receive samples until another -+ pulse is detected; this must be called with the device spinlock held */ -+static void it87_idle_rx(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable streaming by clearing RXACT writing it as 1 */ -+ outb(inb(dev->cir_addr + IT87_RCR) | IT87_RXACT, -+ dev->cir_addr + IT87_RCR); -+ -+ /* clear the FIFO */ -+ outb(inb(dev->cir_addr + IT87_TCR1) | IT87_FIFOCLR, -+ dev->cir_addr + IT87_TCR1); -+} -+ -+/* disable the receiver; this must be called with the device spinlock held */ -+static void it87_disable_rx(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable the receiver interrupts */ -+ outb(inb(dev->cir_addr + IT87_IER) & ~(IT87_RDAIE | IT87_RFOIE), -+ dev->cir_addr + IT87_IER); -+ -+ /* disable the receiver */ -+ outb(inb(dev->cir_addr + IT87_RCR) & ~IT87_RXEN, -+ dev->cir_addr + IT87_RCR); -+ -+ /* clear the FIFO and RXACT (actually RXACT should have been cleared -+ * in the previous outb() call) */ -+ it87_idle_rx(dev); -+} -+ -+/* enable the receiver; this must be called with the device spinlock held */ -+static void it87_enable_rx(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* enable the receiver by setting RXEN */ -+ outb(inb(dev->cir_addr + IT87_RCR) | IT87_RXEN, -+ dev->cir_addr + IT87_RCR); -+ -+ /* just prepare it to idle for the next reception */ -+ it87_idle_rx(dev); -+ -+ /* enable the receiver interrupts and master enable flag */ -+ outb(inb(dev->cir_addr + IT87_IER) -+ | IT87_RDAIE | IT87_RFOIE | IT87_IEC, -+ dev->cir_addr + IT87_IER); -+} -+ -+/* disable the transmitter interrupt; this must be called with the device -+ * spinlock held */ -+static void it87_disable_tx_interrupt(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable the transmitter interrupts */ -+ outb(inb(dev->cir_addr + IT87_IER) & ~IT87_TLDLIE, -+ dev->cir_addr + IT87_IER); -+} -+ -+/* enable the transmitter interrupt; this must be called with the device -+ * spinlock held */ -+static void it87_enable_tx_interrupt(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* enable the transmitter interrupts and master enable flag */ -+ outb(inb(dev->cir_addr + IT87_IER) -+ | IT87_TLDLIE | IT87_IEC, -+ dev->cir_addr + IT87_IER); -+} -+ -+/* disable the device; this must be called with the device spinlock held */ -+static void it87_disable(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* clear out all interrupt enable flags */ -+ outb(inb(dev->cir_addr + IT87_IER) & ~(IT87_IEC | IT87_RFOIE | -+ IT87_RDAIE | IT87_TLDLIE), dev->cir_addr + IT87_IER); -+ -+ /* disable the receiver */ -+ it87_disable_rx(dev); -+ -+ /* erase the FIFO */ -+ outb(IT87_FIFOCLR | inb(dev->cir_addr + IT87_TCR1), -+ dev->cir_addr + IT87_TCR1); -+} -+ -+/* initialize the hardware */ -+static void it87_init_hardware(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* enable just the baud rate divisor register, -+ disabling all the interrupts at the same time */ -+ outb((inb(dev->cir_addr + IT87_IER) & ~(IT87_IEC | IT87_RFOIE | -+ IT87_RDAIE | IT87_TLDLIE)) | IT87_BR, -+ dev->cir_addr + IT87_IER); -+ -+ /* write out the baud rate divisor */ -+ outb(ITE_BAUDRATE_DIVISOR & 0xff, dev->cir_addr + IT87_BDLR); -+ outb((ITE_BAUDRATE_DIVISOR >> 8) & 0xff, dev->cir_addr + IT87_BDHR); -+ -+ /* disable the baud rate divisor register again */ -+ outb(inb(dev->cir_addr + IT87_IER) & ~IT87_BR, -+ dev->cir_addr + IT87_IER); -+ -+ /* program the RCR register defaults */ -+ outb(ITE_RXDCR_DEFAULT, dev->cir_addr + IT87_RCR); -+ -+ /* program the TCR1 register */ -+ outb(IT87_TXMPM_DEFAULT -+ | IT87_TXENDF -+ | IT87_TXRLE -+ | IT87_FIFOTL_DEFAULT -+ | IT87_FIFOCLR, dev->cir_addr + IT87_TCR1); -+ -+ /* program the carrier parameters */ -+ ite_set_carrier_params(dev); -+} -+ -+/* IT8512F on ITE8708 HW-specific functions */ -+ -+/* retrieve a bitmask of the current causes for a pending interrupt; this may -+ * be composed of ITE_IRQ_TX_FIFO, ITE_IRQ_RX_FIFO and ITE_IRQ_RX_FIFO_OVERRUN -+ * */ -+static int it8708_get_irq_causes(struct ite_dev *dev) -+{ -+ u8 iflags; -+ int ret = 0; -+ -+ /* read the interrupt flags */ -+ iflags = inb(dev->cir_addr + IT8708_C0IIR); -+ -+ if (iflags & IT85_TLDLI) -+ ret |= ITE_IRQ_TX_FIFO; -+ if (iflags & IT85_RDAI) -+ ret |= ITE_IRQ_RX_FIFO; -+ if (iflags & IT85_RFOI) -+ ret |= ITE_IRQ_RX_FIFO_OVERRUN; -+ -+ return ret; -+} -+ -+/* set the carrier parameters; to be called with the spinlock held */ -+static void it8708_set_carrier_params(struct ite_dev *dev, bool high_freq, -+ bool use_demodulator, u8 carrier_freq_bits, u8 allowance_bits, -+ u8 pulse_width_bits) -+{ -+ u8 val; -+ -+ /* program the C0CFR register, with HRAE=1 */ -+ outb(inb(dev->cir_addr + IT8708_BANKSEL) | IT8708_HRAE, dev->cir_addr -+ + IT8708_BANKSEL); -+ -+ val = (inb(dev->cir_addr + IT8708_C0CFR) -+ & ~(IT85_HCFS | IT85_CFQ)) | carrier_freq_bits; -+ -+ if (high_freq) -+ val |= IT85_HCFS; -+ -+ outb(val, dev->cir_addr + IT8708_C0CFR); -+ -+ outb(inb(dev->cir_addr + IT8708_BANKSEL) & ~IT8708_HRAE, dev->cir_addr -+ + IT8708_BANKSEL); -+ -+ /* program the C0RCR register */ -+ val = inb(dev->cir_addr + IT8708_C0RCR) -+ & ~(IT85_RXEND | IT85_RXDCR); -+ -+ if (use_demodulator) -+ val |= IT85_RXEND; -+ -+ val |= allowance_bits; -+ -+ outb(val, dev->cir_addr + IT8708_C0RCR); -+ -+ /* program the C0TCR register */ -+ val = inb(dev->cir_addr + IT8708_C0TCR) & ~IT85_TXMPW; -+ val |= pulse_width_bits; -+ outb(val, dev->cir_addr + IT8708_C0TCR); -+} -+ -+/* read up to buf_size bytes from the RX FIFO; to be called with the spinlock -+ * held */ -+static int it8708_get_rx_bytes(struct ite_dev *dev, u8 *buf, int buf_size) -+{ -+ int fifo, read = 0; -+ -+ /* read how many bytes are still in the FIFO */ -+ fifo = inb(dev->cir_addr + IT8708_C0RFSR) & IT85_RXFBC; -+ -+ while (fifo > 0 && buf_size > 0) { -+ *(buf++) = inb(dev->cir_addr + IT8708_C0DR); -+ fifo--; -+ read++; -+ buf_size--; -+ } -+ -+ return read; -+} -+ -+/* return how many bytes we can send through the FIFO; this will be called -+ * with the device spinlock NOT HELD while waiting for the TX FIFO to get -+ * empty; let's expect this won't be a problem */ -+static int it8708_get_tx_free_slots(struct ite_dev *dev) -+{ -+ return inb(dev->cir_addr + IT8708_C0TFSR) & IT85_TXFBC; -+} -+ -+/* put a byte to the TX fifo; this should be called with the spinlock held */ -+static void it8708_put_tx_byte(struct ite_dev *dev, u8 value) -+{ -+ outb(value, dev->cir_addr + IT8708_C0DR); -+} -+ -+/* idle the receiver so that we won't receive samples until another -+ pulse is detected; this must be called with the device spinlock held */ -+static void it8708_idle_rx(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable streaming by clearing RXACT writing it as 1 */ -+ outb(inb(dev->cir_addr + IT8708_C0RCR) | IT85_RXACT, -+ dev->cir_addr + IT8708_C0RCR); -+ -+ /* clear the FIFO */ -+ outb(inb(dev->cir_addr + IT8708_C0MSTCR) | IT85_FIFOCLR, -+ dev->cir_addr + IT8708_C0MSTCR); -+} -+ -+/* disable the receiver; this must be called with the device spinlock held */ -+static void it8708_disable_rx(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable the receiver interrupts */ -+ outb(inb(dev->cir_addr + IT8708_C0IER) & ~(IT85_RDAIE | IT85_RFOIE), -+ dev->cir_addr + IT8708_C0IER); -+ -+ /* disable the receiver */ -+ outb(inb(dev->cir_addr + IT8708_C0RCR) & ~IT85_RXEN, -+ dev->cir_addr + IT8708_C0RCR); -+ -+ /* clear the FIFO and RXACT (actually RXACT should have been cleared -+ * in the previous outb() call) */ -+ it8708_idle_rx(dev); -+} -+ -+/* enable the receiver; this must be called with the device spinlock held */ -+static void it8708_enable_rx(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* enable the receiver by setting RXEN */ -+ outb(inb(dev->cir_addr + IT8708_C0RCR) | IT85_RXEN, -+ dev->cir_addr + IT8708_C0RCR); -+ -+ /* just prepare it to idle for the next reception */ -+ it8708_idle_rx(dev); -+ -+ /* enable the receiver interrupts and master enable flag */ -+ outb(inb(dev->cir_addr + IT8708_C0IER) -+ | IT85_RDAIE | IT85_RFOIE | IT85_IEC, -+ dev->cir_addr + IT8708_C0IER); -+} -+ -+/* disable the transmitter interrupt; this must be called with the device -+ * spinlock held */ -+static void it8708_disable_tx_interrupt(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable the transmitter interrupts */ -+ outb(inb(dev->cir_addr + IT8708_C0IER) & ~IT85_TLDLIE, -+ dev->cir_addr + IT8708_C0IER); -+} -+ -+/* enable the transmitter interrupt; this must be called with the device -+ * spinlock held */ -+static void it8708_enable_tx_interrupt(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* enable the transmitter interrupts and master enable flag */ -+ outb(inb(dev->cir_addr + IT8708_C0IER) -+ | IT85_TLDLIE | IT85_IEC, -+ dev->cir_addr + IT8708_C0IER); -+} -+ -+/* disable the device; this must be called with the device spinlock held */ -+static void it8708_disable(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* clear out all interrupt enable flags */ -+ outb(inb(dev->cir_addr + IT8708_C0IER) & ~(IT85_IEC | IT85_RFOIE | -+ IT85_RDAIE | IT85_TLDLIE), dev->cir_addr + IT8708_C0IER); -+ -+ /* disable the receiver */ -+ it8708_disable_rx(dev); -+ -+ /* erase the FIFO */ -+ outb(IT85_FIFOCLR | inb(dev->cir_addr + IT8708_C0MSTCR), -+ dev->cir_addr + IT8708_C0MSTCR); -+} -+ -+/* initialize the hardware */ -+static void it8708_init_hardware(struct ite_dev *dev) -+{ -+ ite_dbg("%s called", __func__); -+ -+ /* disable all the interrupts */ -+ outb(inb(dev->cir_addr + IT8708_C0IER) & ~(IT85_IEC | IT85_RFOIE | -+ IT85_RDAIE | IT85_TLDLIE), dev->cir_addr + IT8708_C0IER); -+ -+ /* program the baud rate divisor */ -+ outb(inb(dev->cir_addr + IT8708_BANKSEL) | IT8708_HRAE, dev->cir_addr -+ + IT8708_BANKSEL); -+ -+ outb(ITE_BAUDRATE_DIVISOR & 0xff, dev->cir_addr + IT8708_C0BDLR); -+ outb((ITE_BAUDRATE_DIVISOR >> 8) & 0xff, -+ dev->cir_addr + IT8708_C0BDHR); -+ -+ outb(inb(dev->cir_addr + IT8708_BANKSEL) & ~IT8708_HRAE, dev->cir_addr -+ + IT8708_BANKSEL); -+ -+ -+ /* program the C0MSTCR register defaults */ -+ outb((inb(dev->cir_addr + IT8708_C0MSTCR) & ~(IT85_ILSEL | IT85_ILE | -+ IT85_FIFOTL | IT85_FIFOCLR | IT85_RESET)) | -+ IT85_FIFOTL_DEFAULT, dev->cir_addr + IT8708_C0MSTCR); -+ -+ /* program the C0RCR register defaults */ -+ outb((inb(dev->cir_addr + IT8708_C0RCR) & ~(IT85_RXEN | IT85_RDWOS | -+ IT85_RXEND | IT85_RXACT | IT85_RXDCR)) | -+ ITE_RXDCR_DEFAULT, dev->cir_addr + IT8708_C0RCR); -+ -+ /* program the C0TCR register defaults */ -+ outb((inb(dev->cir_addr + IT8708_C0TCR) & ~(IT85_TXMPM | IT85_TXMPW)) -+ | IT85_TXRLE | IT85_TXENDF | IT85_TXMPM_DEFAULT | -+ IT85_TXMPW_DEFAULT, dev->cir_addr + IT8708_C0TCR); -+ -+ /* program the carrier parameters */ -+ ite_set_carrier_params(dev); -+} -+ -+ -+ -+ -+/* supported models and their parameters */ -+static const struct ite_dev_params ite_dev_descs[] = { -+ { /* 0: ITE8704, ITE8713 */ -+ .model = "ITE8704/ITE8713 CIR transceiver", -+ .io_region_size = IT87_IOREG_LENGTH, -+ .hw_tx_capable = true, -+ .sample_period = (u32)(1000000000ULL / 115200), -+ .tx_carrier_freq = 38000, -+ .tx_duty_cycle = 33, -+ .rx_low_carrier_freq = 0, -+ .rx_high_carrier_freq = 0, -+ -+ /* operations */ -+ .get_irq_causes = it87_get_irq_causes, -+ .enable_rx = it87_enable_rx, -+ .idle_rx = it87_idle_rx, -+ .disable_rx = it87_idle_rx, -+ .get_rx_bytes = it87_get_rx_bytes, -+ .enable_tx_interrupt = it87_enable_tx_interrupt, -+ .disable_tx_interrupt = it87_disable_tx_interrupt, -+ .get_tx_free_slots = it87_get_tx_free_slots, -+ .put_tx_byte = it87_put_tx_byte, -+ .disable = it87_disable, -+ .init_hardware = it87_init_hardware, -+ .set_carrier_params = it87_set_carrier_params, -+ }, -+ { /* 1: ITE8708 */ -+ .model = "ITE8708 CIR transceiver", -+ .io_region_size = IT8708_IOREG_LENGTH, -+ .hw_tx_capable = true, -+ .sample_period = (u32)(1000000000ULL / 115200), -+ .tx_carrier_freq = 38000, -+ .tx_duty_cycle = 33, -+ .rx_low_carrier_freq = 0, -+ .rx_high_carrier_freq = 0, -+ -+ /* operations */ -+ .get_irq_causes = it8708_get_irq_causes, -+ .enable_rx = it8708_enable_rx, -+ .idle_rx = it8708_idle_rx, -+ .disable_rx = it8708_idle_rx, -+ .get_rx_bytes = it8708_get_rx_bytes, -+ .enable_tx_interrupt = it8708_enable_tx_interrupt, -+ .disable_tx_interrupt = it8708_disable_tx_interrupt, -+ .get_tx_free_slots = it8708_get_tx_free_slots, -+ .put_tx_byte = it8708_put_tx_byte, -+ .disable = it8708_disable, -+ .init_hardware = it8708_init_hardware, -+ .set_carrier_params = it8708_set_carrier_params, -+ }, -+}; -+ -+/* HW-independent code functions */ -+ -+/* check whether carrier frequency is high frequency */ -+static inline bool ite_is_high_carrier_freq(unsigned int freq) -+{ -+ return freq >= ITE_HCF_MIN_CARRIER_FREQ; -+} -+ -+/* get the bits required to program the carrier frequency in CFQ bits, -+ * unshifted */ -+static u8 ite_get_carrier_freq_bits(unsigned int freq) -+{ -+ if (ite_is_high_carrier_freq(freq)) { -+ if (freq < 425000) -+ return ITE_CFQ_400; -+ else if (freq < 465000) -+ return ITE_CFQ_450; -+ else if (freq < 490000) -+ return ITE_CFQ_480; -+ else -+ return ITE_CFQ_500; -+ } else { -+ /* trim to limits */ -+ if (freq < ITE_LCF_MIN_CARRIER_FREQ) -+ freq = ITE_LCF_MIN_CARRIER_FREQ; -+ if (freq > ITE_LCF_MAX_CARRIER_FREQ) -+ freq = ITE_LCF_MAX_CARRIER_FREQ; -+ -+ /* convert to kHz and subtract the base freq */ -+ freq = DIV_ROUND_CLOSEST(freq - ITE_LCF_MIN_CARRIER_FREQ, -+ 1000); -+ -+ return (u8) freq; -+ } -+} -+ -+/* get the bits required to program the pulse with in TXMPW */ -+static u8 ite_get_pulse_width_bits(unsigned int freq, int duty_cycle) -+{ -+ unsigned long period_ns, on_ns; -+ -+ /* sanitize freq into range */ -+ if (freq < ITE_LCF_MIN_CARRIER_FREQ) -+ freq = ITE_LCF_MIN_CARRIER_FREQ; -+ if (freq > ITE_HCF_MAX_CARRIER_FREQ) -+ freq = ITE_HCF_MAX_CARRIER_FREQ; -+ -+ period_ns = 1000000000UL / freq; -+ on_ns = period_ns * duty_cycle / 100; -+ -+ if (ite_is_high_carrier_freq(freq)) { -+ if (on_ns < 750) -+ return ITE_TXMPW_A; -+ else if (on_ns < 850) -+ return ITE_TXMPW_B; -+ else if (on_ns < 950) -+ return ITE_TXMPW_C; -+ else if (on_ns < 1080) -+ return ITE_TXMPW_D; -+ else -+ return ITE_TXMPW_E; -+ } else { -+ if (on_ns < 6500) -+ return ITE_TXMPW_A; -+ else if (on_ns < 7850) -+ return ITE_TXMPW_B; -+ else if (on_ns < 9650) -+ return ITE_TXMPW_C; -+ else if (on_ns < 11950) -+ return ITE_TXMPW_D; -+ else -+ return ITE_TXMPW_E; -+ } -+} -+ -+/* set all the rx/tx carrier parameters; this must be called with the device -+ * spinlock held */ -+static void ite_set_carrier_params(struct ite_dev *dev) -+{ -+ unsigned int freq, low_freq, high_freq; -+ int allowance; -+ bool use_demodulator; -+ bool for_tx = dev->transmitting; -+ -+ ite_dbg("%s called", __func__); -+ -+ if (for_tx) { -+ /* we don't need no stinking calculations */ -+ freq = dev->params.tx_carrier_freq; -+ allowance = ITE_RXDCR_DEFAULT; -+ use_demodulator = false; -+ } else { -+ low_freq = dev->params.rx_low_carrier_freq; -+ high_freq = dev->params.rx_high_carrier_freq; -+ -+ if (low_freq == 0) { -+ /* don't demodulate */ -+ freq = ITE_DEFAULT_CARRIER_FREQ; -+ allowance = ITE_RXDCR_DEFAULT; -+ use_demodulator = false; -+ } else { -+ /* calculate the middle freq */ -+ freq = (low_freq + high_freq) / 2; -+ -+ /* calculate the allowance */ -+ allowance = DIV_ROUND_CLOSEST( -+ 10000 * (high_freq - low_freq), -+ ITE_RXDCR_PER_10000_STEP * -+ (high_freq + low_freq)); -+ -+ if (allowance < 1) -+ allowance = 1; -+ if (allowance > ITE_RXDCR_MAX) -+ allowance = ITE_RXDCR_MAX; -+ } -+ } -+ -+ /* set the carrier parameters in a device-dependent way */ -+ dev->params.set_carrier_params(dev, ite_is_high_carrier_freq(freq), -+ use_demodulator, ite_get_carrier_freq_bits(freq), allowance, -+ ite_get_pulse_width_bits(freq, dev->params.tx_duty_cycle)); -+} -+ -+/* decode raw bytes as received by the hardware, and push them to the ir-core -+ * layer */ -+static void ite_decode_bytes(struct ite_dev *dev, const u8 *data, int -+ length) -+{ -+ u32 sample_period; -+ unsigned long *ldata; -+ unsigned int next_one, next_zero, size; -+ DEFINE_IR_RAW_EVENT(ev); -+ -+ if (length == 0) -+ return; -+ -+ sample_period = dev->params.sample_period; -+ ldata = (unsigned long *) data; -+ size = length << 3; -+ next_one = generic_find_next_le_bit(ldata, size, 0); -+ if (next_one > 0) { -+ ev.pulse = true; -+ ev.duration = ITE_BITS_TO_NS(next_one, sample_period); -+ ir_raw_event_store_with_filter(dev->rdev, &ev); -+ } -+ -+ while (next_one < size) { -+ next_zero = generic_find_next_zero_le_bit(ldata, -+ size, next_one + 1); -+ ev.pulse = false; -+ ev.duration = ITE_BITS_TO_NS(next_zero - next_one, -+ sample_period); -+ ir_raw_event_store_with_filter(dev->rdev, &ev); -+ -+ if (next_zero < size) { -+ next_one = generic_find_next_le_bit(ldata, -+ size, next_zero + 1); -+ ev.pulse = true; -+ ev.duration = ITE_BITS_TO_NS(next_one - next_zero, -+ sample_period); -+ ir_raw_event_store_with_filter(dev->rdev, &ev); -+ } else -+ next_one = size; -+ } -+ -+ ir_raw_event_handle(dev->rdev); -+ -+ ite_dbg_verbose("decoded %d bytes.", length); -+} -+ -+/* interrupt service routine for incoming and outgoing CIR data */ -+static irqreturn_t ite_cir_isr(int irq, void *data) -+{ -+ struct ite_dev *dev = data; -+ unsigned long flags; -+ irqreturn_t ret = IRQ_RETVAL(IRQ_NONE); -+ u8 rx_buf[ITE_RX_FIFO_LEN]; -+ int rx_bytes; -+ int iflags; -+ -+ ite_dbg_verbose("%s firing", __func__); -+ -+ /* grab the spinlock */ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* read the interrupt flags */ -+ iflags = dev->params.get_irq_causes(dev); -+ -+ /* check for the receive interrupt */ -+ if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) { -+ /* read the FIFO bytes */ -+ rx_bytes = dev->params.get_rx_bytes(dev, rx_buf, -+ ITE_RX_FIFO_LEN); -+ -+ if (rx_bytes > 0) { -+ /* drop the spinlock, since the ir-core layer -+ * may call us back again through -+ * ite_s_idle() */ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ /* decode the data we've just received */ -+ ite_decode_bytes(dev, rx_buf, rx_bytes); -+ -+ /* reacquire the spinlock */ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* mark the interrupt as serviced */ -+ ret = IRQ_RETVAL(IRQ_HANDLED); -+ } -+ } else if (iflags & ITE_IRQ_TX_FIFO) { -+ /* FIFO space available interrupt */ -+ ite_dbg_verbose("got interrupt for TX FIFO"); -+ -+ /* wake any sleeping transmitter */ -+ wake_up_interruptible(&dev->tx_queue); -+ -+ /* mark the interrupt as serviced */ -+ ret = IRQ_RETVAL(IRQ_HANDLED); -+ } -+ -+ /* drop the spinlock */ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ ite_dbg_verbose("%s done returning %d", __func__, (int) ret); -+ -+ return ret; -+} -+ -+ -+/* set the rx carrier freq range, guess it's in Hz... */ -+static int ite_set_rx_carrier_range(struct rc_dev *rcdev, u32 carrier_low, u32 -+ carrier_high) -+{ -+ unsigned long flags; -+ struct ite_dev *dev = rcdev->priv; -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ dev->params.rx_low_carrier_freq = carrier_low; -+ dev->params.rx_high_carrier_freq = carrier_high; -+ ite_set_carrier_params(dev); -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return 0; -+} -+ -+ -+/* set the tx carrier freq, guess it's in Hz... */ -+static int ite_set_tx_carrier(struct rc_dev *rcdev, u32 carrier) -+{ -+ unsigned long flags; -+ struct ite_dev *dev = rcdev->priv; -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ dev->params.tx_carrier_freq = carrier; -+ ite_set_carrier_params(dev); -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return 0; -+} -+ -+/* set the tx duty cycle by controlling the pulse width */ -+static int ite_set_tx_duty_cycle(struct rc_dev *rcdev, u32 duty_cycle) -+{ -+ unsigned long flags; -+ struct ite_dev *dev = rcdev->priv; -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ dev->params.tx_duty_cycle = duty_cycle; -+ ite_set_carrier_params(dev); -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return 0; -+} -+ -+/* transmit out IR pulses; what you get here is a batch of alternating -+ * pulse/space/pulse/space lengths that we should write out completely through -+ * the FIFO, blocking on a full FIFO */ -+static int ite_tx_ir(struct rc_dev *rcdev, int *txbuf, u32 n) -+{ -+ unsigned long flags; -+ struct ite_dev *dev = rcdev->priv; -+ bool is_pulse = false; -+ int remaining_us, fifo_avail, fifo_remaining, last_idx = 0; -+ int max_rle_us, next_rle_us; -+ int ret = n; -+ u8 last_sent[ITE_TX_FIFO_LEN]; -+ u8 val; -+ -+ ite_dbg("%s called", __func__); -+ -+ /* clear the array just in case */ -+ memset(last_sent, 0, ARRAY_SIZE(last_sent)); -+ -+ /* n comes in bytes; convert to ints */ -+ n /= sizeof(int); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* let everybody know we're now transmitting */ -+ dev->transmitting = true; -+ -+ /* and set the carrier values for transmission */ -+ ite_set_carrier_params(dev); -+ -+ /* calculate how much time we can send in one byte */ -+ max_rle_us = (ITE_BAUDRATE_DIVISOR * dev->params.sample_period * -+ ITE_TX_MAX_RLE) / 1000; -+ -+ /* disable the receiver */ -+ dev->params.disable_rx(dev); -+ -+ /* this is where we'll begin filling in the FIFO, until it's full. -+ * then we'll just activate the interrupt, wait for it to wake us up -+ * again, disable it, continue filling the FIFO... until everything -+ * has been pushed out */ -+ fifo_avail = dev->params.get_tx_free_slots(dev); -+ -+ while (n > 0 && dev->in_use) { -+ /* transmit the next sample */ -+ is_pulse = !is_pulse; -+ remaining_us = *(txbuf++); -+ n--; -+ -+ /* repeat while the pulse is non-zero length */ -+ while (remaining_us > 0 && dev->in_use) { -+ if (remaining_us > max_rle_us) -+ next_rle_us = max_rle_us; -+ else -+ next_rle_us = remaining_us; -+ remaining_us -= next_rle_us; -+ -+ /* check what's the length we have to pump out */ -+ val = (ITE_TX_MAX_RLE * next_rle_us) / max_rle_us; -+ -+ /* put it into the sent buffer */ -+ last_sent[last_idx++] = val; -+ last_idx &= (ITE_TX_FIFO_LEN); -+ -+ /* encode it for 7 bits */ -+ val = (val - 1) & ITE_TX_RLE_MASK; -+ -+ /* take into account pulse/space prefix */ -+ if (is_pulse) -+ val |= ITE_TX_PULSE; -+ else -+ val |= ITE_TX_SPACE; -+ -+ /* if we get to 0 available, read again, just in case -+ * some other slot got freed */ -+ if (fifo_avail <= 0) { -+ fifo_avail = -+ dev->params.get_tx_free_slots(dev); -+ } -+ -+ /* if it's still full */ -+ if (fifo_avail <= 0) { -+ /* enable the tx interrupt */ -+ dev->params.enable_tx_interrupt(dev); -+ -+ /* drop the spinlock */ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ /* wait for the FIFO to empty enough */ -+ wait_event_interruptible(dev->tx_queue, -+ (fifo_avail = -+ dev->params.get_tx_free_slots(dev)) -+ >= 8); -+ -+ /* get the spinlock again */ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* disable the tx interrupt again. */ -+ dev->params.disable_tx_interrupt(dev); -+ } -+ -+ /* now send the byte through the FIFO */ -+ dev->params.put_tx_byte(dev, val); -+ fifo_avail--; -+ } -+ } -+ -+ /* wait and don't return until the whole FIFO has been sent out; -+ * otherwise we could configure the RX carrier params instead of the -+ * TX ones while the transmission is still being performed! */ -+ fifo_remaining = ITE_TX_FIFO_LEN - -+ dev->params.get_tx_free_slots(dev); -+ remaining_us = 0; -+ while (fifo_remaining > 0) { -+ fifo_remaining--; -+ last_idx--; -+ last_idx &= (ITE_TX_FIFO_LEN - 1); -+ remaining_us += last_sent[last_idx]; -+ } -+ remaining_us = (remaining_us * max_rle_us) / (ITE_TX_MAX_RLE); -+ -+ /* drop the spinlock while we sleep */ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ /* sleep remaining_us microseconds */ -+ mdelay(DIV_ROUND_UP(remaining_us, 1000)); -+ -+ /* reacquire the spinlock */ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* now we're not transmitting anymore */ -+ dev->transmitting = false; -+ -+ /* and set the carrier values for reception */ -+ ite_set_carrier_params(dev); -+ -+ /* reenable the receiver */ -+ if (dev->in_use) -+ dev->params.enable_rx(dev); -+ -+ /* notify transmission end */ -+ wake_up_interruptible(&dev->tx_ended); -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return ret; -+} -+ -+/* idle the receiver if needed */ -+static void ite_s_idle(struct rc_dev *rcdev, bool enable) -+{ -+ unsigned long flags; -+ struct ite_dev *dev = rcdev->priv; -+ -+ ite_dbg("%s called", __func__); -+ -+ if (enable) { -+ spin_lock_irqsave(&dev->lock, flags); -+ dev->params.idle_rx(dev); -+ spin_unlock_irqrestore(&dev->lock, flags); -+ } -+} -+ -+/* activate the device for use */ -+static int ite_open(struct rc_dev *rcdev) -+{ -+ struct ite_dev *dev = rcdev->priv; -+ unsigned long flags; -+ -+ ite_dbg("%s called", __func__); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ dev->in_use = true; -+ -+ /* enable the receiver */ -+ dev->params.enable_rx(dev); -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return 0; -+} -+ -+/* deactivate the device for use */ -+static void ite_close(struct rc_dev *rcdev) -+{ -+ struct ite_dev *dev = rcdev->priv; -+ unsigned long flags; -+ -+ ite_dbg("%s called", __func__); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ dev->in_use = false; -+ -+ /* wait for any transmission to end */ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ wait_event_interruptible(dev->tx_ended, !dev->transmitting); -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ dev->params.disable(dev); -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+} -+ -+/* allocate memory, probe hardware, and initialize everything */ -+static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_id -+ *dev_id) -+{ -+ const struct ite_dev_params *dev_desc = NULL; -+ struct ite_dev *itdev = NULL; -+ struct rc_dev *rdev = NULL; -+ int ret = -ENOMEM; -+ int model_no; -+ -+ ite_dbg("%s called", __func__); -+ -+ itdev = kzalloc(sizeof(struct ite_dev), GFP_KERNEL); -+ if (!itdev) -+ return ret; -+ -+ /* input device for IR remote (and tx) */ -+ rdev = rc_allocate_device(); -+ if (!rdev) -+ goto failure; -+ -+ ret = -ENODEV; -+ -+ -+ /* get the model number */ -+ model_no = (int) dev_id->driver_data; -+ ite_pr(KERN_NOTICE, "Auto-detected model: %s\n", -+ ite_dev_descs[model_no].model); -+ -+ if (model_number >= 0 && model_number -+ < ARRAY_SIZE(ite_dev_descs)) { -+ model_no = model_number; -+ ite_pr(KERN_NOTICE, "The model has been fixed by a module \ -+parameter."); -+ } -+ -+ ite_pr(KERN_NOTICE, "Using model: %s\n", -+ ite_dev_descs[model_no].model); -+ -+ /* get the description for the device */ -+ dev_desc = &ite_dev_descs[model_no]; -+ -+ -+ /* validate pnp resources */ -+ if (!pnp_port_valid(pdev, 0) || -+ pnp_port_len(pdev, 0) != dev_desc->io_region_size) { -+ dev_err(&pdev->dev, "IR PNP Port not valid!\n"); -+ goto failure; -+ } -+ -+ if (!pnp_irq_valid(pdev, 0)) { -+ dev_err(&pdev->dev, "PNP IRQ not valid!\n"); -+ goto failure; -+ } -+ -+ /* store resource values */ -+ itdev->cir_addr = pnp_port_start(pdev, 0); -+ itdev->cir_irq = pnp_irq(pdev, 0); -+ -+ /* initialize spinlocks */ -+ spin_lock_init(&itdev->lock); -+ -+ /* initialize raw event */ -+ init_ir_raw_event(&itdev->rawir); -+ -+ ret = -EBUSY; -+ /* now claim resources */ -+ if (!request_region(itdev->cir_addr, -+ dev_desc->io_region_size, ITE_DRIVER_NAME)) -+ goto failure; -+ -+ if (request_irq(itdev->cir_irq, ite_cir_isr, IRQF_SHARED, -+ ITE_DRIVER_NAME, (void *)itdev)) -+ goto failure; -+ -+ /* set driver data into the pnp device */ -+ pnp_set_drvdata(pdev, itdev); -+ itdev->pdev = pdev; -+ -+ /* initialize waitqueues for transmission */ -+ init_waitqueue_head(&itdev->tx_queue); -+ init_waitqueue_head(&itdev->tx_ended); -+ -+ /* copy model-specific parameters */ -+ itdev->params = *dev_desc; -+ -+ /* apply any overrides */ -+ if (sample_period > 0) -+ itdev->params.sample_period = sample_period; -+ -+ if (tx_carrier_freq > 0) -+ itdev->params.tx_carrier_freq = tx_carrier_freq; -+ -+ if (tx_duty_cycle > 0 && tx_duty_cycle <= 100) -+ itdev->params.tx_duty_cycle = tx_duty_cycle; -+ -+ if (rx_low_carrier_freq > 0) -+ itdev->params.rx_low_carrier_freq = rx_low_carrier_freq; -+ -+ if (rx_high_carrier_freq > 0) -+ itdev->params.rx_high_carrier_freq = rx_high_carrier_freq; -+ -+ /* print out parameters */ -+ ite_pr(KERN_NOTICE, "TX-capable: %d\n", (int) -+ itdev->params.hw_tx_capable); -+ ite_pr(KERN_NOTICE, "Sample period (ns): %ld\n", (long) -+ itdev->params.sample_period); -+ ite_pr(KERN_NOTICE, "TX carrier frequency (Hz): %d\n", (int) -+ itdev->params.tx_carrier_freq); -+ ite_pr(KERN_NOTICE, "TX duty cycle (%%): %d\n", (int) -+ itdev->params.tx_duty_cycle); -+ ite_pr(KERN_NOTICE, "RX low carrier frequency (Hz): %d\n", (int) -+ itdev->params.rx_low_carrier_freq); -+ ite_pr(KERN_NOTICE, "RX high carrier frequency (Hz): %d\n", (int) -+ itdev->params.rx_high_carrier_freq); -+ -+ /* set up hardware initial state */ -+ itdev->params.init_hardware(itdev); -+ -+ /* set up ir-core props */ -+ rdev->priv = itdev; -+ rdev->driver_type = RC_DRIVER_IR_RAW; -+ rdev->allowed_protos = RC_TYPE_ALL; -+ rdev->open = ite_open; -+ rdev->close = ite_close; -+ rdev->s_idle = ite_s_idle; -+ rdev->s_rx_carrier_range = ite_set_rx_carrier_range; -+ rdev->min_timeout = ITE_MIN_IDLE_TIMEOUT; -+ rdev->max_timeout = ITE_MAX_IDLE_TIMEOUT; -+ rdev->timeout = ITE_IDLE_TIMEOUT; -+ rdev->rx_resolution = rdev->tx_resolution = ITE_BAUDRATE_DIVISOR * -+ itdev->params.sample_period; -+ -+ /* set up transmitter related values if needed */ -+ if (itdev->params.hw_tx_capable) { -+ rdev->tx_ir = ite_tx_ir; -+ rdev->s_tx_carrier = ite_set_tx_carrier; -+ rdev->s_tx_duty_cycle = ite_set_tx_duty_cycle; -+ } -+ -+ rdev->input_name = dev_desc->model; -+ rdev->input_id.bustype = BUS_HOST; -+ rdev->input_id.vendor = PCI_VENDOR_ID_ITE; -+ rdev->input_id.product = 0; -+ rdev->input_id.version = 0; -+ rdev->driver_name = ITE_DRIVER_NAME; -+ rdev->map_name = RC_MAP_RC6_MCE; -+ -+ ret = rc_register_device(rdev); -+ if (ret) -+ goto failure; -+ -+ itdev->rdev = rdev; -+ ite_pr(KERN_NOTICE, "driver has been successfully loaded\n"); -+ -+ return 0; -+ -+failure: -+ if (itdev->cir_irq) -+ free_irq(itdev->cir_irq, itdev); -+ if (itdev->cir_addr) -+ release_region(itdev->cir_addr, itdev->params.io_region_size); -+ -+ rc_free_device(rdev); -+ kfree(itdev); -+ -+ return ret; -+} -+ -+static void __devexit ite_remove(struct pnp_dev *pdev) -+{ -+ struct ite_dev *dev = pnp_get_drvdata(pdev); -+ unsigned long flags; -+ -+ ite_dbg("%s called", __func__); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* disable hardware */ -+ dev->params.disable(dev); -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ /* free resources */ -+ free_irq(dev->cir_irq, dev); -+ release_region(dev->cir_addr, dev->params.io_region_size); -+ -+ rc_unregister_device(dev->rdev); -+ -+ kfree(dev); -+} -+ -+static int ite_suspend(struct pnp_dev *pdev, pm_message_t state) -+{ -+ struct ite_dev *dev = pnp_get_drvdata(pdev); -+ unsigned long flags; -+ -+ ite_dbg("%s called", __func__); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* disable all interrupts */ -+ dev->params.disable(dev); -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return 0; -+} -+ -+static int ite_resume(struct pnp_dev *pdev) -+{ -+ int ret = 0; -+ struct ite_dev *dev = pnp_get_drvdata(pdev); -+ unsigned long flags; -+ -+ ite_dbg("%s called", __func__); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ if (dev->transmitting) { -+ /* wake up the transmitter */ -+ wake_up_interruptible(&dev->tx_queue); -+ } else { -+ /* enable the receiver */ -+ dev->params.enable_rx(dev); -+ } -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+ -+ return ret; -+} -+ -+static void ite_shutdown(struct pnp_dev *pdev) -+{ -+ struct ite_dev *dev = pnp_get_drvdata(pdev); -+ unsigned long flags; -+ -+ ite_dbg("%s called", __func__); -+ -+ spin_lock_irqsave(&dev->lock, flags); -+ -+ /* disable all interrupts */ -+ dev->params.disable(dev); -+ -+ spin_unlock_irqrestore(&dev->lock, flags); -+} -+ -+static const struct pnp_device_id ite_ids[] = { -+ { "ITE8704", 0 }, /* Default model */ -+ { "ITE8713", 0 }, /* CIR found in EEEBox 1501U */ -+ { "ITE8708", 1 }, /* Bridged IT8512 */ -+ { "", 0 }, -+}; -+ -+static struct pnp_driver ite_driver = { -+ .name = ITE_DRIVER_NAME, -+ .id_table = ite_ids, -+ .probe = ite_probe, -+ .remove = __devexit_p(ite_remove), -+ .suspend = ite_suspend, -+ .resume = ite_resume, -+ .shutdown = ite_shutdown, -+}; -+ -+int ite_init(void) -+{ -+ return pnp_register_driver(&ite_driver); -+} -+ -+void ite_exit(void) -+{ -+ pnp_unregister_driver(&ite_driver); -+} -+ -+MODULE_DEVICE_TABLE(pnp, ite_ids); -+MODULE_DESCRIPTION("ITE Tech Inc. IT8712F/ITE8512F CIR driver"); -+ -+MODULE_AUTHOR("Juan J. Garcia de Soria "); -+MODULE_LICENSE("GPL"); -+ -+module_init(ite_init); -+module_exit(ite_exit); -diff -Naur linux-2.6.38-rc5/drivers/media/rc/ite-cir.h linux-2.6.38-rc5.patch/drivers/media/rc/ite-cir.h ---- linux-2.6.38-rc5/drivers/media/rc/ite-cir.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/media/rc/ite-cir.h 2011-02-22 03:19:26.755636229 +0100 -@@ -0,0 +1,446 @@ -+/* -+ * Driver for ITE Tech Inc. IT8712F/IT8512F CIR -+ * -+ * Copyright (C) 2010 Juan J. Garcia de Soria -+ * -+ * Based on nuvoton-cir and lirc_it87 drivers. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -+ * USA -+ */ -+ -+/* platform driver name to register */ -+#define ITE_DRIVER_NAME "ite-cir" -+ -+/* logging macros */ -+#define ite_pr(level, text, ...) \ -+ printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__) -+ -+#define ite_dbg(text, ...) \ -+ if (debug) \ -+ printk(KERN_DEBUG \ -+ KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__) -+ -+#define ite_dbg_verbose(text, ...) \ -+ if (debug > 1) \ -+ printk(KERN_DEBUG \ -+ KBUILD_MODNAME ": " text "\n" , ## __VA_ARGS__) -+ -+/* FIFO sizes */ -+#define ITE_TX_FIFO_LEN 32 -+#define ITE_RX_FIFO_LEN 32 -+ -+/* interrupt types */ -+#define ITE_IRQ_TX_FIFO 1 -+#define ITE_IRQ_RX_FIFO 2 -+#define ITE_IRQ_RX_FIFO_OVERRUN 4 -+ -+/* forward declaration */ -+struct ite_dev; -+ -+/* struct for storing the parameters of different recognized devices */ -+struct ite_dev_params { -+ /* model of the device */ -+ const char *model; -+ -+ /* size of the I/O region */ -+ int io_region_size; -+ -+ /* true if the hardware supports transmission */ -+ bool hw_tx_capable; -+ -+ /* base sampling period, in ns */ -+ u32 sample_period; -+ -+ /* rx low carrier frequency, in Hz, 0 means no demodulation */ -+ unsigned int rx_low_carrier_freq; -+ -+ /* tx high carrier frequency, in Hz, 0 means no demodulation */ -+ unsigned int rx_high_carrier_freq; -+ -+ /* tx carrier frequency, in Hz */ -+ unsigned int tx_carrier_freq; -+ -+ /* duty cycle, 0-100 */ -+ int tx_duty_cycle; -+ -+ /* hw-specific operation function pointers; most of these must be -+ * called while holding the spin lock, except for the TX FIFO length -+ * one */ -+ -+ /* get pending interrupt causes */ -+ int (*get_irq_causes)(struct ite_dev *dev); -+ -+ /* enable rx */ -+ void (*enable_rx)(struct ite_dev *dev); -+ -+ /* make rx enter the idle state; keep listening for a pulse, but stop -+ * streaming space bytes */ -+ void (*idle_rx)(struct ite_dev *dev); -+ -+ /* disable rx completely */ -+ void (*disable_rx)(struct ite_dev *dev); -+ -+ /* read bytes from RX FIFO; return read count */ -+ int (*get_rx_bytes)(struct ite_dev *dev, u8 *buf, int buf_size); -+ -+ /* enable tx FIFO space available interrupt */ -+ void (*enable_tx_interrupt)(struct ite_dev *dev); -+ -+ /* disable tx FIFO space available interrupt */ -+ void (*disable_tx_interrupt)(struct ite_dev *dev); -+ -+ /* get number of available TX FIFO slots */ -+ int (*get_tx_free_slots)(struct ite_dev *dev); -+ -+ /* put a byte to the TX FIFO */ -+ void (*put_tx_byte)(struct ite_dev *dev, u8 value); -+ -+ /* disable hardware completely */ -+ void (*disable)(struct ite_dev *dev); -+ -+ /* initialize the hardware */ -+ void (*init_hardware)(struct ite_dev *dev); -+ -+ /* set the carrier parameters */ -+ void (*set_carrier_params)(struct ite_dev *dev, bool high_freq, -+ bool use_demodulator, u8 carrier_freq_bits, -+ u8 allowance_bits, u8 pulse_width_bits); -+}; -+ -+/* ITE CIR device structure */ -+struct ite_dev { -+ struct pnp_dev *pdev; -+ struct rc_dev *rdev; -+ struct ir_raw_event rawir; -+ -+ /* sync data */ -+ spinlock_t lock; -+ bool in_use, transmitting; -+ -+ /* transmit support */ -+ int tx_fifo_allowance; -+ wait_queue_head_t tx_queue, tx_ended; -+ -+ /* hardware I/O settings */ -+ unsigned long cir_addr; -+ int cir_irq; -+ -+ /* overridable copy of model parameters */ -+ struct ite_dev_params params; -+}; -+ -+ -+/* common values for all kinds of hardware */ -+ -+/* baud rate divisor default */ -+#define ITE_BAUDRATE_DIVISOR 1 -+ -+/* low-speed carrier frequency limits (Hz) */ -+#define ITE_LCF_MIN_CARRIER_FREQ 27000 -+#define ITE_LCF_MAX_CARRIER_FREQ 58000 -+ -+/* high-speed carrier frequency limits (Hz) */ -+#define ITE_HCF_MIN_CARRIER_FREQ 400000 -+#define ITE_HCF_MAX_CARRIER_FREQ 500000 -+ -+/* default carrier freq for when demodulator is off (Hz) */ -+#define ITE_DEFAULT_CARRIER_FREQ 38000 -+ -+/* default idling timeout in ns (0.2 seconds) */ -+#define ITE_IDLE_TIMEOUT 200000000UL -+ -+/* limit timeout values */ -+#define ITE_MIN_IDLE_TIMEOUT 100000000UL -+#define ITE_MAX_IDLE_TIMEOUT 1000000000UL -+ -+/* convert bits to us */ -+#define ITE_BITS_TO_NS(bits, sample_period) \ -+((u32) ((bits) * ITE_BAUDRATE_DIVISOR * sample_period)) -+ -+/* -+ * n in IT87_RDCR produces a tolerance of +/- n * 6.25% around the center -+ * carrier frequency... -+ * -+ * From two limit frequencies, L (low) and H (high), we can get both the -+ * center frequency F = (L + H) / 2 and the variation from the center -+ * frequency A = (H - L) / (H + L). We can use this in order to honor the -+ * s_rx_carrier_range() call in ir-core. We'll suppose that any request -+ * setting L=0 means we must shut down the demodulator. -+ */ -+#define ITE_RXDCR_PER_10000_STEP 625 -+ -+/* high speed carrier freq values */ -+#define ITE_CFQ_400 0x03 -+#define ITE_CFQ_450 0x08 -+#define ITE_CFQ_480 0x0b -+#define ITE_CFQ_500 0x0d -+ -+/* values for pulse widths */ -+#define ITE_TXMPW_A 0x02 -+#define ITE_TXMPW_B 0x03 -+#define ITE_TXMPW_C 0x04 -+#define ITE_TXMPW_D 0x05 -+#define ITE_TXMPW_E 0x06 -+ -+/* values for demodulator carrier range allowance */ -+#define ITE_RXDCR_DEFAULT 0x01 /* default carrier range */ -+#define ITE_RXDCR_MAX 0x07 /* default carrier range */ -+ -+/* DR TX bits */ -+#define ITE_TX_PULSE 0x00 -+#define ITE_TX_SPACE 0x80 -+#define ITE_TX_MAX_RLE 0x80 -+#define ITE_TX_RLE_MASK 0x7F -+ -+ -+/* -+ * IT8712F -+ * -+ * hardware data obtained from: -+ * -+ * IT8712F -+ * Environment Control – Low Pin Count Input / Output -+ * (EC - LPC I/O) -+ * Preliminary Specification V0. 81 -+ */ -+ -+/* register offsets */ -+#define IT87_DR 0x00 /* data register */ -+#define IT87_IER 0x01 /* interrupt enable register */ -+#define IT87_RCR 0x02 /* receiver control register */ -+#define IT87_TCR1 0x03 /* transmitter control register 1 */ -+#define IT87_TCR2 0x04 /* transmitter control register 2 */ -+#define IT87_TSR 0x05 /* transmitter status register */ -+#define IT87_RSR 0x06 /* receiver status register */ -+#define IT87_BDLR 0x05 /* baud rate divisor low byte register */ -+#define IT87_BDHR 0x06 /* baud rate divisor high byte register */ -+#define IT87_IIR 0x07 /* interrupt identification register */ -+ -+#define IT87_IOREG_LENGTH 0x08 /* length of register file */ -+ -+/* IER bits */ -+#define IT87_TLDLIE 0x01 /* transmitter low data interrupt enable */ -+#define IT87_RDAIE 0x02 /* receiver data available interrupt enable */ -+#define IT87_RFOIE 0x04 /* receiver FIFO overrun interrupt enable */ -+#define IT87_IEC 0x08 /* interrupt enable control */ -+#define IT87_BR 0x10 /* baud rate register enable */ -+#define IT87_RESET 0x20 /* reset */ -+ -+/* RCR bits */ -+#define IT87_RXDCR 0x07 /* receiver demodulation carrier range mask */ -+#define IT87_RXACT 0x08 /* receiver active */ -+#define IT87_RXEND 0x10 /* receiver demodulation enable */ -+#define IT87_RXEN 0x20 /* receiver enable */ -+#define IT87_HCFS 0x40 /* high-speed carrier frequency select */ -+#define IT87_RDWOS 0x80 /* receiver data without sync */ -+ -+/* TCR1 bits */ -+#define IT87_TXMPM 0x03 /* transmitter modulation pulse mode mask */ -+#define IT87_TXMPM_DEFAULT 0x00 /* modulation pulse mode default */ -+#define IT87_TXENDF 0x04 /* transmitter deferral */ -+#define IT87_TXRLE 0x08 /* transmitter run length enable */ -+#define IT87_FIFOTL 0x30 /* FIFO level threshold mask */ -+#define IT87_FIFOTL_DEFAULT 0x20 /* FIFO level threshold default -+ 0x00 -> 1, 0x10 -> 7, 0x20 -> 17, -+ 0x30 -> 25 */ -+#define IT87_ILE 0x40 /* internal loopback enable */ -+#define IT87_FIFOCLR 0x80 /* FIFO clear bit */ -+ -+/* TCR2 bits */ -+#define IT87_TXMPW 0x07 /* transmitter modulation pulse width mask */ -+#define IT87_TXMPW_DEFAULT 0x04 /* default modulation pulse width */ -+#define IT87_CFQ 0xf8 /* carrier frequency mask */ -+#define IT87_CFQ_SHIFT 3 /* carrier frequency bit shift */ -+ -+/* TSR bits */ -+#define IT87_TXBFC 0x3f /* transmitter FIFO byte count mask */ -+ -+/* RSR bits */ -+#define IT87_RXBFC 0x3f /* receiver FIFO byte count mask */ -+#define IT87_RXFTO 0x80 /* receiver FIFO time-out */ -+ -+/* IIR bits */ -+#define IT87_IP 0x01 /* interrupt pending */ -+#define IT87_II 0x06 /* interrupt identification mask */ -+#define IT87_II_NOINT 0x00 /* no interrupt */ -+#define IT87_II_TXLDL 0x02 /* transmitter low data level */ -+#define IT87_II_RXDS 0x04 /* receiver data stored */ -+#define IT87_II_RXFO 0x06 /* receiver FIFO overrun */ -+ -+ -+/* -+ * IT8512E/F -+ * -+ * Hardware data obtained from: -+ * -+ * IT8512E/F -+ * Embedded Controller -+ * Preliminary Specification V0.4.1 -+ * -+ * Note that the CIR registers are not directly available to the host, because -+ * they only are accessible to the integrated microcontroller. Thus, in order -+ * use it, some kind of bridging is required. As the bridging may depend on -+ * the controller firmware in use, we are going to use the PNP ID in order to -+ * determine the strategy and ports available. See after these generic -+ * IT8512E/F register definitions for register definitions for those -+ * strategies. -+ */ -+ -+/* register offsets */ -+#define IT85_C0DR 0x00 /* data register */ -+#define IT85_C0MSTCR 0x01 /* master control register */ -+#define IT85_C0IER 0x02 /* interrupt enable register */ -+#define IT85_C0IIR 0x03 /* interrupt identification register */ -+#define IT85_C0CFR 0x04 /* carrier frequency register */ -+#define IT85_C0RCR 0x05 /* receiver control register */ -+#define IT85_C0TCR 0x06 /* transmitter control register */ -+#define IT85_C0SCK 0x07 /* slow clock control register */ -+#define IT85_C0BDLR 0x08 /* baud rate divisor low byte register */ -+#define IT85_C0BDHR 0x09 /* baud rate divisor high byte register */ -+#define IT85_C0TFSR 0x0a /* transmitter FIFO status register */ -+#define IT85_C0RFSR 0x0b /* receiver FIFO status register */ -+#define IT85_C0WCL 0x0d /* wakeup code length register */ -+#define IT85_C0WCR 0x0e /* wakeup code read/write register */ -+#define IT85_C0WPS 0x0f /* wakeup power control/status register */ -+ -+#define IT85_IOREG_LENGTH 0x10 /* length of register file */ -+ -+/* C0MSTCR bits */ -+#define IT85_RESET 0x01 /* reset */ -+#define IT85_FIFOCLR 0x02 /* FIFO clear bit */ -+#define IT85_FIFOTL 0x0c /* FIFO level threshold mask */ -+#define IT85_FIFOTL_DEFAULT 0x08 /* FIFO level threshold default -+ 0x00 -> 1, 0x04 -> 7, 0x08 -> 17, -+ 0x0c -> 25 */ -+#define IT85_ILE 0x10 /* internal loopback enable */ -+#define IT85_ILSEL 0x20 /* internal loopback select */ -+ -+/* C0IER bits */ -+#define IT85_TLDLIE 0x01 /* TX low data level interrupt enable */ -+#define IT85_RDAIE 0x02 /* RX data available interrupt enable */ -+#define IT85_RFOIE 0x04 /* RX FIFO overrun interrupt enable */ -+#define IT85_IEC 0x80 /* interrupt enable function control */ -+ -+/* C0IIR bits */ -+#define IT85_TLDLI 0x01 /* transmitter low data level interrupt */ -+#define IT85_RDAI 0x02 /* receiver data available interrupt */ -+#define IT85_RFOI 0x04 /* receiver FIFO overrun interrupt */ -+#define IT85_NIP 0x80 /* no interrupt pending */ -+ -+/* C0CFR bits */ -+#define IT85_CFQ 0x1f /* carrier frequency mask */ -+#define IT85_HCFS 0x20 /* high speed carrier frequency select */ -+ -+/* C0RCR bits */ -+#define IT85_RXDCR 0x07 /* receiver demodulation carrier range mask */ -+#define IT85_RXACT 0x08 /* receiver active */ -+#define IT85_RXEND 0x10 /* receiver demodulation enable */ -+#define IT85_RDWOS 0x20 /* receiver data without sync */ -+#define IT85_RXEN 0x80 /* receiver enable */ -+ -+/* C0TCR bits */ -+#define IT85_TXMPW 0x07 /* transmitter modulation pulse width mask */ -+#define IT85_TXMPW_DEFAULT 0x04 /* default modulation pulse width */ -+#define IT85_TXMPM 0x18 /* transmitter modulation pulse mode mask */ -+#define IT85_TXMPM_DEFAULT 0x00 /* modulation pulse mode default */ -+#define IT85_TXENDF 0x20 /* transmitter deferral */ -+#define IT85_TXRLE 0x40 /* transmitter run length enable */ -+ -+/* C0SCK bits */ -+#define IT85_SCKS 0x01 /* slow clock select */ -+#define IT85_TXDCKG 0x02 /* TXD clock gating */ -+#define IT85_DLL1P8E 0x04 /* DLL 1.8432M enable */ -+#define IT85_DLLTE 0x08 /* DLL test enable */ -+#define IT85_BRCM 0x70 /* baud rate count mode */ -+#define IT85_DLLOCK 0x80 /* DLL lock */ -+ -+/* C0TFSR bits */ -+#define IT85_TXFBC 0x3f /* transmitter FIFO count mask */ -+ -+/* C0RFSR bits */ -+#define IT85_RXFBC 0x3f /* receiver FIFO count mask */ -+#define IT85_RXFTO 0x80 /* receiver FIFO time-out */ -+ -+/* C0WCL bits */ -+#define IT85_WCL 0x3f /* wakeup code length mask */ -+ -+/* C0WPS bits */ -+#define IT85_CIRPOSIE 0x01 /* power on/off status interrupt enable */ -+#define IT85_CIRPOIS 0x02 /* power on/off interrupt status */ -+#define IT85_CIRPOII 0x04 /* power on/off interrupt identification */ -+#define IT85_RCRST 0x10 /* wakeup code reading counter reset bit */ -+#define IT85_WCRST 0x20 /* wakeup code writing counter reset bit */ -+ -+ -+/* -+ * ITE8708 -+ * -+ * Hardware data obtained from hacked driver for IT8512 in this forum post: -+ * -+ * http://ubuntuforums.org/showthread.php?t=1028640 -+ * -+ * Although there's no official documentation for that driver, analysis would -+ * suggest that it maps the 16 registers of IT8512 onto two 8-register banks, -+ * selectable by a single bank-select bit that's mapped onto both banks. The -+ * IT8512 registers are mapped in a different order, so that the first bank -+ * maps the ones that are used more often, and two registers that share a -+ * reserved high-order bit are placed at the same offset in both banks in -+ * order to reuse the reserved bit as the bank select bit. -+ */ -+ -+/* register offsets */ -+ -+/* mapped onto both banks */ -+#define IT8708_BANKSEL 0x07 /* bank select register */ -+#define IT8708_HRAE 0x80 /* high registers access enable */ -+ -+/* mapped onto the low bank */ -+#define IT8708_C0DR 0x00 /* data register */ -+#define IT8708_C0MSTCR 0x01 /* master control register */ -+#define IT8708_C0IER 0x02 /* interrupt enable register */ -+#define IT8708_C0IIR 0x03 /* interrupt identification register */ -+#define IT8708_C0RFSR 0x04 /* receiver FIFO status register */ -+#define IT8708_C0RCR 0x05 /* receiver control register */ -+#define IT8708_C0TFSR 0x06 /* transmitter FIFO status register */ -+#define IT8708_C0TCR 0x07 /* transmitter control register */ -+ -+/* mapped onto the high bank */ -+#define IT8708_C0BDLR 0x01 /* baud rate divisor low byte register */ -+#define IT8708_C0BDHR 0x02 /* baud rate divisor high byte register */ -+#define IT8708_C0CFR 0x04 /* carrier frequency register */ -+ -+/* registers whose bank mapping we don't know, since they weren't being used -+ * in the hacked driver... most probably they belong to the high bank too, -+ * since they fit in the holes the other registers leave */ -+#define IT8708_C0SCK 0x03 /* slow clock control register */ -+#define IT8708_C0WCL 0x05 /* wakeup code length register */ -+#define IT8708_C0WCR 0x06 /* wakeup code read/write register */ -+#define IT8708_C0WPS 0x07 /* wakeup power control/status register */ -+ -+#define IT8708_IOREG_LENGTH 0x08 /* length of register file */ -+ -+/* two more registers that are defined in the hacked driver, but can't be -+ * found in the data sheets; no idea what they are or how they are accessed, -+ * since the hacked driver doesn't seem to use them */ -+#define IT8708_CSCRR 0x00 -+#define IT8708_CGPINTR 0x01 -+ -+/* CSCRR bits */ -+#define IT8708_CSCRR_SCRB 0x3f -+#define IT8708_CSCRR_PM 0x80 -+ -+/* CGPINTR bits */ -+#define IT8708_CGPINT 0x01 -diff -Naur linux-2.6.38-rc5/drivers/media/rc/Kconfig linux-2.6.38-rc5.patch/drivers/media/rc/Kconfig ---- linux-2.6.38-rc5/drivers/media/rc/Kconfig 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/media/rc/Kconfig 2011-02-22 03:24:59.239412519 +0100 -@@ -148,6 +148,19 @@ - To compile this driver as a module, choose M here: the - module will be called nuvoton-cir. - -+config IR_ITE_CIR -+ tristate "ITE Tech Inc. IT8712/IT8512 Consumer Infrared Transceiver" -+ depends on PNP -+ depends on RC_CORE -+ ---help--- -+ Say Y here to enable support for integrated infrared receivers -+ /transceivers made by ITE Tech Inc. These are found in -+ several ASUS devices, like the ASUS Digimatrix or the ASUS -+ EEEBox 1501U. -+ -+ To compile this driver as a module, choose M here: the -+ module will be called ite-cir. -+ - config IR_STREAMZAP - tristate "Streamzap PC Remote IR Receiver" - depends on USB_ARCH_HAS_HCD -diff -Naur linux-2.6.38-rc5/drivers/media/rc/Makefile linux-2.6.38-rc5.patch/drivers/media/rc/Makefile ---- linux-2.6.38-rc5/drivers/media/rc/Makefile 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/media/rc/Makefile 2011-02-22 03:24:09.659341983 +0100 -@@ -19,4 +19,5 @@ - obj-$(CONFIG_IR_ENE) += ene_ir.o - obj-$(CONFIG_IR_STREAMZAP) += streamzap.o - obj-$(CONFIG_IR_WINBOND_CIR) += winbond-cir.o -+obj-$(CONFIG_IR_ITE_CIR) += ite-cir.o - obj-$(CONFIG_RC_LOOPBACK) += rc-loopback.o -diff -Naur linux-2.6.38-rc5/drivers/staging/lirc/Kconfig linux-2.6.38-rc5.patch/drivers/staging/lirc/Kconfig ---- linux-2.6.38-rc5/drivers/staging/lirc/Kconfig 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/staging/lirc/Kconfig 2011-02-22 03:22:22.436351160 +0100 -@@ -32,12 +32,6 @@ - - Current generation iMON devices use the input layer imon driver. - --config LIRC_IT87 -- tristate "ITE IT87XX CIR Port Receiver" -- depends on LIRC && PNP -- help -- Driver for the ITE IT87xx IR Receiver -- - config LIRC_ITE8709 - tristate "ITE8709 CIR Port Receiver" - depends on LIRC && PNP -diff -Naur linux-2.6.38-rc5/drivers/staging/lirc/lirc_it87.c linux-2.6.38-rc5.patch/drivers/staging/lirc/lirc_it87.c ---- linux-2.6.38-rc5/drivers/staging/lirc/lirc_it87.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/staging/lirc/lirc_it87.c 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1027 +0,0 @@ --/* -- * LIRC driver for ITE IT8712/IT8705 CIR port -- * -- * Copyright (C) 2001 Hans-Gunter Lutke Uphues -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License as -- * published by the Free Software Foundation; either version 2 of the -- * License, or (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -- * USA -- * -- * ITE IT8705 and IT8712(not tested) and IT8720 CIR-port support for lirc based -- * via cut and paste from lirc_sir.c (C) 2000 Milan Pikula -- * -- * Attention: Sendmode only tested with debugging logs -- * -- * 2001/02/27 Christoph Bartelmus : -- * reimplemented read function -- * 2005/06/05 Andrew Calkin implemented support for Asus Digimatrix, -- * based on work of the following member of the Outertrack Digimatrix -- * Forum: Art103 -- * 2009/12/24 James Edwards implemeted support -- * for ITE8704/ITE8718, on my machine, the DSDT reports 8704, but the -- * chip identifies as 18. -- */ -- --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include --#include -- --#include --#include -- --#include --#include -- --#include "lirc_it87.h" -- --#ifdef LIRC_IT87_DIGIMATRIX --static int digimatrix = 1; --static int it87_freq = 36; /* kHz */ --static int irq = 9; --#else --static int digimatrix; --static int it87_freq = 38; /* kHz */ --static int irq = IT87_CIR_DEFAULT_IRQ; --#endif -- --static unsigned long it87_bits_in_byte_out; --static unsigned long it87_send_counter; --static unsigned char it87_RXEN_mask = IT87_CIR_RCR_RXEN; -- --#define RBUF_LEN 1024 -- --#define LIRC_DRIVER_NAME "lirc_it87" -- --/* timeout for sequences in jiffies (=5/100s) */ --/* must be longer than TIME_CONST */ --#define IT87_TIMEOUT (HZ*5/100) -- --/* module parameters */ --static int debug; --#define dprintk(fmt, args...) \ -- do { \ -- if (debug) \ -- printk(KERN_DEBUG LIRC_DRIVER_NAME ": " \ -- fmt, ## args); \ -- } while (0) -- --static int io = IT87_CIR_DEFAULT_IOBASE; --/* receiver demodulator default: off */ --static int it87_enable_demodulator; -- --static int timer_enabled; --static DEFINE_SPINLOCK(timer_lock); --static struct timer_list timerlist; --/* time of last signal change detected */ --static struct timeval last_tv = {0, 0}; --/* time of last UART data ready interrupt */ --static struct timeval last_intr_tv = {0, 0}; --static int last_value; -- --static DECLARE_WAIT_QUEUE_HEAD(lirc_read_queue); -- --static DEFINE_SPINLOCK(hardware_lock); --static DEFINE_SPINLOCK(dev_lock); --static bool device_open; -- --static int rx_buf[RBUF_LEN]; --unsigned int rx_tail, rx_head; -- --static struct pnp_driver it87_pnp_driver; -- --/* SECTION: Prototypes */ -- --/* Communication with user-space */ --static int lirc_open(struct inode *inode, struct file *file); --static int lirc_close(struct inode *inode, struct file *file); --static unsigned int lirc_poll(struct file *file, poll_table *wait); --static ssize_t lirc_read(struct file *file, char *buf, -- size_t count, loff_t *ppos); --static ssize_t lirc_write(struct file *file, const char *buf, -- size_t n, loff_t *pos); --static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); --static void add_read_queue(int flag, unsigned long val); --static int init_chrdev(void); --static void drop_chrdev(void); --/* Hardware */ --static irqreturn_t it87_interrupt(int irq, void *dev_id); --static void send_space(unsigned long len); --static void send_pulse(unsigned long len); --static void init_send(void); --static void terminate_send(unsigned long len); --static int init_hardware(void); --static void drop_hardware(void); --/* Initialisation */ --static int init_port(void); --static void drop_port(void); -- -- --/* SECTION: Communication with user-space */ -- --static int lirc_open(struct inode *inode, struct file *file) --{ -- spin_lock(&dev_lock); -- if (device_open) { -- spin_unlock(&dev_lock); -- return -EBUSY; -- } -- device_open = true; -- spin_unlock(&dev_lock); -- return 0; --} -- -- --static int lirc_close(struct inode *inode, struct file *file) --{ -- spin_lock(&dev_lock); -- device_open = false; -- spin_unlock(&dev_lock); -- return 0; --} -- -- --static unsigned int lirc_poll(struct file *file, poll_table *wait) --{ -- poll_wait(file, &lirc_read_queue, wait); -- if (rx_head != rx_tail) -- return POLLIN | POLLRDNORM; -- return 0; --} -- -- --static ssize_t lirc_read(struct file *file, char *buf, -- size_t count, loff_t *ppos) --{ -- int n = 0; -- int retval = 0; -- -- while (n < count) { -- if (file->f_flags & O_NONBLOCK && rx_head == rx_tail) { -- retval = -EAGAIN; -- break; -- } -- retval = wait_event_interruptible(lirc_read_queue, -- rx_head != rx_tail); -- if (retval) -- break; -- -- if (copy_to_user((void *) buf + n, (void *) (rx_buf + rx_head), -- sizeof(int))) { -- retval = -EFAULT; -- break; -- } -- rx_head = (rx_head + 1) & (RBUF_LEN - 1); -- n += sizeof(int); -- } -- if (n) -- return n; -- return retval; --} -- -- --static ssize_t lirc_write(struct file *file, const char *buf, -- size_t n, loff_t *pos) --{ -- int i = 0; -- int *tx_buf; -- -- if (n % sizeof(int)) -- return -EINVAL; -- tx_buf = memdup_user(buf, n); -- if (IS_ERR(tx_buf)) -- return PTR_ERR(tx_buf); -- n /= sizeof(int); -- init_send(); -- while (1) { -- if (i >= n) -- break; -- if (tx_buf[i]) -- send_pulse(tx_buf[i]); -- i++; -- if (i >= n) -- break; -- if (tx_buf[i]) -- send_space(tx_buf[i]); -- i++; -- } -- terminate_send(tx_buf[i - 1]); -- kfree(tx_buf); -- return n; --} -- -- --static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) --{ -- int retval = 0; -- __u32 value = 0; -- unsigned long hw_flags; -- -- if (cmd == LIRC_GET_FEATURES) -- value = LIRC_CAN_SEND_PULSE | -- LIRC_CAN_SET_SEND_CARRIER | -- LIRC_CAN_REC_MODE2; -- else if (cmd == LIRC_GET_SEND_MODE) -- value = LIRC_MODE_PULSE; -- else if (cmd == LIRC_GET_REC_MODE) -- value = LIRC_MODE_MODE2; -- -- switch (cmd) { -- case LIRC_GET_FEATURES: -- case LIRC_GET_SEND_MODE: -- case LIRC_GET_REC_MODE: -- retval = put_user(value, (__u32 *) arg); -- break; -- -- case LIRC_SET_SEND_MODE: -- case LIRC_SET_REC_MODE: -- retval = get_user(value, (__u32 *) arg); -- break; -- -- case LIRC_SET_SEND_CARRIER: -- retval = get_user(value, (__u32 *) arg); -- if (retval) -- return retval; -- value /= 1000; -- if (value > IT87_CIR_FREQ_MAX || -- value < IT87_CIR_FREQ_MIN) -- return -EINVAL; -- -- it87_freq = value; -- -- spin_lock_irqsave(&hardware_lock, hw_flags); -- outb(((inb(io + IT87_CIR_TCR2) & IT87_CIR_TCR2_TXMPW) | -- (it87_freq - IT87_CIR_FREQ_MIN) << 3), -- io + IT87_CIR_TCR2); -- spin_unlock_irqrestore(&hardware_lock, hw_flags); -- dprintk("demodulation frequency: %d kHz\n", it87_freq); -- -- break; -- -- default: -- retval = -EINVAL; -- } -- -- if (retval) -- return retval; -- -- if (cmd == LIRC_SET_REC_MODE) { -- if (value != LIRC_MODE_MODE2) -- retval = -ENOSYS; -- } else if (cmd == LIRC_SET_SEND_MODE) { -- if (value != LIRC_MODE_PULSE) -- retval = -ENOSYS; -- } -- return retval; --} -- --static void add_read_queue(int flag, unsigned long val) --{ -- unsigned int new_rx_tail; -- int newval; -- -- dprintk("add flag %d with val %lu\n", flag, val); -- -- newval = val & PULSE_MASK; -- -- /* -- * statistically, pulses are ~TIME_CONST/2 too long. we could -- * maybe make this more exact, but this is good enough -- */ -- if (flag) { -- /* pulse */ -- if (newval > TIME_CONST / 2) -- newval -= TIME_CONST / 2; -- else /* should not ever happen */ -- newval = 1; -- newval |= PULSE_BIT; -- } else -- newval += TIME_CONST / 2; -- new_rx_tail = (rx_tail + 1) & (RBUF_LEN - 1); -- if (new_rx_tail == rx_head) { -- dprintk("Buffer overrun.\n"); -- return; -- } -- rx_buf[rx_tail] = newval; -- rx_tail = new_rx_tail; -- wake_up_interruptible(&lirc_read_queue); --} -- -- --static const struct file_operations lirc_fops = { -- .owner = THIS_MODULE, -- .read = lirc_read, -- .write = lirc_write, -- .poll = lirc_poll, -- .unlocked_ioctl = lirc_ioctl, --#ifdef CONFIG_COMPAT -- .compat_ioctl = lirc_ioctl, --#endif -- .open = lirc_open, -- .release = lirc_close, -- .llseek = noop_llseek, --}; -- --static int set_use_inc(void *data) --{ -- return 0; --} -- --static void set_use_dec(void *data) --{ --} -- --static struct lirc_driver driver = { -- .name = LIRC_DRIVER_NAME, -- .minor = -1, -- .code_length = 1, -- .sample_rate = 0, -- .data = NULL, -- .add_to_buf = NULL, -- .set_use_inc = set_use_inc, -- .set_use_dec = set_use_dec, -- .fops = &lirc_fops, -- .dev = NULL, -- .owner = THIS_MODULE, --}; -- -- --static int init_chrdev(void) --{ -- driver.minor = lirc_register_driver(&driver); -- -- if (driver.minor < 0) { -- printk(KERN_ERR LIRC_DRIVER_NAME ": init_chrdev() failed.\n"); -- return -EIO; -- } -- return 0; --} -- -- --static void drop_chrdev(void) --{ -- lirc_unregister_driver(driver.minor); --} -- -- --/* SECTION: Hardware */ --static long delta(struct timeval *tv1, struct timeval *tv2) --{ -- unsigned long deltv; -- -- deltv = tv2->tv_sec - tv1->tv_sec; -- if (deltv > 15) -- deltv = 0xFFFFFF; -- else -- deltv = deltv*1000000 + tv2->tv_usec - tv1->tv_usec; -- return deltv; --} -- --static void it87_timeout(unsigned long data) --{ -- unsigned long flags; -- -- /* avoid interference with interrupt */ -- spin_lock_irqsave(&timer_lock, flags); -- -- if (digimatrix) { -- /* We have timed out. Disable the RX mechanism. */ -- -- outb((inb(io + IT87_CIR_RCR) & ~IT87_CIR_RCR_RXEN) | -- IT87_CIR_RCR_RXACT, io + IT87_CIR_RCR); -- if (it87_RXEN_mask) -- outb(inb(io + IT87_CIR_RCR) | IT87_CIR_RCR_RXEN, -- io + IT87_CIR_RCR); -- dprintk(" TIMEOUT\n"); -- timer_enabled = 0; -- -- /* fifo clear */ -- outb(inb(io + IT87_CIR_TCR1) | IT87_CIR_TCR1_FIFOCLR, -- io+IT87_CIR_TCR1); -- -- } else { -- /* -- * if last received signal was a pulse, but receiving stopped -- * within the 9 bit frame, we need to finish this pulse and -- * simulate a signal change to from pulse to space. Otherwise -- * upper layers will receive two sequences next time. -- */ -- -- if (last_value) { -- unsigned long pulse_end; -- -- /* determine 'virtual' pulse end: */ -- pulse_end = delta(&last_tv, &last_intr_tv); -- dprintk("timeout add %d for %lu usec\n", -- last_value, pulse_end); -- add_read_queue(last_value, pulse_end); -- last_value = 0; -- last_tv = last_intr_tv; -- } -- } -- spin_unlock_irqrestore(&timer_lock, flags); --} -- --static irqreturn_t it87_interrupt(int irq, void *dev_id) --{ -- unsigned char data; -- struct timeval curr_tv; -- static unsigned long deltv; -- unsigned long deltintrtv; -- unsigned long flags, hw_flags; -- int iir, lsr; -- int fifo = 0; -- static char lastbit; -- char bit; -- -- /* Bit duration in microseconds */ -- const unsigned long bit_duration = 1000000ul / -- (115200 / IT87_CIR_BAUDRATE_DIVISOR); -- -- -- iir = inb(io + IT87_CIR_IIR); -- -- switch (iir & IT87_CIR_IIR_IID) { -- case 0x4: -- case 0x6: -- lsr = inb(io + IT87_CIR_RSR) & (IT87_CIR_RSR_RXFTO | -- IT87_CIR_RSR_RXFBC); -- fifo = lsr & IT87_CIR_RSR_RXFBC; -- dprintk("iir: 0x%x fifo: 0x%x\n", iir, lsr); -- -- /* avoid interference with timer */ -- spin_lock_irqsave(&timer_lock, flags); -- spin_lock_irqsave(&hardware_lock, hw_flags); -- if (digimatrix) { -- static unsigned long acc_pulse; -- static unsigned long acc_space; -- -- do { -- data = inb(io + IT87_CIR_DR); -- data = ~data; -- fifo--; -- if (data != 0x00) { -- if (timer_enabled) -- del_timer(&timerlist); -- /* -- * start timer for end of -- * sequence detection -- */ -- timerlist.expires = jiffies + -- IT87_TIMEOUT; -- add_timer(&timerlist); -- timer_enabled = 1; -- } -- /* Loop through */ -- for (bit = 0; bit < 8; ++bit) { -- if ((data >> bit) & 1) { -- ++acc_pulse; -- if (lastbit == 0) { -- add_read_queue(0, -- acc_space * -- bit_duration); -- acc_space = 0; -- } -- } else { -- ++acc_space; -- if (lastbit == 1) { -- add_read_queue(1, -- acc_pulse * -- bit_duration); -- acc_pulse = 0; -- } -- } -- lastbit = (data >> bit) & 1; -- } -- -- } while (fifo != 0); -- } else { /* Normal Operation */ -- do { -- del_timer(&timerlist); -- data = inb(io + IT87_CIR_DR); -- -- dprintk("data=%02x\n", data); -- do_gettimeofday(&curr_tv); -- deltv = delta(&last_tv, &curr_tv); -- deltintrtv = delta(&last_intr_tv, &curr_tv); -- -- dprintk("t %lu , d %d\n", -- deltintrtv, (int)data); -- -- /* -- * if nothing came in last 2 cycles, -- * it was gap -- */ -- if (deltintrtv > TIME_CONST * 2) { -- if (last_value) { -- dprintk("GAP\n"); -- -- /* simulate signal change */ -- add_read_queue(last_value, -- deltv - -- deltintrtv); -- last_value = 0; -- last_tv.tv_sec = -- last_intr_tv.tv_sec; -- last_tv.tv_usec = -- last_intr_tv.tv_usec; -- deltv = deltintrtv; -- } -- } -- data = 1; -- if (data ^ last_value) { -- /* -- * deltintrtv > 2*TIME_CONST, -- * remember ? the other case is -- * timeout -- */ -- add_read_queue(last_value, -- deltv-TIME_CONST); -- last_value = data; -- last_tv = curr_tv; -- if (last_tv.tv_usec >= TIME_CONST) -- last_tv.tv_usec -= TIME_CONST; -- else { -- last_tv.tv_sec--; -- last_tv.tv_usec += 1000000 - -- TIME_CONST; -- } -- } -- last_intr_tv = curr_tv; -- if (data) { -- /* -- * start timer for end of -- * sequence detection -- */ -- timerlist.expires = -- jiffies + IT87_TIMEOUT; -- add_timer(&timerlist); -- } -- outb((inb(io + IT87_CIR_RCR) & -- ~IT87_CIR_RCR_RXEN) | -- IT87_CIR_RCR_RXACT, -- io + IT87_CIR_RCR); -- if (it87_RXEN_mask) -- outb(inb(io + IT87_CIR_RCR) | -- IT87_CIR_RCR_RXEN, -- io + IT87_CIR_RCR); -- fifo--; -- } while (fifo != 0); -- } -- spin_unlock_irqrestore(&hardware_lock, hw_flags); -- spin_unlock_irqrestore(&timer_lock, flags); -- -- return IRQ_RETVAL(IRQ_HANDLED); -- -- default: -- /* not our irq */ -- dprintk("unknown IRQ (shouldn't happen) !!\n"); -- return IRQ_RETVAL(IRQ_NONE); -- } --} -- -- --static void send_it87(unsigned long len, unsigned long stime, -- unsigned char send_byte, unsigned int count_bits) --{ -- long count = len / stime; -- long time_left = 0; -- static unsigned char byte_out; -- unsigned long hw_flags; -- -- dprintk("%s: len=%ld, sb=%d\n", __func__, len, send_byte); -- -- time_left = (long)len - (long)count * (long)stime; -- count += ((2 * time_left) / stime); -- while (count) { -- long i = 0; -- for (i = 0; i < count_bits; i++) { -- byte_out = (byte_out << 1) | (send_byte & 1); -- it87_bits_in_byte_out++; -- } -- if (it87_bits_in_byte_out == 8) { -- dprintk("out=0x%x, tsr_txfbc: 0x%x\n", -- byte_out, -- inb(io + IT87_CIR_TSR) & -- IT87_CIR_TSR_TXFBC); -- -- while ((inb(io + IT87_CIR_TSR) & -- IT87_CIR_TSR_TXFBC) >= IT87_CIR_FIFO_SIZE) -- ; -- -- spin_lock_irqsave(&hardware_lock, hw_flags); -- outb(byte_out, io + IT87_CIR_DR); -- spin_unlock_irqrestore(&hardware_lock, hw_flags); -- -- it87_bits_in_byte_out = 0; -- it87_send_counter++; -- byte_out = 0; -- } -- count--; -- } --} -- -- --/*TODO: maybe exchange space and pulse because it8705 only modulates 0-bits */ -- --static void send_space(unsigned long len) --{ -- send_it87(len, TIME_CONST, IT87_CIR_SPACE, IT87_CIR_BAUDRATE_DIVISOR); --} -- --static void send_pulse(unsigned long len) --{ -- send_it87(len, TIME_CONST, IT87_CIR_PULSE, IT87_CIR_BAUDRATE_DIVISOR); --} -- -- --static void init_send() --{ -- unsigned long flags; -- -- spin_lock_irqsave(&hardware_lock, flags); -- /* RXEN=0: receiver disable */ -- it87_RXEN_mask = 0; -- outb(inb(io + IT87_CIR_RCR) & ~IT87_CIR_RCR_RXEN, -- io + IT87_CIR_RCR); -- spin_unlock_irqrestore(&hardware_lock, flags); -- it87_bits_in_byte_out = 0; -- it87_send_counter = 0; --} -- -- --static void terminate_send(unsigned long len) --{ -- unsigned long flags; -- unsigned long last = 0; -- -- last = it87_send_counter; -- /* make sure all necessary data has been sent */ -- while (last == it87_send_counter) -- send_space(len); -- /* wait until all data sent */ -- while ((inb(io + IT87_CIR_TSR) & IT87_CIR_TSR_TXFBC) != 0) -- ; -- /* then re-enable receiver */ -- spin_lock_irqsave(&hardware_lock, flags); -- it87_RXEN_mask = IT87_CIR_RCR_RXEN; -- outb(inb(io + IT87_CIR_RCR) | IT87_CIR_RCR_RXEN, -- io + IT87_CIR_RCR); -- spin_unlock_irqrestore(&hardware_lock, flags); --} -- -- --static int init_hardware(void) --{ -- unsigned long flags; -- unsigned char it87_rcr = 0; -- -- spin_lock_irqsave(&hardware_lock, flags); -- /* init cir-port */ -- /* enable r/w-access to Baudrate-Register */ -- outb(IT87_CIR_IER_BR, io + IT87_CIR_IER); -- outb(IT87_CIR_BAUDRATE_DIVISOR % 0x100, io+IT87_CIR_BDLR); -- outb(IT87_CIR_BAUDRATE_DIVISOR / 0x100, io+IT87_CIR_BDHR); -- /* Baudrate Register off, define IRQs: Input only */ -- if (digimatrix) { -- outb(IT87_CIR_IER_IEC | IT87_CIR_IER_RFOIE, io + IT87_CIR_IER); -- /* RX: HCFS=0, RXDCR = 001b (33,75..38,25 kHz), RXEN=1 */ -- } else { -- outb(IT87_CIR_IER_IEC | IT87_CIR_IER_RDAIE, io + IT87_CIR_IER); -- /* RX: HCFS=0, RXDCR = 001b (35,6..40,3 kHz), RXEN=1 */ -- } -- it87_rcr = (IT87_CIR_RCR_RXEN & it87_RXEN_mask) | 0x1; -- if (it87_enable_demodulator) -- it87_rcr |= IT87_CIR_RCR_RXEND; -- outb(it87_rcr, io + IT87_CIR_RCR); -- if (digimatrix) { -- /* Set FIFO depth to 1 byte, and disable TX */ -- outb(inb(io + IT87_CIR_TCR1) | 0x00, -- io + IT87_CIR_TCR1); -- -- /* -- * TX: it87_freq (36kHz), 'reserved' sensitivity -- * setting (0x00) -- */ -- outb(((it87_freq - IT87_CIR_FREQ_MIN) << 3) | 0x00, -- io + IT87_CIR_TCR2); -- } else { -- /* TX: 38kHz, 13,3us (pulse-width) */ -- outb(((it87_freq - IT87_CIR_FREQ_MIN) << 3) | 0x06, -- io + IT87_CIR_TCR2); -- } -- spin_unlock_irqrestore(&hardware_lock, flags); -- return 0; --} -- -- --static void drop_hardware(void) --{ -- unsigned long flags; -- -- spin_lock_irqsave(&hardware_lock, flags); -- disable_irq(irq); -- /* receiver disable */ -- it87_RXEN_mask = 0; -- outb(0x1, io + IT87_CIR_RCR); -- /* turn off irqs */ -- outb(0, io + IT87_CIR_IER); -- /* fifo clear */ -- outb(IT87_CIR_TCR1_FIFOCLR, io+IT87_CIR_TCR1); -- /* reset */ -- outb(IT87_CIR_IER_RESET, io+IT87_CIR_IER); -- enable_irq(irq); -- spin_unlock_irqrestore(&hardware_lock, flags); --} -- -- --static unsigned char it87_read(unsigned char port) --{ -- outb(port, IT87_ADRPORT); -- return inb(IT87_DATAPORT); --} -- -- --static void it87_write(unsigned char port, unsigned char data) --{ -- outb(port, IT87_ADRPORT); -- outb(data, IT87_DATAPORT); --} -- -- --/* SECTION: Initialisation */ -- --static int init_port(void) --{ -- unsigned long hw_flags; -- int retval = 0; -- -- unsigned char init_bytes[4] = IT87_INIT; -- unsigned char it87_chipid = 0; -- unsigned char ldn = 0; -- unsigned int it87_io = 0; -- unsigned int it87_irq = 0; -- -- /* Enter MB PnP Mode */ -- outb(init_bytes[0], IT87_ADRPORT); -- outb(init_bytes[1], IT87_ADRPORT); -- outb(init_bytes[2], IT87_ADRPORT); -- outb(init_bytes[3], IT87_ADRPORT); -- -- /* 8712 or 8705 ? */ -- it87_chipid = it87_read(IT87_CHIP_ID1); -- if (it87_chipid != 0x87) { -- retval = -ENXIO; -- return retval; -- } -- it87_chipid = it87_read(IT87_CHIP_ID2); -- if ((it87_chipid != 0x05) && -- (it87_chipid != 0x12) && -- (it87_chipid != 0x18) && -- (it87_chipid != 0x20)) { -- printk(KERN_INFO LIRC_DRIVER_NAME -- ": no IT8704/05/12/18/20 found (claimed IT87%02x), " -- "exiting..\n", it87_chipid); -- retval = -ENXIO; -- return retval; -- } -- printk(KERN_INFO LIRC_DRIVER_NAME -- ": found IT87%02x.\n", -- it87_chipid); -- -- /* get I/O-Port and IRQ */ -- if (it87_chipid == 0x12 || it87_chipid == 0x18) -- ldn = IT8712_CIR_LDN; -- else -- ldn = IT8705_CIR_LDN; -- it87_write(IT87_LDN, ldn); -- -- it87_io = it87_read(IT87_CIR_BASE_MSB) * 256 + -- it87_read(IT87_CIR_BASE_LSB); -- if (it87_io == 0) { -- if (io == 0) -- io = IT87_CIR_DEFAULT_IOBASE; -- printk(KERN_INFO LIRC_DRIVER_NAME -- ": set default io 0x%x\n", -- io); -- it87_write(IT87_CIR_BASE_MSB, io / 0x100); -- it87_write(IT87_CIR_BASE_LSB, io % 0x100); -- } else -- io = it87_io; -- -- it87_irq = it87_read(IT87_CIR_IRQ); -- if (digimatrix || it87_irq == 0) { -- if (irq == 0) -- irq = IT87_CIR_DEFAULT_IRQ; -- printk(KERN_INFO LIRC_DRIVER_NAME -- ": set default irq 0x%x\n", -- irq); -- it87_write(IT87_CIR_IRQ, irq); -- } else -- irq = it87_irq; -- -- spin_lock_irqsave(&hardware_lock, hw_flags); -- /* reset */ -- outb(IT87_CIR_IER_RESET, io+IT87_CIR_IER); -- /* fifo clear */ -- outb(IT87_CIR_TCR1_FIFOCLR | -- /* IT87_CIR_TCR1_ILE | */ -- IT87_CIR_TCR1_TXRLE | -- IT87_CIR_TCR1_TXENDF, io+IT87_CIR_TCR1); -- spin_unlock_irqrestore(&hardware_lock, hw_flags); -- -- /* get I/O port access and IRQ line */ -- if (request_region(io, 8, LIRC_DRIVER_NAME) == NULL) { -- printk(KERN_ERR LIRC_DRIVER_NAME -- ": i/o port 0x%.4x already in use.\n", io); -- /* Leaving MB PnP Mode */ -- it87_write(IT87_CFGCTRL, 0x2); -- return -EBUSY; -- } -- -- /* activate CIR-Device */ -- it87_write(IT87_CIR_ACT, 0x1); -- -- /* Leaving MB PnP Mode */ -- it87_write(IT87_CFGCTRL, 0x2); -- -- retval = request_irq(irq, it87_interrupt, 0 /*IRQF_DISABLED*/, -- LIRC_DRIVER_NAME, NULL); -- if (retval < 0) { -- printk(KERN_ERR LIRC_DRIVER_NAME -- ": IRQ %d already in use.\n", -- irq); -- release_region(io, 8); -- return retval; -- } -- -- printk(KERN_INFO LIRC_DRIVER_NAME -- ": I/O port 0x%.4x, IRQ %d.\n", io, irq); -- -- init_timer(&timerlist); -- timerlist.function = it87_timeout; -- timerlist.data = 0xabadcafe; -- -- return 0; --} -- -- --static void drop_port(void) --{ --#if 0 -- unsigned char init_bytes[4] = IT87_INIT; -- -- /* Enter MB PnP Mode */ -- outb(init_bytes[0], IT87_ADRPORT); -- outb(init_bytes[1], IT87_ADRPORT); -- outb(init_bytes[2], IT87_ADRPORT); -- outb(init_bytes[3], IT87_ADRPORT); -- -- /* deactivate CIR-Device */ -- it87_write(IT87_CIR_ACT, 0x0); -- -- /* Leaving MB PnP Mode */ -- it87_write(IT87_CFGCTRL, 0x2); --#endif -- -- del_timer_sync(&timerlist); -- free_irq(irq, NULL); -- release_region(io, 8); --} -- -- --static int init_lirc_it87(void) --{ -- int retval; -- -- init_waitqueue_head(&lirc_read_queue); -- retval = init_port(); -- if (retval < 0) -- return retval; -- init_hardware(); -- printk(KERN_INFO LIRC_DRIVER_NAME ": Installed.\n"); -- return 0; --} -- --static int it87_probe(struct pnp_dev *pnp_dev, -- const struct pnp_device_id *dev_id) --{ -- int retval; -- -- driver.dev = &pnp_dev->dev; -- -- retval = init_chrdev(); -- if (retval < 0) -- return retval; -- -- retval = init_lirc_it87(); -- if (retval) -- goto init_lirc_it87_failed; -- -- return 0; -- --init_lirc_it87_failed: -- drop_chrdev(); -- -- return retval; --} -- --static int __init lirc_it87_init(void) --{ -- return pnp_register_driver(&it87_pnp_driver); --} -- -- --static void __exit lirc_it87_exit(void) --{ -- drop_hardware(); -- drop_chrdev(); -- drop_port(); -- pnp_unregister_driver(&it87_pnp_driver); -- printk(KERN_INFO LIRC_DRIVER_NAME ": Uninstalled.\n"); --} -- --/* SECTION: PNP for ITE8704/13/18 */ -- --static const struct pnp_device_id pnp_dev_table[] = { -- {"ITE8704", 0}, -- {"ITE8713", 0}, -- {} --}; -- --MODULE_DEVICE_TABLE(pnp, pnp_dev_table); -- --static struct pnp_driver it87_pnp_driver = { -- .name = LIRC_DRIVER_NAME, -- .id_table = pnp_dev_table, -- .probe = it87_probe, --}; -- --module_init(lirc_it87_init); --module_exit(lirc_it87_exit); -- --MODULE_DESCRIPTION("LIRC driver for ITE IT8704/05/12/18/20 CIR port"); --MODULE_AUTHOR("Hans-Gunter Lutke Uphues"); --MODULE_LICENSE("GPL"); -- --module_param(io, int, S_IRUGO); --MODULE_PARM_DESC(io, "I/O base address (default: 0x310)"); -- --module_param(irq, int, S_IRUGO); --#ifdef LIRC_IT87_DIGIMATRIX --MODULE_PARM_DESC(irq, "Interrupt (1,3-12) (default: 9)"); --#else --MODULE_PARM_DESC(irq, "Interrupt (1,3-12) (default: 7)"); --#endif -- --module_param(it87_enable_demodulator, bool, S_IRUGO); --MODULE_PARM_DESC(it87_enable_demodulator, -- "Receiver demodulator enable/disable (1/0), default: 0"); -- --module_param(debug, bool, S_IRUGO | S_IWUSR); --MODULE_PARM_DESC(debug, "Enable debugging messages"); -- --module_param(digimatrix, bool, S_IRUGO | S_IWUSR); --#ifdef LIRC_IT87_DIGIMATRIX --MODULE_PARM_DESC(digimatrix, -- "Asus Digimatrix it87 compat. enable/disable (1/0), default: 1"); --#else --MODULE_PARM_DESC(digimatrix, -- "Asus Digimatrix it87 compat. enable/disable (1/0), default: 0"); --#endif -- -- --module_param(it87_freq, int, S_IRUGO); --#ifdef LIRC_IT87_DIGIMATRIX --MODULE_PARM_DESC(it87_freq, -- "Carrier demodulator frequency (kHz), (default: 36)"); --#else --MODULE_PARM_DESC(it87_freq, -- "Carrier demodulator frequency (kHz), (default: 38)"); --#endif -diff -Naur linux-2.6.38-rc5/drivers/staging/lirc/lirc_it87.h linux-2.6.38-rc5.patch/drivers/staging/lirc/lirc_it87.h ---- linux-2.6.38-rc5/drivers/staging/lirc/lirc_it87.h 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/staging/lirc/lirc_it87.h 1970-01-01 01:00:00.000000000 +0100 -@@ -1,116 +0,0 @@ --/* lirc_it87.h */ --/* SECTION: Definitions */ -- --/********************************* ITE IT87xx ************************/ -- --/* based on the following documentation from ITE: -- a) IT8712F Preliminary CIR Programming Guide V0.1 -- b) IT8705F Simple LPC I/O Preliminary Specification V0.3 -- c) IT8712F EC-LPC I/O Preliminary Specification V0.5 --*/ -- --/* IT8712/05 Ports: */ --#define IT87_ADRPORT 0x2e --#define IT87_DATAPORT 0x2f --#define IT87_INIT {0x87, 0x01, 0x55, 0x55} -- --/* alternate Ports: */ --/* --#define IT87_ADRPORT 0x4e --#define IT87_DATAPORT 0x4f --#define IT87_INIT {0x87, 0x01, 0x55, 0xaa} -- */ -- --/* IT8712/05 Registers */ --#define IT87_CFGCTRL 0x2 --#define IT87_LDN 0x7 --#define IT87_CHIP_ID1 0x20 --#define IT87_CHIP_ID2 0x21 --#define IT87_CFG_VERSION 0x22 --#define IT87_SWSUSPEND 0x23 -- --#define IT8712_CIR_LDN 0xa --#define IT8705_CIR_LDN 0x7 -- --/* CIR Configuration Registers: */ --#define IT87_CIR_ACT 0x30 --#define IT87_CIR_BASE_MSB 0x60 --#define IT87_CIR_BASE_LSB 0x61 --#define IT87_CIR_IRQ 0x70 --#define IT87_CIR_CONFIG 0xf0 -- --/* List of IT87_CIR registers: offset to BaseAddr */ --#define IT87_CIR_DR 0 --#define IT87_CIR_IER 1 --#define IT87_CIR_RCR 2 --#define IT87_CIR_TCR1 3 --#define IT87_CIR_TCR2 4 --#define IT87_CIR_TSR 5 --#define IT87_CIR_RSR 6 --#define IT87_CIR_BDLR 5 --#define IT87_CIR_BDHR 6 --#define IT87_CIR_IIR 7 -- --/* Bit Definition */ --/* IER: */ --#define IT87_CIR_IER_TM_EN 0x80 --#define IT87_CIR_IER_RESEVED 0x40 --#define IT87_CIR_IER_RESET 0x20 --#define IT87_CIR_IER_BR 0x10 --#define IT87_CIR_IER_IEC 0x8 --#define IT87_CIR_IER_RFOIE 0x4 --#define IT87_CIR_IER_RDAIE 0x2 --#define IT87_CIR_IER_TLDLIE 0x1 -- --/* RCR: */ --#define IT87_CIR_RCR_RDWOS 0x80 --#define IT87_CIR_RCR_HCFS 0x40 --#define IT87_CIR_RCR_RXEN 0x20 --#define IT87_CIR_RCR_RXEND 0x10 --#define IT87_CIR_RCR_RXACT 0x8 --#define IT87_CIR_RCR_RXDCR 0x7 -- --/* TCR1: */ --#define IT87_CIR_TCR1_FIFOCLR 0x80 --#define IT87_CIR_TCR1_ILE 0x40 --#define IT87_CIR_TCR1_FIFOTL 0x30 --#define IT87_CIR_TCR1_TXRLE 0x8 --#define IT87_CIR_TCR1_TXENDF 0x4 --#define IT87_CIR_TCR1_TXMPM 0x3 -- --/* TCR2: */ --#define IT87_CIR_TCR2_CFQ 0xf8 --#define IT87_CIR_TCR2_TXMPW 0x7 -- --/* TSR: */ --#define IT87_CIR_TSR_RESERVED 0xc0 --#define IT87_CIR_TSR_TXFBC 0x3f -- --/* RSR: */ --#define IT87_CIR_RSR_RXFTO 0x80 --#define IT87_CIR_RSR_RESERVED 0x40 --#define IT87_CIR_RSR_RXFBC 0x3f -- --/* IIR: */ --#define IT87_CIR_IIR_RESERVED 0xf8 --#define IT87_CIR_IIR_IID 0x6 --#define IT87_CIR_IIR_IIP 0x1 -- --/* TM: */ --#define IT87_CIR_TM_IL_SEL 0x80 --#define IT87_CIR_TM_RESERVED 0x40 --#define IT87_CIR_TM_TM_REG 0x3f -- --#define IT87_CIR_FIFO_SIZE 32 -- --/* Baudratedivisor for IT87: power of 2: only 1,2,4 or 8) */ --#define IT87_CIR_BAUDRATE_DIVISOR 0x1 --#define IT87_CIR_DEFAULT_IOBASE 0x310 --#define IT87_CIR_DEFAULT_IRQ 0x7 --#define IT87_CIR_SPACE 0x00 --#define IT87_CIR_PULSE 0xff --#define IT87_CIR_FREQ_MIN 27 --#define IT87_CIR_FREQ_MAX 58 --#define TIME_CONST (IT87_CIR_BAUDRATE_DIVISOR * 8000000ul / 115200ul) -- --/********************************* ITE IT87xx ************************/ -diff -Naur linux-2.6.38-rc5/drivers/staging/lirc/Makefile linux-2.6.38-rc5.patch/drivers/staging/lirc/Makefile ---- linux-2.6.38-rc5/drivers/staging/lirc/Makefile 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/staging/lirc/Makefile 2011-02-22 03:19:26.756636211 +0100 -@@ -6,7 +6,6 @@ - obj-$(CONFIG_LIRC_BT829) += lirc_bt829.o - obj-$(CONFIG_LIRC_IGORPLUGUSB) += lirc_igorplugusb.o - obj-$(CONFIG_LIRC_IMON) += lirc_imon.o --obj-$(CONFIG_LIRC_IT87) += lirc_it87.o - obj-$(CONFIG_LIRC_ITE8709) += lirc_ite8709.o - obj-$(CONFIG_LIRC_PARALLEL) += lirc_parallel.o - obj-$(CONFIG_LIRC_SASEM) += lirc_sasem.o diff --git a/packages/linux/patches/linux-2.6.39-rc1-000_crosscompile.patch b/packages/linux/patches/linux-2.6.39-rc1-000_crosscompile.patch deleted file mode 100644 index b4fc575828..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-000_crosscompile.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- linux-2.6.24-rc2.orig/arch/x86/boot/tools/build.c 2007-10-06 12:26:14.000000000 +0200 -+++ linux-2.6.24-rc2/arch/x86/boot/tools/build.c 2007-10-06 12:27:36.000000000 +0200 -@@ -29,7 +29,6 @@ - #include - #include - #include --#include - #include - #include - #include -@@ -42,6 +41,11 @@ - #define DEFAULT_MAJOR_ROOT 0 - #define DEFAULT_MINOR_ROOT 0 - -+#undef major -+#define major(dev) ((int)(((dev) >> 8) & 0xff)) -+#undef minor -+#define minor(dev) ((int)((dev) & 0xff)) -+ - /* Minimal number of setup sectors */ - #define SETUP_SECT_MIN 5 - #define SETUP_SECT_MAX 64 diff --git a/packages/linux/patches/linux-2.6.39-rc1-002_bash_only_feature.patch b/packages/linux/patches/linux-2.6.39-rc1-002_bash_only_feature.patch deleted file mode 100644 index a1028d15aa..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-002_bash_only_feature.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: linux-2.6.16/scripts/gen_initramfs_list.sh -=================================================================== ---- linux-2.6.16.orig/scripts/gen_initramfs_list.sh 2006-03-20 18:41:34.000000000 +0100 -+++ linux-2.6.16/scripts/gen_initramfs_list.sh 2006-03-20 18:42:40.000000000 +0100 -@@ -56,9 +56,7 @@ - - parse() { - local location="$1" -- local name="${location/${srcdir}//}" -- # change '//' into '/' -- name="${name//\/\///}" -+ local name="$(echo "$location" | sed -e 's%$srcdir%%' -e 's%//*%/%g')" - local mode="$2" - local uid="$3" - local gid="$4" diff --git a/packages/linux/patches/linux-2.6.39-rc1-003-no_dev_console.patch b/packages/linux/patches/linux-2.6.39-rc1-003-no_dev_console.patch deleted file mode 100644 index 9b5e51437d..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-003-no_dev_console.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c ---- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200 -+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200 -@@ -886,8 +886,14 @@ - do_basic_setup(); - - /* Open the /dev/console on the rootfs, this should never fail */ -- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) -- printk(KERN_WARNING "Warning: unable to open an initial console.\n"); -+ char *console = "/dev_console"; -+ -+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) { -+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1); -+ if (sys_open(console, O_RDWR, 0) < 0) -+ printk(KERN_WARNING "Warning: unable to open an initial console.\n"); -+ sys_unlink(console); -+ } - - (void) sys_dup(0); - (void) sys_dup(0); diff --git a/packages/linux/patches/linux-2.6.39-rc1-004_lower_undefined_mode_timeout.patch b/packages/linux/patches/linux-2.6.39-rc1-004_lower_undefined_mode_timeout.patch deleted file mode 100644 index a0aca61d23..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-004_lower_undefined_mode_timeout.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/tty.c linux-2.6.23-rc9/arch/i386/boot/tty.c ---- linux-2.6.23-rc9.orig/arch/x86/boot/tty.c 2007-10-06 12:26:14.000000000 +0200 -+++ linux-2.6.23-rc9/arch/x86/boot/tty.c 2007-10-06 12:37:47.000000000 +0200 -@@ -92,7 +92,7 @@ - - int getchar_timeout(void) - { -- int cnt = 30; -+ int cnt = 3; - int t0, t1; - - t0 = gettime(); -diff -Naur linux-2.6.23-rc9.orig/arch/i386/boot/video.c linux-2.6.23-rc9/arch/i386/boot/video.c ---- linux-2.6.23-rc9.orig/arch/x86/boot/video.c 2007-10-06 12:26:14.000000000 +0200 -+++ linux-2.6.23-rc9/arch/x86/boot/video.c 2007-10-06 12:36:05.000000000 +0200 -@@ -329,7 +329,7 @@ - unsigned int sel; - - puts("Press to see video modes available, " -- " to continue, or wait 30 sec\n"); -+ " to continue, or wait 3 sec\n"); - - kbd_flush(); - while (1) { diff --git a/packages/linux/patches/linux-2.6.39-rc1-005_kconfig_no_timestamp.patch b/packages/linux/patches/linux-2.6.39-rc1-005_kconfig_no_timestamp.patch deleted file mode 100644 index 332e553831..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-005_kconfig_no_timestamp.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: linux-2.6.16/scripts/kconfig/confdata.c -=================================================================== ---- linux-2.6.16.orig/scripts/kconfig/confdata.c 2006-03-20 06:53:29.000000000 +0100 -+++ linux-2.6.16/scripts/kconfig/confdata.c 2006-03-20 18:47:06.000000000 +0100 -@@ -340,7 +340,7 @@ - int type, l; - const char *str; - time_t now; -- int use_timestamp = 1; -+ int use_timestamp = 0; - char *env; - - dirname[0] = 0; diff --git a/packages/linux/patches/linux-2.6.39-rc1-006_enable_utf8.patch b/packages/linux/patches/linux-2.6.39-rc1-006_enable_utf8.patch deleted file mode 100644 index bee1cf3da8..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-006_enable_utf8.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Naur linux-2.6.31-rc4.orig/fs/fat/inode.c linux-2.6.31-rc4/fs/fat/inode.c ---- linux-2.6.31-rc4.orig/fs/fat/inode.c 2009-07-25 12:47:41.000000000 +0200 -+++ linux-2.6.31-rc4/fs/fat/inode.c 2009-07-25 13:38:18.000000000 +0200 -@@ -979,7 +979,8 @@ - } - opts->name_check = 'n'; - opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK = 0; -- opts->utf8 = opts->unicode_xlate = 0; -+ opts->utf8 = 1; -+ opts->unicode_xlate = 0; - opts->numtail = 1; - opts->usefree = opts->nocase = 0; - opts->tz_utc = 0; -diff -Naur linux-2.6.31-rc4.orig/fs/isofs/inode.c linux-2.6.31-rc4/fs/isofs/inode.c ---- linux-2.6.31-rc4.orig/fs/isofs/inode.c 2009-07-25 12:47:41.000000000 +0200 -+++ linux-2.6.31-rc4/fs/isofs/inode.c 2009-07-25 13:38:49.000000000 +0200 -@@ -377,7 +377,7 @@ - popt->gid = 0; - popt->uid = 0; - popt->iocharset = NULL; -- popt->utf8 = 0; -+ popt->utf8 = 1; - popt->overriderockperm = 0; - popt->session=-1; - popt->sbsector=-1; diff --git a/packages/linux/patches/linux-2.6.39-rc1-007_die_floppy_die.patch b/packages/linux/patches/linux-2.6.39-rc1-007_die_floppy_die.patch deleted file mode 100644 index 76db312182..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-007_die_floppy_die.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001 -From: Kyle McMartin -Date: Tue, 30 Mar 2010 00:04:29 -0400 -Subject: die-floppy-die - -Kill the floppy.ko pnp modalias. We were surviving just fine without -autoloading floppy drivers, tyvm. - -Please feel free to register all complaints in the wastepaper bin. ---- - drivers/block/floppy.c | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) - -diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c -index 90c4038..f4a0b90 100644 ---- a/drivers/block/floppy.c -+++ b/drivers/block/floppy.c -@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = { - {"PNP0700", 0}, - {} - }; -- --MODULE_DEVICE_TABLE(pnp, floppy_pnpids); -+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */ - - #else - --- -1.7.0.1 - diff --git a/packages/linux/patches/linux-2.6.39-rc1-009_disable_i8042_check_on_apple_mac.patch b/packages/linux/patches/linux-2.6.39-rc1-009_disable_i8042_check_on_apple_mac.patch deleted file mode 100644 index f99d0f900c..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-009_disable_i8042_check_on_apple_mac.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 2a79554c864ac58fa2ad982f0fcee2cc2aa33eb5 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Thu, 20 May 2010 10:30:31 -0400 -Subject: Disable i8042 checks on Intel Apple Macs - -As those computers never had any i8042 controllers, and the -current lookup code could potentially lock up/hang/wait for -timeout for long periods of time. - -Fixes intermittent hangs on boot on a MacbookAir1,1 - -Signed-off-by: Bastien Nocera ---- - drivers/input/serio/i8042.c | 22 ++++++++++++++++++++++ - 1 files changed, 22 insertions(+), 0 deletions(-) - -diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c -index 6440a8f..4d7cf98 100644 ---- a/drivers/input/serio/i8042.c -+++ b/drivers/input/serio/i8042.c -@@ -1451,6 +1451,22 @@ static struct platform_driver i8042_driver = { - .shutdown = i8042_shutdown, - }; - -+#ifdef CONFIG_DMI -+static struct dmi_system_id __initdata dmi_system_table[] = { -+ { -+ .matches = { -+ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Computer, Inc.") -+ }, -+ }, -+ { -+ .matches = { -+ DMI_MATCH(DMI_BIOS_VENDOR, "Apple Inc.") -+ }, -+ }, -+ {} -+}; -+#endif /*CONFIG_DMI*/ -+ - static int __init i8042_init(void) - { - struct platform_device *pdev; -@@ -1458,6 +1474,12 @@ static int __init i8042_init(void) - - dbg_init(); - -+#ifdef CONFIG_DMI -+ /* Intel Apple Macs never have an i8042 controller */ -+ if (dmi_check_system(dmi_system_table) > 0) -+ return -ENODEV; -+#endif /*CONFIG_DMI*/ -+ - err = i8042_platform_init(); - if (err) - return err; --- -1.7.0.1 - diff --git a/packages/linux/patches/linux-2.6.39-rc1-052-aureal_remote_quirk-0.1.patch b/packages/linux/patches/linux-2.6.39-rc1-052-aureal_remote_quirk-0.1.patch deleted file mode 100644 index 60cdbf0938..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-052-aureal_remote_quirk-0.1.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff -Naur linux-2.6.37/drivers/hid/hid-aureal.c linux-2.6.37.patch/drivers/hid/hid-aureal.c ---- linux-2.6.37/drivers/hid/hid-aureal.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.37.patch/drivers/hid/hid-aureal.c 2011-01-07 22:35:31.413389936 +0100 -@@ -0,0 +1,60 @@ -+/* -+ * HID driver for some sunplus "special" devices -+ * -+ * Copyright (c) 1999 Andreas Gal -+ * Copyright (c) 2000-2005 Vojtech Pavlik -+ * Copyright (c) 2005 Michael Haboustak for Concept2, Inc -+ * Copyright (c) 2006-2007 Jiri Kosina -+ * Copyright (c) 2007 Paul Walmsley -+ * Copyright (c) 2008 Jiri Slaby -+ * Copyright (c) 2010 Franco Catrin -+ */ -+ -+/* -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the Free -+ * Software Foundation; either version 2 of the License, or (at your option) -+ * any later version. -+ */ -+ -+#include -+#include -+#include -+ -+#include "hid-ids.h" -+ -+static __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc, -+ unsigned int *rsize) -+{ -+ if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) { -+ dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 " -+ "report descriptor. Keyboard Logical Maximum = 101\n"); -+ rdesc[53] = 0x65; -+ } return rdesc; -+} -+ -+static const struct hid_device_id aureal_devices[] = { -+ { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) }, -+ { } -+}; -+MODULE_DEVICE_TABLE(hid, aureal_devices); -+ -+static struct hid_driver aureal_driver = { -+ .name = "aureal", -+ .id_table = aureal_devices, -+ .report_fixup = aureal_report_fixup, -+}; -+ -+static int __init aureal_init(void) -+{ -+ return hid_register_driver(&aureal_driver); -+} -+ -+static void __exit aureal_exit(void) -+{ -+ hid_unregister_driver(&aureal_driver); -+} -+ -+module_init(aureal_init); -+module_exit(aureal_exit); -+MODULE_LICENSE("GPL"); -diff -Naur linux-2.6.37/drivers/hid/hid-ids.h linux-2.6.37.patch/drivers/hid/hid-ids.h ---- linux-2.6.37/drivers/hid/hid-ids.h 2011-01-05 01:50:19.000000000 +0100 -+++ linux-2.6.37.patch/drivers/hid/hid-ids.h 2011-01-07 22:35:31.414389949 +0100 -@@ -6,6 +6,7 @@ - * Copyright (c) 2005 Michael Haboustak for Concept2, Inc - * Copyright (c) 2006-2007 Jiri Kosina - * Copyright (c) 2007 Paul Walmsley -+ * Copyright (c) 2010 Franco Catrin - */ - - /* -@@ -327,6 +328,9 @@ - #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 - #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 - -+#define USB_VENDOR_ID_AUREAL 0x0755 -+#define USB_DEVICE_ID_AUREAL_W01RN 0x2626 -+ - #define USB_VENDOR_ID_LABTEC 0x1020 - #define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 - -diff -Naur linux-2.6.37/drivers/hid/Kconfig linux-2.6.37.patch/drivers/hid/Kconfig ---- linux-2.6.37/drivers/hid/Kconfig 2011-01-05 01:50:19.000000000 +0100 -+++ linux-2.6.37.patch/drivers/hid/Kconfig 2011-01-07 22:35:31.467390603 +0100 -@@ -87,6 +87,13 @@ - Say Y here if you want support for keyboards of Apple iBooks, PowerBooks, - MacBooks, MacBook Pros and Apple Aluminum. - -+config HID_AUREAL -+ tristate "Aureal" if EMBEDDED -+ depends on USB_HID -+ default !EMBEDDED -+ ---help--- -+ Support for Aureal Cy se W-01RN Remote Controller -+ - config HID_BELKIN - tristate "Belkin Flip KVM and Wireless keyboard" if EMBEDDED - depends on USB_HID -diff -Naur linux-2.6.37/drivers/hid/Makefile linux-2.6.37.patch/drivers/hid/Makefile ---- linux-2.6.37/drivers/hid/Makefile 2011-01-05 01:50:19.000000000 +0100 -+++ linux-2.6.37.patch/drivers/hid/Makefile 2011-01-07 22:35:31.547391590 +0100 -@@ -29,6 +29,7 @@ - obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o - obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o - obj-$(CONFIG_HID_APPLE) += hid-apple.o -+obj-$(CONFIG_HID_AUREAL) += hid-aureal.o - obj-$(CONFIG_HID_BELKIN) += hid-belkin.o - obj-$(CONFIG_HID_CANDO) += hid-cando.o - obj-$(CONFIG_HID_CHERRY) += hid-cherry.o diff --git a/packages/linux/patches/linux-2.6.39-rc1-053_ati-remote_all_keys_and_keychange-0.1.patch b/packages/linux/patches/linux-2.6.39-rc1-053_ati-remote_all_keys_and_keychange-0.1.patch deleted file mode 100644 index 9ed2b41967..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-053_ati-remote_all_keys_and_keychange-0.1.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -Naur linux-2.6.37-rc6/drivers/input/misc/ati_remote.c linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c ---- linux-2.6.37-rc6/drivers/input/misc/ati_remote.c 2010-12-16 02:24:48.000000000 +0100 -+++ linux-2.6.37-rc6.patch/drivers/input/misc/ati_remote.c 2010-12-16 12:35:04.454620549 +0100 -@@ -90,6 +90,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -131,6 +132,10 @@ - module_param(debug, int, 0644); - MODULE_PARM_DESC(debug, "Enable extra debug messages and information"); - -+static int keychange; -+module_param(keychange, int, 0644); -+MODULE_PARM_DESC(keychange, "Enable support for Keychange remotes"); -+ - static int repeat_filter = FILTER_TIME; - module_param(repeat_filter, int, 0644); - MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec"); -@@ -285,6 +290,25 @@ - {KIND_FILTERED, 0xf4, 0x2F, EV_KEY, KEY_END, 1}, /* END */ - {KIND_FILTERED, 0xf5, 0x30, EV_KEY, KEY_SELECT, 1}, /* SELECT */ - -+ /* Coloured keys */ -+ {KIND_FILTERED, 0xf7, 0x32, EV_KEY, KEY_PLAYCD, 1}, /* TXT Rot */ -+ {KIND_FILTERED, 0xf8, 0x33, EV_KEY, KEY_PAUSECD, 1}, /* TXT Gr */ -+ {KIND_FILTERED, 0xf9, 0x34, EV_KEY, KEY_PROG3, 1}, /* TXT Gelb */ -+ {KIND_FILTERED, 0xfa, 0x35, EV_KEY, KEY_PROG4, 1}, /* TXT Blau */ -+ -+ /* More Keys */ -+ {KIND_FILTERED, 0xac, 0x37, EV_KEY, KEY_G, 1}, /* Acquire Image */ -+ {KIND_FILTERED, 0xfe, 0x39, EV_KEY, KEY_H, 1}, /* FULL SCREEN _| */ -+ {KIND_FILTERED, 0xfb, 0x36, EV_KEY, KEY_I, 1}, /* Rename */ -+ {KIND_FILTERED, 0xf1, 0x2c, EV_KEY, KEY_J, 1}, /* TV */ -+ {KIND_FILTERED, 0xf6, 0x31, EV_KEY, KEY_K, 1}, /* Video Desktop */ -+ {KIND_FILTERED, 0xa1, 0x00, EV_KEY, KEY_L, 1}, -+ -+ /* Keys added by torsten at archesoft.de */ -+ {KIND_FILTERED, 0xff, 0x3a, EV_KEY, KEY_M, 1}, /* dvd audio */ -+ {KIND_FILTERED, 0xfc, 0x37, EV_KEY, KEY_N, 1}, /* aquire image */ -+ {KIND_FILTERED, 0xfd, 0x38, EV_KEY, KEY_O, 1}, /* edit image */ -+ - {KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0} - }; - -@@ -409,6 +433,16 @@ - { - int i; - -+ /* If keychange is enabled we undo the keychanges of the remote here */ -+ -+ if (keychange){ -+ if (d2 & 0x80) { -+ d1 += 0x80; -+ d2 -= 0x80; -+ } -+ } -+ -+ - for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) { - /* - * Decide if the table entry matches the remote input. diff --git a/packages/linux/patches/linux-2.6.39-rc1-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch b/packages/linux/patches/linux-2.6.39-rc1-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch deleted file mode 100644 index 432a72d48d..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Naur linux-2.6.38-rc5/drivers/ata/libata-core.c linux-2.6.38-rc5.patch/drivers/ata/libata-core.c ---- linux-2.6.38-rc5/drivers/ata/libata-core.c 2011-02-16 04:23:45.000000000 +0100 -+++ linux-2.6.38-rc5.patch/drivers/ata/libata-core.c 2011-02-22 00:57:25.789636966 +0100 -@@ -4139,6 +4139,7 @@ - */ - { "PIONEER DVD-RW DVRTD08", "1.00", ATA_HORKAGE_NOSETXFER }, - { "PIONEER DVD-RW DVR-212D", "1.28", ATA_HORKAGE_NOSETXFER }, -+ { "PIONEER DVD-RW DVR-216D", "1.07", ATA_HORKAGE_NOSETXFER }, - - /* End Marker */ - { } diff --git a/packages/linux/patches/linux-2.6.39-rc1-716_mm-zero_swappiness.patch b/packages/linux/patches/linux-2.6.39-rc1-716_mm-zero_swappiness.patch deleted file mode 100644 index fad5b48936..0000000000 --- a/packages/linux/patches/linux-2.6.39-rc1-716_mm-zero_swappiness.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - mm/vmscan.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: linux-2.6.37-ck2/mm/vmscan.c -=================================================================== ---- linux-2.6.37-ck2.orig/mm/vmscan.c 2011-01-06 14:04:10.000000000 +1100 -+++ linux-2.6.37-ck2/mm/vmscan.c 2011-02-14 10:11:00.536252000 +1100 -@@ -133,7 +133,7 @@ - /* - * From 0 .. 100. Higher means more swappy. - */ --int vm_swappiness = 60; -+int vm_swappiness; - long vm_total_pages; /* The total number of pages which the VM controls */ - - static LIST_HEAD(shrinker_list); diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-000_crosscompile.patch b/packages/linux/patches/linux-2.6.39-rc2-000_crosscompile.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-000_crosscompile.patch rename to packages/linux/patches/linux-2.6.39-rc2-000_crosscompile.patch diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-002-bash-only-feature.patch b/packages/linux/patches/linux-2.6.39-rc2-002_bash_only_feature.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-002-bash-only-feature.patch rename to packages/linux/patches/linux-2.6.39-rc2-002_bash_only_feature.patch diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-003-no_dev_console.patch b/packages/linux/patches/linux-2.6.39-rc2-003-no_dev_console.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-003-no_dev_console.patch rename to packages/linux/patches/linux-2.6.39-rc2-003-no_dev_console.patch diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-004-lower-undefined-mode-timeout.patch b/packages/linux/patches/linux-2.6.39-rc2-004_lower_undefined_mode_timeout.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-004-lower-undefined-mode-timeout.patch rename to packages/linux/patches/linux-2.6.39-rc2-004_lower_undefined_mode_timeout.patch diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-005-kconfig-no-timestamp.patch b/packages/linux/patches/linux-2.6.39-rc2-005_kconfig_no_timestamp.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-005-kconfig-no-timestamp.patch rename to packages/linux/patches/linux-2.6.39-rc2-005_kconfig_no_timestamp.patch diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-006-enable-utf8.patch b/packages/linux/patches/linux-2.6.39-rc2-006_enable_utf8.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-006-enable-utf8.patch rename to packages/linux/patches/linux-2.6.39-rc2-006_enable_utf8.patch diff --git a/packages/linux/patches/linux-2.6.35-ti.980.1r14-007-die-floppy-die.patch b/packages/linux/patches/linux-2.6.39-rc2-007_die_floppy_die.patch similarity index 100% rename from packages/linux/patches/linux-2.6.35-ti.980.1r14-007-die-floppy-die.patch rename to packages/linux/patches/linux-2.6.39-rc2-007_die_floppy_die.patch diff --git a/packages/linux/patches/linux-2.6.39-rc1-008-hda_intel_prealloc_4mb_dmabuffer.patch b/packages/linux/patches/linux-2.6.39-rc2-008-hda_intel_prealloc_4mb_dmabuffer.patch similarity index 100% rename from packages/linux/patches/linux-2.6.39-rc1-008-hda_intel_prealloc_4mb_dmabuffer.patch rename to packages/linux/patches/linux-2.6.39-rc2-008-hda_intel_prealloc_4mb_dmabuffer.patch diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-009_disable_i8042_check_on_apple_mac.patch b/packages/linux/patches/linux-2.6.39-rc2-009_disable_i8042_check_on_apple_mac.patch similarity index 100% rename from packages/linux/patches/linux-2.6.38-ti-omap4-009_disable_i8042_check_on_apple_mac.patch rename to packages/linux/patches/linux-2.6.39-rc2-009_disable_i8042_check_on_apple_mac.patch diff --git a/packages/linux/patches/linux-2.6.39-rc1-050_add_appleir_usb_driver.patch b/packages/linux/patches/linux-2.6.39-rc2-050_add_appleir_usb_driver.patch similarity index 100% rename from packages/linux/patches/linux-2.6.39-rc1-050_add_appleir_usb_driver.patch rename to packages/linux/patches/linux-2.6.39-rc2-050_add_appleir_usb_driver.patch diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-052-aureal_remote_quirk-0.1.patch b/packages/linux/patches/linux-2.6.39-rc2-052-aureal_remote_quirk-0.1.patch similarity index 100% rename from packages/linux/patches/linux-2.6.38-ti-omap4-052-aureal_remote_quirk-0.1.patch rename to packages/linux/patches/linux-2.6.39-rc2-052-aureal_remote_quirk-0.1.patch diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-053_ati-remote_all_keys_and_keychange-0.1.patch b/packages/linux/patches/linux-2.6.39-rc2-053_ati-remote_all_keys_and_keychange-0.1.patch similarity index 100% rename from packages/linux/patches/linux-2.6.38-ti-omap4-053_ati-remote_all_keys_and_keychange-0.1.patch rename to packages/linux/patches/linux-2.6.39-rc2-053_ati-remote_all_keys_and_keychange-0.1.patch diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch b/packages/linux/patches/linux-2.6.39-rc2-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch similarity index 100% rename from packages/linux/patches/linux-2.6.38-ti-omap4-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch rename to packages/linux/patches/linux-2.6.39-rc2-062-Pioneer_DVR-216D_failed_xfermode-0.1.patch diff --git a/packages/linux/patches/linux-2.6.39-rc1-321-linux_omap_dss2_fix_SMC_instructions.patch b/packages/linux/patches/linux-2.6.39-rc2-321-linux_omap_dss2_fix_SMC_instructions.patch similarity index 100% rename from packages/linux/patches/linux-2.6.39-rc1-321-linux_omap_dss2_fix_SMC_instructions.patch rename to packages/linux/patches/linux-2.6.39-rc2-321-linux_omap_dss2_fix_SMC_instructions.patch diff --git a/packages/linux/patches/linux-2.6.39-rc2-322-omap4_pandaboard_fix_dvi_support-0.1.patch b/packages/linux/patches/linux-2.6.39-rc2-322-omap4_pandaboard_fix_dvi_support-0.1.patch new file mode 100644 index 0000000000..c2a38bff8a --- /dev/null +++ b/packages/linux/patches/linux-2.6.39-rc2-322-omap4_pandaboard_fix_dvi_support-0.1.patch @@ -0,0 +1,2374 @@ +From 1c2de32098b02be086df5e590895fa53cc598de1 Mon Sep 17 00:00:00 2001 +From: David Anders +Date: Wed, 30 Mar 2011 16:48:01 -0500 +Subject: [PATCH] omap4: pandaboard: fix dvi support + +this patch fixes some clock issues, provides a base 720p dvi panel +and adds the panda_dvi_defconfig for testing purposes. +--- + arch/arm/configs/panda_dvi_defconfig | 2182 ++++++++++++++++++++++ + arch/arm/mach-omap2/board-omap4panda.c | 12 +- + drivers/video/omap2/displays/panel-generic-dpi.c | 24 + + drivers/video/omap2/dss/dss.c | 33 +- + 4 files changed, 2246 insertions(+), 5 deletions(-) + create mode 100644 arch/arm/configs/panda_dvi_defconfig + +diff --git a/arch/arm/configs/panda_dvi_defconfig b/arch/arm/configs/panda_dvi_defconfig +new file mode 100644 +index 0000000..46526e4 +--- /dev/null ++++ b/arch/arm/configs/panda_dvi_defconfig +@@ -0,0 +1,2182 @@ ++# ++# Automatically generated make config: don't edit ++# Linux/arm 2.6.39-rc1 Kernel Configuration ++# Wed Mar 30 12:36:00 2011 ++# ++CONFIG_ARM=y ++CONFIG_SYS_SUPPORTS_APM_EMULATION=y ++CONFIG_HAVE_SCHED_CLOCK=y ++CONFIG_GENERIC_GPIO=y ++# CONFIG_ARCH_USES_GETTIMEOFFSET is not set ++CONFIG_GENERIC_CLOCKEVENTS=y ++CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y ++CONFIG_KTIME_SCALAR=y ++CONFIG_HAVE_PROC_CPU=y ++CONFIG_STACKTRACE_SUPPORT=y ++CONFIG_LOCKDEP_SUPPORT=y ++CONFIG_TRACE_IRQFLAGS_SUPPORT=y ++CONFIG_HARDIRQS_SW_RESEND=y ++CONFIG_GENERIC_IRQ_PROBE=y ++CONFIG_RWSEM_GENERIC_SPINLOCK=y ++CONFIG_ARCH_HAS_CPUFREQ=y ++CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y ++CONFIG_GENERIC_HWEIGHT=y ++CONFIG_GENERIC_CALIBRATE_DELAY=y ++CONFIG_NEED_DMA_MAP_STATE=y ++CONFIG_VECTORS_BASE=0xffff0000 ++# CONFIG_ARM_PATCH_PHYS_VIRT is not set ++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" ++CONFIG_CONSTRUCTORS=y ++CONFIG_HAVE_IRQ_WORK=y ++CONFIG_IRQ_WORK=y ++ ++# ++# General setup ++# ++CONFIG_EXPERIMENTAL=y ++CONFIG_INIT_ENV_ARG_LIMIT=32 ++CONFIG_CROSS_COMPILE="" ++CONFIG_LOCALVERSION="" ++CONFIG_LOCALVERSION_AUTO=y ++CONFIG_HAVE_KERNEL_GZIP=y ++CONFIG_HAVE_KERNEL_LZMA=y ++CONFIG_HAVE_KERNEL_LZO=y ++CONFIG_KERNEL_GZIP=y ++# CONFIG_KERNEL_LZMA is not set ++# CONFIG_KERNEL_LZO is not set ++CONFIG_SWAP=y ++CONFIG_SYSVIPC=y ++CONFIG_SYSVIPC_SYSCTL=y ++CONFIG_POSIX_MQUEUE=y ++CONFIG_POSIX_MQUEUE_SYSCTL=y ++CONFIG_BSD_PROCESS_ACCT=y ++# CONFIG_BSD_PROCESS_ACCT_V3 is not set ++# CONFIG_FHANDLE is not set ++# CONFIG_TASKSTATS is not set ++# CONFIG_AUDIT is not set ++CONFIG_HAVE_GENERIC_HARDIRQS=y ++ ++# ++# IRQ subsystem ++# ++CONFIG_GENERIC_HARDIRQS=y ++CONFIG_HAVE_SPARSE_IRQ=y ++CONFIG_GENERIC_IRQ_SHOW=y ++# CONFIG_SPARSE_IRQ is not set ++ ++# ++# RCU Subsystem ++# ++CONFIG_TREE_RCU=y ++# CONFIG_PREEMPT_RCU is not set ++# CONFIG_RCU_TRACE is not set ++CONFIG_RCU_FANOUT=32 ++# CONFIG_RCU_FANOUT_EXACT is not set ++# CONFIG_RCU_FAST_NO_HZ is not set ++# CONFIG_TREE_RCU_TRACE is not set ++CONFIG_IKCONFIG=y ++CONFIG_IKCONFIG_PROC=y ++CONFIG_LOG_BUF_SHIFT=16 ++# CONFIG_CGROUPS is not set ++# CONFIG_NAMESPACES is not set ++# CONFIG_SCHED_AUTOGROUP is not set ++# CONFIG_SYSFS_DEPRECATED is not set ++# CONFIG_RELAY is not set ++CONFIG_BLK_DEV_INITRD=y ++CONFIG_INITRAMFS_SOURCE="" ++CONFIG_RD_GZIP=y ++# CONFIG_RD_BZIP2 is not set ++# CONFIG_RD_LZMA is not set ++# CONFIG_RD_XZ is not set ++# CONFIG_RD_LZO is not set ++CONFIG_CC_OPTIMIZE_FOR_SIZE=y ++CONFIG_SYSCTL=y ++CONFIG_ANON_INODES=y ++CONFIG_EXPERT=y ++# CONFIG_EMBEDDED is not set ++CONFIG_UID16=y ++# CONFIG_SYSCTL_SYSCALL is not set ++CONFIG_KALLSYMS=y ++CONFIG_KALLSYMS_ALL=y ++CONFIG_KALLSYMS_EXTRA_PASS=y ++CONFIG_HOTPLUG=y ++CONFIG_PRINTK=y ++CONFIG_BUG=y ++CONFIG_ELF_CORE=y ++CONFIG_BASE_FULL=y ++CONFIG_FUTEX=y ++CONFIG_EPOLL=y ++CONFIG_SIGNALFD=y ++CONFIG_TIMERFD=y ++CONFIG_EVENTFD=y ++CONFIG_SHMEM=y ++CONFIG_AIO=y ++CONFIG_HAVE_PERF_EVENTS=y ++CONFIG_PERF_USE_VMALLOC=y ++ ++# ++# Kernel Performance Events And Counters ++# ++CONFIG_PERF_EVENTS=y ++# CONFIG_PERF_COUNTERS is not set ++# CONFIG_DEBUG_PERF_USE_VMALLOC is not set ++CONFIG_VM_EVENT_COUNTERS=y ++CONFIG_COMPAT_BRK=y ++CONFIG_SLAB=y ++# CONFIG_SLUB is not set ++# CONFIG_SLOB is not set ++CONFIG_PROFILING=y ++CONFIG_TRACEPOINTS=y ++CONFIG_OPROFILE=y ++CONFIG_HAVE_OPROFILE=y ++CONFIG_KPROBES=y ++CONFIG_KRETPROBES=y ++CONFIG_HAVE_KPROBES=y ++CONFIG_HAVE_KRETPROBES=y ++CONFIG_USE_GENERIC_SMP_HELPERS=y ++CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y ++CONFIG_HAVE_CLK=y ++CONFIG_HAVE_DMA_API_DEBUG=y ++CONFIG_HAVE_HW_BREAKPOINT=y ++ ++# ++# GCOV-based kernel profiling ++# ++# CONFIG_GCOV_KERNEL is not set ++CONFIG_HAVE_GENERIC_DMA_COHERENT=y ++CONFIG_SLABINFO=y ++CONFIG_RT_MUTEXES=y ++CONFIG_BASE_SMALL=0 ++CONFIG_MODULES=y ++CONFIG_MODULE_FORCE_LOAD=y ++CONFIG_MODULE_UNLOAD=y ++CONFIG_MODULE_FORCE_UNLOAD=y ++CONFIG_MODVERSIONS=y ++CONFIG_MODULE_SRCVERSION_ALL=y ++CONFIG_STOP_MACHINE=y ++CONFIG_BLOCK=y ++CONFIG_LBDAF=y ++# CONFIG_BLK_DEV_BSG is not set ++# CONFIG_BLK_DEV_INTEGRITY is not set ++ ++# ++# IO Schedulers ++# ++CONFIG_IOSCHED_NOOP=y ++CONFIG_IOSCHED_DEADLINE=y ++CONFIG_IOSCHED_CFQ=y ++# CONFIG_DEFAULT_DEADLINE is not set ++CONFIG_DEFAULT_CFQ=y ++# CONFIG_DEFAULT_NOOP is not set ++CONFIG_DEFAULT_IOSCHED="cfq" ++# CONFIG_INLINE_SPIN_TRYLOCK is not set ++# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set ++# CONFIG_INLINE_SPIN_LOCK is not set ++# CONFIG_INLINE_SPIN_LOCK_BH is not set ++# CONFIG_INLINE_SPIN_LOCK_IRQ is not set ++# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set ++# CONFIG_INLINE_SPIN_UNLOCK is not set ++# CONFIG_INLINE_SPIN_UNLOCK_BH is not set ++# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set ++# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set ++# CONFIG_INLINE_READ_TRYLOCK is not set ++# CONFIG_INLINE_READ_LOCK is not set ++# CONFIG_INLINE_READ_LOCK_BH is not set ++# CONFIG_INLINE_READ_LOCK_IRQ is not set ++# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set ++# CONFIG_INLINE_READ_UNLOCK is not set ++# CONFIG_INLINE_READ_UNLOCK_BH is not set ++# CONFIG_INLINE_READ_UNLOCK_IRQ is not set ++# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set ++# CONFIG_INLINE_WRITE_TRYLOCK is not set ++# CONFIG_INLINE_WRITE_LOCK is not set ++# CONFIG_INLINE_WRITE_LOCK_BH is not set ++# CONFIG_INLINE_WRITE_LOCK_IRQ is not set ++# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set ++# CONFIG_INLINE_WRITE_UNLOCK is not set ++# CONFIG_INLINE_WRITE_UNLOCK_BH is not set ++# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set ++# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set ++# CONFIG_MUTEX_SPIN_ON_OWNER is not set ++CONFIG_FREEZER=y ++ ++# ++# System Type ++# ++CONFIG_MMU=y ++# CONFIG_ARCH_INTEGRATOR is not set ++# CONFIG_ARCH_REALVIEW is not set ++# CONFIG_ARCH_VERSATILE is not set ++# CONFIG_ARCH_VEXPRESS is not set ++# CONFIG_ARCH_AT91 is not set ++# CONFIG_ARCH_BCMRING is not set ++# CONFIG_ARCH_CLPS711X is not set ++# CONFIG_ARCH_CNS3XXX is not set ++# CONFIG_ARCH_GEMINI is not set ++# CONFIG_ARCH_EBSA110 is not set ++# CONFIG_ARCH_EP93XX is not set ++# CONFIG_ARCH_FOOTBRIDGE is not set ++# CONFIG_ARCH_MXC is not set ++# CONFIG_ARCH_MXS is not set ++# CONFIG_ARCH_STMP3XXX is not set ++# CONFIG_ARCH_NETX is not set ++# CONFIG_ARCH_H720X is not set ++# CONFIG_ARCH_IOP13XX is not set ++# CONFIG_ARCH_IOP32X is not set ++# CONFIG_ARCH_IOP33X is not set ++# CONFIG_ARCH_IXP23XX is not set ++# CONFIG_ARCH_IXP2000 is not set ++# CONFIG_ARCH_IXP4XX is not set ++# CONFIG_ARCH_DOVE is not set ++# CONFIG_ARCH_KIRKWOOD is not set ++# CONFIG_ARCH_LOKI is not set ++# CONFIG_ARCH_LPC32XX is not set ++# CONFIG_ARCH_MV78XX0 is not set ++# CONFIG_ARCH_ORION5X is not set ++# CONFIG_ARCH_MMP is not set ++# CONFIG_ARCH_KS8695 is not set ++# CONFIG_ARCH_NS9XXX is not set ++# CONFIG_ARCH_W90X900 is not set ++# CONFIG_ARCH_NUC93X is not set ++# CONFIG_ARCH_TEGRA is not set ++# CONFIG_ARCH_PNX4008 is not set ++# CONFIG_ARCH_PXA is not set ++# CONFIG_ARCH_MSM is not set ++# CONFIG_ARCH_SHMOBILE is not set ++# CONFIG_ARCH_RPC is not set ++# CONFIG_ARCH_SA1100 is not set ++# CONFIG_ARCH_S3C2410 is not set ++# CONFIG_ARCH_S3C64XX is not set ++# CONFIG_ARCH_S5P64X0 is not set ++# CONFIG_ARCH_S5P6442 is not set ++# CONFIG_ARCH_S5PC100 is not set ++# CONFIG_ARCH_S5PV210 is not set ++# CONFIG_ARCH_EXYNOS4 is not set ++# CONFIG_ARCH_SHARK is not set ++# CONFIG_ARCH_TCC_926 is not set ++# CONFIG_ARCH_U300 is not set ++# CONFIG_ARCH_U8500 is not set ++# CONFIG_ARCH_NOMADIK is not set ++# CONFIG_ARCH_DAVINCI is not set ++CONFIG_ARCH_OMAP=y ++# CONFIG_PLAT_SPEAR is not set ++# CONFIG_ARCH_VT8500 is not set ++# CONFIG_GPIO_PCA953X is not set ++# CONFIG_KEYBOARD_GPIO_POLLED is not set ++ ++# ++# TI OMAP Common Features ++# ++# CONFIG_ARCH_OMAP1 is not set ++CONFIG_ARCH_OMAP2PLUS=y ++ ++# ++# OMAP Feature Selections ++# ++# CONFIG_OMAP_SMARTREFLEX is not set ++CONFIG_OMAP_RESET_CLOCKS=y ++CONFIG_OMAP_MUX=y ++CONFIG_OMAP_MUX_DEBUG=y ++CONFIG_OMAP_MUX_WARNINGS=y ++CONFIG_OMAP_MCBSP=y ++# CONFIG_OMAP_MBOX_FWK is not set ++CONFIG_OMAP_32K_TIMER=y ++CONFIG_OMAP_32K_TIMER_HZ=128 ++CONFIG_OMAP_DM_TIMER=y ++# CONFIG_OMAP_PM_NONE is not set ++CONFIG_OMAP_PM_NOOP=y ++ ++# ++# TI OMAP2/3/4 Specific Features ++# ++CONFIG_ARCH_OMAP2PLUS_TYPICAL=y ++# CONFIG_ARCH_OMAP2 is not set ++# CONFIG_ARCH_OMAP3 is not set ++CONFIG_ARCH_OMAP4=y ++CONFIG_OMAP_PACKAGE_CBL=y ++CONFIG_OMAP_PACKAGE_CBS=y ++ ++# ++# OMAP Board Type ++# ++CONFIG_MACH_OMAP_4430SDP=y ++CONFIG_MACH_OMAP4_PANDA=y ++ ++# ++# System MMU ++# ++ ++# ++# Processor Type ++# ++CONFIG_CPU_V7=y ++CONFIG_CPU_32v6K=y ++CONFIG_CPU_32v7=y ++CONFIG_CPU_ABRT_EV7=y ++CONFIG_CPU_PABRT_V7=y ++CONFIG_CPU_CACHE_V7=y ++CONFIG_CPU_CACHE_VIPT=y ++CONFIG_CPU_COPY_V6=y ++CONFIG_CPU_TLB_V7=y ++CONFIG_CPU_HAS_ASID=y ++CONFIG_CPU_CP15=y ++CONFIG_CPU_CP15_MMU=y ++ ++# ++# Processor Features ++# ++CONFIG_ARM_THUMB=y ++CONFIG_ARM_THUMBEE=y ++CONFIG_SWP_EMULATE=y ++# CONFIG_CPU_ICACHE_DISABLE is not set ++# CONFIG_CPU_DCACHE_DISABLE is not set ++# CONFIG_CPU_BPREDICT_DISABLE is not set ++CONFIG_OUTER_CACHE=y ++CONFIG_OUTER_CACHE_SYNC=y ++CONFIG_CACHE_L2X0=y ++CONFIG_CACHE_PL310=y ++CONFIG_ARM_L1_CACHE_SHIFT=5 ++CONFIG_ARM_DMA_MEM_BUFFERABLE=y ++CONFIG_CPU_HAS_PMU=y ++# CONFIG_ARM_ERRATA_430973 is not set ++# CONFIG_ARM_ERRATA_458693 is not set ++# CONFIG_ARM_ERRATA_460075 is not set ++# CONFIG_ARM_ERRATA_742230 is not set ++# CONFIG_ARM_ERRATA_742231 is not set ++CONFIG_PL310_ERRATA_588369=y ++CONFIG_ARM_ERRATA_720789=y ++CONFIG_PL310_ERRATA_727915=y ++# CONFIG_ARM_ERRATA_743622 is not set ++# CONFIG_ARM_ERRATA_751472 is not set ++# CONFIG_ARM_ERRATA_753970 is not set ++# CONFIG_ARM_ERRATA_754322 is not set ++# CONFIG_ARM_ERRATA_754327 is not set ++CONFIG_ARM_GIC=y ++ ++# ++# Bus support ++# ++# CONFIG_PCI_SYSCALL is not set ++# CONFIG_ARCH_SUPPORTS_MSI is not set ++# CONFIG_PCCARD is not set ++ ++# ++# Kernel Features ++# ++CONFIG_TICK_ONESHOT=y ++CONFIG_NO_HZ=y ++CONFIG_HIGH_RES_TIMERS=y ++CONFIG_GENERIC_CLOCKEVENTS_BUILD=y ++CONFIG_SMP=y ++CONFIG_SMP_ON_UP=y ++CONFIG_HAVE_ARM_SCU=y ++CONFIG_HAVE_ARM_TWD=y ++CONFIG_VMSPLIT_3G=y ++# CONFIG_VMSPLIT_2G is not set ++# CONFIG_VMSPLIT_1G is not set ++CONFIG_PAGE_OFFSET=0xC0000000 ++CONFIG_NR_CPUS=2 ++CONFIG_HOTPLUG_CPU=y ++CONFIG_LOCAL_TIMERS=y ++CONFIG_PREEMPT_NONE=y ++# CONFIG_PREEMPT_VOLUNTARY is not set ++# CONFIG_PREEMPT is not set ++CONFIG_HZ=128 ++# CONFIG_THUMB2_KERNEL is not set ++CONFIG_AEABI=y ++CONFIG_OABI_COMPAT=y ++CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y ++# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set ++# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set ++# CONFIG_HIGHMEM is not set ++CONFIG_HW_PERF_EVENTS=y ++CONFIG_SELECT_MEMORY_MODEL=y ++CONFIG_FLATMEM_MANUAL=y ++CONFIG_FLATMEM=y ++CONFIG_FLAT_NODE_MEM_MAP=y ++CONFIG_HAVE_MEMBLOCK=y ++CONFIG_PAGEFLAGS_EXTENDED=y ++CONFIG_SPLIT_PTLOCK_CPUS=999999 ++# CONFIG_COMPACTION is not set ++# CONFIG_PHYS_ADDR_T_64BIT is not set ++CONFIG_ZONE_DMA_FLAG=0 ++CONFIG_VIRT_TO_BUS=y ++# CONFIG_KSM is not set ++CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 ++CONFIG_FORCE_MAX_ZONEORDER=11 ++CONFIG_LEDS=y ++CONFIG_ALIGNMENT_TRAP=y ++# CONFIG_UACCESS_WITH_MEMCPY is not set ++# CONFIG_SECCOMP is not set ++# CONFIG_CC_STACKPROTECTOR is not set ++# CONFIG_DEPRECATED_PARAM_STRUCT is not set ++ ++# ++# Boot options ++# ++CONFIG_ZBOOT_ROM_TEXT=0x0 ++CONFIG_ZBOOT_ROM_BSS=0x0 ++CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200" ++# CONFIG_CMDLINE_FORCE is not set ++# CONFIG_XIP_KERNEL is not set ++CONFIG_KEXEC=y ++CONFIG_ATAGS_PROC=y ++# CONFIG_CRASH_DUMP is not set ++# CONFIG_AUTO_ZRELADDR is not set ++ ++# ++# CPU Power Management ++# ++# CONFIG_CPU_FREQ is not set ++# CONFIG_CPU_IDLE is not set ++ ++# ++# Floating point emulation ++# ++ ++# ++# At least one emulation must be selected ++# ++CONFIG_FPE_NWFPE=y ++# CONFIG_FPE_NWFPE_XP is not set ++# CONFIG_FPE_FASTFPE is not set ++CONFIG_VFP=y ++CONFIG_VFPv3=y ++CONFIG_NEON=y ++ ++# ++# Userspace binary formats ++# ++CONFIG_BINFMT_ELF=y ++CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y ++CONFIG_HAVE_AOUT=y ++# CONFIG_BINFMT_AOUT is not set ++CONFIG_BINFMT_MISC=y ++ ++# ++# Power management options ++# ++CONFIG_SUSPEND=y ++CONFIG_SUSPEND_FREEZER=y ++CONFIG_PM_SLEEP=y ++CONFIG_PM_SLEEP_SMP=y ++CONFIG_PM_RUNTIME=y ++CONFIG_PM=y ++CONFIG_PM_DEBUG=y ++# CONFIG_PM_VERBOSE is not set ++# CONFIG_PM_ADVANCED_DEBUG is not set ++# CONFIG_PM_TEST_SUSPEND is not set ++CONFIG_CAN_PM_TRACE=y ++# CONFIG_APM_EMULATION is not set ++CONFIG_ARCH_HAS_OPP=y ++CONFIG_PM_OPP=y ++CONFIG_ARCH_SUSPEND_POSSIBLE=y ++CONFIG_NET=y ++ ++# ++# Networking options ++# ++CONFIG_PACKET=y ++CONFIG_UNIX=y ++CONFIG_XFRM=y ++CONFIG_XFRM_USER=y ++# CONFIG_XFRM_SUB_POLICY is not set ++CONFIG_XFRM_MIGRATE=y ++# CONFIG_XFRM_STATISTICS is not set ++CONFIG_NET_KEY=y ++CONFIG_NET_KEY_MIGRATE=y ++CONFIG_INET=y ++CONFIG_IP_MULTICAST=y ++# CONFIG_IP_ADVANCED_ROUTER is not set ++CONFIG_IP_PNP=y ++CONFIG_IP_PNP_DHCP=y ++CONFIG_IP_PNP_BOOTP=y ++CONFIG_IP_PNP_RARP=y ++# CONFIG_NET_IPIP is not set ++# CONFIG_NET_IPGRE_DEMUX is not set ++# CONFIG_IP_MROUTE is not set ++# CONFIG_ARPD is not set ++# CONFIG_SYN_COOKIES is not set ++# CONFIG_INET_AH is not set ++# CONFIG_INET_ESP is not set ++# CONFIG_INET_IPCOMP is not set ++# CONFIG_INET_XFRM_TUNNEL is not set ++# CONFIG_INET_TUNNEL is not set ++CONFIG_INET_XFRM_MODE_TRANSPORT=y ++CONFIG_INET_XFRM_MODE_TUNNEL=y ++CONFIG_INET_XFRM_MODE_BEET=y ++# CONFIG_INET_LRO is not set ++CONFIG_INET_DIAG=y ++CONFIG_INET_TCP_DIAG=y ++# CONFIG_TCP_CONG_ADVANCED is not set ++CONFIG_TCP_CONG_CUBIC=y ++CONFIG_DEFAULT_TCP_CONG="cubic" ++# CONFIG_TCP_MD5SIG is not set ++# CONFIG_IPV6 is not set ++# CONFIG_NETLABEL is not set ++# CONFIG_NETWORK_SECMARK is not set ++# CONFIG_NETWORK_PHY_TIMESTAMPING is not set ++CONFIG_NETFILTER=y ++# CONFIG_NETFILTER_DEBUG is not set ++CONFIG_NETFILTER_ADVANCED=y ++ ++# ++# Core Netfilter Configuration ++# ++# CONFIG_NETFILTER_NETLINK_QUEUE is not set ++# CONFIG_NETFILTER_NETLINK_LOG is not set ++# CONFIG_NF_CONNTRACK is not set ++# CONFIG_NETFILTER_XTABLES is not set ++# CONFIG_IP_VS is not set ++ ++# ++# IP: Netfilter Configuration ++# ++# CONFIG_NF_DEFRAG_IPV4 is not set ++# CONFIG_IP_NF_QUEUE is not set ++# CONFIG_IP_NF_IPTABLES is not set ++# CONFIG_IP_NF_ARPTABLES is not set ++# CONFIG_IP_DCCP is not set ++# CONFIG_IP_SCTP is not set ++# CONFIG_RDS is not set ++# CONFIG_TIPC is not set ++# CONFIG_ATM is not set ++# CONFIG_L2TP is not set ++# CONFIG_BRIDGE is not set ++# CONFIG_NET_DSA is not set ++# CONFIG_VLAN_8021Q is not set ++# CONFIG_DECNET is not set ++# CONFIG_LLC2 is not set ++# CONFIG_IPX is not set ++# CONFIG_ATALK is not set ++# CONFIG_X25 is not set ++# CONFIG_LAPB is not set ++# CONFIG_ECONET is not set ++# CONFIG_WAN_ROUTER is not set ++# CONFIG_PHONET is not set ++# CONFIG_IEEE802154 is not set ++# CONFIG_NET_SCHED is not set ++# CONFIG_DCB is not set ++CONFIG_DNS_RESOLVER=y ++# CONFIG_BATMAN_ADV is not set ++CONFIG_RPS=y ++CONFIG_RFS_ACCEL=y ++CONFIG_XPS=y ++ ++# ++# Network testing ++# ++# CONFIG_NET_PKTGEN is not set ++# CONFIG_NET_TCPPROBE is not set ++# CONFIG_NET_DROP_MONITOR is not set ++# CONFIG_HAMRADIO is not set ++# CONFIG_CAN is not set ++# CONFIG_IRDA is not set ++CONFIG_BT=m ++# CONFIG_BT_L2CAP is not set ++# CONFIG_BT_SCO is not set ++ ++# ++# Bluetooth device drivers ++# ++# CONFIG_BT_HCIBTUSB is not set ++# CONFIG_BT_HCIBTSDIO is not set ++CONFIG_BT_HCIUART=m ++CONFIG_BT_HCIUART_H4=y ++CONFIG_BT_HCIUART_BCSP=y ++# CONFIG_BT_HCIUART_ATH3K is not set ++CONFIG_BT_HCIUART_LL=y ++CONFIG_BT_HCIBCM203X=m ++CONFIG_BT_HCIBPA10X=m ++# CONFIG_BT_HCIBFUSB is not set ++# CONFIG_BT_HCIVHCI is not set ++# CONFIG_BT_MRVL is not set ++# CONFIG_AF_RXRPC is not set ++CONFIG_WIRELESS=y ++CONFIG_WEXT_CORE=y ++CONFIG_WEXT_PROC=y ++CONFIG_CFG80211=m ++# CONFIG_NL80211_TESTMODE is not set ++# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set ++# CONFIG_CFG80211_REG_DEBUG is not set ++CONFIG_CFG80211_DEFAULT_PS=y ++# CONFIG_CFG80211_DEBUGFS is not set ++# CONFIG_CFG80211_INTERNAL_REGDB is not set ++CONFIG_CFG80211_WEXT=y ++CONFIG_WIRELESS_EXT_SYSFS=y ++CONFIG_LIB80211=m ++# CONFIG_LIB80211_DEBUG is not set ++CONFIG_MAC80211=m ++CONFIG_MAC80211_HAS_RC=y ++CONFIG_MAC80211_RC_PID=y ++CONFIG_MAC80211_RC_MINSTREL=y ++CONFIG_MAC80211_RC_MINSTREL_HT=y ++CONFIG_MAC80211_RC_DEFAULT_PID=y ++# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set ++CONFIG_MAC80211_RC_DEFAULT="pid" ++# CONFIG_MAC80211_MESH is not set ++# CONFIG_MAC80211_DEBUGFS is not set ++# CONFIG_MAC80211_DEBUG_MENU is not set ++# CONFIG_WIMAX is not set ++# CONFIG_RFKILL is not set ++# CONFIG_NET_9P is not set ++# CONFIG_CAIF is not set ++# CONFIG_CEPH_LIB is not set ++ ++# ++# Device Drivers ++# ++ ++# ++# Generic Driver Options ++# ++CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" ++# CONFIG_DEVTMPFS is not set ++CONFIG_STANDALONE=y ++CONFIG_PREVENT_FIRMWARE_BUILD=y ++CONFIG_FW_LOADER=y ++CONFIG_FIRMWARE_IN_KERNEL=y ++CONFIG_EXTRA_FIRMWARE="" ++# CONFIG_DEBUG_DRIVER is not set ++# CONFIG_DEBUG_DEVRES is not set ++# CONFIG_SYS_HYPERVISOR is not set ++CONFIG_CONNECTOR=y ++CONFIG_PROC_EVENTS=y ++CONFIG_MTD=y ++# CONFIG_MTD_DEBUG is not set ++# CONFIG_MTD_TESTS is not set ++CONFIG_MTD_PARTITIONS=y ++# CONFIG_MTD_REDBOOT_PARTS is not set ++CONFIG_MTD_CMDLINE_PARTS=y ++# CONFIG_MTD_AFS_PARTS is not set ++# CONFIG_MTD_AR7_PARTS is not set ++ ++# ++# User Modules And Translation Layers ++# ++CONFIG_MTD_CHAR=y ++CONFIG_MTD_BLKDEVS=y ++CONFIG_MTD_BLOCK=y ++# CONFIG_FTL is not set ++# CONFIG_NFTL is not set ++# CONFIG_INFTL is not set ++# CONFIG_RFD_FTL is not set ++# CONFIG_SSFDC is not set ++# CONFIG_SM_FTL is not set ++CONFIG_MTD_OOPS=y ++# CONFIG_MTD_SWAP is not set ++ ++# ++# RAM/ROM/Flash chip drivers ++# ++CONFIG_MTD_CFI=y ++# CONFIG_MTD_JEDECPROBE is not set ++CONFIG_MTD_GEN_PROBE=y ++# CONFIG_MTD_CFI_ADV_OPTIONS is not set ++CONFIG_MTD_MAP_BANK_WIDTH_1=y ++CONFIG_MTD_MAP_BANK_WIDTH_2=y ++CONFIG_MTD_MAP_BANK_WIDTH_4=y ++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set ++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set ++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set ++CONFIG_MTD_CFI_I1=y ++CONFIG_MTD_CFI_I2=y ++# CONFIG_MTD_CFI_I4 is not set ++# CONFIG_MTD_CFI_I8 is not set ++CONFIG_MTD_CFI_INTELEXT=y ++# CONFIG_MTD_CFI_AMDSTD is not set ++# CONFIG_MTD_CFI_STAA is not set ++CONFIG_MTD_CFI_UTIL=y ++# CONFIG_MTD_RAM is not set ++# CONFIG_MTD_ROM is not set ++# CONFIG_MTD_ABSENT is not set ++ ++# ++# Mapping drivers for chip access ++# ++# CONFIG_MTD_COMPLEX_MAPPINGS is not set ++# CONFIG_MTD_PHYSMAP is not set ++# CONFIG_MTD_ARM_INTEGRATOR is not set ++# CONFIG_MTD_PLATRAM is not set ++ ++# ++# Self-contained MTD device drivers ++# ++# CONFIG_MTD_DATAFLASH is not set ++# CONFIG_MTD_M25P80 is not set ++# CONFIG_MTD_SST25L is not set ++# CONFIG_MTD_SLRAM is not set ++# CONFIG_MTD_PHRAM is not set ++# CONFIG_MTD_MTDRAM is not set ++# CONFIG_MTD_BLOCK2MTD is not set ++ ++# ++# Disk-On-Chip Device Drivers ++# ++# CONFIG_MTD_DOC2000 is not set ++# CONFIG_MTD_DOC2001 is not set ++# CONFIG_MTD_DOC2001PLUS is not set ++CONFIG_MTD_NAND_ECC=y ++# CONFIG_MTD_NAND_ECC_SMC is not set ++CONFIG_MTD_NAND=y ++# CONFIG_MTD_NAND_VERIFY_WRITE is not set ++# CONFIG_MTD_NAND_ECC_BCH is not set ++# CONFIG_MTD_SM_COMMON is not set ++# CONFIG_MTD_NAND_MUSEUM_IDS is not set ++# CONFIG_MTD_NAND_GPIO is not set ++CONFIG_MTD_NAND_IDS=y ++# CONFIG_MTD_NAND_DISKONCHIP is not set ++# CONFIG_MTD_NAND_NANDSIM is not set ++# CONFIG_MTD_NAND_PLATFORM is not set ++# CONFIG_MTD_ALAUDA is not set ++CONFIG_MTD_ONENAND=y ++CONFIG_MTD_ONENAND_VERIFY_WRITE=y ++# CONFIG_MTD_ONENAND_GENERIC is not set ++# CONFIG_MTD_ONENAND_OTP is not set ++# CONFIG_MTD_ONENAND_2X_PROGRAM is not set ++# CONFIG_MTD_ONENAND_SIM is not set ++ ++# ++# LPDDR flash memory drivers ++# ++# CONFIG_MTD_LPDDR is not set ++CONFIG_MTD_UBI=y ++CONFIG_MTD_UBI_WL_THRESHOLD=4096 ++CONFIG_MTD_UBI_BEB_RESERVE=1 ++# CONFIG_MTD_UBI_GLUEBI is not set ++# CONFIG_MTD_UBI_DEBUG is not set ++# CONFIG_PARPORT is not set ++CONFIG_BLK_DEV=y ++# CONFIG_BLK_DEV_COW_COMMON is not set ++CONFIG_BLK_DEV_LOOP=y ++# CONFIG_BLK_DEV_CRYPTOLOOP is not set ++# CONFIG_BLK_DEV_DRBD is not set ++# CONFIG_BLK_DEV_NBD is not set ++# CONFIG_BLK_DEV_UB is not set ++CONFIG_BLK_DEV_RAM=y ++CONFIG_BLK_DEV_RAM_COUNT=16 ++CONFIG_BLK_DEV_RAM_SIZE=16384 ++# CONFIG_BLK_DEV_XIP is not set ++# CONFIG_CDROM_PKTCDVD is not set ++# CONFIG_ATA_OVER_ETH is not set ++# CONFIG_MG_DISK is not set ++# CONFIG_BLK_DEV_RBD is not set ++# CONFIG_SENSORS_LIS3LV02D is not set ++# CONFIG_MISC_DEVICES is not set ++CONFIG_HAVE_IDE=y ++# CONFIG_IDE is not set ++ ++# ++# SCSI device support ++# ++CONFIG_SCSI_MOD=y ++# CONFIG_RAID_ATTRS is not set ++CONFIG_SCSI=y ++CONFIG_SCSI_DMA=y ++# CONFIG_SCSI_TGT is not set ++# CONFIG_SCSI_NETLINK is not set ++CONFIG_SCSI_PROC_FS=y ++ ++# ++# SCSI support type (disk, tape, CD-ROM) ++# ++CONFIG_BLK_DEV_SD=y ++# CONFIG_CHR_DEV_ST is not set ++# CONFIG_CHR_DEV_OSST is not set ++# CONFIG_BLK_DEV_SR is not set ++# CONFIG_CHR_DEV_SG is not set ++# CONFIG_CHR_DEV_SCH is not set ++CONFIG_SCSI_MULTI_LUN=y ++# CONFIG_SCSI_CONSTANTS is not set ++# CONFIG_SCSI_LOGGING is not set ++CONFIG_SCSI_SCAN_ASYNC=y ++CONFIG_SCSI_WAIT_SCAN=m ++ ++# ++# SCSI Transports ++# ++# CONFIG_SCSI_SPI_ATTRS is not set ++# CONFIG_SCSI_FC_ATTRS is not set ++# CONFIG_SCSI_ISCSI_ATTRS is not set ++# CONFIG_SCSI_SAS_ATTRS is not set ++# CONFIG_SCSI_SAS_LIBSAS is not set ++# CONFIG_SCSI_SRP_ATTRS is not set ++CONFIG_SCSI_LOWLEVEL=y ++# CONFIG_ISCSI_TCP is not set ++# CONFIG_ISCSI_BOOT_SYSFS is not set ++# CONFIG_LIBFC is not set ++# CONFIG_LIBFCOE is not set ++# CONFIG_SCSI_DEBUG is not set ++# CONFIG_SCSI_DH is not set ++# CONFIG_SCSI_OSD_INITIATOR is not set ++# CONFIG_ATA is not set ++CONFIG_MD=y ++# CONFIG_BLK_DEV_MD is not set ++# CONFIG_BLK_DEV_DM is not set ++# CONFIG_TARGET_CORE is not set ++CONFIG_NETDEVICES=y ++# CONFIG_DUMMY is not set ++# CONFIG_BONDING is not set ++# CONFIG_MACVLAN is not set ++# CONFIG_EQUALIZER is not set ++# CONFIG_TUN is not set ++# CONFIG_VETH is not set ++CONFIG_MII=y ++# CONFIG_PHYLIB is not set ++# CONFIG_NET_ETHERNET is not set ++# CONFIG_NETDEV_1000 is not set ++# CONFIG_NETDEV_10000 is not set ++# CONFIG_WLAN is not set ++ ++# ++# Enable WiMAX (Networking options) to see the WiMAX drivers ++# ++ ++# ++# USB Network Adapters ++# ++# CONFIG_USB_CATC is not set ++# CONFIG_USB_KAWETH is not set ++# CONFIG_USB_PEGASUS is not set ++# CONFIG_USB_RTL8150 is not set ++CONFIG_USB_USBNET=y ++# CONFIG_USB_NET_AX8817X is not set ++# CONFIG_USB_NET_CDCETHER is not set ++# CONFIG_USB_NET_CDC_EEM is not set ++# CONFIG_USB_NET_CDC_NCM is not set ++# CONFIG_USB_NET_DM9601 is not set ++# CONFIG_USB_NET_SMSC75XX is not set ++# CONFIG_USB_NET_SMSC95XX is not set ++# CONFIG_USB_NET_GL620A is not set ++CONFIG_USB_NET_NET1080=y ++# CONFIG_USB_NET_PLUSB is not set ++# CONFIG_USB_NET_MCS7830 is not set ++# CONFIG_USB_NET_RNDIS_HOST is not set ++# CONFIG_USB_NET_CDC_SUBSET is not set ++# CONFIG_USB_NET_ZAURUS is not set ++# CONFIG_USB_NET_CX82310_ETH is not set ++# CONFIG_USB_NET_INT51X1 is not set ++# CONFIG_USB_IPHETH is not set ++# CONFIG_USB_SIERRA_NET is not set ++# CONFIG_WAN is not set ++ ++# ++# CAIF transport drivers ++# ++# CONFIG_PPP is not set ++# CONFIG_SLIP is not set ++# CONFIG_NETCONSOLE is not set ++# CONFIG_NETPOLL is not set ++# CONFIG_NET_POLL_CONTROLLER is not set ++# CONFIG_ISDN is not set ++# CONFIG_PHONE is not set ++ ++# ++# Input device support ++# ++CONFIG_INPUT=y ++# CONFIG_INPUT_FF_MEMLESS is not set ++# CONFIG_INPUT_POLLDEV is not set ++# CONFIG_INPUT_SPARSEKMAP is not set ++ ++# ++# Userland interfaces ++# ++CONFIG_INPUT_MOUSEDEV=y ++CONFIG_INPUT_MOUSEDEV_PSAUX=y ++CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 ++CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 ++CONFIG_INPUT_JOYDEV=y ++CONFIG_INPUT_EVDEV=y ++# CONFIG_INPUT_EVBUG is not set ++ ++# ++# Input Device Drivers ++# ++CONFIG_INPUT_KEYBOARD=y ++# CONFIG_KEYBOARD_ADP5588 is not set ++CONFIG_KEYBOARD_ATKBD=y ++# CONFIG_KEYBOARD_QT1070 is not set ++# CONFIG_KEYBOARD_QT2160 is not set ++# CONFIG_KEYBOARD_LKKBD is not set ++CONFIG_KEYBOARD_GPIO=y ++# CONFIG_KEYBOARD_TCA6416 is not set ++# CONFIG_KEYBOARD_MATRIX is not set ++# CONFIG_KEYBOARD_MAX7359 is not set ++# CONFIG_KEYBOARD_MCS is not set ++# CONFIG_KEYBOARD_NEWTON is not set ++# CONFIG_KEYBOARD_OPENCORES is not set ++# CONFIG_KEYBOARD_STOWAWAY is not set ++# CONFIG_KEYBOARD_SUNKBD is not set ++# CONFIG_KEYBOARD_OMAP4 is not set ++CONFIG_KEYBOARD_TWL4030=y ++# CONFIG_KEYBOARD_XTKBD is not set ++CONFIG_INPUT_MOUSE=y ++CONFIG_MOUSE_PS2=y ++CONFIG_MOUSE_PS2_ALPS=y ++CONFIG_MOUSE_PS2_LOGIPS2PP=y ++CONFIG_MOUSE_PS2_SYNAPTICS=y ++CONFIG_MOUSE_PS2_TRACKPOINT=y ++# CONFIG_MOUSE_PS2_ELANTECH is not set ++# CONFIG_MOUSE_PS2_SENTELIC is not set ++# CONFIG_MOUSE_PS2_TOUCHKIT is not set ++# CONFIG_MOUSE_SERIAL is not set ++# CONFIG_MOUSE_APPLETOUCH is not set ++# CONFIG_MOUSE_BCM5974 is not set ++# CONFIG_MOUSE_VSXXXAA is not set ++# CONFIG_MOUSE_GPIO is not set ++# CONFIG_MOUSE_SYNAPTICS_I2C is not set ++# CONFIG_INPUT_JOYSTICK is not set ++# CONFIG_INPUT_TABLET is not set ++CONFIG_INPUT_TOUCHSCREEN=y ++CONFIG_TOUCHSCREEN_ADS7846=y ++# CONFIG_TOUCHSCREEN_AD7877 is not set ++# CONFIG_TOUCHSCREEN_AD7879 is not set ++# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set ++# CONFIG_TOUCHSCREEN_BU21013 is not set ++# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set ++# CONFIG_TOUCHSCREEN_DYNAPRO is not set ++# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set ++# CONFIG_TOUCHSCREEN_EETI is not set ++# CONFIG_TOUCHSCREEN_FUJITSU is not set ++# CONFIG_TOUCHSCREEN_GUNZE is not set ++# CONFIG_TOUCHSCREEN_ELO is not set ++# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set ++# CONFIG_TOUCHSCREEN_MCS5000 is not set ++# CONFIG_TOUCHSCREEN_MTOUCH is not set ++# CONFIG_TOUCHSCREEN_INEXIO is not set ++# CONFIG_TOUCHSCREEN_MK712 is not set ++# CONFIG_TOUCHSCREEN_PENMOUNT is not set ++# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set ++# CONFIG_TOUCHSCREEN_TOUCHWIN is not set ++# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set ++# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set ++# CONFIG_TOUCHSCREEN_TSC2005 is not set ++# CONFIG_TOUCHSCREEN_TSC2007 is not set ++# CONFIG_TOUCHSCREEN_W90X900 is not set ++# CONFIG_TOUCHSCREEN_ST1232 is not set ++# CONFIG_TOUCHSCREEN_TPS6507X is not set ++CONFIG_INPUT_MISC=y ++# CONFIG_INPUT_AD714X is not set ++# CONFIG_INPUT_ATI_REMOTE is not set ++# CONFIG_INPUT_ATI_REMOTE2 is not set ++# CONFIG_INPUT_KEYSPAN_REMOTE is not set ++# CONFIG_INPUT_POWERMATE is not set ++# CONFIG_INPUT_YEALINK is not set ++# CONFIG_INPUT_CM109 is not set ++CONFIG_INPUT_TWL4030_PWRBUTTON=y ++# CONFIG_INPUT_TWL4030_VIBRA is not set ++# CONFIG_INPUT_UINPUT is not set ++# CONFIG_INPUT_PCF8574 is not set ++# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set ++# CONFIG_INPUT_ADXL34X is not set ++# CONFIG_INPUT_CMA3000 is not set ++ ++# ++# Hardware I/O ports ++# ++CONFIG_SERIO=y ++CONFIG_SERIO_SERPORT=y ++CONFIG_SERIO_LIBPS2=y ++# CONFIG_SERIO_RAW is not set ++# CONFIG_SERIO_ALTERA_PS2 is not set ++# CONFIG_SERIO_PS2MULT is not set ++# CONFIG_GAMEPORT is not set ++ ++# ++# Character devices ++# ++CONFIG_VT=y ++CONFIG_CONSOLE_TRANSLATIONS=y ++CONFIG_VT_CONSOLE=y ++CONFIG_HW_CONSOLE=y ++CONFIG_VT_HW_CONSOLE_BINDING=y ++CONFIG_UNIX98_PTYS=y ++# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set ++# CONFIG_LEGACY_PTYS is not set ++# CONFIG_SERIAL_NONSTANDARD is not set ++# CONFIG_N_GSM is not set ++CONFIG_DEVKMEM=y ++ ++# ++# Serial drivers ++# ++CONFIG_SERIAL_8250=y ++CONFIG_SERIAL_8250_CONSOLE=y ++CONFIG_SERIAL_8250_NR_UARTS=32 ++CONFIG_SERIAL_8250_RUNTIME_UARTS=4 ++CONFIG_SERIAL_8250_EXTENDED=y ++CONFIG_SERIAL_8250_MANY_PORTS=y ++CONFIG_SERIAL_8250_SHARE_IRQ=y ++CONFIG_SERIAL_8250_DETECT_IRQ=y ++CONFIG_SERIAL_8250_RSA=y ++ ++# ++# Non-8250 serial port support ++# ++# CONFIG_SERIAL_MAX3100 is not set ++# CONFIG_SERIAL_MAX3107 is not set ++CONFIG_SERIAL_CORE=y ++CONFIG_SERIAL_CORE_CONSOLE=y ++CONFIG_SERIAL_OMAP=y ++CONFIG_SERIAL_OMAP_CONSOLE=y ++# CONFIG_SERIAL_TIMBERDALE is not set ++# CONFIG_SERIAL_ALTERA_JTAGUART is not set ++# CONFIG_SERIAL_ALTERA_UART is not set ++# CONFIG_SERIAL_IFX6X60 is not set ++# CONFIG_TTY_PRINTK is not set ++# CONFIG_HVC_DCC is not set ++# CONFIG_IPMI_HANDLER is not set ++CONFIG_HW_RANDOM=y ++# CONFIG_HW_RANDOM_TIMERIOMEM is not set ++# CONFIG_R3964 is not set ++# CONFIG_RAW_DRIVER is not set ++# CONFIG_TCG_TPM is not set ++# CONFIG_RAMOOPS is not set ++CONFIG_I2C=y ++CONFIG_I2C_BOARDINFO=y ++CONFIG_I2C_COMPAT=y ++CONFIG_I2C_CHARDEV=y ++# CONFIG_I2C_MUX is not set ++CONFIG_I2C_HELPER_AUTO=y ++ ++# ++# I2C Hardware Bus support ++# ++ ++# ++# I2C system bus drivers (mostly embedded / system-on-chip) ++# ++# CONFIG_I2C_DESIGNWARE is not set ++# CONFIG_I2C_GPIO is not set ++# CONFIG_I2C_OCORES is not set ++CONFIG_I2C_OMAP=y ++# CONFIG_I2C_PCA_PLATFORM is not set ++# CONFIG_I2C_PXA_PCI is not set ++# CONFIG_I2C_SIMTEC is not set ++# CONFIG_I2C_XILINX is not set ++ ++# ++# External I2C/SMBus adapter drivers ++# ++# CONFIG_I2C_DIOLAN_U2C is not set ++# CONFIG_I2C_PARPORT_LIGHT is not set ++# CONFIG_I2C_TAOS_EVM is not set ++# CONFIG_I2C_TINY_USB is not set ++ ++# ++# Other I2C/SMBus bus drivers ++# ++# CONFIG_I2C_STUB is not set ++# CONFIG_I2C_DEBUG_CORE is not set ++# CONFIG_I2C_DEBUG_ALGO is not set ++# CONFIG_I2C_DEBUG_BUS is not set ++CONFIG_SPI=y ++# CONFIG_SPI_DEBUG is not set ++CONFIG_SPI_MASTER=y ++ ++# ++# SPI Master Controller Drivers ++# ++# CONFIG_SPI_ALTERA is not set ++# CONFIG_SPI_BITBANG is not set ++# CONFIG_SPI_GPIO is not set ++# CONFIG_SPI_OC_TINY is not set ++CONFIG_SPI_OMAP24XX=y ++# CONFIG_SPI_PXA2XX_PCI is not set ++# CONFIG_SPI_XILINX is not set ++# CONFIG_SPI_DESIGNWARE is not set ++ ++# ++# SPI Protocol Masters ++# ++# CONFIG_SPI_SPIDEV is not set ++# CONFIG_SPI_TLE62X0 is not set ++ ++# ++# PPS support ++# ++# CONFIG_PPS is not set ++ ++# ++# PPS generators support ++# ++CONFIG_ARCH_REQUIRE_GPIOLIB=y ++CONFIG_GPIOLIB=y ++CONFIG_DEBUG_GPIO=y ++CONFIG_GPIO_SYSFS=y ++ ++# ++# Memory mapped GPIO expanders: ++# ++# CONFIG_GPIO_BASIC_MMIO is not set ++# CONFIG_GPIO_IT8761E is not set ++ ++# ++# I2C GPIO expanders: ++# ++# CONFIG_GPIO_MAX7300 is not set ++# CONFIG_GPIO_MAX732X is not set ++# CONFIG_GPIO_PCF857X is not set ++# CONFIG_GPIO_SX150X is not set ++CONFIG_GPIO_TWL4030=y ++# CONFIG_GPIO_ADP5588 is not set ++ ++# ++# PCI GPIO expanders: ++# ++ ++# ++# SPI GPIO expanders: ++# ++# CONFIG_GPIO_MAX7301 is not set ++# CONFIG_GPIO_MCP23S08 is not set ++# CONFIG_GPIO_MC33880 is not set ++# CONFIG_GPIO_74X164 is not set ++ ++# ++# AC97 GPIO expanders: ++# ++ ++# ++# MODULbus GPIO expanders: ++# ++CONFIG_W1=y ++CONFIG_W1_CON=y ++ ++# ++# 1-wire Bus Masters ++# ++# CONFIG_W1_MASTER_DS2490 is not set ++# CONFIG_W1_MASTER_DS2482 is not set ++# CONFIG_W1_MASTER_DS1WM is not set ++# CONFIG_W1_MASTER_GPIO is not set ++ ++# ++# 1-wire Slaves ++# ++# CONFIG_W1_SLAVE_THERM is not set ++# CONFIG_W1_SLAVE_SMEM is not set ++# CONFIG_W1_SLAVE_DS2423 is not set ++# CONFIG_W1_SLAVE_DS2431 is not set ++# CONFIG_W1_SLAVE_DS2433 is not set ++# CONFIG_W1_SLAVE_DS2760 is not set ++# CONFIG_W1_SLAVE_BQ27000 is not set ++CONFIG_POWER_SUPPLY=y ++# CONFIG_POWER_SUPPLY_DEBUG is not set ++# CONFIG_PDA_POWER is not set ++# CONFIG_TEST_POWER is not set ++# CONFIG_BATTERY_DS2782 is not set ++# CONFIG_BATTERY_BQ20Z75 is not set ++# CONFIG_BATTERY_BQ27x00 is not set ++# CONFIG_BATTERY_MAX17040 is not set ++# CONFIG_BATTERY_MAX17042 is not set ++# CONFIG_CHARGER_TWL4030 is not set ++# CONFIG_CHARGER_GPIO is not set ++CONFIG_HWMON=y ++# CONFIG_HWMON_VID is not set ++# CONFIG_HWMON_DEBUG_CHIP is not set ++ ++# ++# Native drivers ++# ++# CONFIG_SENSORS_AD7414 is not set ++# CONFIG_SENSORS_AD7418 is not set ++# CONFIG_SENSORS_ADCXX is not set ++# CONFIG_SENSORS_ADM1021 is not set ++# CONFIG_SENSORS_ADM1025 is not set ++# CONFIG_SENSORS_ADM1026 is not set ++# CONFIG_SENSORS_ADM1029 is not set ++# CONFIG_SENSORS_ADM1031 is not set ++# CONFIG_SENSORS_ADM9240 is not set ++# CONFIG_SENSORS_ADT7411 is not set ++# CONFIG_SENSORS_ADT7462 is not set ++# CONFIG_SENSORS_ADT7470 is not set ++# CONFIG_SENSORS_ADT7475 is not set ++# CONFIG_SENSORS_ASC7621 is not set ++# CONFIG_SENSORS_ATXP1 is not set ++# CONFIG_SENSORS_DS620 is not set ++# CONFIG_SENSORS_DS1621 is not set ++# CONFIG_SENSORS_F71805F is not set ++# CONFIG_SENSORS_F71882FG is not set ++# CONFIG_SENSORS_F75375S is not set ++# CONFIG_SENSORS_G760A is not set ++# CONFIG_SENSORS_GL518SM is not set ++# CONFIG_SENSORS_GL520SM is not set ++# CONFIG_SENSORS_GPIO_FAN is not set ++# CONFIG_SENSORS_IT87 is not set ++# CONFIG_SENSORS_JC42 is not set ++# CONFIG_SENSORS_LINEAGE is not set ++# CONFIG_SENSORS_LM63 is not set ++# CONFIG_SENSORS_LM70 is not set ++# CONFIG_SENSORS_LM73 is not set ++# CONFIG_SENSORS_LM75 is not set ++# CONFIG_SENSORS_LM77 is not set ++# CONFIG_SENSORS_LM78 is not set ++# CONFIG_SENSORS_LM80 is not set ++# CONFIG_SENSORS_LM83 is not set ++# CONFIG_SENSORS_LM85 is not set ++# CONFIG_SENSORS_LM87 is not set ++# CONFIG_SENSORS_LM90 is not set ++# CONFIG_SENSORS_LM92 is not set ++# CONFIG_SENSORS_LM93 is not set ++# CONFIG_SENSORS_LTC4151 is not set ++# CONFIG_SENSORS_LTC4215 is not set ++# CONFIG_SENSORS_LTC4245 is not set ++# CONFIG_SENSORS_LTC4261 is not set ++# CONFIG_SENSORS_LM95241 is not set ++# CONFIG_SENSORS_MAX1111 is not set ++# CONFIG_SENSORS_MAX1619 is not set ++# CONFIG_SENSORS_MAX6639 is not set ++# CONFIG_SENSORS_MAX6650 is not set ++# CONFIG_SENSORS_PC87360 is not set ++# CONFIG_SENSORS_PC87427 is not set ++# CONFIG_SENSORS_PCF8591 is not set ++# CONFIG_PMBUS is not set ++# CONFIG_SENSORS_SHT15 is not set ++# CONFIG_SENSORS_SHT21 is not set ++# CONFIG_SENSORS_SMM665 is not set ++# CONFIG_SENSORS_DME1737 is not set ++# CONFIG_SENSORS_EMC1403 is not set ++# CONFIG_SENSORS_EMC2103 is not set ++# CONFIG_SENSORS_SMSC47M1 is not set ++# CONFIG_SENSORS_SMSC47M192 is not set ++# CONFIG_SENSORS_SMSC47B397 is not set ++# CONFIG_SENSORS_SCH5627 is not set ++# CONFIG_SENSORS_ADS1015 is not set ++# CONFIG_SENSORS_ADS7828 is not set ++# CONFIG_SENSORS_ADS7871 is not set ++# CONFIG_SENSORS_AMC6821 is not set ++# CONFIG_SENSORS_THMC50 is not set ++# CONFIG_SENSORS_TMP102 is not set ++# CONFIG_SENSORS_TMP401 is not set ++# CONFIG_SENSORS_TMP421 is not set ++# CONFIG_SENSORS_VT1211 is not set ++# CONFIG_SENSORS_W83781D is not set ++# CONFIG_SENSORS_W83791D is not set ++# CONFIG_SENSORS_W83792D is not set ++# CONFIG_SENSORS_W83793 is not set ++# CONFIG_SENSORS_W83795 is not set ++# CONFIG_SENSORS_W83L785TS is not set ++# CONFIG_SENSORS_W83L786NG is not set ++# CONFIG_SENSORS_W83627HF is not set ++# CONFIG_SENSORS_W83627EHF is not set ++# CONFIG_THERMAL is not set ++CONFIG_WATCHDOG=y ++# CONFIG_WATCHDOG_NOWAYOUT is not set ++ ++# ++# Watchdog Device Drivers ++# ++# CONFIG_SOFT_WATCHDOG is not set ++# CONFIG_MPCORE_WATCHDOG is not set ++CONFIG_OMAP_WATCHDOG=y ++CONFIG_TWL4030_WATCHDOG=y ++# CONFIG_MAX63XX_WATCHDOG is not set ++ ++# ++# USB-based Watchdog Cards ++# ++# CONFIG_USBPCWATCHDOG is not set ++CONFIG_SSB_POSSIBLE=y ++ ++# ++# Sonics Silicon Backplane ++# ++# CONFIG_SSB is not set ++CONFIG_MFD_SUPPORT=y ++# CONFIG_MFD_CORE is not set ++# CONFIG_MFD_88PM860X is not set ++# CONFIG_MFD_SM501 is not set ++# CONFIG_MFD_ASIC3 is not set ++# CONFIG_HTC_EGPIO is not set ++# CONFIG_HTC_PASIC3 is not set ++# CONFIG_HTC_I2CPLD is not set ++# CONFIG_TPS6105X is not set ++# CONFIG_TPS65010 is not set ++# CONFIG_TPS6507X is not set ++CONFIG_TWL4030_CORE=y ++# CONFIG_TWL4030_MADC is not set ++CONFIG_TWL4030_POWER=y ++# CONFIG_TWL4030_CODEC is not set ++# CONFIG_TWL6030_PWM is not set ++# CONFIG_MFD_STMPE is not set ++# CONFIG_MFD_TC3589X is not set ++# CONFIG_MFD_TMIO is not set ++# CONFIG_MFD_T7L66XB is not set ++# CONFIG_MFD_TC6387XB is not set ++# CONFIG_MFD_TC6393XB is not set ++# CONFIG_PMIC_DA903X is not set ++# CONFIG_PMIC_ADP5520 is not set ++# CONFIG_MFD_MAX8925 is not set ++# CONFIG_MFD_MAX8997 is not set ++# CONFIG_MFD_MAX8998 is not set ++# CONFIG_MFD_WM8400 is not set ++# CONFIG_MFD_WM831X_I2C is not set ++# CONFIG_MFD_WM831X_SPI is not set ++# CONFIG_MFD_WM8350_I2C is not set ++# CONFIG_MFD_WM8994 is not set ++# CONFIG_MFD_PCF50633 is not set ++# CONFIG_MFD_MC13XXX is not set ++# CONFIG_ABX500_CORE is not set ++# CONFIG_EZX_PCAP is not set ++# CONFIG_MFD_TPS6586X is not set ++# CONFIG_MFD_WL1273_CORE is not set ++CONFIG_REGULATOR=y ++# CONFIG_REGULATOR_DEBUG is not set ++# CONFIG_REGULATOR_DUMMY is not set ++CONFIG_REGULATOR_FIXED_VOLTAGE=y ++# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set ++# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set ++# CONFIG_REGULATOR_BQ24022 is not set ++# CONFIG_REGULATOR_MAX1586 is not set ++# CONFIG_REGULATOR_MAX8649 is not set ++# CONFIG_REGULATOR_MAX8660 is not set ++# CONFIG_REGULATOR_MAX8952 is not set ++CONFIG_REGULATOR_TWL4030=y ++# CONFIG_REGULATOR_LP3971 is not set ++# CONFIG_REGULATOR_LP3972 is not set ++CONFIG_REGULATOR_TPS65023=y ++CONFIG_REGULATOR_TPS6507X=y ++# CONFIG_REGULATOR_ISL6271A is not set ++# CONFIG_REGULATOR_AD5398 is not set ++# CONFIG_REGULATOR_TPS6524X is not set ++# CONFIG_MEDIA_SUPPORT is not set ++ ++# ++# Graphics support ++# ++# CONFIG_DRM is not set ++# CONFIG_VGASTATE is not set ++# CONFIG_VIDEO_OUTPUT_CONTROL is not set ++CONFIG_FB=y ++CONFIG_FIRMWARE_EDID=y ++# CONFIG_FB_DDC is not set ++# CONFIG_FB_BOOT_VESA_SUPPORT is not set ++CONFIG_FB_CFB_FILLRECT=y ++CONFIG_FB_CFB_COPYAREA=y ++CONFIG_FB_CFB_IMAGEBLIT=y ++# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set ++# CONFIG_FB_SYS_FILLRECT is not set ++# CONFIG_FB_SYS_COPYAREA is not set ++# CONFIG_FB_SYS_IMAGEBLIT is not set ++# CONFIG_FB_FOREIGN_ENDIAN is not set ++# CONFIG_FB_SYS_FOPS is not set ++# CONFIG_FB_WMT_GE_ROPS is not set ++# CONFIG_FB_SVGALIB is not set ++# CONFIG_FB_MACMODES is not set ++# CONFIG_FB_BACKLIGHT is not set ++CONFIG_FB_MODE_HELPERS=y ++CONFIG_FB_TILEBLITTING=y ++ ++# ++# Frame buffer hardware drivers ++# ++# CONFIG_FB_UVESA is not set ++# CONFIG_FB_S1D13XXX is not set ++# CONFIG_FB_UDL is not set ++# CONFIG_FB_VIRTUAL is not set ++# CONFIG_FB_METRONOME is not set ++# CONFIG_FB_MB862XX is not set ++# CONFIG_FB_BROADSHEET is not set ++# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set ++CONFIG_OMAP2_VRAM=y ++CONFIG_OMAP2_DSS=y ++CONFIG_OMAP2_VRAM_SIZE=32 ++CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y ++# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set ++CONFIG_OMAP2_DSS_DPI=y ++# CONFIG_OMAP2_DSS_RFBI is not set ++# CONFIG_OMAP2_DSS_VENC is not set ++# CONFIG_OMAP4_DSS_HDMI is not set ++# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set ++CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 ++CONFIG_FB_OMAP2=y ++CONFIG_FB_OMAP2_DEBUG_SUPPORT=y ++CONFIG_FB_OMAP2_NUM_FBS=1 ++ ++# ++# OMAP2/3 Display Device Drivers ++# ++CONFIG_PANEL_GENERIC_DPI=y ++# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set ++# CONFIG_PANEL_SHARP_LS037V7DW01 is not set ++# CONFIG_PANEL_NEC_NL8048HL11_01B is not set ++# CONFIG_PANEL_TPO_TD043MTEA1 is not set ++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set ++ ++# ++# Display device support ++# ++# CONFIG_DISPLAY_SUPPORT is not set ++ ++# ++# Console display driver support ++# ++CONFIG_DUMMY_CONSOLE=y ++CONFIG_FRAMEBUFFER_CONSOLE=y ++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y ++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set ++CONFIG_FONTS=y ++CONFIG_FONT_8x8=y ++CONFIG_FONT_8x16=y ++# CONFIG_FONT_6x11 is not set ++# CONFIG_FONT_7x14 is not set ++# CONFIG_FONT_PEARL_8x8 is not set ++# CONFIG_FONT_ACORN_8x8 is not set ++# CONFIG_FONT_MINI_4x6 is not set ++# CONFIG_FONT_SUN8x16 is not set ++# CONFIG_FONT_SUN12x22 is not set ++# CONFIG_FONT_10x18 is not set ++CONFIG_LOGO=y ++# CONFIG_LOGO_LINUX_MONO is not set ++# CONFIG_LOGO_LINUX_VGA16 is not set ++CONFIG_LOGO_LINUX_CLUT224=y ++# CONFIG_SOUND is not set ++CONFIG_HID_SUPPORT=y ++CONFIG_HID=y ++# CONFIG_HIDRAW is not set ++ ++# ++# USB Input Devices ++# ++CONFIG_USB_HID=y ++# CONFIG_HID_PID is not set ++# CONFIG_USB_HIDDEV is not set ++ ++# ++# Special HID drivers ++# ++# CONFIG_HID_3M_PCT is not set ++# CONFIG_HID_A4TECH is not set ++# CONFIG_HID_ACRUX is not set ++# CONFIG_HID_APPLE is not set ++# CONFIG_HID_BELKIN is not set ++# CONFIG_HID_CANDO is not set ++# CONFIG_HID_CHERRY is not set ++# CONFIG_HID_CHICONY is not set ++# CONFIG_HID_CYPRESS is not set ++# CONFIG_HID_DRAGONRISE is not set ++# CONFIG_HID_EMS_FF is not set ++# CONFIG_HID_EZKEY is not set ++# CONFIG_HID_KEYTOUCH is not set ++# CONFIG_HID_KYE is not set ++# CONFIG_HID_UCLOGIC is not set ++# CONFIG_HID_WALTOP is not set ++# CONFIG_HID_GYRATION is not set ++# CONFIG_HID_TWINHAN is not set ++# CONFIG_HID_KENSINGTON is not set ++# CONFIG_HID_LCPOWER is not set ++# CONFIG_HID_LOGITECH is not set ++# CONFIG_HID_MICROSOFT is not set ++# CONFIG_HID_MOSART is not set ++# CONFIG_HID_MONTEREY is not set ++# CONFIG_HID_MULTITOUCH is not set ++# CONFIG_HID_NTRIG is not set ++# CONFIG_HID_ORTEK is not set ++# CONFIG_HID_PANTHERLORD is not set ++# CONFIG_HID_PETALYNX is not set ++# CONFIG_HID_PICOLCD is not set ++# CONFIG_HID_QUANTA is not set ++# CONFIG_HID_ROCCAT is not set ++# CONFIG_HID_ROCCAT_ARVO is not set ++# CONFIG_HID_ROCCAT_KONE is not set ++# CONFIG_HID_ROCCAT_KONEPLUS is not set ++# CONFIG_HID_ROCCAT_KOVAPLUS is not set ++# CONFIG_HID_ROCCAT_PYRA is not set ++# CONFIG_HID_SAMSUNG is not set ++# CONFIG_HID_SONY is not set ++# CONFIG_HID_STANTUM is not set ++# CONFIG_HID_SUNPLUS is not set ++# CONFIG_HID_GREENASIA is not set ++# CONFIG_HID_SMARTJOYPLUS is not set ++# CONFIG_HID_TOPSEED is not set ++# CONFIG_HID_THRUSTMASTER is not set ++# CONFIG_HID_ZEROPLUS is not set ++# CONFIG_HID_ZYDACRON is not set ++CONFIG_USB_SUPPORT=y ++CONFIG_USB_ARCH_HAS_HCD=y ++CONFIG_USB_ARCH_HAS_OHCI=y ++CONFIG_USB_ARCH_HAS_EHCI=y ++CONFIG_USB=y ++CONFIG_USB_DEBUG=y ++CONFIG_USB_ANNOUNCE_NEW_DEVICES=y ++ ++# ++# Miscellaneous USB options ++# ++CONFIG_USB_DEVICEFS=y ++CONFIG_USB_DEVICE_CLASS=y ++# CONFIG_USB_DYNAMIC_MINORS is not set ++CONFIG_USB_SUSPEND=y ++# CONFIG_USB_OTG is not set ++# CONFIG_USB_OTG_WHITELIST is not set ++# CONFIG_USB_OTG_BLACKLIST_HUB is not set ++CONFIG_USB_MON=y ++# CONFIG_USB_WUSB is not set ++# CONFIG_USB_WUSB_CBAF is not set ++ ++# ++# USB Host Controller Drivers ++# ++# CONFIG_USB_C67X00_HCD is not set ++# CONFIG_USB_EHCI_HCD is not set ++# CONFIG_USB_OXU210HP_HCD is not set ++# CONFIG_USB_ISP116X_HCD is not set ++# CONFIG_USB_ISP1760_HCD is not set ++# CONFIG_USB_ISP1362_HCD is not set ++# CONFIG_USB_OHCI_HCD is not set ++# CONFIG_USB_SL811_HCD is not set ++# CONFIG_USB_R8A66597_HCD is not set ++# CONFIG_USB_HWA_HCD is not set ++# CONFIG_USB_MUSB_HDRC is not set ++ ++# ++# USB Device Class drivers ++# ++# CONFIG_USB_ACM is not set ++# CONFIG_USB_PRINTER is not set ++CONFIG_USB_WDM=y ++# CONFIG_USB_TMC is not set ++ ++# ++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ++# ++ ++# ++# also be needed; see USB_STORAGE Help for more info ++# ++CONFIG_USB_STORAGE=y ++# CONFIG_USB_STORAGE_DEBUG is not set ++# CONFIG_USB_STORAGE_REALTEK is not set ++# CONFIG_USB_STORAGE_DATAFAB is not set ++# CONFIG_USB_STORAGE_FREECOM is not set ++# CONFIG_USB_STORAGE_ISD200 is not set ++# CONFIG_USB_STORAGE_USBAT is not set ++# CONFIG_USB_STORAGE_SDDR09 is not set ++# CONFIG_USB_STORAGE_SDDR55 is not set ++# CONFIG_USB_STORAGE_JUMPSHOT is not set ++# CONFIG_USB_STORAGE_ALAUDA is not set ++# CONFIG_USB_STORAGE_ONETOUCH is not set ++# CONFIG_USB_STORAGE_KARMA is not set ++# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set ++# CONFIG_USB_STORAGE_ENE_UB6250 is not set ++# CONFIG_USB_UAS is not set ++CONFIG_USB_LIBUSUAL=y ++ ++# ++# USB Imaging devices ++# ++# CONFIG_USB_MDC800 is not set ++# CONFIG_USB_MICROTEK is not set ++ ++# ++# USB port drivers ++# ++# CONFIG_USB_SERIAL is not set ++ ++# ++# USB Miscellaneous drivers ++# ++# CONFIG_USB_EMI62 is not set ++# CONFIG_USB_EMI26 is not set ++# CONFIG_USB_ADUTUX is not set ++# CONFIG_USB_SEVSEG is not set ++# CONFIG_USB_RIO500 is not set ++# CONFIG_USB_LEGOTOWER is not set ++# CONFIG_USB_LCD is not set ++# CONFIG_USB_LED is not set ++# CONFIG_USB_CYPRESS_CY7C63 is not set ++# CONFIG_USB_CYTHERM is not set ++# CONFIG_USB_IDMOUSE is not set ++# CONFIG_USB_FTDI_ELAN is not set ++# CONFIG_USB_APPLEDISPLAY is not set ++# CONFIG_USB_LD is not set ++# CONFIG_USB_TRANCEVIBRATOR is not set ++# CONFIG_USB_IOWARRIOR is not set ++CONFIG_USB_TEST=y ++# CONFIG_USB_ISIGHTFW is not set ++# CONFIG_USB_YUREX is not set ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_DEBUG=y ++CONFIG_USB_GADGET_DEBUG_FILES=y ++CONFIG_USB_GADGET_DEBUG_FS=y ++CONFIG_USB_GADGET_VBUS_DRAW=2 ++CONFIG_USB_GADGET_SELECTED=y ++CONFIG_USB_GADGET_FUSB300=y ++CONFIG_USB_FUSB300=y ++# CONFIG_USB_GADGET_OMAP is not set ++# CONFIG_USB_GADGET_R8A66597 is not set ++# CONFIG_USB_GADGET_PXA_U2O is not set ++# CONFIG_USB_GADGET_M66592 is not set ++# CONFIG_USB_GADGET_DUMMY_HCD is not set ++CONFIG_USB_GADGET_DUALSPEED=y ++CONFIG_USB_ZERO=m ++# CONFIG_USB_ETH is not set ++# CONFIG_USB_G_NCM is not set ++# CONFIG_USB_GADGETFS is not set ++# CONFIG_USB_FUNCTIONFS is not set ++# CONFIG_USB_FILE_STORAGE is not set ++# CONFIG_USB_MASS_STORAGE is not set ++# CONFIG_USB_G_SERIAL is not set ++# CONFIG_USB_G_PRINTER is not set ++# CONFIG_USB_CDC_COMPOSITE is not set ++# CONFIG_USB_G_MULTI is not set ++# CONFIG_USB_G_HID is not set ++# CONFIG_USB_G_DBGP is not set ++ ++# ++# OTG and related infrastructure ++# ++# CONFIG_USB_GPIO_VBUS is not set ++# CONFIG_USB_ULPI is not set ++# CONFIG_TWL4030_USB is not set ++# CONFIG_TWL6030_USB is not set ++# CONFIG_NOP_USB_XCEIV is not set ++CONFIG_MMC=y ++# CONFIG_MMC_DEBUG is not set ++CONFIG_MMC_UNSAFE_RESUME=y ++# CONFIG_MMC_CLKGATE is not set ++ ++# ++# MMC/SD/SDIO Card Drivers ++# ++CONFIG_MMC_BLOCK=y ++CONFIG_MMC_BLOCK_MINORS=8 ++CONFIG_MMC_BLOCK_BOUNCE=y ++CONFIG_SDIO_UART=y ++# CONFIG_MMC_TEST is not set ++ ++# ++# MMC/SD/SDIO Host Controller Drivers ++# ++# CONFIG_MMC_SDHCI is not set ++CONFIG_MMC_OMAP=y ++CONFIG_MMC_OMAP_HS=y ++# CONFIG_MMC_SPI is not set ++# CONFIG_MMC_DW is not set ++# CONFIG_MMC_USHC is not set ++# CONFIG_MEMSTICK is not set ++# CONFIG_NEW_LEDS is not set ++# CONFIG_NFC_DEVICES is not set ++# CONFIG_ACCESSIBILITY is not set ++CONFIG_RTC_LIB=y ++CONFIG_RTC_CLASS=y ++CONFIG_RTC_HCTOSYS=y ++CONFIG_RTC_HCTOSYS_DEVICE="rtc0" ++# CONFIG_RTC_DEBUG is not set ++ ++# ++# RTC interfaces ++# ++CONFIG_RTC_INTF_SYSFS=y ++CONFIG_RTC_INTF_PROC=y ++CONFIG_RTC_INTF_DEV=y ++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set ++# CONFIG_RTC_DRV_TEST is not set ++ ++# ++# I2C RTC drivers ++# ++# CONFIG_RTC_DRV_DS1307 is not set ++# CONFIG_RTC_DRV_DS1374 is not set ++# CONFIG_RTC_DRV_DS1672 is not set ++# CONFIG_RTC_DRV_DS3232 is not set ++# CONFIG_RTC_DRV_MAX6900 is not set ++# CONFIG_RTC_DRV_RS5C372 is not set ++# CONFIG_RTC_DRV_ISL1208 is not set ++# CONFIG_RTC_DRV_ISL12022 is not set ++# CONFIG_RTC_DRV_X1205 is not set ++# CONFIG_RTC_DRV_PCF8563 is not set ++# CONFIG_RTC_DRV_PCF8583 is not set ++# CONFIG_RTC_DRV_M41T80 is not set ++# CONFIG_RTC_DRV_BQ32K is not set ++CONFIG_RTC_DRV_TWL4030=y ++# CONFIG_RTC_DRV_S35390A is not set ++# CONFIG_RTC_DRV_FM3130 is not set ++# CONFIG_RTC_DRV_RX8581 is not set ++# CONFIG_RTC_DRV_RX8025 is not set ++ ++# ++# SPI RTC drivers ++# ++# CONFIG_RTC_DRV_M41T94 is not set ++# CONFIG_RTC_DRV_DS1305 is not set ++# CONFIG_RTC_DRV_DS1390 is not set ++# CONFIG_RTC_DRV_MAX6902 is not set ++# CONFIG_RTC_DRV_R9701 is not set ++# CONFIG_RTC_DRV_RS5C348 is not set ++# CONFIG_RTC_DRV_DS3234 is not set ++# CONFIG_RTC_DRV_PCF2123 is not set ++ ++# ++# Platform RTC drivers ++# ++# CONFIG_RTC_DRV_CMOS is not set ++# CONFIG_RTC_DRV_DS1286 is not set ++# CONFIG_RTC_DRV_DS1511 is not set ++# CONFIG_RTC_DRV_DS1553 is not set ++# CONFIG_RTC_DRV_DS1742 is not set ++# CONFIG_RTC_DRV_STK17TA8 is not set ++# CONFIG_RTC_DRV_M48T86 is not set ++# CONFIG_RTC_DRV_M48T35 is not set ++# CONFIG_RTC_DRV_M48T59 is not set ++# CONFIG_RTC_DRV_MSM6242 is not set ++# CONFIG_RTC_DRV_BQ4802 is not set ++# CONFIG_RTC_DRV_RP5C01 is not set ++# CONFIG_RTC_DRV_V3020 is not set ++ ++# ++# on-CPU RTC drivers ++# ++# CONFIG_DMADEVICES is not set ++# CONFIG_AUXDISPLAY is not set ++# CONFIG_UIO is not set ++# CONFIG_STAGING is not set ++CONFIG_CLKDEV_LOOKUP=y ++# CONFIG_HWSPINLOCK is not set ++ ++# ++# File systems ++# ++CONFIG_EXT2_FS=y ++# CONFIG_EXT2_FS_XATTR is not set ++# CONFIG_EXT2_FS_XIP is not set ++CONFIG_EXT3_FS=y ++CONFIG_EXT3_DEFAULTS_TO_ORDERED=y ++# CONFIG_EXT3_FS_XATTR is not set ++# CONFIG_EXT4_FS is not set ++CONFIG_JBD=y ++# CONFIG_JBD_DEBUG is not set ++# CONFIG_REISERFS_FS is not set ++# CONFIG_JFS_FS is not set ++# CONFIG_XFS_FS is not set ++# CONFIG_GFS2_FS is not set ++# CONFIG_BTRFS_FS is not set ++# CONFIG_NILFS2_FS is not set ++CONFIG_FS_POSIX_ACL=y ++CONFIG_FILE_LOCKING=y ++CONFIG_FSNOTIFY=y ++CONFIG_DNOTIFY=y ++CONFIG_INOTIFY_USER=y ++# CONFIG_FANOTIFY is not set ++CONFIG_QUOTA=y ++# CONFIG_QUOTA_NETLINK_INTERFACE is not set ++CONFIG_PRINT_QUOTA_WARNING=y ++# CONFIG_QUOTA_DEBUG is not set ++CONFIG_QUOTA_TREE=y ++# CONFIG_QFMT_V1 is not set ++CONFIG_QFMT_V2=y ++CONFIG_QUOTACTL=y ++# CONFIG_AUTOFS4_FS is not set ++# CONFIG_FUSE_FS is not set ++ ++# ++# Caches ++# ++# CONFIG_FSCACHE is not set ++ ++# ++# CD-ROM/DVD Filesystems ++# ++# CONFIG_ISO9660_FS is not set ++# CONFIG_UDF_FS is not set ++ ++# ++# DOS/FAT/NT Filesystems ++# ++CONFIG_FAT_FS=y ++CONFIG_MSDOS_FS=y ++CONFIG_VFAT_FS=y ++CONFIG_FAT_DEFAULT_CODEPAGE=437 ++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" ++# CONFIG_NTFS_FS is not set ++ ++# ++# Pseudo filesystems ++# ++CONFIG_PROC_FS=y ++CONFIG_PROC_SYSCTL=y ++CONFIG_PROC_PAGE_MONITOR=y ++CONFIG_SYSFS=y ++CONFIG_TMPFS=y ++# CONFIG_TMPFS_POSIX_ACL is not set ++# CONFIG_HUGETLB_PAGE is not set ++# CONFIG_CONFIGFS_FS is not set ++CONFIG_MISC_FILESYSTEMS=y ++# CONFIG_ADFS_FS is not set ++# CONFIG_AFFS_FS is not set ++# CONFIG_ECRYPT_FS is not set ++# CONFIG_HFS_FS is not set ++# CONFIG_HFSPLUS_FS is not set ++# CONFIG_BEFS_FS is not set ++# CONFIG_BFS_FS is not set ++# CONFIG_EFS_FS is not set ++CONFIG_JFFS2_FS=y ++CONFIG_JFFS2_FS_DEBUG=0 ++CONFIG_JFFS2_FS_WRITEBUFFER=y ++# CONFIG_JFFS2_FS_WBUF_VERIFY is not set ++CONFIG_JFFS2_SUMMARY=y ++CONFIG_JFFS2_FS_XATTR=y ++CONFIG_JFFS2_FS_POSIX_ACL=y ++CONFIG_JFFS2_FS_SECURITY=y ++CONFIG_JFFS2_COMPRESSION_OPTIONS=y ++CONFIG_JFFS2_ZLIB=y ++CONFIG_JFFS2_LZO=y ++CONFIG_JFFS2_RTIME=y ++CONFIG_JFFS2_RUBIN=y ++# CONFIG_JFFS2_CMODE_NONE is not set ++CONFIG_JFFS2_CMODE_PRIORITY=y ++# CONFIG_JFFS2_CMODE_SIZE is not set ++# CONFIG_JFFS2_CMODE_FAVOURLZO is not set ++CONFIG_UBIFS_FS=y ++# CONFIG_UBIFS_FS_XATTR is not set ++# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set ++CONFIG_UBIFS_FS_LZO=y ++CONFIG_UBIFS_FS_ZLIB=y ++# CONFIG_UBIFS_FS_DEBUG is not set ++# CONFIG_LOGFS is not set ++CONFIG_CRAMFS=y ++# CONFIG_SQUASHFS is not set ++# CONFIG_VXFS_FS is not set ++# CONFIG_MINIX_FS is not set ++# CONFIG_OMFS_FS is not set ++# CONFIG_HPFS_FS is not set ++# CONFIG_QNX4FS_FS is not set ++# CONFIG_ROMFS_FS is not set ++# CONFIG_PSTORE is not set ++# CONFIG_SYSV_FS is not set ++# CONFIG_UFS_FS is not set ++CONFIG_NETWORK_FILESYSTEMS=y ++CONFIG_NFS_FS=y ++CONFIG_NFS_V3=y ++CONFIG_NFS_V3_ACL=y ++CONFIG_NFS_V4=y ++# CONFIG_NFS_V4_1 is not set ++CONFIG_ROOT_NFS=y ++# CONFIG_NFS_USE_LEGACY_DNS is not set ++CONFIG_NFS_USE_KERNEL_DNS=y ++# CONFIG_NFS_USE_NEW_IDMAPPER is not set ++# CONFIG_NFSD is not set ++CONFIG_LOCKD=y ++CONFIG_LOCKD_V4=y ++CONFIG_NFS_ACL_SUPPORT=y ++CONFIG_NFS_COMMON=y ++CONFIG_SUNRPC=y ++CONFIG_SUNRPC_GSS=y ++CONFIG_RPCSEC_GSS_KRB5=y ++# CONFIG_CEPH_FS is not set ++# CONFIG_CIFS is not set ++# CONFIG_NCP_FS is not set ++# CONFIG_CODA_FS is not set ++# CONFIG_AFS_FS is not set ++ ++# ++# Partition Types ++# ++CONFIG_PARTITION_ADVANCED=y ++# CONFIG_ACORN_PARTITION is not set ++# CONFIG_OSF_PARTITION is not set ++# CONFIG_AMIGA_PARTITION is not set ++# CONFIG_ATARI_PARTITION is not set ++# CONFIG_MAC_PARTITION is not set ++CONFIG_MSDOS_PARTITION=y ++# CONFIG_BSD_DISKLABEL is not set ++# CONFIG_MINIX_SUBPARTITION is not set ++# CONFIG_SOLARIS_X86_PARTITION is not set ++# CONFIG_UNIXWARE_DISKLABEL is not set ++# CONFIG_LDM_PARTITION is not set ++# CONFIG_SGI_PARTITION is not set ++# CONFIG_ULTRIX_PARTITION is not set ++# CONFIG_SUN_PARTITION is not set ++# CONFIG_KARMA_PARTITION is not set ++# CONFIG_EFI_PARTITION is not set ++# CONFIG_SYSV68_PARTITION is not set ++CONFIG_NLS=y ++CONFIG_NLS_DEFAULT="iso8859-1" ++CONFIG_NLS_CODEPAGE_437=y ++# CONFIG_NLS_CODEPAGE_737 is not set ++# CONFIG_NLS_CODEPAGE_775 is not set ++# CONFIG_NLS_CODEPAGE_850 is not set ++# CONFIG_NLS_CODEPAGE_852 is not set ++# CONFIG_NLS_CODEPAGE_855 is not set ++# CONFIG_NLS_CODEPAGE_857 is not set ++# CONFIG_NLS_CODEPAGE_860 is not set ++# CONFIG_NLS_CODEPAGE_861 is not set ++# CONFIG_NLS_CODEPAGE_862 is not set ++# CONFIG_NLS_CODEPAGE_863 is not set ++# CONFIG_NLS_CODEPAGE_864 is not set ++# CONFIG_NLS_CODEPAGE_865 is not set ++# CONFIG_NLS_CODEPAGE_866 is not set ++# CONFIG_NLS_CODEPAGE_869 is not set ++# CONFIG_NLS_CODEPAGE_936 is not set ++# CONFIG_NLS_CODEPAGE_950 is not set ++# CONFIG_NLS_CODEPAGE_932 is not set ++# CONFIG_NLS_CODEPAGE_949 is not set ++# CONFIG_NLS_CODEPAGE_874 is not set ++# CONFIG_NLS_ISO8859_8 is not set ++# CONFIG_NLS_CODEPAGE_1250 is not set ++# CONFIG_NLS_CODEPAGE_1251 is not set ++# CONFIG_NLS_ASCII is not set ++CONFIG_NLS_ISO8859_1=y ++# CONFIG_NLS_ISO8859_2 is not set ++# CONFIG_NLS_ISO8859_3 is not set ++# CONFIG_NLS_ISO8859_4 is not set ++# CONFIG_NLS_ISO8859_5 is not set ++# CONFIG_NLS_ISO8859_6 is not set ++# CONFIG_NLS_ISO8859_7 is not set ++# CONFIG_NLS_ISO8859_9 is not set ++# CONFIG_NLS_ISO8859_13 is not set ++# CONFIG_NLS_ISO8859_14 is not set ++# CONFIG_NLS_ISO8859_15 is not set ++# CONFIG_NLS_KOI8_R is not set ++# CONFIG_NLS_KOI8_U is not set ++# CONFIG_NLS_UTF8 is not set ++ ++# ++# Kernel hacking ++# ++CONFIG_PRINTK_TIME=y ++CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 ++CONFIG_ENABLE_WARN_DEPRECATED=y ++CONFIG_ENABLE_MUST_CHECK=y ++CONFIG_FRAME_WARN=1024 ++CONFIG_MAGIC_SYSRQ=y ++# CONFIG_STRIP_ASM_SYMS is not set ++# CONFIG_UNUSED_SYMBOLS is not set ++CONFIG_DEBUG_FS=y ++# CONFIG_HEADERS_CHECK is not set ++# CONFIG_DEBUG_SECTION_MISMATCH is not set ++CONFIG_DEBUG_KERNEL=y ++# CONFIG_DEBUG_SHIRQ is not set ++# CONFIG_LOCKUP_DETECTOR is not set ++# CONFIG_HARDLOCKUP_DETECTOR is not set ++# CONFIG_DETECT_HUNG_TASK is not set ++CONFIG_SCHED_DEBUG=y ++CONFIG_SCHEDSTATS=y ++CONFIG_TIMER_STATS=y ++# CONFIG_DEBUG_OBJECTS is not set ++# CONFIG_DEBUG_SLAB is not set ++# CONFIG_DEBUG_KMEMLEAK is not set ++# CONFIG_DEBUG_RT_MUTEXES is not set ++# CONFIG_RT_MUTEX_TESTER is not set ++CONFIG_DEBUG_SPINLOCK=y ++CONFIG_DEBUG_MUTEXES=y ++CONFIG_DEBUG_LOCK_ALLOC=y ++CONFIG_PROVE_LOCKING=y ++# CONFIG_PROVE_RCU is not set ++# CONFIG_SPARSE_RCU_POINTER is not set ++CONFIG_LOCKDEP=y ++# CONFIG_LOCK_STAT is not set ++# CONFIG_DEBUG_LOCKDEP is not set ++CONFIG_TRACE_IRQFLAGS=y ++CONFIG_DEBUG_SPINLOCK_SLEEP=y ++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set ++CONFIG_STACKTRACE=y ++# CONFIG_DEBUG_KOBJECT is not set ++# CONFIG_DEBUG_BUGVERBOSE is not set ++CONFIG_DEBUG_INFO=y ++# CONFIG_DEBUG_INFO_REDUCED is not set ++# CONFIG_DEBUG_VM is not set ++# CONFIG_DEBUG_WRITECOUNT is not set ++# CONFIG_DEBUG_MEMORY_INIT is not set ++# CONFIG_DEBUG_LIST is not set ++# CONFIG_TEST_LIST_SORT is not set ++# CONFIG_DEBUG_SG is not set ++# CONFIG_DEBUG_NOTIFIERS is not set ++# CONFIG_DEBUG_CREDENTIALS is not set ++# CONFIG_BOOT_PRINTK_DELAY is not set ++# CONFIG_RCU_TORTURE_TEST is not set ++# CONFIG_RCU_CPU_STALL_DETECTOR is not set ++# CONFIG_KPROBES_SANITY_TEST is not set ++# CONFIG_BACKTRACE_SELF_TEST is not set ++# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set ++# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set ++# CONFIG_LKDTM is not set ++# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set ++# CONFIG_FAULT_INJECTION is not set ++# CONFIG_SYSCTL_SYSCALL_CHECK is not set ++# CONFIG_DEBUG_PAGEALLOC is not set ++CONFIG_NOP_TRACER=y ++CONFIG_HAVE_FUNCTION_TRACER=y ++CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y ++CONFIG_HAVE_DYNAMIC_FTRACE=y ++CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y ++CONFIG_HAVE_C_RECORDMCOUNT=y ++CONFIG_RING_BUFFER=y ++CONFIG_EVENT_TRACING=y ++CONFIG_EVENT_POWER_TRACING_DEPRECATED=y ++CONFIG_CONTEXT_SWITCH_TRACER=y ++CONFIG_RING_BUFFER_ALLOW_SWAP=y ++CONFIG_TRACING=y ++CONFIG_TRACING_SUPPORT=y ++CONFIG_FTRACE=y ++# CONFIG_FUNCTION_TRACER is not set ++# CONFIG_IRQSOFF_TRACER is not set ++# CONFIG_SCHED_TRACER is not set ++# CONFIG_ENABLE_DEFAULT_TRACERS is not set ++CONFIG_BRANCH_PROFILE_NONE=y ++# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set ++# CONFIG_PROFILE_ALL_BRANCHES is not set ++# CONFIG_STACK_TRACER is not set ++# CONFIG_BLK_DEV_IO_TRACE is not set ++CONFIG_KPROBE_EVENT=y ++# CONFIG_RING_BUFFER_BENCHMARK is not set ++# CONFIG_DYNAMIC_DEBUG is not set ++# CONFIG_DMA_API_DEBUG is not set ++# CONFIG_ATOMIC64_SELFTEST is not set ++# CONFIG_SAMPLES is not set ++CONFIG_HAVE_ARCH_KGDB=y ++# CONFIG_KGDB is not set ++# CONFIG_TEST_KSTRTOX is not set ++# CONFIG_STRICT_DEVMEM is not set ++CONFIG_ARM_UNWIND=y ++# CONFIG_DEBUG_USER is not set ++# CONFIG_DEBUG_ERRORS is not set ++# CONFIG_DEBUG_STACK_USAGE is not set ++# CONFIG_DEBUG_LL is not set ++# CONFIG_OC_ETM is not set ++ ++# ++# Security options ++# ++CONFIG_KEYS=y ++# CONFIG_KEYS_DEBUG_PROC_KEYS is not set ++# CONFIG_SECURITY_DMESG_RESTRICT is not set ++CONFIG_SECURITY=y ++# CONFIG_SECURITYFS is not set ++# CONFIG_SECURITY_NETWORK is not set ++# CONFIG_SECURITY_PATH is not set ++# CONFIG_SECURITY_TOMOYO is not set ++# CONFIG_SECURITY_APPARMOR is not set ++# CONFIG_IMA is not set ++CONFIG_DEFAULT_SECURITY_DAC=y ++CONFIG_DEFAULT_SECURITY="" ++CONFIG_CRYPTO=y ++ ++# ++# Crypto core or helper ++# ++CONFIG_CRYPTO_ALGAPI=y ++CONFIG_CRYPTO_ALGAPI2=y ++CONFIG_CRYPTO_AEAD2=y ++CONFIG_CRYPTO_BLKCIPHER=y ++CONFIG_CRYPTO_BLKCIPHER2=y ++CONFIG_CRYPTO_HASH=y ++CONFIG_CRYPTO_HASH2=y ++CONFIG_CRYPTO_RNG2=y ++CONFIG_CRYPTO_PCOMP2=y ++CONFIG_CRYPTO_MANAGER=y ++CONFIG_CRYPTO_MANAGER2=y ++CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y ++# CONFIG_CRYPTO_GF128MUL is not set ++# CONFIG_CRYPTO_NULL is not set ++# CONFIG_CRYPTO_PCRYPT is not set ++CONFIG_CRYPTO_WORKQUEUE=y ++# CONFIG_CRYPTO_CRYPTD is not set ++# CONFIG_CRYPTO_AUTHENC is not set ++# CONFIG_CRYPTO_TEST is not set ++ ++# ++# Authenticated Encryption with Associated Data ++# ++# CONFIG_CRYPTO_CCM is not set ++# CONFIG_CRYPTO_GCM is not set ++# CONFIG_CRYPTO_SEQIV is not set ++ ++# ++# Block modes ++# ++CONFIG_CRYPTO_CBC=y ++# CONFIG_CRYPTO_CTR is not set ++# CONFIG_CRYPTO_CTS is not set ++CONFIG_CRYPTO_ECB=m ++# CONFIG_CRYPTO_LRW is not set ++# CONFIG_CRYPTO_PCBC is not set ++# CONFIG_CRYPTO_XTS is not set ++ ++# ++# Hash modes ++# ++# CONFIG_CRYPTO_HMAC is not set ++# CONFIG_CRYPTO_XCBC is not set ++# CONFIG_CRYPTO_VMAC is not set ++ ++# ++# Digest ++# ++CONFIG_CRYPTO_CRC32C=y ++# CONFIG_CRYPTO_GHASH is not set ++# CONFIG_CRYPTO_MD4 is not set ++CONFIG_CRYPTO_MD5=y ++CONFIG_CRYPTO_MICHAEL_MIC=y ++# CONFIG_CRYPTO_RMD128 is not set ++# CONFIG_CRYPTO_RMD160 is not set ++# CONFIG_CRYPTO_RMD256 is not set ++# CONFIG_CRYPTO_RMD320 is not set ++# CONFIG_CRYPTO_SHA1 is not set ++# CONFIG_CRYPTO_SHA256 is not set ++# CONFIG_CRYPTO_SHA512 is not set ++# CONFIG_CRYPTO_TGR192 is not set ++# CONFIG_CRYPTO_WP512 is not set ++ ++# ++# Ciphers ++# ++CONFIG_CRYPTO_AES=m ++# CONFIG_CRYPTO_ANUBIS is not set ++CONFIG_CRYPTO_ARC4=m ++# CONFIG_CRYPTO_BLOWFISH is not set ++# CONFIG_CRYPTO_CAMELLIA is not set ++# CONFIG_CRYPTO_CAST5 is not set ++# CONFIG_CRYPTO_CAST6 is not set ++CONFIG_CRYPTO_DES=y ++# CONFIG_CRYPTO_FCRYPT is not set ++# CONFIG_CRYPTO_KHAZAD is not set ++# CONFIG_CRYPTO_SALSA20 is not set ++# CONFIG_CRYPTO_SEED is not set ++# CONFIG_CRYPTO_SERPENT is not set ++# CONFIG_CRYPTO_TEA is not set ++# CONFIG_CRYPTO_TWOFISH is not set ++ ++# ++# Compression ++# ++CONFIG_CRYPTO_DEFLATE=y ++# CONFIG_CRYPTO_ZLIB is not set ++CONFIG_CRYPTO_LZO=y ++ ++# ++# Random Number Generation ++# ++# CONFIG_CRYPTO_ANSI_CPRNG is not set ++# CONFIG_CRYPTO_USER_API_HASH is not set ++# CONFIG_CRYPTO_USER_API_SKCIPHER is not set ++CONFIG_CRYPTO_HW=y ++CONFIG_BINARY_PRINTF=y ++ ++# ++# Library routines ++# ++CONFIG_BITREVERSE=y ++CONFIG_GENERIC_FIND_LAST_BIT=y ++CONFIG_CRC_CCITT=y ++CONFIG_CRC16=y ++CONFIG_CRC_T10DIF=y ++CONFIG_CRC_ITU_T=y ++CONFIG_CRC32=y ++CONFIG_CRC7=y ++CONFIG_LIBCRC32C=y ++CONFIG_ZLIB_INFLATE=y ++CONFIG_ZLIB_DEFLATE=y ++CONFIG_LZO_COMPRESS=y ++CONFIG_LZO_DECOMPRESS=y ++# CONFIG_XZ_DEC is not set ++# CONFIG_XZ_DEC_BCJ is not set ++CONFIG_DECOMPRESS_GZIP=y ++CONFIG_HAS_IOMEM=y ++CONFIG_HAS_IOPORT=y ++CONFIG_HAS_DMA=y ++CONFIG_CPU_RMAP=y ++CONFIG_NLATTR=y ++CONFIG_AVERAGE=y +diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c +index f3a7b10..54d32db 100644 +--- a/arch/arm/mach-omap2/board-omap4panda.c ++++ b/arch/arm/mach-omap2/board-omap4panda.c +@@ -608,7 +608,7 @@ static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev) + + /* Using generic display panel */ + static struct panel_generic_dpi_data omap4_dvi_panel = { +- .name = "generic", ++ .name = "dvi_720p", + .platform_enable = omap4_panda_enable_dvi, + .platform_disable = omap4_panda_disable_dvi, + }; +@@ -636,7 +636,7 @@ int __init omap4_panda_dvi_init(void) + return r; + } + +- ++#ifdef CONFIG_OMAP4_DSS_HDMI + static void omap4_panda_hdmi_mux_init(void) + { + /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */ +@@ -696,6 +696,12 @@ static struct omap_dss_device *omap4_panda_dss_devices[] = { + &omap4_panda_hdmi_device, + }; + ++#else ++static struct omap_dss_device *omap4_panda_dss_devices[] = { ++ &omap4_panda_dvi_device, ++}; ++#endif ++ + static struct omap_dss_board_info omap4_panda_dss_data = { + .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), + .devices = omap4_panda_dss_devices, +@@ -710,7 +716,9 @@ void omap4_panda_display_init(void) + if (r) + pr_err("error initializing panda DVI\n"); + ++#ifdef CONFIG_OMAP4_DSS_HDMI + omap4_panda_hdmi_mux_init(); ++#endif + omap_display_init(&omap4_panda_dss_data); + } + +diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c +index 4a9b9ff..687c9c7 100644 +--- a/drivers/video/omap2/displays/panel-generic-dpi.c ++++ b/drivers/video/omap2/displays/panel-generic-dpi.c +@@ -181,6 +181,30 @@ static struct panel_config generic_dpi_panels[] = { + .power_off_delay = 0, + .name = "samsung_lte430wq_f0c", + }, ++ ++ /* Vesa 720p 1280x768 */ ++ { ++ { ++ .x_res = 1280, ++ .y_res = 768, ++ ++ .pixel_clock = 71000, ++ ++ .hfp = 128, ++ .hsw = 64, ++ .hbp = 192, ++ ++ .vfp = 3, ++ .vsw = 7, ++ .vbp = 20, ++ }, ++ .acbi = 0x0, ++ .acb = 0x0, ++ .config = OMAP_DSS_LCD_TFT, ++ .power_on_delay = 0, ++ .power_off_delay = 0, ++ .name = "dvi_720p", ++ }, + }; + + struct panel_drv_data { +diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c +index 3f1fee6..db0a9ef 100644 +--- a/drivers/video/omap2/dss/dss.c ++++ b/drivers/video/omap2/dss/dss.c +@@ -68,6 +68,7 @@ static struct { + struct clk *dss_sys_clk; + struct clk *dss_tv_fck; + struct clk *dss_video_fck; ++ struct clk *dss_dss_clk; + unsigned num_clks_enabled; + + unsigned long cache_req_pck; +@@ -816,6 +817,7 @@ static int dss_get_clocks(void) + dss.dss_sys_clk = NULL; + dss.dss_tv_fck = NULL; + dss.dss_video_fck = NULL; ++ dss.dss_dss_clk = NULL; + + r = dss_get_clock(&dss.dss_ick, "ick"); + if (r) +@@ -848,6 +850,12 @@ static int dss_get_clocks(void) + goto err; + } + ++ if (pdata->opt_clock_available("dss_clk")) { ++ r = dss_get_clock(&dss.dss_dss_clk, "dss_clk"); ++ if (r) ++ goto err; ++ } ++ + return 0; + + err: +@@ -861,7 +869,8 @@ err: + clk_put(dss.dss_tv_fck); + if (dss.dss_video_fck) + clk_put(dss.dss_video_fck); +- ++ if (dss.dss_dss_clk) ++ clk_put(dss.dss_dss_clk); + return r; + } + +@@ -873,6 +882,8 @@ static void dss_put_clocks(void) + clk_put(dss.dss_tv_fck); + if (dss.dss_sys_clk) + clk_put(dss.dss_sys_clk); ++ if (dss.dss_dss_clk) ++ clk_put(dss.dss_dss_clk); + clk_put(dss.dss_fck); + clk_put(dss.dss_ick); + } +@@ -920,8 +931,16 @@ static void dss_clk_enable_no_ctx(enum dss_clock clks) + + if (clks & DSS_CLK_ICK) + clk_enable(dss.dss_ick); +- if (clks & DSS_CLK_FCK) ++ /* ++ * XXX: tie dss_dss_clk to FCK - this will change with following ++ * pm_runtime patches. Needed for OMAP4 boot up due to stricter ++ * clock cutting in pm framework post 2.6.38-rc5. ++ */ ++ if (clks & DSS_CLK_FCK) { + clk_enable(dss.dss_fck); ++ if (dss.dss_dss_clk) ++ clk_enable(dss.dss_dss_clk); ++ } + if ((clks & DSS_CLK_SYSCK) && dss.dss_sys_clk) + clk_enable(dss.dss_sys_clk); + if ((clks & DSS_CLK_TVFCK) && dss.dss_tv_fck) +@@ -956,8 +975,16 @@ static void dss_clk_disable_no_ctx(enum dss_clock clks) + + if (clks & DSS_CLK_ICK) + clk_disable(dss.dss_ick); +- if (clks & DSS_CLK_FCK) ++ /* ++ * XXX: tie dss_dss_clk to FCK - this will change with following ++ * pm_runtime patches. Needed for OMAP4 boot up due to stricter ++ * clock cutting in pm framework post 2.6.38-rc5. ++ */ ++ if (clks & DSS_CLK_FCK) { + clk_disable(dss.dss_fck); ++ if (dss.dss_dss_clk) ++ clk_disable(dss.dss_dss_clk); ++ } + if ((clks & DSS_CLK_SYSCK) && dss.dss_sys_clk) + clk_disable(dss.dss_sys_clk); + if ((clks & DSS_CLK_TVFCK) && dss.dss_tv_fck) +-- +1.7.0.4 + diff --git a/packages/linux/patches/linux-2.6.38-ti-omap4-716_mm-zero_swappiness.patch b/packages/linux/patches/linux-2.6.39-rc2-716_mm-zero_swappiness.patch similarity index 100% rename from packages/linux/patches/linux-2.6.38-ti-omap4-716_mm-zero_swappiness.patch rename to packages/linux/patches/linux-2.6.39-rc2-716_mm-zero_swappiness.patch diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-01-enable_logging-0.1.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-01-enable_logging-0.1.patch new file mode 100644 index 0000000000..9ec07248b0 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-01-enable_logging-0.1.patch @@ -0,0 +1,18 @@ +diff -Naur wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service +--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service 2010-09-07 17:43:39.000000000 +0200 ++++ wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service 2011-04-08 19:04:10.740611827 +0200 +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=fi.epitest.hostap.WPASupplicant +-Exec=/sbin/wpa_supplicant -u ++Exec=/sbin/wpa_supplicant -u -dd -t -f /var/log/wpa_supplicant.log + User=root +diff -Naur wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service +--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service 2010-09-07 17:43:39.000000000 +0200 ++++ wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service 2011-04-08 19:04:18.365451110 +0200 +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=fi.w1.wpa_supplicant1 +-Exec=/sbin/wpa_supplicant -u ++Exec=/sbin/wpa_supplicant -u -dd -t -f /var/log/wpa_supplicant.log + User=root diff --git a/packages/security/gnutls/build b/packages/security/gnutls/build index 1478586852..8189b6997b 100755 --- a/packages/security/gnutls/build +++ b/packages/security/gnutls/build @@ -38,6 +38,7 @@ cd lib --with-included-libtasn1 \ --with-lzo \ --with-libz-prefix="$SYSROOT_PREFIX/usr" \ + --with-libgcrypt \ --with-libgcrypt-prefix="$SYSROOT_PREFIX/usr" \ --disable-nls \ --with-gnu-ld @@ -57,6 +58,7 @@ cd ../libextra --enable-shared \ --with-included-libtasn1 \ --with-lzo \ + --with-libgcrypt \ --with-libgcrypt-prefix="$SYSROOT_PREFIX/usr" \ --with-gnu-ld diff --git a/packages/security/gnutls/meta b/packages/security/gnutls/meta index 3dc3f8e862..1ebf48a0e7 100644 --- a/packages/security/gnutls/meta +++ b/packages/security/gnutls/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="gnutls" -PKG_VERSION="2.10.5" +PKG_VERSION="2.12.1" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" diff --git a/packages/sysutils/pciutils/config/pci.ids b/packages/sysutils/pciutils/config/pci.ids index 1eb38cc68a..ca20f5af82 100644 --- a/packages/sysutils/pciutils/config/pci.ids +++ b/packages/sysutils/pciutils/config/pci.ids @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2011.01.06 -# Date: 2011-01-06 14:51:03 +# Version: 2011.04.04 +# Date: 2011-04-04 03:15:03 # # Maintained by Martin Mares and other volunteers from the # PCI ID Project at http://pciids.sf.net/. @@ -93,7 +93,6 @@ 04cf Myson Century, Inc 8818 CS8818 USB2.0-to-ATAPI Bridge Controller with Embedded PHY 050d Belkin - 001a FSD7000 802.11g PCI Wireless card 058f Alcor Micro Corporation 05a9 OmniVision 8519 OV519 series @@ -109,6 +108,7 @@ 1704 ISDN Adapter (PCI Bus, D, C) 069d Hughes Network Systems (HNS) 0721 Sapphire, Inc. +0777 Ubiquiti Networks, Inc. 0795 Wired Inc. 6663 Butane II (MPEG2 encoder board) 6666 MediaPress (MPEG2 encoder board) @@ -377,7 +377,7 @@ 103c 3229 SC44Ge Host Bus Adapter 0059 MegaRAID SAS 8208ELP/8208ELP 005a SAS1066E PCI-Express Fusion-MPT SAS - 005b MegaRAID SAS TB + 005b MegaRAID SAS 2208 [Thunderbolt] 1028 1f2d PERC H810 Adapter 1028 1f31 PERC H710 Adapter 1028 1f33 PERC H710 Mini (for blades) @@ -386,6 +386,7 @@ 1028 1f37 PERC H510 Mini (for blades) 1028 1f38 PERC H510 Mini (for monolithics) 005c SAS1064A PCI-X Fusion-MPT SAS + 005d MegaRAID SAS-3 3108 [Invader] 005e SAS1066 PCI-X Fusion-MPT SAS 0060 MegaRAID SAS 1078 1000 1006 MegaRAID SAS 8888ELP @@ -430,6 +431,7 @@ 1028 1f1e PERC H200 Integrated 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded + 1028 1f22 Internal Tape Adapter 0073 MegaRAID SAS 9240 1000 9240 MegaRAID SAS 9240-4i 1000 9241 MegaRAID SAS 9240-4i @@ -451,7 +453,7 @@ 0074 SAS2108 PCI-Express Fusion-MPT SAS-2 [Liberator] 0076 SAS2108 PCI-Express Fusion-MPT SAS-2 [Liberator] 0077 SAS2108 PCI-Express Fusion-MPT SAS-2 [Liberator] - 0079 LSI MegaSAS 9260 + 0079 MegaRAID SAS 2108 [Liberator] 1000 9251 MegaRAID SAS 9260-4ix 1000 9256 MegaRAID SAS 9260-8ix 1000 9262 MegaRAID SAS 9262-8i @@ -740,6 +742,7 @@ 1734 10b8 Realtek High Definition Audio 4380 SB600 Non-Raid-5 SATA 103c 2813 DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1458 b003 GA-MA790FX-DS5 (rev. 1.0) 1458 b005 Gigabyte GA-MA69G-S3H Motherboard 1462 7327 K9AG Neo2 @@ -747,76 +750,92 @@ 4381 SB600 Raid-5 SATA 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) + 103c 1611 Pavilion DM1Z-3000 103c 280a DC5750 Microtower 1043 8230 M3A78-EH Motherboard 1043 836c M4A785TD Motherboard + 1043 8410 M4A89GTD PRO/USB3 Motherboard + 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard 17f2 5000 KI690-AM2 Motherboard 4384 SBx00 PCI to PCI Bridge 4385 SBx00 SMBus Controller + 103c 1611 Pavilion DM1Z-3000 103c 280a DC5750 Microtower 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard + 1179 ff50 Satellite P305D-S8995E 1458 4385 GA-MA770-DS3rev2.0 Motherboard 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 4386 SB600 USB Controller (EHCI) 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 4387 SB600 USB (OHCI0) 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 4388 SB600 USB (OHCI1) 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 4389 SB600 USB (OHCI2) 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 438a SB600 USB (OHCI3) 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 438b SB600 USB (OHCI4) 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 438c SB600 IDE 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1458 5002 Gigabyte GA-MA69G-S3H Motherboard 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 438d SB600 PCI to LPC Bridge 103c 280a DC5750 Microtower + 1179 ff50 Satellite P305D-S8995E 1462 7368 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 438e SB600 AC97 Modem - 4390 SB700/SB800 SATA Controller [IDE mode] + 4390 SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] 1043 82ef M3A78-EH Motherboard 1043 8389 M4A785TD Motherboard 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) - 4391 SB700/SB800 SATA Controller [AHCI mode] + 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard - 4392 SB700/SB800 SATA Controller [Non-RAID5 mode] - 4393 SB700/SB800 SATA Controller [RAID5 mode] -# 4394 is same as 4391, for AHCI mode - 4394 SB700/SB800 SATA Controller [AHCI mode] - 4395 SB800 SATA Controller [Storage mode with HyperFlash-PCIE] - 4396 SB700/SB800 USB EHCI Controller + 4392 SB7x0/SB8x0/SB9x0 SATA Controller [Non-RAID5 mode] + 4393 SB7x0/SB8x0/SB9x0 SATA Controller [RAID5 mode] + 4394 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 4395 SB8x0/SB9x0 SATA Controller [Storage mode] + 4396 SB7x0/SB8x0/SB9x0 USB EHCI Controller + 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard - 4397 SB700/SB800 USB OHCI0 Controller + 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller + 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard - 4398 SB700 USB OHCI1 Controller + 4398 SB7x0 USB OHCI1 Controller 1043 82ef M3A78-EH Motherboard - 4399 SB700/SB800 USB OHCI2 Controller + 4399 SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 1043 82ef M3A78-EH Motherboard - 439c SB700/SB800 IDE Controller + 439c SB7x0/SB8x0/SB9x0 IDE Controller 1043 82ef M3A78-EH Motherboard - 439d SB700/SB800 LPC host controller + 439d SB7x0/SB8x0/SB9x0 LPC host controller + 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 4437 Radeon Mobility 7000 IGP 4554 210888ET [Mach64 ET] @@ -1436,7 +1455,12 @@ 5e6d RV410 [Radeon X700 (PCIE)] (Secondary) 148c 2117 PowerColor Bravo X700 5f57 R423 [Radeon X800XT (PCIE)] - 6738 AMD Radeon HD 6800 Series Video Card + 6718 Cayman XT [AMD Radeon HD 6900 Series] + 6719 Cayman PRO [AMD Radeon 6900 Series] + 6738 Barts XT [ATI Radeon HD 6800 Series] + 6739 Barts PRO [ATI Radeon HD 6800 Series] + 673e Barts LE [AMD Radeon HD 6700 Series] + 6740 Whistler XT [AMD Radeon HD 6700M Series] 6741 NI Whistler [AMD Radeon HD 6600M Series] 6759 NI Turks [AMD Radeon HD 6500] 6760 NI Seymour [AMD Radeon HD 6470M] @@ -1455,7 +1479,9 @@ 68a8 Broadway [ATI Mobility Radeon HD 6800 Series] 68b8 Juniper [Radeon HD 5700 Series] 68b9 Juniper [ATI Radeon HD 5600/5700] + 68ba Juniper XT [AMD Radeon HD 6000 Series] 68be Juniper [Radeon HD 5750 Series] + 68bf Juniper LE [AMD Radeon HD 6700 Series] 68c0 Madison [Mobility Radeon HD 5000 Series] 103c 1521 Madison XT [FirePro M5800] 68c1 Redwood [Radeon HD 5600 Series] @@ -1466,10 +1492,13 @@ 68d8 Redwood [Radeon HD 5670] 68d9 Redwood PRO [Radeon HD 5500 Series] 68da Redwood PRO [Radeon HD 5500 Series] - 68e0 Manhattan [Mobility Radeon HD 5000 Series] + 68e0 Manhattan [Mobility Radeon HD 5400 Series] + 103c 1486 HP TouchSmart tm2-2050er discrete GPU (Mobility Radeon HD 5450) 68e1 Manhattan [Mobility Radeon HD 5430 Series] 68e4 Robson CE [AMD Radeon HD 6300 Series] 68e5 Robson LE [AMD Radeon HD 6300M Series] + 68f1 Cadar [FirePro 2460] + 68f2 Cedar [FirePro 2270] 68f9 Cedar PRO [Radeon HD 5450] 700f PCI Bridge [IGP 320M] 7010 PCI Bridge [IGP 340M] @@ -1518,6 +1547,7 @@ 7166 RV515 [Radeon X1300] (Secondary) 1002 0323 All-in-Wonder 2006 PCI-E Edition (Secondary) 1545 1997 Radeon X1300 512MB PCI-e (Secondary) + 7167 RV515 [Radeon X1550 64-bit] (Secondary) 716e RV515LE [Radeon X1300] Secondary 7172 RV515GL [FireGL V3300] (Secondary) 7173 RV515GL [FireGL V3350] (Secondary) @@ -1554,7 +1584,7 @@ 71c7 RV535 [Radeon X1650 Series] 71ce RV530LE [Radeon X1600] 71d2 RV530GL [FireGL V3400] - 71d4 M56GL [Mobility FireGL V5250] + 71d4 M66GL [ATI Mobility FireGL V5250] 71d5 M66-P [Mobility Radeon X1700] 71d6 M66-XT [Mobility Radeon X1700] 71de RV530LE [Radeon X1600] @@ -1599,6 +1629,7 @@ 7835 Radeon Mobility 9200 IGP 7838 Radeon 9100 IGP PCI/AGP Bridge 7910 RS690 Host Bridge + 1179 ff50 Satellite P305D-S8995E 17f2 5000 KI690-AM2 Motherboard 7911 RS690 Host Bridge 7912 RS690 PCI to PCI Bridge (Internal gfx) @@ -1608,11 +1639,13 @@ 7917 RS690 PCI to PCI Bridge (PCI Express Port 3) 1002 7910 RS690 PCI to PCI Bridge 7919 Radeon X1200 Series Audio Controller + 1179 7919 Satellite P305D-S8995E 17f2 5000 KI690-AM2 Motherboard 791e RS690 [Radeon X1200 Series] 1462 7327 K9AG Neo2 17f2 5000 KI690-AM2 Motherboard 791f RS690M [Radeon X1200 Series] + 1179 ff50 Satellite P305D-S8995E 7930 Radeon Xpress 7930 Host Bridge 7932 RS7932 PCI Bridge 7933 RS7933 PCI Bridge @@ -1633,6 +1666,7 @@ 9440 RV770 [Radeon HD 4870] 9441 R700 [Radeon HD 4870 X2] 9442 RV770 [Radeon HD 4850] + 1002 0502 MSI R4850-T2D512 174b e810 Sapphire HD 4850 512MB GDDR3 PCI-E Dual Slot Fansink 9443 R700 [Radeon HD 4850] 944a M98L [Mobility Radeon HD 4850] @@ -1641,7 +1675,7 @@ 9450 RV770 [FireStream 9270] 9452 RV770 [FireStream 9250] 945a M98 XT [Mobility Radeon HD 4870] - 9460 RV790 [Radeon HD 4800 Series] + 9460 RV790 [Radeon HD 4890] 9462 RV790LE [Radeon HD 4800 Series] 9480 M96 [Mobility Radeon HD 4650] 103c 3628 ATI Mobility Radeon HD 4650 [dv6-1190en] @@ -1686,9 +1720,12 @@ 9519 RV670 [FireStream 9170] 9540 RV710 [Radeon HD 4550] 954f RV710 [Radeon HD 4350] + 1462 1618 R4350 MD512H (MS-V161) 9552 M92 LP [Mobility Radeon HD 4300 Series] - 9553 M92 [Mobility Radeon HD 4500 Series] - 9555 M93 [Mobility Radeon HD 4500 Series] + 9553 M92 [Mobility Radeon HD 4500/5100 Series] + 1179 ff82 Satellite L505-13T GPU (Mobility Radeon HD 5145) + 9555 M93 [Mobility Radeon HD 4300/4500 Series] + 103c 1411 ProBook 4720s GPU (Mobility Radeon HD 4350) 9559 Mobility Radeon HD 3600 Series 955f M92 [Mobility Radeon HD 4330] 9581 M76 [Radeon Mobility HD 2600 Series] @@ -1705,6 +1742,7 @@ 9593 Radeon Mobility HD 3670 9595 M86GL [Mobility FireGL V5700] 9596 RV635 PRO AGP [Radeon HD 3650] + 1043 0028 EAH3650 SILENT/HTDI/512M/A 9598 Mobility Radeon HD 3600 Series 1002 9598 Mobility Radeon HD 3600 1043 01d6 EAH3650 Silent @@ -1756,8 +1794,10 @@ aa60 Redwood HDMI Audio [Radeon HD 5600 Series] 1025 0347 Aspire 7740G aa68 Manhattan HDMI Audio [Mobility Radeon HD 5000 Series] + aa88 Barts HDMI Audio [Radeon HD 6800 Series] ac00 Theater 600 Pro ac02 TV Wonder HD 600 PCIe + ac12 Theater HD T507 (DVB-T) TV tuner/capture device cab0 AGP Bridge [IGP 320M] cab2 RS200/RS200M AGP Bridge [IGP 340M] cab3 R200 AGP Bridge [Mobility Radeon 7000 IGP] @@ -2240,6 +2280,14 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1510 Pavilion DM1Z-3000 Host bridge + 1022 1510 Pavilion DM1Z-3000 Host bridge + 1600 Family 15h Processor Function 0 + 1601 Family 15h Processor Function 1 + 1602 Family 15h Processor Function 2 + 1603 Family 15h Processor Function 3 + 1604 Family 15h Processor Function 4 + 1605 Family 15h Processor Function 5 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 @@ -2363,14 +2411,14 @@ 9600 RS780 Host Bridge 1043 82f1 M3A78-EH Motherboard 9601 RS880 Host Bridge - 9602 RS780 PCI to PCI bridge (int gfx) + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 9603 RS780 PCI to PCI bridge (ext gfx port 0) 9604 RS780 PCI to PCI bridge (PCIE port 0) 9605 RS780 PCI to PCI bridge (PCIE port 1) 9606 RS780 PCI to PCI bridge (PCIE port 2) 9607 RS780 PCI to PCI bridge (PCIE port 3) - 9608 RS780 PCI to PCI bridge (PCIE port 4) - 9609 RS780 PCI to PCI bridge (PCIE port 5) + 9608 RS780/RS880 PCI to PCI bridge (PCIE port 4) + 9609 RS780/RS880 PCI to PCI bridge (PCIE port 5) 960a RS780 PCI to PCI bridge (NB-SB link) 960b RS780 PCI to PCI bridge (ext gfx port 1) 1023 Trident Microsystems @@ -2700,6 +2748,7 @@ 1028 028d PowerEdge T410 MGA G200eW WPCM450 1028 029c PowerEdge M710 MGA G200eW WPCM450 1028 02a4 PowerEdge T310 MGA G200eW WPCM450 + 0533 MGA G200EH 0534 G200eR2 0540 M91XX 102b 2080 M9140 LP PCIe x16 @@ -2905,6 +2954,7 @@ 0125 uPD720400 PCI Express - PCI/PCI-X Bridge 013a Dual Tuner/MPEG Encoder 0194 uPD720200 USB 3.0 Host Controller + 1043 8413 P8P67 Deluxe Motherboard 1034 Framatome Connectors USA Inc. 1035 Comp. & Comm. Research Lab 1036 Future Domain Corp. @@ -3017,6 +3067,7 @@ 6300 630/730 PCI/AGP VGA Display Adapter 1019 0970 P6STP-FL motherboard 1043 8035 CUSI-FX motherboard + 104d 80e2 VAIO PCV-J200 6306 530/620 PCI/AGP VGA Display Adapter 6325 65x/M650/740 PCI/AGP VGA Display Adapter 1039 6325 SiS 651 onboard [Asus P4SC-EA] @@ -3070,6 +3121,7 @@ 1039 7018 SiS PCI Audio Accelerator 1043 1453 SiS PCI Audio Accelerator 1043 800b SiS PCI Audio Accelerator + 104d 80e2 VAIO PCV-J200 1054 7018 SiS PCI Audio Accelerator 107d 5330 SiS PCI Audio Accelerator 107d 5350 SiS PCI Audio Accelerator @@ -3227,6 +3279,7 @@ 8233 EEE-PC 701 Netbook 82ca G96 GeForce 9500 GT 82e8 M3N72-D + 8383 P7P55D Series Motherboard # wrong vendor ID (should have been AMD) 9602 RS880 PCI to PCI bridge (int gfx) 1043 83a2 M4A785TD Motherboard @@ -3383,6 +3436,7 @@ e4bf 1010 CF2-1-CYMBAL 8020 TSB12LV26 IEEE-1394 Controller (Link) 1028 00d8 Precision 530 + 104d 80e2 VAIO PCV-J200 11bd 000f Studio DV500-1394 11bd 001c Excalibur 4.1 8021 TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated) @@ -3446,13 +3500,16 @@ 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 + 104d 902d VAIO VGN-NR120E 803a PCIxx12 OHCI Compliant IEEE 1394 Host Controller 103c 309f nx9420 103c 30a1 NC2400 103c 30a3 Compaq nw8440 + 104d 902d VAIO VGN-NR120E 803b 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD) 103c 309f nx9420 103c 30a3 Compaq nw8440 + 104d 902d VAIO VGN-NR120E 803c PCIxx12 SDA Standard Compliant SD Host Controller 103c 309f nx9420 103c 30a3 Compaq nw8440 @@ -3498,6 +3555,7 @@ 16ec 010d USR5416 802.11g Wireless Turbo PCI Adapter 16ec 010e USR5410 802.11g Wireless Cardbus Adapter 1737 0033 WPC54G v2 802.11g Wireless-G Notebook Adapter + 17cf 0032 G-162 v1 802.11g Wireless Cardbus Adapter 17cf 0033 Z-Com XG650 Wireless miniPCI 802.11b/g 187e 340b G-302 v2 802.11g Wireless PCI Adapter 187e 340c G-360 v2 802.11g Wireless PCI Adapter @@ -3601,6 +3659,7 @@ 8056 Rockwell HCF 56K modem 808a Memory Stick Controller 81ce SxS Pro memory card + 902d VAIO VGN-NR120E 104e Oak Technology, Inc 0017 OTI-64017 0107 OTI-107 [Spitfire] @@ -4307,6 +4366,7 @@ 14f0 PCI-6111 1580 PXI-6031E 15b0 PXI-6071E + 1710 PXI-6509 17d0 PCI-6503 1870 PCI-6713 1880 PCI-6711 @@ -4334,6 +4394,7 @@ 70aa PCI-6229 70ab PCI-6259 70ac PCI-6289 + 70ae PXI-6220 70af PCI-6221 70b0 PCI-6220 70b4 PCI-6250 @@ -4782,7 +4843,9 @@ 10b5 3415 Alpermann+Velte PCIe TS: Time Synchronisation Board 1369 c001 LX6464ES 1369 c201 LX1616ES + 14b4 d10a DekTec DTA-110T 14b4 d140 Dektec DTA-140 + 1a0e 006f Dektec DTA-111 9060 PCI9060 32-bit 33MHz PCI <-> IOBus Bridge 906d 9060SD 125c 0640 Aries 16000P @@ -5717,6 +5780,7 @@ 018d NV18M [GeForce4 448 Go] 0191 G80 [GeForce 8800 GTX] 0193 G80 [GeForce 8800 GTS] + 107d 20bd WinFast PX 8800 GTS TDH 0194 G80 [GeForce 8800 Ultra] # Found in GPU server Tesla D870 and S870 0197 G80 [Tesla C870] @@ -6005,7 +6069,7 @@ 0323 NV34 [GeForce FX 5200LE] 0324 NV34M [GeForce FX Go5200 64M] 1028 0196 Inspiron 5160 - 103c 006a Pavillon ZD7000 laptop + 103c 006a Pavilion ZD7000 laptop 1071 8160 MIM2000 0325 NV34M [GeForce FX Go5250] 0326 NV34 [GeForce FX 5500] @@ -6312,11 +6376,16 @@ 1462 7508 K9N2GM-FIH 1849 0569 K10N78FullHD-hSLI R3.0 PCI Express Bridge 056a MCP73 [nForce 630i] USB 2.0 Controller (EHCI) + 1019 297a MCP73PVT-SM 056c MCP73 IDE + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 056d MCP73 PCI Express bridge + 1019 297a MCP73PVT-SM 056e MCP73 PCI Express bridge + 1019 297a MCP73PVT-SM 056f MCP73 PCI Express bridge + 1019 297a MCP73PVT-SM 05b1 NF200 PCIe 2.0 switch for mainboards 05b8 NF200 PCIe 2.0 switch for GTX 295 05be NF200 PCIe 2.0 switch for Quadro Plex S4 / Tesla S870 / Tesla S1070 / Tesla S2050 @@ -6518,33 +6587,47 @@ 07c0 MCP73 Host Bridge 1afa 7150 JW-IN7150-HD 07c1 MCP73 Host Bridge + 1019 297a MCP73PVT-SM 07c2 MCP73 Host Bridge 07c5 MCP73 Host Bridge 07c8 MCP73 Memory Controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07cb nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07cd nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07ce nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07cf nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d0 nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d1 nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d2 nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d3 nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d6 nForce 630i memory controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d7 MCP73 LPC Bridge + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d8 MCP73 SMBus + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07d9 MCP73 Memory Controller + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 07da MCP73 Co-processor 1afa 7150 JW-IN7150-HD @@ -6555,15 +6638,19 @@ 07e0 C73 [GeForce 7150 / nForce 630i] 1afa 7150 JW-IN7150-HD 07e1 C73 [GeForce 7100 / nForce 630i] + 1019 297a MCP73PVT-SM 07e2 C73 [GeForce 7050 / nForce 630i] 07e3 C73 [GeForce 7050 / nForce 610i] 07e5 C73 [GeForce 7100 / nForce 620i] 07f0 MCP73 IDE 07f4 GeForce 7100/nForce 630i SATA + 1019 297a MCP73PVT-SM 07f8 MCP73 SATA RAID Controller 07fc MCP73 High Definition Audio + 1019 297a MCP73PVT-SM 10de 07fc MCP73 High Definition Audio 07fe GeForce 7100/nForce 630i USB + 1019 297a MCP73PVT-SM 1afa 7150 JW-IN7150-HD 0844 C77 [GeForce 9100M G] 0845 C77 [GeForce 8200M G] @@ -6604,6 +6691,7 @@ 19da a123 IONITX-F-E 087e ION LE VGA 087f ION LE VGA + 08a4 GT216 [GeForce 320M] 0a20 GT216 [GeForce GT 220] 0a23 GT218 [GeForce 210] 0a28 GT216 [GeForce GT 230M] @@ -6620,6 +6708,7 @@ 0a63 GT218 [GeForce 310] 0a64 GT218 [ION] 0a65 GT218 [GeForce 210] + 1043 8334 EN210 SILENT 0a66 GT218 [GeForce 310] 0a68 G98M [GeForce G105M] 0a69 G98M [GeForce G105M] @@ -6707,6 +6796,7 @@ 0be2 High Definition Audio Controller 0be3 High Definition Audio Controller 1028 040b Latitude E6510 + 10de 066d G98 [GeForce 8400GS] 0be4 High Definition Audio Controller 0be5 GF100 High Definition Audio Controller 0be9 GF106 High Definition Audio Controller @@ -6735,20 +6825,28 @@ 0d7d MCP89 Ethernet 0d80 MCP89 LPC Bridge 0d85 MCP89 SATA Controller + 0d88 MCP89 SATA Controller (AHCI mode) 0d89 MCP89 SATA Controller (AHCI mode) 0d8d MCP89 SATA Controller (RAID mode) 0d94 MCP89 High Definition Audio 0d9c MCP89 OHCI USB 1.1 Controller 0d9d MCP89 EHCI USB 2.0 Controller 0dc4 GF106 [GeForce 450 GTS] - 0dd1 GeForce GTX 460M (rev a1) +# rev a1 + 0dd1 GF106 [GeForce GTX 460M] 1558 8687 CLEVO/KAPOK W860CU 0de1 GF108 [GeForce GT 430] + 0df8 GF108 [Quadro 600] 0e09 GF110 High Definition Audio Controller 0e22 GF104 [GeForce GTX 460] 1462 2322 N460GTX Cyclone 1GD5/OC 1080 GF110 [Geforce GTX 580] + 1081 GF110 [Geforce GTX 570] + 10de 087e Leadtek WinFast GTX 570 + 1086 GF110 [Geforce GTX 570 HD] 10c3 G98 [GeForce 8400GS] + 10de 066d G98 [GeForce 8400GS] + 1200 GF110 [GeForce GTX 560 Ti] 10df Emulex Corporation 1ae5 LP6000 Fibre Channel Host Adapter e100 Proteus-X: LightPulse IOV Fibre Channel Host Adapter @@ -6891,6 +6989,7 @@ 1025 1605 TravelMate 5600 series 0885 Realtek 885 High Definition Audio 0888 Realtek 888 High Definition Audio + 1028 020d Inspiron 530 8029 RTL-8029(AS) 10b8 2011 EZ-Card (SMC1208) 10ec 8029 RTL-8029(AS) @@ -6957,11 +7056,14 @@ 1462 235c P965 Neo MS-7235 mainboard 1462 236c 945P Neo3-F motherboard 8168 RTL8111/8168B PCI Express Gigabit Ethernet controller + 1019 8168 MCP73PVT-SM + 103c 1611 Pavilion DM1Z-3000 1043 11f5 A6J-Q008 1043 16d5 U6V laptop 1043 81aa P5B 1043 82c6 M3A78-EH Motherboard 1043 83a3 M4A785TD Motherboard + 1043 8432 P8P67 Deluxe Motherboard [Realtek RTL8111E] 1458 e000 GA-EP45-DS5 Motherboard 1462 238c Onboard RTL8111b on MSI P965 Platinum Mainboard 1462 368c K9AG Neo2 @@ -6971,6 +7073,7 @@ 8169 RTL-8169 Gigabit Ethernet 1025 0079 Aspire 5024WLMi 10bd 3202 EP-320G-TX1 32-bit PCI Gigabit Ethernet Adapter + 10ec 8169 RTL8169/8110 Family PCI Gigabit Ethernet NIC 1259 c107 CG-LAPCIGT 1371 434e ProG-2000L 1385 311a GA311 @@ -7217,6 +7320,7 @@ 0391 VT8371 [KX133] 0397 VT1708S HD Audio 1043 836c P7H55 + 1043 83c7 P5KPL-AM EPU 0409 VX855/VX875 Host Bridge: Host Control 0415 VT6415 PATA IDE Host Controller 0501 VT8501 [Apollo MVP4] @@ -7561,6 +7665,7 @@ 337a VT8237A PCI to PCI Bridge 337b VT8237A Host Bridge 3403 VT6315 Series Firewire Controller + 1043 8384 P8P67 Deluxe Motherboard 3409 VX855/VX875 DRAM Bus Control 4149 VIA VT6420 (ATA133) Controller 4204 K8M800 Host Bridge @@ -7774,6 +7879,7 @@ 0051 DT322 0060 DT340 0069 DT332 + 80c2 DT3162 1117 Datacube, Inc 9500 Max-1C SVGA card 9501 Max-1C image processing @@ -7973,9 +8079,14 @@ 540b PNX1005 Media Processor 1131 0020 PNXLite PCI Demo Board 7130 SAA7130 Video Broadcast Decoder + 0000 4016 Behold TV 401 + 0000 4051 Behold TV 405 FM + 0000 5051 Behold TV 505 RDS + 0000 505b Behold TV 505 RDS 102b 48d0 Matrox CronosPlus 1048 226b ELSA EX-VISION 300TV 107d 6655 WinFast DTV1000S + 1131 0000 Behold TV 401 1131 2001 10MOONS PCI TV CAPTURE CARD 1131 2005 Techcom (India) TV Tuner Card (SSD-TV-670) 1458 9006 GT-PS700 DVB-S tuner @@ -7987,8 +8098,13 @@ 185b c100 Compro VideoMate TV PVR/FM 185b c901 Videomate DVB-T200 5168 0138 LifeView FlyVIDEO2000 + 5ace 5010 Behold TV 501 + 5ace 5050 Behold TV 505 FM 7133 SAA7131/SAA7133/SAA7135 Video Broadcast Decoder 0000 4091 Beholder BeholdTV 409 FM + 0000 5071 Behold TV 507 RDS + 0000 507b Behold TV 507 RDS + 0000 5201 Behold TV Columbus # Deleting vendor name after rereading submit instructions 0070 6701 WinTV HVR-1110 1019 4cb5 Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) @@ -8040,12 +8156,28 @@ 5168 2520 LifeView FlyDVB-S Duo CardBus 5168 3502 LifeView FlyDVB-T Hybrid CardBus 5168 3520 LifeView FlyDVB Trio N CardBus + 5ace 5030 Behold TV 503 FM + 5ace 5090 Behold TV 509 FM + 5ace 6090 Behold TV 609 FM + 5ace 6091 Behold TV 609 FM + 5ace 6092 Behold TV 609 RDS + 5ace 6093 Behold TV 609 RDS + 5ace 6190 Behold TV M6 + 5ace 6191 Behold TV M63 + 5ace 6193 Behold TV M6 Extra + 5ace 6290 Behold TV H6 + 5ace 7090 Behold TV A7 + 5ace 7190 Behold TV H7 5ace 7595 Behold TV X7 7134 SAA7134/SAA7135HL Video Broadcast Decoder + 0000 4036 Behold TV 403 + 0000 4037 Behold TV 403 FM + 0000 4071 Behold TV 407 FM 1019 4cb4 Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) 1043 0210 Digimatrix TV 1043 4840 ASUS TV-FM 7134 1043 4842 TV-FM 7134 + 1131 0000 Behold TV 403 FM 1131 2004 EUROPA V3 reference design 1131 4e85 SKNet Monster TV 1131 6752 EMPRESS @@ -8067,6 +8199,11 @@ 1894 a006 KNC One TV-Station DVR 1894 fe01 KNC One TV-Station RDS / Typhoon TV Tuner RDS 5168 0138 FLY TV PRIME 34FM + 5ace 5070 Behold TV 507 FM + 5ace 6070 Behold TV 607 FM + 5ace 6071 Behold TV 607 FM + 5ace 6072 Behold TV 607 RDS + 5ace 6073 Behold TV 607 RDS 7145 SAA7145 7146 SAA7146 110a 0000 Fujitsu/Siemens DVB-C card rev1.5 @@ -8130,6 +8267,9 @@ 0070 8993 WinTV HVR-2200 0070 89a0 WinTV HVR-2200 0070 89a1 WinTV HVR-2200 + 7231 SAA7231 + 5ace 8000 Behold TV H8 + 5ace 8100 Behold TV A8 9730 SAA9730 Integrated Multimedia and Peripheral Controller 1131 0000 Integrated Multimedia and Peripheral Controller 1132 Mitel Corp. @@ -8366,6 +8506,7 @@ 9e01 SK-9E21M 10/100/1000Base-T Adapter 1149 Win System Corporation 114a VMIC + 5565 GE-IP PCI5565,PMC5565 Reflective Memory Node 5579 VMIPCI-5579 (Reflective Memory Card) 5587 VMIPCI-5587 (Reflective Memory Card) 6504 VMIC PCI 7755 FPGA @@ -8975,8 +9116,10 @@ 1854 0020 Marvell 88E8036 Fast Ethernet Controller (LGE) 4352 88E8038 PCI-E Fast Ethernet Controller 4353 88E8039 PCI-E Fast Ethernet Controller + 104d 902d VAIO VGN-NR120E 4354 88E8040 PCI-E Fast Ethernet Controller 4355 88E8040T PCI-E Fast Ethernet Controller + 1179 ff50 Satellite P305D-S8995E 4356 88EC033 PCI-E Fast Ethernet Controller 4357 88E8042 PCI-E Fast Ethernet Controller 435a 88E8048 PCI-E Fast Ethernet Controller @@ -9063,7 +9206,7 @@ 6041 MV88SX6041 4-port SATA II PCI-X Controller 6042 88SX6042 PCI-X 4-Port SATA-II 6081 MV88SX6081 8-port SATA II PCI-X Controller - 6101 88SE6101 single-port PATA133 interface + 6101 88SE6101/6102 single-port PATA133 interface 6111 88SE6111 1-port PATA133(IDE) and 1-port SATA II Controllers 6121 88SE6121 SATA II Controller 6141 88SE614x SATA II PCI-E controller @@ -9308,6 +9451,7 @@ 1535 Blackfin BF535 processor 1805 SM56 PCI modem 1889 AD1889 sound chip + 194a AD1984A sound chip 1981 AD1981HD sound chip 1983 AD1983HD sound chip 1984 AD1984HD sound chip @@ -9480,6 +9624,7 @@ 1216 Purup Prepress A/S 1217 O2 Micro, Inc. 00f7 Firewire (IEEE 1394) + 1179 ff50 Satellite P305D-S8995E 6729 OZ6729 673a OZ6730 6832 OZ6832/6833 CardBus Controller @@ -9501,7 +9646,9 @@ 1025 0035 TravelMate 660 7114 OZ711M1/MC1 4-in-1 MemoryCardBus Controller 7120 Integrated MMC/SD Controller + 1179 ff50 Satellite P305D-S8995E 7130 Integrated MS/xD Controller + 1179 ff50 Satellite P305D-S8995E 7134 OZ711MP1/MS1 MemoryCardBus Controller 7135 Cardbus bridge 7136 OZ711SP1 Memory CardBus Controller @@ -10132,6 +10279,7 @@ 12ab Yuan Yuan Enterprise Co., Ltd. 0000 MPG160/Kuroutoshikou ITVC15-STVLP 0002 AU8830 [Vortex2] Based Sound Card With A3D Support + 0003 T507 (DVB-T) TV tuner/capture device 2300 Club-3D Zap TV2100 3000 MPG-200C PCI DVD Decoder Card 4789 MPC788 MiniPCI Hybrid TV Tuner @@ -10246,6 +10394,7 @@ 12ca Integrated Computing Engines 12cb Antex Electronics Corporation 0027 SC4 (StudioCard) + 002e StudioCard 2000 12cc Pluto Technologies International 12cd Aims Lab 12ce Netspeed Inc. @@ -10722,6 +10871,7 @@ 0045 Silicom 6 port Copper Giga Ethernet 546 Bypass Server Adapter (PXG6BPI) 0047 Silicom Dual port Fiber-SX Giga Ethernet 571 Bypass Disconnect Server Adapter (PEG2BPFID) 004a Silicom Quad port Fiber-LX Giga Ethernet 571 Bypass Server Adapter (PEG4BPFI-LX) + 004d Dual port Copper Giga Ethernet PCI-E Bypass Server Adapter 1375 Argosystems Inc 1376 LMC 1377 Electronic Equipment Production & Distribution GmbH @@ -10759,8 +10909,6 @@ 4601 WAG511 802.11a/b/g Dual Band Wireless PC Card 4610 WAG511 802.11a/b/g Dual Band Wireless PC Card 4a00 WAG311 802.11a/g Wireless PCI Adapter - 4b00 WG511T 108 Mbps Wireless PC Card - 4f00 WG511U Double 108 Mbps Wireless PC Card 5200 GA511 Gigabit PC Card 620a GA620 Gigabit Ethernet 630a GA630 Gigabit Ethernet @@ -11057,14 +11205,17 @@ 1043 838e Virtuoso 66 (Xonar DS) 1043 8428 Virtuoso 100 (Xonar Xense) 1043 8467 CMI8786 (Xonar DG) + 13f6 8782 PCI 2.0 HD Audio 13f6 ffff CMI8787-HG2PCI 14c3 1710 HiFier Fantasia 14c3 1711 HiFier Serenade 1a58 0910 Barracuda AC-1 415a 5431 X-Meridian 7.1 + 5431 017a X-Meridian 7.1 2G 584d 3781 HDA X-Purity 7.1 Platinum 7284 9761 CLARO 7284 9781 CLARO halo + 7284 9783 eCLARO 9880 CM9880 13f7 Wildfire Communications 13f8 Ad Lib Multimedia Inc @@ -11727,6 +11878,7 @@ 14e2 INFOLIBRIA 14e3 AMTELCO 14e4 Broadcom Corporation + 0576 BCM43224 802.11a/b/g/n 0800 Sentry5 Chipcommon I/O Controller 0804 Sentry5 PCI Bridge 0805 Sentry5 MIPS32 CPU @@ -11943,9 +12095,9 @@ 1681 NetXtreme BCM5761 Gigabit Ethernet PCIe 1684 NetXtreme BCM5764M Gigabit Ethernet PCIe 1685 NetXtreme II BCM57500S Gigabit Ethernet - 168a NetXtreme II BCM57800S 10 Gigabit Ethernet - 168d NetXtreme II BCM57840S 20 Gigabit Ethernet - 168e NetXtreme II BCM57810S 10 Gigabit Ethernet + 168a NetXtreme II BCM57800 10 Gigabit Ethernet + 168d NetXtreme II BCM57840 10/20 Gigabit Ethernet + 168e NetXtreme II BCM57810 10 Gigabit Ethernet 1690 NetXtreme BCM57760 Gigabit Ethernet PCIe 1691 NetLink BCM57788 Gigabit Ethernet PCIe 1692 NetLink BCM57780 Gigabit Ethernet PCIe @@ -11968,6 +12120,7 @@ 1462 590c KT6 Delta-FIS2R (MS-6590) 169d NetLink BCM5789 Gigabit Ethernet PCI Express 16a0 NetLink BCM5785 Fast Ethernet + 16a5 NetXtreme II BCM57800 10 Gigabit Ethernet Multi Function 16a6 NetXtreme BCM5702X Gigabit Ethernet 0e11 00bb NC7760 Gigabit Server Adapter (PCI-X, 10/100/1000-T) 1028 0126 BCM5702 1000Base-T @@ -11986,9 +12139,11 @@ 10a9 8014 Dual Port Gigabit Ethernet (PCI-X,Fiber) 10a9 801c Quad Port Gigabit Ethernet (PCI-E,Fiber) 10b7 2001 3C998-SX Dual Port 1000-SX PCI-X + 16a9 NetXtreme II BCM57800 10 Gigabit Ethernet Virtual Function 16aa NetXtreme II BCM5706S Gigabit Ethernet 103c 3102 NC370F MultifuNCtion Gigabit Server Adapter 103c 310c NC370i Multifunction Gigabit Server Adapter + 16ab NetXtreme II BCM57840 10/20 Gigabit Ethernet Multi Function 16ac NetXtreme II BCM5708S Gigabit Ethernet 1014 0304 NetXtreme II BCM5708S Gigabit Ethernet 1028 01bb PowerEdge 1955 Broadcom NetXtreme II BCM5708S @@ -11997,12 +12152,16 @@ 103c 7038 NC373i PCI Express Multifunction Gigabit Server Adapter 103c 703b NC373i Integrated Multifunction Gigabit Server Adapter 103c 703d NC373F PCI Express Multifunction Gigabit Server Adapter + 16ad NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function + 16ae NetXtreme II BCM57810 10 Gigabit Ethernet Multi Function + 16af NetXtreme II BCM57810 10 Gigabit Ethernet Virtual Function 16b0 NetXtreme BCM57761 Gigabit Ethernet PCIe 16b1 NetLink BCM57781 Gigabit Ethernet PCIe 16b2 NetLink BCM57791 Gigabit Ethernet PCIe 16b4 NetXtreme BCM57765 Gigabit Ethernet PCIe 16b5 NetLink BCM57785 Gigabit Ethernet PCIe 16b6 NetLink BCM57795 Gigabit Ethernet PCIe + 16bc NetXtreme BCM57765 Memory Card Reader 16c6 NetXtreme BCM5702A3 Gigabit Ethernet 10b7 1100 3C1000B-T 10/100/1000 PCI 14e4 000c BCM5702 1000Base-T @@ -12051,6 +12210,7 @@ 4301 BCM4303 802.11b Wireless LAN Controller 1028 0407 TrueMobile 1180 Onboard WLAN 1043 0120 WL-103b Wireless LAN PC Card + 16a5 1602 B-300 802.11b Wireless CardBus Adapter 1737 4301 WMP11 v2.7 802.11b Wireless-B PCI Adapter 4305 BCM4307 V.90 56k Modem 4306 BCM4307 Ethernet Controller @@ -12069,7 +12229,7 @@ 103c 137f BCM4322 802.11a/b/g/n Wireless LAN Controller 103c 1380 BCM4322 802.11a/b/g/n Wireless LAN Controller 14e4 4311 BCM94311MCG - 4312 BCM4312 802.11a/b/g + 4312 BCM4311 802.11a/b/g 1028 0007 Wireless 1490 Dual Band WLAN Mini-Card 1028 0008 Wireless 1490 Dual Band WLAN ExpressCard 103c 135a Broadcom 802.11a/b/g WLAN @@ -12109,7 +12269,7 @@ 1799 7001 F5D7001 v2000 Wireless G Plus Desktop Card 1799 7010 F5D7010 v4000 Wireless G Notebook Card 1799 7011 F5D7011 v2000 High-Speed Mode Wireless G Notebook Card - 4319 BCM4311 [AirForce 54g] 802.11a/b/g PCI Express Transceiver + 4319 BCM4318 [AirForce 54g] 802.11a/b/g PCI Express Transceiver 1028 0005 Wireless 1470 Dual Band WLAN Mini-PCI Card 1028 0006 Wireless 1470 Dual Band WLAN PC Card 103c 1358 Broadcom 802.11a/b/g WLAN @@ -12167,9 +12327,13 @@ 432c BCM4322 802.11b/g/n 1799 d311 Dynex DX-NNBX 802.11n WLAN Cardbus Card 432d BCM4322 802.11a/b/g/n + 4331 BCM4331 802.11a/b/g/n + 106b 00d6 AirPort Extreme 4344 EDGE/GPRS data and 802.11b/g combo cardbus [GC89] 4353 BCM43224 802.11a/b/g/n 4357 BCM43225 802.11b/g/n + 4358 BCM43227 802.11b/g/n + 4359 BCM43228 802.11a/b/g/n 4401 BCM4401 100Base-T 1025 0035 TravelMate 660 103c 08b0 tc1100 tablet @@ -12831,6 +12995,7 @@ 15b2 Mosaid Technologies Inc 15b3 Mellanox Technologies 0191 MT25408 [ConnectX IB SDR Flash Recovery] + 01f5 MT27500 Family [ConnectX-3 Flash Recovery] 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 1004 MT27500 Family [ConnectX-3 Virtual Function] @@ -12892,8 +13057,11 @@ 0015 ZBox 15b7 Sandisk Corp 15b8 ADDI-DATA GmbH + 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) + 1004 APCI2032 SP controller (32 digi outputs) 1005 APCI2200 SP controller (8/16 digi outputs (relay)) + 1006 APCI1564 SP controller (32 digi ins, 32 digi outs) 100a APCI1696 SP controller (96 TTL I/Os) 3001 APCI3501 SP controller (analog output board) 300f APCI3600 Noise and vibration measurement board @@ -13079,6 +13247,7 @@ 167b ZyDAS Technology Corp. 2102 ZyDAS ZD1202 187e 3406 ZyAIR B-122 CardBus 11Mbs Wireless LAN Card + 187e 3407 ZyAIR B-320 802.11b Wireless PCI Adapter 2116 ZD1212B Wireless Adapter 167d Samsung Electro-Mechanics Co., Ltd. a000 IPW2200 miniPCI Wireless @@ -13091,12 +13260,17 @@ 168c Atheros Communications Inc. 0007 AR5000 802.11a Wireless Adapter 1737 0007 WPC54A Wireless PC Card + 1b47 0110 (Proxim) Skyline 4030 / Harmony 8450 802.11a Wireless CardBus Adapter 8086 2501 PRO/Wireless 5000 LAN PCI Adapter Module 0011 AR5210 802.11a NIC 0012 AR5211 802.11ab NIC 126c 8031 2201 Mobile Adapter + 1385 4400 WAB501 802.11ab Wireless CardBus Card + 1b47 aa00 (Proxim) 8460 802.11ab Wireless CardBus Adapter 0013 Atheros AR5001X+ Wireless Network Adapter + 0308 3402 AG-100 802.11ag Wireless Cardbus Adapter 0308 3405 G-102 v2 802.11g Wireless Cardbus Adapter + 0308 3408 G-170S 802.11g Wireless CardBus Adapter 0e11 00e5 NC6000 laptop 10b7 6002 3CRWE154A72 802.11abg Cardbus Adapter 1113 d301 Philips CPWNA100 Wireless CardBus adapter @@ -13110,13 +13284,18 @@ 1186 3a14 AirPremier AG DWL-AG530 Wireless PCI Adapter (rev.A) 1186 3a17 D-Link AirPremier DWL-G680 Wireless Cardbus Adapter 1186 3a18 D-Link AirPremier DWL-G550 Wireless PCI Adapter + 1186 3a1a WNA-2330 802.11bg Wireless CardBus Adapter 1186 3a63 D-Link AirPremier DWL-AG660 Wireless Cardbus Adapter 1186 3a93 Conceptronic C54I Wireless 801.11g PCI card 1186 3a94 C54C Wireless 801.11g cardbus 1186 3ab0 Allnet ALL0281 Wireless PCI Card 1385 4900 WG311v1 802.11g Wireless PCI Adapter + 1385 4b00 WG511T 108 Mbps Wireless PC Card (rev.A/B) 1385 4d00 WG311T 108 Mbps Wireless PCI Adapter (rev.A2) + 1385 4f00 WG511U Double 108 Mbps Wireless PC Card 1385 5a00 WG311T 108 Mbps Wireless PCI Adapter (rev.A3) + 1385 5b00 WG511T 108 Mbps Wireless PC Card (rev.C) + 1385 5d00 WPN511 RangeMax Wireless PC Card 1458 e911 Gigabyte GN-WIAG02 1468 0403 U10H014 802.11g Cardbus Adapter 1468 0408 ThinkPad 11b/g Wireless LAN Mini PCI Adapter @@ -13136,14 +13315,16 @@ 168c 2041 Engenius 5354MP Plus ARIES2 b/g MiniPCI Adapter 168c 2042 Engenius 5354MP Plus ARIES2 a/b/g MiniPCI Adapter 168c 2051 TRENDnet TEW-443PI Wireless PCI Adapter + 16a5 160a BWP712 802.11bg Wireless CardBus Adapter 16ab 7302 Trust Speedshare Turbo Pro Wireless PCI Adapter 1737 0017 WPC55AG 1737 0026 WMP55AG v1.1 1737 0035 WPC55AG v1.2 802.11abg Cardbus Adapter + 1799 3000 F6D3000 Dual-Band Wireless A+G Desktop Card + 1799 3010 F6D3010 Dual-Band Wireless A+G Notebook Card 17cf 0042 Z-COMAX Highpower XG-622H (400mw) 802.11b/g mini-PCI Adapter 185f 1012 CM9 Wireless a/b/g MiniPCI Adapter 185f 2012 Wistron NeWeb WLAN a+b+g model CB9 - 1948 3aba RBTBJ-AW 802.11abg Cardbus Adapter a727 6801 3CRXJK10075 OfficeConnect Wireless 108Mbps 11g XJACK PC Card # the name AR5005G is used for the reference design using AR2413 001a AR2413 802.11bg NIC @@ -13164,17 +13345,26 @@ 1737 0053 WPC54G v7 802.11g Wireless-G Notebook Adapter 1799 700c F5D7000 v5000 Wireless G Desktop Card 1799 701d F5D7010 v5000 Wireless G Notebook Card + 17f9 0008 DX-WGNBC 802.11bg Wireless CardBus Adapter + 17f9 0018 DX-WGDTC 802.11bg Wireless PCI Adapter # the name AR5006X is used for the reference design using AR5413 001b AR5413 802.11abg NIC + 1154 034e WLI-CB-AG108HP 802.11abg Wireless CardBus Adapter 1186 3a19 D-Link AirPremier AG DWL-AG660 Wireless Cardbus Adapter 1186 3a22 AirPremier AG DWL-AG530 Wireless PCI Adapter (rev.B) 1458 e901 GN-WI01HT Wireless a/b/g MiniPCI Adapter 168c 001b Wireless LAN PCI LiteOn + 168c 1062 IPN-W100CB 802.11abg Wireless CardBus Adapter 168c 2062 EnGenius EMP-8602 (400mw) or Compex WLM54AG (SuperAG) 168c 2063 EnGenius EMP-8602 (400mw) or Compex WLM54AG + 17f9 000b WL-711A 802.11abg Wireless CardBus Adapter + 17f9 000c WPIA-112AG 802.11abg Wireless PCI Adapter + 17f9 000d PC-686X 802.11abg Wireless Mini PCI Adapter 185f 1600 DCMA-82 High Power WLAN 802.11a/b/g mini-PCI Module (Super A/G, eXtended Range, 400mW) + 1948 3aba RBTBJ-AW 802.11abg Wireless Cardbus Adapter a727 6804 Wireless 11a/b/g PC Card with XJACK(r) Antenna - 001c AR5001 Wireless Network Adapter + 001c AR242x / AR542x Wireless Network Adapter (PCI-Express) + 0777 3006 SRX 802.11abg Wireless ExpressCard Adapter 1468 0428 AR5BXB63 802.11bg NIC 1468 042a AR5007EG 802.11bg NIC 147b 1033 AirPace Wi-Fi @@ -13194,20 +13384,28 @@ 1186 3a67 DWL-G650M Super G MIMO Wireless Notebook Adapter 1186 3a68 DWL-G520M Wireless 108G MIMO Desktop Adapter 187e 340e M-302 802.11g Wireless PCI Adapter + 1976 2003 TEW-601PC 802.11g Wireless CardBus Adapter 0023 AR5008 Wireless Network Adapter + 0308 340b NWD-170N 802.11bgn Wireless CardBus Adapter 1154 0365 Buffalo WLP-CB-AG300 802.11abgn Cardbus Adapter + 1154 0367 WLI-CB-AG301N 802.11abgn Wireless CardBus Adapter 1186 3a6a DWA-642 802.11n RangeBooster N CardBus Adapter 1186 3a6d DWA-552 802.11n Xtreme N Desktop Adapter (rev A1) 1186 3a76 DWA-645 802.11n RangeBooster N 650 Notebook Adapter (rev A1) 1737 0059 WPC300N v2 Wireless-N Notebook Adapter 1737 0069 WPC100 v1 802.11n RangePlus Wireless Notebook Adapter 1799 8011 F5D8011 v1 802.11n N1 Wireless Notebook Card + 187e 3411 NWD-370N 802.11n Wireless PCI Adapter + 1976 2008 TEW-621PC 802.11bgn Wireless CardBus Adapter 0024 AR5008 Wireless Network Adapter 0027 AR9160 802.11abgn Wireless PCI Adapter + 0777 4082 SR71-A 802.11abgn Wireless Mini PCI Adapter 0029 AR922X Wireless Network Adapter 1186 3a7a DWA-552 802.11n Xtreme N Desktop Adapter (rev A2) 002a AR928X Wireless Network Adapter (PCI-Express) + 103c 3041 AR5BHB92-H 802.11abgn Wireless Half-size Mini PCIe Card 002b AR9285 Wireless Network Adapter (PCI-Express) + 1931 0023 Option GTM67x PCIe WiFi Adapter 002c AR2427 Wireless Network Adapter (PCI-Express) 002d AR9287 Wireless Network Adapter 002e AR9287 Wireless Network Adapter (PCI-Express) @@ -13295,6 +13493,8 @@ 5801 XMC-VLX85 Reconfigurable Virtex-5 FPGA with plug-in I/O 5802 XMC-VLX110 Reconfigurable Virtex-5 FPGA with plug-in I/O 5804 XMC-VLX155 Reconfigurable Virtex-5 FPGA with plug-in I/O + 5807 XMC-SLX150: Reconfigurable Spartan-6 FPGA with plug-in I/O + 5808 XMC-SLX150-1M: Reconfigurable Spartan-6 FPGA with plug-in I/O 16da Advantech Co., Ltd. 0011 INES GPIB-PCI 16df PIKA Technologies Inc. @@ -13377,6 +13577,9 @@ 0070 Octeon CN50XX Network Processor 0080 Octeon CN52XX Network Processor 0090 Octeon II CN63XX Network Processor + 0091 Octeon II CN68XX Network Processor + 0092 Octeon II CN65XX Network Processor + 0093 Octeon II CN61XX Network Processor 1787 Hightech Information System Ltd. 1789 Ennyah Technologies Corp. # also used by Struck Innovative Systeme for joint developments @@ -13454,6 +13657,7 @@ 17d3 1221 ARC-1221 8-Port PCI-Express to SATA RAID Controller 1300 ARC-1300ix-16 16-Port PCI-Express to SAS Non-RAID Host Adapter 1680 ARC-1680 8 port PCIe/PCI-X to SAS/SATA II RAID Controller + 1880 ARC-1880 8/12 port PCIe/PCI-X to SAS/SATA II RAID Controller # nee Neterion Inc., previously S2io Inc. 17d5 Exar Corp. 5731 Xframe 10-Gigabit Ethernet PCI-X @@ -13508,10 +13712,12 @@ 6060 R6060 USB 1.1 Controller 6061 R6061 USB 2.0 Controller 17f7 Topdek Semiconductor Inc. +17f9 Gemtek Technology Co., Ltd 17fe InProComm Inc. 2120 IPN 2120 802.11b 1737 0020 WMP11 v4 802.11b Wireless-B PCI Adapter 2220 IPN 2220 802.11g + 1468 0305 T60N871 802.11g Mini PCI Wireless Adapter 1737 0029 WPC54G v4 802.11g Wireless-G Notebook Adapter 17ff Benq Corporation 1803 ProdaSafe GmbH @@ -13522,7 +13728,7 @@ 16be 0001 V9x HAM Data Fax Modem 4100 HaM plus Data Fax Modem 16be 0002 V9x HAM 1394 -1814 RaLink +1814 Ralink corp. 0101 Wireless PCI Adapter RT2400 / RT2460 1043 0127 WiFi-b add-on Card 1371 0010 Minitar MNW2BPCI Wireless PCI Card @@ -13541,6 +13747,8 @@ 1799 700a F5D7000 v2000/v3000 Wireless G Desktop Card 1799 701a F5D7010 v2000/v3000 Wireless G Notebook Card 185f 22a0 CN-WF513 Wireless Cardbus Adapter + 1948 3c00 C54RC v1 Wireless 11g CardBus Adapter + 1948 3c01 C54Ri v1 Wireless 11g PCI Adapter 0300 Wireless Adapter Canyon CN-WF511 0301 RT2561/RT61 802.11g PCI 1186 3c08 AirPlus G DWL-G630 Wireless Cardbus Adapter (rev.E1) @@ -13551,16 +13759,22 @@ 1737 0055 WMP54G ver 4.1 1799 700e F5D7000 v6000 Wireless G Desktop Card 1799 701e F5D7010 v6000 Wireless G Notebook Card + 17f9 0012 AWLC3026T 802.11g Wireless CardBus Adapter 1814 2561 EW-7108PCg 0302 RT2561/RT61 rev B 802.11g 1186 3a71 DWA-510 Wireless G Desktop Adapter 1186 3c08 AirPlus G DWL-G630 Wireless Cardbus Adapter (rev.E2) 1186 3c09 AirPlus G DWL-G510 Wireless Network Adapter (Rev.C) 1462 b834 PC54G3 Wireless 11g PCI Card + 1948 3c23 C54RC v2 Wireless 11g CardBus Adapter + 1948 3c24 C54Ri v2 Wireless 11g PCI Adapter 0401 RT2600 802.11 MIMO 1737 0052 WPC54GR v1 802.11g Wireless-G Notebook Adapter with RangeBooster + 17f9 0011 WPCR-137G 802.11bg Wireless CardBus Adapter + 17f9 0016 WPIR-119GH 802.11bg Wireless Desktop Adapter 0601 RT2800 802.11n PCI 1799 801c F5D8011 v3 802.11n N1 Wireless Notebook Card + 187e 3412 NWD-310N 802.11n Wireless PCI Adapter 0681 RT2860 Wireless 802.11n PCIe 0701 RT2760 Wireless 802.11n 1T/2R Cardbus 0781 RT2860 @@ -13745,19 +13959,20 @@ 0004 Fastcom 422/2-PCI-335 0005 Fastcom IGESCC-PCI-ISO/1 000a Fastcom 232/4-PCI-335 + 000b Fastcom 232/8-PCI-335 Async 8-Port RS-232 Serial PCI Adapter 000f Fastcom FSCC 0010 Fastcom GSCC # Dual Serocco 0011 Fastcom QSSB 0014 SuperFSCC 0015 SuperFSCC-104 - 0016 Fastcom FSCC-232 + 0016 Fastcom FSCC-232 Sync/Async 2-Port RS-232 Serial PCI Adapter (F-Core) 0017 SuperFSCC-104-NOUART - 0018 SuperFSCC/4 + 0018 Fastcom SuperFSCC/4 Sync/Async 4-Port RS-422 Serial PCI Adapter with DMA (F-Core) 0019 SuperFSCC with soft UARTs - 001a SuperFSCC-104-LVDS - 001b FSCC/4 - 001c SuperFSCC/4-LVDS + 001a Fastcom SuperFSCC-104-LVDS Sync/Async 2-Port RS-644 Serial PC/104+ Adapter with DMA (F-Core) + 001b Fastcom FSCC/4 Sync/Async 4-Port RS-422 Serial PCI Adapter (F-Core) + 001c Fastcom SuperFSCC/4-LVDSSync/Async 4-Port RS-644 Serial PCI Adapter with DMA (F-Core) 18fb Resilience Corporation 1904 Hangzhou Silan Microelectronics Co., Ltd. 2031 SC92031 PCI Fast Ethernet Adapter @@ -13824,6 +14039,8 @@ 1924 6904 SFN5111T-R4 1924 7104 SFN5161T-R4 1924 7904 SFN5151T-R4 + 1803 SFC9020 Virtual Function [Solarstorm] + 1813 SFL9021 Virtual Function [Solarstorm] 6703 SFC4000 rev A iSCSI/Onload [Solarstorm] 10b8 0102 SMC10GPCIe-10BT (A2) [TigerCard] 10b8 0103 SMC10GPCIe-10BT (A3) [TigerCard] @@ -13854,7 +14071,7 @@ e521 Advance e620 accelerator card 1947 C-guys, Inc. 4743 CG200 Dual SD/SDIO Host controller device -1948 Enterasys Networks +1948 Alpha Networks Inc. 194a DapTechnology B.V. 1111 FireSpy3850 1112 FireSpy450b @@ -13961,6 +14178,7 @@ 1011 Physics Processing Unit [PhysX] 1043 0001 PhysX P1 1974 TransferZentrum Mikroelektronik +1976 TRENDnet 1977 Parsec 197b JMicron Technology Corp. 0250 JMC250 PCI Express Gigabit Ethernet Controller @@ -13970,6 +14188,7 @@ 2361 JMB361 AHCI/IDE 1462 7235 P965 Neo MS-7235 mainboard 2362 JMB362 AHCI Controller + 1043 8460 P8P67 Deluxe Motherboard 2363 JMB362/JMB363 Serial ATA Controller 1043 81e4 P5B [JMB363] 1458 b000 GA-EP45-DS5 Motherboard @@ -14054,6 +14273,7 @@ 1004 STIX - 4 Port T1/E1 Card 1005 STIX - 4 Port FXS Card 19ee Netronome Systems, Inc. +19f1 BFG Tech 19ff Eclipse Electronic Systems, Inc. 1a03 ASPEED Technology, Inc. 1150 AST1150 PCI-to-PCI Bridge @@ -14066,7 +14286,6 @@ 1a08 Sierra semiconductor 0000 SC15064 1a0e DekTec Digital Video B.V. - 0069 DTA-105 1a17 Force10 Networks, Inc. 8002 PB-10GE-2P 10GbE Security Card 1a1d GFaI e.V. @@ -14099,6 +14318,9 @@ 1a78 Virident Systems Inc. 0031 Virident tachIOn Drive 1a78 0034 tachIOn PCIe SSD [rev 3] + 1a78 0037 tachIOn PCIe SSD [rev 3D] + 1a78 0038 tachIOn PCIe SSD [rev 4] + 1a78 0039 tachIOn PCIe SSD [rev 4D] 1a84 Commex Technologies 0001 Vulcan SP HT6210 10-Gigabit Ethernet (rev 02) 1a88 MEN Mikro Elektronik @@ -14147,14 +14369,20 @@ 1b1a K&F Computing Research Co. 0e70 GRAPE 1b36 Red Hat, Inc. +1b3a Westar Display Technologies + 7589 HRED J2000 - JPEG 2000 Video Codec Device 1b3e Teradata Corp. 1fa8 BYNET BIC2SE/X 1b3e 00a3 BYNET BIC2SX 1b3e 00c3 BYNET BIC2SE 1b40 Schooner Information Technology, Inc. +1b47 Card Access, Inc. 1b4b Marvell Technology Group Ltd. 9123 88SE9123 PCIe SATA 6.0 Gb/s controller + 9125 88SE9125 PCIe SATA 6.0 Gb/s controller 9128 88SE9128 PCIe SATA 6 Gb/s RAID controller + 9130 88SE9128 PCIe SATA 6 Gb/s RAID controller with HyperDuo + 1043 8438 P8P67 Deluxe Motherboard 1b55 NetUP Inc. 2a2c Dual DVB-S2-CI card e2e4 Dual DVB-T/C-CI RF card @@ -14696,6 +14924,7 @@ 1092 5a55 Viper II Z200 1092 5a57 Viper II Z200 ca00 SonicVibes +5431 AuzenTech, Inc. 544c Teralogic Inc 0350 TL880-based HDTV/ATSC tuner 5455 Technische University Berlin @@ -14713,8 +14942,11 @@ 5851 Exacq Technologies 5853 XenSource, Inc. 0001 Xen Platform Device +# Virtual device surfaced in guests to provide HID events. + c110 Virtualized HID +# Device surfaced in guests to provide 2d graphics capabilities + c147 Virtualized Graphics Device 5ace Beholder International Ltd. - 5050 BeholdTV 505 FM 631c SmartInfra Ltd 1652 PXI-1652 Signal Generator 2504 PXI-2504 Signal Interrogator @@ -14736,6 +14968,7 @@ 1022 4 photo couple 4 relay Card 1025 16 photo couple 16 relay Card 4000 WatchDog Card +6739 RV 940 [Barts Pro] # nee Qumranet 6900 Red Hat, Inc. 7063 pcHDTV @@ -14823,6 +15056,7 @@ 8086 5225 Centrino Advanced-N 6230 BGN 8086 5226 Centrino Advanced-N 6230 ABG 0100 2nd Generation Core Processor Family DRAM Controller + 1043 844d P8P67 Deluxe Motherboard 0101 2nd Generation Core Processor Family PCI Express Root Port 0102 2nd Generation Core Processor Family Integrated Graphics Controller 0103 2nd Generation Core Processor Family Thermal Management Controller @@ -14840,6 +15074,18 @@ 0116 2nd Generation Core Processor Family Integrated Graphics Controller 0122 2nd Generation Core Processor Family Integrated Graphics Controller 0126 2nd Generation Core Processor Family Integrated Graphics Controller + 0150 Ivy Bridge DRAM Controller + 0151 Ivy Bridge PCI Express Root Port + 0152 Ivy Bridge Graphics Controller + 0154 Ivy Bridge DRAM Controller + 0155 Ivy Bridge PCI Express Root Port + 0156 Ivy Bridge Graphics Controller + 0158 Ivy Bridge DRAM Controller + 0159 Ivy Bridge PCI Express Root Port + 015a Ivy Bridge Graphics Controller + 015c Ivy Bridge DRAM Controller + 015d Ivy Bridge PCI Express Root Port + 015e Ivy Bridge Graphics Controller 0309 80303 I/O Processor PCI-to-PCI Bridge 030d 80312 I/O Companion Chip PCI-to-PCI Bridge 0326 6700/6702PXH I/OxAPIC Interrupt Controller A @@ -14940,10 +15186,22 @@ 0886 Centrino Wireless-N + WiMAX 6150 8086 1315 Centrino Wireless-N + WiMAX 6150 BGN 8086 1317 Centrino Wireless-N + WiMAX 6150 BG - 0896 WiFi 130 Series - 0897 WiFi 130 Series - 08ae WiFi 100 Series - 08af WiFi 100 Series + 0896 Centrino Wireless-N 130 + 8086 5005 Centrino Wireless-N 130 BGN + 8086 5007 Centrino Wireless-N 130 BG + 8086 5025 Centrino Wireless-N 130 BGN + 8086 5027 Centrino Wireless-N 130 BG + 0897 Centrino Wireless-N 130 + 8086 5015 Centrino Wireless-N 130 BGN + 8086 5017 Centrino Wireless-N 130 BG + 08ae Centrino Wireless-N 100 + 8086 1005 Centrino Wireless-N 100 BGN + 8086 1007 Centrino Wireless-N 100 BG + 8086 1025 Centrino Wireless-N 100 BGN + 8086 1027 Centrino Wireless-N 100 BG + 08af Centrino Wireless-N 100 + 8086 1015 Centrino Wireless-N 100 BGN + 8086 1017 Centrino Wireless-N 100 BG 0960 80960RP (i960RP) Microprocessor/Bridge 0962 80960RM (i960RM) Bridge 0964 80960RP (i960RP) Microprocessor/Bridge @@ -15318,6 +15576,7 @@ 1028 0211 OptiPlex 755 10bf 82567LF Gigabit Network Connection 10c0 82562V-2 10/100 Network Connection + 1028 020d Inspiron 530 10c2 82562G-2 10/100 Network Connection 10c3 82562GT-2 10/100 Network Connection 10c4 82562GT 10/100 Network Connection @@ -15398,6 +15657,7 @@ 10f5 82567LM Gigabit Network Connection 10f6 82574L Gigabit Network Connection 10f7 82599EB 10-Gigabit KX4 Network Connection + 108e 7b12 Sun Dual 10GbE PCIe 2.0 FEM 8086 000d Ethernet Mezzanine Adapter X520-KX4-2 10f8 82599EB 10 Gigabit Dual Port Backplane Connection 8086 000c Ethernet X520 10GbE Dual Port KX4-KR Mezz @@ -15635,6 +15895,7 @@ 1501 82567V-3 Gigabit Network Connection 1502 82579LM Gigabit Network Connection 1503 82579V Gigabit Network Connection + 1043 849c P8P67 Deluxe Motherboard 1507 82599EB 10 Gigabit Network Connection 1508 82598EB Gigabit BX Network Connection 150a 82576NS Gigabit Network Connection @@ -15652,7 +15913,7 @@ 150f 82580 Gigabit Fiber Network Connection 1510 82580 Gigabit Backplane Connection 1511 82580 Gigabit SFP Connection - 1514 10 Gigabit KX4 Network Connection + 1514 82599EB 10 Gigabit KX4 Network Connection 8086 000b Ethernet X520 10GbE Dual Port KX4 Mezz 1516 82580 Gigabit Network Connection 8086 12b1 Ethernet Server Adapter I340-T2 @@ -15662,6 +15923,19 @@ 1518 82576NS SerDes Gigabit Network Connection 151c 82599EB 10 Gigabit TN Network Connection 108e 7b13 Dual 10GBASE-T LP + 1521 I350 Gigabit Network Connection + 8086 0001 Ethernet Server Adapter I350-T4 + 8086 0002 Ethernet Server Adapter I350-T2 + 8086 00a1 Ethernet Server Adapter I350-T4 + 8086 00a2 Ethernet Server Adapter I350-T2 + 1522 I350 Gigabit Fiber Network Connection + 8086 0002 Ethernet Server Adapter I350-T2 + 8086 0003 Ethernet Server Adapter I350-F4 + 8086 0004 Ethernet Server Adapter I350-F2 + 8086 00a3 Ethernet Server Adapter I350-F4 + 8086 00a4 Ethernet Server Adapter I350-F2 + 1523 I350 Gigabit Backplane Connection + 1524 I350 Gigabit Connection 1525 82567V-4 Gigabit Network Connection 1526 82576 Gigabit Network Connection 8086 a05c Gigabit ET2 Quad Port Server Adapter @@ -15670,6 +15944,11 @@ 8086 0001 Ethernet Server Adapter I340-F4 8086 0002 Ethernet Server Adapter I340-F4 1528 Ethernet Controller 10 Gigabit X540-AT2 + 8086 0001 Ethernet Server Adapter X540-T2 + 8086 0002 Ethernet Server Adapter X540-T1 + 8086 001a Ethernet Server Adapter X540-T2 + 8086 00a2 Ethernet Server Adapter X540-T1 + 8086 5003 Ethernet Server Adapter X540-T2 1529 82599 10 Gigabit Dual Port Backplane Connection with FCoE 152a 82599 10 Gigabit Dual port Network Connection with FCoE 1960 80960RP (i960RP) Microprocessor @@ -15718,6 +15997,7 @@ 1c00 6 Series Chipset Family 4 port SATA IDE Controller 1c01 6 Series Chipset Family 4 port SATA IDE Controller 1c02 6 Series Chipset Family 6 port SATA AHCI Controller + 1043 844d P8P67 Deluxe Motherboard 1c03 6 Series Chipset Family 6 port SATA AHCI Controller 1c04 6 Series Chipset Family SATA RAID Controller 1c05 6 Series Chipset Family SATA RAID Controller @@ -15733,15 +16013,20 @@ 1c1c 6 Series Chipset Family PCI Express Root Port 7 1c1e 6 Series Chipset Family PCI Express Root Port 8 1c20 6 Series Chipset Family High Definition Audio Controller + 1043 8418 P8P67 Deluxe Motherboard 1c22 6 Series Chipset Family SMBus Controller + 1043 844d P8P67 Deluxe Motherboard 1c24 6 Series Chipset Family Thermal Management Controller 1c25 6 Series Chipset Family DMI to PCI Bridge 1c26 6 Series Chipset Family USB Enhanced Host Controller #1 + 1043 844d P8P67 Deluxe Motherboard 1c2d 6 Series Chipset Family USB Enhanced Host Controller #2 + 1043 844d P8P67 Deluxe Motherboard 1c33 6 Series Chipset Family LAN Controller 1c35 6 Series Chipset Family VECI Controller - 1c3a 6 Series Chipset Family HECI Controller #1 - 1c3b 6 Series Chipset Family HECI Controller #2 + 1c3a 6 Series Chipset Family MEI Controller #1 + 1043 844d P8P67 Deluxe Motherboard + 1c3b 6 Series Chipset Family MEI Controller #2 1c3c 6 Series Chipset Family IDE-r Controller 1c3d 6 Series Chipset Family KT Controller 1c40 6 Series Chipset Family LPC Controller @@ -15751,6 +16036,7 @@ 1c44 6 Series Chipset Family LPC Controller 1c45 6 Series Chipset Family LPC Controller 1c46 P67 Express Chipset Family LPC Controller + 1043 844d P8P67 Deluxe Motherboard 1c47 6 Series Chipset Family LPC Controller 1c48 6 Series Chipset Family LPC Controller 1c49 HM65 Express Chipset Family LPC Controller @@ -15798,7 +16084,7 @@ 1d1e Patsburg PCI Express Root Port 8 1d1f Patsburg PCI Express Root Port 8 1d20 Patsburg High Definition Audio Controller - 1d22 Patsburg SMBus Controller + 1d22 Patsburg SMBus Host Controller 1d24 Patsburg Thermal Management Controller 1d25 Patsburg DMI to PCI Bridge 1d26 Patsburg USB2 Enhanced Host Controller #1 @@ -15813,21 +16099,43 @@ 1d3f Patsburg PCI Express Virtual Switch Port 1d40 Patsburg LPC Controller 1d41 Patsburg LPC Controller - 1d50 Patsburg 8-Port SATA/SAS Storage Control Unit - 1d58 Patsburg 8-Port SATA/SAS Storage Control Unit + 1d50 Patsburg Dual 4-Port SATA/SAS Storage Control Unit + 1d54 Patsburg Dual 4-Port SATA/SAS Storage Control Unit + 1d55 Patsburg 4-Port SATA/SAS Storage Control Unit + 1d58 Patsburg Dual 4-Port SATA/SAS Storage Control Unit 1d59 Patsburg 4-Port SATA/SAS Storage Control Unit 1d5b Patsburg 4-Port SATA Storage Control Unit - 1d60 Patsburg 8-Port SATA/SAS Storage Control Unit + 1d60 Patsburg Dual 4-Port SATA/SAS Storage Control Unit 1d61 Patsburg SAS Storage Control Unit 1 - 1d68 Patsburg 8-Port SATA/SAS Storage Control Unit + 1d64 Patsburg Dual 4-Port SATA/SAS Storage Control Unit + 1d65 Patsburg 4-Port SATA/SAS Storage Control Unit + 1d68 Patsburg Dual 4-Port SATA/SAS Storage Control Unit 1d69 Patsburg 4-Port SATA/SAS Storage Control Unit 1d6b Patsburg 4-Port SATA Storage Control Unit - 1d70 Patsburg SCU0 SMBus Controller - 1d71 Patsburg SCU1 SMBus Controller - 1d72 Patsburg SMBus Controller 2 + 1d70 Patsburg SMBus Controller 0 + 1d71 Patsburg SMBus Controller 1 + 1d72 Patsburg SMBus Controller 2 1d73 Patsburg Integrated NVSRAM Controller 1d74 Patsburg PCI Express Upstream Port 1d76 Patsburg Multi-Function Glue + 2310 DH89xxCC LPC Controller + 2323 DH89xxCC 4 Port SATA AHCI Controller + 2330 DH89xxCC SMBus Controller + 2331 DH89xxCC Chap Counter + 2332 DH89xxCC Thermal Subsystem + 2334 DH89xxCC USB2 Enhanced Host Controller #1 + 2335 DH89xxCC USB2 Enhanced Host Controller #1 + 2342 DH89xxCC PCI Express Root Port #1 + 2343 DH89xxCC PCI Express Root Port #1 + 2344 DH89xxCC PCI Express Root Port #2 + 2345 DH89xxCC PCI Express Root Port #2 + 2346 DH89xxCC PCI Express Root Port #3 + 2347 DH89xxCC PCI Express Root Port #3 + 2348 DH89xxCC PCI Express Root Port #4 + 2349 DH89xxCC PCI Express Root Port #4 + 2360 DH89xxCC Watchdog Timer + 2364 DH89xxCC HECI 0 + 2365 DH89xxCC HECI 1 2410 82801AA ISA Bridge (LPC) 2411 82801AA IDE Controller 2412 82801AA USB Controller @@ -15912,6 +16220,7 @@ 103c 309f Compaq nx9420 Notebook 103c 30a3 Compaq nw8440 103c 30c1 Compaq 6910p + 104d 902d VAIO VGN-NR120E 144d c00c P30 notebook 1734 1055 Amilo M1420 17aa 20ae ThinkPad T61 @@ -15965,7 +16274,9 @@ 244c 82801BAM ISA Bridge (LPC) 244e 82801 PCI Bridge 1014 0267 NetVista A30p + 1028 020d Inspiron 530 1028 0211 Optiplex 755 + 103c 2a3b Pavilion A1512X 1458 5000 GA-EP45-DS5 Motherboard 1775 11cc CC11/CL11 2450 82801E ISA Bridge (LPC) @@ -16836,11 +17147,13 @@ 15d9 8680 X7DVL-E-O motherboard 2770 82945G/GZ/P/PL Memory Controller Hub 1028 01ad OptiPlex GX620 + 103c 2a3b Pavilion A1512X 1043 817a P5LD2-VM Mainboard 107b 5048 E4500 8086 544e DeskTop Board D945GTP 2771 82945G/GZ/P/PL PCI Express Root Port 2772 82945G/GZ Integrated Graphics Controller + 103c 2a3b Pavilion A1512X 8086 544e DeskTop Board D945GTP 8086 d605 Intel Desktop Board D945GCCR 2774 82955X Memory Controller Hub @@ -16889,6 +17202,7 @@ 27ae Mobile 945GME Express Integrated Graphics Controller 1775 11cc CC11/CL11 integrated graphics (primary) 27b0 82801GH (ICH7DH) LPC Interface Bridge + 103c 2a3b Pavilion A1512X 8086 544e DeskTop Board D945GTP 27b8 82801GB/GR (ICH7 Family) LPC Interface Bridge 1028 01e6 PowerEdge 860 @@ -16919,6 +17233,7 @@ 8086 544e DeskTop Board D945GTP 27c1 N10/ICH7 Family SATA AHCI Controller 1028 01df PowerEdge SC440 + 103c 2a3b Pavilion A1512X 1775 11cc CC11/CL11 8086 4f4d DeskTop Board D510MO 8086 5842 DeskTop Board D975XBX @@ -16940,6 +17255,7 @@ 1028 01d7 XPS M1210 1028 01df PowerEdge SC440 1028 01e6 PowerEdge 860 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -16956,6 +17272,7 @@ 1028 01d7 XPS M1210 1028 01df PowerEdge SC440 1028 01e6 PowerEdge 860 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -16972,6 +17289,7 @@ 1028 01d7 XPS M1210 1028 01df PowerEdge SC440 1028 01e6 PowerEdge 860 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -16987,6 +17305,7 @@ 1028 01ad OptiPlex GX620 1028 01d7 XPS M1210 1028 01df PowerEdge SC440 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -17003,6 +17322,7 @@ 1028 01d7 XPS M1210 1028 01df PowerEdge SC440 1028 01e6 PowerEdge 860 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -17028,6 +17348,7 @@ 27d8 N10/ICH 7 Family High Definition Audio Controller 1025 006c 9814 WKMI 1028 01d7 XPS M1210 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -17055,6 +17376,7 @@ 1028 01d7 XPS M1210 1028 01df PowerEdge SC440 1028 01e6 PowerEdge 860 + 103c 2a3b Pavilion A1512X 1043 8179 P5KPL-VM Motherboard 10f7 8338 Panasonic CF-Y5 laptop 1458 5001 GA-8I945PG-RH Mainboard @@ -17064,6 +17386,7 @@ 8086 544e DeskTop Board D945GTP 8086 5842 DeskTop Board D975XBX 27dc N10/ICH 7 Family LAN Controller + 103c 2a3b Pavilion A1512X 8086 308d DeskTop Board D945GTP 27dd 82801G (ICH7 Family) AC'97 Modem Controller 27de 82801G (ICH7 Family) AC'97 Audio Controller @@ -17073,6 +17396,7 @@ 27df 82801G (ICH7 Family) IDE Controller 1028 01df PowerEdge SC440 1028 01e6 PowerEdge 860 + 103c 2a3b Pavilion A1512X 103c 309f Compaq nx9420 Notebook 103c 30a1 NC2400 103c 30a3 Compaq nw8440 @@ -17102,16 +17426,19 @@ 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 2820 82801H (ICH8 Family) 4 port SATA IDE Controller 1028 01da OptiPlex 745 1462 7235 P965 Neo MS-7235 mainboard 2821 82801HR/HO/HH (ICH8R/DO/DH) 6 port SATA AHCI Controller 2822 82801 SATA RAID Controller + 1028 020d Inspiron 530 2824 82801HB (ICH8) 4 port SATA AHCI Controller 1043 81ec P5B 2825 82801H (ICH8 Family) 2 port SATA IDE Controller 1028 01da OptiPlex 745 1462 7235 P965 Neo MS-7235 mainboard + 2826 Patsburg SATA RAID Controller 2828 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller 1028 01f3 Inspiron 1420 103c 30c0 Compaq 6710b @@ -17122,6 +17449,7 @@ 103c 30c1 Compaq 6910p 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 17aa 20a7 ThinkPad T61 e4bf cc47 CCG-RUMBA 282a Mobile 82801 SATA RAID Controller @@ -17135,6 +17463,7 @@ 103c 30d9 Presario C700 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard 17aa 20aa ThinkPad T61 e4bf cc47 CCG-RUMBA @@ -17148,6 +17477,7 @@ 103c 30d9 Presario C700 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard 17aa 20aa ThinkPad T61 e4bf cc47 CCG-RUMBA @@ -17160,8 +17490,11 @@ 103c 30d9 Presario C700 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 17aa 20aa ThinkPad T61 e4bf cc47 CCG-RUMBA + 2833 82801H (ICH8 Family) USB UHCI Controller #4 + 1043 81ec P5B 2834 82801H (ICH8 Family) USB UHCI Controller #4 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 @@ -17170,6 +17503,7 @@ 103c 30c1 Compaq 6910p 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard 17aa 20aa ThinkPad T61 e4bf cc47 CCG-RUMBA @@ -17181,6 +17515,7 @@ 103c 30c1 Compaq 6910p 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 17aa 20aa ThinkPad T60 e4bf cc47 CCG-RUMBA 2836 82801H (ICH8 Family) USB2 EHCI Controller #1 @@ -17192,6 +17527,7 @@ 103c 30d9 Presario C700 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard 17aa 20ab ThinkPad T61 e4bf cc47 CCG-RUMBA @@ -17203,6 +17539,7 @@ 103c 30c1 Compaq 6910p 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 17aa 20ab ThinkPad T61 e4bf cc47 CCG-RUMBA 283e 82801H (ICH8 Family) SMBus Controller @@ -17213,17 +17550,21 @@ 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C + 104d 902d VAIO VGN-NR120E 1462 7235 P965 Neo MS-7235 mainboard 17aa 20a9 ThinkPad T61 e4bf cc47 CCG-RUMBA 283f 82801H (ICH8 Family) PCI Express Port 1 1028 01da OptiPlex 745 103c 30c1 Compaq 6910p + 104d 902d VAIO VGN-NR120E 17aa 20ad ThinkPad T61 2841 82801H (ICH8 Family) PCI Express Port 2 103c 30c1 Compaq 6910p + 104d 902d VAIO VGN-NR120E 17aa 20ad ThinkPad T61 2843 82801H (ICH8 Family) PCI Express Port 3 + 104d 902d VAIO VGN-NR120E 17aa 20ad ThinkPad T61 2845 82801H (ICH8 Family) PCI Express Port 4 17aa 20ad ThinkPad T61 @@ -17249,6 +17590,7 @@ 104d 9005 Vaio VGN-FZ260E 104d 9008 Vaio VGN-SZ79SN_C 104d 9016 Sony VAIO VGN-AR51M + 104d 902d VAIO VGN-NR120E 14f1 5051 Presario C700 17aa 20ac ThinkPad T61 8384 7616 Dell Vostro 1400 @@ -17261,18 +17603,21 @@ 103c 30c1 Compaq 6910p 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 17aa 20a6 ThinkPad T61 e4bf cc47 CCG-RUMBA 2912 82801IH (ICH9DH) LPC Interface Controller 2914 82801IO (ICH9DO) LPC Interface Controller 1028 0211 Optiplex 755 2916 82801IR (ICH9R) LPC Interface Controller + 1028 020d Inspiron 530 2917 ICH9M-E LPC Interface Controller e4bf cc4d CCM-BOOGIE 2918 82801IB (ICH9) LPC Interface Controller 1028 0236 PowerEdge R610 82801IB (ICH9) LPC Interface Controller 2919 ICH9M LPC Interface Controller 2920 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller + 1028 020d Inspiron 530 1028 020f PowerEdge R300 onboard SATA Controller 1028 0210 PowerEdge T300 onboard SATA Controller 1028 0211 Optiplex 755 @@ -17287,6 +17632,7 @@ 1734 10e0 System Board D2542 8086 2925 System Board D2542 2926 82801I (ICH9 Family) 2 port SATA IDE Controller + 1028 020d Inspiron 530 1028 020f PowerEdge R300 onboard SATA Controller 1028 0210 PowerEdge T300 onboard SATA Controller 1028 0211 Optiplex 755 @@ -17299,12 +17645,14 @@ e4bf cc4d CCM-BOOGIE 292e ICH9M SATA IDE Controller 2930 82801I (ICH9 Family) SMBus Controller + 1028 020d Inspiron 530 1028 0211 Optiplex 755 103c 3628 dv6-1190en e4bf cc4d CCM-BOOGIE 2932 82801I (ICH9 Family) Thermal Subsystem 103c 3628 dv6-1190en 2934 82801I (ICH9 Family) USB UHCI Controller #1 + 1028 020d Inspiron 530 1028 020f PowerEdge R300 onboard UHCI 1028 0210 PowerEdge T300 onboard UHCI 1028 0211 Optiplex 755 @@ -17317,6 +17665,7 @@ 1028 2011 Optiplex 755 e4bf cc4d CCM-BOOGIE 2935 82801I (ICH9 Family) USB UHCI Controller #2 + 1028 020d Inspiron 530 1028 020f PowerEdge R300 onboard UHCI 1028 0210 PowerEdge T300 onboard UHCI 1028 0211 Optiplex 755 @@ -17328,6 +17677,7 @@ 1028 029c PowerEdge M710 USB UHCI Controller e4bf cc4d CCM-BOOGIE 2936 82801I (ICH9 Family) USB UHCI Controller #3 + 1028 020d Inspiron 530 1028 020f PowerEdge R300 onboard UHCI 1028 0210 PowerEdge T300 onboard UHCI 1028 0211 Optiplex 755 @@ -17337,6 +17687,7 @@ 1028 029c PowerEdge M710 USB UHCI Controller e4bf cc4d CCM-BOOGIE 2937 82801I (ICH9 Family) USB UHCI Controller #4 + 1028 020d Inspiron 530 1028 0211 Optiplex 755 1028 0235 PowerEdge R710 USB UHCI Controller 1028 0236 PowerEdge R610 USB UHCI Controller @@ -17348,6 +17699,7 @@ 8086 2942 828011 (ICH9 Family ) USB UHCI Controller e4bf cc4d CCM-BOOGIE 2938 82801I (ICH9 Family) USB UHCI Controller #5 + 1028 020d Inspiron 530 1028 0211 Optiplex 755 1028 0235 PowerEdge R710 USB UHCI Controller 1028 0236 PowerEdge R610 USB UHCI Controller @@ -17357,10 +17709,12 @@ 8086 2938 Optiplex 755 e4bf cc4d CCM-BOOGIE 2939 82801I (ICH9 Family) USB UHCI Controller #6 + 1028 020d Inspiron 530 1028 0210 PowerEdge T300 onboard UHCI 1028 0237 PowerEdge T610 USB UHCI Controller e4bf cc4d CCM-BOOGIE 293a 82801I (ICH9 Family) USB2 EHCI Controller #1 + 1028 020d Inspiron 530 1028 020f PowerEdge R300 onboard EHCI 1028 0210 PowerEdge T300 onboard EHCI 1028 0211 Optiplex 755 @@ -17372,6 +17726,7 @@ 1028 029c PowerEdge M710 USB EHCI Controller e4bf cc4d CCM-BOOGIE 293c 82801I (ICH9 Family) USB2 EHCI Controller #2 + 1028 020d Inspiron 530 1028 0211 Optiplex 755 1028 0235 PowerEdge R710 USB EHCI Controller 1028 0236 PowerEdge R610 USB EHCI Controller @@ -17381,19 +17736,26 @@ 8086 293c Optiplex 755 e4bf cc4d CCM-BOOGIE 293e 82801I (ICH9 Family) HD Audio Controller + 1028 020d Inspiron 530 1028 0211 Optiplex 755 103c 3628 dv6-1190en 8086 293e Optiplex 755 8086 2940 Optiplex 755 e4bf cc4d CCM-BOOGIE 2940 82801I (ICH9 Family) PCI Express Port 1 + 1028 020d Inspiron 530 1028 0211 Optiplex 755 8086 2940 Optiplex 755 2942 82801I (ICH9 Family) PCI Express Port 2 + 1028 020d Inspiron 530 2944 82801I (ICH9 Family) PCI Express Port 3 + 1028 020d Inspiron 530 2946 82801I (ICH9 Family) PCI Express Port 4 + 1028 020d Inspiron 530 2948 82801I (ICH9 Family) PCI Express Port 5 + 1028 020d Inspiron 530 294a 82801I (ICH9 Family) PCI Express Port 6 + 1028 020d Inspiron 530 294c 82566DC-2 Gigabit Network Connection 17aa 302e 82566DM-2 Gigabit Network Connection 2970 82946GZ/PL/GL Memory Controller Hub @@ -17445,11 +17807,15 @@ 29b7 82Q35 Express Serial KT Controller 1028 0211 OptiPlex 755 29c0 82G33/G31/P35/P31 Express DRAM Controller + 1028 020d Inspiron 530 1043 82b0 P5KPL-VM Motherboard 29c1 82G33/G31/P35/P31 Express PCI Express Root Port + 1028 020d Inspiron 530 29c2 82G33/G31 Express Integrated Graphics Controller + 1028 020d Inspiron 530 1043 82b0 P5KPL-VM Motherboard 29c3 82G33/G31 Express Integrated Graphics Controller + 1028 020d Inspiron 530 1043 82b0 P5KPL-VM Motherboard 29c4 82G33/G31/P35/P31 Express MEI Controller 29c5 82G33/G31/P35/P31 Express MEI Controller @@ -17485,21 +17851,24 @@ 103c 30c1 Compaq 6910p 103c 30d9 Presario C700 104d 9005 Vaio VGN-FZ260E + 104d 902d VAIO VGN-NR120E 17aa 20b1 ThinkPad T61 17aa 20b3 T61 e4bf cc47 CCG-RUMBA 2a01 Mobile PM965/GM965/GL960 PCI Express Root Port - 2a02 Mobile GM965/GL960 Integrated Graphics Controller + 2a02 Mobile GM965/GL960 Integrated Graphics Controller (primary) 1028 01f3 Inspiron 1420 1028 01f9 Latitude D630 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 + 104d 902d VAIO VGN-NR120E 17aa 20b5 T61 e4bf cc47 CCG-RUMBA - 2a03 Mobile GM965/GL960 Integrated Graphics Controller + 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Dell Inspiron 1420 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 + 104d 902d VAIO VGN-NR120E 17aa 20b5 T61 e4bf cc47 CCG-RUMBA 2a04 Mobile PM965/GM965 MEI Controller @@ -19057,6 +19426,7 @@ 1000 0022 2P2S (2 Parallel / 2 16550A Serial Port Adapter) 9865 PCI 9865 Multi-I/O Controller 9901 PCIe 9901 Multi-I/O Controller + 9904 4-Port PCIe Serial Adapter 9990 MCS9990 PCIe to 4‐Port USB 2.0 Host Controller 9902 Stargen Inc. 0001 SG2010 PCI over Starfabric Bridge @@ -19087,9 +19457,11 @@ affe Sirrix AG security technologies 02e1 PCI2E1 2-port ISDN E1 interface 450e PCI4S0EC 4-port ISDN S0 interface dead Sirrix.PCI4S0 4-port ISDN S0 interface +b100 OpenVox Communication Co. Ltd. # Not registered officially b10b Uakron PCI Project b1b3 Shiva Europe Limited +b1d9 ATCOM Technology co., LTD. # Pinnacle should be 11bd, but they got it wrong several times --mj bd11 Pinnacle Systems, Inc. (Wrong ID) bdbd Blackmagic Design @@ -19120,6 +19492,7 @@ d161 Digium, Inc. 0420 Wildcard TE420P quad-span T1/E1/J1 card 3.3V (PCI-Express) 0800 Wildcard TDM800P 8-port analog card 1220 Wildcard TE220 dual-span T1/E1/J1 card 3.3V (PCI-Express) (5th gen) + 1405 Wildcard TE405P/TE407P quad-span T1/E1/J1 card 5.0V (u1) 2400 Wildcard TDM2400P 24-port analog card 3400 Wildcard TC400P transcoder base card 8000 Wildcard TE121 single-span T1/E1/J1 card (PCI-Express) @@ -19151,6 +19524,8 @@ e159 Tiger Jet Network Inc. 0059 0003 128k ISDN-U Adapter 00a7 0001 TELES.S0/PCI 2.x ISDN Adapter 8086 0003 Digium X100P/X101P analogue PSTN FXO interface + b100 0003 OpenVox A400P 4-port analog card + e159 0001 ATCOM AX400P 4-port analog card 0002 Tiger100APC ISDN chipset e4bf EKF Elektronik GmbH e55e Essence Technology, Inc. @@ -19405,6 +19780,7 @@ C 0c Serial bus controller 00 UHCI 10 OHCI 20 EHCI + 30 XHCI 80 Unspecified fe USB Device 04 Fibre Channel diff --git a/packages/sysutils/usbutils/config/usb.ids b/packages/sysutils/usbutils/config/usb.ids index d7790d138d..e71843b232 100644 --- a/packages/sysutils/usbutils/config/usb.ids +++ b/packages/sysutils/usbutils/config/usb.ids @@ -9,8 +9,8 @@ # The latest version can be obtained from # http://www.linux-usb.org/usb.ids # -# Version: 2010.12.24 -# Date: 2010-12-24 20:34:02 +# Version: 2011.03.07 +# Date: 2011-03-07 20:34:03 # # Vendors, devices and interfaces. Please keep sorted. @@ -29,6 +29,7 @@ 5301 GW-US54ZGL 802.11bg 0079 DragonRise Inc. 0006 Generic USB Joystick + 0011 Gamepad 0105 Trust International B.V. 145f NW-3100 802.11b/g 54Mbps Wireless Network Adapter [zd1211] 0145 Unknown @@ -85,9 +86,11 @@ 204e LUFA Dual CDC Demo Application 204f LUFA Generic HID Demo Application 2060 Benito Programmer Project - 2061 LUFA Combined Mas Storage and Keyboard Demo Application + 2061 LUFA Combined Mass Storage and Keyboard Demo Application 2062 LUFA Combined CDC and Mouse Demo Application 2063 LUFA Datalogger Device + 2064 Interfaceless Control-Only LUFA Devices + 2065 LUFA Test and Measurement Demo Application 2103 JTAG ICE mkII 2104 AVR ISP mkII 2105 AVRONE! @@ -103,7 +106,7 @@ 5601 at76c510 Prism-II 802.11b Access Point 5603 Cisco 7920 WiFi IP Phone 6124 at91sam SAMBA bootloader - 7603 at76c503a D-Link DWL-120 802.11b Adapter + 7603 D-Link DWL-120 802.11b Wireless Adapter [Atmel at76c503a] 7604 at76c503a 802.11b Adapter 7605 at76c503a 802.11b Adapter 7606 at76c505 802.11b Adapter @@ -222,6 +225,7 @@ 1016 Jornada 548 / iPAQ HW6515 Pocket PC 1017 LaserJet 1300 1024 Smart Card Keyboard + 1027 Virtual keyboard and mouse 1102 PhotoSmart 240 series 1104 DeskJet 959c 1105 ScanJet 5470c/5490c @@ -362,6 +366,7 @@ 3104 DeskJet 960c 3111 OfficeJet 4100 series 3117 EWS 2605dtn + 311d Atheros AR9285 Malbec Bluetooth Adapter 3202 PhotoSmart 1215 3207 4 GB flash drive 3211 OfficeJet 4105 series @@ -663,7 +668,7 @@ d012 SCS DRAGON 1 d013 SCS DRAGON 1 d6f8 UNI Black BOX - e0d0 Total Phase Aardvark I2C/SPI analyzer + e0d0 Total Phase Aardvark I2C/SPI Host Adapter e521 EVER Sinline XL Series UPS e700 Elster Unicom III Optical Probe e888 Expert ISDN Control USB @@ -919,7 +924,7 @@ 6205 USB 2.0 Card Reader 040e MCCI 040f Echo Speech Corp. -0411 MelCo., Inc. +0411 BUFFALO INC. (formerly MelCo., Inc.) 0001 LUA-TX Ethernet [pegasus] 0005 LUA-TX Ethernet 0006 WLI-USB-L11 Wireless LAN Adapter @@ -965,6 +970,7 @@ 016f Buffalo WLI-UC-G301N Wireless LAN Adapter 017f Sony UWA-BR100 802.11abgn Wireless Adapter [Atheros AR7010] 019e Buffalo WLI-UC-GNP Wireless LAN Adapter + 01a1 MiniStation Metro 01a2 Buffalo WLI-UC-GNM Wireless LAN Adapter 0412 Award Software International 0413 Leadtek Research, Inc. @@ -1123,6 +1129,7 @@ 4061 Live! Cam Notebook Pro [VF0400] 4063 Live! Cam Video IM Pro 4068 Live! Cam Notebook [VF0470] + 406c Live! Cam Sync [VF0520] 4083 Live! Cam Socialize [VF0640] 4100 Nomad Jukebox 2 4101 Nomad Jukebox 3 @@ -1277,6 +1284,7 @@ 04c3 N800 Internet Tablet 04ce E90 Communicator (PC Suite mode) 04cf E90 Communicator (Storage mode) + 04f0 Nokia N95 (PC Suite mode) 04f9 6300 (PC Suite mode) 0508 E65 (PC Suite mode) 0509 E65 (Storage mode) @@ -1504,6 +1512,7 @@ 010b 2500 series 010d 3500-4500 series 010f 6500 series + 0142 X3650 (Printer, Scanner, Copier) 4303 Xerox WorkCentre Pro 412 043e LG Electronics USA, Inc. 3001 AN-WF100 802.11abgn Wireless Adapter [Broadcom BCM4323] @@ -1816,6 +1825,7 @@ 00f9 Wireless Desktop Receiver 3.1 0202 Xbox Controller 0280 XBox Device + 0283 Xbox Communicator 0284 Xbox DVD Playback Kit 0285 Xbox Controller S 0288 Xbox Controller S Hub @@ -1825,6 +1835,7 @@ 028e Xbox360 Controller 028f Xbox360 Wireless Controller 0290 Xbox360 Performance Pipe (PIX) + 0291 Xbox 360 Wireless Receiver for Windows 0292 Xbox360 Wireless Networking Adapter 029c Xbox360 HD-DVD Drive 029d Xbox360 HD-DVD Drive @@ -2225,7 +2236,7 @@ c038 Mouse c03d M-BT96a Pilot Optical Mouse c03e Premium Optical Wheel Mouse (M-BT58) - c03f UltraX Optical Mouse + c03f M-BT85 [UltraX Optical Mouse] c040 Corded Tilt-Wheel Mouse c041 G5 Laser Mouse c042 G3 Laser Mouse @@ -2241,10 +2252,13 @@ c053 Laser Mouse c058 M115 Mouse c05a Optical Mouse M90 + c05d Optical Mouse c061 RX1500 Laser Mouse + c062 LS1 Laser Mouse, corded c068 G500 Laser Mouse c101 UltraX Media Remote - c110 Harmony Remote 885 + c110 Harmony 885 Remote + c11f Harmony 900 Remote c122 Harmony 700 Remote c201 WingMan Extreme Joystick with Throttle c202 WingMan Formula @@ -2274,6 +2288,8 @@ c225 G11/G15 Keyboard / G keys c226 G15 Refresh Keyboard c227 G15 Refresh Keyboard + c22d G510 Gaming Keyboard + c22e G510 Gaming Keyboard onboard audio c281 WingMan Force c283 WingMan Force 3D c285 WingMan Strike Force 3D @@ -2302,10 +2318,12 @@ c30f Logicool HID-Compliant Keyboard (106 key) c311 Y-UF49 [Internet Pro Keyboard] c312 DeLuxe 250 Keyboard + c313 Internet 350 Keyboard c315 Classic New Touch Keyboard c316 HID-Compliant Keyboard c317 Wave Corded Keyboard c318 Illuminated Keyboard + c31a Comfort Wave 450 c31b Compact Keyboard K300 c31c Keyboard K120 for Business c401 TrackMan Marble Wheel @@ -2330,6 +2348,7 @@ c512 LX-700 Cordless Desktop Receiver c513 MX3000 Cordless Desktop Receiver c514 Cordless Mouse + c515 Cordless 2.4 GHz Presenter Presentation remote control c517 LX710 Cordless Desktop Laser c518 MX610 Laser Cordless Mouse c51a MX Revolution/G7 Cordless Mouse @@ -2448,6 +2467,7 @@ 0815 eHome Infrared Receiver 0844 SA2111/02 1GB Flash Audio Player 084a GoGear SA3125 + 084e GoGear SA60xx (mtp) 0888 Hantek DDS-3005 Arbitrary Waveform Generator 1103 Digital Speaker System 1120 Creative Rhomba MP3 player @@ -2645,9 +2665,13 @@ 0489 Foxconn / Hon Hai 0502 SmartMedia Card Reader Firmware Loader 0503 SmartMedia Card Reader + d00c Rollei Compactline (Storage Mode) + d00e Rollei Compactline (Video Mode) e000 T-Com TC 300 e003 Pirelli DP-L10 - e016 Foxconn / Hon Hai + e00f Foxconn T77H114 BCM2070 [Single-Chip Bluetooth 2.1 + EDR Adapter] + e016 Ubee PXU1900 WiMAX Adapter [Beceem BCSM250] + e02c Atheros AR5BBU12 Bluetooth Device 048a S-MOS Systems, Inc. 048c Alps Electric Ireland, Ltd 048d Integrated Technology Express, Inc. @@ -3023,6 +3047,7 @@ 1901 CanoScan 8800F 1904 CanoScan LiDE 100 1905 CanoScan LiDE 200 + 1906 CanoScan 5600F 1907 CanoScan LiDE 700F 1909 CanoScan LiDE 110 190a CanoScan LiDE 210 @@ -3409,6 +3434,7 @@ de61 Barcode Reader de64 Barcode Reader f000 CY30700 Licorice evaluation board + f111 CY8CKIT-002 PSoC MiniProg3 Rev A Program and debug kit f115 PSoC FirstTouch Programmer 04b5 ROHM LSI Systems USA, LLC 04b6 Hint Corp. @@ -3454,10 +3480,11 @@ 0129 Expression 10000XL (ES-10000G) 012a Perfection 4990 Photo scanner 012b GT-2500 (ES-H300) - 012c Perfection V350 (GT-F700) + 012c Perfection V700 Photo (GT-X900) 012d Perfection V10/V100 (GT-S600/F650) 012f Perfection V350 (GT-F700) 0130 Perfection V500 (GT-X770) + 0131 Perfection V300 0202 Receipt Printer M129C 0401 CP 800 Digital Camera 0402 PhotoPC 850z @@ -3529,6 +3556,7 @@ 083f Stylus DX4450 0849 Stylus SX205 084d Stylus SX115 + 0856 Stylus SX515W 04b9 Rainbow Technologies, Inc. 0300 SafeNet USB SuperPro/UltraPro 1000 iKey 1000 Token @@ -3740,6 +3768,7 @@ 1520 USB 2.0 Hub (Avocent KVM) 1521 USB 2.0 Hub 1a62 GW Instek GSP-830 Spectrum Analyzer (HID) + 2533 NFC device (PN533) 8116 Camera 04cd Tatung Co. Of America 04ce ScanLogic Corp. @@ -3779,9 +3808,12 @@ 000b PIC18F2550 (32K Flashable 10 Channel, 10 Bit A/D USB Microcontroller) 0032 PICkit1 0033 PICkit2 + 0036 PICkit Serial Analyzer 00e0 PIC32 Starter Board + 0a04 AGP LIN Serial Analyzer 8000 In-Circuit Debugger 8001 ICD2 in-circuit debugger + 900a PICkit3 c001 PicoLCD 20x4 fbba DiscFerret Magnetic Disc Analyser (bootloader mode) fbbb DiscFerret Magnetic Disc Analyser (active mode) @@ -3820,6 +3852,7 @@ 2497 HDC-TM700 250c Gobi Wireless Modem (QDL mode) 250d Gobi Wireless Modem + 3c04 JT-P100MR-20 [ePassport Reader] 04db Hypertec Pty, Ltd 04dc Huan Hsin Holdings, Ltd 04dd Sharp Corp. @@ -4062,7 +4095,8 @@ 508c YP-S5 5090 YP-S3 (msc) 5091 YP-S3 (mtp) - 5092 YP-U4 + 5092 YP-U4 (msc) + 5093 YP-U4 (mtp) 5095 YP-S2 510f YP-R1 5119 Yepp YP-P3 @@ -4118,11 +4152,12 @@ 6802 Standalone HSPA device 6806 Composite LTE device (Trial) 6807 Composite HSPA device - 681c Galaxy Portal/Spica Android Phone + 681c Galaxy Portal/Spica/S 681d Galaxy Portal/Spica Android Phone 684e Wave (GT-S8500) 6875 GT-B3710 Standalone LTE device (Commercial) 6876 GT-B3710 LTE Modem + 6877 Galaxy S 6888 GT-B3730 Composite LTE device (Commercial) 6889 GT-B3730 Composite LTE device (Commercial) 689a LTE Storage Driver [CMC2xx] @@ -4206,6 +4241,7 @@ b104 CNF7069 Webcam b107 CNF7070 Webcam b14c CNF8050 Webcam + b175 4-Port Hub b1aa Webcam-101 b1b4 Lenovo Integrated Camera b1cf Lenovo Integrated Camera @@ -4213,6 +4249,7 @@ 0210 AM-400 Hama Optical Mouse 0212 Laser Mouse 0214 Lynx M9 Optical Mouse + 0230 3D Optical Mouse 02f4 2.4G Cordless Mouse 04f4 Harting Elektronik, Inc. 04f5 Fujitsu-ICL Systems, Inc. @@ -4402,6 +4439,9 @@ 01e2 DCP-157C 01e3 DCP-353C 01e4 DCP-357C + 01e7 MFC-7340 + 01e9 DCP-7040 + 01ea DCP-7030 01eb MFC-7320 01f4 MFC-5890CN 1000 Printer @@ -4411,6 +4451,7 @@ 2015 QL-500 P-touch label printer 2016 QL-550 P-touch label printer 201a PT-18R P-touch label printer + 2027 QL-560 P-Touch Label Printer 2100 Card Reader Writer 04fa Dallas Semiconductor 2490 DS1490F 2-in-1 Fob, 1-Wire adapter @@ -4522,6 +4563,7 @@ 0240 F5U240 USB 2.0 CF Card Reader 0249 USB 2 Flash Media Device 0257 F5U257 Serial + 0304 FSU304 USB 2.0 - 4 Ports Hub 0409 F5U409 Serial 0551 F6C550-AVR UPS 0802 Nostromo n40 Gamepad @@ -4530,6 +4572,7 @@ 0815 Nostromo n52 HID SpeedPad Mouse Wheel 0826 ErgoFit Wireless Optical Mouse (HID) 0980 HID UPS Battery + 1102 Realtek RTL8188CE-VAU 1T1R 802.11n WLAN Adapter 1202 F5U120-PC Parallel Printer Port 1203 F5U120-PC Serial Port 258a F5U258 Host to Host cable @@ -4556,6 +4599,7 @@ 905c F5D9050 Wireless G+ MIMO Network Adapter v4000 [Ralink RT2573] 935a F6D4050 N150 Enhanced Wireless Network Adapter v1000 [Ralink RT2870] 935b F6D4050 N150 Enhanced Wireless Network Adapter v2000 [Ralink RT3070] + 945a F7D1101 Basic Wireless USB Adapter v1000 [Realtek RTL8188SU] 050e Neon Technology, Inc. 050f KC Technology, Inc. 0001 Hub @@ -4577,6 +4621,7 @@ 0001 USB to PS2 Adaptor v1.09 0002 EZ-9900C Keyboard 0519 Star Micronics Co., Ltd + 0003 TSP100ECO/TSP100II c002 Xlive Bluetooth XBM-100S MP3 Player 051a WYSE Technology a005 Smart Display Version 9973 @@ -5034,7 +5079,7 @@ 0001 Enhanced Microphone 0002 Telex Microphone 0563 Immersion Corp. -0564 Chinon Industries, Inc. +0564 Kodak Digital Product Center, Japan Ltd. (formerly Chinon Industries Inc.) 0565 Peracom Networks, Inc. 0001 Serial Port [etek] 0002 Enet Ethernet [klsi] @@ -5122,6 +5167,7 @@ 00c7 DTU-1931 00d1 Bamboo Pen & Touch (CTH-460-DE) 00d3 Bamboo Fun (CTH-661) + 00db Bamboo Fun (CTH-661SE-NL) 0400 PenPartner 4x5 4850 PenPartner 6x8 056b Decicon, Inc. @@ -5520,6 +5566,7 @@ 6232 Hi-Speed 16-in-1 Flash Card Reader/Writer 6254 USB Hub 6331 SD/MMC/MS Card Reader + 6332 Multi-Function Card Reader 6335 SD/MMC Card Reader 6360 Multimedia Card Reader 6361 Multimedia Card Reader @@ -5553,7 +5600,7 @@ 0590 Omron Corp. 0004 Cable Modem 000b MR56SVS - 0028 HJ-720IT Pedometer + 0028 HJ-720IT Pedometer / Blood Pressure Monitor HEM-7080IT-E 0591 Questra Consulting 0592 Powerware Corp. 0002 UPS (X-Slot) @@ -5609,6 +5656,7 @@ 027a LPHD250-U [Portable Hard Drive Silver Series 250 Go] 0470 Prestige Portable Hard Drive 047a Select Portable Hard Drive + 0579 eGo Portable Hard Drive 1052 DVD+RW External Drive 059c A-Trend Technology Co., Ltd 059d Advanced Input Devices @@ -5748,6 +5796,7 @@ 1223 iPod Classic/Nano 3.Gen (DFU mode) 1224 iPod Nano 3.Gen (DFU mode) 1225 iPod Nano 4.Gen (DFU mode) + 1227 Mobile Device (DFU Mode) 1231 iPod Nano 5.Gen (DFU mode) 1240 iPod Nano 2.Gen (DFU mode) 1242 iPod Nano 3.Gen (WTF mode) @@ -5761,6 +5810,7 @@ 1263 iPod Nano 4.Gen 1265 iPod Nano 5.Gen 1266 iPod Nano 6.Gen + 1281 Apple Mobile Device [Recovery Mode] 1290 iPhone 1291 iPod Touch 1.Gen 1292 iPhone 3G @@ -5774,6 +5824,7 @@ 1300 iPod Shuffle 1301 iPod Shuffle 2.Gen 1302 iPod Shuffle 3.Gen + 1303 iPod Shuffle 4.Gen 1401 Modem 8202 HCF V.90 Data/Fax Modem 8203 Bluetooth HCI @@ -5875,6 +5926,7 @@ 6001 Ten-Keypad 05c8 Cheng Uei Precision Industry Co., Ltd (Foxlink) 0103 FO13FF-65 PC-CAM + 0403 Webcam 05c9 Semtech Corp. 05ca Ricoh Co., Ltd 0101 RDC-5300 Camera @@ -6332,6 +6384,8 @@ 0103 SLP-100N Driver 0104 SLP-200N Driver 0105 SLP-240 Driver + 0501 SLP-440 Driver + 0502 SLP-450 Driver 061a Veridicom International, Inc. 0110 5thSense Fingerprint Sensor 0200 FPS200 Fingerprint Sensor @@ -6629,6 +6683,7 @@ 067b Prolific Technology, Inc. 0000 PL2301 USB-USB Bridge 0001 PL2302 USB-USB Bridge + 0307 Motorola Serial Adapter 04bb PL2303 Serial (IODATA USB-RSAQ2) 0610 Onext EG210U MODEM 0611 AlDiga AL-11U Quad-band GSM/GPRS/EDGE modem @@ -6778,11 +6833,13 @@ 4501 Scientific-Atlanta WebSTAR 2000 series Cable Modem 069b Thomson, Inc. 0704 DCM245 Cable Modem + 0705 THG540K Cable Modem 070c MP3 Player 070d MP3 Player 070e MP3 Player 070f RCA Lyra RD1071 MP3 Player 0731 Lyra M200E256 + 0761 RCA H100A 0778 PEARL USB Device 2220 RCA Kazoo RD1000 MP3 Player 300a RCA Lyra MP3 Player @@ -7510,8 +7567,9 @@ 5406 Cruzer Micro U3 5408 Cruzer Titanium U3 540e Cruzer Contour Flash Drive - 5530 Cruzer U3 4gb SDCZ36 - 5567 Cruszer Blade + 5530 Cruzer + 5567 Cruzer Blade + 5e10 Encrypted 6100 Ultra II SD Plus 2GB 7100 Cruzer Mini 7101 Pen Flash @@ -7789,7 +7847,7 @@ 420a UF200 Ethernet 5301 GW-US54ZGL 802.11bg 6001 802.11bg - a001 Wireless Network Adapter + a001 WUG2200 802.11g Wireless Adapter [Envara WiND512] abc1 DU-E10 Ethernet [pegasus] b000 BWU613 b02a AboCom Bluetooth Device @@ -7872,6 +7930,7 @@ 07ca AVerMedia Technologies, Inc. 0002 AVerTV PVR USB/EZMaker Pro Device 0026 AVerTV + 0337 A867 DVB-T dongle 1228 MPEG-2 Capture Device (M038) 1830 AVerTV Volar Video Capture (H830) 850a AverTV Volar Black HD (A850) @@ -8673,7 +8732,7 @@ 1200 MP3 player 1540 Digitex Container Flash Disk 090b Neurosmith -090c Feiya Technology Corp. +090c Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) 0371 Silicon Motion SM371 Camera 0373 Silicon Motion Camera 037a Silicon Motion Camera @@ -8933,6 +8992,7 @@ 1603 DataTraveler 1GB/2GB Pen Drive 1607 DataTraveler 100 1613 DataTraveler DT101C Flash Drive + 1616 Kingston DataTraveler Locker (4GB) 1625 DataTraveler 101 II 162a DataTraveler 112 4GB Pen Drive 1643 DataTraveler G3 4GB @@ -9021,6 +9081,12 @@ 00c0 COMpact 2104 ISDN PBX 00db COMpact 4410/2206 ISDN ISDN 00f1 COMfort System Telephones +09c0 Genpix Electronics, LLC + 0202 8PSK DVB-S tuner + 0203 Skywalker-1 DVB-S tuner + 0204 Skywalker-CW3K DVB-S tuner + 0205 Skywalker-CW3K DVB-S tuner + 0206 Skywalker-2 DVB-S tuner 09c1 Arris Interactive LLC 1337 TOUCHSTONE DEVICE 09c2 Nisca Corp. @@ -9052,6 +9118,7 @@ 022b Wireless Mouse (Battery Free) 024f RF Receiver and G6-20D Wireless Optical Mouse 032b Wireless Mouse (Battery Free) + 9090 XL-750BK Laser Mouse 09db Measurement Computing Corp. 0075 MiniLab 1008 0076 PMD-1024 @@ -9093,6 +9160,7 @@ 09f9 Bay Associates 09fa Mtek Vision 09fb Altera + 6001 Blaster 09ff Gain Technology Corp. 0a00 Liquid Audio 0a01 ViA, Inc. @@ -9165,6 +9233,7 @@ 0a2c AK-Modul-Bus Computer GmbH 0008 GPIO Ports 0a34 TG3 Electronics, Inc. + 0101 TG82tp 0110 Deck 82-key backlit keyboard 0a35 Radikal Technologies 002a SAC - Software Assigned Controller @@ -9180,6 +9249,7 @@ 0268 ST268 6688 ZT6688 Fast Ethernet Adapter 8515 ADMtek ADM8515 NIC + 9000 DM9000E Fast Ethernet Adapter 9601 DM9601 Fast Ethernet Adapter 0a47 Hirose Electric 0a48 I/O Interconnect @@ -9250,7 +9320,7 @@ 2000 Bluetooth Device 2001 Bluetooth Device 2009 Bluetooth Controller - 200a Bluetooth dongle + 200a BCM2035 Bluetooth dongle 200f Bluetooth Controller 201d Bluetooth Device 201e IBM Integrated Bluetooth IV @@ -9275,6 +9345,7 @@ 2130 2045 Bluetooth 2.0 USB-UHE Device with trace filter 2131 2045 Bluetooth 2.0 Device with trace filter 2145 Bluetooth with Enhanced Data Rate II + 2148 BCM92046DG-CL1ROM Bluetooth 2.1 Adapter 2150 BCM2046 Bluetooth Device 2151 Bluetooth 217f Bluetooth Controller @@ -9295,6 +9366,7 @@ 5802 BCM5880 Secure Applications Processor with fingerprint touch sensor 5803 BCM5880 Secure Applications Processor with secure keyboard 6300 Pirelli Remote NDIS Device + bd13 Arcadyan WN8522B [Broadcom BCM4323] d11b Eminent EM4045 [Broadcom 4320 USB] 0a5d Diatrend Corp. 0a5f Zebra @@ -9310,6 +9382,7 @@ 0a69 Chroma ate, Inc. 0a6b Green House Co., Ltd 0001 Compact Flash R/W with MP3 player + 000f FlashDisk 0a6c Integrated Circuit Systems, Inc. 0a6d UPS Manufacturing 0a6e Benwin @@ -9360,6 +9433,7 @@ 0005 MyPen Light 000d Input Pen 0010 C-Pen 20 + 0a93 PayPen 0a94 Intersense 0aa3 Lava Computer Mfg., Inc. 0aa4 Develco Elektronik @@ -9398,6 +9472,8 @@ 0501 Hub Printer Interface 0502 Hub SNIKey Keyboard 4304 Banking Printer TP07 + 4305 Banking Printer TP07c + 4500 WN Central Special Electronics 0aa8 TriGem Computer, Inc. 0060 TG 11Mbps WLAN Mini Adapter 1001 DreamComboM4100 @@ -9448,6 +9524,7 @@ c002 Visual Communication Camera VGP-VCC1 c302 Vega USB 2.0 Camera c303 Saturn USB 2.0 Camera + c326 Namuga 1.3M Webcam c33f Webcam 0ac9 Micro Solutions, Inc. 0000 Backpack CD-ReWriter @@ -9927,22 +10004,28 @@ 0a9f SmartPhone Sync 0b03 Ozone Mobile Broadband 0b04 Hermes / TyTN / T-Mobile MDA Vario II / O2 Xda Trion + 0b05 P3600 0b06 Athena / Advantage x7500 / Dopod U1000 / T-Mobile AMEO 0b0c Elf / Touch / P3450 / T-Mobile MDA Touch / O2 Xda Nova / Dopod S1 + 0b1f Sony Ericsson XPERIA X1 0b2f Rhodium 0b51 Qtek 8310 mobile phone [Tornado Noble] 0bce Vario MDA 0c01 Dream / ADP1 / G1 / Magic / Tattoo 0c02 Dream / ADP1 / G1 / Magic / Tattoo (Debug) 0c13 Diamond + 0c1f Sony Ericsson XPERIA X1 0c5f Snap - 0c87 Desire (Debug) + 0c87 Desire (debug) + 0c8d EVO 4G (debug) 0c91 Vision 0c94 Vision 0c97 Legend - 0c99 Desire Phone (Debug) + 0c99 Desire (debug) 0c9e Incredible - 0ff9 Desire / Hero + 0ca2 Desire HD (debug mode) + 0ff9 Desire / Desire HD / Hero + 0ffe Desire HD (modem mode) 0fff Android Fastboot Bootloader 0bb5 Murata Manufacturing Co., Ltd 0bb6 Network Alchemy @@ -9958,6 +10041,7 @@ 0bc2 Seagate RSS LLC 2000 Storage Adapter V3 (TPP) 2200 FreeAgent Go FW + 5021 FreeAgent GoFlex 9ZFAD1-500 1.5 TB 0bc3 IPWireless, Inc. 0001 UMTS-TDD (TD-CDMA) modem 0bc4 Microcube Corp. @@ -10274,6 +10358,7 @@ 63e0 Sonix Integrated Webcam 63f1 Integrated Webcam 63f8 Sonix Integrated Webcam + 6409 Webcam 6417 Integrated Webcam 8000 DC31VC 8006 Dual Mode Camera (8006 VGA) @@ -10427,6 +10512,7 @@ 0086 Cinergy Hybrid XE 0097 Cinergy T RC MKII 00a5 Cinergy Hybrid Stick + 00a9 RTL2838 DVB-T COFDM Demodulator [TerraTec Cinergy T Stick Black] 0cd4 Bang Olufsen 0101 BeolinkPC2 0cd5 LabJack Corporation @@ -10483,7 +10569,7 @@ 9170 AR9170 802.11n 9271 AR9271 802.11n b002 Ubiquiti WiFiStation 802.11n [Atheros AR9271] - b003 AR9271 802.11n + b003 Ubiquiti WiFiStationEXT 802.11n [Atheros AR9271] 0cf4 Fomtex Corp. 0cf5 Cellink Co., Ltd 0cf6 Compucable Corp. @@ -10528,6 +10614,8 @@ 0d17 NALTEC, Inc. 0d18 coaXmedia 0d19 Hank Connection Industrial Co., Ltd +0d28 NXP + 0204 LPC1768 0d32 Leo Hui Electric Wire & Cable Co., Ltd 0d33 AirSpeak, Inc. 0d34 Rearden Steel Technologies @@ -10591,6 +10679,7 @@ 0800 Magic Wheel 2021 AM805 Keyboard 2026 TECOM Bluetooth Device + 2050 Mouse a100 Optical Mouse 0d63 Fritz Gegauf AG 0d64 DXG Technology Corp. @@ -10765,6 +10854,7 @@ 0db0 Micro Star International 1020 PC2PC WLAN Card 1967 Bluetooth Dongle + 3801 Motorola Bluetooth 2.1+EDR Device 4011 Medion Flash XL V2.0 Card Reader 4600 802.11b/g Turbo Wireless Adapter 5501 Mass Storage Device @@ -10810,7 +10900,7 @@ 0300 Storage Adapter 0333 Storage Adapter 0707 ZIV Drive -0dc0 Great Notions +0dc0 G7 Solutions (formerly Great Notions) 0dc1 Tamagawa Seiki Co., Ltd 0dc3 Athena Smartcard Solutions, Inc. 0801 ASEDrive III @@ -10971,6 +11061,7 @@ 0800 Cowon D2 (UMS mode) 0801 Cowon D2 (MTP mode) 0910 iAUDIO 9 + 0920 J3 0e22 Symbian Ltd. 0e23 Liou Yuane Enterprise Co., Ltd 0e25 VinChip Systems, Inc. @@ -11323,6 +11414,7 @@ 00af V640i Phone [PTP Camera] 00d4 C902 [MTP] 00d9 C702 Phone + 0112 W995 Walkman Phone 1010 WMC Modem 10af V640i Phone [PictBridge] 10d4 C902 Phone [PictBridge] @@ -11341,7 +11433,7 @@ d025 520 WMC Data Modem d028 W800i d038 W850i Phone - d039 K800i Phone + d039 K800i (phone mode) d041 K510i Phone d042 W810i Phone d043 V630i Phone @@ -11354,6 +11446,7 @@ d0d4 C902 Phone [Modem] d0e1 MD400 Mobile Broadband Modem d12e Xperia X10 + e039 K800i (msc mode) e042 W810i Phone e043 V630i Phone [Mass Storage] e075 K850i @@ -11376,6 +11469,8 @@ 0fe5 Greenconn (U.S.A.), Inc. 0fe6 Kontron (Industrial Computer Source / ICS Advent) 8101 DM9601 Fast Ethernet Adapter + 811e Parallel Adapter + 9700 DM9601 Fast Ethernet Adapter 0fe9 DVICO 4020 TViX M-6500 db00 FusionHDTV DVB-T (MT352+LgZ201) (uninitialized) @@ -11401,8 +11496,9 @@ 6000 KU330/KU990/VX4400/VX6000 6005 T5100 6018 GM360/GD510/GW520/KP501 - 618e Ally (debug mode) - 618f Ally + 618e Ally/Optimus One/Vortex (debug mode) + 618f Ally/Optimus One + 61c6 Vortex (msc) 6800 CDMA Modem 7000 LG LDP-7024D(LD)USB a400 Renoir (KC910) @@ -11540,7 +11636,9 @@ 0901 MyBook External HDD 0910 MyBook Essential External HDD 1001 External Hard Disk [Elements] + 1021 Elements 2TB 1104 MyBook Mirror Edition External HDD + 1123 My Book 3.0 1059 Giesecke & Devrient GmbH 000b StarSign Bio Token 3.0 105c Hong Ji Electric Wire & Cable (Dongguan) Co., Ltd @@ -11736,6 +11834,7 @@ 10f0 Nexio Co., Ltd 2002 iNexio Touchscreen controller 10f1 Importek + 1a08 Internal Webcam 1a1e Laptop Integrated Webcam 1.3M 10f5 Turtle Beach 0200 Audio Advantage Roadie @@ -11787,7 +11886,7 @@ 1130 Tenx Technology, Inc. 0002 iBuddy 6604 MCE IR-Receiver - 660c USB Foot Pedal [Generic] + 660c Foot Pedal/Thermometer 6806 Keychain photo frame f211 TP6911 Audio Headset 1131 Integrated System Solution Corp. @@ -11948,6 +12047,8 @@ 3403 Muzio JM250 Audio Player 1223 SKYCABLE ENTERPRISE. CO., LTD. 1230 Chipidea-Microelectronica, S.A. +1233 Denver Electronics + 5677 FUSB200 mp3 player 1234 Unknown ed02 Emotiv EPOC Developer Headset Wireless Dongle 1235 Novation EMS @@ -12043,10 +12144,13 @@ 1003 E220 HSDPA Modem / E230/E270 HSDPA/HSUPA Modem 1009 U120 1010 ETS2252+ CDMA Fixed Wireless Terminal - 1038 Ideos + 1037 Ideos + 1038 Ideos (debug mode) + 1406 E1750 140b EC1260 Wireless Data Modem HSD USB Card 1446 E1552 (HSPA modem) 1501 Pulse + 380b WiMAX USB modem(s) 12d2 LINE TECH INDUSTRIAL CO., LTD. 12d6 EMS Dr. Thomas Wuensche 0444 CPC-USB/ARM7 @@ -12205,6 +12309,8 @@ 002f AE1000 v1 802.11n [Ralink RT2870] 0031 AM10 v1 802.11n [Ralink RT2870] 13b1 WUSB200: Wireless-G Business Network Adapter with Rangebooster +13b2 Alesis + 0030 Multimix 8 13b3 Nippon Dics Co., Ltd. 13ba Unknown 0017 PS/2 Keyboard+Mouse Adapter @@ -12251,12 +12357,14 @@ 3243 DTV-DVB UDXTTM6010 - A/D Driver(Without HID) 3244 DTV-DVB UDTT 7047Z-USB 2.0 DVB-T Driver 3247 802.11 n/g/b Wireless LAN Adapter + 3249 Internal Bluetooth 3262 802.11 n/g/b Wireless LAN USB Adapter 3273 802.11 n/g/b Wireless LAN USB Mini-Card 3274 DVB-T Dongle [RTL2832U] 3282 DVB-T + GPS Minicard [RTL2832U] 3284 Wireless LAN USB Mini-Card 3306 WLAN [RTL8191S] + 5070 Webcam 5111 Integrated Webcam 5115 Integrated Webcam 5116 Integrated Webcam @@ -12282,7 +12390,7 @@ 1d00 DataTraveler 2.0 1GB/4GB Flash Drive / Patriot Xporter 4GB Flash Drive 1f00 DataTraveler 2.0 4GB Flash Drive / Patriot Xporter 32GB (PEF32GUSB) Flash Drive 2240 microSD card reader - 3100 2 GB USB stick + 3100 2/4 GB stick 1400 Axxion Group Corp. 1402 Bowe Bell & Howell 1403 Sitronix @@ -12372,6 +12480,8 @@ 1000 Biometric Touchchip/Touchstrip Fingerprint Sensor 2016 Biometric Touchchip/Touchstrip Fingerprint Sensor 147f Hama GmbH & Co., KG +1482 Vaillant + 1005 VRD PC-Interface 1484 Elsa AG [hex] 1746 Ecomo 19H99 Monitor 7616 Elsa Hub @@ -12435,6 +12545,7 @@ 6700 Card Reader 6900 Card Reader 8123 SD MMC Reader + 8125 SD MMC Reader 14d8 JAMER INDUSTRIES CO., LTD. 14dd Raritan Computer, Inc. 14e1 Dialogue Technology Corp. @@ -12476,7 +12587,7 @@ 1529 UBIQUAM Co., Ltd. 3100 CDMA 1xRTT USB Modem (U-100/105/200/300/520) 152d JMicron Technology Corp. / JMicron USA Technology Corp. - 2329 transcend storejet 25P + 2329 JM20329 SATA Bridge 2335 ATA/ATAPI Bridge 2336 Hard Disk Drive 2337 ATA/ATAPI Bridge @@ -12519,9 +12630,9 @@ 300a TEW-429UB 802.11bg 300b TEW-429UB 802.11bg 300d TEW-429UB C1 802.11bg - 3204 ALL0298 v2 802.11bg - 3205 AR5523 - 3206 AR5523 (no firmware) + 3204 Allnet ALL0298 v2 802.11bg + 3205 Allnet ALL0283 [AR5523] + 3206 Allnet ALL0283 [AR5523](no firmware) 1582 Fiberline 6003 WL-430U 802.11bg 1587 SMA Technologie AG @@ -12777,7 +12888,8 @@ 1677 China Huada Integrated Circuit Design (Group) Co., Ltd. (CIDC Group) 0103 Token 1679 Total Phase - 2001 Beagle USB 12 Protocol Analyzer + 2001 Beagle Protocol Analyzer + 2002 Cheetah SPI Host Adapter 1680 Golden Bridge Electech Inc. a332 DVB-T Dongle [RTL2832U] 1681 Prevo Technologies, Inc. @@ -12789,6 +12901,7 @@ 1686 ZOOM Corporation 0045 H4 Digital Recorder 1687 Kingmax Digital Inc. + 5289 FlashDisk 6211 FlashDisk 1688 Saab AB 168c Atheros Communications @@ -12853,6 +12966,8 @@ 03f1 free for internal lab use 1009 05dc shared ID for use with libusb 05dd BlackcatUSB2 + 05e1 CDC-ACM class devices (modems) + 05e4 MIDI class devices 076b OpenPCD 13.56MHz RFID Reader 076c OpenPICC 13.56MHz RFID Simulator (native) 08ac OpenBeacon USB stick @@ -12860,6 +12975,11 @@ 08cb Alpermann+Velte Studio Clock 08cc Alpermann+Velte SAM7S MT Boot Loader 08cd Alpermann+Velte SAM7X MT Boot Loader + 27da Mouse + 27db Keyboard + 27dc Joystick + 27dd CDC-ACM class devices (modems) + 27de MIDI class devices 16ca Wireless Cables, Inc. 1502 Bluetooth Dongle 16cc silex technology, Inc. @@ -12867,6 +12987,7 @@ 054b ReelBox OLED Display (external) 16d3 Frontline Test Equipment, Inc. 16d5 AnyDATA Corporation + 6202 CDMA/UMTS/GPRS modem 6501 CDMA 2000 1xRTT/EV-DO Modem 6502 CDMA/UMTS/GPRS modem 16d6 JABLOCOM s.r.o. @@ -12888,6 +13009,8 @@ 0001 CC 000b VM 16df King Billion Electronics Co., Ltd. +16f0 GN ReSound A/S + 0003 Airlink Wireless Programming Interface 16f5 Futurelogic Inc. 1706 BlueView Technologies, Inc. 1707 ARTIMI @@ -13027,6 +13150,7 @@ 17ef Lenovo 1003 Integrated Smart Card Reader 1004 Integrated Webcam + 100a ThinkPad Mini Dock Plus Series 3 3815 ChipsBnk 2GB USB Stick 4802 Lenovo Vc0323+MI1310_SOC Camera 4807 UVC Camera @@ -13106,9 +13230,11 @@ 18cd Ecamm cafe Pico iMage 18d1 Google Inc. - 4e11 Nexus One Phone - 4e12 Nexus One Phone (Debug) - 4e13 Nexus One Phone (USB Tether) + 4e11 Nexus One + 4e12 Nexus One (debug) + 4e13 Nexus One (tether) + 4e21 Nexus S + 4e22 Nexus S (debug) 18d5 Starline International Group Limited 18d9 Kaba 01a0 B-Net 91 07 @@ -13118,6 +13244,7 @@ 7102 Multi Card Reader (Internal) 9101 All-in-1 Card Reader 9102 Multi Card Reader + 9512 Webcam 18e8 Qcom 6196 RT2573 6229 RT2573 @@ -13555,6 +13682,7 @@ 1101 DK DVB-T Dongle 1102 DK mini DVB-T Dongle 1103 DK 5217 DVB-T Dongle + 6105 Video grabber 8202 DK DVBC/T DONGLE 1d1f Diostech Co., Ltd. 1d20 SAMTACK INC. @@ -13609,7 +13737,10 @@ 6511 MP705-8G MP3 player 6512 MP705-4G 1e7d ROCCAT + 2c24 Pyra Mouse (wired) 2ced Kone Mouse + 2d51 Kone+ Mouse + 30d4 Arvo Keyboard 1ebb NuCORE Technology, Inc. 1eda AirTies Wireless Networks 2310 802.11n USB Wireless LAN Card @@ -13626,6 +13757,7 @@ 0002 Multi-touch HID Controller 1fbd Delphin Technology AG 0001 Expert Key - Data aquisition system +1fc9 NXP Semiconductors 1fe7 Vertex Wireless Co., Ltd. 1000 VW100 series CDMA EV-DO Rev.A modem 2001 D-Link Corp. @@ -13633,12 +13765,12 @@ 0201 DHN-120 10Mb Home Phoneline Adapter 1a00 10/100 Ethernet 200c 10/100 Ethernet - 3200 DWL-120 802.11b (Atmel RFMD503A) [usbvnetr] + 3200 DWL-120 802.11b Wireless Adapter(rev.E1) [Atmel at76c503a] 3301 DWA-130 802.11n Wireless N Adapter(rev.C1) [Realtek RTL8192U] 3500 Elitegroup Computer Systems WLAN card WL-162 3700 DWL-122 802.11b [Intersil Prism 3] 3701 DWL-G120 Spinnaker 802.11g [Intersil ISL3886] - 3702 DWL-120 rev F + 3702 DWL-120 802.11b Wireless Adapter(rev.F) [Intersil ISL3871] 3703 AirPlus G DWL-G122 Wireless Adapter [Intersil ISL3886] 3704 AirPlus G DWL-G122 Wireless Adapter(rev.A2) [Intersil ISL3887] 3705 AirPlus G DWL-G120 Wireless Adapter(rev.C) [Intersil ISL3887] @@ -13653,7 +13785,7 @@ 3a81 predator Bootloader Download 3a82 AirPremier AG DWL-AG132 Wireless Adapter 3a83 predator Bootloader Download - 3b00 AirPlus DWL-120+ Wireless Adapter + 3b00 AirPlus DWL-120+ Wireless Adapter [Texas Instruments ACX100USB] 3b01 WLAN Boot Device 3c00 AirPlus G DWL-G122 Wireless Adapter(rev.B1) [Ralink RT2500USB] 3c01 AirPlus AG DWL-AG122 Wireless Adapter @@ -13755,6 +13887,8 @@ 20b1 XMOS Ltd 10ad XUSB Loader f7d1 XTAG2 - JTAG Adapter +20b3 Hanvon + 0a18 10.1 Touch screen overlay 20b7 Qi Hardware 0713 Milkymist JTAG/serial 1540 ben-wpan, AT86RF230-based @@ -14296,6 +14430,9 @@ 0284 802.11a/b/g/n USB Wireless LAN Card 0290 ZW-N290 802.11n [Realtek RTL8192SU] 5257 Metronic 495257 wifi 802.11ng +6000 Beholder International Ltd. + dec0 TV Wander + dec1 TV Voyage 601a Ingenic Semiconductor Ltd. 4740 XBurst Jz4740 boot mode 6189 Sitecom @@ -14336,6 +14473,7 @@ 7711 EW-7711UTn nLite Wireless Adapter [Ralink RT2870] 7717 EW-7717UN 802.11n Wireless Adapter [Ralink RT2870] 7718 EW-7718UN 802.11n Wireless Adapter [Ralink RT2870] + 7722 EW-7722UTn 802.11n Wireless Adapter [Ralink RT307x] 7811 EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] 8086 Intel Corp. 0001 AnyPoint (TM) Home Network 1.6 Mbps Wireless Adapter @@ -14436,7 +14574,7 @@ a168 AnMo Electronics Corporation a600 Asix e110 OK1ZIA Davac 4.x a727 3Com - 6893 AR5523 + 6893 3CRUSB20075 OfficeConnect Wireless 108Mbps 11g Adapter [Atheros AR5523] 6895 AR5523 6897 AR5523 abcd Unknown @@ -14474,6 +14612,7 @@ eb1a eMPIA Technology, Inc. 2776 Combined audio and video input device 2800 Terratec Cinergy 200 2801 GrabBeeX+ Video Encoder + 2863 Video Grabber 2870 Pinnacle PCTV Stick 2881 EM2881 Video Controller 50a3 Gadmei UTV380 TV Box diff --git a/packages/toolchain/lang/nasm/meta b/packages/toolchain/lang/nasm/meta index 9b128ecbd0..fa3674ac59 100644 --- a/packages/toolchain/lang/nasm/meta +++ b/packages/toolchain/lang/nasm/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="nasm" -PKG_VERSION="2.10rc4" +PKG_VERSION="2.09.08" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/x11/toolkits/pango/meta b/packages/x11/toolkits/pango/meta index 93b9331f2f..a1f490947e 100644 --- a/packages/x11/toolkits/pango/meta +++ b/packages/x11/toolkits/pango/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="pango" -PKG_VERSION="1.28.3" +PKG_VERSION="1.28.4" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/x11/xserver/xorg-server/meta b/packages/x11/xserver/xorg-server/meta index fa54c30ce7..cceeefa34c 100644 --- a/packages/x11/xserver/xorg-server/meta +++ b/packages/x11/xserver/xorg-server/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xorg-server" -PKG_VERSION="1.10.0.901" +PKG_VERSION="1.10.0.902" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-05_pkg_config.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-05_pkg_config.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-05_pkg_config.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-05_pkg_config.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-10_cache_xkbcomp_output_for_fast_start_up.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-10_cache_xkbcomp_output_for_fast_start_up.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-10_cache_xkbcomp_output_for_fast_start_up.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-10_cache_xkbcomp_output_for_fast_start_up.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-11_use_sloppy_heuristic_first_for_initial_mode.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-11_use_sloppy_heuristic_first_for_initial_mode.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-11_use_sloppy_heuristic_first_for_initial_mode.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-11_use_sloppy_heuristic_first_for_initial_mode.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-13_nouveau.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-13_nouveau.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-13_nouveau.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-13_nouveau.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-14_nvidia_fglrx_autodetect.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-14_nvidia_fglrx_autodetect.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-14_nvidia_fglrx_autodetect.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-14_nvidia_fglrx_autodetect.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-20_extra_modelines_fromxorg.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-20_extra_modelines_fromxorg.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-20_extra_modelines_fromxorg.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-20_extra_modelines_fromxorg.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-21_x11_nonroot-vesa.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-21_x11_nonroot-vesa.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-21_x11_nonroot-vesa.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-21_x11_nonroot-vesa.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-22_do_not_zap_xserver.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-22_do_not_zap_xserver.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-22_do_not_zap_xserver.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-22_do_not_zap_xserver.patch diff --git a/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-25_less_acpi_brokenness.patch b/packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-25_less_acpi_brokenness.patch similarity index 100% rename from packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.901-25_less_acpi_brokenness.patch rename to packages/x11/xserver/xorg-server/patches/xorg-server-1.10.0.902-25_less_acpi_brokenness.patch