./test/gdc.c
./test/hanoi.c
./test/hashtest.c
+./test/inch_wide.c
+./test/inchs.c
./test/ins_wide.c
./test/inserts.c
./test/keynames.c
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.1079 2007/02/04 00:30:41 tom Exp $
+-- $Id: NEWS,v 1.1084 2007/02/11 01:17:49 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.
+20070210
+ + add test/inchs.c, test_inch_wide.c, to test win_wchnstr().
+ + remove libdl from library list for termlib (report by Miroslav
+ Lichvar).
+ + fix configure.in to allow --without-progs --with-termlib (patch by
+ Miroslav Lichvar).
+ + modify win_wchnstr() to ensure that only a base cell is returned
+ for each multi-column character (prompted by report by Wei Kong
+ regarding change in mvwin_wch() cf: 20041023).
+
20070203
+ modify fix_wchnstr() in form library to strip attributes (and color)
from the cchar_t array (field cells) read from a field's window.
#! /bin/sh
-# From configure.in Revision: 1.393 .
+# From configure.in Revision: 1.395 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20061216.
#
echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
LIB_SUBSETS=
-test "$cf_with_progs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ticlib"
-if test "$with_ticlib" != no ; then
- LIB_SUBSETS="${LIB_SUBSETS} "
-else
- LIB_SUBSETS="${LIB_SUBSETS}+"
+if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
+ LIB_SUBSETS="${LIB_SUBSETS}ticlib"
+ if test "$with_ticlib" != no ; then
+ LIB_SUBSETS="${LIB_SUBSETS} "
+ else
+ LIB_SUBSETS="${LIB_SUBSETS}+"
+ fi
fi
LIB_SUBSETS="${LIB_SUBSETS}termlib"
test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
-echo "$as_me:14860: result: $LIB_SUBSETS" >&5
+echo "$as_me:14862: result: $LIB_SUBSETS" >&5
echo "${ECHO_T}$LIB_SUBSETS" >&6
### Construct the list of include-directories to be generated
fi
### Build up pieces for makefile rules
-echo "$as_me:14898: checking default library suffix" >&5
+echo "$as_me:14900: checking default library suffix" >&5
echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
case $DFT_LWR_MODEL in
shared) DFT_ARG_SUFFIX='' ;;
esac
test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
-echo "$as_me:14909: result: $DFT_ARG_SUFFIX" >&5
+echo "$as_me:14911: result: $DFT_ARG_SUFFIX" >&5
echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
-echo "$as_me:14912: checking default library-dependency suffix" >&5
+echo "$as_me:14914: checking default library-dependency suffix" >&5
echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
case $DFT_LWR_MODEL in
;;
esac
fi
-echo "$as_me:14941: result: $DFT_DEP_SUFFIX" >&5
+echo "$as_me:14943: result: $DFT_DEP_SUFFIX" >&5
echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
-echo "$as_me:14944: checking default object directory" >&5
+echo "$as_me:14946: checking default object directory" >&5
echo $ECHO_N "checking default object directory... $ECHO_C" >&6
case $DFT_LWR_MODEL in
DFT_OBJ_SUBDIR='obj_s' ;;
esac
esac
-echo "$as_me:14960: result: $DFT_OBJ_SUBDIR" >&5
+echo "$as_me:14962: result: $DFT_OBJ_SUBDIR" >&5
echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
# libtool thinks it can make c++ shared libraries (perhaps only g++)
if test "$cf_with_cxx" = yes ; then
-echo "$as_me:14965: checking c++ library-dependency suffix" >&5
+echo "$as_me:14967: checking c++ library-dependency suffix" >&5
echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
if test "$with_libtool" != "no"; then
CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
esac
test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
fi
-echo "$as_me:14991: result: $CXX_LIB_SUFFIX" >&5
+echo "$as_me:14993: result: $CXX_LIB_SUFFIX" >&5
echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
fi
# TICS_LIST and TINFO_LIST are needed to build the libtic.so and libterm.so
TICS_LIST="$SHLIB_LIST"
-TINFO_LIST="$SHLIB_LIST"
+TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl//'`
if test "$with_ticlib" != no ; then
# needed for Ada95
TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
-echo "$as_me:15051: checking where we will install curses.h" >&5
+echo "$as_me:15053: checking where we will install curses.h" >&5
echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
test "$with_overwrite" = no && \
test "x$includedir" = 'x${prefix}/include' && \
includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
-echo "$as_me:15056: result: $includedir" >&5
+echo "$as_me:15058: result: $includedir" >&5
echo "${ECHO_T}$includedir" >&6
### Resolve a conflict between normal and wide-curses by forcing applications
if test "$with_overwrite" != no ; then
if test "$NCURSES_LIBUTF8" = 1 ; then
NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
- { echo "$as_me:15064: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
+ { echo "$as_me:15066: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
fi
fi
### Construct the list of subdirectories for which we'll customize makefiles
### with the appropriate compile-rules.
-echo "$as_me:15080: checking for src modules" >&5
+echo "$as_me:15082: checking for src modules" >&5
echo $ECHO_N "checking for src modules... $ECHO_C" >&6
# dependencies and linker-arguments for test-programs
fi
fi
done
-echo "$as_me:15143: result: $cf_cv_src_modules" >&5
+echo "$as_me:15145: result: $cf_cv_src_modules" >&5
echo "${ECHO_T}$cf_cv_src_modules" >&6
TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:15389: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:15391: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:15565: error: ambiguous option: $1
+ { { echo "$as_me:15567: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:15584: error: unrecognized option: $1
+ -*) { { echo "$as_me:15586: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
- *) { { echo "$as_me:15677: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:15679: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:16049: creating $ac_file" >&5
+ { echo "$as_me:16051: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:16067: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:16069: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16080: error: cannot find input file: $f" >&5
+ { { echo "$as_me:16082: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:16146: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:16148: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:16157: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:16159: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16170: error: cannot find input file: $f" >&5
+ { { echo "$as_me:16172: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:16228: $ac_file is unchanged" >&5
+ { echo "$as_me:16230: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
-dnl $Id: configure.in,v 1.393 2007/02/03 19:26:12 tom Exp $
+dnl $Id: configure.in,v 1.395 2007/02/10 22:47:04 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20020210)
-AC_REVISION($Revision: 1.393 $)
+AC_REVISION($Revision: 1.395 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
AC_MSG_CHECKING(for library subsets)
LIB_SUBSETS=
-test "$cf_with_progs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ticlib"
-if test "$with_ticlib" != no ; then
- LIB_SUBSETS="${LIB_SUBSETS} "
-else
- LIB_SUBSETS="${LIB_SUBSETS}+"
+if test "$cf_with_progs" = yes || test "$with_ticlib" != no; then
+ LIB_SUBSETS="${LIB_SUBSETS}ticlib"
+ if test "$with_ticlib" != no ; then
+ LIB_SUBSETS="${LIB_SUBSETS} "
+ else
+ LIB_SUBSETS="${LIB_SUBSETS}+"
+ fi
fi
LIB_SUBSETS="${LIB_SUBSETS}termlib"
# TICS_LIST and TINFO_LIST are needed to build the libtic.so and libterm.so
TICS_LIST="$SHLIB_LIST"
-TINFO_LIST="$SHLIB_LIST"
+TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl//'`
if test "$with_ticlib" != no ; then
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.576 2007/01/28 17:28:52 tom Exp $
+# $Id: dist.mk,v 1.577 2007/02/10 16:33:08 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 = 6
-NCURSES_PATCH = 20070203
+NCURSES_PATCH = 20070210
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 2002,2004 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2004-2007 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 Dickey 2002,2004 *
+ * Author: Thomas Dickey *
****************************************************************************/
/*
#include <curses.priv.h>
-MODULE_ID("$Id: lib_in_wchnstr.c,v 1.4 2007/02/03 23:10:20 tom Exp $")
+MODULE_ID("$Id: lib_in_wchnstr.c,v 1.7 2007/02/11 01:00:00 tom Exp $")
NCURSES_EXPORT(int)
win_wchnstr(WINDOW *win, cchar_t *wchstr, int n)
T((T_CALLED("win_wchnstr(%p,%p,%d)"), win, wchstr, n));
if (win != 0
&& wchstr != 0) {
+ NCURSES_CH_T *src;
int row, col;
- int j;
+ int j, k, limit;
getyx(win, row, col);
+ limit = getmaxx(win) - col;
+ src = &(win->_line[row].text[col]);
if (n < 0) {
- n = getmaxx(win) + 1 - getcurx(win);
+ n = limit;
+ } else if (n > limit) {
+ n = limit;
}
- for (j = 0; j < n; ++j) {
- wchstr[j] = win->_line[row].text[col + j];
+ for (j = k = 0; j < n; ++j) {
+ if (j == 0 || !WidecExt(src[j]) || isWidecBase(src[j])) {
+ wchstr[k++] = src[j];
+ }
}
+ memset(&(wchstr[k]), 0, sizeof(*wchstr));
T(("result = %s", _nc_viscbuf(wchstr, n)));
} else {
code = ERR;
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: README,v 1.28 2006/11/05 01:10:56 tom Exp $
+-- $Id: README,v 1.29 2007/02/11 01:16:17 tom Exp $
-------------------------------------------------------------------------------
The programs in this directory are designed to test your newest toy :-)
COLORS test: echochar ncurses xmas
COLOR_PAIR test: background blue bs cardfile demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
COLOR_PAIRS test: echochar ncurses newdemo
-COLS test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field firework foldkeys hashtest ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm
+COLS test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus echochar edit_field firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm
ESCDELAY lib: ncurses
-LINES test: cardfile demo_defkey demo_keyok demo_menus edit_field firework hanoi hashtest ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm xmas
+LINES test: cardfile demo_defkey demo_keyok demo_menus echochar edit_field firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo rain tclock testcurs view worm xmas
PAIR_NUMBER test: ncurses
PC lib: ncurses
SP lib: ncurses
attron test: bs echochar filter gdc ncurses
attrset test: bs firework gdc hanoi ncurses rain tclock testaddch testcurs
baudrate lib: ncurses
-beep test: blue bs cardfile chgat demo_forms demo_menus edit_field hanoi ins_wide inserts knight movewindow ncurses tclock testcurs view xmas
+beep test: blue bs cardfile chgat demo_forms demo_menus edit_field hanoi inch_wide inchs ins_wide inserts knight movewindow ncurses tclock testcurs view xmas
bkgd test: background cardfile demo_forms ncurses tclock view
bkgdset test: background ncurses testaddch
bkgrnd test: ncurses
boolnames progs: dump_entry infocmp
border -
border_set -
-box test: cardfile chgat demo_forms demo_menus edit_field ins_wide inserts lrtest ncurses newdemo redraw testcurs
+box test: cardfile chgat demo_forms demo_menus edit_field inch_wide inchs ins_wide inserts lrtest ncurses newdemo redraw testcurs
box_set test: ncurses
can_change_color test: ncurses
-cbreak test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto filter firework foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses newdemo tclock testcurs view worm xmas
+cbreak test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto filter firework foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo tclock testcurs view worm xmas
chgat test: chgat
clear test: blue bs gdc ncurses testcurs xmas
clearok test: bs knight
color_content test: ncurses
color_set test: color_set ncurses
copywin test: ncurses testcurs
-cur_term test: dots echochar lrtest progs: clear tic tput tset
+cur_term test: dots lrtest progs: clear tput tset
curs_set test: echochar firework gdc hanoi lrtest ncurses newdemo rain tclock testcurs worm xmas
curscr test: edit_field knight lrtest ncurses tclock view
curses_version test: ncurses progs: infocmp tic toe tput tset
def_shell_mode lib: ncurses
define_key test: demo_altkeys demo_defkey foldkeys
del_curterm lib: ncurses
-delay_output -
+delay_output test: newdemo
delch -
deleteln -
delscreen -
delwin test: cardfile chgat demo_forms demo_menus edit_field ins_wide inserts movewindow ncurses newdemo redraw testcurs
-derwin test: cardfile chgat demo_forms demo_menus ins_wide inserts movewindow ncurses
+derwin test: cardfile chgat demo_forms demo_menus inch_wide inchs ins_wide inserts movewindow ncurses
doupdate test: cardfile demo_menus edit_field ins_wide inserts knight movewindow ncurses redraw
dupwin test: edit_field
echo test: bs hanoi ncurses testcurs testscanw
echo_wchar test: ncurses
echochar test: echochar ncurses
-endwin test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto echochar filter firework firstlast foldkeys gdc hanoi hashtest ins_wide inserts keynames knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
+endwin test: background blue bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto echochar filter firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
erase test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses tclock testcurs
erasechar lib: ncurses
erasewchar -
getch test: background blue bs chgat color_set demo_altkeys ditto filter firework firstlast foldkeys hanoi hashtest lrtest rain tclock testaddch testcurs view worm xmas
getcurx test: bs chgat demo_altkeys demo_defkey foldkeys movewindow ncurses redraw testcurs
getcury test: bs chgat demo_altkeys demo_defkey edit_field foldkeys movewindow ncurses redraw testcurs
-getmaxx test: chgat movewindow ncurses newdemo redraw testcurs
-getmaxy test: chgat demo_forms movewindow ncurses newdemo redraw testcurs
+getmaxx test: chgat inch_wide inchs movewindow ncurses newdemo redraw testcurs
+getmaxy test: chgat demo_forms inch_wide inchs movewindow ncurses newdemo redraw testcurs
getmouse test: bs knight movewindow ncurses
getn_wstr -
getnstr test: filter ncurses
inchstr -
init_color test: ncurses
init_pair test: background blue bs cardfile chgat color_set demo_forms demo_menus echochar filter firework gdc hanoi ins_wide inserts knight ncurses newdemo rain tclock testaddch testcurs view worm xmas
-initscr test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus echochar firework firstlast gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
+initscr test: background blue bs cardfile chgat color_set demo_defkey demo_forms demo_keyok demo_menus echochar firework firstlast gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses newdemo rain redraw tclock testaddch testcurs testscanw view worm xmas
innstr -
innwstr -
ins_nwstr test: ins_wide
keybound test: demo_altkeys demo_defkey
keyname test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw testcurs view progs: tic
keyok test: demo_keyok foldkeys
-keypad test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field filter firework foldkeys hashtest ins_wide inserts keynames knight lrtest movewindow ncurses redraw tclock testcurs testscanw view
+keypad test: bs cardfile chgat demo_altkeys demo_defkey demo_forms demo_keyok demo_menus edit_field filter firework foldkeys hashtest inch_wide inchs ins_wide inserts keynames knight lrtest movewindow ncurses redraw tclock testcurs testscanw view
killchar lib: ncurses
killwchar -
leaveok test: hanoi
mvvline_set test: ncurses
mvwadd_wch -
mvwadd_wchnstr lib: form
-mvwadd_wchstr -
+mvwadd_wchstr test: inch_wide
mvwaddch test: movewindow newdemo testcurs xmas
mvwaddchnstr -
-mvwaddchstr -
+mvwaddchstr test: inchs
mvwaddnstr test: newdemo testcurs
mvwaddnwstr -
mvwaddstr test: firstlast ins_wide inserts knight ncurses newdemo testcurs xmas
mvwdelch test: ncurses
mvwget_wch -
mvwget_wstr -
-mvwgetch -
+mvwgetch test: inch_wide inchs
mvwgetn_wstr -
mvwgetnstr -
mvwgetstr -
mvwhline test: movewindow
mvwhline_set -
mvwin test: cardfile demo_menus movewindow testcurs xmas
-mvwin_wch -
-mvwin_wchnstr lib: form
-mvwin_wchstr -
-mvwinch test: newdemo testcurs
-mvwinchnstr -
-mvwinchstr -
+mvwin_wch test: inch_wide
+mvwin_wchnstr test: inch_wide
+mvwin_wchstr test: inch_wide
+mvwinch test: inchs newdemo testcurs
+mvwinchnstr test: inchs
+mvwinchstr test: inchs
mvwinnstr test: testcurs
mvwinnwstr -
mvwins_nwstr test: ins_wide
mvwinsstr test: inserts testcurs
mvwinstr -
mvwinwstr -
-mvwprintw test: chgat ncurses testcurs
+mvwprintw test: chgat inch_wide inchs ncurses testcurs
mvwscanw test: testcurs
mvwvline test: ins_wide inserts movewindow
mvwvline_set -
-napms test: dots echochar firework gdc hanoi lrtest ncurses newdemo railroad rain tclock testcurs view worm xmas progs: tset
+napms test: dots echochar firework gdc hanoi lrtest ncurses railroad rain tclock testcurs view worm xmas progs: tset
newpad test: edit_field ncurses testcurs
newscr lib: ncurses
newterm test: demo_altkeys ditto filter foldkeys gdc keynames
-newwin test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus edit_field firstlast ins_wide inserts knight movewindow ncurses newdemo redraw testcurs xmas
+newwin test: cardfile chgat demo_defkey demo_forms demo_keyok demo_menus edit_field firstlast inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw testcurs xmas
nl test: demo_forms ncurses rain testcurs
nocbreak test: testcurs
nodelay test: firework gdc lrtest ncurses newdemo rain tclock view xmas
-noecho test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto firework firstlast foldkeys gdc hanoi hashtest ins_wide inserts knight lrtest movewindow ncurses rain redraw tclock testcurs view worm xmas
+noecho test: background bs cardfile chgat color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus ditto firework firstlast foldkeys gdc hanoi hashtest inch_wide inchs ins_wide inserts knight lrtest movewindow ncurses rain redraw tclock testcurs view worm xmas
nofilter -
nonl test: bs demo_forms hashtest movewindow ncurses view worm xmas
noqiflush -
vw_scanw -
vwprintw test: movewindow
vwscanw lib: ncurses
-wadd_wch lib: ncurses
+wadd_wch test: inch_wide
wadd_wchnstr lib: form
wadd_wchstr -
-waddch test: demo_forms firstlast knight ncurses
+waddch test: demo_forms firstlast inch_wide inchs knight ncurses
waddchnstr lib: ncurses
waddchstr -
waddnstr lib: menu
wborder_set lib: ncurses
wchgat test: chgat view
wclear test: ncurses testcurs
-wclrtobot test: firstlast ncurses testcurs
-wclrtoeol test: chgat demo_defkey demo_keyok firstlast ins_wide inserts knight ncurses testcurs
+wclrtobot test: firstlast inch_wide inchs ncurses testcurs
+wclrtoeol test: chgat demo_defkey demo_keyok firstlast inch_wide inchs ins_wide inserts knight ncurses testcurs
wcolor_set lib: ncurses
wcursyncup lib: form
wdelch test: ncurses testcurs
wgetstr -
whline test: testcurs
whline_set lib: ncurses
-win_wch lib: form
-win_wchnstr lib: form
-win_wchstr -
-winch test: knight testcurs
-winchnstr lib: ncurses
-winchstr -
+win_wch test: inch_wide
+win_wchnstr test: inch_wide
+win_wchstr test: inch_wide
+winch test: inchs knight testcurs
+winchnstr test: inchs
+winchstr test: inchs
winnstr test: demo_altkeys demo_defkey foldkeys
winnwstr lib: ncurses
wins_nwstr test: ins_wide
winstr -
winwstr lib: ncurses
wmouse_trafo lib: menu
-wmove test: chgat demo_altkeys demo_defkey demo_keyok demo_menus firstlast foldkeys ins_wide inserts knight movewindow ncurses newdemo redraw testcurs
-wnoutrefresh test: demo_menus edit_field ins_wide inserts knight movewindow ncurses redraw
-wprintw test: chgat demo_defkey demo_forms demo_keyok demo_menus edit_field ins_wide inserts knight movewindow ncurses testcurs
+wmove test: chgat demo_altkeys demo_defkey demo_keyok demo_menus firstlast foldkeys inch_wide inchs ins_wide inserts knight movewindow ncurses newdemo redraw testcurs
+wnoutrefresh test: demo_menus edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses redraw
+wprintw test: chgat demo_defkey demo_forms demo_keyok demo_menus edit_field inch_wide inchs ins_wide inserts knight movewindow ncurses testcurs
wredrawln test: redraw
wrefresh test: chgat demo_forms demo_keyok demo_menus edit_field firstlast knight lrtest movewindow ncurses newdemo redraw tclock testcurs view xmas
wresize test: cardfile ncurses
--- /dev/null
+/****************************************************************************
+ * Copyright (c) 2007 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+/*
+ * $Id: inch_wide.c,v 1.3 2007/02/11 00:32:58 tom Exp $
+ */
+/*
+ int in_wch(cchar_t *wcval);
+ int mvin_wch(int y, int x, cchar_t *wcval);
+ int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval);
+ int win_wch(WINDOW *win, cchar_t *wcval);
+ int in_wchstr(cchar_t *wchstr);
+ int in_wchnstr(cchar_t *wchstr, int n);
+ int win_wchstr(WINDOW *win, cchar_t *wchstr);
+ int win_wchnstr(WINDOW *win, cchar_t *wchstr, int n);
+ int mvin_wchstr(int y, int x, cchar_t *wchstr);
+ int mvin_wchnstr(int y, int x, cchar_t *wchstr, int n);
+ int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wchstr);
+ int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wchstr, int n);
+*/
+
+#include <test.priv.h>
+
+#if USE_WIDEC_SUPPORT
+
+#define MAX_COLS 1024
+
+static bool
+Quit(int ch)
+{
+ return (ch == ERR || ch == QUIT || ch == ESCAPE);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ WINDOW *txtbox;
+ WINDOW *txtwin;
+ WINDOW *chrbox;
+ WINDOW *chrwin;
+ WINDOW *strwin;
+ FILE *fp;
+ int j;
+ int txt_x = 0, txt_y = 0;
+ int limit;
+ cchar_t ch;
+ cchar_t text[MAX_COLS];
+
+ setlocale(LC_ALL, "");
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s file\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ initscr();
+
+ chrbox = newwin(7, COLS, 0, 0);
+ box(chrbox, 0, 0);
+ wnoutrefresh(chrbox);
+
+ chrwin = derwin(chrbox, 1, COLS - 2, 1, 1);
+ strwin = derwin(chrbox, 4, COLS - 2, 2, 1);
+
+ txtbox = newwin(LINES - 7, COLS, 7, 0);
+ box(txtbox, 0, 0);
+ wnoutrefresh(txtbox);
+
+ txtwin = derwin(txtbox,
+ getmaxy(txtbox) - 2,
+ getmaxx(txtbox) - 2,
+ 1, 1);
+
+ keypad(txtwin, TRUE); /* enable keyboard mapping */
+ (void) cbreak(); /* take input chars one at a time, no wait for \n */
+ (void) noecho(); /* don't echo input */
+
+ if ((fp = fopen(argv[1], "r")) != 0) {
+ while ((j = fgetc(fp)) != EOF) {
+ if (waddch(txtwin, j) != OK) {
+ break;
+ }
+ }
+ } else {
+ wprintw(txtwin, "Cannot open:\n%s", argv[1]);
+ }
+ fclose(fp);
+ while (!Quit(j = mvwgetch(txtwin, txt_y, txt_x))) {
+ switch (j) {
+ case KEY_DOWN:
+ case 'j':
+ if (txt_y < getmaxy(txtwin) - 1)
+ txt_y++;
+ else
+ beep();
+ break;
+ case KEY_UP:
+ case 'k':
+ if (txt_y > 0)
+ txt_y--;
+ else
+ beep();
+ break;
+ case KEY_LEFT:
+ case 'h':
+ if (txt_x > 0)
+ txt_x--;
+ else
+ beep();
+ break;
+ case KEY_RIGHT:
+ case 'l':
+ if (txt_x < getmaxx(txtwin) - 1)
+ txt_x++;
+ else
+ beep();
+ break;
+ }
+
+ wmove(txtwin, txt_y, txt_x);
+
+ mvwprintw(chrwin, 0, 0, "char:");
+ wclrtoeol(chrwin);
+ if (win_wch(txtwin, &ch) != ERR) {
+ if (wadd_wch(chrwin, &ch) != ERR) {
+ for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
+ if (mvwin_wch(txtwin, txt_y, j, &ch) != ERR) {
+ if (wadd_wch(chrwin, &ch) == ERR) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ wnoutrefresh(chrwin);
+
+ mvwprintw(strwin, 0, 0, "text:");
+ wclrtobot(strwin);
+
+ limit = getmaxx(strwin) - 5;
+
+ wmove(txtwin, txt_y, txt_x);
+ if (win_wchstr(txtwin, text) != ERR) {
+ 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);
+ }
+
+ if (mvwin_wchstr(txtwin, txt_y, txt_x, text) != ERR) {
+ mvwadd_wchstr(strwin, 2, 5, text);
+ }
+
+ if (mvwin_wchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) {
+ mvwadd_wchstr(strwin, 3, 5, text);
+ }
+
+ wnoutrefresh(strwin);
+
+ /* FIXME: want stdscr tests also, but must be separate program */
+ }
+ endwin();
+ return EXIT_SUCCESS;
+}
+#else
+int
+main(void)
+{
+ printf("This program requires the wide-ncurses library\n");
+ ExitProgram(EXIT_FAILURE);
+}
+#endif
--- /dev/null
+/****************************************************************************
+ * Copyright (c) 2007 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+/*
+ * $Id: inchs.c,v 1.4 2007/02/11 00:27:12 tom Exp $
+ */
+/*
+ chtype inch(void);
+ chtype winch(WINDOW *win);
+ chtype mvinch(int y, int x);
+ chtype mvwinch(WINDOW *win, int y, int x);
+ int inchstr(chtype *chstr);
+ int inchnstr(chtype *chstr, int n);
+ int winchstr(WINDOW *win, chtype *chstr);
+ int winchnstr(WINDOW *win, chtype *chstr, int n);
+ int mvinchstr(int y, int x, chtype *chstr);
+ int mvinchnstr(int y, int x, chtype *chstr, int n);
+ int mvwinchstr(WINDOW *win, int y, int x, chtype *chstr);
+ int mvwinchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
+*/
+
+#include <test.priv.h>
+
+#define MAX_COLS 1024
+
+static bool
+Quit(int ch)
+{
+ return (ch == ERR || ch == QUIT || ch == ESCAPE);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ WINDOW *txtbox;
+ WINDOW *txtwin;
+ WINDOW *chrbox;
+ WINDOW *chrwin;
+ WINDOW *strwin;
+ FILE *fp;
+ int ch, j;
+ int txt_x = 0, txt_y = 0;
+ int limit;
+ chtype text[MAX_COLS];
+
+ setlocale(LC_ALL, "");
+
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s file\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ initscr();
+
+ chrbox = newwin(7, COLS, 0, 0);
+ box(chrbox, 0, 0);
+ wnoutrefresh(chrbox);
+
+ chrwin = derwin(chrbox, 1, COLS - 2, 1, 1);
+ strwin = derwin(chrbox, 4, COLS - 2, 2, 1);
+
+ txtbox = newwin(LINES - 7, COLS, 7, 0);
+ box(txtbox, 0, 0);
+ wnoutrefresh(txtbox);
+
+ txtwin = derwin(txtbox,
+ getmaxy(txtbox) - 2,
+ getmaxx(txtbox) - 2,
+ 1, 1);
+
+ keypad(txtwin, TRUE); /* enable keyboard mapping */
+ (void) cbreak(); /* take input chars one at a time, no wait for \n */
+ (void) noecho(); /* don't echo input */
+
+ if ((fp = fopen(argv[1], "r")) != 0) {
+ while ((ch = fgetc(fp)) != EOF) {
+ if (waddch(txtwin, ch) != OK) {
+ break;
+ }
+ }
+ } else {
+ wprintw(txtwin, "Cannot open:\n%s", argv[1]);
+ }
+ fclose(fp);
+ while (!Quit(ch = mvwgetch(txtwin, txt_y, txt_x))) {
+ switch (ch) {
+ case KEY_DOWN:
+ case 'j':
+ if (txt_y < getmaxy(txtwin) - 1)
+ txt_y++;
+ else
+ beep();
+ break;
+ case KEY_UP:
+ case 'k':
+ if (txt_y > 0)
+ txt_y--;
+ else
+ beep();
+ break;
+ case KEY_LEFT:
+ case 'h':
+ if (txt_x > 0)
+ txt_x--;
+ else
+ beep();
+ break;
+ case KEY_RIGHT:
+ case 'l':
+ if (txt_x < getmaxx(txtwin) - 1)
+ txt_x++;
+ else
+ beep();
+ break;
+ }
+
+ wmove(txtwin, txt_y, txt_x);
+
+ mvwprintw(chrwin, 0, 0, "char:");
+ wclrtoeol(chrwin);
+ if ((ch = winch(txtwin)) != ERR) {
+ if (waddch(chrwin, (chtype) ch) != ERR) {
+ for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
+ if ((ch = mvwinch(txtwin, txt_y, j)) != ERR) {
+ if (waddch(chrwin, (chtype) ch) == ERR) {
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ }
+ wnoutrefresh(chrwin);
+
+ mvwprintw(strwin, 0, 0, "text:");
+ wclrtobot(strwin);
+
+ limit = getmaxx(strwin) - 5;
+
+ wmove(txtwin, txt_y, txt_x);
+ if (winchstr(txtwin, text) != ERR) {
+ mvwaddchstr(strwin, 0, 5, text);
+ }
+
+ wmove(txtwin, txt_y, txt_x);
+ if (winchnstr(txtwin, text, limit) != ERR) {
+ mvwaddchstr(strwin, 1, 5, text);
+ }
+
+ if (mvwinchstr(txtwin, txt_y, txt_x, text) != ERR) {
+ mvwaddchstr(strwin, 2, 5, text);
+ }
+
+ if (mvwinchnstr(txtwin, txt_y, txt_x, text, limit) != ERR) {
+ mvwaddchstr(strwin, 3, 5, text);
+ }
+
+ wnoutrefresh(strwin);
+
+ /* FIXME: want stdscr tests also, but must be separate program */
+ }
+ endwin();
+ return EXIT_SUCCESS;
+}
-# $Id: modules,v 1.29 2006/12/24 00:53:52 tom Exp $
+# $Id: modules,v 1.30 2007/02/10 22:28:07 tom Exp $
##############################################################################
-# Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
color_set progs $(srcdir) $(HEADER_DEPS)
demo_altkeys progs $(srcdir) $(HEADER_DEPS)
demo_defkey progs $(srcdir) $(HEADER_DEPS)
-demo_keyok progs $(srcdir) $(HEADER_DEPS)
demo_forms progs $(srcdir) $(HEADER_DEPS) ../include/form.h $(srcdir)/edit_field.h
+demo_keyok progs $(srcdir) $(HEADER_DEPS)
demo_menus progs $(srcdir) $(HEADER_DEPS) ../include/menu.h
demo_panels progs $(srcdir) $(HEADER_DEPS) ../include/panel.h
demo_termcap progs $(srcdir) $(HEADER_DEPS)
gdc progs $(srcdir) $(HEADER_DEPS)
hanoi progs $(srcdir) $(HEADER_DEPS)
hashtest progs $(srcdir) $(HEADER_DEPS)
+inch_wide progs $(srcdir) $(HEADER_DEPS)
+inchs progs $(srcdir) $(HEADER_DEPS)
ins_wide progs $(srcdir) $(HEADER_DEPS)
inserts progs $(srcdir) $(HEADER_DEPS)
keynames progs $(srcdir) $(HEADER_DEPS)
knight progs $(srcdir) $(HEADER_DEPS)
lrtest progs $(srcdir) $(HEADER_DEPS)
-ncurses progs $(srcdir) $(HEADER_DEPS) ../include/panel.h ../include/menu.h ../include/form.h
movewindow progs $(srcdir) $(HEADER_DEPS)
+ncurses progs $(srcdir) $(HEADER_DEPS) ../include/panel.h ../include/menu.h ../include/form.h
newdemo progs $(srcdir) $(HEADER_DEPS)
railroad progs $(srcdir) $(HEADER_DEPS)
rain progs $(srcdir) $(HEADER_DEPS)
-# $Id: programs,v 1.6 2006/12/24 16:23:58 tom Exp $
+# $Id: programs,v 1.7 2007/02/10 22:27:58 tom Exp $
##############################################################################
-# Copyright (c) 2006 Free Software Foundation, Inc. #
+# Copyright (c) 2006,2007 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
gdc $(LDFLAGS_CURSES) $(LOCAL_LIBS) gdc
hanoi $(LDFLAGS_CURSES) $(LOCAL_LIBS) hanoi
hashtest $(LDFLAGS_CURSES) $(LOCAL_LIBS) hashtest
+inch_wide $(LDFLAGS_CURSES) $(LOCAL_LIBS) inch_wide
+inchs $(LDFLAGS_CURSES) $(LOCAL_LIBS) inchs
ins_wide $(LDFLAGS_CURSES) $(LOCAL_LIBS) ins_wide
inserts $(LDFLAGS_CURSES) $(LOCAL_LIBS) inserts
keynames $(LDFLAGS_CURSES) $(LOCAL_LIBS) keynames