./ncurses/tinfo/MKfallback.sh
./ncurses/tinfo/MKkeys_list.sh
./ncurses/tinfo/MKnames.awk
+./ncurses/tinfo/MKuserdefs.sh
./ncurses/tinfo/README
./ncurses/tinfo/access.c
./ncurses/tinfo/add_tries.c
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3283 2019/03/03 01:12:40 tom Exp $
+-- $Id: NEWS,v 1.3286 2019/03/09 21:35:49 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.
+20190309
+ + in-progress changes to add parameter-checking for common user-defined
+ capabilities in tic.
+ + update MKcodes.awk and MKnames.awk to ignore the new "userdef"
+ data in Caps-ncurses (cf: 20190302).
+
20190302
+ corrected some of the undocumented terminfo names in Caps.hpux11
+ add "Caps-ncurses" file to help with checking inconsistencies in some
-5:0:10 6.1 20190302
+5:0:10 6.1 20190309
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1270 2019/02/28 00:12:30 tom Exp $
+# $Id: dist.mk,v 1.1271 2019/03/09 16:50:35 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 = 6
NCURSES_MINOR = 1
-NCURSES_PATCH = 20190302
+NCURSES_PATCH = 20190309
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2018,2019 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 *
****************************************************************************/
/*
- * $Id: tic.h,v 1.76 2018/05/06 00:19:34 tom Exp $
+ * $Id: tic.h,v 1.78 2019/03/10 00:06:02 tom Exp $
* tic.h - Global variables and structures for the terminfo compiler.
*/
#define NOTFOUND ((struct name_table_entry *) 0)
+/*
+ * The file comp_userdefs.c contains an array of these structures, one per
+ * possible capability. These are indexed by a hash table array of pointers to
+ * the same structures for use by the parser.
+ */
+struct user_table_entry
+{
+ const char *ute_name; /* name to hash on */
+ int ute_type; /* mask (BOOLEAN, NUMBER, STRING) */
+ unsigned ute_argc; /* number of parameters */
+ unsigned ute_args; /* bit-mask for string parameters */
+ HashValue ute_index; /* index of associated variable in its array */
+ HashValue ute_link; /* index in table of next hash, or -1 */
+};
+
/*
* The casts are required for correct sign-propagation with systems such as
* AIX, IRIX64, Solaris which default to unsigned characters. The C standard
/* comp_hash.c: name lookup */
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
(const char *, int, bool);
+extern NCURSES_EXPORT(struct user_table_entry const *) _nc_find_user_entry
+ (const char *);
/* comp_scan.c: lexical analysis */
extern NCURSES_EXPORT(int) _nc_get_token (bool);
/* comp_scan.c */
extern NCURSES_EXPORT_VAR(struct token) _nc_curr_token;
+/* comp_userdefs.c */
+NCURSES_EXPORT(const struct user_table_entry *) _nc_get_userdefs_table (void);
+NCURSES_EXPORT(const HashData *) _nc_get_hash_user (void);
+
/* captoinfo.c: capability conversion */
extern NCURSES_EXPORT(char *) _nc_captoinfo (const char *, const char *, int const);
extern NCURSES_EXPORT(char *) _nc_infotocap (const char *, const char *, int const);
-# $Id: Makefile.in,v 1.157 2019/03/02 22:18:27 tom Exp $
+# $Id: Makefile.in,v 1.160 2019/03/09 23:39:14 tom Exp $
##############################################################################
# Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. #
# #
AUTO_SRC = \
./codes.c \
./comp_captab.c \
+ ./comp_userdefs.c \
./expanded.c \
./fallback.c \
./lib_gen.c \
$(tinfo)/MKcaptab.awk
$(SHELL) -e $(tinfo)/MKcaptab.sh $(AWK) $(USE_BIG_STRINGS) $(tinfo)/MKcaptab.awk $(CAPLIST) > $@
+./comp_userdefs.c: \
+ make_hash$(BUILD_EXEEXT) \
+ ../include/hashsize.h \
+ $(tinfo)/MKuserdefs.sh
+ $(SHELL) -e $(tinfo)/MKuserdefs.sh $(AWK) $(USE_BIG_STRINGS) $(CAPLIST) > $@
+
./lib_keyname.c: keys.list $(base)/MKkeyname.awk
$(AWK) -f $(base)/MKkeyname.awk bigstrings=$(USE_BIG_STRINGS) keys.list > $@
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.616 2019/02/23 17:54:39 tom Exp $
+ * $Id: curses.priv.h,v 1.618 2019/03/09 23:43:24 tom Exp $
*
* curses.priv.h
*
short source;
} alias_table_data;
+/* comp_userdefs.c */
+typedef struct {
+ short ute_name; /* offset of name to hash on */
+ unsigned ute_type; /* mask (BOOLEAN, NUMBER, STRING) */
+ unsigned ute_argc; /* number of parameters */
+ unsigned ute_args; /* bit-mask for string parameters */
+ short ute_index; /* index of associated variable in its array */
+ short ute_link; /* index in table of next hash, or -1 */
+} user_table_data;
+
/* doupdate.c */
#if USE_XMC_SUPPORT
extern NCURSES_EXPORT(void) _nc_do_xmc_glitch (attr_t);
extern NCURSES_EXPORT(void) _nc_comp_captab_leaks(void);
extern NCURSES_EXPORT(void) _nc_comp_error_leaks(void);
extern NCURSES_EXPORT(void) _nc_comp_scan_leaks(void);
+extern NCURSES_EXPORT(void) _nc_comp_userdefs_leaks(void);
extern NCURSES_EXPORT(void) _nc_db_iterator_leaks(void);
extern NCURSES_EXPORT(void) _nc_keyname_leaks(void);
extern NCURSES_EXPORT(void) _nc_names_leaks(void);
-# $Id: modules,v 1.122 2017/04/29 20:23:50 tom Exp $
+# $Id: modules,v 1.123 2019/03/09 21:36:58 tom Exp $
##############################################################################
-# Copyright (c) 1998-2013,2017 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2017,2019 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"), #
comp_captab lib . $(HEADER_DEPS) $(INCDIR)/tic.h ../include/hashsize.h
comp_error lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
comp_hash lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h ../include/hashsize.h
+comp_userdefs lib . $(HEADER_DEPS) $(INCDIR)/tic.h ../include/hashsize.h
db_iterator lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
doalloc lib $(tinfo) $(HEADER_DEPS)
entries lib $(tinfo) $(HEADER_DEPS) $(INCDIR)/tic.h
##############################################################################
-# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2019 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"), #
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKcodes.awk,v 1.9 2010/01/23 17:57:43 tom Exp $
+# $Id: MKcodes.awk,v 1.10 2019/03/09 16:43:37 tom Exp $
function large_item(value) {
result = sprintf("%d,", offset);
offset = offset + length(value) + 1;
}
$1 ~ /^#/ {next;}
+$1 ~ /^(cap|info)alias/ {next;}
+$1 == "userdef" {next;}
$1 == "SKIPWARN" {next;}
$3 == "bool" {
##############################################################################
-# Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. #
+# Copyright (c) 2007-2009,2019 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"), #
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: MKnames.awk,v 1.22 2009/03/21 21:03:39 tom Exp $
+# $Id: MKnames.awk,v 1.23 2019/03/09 16:49:06 tom Exp $
function large_item(value) {
result = sprintf("%d,", offset);
offset = offset + length(value) + 1;
}
$1 ~ /^#/ {next;}
+$1 ~ /^(cap|info)alias/ {next;}
+$1 == "userdef" {next;}
$1 == "SKIPWARN" {next;}
$3 == "bool" {
--- /dev/null
+#!/bin/sh
+##############################################################################
+# Copyright (c) 2019 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"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+# $Id: MKuserdefs.sh,v 1.6 2019/03/10 01:08:14 tom Exp $
+AWK=${1-awk}; shift 1
+OPT1=${1-0}; shift 1
+
+cat <<EOF
+/*
+ * generated by $0
+ */
+
+EOF
+
+cat <<'EOF'
+/*
+ * comp_userdefs.c -- The names of widely used user-defined capabilities
+ * indexed via a hash table for the compiler.
+ *
+ */
+
+#include <curses.priv.h>
+#include <tic.h>
+#include <hashsize.h>
+
+#if NCURSES_XNAMES
+EOF
+
+cat "$@" | ./make_hash 1 user $OPT1
+
+cat <<EOF
+
+#if $OPT1
+static void
+next_string(const char *strings, unsigned *offset)
+{
+ *offset += (unsigned) strlen(strings + *offset) + 1;
+}
+
+static const struct user_table_entry *
+_nc_build_names(struct user_table_entry **actual,
+ const user_table_data *source,
+ const char *strings)
+{
+ if (*actual == 0) {
+ *actual = typeCalloc(struct user_table_entry, CAPTABSIZE);
+ if (*actual != 0) {
+ unsigned n;
+ unsigned len = 0;
+ for (n = 0; n < CAPTABSIZE; ++n) {
+ (*actual)[n].ute_name = strings + len;
+ (*actual)[n].ute_type = (int) source[n].ute_type;
+ (*actual)[n].ute_index = source[n].ute_index;
+ (*actual)[n].ute_link = source[n].ute_link;
+ next_string(strings, &len);
+ }
+ }
+ }
+ return *actual;
+}
+
+#define build_names(root) _nc_build_names(&_nc_##root##_table, \\
+ root##_names_data, \\
+ root##_names_text)
+#else
+#define build_names(root) _nc_ ## root ## _table
+#endif
+
+NCURSES_EXPORT(const struct user_table_entry *) _nc_get_userdefs_table (void)
+{
+ return build_names(user) ;
+}
+
+static HashValue
+info_hash(const char *string)
+{
+ long sum = 0;
+
+ DEBUG(9, ("hashing %s", string));
+ while (*string) {
+ sum += (long) (*string + (*(string + 1) << 8));
+ string++;
+ }
+
+ DEBUG(9, ("sum is %ld", sum));
+ return (HashValue) (sum % HASHTABSIZE);
+}
+
+static int
+compare_info_names(const char *a, const char *b)
+{
+ return !strcmp(a, b);
+}
+
+static const HashData hash_data[] = {
+ { HASHTABSIZE, _nc_user_hash_table, info_hash, compare_info_names }
+};
+
+NCURSES_EXPORT(const HashData *) _nc_get_hash_user (void)
+{
+ return hash_data;
+}
+
+#if NO_LEAKS
+NCURSES_EXPORT(void) _nc_comp_userdefs_leaks(void)
+{
+#if $OPT1
+ FreeIfNeeded(_nc_user_table);
+#endif
+}
+#endif /* NO_LEAKS */
+
+#else /*! NCURSES_XNAMES */
+NCURSES_EXPORT(void) _nc_comp_userdefs(void);
+NCURSES_EXPORT(void) _nc_comp_userdefs(void) { }
+#endif /* NCURSES_XNAMES */
+EOF
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2019 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 *
#include <tic.h>
#include <hashsize.h>
-MODULE_ID("$Id: comp_hash.c,v 1.48 2009/08/08 17:36:21 tom Exp $")
+MODULE_ID("$Id: comp_hash.c,v 1.49 2019/03/10 00:06:48 tom Exp $")
/*
* Finds the entry for the given string in the hash table if present.
return ptr;
}
+
+#if NCURSES_XNAMES
+NCURSES_EXPORT(struct user_table_entry const *)
+_nc_find_user_entry(const char *string)
+{
+ const HashData *data = _nc_get_hash_user();
+ int hashvalue;
+ struct user_table_entry const *ptr = 0;
+ struct user_table_entry const *real_table;
+
+ hashvalue = data->hash_of(string);
+
+ if (data->table_data[hashvalue] >= 0) {
+
+ real_table = _nc_get_userdefs_table();
+ ptr = real_table + data->table_data[hashvalue];
+ while (!data->compare_names(ptr->ute_name, string)) {
+ if (ptr->ute_link < 0) {
+ ptr = 0;
+ break;
+ }
+ ptr = real_table + (ptr->ute_link
+ + data->table_data[data->table_size]);
+ }
+ }
+
+ return (ptr);
+}
+#endif /* NCURSES_XNAMES */
/****************************************************************************
- * Copyright (c) 2006-2012,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2017,2019 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 *
#include <tic.h>
-MODULE_ID("$Id: entries.c,v 1.26 2017/08/04 09:01:39 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.27 2019/03/09 23:41:08 tom Exp $")
/****************************************************************************
*
_nc_forget_prescr();
_nc_comp_captab_leaks();
+ _nc_comp_userdefs_leaks();
_nc_free_entries(_nc_head);
_nc_get_type(0);
_nc_first_name(0);
/****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2018,2019 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 *
#include <ctype.h>
-MODULE_ID("$Id: make_hash.c,v 1.17 2018/05/12 15:58:31 tom Exp $")
+MODULE_ID("$Id: make_hash.c,v 1.26 2019/03/10 01:10:15 tom Exp $")
/*
* _nc_make_hash_table()
*
* Takes the entries in table[] and hashes them into hash_table[]
- * by name. There are CAPTABSIZE entries in table[] and HASHTABSIZE
- * slots in hash_table[].
+ * by name. There are CAPTABSIZE entries in the predefined table[]
+ * and HASHTABSIZE slots in hash_table[].
*
*/
#define MODULE_ID(id) /*nothing */
#include <tinfo/doalloc.c>
+#define L_PAREN "("
+#define R_PAREN ")"
+#define L_BRACE "{"
+#define R_BRACE "}"
+
+static const char *typenames[] =
+{"BOOLEAN", "NUMBER", "STRING"};
+
static void
failed(const char *s)
{
}
static void
-_nc_make_hash_table(struct name_table_entry *table,
- HashValue * hash_table)
+_nc_make_hash_table(struct user_table_entry *table,
+ HashValue * hash_table,
+ unsigned tablesize)
{
- short i;
+ unsigned i;
int hashvalue;
int collisions = 0;
for (i = 0; i < HASHTABSIZE; i++) {
hash_table[i] = -1;
}
- for (i = 0; i < CAPTABSIZE; i++) {
- hashvalue = hash_function(table[i].nte_name);
+ for (i = 0; i < tablesize; i++) {
+ hashvalue = hash_function(table[i].ute_name);
if (hash_table[hashvalue] >= 0)
collisions++;
if (hash_table[hashvalue] != 0)
- table[i].nte_link = hash_table[hashvalue];
- hash_table[hashvalue] = i;
+ table[i].ute_link = hash_table[hashvalue];
+ hash_table[hashvalue] = (HashValue) i;
}
- printf("/* %d collisions out of %d entries */\n", collisions, CAPTABSIZE);
+ printf("/* %d collisions out of %d entries */\n", collisions, tablesize);
}
/*
int col = 0;
+#if NO_LEAKS
+ if (buffer == 0) {
+ free(list);
+ list = 0;
+ return 0;
+ }
+#endif
+
if (*buffer != '#') {
if (list == 0) {
list = typeCalloc(char *, (MAX_COLUMNS + 1));
return col ? list : 0;
}
+#define SetType(n,t) \
+ if (is_user) \
+ name_table[n].ute_type |= (int)(1 << (t)); \
+ else \
+ name_table[n].ute_type = (t)
+
+#define GetType(n) \
+ (is_user \
+ ? get_type(name_table[n].ute_type) \
+ : typenames[name_table[n].ute_type])
+
+static char *
+get_type(int type_mask)
+{
+ static char result[40];
+ unsigned n;
+ strcpy(result, L_PAREN);
+ for (n = 0; n < 3; ++n) {
+ if ((1 << n) & type_mask) {
+ if (result[1])
+ strcat(result, "|");
+ strcat(result, "1<<");
+ strcat(result, typenames[n]);
+ }
+ }
+ strcat(result, R_PAREN);
+ return result;
+}
+
int
main(int argc, char **argv)
{
- struct name_table_entry *name_table = typeCalloc(struct
- name_table_entry, CAPTABSIZE);
+ unsigned tablesize = CAPTABSIZE;
+ struct user_table_entry *name_table = typeCalloc(struct
+ user_table_entry, tablesize);
HashValue *hash_table = typeCalloc(HashValue, HASHTABSIZE);
const char *root_name = "";
int column = 0;
int bigstring = 0;
- int n;
+ unsigned n;
+ unsigned nn;
+ unsigned tableused = 0;
+ bool is_user;
+ const char *table_name;
char buffer[BUFSIZ];
- static const char *typenames[] =
- {"BOOLEAN", "NUMBER", "STRING"};
-
short BoolCount = 0;
short NumCount = 0;
short StrCount = 0;
fprintf(stderr, "usage: make_hash column root_name bigstring\n");
exit(EXIT_FAILURE);
}
+ is_user = (*root_name == 'u');
+ table_name = (is_user ? "user" : "name");
/*
* Read the table into our arrays.
*/
- for (n = 0; (n < CAPTABSIZE) && fgets(buffer, BUFSIZ, stdin);) {
+ for (n = 0; (n < tablesize) && fgets(buffer, BUFSIZ, stdin);) {
char **list;
char *nlp = strchr(buffer, '\n');
if (nlp)
list = parse_columns(buffer);
if (list == 0) /* blank or comment */
continue;
+ if (is_user) {
+ if (strcmp(list[0], "userdef"))
+ continue;
+ } else if (!strcmp(list[0], "userdef")) {
+ continue;
+ }
if (column < 0 || column > count_columns(list)) {
fprintf(stderr, "expected %d columns, have %d:\n%s\n",
column,
buffer);
exit(EXIT_FAILURE);
}
- name_table[n].nte_link = -1; /* end-of-hash */
- name_table[n].nte_name = strmalloc(list[column]);
+ nn = tableused;
+ if (is_user) {
+ unsigned j;
+ for (j = 0; j < tableused; ++j) {
+ if (!strcmp(list[column], name_table[j].ute_name)) {
+ nn = j;
+ break;
+ }
+ }
+ }
+ if (nn == tableused) {
+ name_table[nn].ute_link = -1; /* end-of-hash */
+ name_table[nn].ute_name = strmalloc(list[column]);
+ ++tableused;
+ }
+
if (!strcmp(list[2], "bool")) {
- name_table[n].nte_type = BOOLEAN;
- name_table[n].nte_index = BoolCount++;
+ SetType(nn, BOOLEAN);
+ name_table[nn].ute_index = BoolCount++;
} else if (!strcmp(list[2], "num")) {
- name_table[n].nte_type = NUMBER;
- name_table[n].nte_index = NumCount++;
+ SetType(nn, NUMBER);
+ name_table[nn].ute_index = NumCount++;
} else if (!strcmp(list[2], "str")) {
- name_table[n].nte_type = STRING;
- name_table[n].nte_index = StrCount++;
+ SetType(nn, STRING);
+ name_table[nn].ute_index = StrCount++;
+ if (is_user) {
+ if (*list[3] != '-') {
+ unsigned j;
+ name_table[nn].ute_argc = (unsigned) strlen(list[3]);
+ for (j = 0; j < name_table[nn].ute_argc; ++j) {
+ if (list[3][j] == 's') {
+ name_table[nn].ute_args |= (1U << j);
+ }
+ }
+ }
+ }
} else {
fprintf(stderr, "Unknown type: %s\n", list[2]);
exit(EXIT_FAILURE);
}
n++;
}
- _nc_make_hash_table(name_table, hash_table);
+ if (tablesize > tableused)
+ tablesize = tableused;
+ _nc_make_hash_table(name_table, hash_table, tablesize);
/*
* Write the compiled tables to standard output
int nxt;
printf("static const char %s_names_text[] = \\\n", root_name);
- for (n = 0; n < CAPTABSIZE; n++) {
- nxt = (int) strlen(name_table[n].nte_name) + 5;
+ for (n = 0; n < tablesize; n++) {
+ nxt = (int) strlen(name_table[n].ute_name) + 5;
if (nxt + len > 72) {
printf("\\\n");
len = 0;
}
- printf("\"%s\\0\" ", name_table[n].nte_name);
+ printf("\"%s\\0\" ", name_table[n].ute_name);
len += nxt;
}
printf(";\n\n");
len = 0;
- printf("static name_table_data const %s_names_data[] =\n",
+ printf("static %s_table_data const %s_names_data[] =\n",
+ table_name,
root_name);
- printf("{\n");
- for (n = 0; n < CAPTABSIZE; n++) {
- printf("\t{ %15d,\t%10s,\t%3d, %3d }%c\n",
- len,
- typenames[name_table[n].nte_type],
- name_table[n].nte_index,
- name_table[n].nte_link,
- n < CAPTABSIZE - 1 ? ',' : ' ');
- len += (int) strlen(name_table[n].nte_name) + 1;
+ printf("%s\n", L_BRACE);
+ for (n = 0; n < tablesize; n++) {
+ printf("\t%s %15d,\t%10s,", L_BRACE, len, GetType(n));
+ if (is_user)
+ printf("\t%d,%d,",
+ name_table[n].ute_argc,
+ name_table[n].ute_args);
+ printf("\t%3d, %3d %s%c\n",
+ name_table[n].ute_index,
+ name_table[n].ute_link,
+ R_BRACE,
+ n < tablesize - 1 ? ',' : ' ');
+ len += (int) strlen(name_table[n].ute_name) + 1;
}
- printf("};\n\n");
- printf("static struct name_table_entry *_nc_%s_table = 0;\n\n", root_name);
+ printf("%s;\n\n", R_BRACE);
+ printf("static struct %s_table_entry *_nc_%s_table = 0;\n\n",
+ table_name,
+ root_name);
} else {
- printf("static struct name_table_entry const _nc_%s_table[] =\n",
+ printf("static struct %s_table_entry const _nc_%s_table[] =\n",
+ table_name,
root_name);
- printf("{\n");
- for (n = 0; n < CAPTABSIZE; n++) {
+ printf("%s\n", L_BRACE);
+ for (n = 0; n < tablesize; n++) {
_nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "\"%s\"",
- name_table[n].nte_name);
- printf("\t{ %15s,\t%10s,\t%3d, %3d }%c\n",
- buffer,
- typenames[name_table[n].nte_type],
- name_table[n].nte_index,
- name_table[n].nte_link,
- n < CAPTABSIZE - 1 ? ',' : ' ');
+ name_table[n].ute_name);
+ printf("\t%s %15s,\t%10s,", L_BRACE, buffer, GetType(n));
+ if (is_user)
+ printf("\t%d,%d,",
+ name_table[n].ute_argc,
+ name_table[n].ute_args);
+ printf("\t%3d, %3d %s%c\n",
+ name_table[n].ute_index,
+ name_table[n].ute_link,
+ R_BRACE,
+ n < tablesize - 1 ? ',' : ' ');
}
- printf("};\n\n");
+ printf("%s;\n\n", R_BRACE);
}
printf("static const HashValue _nc_%s_hash_table[%d] =\n",
root_name,
HASHTABSIZE + 1);
- printf("{\n");
+ printf("%s\n", L_BRACE);
for (n = 0; n < HASHTABSIZE; n++) {
printf("\t%3d,\n", hash_table[n]);
}
printf("\t0\t/* base-of-table */\n");
- printf("};\n\n");
-
- printf("#if (BOOLCOUNT!=%d)||(NUMCOUNT!=%d)||(STRCOUNT!=%d)\n",
- BoolCount, NumCount, StrCount);
- printf("#error\t--> term.h and comp_captab.c disagree about the <--\n");
- printf("#error\t--> numbers of booleans, numbers and/or strings <--\n");
- printf("#endif\n\n");
+ printf("%s;\n\n", R_BRACE);
+
+ if (!is_user) {
+ printf("#if (BOOLCOUNT!=%d)||(NUMCOUNT!=%d)||(STRCOUNT!=%d)\n",
+ BoolCount, NumCount, StrCount);
+ printf("#error\t--> term.h and comp_captab.c disagree about the <--\n");
+ printf("#error\t--> numbers of booleans, numbers and/or strings <--\n");
+ printf("#endif\n\n");
+ }
free(hash_table);
#if NO_LEAKS
- for (n = 0; (n < CAPTABSIZE); ++n) {
- free((void *) name_table[n].nte_name);
+ for (n = 0; (n < tablesize); ++n) {
+ free((void *) name_table[n].ute_name);
}
free(name_table);
+ parse_columns(0);
#endif
return EXIT_SUCCESS;
}
-ncurses6 (6.1+20190302) unstable; urgency=low
+ncurses6 (6.1+20190309) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 27 Feb 2019 19:12:30 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 Mar 2019 11:50:35 -0500
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20190302) unstable; urgency=low
+ncurses6 (6.1+20190309) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 27 Feb 2019 19:12:30 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 Mar 2019 11:50:35 -0500
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20190302) unstable; urgency=low
+ncurses6 (6.1+20190309) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 27 Feb 2019 19:12:30 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 Mar 2019 11:50:35 -0500
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.317 2019/02/28 00:12:30 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.318 2019/03/09 16:50:35 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "1"\r
!define VERSION_YYYY "2019"\r
-!define VERSION_MMDD "0302"\r
+!define VERSION_MMDD "0309"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.1
-Release: 20190302
+Release: 20190309
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
-Release: 20190302
+Release: 20190309
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.1
-Release: 20190302
+Release: 20190309
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz