/*
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
}
printf(" subtype Eti_Error is C_Int range %d .. %d;\n\n",
etimin, etimax);
- printf(buf);
+ printf("%s", buf);
}
break;
default:
-- 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
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
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
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
:
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; }],
:
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
# 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
# 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)
/****************************************************************************
- * 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 *
#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
* field->cols))))
RETURN(E_SYSTEM_ERROR);
+#if !USE_WIDEC_SUPPORT
len = vlen;
+#endif
}
}
}
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)
{
{
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)
{
#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
{
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;
}
}
}
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;
}
}
}
* 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
typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
#endif
+/*
+ * We need FILE, etc. Include this before checking any feature symbols.
+ */
+#include <stdio.h>
+
/*
* With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or
* conflicting) when _XOPEN_SOURCE is 500 or greater.
#define NCURSES_WIDECHAR
#endif
-#include <stdio.h>
#include <stdarg.h> /* we need va_list */
#ifdef NCURSES_WIDECHAR
#include <stddef.h> /* we want wchar_t */
#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
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)
#include <curses.priv.h>
-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.
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)
#include <curses.priv.h>
-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 <fifo_defs.h>
{
SCREEN *sp;
int ch;
+ int rc = 0;
#ifdef NCURSES_WGETCH_EVENTS
long event_delay = -1;
#endif
!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]);
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)
* increase the wait with mouseinterval().
*/
int runcount = 0;
- int rc = 0;
do {
ch = kgetch(sp EVENTLIST_2nd(evl));
#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 <tic.h>
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;
}
/****************************************************************************
- * 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 *
#include <curses.priv.h>
-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)
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++) {
#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
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;
/****************************************************************************
- * 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 *
#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
int res = OK;
unsigned max_length;
SCREEN *sp;
- TERMINAL *term;
int numlab;
T((T_CALLED("_nc_slk_initialize()")));
if (0 == sp)
returnCode(ERR);
- term = TerminalOf(SP_PARM);
- assert(term);
+ assert(TerminalOf(SP_PARM));
numlab = NumLabels;
/****************************************************************************
- * 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 *
#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
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++) {
/****************************************************************************
- * 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 *
#include <curses.priv.h>
-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)
s[col] = win->_nc_bkgd;
}
} else {
+ assert(pline != 0);
s = &pline[win->_pary + row].text[win->_parx];
}
#include <tic.h>
-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
unsigned i;
#if NO_LEAKS
- if (tp == 0 && stringbuf != 0) {
- FreeAndNull(stringbuf);
+ if (tp == 0) {
+ if (stringbuf != 0) {
+ FreeAndNull(stringbuf);
+ }
return;
}
#endif
#include <tic.h>
-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
/*
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);
} 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);
} 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);
#include <ctype.h>
#include <tic.h>
-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.
if (OkToAdd()) {
AddCh(ch);
} else {
- ch = EOF;
break;
}
}
/****************************************************************************
- * 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 *
#include <tic.h>
-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
* 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;
/****************************************************************************
- * 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 *
#define USE_TERMLIB 1
#include <curses.priv.h>
-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 <names.c>
maxlen = (unsigned) strlen(from);
fprintf(ofp, "\t{ %4d, %-*.*s },\t/* %s */\n",
code,
- maxlen, maxlen,
+ (int) maxlen, (int) maxlen,
to,
from);
}
#include <ctype.h>
#include <tic.h>
-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[] =
* 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;
} else
*dp++ = *bp;
}
- *dp++ = '\0';
+ *dp = '\0';
tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
}
#include <tic.h>
-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->
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;
}
}
#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))
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) {
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);
/****************************************************************************
- * 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 *
#include <tic.h>
#include <ctype.h>
-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
tp = _nc_vischar(tp, UChar(c));
}
*tp++ = D_QUOTE;
- *tp++ = '\0';
+ *tp = '\0';
} else {
vbuf = ("(_nc_visbuf2n failed)");
}
}
}
*tp++ = D_QUOTE;
- *tp++ = '\0';
+ *tp = '\0';
} else {
vbuf = ("(_nc_viswbuf2n failed)");
}
}
}
- 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
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,
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);
}
}
}
}
#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;
/****************************************************************************
- * 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 *
#include <ctype.h>
-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
{
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)) {
/****************************************************************************
- * 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 *
#include <curses.priv.h>
#include <ctype.h>
-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)
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;
/****************************************************************************
- * 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 *
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* 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
save_sgr = set_attributes;
- if (((len = FMT_ENTRY()) > critlen)
+ if ((FMT_ENTRY() > critlen)
&& limited) {
save_tterm = *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
critlen);
}
changed = TRUE;
- if ((len = FMT_ENTRY()) <= critlen)
+ if (FMT_ENTRY() <= critlen)
break;
}
}
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",
changed = TRUE;
}
}
- if (!changed || ((len = FMT_ENTRY()) > critlen)) {
+ if (!changed || (FMT_ENTRY() > critlen)) {
int oldversion = tversion;
tversion = V_BSD;
} 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;
}
/****************************************************************************
- * 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 *
#include <dump_entry.h>
-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 "}"
(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];
status = _nc_read_entry(tname[termcount],
tfile[termcount],
&entries[termcount].tterm);
- directory = TERMINFO; /* for error message */
}
if (status <= 0) {
/****************************************************************************
- * 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 *
#define USE_LIBTINFO
#include <progs.priv.h>
-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;
}
}
tab_list = add_to_tab_list(&append, option);
- option += ((int) strlen(option)) - 1;
break;
}
}
#include <dump_entry.h>
#include <transform.h>
-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";
if ((dst = strdup(src)) == NULL)
failed("strdup");
+
+ assert(dst != 0);
+
len = strlen(dst);
while (--len != 0 && isspace(UChar(dst[len])))
dst[len] = '\0';
/****************************************************************************
- * 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 *
#include <hashed_db.h>
#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, ".."))
}
#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)
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))
}
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)
#include <dump_entry.h>
#include <transform.h>
-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,
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;
reset_mode();
}
- ttype = get_termcap_entry(*argv);
+ (void) get_termcap_entry(*argv);
if (!noset) {
tcolumns = columns;
/****************************************************************************
- * 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 *
* 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 <test.priv.h>
#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");
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 */
ship_t *ss;
(void) clear();
- (void) mvaddstr(0, 35, "BATTLESHIPS");
+ MvAddStr(0, 35, "BATTLESHIPS");
(void) move(PROMPTLINE + 2, 0);
announceopts();
}
/* 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));
(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));
(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++) {
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...", "");
(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);
}
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);
}
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)
(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 */
++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]? "
/****************************************************************************
- * 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 *
/*
* 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.
*/
if (isVisible(tst))
now = tst;
else
- tst = next_card(tst);
+ (void) next_card(tst);
}
return now;
}
#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 */
/****************************************************************************
- * 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 *
* 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
*/
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();
/****************************************************************************
- * 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 *
* 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.
*/
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();
/****************************************************************************
- * 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 *
* 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
static void
show_insert_mode(bool insert_mode)
{
- mvaddstr(5, 57, (insert_mode
+ MvAddStr(5, 57, (insert_mode
? "form_status: insert "
: "form_status: overlay"));
}
help_edit_field();
- mvaddstr(4, 57, "Forms Entry Test");
+ MvAddStr(4, 57, "Forms Entry Test");
show_insert_mode(TRUE);
refresh();
set_field_buffer(f[n - 1], 1, "Hello\nWorld!");
}
- f[n++] = (FIELD *) 0;
+ f[n] = (FIELD *) 0;
if ((form = new_form(f)) != 0) {
/****************************************************************************
- * 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 *
* 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
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();
}
* 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.
*/
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);
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);
/****************************************************************************
- * 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 *
/*
* 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.
*/
} 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");
}
/*
* 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.
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);
}
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);
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);
}
/****************************************************************************
- * 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 *
/*
* Author: Thomas E. Dickey <dickey@clark.net> 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.
*/
} else {
rc = putc(c, stdout);
}
- return 0;
+ return rc;
}
static bool
/****************************************************************************
- * 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 *
* 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 <test.priv.h>
{
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();
}
} 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();
/****************************************************************************
- * 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 *
* 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 <test.priv.h>
wrefresh(large);
wrefresh(small);
- mvwaddstr(small, 5, 5, " Test <place to change> String ");
+ MvWAddStr(small, 5, 5, " Test <place to change> String ");
wrefresh(small);
getch();
touchwin(large);
wrefresh(large);
- mvwaddstr(small, 5, 5, " Test <***************> String ");
+ MvWAddStr(small, 5, 5, " Test <***************> String ");
wrefresh(small);
/* DIFFERENCE! */
/****************************************************************************
- * 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 *
* 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 <test.priv.h>
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);
/* 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);
/****************************************************************************
- * 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 *
*
* 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 <test.priv.h>
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);
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 */
(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);
}
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')
/****************************************************************************
- * 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 *
* 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);
break;
}
- mvwprintw(chrwin, 0, 0, "char:");
+ MvWPrintw(chrwin, 0, 0, "char:");
wclrtoeol(chrwin);
if (txtwin != stdscr) {
}
wnoutrefresh(chrwin);
- mvwprintw(strwin, 0, 0, "text:");
+ MvWPrintw(strwin, 0, 0, "text:");
wclrtobot(strwin);
limit = getmaxx(strwin) - 5;
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);
}
}
/****************************************************************************
- * 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 *
* 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
*/
break;
}
- mvwprintw(chrwin, 0, 0, "char:");
+ MvWPrintw(chrwin, 0, 0, "char:");
wclrtoeol(chrwin);
if (txtwin != stdscr) {
}
wnoutrefresh(chrwin);
- mvwprintw(strwin, 0, 0, "text:");
+ MvWPrintw(strwin, 0, 0, "text:");
wclrtobot(strwin);
limit = getmaxx(strwin) - 5;
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);
}
}
/****************************************************************************
- * 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 *
* 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
/* 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
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';
/****************************************************************************
- * 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 *
* 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
*/
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();
/****************************************************************************
- * 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 *
* 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
#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
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';
/****************************************************************************
- * 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 *
* Eric S. Raymond <esr@snark.thyrsus.com> 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 <test.priv.h>
(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.");
}
(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");
}
{
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);
/****************************************************************************
- * 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 *
* 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 <test.priv.h>
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) {
/****************************************************************************
- * 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 *
* 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.
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);
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);
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);
Author: Eric S. Raymond <esr@snark.thyrsus.com> 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 $
***************************************************************************/
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
&& (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)
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");
}
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, " ");
/*
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);
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);
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, " ");
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, " ");
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,
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);
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
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++)
static void
wide_color_test(void)
{
- int c;
int i;
int top = 0, width;
int base_row = 0;
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++)
}
}
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);
}
}
- switch (c = wGetchar(stdscr)) {
+ switch (wGetchar(stdscr)) {
case 'a':
opt_acsc = FALSE;
break;
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;
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));
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);
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));
{
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();
case CTRL('l'):
erase();
attron(A_BOLD);
- mvaddstr(0, 20, "Soft Key Exerciser");
+ MvAddStr(0, 20, "Soft Key Exerciser");
attroff(A_BOLD);
slk_help();
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;
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);
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();
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;
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);
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();
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)
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) {
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* */
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* */
}
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);
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();
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
}
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);
}
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++) {
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 {
/*
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);
}
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();
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
}
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();
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
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();
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
(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();
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* */
}
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;
}
(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* */
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* */
}
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);
}
}
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();
{
newwin_legend(curp);
if (msg) {
- mvaddstr(LINES - 1, 0, msg);
+ MvAddStr(LINES - 1, 0, msg);
refresh();
napms(1000);
}
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);
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");
{
int c;
FRAME *current = (FRAME *) 0, *neww;
- WINDOW *usescr = stdscr;
+ WINDOW *usescr;
#if HAVE_PUTWIN && HAVE_GETWIN
FILE *fp;
#endif
break;
x = getmaxx(frame_win(current)) - 1;
}
- mvwdelch(frame_win(current), y, x);
+ (void) mvwdelch(frame_win(current), y, x);
}
break;
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);
} 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
{
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);
}
#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);
/*
* 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();
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);
#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++) {
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);
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();
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);
}
}
}
- 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,
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();
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) {
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;
* 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 <test.priv.h>
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);
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);
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)
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;
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 */
}
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);
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)
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;
/****************************************************************************
- * 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 *
* 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 <test.priv.h>
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
/****************************************************************************
- * 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 *
* 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
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);
/****************************************************************************
- * 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 *
* 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
getyx(stdscr, y, x);
while (!done) {
- switch (ch = get_command(which, last)) {
+ switch (get_command(which, last)) {
case 'n':
setup_next();
done = TRUE;
-/* $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 <test.priv.h>
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. */
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 (;;) {
(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) {
/****************************************************************************
* 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
#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
*/
/****************************************************************************
- * 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 *
* 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
#define WIDE_LINEDATA
#include <linedata.h>
+#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
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';
/****************************************************************************
- * 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 *
* 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
#include <linedata.h>
+#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
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';
/****************************************************************************
- * 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 *
* 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
#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
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';
/****************************************************************************
- * 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 *
* 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
#define WIDE_LINEDATA
#include <linedata.h>
+#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
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';
/****************************************************************************
- * 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 *
* 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
*
static void
show_1st(WINDOW *win, int line, char *buffer)
{
- mvwaddstr(win, line, 5, buffer);
+ MvWAddStr(win, line, 5, buffer);
}
static void
break;
}
- mvwprintw(chrwin, 0, 0, "line:");
+ MvWPrintw(chrwin, 0, 0, "line:");
wclrtoeol(chrwin);
if (txtwin != stdscr) {
}
wnoutrefresh(chrwin);
- mvwprintw(strwin, 0, 0, "%4d:", limit);
+ MvWPrintw(strwin, 0, 0, "%4d:", limit);
wclrtobot(strwin);
if (txtwin != stdscr) {
/****************************************************************************
- * 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 *
* 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
*
static void
show_1st(WINDOW *win, int line, wchar_t *buffer)
{
- mvwaddwstr(win, line, 5, buffer);
+ (void) mvwaddwstr(win, line, 5, buffer);
}
static void
break;
}
- mvwprintw(chrwin, 0, 0, "line:");
+ MvWPrintw(chrwin, 0, 0, "line:");
wclrtoeol(chrwin);
if (txtwin != stdscr) {
}
wnoutrefresh(chrwin);
- mvwprintw(strwin, 0, 0, "%4d:", limit);
+ MvWPrintw(strwin, 0, 0, "%4d:", limit);
wclrtobot(strwin);
if (txtwin != stdscr) {
* 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 <test.priv.h>
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();
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;
}
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++) {
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);
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);
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();
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();
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);
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();
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);
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");
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);
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);
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);
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);
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();
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);
}
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);
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);
}
#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);
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();
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();
}
* 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 <test.priv.h>
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);
if (!got_number)
show_all(my_label);
- n = 0;
for (;;) {
#if CAN_RESIZE
if (interrupted) {
waiting = FALSE;
if ((c < 127) && isdigit(c)) {
if (!got_number) {
- mvprintw(0, 0, "Count: ");
+ MvPrintw(0, 0, "Count: ");
clrtoeol();
}
addch(UChar(c));
/******************************************************************************/
/*
- * $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 <test.priv.h>
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();
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();
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;
}
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);
}
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);
}
static int
fromwho(void)
{
- mvaddstr(21, 13, FROMWHO);
+ MvAddStr(21, 13, FROMWHO);
return (0);
}
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);
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);
(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);
(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);
(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);
(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);
(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);
(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);
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);
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);