-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1063 2006/12/31 00:11:42 tom Exp $
+-- $Id: NEWS,v 1.1064 2007/01/06 22:55:02 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.
+20070106
+ + change MKunctrl.awk to reduce relocation table for unctrl.o
+ + change MKkeyname.awk to reduce relocation table for keyname.o
+ (patch by Miroslav Lichvar).
+
20061230
+ modify configure check for libtool's version to trim blank lines
(report by sci-fi@hush.ai).
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.570 2006/12/30 15:49:50 tom Exp $
+# $Id: dist.mk,v 1.571 2007/01/06 17:55:39 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 = 6
-NCURSES_PATCH = 20061230
+NCURSES_PATCH = 20070106
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 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.55 2006/08/19 14:17:49 tom Exp $
+ * $Id: tic.h,v 1.57 2007/01/06 23:17:38 tom Exp $
* tic.h - Global variables and structures for the terminfo
* compiler.
*/
* List of keynames with their corresponding code.
*/
struct kn {
- const char *name;
+ int offset;
int code;
};
#else
-extern NCURSES_EXPORT_VAR(struct tinfo_fkeys) _nc_tinfo_fkeys[];
+extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
#endif
-# $Id: MKkeyname.awk,v 1.30 2006/05/20 17:35:30 tom Exp $
+# $Id: MKkeyname.awk,v 1.31 2007/01/06 21:19:44 Miroslav.Lichvar Exp $
##############################################################################
-# Copyright (c) 1999-2005,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1999-2006,2007 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"), #
}
/^[^#]/ {
- printf "\t{ \"%s\", %s },\n", $1, $1;
+ printf "\t{ %d, %s },\n", offset, $1
+ offset += length($1) + 1
+ names = names"\n\t\""$1"\\0\""
}
END {
- printf "\t{ 0, 0 }};\n"
+ printf "\t{ -1, 0 }};\n"
+ print ""
+ print "static const char key_names[] = "names";"
print ""
print "#define SIZEOF_TABLE 256"
print "static char **keyname_table;"
print " if (c == -1) {"
print " result = \"-1\";"
print " } else {"
- print " for (i = 0; _nc_key_names[i].name != 0; i++) {"
+ print " for (i = 0; _nc_key_names[i].offset != -1; i++) {"
print " if (_nc_key_names[i].code == c) {"
- print " result = (NCURSES_CONST char *)_nc_key_names[i].name;"
+ print " result = (NCURSES_CONST char *)key_names + _nc_key_names[i].offset;"
print " break;"
print " }"
print " }"
-# $Id: MKunctrl.awk,v 1.12 2006/12/30 18:12:12 tom Exp $
+# $Id: MKunctrl.awk,v 1.13 2007/01/06 22:52:02 tom Exp $
##############################################################################
-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2007 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"), #
print "NCURSES_EXPORT(NCURSES_CONST char *) unctrl (register chtype ch)"
print "{"
- printf "static const char* const unctrl_table[] = {"
+ blob=""
+ offset=0
+ printf "static const short unctrl_table[] = {"
for ( ch = 0; ch < 256; ch++ ) {
gap = ","
- if ((ch % 8) == 0)
+ part=""
+ if ((ch % 8) == 0) {
printf "\n "
+ if (ch != 0)
+ blob = blob "\""
+ blob = blob "\n \""
+ }
+ printf "%4d%s", offset, gap;
if (ch < 32) {
- printf "\"^\\%03o\"", ch + 64
+ part = sprintf ("^\\%03o\\0", ch + 64);
+ offset = offset + 3;
} else if (ch == 127) {
- printf "\"^?\""
+ part = "^?\\0";
+ offset = offset + 3;
} else if (ch >= 128 && ch < 160) {
- printf "\"~\\%03o\"", ch - 64
+ part = sprintf("~\\%03o\\0", ch - 64);
+ offset = offset + 3;
} else {
- printf "\"\\%03o\"", ch
gap = gap " "
+ part = sprintf("\\%03o\\0", ch);
+ offset = offset + 2;
}
+ blob = blob part
if (ch == 255)
gap = "\n"
else if (((ch + 1) % 8) != 0)
gap = gap " "
- printf "%s", gap
}
print "};"
+ blob = blob "\"";
print ""
print "#if NCURSES_EXT_FUNCS"
- printf "static const char* const unctrl_c1[] = {"
+ blob = blob "\n#if NCURSES_EXT_FUNCS"
+ printf "static const short unctrl_c1[] = {"
for ( ch = 128; ch < 160; ch++ ) {
gap = ","
- if ((ch % 8) == 0)
+ if ((ch % 8) == 0) {
+ if (ch != 128)
+ blob = blob "\""
printf "\n "
- if (ch >= 128 && ch < 160) {
- printf "\"\\%03o\"", ch
- gap = gap " "
+ blob = blob "\n \""
}
- if (ch == 255)
- gap = "\n"
- else if (((ch + 1) % 8) != 0)
+ printf "%4d%s", offset, gap;
+ part = sprintf("\\%03o\\0", ch);
+ blob = blob part
+ offset = offset + 2;
+ if (((ch + 1) % 8) != 0)
gap = gap " "
- printf "%s", gap
}
print "};"
print "#endif /* NCURSES_EXT_FUNCS */"
+ blob = blob "\"\n#endif /* NCURSES_EXT_FUNCS */\n"
+ print ""
+ print "static const char unctrl_blob[] = "blob";"
print ""
print "\tint check = ChCharOf(ch);"
print "\tconst char *result;"
print "\t\t && (SP->_legacy_coding > 1)"
print "\t\t && (check >= 128)"
print "\t\t && (check < 160))"
- print "\t\t\tresult = unctrl_c1[check - 128];"
+ print "\t\t\tresult = unctrl_blob + unctrl_c1[check - 128];"
print "\t\telse"
print "#endif /* NCURSES_EXT_FUNCS */"
- print "\t\t\tresult = unctrl_table[check];"
+ print "\t\t\tresult = unctrl_blob + unctrl_table[check];"
print "\t} else {"
print "\t\tresult = 0;"
print "\t}"
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 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: curses.priv.h,v 1.317 2006/12/30 21:36:59 tom Exp $
+ * $Id: curses.priv.h,v 1.319 2007/01/06 21:16:26 tom Exp $
*
* curses.priv.h
*
int _checkfd; /* filedesc for typeahead check */
TERMINAL *_term; /* terminal type information */
TTY _saved_tty; /* savetty/resetty information */
- short _lines; /* screen lines */
- short _columns; /* screen columns */
+ NCURSES_SIZE_T _lines; /* screen lines */
+ NCURSES_SIZE_T _columns; /* screen columns */
- short _lines_avail; /* lines available for stdscr */
- short _topstolen; /* lines stolen from top */
+ NCURSES_SIZE_T _lines_avail; /* lines available for stdscr */
+ NCURSES_SIZE_T _topstolen; /* lines stolen from top */
ripoff_t _rippedoff[5]; /* list of lines stolen */
int _rip_count; /* ...and total lines stolen */
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2007 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_TERMLIB 1
#include <curses.priv.h>
-MODULE_ID("$Id: make_keys.c,v 1.12 2005/08/20 19:58:18 tom Exp $")
+MODULE_ID("$Id: make_keys.c,v 1.13 2007/01/07 00:00:14 tom Exp $")
#include <names.c>
"#if BROKEN_LINKER",
"static",
"#endif",
- "struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
+ "const struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
0
};
static const char *suffix[] =
/****************************************************************************
- * Copyright (c) 2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2006,2007 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: chgat.c,v 1.5 2006/07/15 22:48:27 tom Exp $
+ * $Id: chgat.c,v 1.6 2007/01/06 23:28:46 tom Exp $
*
* test-driver for chgat/wchgat/mvchgat/mvwchgat
*/
int pair, attr;
int count;
int ch;
- char *c_msg;
- char *v_msg;
+ const char *c_msg;
+ const char *v_msg;
int y_val;
int x_val;
int y_beg, x_beg;
int y_max, x_max;
} STATUS;
-static char *
+static const char *
color_params(unsigned state, int *pair)
{
/* *INDENT-OFF* */
static struct {
int pair;
int fg, bg;
- char *msg;
+ const char *msg;
} table[] = {
{ 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
{ 1, COLOR_RED, COLOR_BLACK, "red/black" },
/* *INDENT-ON* */
static bool first = TRUE;
- char *result = 0;
+ const char *result = 0;
if (has_colors()) {
if (first) {
return result;
}
-static char *
+static const char *
video_params(unsigned state, int *attr)
{
/* *INDENT-OFF* */
static struct {
int attr;
- char *msg;
+ const char *msg;
} table[] = {
{ A_NORMAL, "normal" },
{ A_BOLD, "bold" },
};
/* *INDENT-ON* */
- char *result = 0;
+ const char *result = 0;
if (state < SIZEOF(table)) {
*attr = table[state].attr;
/****************************************************************************
- * Copyright (c) 2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2006,2007 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: movewindow.c,v 1.19 2006/06/17 17:43:22 tom Exp $
+ * $Id: movewindow.c,v 1.20 2007/01/06 23:28:53 tom Exp $
*
* Demonstrate move functions for windows and derived windows from the curses
* library.
WINDOW *child; /* the actual value */
} FRAME;
-static void head_line(char *fmt,...) GCC_PRINTFLIKE(1, 2);
-static void tail_line(char *fmt,...) GCC_PRINTFLIKE(1, 2);
+static void head_line(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
+static void tail_line(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
static unsigned num_windows;
static FRAME *all_windows;
static void
-message(int lineno, char *fmt, va_list argp)
+message(int lineno, const char *fmt, va_list argp)
{
int y, x;
}
static void
-head_line(char *fmt,...)
+head_line(const char *fmt,...)
{
va_list argp;
}
static void
-tail_line(char *fmt,...)
+tail_line(const char *fmt,...)
{
va_list argp;
/* *INDENT-OFF* */
static struct {
int key;
- char * msg;
+ const char * msg;
} help[] = {
{ '?', "Show this screen" },
{ 'b', "Draw a box inside the current window" },
/****************************************************************************
- * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,2007 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 *
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.280 2006/12/10 00:13:15 tom Exp $
+$Id: ncurses.c,v 1.281 2007/01/06 23:32:00 tom Exp $
***************************************************************************/
/* *INDENT-OFF* */
static struct {
attr_t attr;
- char *name;
+ const char *name;
} attrs_to_cycle[] = {
{ A_NORMAL, "normal" },
{ A_BOLD, "bold" },