]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20130713
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 14 Jul 2013 01:08:41 +0000 (01:08 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 14 Jul 2013 01:08:41 +0000 (01:08 +0000)
+ improve manpages for initscr and setupterm.
+ minor compiler-warning fixes

NEWS
dist.mk
man/curs_initscr.3x
man/curs_terminfo.3x
ncurses/tinfo/comp_parse.c
ncurses/tinfo/read_entry.c
ncurses/tinfo/read_termcap.c
package/debian/changelog
package/ncurses.spec

diff --git a/NEWS b/NEWS
index cf1da26ae49c9731e127f552be6a1bbbb3eb59c3..6154a3ca75269428e9f27840af28939b52a73801 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2078 2013/07/06 20:51:48 tom Exp $
+-- $Id: NEWS,v 1.2079 2013/07/13 23:21:51 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,10 @@ 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.
 
+20130713
+       + improve manpages for initscr and setupterm.
+       + minor compiler-warning fixes
+
 20130706
        + add fallback defs for <inttypes.h> and <stdint.h> (cf: 20120225).
        + add check for size of wchar_t, use that to suppress a chunk of
diff --git a/dist.mk b/dist.mk
index 55d1f8a42ea5335a1fe8775ea24e98ee0b6123b7..05b88c7cc1b5d08ad1508e69d7ef3a7f36dda7f0 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.935 2013/07/06 15:25:26 tom Exp $
+# $Id: dist.mk,v 1.936 2013/07/13 17:11:30 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 = 9
-NCURSES_PATCH = 20130706
+NCURSES_PATCH = 20130713
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 83a01eafb4e96fc86867d9b2e9a9c8b2589825dc..9733458017af721e61a9cea01269e63ab0cd3b63 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc.              *
+.\" Copyright (c) 1998-2010,2012 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,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_initscr.3x,v 1.17 2010/12/04 18:36:58 tom Exp $
+.\" $Id: curs_initscr.3x,v 1.18 2013/07/13 22:45:52 tom Exp $
 .TH curs_initscr 3X ""
 .na
 .hy 0
@@ -121,10 +121,19 @@ Old versions of curses, e.g., BSD 4.4, may have returned a null pointer
 from \fBinitscr\fR when an error is detected, rather than exiting.
 It is safe but redundant to check the return value of \fBinitscr\fR
 in XSI Curses.
+.PP
+If the TERM variable is missing or empty, \fBinitscr\fP uses the
+value ``unknown'',
+which normally corresponds to a terminal entry with the \fIgeneric\fP
+(\fIgn\fP) capability.
+Generic entries are detected by \fBsetupterm\fP(3X) and cannot be
+used for full-screen operation.
+Other implementations may handle a missing/empty TERM variable differently.
 .SH SEE ALSO
 \fBcurses\fR(3X),
 \fBcurs_kernel\fR(3X),
 \fBcurs_refresh\fR(3X),
 \fBcurs_slk\fR(3X),
+\fBcurs_terminfo\fR(3X),
 \fBcurs_util\fR(3X),
 \fBcurs_variables\fR(3X).
index a9c6231be2f2c81e30c5da3e39fd83967fd58f45..12d4b0fe044d17ac80d8ab3ebc120e4c35a0b96c 100644 (file)
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_terminfo.3x,v 1.37 2013/01/12 18:11:40 tom Exp $
+.\" $Id: curs_terminfo.3x,v 1.38 2013/07/13 23:12:13 tom Exp $
 .TH curs_terminfo 3X ""
+.de bP
+.IP \(bu 4
+..
 .ds n 5
 .na
 .hy 0
@@ -150,11 +153,17 @@ If \fBERR\fR is returned, examine \fIerrret\fR:
 .TP 5
 .B 1
 means that the terminal is hardcopy, cannot be used for curses applications.
+.IP
+\fBsetupterm\fP determines if the entry is a hardcopy type by
+checking the \fIhc\fP (\fIhardcopy\fP) capability.
 .TP 5
 .B 0
 means that the terminal could not be found,
 or that it is a generic type,
 having too little information for curses applications to run.
+.IP
+\fBsetupterm\fP determines if the entry is a generic type by
+checking the \fIgn\fP (\fIgeneric\fP) capability.
 .TP 5
 .B \-1
 means that the \fBterminfo\fR database could not be found.
@@ -275,7 +284,7 @@ Routines that return pointers always return \fBNULL\fR on error.
 .PP
 X/Open defines no error conditions.
 In this implementation
-.RS
+.RS 5
 .TP 5
 \fBdel_curterm\fP
 returns an error
@@ -313,6 +322,31 @@ be considered non-portable.  All other functions are as described by X/Open.
 \fBsetupterm\fP copies the terminal name to the array \fBttytype\fP.
 This is not part of X/Open Curses, but is assumed by some applications.
 .PP
+If configured to use the terminal-driver,
+e.g., for the MinGW port,
+.bP
+\fBsetupterm\fP interprets a missing/empty TERM variable as the
+special value ``unknown''.
+.bP
+\fBsetupterm\fP allows explicit use of the
+the windows console driver by checking if $TERM is set to
+``#win32con'' or an abbreviation of that string.
+.PP
+Older versions of \fBncurses\fP assumed that the file descriptor passed to
+\fBsetupterm\fP from \fBinitscr\fP or \fBnewterm\fP uses buffered I/O,
+and would write to the corresponding stream.
+In addition to the limitation that the terminal was left in block-buffered
+mode on exit (like SystemV curses),
+it was problematic because \fBncurses\fP
+did not allow a reliable way to cleanup on receiving SIGTSTP.
+The current version uses output buffers managed directly by \fBncurses\fP.
+Some of the low-level functions described in this manual page write
+to the standard output.
+They are not signal-safe.
+The high-level functions in \fBncurses\fP use
+alternate versions of these functions
+using the more reliable buffering scheme.
+.PP
 In System V Release 4, \fBset_curterm\fR has an \fBint\fR return type and
 returns \fBOK\fR or \fBERR\fR.  We have chosen to implement the X/Open Curses
 semantics.
@@ -337,7 +371,7 @@ X/Open Curses Issue 7 proposed the \fBtiparam\fP function in mid-2009.
 X/Open notes that after calling \fBmvcur\fR, the curses state may not match the
 actual terminal state, and that an application should touch and refresh
 the window before resuming normal curses calls.
-Both ncurses and System V Release 4 curses implement \fBmvcur\fR using
+Both \fBncurses\fP and System V Release 4 curses implement \fBmvcur\fR using
 the SCREEN data allocated in either \fBinitscr\fR or \fBnewterm\fR.
 So though it is documented as a terminfo function,
 \fBmvcur\fR is really a curses function which is not well specified.
index 653a37412648de6a43470ad0cc1b2ee72fd336de..814d1116c6717e8400bd3c6865194289451a4c93 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.88 2013/06/03 11:05:54 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.89 2013/07/13 21:55:32 tom Exp $")
 
 static void sanity_check2(TERMTYPE *, bool);
 NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE *, bool) = sanity_check2;
@@ -162,18 +162,15 @@ name_ending(char *name)
 static bool
 remove_collision(char *n1, char *n2)
 {
-    char *p1 = n1;
     char *p2 = n2;
     char *pstart, *qstart, *pend, *qend;
     bool removed = FALSE;
 
 #if NCURSES_USE_TERMCAP && NCURSES_XNAMES
     if ((_nc_syntax == SYN_TERMCAP) && _nc_user_definable) {
-       p1 = n1 = skip_index(n1);
+       n1 = skip_index(n1);
        p2 = n2 = skip_index(n2);
     }
-#else
-    (void) p1;
 #endif
 
     for (pstart = n1; (pend = name_ending(pstart)); pstart = next_name(pend)) {
index e67ced4897eeb8ac07ca3c966291d25ac6fe9f13..4d1cb116d06bdab9a0733b3e251be5dc8b6f7235 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.123 2013/05/25 20:17:49 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.124 2013/07/13 20:06:43 tom Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
@@ -107,7 +107,7 @@ fake_read(char *src, int *offset, int limit, char *dst, unsigned want)
     return (int) want;
 }
 
-#define Read(buf, count) fake_read(buffer, &offset, limit, buf, (unsigned) count)
+#define Read(buf, count) fake_read(buffer, &offset, limit, (char *) buf, (unsigned) count)
 
 #define read_shorts(buf, count) \
        (Read(buf, (count)*2) == (int) (count)*2)
index 021fc7d1f197ad3acdd4a7a1be24d1d5c993d6f0..05e57df2b2810ffdfee278eedbc7296e330c0704 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2012,2013 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            *
@@ -56,7 +56,7 @@
 #include <sys/types.h>
 #include <tic.h>
 
-MODULE_ID("$Id: read_termcap.c,v 1.87 2012/05/05 19:40:50 tom Exp $")
+MODULE_ID("$Id: read_termcap.c,v 1.88 2013/07/13 22:11:06 tom Exp $")
 
 #if !PURE_TERMINFO
 
@@ -791,13 +791,11 @@ _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name)
     int i;
     char pathbuf[PBUFSIZ];     /* holds raw path of filenames */
     CGETENT_CONST char *pathvec[PVECSIZ];      /* point to names in pathbuf */
-    CGETENT_CONST char **pvec; /* holds usable tail of path vector */
     NCURSES_CONST char *termpath;
     string_desc desc;
 
     *lineno = 1;
     fname = pathvec;
-    pvec = pathvec;
     p = pathbuf;
     cp = use_terminfo_vars()? getenv("TERMCAP") : NULL;
 
index a8569b89d0fb48e5777f9a163ecf86190ecb9c50..97214c42266d2b6221b07bbefc01b907a551992a 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20130706) unstable; urgency=low
+ncurses6 (5.9-20130713) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Jul 2013 11:25:23 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 13 Jul 2013 14:01:04 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 04c54100068c31765c50d3599101b1014b9e1bdb..62037f9bd0b0f04f2f1f863d106632cfd09eaeb6 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Release: 5.9
-Version: 20130706
+Version: 20130713
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{release}-%{version}.tgz