-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2250 2014/08/02 20:51:48 tom Exp $
+-- $Id: NEWS,v 1.2257 2014/08/09 22:05:47 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.
+20140809
+ + modify declarations for user-data pointers in C++ binding to use
+ reinterpret_cast to facilitate converting typed pointers to void*
+ in user's application (patch by Adam Jiang).
+ + regenerated html manpages.
+ + add note regarding cause and effect for TERM in ncurses manpage,
+ having noted clueless verbiage in Terminal.app's "help" file
+ which reverses cause/effect.
+ + remove special fallback definition for NCURSES_ATTR_T, since macros
+ have resolved type-mismatches using casts (cf: 970412).
+ + fixes for win_driver.c:
+ + handle repainting on endwin/refresh combination.
+ + implement beep().
+ + minor cleanup.
+
20140802
+ minor portability fixes for MinGW:
+ ensure WINVER is defined in makefiles rather than using headers
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2014 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, 1997 *
****************************************************************************/
-// $Id: cursesf.h,v 1.31 2012/12/29 21:49:58 tom Exp $
+// $Id: cursesf.h,v 1.32 2014/08/09 22:06:11 Adam.Jiang Exp $
#ifndef NCURSES_CURSESF_H_incl
#define NCURSES_CURSESF_H_incl 1
const T* p_UserData = STATIC_CAST(T*)(0))
: NCursesForm(nlines,ncols,begin_y,begin_x) {
if (form)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>
+ (p_UserData)));
}
public:
bool autoDelete_Fields=FALSE)
: NCursesForm (Fields, with_frame, autoDelete_Fields) {
if (form)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
};
NCursesUserForm (NCursesFormField* Fields[],
: NCursesForm (Fields, nlines, ncols, begin_y, begin_x,
with_frame, autoDelete_Fields) {
if (form)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>
+ (p_UserData)));
};
virtual ~NCursesUserForm() {
};
- inline T* UserData (void) const {
+ inline T* UserData (void) {
return reinterpret_cast<T*>(get_user ());
};
inline virtual void setUserData (const T* p_UserData) {
if (form)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
}
};
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2014 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, 1997 *
****************************************************************************/
-// $Id: cursesm.h,v 1.29 2012/12/29 21:48:33 tom Exp $
+// $Id: cursesm.h,v 1.30 2014/08/09 22:06:18 Adam.Jiang Exp $
#ifndef NCURSES_CURSESM_H_incl
#define NCURSES_CURSESM_H_incl 1
const T* p_UserData = STATIC_CAST(T*)(0))
: NCursesMenu(nlines,ncols,begin_y,begin_x) {
if (menu)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
}
public:
bool autoDelete_Items=FALSE)
: NCursesMenu (Items, with_frame, autoDelete_Items) {
if (menu)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
};
NCursesUserMenu (NCursesMenuItem* Items[],
bool with_frame=FALSE)
: NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
if (menu)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
};
virtual ~NCursesUserMenu() {
};
- inline T* UserData (void) const {
+ inline T* UserData (void) {
return reinterpret_cast<T*>(get_user ());
};
inline virtual void setUserData (const T* p_UserData) {
if (menu)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
}
};
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998-2008,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2014 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 *
#ifndef NCURSES_CURSESP_H_incl
#define NCURSES_CURSESP_H_incl 1
-// $Id: cursesp.h,v 1.30 2012/12/29 21:50:55 tom Exp $
+// $Id: cursesp.h,v 1.31 2014/08/09 22:06:26 Adam.Jiang Exp $
#include <cursesw.h>
: NCursesPanel (nlines, ncols, begin_y, begin_x)
{
if (p)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>
+ (p_UserData)));
};
// This creates an user panel of the requested size with associated
// user data pointed to by p_UserData.
NCursesUserPanel(const T* p_UserData = STATIC_CAST(T*)(0)) : NCursesPanel()
{
if (p)
- set_user(const_cast<void *>(p_UserData));
+ set_user(const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
};
// This creates an user panel associated with the ::stdscr and user data
// pointed to by p_UserData.
virtual ~NCursesUserPanel() {};
- T* UserData (void) const
+ T* UserData (void)
{
return reinterpret_cast<T*>(get_user ());
};
virtual void setUserData (const T* p_UserData)
{
if (p)
- set_user (const_cast<void *>(p_UserData));
+ set_user (const_cast<void *>(reinterpret_cast<const void*>(p_UserData)));
}
// Associate the user panel with the user data pointed to by p_UserData.
};
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.999 2014/08/01 23:41:10 tom Exp $
+# $Id: dist.mk,v 1.1000 2014/08/09 00:33:11 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 = 20140802
+NCURSES_PATCH = 20140809
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--
****************************************************************************
- * Copyright (c) 2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2010-2011,2014 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: MKada_config.in,v 1.5 2011/03/26 14:44:51 tom Exp @
+ * @Id: MKada_config.in,v 1.8 2014/06/07 19:32:52 tom Exp @
-->
<HTML>
<HEAD>
<STRONG>--help</STRONG> prints a list of the <STRONG>adacurses-config</STRONG> script's
options.
+ If no options are given, <STRONG>adacurses-config</STRONG> prints the com-
+ bination of <STRONG>--cflags</STRONG> and <STRONG>--libs</STRONG> that <STRONG>gnatmake</STRONG> expects (see
+ example).
+
+
+</PRE>
+<H2>EXAMPLE</H2><PRE>
+ For example, supposing that you want to compile the "Hello
+ World!" program for AdaCurses. Make a file named
+ "hello.adb":
+ with Terminal_Interface.Curses; use Terminal_Interface.Curses;
+
+ procedure Hello is
+
+ Visibility : Cursor_Visibility := Invisible;
+ done : Boolean := False;
+ c : Key_Code;
+
+ begin
+
+ Init_Screen;
+ Set_Echo_Mode (False);
+
+ Set_Cursor_Visibility (Visibility);
+ Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
+
+ Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2);
+ Add (Str => "Hello World!");
+
+ while not done loop
+
+ c := Get_Keystroke (Standard_Window);
+ case c is
+ when Character'Pos ('q') => done := True;
+ when others => null;
+ end case;
+
+ Nap_Milli_Seconds (50);
+
+ end loop;
+
+ End_Windows;
+
+ end Hello;
+
+ Then, using
+ gnatmake `adacurses-config --cflags` hello -largs
+ `adacurses-config --libs`
+
+ or (simpler):
+ gnatmake hello `adacurses-config`
+
+ you will compile and link the program.
+
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
</PRE>
<H2>SEE ALSO</H2><PRE>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
<!--
* t
****************************************************************************
- * Copyright (c) 1998-2007,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2014 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: form_field_opts.3x,v 1.16 2010/12/04 18:41:07 tom Exp @
+ * @Id: form_field_opts.3x,v 1.17 2014/07/26 21:21:57 tom Exp @
-->
<HTML>
<HEAD>
The function <STRONG>field_opts</STRONG> returns the field's current option
bits.
- The following options are defined (all are on by default):
-
- O_VISIBLE
- The field is displayed. If this option is off, dis-
- play of the field is suppressed.
+ The following standard options are defined (all are on by
+ default):
O_ACTIVE
The field is visited during processing. If this
navigation keys. Please notice that an invisible
field appears to be inactive also.
- O_PUBLIC
- The field contents are displayed as data is entered.
-
- O_EDIT
- The field can be edited.
-
- O_WRAP
- Words that do not fit on a line are wrapped to the
- next line. Words are blank-separated.
+ O_AUTOSKIP
+ Skip to the next field when this one fills.
O_BLANK
- The field is cleared whenever a character is entered
+ The field is cleared whenever a character is entered
at the first position.
- O_AUTOSKIP
- Skip to the next field when this one fills.
+ O_EDIT
+ The field can be edited.
O_NULLOK
Allow a blank field.
+ O_PASSOK
+ Validate field only if modified by user.
+
+ O_PUBLIC
+ The field contents are displayed as data is entered.
+
O_STATIC
- Field buffers are fixed to field's original size.
+ Field buffers are fixed to field's original size.
Turn this option off to create a dynamic field.
- O_PASSOK
- Validate field only if modified by user.
+ O_VISIBLE
+ The field is displayed. If this option is off, dis-
+ play of the field is suppressed.
+
+ O_WRAP
+ Words that do not fit on a line are wrapped to the
+ next line. Words are blank-separated.
+
+ One extension option is defined (extensions are off by
+ default):
+
+ O_DYNAMIC_JUSTIFY
+ Permit dynamic fields to be justified, like static
+ fields.
</PRE>
<H2>RETURN VALUE</H2><PRE>
- Except for <STRONG>field_opts</STRONG>, each routine returns one of the
+ Except for <STRONG>field_opts</STRONG>, each routine returns one of the
following:
<STRONG>E_OK</STRONG> The routine succeeded.
<STRONG>E_BAD_ARGUMENT</STRONG>
- Routine detected an incorrect or out-of-range argu-
+ Routine detected an incorrect or out-of-range argu-
ment.
<STRONG>E_CURRENT</STRONG>
</PRE>
<H2>SEE ALSO</H2><PRE>
- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="form.3x.html">form(3x)</A></STRONG>. <STRONG><A HREF="form_field_just.3x.html">form_field_just(3x)</A></STRONG>.
</PRE>
</PRE>
<H2>PORTABILITY</H2><PRE>
- These routines emulate the System V forms library. They
+ These routines emulate the System V forms library. They
were not supported on Version 7 or BSD versions.
</PRE>
<H2>AUTHORS</H2><PRE>
- Juergen Pfeifer. Manual pages and adaptation for new
+ Juergen Pfeifer. Manual pages and adaptation for new
curses by Eric S. Raymond.
http://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
</PRE>
</PRE>
<H2>SEE ALSO</H2><PRE>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: ncurses.3x,v 1.117 2014/05/24 20:29:27 tom Exp @
+ * @Id: ncurses.3x,v 1.119 2014/08/09 20:54:30 tom Exp @
-->
<HTML>
<HEAD>
sonable optimization. This implementation is "new curses"
(ncurses) and is the approved replacement for 4.4BSD clas-
sic curses, which has been discontinued. This describes
- <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
The <STRONG>ncurses</STRONG> library emulates the curses library of System
V Release 4 UNIX, and XPG4 (X/Open Portability Guide)
TERM Denotes your terminal type. Each terminal type is
distinct, though many are similar.
+ <STRONG>TERM</STRONG> is commonly set by terminal emulators to help
+ applications find a workable terminal description.
+ Some of those choose a popular approximation, e.g.,
+ "ansi", "vt100", "xterm" rather than an exact fit.
+ Not infrequently, your application will have problems
+ with that approach, e.g., incorrect function-key def-
+ initions.
+
+ If you set <STRONG>TERM</STRONG> in your environment, it has no effect
+ on the operation of the terminal emulator. It only
+ affects the way applications work within the termi-
+ nal. Likewise, as a general rule (<STRONG>xterm</STRONG> being a rare
+ exception), terminal emulators which allow you to
+ specify <STRONG>TERM</STRONG> as a parameter or configuration value do
+ not change their behavior to match that setting.
+
TERMCAP
If the <STRONG>ncurses</STRONG> library has been configured with <EM>term-</EM>
<EM>cap</EM> support, <STRONG>ncurses</STRONG> will check for a terminal's
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
nals by giving a set of capabilities which they have, by
specifying how to perform screen operations, and by speci-
fying padding requirements and initialization sequences.
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
Entries in <EM>terminfo</EM> consist of a sequence of `,' separated
fields (embedded commas may be escaped with a backslash or
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>. <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
</PRE>
<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
<STRONG>csh(1)</STRONG>, <STRONG>sh(1)</STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>tty(4)</STRONG>,
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
- This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140524).
+ This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20140809).
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: curses.h.in,v 1.240 2014/08/02 16:01:30 tom Exp $ */
+/* $Id: curses.h.in,v 1.241 2014/08/09 20:39:44 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
* NCURSES_ATTR_T is used to quiet compiler warnings when building ncurses
* configured using --disable-macros.
*/
-#ifdef NCURSES_NOMACROS
-#ifndef NCURSES_ATTR_T
-#define NCURSES_ATTR_T attr_t
-#endif
-#endif /* NCURSES_NOMACROS */
-
#ifndef NCURSES_ATTR_T
#define NCURSES_ATTR_T int
#endif
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: ncurses.3x,v 1.117 2014/05/24 20:29:27 tom Exp $
+.\" $Id: ncurses.3x,v 1.119 2014/08/09 20:54:30 tom Exp $
.hy 0
.TH ncurses 3X ""
.ie \n(.g .ds `` \(lq
TERM
Denotes your terminal type.
Each terminal type is distinct, though many are similar.
+.IP
+\fBTERM\fP is commonly set by terminal emulators to help
+applications find a workable terminal description.
+Some of those choose a popular approximation, e.g.,
+\*(``ansi\*('', \*(``vt100\*('', \*(``xterm\*('' rather than an exact fit.
+Not infrequently, your application will have problems with that approach,
+e.g., incorrect function-key definitions.
+.IP
+If you set \fBTERM\fP in your environment,
+it has no effect on the operation of the terminal emulator.
+It only affects the way applications work within the terminal.
+Likewise, as a general rule (\fBxterm\fP being a rare exception),
+terminal emulators which allow you to
+specify \fBTERM\fP as a parameter or configuration value do
+not change their behavior to match that setting.
.TP 5
TERMCAP
If the \fBncurses\fR library has been configured with \fItermcap\fR
/*
* TODO - GetMousePos(POINT * result) from ntconio.c
* TODO - implement nodelay
+ * TODO - implement flash
+ * TODO - improve screen-repainting, using implied wraparound
+ * TODO - if non-buffered, change buffer size (temporarily) to window-size - SetConsoleScreenBufferSize
*/
#include <curses.priv.h>
#define CUR my_term.type.
-MODULE_ID("$Id: win_driver.c,v 1.39 2014/06/29 22:48:17 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.43 2014/08/09 20:31:40 tom Exp $")
#ifndef __GNUC__
# error We need GCC to compile for MinGW
WORD pairs[NUMPAIRS];
COORD origin;
CHAR_INFO *save_screen;
+ COORD save_size;
+ SMALL_RECT save_region;
CONSOLE_SCREEN_BUFFER_INFO SBI;
} CON;
return res;
}
+#if 0 /* def TRACE */
+static void
+dump_screen(const char *fn, int ln)
+{
+ int max_cells = (CON.SBI.dwSize.Y * (1 + CON.SBI.dwSize.X)) + 1;
+ char output[max_cells];
+ CHAR_INFO save_screen[max_cells];
+ COORD save_size;
+ SMALL_RECT save_region;
+ COORD bufferCoord;
+
+ T(("dump_screen %s@%d", fn, ln));
+
+ save_region.Top = CON.SBI.srWindow.Top;
+ save_region.Left = CON.SBI.srWindow.Left;
+ save_region.Bottom = CON.SBI.srWindow.Bottom;
+ save_region.Right = CON.SBI.srWindow.Right;
+
+ save_size.X = (SHORT) (save_region.Right - save_region.Left + 1);
+ save_size.Y = (SHORT) (save_region.Bottom - save_region.Top + 1);
+
+ bufferCoord.X = bufferCoord.Y = 0;
+
+ if (ReadConsoleOutput(CON.hdl,
+ save_screen,
+ save_size,
+ bufferCoord,
+ &save_region)) {
+ int i, j;
+ int ij = 0;
+ int k = 0;
+
+ for (i = save_region.Top; i <= save_region.Bottom; ++i) {
+ for (j = save_region.Left; j <= save_region.Right; ++j) {
+ output[k++] = save_screen[ij++].Char.AsciiChar;
+ }
+ output[k++] = '\n';
+ }
+ output[k] = 0;
+
+ T(("DUMP: %d,%d - %d,%d",
+ save_region.Top,
+ save_region.Left,
+ save_region.Bottom,
+ save_region.Right));
+ T(("%s", output));
+ }
+}
+
+#else
+#define dump_screen(fn,ln) /* nothing */
+#endif
+
#if USE_WIDEC_SUPPORT
/*
* TODO: support surrogate pairs
* TODO: support combining characters
* TODO: support acsc
- * TODO: check wcwidth of base character, fill if needed for double-width
* TODO: _nc_wacs should be part of sp.
*/
static BOOL
++actual;
}
- loc.X = (short) 0;
- loc.Y = (short) 0;
- siz.X = (short) actual;
+ loc.X = (SHORT) 0;
+ loc.Y = (SHORT) 0;
+ siz.X = (SHORT) actual;
siz.Y = 1;
- rec.Left = (short) x;
+ rec.Left = (SHORT) x;
rec.Top = (SHORT) (y + AdjustY());
- rec.Right = (short) (x + limit - 1);
+ rec.Right = (SHORT) (x + limit - 1);
rec.Bottom = rec.Top;
return WriteConsoleOutputW(CON.hdl, ci, siz, loc, &rec);
restore_original_screen(void)
{
COORD bufferCoord;
- SMALL_RECT writeRegion;
bool result = FALSE;
+ SMALL_RECT save_region = CON.save_region;
- if (CON.window_only) {
- writeRegion.Top = CON.SBI.srWindow.Top;
- writeRegion.Left = CON.SBI.srWindow.Left;
- writeRegion.Bottom = CON.SBI.srWindow.Bottom;
- writeRegion.Right = CON.SBI.srWindow.Right;
- T(("... restoring window"));
- } else {
- writeRegion.Top = 0;
- writeRegion.Left = 0;
- writeRegion.Bottom = (SHORT) (CON.SBI.dwSize.Y - 1);
- writeRegion.Right = (SHORT) (CON.SBI.dwSize.X - 1);
- T(("... restoring entire buffer"));
- }
+ T(("... restoring %s", CON.window_only ? "window" : "entire buffer"));
bufferCoord.X = bufferCoord.Y = 0;
if (WriteConsoleOutput(CON.hdl,
CON.save_screen,
- CON.SBI.dwSize,
+ CON.save_size,
bufferCoord,
- &writeRegion)) {
+ &save_region)) {
result = TRUE;
mvcur(-1, -1, LINES - 2, 0);
+ T(("... restore original screen contents ok %dx%d (%d,%d - %d,%d)",
+ CON.save_size.Y,
+ CON.save_size.X,
+ save_region.Top,
+ save_region.Left,
+ save_region.Bottom,
+ save_region.Right));
+ } else {
+ T(("... restore original screen contents err"));
}
- T(("... restore original screen contents %s", result ? "ok" : "err"));
return result;
}
Height = screen_lines(sp);
nonempty = min(Height, NewScreen(sp)->_maxy + 1);
+ T(("... %dx%d clear cur:%d new:%d",
+ Height, Width,
+ CurScreen(sp)->_clear,
+ NewScreen(sp)->_clear));
+
+ if (SP_PARM->_endwin) {
+
+ T(("coming back from shell mode"));
+ NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
+
+ NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
+ NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
+ SP_PARM->_mouse_resume(SP_PARM);
+
+ SP_PARM->_endwin = FALSE;
+ }
+
if ((CurScreen(sp)->_clear || NewScreen(sp)->_clear)) {
int x;
#if USE_WIDEC_SUPPORT
CurScreen(sp)->_clear = FALSE;
NewScreen(sp)->_clear = FALSE;
touchwin(NewScreen(sp));
+ T(("... cleared %dx%d lines @%d of screen", nonempty, Width,
+ AdjustY()));
}
for (y = 0; y < nonempty; y++) {
int beepFlag GCC_UNUSED)
{
SCREEN *sp;
- int res = ERR;
+ int res = OK;
AssertTCB();
SetSP();
+ MessageBeep(MB_ICONWARNING); /* MB_OK might be better */
return res;
}
code = OK;
}
}
+ T(("... buffered:%d, clear:%d", CON.buffered, CurScreen(sp)->_clear));
} else { /* shell mode */
if (defFlag) {
/* def_shell_mode */
}
}
- return (code);
+ returnCode(code);
}
static void
returnVoid;
}
-/*
- * Attempt to save the screen contents. PDCurses does this if
- * PDC_RESTORE_SCREEN is set, giving the same visual appearance on restoration
- * as if the library had allocated a console buffer.
- */
static bool
-save_original_screen(void)
+read_screen_data(void)
{
bool result = FALSE;
- COORD bufferSize;
COORD bufferCoord;
- SMALL_RECT readRegion;
size_t want;
- bufferSize.X = CON.SBI.dwSize.X;
- bufferSize.Y = CON.SBI.dwSize.Y;
- want = (size_t) (bufferSize.X * bufferSize.Y);
+ CON.save_size.X = (SHORT) (CON.save_region.Right
+ - CON.save_region.Left + 1);
+ CON.save_size.Y = (SHORT) (CON.save_region.Bottom
+ - CON.save_region.Top + 1);
+
+ want = (size_t) (CON.save_size.X * CON.save_size.Y);
if ((CON.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) {
bufferCoord.X = bufferCoord.Y = 0;
- readRegion.Top = 0;
- readRegion.Left = 0;
- readRegion.Bottom = (SHORT) (bufferSize.Y - 1);
- readRegion.Right = (SHORT) (bufferSize.X - 1);
-
- T(("... reading console buffer %dx%d into %d,%d - %d,%d at %d,%d",
- bufferSize.Y, bufferSize.X,
- readRegion.Top,
- readRegion.Left,
- readRegion.Bottom,
- readRegion.Right,
+ T(("... reading console %s %dx%d into %d,%d - %d,%d at %d,%d",
+ CON.window_only ? "window" : "buffer",
+ CON.save_size.Y, CON.save_size.X,
+ CON.save_region.Top,
+ CON.save_region.Left,
+ CON.save_region.Bottom,
+ CON.save_region.Right,
bufferCoord.Y,
bufferCoord.X));
if (ReadConsoleOutput(CON.hdl,
CON.save_screen,
- bufferSize,
+ CON.save_size,
bufferCoord,
- &readRegion)) {
+ &CON.save_region)) {
result = TRUE;
} else {
T((" error %#lx", (unsigned long) GetLastError()));
FreeAndNull(CON.save_screen);
+ }
+ }
- bufferSize.X = (SHORT) (CON.SBI.srWindow.Right
- - CON.SBI.srWindow.Left + 1);
- bufferSize.Y = (SHORT) (CON.SBI.srWindow.Bottom
- - CON.SBI.srWindow.Top + 1);
- want = (size_t) (bufferSize.X * bufferSize.Y);
-
- if ((CON.save_screen = malloc(want * sizeof(CHAR_INFO))) != 0) {
- bufferCoord.X = bufferCoord.Y = 0;
-
- readRegion.Top = CON.SBI.srWindow.Top;
- readRegion.Left = CON.SBI.srWindow.Left;
- readRegion.Bottom = CON.SBI.srWindow.Bottom;
- readRegion.Right = CON.SBI.srWindow.Right;
-
- T(("... reading console window %dx%d into %d,%d - %d,%d at %d,%d",
- bufferSize.Y, bufferSize.X,
- readRegion.Top,
- readRegion.Left,
- readRegion.Bottom,
- readRegion.Right,
- bufferCoord.Y,
- bufferCoord.X));
-
- if (ReadConsoleOutput(CON.hdl,
- CON.save_screen,
- bufferSize,
- bufferCoord,
- &readRegion)) {
- result = TRUE;
- CON.window_only = TRUE;
- } else {
- T((" error %#lx", (unsigned long) GetLastError()));
- }
- }
+ return result;
+}
+
+/*
+ * Attempt to save the screen contents. PDCurses does this if
+ * PDC_RESTORE_SCREEN is set, giving the same visual appearance on
+ * restoration as if the library had allocated a console buffer. MSDN
+ * says that the data which can be read is limited to 64Kb (and may be
+ * less).
+ */
+static bool
+save_original_screen(void)
+{
+ bool result = FALSE;
+
+ CON.save_region.Top = 0;
+ CON.save_region.Left = 0;
+ CON.save_region.Bottom = (SHORT) (CON.SBI.dwSize.Y - 1);
+ CON.save_region.Right = (SHORT) (CON.SBI.dwSize.X - 1);
+
+ if (read_screen_data()) {
+ result = TRUE;
+ } else {
+
+ CON.save_region.Top = CON.SBI.srWindow.Top;
+ CON.save_region.Left = CON.SBI.srWindow.Left;
+ CON.save_region.Bottom = CON.SBI.srWindow.Bottom;
+ CON.save_region.Right = CON.SBI.srWindow.Right;
+
+ CON.window_only = TRUE;
+
+ if (read_screen_data()) {
+ result = TRUE;
}
}
static int
Adjust(int milliseconds, int diff)
{
- if (milliseconds == INFINITY)
- return milliseconds;
- milliseconds -= diff;
- if (milliseconds < 0)
- milliseconds = 0;
+ if (milliseconds != INFINITY) {
+ milliseconds -= diff;
+ if (milliseconds < 0)
+ milliseconds = 0;
+ }
return milliseconds;
}
#endif
/* Borrowed from ansicon project.
- Check wether or not a I/O handle is associated with
+ Check whether or not an I/O handle is associated with
a Windows console.
*/
static BOOL
IsConsoleHandle(HANDLE hdl)
{
DWORD dwFlag = 0;
+ BOOL result;
+
if (!GetConsoleMode(hdl, &dwFlag)) {
- return (int) WriteConsoleA(hdl, NULL, 0, &dwFlag, NULL);
+ result = (int) WriteConsoleA(hdl, NULL, 0, &dwFlag, NULL);
+ } else {
+ result = (int) (dwFlag & ENABLE_PROCESSED_OUTPUT);
}
- return (int) (dwFlag & ENABLE_PROCESSED_OUTPUT);
+ return result;
}
/* Our replacement for the systems _isatty to include also
int
_nc_mingw_isatty(int fd)
{
- if (_isatty(fd))
- return 1;
-#if WINVER < 0x0600
- return 0;
-#else
- return _ismintty(fd, NULL);
+ int result = 0;
+
+ if (_isatty(fd)) {
+ result = 1;
+ } else {
+#if WINVER >= 0x0600
+ result = _ismintty(fd, NULL);
#endif
+ }
+ return result;
}
/* This is used when running in terminfo mode to discover,
SCREEN *sp; \
TERMINAL *term = 0; \
int code = ERR; \
- if (_nc_screen_chain==0) \
- return 0; \
+ if (_nc_screen_chain == 0) \
+ return 0; \
for (each_screen(sp)) { \
- if (sp->_term && sp->_term->Filedes==fd) { \
- term = sp->_term; \
- break; \
+ if (sp->_term && (sp->_term->Filedes == fd)) { \
+ term = sp->_term; \
+ break; \
} \
} \
- assert(term!=0)
+ assert(term != 0)
int
_nc_mingw_tcsetattr(
BOOL buffered = TRUE;
BOOL b;
+ START_TRACE();
if (_nc_mingw_isatty(0)) {
CON.isMinTTY = TRUE;
}
b = AttachConsole(ATTACH_PARENT_PROCESS);
if (getenv("NCGDB") || getenv("NCURSES_CONSOLE2")) {
- CON.hdl = CON.out;
+ T(("... will not buffer console"));
buffered = FALSE;
+ CON.hdl = CON.out;
} else {
+ T(("... creating console buffer"));
CON.hdl = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE,
0,
NULL,
-ncurses6 (5.9-20140802) unstable; urgency=low
+ncurses6 (5.9-20140809) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 01 Aug 2014 19:41:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 08 Aug 2014 20:33:11 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (5.9-20140802) unstable; urgency=low
+ncurses6 (5.9-20140809) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 01 Aug 2014 19:41:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 08 Aug 2014 20:33:11 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (5.9-20140802) unstable; urgency=low
+ncurses6 (5.9-20140809) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 01 Aug 2014 19:41:10 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 08 Aug 2014 20:33:11 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.54 2014/08/01 23:41:10 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.55 2014/08/09 00:33:11 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "5"\r
!define VERSION_MINOR "9"\r
!define VERSION_YYYY "2014"\r
-!define VERSION_MMDD "0802"\r
+!define VERSION_MMDD "0809"\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: 5.9
-Release: 20140802
+Release: 20140809
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 5.9
-Release: 20140802
+Release: 20140809
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
* authorization. *
****************************************************************************/
/*
- * $Id: background.c,v 1.14 2014/02/01 22:10:42 tom Exp $
+ * $Id: background.c,v 1.15 2014/08/09 22:31:23 tom Exp $
*/
#define NEED_COLOR_CODE 1
printw("Initializing pair 3 to %s/cyan (ACS_HLINE)\n", color_name(default_fg));
init_pair(3, (NCURSES_COLOR_T) default_fg, COLOR_CYAN);
printw("...and drawing a box which should be followed by lines\n");
- bkgdset(ACS_HLINE | COLOR_PAIR(3));
+ bkgdset(ACS_HLINE | (attr_t) COLOR_PAIR(3));
/*
* Characters from vt100 line-drawing should be mapped to line-drawing,
* since A_ALTCHARSET is set in the background, and the character part
/****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2014 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 *
* v2.0 featuring strict ANSI/POSIX conformance, November 1993.
* v2.1 with ncurses mouse support, September 1995
*
- * $Id: bs.c,v 1.62 2013/11/16 19:57:56 tom Exp $
+ * $Id: bs.c,v 1.63 2014/08/09 22:27:12 tom Exp $
*/
#include <test.priv.h>
MvAddCh(PYBASE + i, PXBASE - 3, (chtype) (i + 'A'));
#ifdef A_COLOR
if (has_colors())
- attron((attr_t) COLOR_PAIR(COLOR_BLUE));
+ attron(COLOR_PAIR(COLOR_BLUE));
#endif /* A_COLOR */
(void) addch(' ');
for (j = 0; j < BWIDTH; j++)
MvAddCh(CYBASE + i, CXBASE - 3, (chtype) (i + 'A'));
#ifdef A_COLOR
if (has_colors())
- attron((attr_t) COLOR_PAIR(COLOR_BLUE));
+ attron(COLOR_PAIR(COLOR_BLUE));
#endif /* A_COLOR */
(void) addch(' ');
for (j = 0; j < BWIDTH; j++)
cgoto(y1, x1);
#ifdef A_COLOR
if (has_colors())
- attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+ attron(COLOR_PAIR(COLOR_GREEN));
#endif /* A_COLOR */
(void) addch(MARK_MISS);
#ifdef A_COLOR
pgoto(y1, x1);
#ifdef A_COLOR
if (has_colors())
- attron((attr_t) COLOR_PAIR(COLOR_RED));
+ attron(COLOR_PAIR(COLOR_RED));
#endif /* A_COLOR */
(void) addch(SHOWHIT);
#ifdef A_COLOR
#ifdef A_COLOR
if (has_colors()) {
if (hit)
- attron((attr_t) COLOR_PAIR(COLOR_RED));
+ attron(COLOR_PAIR(COLOR_RED));
else
- attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+ attron(COLOR_PAIR(COLOR_GREEN));
}
#endif /* A_COLOR */
(void) addch((chtype) hits[PLAYER][curx][cury]);
#ifdef A_COLOR
if (has_colors()) {
if (hit)
- attron((attr_t) COLOR_PAIR(COLOR_RED));
+ attron(COLOR_PAIR(COLOR_RED));
else
- attron((attr_t) COLOR_PAIR(COLOR_GREEN));
+ attron(COLOR_PAIR(COLOR_GREEN));
}
#endif /* A_COLOR */
(void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH));
/*
* Author: Thomas E. Dickey
*
- * $Id: dots_curses.c,v 1.2 2014/06/28 20:33:24 tom Exp $
+ * $Id: dots_curses.c,v 1.3 2014/08/09 22:28:42 tom Exp $
*
* A simple demo of the curses interface used for comparison with termcap.
*/
{
int pair = mypair(fg, bg);
if (pair > 0) {
- attron((attr_t) COLOR_PAIR(mypair(fg, bg)));
+ attron(COLOR_PAIR(mypair(fg, bg)));
}
}
z = (int) (ranf() * COLORS);
if (ranf() > 0.01) {
set_colors(fg = z, bg);
- attron((attr_t) COLOR_PAIR(mypair(fg, bg)));
+ attron(COLOR_PAIR(mypair(fg, bg)));
} else {
set_colors(fg, bg = z);
napms(1);
/****************************************************************************
- * Copyright (c) 2006-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2012,2014 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: echochar.c,v 1.9 2012/06/09 20:30:32 tom Exp $
+ * $Id: echochar.c,v 1.10 2014/08/09 22:35:51 tom Exp $
*
* Demonstrate the echochar function (compare to dots.c).
* Thomas Dickey - 2006/11/4
(short) fg,
(short) bg);
}
- attron((attr_t) COLOR_PAIR(pair));
+ attron(COLOR_PAIR(pair));
}
int
/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2014 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: Thomas E. Dickey <dickey@clark.net> 1998
*
- * $Id: filter.c,v 1.15 2012/06/09 20:30:32 tom Exp $
+ * $Id: filter.c,v 1.16 2014/08/09 22:35:51 tom Exp $
*/
#include <test.priv.h>
*/
static int
-new_command(char *buffer, int length, attr_t underline)
+new_command(char *buffer, int length, int underline)
{
int code;
{
int ch;
char buffer[80];
- attr_t underline;
+ int underline;
bool i_option = FALSE;
setlocale(LC_ALL, "");
background = -1;
#endif
init_pair(1, COLOR_CYAN, (short) background);
- underline = (attr_t) COLOR_PAIR(1);
+ underline = COLOR_PAIR(1);
} else {
underline = A_UNDERLINE;
}
* modified 10-18-89 for curses (jrl)
* 10-18-89 added signal handling
*
- * $Id: gdc.c,v 1.41 2014/08/02 16:36:20 tom Exp $
+ * $Id: gdc.c,v 1.42 2014/08/09 22:28:42 tom Exp $
*/
#include <test.priv.h>
{
if (on) {
if (hascolor) {
- attron((attr_t) COLOR_PAIR(PAIR_DIGITS));
+ attron(COLOR_PAIR(PAIR_DIGITS));
} else {
attron(A_STANDOUT);
}
} else {
if (hascolor) {
- attron((attr_t) COLOR_PAIR(PAIR_OTHERS));
+ attron(COLOR_PAIR(PAIR_OTHERS));
} else {
attroff(A_STANDOUT);
}
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.414 2014/08/02 23:10:26 tom Exp $
+$Id: ncurses.c,v 1.415 2014/08/09 22:28:42 tom Exp $
***************************************************************************/
NCURSES_COLOR_T bg = InxToBG(i);
init_pair(pair, fg, bg);
- attron((attr_t) COLOR_PAIR(pair));
+ attron(COLOR_PAIR(pair));
if (opt_acsc)
- attron((attr_t) A_ALTCHARSET);
+ attron(A_ALTCHARSET);
if (opt_bold)
- attron((attr_t) A_BOLD);
+ attron(A_BOLD);
if (opt_revs)
- attron((attr_t) A_REVERSE);
+ attron(A_REVERSE);
if (opt_nums) {
sprintf(numbered, "{%02X}", (int) i);
init_pair(pair, InxToFG(i), InxToBG(i));
(void) color_set(pair, NULL);
if (opt_acsc)
- attr_on((attr_t) A_ALTCHARSET, NULL);
+ attr_on(A_ALTCHARSET, NULL);
if (opt_bold)
- attr_on((attr_t) A_BOLD, NULL);
+ attr_on(A_BOLD, NULL);
if (opt_revs)
- attr_on((attr_t) A_REVERSE, NULL);
+ attr_on(A_REVERSE, NULL);
if (opt_nums) {
sprintf(numbered, "{%02X}", i);