Imported Upstream version 5.0.20160131

parent 4005bb57
-- $Id: CHANGES,v 1.239 2015/09/28 23:41:11 tom Exp $
-- $Id: CHANGES,v 1.247 2016/02/01 00:49:04 tom Exp $
-------------------------------------------------------------------------------
Cdk Version Change List
Copyright Mike Glover, 1995, 1996, 1997, 1998, 1999
Modifications copyright Thomas E. Dickey 1999-2014, 2015
Modifications copyright Thomas E. Dickey 1999-2015, 2016
-------------------------------------------------------------------------------
This file outlines all of the changes/additions from one release to another.
Changes through 4.9.8 (December 1998) were recorded by Mike Glover.
Thereafter, changes have been recorded by Thomas E. Dickey.
2016/01/31
+ fix a few of the lintian errors in package/debian
+ fix some too-wide tables in manpages, which caused Debian lintian
errors.
+ take lower-limit's formatted length into account in slider, etc.,
(patch by Guido Meusch).
+ make similar repainting-fixes for radio.c and marquee.c
+ fix repainting of Scroll widget when it has no box-outline
(patch by Manuel Schmitz).
+ add highlight and callbackData members to CDKBUTTON, as well as
macros for setting/getting the highlight value. Use the highlight to
override the default A_REVERSE used in CDK button (patch by Aarian P.
Aleahmad).
+ fix two bugs in template.c (patch by Aarian P. Aleahmad):
+ in cleanCDKTemplate, fill all of the info string with nulls
+ in setCDKTemplateValue, call cleanCDKTemplate whether or not
the pointer for newValue passed by the caller was a null.
+ updated configure macros:
+ CF_LIB_PREFIX, CF_WITH_LIBTOOL, and CF_XOPEN_SOURCE, build-fixes
for OS/2
+ CF_XOPEN_CURSES, improve check, making it define NCURSES_WIDECHAR
if we happen to be building on a platform (such as OSX) where we do
not define _XOPEN_SOURCE or _XOPEN_SOURCE_EXTENDED
+ CF_WITH_VERSIONED_SYMS, avoid ncurses build error on ppc64
architecture the nm tool is reporting _is_missing in Data section
for ppc64 (by comparison ppc64le is reporting it in Text section)
+ update config.guess, config.sub
2015/09/28
+ build ".deb" test-package with ncurses6, using versioned symbols.
+ updated configure macros:
......
Modifications copyright Thomas Dickey 1999-2014,2015
Modifications copyright Thomas Dickey 1999-2015,2016
The software and documentation are still under the same licensing are the
original Cdk, but noting that substantial work and enhancements have been made,
......
-- $Id: README,v 1.9 2015/01/04 01:48:00 tom Exp $
-- $Id: README,v 1.10 2016/01/31 19:55:06 tom Exp $
-------------------------------------------------------------------------------
Copyright Thomas Dickey 1999-2014,2015
Copyright Thomas Dickey 1999-2015,2016
This is a modified/enhanced version of Cdk. The original README contents are
given below.
......
6:0:4 5.0 20150928
6:0:4 5.0 20160131
dnl $Id: aclocal.m4,v 1.95 2015/09/28 21:50:17 tom Exp $
dnl $Id: aclocal.m4,v 1.96 2016/01/31 19:51:40 tom Exp $
dnl macros used for CDK configure script
dnl ---------------------------------------------------------------------------
dnl Copyright 1999-2014,2015 Thomas E. Dickey
dnl Copyright 1999-2015,2016 Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
......@@ -1784,7 +1784,7 @@ fi
test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_LIB_PREFIX version: 11 updated: 2015/04/18 08:56:57
dnl CF_LIB_PREFIX version: 12 updated: 2015/10/17 19:03:33
dnl -------------
dnl Compute the library-prefix for the given host system
dnl $1 = variable to set
......@@ -1792,7 +1792,11 @@ define([CF_LIB_PREFIX],
[
case $cf_cv_system_name in
(OS/2*|os2*)
LIB_PREFIX=''
if test "$DFT_LWR_MODEL" = libtool; then
LIB_PREFIX='lib'
else
LIB_PREFIX=''
fi
;;
(*) LIB_PREFIX='lib'
;;
......@@ -3664,7 +3668,7 @@ then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_LIBTOOL version: 32 updated: 2015/04/17 21:13:04
dnl CF_WITH_LIBTOOL version: 33 updated: 2015/10/17 19:03:33
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
......@@ -3762,7 +3766,7 @@ ifdef([AC_PROG_LIBTOOL],[
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in
(cygwin*|msys*|mingw32*|uwin*|aix[[4-7]])
(cygwin*|msys*|mingw32*|os2*|uwin*|aix[[4-7]])
LT_UNDEF=-no-undefined
;;
esac
......@@ -4028,7 +4032,7 @@ CF_NO_LEAKS_OPTION(valgrind,
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_WITH_VERSIONED_SYMS version: 5 updated: 2015/04/17 21:13:04
dnl CF_WITH_VERSIONED_SYMS version: 7 updated: 2015/10/24 20:50:26
dnl ----------------------
dnl Use this when building shared library with ELF, to markup symbols with the
dnl version identifier from the given input file. Generally that identifier is
......@@ -4142,8 +4146,8 @@ EOF
# compile source, make library
if make -f conftest.mk 2>&AC_FD_CC >/dev/null
then
# test for missing symbol
cf_missing=`nm -P conftest.so 2>&AC_FD_CC |fgrep _ismissing | egrep '[[ ]]T[[ ]]'`
# test for missing symbol in either Data or Text section
cf_missing=`nm -P conftest.so 2>&AC_FD_CC |fgrep _ismissing | egrep '[[ ]][[DT]][[ ]]'`
test -n "$cf_missing" && WILDCARD_SYMS=yes
fi
AC_MSG_RESULT($WILDCARD_SYMS)
......@@ -4178,7 +4182,7 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_CURSES version: 11 updated: 2011/01/18 18:15:30
dnl CF_XOPEN_CURSES version: 13 updated: 2015/12/12 20:59:52
dnl ---------------
dnl Test if we should define X/Open source for curses, needed on Digital Unix
dnl 4.x, to see the extended functions, but breaks on IRIX 6.x.
......@@ -4188,7 +4192,8 @@ dnl as getbegy(). The latter is better design, but the former is standard.
AC_DEFUN([CF_XOPEN_CURSES],
[
AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
AC_CACHE_CHECK(if we must define _XOPEN_SOURCE_EXTENDED,cf_cv_need_xopen_extension,[
AC_CACHE_CHECK(definition to turn on extended curses functions,cf_cv_need_xopen_extension,[
cf_cv_need_xopen_extension=unknown
AC_TRY_LINK([
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>],[
......@@ -4197,14 +4202,6 @@ AC_TRY_LINK([
make an error
#endif
#endif
long x = winnstr(stdscr, "", 0);
int x1, y1;
getbegyx(stdscr, y1, x1)],
[cf_cv_need_xopen_extension=no],
[AC_TRY_LINK([
#define _XOPEN_SOURCE_EXTENDED
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>],[
#ifdef NCURSES_VERSION
cchar_t check;
int check2 = curs_set((int)sizeof(check));
......@@ -4212,12 +4209,35 @@ AC_TRY_LINK([
long x = winnstr(stdscr, "", 0);
int x1, y1;
getbegyx(stdscr, y1, x1)],
[cf_cv_need_xopen_extension=yes],
[cf_cv_need_xopen_extension=unknown])])])
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
[cf_cv_need_xopen_extension=none],
[
for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
do
AC_TRY_LINK([
#define $cf_try_xopen_extension 1
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>],[
#ifdef NCURSES_VERSION
cchar_t check;
int check2 = curs_set((int)sizeof(check));
#endif
long x = winnstr(stdscr, "", 0);
int x1, y1;
getbegyx(stdscr, y1, x1)],
[cf_cv_need_xopen_extension=$cf_try_xopen_extension; break])
done
])
])
case $cf_cv_need_xopen_extension in
(*_*)
CPPFLAGS="$CPPFLAGS -D$cf_cv_need_xopen_extension"
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_XOPEN_SOURCE version: 49 updated: 2015/04/12 15:39:00
dnl CF_XOPEN_SOURCE version: 50 updated: 2015/10/17 19:03:33
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
......@@ -4287,6 +4307,9 @@ case $host_os in
(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
(os2*)
cf_XOPEN_SOURCE=
;;
(osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE"
;;
......
......@@ -3,9 +3,9 @@
#include <limits.h>
/*
* $Author: tom $
* $Date: 2013/06/16 13:20:52 $
* $Revision: 1.37 $
* $Author: Aarian.P.Aleahmad $
* $Date: 2016/01/31 20:32:25 $
* $Revision: 1.38 $
*/
DeclareCDKObjects (BUTTON, Button, setCdk, Int);
......@@ -64,10 +64,12 @@ CDKBUTTON *newCDKButton (CDKSCREEN *cdkscreen,
button->boxWidth = boxWidth;
button->boxHeight = boxHeight;
button->callback = callback;
button->callbackData = NULL;
ObjOf (button)->inputWindow = button->win;
ObjOf (button)->acceptsFocus = TRUE;
initExitType (button);
button->shadow = shadow;
button->highlight = A_REVERSE;
/* Is the window NULL? */
if (button->win == (WINDOW *)NULL)
......@@ -217,7 +219,7 @@ static void drawCDKButtonText (CDKBUTTON *button)
if (HasFocusObj (button))
{
c = A_REVERSE | CharOf (c);
c = button->highlight | CharOf (c);
}
(void)mvwaddch (button->win, BorderOf (button), i + BorderOf (button), c);
......
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-03-04'
timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -27,7 +27,7 @@ timestamp='2015-03-04'
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
......@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -221,7 +221,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
......@@ -249,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:Sortix:*:*)
echo ${UNAME_MACHINE}-unknown-sortix
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
......@@ -962,6 +965,9 @@ EOF
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
k1om:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
......@@ -1038,7 +1044,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
......@@ -1117,7 +1123,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
......@@ -1387,6 +1393,9 @@ EOF
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
cat >&2 <<EOF
......@@ -1396,9 +1405,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
......
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2016 Free Software Foundation, Inc.
timestamp='2015-03-08'
timestamp='2016-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -33,7 +33,7 @@ timestamp='2015-03-08'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
......@@ -53,8 +53,7 @@ timestamp='2015-03-08'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
......@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -255,6 +254,7 @@ case $basic_machine in
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
......@@ -305,7 +305,7 @@ case $basic_machine in
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
......@@ -376,6 +376,7 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
......@@ -428,12 +429,13 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
......@@ -518,7 +520,7 @@ case $basic_machine in
basic_machine=i386-pc
os=-aros
;;
asmjs)
asmjs)
basic_machine=asmjs-unknown
;;
aux)
......@@ -1376,7 +1378,7 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
......@@ -1396,7 +1398,8 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
......
/* $Id: raiseCDKObject_ex.c,v 1.10 2012/03/21 23:12:40 tom Exp $ */
/* $Id: raiseCDKObject_ex.c,v 1.11 2016/01/31 21:18:22 tom Exp $ */
#include <cdk_test.h>
......@@ -6,7 +6,7 @@
char *XCursesProgramName = "raiseCDKObject_ex";
#endif
#define MY_LABEL(p) ObjOf(p)->screenIndex | 0x30 | A_UNDERLINE | A_BOLD
#define MY_LABEL(p) ((chtype)ObjOf(p)->screenIndex | 0x30 | A_UNDERLINE | A_BOLD)
int main (int argc, char **argv)
{
......@@ -40,7 +40,7 @@ int main (int argc, char **argv)
mesg1[7] = "label1 label1 label1 label1 label1 label1 label1";
mesg1[8] = "label1 label1 label1 label1 label1 label1 label1";
mesg1[9] = "label1 label1 label1 label1 label1 label1 label1";
label1 = newCDKLabel (cdkscreen, 10, 4, (CDK_CSTRING2) mesg1, 10, TRUE, FALSE);
label1 = newCDKLabel (cdkscreen, 10, 4, (CDK_CSTRING2)mesg1, 10, TRUE, FALSE);
setCDKLabelULChar (label1, '1' | A_BOLD);
mesg2[0] = "label2 label2 label2 label2 label2 label2 label2";
......@@ -53,7 +53,7 @@ int main (int argc, char **argv)
mesg2[7] = "label2 label2 label2 label2 label2 label2 label2";
mesg2[8] = "label2 label2 label2 label2 label2 label2 label2";
mesg2[9] = "label2 label2 label2 label2 label2 label2 label2";
label2 = newCDKLabel (cdkscreen, 8, 8, (CDK_CSTRING2) mesg2, 10, TRUE, FALSE);
label2 = newCDKLabel (cdkscreen, 8, 8, (CDK_CSTRING2)mesg2, 10, TRUE, FALSE);
setCDKLabelULChar (label2, '2' | A_BOLD);
mesg3[0] = "label3 label3 label3 label3 label3 label3 label3";
......@@ -66,7 +66,7 @@ int main (int argc, char **argv)
mesg3[7] = "label3 label3 label3 label3 label3 label3 label3";
mesg3[8] = "label3 label3 label3 label3 label3 label3 label3";
mesg3[9] = "label3 label3 label3 label3 label3 label3 label3";
label3 = newCDKLabel (cdkscreen, 6, 12, (CDK_CSTRING2) mesg3, 10, TRUE, FALSE);
label3 = newCDKLabel (cdkscreen, 6, 12, (CDK_CSTRING2)mesg3, 10, TRUE, FALSE);
setCDKLabelULChar (label3, '3' | A_BOLD);
mesg4[0] = "label4 label4 label4 label4 label4 label4 label4";
......@@ -79,14 +79,14 @@ int main (int argc, char **argv)
mesg4[7] = "label4 label4 label4 label4 label4 label4 label4";
mesg4[8] = "label4 label4 label4 label4 label4 label4 label4";
mesg4[9] = "label4 label4 label4 label4 label4 label4 label4";
label4 = newCDKLabel (cdkscreen, 4, 16, (CDK_CSTRING2) mesg4, 10, TRUE, FALSE);
label4 = newCDKLabel (cdkscreen, 4, 16, (CDK_CSTRING2)mesg4, 10, TRUE, FALSE);
setCDKLabelULChar (label4, '4' | A_BOLD);
mesg[0] = "</B>#<!B> - raise </U>label#<!U>, </B>r<!B> - </U>redraw<!U>, </B>q<!B> - </U>quit<!U>";
instruct = newCDKLabel (cdkscreen,
CDKparamValue (&params, 'X', CENTER),
CDKparamValue (&params, 'Y', BOTTOM),
(CDK_CSTRING2) mesg, 1,
(CDK_CSTRING2)mesg, 1,
CDKparamValue (&params, 'N', TRUE),
CDKparamValue (&params, 'S', FALSE));
setCDKLabelULChar (instruct, ' ' | A_NORMAL);
......
......@@ -2,8 +2,8 @@
/*
* $Author: tom $
* $Date: 2013/06/16 13:19:15 $
* $Revision: 1.25 $
* $Date: 2016/01/31 22:17:10 $
* $Revision: 1.27 $
*/
/*
......@@ -18,25 +18,25 @@ DeclareCDKObjects (<UPPER>, <MIXED>, setCdk, <DTYPE>);
* This function creates a widget.
*/
CDK<UPPER> *newCDK<MIXED> (CDKSCREEN *cdkscreen,
int xplace,
int yplace,
const char *title,
const char *label,
chtype filler,
int fieldWidth,
<CTYPE> start,
<CTYPE> low,
<CTYPE> high,
<CTYPE> inc,
<CTYPE> fastInc,
int xplace,
int yplace,
const char *title,
const char *label,
chtype filler,
int fieldWidth,
<CTYPE> start,
<CTYPE> low,
<CTYPE> high,
<CTYPE> inc,
<CTYPE> fastInc,
#if <FLOAT>
int digits,
int digits,
#endif <FLOAT>
boolean Box,
boolean shadow)
boolean Box,
boolean shadow)
{
/* *INDENT-EQLS* */
CDK<UPPER> *widget = 0;
CDK<UPPER> *widget = 0;
int parentWidth = getmaxx (cdkscreen->window);
int parentHeight = getmaxy (cdkscreen->window);
int boxHeight;
......@@ -73,7 +73,8 @@ CDK<UPPER> *newCDK<MIXED> (CDKSCREEN *cdkscreen,
#if <FLOAT>
widget->digits = digits;
#endif <FLOAT>
highValueLen = formattedSize (widget, high);
highValueLen = MAXIMUM (formattedSize (widget, low),
formattedSize (widget, high));
/*
* If the fieldWidth is a negative value, the fieldWidth will
......@@ -190,7 +191,7 @@ CDK<UPPER> *newCDK<MIXED> (CDKSCREEN *cdkscreen,
for (x = 0; x < (int)SIZEOF (bindings); ++x)
bindCDKObject (v<UPPER>,
widget,
(chtype) bindings[x].from,
(chtype)bindings[x].from,
getcCDKBind,
(void *)(long)bindings[x].to);
......@@ -216,10 +217,10 @@ CDK<UPPER> *newCDK<MIXED> (CDKSCREEN *cdkscreen,
for (;;)
{
input = (chtype) getchCDKObject (ObjOf (widget), &functionKey);
input = (chtype)getchCDKObject (ObjOf (widget), &functionKey);
/* Inject the character into the widget. */
ret = (<CTYPE>) injectCDK<MIXED> (widget, input);
ret = (<CTYPE>)injectCDK<MIXED> (widget, input);
if (widget->exitType != vEARLY_EXIT)
{
return ret;
......@@ -234,7 +235,7 @@ CDK<UPPER> *newCDK<MIXED> (CDKSCREEN *cdkscreen,
/* Inject each character one at a time. */
for (x = 0; x < length; x++)
{
ret = (<CTYPE>) injectCDK<MIXED> (widget, actions[x]);
ret = (<CTYPE>)injectCDK<MIXED> (widget, actions[x]);
if (widget->exitType != vEARLY_EXIT)
{
return ret;
......@@ -381,7 +382,7 @@ static bool performEdit (CDK<UPPER> *widget, chtype input)
strcpy (temp + need, " ");
if (isChar (input)) /* replace the char at the cursor */
{
temp[col] = (char) (input);
temp[col] = (char)(input);
}
else if (input == KEY_BACKSPACE) /* delete the char before the cursor */
{
......@@ -401,7 +402,7 @@ static bool performEdit (CDK<UPPER> *widget, chtype input)
&& value >= widget->low
&& value <= widget->high)
{
setCDK<MIXED>Value (widget, (<CTYPE>) value);
setCDK<MIXED>Value (widget, (<CTYPE>)value);
result = TRUE;
}
free (data);
......@@ -652,8 +653,8 @@ static void drawCDK<MIXED>Field (CDK<UPPER> *widget)
{
int fillerCharacters, x;
char temp[256];
double step = ((double)widget->fieldWidth
/ (double)(widget->high - widget->low));
double step = ((double)widget->fieldWidth /
(double)(widget->high - widget->low));
/* Determine how many filler characters need to be drawn. */
fillerCharacters = (int)((widget->current - widget->low) * step);
......
/*
* $Id: button.h,v 1.11 2012/03/21 21:15:30 tom Exp $
* $Id: button.h,v 1.13 2016/01/31 21:08:37 tom Exp $
*/
#ifndef CDKINCLUDES
......@@ -18,7 +18,7 @@
#endif
/*
* Changes 2002-2004,2012 copyright Thomas E. Dickey
* Changes 2002-2012,2016 copyright Thomas E. Dickey
*
* Copyright 1999, Grant Edwards
* All rights reserved.
......@@ -55,6 +55,10 @@
/*
* Declare any definitions you need to make.
*/
typedef struct SButton CDKBUTTON;
typedef void (*tButtonCallback)(struct SButton *button);
/*
* Declare the CDK label structure.
......@@ -65,7 +69,7 @@ struct SButton {
WINDOW * win;
WINDOW * shadowWin;
chtype * info;
void (*callback)(struct SButton *button);
tButtonCallback callback;
int infoLen;
int infoPos;
int boxWidth;
......@@ -75,11 +79,31 @@ struct SButton {
int rows;
EExitType exitType;
boolean shadow;
chtype highlight;
void * callbackData;
};
typedef struct SButton CDKBUTTON;
/*
* This sets the callback function of the button's argument.
*/
#define setCDKButtonCBArgs(button, argPtr) \
((button)->callbackData = (void*)(argPtr))
typedef void (*tButtonCallback)(struct SButton *button);
#define getCDKButtonCBArgs(button, argType) \
((argType) ((button)->callbackData))
/*
* This sets the button's highlight mode.
*/
#define CDKButtonHighlightOf(button) \
((button)->highlight)
#define setCDKButtonHighlight(button, highlightMode) \
(CDKButtonHighlightOf(button) = (highlightMode))
#define getCDKButtonHighlight(button) \
CDKButtonHighlightOf(button)
/*
* This creates a new CDK button widget.
......@@ -115,7 +139,7 @@ void setCDKButton (
boolean /* Box */);
/*
* This sets the contents of the label.
* This sets the contents of the button.
*/
void setCDKButtonMessage (
CDKBUTTON * /* button */,
......@@ -135,7 +159,7 @@ boolean getCDKButtonBox (
CDKBUTTON * /* button */);
/*
* This draws the label.
* This draws the button.
*/
#define drawCDKButton(obj,Box) drawCDKObject(obj,Box)
......
'\" t
.\" $Id: cdk_binding.3,v 1.22 2005/12/30 00:01:59 tom Exp $
.\" $Id: cdk_binding.3,v 1.24 2016/02/01 00:50:10 tom Exp $
.de XX
..
.TH cdk_binding 3
......@@ -72,8 +72,8 @@ which is one of the following values.
center tab(/);
l
l l
lw13 lw30 lw 30 .
\fBEObjectType_Value/Corresponding_Widget/Widget_Manual_Page\fR
lw10 lw20 lw 20 .
\fBEObjectType_Value/Corresponding_Widget/Widget_Manual_Page\fP
=
vALPHALIST/Alphalist Widget/cdk_alphalist (3)
vBUTTON/Button Widget/cdk_button (3)
......@@ -149,10 +149,9 @@ If the keycode has been bound to the special function \fBgetcCDKBind\fP,
then it will be translated to the value which was given for the binding data.
Otherwise, a few special cases are performed:
.TS
center tab(/) allbox;
center tab(/) box;
l l
l l
lw35 lw35 .
lw25 lw25 .
\fBKey/Result\fR
=
CTRL-A/KEY_HOME
......
'\" t
.\" $Id: cdk_entry.3,v 1.26 2012/03/22 08:39:04 tom Exp $
.\" $Id: cdk_entry.3,v 1.27 2016/02/01 00:03:53 tom Exp $
.de XX
..
.TH cdk_entry 3
......@@ -451,7 +451,7 @@ outlines the keys and their actions for this widget.
.TS
center tab(/);
l l
lw15 lw35 .
lw10 lw30 .
\fBKey/Action\fR
=
Left Arrow/Moves the cursor to the left.
......
'\" t
.\" $Id: cdk_mentry.3,v 1.26 2012/03/22 08:44:05 tom Exp $
.\" $Id: cdk_mentry.3,v 1.27 2016/02/01 00:06:21 tom Exp $
.de XX
..
.TH cdk_mentry 3
......@@ -326,8 +326,7 @@ outlines valid values for this field and what they mean:
.TS
center tab(/);
l l
l l
lw15 lw35 .
lw10 lw30 .
\fBDisplay_Type/Meaning\fR
=
vCHAR/Only accepts alphabetic characters.
......@@ -517,7 +516,7 @@ outlines the keys and their actions for this widget.
.TS
center tab(/) box;