Skip to content

Commit c801a89

Browse files
committed
snapshot of project "ncurses", label v1_9_2d
1 parent 04d5ac8 commit c801a89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2604
-2034
lines changed

ANNOUNCE

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
ANNOUNCING NCURSES @VERSION@
2+
ANNOUNCING NCURSES 1.9.2D
33

4-
New in @VERSION@:
4+
New in 1.9.2d:
55

66
* Integrated panels support.
77
* ncurses output can now be redirected.
88

9-
Overview of ncurses @VERSION@
9+
Overview of ncurses 1.9.2d
1010

1111
The ncurses library is a freeware emulation of System V Release 4.0
1212
curses. It uses terminfo format, supports color and multiple

CHANGES

+5-1
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ traceon(); in your code and link with -ldcurses.
406406
*) include <errno.h> in write_entry.c (most "braindead" includes declare errno
407407
in that file).
408408

409-
### ncurses 1.9 -> 1.9.2
409+
### ncurses 1.9.1 -> 1.9.2
410410

411411
*) use 'autoconf' to implement 'configure' script.
412+
413+
### ncurses 1.9.2c -> 1.9.2d
414+
415+
*)

INSTALL

+12-18
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,22 @@ INSTALLATION PROCEDURE:
6565
'make install.progs' installs tic, infocmp, clear and tput.
6666
'make install.libs' installs the headers and libraries.
6767
'make install.man' installs the man pages.
68-
'make install.data' installs the terminfo database. You can skip this
68+
69+
5. Type 'make install.data' installs the terminfo database. You can skip this
6970
part if your system already has such a database.
7071

71-
CAVEAT EMPTOR: 'install.data' or 'install' will NUKE any existing
72-
terminfo database. If you have any custom or unusual entries SAVE them
73-
before you install ncurses.
74-
75-
'make install' will do all the above.
76-
77-
5. The c++ directory has C++ classes that are built on top of ncurses and
72+
##############################################################################
73+
# CAVEAT EMPTOR: 'install.data' will NUKE any existing #
74+
# terminfo database. If you have any custom or unusual entries SAVE them #
75+
# before you install ncurses. I have a file called terminfo.custom for #
76+
# this purpose. Don't forget to run tic on the file once your done. #
77+
##############################################################################
78+
79+
7. The c++ directory has C++ classes that are built on top of ncurses and
7880
panels. You need to have panels installed before you can compile and
7981
run the demo.
8082

81-
5a. If you're running under Linux, you must either (a) tell Linux that the
83+
8. If you're running under Linux, you must either (a) tell Linux that the
8284
console terminal type is `linux', or (b) make a link to or copy of the
8385
linux entry in the appropriate place under your terminfo directory,
8486
named `console'.
@@ -92,15 +94,7 @@ INSTALLATION PROCEDURE:
9294
directory. Note: this will go away next time you do `make install.data'
9395
and you'll have to redo it.
9496

95-
TESTING:
96-
97-
6. Change to the subdirectory test and type 'make all'.
98-
99-
This should compile all of the test programs in the release. Once again,
100-
there should be no errors. You'll get lots of warnings, just ignore them.
101-
Read the file test/README for details on what to expect.
102-
103-
7. Run ncurses and several other test programs.
97+
9. Run ncurses and several other test programs.
10498

10599
The ncurses program is designed specifically to test the ncurses library.
106100
You can use it to verify that the screen highlights work correctly, that

MANIFEST

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
./README
77
./aclocal.m4
88
./announce.html
9+
./announce.html.in
910
./c++/Makefile.in
1011
./c++/README-first
1112
./c++/cursesp.cc
@@ -15,6 +16,7 @@
1516
./c++/demo.cc
1617
./configure
1718
./configure.in
19+
./dist.mk
1820
./include/config_h.in
1921
./install-sh
2022
./man/Makefile.in
@@ -65,8 +67,11 @@
6567
./man/terminfo.5
6668
./man/tic.1m
6769
./man/tput.1
70+
./misc/ncurses-intro.doc
6871
./misc/ncurses-intro.html
6972
./misc/terminfo.src
73+
./mk-1st.awk
74+
./mk-2nd.awk
7075
./mkinstalldirs
7176
./ncurses.lsm
7277
./src/Caps
@@ -151,6 +156,7 @@
151156
./src/lib_unctrl.c
152157
./src/lib_vidattr.c
153158
./src/lib_window.c
159+
./src/modules
154160
./src/object.h
155161
./src/panel.c
156162
./src/panel.h
@@ -171,19 +177,16 @@
171177
./src/write_entry.c
172178
./test/Makefile.in
173179
./test/README
174-
./test/battle.c
175180
./test/blue.c
176181
./test/bs.6
177182
./test/bs.c
178-
./test/copy.c
179183
./test/firework.c
180184
./test/gdc.6
181185
./test/gdc.c
182186
./test/hanoi.c
183187
./test/knight.c
184188
./test/ncurses.c
185189
./test/newdemo.c
186-
./test/over.c
187190
./test/rain.c
188191
./test/tclock.c
189192
./test/testcurs.c

Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Master Makefile for ncurses library.
22

33
SHELL = /bin/sh
4-
VERSION = 1.9.2c
4+
VERSION = 1.9.2d
55

66
@SET_MAKE@
77

aclocal.m4

+125-7
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ main()
4444
])
4545
rm -f nc_test.out
4646
AC_MSG_RESULT($nc_cv_sizeof_bool)
47-
test $nc_cv_sizeof_bool != unknown && AC_DEFINE_UNQUOTED(CXX_TYPEOF_BOOL,$nc_cv_sizeof_bool)
47+
test $nc_cv_sizeof_bool != unknown && AC_DEFINE_UNQUOTED(CXX_TYPE_OF_BOOL,$nc_cv_sizeof_bool)
4848
])
4949
dnl ---------------------------------------------------------------------------
5050
dnl
@@ -62,6 +62,71 @@ AC_MSG_RESULT($nc_cv_extern_errno)
6262
test $nc_cv_extern_errno = yes && AC_DEFINE(HAVE_EXTERN_ERRNO)
6363
])
6464
dnl ---------------------------------------------------------------------------
65+
dnl Construct the list of include-options according to whether we're building
66+
dnl in the source directory or using '--srcdir=DIR' option. The applications
67+
dnl (in 'test' and 'c++') have a different include-path from the library units
68+
dnl because the latter are compiled within subdirectories of 'src'.
69+
define([NC_INCLUDE_DIRS],
70+
[
71+
APP_INCLUDES="-I. -I../src -I../include"
72+
LIB_INCLUDES="-I.. -I../../include"
73+
if test "$srcdir" != "."; then
74+
APP_INCLUDES="$APP_INCLUDES -I\$(srcdir)/../src -I\$(srcdir)/../include"
75+
LIB_INCLUDES="$LIB_INCLUDES -I\$(srcdir) -I\$(srcdir)/../include"
76+
fi
77+
APP_INCLUDES="$APP_INCLUDES -I\$(includedir)"
78+
AC_SUBST(APP_INCLUDES)
79+
AC_SUBST(LIB_INCLUDES)
80+
])dnl
81+
dnl ---------------------------------------------------------------------------
82+
dnl Append definitions and rules for the given models to the src/Makefile
83+
define([NC_LIB_RULES],
84+
[
85+
for nc_item in $NC_LIST_MODELS
86+
do
87+
echo 'Appending rules for '$nc_item' library'
88+
NC_UPPERCASE($nc_item,NC_ITEM)
89+
NC_LIB_SUFFIX($nc_item,nc_suffix)
90+
$AWK -f $srcdir/mk-1st.awk -v MODEL=$NC_ITEM model=$nc_item suffix=$nc_suffix $srcdir/src/modules >>src/Makefile
91+
$AWK -f $srcdir/mk-2nd.awk -v MODEL=$NC_ITEM model=$nc_item srcdir=$srcdir echo=$WITH_ECHO $srcdir/src/modules >>src/Makefile
92+
test ! -d src/$nc_item && mkdir src/$nc_item
93+
done
94+
])dnl
95+
dnl ---------------------------------------------------------------------------
96+
dnl Compute the library-suffix from the given model name
97+
define([NC_LIB_SUFFIX],
98+
[
99+
case $1 in
100+
normal) $2='.a' ;;
101+
debug) $2='_g.a' ;;
102+
profile) $2='_p.a' ;;
103+
shared) $2='.so' ;;
104+
esac
105+
])dnl
106+
dnl ---------------------------------------------------------------------------
107+
dnl Compute the string to append to -library from the given model name
108+
define([NC_LIB_TYPE],
109+
[
110+
case $1 in
111+
normal) $2='' ;;
112+
debug) $2='_g' ;;
113+
profile) $2='_p' ;;
114+
shared) $2='' ;;
115+
esac
116+
])dnl
117+
dnl ---------------------------------------------------------------------------
118+
dnl Construct the list of library names to generate.
119+
define([NC_LIBS_TO_MAKE],
120+
[
121+
LIBS_TO_MAKE=""
122+
for nc_item in $nc_list_models
123+
do
124+
NC_LIB_SUFFIX($nc_item,nc_suffix)
125+
LIBS_TO_MAKE="$LIBS_TO_MAKE libncurses$nc_suffix libpanel$nc_suffix"
126+
done
127+
AC_SUBST(LIBS_TO_MAKE)dnl
128+
])dnl
129+
dnl ---------------------------------------------------------------------------
65130
dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make'
66131
dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
67132
dnl (GNU 'make' does both :-)
@@ -76,7 +141,7 @@ AC_CACHE_VAL(nc_cv_makeflags,[
76141
all :
77142
echo '.$nc_option'
78143
EOF
79-
set nc_result=`${MAKE-make} -f ncurses.tmp`
144+
set nc_result=`${MAKE-make} -f ncurses.tmp 2>/dev/null`
80145
if test "$nc_result" != "."
81146
then
82147
nc_cv_makeflags=$nc_option
@@ -90,6 +155,49 @@ AC_SUBST(nc_cv_makeflags)
90155
]
91156
)
92157
dnl ---------------------------------------------------------------------------
158+
dnl Attempt to determine the appropriate CC/LD options for creating a shared
159+
dnl library.
160+
define([NC_SHARED_OPTS],
161+
[
162+
nc_systype="`(uname -s || hostname) 2>/dev/null | sed 1q`"
163+
if test -z "$nc_systype"; then nc_systype=unknown;fi
164+
case $nc_systype in
165+
Linux)
166+
CC_SHARED_OPTS='-fPIC'
167+
MK_SHARED_LIB='gcc -o $[@] -shared -Wl,-soname,$[@],-stats'
168+
;;
169+
SunOS)
170+
CC_SHARED_OPTS='-pic'
171+
MK_SHARED_LIB='ld --assert-pure-text -o $[@]'
172+
;;
173+
*)
174+
CC_SHARED_OPTS='unknown'
175+
MK_SHARED_LIB='echo unknown'
176+
;;
177+
esac
178+
AC_SUBST(CC_SHARED_OPTS)
179+
AC_SUBST(MK_SHARED_LIB)
180+
])dnl
181+
dnl ---------------------------------------------------------------------------
182+
dnl Check for declarion of sys_errlist in one of stdio.h and errno.h.
183+
dnl Declaration of sys_errlist on BSD4.4 interferes with our declaration.
184+
dnl Reported by Keith Bostic.
185+
define([NC_SYS_ERRLIST],
186+
[
187+
AC_MSG_CHECKING([declaration of sys_errlist])
188+
AC_CACHE_VAL(nc_cv_dcl_sys_errlist,[
189+
AC_TRY_COMPILE([
190+
#include <stdio.h>
191+
#include <sys/types.h>
192+
#include <errno.h> ],
193+
[ char *c = (char *) *sys_errlist; ],
194+
[nc_cv_dcl_sys_errlist=yes],
195+
[nc_cv_dcl_sys_errlist=no])
196+
])
197+
AC_MSG_RESULT($nc_cv_dcl_sys_errlist)
198+
test $nc_cv_dcl_sys_errlist = yes && AC_DEFINE(HAVE_EXTERN_SYS_ERRLIST)
199+
])dnl
200+
dnl ---------------------------------------------------------------------------
93201
dnl On some systems ioctl(fd, TIOCGWINSZ, &size) will always return {0,0} until
94202
dnl ioctl(fd, TIOCSWINSZ, &size) is called to explicitly set the size of the
95203
dnl screen.
@@ -111,11 +219,14 @@ AC_CACHE_VAL(nc_cv_use_tiocgwinsz,[
111219
int main()
112220
{
113221
static struct winsize size;
114-
if (ioctl(0, TIOCGWINSZ, &size) < 0
115-
|| size.ws_row == 0
116-
|| size.ws_col == 0)
117-
exit(1);
118-
exit(0);
222+
int fd;
223+
for (fd = 0; fd <= 2; fd++) { /* try in/out/err in case redirected */
224+
if (ioctl(0, TIOCGWINSZ, &size) == 0
225+
&& size.ws_row > 0
226+
&& size.ws_col > 0)
227+
exit(0);
228+
}
229+
exit(1);
119230
}
120231
],
121232
[nc_cv_use_tiocgwinsz=yes],
@@ -141,3 +252,10 @@ AC_MSG_RESULT($nc_cv_type_sigaction)
141252
test $nc_cv_type_sigaction = yes && AC_DEFINE(HAVE_TYPE_SIGACTION)
142253
])
143254
dnl ---------------------------------------------------------------------------
255+
dnl Make an uppercase version of a given name
256+
define([NC_UPPERCASE],
257+
[
258+
changequote(,)dnl
259+
$2=`echo $1 |tr '[a-z]' '[A-Z]'`
260+
changequote([,])dnl
261+
])dnl

announce.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
<link rev=made href=mailto:esr@snark.thyrsus.com>
66
</HEAD>
77
<BODY>
8-
<TITLE>Announcing ncurses @VERSION@</TITLE>
9-
<H1>Announcing ncurses @VERSION@</H1>
8+
<TITLE>Announcing ncurses 1.9.2d</TITLE>
9+
<H1>Announcing ncurses 1.9.2d</H1>
1010

11-
<H2>New in @VERSION@:</H2>
11+
<H2>New in 1.9.2d:</H2>
1212
<UL>
1313
<LI> Integrated panels support.
1414
<LI> ncurses output can now be redirected.
1515
</UL>
1616

17-
<H2>Overview of ncurses @VERSION@</H2>
17+
<H2>Overview of ncurses 1.9.2d</H2>
1818

1919
The ncurses library is a freeware emulation of System V Release 4.0 curses.
2020
It uses terminfo format, supports color and multiple highlights and forms

0 commit comments

Comments
 (0)