+ minor changes to some configure macros to make them more reusable.
+ fixes for tabs program (prompted by report by Nick Andrik):
+ corrected logic in command-line parsing of -a and -c predefined
tab-lists options.
+ allow "-0" and "-8" options to be combined with others, e.g.,"-0d".
+ make warning messages more consistent with the other utilities by
not printing the full pathname of the program.
+ add -V option for consistency with other utilities.
+ fix off-by-one in columns for tabs program when processing an option
such as "-5" (patch by Nick Andrik).
dnl
dnl Author: Thomas E. Dickey
dnl
-dnl $Id: aclocal.m4,v 1.66 2013/04/13 23:00:18 tom Exp $
+dnl $Id: aclocal.m4,v 1.67 2013/06/15 21:13:50 tom Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_SUFFIX version: 18 updated: 2012/02/25 15:20:07
+dnl CF_LIB_SUFFIX version: 19 updated: 2013/06/15 11:58:48
dnl -------------
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_SUFFIX],
[
- AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
case $1 in #(vi
libtool) #(vi
$2='.la'
$1=`echo "$2" | sed -e 's/-l$3[[ ]]//g' -e 's/-l$3[$]//'`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 72 updated: 2013/01/26 16:26:12
+dnl CF_SHARED_OPTS version: 73 updated: 2013/06/15 12:17:19
dnl --------------
dnl --------------
dnl Attempt to determine the appropriate CC/LD options for creating a shared
dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
AC_DEFUN([CF_SHARED_OPTS],
[
- AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
AC_REQUIRE([CF_LD_RPATH_OPT])
LOCAL_LDFLAGS=
LOCAL_LDFLAGS2=
./test/ditto.c
./test/dots.c
./test/dots_mvcur.c
+./test/dots_termcap.c
./test/echochar.c
./test/edit_field.c
./test/edit_field.h
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2069 2013/06/08 21:00:03 tom Exp $
+-- $Id: NEWS,v 1.2072 2013/06/15 21:16:04 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.
+20130615
+ + minor changes to some configure macros to make them more reusable.
+ + fixes for tabs program (prompted by report by Nick Andrik):
+ + corrected logic in command-line parsing of -a and -c predefined
+ tab-lists options.
+ + allow "-0" and "-8" options to be combined with others, e.g.,"-0d".
+ + make warning messages more consistent with the other utilities by
+ not printing the full pathname of the program.
+ + add -V option for consistency with other utilities.
+ + fix off-by-one in columns for tabs program when processing an option
+ such as "-5" (patch by Nick Andrik).
+
20130608
+ add to test/demo_forms.c examples of using the menu-hooks as well
as showing how the menu item user-data can be used to pass a callback
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: aclocal.m4,v 1.666 2013/04/13 22:59:35 tom Exp $
+dnl $Id: aclocal.m4,v 1.668 2013/06/15 16:22:56 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
])
])
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_SUFFIX version: 18 updated: 2012/02/25 15:20:07
+dnl CF_LIB_SUFFIX version: 19 updated: 2013/06/15 11:58:48
dnl -------------
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_SUFFIX],
[
- AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
case $1 in #(vi
libtool) #(vi
$2='.la'
AC_SUBST(EXTRA_LDFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 72 updated: 2013/01/26 16:26:12
+dnl CF_SHARED_OPTS version: 73 updated: 2013/06/15 12:17:19
dnl --------------
dnl --------------
dnl Attempt to determine the appropriate CC/LD options for creating a shared
dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
AC_DEFUN([CF_SHARED_OPTS],
[
- AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
AC_REQUIRE([CF_LD_RPATH_OPT])
LOCAL_LDFLAGS=
LOCAL_LDFLAGS2=
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.932 2013/06/07 08:08:46 tom Exp $
+# $Id: dist.mk,v 1.933 2013/06/15 21:17:44 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 = 20130608
+NCURSES_PATCH = 20130615
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
.\"***************************************************************************
-.\" Copyright (c) 2008-2010,2011 Free Software Foundation, Inc. *
+.\" Copyright (c) 2008-2011,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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tabs.1,v 1.9 2011/12/17 23:31:59 tom Exp $
+.\" $Id: tabs.1,v 1.10 2013/06/11 00:56:40 tom Exp $
.TH @TABS@ 1 ""
.ds n 5
.SH NAME
\fB@TABS@\fR \- set tabs on a terminal
.SH SYNOPSIS
-\fB@TABS@\fR [\fB\-v\fR[\fIn\fR]] [\fB\-ahuUV\fR] \fIfile...\fR
+\fB@TABS@\fR [\fIoptions\fR]] \fI[tabstop-list]\fR
.br
.SH DESCRIPTION
.PP
.B \-n
This option tells \fB@TABS@\fP to check the options and run any debugging
option, but not to modify the terminal settings.
+.TP
+\fB\-V\fR
+reports the version of ncurses which was used in this program, and exits.
.PP
The \fB@TABS@\fP program processes a single list of tab stops.
The last option to be processed which defines a list is the one that
-ncurses6 (5.9-20130608) unstable; urgency=low
+ncurses6 (5.9-20130615) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 01 Jun 2013 07:49:17 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 15 Jun 2013 17:17:42 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
Summary: shared libraries for terminal handling
Name: ncurses6
Release: 5.9
-Version: 20130608
+Version: 20130615
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
/****************************************************************************
- * Copyright (c) 2008-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-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 *
#define USE_LIBTINFO
#include <progs.priv.h>
-MODULE_ID("$Id: tabs.c,v 1.25 2012/11/18 01:21:47 tom Exp $")
+MODULE_ID("$Id: tabs.c,v 1.34 2013/06/11 08:18:27 tom Exp $")
static void usage(void) GCC_NORETURN;
+static char *prg_name;
static int max_cols;
static void
result[n] = value + prior;
if (n > 0 && result[n] <= result[n - 1]) {
fprintf(stderr,
- "tab-stops are not in increasing order: %d %d\n",
- value, result[n - 1]);
+ "%s: tab-stops are not in increasing order: %d %d\n",
+ prg_name, value, result[n - 1]);
free(result);
result = 0;
break;
*/
if ((n == 0) && (value > 0)) {
int step = value;
+ value = 1;
while (n < max_cols - 1) {
result[n++] = value;
value += step;
* Check for illegal characters in the tab-list.
*/
static bool
-legal_tab_list(const char *program, const char *tab_list)
+legal_tab_list(const char *tab_list)
{
bool result = TRUE;
if (!(isdigit(ch) || ch == ',' || ch == '+')) {
fprintf(stderr,
"%s: unexpected character found '%c'\n",
- program, ch);
+ prg_name, ch);
result = FALSE;
break;
}
}
} else {
- fprintf(stderr, "%s: trailing comma found '%s'\n", program, tab_list);
+ fprintf(stderr, "%s: trailing comma found '%s'\n", prg_name, tab_list);
result = FALSE;
}
} else {
- fprintf(stderr, "%s: no tab-list given\n", program);
+ fprintf(stderr, "%s: no tab-list given\n", prg_name);
result = FALSE;
}
return result;
}
+static char *
+skip_list(char *value)
+{
+ while (*value != '\0' &&
+ (isdigit(UChar(*value)) ||
+ isspace(UChar(*value)) ||
+ strchr("+,", UChar(*value)) != 0)) {
+ ++value;
+ }
+ return value;
+}
+
static void
usage(void)
{
," -s SNOBOL"
," -u UNIVAC 1100 Assembler"
," -T name use terminal type 'name'"
+ ," -V print version"
,""
,"A tabstop-list is an ordered list of column numbers, e.g., 1,11,21"
,"or 1,+10,+10 which is the same."
char *append = 0;
const char *tab_list = 0;
+ prg_name = _nc_rootname(argv[0]);
+
if ((term_name = getenv("TERM")) == 0)
term_name = "ansi+tabs";
while ((ch = *++option) != '\0') {
switch (ch) {
case 'a':
- switch (*option) {
+ switch (*++option) {
+ default:
case '\0':
tab_list = "1,10,16,36,72";
+ option--;
/* Assembler, IBM S/370, first format */
break;
case '2':
tab_list = "1,10,16,40,72";
/* Assembler, IBM S/370, second format */
break;
- default:
- usage();
}
break;
case 'c':
- switch (*option) {
+ switch (*++option) {
+ default:
case '\0':
tab_list = "1,8,12,16,20,55";
+ option--;
/* COBOL, normal format */
break;
case '2':
tab_list = "1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67";
/* COBOL compact format extended */
break;
- default:
- usage();
}
break;
case 'd': /* ncurses extension */
term_name = option;
} else {
term_name = argv[n++];
+ option--;
}
option += ((int) strlen(option)) - 1;
continue;
+ case 'V':
+ puts(curses_version());
+ ExitProgram(EXIT_SUCCESS);
default:
if (isdigit(UChar(*option))) {
- tab_list = option;
- ++n;
+ char *copy = strdup(option);
+ *skip_list(copy) = '\0';
+ tab_list = copy;
+ option = skip_list(option) - 1;
} else {
usage();
}
- option += ((int) strlen(option)) - 1;
break;
}
}
if (!VALID_STRING(clear_all_tabs)) {
fprintf(stderr,
"%s: terminal type '%s' cannot reset tabs\n",
- argv[0], term_name);
+ prg_name, term_name);
} else if (!VALID_STRING(set_tab)) {
fprintf(stderr,
"%s: terminal type '%s' cannot set tabs\n",
- argv[0], term_name);
- } else if (legal_tab_list(argv[0], tab_list)) {
+ prg_name, term_name);
+ } else if (legal_tab_list(tab_list)) {
int *list = decode_tabs(tab_list);
if (!no_op)