./mk-0th.awk
./mk-1st.awk
./mk-2nd.awk
-./mk-dlls.sh.in
./mk-hdr.awk
./ncurses/Makefile.in
./ncurses/README
-# $Id: Makefile.in,v 1.31 2011/08/07 15:36:52 tom Exp $
+# $Id: Makefile.in,v 1.32 2012/01/07 20:10:29 juergen Exp $
##############################################################################
-# Copyright (c) 1998-2008,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"), #
fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \
echo '** Will overwrite non-ncurses curses.h'
-dlls: libs
- $(SHELL) $(srcdir)/mk-dlls.sh
-
distclean \
realclean ::
- -rm -f mk-dlls.sh mingw_arch
+
# Put the common rules here so that we can easily construct the list of
# directories to visit.
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1838 2012/01/01 00:18:49 tom Exp $
+-- $Id: NEWS,v 1.1839 2012/01/07 20:48:35 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.
+20120107
+ + various improvments for MinGW (patch by Juergen Pfeifer):
+ + modify stat() calls to ignore the st_size member
+ + drop mk-dlls.sh script.
+ + change recommended regular expression library.
+ + modify rain.c to allow for threaded configuraton.
+ + modify tset.c to allow for case when size-change logic is not used.
+
20111231
+ modify toe's report when -a and -s options are combined, to add
a column showing which entries belong to a given database.
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: README.MinGW,v 1.5 2011/02/26 16:57:17 tom Exp $
+-- $Id: README.MinGW,v 1.7 2012/01/07 21:26:05 tom Exp $
-- Author: Juergen Pfeifer
-------------------------------------------------------------------------------
To build ncurses for native Windows, you need the MinGW toolchain. The
original MinGW toolchain from the above site is only for 32-Bit Windows. As
Windows Server - and also regular workstations - are moving to 64-Bit, it
-seems to be reasonable to have a toolchain that supports both architectures.
+seems to be reasonable to have a toolchain that supports both architectures.
I recommend to use the TDM gcc toolchain which you can find at
http://tdm-gcc.tdragon.net/download. Go to the download section and select
the bundle installer for tdm64 (MinGW-w64). This installs a multilib version
versions. It also comes with a working pthread implementation.
The latest config and build scripts we use for MinGW have only been tested
-for the gcc-4.4 compiler toolchain (or better).
+for the gcc-4.6.1 compiler toolchain (or better).
Using MinGW is a pragmatic decision, it's the easiest way to port this
heavily UNIX based sourcebase to native Windows. The goal is of course
common traditional development environments on Windows, mainly with
Microsoft Visual Studio.
-If you start a bash from the MSYS environment, please make sure that the
-Microsoft Development tools are in your PATH right after the MinGW
-tools. The LIB.EXE tool is the only one needed. You need this only if
-you want to build DLLs that work with native Windows programs. If you
-don't have any Microsoft Development tools on your machine, consider
-at least to get the free "Visual C++ 2010 Express Edition".
-It contains the LIB.EXE tool. You may also use this compiler to test
-writing native Windows programs using the ncurses DLLs without using
-MinGW then for writing apps.
-
It is necessary to unset the TERM environment variable, to activate the
Windows console-driver.
Please also make sure that MSYS links to the correct directory containing
your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
-CMD.EXE command shell go to the MSYS root directory (most probably
+CMD.EXE command shell go to the MSYS root directory (most probably
C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw
that points to the MinGW toolchain directory. If not, delete the mingw
directory and use the mklink command (or the linkd.exe utility on older
This code requires WindowsNT 5.1 or better, which means on the client
Windows XP or better, on the server Windows Server 2003 or better.
-In order to build ncurses for the planned interop layer with .NET, we
-recommend to use these options with configure
+I recommend using libtool to build ncurses on MinGW, because libtool
+knows exactly how to build dll's on Windows for use with MinGW.
+
+To build a modern but still small footprint ncurses that provides
+hooks for interop, I recommend using these options:
+ --with-libtool
--disable-home-terminfo
- --enable-reentrant
+ --enable-database
+ --disable-termcap
--enable-sp-funcs
--enable-term-driver
--enable-interop
- --with-pthread (if using TDM toolchain as recommended)
-This is the configuration commandline as I'm using it at the moment:
+This is the configuration commandline as I'm using it at the moment (assuming environment variable MINGW_ROOT to hold the root directory name of your MinGW build):
./configure \
- --prefix=/mingw \
- --without-cxx-binding \
+ --prefix=$MINGW_ROOT \
+ --with-cxx \
--without-ada \
--enable-warnings \
--enable-assertions \
- --enable-reentrant \
- --with-debug \
- --with-normal \
--disable-home-terminfo \
+ --enable-database \
--enable-sp-funcs \
--enable-term-driver \
--enable-interop \
- --with-pthread
+ --disable-termcap \
+ --with-progs \
+ --with-libtool \
+ --enable-pc-files \
+ --mandir=$MINGW_ROOT/share/man
-If you are on a 64-Bit Windows system and want to build a 32-Bit version
-of ncurses, you may use this commandline for configuration (when using
-the TDM toolchain):
+Please note that it is also necessary to set this environment variable:
-CC="gcc -m32" LD="ld -m32" ./configure \
- --prefix=/mingw \
- --without-cxx-binding \
- --without-ada \
- --enable-warnings \
- --enable-assertions \
- --enable-reentrant \
- --with-debug \
- --with-normal \
- --disable-home-terminfo \
- --enable-sp-funcs \
- --enable-term-driver \
- --enable-interop \
- --with-pthread
+export PATH_SEPARATOR=";"
-All the options above are - like the whole Windows support -
-experimental.
+in order to parse the terminfo paths correctly. Terminfo paths should
+always be separated by a seeeemicolon,even when running under MSYS.
-In order to build the DLLs, after your regular make you must call
+To support regular expressions properly, ncurses under MinGW should be
+linked against the gnurx regex library, which must be built separately
+under MinGW. See
- make dlls
+ ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libgnurx-src-2.5.zip
+
+All the options above are - like the whole Windows support -
+experimental.
A lot is still TODO, e.g.:
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: aclocal.m4,v 1.599 2012/01/01 01:55:05 tom Exp $
+dnl $Id: aclocal.m4,v 1.600 2012/01/07 20:08:24 juergen Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
cf_regex_libs="regex re"
case $host_os in #(vi
mingw*)
- cf_regex_libs="regex.dll $cf_regex_libs"
+ cf_regex_libs="gnurx $cf_regex_libs"
;;
esac
#! /bin/sh
-# From configure.in Revision: 1.534 .
+# From configure.in Revision: 1.535 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20101002.
#
cf_regex_libs="regex re"
case $host_os in #(vi
mingw*)
- cf_regex_libs="regex.dll $cf_regex_libs"
+ cf_regex_libs="gnurx $cf_regex_libs"
;;
esac
ADAHTML_DIR=../../doc/html/ada
SUB_SCRIPTS=
-case $cf_cv_system_name in #(vi
-*mingw32*) #(vi
- SUB_SCRIPTS="mk-dlls.sh"
- ;;
-esac
ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
ac_config_commands="$ac_config_commands default"
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:20494: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:20489: 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:20670: error: ambiguous option: $1
+ { { echo "$as_me:20665: 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:20689: error: unrecognized option: $1
+ -*) { { echo "$as_me:20684: 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;}
"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:20797: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:20792: 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:21211: creating $ac_file" >&5
+ { echo "$as_me:21206: 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:21229: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:21224: 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:21242: error: cannot find input file: $f" >&5
+ { { echo "$as_me:21237: 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:21308: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:21303: 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:21319: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:21314: 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:21332: error: cannot find input file: $f" >&5
+ { { echo "$as_me:21327: 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:21390: $ac_file is unchanged" >&5
+ { echo "$as_me:21385: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.534 2011/12/17 21:12:37 tom Exp $
+dnl $Id: configure.in,v 1.535 2012/01/07 20:08:24 juergen 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.534 $)
+AC_REVISION($Revision: 1.535 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
AC_SUBST(ADAHTML_DIR)
SUB_SCRIPTS=
-case $cf_cv_system_name in #(vi
-*mingw32*) #(vi
- SUB_SCRIPTS="mk-dlls.sh"
- ;;
-esac
AC_OUTPUT( \
include/MKterm.h.awk \
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.850 2011/12/31 14:27:53 tom Exp $
+# $Id: dist.mk,v 1.851 2012/01/07 13:48:28 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 = 9
-NCURSES_PATCH = 20111231
+NCURSES_PATCH = 20120107
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
#include <hashed_db.h>
#endif
-MODULE_ID("$Id: db_iterator.c,v 1.25 2011/12/17 21:30:20 tom Exp $")
+MODULE_ID("$Id: db_iterator.c,v 1.26 2012/01/07 20:09:36 juergen Exp $")
#define HaveTicDirectory _nc_globals.have_tic_directory
#define KeepTicDirectory _nc_globals.keep_tic_directory
if (*text != '\0') {
char *last = my_blob + strlen(my_blob);
if (last != my_blob)
- *last++ = ':';
+ *last++ = NCURSES_PATHSEP;
strcpy(last, text);
}
}
check_existence(const char *name, struct stat *sb)
{
bool result = FALSE;
-
- if (stat(name, sb) == 0 && sb->st_size) {
+ if (stat(name, sb) == 0
+#ifndef __MINGW32__
+ && sb->st_size
+#endif
+ ) {
result = TRUE;
}
#if USE_HASHED_DB
else if (strlen(name) < PATH_MAX - sizeof(DBM_SUFFIX)) {
char temp[PATH_MAX];
sprintf(temp, "%s%s", name, DBM_SUFFIX);
- if (stat(temp, sb) == 0 && sb->st_size) {
+ if (stat(temp, sb) == 0
+#ifndef __MINGW32__
+ && sb->st_size
+#endif
+ ) {
result = TRUE;
}
}
#endif
-
return result;
}
values[dbdHome] = _nc_home_terminfo();
(void) cache_getenv("HOME", dbdHome);
values[dbdEnvList] = cache_getenv("TERMINFO_DIRS", dbdEnvList);
+
#endif
#if USE_TERMCAP
values[dbdEnvOnce2] = cache_getenv("TERMCAP", dbdEnvOnce2);
*/
blobsize = 2;
for (j = 0; my_blob[j] != '\0'; ++j) {
- if (my_blob[j] == ':')
+ if (my_blob[j] == NCURSES_PATHSEP)
++blobsize;
}
my_list = typeCalloc(char *, blobsize);
k = 0;
my_list[k++] = my_blob;
for (j = 0; my_blob[j] != '\0'; ++j) {
- if (my_blob[j] == ':') {
+ if (my_blob[j] == NCURSES_PATHSEP) {
my_blob[j] = '\0';
my_list[k++] = &my_blob[j + 1];
}
#include <dump_entry.h>
#include <transform.h>
-MODULE_ID("$Id: tset.c,v 1.85 2011/12/10 15:41:34 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.86 2012/01/07 20:23:20 juergen Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
{
if (set_tab && clear_all_tabs) {
int c;
+ int lim =
+#if HAVE_SIZECHANGE
+ tcolumns
+#else
+ columns
+#endif
+ ;
(void) putc('\r', stderr); /* Force to left margin. */
tputs(clear_all_tabs, 0, outc);
- for (c = 8; c < tcolumns; c += 8) {
+ for (c = 8; c < lim; c += 8) {
/* Get to the right column. In BSD tset, this
* used to try a bunch of half-clever things
* with cup and hpa, for an average saving of
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: README,v 1.44 2011/02/26 00:09:25 tom Exp $
+-- $Id: README,v 1.45 2012/01/07 21:19:28 tom Exp $
-------------------------------------------------------------------------------
The programs in this directory are designed to test your newest toy :-)
addnwstr test: ncurses test_addwstr
addstr test: blue bs cardfile gdc hanoi lrtest ncurses savescreen test_addstr
addwstr test: ncurses test_addwstr
-assume_default_colors test: ncurses
+assume_default_colors test: background ncurses
assume_default_colors_sp -
attr_get test: ncurses
attr_off test: ncurses
ungetmouse -
ungetmouse_sp -
untouchwin lib: form
-use_default_colors test: filter firework gdc hanoi knight ncurses rain tclock worm xmas
+use_default_colors test: background filter firework gdc hanoi knight ncurses rain tclock worm xmas
use_default_colors_sp -
use_env progs: tput
use_env_sp -
/****************************************************************************
- * 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 *
* authorization. *
****************************************************************************/
/*
- * $Id: rain.c,v 1.38 2010/11/13 20:11:46 tom Exp $
+ * $Id: rain.c,v 1.39 2012/01/07 20:10:29 juergen Exp $
*/
#include <test.priv.h>
* Find myself in the list of threads so we can count the number of loops.
*/
for (mystats = 0; mystats < MAX_THREADS; ++mystats) {
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__WINPTHREADS_VERSION)
if (drop_threads[mystats].myself.p == pthread_self().p)
#else
if (drop_threads[mystats].myself == pthread_self())
/*
* The description of pthread_create() is misleading, since it implies that
* threads will exit cleanly after their function returns.
- *
+ *
* Since they do not (and the number of threads is limited by system
* resources), make a limited number of threads, and signal any that are
* waiting when we want a thread past that limit.