+ eliminate part of the direct use of WINDOW data from Ada95 interface.
+ fix substitutions for termlib filename to make configure option
--enable-reentrant work with --with-termlib.
+ change a constructor for NCursesWindow to allow compiling with
NCURSES_OPAQUE defined, since we cannot pass a reference to
an opaque pointer.
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
------------------------------------------------------------------------------
-- Author: Juergen Pfeifer, 1996
-- Version Control:
--- $Revision: 1.34 $
--- $Date: 2006/06/25 14:30:22 $
+-- $Revision: 1.35 $
+-- $Date: 2007/03/24 23:03:56 $
-- Binding Version 01.00
------------------------------------------------------------------------------
with System;
Number_Of_Lines : out Line_Count;
Number_Of_Columns : out Column_Count)
is
- -- Please note: in ncurses they are one off.
- -- This might be different in other implementations of curses
- Y : constant C_Int := C_Int (W_Get_Short (Win, Offset_maxy))
+ function GetMaxY (W : Window) return C_Int;
+ pragma Import (C, GetMaxY, "getmaxy");
+
+ 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 := C_Int (W_Get_Short (Win, Offset_maxx))
+ X : constant C_Int := GetMaxX (Win)
+ C_Int (Offset_XY);
begin
Number_Of_Lines := Line_Count (Y);
Top_Left_Line : out Line_Position;
Top_Left_Column : out Column_Position)
is
- Y : constant C_Short := W_Get_Short (Win, Offset_begy);
- X : constant C_Short := W_Get_Short (Win, Offset_begx);
+ function GetBegY (W : Window) return C_Int;
+ pragma Import (C, GetBegY, "getbegy");
+
+ 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));
begin
Top_Left_Line := Line_Position (Y);
Top_Left_Column := Column_Position (X);
Line : out Line_Position;
Column : out Column_Position)
is
- Y : constant C_Short := W_Get_Short (Win, Offset_cury);
- X : constant C_Short := W_Get_Short (Win, Offset_curx);
+ function GetCurY (W : Window) return C_Int;
+ pragma Import (C, GetCurY, "getcury");
+
+ 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));
begin
Line := Line_Position (Y);
Column := Column_Position (X);
Top_Left_Column : out Column_Position;
Is_Not_A_Subwindow : out Boolean)
is
- Y : constant C_Int := W_Get_Int (Win, Offset_pary);
- X : constant C_Int := W_Get_Int (Win, Offset_parx);
+ function GetParY (W : Window) return C_Int;
+ pragma Import (C, GetParY, "getpary");
+
+ function GetParX (W : Window) return C_Int;
+ pragma Import (C, GetParX, "getparx");
+
+ Y : constant C_Int := GetParY (Win);
+ X : constant C_Int := GetParX (Win);
begin
if Y = -1 then
Top_Left_Line := Line_Position'Last;
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1104 2007/03/17 20:43:25 tom Exp $
+-- $Id: NEWS,v 1.1106 2007/03/24 22:58:37 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20070324
+ + eliminate part of the direct use of WINDOW data from Ada95 interface.
+ + fix substitutions for termlib filename to make configure option
+ --enable-reentrant work with --with-termlib.
+ + change a constructor for NCursesWindow to allow compiling with
+ NCURSES_OPAQUE defined, since we cannot pass a reference to
+ an opaque pointer.
+
20070317
+ ignore --with-chtype=unsigned since unsigned is always added to
the type in curses.h; do the same for --with-mmask-t.
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: aclocal.m4,v 1.426 2007/03/17 20:18:53 tom Exp $
+dnl $Id: aclocal.m4,v 1.427 2007/03/24 22:29:27 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_RULES version: 49 updated: 2007/02/24 17:12:45
+dnl CF_LIB_RULES version: 50 updated: 2007/03/24 18:26:59
dnl ------------
dnl Append definitions and rules for the given models to the subdirectory
dnl Makefiles, and the recursion rule for the top-level Makefile. If the
prefix=$cf_prefix \
suffix=$cf_suffix \
subset=$cf_subset \
- TermlibRoot=$TINFO_ARG_SUFFIX \
+ TermlibRoot=$TINFO_NAME \
+ TermlibSuffix=$TINFO_SUFFIX \
ShlibVer=$cf_cv_shlib_version \
ShlibVerInfix=$cf_cv_shlib_version_infix \
ReLink=${cf_cv_do_relink-no} \
#include "internal.h"
#include "cursesw.h"
-MODULE_ID("$Id: cursesw.cc,v 1.47 2007/03/03 21:49:24 tom Exp $")
+MODULE_ID("$Id: cursesw.cc,v 1.48 2007/03/24 19:00:58 tom Exp $")
#define COLORS_NEED_INITIALIZATION -1
#define COLORS_NOT_INITIALIZED 0
set_keyboard();
}
-NCursesWindow::NCursesWindow(WINDOW* &window)
+NCursesWindow::NCursesWindow(WINDOW* window)
: w(0), alloced(FALSE), par(0), subwins(0), sib(0)
{
constructing();
- w = window;
+ // We used to use a reference on the "window" parameter, but we cannot do
+ // that with an opaque pointer (see NCURSES_OPAQUE). If the parameter was
+ // "::stdscr", that is first set via the "constructing() call, and is null
+ // up to that point. So we allow a null pointer here as meaning the "same"
+ // as "::stdscr".
+ w = window ? window : ::stdscr;
set_keyboard();
}
#ifndef NCURSES_CURSESW_H_incl
#define NCURSES_CURSESW_H_incl 1
-// $Id: cursesw.h,v 1.42 2007/03/03 21:49:18 tom Exp $
+// $Id: cursesw.h,v 1.43 2007/03/24 18:33:50 tom Exp $
#include <stdarg.h>
#include <stdio.h>
NCursesWindow();
public:
- NCursesWindow(WINDOW* &window); // useful only for stdscr
+ NCursesWindow(WINDOW* window); // useful only for stdscr
NCursesWindow(int nlines, // number of lines
int ncols, // number of columns
#! /bin/sh
-# From configure.in Revision: 1.408 .
+# From configure.in Revision: 1.410 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20061216.
#
if test "$with_termlib" != yes ; then
TINFO_NAME=$with_termlib
+ TINFO_SUFFIX="`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_LIB_SUFFIX="${with_termlib}"
else
+ TINFO_SUFFIX=${DFT_DEP_SUFFIX}
TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
fi
else
# the next lines are needed for linking libtic over libncurses
+ TINFO_NAME=${LIB_NAME}
+ TINFO_SUFFIX=${DFT_DEP_SUFFIX}
TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
# needed for Ada95
TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
-echo "$as_me:15157: checking where we will install curses.h" >&5
+echo "$as_me:15161: 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:15162: result: $includedir" >&5
+echo "$as_me:15166: result: $includedir" >&5
echo "${ECHO_T}$includedir" >&6
### Resolve a conflict between normal and wide-curses by forcing applications
if test "$with_overwrite" != no ; then
if test "$NCURSES_LIBUTF8" = 1 ; then
NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
- { echo "$as_me:15170: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
+ { echo "$as_me:15174: 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
### Construct the list of subdirectories for which we'll customize makefiles
### with the appropriate compile-rules.
-echo "$as_me:15186: checking for src modules" >&5
+echo "$as_me:15190: checking for src modules" >&5
echo $ECHO_N "checking for src modules... $ECHO_C" >&6
# dependencies and linker-arguments for test-programs
fi
fi
done
-echo "$as_me:15249: result: $cf_cv_src_modules" >&5
+echo "$as_me:15253: result: $cf_cv_src_modules" >&5
echo "${ECHO_T}$cf_cv_src_modules" >&6
TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:15495: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:15499: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:15671: error: ambiguous option: $1
+ { { echo "$as_me:15675: 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;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:15690: error: unrecognized option: $1
+ -*) { { echo "$as_me:15694: 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;}
TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
TINFO_NAME="$TINFO_NAME"
+TINFO_SUFFIX="$TINFO_SUFFIX"
TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
TICS_NAME="$TICS_NAME"
"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:15785: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:15790: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:16162: creating $ac_file" >&5
+ { echo "$as_me:16167: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:16180: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:16185: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16193: error: cannot find input file: $f" >&5
+ { { echo "$as_me:16198: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:16259: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:16264: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:16270: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:16275: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16283: error: cannot find input file: $f" >&5
+ { { echo "$as_me:16288: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
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:16341: $ac_file is unchanged" >&5
+ { echo "$as_me:16346: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
prefix=$cf_prefix \
suffix=$cf_suffix \
subset=$cf_subset \
- TermlibRoot=$TINFO_ARG_SUFFIX \
+ TermlibRoot=$TINFO_NAME \
+ TermlibSuffix=$TINFO_SUFFIX \
ShlibVer=$cf_cv_shlib_version \
ShlibVerInfix=$cf_cv_shlib_version_infix \
ReLink=${cf_cv_do_relink-no} \
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.408 2007/03/17 20:47:14 tom Exp $
+dnl $Id: configure.in,v 1.410 2007/03/24 23:12:57 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.408 $)
+AC_REVISION($Revision: 1.410 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
if test "$with_termlib" != yes ; then
TINFO_NAME=$with_termlib
+ TINFO_SUFFIX="`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_LIB_SUFFIX="${with_termlib}"
else
+ TINFO_SUFFIX=${DFT_DEP_SUFFIX}
TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
fi
else
# the next lines are needed for linking libtic over libncurses
+ TINFO_NAME=${LIB_NAME}
+ TINFO_SUFFIX=${DFT_DEP_SUFFIX}
TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
TINFO_NAME="$TINFO_NAME"
+TINFO_SUFFIX="$TINFO_SUFFIX"
TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
TICS_NAME="$TICS_NAME"
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.584 2007/03/12 21:50:47 tom Exp $
+# $Id: dist.mk,v 1.585 2007/03/24 15:38:05 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 6
-NCURSES_PATCH = 20070317
+NCURSES_PATCH = 20070324
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-# $Id: mk-1st.awk,v 1.77 2007/03/11 13:37:22 tom Exp $
+# $Id: mk-1st.awk,v 1.78 2007/03/24 22:10:55 tom Exp $
##############################################################################
# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
# #
# ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable)
# ShlibVerInfix ("yes" or "no", determines location of version #)
# TermlibRoot ("tinfo" or other root for libterm.so)
+# TermlibSuffix (".so" or other suffix for libterm.so)
# ReLink ("yes", or "no", flag to rebuild shared libs on install)
# DoLinks ("yes", "reverse" or "no", flag to add symbolic links)
# rmSoLocs ("yes" or "no", flag to add extra clean target)
printf ")\n"
}
}
+# termlib may be named explicitly via "--with-termlib=XXX", which overrides
+# any suffix. Temporarily override "suffix" to account for this.
+function termlib_end_of() {
+ termlib_save_suffix = suffix;
+ suffix = TermlibSuffix;
+ termlib_temp_result = end_name_of(TermlibRoot);
+ suffix = termlib_save_suffix;
+ return termlib_temp_result;
+}
function shlib_build(directory) {
dst_libs = sprintf("%s/%s", directory, end_name);
printf "%s : \\\n", dst_libs
save_suffix = suffix
sub(/^[^.]\./,".",suffix)
if (directory != "../lib") {
- printf "\t\t%s/%s \\\n", "../lib", end_name_of(TermlibRoot);
+ printf "\t\t%s/%s \\\n", "../lib", termlib_end_of();
}
- printf "\t\t%s/%s \\\n", directory, end_name_of(TermlibRoot);
+ printf "\t\t%s/%s \\\n", directory, termlib_end_of();
suffix = save_suffix
}
printf "\t\t$(%s_OBJS)\n", OBJS
printf "# ShlibVer: %s\n", ShlibVer
printf "# ShlibVerInfix: %s\n", ShlibVerInfix
printf "# TermlibRoot: %s\n", TermlibRoot
+ printf "# TermlibSuffix: %s\n", TermlibSuffix
printf "# ReLink: %s\n", ReLink
printf "# DoLinks: %s\n", DoLinks
printf "# rmSoLocs: %s\n", rmSoLocs