/****************************************************************************
- * Copyright (c) 1998,2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2010,2011 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 *
/*
Version Control
- $Id: gen.c,v 1.54 2010/09/04 21:19:50 tom Exp $
+ $Id: gen.c,v 1.55 2011/03/05 20:24:22 tom Exp $
--------------------------------------------------------------------------*/
/*
This program generates various record structures and constants from the
int len, /* size of the record in bytes */
int bias)
{
- int i, n, l, cnt = 0, low, high;
+ const char *unused_name = "Unused";
+ int long_bits = (8 * (int)sizeof(unsigned long));
+ int len_bits = (8 * len);
+ int i, j, n, l, cnt = 0, low, high;
int width = strlen(RES_NAME) + 3;
unsigned long a;
unsigned long mask = 0;
printf(" record\n");
for (i = 0; nap[i].name != (char *)0; i++)
{
+ mask |= nap[i].attr;
printf(" %-*s : Boolean;\n", width, nap[i].name);
}
+
+ /*
+ * Compute a mask for the unused bits in this target.
+ */
+ mask = ~mask;
+ /*
+ * Bits in the biased area are unused by the target.
+ */
+ for (j = 0; j < bias; ++j)
+ {
+ mask &= (unsigned long)(~(1L << j));
+ }
+ /*
+ * Bits past the target's size are really unused.
+ */
+ for (j = len_bits + bias; j < long_bits; ++j)
+ {
+ mask &= (unsigned long)(~(1L << j));
+ }
+ if (mask != 0)
+ {
+ printf(" %-*s : Boolean;\n", width, unused_name);
+ }
printf(" end record;\n");
printf(" pragma Convention (C, %s);\n\n", name);
for (i = 0; nap[i].name != (char *)0; i++)
{
a = nap[i].attr;
- mask |= a;
l = find_pos((char *)&a, sizeof(a), &low, &high);
if (l >= 0)
printf(" %-*s at 0 range %2d .. %2d;\n", width, nap[i].name,
low - bias, high - bias);
}
+ if (mask != 0)
+ {
+ l = find_pos((char *)&mask, sizeof(mask), &low, &high);
+ if (l >= 0)
+ printf(" %-*s at 0 range %2d .. %2d;\n", width, unused_name,
+ low - bias, high - bias);
+ }
i = 1;
n = cnt;
printf(" end record;\n");
- printf(" for %s'Size use %d;\n", name, 8 * len);
+ printf(" for %s'Size use %d;\n", name, len_bits);
printf(" -- Please note: this rep. clause is generated and may be\n");
printf(" -- different on your system.");
}
##############################################################################
-# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2010,2011 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"), #
#
# Author: Juergen Pfeifer, 1996
#
-# $Id: Makefile.in,v 1.40 2010/11/27 21:45:27 tom Exp $
+# $Id: Makefile.in,v 1.41 2011/03/06 01:22:23 Nicolas.Boulenguez Exp $
#
.SUFFIXES:
ncurses$x :
$(ADAMAKE) $(ADAMAKEFLAGS) ncurses $(CARGS) $(LARGS)
-tour$x : explain.msg
+tour$x :
$(ADAMAKE) $(ADAMAKEFLAGS) tour $(CARGS) $(LARGS)
-explain.msg: $(srcdir)/explain.txt
- cp $(srcdir)/explain.txt $@
-
rain$x :
$(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS)
clean :: mostlyclean
rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \
- explain.msg trace screendump b~*.ad[bs]
+ trace screendump b~*.ad[bs]
distclean :: clean
rm -f Makefile
-- B O D Y --
-- --
------------------------------------------------------------------------------
--- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2009,2011 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: Juergen Pfeifer, 1996
-- Version Control
--- $Revision: 1.21 $
--- $Date: 2009/12/26 17:38:58 $
+-- $Revision: 1.22 $
+-- $Date: 2011/03/06 01:22:23 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- Poor mans help system. This scans a sequential file for key lines and
Help_Keys : constant String := "HELPKEYS";
In_Help : constant String := "INHELP";
- File_Name : constant String := "explain.msg";
+ File_Name : constant String := "explain.txt";
F : File_Type;
type Help_Line;
------------------------------------------------------------------------------
--- Copyright (c) 2010 Free Software Foundation, Inc. --
+-- Copyright (c) 2010,2011 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 --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
--- $Id: library.gpr,v 1.5 2010/11/27 22:15:04 tom Exp $
+-- $Id: library.gpr,v 1.6 2011/03/06 01:22:23 Nicolas.Boulenguez Exp $
-- http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Library-Projects.html
-- http://www.adaworld.com/debian/debian-ada-policy.html
project Library is
for Source_Dirs use (Source_Dir & "/src",
Source_Dir2,
Build_Dir & "/src");
+ for Library_Options use ("-lpanel", "-lmenu", "-lform");
package Compiler is
for Default_Switches ("Ada") use
("-g",
-------------------------------------------------------------------------------
--- Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2010,2011 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 --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: INSTALL,v 1.152 2011/02/25 22:10:53 tom Exp $
+-- $Id: INSTALL,v 1.153 2011/03/05 19:09:48 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
--enable-widec is not given) a character. Prior to ncurses 5.5, this
was always unsigned long, but with ncurses 5.5, it may be unsigned.
Use this option if you need to preserve compatibility with 64-bit
- executables.
+ executables, e.g., by setting "--with-chtype=long" (the configure
+ script supplies "unsigned").
--with-database=XXX
Specify the terminfo source file to install. Usually you will wish
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1651 2011/02/26 16:54:31 tom Exp $
+-- $Id: NEWS,v 1.1654 2011/03/06 01:25:25 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.
+20110305
+ + improve makefiles for Ada95 tree (patch by Nicolas Boulenguez).
+ + fix an off-by-one error in _nc_slk_initialize() from 20100605 fixes
+ for compiler warnings (report by Nicolas Boulenguez).
+ + modify Ada95/gen/gen.c to declare unused bits in generated layouts,
+ needed to compile when chtype is 64-bits using gnat 4.4.5
+
20110226 5.8 release for upload to ftp.gnu.org
20110226
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.800 2011/02/25 22:11:00 tom Exp $
+# $Id: dist.mk,v 1.801 2011/03/05 15:31:36 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 = 8
-NCURSES_PATCH = 20110226
+NCURSES_PATCH = 20110305
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2011 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 CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_slk.c,v 1.47 2010/12/25 22:58:58 tom Exp $")
+MODULE_ID("$Id: lib_slk.c,v 1.48 2011/03/05 21:21:52 tom Exp $")
#ifdef USE_TERM_DRIVER
#define NumLabels InfoOf(SP_PARM).numlabels
{
int i;
int res = OK;
- int max_length;
+ size_t max_length;
SCREEN *sp;
int numlab;
== NULL)
returnCode(slk_failed(NCURSES_SP_ARG));
- max_length = SP_PARM->_slk->maxlen;
+ max_length = (size_t) SP_PARM->_slk->maxlen;
for (i = 0; i < SP_PARM->_slk->labcnt; i++) {
- size_t used = (size_t) max_length + 1;
+ size_t used = max_length + 1;
SP_PARM->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used);
if (SP_PARM->_slk->ent[i].ent_text == 0)
if (SP_PARM->_slk->ent[i].form_text == 0)
returnCode(slk_failed(NCURSES_SP_ARG));
- memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1);
- SP_PARM->_slk->ent[i].form_text[used] = '\0';
+ if (used > 1) {
+ memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1);
+ }
+ SP_PARM->_slk->ent[i].form_text[used - 1] = '\0';
SP_PARM->_slk->ent[i].visible = (char) (i < SP_PARM->_slk->maxlab);
}