mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2025-03-07 16:16:53 +08:00
ncurses 5.6 - patch 20080614
+ modify test/ditto.c to illustrate multi-threaded use_screen(). + change CC_SHARED_OPTS from -KPIC to -xcode=pic32 for Solaris. + add "-shared" option to MK_SHARED_LIB for gcc on Solaris (report by Poor Yorick).
This commit is contained in:
parent
1078c0231b
commit
4e6cadb948
8
NEWS
8
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.1243 2008/06/07 15:48:17 tom Exp $
|
||||
-- $Id: NEWS,v 1.1245 2008/06/14 23:08:10 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -45,6 +45,12 @@ See the AUTHORS file for the corresponding full names.
|
||||
Changes through 1.9.9e did not credit all contributions;
|
||||
it is not possible to add this information.
|
||||
|
||||
20080614
|
||||
+ modify test/ditto.c to illustrate multi-threaded use_screen().
|
||||
+ change CC_SHARED_OPTS from -KPIC to -xcode=pic32 for Solaris.
|
||||
+ add "-shared" option to MK_SHARED_LIB for gcc on Solaris (report
|
||||
by Poor Yorick).
|
||||
|
||||
20080607
|
||||
+ finish changes to wgetch(), making it switch as needed to the
|
||||
window's actual screen when calling wrefresh() and wgetnstr(). That
|
||||
|
15
aclocal.m4
vendored
15
aclocal.m4
vendored
@ -28,7 +28,7 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey 1995-on
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.447 2008/04/12 23:49:55 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.448 2008/06/14 19:12:45 tom Exp $
|
||||
dnl Macros used in NCURSES auto-configuration script.
|
||||
dnl
|
||||
dnl These macros are maintained separately from NCURSES. The copyright on
|
||||
@ -3922,7 +3922,7 @@ AC_MSG_RESULT(no)
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_SHARED_OPTS version: 47 updated: 2008/03/23 14:48:54
|
||||
dnl CF_SHARED_OPTS version: 48 updated: 2008/06/14 15:08:17
|
||||
dnl --------------
|
||||
dnl --------------
|
||||
dnl Attempt to determine the appropriate CC/LD options for creating a shared
|
||||
@ -4158,9 +4158,7 @@ CF_EOF
|
||||
;;
|
||||
solaris2*)
|
||||
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
|
||||
if test "$GCC" != yes; then
|
||||
CC_SHARED_OPTS='-KPIC'
|
||||
fi
|
||||
# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
|
||||
if test "$DFT_LWR_MODEL" = "shared" ; then
|
||||
LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
|
||||
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
|
||||
@ -4170,7 +4168,12 @@ CF_EOF
|
||||
EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
|
||||
fi
|
||||
CF_SHARED_SONAME
|
||||
MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $[@]'
|
||||
if test "$GCC" != yes; then
|
||||
CC_SHARED_OPTS='-xcode=pic32'
|
||||
MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $[@]'
|
||||
else
|
||||
MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_shared_soname' -o $[@]'
|
||||
fi
|
||||
;;
|
||||
sysv5uw7*|unix_sv*)
|
||||
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
|
||||
|
4
dist.mk
4
dist.mk
@ -25,7 +25,7 @@
|
||||
# use or other dealings in this Software without prior written #
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
# $Id: dist.mk,v 1.645 2008/06/07 13:41:24 tom Exp $
|
||||
# $Id: dist.mk,v 1.646 2008/06/14 18:11:41 tom Exp $
|
||||
# Makefile for creating ncurses distributions.
|
||||
#
|
||||
# This only needs to be used directly as a makefile by developers, but
|
||||
@ -37,7 +37,7 @@ SHELL = /bin/sh
|
||||
# These define the major/minor/patch versions of ncurses.
|
||||
NCURSES_MAJOR = 5
|
||||
NCURSES_MINOR = 6
|
||||
NCURSES_PATCH = 20080607
|
||||
NCURSES_PATCH = 20080614
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
21
test/ditto.c
21
test/ditto.c
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey (1998-on)
|
||||
*
|
||||
* $Id: ditto.c,v 1.28 2008/06/07 22:35:58 tom Exp $
|
||||
* $Id: ditto.c,v 1.30 2008/06/14 23:00:26 tom Exp $
|
||||
*
|
||||
* The program illustrates how to set up multiple screens from a single
|
||||
* program.
|
||||
@ -44,7 +44,6 @@
|
||||
#include <test.priv.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#undef USE_PTHREADS
|
||||
|
||||
#ifdef USE_PTHREADS
|
||||
#include <pthread.h>
|
||||
@ -319,12 +318,27 @@ handle_screen(void *arg)
|
||||
DDATA ddata;
|
||||
int ch;
|
||||
|
||||
memset(&ddata, 0, sizeof(ddata));
|
||||
ddata.ditto = (DITTO *) arg;
|
||||
ddata.source = ddata.ditto->which1;
|
||||
ddata.ditto -= ddata.source; /* -> base of array */
|
||||
|
||||
for (;;) {
|
||||
ch = read_screen(ddata.ditto->screen, &ddata);
|
||||
if (ch == CTRL('D'))
|
||||
if (ch == CTRL('D')) {
|
||||
int later = (ddata.source ? ddata.source : -1);
|
||||
int j;
|
||||
|
||||
for (j = ddata.ditto->length - 1; j > 0; --j) {
|
||||
if (j != later) {
|
||||
pthread_cancel(ddata.ditto[j].thread);
|
||||
}
|
||||
}
|
||||
if (later > 0) {
|
||||
pthread_cancel(ddata.ditto[later].thread);
|
||||
}
|
||||
break;
|
||||
}
|
||||
show_ditto(ddata.ditto, ddata.ditto->length, &ddata);
|
||||
}
|
||||
return NULL;
|
||||
@ -359,6 +373,7 @@ main(int argc, char *argv[])
|
||||
for (j = 0; j < argc; j++) {
|
||||
(void) pthread_create(&(data[j].thread), NULL, handle_screen, &data[j]);
|
||||
}
|
||||
pthread_join(data[1].thread, NULL);
|
||||
#else
|
||||
/*
|
||||
* Loop, reading characters from any of the inputs and writing to all
|
||||
|
Loading…
Reference in New Issue
Block a user