From: Thomas E. Dickey Date: Sat, 29 Aug 2009 22:41:54 +0000 (+0000) Subject: ncurses 5.7 - patch 20090829 X-Git-Tag: v5.8~74 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=c8e187fc9682a3c5cfaebc480fc98d8585f6caf6 ncurses 5.7 - patch 20090829 + workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro on amd64 (Debian #542031). + fix typo in curs_mouse.3x (Debian #429198). --- diff --git a/NEWS b/NEWS index a4a12b38..50bc6dbb 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1422 2009/08/22 23:16:03 tom Exp $ +-- $Id: NEWS,v 1.1425 2009/08/29 18:33:51 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,11 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20090829 + + workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro on + amd64 (Debian #542031). + + fix typo in curs_mouse.3x (Debian #429198). + 20090822 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). diff --git a/dist.mk b/dist.mk index 8ca93709..a0dba85f 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.716 2009/08/22 16:00:41 tom Exp $ +# $Id: dist.mk,v 1.717 2009/08/29 18:07:46 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 7 -NCURSES_PATCH = 20090822 +NCURSES_PATCH = 20090829 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/frm_driver.c b/form/frm_driver.c index e5db6cbc..8d9bd3ba 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.89 2008/12/06 23:08:12 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.90 2009/08/29 19:02:25 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -188,7 +188,7 @@ static int FE_Delete_Previous(FORM *); /* Macro to set the attributes for a fields window */ #define Set_Field_Window_Attributes(field,win) \ ( wbkgdset((win),(chtype)((field)->pad | (field)->back)), \ - wattrset((win),(field)->fore) ) + (void) wattrset((win),(field)->fore) ) /* Logic to decide whether or not a field really appears on the form */ #define Field_Really_Appears(field) \ @@ -1073,9 +1073,13 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag) else { if (field->opts & O_VISIBLE) - Set_Field_Window_Attributes(field, win); + { + Set_Field_Window_Attributes(field, win); + } else - wattrset(win, WINDOW_ATTRS(fwin)); + { + (void)wattrset(win, WINDOW_ATTRS(fwin)); + } werase(win); } diff --git a/include/curses.h.in b/include/curses.h.in index c77fff00..f2c5a154 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -32,7 +32,7 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: curses.h.in,v 1.204 2009/07/18 16:02:07 tom Exp $ */ +/* $Id: curses.h.in,v 1.205 2009/08/29 18:33:18 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -1094,9 +1094,11 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); #if !NCURSES_OPAQUE #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@ #define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \ - NCURSES_CAST(int, (win)->_attrs = (at))) + (win)->_attrs = (at), \ + NCURSES_CAST(int, (win)->_attrs)) #else -#define wattrset(win,at) NCURSES_CAST(int, (win)->_attrs = (at)) +#define wattrset(win,at) ((win)->_attrs = (at), \ + NCURSES_CAST(int, (win)->_attrs)) #endif #endif /* NCURSES_OPAQUE */ diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x index 16bc45df..8dbabca5 100644 --- a/man/curs_mouse.3x +++ b/man/curs_mouse.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2008,2009 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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_mouse.3x,v 1.31 2008/11/23 00:09:53 tom Exp $ +.\" $Id: curs_mouse.3x,v 1.32 2009/08/29 18:11:58 tom Exp $ .TH curs_mouse 3X "" .na .hy 0 @@ -262,7 +262,7 @@ Under \fBncurses\fR(3X), these calls are implemented using either xterm's built-in mouse-tracking API or platform-specific drivers including .RS -Alessandro Rubini's gpm server. +Alessandro Rubini's gpm server .br FreeBSD sysmouse .br diff --git a/ncurses/base/lib_bkgd.c b/ncurses/base/lib_bkgd.c index c99e0c5f..306e09b6 100644 --- a/ncurses/base/lib_bkgd.c +++ b/ncurses/base/lib_bkgd.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: lib_bkgd.c,v 1.36 2008/03/23 00:09:14 tom Exp $") +MODULE_ID("$Id: lib_bkgd.c,v 1.37 2009/08/29 19:02:25 tom Exp $") /* * Set the window's background information. @@ -126,8 +126,8 @@ wbkgrnd(WINDOW *win, const ARG_CH_T ch) NCURSES_CH_T old_bkgrnd; wgetbkgrnd(win, &old_bkgrnd); - wbkgrndset(win, CHREF(new_bkgd)); - wattrset(win, AttrOf(win->_nc_bkgd)); + (void) wbkgrndset(win, CHREF(new_bkgd)); + (void) wattrset(win, AttrOf(win->_nc_bkgd)); for (y = 0; y <= win->_maxy; y++) { for (x = 0; x <= win->_maxx; x++) { diff --git a/ncurses/base/lib_slkrefr.c b/ncurses/base/lib_slkrefr.c index 5323e0e6..01540f0f 100644 --- a/ncurses/base/lib_slkrefr.c +++ b/ncurses/base/lib_slkrefr.c @@ -43,7 +43,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_slkrefr.c,v 1.23 2009/08/15 23:08:28 tom Exp $") +MODULE_ID("$Id: lib_slkrefr.c,v 1.24 2009/08/29 18:43:13 tom Exp $") #ifdef USE_TERM_DRIVER #define NumLabels InfoOf(SP_PARM).numlabels @@ -109,13 +109,13 @@ slk_intern_refresh(SCREEN *sp) slk_paint_info(slk->win); wmove(slk->win, SLK_LINES(fmt) - 1, slk->ent[i].ent_x); if (sp->_slk) { - wattrset(slk->win, AttrOf(sp->_slk->attr)); + (void) wattrset(slk->win, AttrOf(sp->_slk->attr)); } waddstr(slk->win, slk->ent[i].form_text); /* if we simulate SLK's, it's looking much more natural to use the current ATTRIBUTE also for the label window */ - wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp))); + (void) wattrset(slk->win, WINDOW_ATTRS(StdScreen(sp))); } } slk->ent[i].dirty = FALSE; diff --git a/test/blue.c b/test/blue.c index dac0c761..84199132 100644 --- a/test/blue.c +++ b/test/blue.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -40,7 +40,7 @@ * results, use the ncurses(3) library. On non-Intel machines, SVr4 curses is * just as good. * - * $Id: blue.c,v 1.30 2008/08/03 18:20:27 tom Exp $ + * $Id: blue.c,v 1.31 2009/08/29 19:02:25 tom Exp $ */ #include @@ -353,9 +353,9 @@ play_game(void) } move(PROMPTROW, 0); - standout(); + (void) standout(); (void) printw("Finished deal %d - type any character to continue...", deal_number); - standend(); + (void) standend(); (void) getch(); } @@ -386,7 +386,7 @@ game_finished(int deal) { clear(); (void) printw("You finished the game in %d deals. This is ", deal); - standout(); + (void) standout(); if (deal < 2) (void) addstr("excellent"); else if (deal < 4) @@ -395,7 +395,7 @@ game_finished(int deal) (void) addstr("average"); else (void) addstr("poor"); - standend(); + (void) standend(); (void) addstr(". "); refresh(); } diff --git a/test/bs.c b/test/bs.c index f9572beb..fd0780bd 100644 --- a/test/bs.c +++ b/test/bs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -34,7 +34,7 @@ * v2.0 featuring strict ANSI/POSIX conformance, November 1993. * v2.1 with ncurses mouse support, September 1995 * - * $Id: bs.c,v 1.47 2008/08/03 18:30:28 tom Exp $ + * $Id: bs.c,v 1.48 2009/08/29 19:02:25 tom Exp $ */ #include @@ -374,7 +374,7 @@ initgame(void) for (j = 0; j < BWIDTH; j++) (void) addstr(" . "); #ifdef A_COLOR - attrset(0); + (void) attrset(0); #endif /* A_COLOR */ (void) addch(' '); (void) addch((chtype) (i + 'A')); @@ -392,7 +392,7 @@ initgame(void) for (j = 0; j < BWIDTH; j++) (void) addstr(" . "); #ifdef A_COLOR - attrset(0); + (void) attrset(0); #endif /* A_COLOR */ (void) addch(' '); (void) addch((chtype) (i + 'A')); @@ -773,7 +773,7 @@ hitship(int x, int y) #endif /* A_COLOR */ (void) addch(MARK_MISS); #ifdef A_COLOR - attrset(0); + (void) attrset(0); #endif /* A_COLOR */ } else { pgoto(y1, x1); @@ -799,7 +799,7 @@ hitship(int x, int y) #endif /* A_COLOR */ (void) addch(SHOWHIT); #ifdef A_COLOR - attrset(0); + (void) attrset(0); #endif /* A_COLOR */ } } @@ -841,7 +841,7 @@ plyturn(void) #endif /* A_COLOR */ (void) addch((chtype) hits[PLAYER][curx][cury]); #ifdef A_COLOR - attrset(0); + (void) attrset(0); #endif /* A_COLOR */ prompt(1, "You %s.", hit ? "scored a hit" : "missed"); @@ -971,7 +971,7 @@ cpufire(int x, int y) #endif /* A_COLOR */ (void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH)); #ifdef A_COLOR - attrset(0); + (void) attrset(0); #endif /* A_COLOR */ return hit ? (sunk ? S_SUNK : S_HIT) : S_MISS; diff --git a/test/clip_printw.c b/test/clip_printw.c index 4a12ac8c..c90cc859 100644 --- a/test/clip_printw.c +++ b/test/clip_printw.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: clip_printw.c,v 1.3 2009/07/17 09:28:52 tom Exp $ + * $Id: clip_printw.c,v 1.4 2009/08/29 19:00:44 tom Exp $ * * demonstrate how to use printw without wrapping. */ @@ -327,7 +327,7 @@ test_clipping(WINDOW *win) do { switch (st.ch) { case '.': /* change from current position */ - wattrset(win, st.attr | COLOR_PAIR(st.pair)); + (void) wattrset(win, st.attr | COLOR_PAIR(st.pair)); if (st.count > 0) { need = st.count + 1; sprintf(fmt, "%%c%%%ds%%c", st.count); @@ -367,6 +367,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) ExitProgram(EXIT_SUCCESS); } + #else int main(void) diff --git a/test/demo_forms.c b/test/demo_forms.c index cbfc64b4..0df590ab 100644 --- a/test/demo_forms.c +++ b/test/demo_forms.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_forms.c,v 1.32 2009/05/30 16:52:42 tom Exp $ + * $Id: demo_forms.c,v 1.33 2009/08/29 18:47:26 tom Exp $ * * Demonstrate a variety of functions from the form library. * Thomas Dickey - 2003/4/26 @@ -307,13 +307,13 @@ show_current_field(WINDOW *win, FORM * form) } waddch(win, ' '); - wattrset(win, field_fore(field)); + (void) wattrset(win, field_fore(field)); waddstr(win, "fore"); wattroff(win, field_fore(field)); waddch(win, '/'); - wattrset(win, field_back(field)); + (void) wattrset(win, field_back(field)); waddstr(win, "back"); wattroff(win, field_back(field)); @@ -324,7 +324,7 @@ show_current_field(WINDOW *win, FORM * form) for (nbuf = 0; nbuf <= 2; ++nbuf) { if ((buffer = field_buffer(field, nbuf)) != 0) { wprintw(win, "buffer %d:", nbuf); - wattrset(win, A_REVERSE); + (void) wattrset(win, A_REVERSE); waddstr(win, buffer); wattroff(win, A_REVERSE); waddstr(win, "\n"); diff --git a/test/firework.c b/test/firework.c index 1337e976..979d1d7c 100644 --- a/test/firework.c +++ b/test/firework.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2009 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: firework.c,v 1.24 2006/05/20 15:36:08 tom Exp $ + * $Id: firework.c,v 1.25 2009/08/29 19:02:25 tom Exp $ */ #include @@ -94,14 +94,14 @@ explode(int row, int col) showit(); init_pair(1, get_colour(&bold), my_bg); - attrset(COLOR_PAIR(1) | bold); + (void) attrset(COLOR_PAIR(1) | bold); mvprintw(row - 1, col - 1, " - "); mvprintw(row + 0, col - 1, "-+-"); mvprintw(row + 1, col - 1, " - "); showit(); init_pair(1, get_colour(&bold), my_bg); - attrset(COLOR_PAIR(1) | bold); + (void) attrset(COLOR_PAIR(1) | bold); mvprintw(row - 2, col - 2, " --- "); mvprintw(row - 1, col - 2, "-+++-"); mvprintw(row + 0, col - 2, "-+#+-"); @@ -110,7 +110,7 @@ explode(int row, int col) showit(); init_pair(1, get_colour(&bold), my_bg); - attrset(COLOR_PAIR(1) | bold); + (void) attrset(COLOR_PAIR(1) | bold); mvprintw(row - 2, col - 2, " +++ "); mvprintw(row - 1, col - 2, "++#++"); mvprintw(row + 0, col - 2, "+# #+"); @@ -119,7 +119,7 @@ explode(int row, int col) showit(); init_pair(1, get_colour(&bold), my_bg); - attrset(COLOR_PAIR(1) | bold); + (void) attrset(COLOR_PAIR(1) | bold); mvprintw(row - 2, col - 2, " # "); mvprintw(row - 1, col - 2, "## ##"); mvprintw(row + 0, col - 2, "# #"); @@ -128,7 +128,7 @@ explode(int row, int col) showit(); init_pair(1, get_colour(&bold), my_bg); - attrset(COLOR_PAIR(1) | bold); + (void) attrset(COLOR_PAIR(1) | bold); mvprintw(row - 2, col - 2, " # # "); mvprintw(row - 1, col - 2, "# #"); mvprintw(row + 0, col - 2, " "); @@ -173,7 +173,7 @@ main( direction = (start > end) ? -1 : 1; diff = abs(start - end); } while (diff < 2 || diff >= LINES - 2); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); for (row = 0; row < diff; row++) { mvprintw(LINES - row, start + (row * direction), (direction < 0) ? "\\" : "/"); diff --git a/test/gdc.c b/test/gdc.c index ef220fed..5eb36820 100644 --- a/test/gdc.c +++ b/test/gdc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -33,7 +33,7 @@ * modified 10-18-89 for curses (jrl) * 10-18-89 added signal handling * - * $Id: gdc.c,v 1.31 2008/08/03 23:58:42 tom Exp $ + * $Id: gdc.c,v 1.32 2009/08/29 19:02:25 tom Exp $ */ #include @@ -78,7 +78,7 @@ drawbox(bool scrolling) int n; if (hascolor) - attrset(COLOR_PAIR(PAIR_FRAMES)); + (void) attrset(COLOR_PAIR(PAIR_FRAMES)); mvaddch(YBASE - 1, XBASE - 1, ACS_ULCORNER); hline(ACS_HLINE, XLENGTH); @@ -102,7 +102,7 @@ drawbox(bool scrolling) vline(ACS_VLINE, YDEPTH); if (hascolor) - attrset(COLOR_PAIR(PAIR_OTHERS)); + (void) attrset(COLOR_PAIR(PAIR_OTHERS)); } static void @@ -220,7 +220,7 @@ main(int argc, char *argv[]) init_pair(PAIR_DIGITS, COLOR_BLACK, COLOR_RED); init_pair(PAIR_OTHERS, COLOR_RED, bg); init_pair(PAIR_FRAMES, COLOR_WHITE, bg); - attrset(COLOR_PAIR(PAIR_OTHERS)); + (void) attrset(COLOR_PAIR(PAIR_OTHERS)); } restart: @@ -335,7 +335,7 @@ main(int argc, char *argv[]) goto restart; case ERR: if (sigtermed) { - standend(); + (void) standend(); endwin(); fprintf(stderr, "gdc terminated by signal %d\n", sigtermed); ExitProgram(EXIT_FAILURE); @@ -345,7 +345,7 @@ main(int argc, char *argv[]) continue; } } while (--count); - standend(); + (void) standend(); endwin(); ExitProgram(EXIT_SUCCESS); } diff --git a/test/hanoi.c b/test/hanoi.c index bd0fb10e..671c0cb4 100644 --- a/test/hanoi.c +++ b/test/hanoi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -41,7 +41,7 @@ * * Date: 05.Nov.90 * - * $Id: hanoi.c,v 1.27 2008/08/04 10:57:59 tom Exp $ + * $Id: hanoi.c,v 1.28 2009/08/29 19:02:25 tom Exp $ */ #include @@ -229,7 +229,7 @@ DisplayTiles(void) mvaddstr(1, 24, "T O W E R S O F H A N O I"); mvaddstr(3, 34, "SJR 1990"); mvprintw(19, 5, "Moves : %d", NMoves); - attrset(A_REVERSE); + (void) attrset(A_REVERSE); mvaddstr(BASELINE, 8, " "); @@ -241,7 +241,7 @@ DisplayTiles(void) mvaddch(BASELINE, LEFTPEG, '1'); mvaddch(BASELINE, MIDPEG, '2'); mvaddch(BASELINE, RIGHTPEG, '3'); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); /* Draw tiles */ for (peg = 0; peg < NPEGS; peg++) { @@ -251,16 +251,16 @@ DisplayTiles(void) memset(TileBuf, ' ', len); TileBuf[len] = '\0'; if (has_colors()) - attrset(COLOR_PAIR(LENTOIND(len))); + (void) attrset(COLOR_PAIR(LENTOIND(len))); else - attrset(A_REVERSE); + (void) attrset(A_REVERSE); mvaddstr(BASELINE - (SlotNo + 1), (int) (PegPos[peg] - len / 2), TileBuf); } } } - attrset(A_NORMAL); + (void) attrset(A_NORMAL); refresh(); } diff --git a/test/insdelln.c b/test/insdelln.c index 2b5ca0be..32a4aab8 100644 --- a/test/insdelln.c +++ b/test/insdelln.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: insdelln.c,v 1.2 2009/07/15 23:21:04 tom Exp $ + * $Id: insdelln.c,v 1.3 2009/08/29 18:47:26 tom Exp $ * * test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln */ @@ -300,7 +300,7 @@ test_winsdelln(WINDOW *win) init_status(win, &st); do { - wattrset(win, st.attr | COLOR_PAIR(st.pair)); + (void) wattrset(win, st.attr | COLOR_PAIR(st.pair)); switch (st.ch) { case 'i': for (n = 0; n < st.count; ++n) @@ -341,7 +341,7 @@ test_insdelln(void) init_status(stdscr, &st); do { - attrset(st.attr | COLOR_PAIR(st.pair)); + (void) attrset(st.attr | COLOR_PAIR(st.pair)); switch (st.ch) { case 'i': for (n = 0; n < st.count; ++n) diff --git a/test/ncurses.c b/test/ncurses.c index 70b0d86a..42670c31 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -40,7 +40,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.343 2009/07/30 09:13:37 tom Exp $ +$Id: ncurses.c,v 1.345 2009/08/29 20:24:57 tom Exp $ ***************************************************************************/ @@ -232,7 +232,7 @@ wGetstring(WINDOW *win, char *buffer, int limit) echo(); getyx(win, y0, x0); - wattrset(win, A_REVERSE); + (void) wattrset(win, A_REVERSE); x = (int) strlen(buffer); while (!done) { @@ -365,7 +365,7 @@ wGet_wstring(WINDOW *win, wchar_t *buffer, int limit) echo(); getyx(win, y0, x0); - wattrset(win, A_REVERSE); + (void) wattrset(win, A_REVERSE); x = (int) wcslen(buffer); while (!done) { @@ -629,12 +629,12 @@ wgetch_help(WINDOW *win, GetchFlags flags) int flg = ((strstr(help[n], "toggle") != 0) && (flags[UChar(*help[n])] != FALSE)); if (flg) - standout(); + (void) standout(); mvprintw(row, col, "%s", help[n]); if (col == 0) clrtoeol(); if (flg) - standend(); + (void) standend(); } wrefresh(stdscr); wmove(win, y, x); @@ -1358,7 +1358,7 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name) addch(ch | attr); } } else { - attrset(attr); + (void) attrset(attr); addstr(attr_test_string); attroff(attr); } @@ -2010,7 +2010,7 @@ color_test(void) hello = numbered; } printw("%-*.*s", width, width, hello); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); if ((i % per_row) == 0 && InxToFG(i) == min_colors) { show_color_name(row, 0, InxToBG(i), opt_wide); @@ -2395,9 +2395,9 @@ color_edit(void) (i == current ? '>' : ' '), (i < (int) SIZEOF(the_color_names) ? the_color_names[i] : numeric)); - attrset(COLOR_PAIR(i)); + (void) attrset(COLOR_PAIR(i)); addstr(" "); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); color_content((short) i, &red, &green, &blue); addstr(" R = "); @@ -2405,20 +2405,20 @@ color_edit(void) attron(A_STANDOUT); printw("%04d", red); if (current == i && field == 0) - attrset(A_NORMAL); + (void) attrset(A_NORMAL); addstr(", G = "); if (current == i && field == 1) attron(A_STANDOUT); printw("%04d", green); if (current == i && field == 1) - attrset(A_NORMAL); + (void) attrset(A_NORMAL); addstr(", B = "); if (current == i && field == 2) attron(A_STANDOUT); printw("%04d", blue); if (current == i && field == 2) - attrset(A_NORMAL); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); + (void) attrset(A_NORMAL); printw(" ( %3d %3d %3d )", scaled_rgb(red), scaled_rgb(green), @@ -5037,7 +5037,7 @@ flushinp_test(WINDOW *win) wbkgd(subWin, COLOR_PAIR(2) | ' '); } #endif - wattrset(subWin, A_BOLD); + (void) wattrset(subWin, A_BOLD); box(subWin, ACS_VLINE, ACS_HLINE); mvwaddstr(subWin, 2, 1, "This is a subwindow"); wrefresh(win); @@ -5857,18 +5857,18 @@ overlap_test_1_attr(WINDOW *win, int flavor, int col) switch (flavor) { case 0: - wattrset(win, A_NORMAL); + (void) wattrset(win, A_NORMAL); break; case 1: - wattrset(win, A_BOLD); + (void) wattrset(win, A_BOLD); break; case 2: init_pair(cpair, COLOR_BLUE, COLOR_WHITE); - wattrset(win, COLOR_PAIR(cpair) | A_NORMAL); + (void) wattrset(win, COLOR_PAIR(cpair) | A_NORMAL); break; case 3: init_pair(cpair, COLOR_WHITE, COLOR_BLUE); - wattrset(win, COLOR_PAIR(cpair) | A_BOLD); + (void) wattrset(win, COLOR_PAIR(cpair) | A_BOLD); break; } } @@ -5973,7 +5973,7 @@ overlap_help(int state, int flavors[OVERLAP_FLAVORS]) break; } overlap_helpitem(state, item, msg); - wattrset(stdscr, A_NORMAL); + (void) wattrset(stdscr, A_NORMAL); wbkgdset(stdscr, ' ' | A_NORMAL); } move(LINES - 1, 0); @@ -5998,7 +5998,7 @@ overlap_test_1(int flavor, int col, WINDOW *a, char fill) { overlap_test_1_attr(a, flavor, col); fillwin(a, fill); - wattrset(a, A_NORMAL); + (void) wattrset(a, A_NORMAL); } static void @@ -6580,7 +6580,7 @@ main(int argc, char *argv[]) min_colors = -1; } #if NCURSES_VERSION_PATCH >= 20000708 - else if (assumed_colors) + if (assumed_colors) assume_default_colors(default_fg, default_bg); #endif #endif diff --git a/test/newdemo.c b/test/newdemo.c index d43996b2..8187982b 100644 --- a/test/newdemo.c +++ b/test/newdemo.c @@ -2,7 +2,7 @@ * newdemo.c - A demo program using PDCurses. The program illustrate * the use of colours for text output. * - * $Id: newdemo.c,v 1.31 2008/08/03 20:19:38 tom Exp $ + * $Id: newdemo.c,v 1.32 2009/08/29 18:47:26 tom Exp $ */ #include @@ -84,7 +84,7 @@ set_colors(WINDOW *win, int pair, int foreground, int background) if (pair > COLOR_PAIRS) pair = COLOR_PAIRS; init_pair(pair, foreground, background); - wattrset(win, COLOR_PAIR(pair)); + (void) wattrset(win, COLOR_PAIR(pair)); } } @@ -96,7 +96,7 @@ use_colors(WINDOW *win, int pair, chtype attrs) pair = COLOR_PAIRS; attrs |= COLOR_PAIR(pair); } - wattrset(win, attrs); + (void) wattrset(win, attrs); return attrs; } diff --git a/test/rain.c b/test/rain.c index f4a5e7f3..87d57c93 100644 --- a/test/rain.c +++ b/test/rain.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: rain.c,v 1.34 2008/05/24 23:34:34 tom Exp $ + * $Id: rain.c,v 1.35 2009/08/29 19:02:25 tom Exp $ */ #include @@ -105,7 +105,7 @@ next_j(int j) chtype color = COLOR_PAIR(z); if (z) color |= A_BOLD; - attrset(color); + (void) attrset(color); } return j; } diff --git a/test/tclock.c b/test/tclock.c index 394ee813..b6e7d3f3 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -1,4 +1,4 @@ -/* $Id: tclock.c,v 1.25 2005/04/16 16:39:27 tom Exp $ */ +/* $Id: tclock.c,v 1.26 2009/08/29 18:47:26 tom Exp $ */ #include @@ -67,7 +67,7 @@ dline(int pair, int from_x, int from_y, int x2, int y2, char ch) int d; if (has_colors()) - attrset(COLOR_PAIR(pair)); + (void) attrset(COLOR_PAIR(pair)); dx = x2 - from_x; dy = y2 - from_y; @@ -209,17 +209,17 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) dline(3, cx, cy, cx + mdx, cy - mdy, '#'); - attrset(A_REVERSE); + (void) attrset(A_REVERSE); dline(2, cx, cy, cx + hdx, cy - hdy, '.'); attroff(A_REVERSE); if (has_colors()) - attrset(COLOR_PAIR(1)); + (void) attrset(COLOR_PAIR(1)); dline(1, cx, cy, cx + sdx, cy - sdy, 'O'); if (has_colors()) - attrset(COLOR_PAIR(0)); + (void) attrset(COLOR_PAIR(0)); text = ctime(&tim); mvprintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); diff --git a/test/test_get_wstr.c b/test/test_get_wstr.c index 7ae3730f..eb229a52 100644 --- a/test/test_get_wstr.c +++ b/test/test_get_wstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007 Free Software Foundation, Inc. * + * Copyright (c) 2007,2009 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_get_wstr.c,v 1.5 2007/08/11 17:01:43 tom Exp $ + * $Id: test_get_wstr.c,v 1.6 2009/08/29 19:02:25 tom Exp $ * * Author: Thomas E Dickey * @@ -269,7 +269,7 @@ test_get_wstr(int level, char **argv, WINDOW *strwin) *buffer = '\0'; rc = ERR; echo(); - wattrset(txtwin, A_REVERSE); + (void) wattrset(txtwin, A_REVERSE); switch (flavor) { case eGetStr: if (txtwin != stdscr) { @@ -307,9 +307,9 @@ test_get_wstr(int level, char **argv, WINDOW *strwin) break; } noecho(); - wattrset(txtwin, A_NORMAL); + (void) wattrset(txtwin, A_NORMAL); wprintw(strwin, "%d", rc); - waddwstr(strwin, (wchar_t *) buffer); + (void) waddwstr(strwin, (wchar_t *) buffer); wnoutrefresh(strwin); break; default: diff --git a/test/test_getstr.c b/test/test_getstr.c index 25dbecf7..a0863937 100644 --- a/test/test_getstr.c +++ b/test/test_getstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 2007-2008,2009 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_getstr.c,v 1.8 2008/02/09 18:09:35 tom Exp $ + * $Id: test_getstr.c,v 1.9 2009/08/29 19:02:25 tom Exp $ * * Author: Thomas E Dickey * @@ -271,7 +271,7 @@ test_getstr(int level, char **argv, WINDOW *strwin) *buffer = '\0'; rc = ERR; echo(); - wattrset(txtwin, A_REVERSE); + (void) wattrset(txtwin, A_REVERSE); switch (flavor) { case eGetStr: if (txtwin != stdscr) { @@ -309,7 +309,7 @@ test_getstr(int level, char **argv, WINDOW *strwin) break; } noecho(); - wattrset(txtwin, A_NORMAL); + (void) wattrset(txtwin, A_NORMAL); wprintw(strwin, "%d:%s", rc, buffer); wnoutrefresh(strwin); break; diff --git a/test/test_opaque.c b/test/test_opaque.c index f1ab78cf..6ae2689e 100644 --- a/test/test_opaque.c +++ b/test/test_opaque.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 2007-2008,2009 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_opaque.c,v 1.7 2008/07/05 23:18:40 tom Exp $ + * $Id: test_opaque.c,v 1.8 2009/08/29 19:02:25 tom Exp $ * * Author: Thomas E Dickey * @@ -185,10 +185,10 @@ show_keyword(WINDOW *stswin, int cell, int active, const char *name) { to_keyword(stswin, cell); if (active == cell) - wstandout(stswin); + (void) wstandout(stswin); wprintw(stswin, "%s:", name); if (active == cell) - wstandend(stswin); + (void) wstandend(stswin); } /* *INDENT-OFF* */ static struct { diff --git a/test/testaddch.c b/test/testaddch.c index c1651c6f..7a909e28 100644 --- a/test/testaddch.c +++ b/test/testaddch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2009 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 * @@ -29,7 +29,7 @@ * This is an example written by Alexander V. Lukyanov , * to demonstrate an inconsistency between ncurses and SVr4 curses. * - * $Id: testaddch.c,v 1.6 2006/04/01 19:08:03 tom Exp $ + * $Id: testaddch.c,v 1.7 2009/08/29 19:02:25 tom Exp $ */ #include @@ -66,7 +66,7 @@ main( attr = (i & 4) ? COLOR_PAIR(4) : 0; bkgdset(back); - attrset(set); + (void) attrset(set); attr_addstr("Test string with spaces -> <-\n", attr); } @@ -77,7 +77,7 @@ main( attr = (i & 4) ? COLOR_PAIR(4) : 0; bkgdset(back); - attrset(set); + (void) attrset(set); attr_addstr("Test string with spaces -> <-\n", attr); } diff --git a/test/testcurs.c b/test/testcurs.c index 6a2e53ff..255bb4cb 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -7,7 +7,7 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) with either * PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.39 2008/08/03 17:58:09 tom Exp $ + * $Id: testcurs.c,v 1.40 2009/08/29 18:47:26 tom Exp $ */ #include @@ -682,7 +682,7 @@ padTest(WINDOW *dummy GCC_UNUSED) if ((pad = newpad(50, 100)) != 0) { wattron(pad, A_REVERSE); mvwaddstr(pad, 5, 2, "This is a new pad"); - wattrset(pad, A_NORMAL); + (void) wattrset(pad, A_NORMAL); mvwaddstr(pad, 8, 0, "The end of this line should be truncated here:except now"); mvwaddstr(pad, 11, 1, "This line should not appear.It will now"); @@ -720,7 +720,7 @@ display_menu(int old_option, int new_option) assert((new_option >= 0) && (new_option < MAX_OPTIONS)); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); mvaddstr(3, 20, "PDCurses Test Program"); for (i = 0; i < (int) MAX_OPTIONS; i++) @@ -729,9 +729,9 @@ display_menu(int old_option, int new_option) if ((old_option >= 0) && (old_option < MAX_OPTIONS)) mvaddstr(5 + old_option, 25, command[old_option].text); - attrset(A_REVERSE); + (void) attrset(A_REVERSE); mvaddstr(5 + new_option, 25, command[new_option].text); - attrset(A_NORMAL); + (void) attrset(A_NORMAL); mvaddstr(13, 3, "Use Up and Down Arrows to select - Enter to run - Q to quit"); refresh(); diff --git a/test/xmas.c b/test/xmas.c index b838bae2..79a56a58 100644 --- a/test/xmas.c +++ b/test/xmas.c @@ -92,7 +92,7 @@ /******************************************************************************/ /* - * $Id: xmas.c,v 1.24 2008/08/03 11:08:59 tom Exp $ + * $Id: xmas.c,v 1.25 2009/08/29 18:47:26 tom Exp $ */ #include @@ -170,7 +170,7 @@ static void unset_color(WINDOW *win) { if (has_colors()) - wattrset(win, COLOR_PAIR(0)); + (void) wattrset(win, COLOR_PAIR(0)); } static void @@ -533,9 +533,9 @@ main(int argc GCC_UNUSED, char **argv GCC_UNUSED) mvwaddch(treescrn4, 12, 23, ' '); /*star */ - wstandout(treescrn4); + (void) wstandout(treescrn4); mvwaddch(treescrn4, 0, 12, '*'); - wstandend(treescrn4); + (void) wstandend(treescrn4); /*strng1 */ mvwaddch(treescrn4, 3, 13, ' '); @@ -597,9 +597,9 @@ main(int argc GCC_UNUSED, char **argv GCC_UNUSED) mvwaddch(treescrn6, 11, 23, ' '); /*star */ - wstandout(treescrn6); + (void) wstandout(treescrn6); mvwaddch(treescrn6, 0, 12, '*'); - wstandend(treescrn6); + (void) wstandend(treescrn6); /*strng1 */ @@ -816,11 +816,11 @@ balls(void) static int star(void) { - wattrset(treescrn2, A_BOLD | A_BLINK); + (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_YELLOW); mvwaddch(treescrn2, 0, 12, (chtype) '*'); - wstandend(treescrn2); + (void) wstandend(treescrn2); unset_color(treescrn2); wrefresh(treescrn2); @@ -831,7 +831,7 @@ star(void) static int strng1(void) { - wattrset(treescrn2, A_BOLD | A_BLINK); + (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); mvwaddch(treescrn2, 3, 13, (chtype) '\''); @@ -849,7 +849,7 @@ strng1(void) static int strng2(void) { - wattrset(treescrn2, A_BOLD | A_BLINK); + (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); mvwaddch(treescrn2, 5, 14, (chtype) '\''); @@ -870,7 +870,7 @@ strng2(void) static int strng3(void) { - wattrset(treescrn2, A_BOLD | A_BLINK); + (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); mvwaddch(treescrn2, 7, 16, (chtype) '\''); @@ -893,7 +893,7 @@ strng3(void) static int strng4(void) { - wattrset(treescrn2, A_BOLD | A_BLINK); + (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); mvwaddch(treescrn2, 9, 17, (chtype) '\''); @@ -921,7 +921,7 @@ strng4(void) static int strng5(void) { - wattrset(treescrn2, A_BOLD | A_BLINK); + (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); mvwaddch(treescrn2, 11, 19, (chtype) '\'');