From: Thomas E. Dickey Date: Sun, 2 May 2010 00:59:02 +0000 (+0000) Subject: ncurses 5.7 - patch 20100501 X-Git-Tag: v5.8~37 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=92e187a3459ab7ce1613a3684ca6642447c73620 ncurses 5.7 - patch 20100501 + correct limit-check in wredrawln, accounting for begy/begx values (patch by David Benjamin). + fix most compiler warnings from clang. + amend build-fix for OpenSolaris, to ensure that a system header is included in curses.h before testing feature symbols, since they may be defined by that route. --- diff --git a/Ada95/gen/gen.c b/Ada95/gen/gen.c index 24c0f087..3ab2b5e1 100644 --- a/Ada95/gen/gen.c +++ b/Ada95/gen/gen.c @@ -32,7 +32,7 @@ /* Version Control - $Id: gen.c,v 1.52 2010/02/20 21:59:56 tom Exp $ + $Id: gen.c,v 1.53 2010/05/01 17:08:30 tom Exp $ --------------------------------------------------------------------------*/ /* This program generates various record structures and constants from the @@ -1495,7 +1495,7 @@ main(int argc, char *argv[]) } printf(" subtype Eti_Error is C_Int range %d .. %d;\n\n", etimin, etimax); - printf(buf); + printf("%s", buf); } break; default: diff --git a/NEWS b/NEWS index eb94c0a1..18d16d4b 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.1533 2010/04/24 23:44:44 tom Exp $ +-- $Id: NEWS,v 1.1536 2010/05/01 22:12:38 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,14 @@ 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. +20100501 + + correct limit-check in wredrawln, accounting for begy/begx values + (patch by David Benjamin). + + fix most compiler warnings from clang. + + amend build-fix for OpenSolaris, to ensure that a system header is + included in curses.h before testing feature symbols, since they + may be defined by that route. + 20100424 + fix some strict compiler warnings in ncurses library. + modify configure macro CF_HEADER_PATH to not look for variations in diff --git a/aclocal.m4 b/aclocal.m4 index 367b47e3..6990d243 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.514 2010/04/24 15:44:15 tom Exp $ +dnl $Id: aclocal.m4,v 1.515 2010/05/01 19:16:13 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -956,7 +956,7 @@ fi test "$cf_cv_cpp_static_cast" = yes && AC_DEFINE(CPP_HAS_STATIC_CAST) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_C_INLINE version: 2 updated: 2007/08/11 14:09:50 +dnl CF_C_INLINE version: 3 updated: 2010/05/01 15:14:41 dnl ----------- dnl Check if the C compiler supports "inline". dnl $1 is the name of a shell variable to set if inline is supported @@ -971,7 +971,7 @@ if test "$ac_cv_c_inline" != no ; then : elif test "$GCC" = yes then - AC_CACHE_CHECK(if gcc supports options to tune inlining,cf_cv_gcc_inline,[ + AC_CACHE_CHECK(if $CC supports options to tune inlining,cf_cv_gcc_inline,[ cf_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS --param max-inline-insns-single=$2" AC_TRY_COMPILE([inline int foo(void) { return 1; }], diff --git a/configure b/configure index eb83eb9d..528dfa73 100755 --- a/configure +++ b/configure @@ -13335,8 +13335,8 @@ if test "$ac_cv_c_inline" != no ; then : elif test "$GCC" = yes then - echo "$as_me:13338: checking if gcc supports options to tune inlining" >&5 -echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6 + echo "$as_me:13338: checking if $CC supports options to tune inlining" >&5 +echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6 if test "${cf_cv_gcc_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else diff --git a/dist.mk b/dist.mk index f374edc9..1f1d3fb8 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.756 2010/04/24 15:26:17 tom Exp $ +# $Id: dist.mk,v 1.757 2010/04/29 09:46:57 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 = 20100424 +NCURSES_PATCH = 20100501 # 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 5a8f6b08..e0892bf8 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.96 2009/12/12 23:19:29 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.98 2010/05/01 21:11:43 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -4417,7 +4417,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value) * field->cols)))) RETURN(E_SYSTEM_ERROR); +#if !USE_WIDEC_SUPPORT len = vlen; +#endif } } @@ -4438,7 +4440,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value) } len = Buffer_Length(field); wclear(field->working); - mvwaddstr(field->working, 0, 0, value); + (void)mvwaddstr(field->working, 0, 0, value); if ((widevalue = typeCalloc(FIELD_CELL, len + 1)) == 0) { @@ -4448,9 +4450,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value) { for (i = 0; i < (unsigned)field->drows; ++i) { - mvwin_wchnstr(field->working, 0, i * field->dcols, - widevalue + (i * field->dcols), - field->dcols); + (void)mvwin_wchnstr(field->working, 0, i * field->dcols, + widevalue + (i * field->dcols), + field->dcols); } for (i = 0; i < len; ++i) { diff --git a/form/fty_enum.c b/form/fty_enum.c index 41ff585c..d3351644 100644 --- a/form/fty_enum.c +++ b/form/fty_enum.c @@ -34,7 +34,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fty_enum.c,v 1.25 2010/01/23 21:14:36 tom Exp $") +MODULE_ID("$Id: fty_enum.c,v 1.26 2010/05/01 21:11:07 tom Exp $") typedef struct { @@ -102,12 +102,14 @@ Generic_Enum_Type(void *arg) argp->kwds = typeMalloc(char *, cnt + 1); kp = kwds; - kptarget = argp->kwds; - while (kptarget && kp && (*kp)) + if ((kptarget = argp->kwds) != 0) { - (*kptarget++) = strdup(*kp++); + while (kp && (*kp)) + { + (*kptarget++) = strdup(*kp++); + } + *kptarget = (char *)0; } - *kptarget = (char *)0; } } } @@ -164,12 +166,14 @@ Copy_Enum_Type(const void *argp) char **kp = ap->kwds; result->kwds = typeMalloc(char *, 1 + ap->count); - kptarget = result->kwds; - while (kptarget && kp && (*kp)) + if ((kptarget = result->kwds) != 0) { - (*kptarget++) = strdup(*kp++); + while (kp && (*kp)) + { + (*kptarget++) = strdup(*kp++); + } + *kptarget = (char *)0; } - *kptarget = (char *)0; } } } diff --git a/include/curses.h.in b/include/curses.h.in index a25b9d5c..2ad68f1f 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.214 2010/03/30 08:50:18 tom Exp $ */ +/* $Id: curses.h.in,v 1.215 2010/04/29 09:46:38 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -144,6 +144,11 @@ typedef unsigned @cf_cv_typeof_chtype@ chtype; typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t; #endif +/* + * We need FILE, etc. Include this before checking any feature symbols. + */ +#include + /* * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or * conflicting) when _XOPEN_SOURCE is 500 or greater. @@ -153,7 +158,6 @@ typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t; #define NCURSES_WIDECHAR #endif -#include #include /* we need va_list */ #ifdef NCURSES_WIDECHAR #include /* we want wchar_t */ diff --git a/menu/m_post.c b/menu/m_post.c index 08314a56..1f0b623e 100644 --- a/menu/m_post.c +++ b/menu/m_post.c @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_post.c,v 1.28 2010/01/23 21:20:11 tom Exp $") +MODULE_ID("$Id: m_post.c,v 1.29 2010/05/01 19:18:27 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -171,7 +171,7 @@ _nc_Post_Item(const MENU * menu, const ITEM * item) waddch(menu->win, ' '); } if ((cy + j) < getmaxy(menu->win)) - mvwaddch(menu->win, cy + j, cx - 1, menu->pad); + (void)mvwaddch(menu->win, cy + j, cx - 1, menu->pad); } wmove(menu->win, ncy, ncx); if (!isback) diff --git a/ncurses/base/lib_bkgd.c b/ncurses/base/lib_bkgd.c index a3b25fb1..784da197 100644 --- a/ncurses/base/lib_bkgd.c +++ b/ncurses/base/lib_bkgd.c @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: lib_bkgd.c,v 1.39 2010/03/31 23:38:02 tom Exp $") +MODULE_ID("$Id: lib_bkgd.c,v 1.41 2010/05/01 22:16:21 tom Exp $") /* * Set the window's background information. @@ -85,7 +85,7 @@ wbkgrndset(WINDOW *win, const ARG_CH_T ch) cchar_t wch; int tmp; - wgetbkgrnd(win, &wch); + (void) wgetbkgrnd(win, &wch); tmp = _nc_to_char((wint_t) CharOf(wch)); win->_bkgd = (((tmp == EOF) ? ' ' : (chtype) tmp) diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index 09d4ea1c..6f4f3c54 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: lib_getch.c,v 1.111 2010/04/10 19:08:59 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.116 2010/05/01 22:40:47 tom Exp $") #include @@ -376,6 +376,7 @@ _nc_wgetch(WINDOW *win, { SCREEN *sp; int ch; + int rc = 0; #ifdef NCURSES_WGETCH_EVENTS long event_delay = -1; #endif @@ -411,17 +412,18 @@ _nc_wgetch(WINDOW *win, !sp->_cbreak && !sp->_called_wgetch) { char buf[MAXCOLUMNS], *bufp; - int rc; TR(TRACE_IEVENT, ("filling queue in cooked mode")); - rc = recur_wgetnstr(win, buf); - /* ungetch in reverse order */ #ifdef NCURSES_WGETCH_EVENTS + rc = recur_wgetnstr(win, buf); if (rc != KEY_EVENT) -#endif safe_ungetch(sp, '\n'); +#else + (void) recur_wgetnstr(win, buf); + safe_ungetch(sp, '\n'); +#endif for (bufp = buf + strlen(buf); bufp > buf; bufp--) safe_ungetch(sp, bufp[-1]); @@ -443,7 +445,6 @@ _nc_wgetch(WINDOW *win, if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) { if (head == -1) { /* fifo is empty */ int delay; - int rc; TR(TRACE_IEVENT, ("timed delay in wgetch()")); if (sp->_cbreak > 1) @@ -486,7 +487,6 @@ _nc_wgetch(WINDOW *win, * increase the wait with mouseinterval(). */ int runcount = 0; - int rc = 0; do { ch = kgetch(sp EVENTLIST_2nd(evl)); diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index 7785f0d9..5b9eb7c3 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -84,7 +84,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mouse.c,v 1.115 2010/04/24 23:01:13 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.116 2010/05/01 19:29:31 tom Exp $") #include @@ -758,7 +758,7 @@ _nc_mouse_event(SCREEN *sp) eventp->z = 0; /* bump the next-free pointer into the circular list */ - sp->_mouse_eventp = eventp = NEXT(eventp); + sp->_mouse_eventp = NEXT(eventp); result = TRUE; break; } diff --git a/ncurses/base/lib_redrawln.c b/ncurses/base/lib_redrawln.c index 56962051..ad540441 100644 --- a/ncurses/base/lib_redrawln.c +++ b/ncurses/base/lib_redrawln.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: lib_redrawln.c,v 1.15 2009/11/07 16:00:54 tom Exp $") +MODULE_ID("$Id: lib_redrawln.c,v 1.16 2010/05/01 22:10:55 David.Benjamin Exp $") NCURSES_EXPORT(int) wredrawln(WINDOW *win, int beg, int num) @@ -66,14 +66,14 @@ wredrawln(WINDOW *win, int beg, int num) returnCode(ERR); end = beg + num; - if (end > CurScreen(sp)->_maxy + 1) - end = CurScreen(sp)->_maxy + 1; + if (end > CurScreen(sp)->_maxy + 1 - win->_begy) + end = CurScreen(sp)->_maxy + 1 - win->_begy; if (end > win->_maxy + 1) end = win->_maxy + 1; len = (win->_maxx + 1); - if (len > (size_t) (CurScreen(sp)->_maxx + 1)) - len = (size_t) (CurScreen(sp)->_maxx + 1); + if (len > (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx)) + len = (size_t) (CurScreen(sp)->_maxx + 1 - win->_begx); len *= sizeof(CurScreen(sp)->_line[0].text[0]); for (i = beg; i < end; i++) { diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index b2694978..92b2f14e 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -47,7 +47,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_set_term.c,v 1.136 2010/04/24 23:09:24 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.137 2010/05/01 19:47:51 tom Exp $") #ifdef USE_TERM_DRIVER #define MaxColors InfoOf(sp).maxcolors @@ -117,7 +117,7 @@ delink_screen(SCREEN *sp) for (each_screen(temp)) { if (temp == sp) { if (last) - last = sp->_next_screen; + last->_next_screen = sp->_next_screen; else _nc_screen_chain = sp->_next_screen; result = TRUE; diff --git a/ncurses/base/lib_slk.c b/ncurses/base/lib_slk.c index 39343d15..8fafdbca 100644 --- a/ncurses/base/lib_slk.c +++ b/ncurses/base/lib_slk.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -47,7 +47,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_slk.c,v 1.44 2009/10/31 19:51:40 tom Exp $") +MODULE_ID("$Id: lib_slk.c,v 1.45 2010/05/01 20:44:34 tom Exp $") #ifdef USE_TERM_DRIVER #define NumLabels InfoOf(SP_PARM).numlabels @@ -140,7 +140,6 @@ _nc_slk_initialize(WINDOW *stwin, int cols) int res = OK; unsigned max_length; SCREEN *sp; - TERMINAL *term; int numlab; T((T_CALLED("_nc_slk_initialize()"))); @@ -151,8 +150,7 @@ _nc_slk_initialize(WINDOW *stwin, int cols) if (0 == sp) returnCode(ERR); - term = TerminalOf(SP_PARM); - assert(term); + assert(TerminalOf(SP_PARM)); numlab = NumLabels; diff --git a/ncurses/base/lib_slkrefr.c b/ncurses/base/lib_slkrefr.c index 167da9cd..b06bf8d7 100644 --- a/ncurses/base/lib_slkrefr.c +++ b/ncurses/base/lib_slkrefr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -43,7 +43,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_slkrefr.c,v 1.25 2009/10/24 22:12:21 tom Exp $") +MODULE_ID("$Id: lib_slkrefr.c,v 1.26 2010/05/01 19:17:28 tom Exp $") #ifdef USE_TERM_DRIVER #define NumLabels InfoOf(SP_PARM).numlabels @@ -62,7 +62,7 @@ slk_paint_info(WINDOW *win) if (win && sp && (sp->slk_format == 4)) { int i; - mvwhline(win, 0, 0, 0, getmaxx(win)); + (void) mvwhline(win, 0, 0, 0, getmaxx(win)); wmove(win, 0, 0); for (i = 0; i < sp->_slk->maxlab; i++) { diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c index d5ce3974..e3aeb4fa 100644 --- a/ncurses/base/wresize.c +++ b/ncurses/base/wresize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 @@ #include -MODULE_ID("$Id: wresize.c,v 1.32 2009/10/24 22:15:00 tom Exp $") +MODULE_ID("$Id: wresize.c,v 1.33 2010/05/01 22:04:08 tom Exp $") static int cleanup_lines(struct ldat *data, int length) @@ -174,6 +174,7 @@ wresize(WINDOW *win, int ToLines, int ToCols) s[col] = win->_nc_bkgd; } } else { + assert(pline != 0); s = &pline[win->_pary + row].text[win->_parx]; } diff --git a/ncurses/tinfo/alloc_entry.c b/ncurses/tinfo/alloc_entry.c index 5b5325da..a54f9ef3 100644 --- a/ncurses/tinfo/alloc_entry.c +++ b/ncurses/tinfo/alloc_entry.c @@ -47,7 +47,7 @@ #include -MODULE_ID("$Id: alloc_entry.c,v 1.49 2010/01/23 17:57:43 tom Exp $") +MODULE_ID("$Id: alloc_entry.c,v 1.50 2010/05/01 19:55:48 tom Exp $") #define ABSENT_OFFSET -1 #define CANCELLED_OFFSET -2 @@ -64,8 +64,10 @@ _nc_init_entry(TERMTYPE *const tp) unsigned i; #if NO_LEAKS - if (tp == 0 && stringbuf != 0) { - FreeAndNull(stringbuf); + if (tp == 0) { + if (stringbuf != 0) { + FreeAndNull(stringbuf); + } return; } #endif diff --git a/ncurses/tinfo/alloc_ttype.c b/ncurses/tinfo/alloc_ttype.c index afe74e1a..116245e4 100644 --- a/ncurses/tinfo/alloc_ttype.c +++ b/ncurses/tinfo/alloc_ttype.c @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: alloc_ttype.c,v 1.20 2010/04/24 23:49:43 tom Exp $") +MODULE_ID("$Id: alloc_ttype.c,v 1.21 2010/05/01 19:32:33 tom Exp $") #if NCURSES_XNAMES /* @@ -347,7 +347,7 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from) int j_str = to->num_Strings - first - to->ext_Strings; if (to->Strings[j + j_str] == CANCELLED_STRING) { - if ((k = _nc_find_ext_name(from, to->ext_Names[j], BOOLEAN)) >= 0) { + if (_nc_find_ext_name(from, to->ext_Names[j], BOOLEAN) >= 0) { if (_nc_del_ext_name(to, name, STRING) || _nc_del_ext_name(to, name, NUMBER)) { k = _nc_ins_ext_name(to, name, BOOLEAN); @@ -355,8 +355,7 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from) } else { j++; } - } else if ((k = _nc_find_ext_name(from, to->ext_Names[j], - NUMBER)) >= 0) { + } else if (_nc_find_ext_name(from, to->ext_Names[j], NUMBER) >= 0) { if (_nc_del_ext_name(to, name, STRING) || _nc_del_ext_name(to, name, BOOLEAN)) { k = _nc_ins_ext_name(to, name, NUMBER); @@ -364,8 +363,7 @@ adjust_cancels(TERMTYPE *to, TERMTYPE *from) } else { j++; } - } else if ((k = _nc_find_ext_name(from, to->ext_Names[j], - STRING)) >= 0) { + } else if (_nc_find_ext_name(from, to->ext_Names[j], STRING) >= 0) { if (_nc_del_ext_name(to, name, NUMBER) || _nc_del_ext_name(to, name, BOOLEAN)) { k = _nc_ins_ext_name(to, name, STRING); diff --git a/ncurses/tinfo/comp_scan.c b/ncurses/tinfo/comp_scan.c index 28ae9e4e..bfbb0e25 100644 --- a/ncurses/tinfo/comp_scan.c +++ b/ncurses/tinfo/comp_scan.c @@ -50,7 +50,7 @@ #include #include -MODULE_ID("$Id: comp_scan.c,v 1.86 2010/01/23 17:13:15 tom Exp $") +MODULE_ID("$Id: comp_scan.c,v 1.87 2010/05/01 19:56:35 tom Exp $") /* * Maximum length of string capability we'll accept before raising an error. @@ -479,7 +479,6 @@ _nc_get_token(bool silent) if (OkToAdd()) { AddCh(ch); } else { - ch = EOF; break; } } diff --git a/ncurses/tinfo/db_iterator.c b/ncurses/tinfo/db_iterator.c index fdc2bb09..2ee2059b 100644 --- a/ncurses/tinfo/db_iterator.c +++ b/ncurses/tinfo/db_iterator.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 2006-2007,2010 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 * @@ -38,7 +38,7 @@ #include -MODULE_ID("$Id: db_iterator.c,v 1.6 2007/04/22 00:00:26 tom Exp $") +MODULE_ID("$Id: db_iterator.c,v 1.7 2010/05/01 21:08:05 tom Exp $") #define HaveTicDirectory _nc_globals.have_tic_directory #define KeepTicDirectory _nc_globals.keep_tic_directory @@ -118,8 +118,7 @@ next_list_item(const char *source, int *offset) * again, using the data at the offset. */ if (marker == 0) { - *offset += strlen(result) + 1; - marker = result + *offset; + *offset += strlen(result); } else { *marker++ = 0; *offset = marker - ThisDbList; diff --git a/ncurses/tinfo/make_keys.c b/ncurses/tinfo/make_keys.c index dc8ebd03..cf203afe 100644 --- a/ncurses/tinfo/make_keys.c +++ b/ncurses/tinfo/make_keys.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2010 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 * @@ -39,7 +39,7 @@ #define USE_TERMLIB 1 #include -MODULE_ID("$Id: make_keys.c,v 1.16 2010/04/24 22:20:53 tom Exp $") +MODULE_ID("$Id: make_keys.c,v 1.17 2010/05/01 19:17:28 tom Exp $") #include @@ -92,7 +92,7 @@ make_keys(FILE *ifp, FILE *ofp) maxlen = (unsigned) strlen(from); fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n", code, - maxlen, maxlen, + (int) maxlen, (int) maxlen, to, from); } diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c index 49e29948..ddbc2520 100644 --- a/ncurses/tinfo/parse_entry.c +++ b/ncurses/tinfo/parse_entry.c @@ -47,7 +47,7 @@ #include #include -MODULE_ID("$Id: parse_entry.c,v 1.74 2010/04/24 21:19:18 tom Exp $") +MODULE_ID("$Id: parse_entry.c,v 1.75 2010/05/01 19:35:09 tom Exp $") #ifdef LINT static short const parametrized[] = @@ -773,7 +773,7 @@ postprocess_termcap(TERMTYPE *tp, bool has_base) * isn't from mytinfo... */ if (PRESENT(other_non_function_keys)) { - char *base = other_non_function_keys; + char *base; char *bp, *cp, *dp; struct name_table_entry const *from_ptr; struct name_table_entry const *to_ptr; @@ -841,7 +841,7 @@ postprocess_termcap(TERMTYPE *tp, bool has_base) } else *dp++ = *bp; } - *dp++ = '\0'; + *dp = '\0'; tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2); } diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c index 4eb4951d..5f7b9b33 100644 --- a/ncurses/tinfo/trim_sgr0.c +++ b/ncurses/tinfo/trim_sgr0.c @@ -36,7 +36,7 @@ #include -MODULE_ID("$Id: trim_sgr0.c,v 1.10 2010/01/23 17:12:45 tom Exp $") +MODULE_ID("$Id: trim_sgr0.c,v 1.11 2010/05/01 19:33:31 tom Exp $") #undef CUR #define CUR tp-> @@ -285,7 +285,7 @@ _nc_trim_sgr0(TERMTYPE *tp) if (off[i - 1] == ';') i--; j = (size_t) (skip_zero(tmp + 1) - off); - i = chop_out(off, i, j); + (void) chop_out(off, i, j); found = TRUE; } } diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c index ca66c56a..e4b4a9eb 100644 --- a/ncurses/trace/lib_traceatr.c +++ b/ncurses/trace/lib_traceatr.c @@ -43,7 +43,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_traceatr.c,v 1.69 2010/03/31 23:38:02 tom Exp $") +MODULE_ID("$Id: lib_traceatr.c,v 1.70 2010/05/01 19:33:19 tom Exp $") #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name)) @@ -132,7 +132,7 @@ _traceattr2(int bufnum, chtype newmode) for (n = 0; n < SIZEOF(names); n++) { if ((newmode & names[n].val) != 0) { if (result[1] != '\0') - result = _nc_trace_bufcat(bufnum, "|"); + (void) _nc_trace_bufcat(bufnum, "|"); result = _nc_trace_bufcat(bufnum, names[n].name); if (names[n].val == A_COLOR) { @@ -327,7 +327,7 @@ _tracecchar_t2(int bufnum, const cchar_t *ch) PUTC_ch = ch->chars[PUTC_i]; if (PUTC_ch == L'\0') { if (PUTC_i == 0) - result = _nc_trace_bufcat(bufnum, "\\000"); + (void) _nc_trace_bufcat(bufnum, "\\000"); break; } PUTC_n = wcrtomb(PUTC_buf, ch->chars[PUTC_i], &PUT_st); diff --git a/ncurses/trace/visbuf.c b/ncurses/trace/visbuf.c index afbb9429..7456ac55 100644 --- a/ncurses/trace/visbuf.c +++ b/ncurses/trace/visbuf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2001-2009,2010 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 * @@ -42,7 +42,7 @@ #include #include -MODULE_ID("$Id: visbuf.c,v 1.35 2009/12/12 21:34:23 tom Exp $") +MODULE_ID("$Id: visbuf.c,v 1.36 2010/05/01 20:44:34 tom Exp $") #define NUM_VISBUFS 4 @@ -128,7 +128,7 @@ _nc_visbuf2n(int bufnum, const char *buf, int len) tp = _nc_vischar(tp, UChar(c)); } *tp++ = D_QUOTE; - *tp++ = '\0'; + *tp = '\0'; } else { vbuf = ("(_nc_visbuf2n failed)"); } @@ -205,7 +205,7 @@ _nc_viswbuf2n(int bufnum, const wchar_t *buf, int len) } } *tp++ = D_QUOTE; - *tp++ = '\0'; + *tp = '\0'; } else { vbuf = ("(_nc_viswbuf2n failed)"); } @@ -287,12 +287,12 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len) } } - result = _nc_trace_bufcat(bufnum, l_brace); - result = _nc_trace_bufcat(bufnum, d_quote); + (void) _nc_trace_bufcat(bufnum, l_brace); + (void) _nc_trace_bufcat(bufnum, d_quote); for (j = first; j <= last; ++j) { found = _nc_altcharset_name(attr, (chtype) CharOf(buf[j])); if (found != 0) { - result = _nc_trace_bufcat(bufnum, found); + (void) _nc_trace_bufcat(bufnum, found); attr &= ~A_ALTCHARSET; } else #if USE_WIDEC_SUPPORT @@ -306,7 +306,7 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len) PUTC_ch = buf[j].chars[PUTC_i]; if (PUTC_ch == L'\0') { if (PUTC_i == 0) - result = _nc_trace_bufcat(bufnum, "\\000"); + (void) _nc_trace_bufcat(bufnum, "\\000"); break; } PUTC_n = (int) wcrtomb(PUTC_buf, @@ -316,7 +316,7 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len) for (k = 0; k < PUTC_n; k++) { char temp[80]; _nc_vischar(temp, UChar(PUTC_buf[k])); - result = _nc_trace_bufcat(bufnum, temp); + (void) _nc_trace_bufcat(bufnum, temp); } } } @@ -328,10 +328,10 @@ _nc_viscbuf2(int bufnum, const NCURSES_CH_T * buf, int len) } #endif /* USE_WIDEC_SUPPORT */ } - result = _nc_trace_bufcat(bufnum, d_quote); + (void) _nc_trace_bufcat(bufnum, d_quote); if (attr != A_NORMAL) { - result = _nc_trace_bufcat(bufnum, " | "); - result = _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr)); + (void) _nc_trace_bufcat(bufnum, " | "); + (void) _nc_trace_bufcat(bufnum, _traceattr2(bufnum + 20, attr)); } result = _nc_trace_bufcat(bufnum, r_brace); first = last + 1; diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index 02ec4626..dd6c3b67 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -82,7 +82,7 @@ #include -MODULE_ID("$Id: tty_update.c,v 1.262 2009/10/24 23:21:31 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.263 2010/05/01 20:44:34 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -1078,24 +1078,24 @@ ClrToEOL(NCURSES_SP_DCLx NCURSES_CH_T blank, bool needclear) { int j; - if (SP_PARM != 0 && CurScreen(SP_PARM) != 0 - && SP_PARM->_cursrow >= 0) { - for (j = SP_PARM->_curscol; j < screen_columns(SP_PARM); j++) { - if (j >= 0) { - NCURSES_CH_T *cp = - &(CurScreen(SP_PARM)->_line[SP_PARM->_cursrow].text[j]); - - if (!CharEq(*cp, blank)) { - *cp = blank; - needclear = TRUE; + if (SP_PARM != 0) { + if (CurScreen(SP_PARM) != 0 + && SP_PARM->_cursrow >= 0) { + for (j = SP_PARM->_curscol; j < screen_columns(SP_PARM); j++) { + if (j >= 0) { + NCURSES_CH_T *cp = + &(CurScreen(SP_PARM)->_line[SP_PARM->_cursrow].text[j]); + + if (!CharEq(*cp, blank)) { + *cp = blank; + needclear = TRUE; + } } } } - } else { - needclear = TRUE; } - if (needclear) { + if (needclear && (SP_PARM != 0)) { UpdateAttrs(SP_PARM, blank); TPUTS_TRACE("clr_eol"); if (clr_eol && SP_PARM->_el_cost <= (screen_columns(SP_PARM) - SP_PARM->_curscol)) { diff --git a/ncurses/widechar/lib_get_wch.c b/ncurses/widechar/lib_get_wch.c index fa024d2c..f322abb1 100644 --- a/ncurses/widechar/lib_get_wch.c +++ b/ncurses/widechar/lib_get_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2002-2009,2010 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 @@ #include #include -MODULE_ID("$Id: lib_get_wch.c,v 1.20 2009/10/24 22:42:25 tom Exp $") +MODULE_ID("$Id: lib_get_wch.c,v 1.21 2010/05/01 22:04:08 tom Exp $") NCURSES_EXPORT(int) wget_wch(WINDOW *win, wint_t *result) @@ -50,7 +50,7 @@ wget_wch(WINDOW *win, wint_t *result) char buffer[(MB_LEN_MAX * 9) + 1]; /* allow some redundant shifts */ int status; size_t count = 0; - unsigned long value; + unsigned long value = 0; wchar_t wch; #ifndef state_unused mbstate_t state; diff --git a/progs/dump_entry.c b/progs/dump_entry.c index bd242200..485bbbd9 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2010 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 * @@ -39,7 +39,7 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.88 2008/08/04 12:36:12 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.89 2010/05/01 22:04:08 tom Exp $") #define INDENT 8 #define DISCARD(string) string = ABSENT_STRING @@ -1040,7 +1040,7 @@ dump_entry(TERMTYPE *tterm, save_sgr = set_attributes; - if (((len = FMT_ENTRY()) > critlen) + if ((FMT_ENTRY() > critlen) && limited) { save_tterm = *tterm; @@ -1049,7 +1049,7 @@ dump_entry(TERMTYPE *tterm, critlen); suppress_untranslatable = TRUE; } - if ((len = FMT_ENTRY()) > critlen) { + if (FMT_ENTRY() > critlen) { /* * We pick on sgr because it's a nice long string capability that * is really just an optimization hack. Another good candidate is @@ -1075,7 +1075,7 @@ dump_entry(TERMTYPE *tterm, critlen); } changed = TRUE; - if ((len = FMT_ENTRY()) <= critlen) + if (FMT_ENTRY() <= critlen) break; } } @@ -1086,7 +1086,7 @@ dump_entry(TERMTYPE *tterm, critlen); changed = TRUE; } - if (!changed || ((len = FMT_ENTRY()) > critlen)) { + if (!changed || (FMT_ENTRY() > critlen)) { if (purged_acs(tterm)) { acs_chars = ABSENT_STRING; SHOW_WHY("# (acsc removed to fit entry within %d bytes)\n", @@ -1094,7 +1094,7 @@ dump_entry(TERMTYPE *tterm, changed = TRUE; } } - if (!changed || ((len = FMT_ENTRY()) > critlen)) { + if (!changed || (FMT_ENTRY() > critlen)) { int oldversion = tversion; tversion = V_BSD; @@ -1130,7 +1130,7 @@ dump_entry(TERMTYPE *tterm, } else if (!version_filter(STRING, STR_IDX(acs_chars))) { save_tterm = *tterm; if (purged_acs(tterm)) { - len = FMT_ENTRY(); + (void) FMT_ENTRY(); } *tterm = save_tterm; } diff --git a/progs/infocmp.c b/progs/infocmp.c index 0c36c2de..2af9cb50 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 * @@ -42,7 +42,7 @@ #include -MODULE_ID("$Id: infocmp.c,v 1.104 2009/12/05 21:10:31 tom Exp $") +MODULE_ID("$Id: infocmp.c,v 1.105 2010/05/01 22:04:08 tom Exp $") #define L_CURL "{" #define R_CURL "}" @@ -894,8 +894,6 @@ file_comparison(int argc, char *argv[]) (void) printf("The following entries are equivalent:\n"); for (qp = heads[0]; qp; qp = qp->next) { - rp = qp->crosslinks[0]; - if (qp->ncrosslinks == 1) { rp = qp->crosslinks[0]; @@ -1536,7 +1534,6 @@ main(int argc, char *argv[]) status = _nc_read_entry(tname[termcount], tfile[termcount], &entries[termcount].tterm); - directory = TERMINFO; /* for error message */ } if (status <= 0) { diff --git a/progs/tabs.c b/progs/tabs.c index aafaa2d8..002a7531 100644 --- a/progs/tabs.c +++ b/progs/tabs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2008-2009,2010 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 * @@ -37,7 +37,7 @@ #define USE_LIBTINFO #include -MODULE_ID("$Id: tabs.c,v 1.16 2009/10/10 16:15:37 tom Exp $") +MODULE_ID("$Id: tabs.c,v 1.17 2010/05/01 22:04:08 tom Exp $") static void usage(void) GCC_NORETURN; @@ -461,7 +461,6 @@ main(int argc, char *argv[]) } } tab_list = add_to_tab_list(&append, option); - option += ((int) strlen(option)) - 1; break; } } diff --git a/progs/tic.c b/progs/tic.c index 23282e08..e6032c80 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -44,7 +44,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.140 2010/01/02 22:54:01 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.141 2010/05/01 21:17:23 tom Exp $") const char *_nc_progname = "tic"; @@ -347,6 +347,9 @@ stripped(char *src) if ((dst = strdup(src)) == NULL) failed("strdup"); + + assert(dst != 0); + len = strlen(dst); while (--len != 0 && isspace(UChar(dst[len]))) dst[len] = '\0'; diff --git a/progs/toe.c b/progs/toe.c index 8af6f371..6f45992f 100644 --- a/progs/toe.c +++ b/progs/toe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2010 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 * @@ -44,7 +44,7 @@ #include #endif -MODULE_ID("$Id: toe.c,v 1.51 2008/08/16 21:53:25 tom Exp $") +MODULE_ID("$Id: toe.c,v 1.52 2010/05/01 22:04:08 tom Exp $") #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, "..")) @@ -61,6 +61,13 @@ ExitProgram(int code) } #endif +static void +failed(const char *msg) +{ + perror(msg); + ExitProgram(EXIT_FAILURE); +} + #if USE_HASHED_DB static bool make_db_name(char *dst, const char *src, unsigned limit) @@ -184,10 +191,10 @@ typelist(int eargc, char *eargv[], DIRENT *entry; cwd_buf = typeRealloc(char, cwd_len, cwd_buf); - if (cwd_buf == 0) { - perror("realloc cwd_buf"); - continue; - } + if (cwd_buf == 0) + failed("realloc cwd_buf"); + + assert(cwd_buf != 0); strncpy(name_1, subdir->d_name, len)[len] = '\0'; if (isDotname(name_1)) @@ -480,6 +487,10 @@ main(int argc, char *argv[]) } if (!pass) { eargv = typeCalloc(char *, count + 1); + if (eargv == 0) + failed("realloc eargv"); + + assert(eargv != 0); } else { code = typelist((int) count, eargv, header, deschook); while (count-- > 0) diff --git a/progs/tset.c b/progs/tset.c index 49ba77fe..084e41d6 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -119,7 +119,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 1.81 2010/01/16 15:20:23 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.82 2010/05/01 21:42:46 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -402,6 +402,10 @@ add_mapping(const char *port, char *arg) mapp = typeMalloc(MAP, 1); if (copy == 0 || mapp == 0) failed("malloc"); + + assert(copy != 0); + assert(mapp != 0); + mapp->next = 0; if (maplist == 0) cur = maplist = mapp; @@ -1266,7 +1270,7 @@ main(int argc, char **argv) reset_mode(); } - ttype = get_termcap_entry(*argv); + (void) get_termcap_entry(*argv); if (!noset) { tcolumns = columns; diff --git a/test/bs.c b/test/bs.c index b9a28836..ae893712 100644 --- a/test/bs.c +++ b/test/bs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.50 2009/10/24 21:24:24 tom Exp $ + * $Id: bs.c,v 1.51 2010/05/01 19:12:26 tom Exp $ */ #include @@ -235,7 +235,7 @@ intro(void) #ifdef PENGUIN (void) clear(); - (void) mvaddstr(4, 29, "Welcome to Battleship!"); + MvAddStr(4, 29, "Welcome to Battleship!"); (void) move(8, 0); PR(" \\\n"); PR(" \\ \\ \\\n"); @@ -248,7 +248,7 @@ intro(void) PR(" \\ /\n"); PR(" \\___________________________________________________/\n"); - (void) mvaddstr(22, 27, "Hit any key to continue..."); + MvAddStr(22, 27, "Hit any key to continue..."); (void) refresh(); (void) getch(); #endif /* PENGUIN */ @@ -337,7 +337,7 @@ initgame(void) ship_t *ss; (void) clear(); - (void) mvaddstr(0, 35, "BATTLESHIPS"); + MvAddStr(0, 35, "BATTLESHIPS"); (void) move(PROMPTLINE + 2, 0); announceopts(); @@ -362,10 +362,10 @@ initgame(void) } /* draw empty boards */ - (void) mvaddstr(PYBASE - 2, PXBASE + 5, "Main Board"); - (void) mvaddstr(PYBASE - 1, PXBASE - 3, numbers); + MvAddStr(PYBASE - 2, PXBASE + 5, "Main Board"); + MvAddStr(PYBASE - 1, PXBASE - 3, numbers); for (i = 0; i < BDEPTH; ++i) { - (void) mvaddch(PYBASE + i, PXBASE - 3, (chtype) (i + 'A')); + MvAddCh(PYBASE + i, PXBASE - 3, (chtype) (i + 'A')); #ifdef A_COLOR if (has_colors()) attron(COLOR_PAIR(COLOR_BLUE)); @@ -379,11 +379,11 @@ initgame(void) (void) addch(' '); (void) addch((chtype) (i + 'A')); } - (void) mvaddstr(PYBASE + BDEPTH, PXBASE - 3, numbers); - (void) mvaddstr(CYBASE - 2, CXBASE + 7, "Hit/Miss Board"); - (void) mvaddstr(CYBASE - 1, CXBASE - 3, numbers); + MvAddStr(PYBASE + BDEPTH, PXBASE - 3, numbers); + MvAddStr(CYBASE - 2, CXBASE + 7, "Hit/Miss Board"); + MvAddStr(CYBASE - 1, CXBASE - 3, numbers); for (i = 0; i < BDEPTH; ++i) { - (void) mvaddch(CYBASE + i, CXBASE - 3, (chtype) (i + 'A')); + MvAddCh(CYBASE + i, CXBASE - 3, (chtype) (i + 'A')); #ifdef A_COLOR if (has_colors()) attron(COLOR_PAIR(COLOR_BLUE)); @@ -398,27 +398,27 @@ initgame(void) (void) addch((chtype) (i + 'A')); } - (void) mvaddstr(CYBASE + BDEPTH, CXBASE - 3, numbers); + MvAddStr(CYBASE + BDEPTH, CXBASE - 3, numbers); - (void) mvprintw(HYBASE, HXBASE, + MvPrintw(HYBASE, HXBASE, "To position your ships: move the cursor to a spot, then"); - (void) mvprintw(HYBASE + 1, HXBASE, + MvPrintw(HYBASE + 1, HXBASE, "type the first letter of a ship type to select it, then"); - (void) mvprintw(HYBASE + 2, HXBASE, + MvPrintw(HYBASE + 2, HXBASE, "type a direction ([hjkl] or [4862]), indicating how the"); - (void) mvprintw(HYBASE + 3, HXBASE, + MvPrintw(HYBASE + 3, HXBASE, "ship should be pointed. You may also type a ship letter"); - (void) mvprintw(HYBASE + 4, HXBASE, + MvPrintw(HYBASE + 4, HXBASE, "followed by `r' to position it randomly, or type `R' to"); - (void) mvprintw(HYBASE + 5, HXBASE, + MvPrintw(HYBASE + 5, HXBASE, "place all remaining ships randomly."); - (void) mvaddstr(MYBASE, MXBASE, "Aiming keys:"); - (void) mvaddstr(SYBASE, SXBASE, "y k u 7 8 9"); - (void) mvaddstr(SYBASE + 1, SXBASE, " \\|/ \\|/ "); - (void) mvaddstr(SYBASE + 2, SXBASE, "h-+-l 4-+-6"); - (void) mvaddstr(SYBASE + 3, SXBASE, " /|\\ /|\\ "); - (void) mvaddstr(SYBASE + 4, SXBASE, "b j n 1 2 3"); + MvAddStr(MYBASE, MXBASE, "Aiming keys:"); + MvAddStr(SYBASE, SXBASE, "y k u 7 8 9"); + MvAddStr(SYBASE + 1, SXBASE, " \\|/ \\|/ "); + MvAddStr(SYBASE + 2, SXBASE, "h-+-l 4-+-6"); + MvAddStr(SYBASE + 3, SXBASE, " /|\\ /|\\ "); + MvAddStr(SYBASE + 4, SXBASE, "b j n 1 2 3"); /* have the computer place ships */ for (ss = cpuship; ss < cpuship + SHIPTYPES; ss++) { @@ -518,17 +518,17 @@ initgame(void) turn = rnd(2); - (void) mvprintw(HYBASE, HXBASE, + MvPrintw(HYBASE, HXBASE, "To fire, move the cursor to your chosen aiming point "); - (void) mvprintw(HYBASE + 1, HXBASE, + MvPrintw(HYBASE + 1, HXBASE, "and strike any key other than a motion key. "); - (void) mvprintw(HYBASE + 2, HXBASE, + MvPrintw(HYBASE + 2, HXBASE, " "); - (void) mvprintw(HYBASE + 3, HXBASE, + MvPrintw(HYBASE + 3, HXBASE, " "); - (void) mvprintw(HYBASE + 4, HXBASE, + MvPrintw(HYBASE + 4, HXBASE, " "); - (void) mvprintw(HYBASE + 5, HXBASE, + MvPrintw(HYBASE + 5, HXBASE, " "); (void) prompt(0, "Press any key to start...", ""); @@ -547,11 +547,11 @@ getcoord(int atcpu) (void) refresh(); for (;;) { if (atcpu) { - (void) mvprintw(CYBASE + BDEPTH + 1, CXBASE + 11, "(%d, %c)", + MvPrintw(CYBASE + BDEPTH + 1, CXBASE + 11, "(%d, %c)", curx, 'A' + cury); cgoto(cury, curx); } else { - (void) mvprintw(PYBASE + BDEPTH + 1, PXBASE + 11, "(%d, %c)", + MvPrintw(PYBASE + BDEPTH + 1, PXBASE + 11, "(%d, %c)", curx, 'A' + cury); pgoto(cury, curx); } @@ -633,9 +633,9 @@ getcoord(int atcpu) default: if (atcpu) - (void) mvaddstr(CYBASE + BDEPTH + 1, CXBASE + 11, " "); + MvAddStr(CYBASE + BDEPTH + 1, CXBASE + 11, " "); else - (void) mvaddstr(PYBASE + BDEPTH + 1, PXBASE + 11, " "); + MvAddStr(PYBASE + BDEPTH + 1, PXBASE + 11, " "); return (c); } @@ -954,7 +954,7 @@ cpufire(int x, int y) hit = board[PLAYER][x][y] ? MARK_HIT : MARK_MISS; hits[COMPUTER][x][y] = (char) hit; - (void) mvprintw(PROMPTLINE, 0, + MvPrintw(PROMPTLINE, 0, "I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" : "miss"); if ((sunk = (hit && (ss = hitship(x, y)))) != 0) @@ -1107,7 +1107,7 @@ cputurn(void) (void) sleep(1); } #ifdef DEBUG - (void) mvprintw(PROMPTLINE + 2, 0, + MvPrintw(PROMPTLINE + 2, 0, "New state %d, x=%d, y=%d, d=%d", next, x, y, d); #endif /* DEBUG */ @@ -1135,7 +1135,7 @@ playagain(void) ++j; if (cpuwon >= 10) ++j; - (void) mvprintw(1, (COLWIDTH - j) / 2, + MvPrintw(1, (COLWIDTH - j) / 2, "%s: %d Computer: %d", name, plywon, cpuwon); prompt(2, (awinna())? "Want to be humiliated again, %s [yn]? " diff --git a/test/cardfile.c b/test/cardfile.c index 68ae4fe0..76185611 100644 --- a/test/cardfile.c +++ b/test/cardfile.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1999-2008,2010 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 @@ /* * Author: Thomas E. Dickey * - * $Id: cardfile.c,v 1.35 2008/08/05 00:42:24 tom Exp $ + * $Id: cardfile.c,v 1.37 2010/05/01 22:19:02 tom Exp $ * * File format: text beginning in column 1 is a title; other text is content. */ @@ -262,7 +262,7 @@ next_card(CARD * now) if (isVisible(tst)) now = tst; else - tst = next_card(tst); + (void) next_card(tst); } return now; } @@ -523,14 +523,12 @@ cardfile(char *fname) #if NO_LEAKS while (all_cards != 0) { FIELD **f; - int count; p = all_cards; all_cards = all_cards->link; if (isVisible(p)) { f = form_fields(p->form); - count = field_count(p->form); unpost_form(p->form); /* ...so we can free it */ free_form(p->form); /* this also disconnects the fields */ diff --git a/test/chgat.c b/test/chgat.c index aee178e1..53ecfd7c 100644 --- a/test/chgat.c +++ b/test/chgat.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2006-2009,2010 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: chgat.c,v 1.10 2009/10/24 21:32:57 tom Exp $ + * $Id: chgat.c,v 1.11 2010/05/01 19:12:26 tom Exp $ * * test-driver for chgat/wchgat/mvchgat/mvwchgat */ @@ -221,7 +221,7 @@ show_help(WINDOW *win) getmaxyx(win, y_max, x_max); for (row = 0; row < (int) SIZEOF(table) && row < y_max; ++row) { - mvwprintw(win, row, 0, "%.*s", x_max, table[row]); + MvWPrintw(win, row, 0, "%.*s", x_max, table[row]); } while (wgetch(win) != 'q') beep(); diff --git a/test/clip_printw.c b/test/clip_printw.c index 272da7b4..dd3d7ee0 100644 --- a/test/clip_printw.c +++ b/test/clip_printw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2008-2009,2010 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: clip_printw.c,v 1.5 2009/10/24 21:02:55 tom Exp $ + * $Id: clip_printw.c,v 1.6 2010/05/01 19:13:46 tom Exp $ * * demonstrate how to use printw without wrapping. */ @@ -247,7 +247,7 @@ show_help(WINDOW *win) getmaxyx(win, y_max, x_max); for (row = 0; row < (int) SIZEOF(table) && row < y_max; ++row) { - mvwprintw(win, row, 0, "%.*s", x_max, table[row]); + MvWPrintw(win, row, 0, "%.*s", x_max, table[row]); } while (wgetch(win) != 'q') beep(); diff --git a/test/demo_forms.c b/test/demo_forms.c index 0df590ab..a649a5ce 100644 --- a/test/demo_forms.c +++ b/test/demo_forms.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2003-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2003-2009,2010 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: demo_forms.c,v 1.33 2009/08/29 18:47:26 tom Exp $ + * $Id: demo_forms.c,v 1.35 2010/05/01 21:56:10 tom Exp $ * * Demonstrate a variety of functions from the form library. * Thomas Dickey - 2003/4/26 @@ -175,7 +175,7 @@ erase_form(FORM * f) static void show_insert_mode(bool insert_mode) { - mvaddstr(5, 57, (insert_mode + MvAddStr(5, 57, (insert_mode ? "form_status: insert " : "form_status: overlay")); } @@ -351,7 +351,7 @@ demo_forms(void) help_edit_field(); - mvaddstr(4, 57, "Forms Entry Test"); + MvAddStr(4, 57, "Forms Entry Test"); show_insert_mode(TRUE); refresh(); @@ -423,7 +423,7 @@ demo_forms(void) set_field_buffer(f[n - 1], 1, "Hello\nWorld!"); } - f[n++] = (FIELD *) 0; + f[n] = (FIELD *) 0; if ((form = new_form(f)) != 0) { diff --git a/test/demo_menus.c b/test/demo_menus.c index 90caf821..4625ef67 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2005-2009,2010 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: demo_menus.c,v 1.29 2009/10/24 21:19:27 tom Exp $ + * $Id: demo_menus.c,v 1.30 2010/05/01 19:12:26 tom Exp $ * * Demonstrate a variety of functions from the menu library. * Thomas Dickey - 2005/4/9 @@ -546,7 +546,7 @@ perform_trace_menu(int cmd) trace(newtrace); Trace(("trace level interactively set to %s", tracetrace(_nc_tracing))); - (void) mvprintw(LINES - 2, 0, + MvPrintw(LINES - 2, 0, "Trace level is %s\n", tracetrace(_nc_tracing)); refresh(); } diff --git a/test/demo_panels.c b/test/demo_panels.c index f9af6cc7..ce6beb70 100644 --- a/test/demo_panels.c +++ b/test/demo_panels.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_panels.c,v 1.34 2010/03/06 18:14:04 tom Exp $ + * $Id: demo_panels.c,v 1.37 2010/05/01 22:19:02 tom Exp $ * * Demonstrate a variety of functions from the panel library. */ @@ -117,10 +117,9 @@ get_position(NCURSES_CONST char *text, int result = 0; int x1, y1; char cmd; - WINDOW *win; getyx(stdscr, y1, x1); - win = statusline(); + (void) statusline(); show_position(text, also, which, y1, x1); @@ -508,7 +507,7 @@ show_panels(PANEL * px[MAX_PANELS + 1]) keypad(win, TRUE); if ((pan = new_panel(win)) != 0) { werase(win); - mvwprintw(win, 0, 0, "Panels:\n"); + MvWPrintw(win, 0, 0, "Panels:\n"); for (j = 1; j <= MAX_PANELS; ++j) { if (table[j].valid) { wprintw(win, " %d:", j); diff --git a/test/demo_termcap.c b/test/demo_termcap.c index 4289de05..8c7b05b9 100644 --- a/test/demo_termcap.c +++ b/test/demo_termcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2005-2009,2010 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 @@ /* * Author: Thomas E. Dickey * - * $Id: demo_termcap.c,v 1.12 2009/10/10 16:01:41 tom Exp $ + * $Id: demo_termcap.c,v 1.13 2010/05/01 22:04:08 tom Exp $ * * A simple demo of the termcap interface. */ @@ -125,7 +125,7 @@ dumpit(NCURSES_CONST char *cap) } else if ((num = tgetnum(cap)) >= 0) { printf(FNAME(num), cap); printf(" %d\n", num); - } else if ((num = tgetflag(cap)) > 0) { + } else if (tgetflag(cap) > 0) { printf(FNAME(flg), cap); printf("%s\n", "true"); } diff --git a/test/ditto.c b/test/ditto.c index 6e559261..a0e01f25 100644 --- a/test/ditto.c +++ b/test/ditto.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey (1998-on) * - * $Id: ditto.c,v 1.36 2010/01/30 23:39:09 tom Exp $ + * $Id: ditto.c,v 1.38 2010/05/01 22:08:03 tom Exp $ * * The program illustrates how to set up multiple screens from a single * program. @@ -155,12 +155,11 @@ open_tty(char *path) int aslave; char slave_name[1024]; char s_option[sizeof(slave_name) + 80]; - char *leaf; if (openpty(&amaster, &aslave, slave_name, 0, 0) != 0 || strlen(slave_name) > sizeof(slave_name) - 1) failed("openpty"); - if ((leaf = strrchr(slave_name, '/')) == 0) { + if (strrchr(slave_name, '/') == 0) { errno = EISDIR; failed(slave_name); } @@ -216,7 +215,7 @@ init_screen( WINDOW *inner = derwin(outer, high - 2, wide - 2, 1, 1); box(outer, 0, 0); - mvwaddstr(outer, 0, 2, target->titles[k]); + MvWAddStr(outer, 0, 2, target->titles[k]); wnoutrefresh(outer); scrollok(inner, TRUE); @@ -386,6 +385,8 @@ main(int argc, char *argv[]) if ((data = typeCalloc(DITTO, (size_t) argc)) == 0) failed("calloc data"); + assert(data != 0); + for (j = 0; j < argc; j++) { open_screen(&data[j], argv, argc, j); } diff --git a/test/dots.c b/test/dots.c index 57e33413..1fdcff95 100644 --- a/test/dots.c +++ b/test/dots.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1999-2009,2010 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 @@ /* * Author: Thomas E. Dickey 1999 * - * $Id: dots.c,v 1.19 2009/10/10 16:22:24 tom Exp $ + * $Id: dots.c,v 1.20 2010/05/01 22:04:08 tom Exp $ * * A simple demo of the terminfo interface. */ @@ -58,7 +58,7 @@ outc(TPUTS_ARG c) } else { rc = putc(c, stdout); } - return 0; + return rc; } static bool diff --git a/test/firework.c b/test/firework.c index 979d1d7c..62f4637b 100644 --- a/test/firework.c +++ b/test/firework.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.25 2009/08/29 19:02:25 tom Exp $ + * $Id: firework.c,v 1.26 2010/05/01 19:12:26 tom Exp $ */ #include @@ -90,50 +90,50 @@ explode(int row, int col) { chtype bold; erase(); - mvprintw(row, col, "-"); + MvPrintw(row, col, "-"); showit(); init_pair(1, get_colour(&bold), my_bg); (void) attrset(COLOR_PAIR(1) | bold); - mvprintw(row - 1, col - 1, " - "); - mvprintw(row + 0, col - 1, "-+-"); - mvprintw(row + 1, col - 1, " - "); + MvPrintw(row - 1, col - 1, " - "); + MvPrintw(row + 0, col - 1, "-+-"); + MvPrintw(row + 1, col - 1, " - "); showit(); init_pair(1, get_colour(&bold), my_bg); (void) attrset(COLOR_PAIR(1) | bold); - mvprintw(row - 2, col - 2, " --- "); - mvprintw(row - 1, col - 2, "-+++-"); - mvprintw(row + 0, col - 2, "-+#+-"); - mvprintw(row + 1, col - 2, "-+++-"); - mvprintw(row + 2, col - 2, " --- "); + MvPrintw(row - 2, col - 2, " --- "); + MvPrintw(row - 1, col - 2, "-+++-"); + MvPrintw(row + 0, col - 2, "-+#+-"); + MvPrintw(row + 1, col - 2, "-+++-"); + MvPrintw(row + 2, col - 2, " --- "); showit(); init_pair(1, get_colour(&bold), my_bg); (void) attrset(COLOR_PAIR(1) | bold); - mvprintw(row - 2, col - 2, " +++ "); - mvprintw(row - 1, col - 2, "++#++"); - mvprintw(row + 0, col - 2, "+# #+"); - mvprintw(row + 1, col - 2, "++#++"); - mvprintw(row + 2, col - 2, " +++ "); + MvPrintw(row - 2, col - 2, " +++ "); + MvPrintw(row - 1, col - 2, "++#++"); + MvPrintw(row + 0, col - 2, "+# #+"); + MvPrintw(row + 1, col - 2, "++#++"); + MvPrintw(row + 2, col - 2, " +++ "); showit(); init_pair(1, get_colour(&bold), my_bg); (void) attrset(COLOR_PAIR(1) | bold); - mvprintw(row - 2, col - 2, " # "); - mvprintw(row - 1, col - 2, "## ##"); - mvprintw(row + 0, col - 2, "# #"); - mvprintw(row + 1, col - 2, "## ##"); - mvprintw(row + 2, col - 2, " # "); + MvPrintw(row - 2, col - 2, " # "); + MvPrintw(row - 1, col - 2, "## ##"); + MvPrintw(row + 0, col - 2, "# #"); + MvPrintw(row + 1, col - 2, "## ##"); + MvPrintw(row + 2, col - 2, " # "); showit(); init_pair(1, get_colour(&bold), my_bg); (void) attrset(COLOR_PAIR(1) | bold); - mvprintw(row - 2, col - 2, " # # "); - mvprintw(row - 1, col - 2, "# #"); - mvprintw(row + 0, col - 2, " "); - mvprintw(row + 1, col - 2, "# #"); - mvprintw(row + 2, col - 2, " # # "); + MvPrintw(row - 2, col - 2, " # # "); + MvPrintw(row - 1, col - 2, "# #"); + MvPrintw(row + 0, col - 2, " "); + MvPrintw(row + 1, col - 2, "# #"); + MvPrintw(row + 2, col - 2, " # # "); showit(); } @@ -175,7 +175,7 @@ main( } while (diff < 2 || diff >= LINES - 2); (void) attrset(A_NORMAL); for (row = 0; row < diff; row++) { - mvprintw(LINES - row, start + (row * direction), + MvPrintw(LINES - row, start + (row * direction), (direction < 0) ? "\\" : "/"); if (flag++) { showit(); diff --git a/test/firstlast.c b/test/firstlast.c index f639f4aa..f5328c72 100644 --- a/test/firstlast.c +++ b/test/firstlast.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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 test was written by Alexander V. Lukyanov to demonstrate difference * between ncurses 4.1 and SVR4 curses * - * $Id: firstlast.c,v 1.6 2009/07/15 23:29:46 tom Exp $ + * $Id: firstlast.c,v 1.7 2010/05/01 19:11:55 tom Exp $ */ #include @@ -73,14 +73,14 @@ main(int argc GCC_UNUSED, wrefresh(large); wrefresh(small); - mvwaddstr(small, 5, 5, " Test String "); + MvWAddStr(small, 5, 5, " Test String "); wrefresh(small); getch(); touchwin(large); wrefresh(large); - mvwaddstr(small, 5, 5, " Test <***************> String "); + MvWAddStr(small, 5, 5, " Test <***************> String "); wrefresh(small); /* DIFFERENCE! */ diff --git a/test/gdc.c b/test/gdc.c index 5eb36820..7209adb4 100644 --- a/test/gdc.c +++ b/test/gdc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.32 2009/08/29 19:02:25 tom Exp $ + * $Id: gdc.c,v 1.33 2010/05/01 19:12:26 tom Exp $ */ #include @@ -80,20 +80,20 @@ drawbox(bool scrolling) if (hascolor) (void) attrset(COLOR_PAIR(PAIR_FRAMES)); - mvaddch(YBASE - 1, XBASE - 1, ACS_ULCORNER); + MvAddCh(YBASE - 1, XBASE - 1, ACS_ULCORNER); hline(ACS_HLINE, XLENGTH); - mvaddch(YBASE - 1, XBASE + XLENGTH, ACS_URCORNER); + MvAddCh(YBASE - 1, XBASE + XLENGTH, ACS_URCORNER); - mvaddch(YBASE + YDEPTH, XBASE - 1, ACS_LLCORNER); + MvAddCh(YBASE + YDEPTH, XBASE - 1, ACS_LLCORNER); if ((mvinchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH)) != ERR) { for (n = 0; n < XLENGTH; n++) { if (!scrolling) bottom[n] &= ~A_COLOR; bottom[n] = ACS_HLINE | (bottom[n] & (A_ATTRIBUTES | A_COLOR)); } - mvaddchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH); + (void) mvaddchnstr(YBASE + YDEPTH, XBASE, bottom, XLENGTH); } - mvaddch(YBASE + YDEPTH, XBASE + XLENGTH, ACS_LRCORNER); + MvAddCh(YBASE + YDEPTH, XBASE + XLENGTH, ACS_LRCORNER); move(YBASE, XBASE - 1); vline(ACS_VLINE, YDEPTH); @@ -295,7 +295,7 @@ main(int argc, char *argv[]) /* this depends on the detailed format of ctime(3) */ (void) strcpy(buf, ctime(&now)); (void) strcpy(buf + 10, buf + 19); - mvaddstr(16, 30, buf); + MvAddStr(16, 30, buf); move(6, 0); drawbox(FALSE); diff --git a/test/hanoi.c b/test/hanoi.c index 671c0cb4..16049155 100644 --- a/test/hanoi.c +++ b/test/hanoi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.28 2009/08/29 19:02:25 tom Exp $ + * $Id: hanoi.c,v 1.29 2010/05/01 19:12:26 tom Exp $ */ #include @@ -165,14 +165,14 @@ main(int argc, char **argv) if (GetMove(&FromCol, &ToCol)) break; if (InvalidMove(FromCol, ToCol)) { - mvaddstr(STATUSLINE, 0, "Invalid Move !!"); + MvAddStr(STATUSLINE, 0, "Invalid Move !!"); refresh(); beep(); continue; } MakeMove(FromCol, ToCol); if (Solved(NTiles)) { - mvprintw(STATUSLINE, 0, + MvPrintw(STATUSLINE, 0, "Well Done !! You did it in %d moves", NMoves); refresh(); sleep(5); @@ -226,21 +226,21 @@ DisplayTiles(void) char TileBuf[BUFSIZ]; erase(); - 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); + 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); (void) attrset(A_REVERSE); - mvaddstr(BASELINE, 8, + MvAddStr(BASELINE, 8, " "); for (Line = TOPLINE; Line < BASELINE; Line++) { - mvaddch(Line, LEFTPEG, ' '); - mvaddch(Line, MIDPEG, ' '); - mvaddch(Line, RIGHTPEG, ' '); + MvAddCh(Line, LEFTPEG, ' '); + MvAddCh(Line, MIDPEG, ' '); + MvAddCh(Line, RIGHTPEG, ' '); } - mvaddch(BASELINE, LEFTPEG, '1'); - mvaddch(BASELINE, MIDPEG, '2'); - mvaddch(BASELINE, RIGHTPEG, '3'); + MvAddCh(BASELINE, LEFTPEG, '1'); + MvAddCh(BASELINE, MIDPEG, '2'); + MvAddCh(BASELINE, RIGHTPEG, '3'); (void) attrset(A_NORMAL); /* Draw tiles */ @@ -254,7 +254,7 @@ DisplayTiles(void) (void) attrset(COLOR_PAIR(LENTOIND(len))); else (void) attrset(A_REVERSE); - mvaddstr(BASELINE - (SlotNo + 1), + MvAddStr(BASELINE - (SlotNo + 1), (int) (PegPos[peg] - len / 2), TileBuf); } @@ -267,7 +267,7 @@ DisplayTiles(void) static int GetMove(int *From, int *To) { - mvaddstr(STATUSLINE, 0, "Next move ('q' to quit) from "); + MvAddStr(STATUSLINE, 0, "Next move ('q' to quit) from "); clrtoeol(); refresh(); if ((*From = getch()) == 'q') diff --git a/test/inch_wide.c b/test/inch_wide.c index 25af426a..3d31f178 100644 --- a/test/inch_wide.c +++ b/test/inch_wide.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007 Free Software Foundation, Inc. * + * Copyright (c) 2007,2010 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: inch_wide.c,v 1.6 2007/07/21 18:37:38 tom Exp $ + * $Id: inch_wide.c,v 1.7 2010/05/01 19:13:46 tom Exp $ */ /* int in_wch(cchar_t *wcval); @@ -153,7 +153,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) break; } - mvwprintw(chrwin, 0, 0, "char:"); + MvWPrintw(chrwin, 0, 0, "char:"); wclrtoeol(chrwin); if (txtwin != stdscr) { @@ -189,7 +189,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) } wnoutrefresh(chrwin); - mvwprintw(strwin, 0, 0, "text:"); + MvWPrintw(strwin, 0, 0, "text:"); wclrtobot(strwin); limit = getmaxx(strwin) - 5; @@ -197,38 +197,38 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) if (txtwin != stdscr) { wmove(txtwin, txt_y, txt_x); if (win_wchstr(txtwin, text) != ERR) { - mvwadd_wchstr(strwin, 0, 5, text); + (void) mvwadd_wchstr(strwin, 0, 5, text); } wmove(txtwin, txt_y, txt_x); if (win_wchnstr(txtwin, text, limit) != ERR) { - mvwadd_wchstr(strwin, 1, 5, text); + (void) mvwadd_wchstr(strwin, 1, 5, text); } if (mvwin_wchstr(txtwin, txt_y, txt_x, text) != ERR) { - mvwadd_wchstr(strwin, 2, 5, text); + (void) mvwadd_wchstr(strwin, 2, 5, text); } if (mvwin_wchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) { - mvwadd_wchstr(strwin, 3, 5, text); + (void) mvwadd_wchstr(strwin, 3, 5, text); } } else { move(txt_y, txt_x); if (in_wchstr(text) != ERR) { - mvwadd_wchstr(strwin, 0, 5, text); + (void) mvwadd_wchstr(strwin, 0, 5, text); } move(txt_y, txt_x); if (in_wchnstr(text, limit) != ERR) { - mvwadd_wchstr(strwin, 1, 5, text); + (void) mvwadd_wchstr(strwin, 1, 5, text); } if (mvin_wchstr(txt_y, txt_x, text) != ERR) { - mvwadd_wchstr(strwin, 2, 5, text); + (void) mvwadd_wchstr(strwin, 2, 5, text); } if (mvin_wchnstr(txt_y, txt_x, text, limit) != ERR) { - mvwadd_wchstr(strwin, 3, 5, text); + (void) mvwadd_wchstr(strwin, 3, 5, text); } } diff --git a/test/inchs.c b/test/inchs.c index 180d3245..508c4eda 100644 --- a/test/inchs.c +++ b/test/inchs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007 Free Software Foundation, Inc. * + * Copyright (c) 2007,2010 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: inchs.c,v 1.9 2007/07/21 19:01:43 tom Exp $ + * $Id: inchs.c,v 1.10 2010/05/01 19:13:46 tom Exp $ * * Author: Thomas E Dickey */ @@ -152,7 +152,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) break; } - mvwprintw(chrwin, 0, 0, "char:"); + MvWPrintw(chrwin, 0, 0, "char:"); wclrtoeol(chrwin); if (txtwin != stdscr) { @@ -190,7 +190,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) } wnoutrefresh(chrwin); - mvwprintw(strwin, 0, 0, "text:"); + MvWPrintw(strwin, 0, 0, "text:"); wclrtobot(strwin); limit = getmaxx(strwin) - 5; @@ -198,38 +198,38 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) if (txtwin != stdscr) { wmove(txtwin, txt_y, txt_x); if (winchstr(txtwin, text) != ERR) { - mvwaddchstr(strwin, 0, 5, text); + MvWAddChStr(strwin, 0, 5, text); } wmove(txtwin, txt_y, txt_x); if (winchnstr(txtwin, text, limit) != ERR) { - mvwaddchstr(strwin, 1, 5, text); + MvWAddChStr(strwin, 1, 5, text); } if (mvwinchstr(txtwin, txt_y, txt_x, text) != ERR) { - mvwaddchstr(strwin, 2, 5, text); + MvWAddChStr(strwin, 2, 5, text); } if (mvwinchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) { - mvwaddchstr(strwin, 3, 5, text); + MvWAddChStr(strwin, 3, 5, text); } } else { move(txt_y, txt_x); if (inchstr(text) != ERR) { - mvwaddchstr(strwin, 0, 5, text); + MvWAddChStr(strwin, 0, 5, text); } move(txt_y, txt_x); if (inchnstr(text, limit) != ERR) { - mvwaddchstr(strwin, 1, 5, text); + MvWAddChStr(strwin, 1, 5, text); } if (mvinchstr(txt_y, txt_x, text) != ERR) { - mvwaddchstr(strwin, 2, 5, text); + MvWAddChStr(strwin, 2, 5, text); } if (mvinchnstr(txt_y, txt_x, text, limit) != ERR) { - mvwaddchstr(strwin, 3, 5, text); + MvWAddChStr(strwin, 3, 5, text); } } diff --git a/test/ins_wide.c b/test/ins_wide.c index 4b952169..157a602c 100644 --- a/test/ins_wide.c +++ b/test/ins_wide.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2007,2009 Free Software Foundation, Inc. * + * Copyright (c) 2002-2009,2010 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: ins_wide.c,v 1.11 2009/09/12 23:02:26 tom Exp $ + * $Id: ins_wide.c,v 1.12 2010/05/01 19:12:26 tom Exp $ * * Demonstrate the wins_wstr() and wins_wch functions. * Thomas Dickey - 2002/11/23 @@ -51,10 +51,10 @@ /* definitions to make it simpler to compare with inserts.c */ #define InsNStr ins_nwstr #define InsStr ins_wstr -#define MvInsNStr mvins_nwstr -#define MvInsStr mvins_wstr -#define MvWInsNStr mvwins_nwstr -#define MvWInsStr mvwins_wstr +#define MvInsNStr (void) mvins_nwstr +#define MvInsStr (void) mvins_wstr +#define MvWInsNStr (void) mvwins_nwstr +#define MvWInsStr (void) mvwins_wstr #define WInsNStr wins_nwstr #define WInsStr wins_wstr @@ -258,14 +258,14 @@ test_inserts(int level) keypad(work, TRUE); for (col = margin + 1; col < COLS; col += MY_TABSIZE) - mvwvline(work, row, col, '.', limit - 2); + MvWVLine(work, row, col, '.', limit - 2); - mvwvline(work, row, margin, ACS_VLINE, limit - 2); - mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin + 1, ACS_VLINE, limit - 2); limit /= 2; - mvwaddstr(work, 1, 2, "String"); - mvwaddstr(work, limit + 1, 2, "Chars"); + MvWAddStr(work, 1, 2, "String"); + MvWAddStr(work, limit + 1, 2, "Chars"); wnoutrefresh(work); buffer[length = 0] = '\0'; diff --git a/test/insdelln.c b/test/insdelln.c index 32a4aab8..c82452ba 100644 --- a/test/insdelln.c +++ b/test/insdelln.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 2008-2009,2010 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: insdelln.c,v 1.3 2009/08/29 18:47:26 tom Exp $ + * $Id: insdelln.c,v 1.4 2010/05/01 19:11:55 tom Exp $ * * test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln */ @@ -224,7 +224,7 @@ show_help(WINDOW *win) getmaxyx(win, y_max, x_max); for (row = 0; row < (int) SIZEOF(table) && row < y_max; ++row) { - mvwprintw(win, row, 0, "%.*s", x_max, table[row]); + MvWPrintw(win, row, 0, "%.*s", x_max, table[row]); } while (wgetch(win) != 'q') beep(); diff --git a/test/inserts.c b/test/inserts.c index 9c3a89ee..308793e0 100644 --- a/test/inserts.c +++ b/test/inserts.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2007,2009 Free Software Foundation, Inc. * + * Copyright (c) 2002-2009,2010 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: inserts.c,v 1.20 2009/10/10 16:01:41 tom Exp $ + * $Id: inserts.c,v 1.21 2010/05/01 19:12:26 tom Exp $ * * Demonstrate the winsstr() and winsch functions. * Thomas Dickey - 2002/10/19 @@ -40,16 +40,16 @@ #define InsNStr insnstr #define InsStr insstr -#define MvInsNStr mvinsnstr -#define MvInsStr mvinsstr -#define MvWInsNStr mvwinsnstr -#define MvWInsStr mvwinsstr +#define MvInsNStr (void) mvinsnstr +#define MvInsStr (void) mvinsstr +#define MvWInsNStr (void) mvwinsnstr +#define MvWInsStr (void) mvwinsstr #define WInsNStr winsnstr #define WInsStr winsstr #define InsCh insch -#define MvInsCh mvinsch -#define MvWInsCh mvwinsch +#define MvInsCh (void) mvinsch +#define MvWInsCh (void) mvwinsch #define WInsCh winsch #define MY_TABSIZE 8 @@ -184,14 +184,14 @@ test_inserts(int level) keypad(work, TRUE); for (col = margin + 1; col < COLS; col += MY_TABSIZE) - mvwvline(work, row, col, '.', limit - 2); + MvWVLine(work, row, col, '.', limit - 2); - mvwvline(work, row, margin, ACS_VLINE, limit - 2); - mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin + 1, ACS_VLINE, limit - 2); limit /= 2; - mvwaddstr(work, 1, 2, "String"); - mvwaddstr(work, limit + 1, 2, "Chars"); + MvWAddStr(work, 1, 2, "String"); + MvWAddStr(work, limit + 1, 2, "Chars"); wnoutrefresh(work); buffer[length = 0] = '\0'; diff --git a/test/knight.c b/test/knight.c index f9ba1dc2..727d57fb 100644 --- a/test/knight.c +++ b/test/knight.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2010 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 @@ * Eric S. Raymond July 22 1995. Mouse support * added September 20th 1995. * - * $Id: knight.c,v 1.28 2008/08/03 23:04:26 tom Exp $ + * $Id: knight.c,v 1.29 2010/05/01 19:11:55 tom Exp $ */ #include @@ -155,7 +155,7 @@ help1(void) (void) waddstr(helpwin, "puzzle; also inform you when you run out\n"); (void) waddstr(helpwin, "of legal moves.\n\n"); - (void) mvwaddstr(helpwin, NOTIFYY - INSTRY, 0, + MvWAddStr(helpwin, NOTIFYY - INSTRY, 0, "Press `?' to go to keystroke help."); } @@ -181,7 +181,7 @@ help2(void) (void) waddstr(helpwin, "square with spacebar, Enter, or the keypad\n"); (void) waddstr(helpwin, "center key. Use F/B to review the path.\n"); - (void) mvwaddstr(helpwin, NOTIFYY - INSTRY, 0, + MvWAddStr(helpwin, NOTIFYY - INSTRY, 0, "Press `?' to go to game explanation"); } @@ -226,7 +226,7 @@ dosquares(void) { int i, j; - mvaddstr(0, 20, "KNIGHT'S MOVE -- a logical solitaire"); + MvAddStr(0, 20, "KNIGHT'S MOVE -- a logical solitaire"); move(BOARDY, BOARDX); waddch(boardwin, ACS_ULCORNER); diff --git a/test/lrtest.c b/test/lrtest.c index e40b0c1f..da12034c 100644 --- a/test/lrtest.c +++ b/test/lrtest.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2010 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 @@ * This can't be part of the ncurses test-program, because ncurses rips off the * bottom line to do labels. * - * $Id: lrtest.c,v 1.21 2005/12/31 16:51:53 tom Exp $ + * $Id: lrtest.c,v 1.22 2010/05/01 19:11:55 tom Exp $ */ #include @@ -51,7 +51,7 @@ typedef struct { static void show(MARK *m) { - mvaddch(m->y, m->x, m->value); + MvAddCh(m->y, m->x, m->value); if (m->mode == 0) { /* along the x-direction */ m->x += m->inc; if (m->x >= COLS) { diff --git a/test/movewindow.c b/test/movewindow.c index d826e58d..e807a8a0 100644 --- a/test/movewindow.c +++ b/test/movewindow.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 2006-2008,2010 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: movewindow.c,v 1.22 2008/04/12 22:01:41 tom Exp $ + * $Id: movewindow.c,v 1.23 2010/05/01 19:11:55 tom Exp $ * * Demonstrate move functions for windows and derived windows from the curses * library. @@ -196,12 +196,12 @@ getwindow(WINDOW *parent, PAIR * ul, PAIR * lr) head_line("Use arrows to move cursor, anything else to mark corner 1"); if ((tmp = selectcell(parent, min_line, min_col, max_line, max_col)) != 0) { *ul = *tmp; - mvwaddch(parent, ul->y, ul->x, '*'); + MvWAddCh(parent, ul->y, ul->x, '*'); head_line("Use arrows to move cursor, anything else to mark corner 2"); if ((tmp = selectcell(parent, ul->y, ul->x, max_line, max_col)) != 0) { *lr = *tmp; - mvwaddch(parent, lr->y, lr->x, '*'); + MvWAddCh(parent, lr->y, lr->x, '*'); wmove(parent, lr->y, lr->x); wsyncdown(parent); wrefresh(parent); @@ -224,16 +224,16 @@ box_inside(WINDOW *win) getyx(win, y0, x0); getmaxyx(win, y1, x1); - mvwhline(win, 0, 0, ACS_HLINE, x1); - mvwhline(win, y1 - 1, 0, ACS_HLINE, x1); + MvWHLine(win, 0, 0, ACS_HLINE, x1); + MvWHLine(win, y1 - 1, 0, ACS_HLINE, x1); - mvwvline(win, 0, 0, ACS_VLINE, y1); - mvwvline(win, 0, x1 - 1, ACS_VLINE, y1); + MvWVLine(win, 0, 0, ACS_VLINE, y1); + MvWVLine(win, 0, x1 - 1, ACS_VLINE, y1); - mvwaddch(win, 0, 0, ACS_ULCORNER); - mvwaddch(win, y1 - 1, 0, ACS_LLCORNER); - mvwaddch(win, 0, x1 - 1, ACS_URCORNER); - mvwaddch(win, y1 - 1, x1 - 1, ACS_LRCORNER); + MvWAddCh(win, 0, 0, ACS_ULCORNER); + MvWAddCh(win, y1 - 1, 0, ACS_LLCORNER); + MvWAddCh(win, 0, x1 - 1, ACS_URCORNER); + MvWAddCh(win, y1 - 1, x1 - 1, ACS_LRCORNER); wsyncdown(win); wmove(win, y0, x0); @@ -441,7 +441,7 @@ fill_window(WINDOW *win, chtype ch) getmaxyx(win, y1, x1); for (y = 0; y < y1; ++y) { for (x = 0; x < x1; ++x) { - mvwaddch(win, y, x, ch); + MvWAddCh(win, y, x, ch); } } wsyncdown(win); diff --git a/test/ncurses.c b/test/ncurses.c index 47125f7a..3289ada6 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.356 2010/03/06 18:45:14 tom Exp $ +$Id: ncurses.c,v 1.359 2010/05/01 22:39:06 tom Exp $ ***************************************************************************/ @@ -171,14 +171,14 @@ static void do_h_line(int y, int x, chtype c, int to) { if ((to) > (x)) - mvhline(y, x, c, (to) - (x)); + MvHLine(y, x, c, (to) - (x)); } static void do_v_line(int y, int x, chtype c, int to) { if ((to) > (y)) - mvvline(y, x, c, (to) - (y)); + MvVLine(y, x, c, (to) - (y)); } static void @@ -666,7 +666,7 @@ wgetch_help(WINDOW *win, GetchFlags flags) && (flags[UChar(*help[n])] != FALSE)); if (flg) (void) standout(); - mvprintw(row, col, "%s", help[n]); + MvPrintw(row, col, "%s", help[n]); if (col == 0) clrtoeol(); if (flg) @@ -1236,29 +1236,29 @@ attr_legend(WINDOW *helpwin) int row = 1; int col = 1; - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "ESC to exit."); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "^L repaints."); ++row; - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "Modify the test strings:"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " A digit sets gaps on each side of displayed attributes"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " shifts the text left/right. "); ++row; - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "Toggles:"); if (use_colors) { - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " f/F/b/F toggle foreground/background background color"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " t/T toggle text/background color attribute"); } - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " a/A toggle ACS (alternate character set) mapping"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row, col, " v/V toggle video attribute to combine with each line"); } @@ -1360,9 +1360,9 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name) chtype test = attr & (chtype) (~A_ALTCHARSET); if (arrow) - mvprintw(row, 5, "-->"); - mvprintw(row, 8, "%s mode:", name); - mvprintw(row, 24, "|"); + MvPrintw(row, 5, "-->"); + MvPrintw(row, 8, "%s mode:", name); + MvPrintw(row, 24, "|"); if (skip) printw("%*s", skip, " "); /* @@ -1551,7 +1551,7 @@ attr_test(void) erase(); box(stdscr, 0, 0); - mvaddstr(0, 20, "Character attribute test display"); + MvAddStr(0, 20, "Character attribute test display"); for (j = 0; j < SIZEOF(attrs_to_test); ++j) { bool arrow = (j == k); @@ -1562,10 +1562,10 @@ attr_test(void) attrs_to_test[j].name); } - mvprintw(row, 8, + MvPrintw(row, 8, "This terminal does %shave the magic-cookie glitch", get_xmc() > -1 ? "" : "not "); - mvprintw(row + 1, 8, "Enter '?' for help."); + MvPrintw(row + 1, 8, "Enter '?' for help."); show_color_attr(fg, bg, tx); printw(" ACS (%d)", ac != 0); @@ -1648,9 +1648,9 @@ wide_show_attr(int row, int skip, bool arrow, chtype attr, short pair, const cha chtype test = attr & ~WA_ALTCHARSET; if (arrow) - mvprintw(row, 5, "-->"); - mvprintw(row, 8, "%s mode:", name); - mvprintw(row, 24, "|"); + MvPrintw(row, 5, "-->"); + MvPrintw(row, 8, "%s mode:", name); + MvPrintw(row, 24, "|"); if (skip) printw("%*s", skip, " "); @@ -1674,10 +1674,10 @@ wide_show_attr(int row, int skip, bool arrow, chtype attr, short pair, const cha attr_t old_attr; short old_pair; - attr_get(&old_attr, &old_pair, 0); - attr_set(attr, pair, 0); + (void) attr_get(&old_attr, &old_pair, 0); + (void) attr_set(attr, pair, 0); addwstr(wide_attr_test_string); - attr_set(old_attr, old_pair, 0); + (void) attr_set(old_attr, old_pair, 0); } if (skip) printw("%*s", skip, " "); @@ -1823,7 +1823,7 @@ wide_attr_test(void) erase(); box_set(stdscr, 0, 0); - mvaddstr(0, 20, "Character attribute test display"); + MvAddStr(0, 20, "Character attribute test display"); for (j = 0; j < SIZEOF(attrs_to_test); ++j) { row = wide_show_attr(row, n, j == k, @@ -1834,10 +1834,10 @@ wide_attr_test(void) attrs_to_test[j].name); } - mvprintw(row, 8, + MvPrintw(row, 8, "This terminal does %shave the magic-cookie glitch", get_xmc() > -1 ? "" : "not "); - mvprintw(row + 1, 8, "Enter '?' for help."); + MvPrintw(row + 1, 8, "Enter '?' for help."); show_color_attr(fg, bg, tx); printw(" ACS (%d)", ac != 0); @@ -1903,35 +1903,35 @@ color_legend(WINDOW *helpwin, bool wide) int row = 1; int col = 1; - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "ESC to exit."); ++row; - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "Use up/down arrow to scroll through the display if it is"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "longer than one screen. Control/N and Control/P can be used"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "in place of up/down arrow. Use pageup/pagedown to scroll a"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "full screen; control/B and control/F can be used here."); ++row; - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "Toggles:"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " a/A toggle altcharset off/on"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " b/B toggle bold off/on"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " n/N toggle text/number on/off"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " r/R toggle reverse on/off"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, " w/W toggle width between 8/16 colors"); #if USE_WIDEC_SUPPORT if (wide) { - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row++, col, "Wide characters:"); - mvwprintw(helpwin, row++, col, + MvWPrintw(helpwin, row, col, " x/X toggle text between ASCII and wide-character"); } #else @@ -1995,11 +1995,11 @@ color_test(void) min_colors ? " besides 'default'" : ""); clrtobot(); - (void) mvprintw(top + 1, 0, - "%dx%d matrix of foreground/background colors, bold *%s*\n", - row_limit, - per_row, - opt_bold ? "on" : "off"); + MvPrintw(top + 1, 0, + "%dx%d matrix of foreground/background colors, bold *%s*\n", + row_limit, + per_row, + opt_bold ? "on" : "off"); /* show color names/numbers across the top */ for (i = 0; i < per_row; i++) @@ -2138,7 +2138,6 @@ color_test(void) static void wide_color_test(void) { - int c; int i; int top = 0, width; int base_row = 0; @@ -2199,11 +2198,11 @@ wide_color_test(void) min_colors ? " besides 'default'" : ""); clrtobot(); - (void) mvprintw(top + 1, 0, - "%dx%d matrix of foreground/background colors, bold *%s*\n", - row_limit, - per_row, - opt_bold ? "on" : "off"); + MvPrintw(top + 1, 0, + "%dx%d matrix of foreground/background colors, bold *%s*\n", + row_limit, + per_row, + opt_bold ? "on" : "off"); /* show color names/numbers across the top */ for (i = 0; i < per_row; i++) @@ -2234,7 +2233,7 @@ wide_color_test(void) } } addnwstr(buffer, width); - attr_set(A_NORMAL, 0, NULL); + (void) attr_set(A_NORMAL, 0, NULL); if ((i % per_row) == 0 && InxToFG(i) == min_colors) { show_color_name(row, 0, InxToBG(i), opt_wide); @@ -2245,7 +2244,7 @@ wide_color_test(void) } } - switch (c = wGetchar(stdscr)) { + switch (wGetchar(stdscr)) { case 'a': opt_acsc = FALSE; break; @@ -2397,13 +2396,13 @@ color_edit(void) for (i = 0; i < max_colors; i++) init_pair((short) i, (short) COLOR_WHITE, (short) i); - mvprintw(LINES - 2, 0, "Number: %d", value); + MvPrintw(LINES - 2, 0, "Number: %d", value); do { short red, green, blue; attron(A_BOLD); - mvaddstr(0, 20, "Color RGB Value Editing"); + MvAddStr(0, 20, "Color RGB Value Editing"); attroff(A_BOLD); for (i = (short) top_color; @@ -2412,7 +2411,7 @@ color_edit(void) char numeric[80]; sprintf(numeric, "[%d]", i); - mvprintw(2 + i - top_color, 0, "%c %-8s:", + MvPrintw(2 + i - top_color, 0, "%c %-8s:", (i == current ? '>' : ' '), (i < (int) SIZEOF(the_color_names) ? the_color_names[i] : numeric)); @@ -2446,9 +2445,9 @@ color_edit(void) scaled_rgb(blue)); } - mvaddstr(LINES - 3, 0, + MvAddStr(LINES - 3, 0, "Use up/down to select a color, left/right to change fields."); - mvaddstr(LINES - 2, 0, + MvAddStr(LINES - 2, 0, "Modify field by typing nnn=, nnn-, or nnn+. ? for help."); move(2 + current - top_color, 0); @@ -2561,7 +2560,7 @@ color_edit(void) if (current - top_color >= page_size) top_color = current - (page_size - 1); - mvprintw(LINES - 1, 0, "Number: %d", value); + MvPrintw(LINES - 1, 0, "Number: %d", value); clrtoeol(); } while (!isQuit(this_c)); @@ -2712,7 +2711,7 @@ call_slk_color(short fg, short bg) { init_pair(1, bg, fg); slk_color(1); - mvprintw(SLK_WORK, 0, "Colors %d/%d\n", fg, bg); + MvPrintw(SLK_WORK, 0, "Colors %d/%d\n", fg, bg); clrtoeol(); slk_touch(); slk_noutrefresh(); @@ -2748,7 +2747,7 @@ slk_test(void) case CTRL('l'): erase(); attron(A_BOLD); - mvaddstr(0, 20, "Soft Key Exerciser"); + MvAddStr(0, 20, "Soft Key Exerciser"); attroff(A_BOLD); slk_help(); @@ -2763,7 +2762,7 @@ slk_test(void) break; case 's': - mvprintw(SLK_WORK, 0, "Press Q to stop the scrolling-test: "); + MvPrintw(SLK_WORK, 0, "Press Q to stop the scrolling-test: "); while ((c = Getchar()) != 'Q' && (c != ERR)) addch((chtype) c); break; @@ -2792,7 +2791,7 @@ slk_test(void) case '6': case '7': case '8': - (void) mvaddstr(SLK_WORK, 0, "Please enter the label value: "); + MvAddStr(SLK_WORK, 0, "Please enter the label value: "); strcpy(buf, ""); if ((s = slk_label(c - '0')) != 0) { strncpy(buf, s, 8); @@ -2866,7 +2865,7 @@ wide_slk_test(void) case CTRL('l'): erase(); attr_on(WA_BOLD, NULL); - mvaddstr(0, 20, "Soft Key Exerciser"); + MvAddStr(0, 20, "Soft Key Exerciser"); attr_off(WA_BOLD, NULL); slk_help(); @@ -2881,7 +2880,7 @@ wide_slk_test(void) break; case 's': - mvprintw(SLK_WORK, 0, "Press Q to stop the scrolling-test: "); + MvPrintw(SLK_WORK, 0, "Press Q to stop the scrolling-test: "); while ((c = Getchar()) != 'Q' && (c != ERR)) addch((chtype) c); break; @@ -2910,7 +2909,7 @@ wide_slk_test(void) case '6': case '7': case '8': - (void) mvaddstr(SLK_WORK, 0, "Please enter the label value: "); + MvAddStr(SLK_WORK, 0, "Please enter the label value: "); *buf = 0; if ((s = slk_label(c - '0')) != 0) { char *temp = strdup(s); @@ -3008,7 +3007,7 @@ show_upper_chars(unsigned first, int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvprintw(0, 20, "Display of %s Character Codes %d to %d", + MvPrintw(0, 20, "Display of %s Character Codes %d to %d", C1 ? "C1" : "GR", first, last); attroff(A_BOLD); refresh(); @@ -3019,7 +3018,7 @@ show_upper_chars(unsigned first, int repeat, attr_t attr, short pair) int col = ((int) (code - first) / 16) * COLS / 2; char tmp[80]; sprintf(tmp, "%3u (0x%x)", code, code); - mvprintw(row, col, "%*s: ", COLS / 4, tmp); + MvPrintw(row, col, "%*s: ", COLS / 4, tmp); do { if (C1) @@ -3046,19 +3045,19 @@ show_pc_chars(int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvprintw(0, 20, "Display of PC Character Codes"); + MvPrintw(0, 20, "Display of PC Character Codes"); attroff(A_BOLD); refresh(); for (code = 0; code < 16; ++code) { - mvprintw(2, (int) code * PC_COLS + 8, "%X", code); + MvPrintw(2, (int) code * PC_COLS + 8, "%X", code); } for (code = 0; code < 256; code++) { int count = repeat; int row = 3 + (int) (code / 16) + (code >= 128); int col = 8 + (int) (code % 16) * PC_COLS; if ((code % 16) == 0) - mvprintw(row, 0, "0x%02x:", code); + MvPrintw(row, 0, "0x%02x:", code); move(row, col); do { switch (code) { @@ -3088,7 +3087,7 @@ show_box_chars(int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the ACS Line-Drawing Set"); + MvAddStr(0, 20, "Display of the ACS Line-Drawing Set"); attroff(A_BOLD); refresh(); /* *INDENT-OFF* */ @@ -3101,13 +3100,13 @@ show_box_chars(int repeat, attr_t attr, short pair) colored_chtype(ACS_URCORNER, attr, pair), colored_chtype(ACS_LLCORNER, attr, pair), colored_chtype(ACS_LRCORNER, attr, pair)); - mvhline(LINES / 2, 0, colored_chtype(ACS_HLINE, attr, pair), COLS); - mvvline(0, COLS / 2, colored_chtype(ACS_VLINE, attr, pair), LINES); - mvaddch(0, COLS / 2, colored_chtype(ACS_TTEE, attr, pair)); - mvaddch(LINES / 2, COLS / 2, colored_chtype(ACS_PLUS, attr, pair)); - mvaddch(LINES - 1, COLS / 2, colored_chtype(ACS_BTEE, attr, pair)); - mvaddch(LINES / 2, 0, colored_chtype(ACS_LTEE, attr, pair)); - mvaddch(LINES / 2, COLS - 1, colored_chtype(ACS_RTEE, attr, pair)); + MvHLine(LINES / 2, 0, colored_chtype(ACS_HLINE, attr, pair), COLS); + MvVLine(0, COLS / 2, colored_chtype(ACS_VLINE, attr, pair), LINES); + MvAddCh(0, COLS / 2, colored_chtype(ACS_TTEE, attr, pair)); + MvAddCh(LINES / 2, COLS / 2, colored_chtype(ACS_PLUS, attr, pair)); + MvAddCh(LINES - 1, COLS / 2, colored_chtype(ACS_BTEE, attr, pair)); + MvAddCh(LINES / 2, 0, colored_chtype(ACS_LTEE, attr, pair)); + MvAddCh(LINES / 2, COLS - 1, colored_chtype(ACS_RTEE, attr, pair)); /* *INDENT-ON* */ } @@ -3119,7 +3118,7 @@ show_1_acs(int n, int repeat, const char *name, chtype code) int row = 2 + (n % height); int col = (n / height) * COLS / 2; - mvprintw(row, col, "%*s : ", COLS / 4, name); + MvPrintw(row, col, "%*s : ", COLS / 4, name); do { addch(code); } while (--repeat > 0); @@ -3136,7 +3135,7 @@ show_acs_chars(int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the ACS Character Set"); + MvAddStr(0, 20, "Display of the ACS Character Set"); attroff(A_BOLD); refresh(); @@ -3181,7 +3180,7 @@ show_acs_chars(int repeat, attr_t attr, short pair) n = show_1_acs(n, repeat, BOTH(ACS_S1)); n = show_1_acs(n, repeat, BOTH(ACS_S3)); n = show_1_acs(n, repeat, BOTH(ACS_S7)); - n = show_1_acs(n, repeat, BOTH(ACS_S9)); + (void) show_1_acs(n, repeat, BOTH(ACS_S9)); #endif } @@ -3264,18 +3263,18 @@ acs_display(void) else show_upper_chars((unsigned) (digit * 32 + 128), repeat, attr, pair); - mvprintw(LINES - 3, 0, + MvPrintw(LINES - 3, 0, "Note: ANSI terminals may not display C1 characters."); - mvprintw(LINES - 2, 0, + MvPrintw(LINES - 2, 0, "Select: a=ACS, x=box, %s0=C1, 1-3,+/- non-ASCII, repeat, ESC=quit", pch_kludge); if (use_colors) { - mvprintw(LINES - 1, 0, + MvPrintw(LINES - 1, 0, "v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.", attrs_to_cycle[at_code].name, fg, bg); } else { - mvprintw(LINES - 1, 0, + MvPrintw(LINES - 1, 0, "v/V cycles through video attributes (%s).", attrs_to_cycle[at_code].name); } @@ -3315,7 +3314,7 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair) erase(); attron(A_BOLD); - mvprintw(0, 20, "Display of Character Codes %d to %d", first, last); + MvPrintw(0, 20, "Display of Character Codes %d to %d", first, last); attroff(A_BOLD); for (code = first; (int) code <= last; code++) { @@ -3329,7 +3328,7 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair) memset(&codes, 0, sizeof(codes)); codes[0] = code; sprintf(tmp, "%3ld (0x%lx)", (long) code, (long) code); - mvprintw(row, col, "%*s: ", COLS / 4, tmp); + MvPrintw(row, col, "%*s: ", COLS / 4, tmp); setcchar(&temp, codes, attr, pair, 0); do { /* @@ -3364,7 +3363,7 @@ show_1_wacs(int n, int repeat, const char *name, const cchar_t *code) int row = 2 + (n % height); int col = (n / height) * COLS / 2; - mvprintw(row, col, "%*s : ", COLS / 4, name); + MvPrintw(row, col, "%*s : ", COLS / 4, name); while (--repeat >= 0) { add_wch(code); } @@ -3386,7 +3385,7 @@ show_wacs_chars(int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the Wide-ACS Character Set"); + MvAddStr(0, 20, "Display of the Wide-ACS Character Set"); attroff(A_BOLD); refresh(); @@ -3428,7 +3427,7 @@ show_wacs_chars(int repeat, attr_t attr, short pair) n = show_1_wacs(n, repeat, BOTH2(WACS_S1)); n = show_1_wacs(n, repeat, BOTH2(WACS_S3)); n = show_1_wacs(n, repeat, BOTH2(WACS_S7)); - n = show_1_wacs(n, repeat, BOTH2(WACS_S9)); + (void) show_1_wacs(n, repeat, BOTH2(WACS_S9)); #endif } @@ -3446,7 +3445,7 @@ show_wacs_chars_double(int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the Wide-ACS Character Set"); + MvAddStr(0, 20, "Display of the Wide-ACS Character Set"); attroff(A_BOLD); refresh(); @@ -3488,7 +3487,7 @@ show_wacs_chars_double(int repeat, attr_t attr, short pair) n = show_1_wacs(n, repeat, BOTH2(WACS_S1)); n = show_1_wacs(n, repeat, BOTH2(WACS_S3)); n = show_1_wacs(n, repeat, BOTH2(WACS_S7)); - n = show_1_wacs(n, repeat, BOTH2(WACS_S9)); + (void) show_1_wacs(n, repeat, BOTH2(WACS_S9)); #endif } #endif @@ -3507,7 +3506,7 @@ show_wacs_chars_thick(int repeat, attr_t attr, short pair) erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the Wide-ACS Character Set"); + MvAddStr(0, 20, "Display of the Wide-ACS Character Set"); attroff(A_BOLD); refresh(); @@ -3549,7 +3548,7 @@ show_wacs_chars_thick(int repeat, attr_t attr, short pair) n = show_1_wacs(n, repeat, BOTH2(WACS_S1)); n = show_1_wacs(n, repeat, BOTH2(WACS_S3)); n = show_1_wacs(n, repeat, BOTH2(WACS_S7)); - n = show_1_wacs(n, repeat, BOTH2(WACS_S9)); + (void) show_1_wacs(n, repeat, BOTH2(WACS_S9)); #endif } #endif @@ -3566,7 +3565,7 @@ show_wbox_chars(int repeat, attr_t attr, short pair) (void) repeat; erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the Wide-ACS Line-Drawing Set"); + MvAddStr(0, 20, "Display of the Wide-ACS Line-Drawing Set"); attroff(A_BOLD); refresh(); @@ -3580,13 +3579,13 @@ show_wbox_chars(int repeat, attr_t attr, short pair) MERGE_ATTR(6, WACS_LLCORNER), MERGE_ATTR(7, WACS_LRCORNER)); /* *INDENT-OFF* */ - mvhline_set(LINES / 2, 0, MERGE_ATTR(0, WACS_HLINE), COLS); - mvvline_set(0, COLS / 2, MERGE_ATTR(0, WACS_VLINE), LINES); - mvadd_wch(0, COLS / 2, MERGE_ATTR(0, WACS_TTEE)); - mvadd_wch(LINES / 2, COLS / 2, MERGE_ATTR(0, WACS_PLUS)); - mvadd_wch(LINES - 1, COLS / 2, MERGE_ATTR(0, WACS_BTEE)); - mvadd_wch(LINES / 2, 0, MERGE_ATTR(0, WACS_LTEE)); - mvadd_wch(LINES / 2, COLS - 1, MERGE_ATTR(0, WACS_RTEE)); + (void) mvhline_set(LINES / 2, 0, MERGE_ATTR(0, WACS_HLINE), COLS); + (void) mvvline_set(0, COLS / 2, MERGE_ATTR(0, WACS_VLINE), LINES); + (void) mvadd_wch(0, COLS / 2, MERGE_ATTR(0, WACS_TTEE)); + (void) mvadd_wch(LINES / 2, COLS / 2, MERGE_ATTR(0, WACS_PLUS)); + (void) mvadd_wch(LINES - 1, COLS / 2, MERGE_ATTR(0, WACS_BTEE)); + (void) mvadd_wch(LINES / 2, 0, MERGE_ATTR(0, WACS_LTEE)); + (void) mvadd_wch(LINES / 2, COLS - 1, MERGE_ATTR(0, WACS_RTEE)); /* *INDENT-ON* */ } @@ -3601,10 +3600,10 @@ show_2_wacs(int n, const char *name, const char *code, attr_t attr, short pair) int col = (n / height) * COLS / 2; char temp[80]; - mvprintw(row, col, "%*s : ", COLS / 4, name); - attr_set(attr, pair, 0); + MvPrintw(row, col, "%*s : ", COLS / 4, name); + (void) attr_set(attr, pair, 0); addstr(strcpy(temp, code)); - attr_set(A_NORMAL, 0, 0); + (void) attr_set(A_NORMAL, 0, 0); return n + 1; } @@ -3618,7 +3617,7 @@ show_utf8_chars(int repeat, attr_t attr, short pair) (void) repeat; erase(); attron(A_BOLD); - mvaddstr(0, 20, "Display of the Wide-ACS Character Set"); + MvAddStr(0, 20, "Display of the Wide-ACS Character Set"); attroff(A_BOLD); refresh(); /* *INDENT-OFF* */ @@ -3658,7 +3657,7 @@ show_utf8_chars(int repeat, attr_t attr, short pair) n = SHOW_UTF8(n, "WACS_S1", "\342\216\272"); n = SHOW_UTF8(n, "WACS_S3", "\342\216\273"); n = SHOW_UTF8(n, "WACS_S7", "\342\216\274"); - n = SHOW_UTF8(n, "WACS_S9", "\342\216\275"); + (void) SHOW_UTF8(n, "WACS_S9", "\342\216\275"); /* *INDENT-ON* */ } @@ -3734,15 +3733,15 @@ wide_acs_display(void) else show_upper_widechars(digit * 32 + 128, repeat, space, attr, pair); - mvprintw(LINES - 3, 0, + MvPrintw(LINES - 3, 0, "Select: a/d/t WACS, x box, u UTF-8, 0-9,+/- non-ASCII, repeat, ESC=quit"); if (use_colors) { - mvprintw(LINES - 2, 0, + MvPrintw(LINES - 2, 0, "v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.", attrs_to_cycle[at_code].name, fg, bg); } else { - mvprintw(LINES - 2, 0, + MvPrintw(LINES - 2, 0, "v/V cycles through video attributes (%s).", attrs_to_cycle[at_code].name); } @@ -3774,58 +3773,58 @@ test_sgr_attributes(void) } bkgdset(normal); erase(); - mvprintw(1, 20, "Graphic rendition test pattern:"); + MvPrintw(1, 20, "Graphic rendition test pattern:"); - mvprintw(4, 1, "vanilla"); + MvPrintw(4, 1, "vanilla"); #define set_sgr(mask) bkgdset((normal^(mask))); set_sgr(A_BOLD); - mvprintw(4, 40, "bold"); + MvPrintw(4, 40, "bold"); set_sgr(A_UNDERLINE); - mvprintw(6, 6, "underline"); + MvPrintw(6, 6, "underline"); set_sgr(A_BOLD | A_UNDERLINE); - mvprintw(6, 45, "bold underline"); + MvPrintw(6, 45, "bold underline"); set_sgr(A_BLINK); - mvprintw(8, 1, "blink"); + MvPrintw(8, 1, "blink"); set_sgr(A_BLINK | A_BOLD); - mvprintw(8, 40, "bold blink"); + MvPrintw(8, 40, "bold blink"); set_sgr(A_UNDERLINE | A_BLINK); - mvprintw(10, 6, "underline blink"); + MvPrintw(10, 6, "underline blink"); set_sgr(A_BOLD | A_UNDERLINE | A_BLINK); - mvprintw(10, 45, "bold underline blink"); + MvPrintw(10, 45, "bold underline blink"); set_sgr(A_REVERSE); - mvprintw(12, 1, "negative"); + MvPrintw(12, 1, "negative"); set_sgr(A_BOLD | A_REVERSE); - mvprintw(12, 40, "bold negative"); + MvPrintw(12, 40, "bold negative"); set_sgr(A_UNDERLINE | A_REVERSE); - mvprintw(14, 6, "underline negative"); + MvPrintw(14, 6, "underline negative"); set_sgr(A_BOLD | A_UNDERLINE | A_REVERSE); - mvprintw(14, 45, "bold underline negative"); + MvPrintw(14, 45, "bold underline negative"); set_sgr(A_BLINK | A_REVERSE); - mvprintw(16, 1, "blink negative"); + MvPrintw(16, 1, "blink negative"); set_sgr(A_BOLD | A_BLINK | A_REVERSE); - mvprintw(16, 40, "bold blink negative"); + MvPrintw(16, 40, "bold blink negative"); set_sgr(A_UNDERLINE | A_BLINK | A_REVERSE); - mvprintw(18, 6, "underline blink negative"); + MvPrintw(18, 6, "underline blink negative"); set_sgr(A_BOLD | A_UNDERLINE | A_BLINK | A_REVERSE); - mvprintw(18, 45, "bold underline blink negative"); + MvPrintw(18, 45, "bold underline blink negative"); bkgdset(normal); - mvprintw(LINES - 2, 1, "%s background. ", pass == 0 ? "Dark" : + MvPrintw(LINES - 2, 1, "%s background. ", pass == 0 ? "Dark" : "Light"); clrtoeol(); Pause(); @@ -3973,7 +3972,7 @@ transient(FRAME * curp, NCURSES_CONST char *msg) { newwin_legend(curp); if (msg) { - mvaddstr(LINES - 1, 0, msg); + MvAddStr(LINES - 1, 0, msg); refresh(); napms(1000); } @@ -4063,10 +4062,10 @@ static void outerbox(pair ul, pair lr, bool onoff) /* draw or erase a box *outside* the given pair of corners */ { - mvaddch(ul.y - 1, lr.x - 1, onoff ? ACS_ULCORNER : ' '); - mvaddch(ul.y - 1, lr.x + 1, onoff ? ACS_URCORNER : ' '); - mvaddch(lr.y + 1, lr.x + 1, onoff ? ACS_LRCORNER : ' '); - mvaddch(lr.y + 1, ul.x - 1, onoff ? ACS_LLCORNER : ' '); + MvAddCh(ul.y - 1, lr.x - 1, onoff ? ACS_ULCORNER : ' '); + MvAddCh(ul.y - 1, lr.x + 1, onoff ? ACS_URCORNER : ' '); + MvAddCh(lr.y + 1, lr.x + 1, onoff ? ACS_LRCORNER : ' '); + MvAddCh(lr.y + 1, ul.x - 1, onoff ? ACS_LLCORNER : ' '); move(ul.y - 1, ul.x); hline(onoff ? ACS_HLINE : ' ', lr.x - ul.x + 1); move(ul.y, ul.x - 1); @@ -4091,7 +4090,7 @@ getwindow(void) if ((tmp = selectcell(2, 1, LINES - BOTLINES - 2, COLS - 2)) == (pair *) 0) return ((WINDOW *) 0); memcpy(&ul, tmp, sizeof(pair)); - mvaddch(ul.y - 1, ul.x - 1, ACS_ULCORNER); + MvAddCh(ul.y - 1, ul.x - 1, ACS_ULCORNER); move(0, 0); clrtoeol(); addstr("Use arrows to move cursor, anything else to mark corner 2"); @@ -4160,7 +4159,7 @@ acs_and_scroll(void) { int c; FRAME *current = (FRAME *) 0, *neww; - WINDOW *usescr = stdscr; + WINDOW *usescr; #if HAVE_PUTWIN && HAVE_GETWIN FILE *fp; #endif @@ -4360,7 +4359,7 @@ acs_and_scroll(void) break; x = getmaxx(frame_win(current)) - 1; } - mvwdelch(frame_win(current), y, x); + (void) mvwdelch(frame_win(current), y, x); } break; @@ -5005,7 +5004,7 @@ panner(WINDOW *pad, break; } - mvaddch(top_y - 1, top_x - 1, ACS_ULCORNER); + MvAddCh(top_y - 1, top_x - 1, ACS_ULCORNER); do_v_line(top_y, top_x - 1, ACS_VLINE, porty); do_h_line(top_y - 1, top_x, ACS_HLINE, portx); @@ -5043,9 +5042,9 @@ panner(WINDOW *pad, } else do_v_line(top_y, portx - 1, ACS_VLINE, porty); - mvaddch(top_y - 1, portx - 1, ACS_URCORNER); - mvaddch(porty - 1, top_x - 1, ACS_LLCORNER); - mvaddch(porty - 1, portx - 1, ACS_LRCORNER); + MvAddCh(top_y - 1, portx - 1, ACS_URCORNER); + MvAddCh(porty - 1, top_x - 1, ACS_LLCORNER); + MvAddCh(porty - 1, portx - 1, ACS_LRCORNER); if (!pending_pan) { #if HAVE_GETTIMEOFDAY @@ -5193,7 +5192,7 @@ Continue(WINDOW *win) { noecho(); wmove(win, 10, 1); - mvwaddstr(win, 10, 1, " Press any key to continue"); + MvWAddStr(win, 10, 1, " Press any key to continue"); wrefresh(win); wGetchar(win); } @@ -5222,7 +5221,7 @@ flushinp_test(WINDOW *win) #endif (void) wattrset(subWin, A_BOLD); box(subWin, ACS_VLINE, ACS_HLINE); - mvwaddstr(subWin, 2, 1, "This is a subwindow"); + MvWAddStr(subWin, 2, 1, "This is a subwindow"); wrefresh(win); /* @@ -5233,15 +5232,15 @@ flushinp_test(WINDOW *win) * character to return without needing a newline. - T.Dickey 1997/10/11. */ cbreak(); - mvwaddstr(win, 0, 1, "This is a test of the flushinp() call."); + MvWAddStr(win, 0, 1, "This is a test of the flushinp() call."); - mvwaddstr(win, 2, 1, "Type random keys for 5 seconds."); - mvwaddstr(win, 3, 1, + MvWAddStr(win, 2, 1, "Type random keys for 5 seconds."); + MvWAddStr(win, 3, 1, "These should be discarded (not echoed) after the subwindow goes away."); wrefresh(win); for (i = 0; i < 5; i++) { - mvwprintw(subWin, 1, 1, "Time = %d", i); + MvWPrintw(subWin, 1, 1, "Time = %d", i); wrefresh(subWin); napms(1000); flushinp(); @@ -5253,19 +5252,19 @@ flushinp_test(WINDOW *win) wrefresh(win); napms(1000); - mvwaddstr(win, 2, 1, + MvWAddStr(win, 2, 1, "If you were still typing when the window timer expired,"); - mvwaddstr(win, 3, 1, + MvWAddStr(win, 3, 1, "or else you typed nothing at all while it was running,"); - mvwaddstr(win, 4, 1, + MvWAddStr(win, 4, 1, "test was invalid. You'll see garbage or nothing at all. "); - mvwaddstr(win, 6, 1, "Press a key"); + MvWAddStr(win, 6, 1, "Press a key"); wmove(win, 9, 10); wrefresh(win); echo(); wGetchar(win); flushinp(); - mvwaddstr(win, 12, 0, + MvWAddStr(win, 12, 0, "If you see any key other than what you typed, flushinp() is broken."); Continue(win); @@ -5349,12 +5348,12 @@ menu_test(void) #ifdef NCURSES_MOUSE_VERSION mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0); #endif - mvaddstr(0, 0, "This is the menu test:"); - mvaddstr(2, 0, " Use up and down arrow to move the select bar."); - mvaddstr(3, 0, " 'n' and 'p' act like arrows."); - mvaddstr(4, 0, + MvAddStr(0, 0, "This is the menu test:"); + MvAddStr(2, 0, " Use up and down arrow to move the select bar."); + MvAddStr(3, 0, " 'n' and 'p' act like arrows."); + MvAddStr(4, 0, " 'b' and 'f' scroll up/down (page), 'u' and 'd' (line)."); - mvaddstr(5, 0, " Press return to exit."); + MvAddStr(5, 0, " Press return to exit."); refresh(); for (ap = animals; *ap; ap++) { @@ -5385,8 +5384,8 @@ menu_test(void) continue; } - (void) mvprintw(LINES - 2, 0, - "You chose: %s\n", item_name(current_item(m))); + MvPrintw(LINES - 2, 0, + "You chose: %s\n", item_name(current_item(m))); (void) addstr("Press any key to continue..."); wGetchar(stdscr); @@ -5507,11 +5506,11 @@ trace_set(void) int n; WINDOW *menuwin; - mvaddstr(0, 0, "Interactively set trace level:"); - mvaddstr(2, 0, " Press space bar to toggle a selection."); - mvaddstr(3, 0, " Use up and down arrow to move the select bar."); - mvaddstr(4, 0, " Press return to set the trace level."); - mvprintw(6, 0, "(Current trace level is %s)", tracetrace(_nc_tracing)); + MvAddStr(0, 0, "Interactively set trace level:"); + MvAddStr(2, 0, " Press space bar to toggle a selection."); + MvAddStr(3, 0, " Use up and down arrow to move the select bar."); + MvAddStr(4, 0, " Press return to set the trace level."); + MvPrintw(6, 0, "(Current trace level is %s)", tracetrace(_nc_tracing)); refresh(); @@ -5555,8 +5554,8 @@ trace_set(void) trace(newtrace); Trace(("trace level interactively set to %s", tracetrace(_nc_tracing))); - (void) mvprintw(LINES - 2, 0, - "Trace level is %s\n", tracetrace(_nc_tracing)); + MvPrintw(LINES - 2, 0, + "Trace level is %s\n", tracetrace(_nc_tracing)); (void) addstr("Press any key to continue..."); wGetchar(stdscr); @@ -5762,7 +5761,7 @@ form_virtualize(FORM * f, WINDOW *w) } } } - mvprintw(0, COLS - 6, "(%s)", mode == REQ_INS_MODE ? "INS" : "OVL"); + MvPrintw(0, COLS - 6, "(%s)", mode == REQ_INS_MODE ? "INS" : "OVL"); /* * Force the field that the user is typing into to be in reverse video, @@ -5914,7 +5913,7 @@ demo_forms(void) addstr("^K -- clear to end of field ^X -- clear field\n"); addstr("Arrow keys move within a field as you would expect. ^] toggles overlay mode."); - mvaddstr(4, 57, "Forms Entry Test"); + MvAddStr(4, 57, "Forms Entry Test"); refresh(); @@ -5941,7 +5940,7 @@ demo_forms(void) secure = f[n++] = make_field(5, 30, 1, 9, TRUE); set_field_type(f[n - 1], fty_passwd); - f[n++] = (FIELD *) 0; + f[n] = (FIELD *) 0; if ((form = new_form(f)) != 0) { @@ -5953,7 +5952,7 @@ demo_forms(void) while (!finished) { switch (form_driver(form, c = form_virtualize(form, w))) { case E_OK: - mvaddstr(5, 57, field_buffer(secure, 1)); + MvAddStr(5, 57, field_buffer(secure, 1)); clrtoeol(); refresh(); break; diff --git a/test/newdemo.c b/test/newdemo.c index 8187982b..a15e1696 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.32 2009/08/29 18:47:26 tom Exp $ + * $Id: newdemo.c,v 1.33 2010/05/01 19:07:34 tom Exp $ */ #include @@ -122,17 +122,17 @@ SubWinTest(WINDOW *win) set_colors(swin1, 8, COLOR_RED, COLOR_BLUE); werase(swin1); - mvwaddstr(swin1, 0, 3, "Sub-window 1"); + MvWAddStr(swin1, 0, 3, "Sub-window 1"); wrefresh(swin1); set_colors(swin2, 9, COLOR_CYAN, COLOR_MAGENTA); werase(swin2); - mvwaddstr(swin2, 0, 3, "Sub-window 2"); + MvWAddStr(swin2, 0, 3, "Sub-window 2"); wrefresh(swin2); set_colors(swin3, 10, COLOR_YELLOW, COLOR_GREEN); werase(swin3); - mvwaddstr(swin3, 0, 3, "Sub-window 3"); + MvWAddStr(swin3, 0, 3, "Sub-window 3"); wrefresh(swin3); delwin(swin1); @@ -192,13 +192,13 @@ BouncingBalls(WINDOW *win) y3 = bounce(y3, &yd3, h); set_colors(win, 11, COLOR_RED, COLOR_BLUE); - mvwaddch(win, y1, x1, 'O'); + MvWAddCh(win, y1, x1, 'O'); set_colors(win, 12, COLOR_BLUE, COLOR_RED); - mvwaddch(win, y2, x2, '*'); + MvWAddCh(win, y2, x2, '*'); set_colors(win, 13, COLOR_YELLOW, COLOR_WHITE); - mvwaddch(win, y3, x3, '@'); + MvWAddCh(win, y3, x3, '@'); wmove(win, 0, 0); wrefresh(win); @@ -251,7 +251,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) for (i = 0; i < 5000; ++i) { x = rand() % (width - 2) + 1; y = rand() % (height - 2) + 1; - mvwaddch(win, y, x, c); + MvWAddCh(win, y, x, c); wrefresh(win); nodelay(win, TRUE); if (wgetch(win) != ERR) @@ -276,7 +276,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) use_colors(win, 4, A_BOLD); i = 0; while (*AusMap[i]) { - mvwaddstr(win, i + 1, 8, AusMap[i]); + MvWAddStr(win, i + 1, 8, AusMap[i]); wrefresh(win); delay_output(50); ++i; @@ -284,7 +284,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) set_colors(win, 5, COLOR_BLUE, COLOR_WHITE); use_colors(win, 5, A_BLINK); - mvwaddstr(win, height - 2, 6, " PDCurses 2.1 for DOS, OS/2 and Unix"); + MvWAddStr(win, height - 2, 6, " PDCurses 2.1 for DOS, OS/2 and Unix"); wrefresh(win); /* Draw running messages */ @@ -300,9 +300,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) } if (i < w) - mvwaddnstr(win, height / 2, w - i, buffer, i); + (void) mvwaddnstr(win, height / 2, w - i, buffer, i); else - mvwaddnstr(win, height / 2, 1, buffer, w); + (void) mvwaddnstr(win, height / 2, 1, buffer, w); wrefresh(win); nodelay(win, TRUE); @@ -326,14 +326,14 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) break; save[j++] = c = k; c &= A_CHARTEXT; - mvwaddch(win, 4, i, c); + MvWAddCh(win, 4, i, c); } wrefresh(win); /* Put a message up wait for a key */ i = height - 2; use_colors(win, 5, A_NORMAL); - mvwaddstr(win, i, 5, " Type a key to continue or 'Q' to quit "); + MvWAddStr(win, i, 5, " Type a key to continue or 'Q' to quit "); wrefresh(win); if (WaitForUser(win) == 1) @@ -341,14 +341,14 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) j = 0; /* Restore the old line */ for (i = 2; i < width - 4; ++i) - mvwaddch(win, 4, i, save[j++]); + MvWAddCh(win, 4, i, save[j++]); wrefresh(win); BouncingBalls(win); /* Put a message up wait for a key */ i = height - 2; use_colors(win, 5, A_NORMAL); - mvwaddstr(win, i, 5, " Type a key to continue or 'Q' to quit "); + MvWAddStr(win, i, 5, " Type a key to continue or 'Q' to quit "); wrefresh(win); if (WaitForUser(win) == 1) break; diff --git a/test/rain.c b/test/rain.c index 87d57c93..11d4cb7c 100644 --- a/test/rain.c +++ b/test/rain.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 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.35 2009/08/29 19:02:25 tom Exp $ + * $Id: rain.c,v 1.36 2010/05/01 19:12:26 tom Exp $ */ #include @@ -113,47 +113,47 @@ next_j(int j) static void part1(DATA * drop) { - mvaddch(drop->y, drop->x, '.'); + MvAddCh(drop->y, drop->x, '.'); } static void part2(DATA * drop) { - mvaddch(drop->y, drop->x, 'o'); + MvAddCh(drop->y, drop->x, 'o'); } static void part3(DATA * drop) { - mvaddch(drop->y, drop->x, 'O'); + MvAddCh(drop->y, drop->x, 'O'); } static void part4(DATA * drop) { - mvaddch(drop->y - 1, drop->x, '-'); - mvaddstr(drop->y, drop->x - 1, "|.|"); - mvaddch(drop->y + 1, drop->x, '-'); + MvAddCh(drop->y - 1, drop->x, '-'); + MvAddStr(drop->y, drop->x - 1, "|.|"); + MvAddCh(drop->y + 1, drop->x, '-'); } static void part5(DATA * drop) { - mvaddch(drop->y - 2, drop->x, '-'); - mvaddstr(drop->y - 1, drop->x - 1, "/ \\"); - mvaddstr(drop->y, drop->x - 2, "| O |"); - mvaddstr(drop->y + 1, drop->x - 1, "\\ /"); - mvaddch(drop->y + 2, drop->x, '-'); + MvAddCh(drop->y - 2, drop->x, '-'); + MvAddStr(drop->y - 1, drop->x - 1, "/ \\"); + MvAddStr(drop->y, drop->x - 2, "| O |"); + MvAddStr(drop->y + 1, drop->x - 1, "\\ /"); + MvAddCh(drop->y + 2, drop->x, '-'); } static void part6(DATA * drop) { - mvaddch(drop->y - 2, drop->x, ' '); - mvaddstr(drop->y - 1, drop->x - 1, " "); - mvaddstr(drop->y, drop->x - 2, " "); - mvaddstr(drop->y + 1, drop->x - 1, " "); - mvaddch(drop->y + 2, drop->x, ' '); + MvAddCh(drop->y - 2, drop->x, ' '); + MvAddStr(drop->y - 1, drop->x - 1, " "); + MvAddStr(drop->y, drop->x - 2, " "); + MvAddStr(drop->y + 1, drop->x - 1, " "); + MvAddCh(drop->y + 2, drop->x, ' '); } #ifdef USE_PTHREADS diff --git a/test/redraw.c b/test/redraw.c index 82e63783..f62c098b 100644 --- a/test/redraw.c +++ b/test/redraw.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 2006-2007,2010 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: redraw.c,v 1.4 2007/06/30 17:55:06 tom Exp $ + * $Id: redraw.c,v 1.5 2010/05/01 22:04:08 tom Exp $ * * Demonstrate the redrawwin() and wredrawln() functions. * Thomas Dickey - 2006/11/4 @@ -65,6 +65,8 @@ test_redraw(WINDOW *win) int max_y, max_x; int beg_y, beg_x; + assert(win != 0); + scrollok(win, TRUE); keypad(win, TRUE); getmaxyx(win, max_y, max_x); diff --git a/test/savescreen.c b/test/savescreen.c index fe8d4e32..b413f0dd 100644 --- a/test/savescreen.c +++ b/test/savescreen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007,2009 Free Software Foundation, Inc. * + * Copyright (c) 2007-2009,2010 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: savescreen.c,v 1.11 2009/10/10 19:38:21 tom Exp $ + * $Id: savescreen.c,v 1.12 2010/05/01 22:04:08 tom Exp $ * * Demonstrate save/restore functions from the curses library. * Thomas Dickey - 2007/7/14 @@ -267,7 +267,7 @@ main(int argc, char *argv[]) getyx(stdscr, y, x); while (!done) { - switch (ch = get_command(which, last)) { + switch (get_command(which, last)) { case 'n': setup_next(); done = TRUE; diff --git a/test/tclock.c b/test/tclock.c index b6e7d3f3..d42a52b9 100644 --- a/test/tclock.c +++ b/test/tclock.c @@ -1,4 +1,4 @@ -/* $Id: tclock.c,v 1.26 2009/08/29 18:47:26 tom Exp $ */ +/* $Id: tclock.c,v 1.27 2010/05/01 18:47:19 tom Exp $ */ #include @@ -53,7 +53,7 @@ static void plot(int x, int y, char col) { - mvaddch(y, x, (chtype) col); + MvAddCh(y, x, (chtype) col); } /* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */ @@ -175,10 +175,10 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) sdy = A2Y(sangle, sradius); sprintf(szChar, "%d", i + 1); - mvaddstr(cy - sdy, cx + sdx, szChar); + MvAddStr(cy - sdy, cx + sdx, szChar); } - mvaddstr(0, 0, "ASCII Clock by Howard Jones (ha.jones@ic.ac.uk),1994"); + MvAddStr(0, 0, "ASCII Clock by Howard Jones (ha.jones@ic.ac.uk),1994"); sradius = (4 * sradius) / 5; for (;;) { @@ -222,7 +222,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) (void) attrset(COLOR_PAIR(0)); text = ctime(&tim); - mvprintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); + MvPrintw(2, 0, "%.*s", (int) (strlen(text) - 1), text); refresh(); if ((t->tm_sec % 5) == 0 && t->tm_sec != lastbeep) { diff --git a/test/test.priv.h b/test/test.priv.h index 1f6305d9..24db9685 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.94 2010/03/28 19:51:16 tom Exp $ */ +/* $Id: test.priv.h,v 1.95 2010/05/01 19:03:04 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -644,6 +644,18 @@ typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *); #define USE_TRACE 0 #endif +#define MvAddCh (void) mvaddch +#define MvWAddCh (void) mvwaddch +#define MvAddStr (void) mvaddstr +#define MvWAddStr (void) mvwaddstr +#define MvWAddChStr (void) mvwaddchstr +#define MvPrintw (void) mvprintw +#define MvWPrintw (void) mvwprintw +#define MvHLine (void) mvhline +#define MvWHLine (void) mvwhline +#define MvVLine (void) mvvline +#define MvWVLine (void) mvwvline + /* * Workaround for defective implementation of gcc attribute warn_unused_result */ diff --git a/test/test_add_wchstr.c b/test/test_add_wchstr.c index 7fa3f148..50af92f2 100644 --- a/test/test_add_wchstr.c +++ b/test/test_add_wchstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2009 Free Software Foundation, Inc. * + * Copyright (c) 2009,2010 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_add_wchstr.c,v 1.7 2009/09/13 00:00:28 tom Exp $ + * $Id: test_add_wchstr.c,v 1.8 2010/05/01 19:13:46 tom Exp $ * * Demonstrate the waddwchstr() and wadd_wch functions. * Thomas Dickey - 2009/9/12 @@ -48,13 +48,18 @@ #define WIDE_LINEDATA #include +#undef MvAddCh +#undef MvAddStr +#undef MvWAddCh +#undef MvWAddStr + /* definitions to make it simpler to compare with test_addstr.c */ #define AddNStr add_wchnstr #define AddStr add_wchstr -#define MvAddNStr mvadd_wchnstr -#define MvAddStr mvadd_wchstr -#define MvWAddNStr mvwadd_wchnstr -#define MvWAddStr mvwadd_wchstr +#define MvAddNStr (void) mvadd_wchnstr +#define MvAddStr (void) mvadd_wchstr +#define MvWAddNStr (void) mvwadd_wchnstr +#define MvWAddStr (void) mvwadd_wchstr #define WAddNStr wadd_wchnstr #define WAddStr wadd_wchstr @@ -296,14 +301,14 @@ test_add_wchstr(int level) keypad(work, TRUE); for (col = margin + 1; col < COLS; col += MY_TABSIZE) - mvwvline(work, row, col, '.', limit - 2); + MvWVLine(work, row, col, '.', limit - 2); - mvwvline(work, row, margin, ACS_VLINE, limit - 2); - mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin + 1, ACS_VLINE, limit - 2); limit /= 2; - mvwadd_wchstr(work, 1, 2, ChStr("String")); - mvwadd_wchstr(work, limit + 1, 2, ChStr("Chars")); + (void) mvwadd_wchstr(work, 1, 2, ChStr("String")); + (void) mvwadd_wchstr(work, limit + 1, 2, ChStr("Chars")); wnoutrefresh(work); buffer[length = 0] = '\0'; diff --git a/test/test_addchstr.c b/test/test_addchstr.c index 247a7560..3cb43135 100644 --- a/test/test_addchstr.c +++ b/test/test_addchstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2009 Free Software Foundation, Inc. * + * Copyright (c) 2009,2010 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_addchstr.c,v 1.5 2009/10/10 16:01:41 tom Exp $ + * $Id: test_addchstr.c,v 1.6 2010/05/01 19:13:46 tom Exp $ * * Demonstrate the waddchstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -36,18 +36,19 @@ #include +#undef MvAddStr +#undef MvWAddStr + #define AddNStr addchnstr #define AddStr addchstr -#define MvAddNStr mvaddchnstr -#define MvAddStr mvaddchstr -#define MvWAddNStr mvwaddchnstr -#define MvWAddStr mvwaddchstr +#define MvAddNStr (void) mvaddchnstr +#define MvAddStr (void) mvaddchstr +#define MvWAddNStr (void) mvwaddchnstr +#define MvWAddStr (void) mvwaddchstr #define WAddNStr waddchnstr #define WAddStr waddchstr #define AddCh addch -#define MvAddCh mvaddch -#define MvWAddCh mvwaddch #define WAddCh waddch #define MY_TABSIZE 8 @@ -212,14 +213,14 @@ test_adds(int level) keypad(work, TRUE); for (col = margin + 1; col < COLS; col += MY_TABSIZE) - mvwvline(work, row, col, '.', limit - 2); + MvWVLine(work, row, col, '.', limit - 2); - mvwvline(work, row, margin, ACS_VLINE, limit - 2); - mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin + 1, ACS_VLINE, limit - 2); limit /= 2; - mvwaddchstr(work, 1, 2, ChStr("String")); - mvwaddchstr(work, limit + 1, 2, ChStr("Chars")); + MvWAddChStr(work, 1, 2, ChStr("String")); + MvWAddChStr(work, limit + 1, 2, ChStr("Chars")); wnoutrefresh(work); buffer[length = 0] = '\0'; diff --git a/test/test_addstr.c b/test/test_addstr.c index d4c0425e..ea3f5c9c 100644 --- a/test/test_addstr.c +++ b/test/test_addstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2009 Free Software Foundation, Inc. * + * Copyright (c) 2009,2010 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_addstr.c,v 1.3 2009/10/10 16:01:41 tom Exp $ + * $Id: test_addstr.c,v 1.4 2010/05/01 19:13:46 tom Exp $ * * Demonstrate the waddstr() and waddch functions. * Thomas Dickey - 2009/9/12 @@ -38,16 +38,12 @@ #define AddNStr addnstr #define AddStr addstr -#define MvAddNStr mvaddnstr -#define MvAddStr mvaddstr -#define MvWAddNStr mvwaddnstr -#define MvWAddStr mvwaddstr +#define MvAddNStr (void) mvaddnstr +#define MvWAddNStr (void) mvwaddnstr #define WAddNStr waddnstr #define WAddStr waddstr #define AddCh addch -#define MvAddCh mvaddch -#define MvWAddCh mvwaddch #define WAddCh waddch #define MY_TABSIZE 8 @@ -182,14 +178,14 @@ test_adds(int level) keypad(work, TRUE); for (col = margin + 1; col < COLS; col += MY_TABSIZE) - mvwvline(work, row, col, '.', limit - 2); + MvWVLine(work, row, col, '.', limit - 2); - mvwvline(work, row, margin, ACS_VLINE, limit - 2); - mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin + 1, ACS_VLINE, limit - 2); limit /= 2; - mvwaddstr(work, 1, 2, "String"); - mvwaddstr(work, limit + 1, 2, "Chars"); + MvWAddStr(work, 1, 2, "String"); + MvWAddStr(work, limit + 1, 2, "Chars"); wnoutrefresh(work); buffer[length = 0] = '\0'; diff --git a/test/test_addwstr.c b/test/test_addwstr.c index a7fe8a21..42db92e8 100644 --- a/test/test_addwstr.c +++ b/test/test_addwstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2009 Free Software Foundation, Inc. * + * Copyright (c) 2009,2010 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_addwstr.c,v 1.2 2009/09/12 22:55:23 tom Exp $ + * $Id: test_addwstr.c,v 1.3 2010/05/01 19:13:46 tom Exp $ * * Demonstrate the waddwstr() and wadd_wch functions. * Thomas Dickey - 2009/9/12 @@ -48,13 +48,18 @@ #define WIDE_LINEDATA #include +#undef MvAddCh +#undef MvAddStr +#undef MvWAddCh +#undef MvWAddStr + /* definitions to make it simpler to compare with inserts.c */ #define AddNStr addnwstr #define AddStr addwstr -#define MvAddNStr mvaddnwstr -#define MvAddStr mvaddwstr -#define MvWAddNStr mvwaddnwstr -#define MvWAddStr mvwaddwstr +#define MvAddNStr (void) mvaddnwstr +#define MvAddStr (void) mvaddwstr +#define MvWAddNStr (void) mvwaddnwstr +#define MvWAddStr (void) mvwaddwstr #define WAddNStr waddnwstr #define WAddStr waddwstr @@ -258,14 +263,14 @@ test_inserts(int level) keypad(work, TRUE); for (col = margin + 1; col < COLS; col += MY_TABSIZE) - mvwvline(work, row, col, '.', limit - 2); + MvWVLine(work, row, col, '.', limit - 2); - mvwvline(work, row, margin, ACS_VLINE, limit - 2); - mvwvline(work, row, margin + 1, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin, ACS_VLINE, limit - 2); + MvWVLine(work, row, margin + 1, ACS_VLINE, limit - 2); limit /= 2; - mvwaddstr(work, 1, 2, "String"); - mvwaddstr(work, limit + 1, 2, "Chars"); + (void) mvwaddstr(work, 1, 2, "String"); + (void) mvwaddstr(work, limit + 1, 2, "Chars"); wnoutrefresh(work); buffer[length = 0] = '\0'; diff --git a/test/test_instr.c b/test/test_instr.c index b24f772e..627db08e 100644 --- a/test/test_instr.c +++ b/test/test_instr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007 Free Software Foundation, Inc. * + * Copyright (c) 2007,2010 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_instr.c,v 1.4 2007/07/21 19:38:04 tom Exp $ + * $Id: test_instr.c,v 1.5 2010/05/01 19:13:46 tom Exp $ * * Author: Thomas E Dickey * @@ -56,7 +56,7 @@ Quit(int ch) static void show_1st(WINDOW *win, int line, char *buffer) { - mvwaddstr(win, line, 5, buffer); + MvWAddStr(win, line, 5, buffer); } static void @@ -174,7 +174,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) break; } - mvwprintw(chrwin, 0, 0, "line:"); + MvWPrintw(chrwin, 0, 0, "line:"); wclrtoeol(chrwin); if (txtwin != stdscr) { @@ -198,7 +198,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) } wnoutrefresh(chrwin); - mvwprintw(strwin, 0, 0, "%4d:", limit); + MvWPrintw(strwin, 0, 0, "%4d:", limit); wclrtobot(strwin); if (txtwin != stdscr) { diff --git a/test/test_inwstr.c b/test/test_inwstr.c index fe2b645c..3d2656f3 100644 --- a/test/test_inwstr.c +++ b/test/test_inwstr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2007 Free Software Foundation, Inc. * + * Copyright (c) 2007,2010 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_inwstr.c,v 1.3 2007/07/21 22:47:42 tom Exp $ + * $Id: test_inwstr.c,v 1.4 2010/05/01 19:13:46 tom Exp $ * * Author: Thomas E Dickey * @@ -58,7 +58,7 @@ Quit(int ch) static void show_1st(WINDOW *win, int line, wchar_t *buffer) { - mvwaddwstr(win, line, 5, buffer); + (void) mvwaddwstr(win, line, 5, buffer); } static void @@ -175,7 +175,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) break; } - mvwprintw(chrwin, 0, 0, "line:"); + MvWPrintw(chrwin, 0, 0, "line:"); wclrtoeol(chrwin); if (txtwin != stdscr) { @@ -199,7 +199,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) } wnoutrefresh(chrwin); - mvwprintw(strwin, 0, 0, "%4d:", limit); + MvWPrintw(strwin, 0, 0, "%4d:", limit); wclrtobot(strwin); if (txtwin != stdscr) { diff --git a/test/testcurs.c b/test/testcurs.c index 255bb4cb..e8ec4ce7 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.40 2009/08/29 18:47:26 tom Exp $ + * $Id: testcurs.c,v 1.42 2010/05/01 19:23:19 tom Exp $ */ #include @@ -165,11 +165,11 @@ Continue(WINDOW *win) save = mvwinch(win, y0, x1 - 1); - mvwaddstr(win, y0, x0, " Press any key to continue"); + MvWAddStr(win, y0, x0, " Press any key to continue"); wclrtoeol(win); getyx(win, y0, x0); - mvwaddch(win, y0, x1 - 1, save); + MvWAddCh(win, y0, x1 - 1, save); wmove(win, y0, x0); raw(); @@ -218,9 +218,9 @@ introTest(WINDOW *win) box(win, ACS_VLINE, ACS_HLINE); wrefresh(win); cbreak(); - mvwaddstr(win, 1, 1, + MvWAddStr(win, 1, 1, "You should have rectangle in the middle of the screen"); - mvwaddstr(win, 2, 1, "You should have heard a beep"); + MvWAddStr(win, 2, 1, "You should have heard a beep"); Continue(win); return; } @@ -236,7 +236,7 @@ scrollTest(WINDOW *win) wclear(win); OldY = getmaxy(win); half = OldY / 2; - mvwprintw(win, OldY - 2, 1, Message); + MvWAddStr(win, OldY - 2, 1, Message); wrefresh(win); scrollok(win, TRUE); for (i = 1; i <= OldY; i++) { @@ -247,9 +247,9 @@ scrollTest(WINDOW *win) werase(win); for (i = 1; i < OldY; i++) { - mvwprintw(win, i, 1, "Line %d", i); + MvWPrintw(win, i, 1, "Line %d", i); } - mvwprintw(win, OldY - 2, 1, "The top of the window will scroll"); + MvWPrintw(win, OldY - 2, 1, "The top of the window will scroll"); wmove(win, 1, 1); wsetscrreg(win, 0, half - 1); box(win, ACS_VLINE, ACS_HLINE); @@ -263,9 +263,9 @@ scrollTest(WINDOW *win) werase(win); for (i = 1; i < OldY; i++) { - mvwprintw(win, i, 1, "Line %d", i); + MvWPrintw(win, i, 1, "Line %d", i); } - mvwprintw(win, 1, 1, "The bottom of the window will scroll"); + MvWPrintw(win, 1, 1, "The bottom of the window will scroll"); wmove(win, OldY - 2, 1); wsetscrreg(win, half, --OldY); box(win, ACS_VLINE, ACS_HLINE); @@ -309,14 +309,14 @@ inputTest(WINDOW *win) wrefresh(win); nocbreak(); - mvwaddstr(win, 2, 1, "Press some keys for 5 seconds"); - mvwaddstr(win, 1, 1, "Pressing ^C should do nothing"); + MvWAddStr(win, 2, 1, "Press some keys for 5 seconds"); + MvWAddStr(win, 1, 1, "Pressing ^C should do nothing"); wrefresh(win); werase(subWin); box(subWin, ACS_VLINE, ACS_HLINE); for (i = 0; i < 5; i++) { - mvwprintw(subWin, 1, 1, "Time = %d", i); + MvWPrintw(subWin, 1, 1, "Time = %d", i); wrefresh(subWin); napms(1000); flushinp(); @@ -328,7 +328,7 @@ inputTest(WINDOW *win) wrefresh(win); napms(500); - mvwaddstr(win, 2, 1, "Press a key, followed by ENTER"); + MvWAddStr(win, 2, 1, "Press a key, followed by ENTER"); wmove(win, 9, 10); wrefresh(win); echo(); @@ -338,12 +338,12 @@ inputTest(WINDOW *win) wmove(win, 9, 10); wdelch(win); - mvwaddstr(win, 4, 1, "The character should now have been deleted"); + MvWAddStr(win, 4, 1, "The character should now have been deleted"); Continue(win); wclear(win); - mvwaddstr(win, 1, 1, "Press keys (or mouse buttons) to show their names"); - mvwaddstr(win, 2, 1, "Press spacebar to finish"); + MvWAddStr(win, 1, 1, "Press keys (or mouse buttons) to show their names"); + MvWAddStr(win, 2, 1, "Press spacebar to finish"); wrefresh(win); keypad(win, TRUE); @@ -419,10 +419,10 @@ inputTest(WINDOW *win) const char *format = fmt[repeat % SIZEOF(fmt)]; wclear(win); - mvwaddstr(win, 3, 2, "The window should have moved"); - mvwaddstr(win, 4, 2, + MvWAddStr(win, 3, 2, "The window should have moved"); + MvWAddStr(win, 4, 2, "This text should have appeared without you pressing a key"); - mvwprintw(win, 6, 2, + MvWPrintw(win, 6, 2, "Scanning with format \"%s\"", format); mvwin(win, 2 + 2 * (repeat % 4), 1 + 2 * (repeat % 4)); erase(); @@ -433,7 +433,7 @@ inputTest(WINDOW *win) num = 0; *buffer = 0; answered = mvwscanw(win, 7, 6, strdup(format), &num, buffer); - mvwprintw(win, 8, 6, + MvWPrintw(win, 8, 6, "String: %s Number: %d (%d values read)", buffer, num, answered); Continue(win); @@ -462,7 +462,7 @@ outputTest(WINDOW *win) nl(); wclear(win); - mvwaddstr(win, 1, 1, + MvWAddStr(win, 1, 1, "You should now have a screen in the upper left corner, and this text should have wrapped"); mvwin(win, 2, 1); waddstr(win, "\nThis text should be down\n"); @@ -471,17 +471,17 @@ outputTest(WINDOW *win) wclear(win); wattron(win, A_BOLD); - mvwaddstr(win, 1, 1, "A new window will appear with this text in it"); - mvwaddstr(win, 8, 1, "Press any key to continue"); + MvWAddStr(win, 1, 1, "A new window will appear with this text in it"); + MvWAddStr(win, 8, 1, "Press any key to continue"); wrefresh(win); wgetch(win); getbegyx(win, by, bx); if (LINES < 24 || COLS < 75) { - mvwaddstr(win, 5, 1, + MvWAddStr(win, 5, 1, "Some tests have been skipped as they require a"); - mvwaddstr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS"); + MvWAddStr(win, 6, 1, "display of at least 24 LINES by 75 COLUMNS"); Continue(win); } else { win1 = newwin(10, 50, 14, 25); @@ -499,7 +499,7 @@ outputTest(WINDOW *win) wbkgd(win1, A_NORMAL); #endif wclear(win1); - mvwaddstr(win1, 5, 1, + MvWAddStr(win1, 5, 1, "This text should appear; using overlay option"); copywin(win, win1, 0, 0, 0, 0, 9, 49, TRUE); @@ -514,7 +514,7 @@ outputTest(WINDOW *win) wclear(win1); wattron(win1, A_BLINK); - mvwaddstr(win1, 4, 1, + MvWAddStr(win1, 4, 1, "This blinking text should appear in only the second window"); wattroff(win1, A_BLINK); mvwin(win1, by, bx); @@ -529,14 +529,14 @@ outputTest(WINDOW *win) clear(); wclear(win); wrefresh(win); - mvwaddstr(win, 6, 2, "This line shouldn't appear"); - mvwaddstr(win, 4, 2, "Only half of the next line is visible"); - mvwaddstr(win, 5, 2, "Only half of the next line is visible"); + MvWAddStr(win, 6, 2, "This line shouldn't appear"); + MvWAddStr(win, 4, 2, "Only half of the next line is visible"); + MvWAddStr(win, 5, 2, "Only half of the next line is visible"); wmove(win, 6, 1); wclrtobot(win); wmove(win, 5, 20); wclrtoeol(win); - mvwaddstr(win, 8, 2, "This line also shouldn't appear"); + MvWAddStr(win, 8, 2, "This line also shouldn't appear"); wmove(win, 8, 1); wdeleteln(win); Continue(win); @@ -551,20 +551,20 @@ outputTest(WINDOW *win) Continue(win); #if HAVE_WINSSTR - mvwinsstr(win, 6, 2, "A1B2C3D4E5"); + (void) mvwinsstr(win, 6, 2, "A1B2C3D4E5"); Continue(win); #endif wmove(win, 5, 1); winsertln(win); - mvwaddstr(win, 5, 2, "The lines below should have moved down"); + MvWAddStr(win, 5, 2, "The lines below should have moved down"); Continue(win); wclear(win); wmove(win, 2, 2); wprintw(win, "This is a formatted string in a window: %d %s\n", 42, "is it"); - mvwaddstr(win, 10, 1, "Enter a string: "); + MvWAddStr(win, 10, 1, "Enter a string: "); wrefresh(win); noraw(); echo(); @@ -572,21 +572,21 @@ outputTest(WINDOW *win) wscanw(win, "%s", Buffer); printw("This is a formatted string in stdscr: %d %s\n", 42, "is it"); - mvaddstr(10, 1, "Enter a string: "); + MvAddStr(10, 1, "Enter a string: "); *Buffer = 0; scanw("%s", Buffer); if (TIGETSTR("cvvis", "vs") != 0) { wclear(win); curs_set(2); - mvwaddstr(win, 1, 1, "The cursor should appear as a block (visible)"); + MvWAddStr(win, 1, 1, "The cursor should appear as a block (visible)"); Continue(win); } if (TIGETSTR("civis", "vi") != 0) { wclear(win); curs_set(0); - mvwaddstr(win, 1, 1, + MvWAddStr(win, 1, 1, "The cursor should have disappeared (invisible)"); Continue(win); } @@ -594,13 +594,13 @@ outputTest(WINDOW *win) if (TIGETSTR("cnorm", "ve") != 0) { wclear(win); curs_set(1); - mvwaddstr(win, 1, 1, "The cursor should be an underline (normal)"); + MvWAddStr(win, 1, 1, "The cursor should be an underline (normal)"); Continue(win); } #ifdef A_COLOR if (has_colors()) { wclear(win); - mvwaddstr(win, 1, 1, "Colors should change after you press a key"); + MvWAddStr(win, 1, 1, "Colors should change after you press a key"); Continue(win); init_pair(1, COLOR_RED, COLOR_WHITE); wrefresh(win); @@ -610,20 +610,20 @@ outputTest(WINDOW *win) werase(win); #if HAVE_TERMNAME - mvwaddstr(win, 1, 1, "Information About Your Terminal"); - mvwaddstr(win, 3, 1, termname()); - mvwaddstr(win, 4, 1, longname()); + MvWAddStr(win, 1, 1, "Information About Your Terminal"); + MvWAddStr(win, 3, 1, termname()); + MvWAddStr(win, 4, 1, longname()); if (termattrs() & A_BLINK) - mvwaddstr(win, 5, 1, "This terminal supports blinking."); + MvWAddStr(win, 5, 1, "This terminal supports blinking."); else - mvwaddstr(win, 5, 1, "This terminal does NOT support blinking."); + MvWAddStr(win, 5, 1, "This terminal does NOT support blinking."); #endif - mvwaddnstr(win, 7, 5, "Have a nice day!ok", 16); + (void) mvwaddnstr(win, 7, 5, "Have a nice day!ok", 16); wrefresh(win); - mvwinnstr(win, 7, 5, Buffer, 18); - mvaddstr(LINES - 2, 10, Buffer); + (void) mvwinnstr(win, 7, 5, Buffer, 18); + MvAddStr(LINES - 2, 10, Buffer); refresh(); Continue(win); } @@ -657,13 +657,13 @@ resizeTest(WINDOW *dummy GCC_UNUSED) #endif wclear(win1); - mvwaddstr(win1, 1, 1, "The screen may now have 50 lines"); + MvWAddStr(win1, 1, 1, "The screen may now have 50 lines"); Continue(win1); wclear(win1); resetty(); - mvwaddstr(win1, 1, 1, "The screen should now be reset"); + MvWAddStr(win1, 1, 1, "The screen should now be reset"); Continue(win1); delwin(win1); @@ -681,29 +681,29 @@ padTest(WINDOW *dummy GCC_UNUSED) if ((pad = newpad(50, 100)) != 0) { wattron(pad, A_REVERSE); - mvwaddstr(pad, 5, 2, "This is a new pad"); + MvWAddStr(pad, 5, 2, "This is a new pad"); (void) wattrset(pad, A_NORMAL); - mvwaddstr(pad, 8, 0, + 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"); + MvWAddStr(pad, 11, 1, "This line should not appear.It will now"); wmove(pad, 10, 1); wclrtoeol(pad); - mvwaddstr(pad, 10, 1, " Press any key to continue"); + MvWAddStr(pad, 10, 1, " Press any key to continue"); prefresh(pad, 0, 0, 0, 0, 10, 45); keypad(pad, TRUE); raw(); wgetch(pad); spad = subpad(pad, 12, 25, 6, 52); - mvwaddstr(spad, 2, 2, "This is a new subpad"); + MvWAddStr(spad, 2, 2, "This is a new subpad"); box(spad, 0, 0); prefresh(pad, 0, 0, 0, 0, 15, 75); keypad(pad, TRUE); raw(); wgetch(pad); - mvwaddstr(pad, 35, 2, "This is displayed at line 35 in the pad"); - mvwaddstr(pad, 40, 1, " Press any key to continue"); + MvWAddStr(pad, 35, 2, "This is displayed at line 35 in the pad"); + MvWAddStr(pad, 40, 1, " Press any key to continue"); prefresh(pad, 30, 0, 0, 0, 10, 45); keypad(pad, TRUE); raw(); @@ -721,18 +721,18 @@ display_menu(int old_option, int new_option) assert((new_option >= 0) && (new_option < MAX_OPTIONS)); (void) attrset(A_NORMAL); - mvaddstr(3, 20, "PDCurses Test Program"); + MvAddStr(3, 20, "PDCurses Test Program"); for (i = 0; i < (int) MAX_OPTIONS; i++) - mvaddstr(5 + i, 25, command[i].text); + MvAddStr(5 + i, 25, command[i].text); if ((old_option >= 0) && (old_option < MAX_OPTIONS)) - mvaddstr(5 + old_option, 25, command[old_option].text); + MvAddStr(5 + old_option, 25, command[old_option].text); (void) attrset(A_REVERSE); - mvaddstr(5 + new_option, 25, command[new_option].text); + MvAddStr(5 + new_option, 25, command[new_option].text); (void) attrset(A_NORMAL); - mvaddstr(13, 3, + MvAddStr(13, 3, "Use Up and Down Arrows to select - Enter to run - Q to quit"); refresh(); } diff --git a/test/view.c b/test/view.c index e759a9b2..5c609fa6 100644 --- a/test/view.c +++ b/test/view.c @@ -50,7 +50,7 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.77 2010/01/09 16:34:06 tom Exp $ + * $Id: view.c,v 1.79 2010/05/01 21:56:10 tom Exp $ */ #include @@ -294,6 +294,8 @@ main(int argc, char *argv[]) if ((vec_lines = typeCalloc(NCURSES_CH_T *, MAXLINES + 2)) == 0) usage(); + assert(vec_lines != 0); + fname = argv[optind]; if ((fp = fopen(fname, "r")) == 0) { perror(fname); @@ -365,7 +367,6 @@ main(int argc, char *argv[]) if (!got_number) show_all(my_label); - n = 0; for (;;) { #if CAN_RESIZE if (interrupted) { @@ -378,7 +379,7 @@ main(int argc, char *argv[]) waiting = FALSE; if ((c < 127) && isdigit(c)) { if (!got_number) { - mvprintw(0, 0, "Count: "); + MvPrintw(0, 0, "Count: "); clrtoeol(); } addch(UChar(c)); diff --git a/test/xmas.c b/test/xmas.c index 79a56a58..c1ffb3c7 100644 --- a/test/xmas.c +++ b/test/xmas.c @@ -92,7 +92,7 @@ /******************************************************************************/ /* - * $Id: xmas.c,v 1.25 2009/08/29 18:47:26 tom Exp $ + * $Id: xmas.c,v 1.26 2010/05/01 18:29:50 tom Exp $ */ #include @@ -249,203 +249,203 @@ main(int argc GCC_UNUSED, char **argv GCC_UNUSED) ExitProgram(EXIT_FAILURE); } - mvwaddstr(w_del_msg, 0, 0, "Hit any key to quit"); + MvWAddStr(w_del_msg, 0, 0, "Hit any key to quit"); - mvwaddstr(w_holiday, 0, 0, "H A P P Y H O L I D A Y S"); + MvWAddStr(w_holiday, 0, 0, "H A P P Y H O L I D A Y S"); /* set up the windows for our various reindeer */ /* lildeer1 */ - mvwaddch(lildeer1, 0, 0, (chtype) 'V'); - mvwaddch(lildeer1, 1, 0, (chtype) '@'); - mvwaddch(lildeer1, 1, 1, (chtype) '<'); - mvwaddch(lildeer1, 1, 2, (chtype) '>'); - mvwaddch(lildeer1, 1, 3, (chtype) '~'); + MvWAddCh(lildeer1, 0, 0, (chtype) 'V'); + MvWAddCh(lildeer1, 1, 0, (chtype) '@'); + MvWAddCh(lildeer1, 1, 1, (chtype) '<'); + MvWAddCh(lildeer1, 1, 2, (chtype) '>'); + MvWAddCh(lildeer1, 1, 3, (chtype) '~'); /* lildeer2 */ - mvwaddch(lildeer2, 0, 0, (chtype) 'V'); - mvwaddch(lildeer2, 1, 0, (chtype) '@'); - mvwaddch(lildeer2, 1, 1, (chtype) '|'); - mvwaddch(lildeer2, 1, 2, (chtype) '|'); - mvwaddch(lildeer2, 1, 3, (chtype) '~'); + MvWAddCh(lildeer2, 0, 0, (chtype) 'V'); + MvWAddCh(lildeer2, 1, 0, (chtype) '@'); + MvWAddCh(lildeer2, 1, 1, (chtype) '|'); + MvWAddCh(lildeer2, 1, 2, (chtype) '|'); + MvWAddCh(lildeer2, 1, 3, (chtype) '~'); /* lildeer3 */ - mvwaddch(lildeer3, 0, 0, (chtype) 'V'); - mvwaddch(lildeer3, 1, 0, (chtype) '@'); - mvwaddch(lildeer3, 1, 1, (chtype) '>'); - mvwaddch(lildeer3, 1, 2, (chtype) '<'); - mvwaddch(lildeer2, 1, 3, (chtype) '~'); + MvWAddCh(lildeer3, 0, 0, (chtype) 'V'); + MvWAddCh(lildeer3, 1, 0, (chtype) '@'); + MvWAddCh(lildeer3, 1, 1, (chtype) '>'); + MvWAddCh(lildeer3, 1, 2, (chtype) '<'); + MvWAddCh(lildeer2, 1, 3, (chtype) '~'); /* middeer1 */ - mvwaddch(middeer1, 0, 2, (chtype) 'y'); - mvwaddch(middeer1, 0, 3, (chtype) 'y'); - mvwaddch(middeer1, 1, 2, (chtype) '0'); - mvwaddch(middeer1, 1, 3, (chtype) '('); - mvwaddch(middeer1, 1, 4, (chtype) '='); - mvwaddch(middeer1, 1, 5, (chtype) ')'); - mvwaddch(middeer1, 1, 6, (chtype) '~'); - mvwaddch(middeer1, 2, 3, (chtype) '\\'); - mvwaddch(middeer1, 2, 4, (chtype) '/'); + MvWAddCh(middeer1, 0, 2, (chtype) 'y'); + MvWAddCh(middeer1, 0, 3, (chtype) 'y'); + MvWAddCh(middeer1, 1, 2, (chtype) '0'); + MvWAddCh(middeer1, 1, 3, (chtype) '('); + MvWAddCh(middeer1, 1, 4, (chtype) '='); + MvWAddCh(middeer1, 1, 5, (chtype) ')'); + MvWAddCh(middeer1, 1, 6, (chtype) '~'); + MvWAddCh(middeer1, 2, 3, (chtype) '\\'); + MvWAddCh(middeer1, 2, 4, (chtype) '/'); /* middeer2 */ - mvwaddch(middeer2, 0, 2, (chtype) 'y'); - mvwaddch(middeer2, 0, 3, (chtype) 'y'); - mvwaddch(middeer2, 1, 2, (chtype) '0'); - mvwaddch(middeer2, 1, 3, (chtype) '('); - mvwaddch(middeer2, 1, 4, (chtype) '='); - mvwaddch(middeer2, 1, 5, (chtype) ')'); - mvwaddch(middeer2, 1, 6, (chtype) '~'); - mvwaddch(middeer2, 2, 3, (chtype) '|'); - mvwaddch(middeer2, 2, 5, (chtype) '|'); + MvWAddCh(middeer2, 0, 2, (chtype) 'y'); + MvWAddCh(middeer2, 0, 3, (chtype) 'y'); + MvWAddCh(middeer2, 1, 2, (chtype) '0'); + MvWAddCh(middeer2, 1, 3, (chtype) '('); + MvWAddCh(middeer2, 1, 4, (chtype) '='); + MvWAddCh(middeer2, 1, 5, (chtype) ')'); + MvWAddCh(middeer2, 1, 6, (chtype) '~'); + MvWAddCh(middeer2, 2, 3, (chtype) '|'); + MvWAddCh(middeer2, 2, 5, (chtype) '|'); /* middeer3 */ - mvwaddch(middeer3, 0, 2, (chtype) 'y'); - mvwaddch(middeer3, 0, 3, (chtype) 'y'); - mvwaddch(middeer3, 1, 2, (chtype) '0'); - mvwaddch(middeer3, 1, 3, (chtype) '('); - mvwaddch(middeer3, 1, 4, (chtype) '='); - mvwaddch(middeer3, 1, 5, (chtype) ')'); - mvwaddch(middeer3, 1, 6, (chtype) '~'); - mvwaddch(middeer3, 2, 2, (chtype) '/'); - mvwaddch(middeer3, 2, 6, (chtype) '\\'); + MvWAddCh(middeer3, 0, 2, (chtype) 'y'); + MvWAddCh(middeer3, 0, 3, (chtype) 'y'); + MvWAddCh(middeer3, 1, 2, (chtype) '0'); + MvWAddCh(middeer3, 1, 3, (chtype) '('); + MvWAddCh(middeer3, 1, 4, (chtype) '='); + MvWAddCh(middeer3, 1, 5, (chtype) ')'); + MvWAddCh(middeer3, 1, 6, (chtype) '~'); + MvWAddCh(middeer3, 2, 2, (chtype) '/'); + MvWAddCh(middeer3, 2, 6, (chtype) '\\'); /* bigdeer1 */ - mvwaddch(bigdeer1, 0, 17, (chtype) '\\'); - mvwaddch(bigdeer1, 0, 18, (chtype) '/'); - mvwaddch(bigdeer1, 0, 20, (chtype) '\\'); - mvwaddch(bigdeer1, 0, 21, (chtype) '/'); - mvwaddch(bigdeer1, 1, 18, (chtype) '\\'); - mvwaddch(bigdeer1, 1, 20, (chtype) '/'); - mvwaddch(bigdeer1, 2, 19, (chtype) '|'); - mvwaddch(bigdeer1, 2, 20, (chtype) '_'); - mvwaddch(bigdeer1, 3, 18, (chtype) '/'); - mvwaddch(bigdeer1, 3, 19, (chtype) '^'); - mvwaddch(bigdeer1, 3, 20, (chtype) '0'); - mvwaddch(bigdeer1, 3, 21, (chtype) '\\'); - mvwaddch(bigdeer1, 4, 17, (chtype) '/'); - mvwaddch(bigdeer1, 4, 18, (chtype) '/'); - mvwaddch(bigdeer1, 4, 19, (chtype) '\\'); - mvwaddch(bigdeer1, 4, 22, (chtype) '\\'); - mvwaddstr(bigdeer1, 5, 7, "^~~~~~~~~// ~~U"); - mvwaddstr(bigdeer1, 6, 7, "( \\_____( /"); - mvwaddstr(bigdeer1, 7, 8, "( ) /"); - mvwaddstr(bigdeer1, 8, 9, "\\\\ /"); - mvwaddstr(bigdeer1, 9, 11, "\\>/>"); + MvWAddCh(bigdeer1, 0, 17, (chtype) '\\'); + MvWAddCh(bigdeer1, 0, 18, (chtype) '/'); + MvWAddCh(bigdeer1, 0, 20, (chtype) '\\'); + MvWAddCh(bigdeer1, 0, 21, (chtype) '/'); + MvWAddCh(bigdeer1, 1, 18, (chtype) '\\'); + MvWAddCh(bigdeer1, 1, 20, (chtype) '/'); + MvWAddCh(bigdeer1, 2, 19, (chtype) '|'); + MvWAddCh(bigdeer1, 2, 20, (chtype) '_'); + MvWAddCh(bigdeer1, 3, 18, (chtype) '/'); + MvWAddCh(bigdeer1, 3, 19, (chtype) '^'); + MvWAddCh(bigdeer1, 3, 20, (chtype) '0'); + MvWAddCh(bigdeer1, 3, 21, (chtype) '\\'); + MvWAddCh(bigdeer1, 4, 17, (chtype) '/'); + MvWAddCh(bigdeer1, 4, 18, (chtype) '/'); + MvWAddCh(bigdeer1, 4, 19, (chtype) '\\'); + MvWAddCh(bigdeer1, 4, 22, (chtype) '\\'); + MvWAddStr(bigdeer1, 5, 7, "^~~~~~~~~// ~~U"); + MvWAddStr(bigdeer1, 6, 7, "( \\_____( /"); + MvWAddStr(bigdeer1, 7, 8, "( ) /"); + MvWAddStr(bigdeer1, 8, 9, "\\\\ /"); + MvWAddStr(bigdeer1, 9, 11, "\\>/>"); /* bigdeer2 */ - mvwaddch(bigdeer2, 0, 17, (chtype) '\\'); - mvwaddch(bigdeer2, 0, 18, (chtype) '/'); - mvwaddch(bigdeer2, 0, 20, (chtype) '\\'); - mvwaddch(bigdeer2, 0, 21, (chtype) '/'); - mvwaddch(bigdeer2, 1, 18, (chtype) '\\'); - mvwaddch(bigdeer2, 1, 20, (chtype) '/'); - mvwaddch(bigdeer2, 2, 19, (chtype) '|'); - mvwaddch(bigdeer2, 2, 20, (chtype) '_'); - mvwaddch(bigdeer2, 3, 18, (chtype) '/'); - mvwaddch(bigdeer2, 3, 19, (chtype) '^'); - mvwaddch(bigdeer2, 3, 20, (chtype) '0'); - mvwaddch(bigdeer2, 3, 21, (chtype) '\\'); - mvwaddch(bigdeer2, 4, 17, (chtype) '/'); - mvwaddch(bigdeer2, 4, 18, (chtype) '/'); - mvwaddch(bigdeer2, 4, 19, (chtype) '\\'); - mvwaddch(bigdeer2, 4, 22, (chtype) '\\'); - mvwaddstr(bigdeer2, 5, 7, "^~~~~~~~~// ~~U"); - mvwaddstr(bigdeer2, 6, 7, "(( )____( /"); - mvwaddstr(bigdeer2, 7, 7, "( / |"); - mvwaddstr(bigdeer2, 8, 8, "\\/ |"); - mvwaddstr(bigdeer2, 9, 9, "|> |>"); + MvWAddCh(bigdeer2, 0, 17, (chtype) '\\'); + MvWAddCh(bigdeer2, 0, 18, (chtype) '/'); + MvWAddCh(bigdeer2, 0, 20, (chtype) '\\'); + MvWAddCh(bigdeer2, 0, 21, (chtype) '/'); + MvWAddCh(bigdeer2, 1, 18, (chtype) '\\'); + MvWAddCh(bigdeer2, 1, 20, (chtype) '/'); + MvWAddCh(bigdeer2, 2, 19, (chtype) '|'); + MvWAddCh(bigdeer2, 2, 20, (chtype) '_'); + MvWAddCh(bigdeer2, 3, 18, (chtype) '/'); + MvWAddCh(bigdeer2, 3, 19, (chtype) '^'); + MvWAddCh(bigdeer2, 3, 20, (chtype) '0'); + MvWAddCh(bigdeer2, 3, 21, (chtype) '\\'); + MvWAddCh(bigdeer2, 4, 17, (chtype) '/'); + MvWAddCh(bigdeer2, 4, 18, (chtype) '/'); + MvWAddCh(bigdeer2, 4, 19, (chtype) '\\'); + MvWAddCh(bigdeer2, 4, 22, (chtype) '\\'); + MvWAddStr(bigdeer2, 5, 7, "^~~~~~~~~// ~~U"); + MvWAddStr(bigdeer2, 6, 7, "(( )____( /"); + MvWAddStr(bigdeer2, 7, 7, "( / |"); + MvWAddStr(bigdeer2, 8, 8, "\\/ |"); + MvWAddStr(bigdeer2, 9, 9, "|> |>"); /* bigdeer3 */ - mvwaddch(bigdeer3, 0, 17, (chtype) '\\'); - mvwaddch(bigdeer3, 0, 18, (chtype) '/'); - mvwaddch(bigdeer3, 0, 20, (chtype) '\\'); - mvwaddch(bigdeer3, 0, 21, (chtype) '/'); - mvwaddch(bigdeer3, 1, 18, (chtype) '\\'); - mvwaddch(bigdeer3, 1, 20, (chtype) '/'); - mvwaddch(bigdeer3, 2, 19, (chtype) '|'); - mvwaddch(bigdeer3, 2, 20, (chtype) '_'); - mvwaddch(bigdeer3, 3, 18, (chtype) '/'); - mvwaddch(bigdeer3, 3, 19, (chtype) '^'); - mvwaddch(bigdeer3, 3, 20, (chtype) '0'); - mvwaddch(bigdeer3, 3, 21, (chtype) '\\'); - mvwaddch(bigdeer3, 4, 17, (chtype) '/'); - mvwaddch(bigdeer3, 4, 18, (chtype) '/'); - mvwaddch(bigdeer3, 4, 19, (chtype) '\\'); - mvwaddch(bigdeer3, 4, 22, (chtype) '\\'); - mvwaddstr(bigdeer3, 5, 7, "^~~~~~~~~// ~~U"); - mvwaddstr(bigdeer3, 6, 6, "( ()_____( /"); - mvwaddstr(bigdeer3, 7, 6, "/ / /"); - mvwaddstr(bigdeer3, 8, 5, "|/ \\"); - mvwaddstr(bigdeer3, 9, 5, "/> \\>"); + MvWAddCh(bigdeer3, 0, 17, (chtype) '\\'); + MvWAddCh(bigdeer3, 0, 18, (chtype) '/'); + MvWAddCh(bigdeer3, 0, 20, (chtype) '\\'); + MvWAddCh(bigdeer3, 0, 21, (chtype) '/'); + MvWAddCh(bigdeer3, 1, 18, (chtype) '\\'); + MvWAddCh(bigdeer3, 1, 20, (chtype) '/'); + MvWAddCh(bigdeer3, 2, 19, (chtype) '|'); + MvWAddCh(bigdeer3, 2, 20, (chtype) '_'); + MvWAddCh(bigdeer3, 3, 18, (chtype) '/'); + MvWAddCh(bigdeer3, 3, 19, (chtype) '^'); + MvWAddCh(bigdeer3, 3, 20, (chtype) '0'); + MvWAddCh(bigdeer3, 3, 21, (chtype) '\\'); + MvWAddCh(bigdeer3, 4, 17, (chtype) '/'); + MvWAddCh(bigdeer3, 4, 18, (chtype) '/'); + MvWAddCh(bigdeer3, 4, 19, (chtype) '\\'); + MvWAddCh(bigdeer3, 4, 22, (chtype) '\\'); + MvWAddStr(bigdeer3, 5, 7, "^~~~~~~~~// ~~U"); + MvWAddStr(bigdeer3, 6, 6, "( ()_____( /"); + MvWAddStr(bigdeer3, 7, 6, "/ / /"); + MvWAddStr(bigdeer3, 8, 5, "|/ \\"); + MvWAddStr(bigdeer3, 9, 5, "/> \\>"); /* bigdeer4 */ - mvwaddch(bigdeer4, 0, 17, (chtype) '\\'); - mvwaddch(bigdeer4, 0, 18, (chtype) '/'); - mvwaddch(bigdeer4, 0, 20, (chtype) '\\'); - mvwaddch(bigdeer4, 0, 21, (chtype) '/'); - mvwaddch(bigdeer4, 1, 18, (chtype) '\\'); - mvwaddch(bigdeer4, 1, 20, (chtype) '/'); - mvwaddch(bigdeer4, 2, 19, (chtype) '|'); - mvwaddch(bigdeer4, 2, 20, (chtype) '_'); - mvwaddch(bigdeer4, 3, 18, (chtype) '/'); - mvwaddch(bigdeer4, 3, 19, (chtype) '^'); - mvwaddch(bigdeer4, 3, 20, (chtype) '0'); - mvwaddch(bigdeer4, 3, 21, (chtype) '\\'); - mvwaddch(bigdeer4, 4, 17, (chtype) '/'); - mvwaddch(bigdeer4, 4, 18, (chtype) '/'); - mvwaddch(bigdeer4, 4, 19, (chtype) '\\'); - mvwaddch(bigdeer4, 4, 22, (chtype) '\\'); - mvwaddstr(bigdeer4, 5, 7, "^~~~~~~~~// ~~U"); - mvwaddstr(bigdeer4, 6, 6, "( )______( /"); - mvwaddstr(bigdeer4, 7, 5, "(/ \\"); - mvwaddstr(bigdeer4, 8, 0, "v___= ----^"); + MvWAddCh(bigdeer4, 0, 17, (chtype) '\\'); + MvWAddCh(bigdeer4, 0, 18, (chtype) '/'); + MvWAddCh(bigdeer4, 0, 20, (chtype) '\\'); + MvWAddCh(bigdeer4, 0, 21, (chtype) '/'); + MvWAddCh(bigdeer4, 1, 18, (chtype) '\\'); + MvWAddCh(bigdeer4, 1, 20, (chtype) '/'); + MvWAddCh(bigdeer4, 2, 19, (chtype) '|'); + MvWAddCh(bigdeer4, 2, 20, (chtype) '_'); + MvWAddCh(bigdeer4, 3, 18, (chtype) '/'); + MvWAddCh(bigdeer4, 3, 19, (chtype) '^'); + MvWAddCh(bigdeer4, 3, 20, (chtype) '0'); + MvWAddCh(bigdeer4, 3, 21, (chtype) '\\'); + MvWAddCh(bigdeer4, 4, 17, (chtype) '/'); + MvWAddCh(bigdeer4, 4, 18, (chtype) '/'); + MvWAddCh(bigdeer4, 4, 19, (chtype) '\\'); + MvWAddCh(bigdeer4, 4, 22, (chtype) '\\'); + MvWAddStr(bigdeer4, 5, 7, "^~~~~~~~~// ~~U"); + MvWAddStr(bigdeer4, 6, 6, "( )______( /"); + MvWAddStr(bigdeer4, 7, 5, "(/ \\"); + MvWAddStr(bigdeer4, 8, 0, "v___= ----^"); /* lookdeer1 */ - mvwaddstr(lookdeer1, 0, 16, "\\/ \\/"); - mvwaddstr(lookdeer1, 1, 17, "\\Y/ \\Y/"); - mvwaddstr(lookdeer1, 2, 19, "\\=/"); - mvwaddstr(lookdeer1, 3, 17, "^\\o o/^"); - mvwaddstr(lookdeer1, 4, 17, "//( )"); - mvwaddstr(lookdeer1, 5, 7, "^~~~~~~~~// \\O/"); - mvwaddstr(lookdeer1, 6, 7, "( \\_____( /"); - mvwaddstr(lookdeer1, 7, 8, "( ) /"); - mvwaddstr(lookdeer1, 8, 9, "\\\\ /"); - mvwaddstr(lookdeer1, 9, 11, "\\>/>"); + MvWAddStr(lookdeer1, 0, 16, "\\/ \\/"); + MvWAddStr(lookdeer1, 1, 17, "\\Y/ \\Y/"); + MvWAddStr(lookdeer1, 2, 19, "\\=/"); + MvWAddStr(lookdeer1, 3, 17, "^\\o o/^"); + MvWAddStr(lookdeer1, 4, 17, "//( )"); + MvWAddStr(lookdeer1, 5, 7, "^~~~~~~~~// \\O/"); + MvWAddStr(lookdeer1, 6, 7, "( \\_____( /"); + MvWAddStr(lookdeer1, 7, 8, "( ) /"); + MvWAddStr(lookdeer1, 8, 9, "\\\\ /"); + MvWAddStr(lookdeer1, 9, 11, "\\>/>"); /* lookdeer2 */ - mvwaddstr(lookdeer2, 0, 16, "\\/ \\/"); - mvwaddstr(lookdeer2, 1, 17, "\\Y/ \\Y/"); - mvwaddstr(lookdeer2, 2, 19, "\\=/"); - mvwaddstr(lookdeer2, 3, 17, "^\\o o/^"); - mvwaddstr(lookdeer2, 4, 17, "//( )"); - mvwaddstr(lookdeer2, 5, 7, "^~~~~~~~~// \\O/"); - mvwaddstr(lookdeer2, 6, 7, "(( )____( /"); - mvwaddstr(lookdeer2, 7, 7, "( / |"); - mvwaddstr(lookdeer2, 8, 8, "\\/ |"); - mvwaddstr(lookdeer2, 9, 9, "|> |>"); + MvWAddStr(lookdeer2, 0, 16, "\\/ \\/"); + MvWAddStr(lookdeer2, 1, 17, "\\Y/ \\Y/"); + MvWAddStr(lookdeer2, 2, 19, "\\=/"); + MvWAddStr(lookdeer2, 3, 17, "^\\o o/^"); + MvWAddStr(lookdeer2, 4, 17, "//( )"); + MvWAddStr(lookdeer2, 5, 7, "^~~~~~~~~// \\O/"); + MvWAddStr(lookdeer2, 6, 7, "(( )____( /"); + MvWAddStr(lookdeer2, 7, 7, "( / |"); + MvWAddStr(lookdeer2, 8, 8, "\\/ |"); + MvWAddStr(lookdeer2, 9, 9, "|> |>"); /* lookdeer3 */ - mvwaddstr(lookdeer3, 0, 16, "\\/ \\/"); - mvwaddstr(lookdeer3, 1, 17, "\\Y/ \\Y/"); - mvwaddstr(lookdeer3, 2, 19, "\\=/"); - mvwaddstr(lookdeer3, 3, 17, "^\\o o/^"); - mvwaddstr(lookdeer3, 4, 17, "//( )"); - mvwaddstr(lookdeer3, 5, 7, "^~~~~~~~~// \\O/"); - mvwaddstr(lookdeer3, 6, 6, "( ()_____( /"); - mvwaddstr(lookdeer3, 7, 6, "/ / /"); - mvwaddstr(lookdeer3, 8, 5, "|/ \\"); - mvwaddstr(lookdeer3, 9, 5, "/> \\>"); + MvWAddStr(lookdeer3, 0, 16, "\\/ \\/"); + MvWAddStr(lookdeer3, 1, 17, "\\Y/ \\Y/"); + MvWAddStr(lookdeer3, 2, 19, "\\=/"); + MvWAddStr(lookdeer3, 3, 17, "^\\o o/^"); + MvWAddStr(lookdeer3, 4, 17, "//( )"); + MvWAddStr(lookdeer3, 5, 7, "^~~~~~~~~// \\O/"); + MvWAddStr(lookdeer3, 6, 6, "( ()_____( /"); + MvWAddStr(lookdeer3, 7, 6, "/ / /"); + MvWAddStr(lookdeer3, 8, 5, "|/ \\"); + MvWAddStr(lookdeer3, 9, 5, "/> \\>"); /* lookdeer4 */ - mvwaddstr(lookdeer4, 0, 16, "\\/ \\/"); - mvwaddstr(lookdeer4, 1, 17, "\\Y/ \\Y/"); - mvwaddstr(lookdeer4, 2, 19, "\\=/"); - mvwaddstr(lookdeer4, 3, 17, "^\\o o/^"); - mvwaddstr(lookdeer4, 4, 17, "//( )"); - mvwaddstr(lookdeer4, 5, 7, "^~~~~~~~~// \\O/"); - mvwaddstr(lookdeer4, 6, 6, "( )______( /"); - mvwaddstr(lookdeer4, 7, 5, "(/ \\"); - mvwaddstr(lookdeer4, 8, 0, "v___= ----^"); + MvWAddStr(lookdeer4, 0, 16, "\\/ \\/"); + MvWAddStr(lookdeer4, 1, 17, "\\Y/ \\Y/"); + MvWAddStr(lookdeer4, 2, 19, "\\=/"); + MvWAddStr(lookdeer4, 3, 17, "^\\o o/^"); + MvWAddStr(lookdeer4, 4, 17, "//( )"); + MvWAddStr(lookdeer4, 5, 7, "^~~~~~~~~// \\O/"); + MvWAddStr(lookdeer4, 6, 6, "( )______( /"); + MvWAddStr(lookdeer4, 7, 5, "(/ \\"); + MvWAddStr(lookdeer4, 8, 0, "v___= ----^"); /***********************************************/ cbreak(); @@ -492,166 +492,166 @@ main(int argc GCC_UNUSED, char **argv GCC_UNUSED) overlay(treescrn, treescrn3); /*balls */ - mvwaddch(treescrn3, 4, 18, ' '); - mvwaddch(treescrn3, 7, 6, ' '); - mvwaddch(treescrn3, 8, 19, ' '); - mvwaddch(treescrn3, 11, 22, ' '); + MvWAddCh(treescrn3, 4, 18, ' '); + MvWAddCh(treescrn3, 7, 6, ' '); + MvWAddCh(treescrn3, 8, 19, ' '); + MvWAddCh(treescrn3, 11, 22, ' '); /*star */ - mvwaddch(treescrn3, 0, 12, '*'); + MvWAddCh(treescrn3, 0, 12, '*'); /*strng1 */ - mvwaddch(treescrn3, 3, 11, ' '); + MvWAddCh(treescrn3, 3, 11, ' '); /*strng2 */ - mvwaddch(treescrn3, 5, 13, ' '); - mvwaddch(treescrn3, 6, 10, ' '); + MvWAddCh(treescrn3, 5, 13, ' '); + MvWAddCh(treescrn3, 6, 10, ' '); /*strng3 */ - mvwaddch(treescrn3, 7, 16, ' '); - mvwaddch(treescrn3, 7, 14, ' '); + MvWAddCh(treescrn3, 7, 16, ' '); + MvWAddCh(treescrn3, 7, 14, ' '); /*strng4 */ - mvwaddch(treescrn3, 10, 13, ' '); - mvwaddch(treescrn3, 10, 10, ' '); - mvwaddch(treescrn3, 11, 8, ' '); + MvWAddCh(treescrn3, 10, 13, ' '); + MvWAddCh(treescrn3, 10, 10, ' '); + MvWAddCh(treescrn3, 11, 8, ' '); /*strng5 */ - mvwaddch(treescrn3, 11, 18, ' '); - mvwaddch(treescrn3, 12, 13, ' '); + MvWAddCh(treescrn3, 11, 18, ' '); + MvWAddCh(treescrn3, 12, 13, ' '); /* treescrn4 */ overlay(treescrn, treescrn4); /*balls */ - mvwaddch(treescrn4, 3, 9, ' '); - mvwaddch(treescrn4, 4, 16, ' '); - mvwaddch(treescrn4, 7, 6, ' '); - mvwaddch(treescrn4, 8, 19, ' '); - mvwaddch(treescrn4, 11, 2, ' '); - mvwaddch(treescrn4, 12, 23, ' '); + MvWAddCh(treescrn4, 3, 9, ' '); + MvWAddCh(treescrn4, 4, 16, ' '); + MvWAddCh(treescrn4, 7, 6, ' '); + MvWAddCh(treescrn4, 8, 19, ' '); + MvWAddCh(treescrn4, 11, 2, ' '); + MvWAddCh(treescrn4, 12, 23, ' '); /*star */ (void) wstandout(treescrn4); - mvwaddch(treescrn4, 0, 12, '*'); + MvWAddCh(treescrn4, 0, 12, '*'); (void) wstandend(treescrn4); /*strng1 */ - mvwaddch(treescrn4, 3, 13, ' '); + MvWAddCh(treescrn4, 3, 13, ' '); /*strng2 */ /*strng3 */ - mvwaddch(treescrn4, 7, 15, ' '); - mvwaddch(treescrn4, 8, 11, ' '); + MvWAddCh(treescrn4, 7, 15, ' '); + MvWAddCh(treescrn4, 8, 11, ' '); /*strng4 */ - mvwaddch(treescrn4, 9, 16, ' '); - mvwaddch(treescrn4, 10, 12, ' '); - mvwaddch(treescrn4, 11, 8, ' '); + MvWAddCh(treescrn4, 9, 16, ' '); + MvWAddCh(treescrn4, 10, 12, ' '); + MvWAddCh(treescrn4, 11, 8, ' '); /*strng5 */ - mvwaddch(treescrn4, 11, 18, ' '); - mvwaddch(treescrn4, 12, 14, ' '); + MvWAddCh(treescrn4, 11, 18, ' '); + MvWAddCh(treescrn4, 12, 14, ' '); /* treescrn5 */ overlay(treescrn, treescrn5); /*balls */ - mvwaddch(treescrn5, 3, 15, ' '); - mvwaddch(treescrn5, 10, 20, ' '); - mvwaddch(treescrn5, 12, 1, ' '); + MvWAddCh(treescrn5, 3, 15, ' '); + MvWAddCh(treescrn5, 10, 20, ' '); + MvWAddCh(treescrn5, 12, 1, ' '); /*star */ - mvwaddch(treescrn5, 0, 12, '*'); + MvWAddCh(treescrn5, 0, 12, '*'); /*strng1 */ - mvwaddch(treescrn5, 3, 11, ' '); + MvWAddCh(treescrn5, 3, 11, ' '); /*strng2 */ - mvwaddch(treescrn5, 5, 12, ' '); + MvWAddCh(treescrn5, 5, 12, ' '); /*strng3 */ - mvwaddch(treescrn5, 7, 14, ' '); - mvwaddch(treescrn5, 8, 10, ' '); + MvWAddCh(treescrn5, 7, 14, ' '); + MvWAddCh(treescrn5, 8, 10, ' '); /*strng4 */ - mvwaddch(treescrn5, 9, 15, ' '); - mvwaddch(treescrn5, 10, 11, ' '); - mvwaddch(treescrn5, 11, 7, ' '); + MvWAddCh(treescrn5, 9, 15, ' '); + MvWAddCh(treescrn5, 10, 11, ' '); + MvWAddCh(treescrn5, 11, 7, ' '); /*strng5 */ - mvwaddch(treescrn5, 11, 17, ' '); - mvwaddch(treescrn5, 12, 13, ' '); + MvWAddCh(treescrn5, 11, 17, ' '); + MvWAddCh(treescrn5, 12, 13, ' '); /* treescrn6 */ overlay(treescrn, treescrn6); /*balls */ - mvwaddch(treescrn6, 6, 7, ' '); - mvwaddch(treescrn6, 7, 18, ' '); - mvwaddch(treescrn6, 10, 4, ' '); - mvwaddch(treescrn6, 11, 23, ' '); + MvWAddCh(treescrn6, 6, 7, ' '); + MvWAddCh(treescrn6, 7, 18, ' '); + MvWAddCh(treescrn6, 10, 4, ' '); + MvWAddCh(treescrn6, 11, 23, ' '); /*star */ (void) wstandout(treescrn6); - mvwaddch(treescrn6, 0, 12, '*'); + MvWAddCh(treescrn6, 0, 12, '*'); (void) wstandend(treescrn6); /*strng1 */ /*strng2 */ - mvwaddch(treescrn6, 5, 11, ' '); + MvWAddCh(treescrn6, 5, 11, ' '); /*strng3 */ - mvwaddch(treescrn6, 7, 13, ' '); - mvwaddch(treescrn6, 8, 9, ' '); + MvWAddCh(treescrn6, 7, 13, ' '); + MvWAddCh(treescrn6, 8, 9, ' '); /*strng4 */ - mvwaddch(treescrn6, 9, 14, ' '); - mvwaddch(treescrn6, 10, 10, ' '); - mvwaddch(treescrn6, 11, 6, ' '); + MvWAddCh(treescrn6, 9, 14, ' '); + MvWAddCh(treescrn6, 10, 10, ' '); + MvWAddCh(treescrn6, 11, 6, ' '); /*strng5 */ - mvwaddch(treescrn6, 11, 16, ' '); - mvwaddch(treescrn6, 12, 12, ' '); + MvWAddCh(treescrn6, 11, 16, ' '); + MvWAddCh(treescrn6, 12, 12, ' '); /* treescrn7 */ overlay(treescrn, treescrn7); /*balls */ - mvwaddch(treescrn7, 3, 15, ' '); - mvwaddch(treescrn7, 6, 7, ' '); - mvwaddch(treescrn7, 7, 18, ' '); - mvwaddch(treescrn7, 10, 4, ' '); - mvwaddch(treescrn7, 11, 22, ' '); + MvWAddCh(treescrn7, 3, 15, ' '); + MvWAddCh(treescrn7, 6, 7, ' '); + MvWAddCh(treescrn7, 7, 18, ' '); + MvWAddCh(treescrn7, 10, 4, ' '); + MvWAddCh(treescrn7, 11, 22, ' '); /*star */ - mvwaddch(treescrn7, 0, 12, '*'); + MvWAddCh(treescrn7, 0, 12, '*'); /*strng1 */ - mvwaddch(treescrn7, 3, 12, ' '); + MvWAddCh(treescrn7, 3, 12, ' '); /*strng2 */ - mvwaddch(treescrn7, 5, 13, ' '); - mvwaddch(treescrn7, 6, 9, ' '); + MvWAddCh(treescrn7, 5, 13, ' '); + MvWAddCh(treescrn7, 6, 9, ' '); /*strng3 */ - mvwaddch(treescrn7, 7, 15, ' '); - mvwaddch(treescrn7, 8, 11, ' '); + MvWAddCh(treescrn7, 7, 15, ' '); + MvWAddCh(treescrn7, 8, 11, ' '); /*strng4 */ - mvwaddch(treescrn7, 9, 16, ' '); - mvwaddch(treescrn7, 10, 12, ' '); - mvwaddch(treescrn7, 11, 8, ' '); + MvWAddCh(treescrn7, 9, 16, ' '); + MvWAddCh(treescrn7, 10, 12, ' '); + MvWAddCh(treescrn7, 11, 8, ' '); /*strng5 */ - mvwaddch(treescrn7, 11, 18, ' '); - mvwaddch(treescrn7, 12, 14, ' '); + MvWAddCh(treescrn7, 11, 18, ' '); + MvWAddCh(treescrn7, 12, 14, ' '); look_out(150); reindeer(); @@ -678,21 +678,21 @@ boxit(void) int x = 0; while (x < 20) { - mvaddch(x, 7, '|'); + MvAddCh(x, 7, '|'); ++x; } x = 8; while (x < 80) { - mvaddch(19, x, '_'); + MvAddCh(19, x, '_'); ++x; } x = 0; while (x < 80) { - mvaddch(22, x, '_'); + MvAddCh(22, x, '_'); ++x; } @@ -702,14 +702,14 @@ boxit(void) static int seas(void) { - mvaddch(4, 1, 'S'); - mvaddch(6, 1, 'E'); - mvaddch(8, 1, 'A'); - mvaddch(10, 1, 'S'); - mvaddch(12, 1, 'O'); - mvaddch(14, 1, 'N'); - mvaddch(16, 1, '`'); - mvaddch(18, 1, 'S'); + MvAddCh(4, 1, 'S'); + MvAddCh(6, 1, 'E'); + MvAddCh(8, 1, 'A'); + MvAddCh(10, 1, 'S'); + MvAddCh(12, 1, 'O'); + MvAddCh(14, 1, 'N'); + MvAddCh(16, 1, '`'); + MvAddCh(18, 1, 'S'); return (0); } @@ -717,15 +717,15 @@ seas(void) static int greet(void) { - mvaddch(3, 5, 'G'); - mvaddch(5, 5, 'R'); - mvaddch(7, 5, 'E'); - mvaddch(9, 5, 'E'); - mvaddch(11, 5, 'T'); - mvaddch(13, 5, 'I'); - mvaddch(15, 5, 'N'); - mvaddch(17, 5, 'G'); - mvaddch(19, 5, 'S'); + MvAddCh(3, 5, 'G'); + MvAddCh(5, 5, 'R'); + MvAddCh(7, 5, 'E'); + MvAddCh(9, 5, 'E'); + MvAddCh(11, 5, 'T'); + MvAddCh(13, 5, 'I'); + MvAddCh(15, 5, 'N'); + MvAddCh(17, 5, 'G'); + MvAddCh(19, 5, 'S'); return (0); } @@ -733,7 +733,7 @@ greet(void) static int fromwho(void) { - mvaddstr(21, 13, FROMWHO); + MvAddStr(21, 13, FROMWHO); return (0); } @@ -741,41 +741,41 @@ static int tree(void) { set_color(treescrn, COLOR_GREEN); - mvwaddch(treescrn, 1, 11, (chtype) '/'); - mvwaddch(treescrn, 2, 11, (chtype) '/'); - mvwaddch(treescrn, 3, 10, (chtype) '/'); - mvwaddch(treescrn, 4, 9, (chtype) '/'); - mvwaddch(treescrn, 5, 9, (chtype) '/'); - mvwaddch(treescrn, 6, 8, (chtype) '/'); - mvwaddch(treescrn, 7, 7, (chtype) '/'); - mvwaddch(treescrn, 8, 6, (chtype) '/'); - mvwaddch(treescrn, 9, 6, (chtype) '/'); - mvwaddch(treescrn, 10, 5, (chtype) '/'); - mvwaddch(treescrn, 11, 3, (chtype) '/'); - mvwaddch(treescrn, 12, 2, (chtype) '/'); - - mvwaddch(treescrn, 1, 13, (chtype) '\\'); - mvwaddch(treescrn, 2, 13, (chtype) '\\'); - mvwaddch(treescrn, 3, 14, (chtype) '\\'); - mvwaddch(treescrn, 4, 15, (chtype) '\\'); - mvwaddch(treescrn, 5, 15, (chtype) '\\'); - mvwaddch(treescrn, 6, 16, (chtype) '\\'); - mvwaddch(treescrn, 7, 17, (chtype) '\\'); - mvwaddch(treescrn, 8, 18, (chtype) '\\'); - mvwaddch(treescrn, 9, 18, (chtype) '\\'); - mvwaddch(treescrn, 10, 19, (chtype) '\\'); - mvwaddch(treescrn, 11, 21, (chtype) '\\'); - mvwaddch(treescrn, 12, 22, (chtype) '\\'); - - mvwaddch(treescrn, 4, 10, (chtype) '_'); - mvwaddch(treescrn, 4, 14, (chtype) '_'); - mvwaddch(treescrn, 8, 7, (chtype) '_'); - mvwaddch(treescrn, 8, 17, (chtype) '_'); - - mvwaddstr(treescrn, 13, 0, "//////////// \\\\\\\\\\\\\\\\\\\\\\\\"); - - mvwaddstr(treescrn, 14, 11, "| |"); - mvwaddstr(treescrn, 15, 11, "|_|"); + MvWAddCh(treescrn, 1, 11, (chtype) '/'); + MvWAddCh(treescrn, 2, 11, (chtype) '/'); + MvWAddCh(treescrn, 3, 10, (chtype) '/'); + MvWAddCh(treescrn, 4, 9, (chtype) '/'); + MvWAddCh(treescrn, 5, 9, (chtype) '/'); + MvWAddCh(treescrn, 6, 8, (chtype) '/'); + MvWAddCh(treescrn, 7, 7, (chtype) '/'); + MvWAddCh(treescrn, 8, 6, (chtype) '/'); + MvWAddCh(treescrn, 9, 6, (chtype) '/'); + MvWAddCh(treescrn, 10, 5, (chtype) '/'); + MvWAddCh(treescrn, 11, 3, (chtype) '/'); + MvWAddCh(treescrn, 12, 2, (chtype) '/'); + + MvWAddCh(treescrn, 1, 13, (chtype) '\\'); + MvWAddCh(treescrn, 2, 13, (chtype) '\\'); + MvWAddCh(treescrn, 3, 14, (chtype) '\\'); + MvWAddCh(treescrn, 4, 15, (chtype) '\\'); + MvWAddCh(treescrn, 5, 15, (chtype) '\\'); + MvWAddCh(treescrn, 6, 16, (chtype) '\\'); + MvWAddCh(treescrn, 7, 17, (chtype) '\\'); + MvWAddCh(treescrn, 8, 18, (chtype) '\\'); + MvWAddCh(treescrn, 9, 18, (chtype) '\\'); + MvWAddCh(treescrn, 10, 19, (chtype) '\\'); + MvWAddCh(treescrn, 11, 21, (chtype) '\\'); + MvWAddCh(treescrn, 12, 22, (chtype) '\\'); + + MvWAddCh(treescrn, 4, 10, (chtype) '_'); + MvWAddCh(treescrn, 4, 14, (chtype) '_'); + MvWAddCh(treescrn, 8, 7, (chtype) '_'); + MvWAddCh(treescrn, 8, 17, (chtype) '_'); + + MvWAddStr(treescrn, 13, 0, "//////////// \\\\\\\\\\\\\\\\\\\\\\\\"); + + MvWAddStr(treescrn, 14, 11, "| |"); + MvWAddStr(treescrn, 15, 11, "|_|"); unset_color(treescrn); wrefresh(treescrn); @@ -790,22 +790,22 @@ balls(void) overlay(treescrn, treescrn2); set_color(treescrn2, COLOR_BLUE); - mvwaddch(treescrn2, 3, 9, (chtype) '@'); - mvwaddch(treescrn2, 3, 15, (chtype) '@'); - mvwaddch(treescrn2, 4, 8, (chtype) '@'); - mvwaddch(treescrn2, 4, 16, (chtype) '@'); - mvwaddch(treescrn2, 5, 7, (chtype) '@'); - mvwaddch(treescrn2, 5, 17, (chtype) '@'); - mvwaddch(treescrn2, 7, 6, (chtype) '@'); - mvwaddch(treescrn2, 7, 18, (chtype) '@'); - mvwaddch(treescrn2, 8, 5, (chtype) '@'); - mvwaddch(treescrn2, 8, 19, (chtype) '@'); - mvwaddch(treescrn2, 10, 4, (chtype) '@'); - mvwaddch(treescrn2, 10, 20, (chtype) '@'); - mvwaddch(treescrn2, 11, 2, (chtype) '@'); - mvwaddch(treescrn2, 11, 22, (chtype) '@'); - mvwaddch(treescrn2, 12, 1, (chtype) '@'); - mvwaddch(treescrn2, 12, 23, (chtype) '@'); + MvWAddCh(treescrn2, 3, 9, (chtype) '@'); + MvWAddCh(treescrn2, 3, 15, (chtype) '@'); + MvWAddCh(treescrn2, 4, 8, (chtype) '@'); + MvWAddCh(treescrn2, 4, 16, (chtype) '@'); + MvWAddCh(treescrn2, 5, 7, (chtype) '@'); + MvWAddCh(treescrn2, 5, 17, (chtype) '@'); + MvWAddCh(treescrn2, 7, 6, (chtype) '@'); + MvWAddCh(treescrn2, 7, 18, (chtype) '@'); + MvWAddCh(treescrn2, 8, 5, (chtype) '@'); + MvWAddCh(treescrn2, 8, 19, (chtype) '@'); + MvWAddCh(treescrn2, 10, 4, (chtype) '@'); + MvWAddCh(treescrn2, 10, 20, (chtype) '@'); + MvWAddCh(treescrn2, 11, 2, (chtype) '@'); + MvWAddCh(treescrn2, 11, 22, (chtype) '@'); + MvWAddCh(treescrn2, 12, 1, (chtype) '@'); + MvWAddCh(treescrn2, 12, 23, (chtype) '@'); unset_color(treescrn2); wrefresh(treescrn2); @@ -819,7 +819,7 @@ star(void) (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_YELLOW); - mvwaddch(treescrn2, 0, 12, (chtype) '*'); + MvWAddCh(treescrn2, 0, 12, (chtype) '*'); (void) wstandend(treescrn2); unset_color(treescrn2); @@ -834,9 +834,9 @@ strng1(void) (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); - mvwaddch(treescrn2, 3, 13, (chtype) '\''); - mvwaddch(treescrn2, 3, 12, (chtype) ':'); - mvwaddch(treescrn2, 3, 11, (chtype) '.'); + MvWAddCh(treescrn2, 3, 13, (chtype) '\''); + MvWAddCh(treescrn2, 3, 12, (chtype) ':'); + MvWAddCh(treescrn2, 3, 11, (chtype) '.'); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); @@ -852,12 +852,12 @@ strng2(void) (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); - mvwaddch(treescrn2, 5, 14, (chtype) '\''); - mvwaddch(treescrn2, 5, 13, (chtype) ':'); - mvwaddch(treescrn2, 5, 12, (chtype) '.'); - mvwaddch(treescrn2, 5, 11, (chtype) ','); - mvwaddch(treescrn2, 6, 10, (chtype) '\''); - mvwaddch(treescrn2, 6, 9, (chtype) ':'); + MvWAddCh(treescrn2, 5, 14, (chtype) '\''); + MvWAddCh(treescrn2, 5, 13, (chtype) ':'); + MvWAddCh(treescrn2, 5, 12, (chtype) '.'); + MvWAddCh(treescrn2, 5, 11, (chtype) ','); + MvWAddCh(treescrn2, 6, 10, (chtype) '\''); + MvWAddCh(treescrn2, 6, 9, (chtype) ':'); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); @@ -873,14 +873,14 @@ strng3(void) (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); - mvwaddch(treescrn2, 7, 16, (chtype) '\''); - mvwaddch(treescrn2, 7, 15, (chtype) ':'); - mvwaddch(treescrn2, 7, 14, (chtype) '.'); - mvwaddch(treescrn2, 7, 13, (chtype) ','); - mvwaddch(treescrn2, 8, 12, (chtype) '\''); - mvwaddch(treescrn2, 8, 11, (chtype) ':'); - mvwaddch(treescrn2, 8, 10, (chtype) '.'); - mvwaddch(treescrn2, 8, 9, (chtype) ','); + MvWAddCh(treescrn2, 7, 16, (chtype) '\''); + MvWAddCh(treescrn2, 7, 15, (chtype) ':'); + MvWAddCh(treescrn2, 7, 14, (chtype) '.'); + MvWAddCh(treescrn2, 7, 13, (chtype) ','); + MvWAddCh(treescrn2, 8, 12, (chtype) '\''); + MvWAddCh(treescrn2, 8, 11, (chtype) ':'); + MvWAddCh(treescrn2, 8, 10, (chtype) '.'); + MvWAddCh(treescrn2, 8, 9, (chtype) ','); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); @@ -896,19 +896,19 @@ strng4(void) (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); - mvwaddch(treescrn2, 9, 17, (chtype) '\''); - mvwaddch(treescrn2, 9, 16, (chtype) ':'); - mvwaddch(treescrn2, 9, 15, (chtype) '.'); - mvwaddch(treescrn2, 9, 14, (chtype) ','); - mvwaddch(treescrn2, 10, 13, (chtype) '\''); - mvwaddch(treescrn2, 10, 12, (chtype) ':'); - mvwaddch(treescrn2, 10, 11, (chtype) '.'); - mvwaddch(treescrn2, 10, 10, (chtype) ','); - mvwaddch(treescrn2, 11, 9, (chtype) '\''); - mvwaddch(treescrn2, 11, 8, (chtype) ':'); - mvwaddch(treescrn2, 11, 7, (chtype) '.'); - mvwaddch(treescrn2, 11, 6, (chtype) ','); - mvwaddch(treescrn2, 12, 5, (chtype) '\''); + MvWAddCh(treescrn2, 9, 17, (chtype) '\''); + MvWAddCh(treescrn2, 9, 16, (chtype) ':'); + MvWAddCh(treescrn2, 9, 15, (chtype) '.'); + MvWAddCh(treescrn2, 9, 14, (chtype) ','); + MvWAddCh(treescrn2, 10, 13, (chtype) '\''); + MvWAddCh(treescrn2, 10, 12, (chtype) ':'); + MvWAddCh(treescrn2, 10, 11, (chtype) '.'); + MvWAddCh(treescrn2, 10, 10, (chtype) ','); + MvWAddCh(treescrn2, 11, 9, (chtype) '\''); + MvWAddCh(treescrn2, 11, 8, (chtype) ':'); + MvWAddCh(treescrn2, 11, 7, (chtype) '.'); + MvWAddCh(treescrn2, 11, 6, (chtype) ','); + MvWAddCh(treescrn2, 12, 5, (chtype) '\''); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); @@ -924,14 +924,14 @@ strng5(void) (void) wattrset(treescrn2, A_BOLD | A_BLINK); set_color(treescrn2, COLOR_WHITE); - mvwaddch(treescrn2, 11, 19, (chtype) '\''); - mvwaddch(treescrn2, 11, 18, (chtype) ':'); - mvwaddch(treescrn2, 11, 17, (chtype) '.'); - mvwaddch(treescrn2, 11, 16, (chtype) ','); - mvwaddch(treescrn2, 12, 15, (chtype) '\''); - mvwaddch(treescrn2, 12, 14, (chtype) ':'); - mvwaddch(treescrn2, 12, 13, (chtype) '.'); - mvwaddch(treescrn2, 12, 12, (chtype) ','); + MvWAddCh(treescrn2, 11, 19, (chtype) '\''); + MvWAddCh(treescrn2, 11, 18, (chtype) ':'); + MvWAddCh(treescrn2, 11, 17, (chtype) '.'); + MvWAddCh(treescrn2, 11, 16, (chtype) ','); + MvWAddCh(treescrn2, 12, 15, (chtype) '\''); + MvWAddCh(treescrn2, 12, 14, (chtype) ':'); + MvWAddCh(treescrn2, 12, 13, (chtype) '.'); + MvWAddCh(treescrn2, 12, 12, (chtype) ','); wattroff(treescrn2, A_BOLD | A_BLINK); unset_color(treescrn2); @@ -1014,7 +1014,7 @@ reindeer(void) y_pos = 1; } for (looper = 0; looper < 4; looper++) { - mvwaddch(dotdeer0, y_pos, x_pos, (chtype) '.'); + MvWAddCh(dotdeer0, y_pos, x_pos, (chtype) '.'); wrefresh(dotdeer0); wrefresh(w_del_msg); werase(dotdeer0); @@ -1032,14 +1032,14 @@ reindeer(void) if (x_pos < 56) { y_pos = 3; - mvwaddch(stardeer0, y_pos, x_pos, (chtype) '*'); + MvWAddCh(stardeer0, y_pos, x_pos, (chtype) '*'); wrefresh(stardeer0); wrefresh(w_del_msg); werase(stardeer0); wrefresh(stardeer0); wrefresh(w_del_msg); } else { - mvwaddch(dotdeer0, y_pos, x_pos, (chtype) '*'); + MvWAddCh(dotdeer0, y_pos, x_pos, (chtype) '*'); wrefresh(dotdeer0); wrefresh(w_del_msg); werase(dotdeer0);