Update dialog to 1.2-20130923.

Approved by:	re (marius)
This commit is contained in:
Devin Teske 2013-09-24 14:52:43 +00:00
parent e7145502e1
commit febdb46880
34 changed files with 4840 additions and 1960 deletions

View File

@ -1,9 +1,38 @@
-- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $
-- $Id: CHANGES,v 1.476 2013/09/24 00:06:47 tom Exp $
-- Thomas E. Dickey <dickey@invisible-island.net>
This version of dialog was originally from a Debian snapshot. I've done this
to it:
2013/09/23
+ fix samples/inputbox6-utf8, which had depended unnecessarily on bash.
+ improve memory caching for wide-character manipulation in gauge
widget (report by Devin Teske).
+ add dlg_reallocate_gauge (discussion with Devin Teske).
+ updated configure macros to use msys changes from ncurses.
+ update config.guess, config.sub
2013/09/02
+ modify makefile rule to make the ".png" filenames created by groff
predictable.
+ add option --help-tags to allow scripts to get the item's tag field
consistently from help- and help-item button results rather than
getting the item's text for the latter (discussion with Florent
Rougon).
+ correct manpage discussion of DIALOG_ITEM_HELP versus --item-help,
as well as --help-button return status (report by Florent Rougon).
+ correct limit used for --hline option (report by Devin Teske,
cf: 2011/06/30).
+ do not print empty "[]" if a --hline option was given with an empty
value (report by Devin Teske).
+ miscellaneous configure script fixes/updates. In particular, add
option --with-shared which builds shared libraries without a libtool
dependency.
+ add FreeBSD port-files for test-builds.
+ update lt.po, add fa.po from
http://translationproject.org/latest/dialog/
+ update config.guess, config.sub
2013/05/23
+ modify ifdef in arrows.c to work around packages which use the
wide-character ncursesw headers with the ncurses library (report
@ -298,7 +327,7 @@ to it:
separate ncurses' header files.
+ CF_DISABLE_RPATH_HACK, fix garbled message
+ CF_LD_RPATH_OPT, add mirbsd
+ CF_MAKEFLAGS, filter out GNU make's entering/leaving messages.
+ CF_MAKEFLAGS, filter out GNU make's entering/leaving messages.
This only appeared when using the macro in a dpkg script, though it
should have in other cases.
+ CF_RPATH_HACK, add a check for libraries not found, e.g., from

View File

@ -1 +1 @@
11:1:0 1.2 20130523
11:1:0 1.2 20130923

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/*
* $Id: arrows.c,v 1.50 2013/05/24 00:05:21 tom Exp $
* $Id: arrows.c,v 1.51 2013/09/02 15:10:09 tom Exp $
*
* arrows.c -- draw arrows to indicate end-of-range for lists
*
@ -74,9 +74,10 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
int bottom;
if (dialog_vars.help_line != 0
&& dialog_vars.help_line[0] != 0
&& (bottom = getmaxy(win) - 1) > 0) {
chtype attr = A_NORMAL;
const int *cols = dlg_index_columns(dialog_vars.help_line);
int cols = dlg_count_columns(dialog_vars.help_line);
int other = decorations ? (ON_LEFT + ON_RIGHT) : 0;
int avail = (getmaxx(win) - other - 2);
int limit = dlg_count_real_columns(dialog_vars.help_line) + 2;
@ -86,7 +87,7 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
other = decorations ? ON_LEFT : 0;
(void) wmove(win, bottom, other + (avail - limit) / 2);
waddch(win, '[');
dlg_print_text(win, dialog_vars.help_line, cols[limit], &attr);
dlg_print_text(win, dialog_vars.help_line, cols, &attr);
waddch(win, ']');
wmove(win, cur_y, cur_x);
}

View File

@ -1,5 +1,5 @@
/*
* $Id: buildlist.c,v 1.57 2013/03/17 13:46:30 tom Exp $
* $Id: buildlist.c,v 1.59 2013/09/02 17:01:02 tom Exp $
*
* buildlist.c -- implements the buildlist dialog
*
@ -1027,6 +1027,7 @@ dialog_buildlist(const char *title,
bool separate_output = dialog_vars.separate_output;
bool show_status = FALSE;
int current = 0;
char *help_result;
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_buildlist");
@ -1060,31 +1061,16 @@ dialog_buildlist(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
dlg_add_result("HELP ");
show_status = dialog_vars.help_status;
if (USE_ITEM_HELP(listitems[current].help)) {
if (show_status) {
if (separate_output) {
dlg_add_string(listitems[current].help);
dlg_add_separator();
} else {
dlg_add_quoted(listitems[current].help);
}
dlg_add_help_listitem(&result, &help_result, &listitems[current]);
if ((show_status = dialog_vars.help_status)) {
if (separate_output) {
dlg_add_string(help_result);
dlg_add_separator();
} else {
dlg_add_string(listitems[current].help);
dlg_add_quoted(help_result);
}
result = DLG_EXIT_ITEM_HELP;
} else {
if (show_status) {
if (separate_output) {
dlg_add_string(listitems[current].name);
dlg_add_separator();
} else {
dlg_add_quoted(listitems[current].name);
}
} else {
dlg_add_string(listitems[current].name);
}
dlg_add_string(help_result);
}
break;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: checklist.c,v 1.151 2013/03/23 10:51:48 tom Exp $
* $Id: checklist.c,v 1.153 2013/09/02 17:01:02 tom Exp $
*
* checklist.c -- implements the checklist box
*
@ -607,6 +607,7 @@ dialog_checklist(const char *title,
&& (dialog_vars.separate_output));
bool show_status = FALSE;
int current = 0;
char *help_result;
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_checklist");
@ -640,31 +641,16 @@ dialog_checklist(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
dlg_add_result("HELP ");
show_status = dialog_vars.help_status;
if (USE_ITEM_HELP(listitems[current].help)) {
if (show_status) {
if (separate_output) {
dlg_add_string(listitems[current].help);
dlg_add_separator();
} else {
dlg_add_quoted(listitems[current].help);
}
dlg_add_help_listitem(&result, &help_result, &listitems[current]);
if ((show_status = dialog_vars.help_status)) {
if (separate_output) {
dlg_add_string(help_result);
dlg_add_separator();
} else {
dlg_add_string(listitems[current].help);
dlg_add_quoted(help_result);
}
result = DLG_EXIT_ITEM_HELP;
} else {
if (show_status) {
if (separate_output) {
dlg_add_string(listitems[current].name);
dlg_add_separator();
} else {
dlg_add_quoted(listitems[current].name);
}
} else {
dlg_add_string(listitems[current].name);
}
dlg_add_string(help_result);
}
break;
}

View File

@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2012-09-25'
timestamp='2013-06-10'
# 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
# the Free Software Foundation; either version 2 of the License, or
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@ -22,19 +20,17 @@ timestamp='2012-09-25'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
# Originally written by Per Bothner.
#
# 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
#
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright 1992-2013 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."
@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@ -859,21 +874,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@ -886,59 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@ -957,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
or1k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-gnu ;;
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@ -1237,19 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)

View File

@ -1,24 +1,18 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2012-08-18'
timestamp='2013-09-05'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# 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
# the Free Software Foundation; either version 2 of the License, or
# 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
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
@ -26,11 +20,12 @@ timestamp='2012-08-18'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted GNU ChangeLog entry.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Copyright 1992-2013 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."
@ -156,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze)
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@ -259,10 +252,12 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@ -273,7 +268,7 @@ case $basic_machine in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@ -291,16 +286,17 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
| or32 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
@ -328,7 +324,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@ -370,13 +366,13 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@ -389,7 +385,8 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -407,12 +404,13 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
@ -788,7 +786,7 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
@ -796,7 +794,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
basic_machine=i386-pc
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@ -832,7 +830,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
basic_machine=i686-pc
os=-msys
;;
mvs)
@ -1023,7 +1021,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
@ -1350,7 +1352,7 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@ -1496,9 +1498,6 @@ case $os in
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
@ -1547,6 +1546,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
@ -1590,6 +1592,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or1k-*)
os=-elf
;;
or32-*)
os=-coff
;;

4056
contrib/dialog/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
dnl $Id: configure.in,v 1.75 2012/12/30 22:38:00 tom Exp $
dnl $Id: configure.in,v 1.79 2013/09/02 14:02:57 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl ---------------------------------------------------------------------------
dnl Copyright 1999-2011,2012 -- Thomas E. Dickey
@ -44,6 +44,7 @@ AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_INSTALL
CF_PROG_LN_S
CF_PROG_LINT
dnl needed for CF_WITH_LIBTOOL
@ -59,23 +60,36 @@ CF_XOPEN_SOURCE
CF_LARGEFILE
CF_WITH_WARNINGS
CF_PKG_CONFIG
dnl
dnl Allow dialog program and library to be renamed.
AC_MSG_CHECKING(for this package's name)
AC_ARG_WITH(package,
[ --with-package=XXX rename dialog to XXX, library to libXXX.a, etc],
[PACKAGE=$withval],
[PACKAGE=dialog])
AC_MSG_RESULT($PACKAGE)
CF_VERSION_INFO(dialog,$PACKAGE)
CFG_ROOTNAME=$PACKAGE
HDR_ROOTNAME=$PACKAGE
LIB_ROOTNAME=$PACKAGE
AC_SUBST(CFG_ROOTNAME)
AC_SUBST(HDR_ROOTNAME)
AC_SUBST(LIB_ROOTNAME)
dnl
dnl If package is renamed, it is useful to have the dlg_XXX headers in a
dnl subdirectory (using the package name) so that multiple versions of the
dnl headers can coexist.
AC_MSG_CHECKING(if we should install dlg_XXX headers to subdirectory)
AC_ARG_ENABLE(header-subdir,
[ --enable-header-subdir install dlg_XXX headers to subdirectory],
[SUB_INC=$enableval],
[SUB_INC=no])
AC_MSG_RESULT($SUB_INC)
AC_SUBST(SUB_INC)
dnl
@ -93,17 +107,13 @@ CF_ARG_MSG_ENABLE([if you want --trace option],
[EXTRAOBJS="$EXTRAOBJS trace\$o"
AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
LIBTOOL_MAKE="#"
CF_WITH_LIBTOOL
if test "$with_libtool" = "yes" ; then
OBJEXT="lo"
LIBTOOL_MAKE=
CF_WITH_LIBTOOL_OPTS
fi
AC_SUBST(LIBTOOL_MAKE)
CF_LD_RPATH_OPT
CF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`)
CF_WITH_CURSES_DIR
CF_ENABLE_RPATH
use_ncurses=no
AC_ARG_WITH(ncurses,
[ --with-ncurses compile/link with ncurses library],
@ -252,4 +262,18 @@ AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOC
CF_DISABLE_RPATH_HACK
AC_OUTPUT(dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE,,,sort -u)
CF__DEFINE_SHLIB_VARS
AC_OUTPUT(
dialog-config
makefile
$EXTRA_OUTPUT
$SUB_MAKEFILE,[
CF__ADD_SHLIB_RULES(
makefile,
$LIB_MODEL,
[\${LIB_OBJECT}],
[\${LIBS} \${LDFLAGS}])
],[
CF__INIT_SHLIB_RULES
],[sort -u])

View File

@ -1,5 +1,5 @@
'\" t
.\" $Id: dialog.1,v 1.165 2013/03/15 09:07:30 tom Exp $
.\" $Id: dialog.1,v 1.167 2013/09/02 17:38:36 tom Exp $
.\" Copyright 2005-2012,2013 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
@ -41,7 +41,7 @@
.IP \(bu 4
..
.
.TH \*D 1 "" "$Date: 2013/03/15 09:07:30 $"
.TH \*D 1 "" "$Date: 2013/09/02 17:38:36 $"
.SH NAME
dialog \- display dialog boxes from shell scripts
.SH SYNOPSIS
@ -318,11 +318,19 @@ or if an unrecognized option is given.
.IP "\fB--help-button"
Show a help-button after "OK" and "Cancel" buttons,
i.e., in checklist, radiolist and menu boxes.
If "\fB--item-help\fR" is also given, on exit
the return status will be the same as for the "OK" button,
and the item-help text will be written to \fB\*p\fP's output after the token "HELP".
Otherwise, the return status will indicate that the Help button was pressed,
and no message printed.
.IP
On exit, the return status will indicate that the Help button was pressed.
\fB\*L\fP will also write a message to its output after the token "HELP":
.RS
.bP
If "\fB--item-help\fR" is also given, the item-help text will be written.
.bP
Otherwise, the item's tag (the first field) will be written.
.RE
.IP
.IP
You can use the \fB--help-tags\fP option and/or set the DIALOG_ITEM_HELP
environment variable to modify these messages and exit-status.
.
.IP "\fB--help-label \fIstring"
Override the label used for "Help" buttons.
@ -334,6 +342,11 @@ after the item-help "HELP" information.
This can be used to reconstruct the state of a checklist after processing
the help request.
.
.IP "\fB--help-tags"
Modify the messages written on exit for \fB--help-button\fP
by making them always just the item's tag.
This does not affect the exit status code.
.
.IP "\fB--hfile \fIfilename"
Display the given file using a textbox when the user presses F1.
.
@ -1411,9 +1424,7 @@ The default values and corresponding environment variables
that can override them are:
.TP 5
0
if
.BR \*p " is exited by pressing the " Yes " or " OK
button (DIALOG_OK).
if the \fBYES\fP or \fBOK\fP button is pressed (DIALOG_OK).
.TP 5
1
if the
@ -1423,7 +1434,9 @@ button is pressed (DIALOG_CANCEL).
2
if the
.BR Help
button is pressed (DIALOG_HELP).
button is pressed (DIALOG_HELP),
.br
except as noted below about DIALOG_ITEM_HELP.
.TP 5
3
if the
@ -1433,13 +1446,21 @@ button is pressed (DIALOG_EXTRA).
4
if the
.BR Help
button is pressed (DIALOG_HELP),
or the \fB--item-help\fP option is set
when the \fBHelp\fP button is pressed (DIALOG_ITEM_HELP),
button is pressed,
.br
and the \fB--item-help\fP option is set
.br
and the DIALOG_ITEM_HELP environment variable is set to 4.
.IP
While any of the exit-codes can be overridden using environment variables,
this special case was introduced in 2004 to simplify compatibility.
\fB\*L\fP uses DIALOG_ITEM_HELP(4) internally,
but unless the environment variable is also set,
it changes that to DIALOG_HELP(2) on exit.
.TP 5
-1
if errors occur inside \fB\*p\fP (DIALOG_ERROR)
or \fB\*p\fP is exited by pressing the \fIESC\fP key (DIALOG_ESC).
or \fB\*p\fP exits because the \fIESC\fP key (DIALOG_ESC) was pressed.
.
.\" ************************************************************************
.SH PORTABILITY

View File

@ -1,5 +1,5 @@
'\" t
.\" $Id: dialog.3,v 1.91 2013/03/15 09:07:30 tom Exp $
.\" $Id: dialog.3,v 1.93 2013/09/22 23:58:11 tom Exp $
.\" Copyright 2005-2012,2013 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
@ -39,7 +39,7 @@
.de bP
.IP \(bu 4
..
.TH \*D 3 "" "$Date: 2013/03/15 09:07:30 $"
.TH \*D 3 "" "$Date: 2013/09/22 23:58:11 $"
.SH NAME
dialog \- widgets and utilities for the \*p program
.SH SYNOPSIS
@ -127,6 +127,11 @@ sizing (specifying 0 for height and width).
It represents width / height.
The default is 9, which means 9 characters wide to every 1 line high.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_STATE.finish_string
When set to true, this allows calls to \fBdlg_finish_string\fP to discard the
corresponding data which is created to speed up layout computations for the
given string parameter. The \fBgauge\fP widget uses this feature.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_STATE.getc_callbacks
This is setup in \fIui_getc.c\fP to record windows which must be polled
for input, e.g,. to handle the background tailbox widget.
@ -396,6 +401,14 @@ after the item-help "HELP" information.
This can be used to reconstruct the state of a checklist after processing
the help request.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.help_tags
This corresponds to the command-line option "\fB--help-tags\fP".
If true,
\fBdlg_add_help_formitem\fP and
\fBdlg_add_help_listitem\fP use the item's tag value consistently
rather than using the tag's help-text value
when \fIDIALOG_VARS.item_help\fP is set.
.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.input_length
This is nonzero if \fIDIALOG_VARS.input_result\fP is allocated,
versus being a pointer to the user's local variables.
@ -879,6 +892,7 @@ implements the "\fB--gauge\fP" option.
Alternatively, a simpler or customized gauge widget can be
setup using
\fBdlg_allocate_gauge\fP,
\fBdlg_reallocate_gauge\fP,
\fBdlg_update_gauge\fP and
\fBdlg_free_gauge\fP.
.RS
@ -1386,6 +1400,38 @@ function to call when input ends, e.g., to free caller's additional data.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_add_help_formitem
This is a utility function used enforce consistent behavior for
the \fIDIALOG_VARS.help_tags\fP and \fIDIALOG_VARS.item_help\fP variables.
.RS
.TP 5
.B int *\fIresult\fP
this is updated to DLG_EXIT_ITEM_HELP if \fIDIALOG_VARS.item_help\fP is set.
.TP 5
.B char **\fItag\fP
the tag- or help-text is stored here.
.TP 5
.B DIALOG_FORMITEM *\fIitem\fP
contains the list item to use for tag- or help-text.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_add_help_listitem
This is a utility function used enforce consistent behavior for
the \fIDIALOG_VARS.help_tags\fP and \fIDIALOG_VARS.item_help\fP variables.
.RS
.TP 5
.B int *\fIresult\fP
this is updated to DLG_EXIT_ITEM_HELP if \fIDIALOG_VARS.item_help\fP is set.
.TP 5
.B char **\fItag\fP
the tag- or help-text is stored here.
.TP 5
.B DIALOG_LISTITEM *\fIitem\fP
contains the list item to use for tag- or help-text.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_add_last_key
Report the last key entered by the user.
This implements the \fB\-\-last\-key\fP command-line option,
@ -2518,6 +2564,18 @@ is the character-offset to find.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_finish_string
If \fIDIALOG_STATE.finish_string\fP is true,
this function discards data used to speed up layout computations.
.RS
.TP 5
.B const char * \fIstring
is the address of the string whose data should be discarded.
The address rather than contents is used as the unique identifier because
some of the caching is used for editable input-fields.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_flush_getc
Cancel the local data saved by \fBdlg_last_getc\fP.
.\" ---------------------------------------------------------------------------
@ -3302,6 +3360,38 @@ Display the background title if \fBdialog_vars.backtitle\fP is non-null.
The background title is shown at the top of the screen.
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_reallocate_gauge
Allocates or reallocates a gauge widget (see \fBdlg_allocate_gauge\fP).
Use \fBdlg_update_gauge\fP to display the result.
.RS
.TP 5
.B void ** \fIobjptr
If the pointer referenced by this parameter is null, the function creates
a new gauge widget using \fBdlg_allocate_gauge\fP.
Otherwise, it updates the title and cprompt values, reusing the window
from the previous call on this function.
As a side-effect, the function stores the updated object-pointer via
the \fIobjptr\fP parameter.
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
.TP 5
.B const char * \fIcprompt
is the prompt text shown within the widget.
.TP 5
.B int \fIheight
is the desired height of the box.
If zero, the height is adjusted to use the available screen size.
.TP 5
.B int \fIwidth
is the desired width of the box.
If zero, the height is adjusted to use the available screen size.
.TP 5
.B int \fIpercent
is the percentage to show in the progress bar.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
.B dlg_register_buttons
The widget developer should call this function after \fBdlg_register_window\fP,
for the list of button labels associated with the widget.

View File

@ -1,5 +1,5 @@
/*
* $Id: dialog.c,v 1.230 2013/03/15 09:07:30 tom Exp $
* $Id: dialog.c,v 1.231 2013/09/02 17:20:09 tom Exp $
*
* cdialog - Display simple dialog boxes from shell scripts
*
@ -71,6 +71,7 @@ typedef enum {
,o_help_label
,o_help_line
,o_help_status
,o_help_tags
,o_icon
,o_ignore
,o_infobox
@ -229,6 +230,7 @@ static const Options options[] = {
{ "help-button", o_help_button, 1, "" },
{ "help-label", o_help_label, 1, "<str>" },
{ "help-status", o_help_status, 1, "" },
{ "help-tags", o_help_tags, 1, "" },
{ "hfile", o_help_file, 1, "<str>" },
{ "hline", o_help_line, 1, "<str>" },
{ "icon", o_icon, 1, NULL },
@ -1462,6 +1464,9 @@ process_common_options(int argc, char **argv, int offset, bool output)
case o_help_status:
dialog_vars.help_status = TRUE;
break;
case o_help_tags:
dialog_vars.help_tags = TRUE;
break;
case o_extra_button:
dialog_vars.extra_button = TRUE;
break;

View File

@ -1,5 +1,5 @@
/*
* $Id: dialog.h,v 1.260 2013/03/17 15:03:41 tom Exp $
* $Id: dialog.h,v 1.267 2013/09/22 19:06:36 tom Exp $
*
* dialog.h -- common declarations for all dialog modules
*
@ -445,6 +445,8 @@ typedef struct {
/* 1.1-20110106 */
bool no_mouse; /* option "--no-mouse" */
int visit_cols; /* option "--visit-items" */
/* 1.2-20130922 */
bool finish_string; /* caching optimization for gauge */
} DIALOG_STATE;
extern DIALOG_STATE dialog_state;
@ -522,6 +524,8 @@ typedef struct {
bool no_items; /* option "--no-items" */
/* 1.2-20130315 */
bool last_key; /* option "--last-key" */
/* 1.2-20130902 */
bool help_tags; /* option "--help-tags" */
} DIALOG_VARS;
#define USE_ITEM_HELP(s) (dialog_vars.item_help && (s) != 0)
@ -687,6 +691,7 @@ extern void dlg_free_formitems(DIALOG_FORMITEM * /*items*/);
/* guage.c */
extern void * dlg_allocate_gauge(const char * /* title */, const char * /* cprompt */, int /* height */, int /* width */, int /* percent */);
extern void * dlg_reallocate_gauge(void * /* objptr */, const char * /* title */, const char * /* cprompt */, int /* height */, int /* width */, int /* percent */);
extern void dlg_free_gauge(void * /* objptr */);
extern void dlg_update_gauge(void * /* objptr */, int /* percent */);
@ -699,6 +704,7 @@ extern int dlg_count_wchars(const char * /*string*/);
extern int dlg_edit_offset(char * /*string*/, int /*offset*/, int /*x_last*/);
extern int dlg_find_index(const int * /*list*/, int /*limit*/, int /*to_find*/);
extern int dlg_limit_columns(const char * /*string*/, int /*limit*/, int /*offset*/);
extern void dlg_finish_string(const char * /* string */);
extern void dlg_show_string(WINDOW * /*win*/, const char * /*string*/, int /*offset*/, chtype /*attr*/, int /*y_base*/, int /*x_base*/, int /*x_last*/, bool /*hidden*/, bool /*force*/);
/* menubox.c */
@ -749,6 +755,8 @@ extern int dlg_defaultno_button(void);
extern int dlg_default_button(void);
extern int dlg_max_input(int /*max_len*/);
extern int dlg_print_scrolled(WINDOW * /* win */, const char * /* prompt */, int /* offset */, int /* height */, int /* width */, int /* pauseopt */);
extern void dlg_add_help_formitem(int * /* result */, char ** /* tag */, DIALOG_FORMITEM * /* item */);
extern void dlg_add_help_listitem(int * /* result */, char ** /* tag */, DIALOG_LISTITEM * /* item */);
extern void dlg_add_quoted(char * /*string*/);
extern void dlg_add_result(const char * /*string*/);
extern void dlg_add_separator(void);

View File

@ -1,5 +1,5 @@
/*
* $Id: formbox.c,v 1.85 2013/03/17 15:03:41 tom Exp $
* $Id: formbox.c,v 1.87 2013/09/02 17:02:05 tom Exp $
*
* formbox.c -- implements the form (i.e, some pairs label/editbox)
*
@ -915,6 +915,7 @@ dialog_form(const char *title,
DIALOG_FORMITEM *listitems;
DIALOG_VARS save_vars;
bool show_status = FALSE;
char *help_result;
dlg_save_vars(&save_vars);
dialog_vars.separate_output = TRUE;
@ -954,14 +955,9 @@ dialog_form(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
dlg_add_result("HELP ");
dlg_add_help_formitem(&result, &help_result, &listitems[choice]);
show_status = dialog_vars.help_status;
if (USE_ITEM_HELP(listitems[choice].help)) {
dlg_add_string(listitems[choice].help);
result = DLG_EXIT_ITEM_HELP;
} else {
dlg_add_string(listitems[choice].name);
}
dlg_add_string(help_result);
if (show_status)
dlg_add_separator();
break;

View File

@ -1,9 +1,9 @@
/*
* $Id: guage.c,v 1.65 2012/11/30 10:43:31 tom Exp $
* $Id: guage.c,v 1.68 2013/09/22 19:10:22 tom Exp $
*
* guage.c -- implements the gauge dialog
*
* Copyright 2000-2011,2012 Thomas E. Dickey
* Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@ -39,7 +39,7 @@ typedef struct _my_obj {
DIALOG_CALLBACK obj; /* has to be first in struct */
struct _my_obj *next;
WINDOW *text;
const char *title;
char *title;
char *prompt;
char prompt_buf[MY_LEN];
int percent;
@ -273,15 +273,87 @@ void
dlg_update_gauge(void *objptr, int percent)
{
MY_OBJ *obj = (MY_OBJ *) objptr;
bool save_finish_string = dialog_state.finish_string;
dialog_state.finish_string = TRUE;
curs_set(0);
obj->percent = percent;
repaint_text(obj);
dialog_state.finish_string = save_finish_string;
}
/*
* Allocates a new object and fills it as per the arguments
* (Re)Allocates an object and fills it as per the arguments
*/
void *
dlg_reallocate_gauge(void *objptr,
const char *title,
const char *cprompt,
int height,
int width,
int percent)
{
char *prompt = dlg_strclone(cprompt);
MY_OBJ *obj = objptr;
bool save_finish_string = dialog_state.finish_string;
dialog_state.finish_string = TRUE;
dlg_tab_correct_str(prompt);
if (objptr == 0) {
/* create a new object */
obj = dlg_calloc(MY_OBJ, 1);
assert_ptr(obj, "dialog_gauge");
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MIN_WIDE);
dlg_print_size(height, width);
dlg_ctl_size(height, width);
} else {
/* reuse an existing object */
obj = objptr;
height = obj->height;
width = obj->width;
}
if (obj->obj.win == 0) {
/* center dialog box on screen */
int x = dlg_box_x_ordinate(width);
int y = dlg_box_y_ordinate(height);
WINDOW *dialog = dlg_new_window(height, width, y, x);
obj->obj.win = dialog;
}
obj->obj.input = dialog_state.pipe_input;
obj->obj.keep_win = TRUE;
obj->obj.bg_task = TRUE;
obj->obj.handle_getc = handle_my_getc;
obj->obj.handle_input = handle_input;
if (obj->title == 0 || strcmp(obj->title, title)) {
dlg_finish_string(obj->title);
free(obj->title);
obj->title = dlg_strclone(title);
}
dlg_finish_string(obj->prompt);
free(obj->prompt);
obj->prompt = prompt;
obj->percent = percent;
obj->height = height;
obj->width = width;
/* if this was a new object, link it into the list */
if (objptr == 0) {
obj->next = all_objects;
all_objects = obj;
}
dialog_state.finish_string = save_finish_string;
return (void *) obj;
}
void *
dlg_allocate_gauge(const char *title,
const char *cprompt,
@ -289,43 +361,7 @@ dlg_allocate_gauge(const char *title,
int width,
int percent)
{
int x, y;
char *prompt = dlg_strclone(cprompt);
WINDOW *dialog;
MY_OBJ *obj = 0;
dlg_tab_correct_str(prompt);
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MIN_WIDE);
dlg_print_size(height, width);
dlg_ctl_size(height, width);
/* center dialog box on screen */
x = dlg_box_x_ordinate(width);
y = dlg_box_y_ordinate(height);
dialog = dlg_new_window(height, width, y, x);
obj = dlg_calloc(MY_OBJ, 1);
assert_ptr(obj, "dialog_gauge");
obj->obj.input = dialog_state.pipe_input;
obj->obj.win = dialog;
obj->obj.keep_win = TRUE;
obj->obj.bg_task = TRUE;
obj->obj.handle_getc = handle_my_getc;
obj->obj.handle_input = handle_input;
obj->title = title;
obj->prompt = prompt;
obj->percent = percent;
obj->height = height;
obj->width = width;
obj->next = all_objects;
all_objects = obj;
return (void *) obj;
return dlg_reallocate_gauge(NULL, title, cprompt, height, width, percent);
}
void

View File

@ -1,9 +1,9 @@
/*
* $Id: inputstr.c,v 1.72 2012/12/30 22:11:37 tom Exp $
* $Id: inputstr.c,v 1.83 2013/09/23 23:19:26 tom Exp $
*
* inputstr.c -- functions for input/display of a string
*
* Copyright 2000-2011,2012 Thomas E. Dickey
* Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@ -51,7 +51,7 @@
typedef struct _cache {
struct _cache *next;
#if USE_CACHING
struct _cache *cache_at; /* unique: associate caches by CACHE */
int cache_num; /* tells what type of data is in list[] */
const char *string_at; /* unique: associate caches by char* */
#endif
size_t s_len; /* strlen(string) - we add 1 for EOS */
@ -65,6 +65,14 @@ typedef struct _cache {
static CACHE *cache_list;
typedef enum {
cInxCols
,cCntWideBytes
,cCntWideChars
,cInxWideChars
,cMAX
} CACHE_USED;
#ifdef HAVE_TSEARCH
static void *sorted_cache;
#endif
@ -89,13 +97,35 @@ have_locale(void)
#endif
#ifdef HAVE_TSEARCH
#if 0
static void
show_tsearch(const void *nodep, const VISIT which, const int depth)
{
const CACHE *p = *(CACHE * const *) nodep;
(void) depth;
if (which == postorder || which == leaf) {
dlg_trace_msg("\tcache %p %p:%s\n", p, p->string, p->string);
}
}
static void
trace_cache(const char *fn, int ln)
{
dlg_trace_msg("trace_cache %s@%d\n", fn, ln);
twalk(sorted_cache, show_tsearch);
}
#else
#define trace_cache(fn, ln) /* nothing */
#endif
static int
compare_cache(const void *a, const void *b)
{
const CACHE *p = (const CACHE *) a;
const CACHE *q = (const CACHE *) b;
int result = 0;
result = (int) (p->cache_at - q->cache_at);
int result = (p->cache_num - q->cache_num);
if (result == 0)
result = (int) (p->string_at - q->string_at);
return result;
@ -103,7 +133,7 @@ compare_cache(const void *a, const void *b)
#endif
static CACHE *
find_cache(CACHE * cache, const char *string)
find_cache(int cache_num, const char *string)
{
CACHE *p;
@ -112,7 +142,7 @@ find_cache(CACHE * cache, const char *string)
CACHE find;
memset(&find, 0, sizeof(find));
find.cache_at = cache;
find.cache_num = cache_num;
find.string_at = string;
if ((pp = tfind(&find, &sorted_cache, compare_cache)) != 0) {
@ -122,8 +152,7 @@ find_cache(CACHE * cache, const char *string)
}
#else
for (p = cache_list; p != 0; p = p->next) {
if (p->cache_at == cache
&& p->string_at == string) {
if (p->string_at == string) {
break;
}
}
@ -131,8 +160,8 @@ find_cache(CACHE * cache, const char *string)
return p;
}
static void
make_cache(CACHE * cache, const char *string)
static CACHE *
make_cache(int cache_num, const char *string)
{
CACHE *p;
@ -141,43 +170,30 @@ make_cache(CACHE * cache, const char *string)
p->next = cache_list;
cache_list = p;
p->cache_at = cache;
p->cache_num = cache_num;
p->string_at = string;
*cache = *p;
#ifdef HAVE_TSEARCH
(void) tsearch(p, &sorted_cache, compare_cache);
#endif
return p;
}
static void
load_cache(CACHE * cache, const char *string)
static CACHE *
load_cache(int cache_num, const char *string)
{
CACHE *p;
if ((p = find_cache(cache, string)) != 0) {
*cache = *p;
} else {
make_cache(cache, string);
}
}
static void
save_cache(CACHE * cache, const char *string)
{
CACHE *p;
if ((p = find_cache(cache, string)) != 0) {
CACHE *q = p->next;
*p = *cache;
p->next = q;
if ((p = find_cache(cache_num, string)) == 0) {
p = make_cache(cache_num, string);
}
return p;
}
#else
static CACHE my_cache;
#define SAME_CACHE(c,s,l) (c->string != 0)
#define load_cache(cache, string) /* nothing */
#define save_cache(cache, string) /* nothing */
#endif /* USE_WIDE_CURSES */
#define load_cache(cache, string) &my_cache
#endif /* USE_CACHING */
/*
* If the given string has not changed, we do not need to update the index.
@ -188,32 +204,34 @@ same_cache2(CACHE * cache, const char *string, unsigned i_len)
{
unsigned need;
size_t s_len = strlen(string);
bool result = TRUE;
if (cache->s_len != 0
&& cache->s_len >= s_len
&& cache->list != 0
&& SAME_CACHE(cache, string, (size_t) s_len)) {
return TRUE;
if (cache->s_len == 0
|| cache->s_len < s_len
|| cache->list == 0
|| !SAME_CACHE(cache, string, (size_t) s_len)) {
need = (i_len + 1);
if (cache->list == 0) {
cache->list = dlg_malloc(int, need);
} else if (cache->i_len < i_len) {
cache->list = dlg_realloc(int, need, cache->list);
}
assert_ptr(cache->list, "load_cache");
cache->i_len = i_len;
if (cache->s_len >= s_len && cache->string != 0) {
strcpy(cache->string, string);
} else {
if (cache->string != 0)
free(cache->string);
cache->string = dlg_strclone(string);
}
cache->s_len = s_len;
result = FALSE;
}
need = (i_len + 1);
if (cache->list == 0) {
cache->list = dlg_malloc(int, need);
} else if (cache->i_len < i_len) {
cache->list = dlg_realloc(int, need, cache->list);
}
cache->i_len = i_len;
if (cache->s_len >= s_len && cache->string != 0) {
strcpy(cache->string, string);
} else {
if (cache->string != 0)
free(cache->string);
cache->string = dlg_strclone(string);
}
cache->s_len = s_len;
return FALSE;
return result;
}
#ifdef USE_WIDE_CURSES
@ -225,23 +243,24 @@ static bool
same_cache1(CACHE * cache, const char *string, size_t i_len)
{
size_t s_len = strlen(string);
bool result = TRUE;
if (cache->s_len == s_len
&& SAME_CACHE(cache, string, (size_t) s_len)) {
return TRUE;
if (cache->s_len != s_len
|| !SAME_CACHE(cache, string, (size_t) s_len)) {
if (cache->s_len >= s_len && cache->string != 0) {
strcpy(cache->string, string);
} else {
if (cache->string != 0)
free(cache->string);
cache->string = dlg_strclone(string);
}
cache->s_len = s_len;
cache->i_len = i_len;
result = FALSE;
}
if (cache->s_len >= s_len && cache->string != 0) {
strcpy(cache->string, string);
} else {
if (cache->string != 0)
free(cache->string);
cache->string = dlg_strclone(string);
}
cache->s_len = s_len;
cache->i_len = i_len;
return FALSE;
return result;
}
#endif /* USE_CACHING */
@ -256,29 +275,26 @@ dlg_count_wcbytes(const char *string, size_t len)
int result;
if (have_locale()) {
static CACHE cache;
load_cache(&cache, string);
if (!same_cache1(&cache, string, len)) {
CACHE *cache = load_cache(cCntWideBytes, string);
if (!same_cache1(cache, string, len)) {
while (len != 0) {
size_t code = 0;
const char *src = cache.string;
const char *src = cache->string;
mbstate_t state;
char save = cache.string[len];
char save = cache->string[len];
cache.string[len] = '\0';
cache->string[len] = '\0';
memset(&state, 0, sizeof(state));
code = mbsrtowcs((wchar_t *) 0, &src, len, &state);
cache.string[len] = save;
cache->string[len] = save;
if ((int) code >= 0) {
break;
}
--len;
}
cache.i_len = len;
save_cache(&cache, string);
cache->i_len = len;
}
result = (int) cache.i_len;
result = (int) cache->i_len;
} else {
result = (int) len;
}
@ -293,34 +309,32 @@ int
dlg_count_wchars(const char *string)
{
int result;
#ifdef USE_WIDE_CURSES
if (have_locale()) {
static CACHE cache;
size_t len = strlen(string);
load_cache(&cache, string);
if (!same_cache1(&cache, string, len)) {
const char *src = cache.string;
if (have_locale()) {
size_t len = strlen(string);
CACHE *cache = load_cache(cCntWideChars, string);
if (!same_cache1(cache, string, len)) {
const char *src = cache->string;
mbstate_t state;
int part = dlg_count_wcbytes(cache.string, len);
char save = cache.string[part];
int part = dlg_count_wcbytes(cache->string, len);
char save = cache->string[part];
size_t code;
wchar_t *temp = dlg_calloc(wchar_t, len + 1);
if (temp != 0) {
cache.string[part] = '\0';
cache->string[part] = '\0';
memset(&state, 0, sizeof(state));
code = mbsrtowcs(temp, &src, (size_t) part, &state);
cache.i_len = ((int) code >= 0) ? wcslen(temp) : 0;
cache.string[part] = save;
cache->i_len = ((int) code >= 0) ? wcslen(temp) : 0;
cache->string[part] = save;
free(temp);
save_cache(&cache, string);
} else {
cache.i_len = 0;
cache->i_len = 0;
}
}
result = (int) cache.i_len;
result = (int) cache->i_len;
} else
#endif /* USE_WIDE_CURSES */
{
@ -336,15 +350,14 @@ dlg_count_wchars(const char *string)
const int *
dlg_index_wchars(const char *string)
{
static CACHE cache;
unsigned len = (unsigned) dlg_count_wchars(string);
unsigned inx;
CACHE *cache = load_cache(cInxWideChars, string);
load_cache(&cache, string);
if (!same_cache2(&cache, string, len)) {
if (!same_cache2(cache, string, len)) {
const char *current = string;
cache.list[0] = 0;
cache->list[0] = 0;
for (inx = 1; inx <= len; ++inx) {
#ifdef USE_WIDE_CURSES
if (have_locale()) {
@ -355,17 +368,16 @@ dlg_index_wchars(const char *string)
if (width <= 0)
width = 1; /* FIXME: what if we have a control-char? */
current += width;
cache.list[inx] = cache.list[inx - 1] + width;
cache->list[inx] = cache->list[inx - 1] + width;
} else
#endif /* USE_WIDE_CURSES */
{
(void) current;
cache.list[inx] = (int) inx;
cache->list[inx] = (int) inx;
}
}
save_cache(&cache, string);
}
return cache.list;
return cache->list;
}
/*
@ -392,13 +404,12 @@ dlg_find_index(const int *list, int limit, int to_find)
const int *
dlg_index_columns(const char *string)
{
static CACHE cache;
unsigned len = (unsigned) dlg_count_wchars(string);
unsigned inx;
CACHE *cache = load_cache(cInxCols, string);
load_cache(&cache, string);
if (!same_cache2(&cache, string, len)) {
cache.list[0] = 0;
if (!same_cache2(cache, string, len)) {
cache->list[0] = 0;
#ifdef USE_WIDE_CURSES
if (have_locale()) {
size_t num_bytes = strlen(string);
@ -411,7 +422,7 @@ dlg_index_columns(const char *string)
int result;
if (string[inx_wchars[inx]] == TAB) {
result = ((cache.list[inx] | 7) + 1) - cache.list[inx];
result = ((cache->list[inx] | 7) + 1) - cache->list[inx];
} else {
memset(&state, 0, sizeof(state));
memset(temp, 0, sizeof(temp));
@ -432,9 +443,9 @@ dlg_index_columns(const char *string)
result = printable ? (int) wcslen(printable) : 1;
}
}
cache.list[inx + 1] = result;
cache->list[inx + 1] = result;
if (inx != 0)
cache.list[inx + 1] += cache.list[inx];
cache->list[inx + 1] += cache->list[inx];
}
} else
#endif /* USE_WIDE_CURSES */
@ -443,24 +454,23 @@ dlg_index_columns(const char *string)
chtype ch = UCH(string[inx]);
if (ch == TAB)
cache.list[inx + 1] =
((cache.list[inx] | 7) + 1) - cache.list[inx];
cache->list[inx + 1] =
((cache->list[inx] | 7) + 1) - cache->list[inx];
else if (isprint(ch))
cache.list[inx + 1] = 1;
cache->list[inx + 1] = 1;
else {
const char *printable;
printable = unctrl(ch);
cache.list[inx + 1] = (printable
? (int) strlen(printable)
: 1);
cache->list[inx + 1] = (printable
? (int) strlen(printable)
: 1);
}
if (inx != 0)
cache.list[inx + 1] += cache.list[inx];
cache->list[inx + 1] += cache->list[inx];
}
}
save_cache(&cache, string);
}
return cache.list;
return cache->list;
}
/*
@ -478,6 +488,7 @@ dlg_count_columns(const char *string)
} else {
result = (int) strlen(string);
}
dlg_finish_string(string);
return result;
}
@ -732,22 +743,59 @@ dlg_show_string(WINDOW *win,
}
}
/*
* Discard cached data for the given string.
*/
void
dlg_finish_string(const char *string)
{
#if USE_CACHING
if ((string != 0) && dialog_state.finish_string) {
CACHE *p = cache_list;
CACHE *q = 0;
CACHE *r;
while (p != 0) {
if (p->string_at == string) {
#ifdef HAVE_TSEARCH
if (tdelete(p, &sorted_cache, compare_cache) == 0) {
continue;
}
trace_cache(__FILE__, __LINE__);
#endif
if (p->string != 0)
free(p->string);
if (p->list != 0)
free(p->list);
if (p == cache_list) {
cache_list = p->next;
r = cache_list;
} else {
q->next = p->next;
r = q;
}
free(p);
p = r;
} else {
q = p;
p = p->next;
}
}
}
#else
(void) string;
#endif
}
#ifdef NO_LEAKS
void
_dlg_inputstr_leaks(void)
{
#if USE_CACHING
dialog_state.finish_string = TRUE;
trace_cache(__FILE__, __LINE__);
while (cache_list != 0) {
CACHE *next = cache_list->next;
#ifdef HAVE_TSEARCH
tdelete(cache_list, &sorted_cache, compare_cache);
#endif
if (cache_list->string != 0)
free(cache_list->string);
if (cache_list->list != 0)
free(cache_list->list);
free(cache_list);
cache_list = next;
dlg_finish_string(cache_list->string_at);
}
#endif /* USE_CACHING */
}

View File

@ -1,7 +1,7 @@
# $Id: makefile.in,v 1.83 2012/10/06 14:05:14 tom Exp $
# $Id: makefile.in,v 1.87 2013/09/02 19:51:58 tom Exp $
# template makefile for DIALOG
##############################################################################
# Copyright (c) 1999-2011,2012 Thomas E. Dickey #
# Copyright (c) 1999-2012,2013 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -41,10 +41,24 @@ top_builddir = .
x = @EXEEXT@
o = .@OBJEXT@
a = @LIB_SUFFIX@
DESTDIR =
THIS = dialog
CFG_ROOTNAME = @CFG_ROOTNAME@
HDR_ROOTNAME = @HDR_ROOTNAME@
LIB_ROOTNAME = @LIB_ROOTNAME@
LIB_SUFFIX = @LIB_SUFFIX@
VERSION_MAJOR = @VERSION_MAJOR@
VERSION_MINOR = @VERSION_MINOR@
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
REL_VERSION = @REL_VERSION@
ABI_VERSION = @ABI_VERSION@
LIB_ROOTNAME = @LIB_ROOTNAME@
@SET_SHLIB_VARS@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
@ -72,6 +86,7 @@ LIBS = @LIBS@ @INTLLIBS@
RANLIB = @LIB_PREP@
RM = rm -f
LN_S = @LN_S@
LINT = @LINT@
LINT_OPTS = @LINT_OPTS@
@ -99,11 +114,11 @@ LINK = $(LIBTOOL_LINK)
# renamed at install time, starting with the package name.
PACKAGE = @PACKAGE@
ACTUAL_PROG = `echo $(PACKAGE) |sed @program_transform_name@`
LIB_CONFIG = @PACKAGE@-config
LIB_CONFIG = $(CFG_ROOTNAME)-config
# The library name $(LIB) is set at configure/make time, since it is used as a
# makefile target. Ditto for $(PROG).
LIB = @LIB_PREFIX@@PACKAGE@$a
LIB = @LIB_TARGET@
PROG = @PACKAGE@$x
#
# Standard .c to .o compile line.
@ -117,7 +132,7 @@ PROG = @PACKAGE@$x
@ECHO_CC@$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c $<
.1.html :
GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | groff -Thtml -man" >$@
GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | groff -P -o0 -I$*_ -Thtml -man" >$@
.1.ps :
$(SHELL) -c "tbl $< | groff -man" >$@
@ -178,10 +193,6 @@ all :: $(ALL)
dialog$o \
$(OBJECTS) : $(srcdir)/dialog.h $(srcdir)/dlg_keys.h dlg_config.h VERSION
$(LIB) : $(LIB_OBJECT)
$(LIBTOOL_CREATE) $(LIB) $(LIB_OBJECT)
$(RANLIB) $@
$(PROG)$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
$(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS) $(LIBS)

View File

@ -1,9 +1,9 @@
/*
* $Id: menubox.c,v 1.145 2012/12/30 21:11:02 tom Exp $
* $Id: menubox.c,v 1.148 2013/09/02 17:15:13 tom Exp $
*
* menubox.c -- implements the menu box
*
* Copyright 2000-2011,2012 Thomas E. Dickey
* Copyright 2000-2012,2013 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public Licens, version 2.1e
@ -191,19 +191,16 @@ input_menu_edit(ALL_DATA * data,
static int
handle_button(int code, DIALOG_LISTITEM * items, int choice)
{
char *help_result;
switch (code) {
case DLG_EXIT_OK: /* FALLTHRU */
case DLG_EXIT_EXTRA:
dlg_add_string(items[choice].name);
break;
case DLG_EXIT_HELP:
dlg_add_result("HELP ");
if (USE_ITEM_HELP(items[choice].help)) {
dlg_add_string(items[choice].help);
code = DLG_EXIT_ITEM_HELP;
} else {
dlg_add_string(items[choice].name);
}
dlg_add_help_listitem(&code, &help_result, &items[choice]);
dlg_add_string(help_result);
break;
}
return code;

View File

@ -1,5 +1,5 @@
/*
* $Id: mixedform.c,v 1.10 2013/03/17 15:03:41 tom Exp $
* $Id: mixedform.c,v 1.12 2013/09/02 17:02:05 tom Exp $
*
* mixedform.c -- implements the mixed form (i.e, typed pairs label/editbox)
*
@ -54,6 +54,7 @@ dialog_mixedform(const char *title,
DIALOG_FORMITEM *listitems;
DIALOG_VARS save_vars;
bool show_status = FALSE;
char *help_result;
dlg_save_vars(&save_vars);
dialog_vars.separate_output = TRUE;
@ -93,14 +94,9 @@ dialog_mixedform(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
dlg_add_result("HELP ");
dlg_add_help_formitem(&result, &help_result, &listitems[choice]);
show_status = dialog_vars.help_status;
if (USE_ITEM_HELP(listitems[choice].help)) {
dlg_add_string(listitems[choice].help);
result = DLG_EXIT_ITEM_HELP;
} else {
dlg_add_string(listitems[choice].name);
}
dlg_add_string(help_result);
if (show_status)
dlg_add_separator();
break;

View File

@ -1,3 +1,15 @@
cdialog (20130923) unstable; urgency=low
* improved memory-caching for gauge widget
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 21 Sep 2013 09:18:26 -0400
cdialog (20130902) unstable; urgency=low
* maintenance updates
-- Thomas E. Dickey <dickey@invisible-island.net> Sun, 01 Sep 2013 19:08:31 -0400
cdialog (20130523) unstable; urgency=low
* minor fixes

View File

@ -4,7 +4,7 @@ Current dialog upstream maintainer: Thomas Dickey <dickey@invisible-island.net>
-------------------------------------------------------------------------------
Files: *.c *.h
Copyright 2000-2008,2010 Thomas E. Dickey
Copyright 2000-2012,2013 Thomas E. Dickey
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License, version 2.1
@ -27,7 +27,7 @@ Files: *.c *.h
Files: aclocal.m4
Licence: other-BSD
Copyright: 1999-2009,2010 by Thomas E. Dickey
Copyright: 1999-2010,2013 by Thomas E. Dickey
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
@ -88,7 +88,7 @@ Licence: other-BSD
shared with many OS's install programs.
Files: debian/*
Copyright: 2010 Thomas E. Dickey
Copyright: 2010-2012,2013 Thomas E. Dickey
Licence: other-BSD
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,

View File

@ -1,9 +1,9 @@
Summary: dialog - display dialog boxes from shell scripts
%define AppProgram dialog
%define AppVersion 1.2
%define AppRelease 20130523
%define AppRelease 20130923
%define ActualProg c%{AppProgram}
# $XTermId: dialog.spec,v 1.50 2013/05/24 00:13:31 tom Exp $
# $XTermId: dialog.spec,v 1.54 2013/09/23 23:08:24 tom Exp $
Name: %{ActualProg}
Version: %{AppVersion}
Release: %{AppRelease}

View File

@ -0,0 +1,48 @@
# New ports collection makefile for: ncdialog
# Date created: 2003-01-11
# Whom: AlanE <alane@freebsd.org>
#
# $Carpetsmoker: ports/cdialog/Makefile,v 1.4 2007/04/22 11:30:53 carpetsmoker Exp $
# $FreeBSD$
#
PORTNAME= cdialog
PORTVERSION= 1.2.20130923
PORTEPOCH= 1
CATEGORIES= devel
MASTER_SITES= ftp://invisible-island.net/${PORTNAME:S|^c||}/
DISTNAME= ${PORTNAME:S|^c||}-${PORTVERSION:R}-${PORTVERSION:E}
EXTRACT_SUFX= .tgz
MAINTAINER= sylvio@FreeBSD.org
COMMENT= An enhanced version of 'dialog' to work with ncurses
LICENSE= LGPL21
USE_AUTOTOOLS= libtool
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --enable-widec \
--includedir=${PREFIX}/include/${PORTNAME} \
--with-libtool \
--with-ncursesw \
--with-package=${PORTNAME}
MAKEFILE= makefile
MAN1= cdialog.1
MAN3= cdialog.3
MANCOMPRESSED= no
INSTALL_TARGET= install-strip install-man install-lib
.if !defined(NOPORTEXAMPLES)
post-patch:
@${FIND} ${WRKSRC}/samples/ -type f -exec ${REINPLACE_CMD} -i "" "s|dialog|cdialog|g" {} \;
post-install:
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC}/samples && ${FIND} . | \
${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (dialog-1.1-20120215.tgz) = 883c58498663d939b18f3aea56976b64268b736d1579ac850512e5d5a4a2eafc
SIZE (dialog-1.1-20120215.tgz) = 441234

View File

@ -0,0 +1,9 @@
This is an enhanced version of the 'dialog' command. Quoting Thomas Dickey,
the ncurses developer, "DIALOG was written by Savio Lam <lam836@cs.cuhk.hk>
and modified by several people.
"Initially, I made fixes and reviewed the code to ensure that problems
reported were not related to ncurses. After that, I resumed development,
adding new widget types. See the changelog for details."
WWW: http://invisible-island.net/dialog/

View File

@ -0,0 +1,203 @@
bin/cdialog
bin/cdialog-config
include/cdialog/dialog.h
include/cdialog/dlg_colors.h
include/cdialog/dlg_config.h
include/cdialog/dlg_keys.h
lib/libcdialog.a
lib/libcdialog.la
lib/libcdialog.so
lib/libcdialog.so.10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/README
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/calendar
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/calendar-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/calendar2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/calendar2-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/calendar3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/calendar3-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist-8bit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist11
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/checklist9.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/admin.funcs
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/common.funcs
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.funcs
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifman1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifman2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifmcfg2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifmcfg4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifmcfg5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifpoll1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifpoll2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifreq1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.ifreq2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.rcnews
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.sendifm1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.sendifm2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.trnrc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/copi.wheel
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copifuncs/ifpatch
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/copismall
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/debian.rc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dialog.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/editbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/editbox-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/editbox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/editbox3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/editbox4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form1-both
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form1-extra
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form1-help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form1-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/form6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect0
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect1-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/fselect2-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gauge
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gauge0
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gauge0-input-fd
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/gauge2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/infobox6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox-both
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox-extra
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox-help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox6-8bit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox6-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputbox7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputmenu
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputmenu-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputmenu1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputmenu2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputmenu3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/inputmenu4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/install/FDISK.TEST
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/install/makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/install/makefile.in
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/install/setup.c
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/install/setup.help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/killall
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/listing
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox-8bit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/menubox9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mixedform
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mixedform2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mixedgauge
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox-help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox4-8bit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox4-eucjp
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox4-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox6
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/msgbox6a
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/password
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/password1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/password2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/passwordform1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/passwordform1-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pause
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pause-both
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pause-extra
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pause-help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/prgbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/prgbox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/programbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/programbox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/progress
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/progress2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/radiolist
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/radiolist1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/radiolist10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/radiolist2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/radiolist3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/radiolist4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/report-button
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/report-edit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/report-string
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/report-tempfile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/report-yesno
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rotated-data
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/setup-edit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/setup-tempfile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/setup-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/setup-vars
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/shortlist
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/slackware.rc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sourcemage.rc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/suse.rc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tailbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tailboxbg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tailboxbg1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/tailboxbg2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/testdata-8bit
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/textbox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/textbox-both
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/textbox-help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/textbox.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/textbox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/textbox3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/timebox
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/timebox-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/timebox2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/timebox2-stdout
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/wheel
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/whiptail.rc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno-both
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno-extra
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno-help
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno-utf8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yesno4
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/install
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/copifuncs
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
@dirrm include/cdialog

113
contrib/dialog/po/fa.po Normal file
View File

@ -0,0 +1,113 @@
# Dialog
# Copyright 2003-2007,2008 # Thomas Dickey
# This file is distributed under the same license as the dialog package.
#
# Seyed Ali Akbar Najafian <s.ali.najafian@chmail.ir>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
"PO-Revision-Date: 2013-08-03 17:04+0330\n"
"Last-Translator: سید‌علی‌اکبر نجفیان <s.ali.najafian@chmail.ir>\n"
"Language-Team: Persian <translation-team-fa@lists.sourceforge.net>\n"
"Language: persian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
#: buttons.c:385
#, fuzzy
msgid "Yes"
msgstr "بله"
#: buttons.c:393
msgid "No"
msgstr "خیر"
#: buttons.c:401
msgid "OK"
msgstr "باشه"
#: buttons.c:409
msgid "Cancel"
msgstr "لغو"
#: buttons.c:417
msgid "EXIT"
msgstr "خروج"
#: buttons.c:425
msgid "Extra"
msgstr "اضافس"
#: buttons.c:433
msgid "Help"
msgstr "راهنما"
#. Headline "Month"
#: calendar.c:273
msgid "Month"
msgstr "ماه"
#. Headline "Year"
#: calendar.c:293
msgid "Year"
msgstr "سال"
#: dialog.c:741
msgid "Rename"
msgstr "تغییر نام"
#: fselect.c:550
msgid "Directories"
msgstr "مسیرها"
#: fselect.c:551
msgid "Files"
msgstr "پرونده‌ها"
#: mixedgauge.c:58
msgid "Succeeded"
msgstr "موفقیت آمیز"
#: mixedgauge.c:61
msgid "Failed"
msgstr "شکست خورد"
#: mixedgauge.c:64
msgid "Passed"
msgstr "متوقف شد"
#: mixedgauge.c:67
msgid "Completed"
msgstr "کامل شد"
#: mixedgauge.c:70
msgid "Checked"
msgstr "بررسی شد"
#: mixedgauge.c:73
msgid "Done"
msgstr "انجام شد"
#: mixedgauge.c:76
msgid "Skipped"
msgstr "رها شد"
#: mixedgauge.c:79
msgid "In Progress"
msgstr "در حال پیشرفت"
#: mixedgauge.c:85
msgid "N/A"
msgstr "N/A"
#: mixedgauge.c:193
msgid "Overall Progress"
msgstr "پیشرفت جاری"
#: textbox.c:489
msgid "Search"
msgstr "جستجو"

View File

@ -1,79 +1,79 @@
# translation of dialog-1.1.20070704 to Lithuanian
# translation of dialog to Lithuanian
# This file is distributed under the same license as the dialog package.
#
# Gintautas Miliauskas <gintas@akl.lt>, 2008.
# Rimas Kudelis <rq@akl.lt>, 2013.
msgid ""
msgstr ""
"Project-Id-Version: dialog-1.1.20070704\n"
"Project-Id-Version: dialog-1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-01-16 17:57-0500\n"
"PO-Revision-Date: 2008-05-14 02:51+0300\n"
"Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
"PO-Revision-Date: 2013-06-28 18:38+0300\n"
"Last-Translator: Rimas Kudelis <rq@akl.lt>\n"
"Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
"Language: lt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Virtaal 0.7.1\n"
#: buttons.c:387
#: buttons.c:385
msgid "Yes"
msgstr "Taip"
#: buttons.c:395
#: buttons.c:393
msgid "No"
msgstr "Ne"
#: buttons.c:403
#: buttons.c:401
msgid "OK"
msgstr "OK"
msgstr "Gerai"
#: buttons.c:411
#: buttons.c:409
msgid "Cancel"
msgstr "Atmesti"
msgstr "Atsisakyti"
#: buttons.c:419
#: buttons.c:417
msgid "EXIT"
msgstr "IŠEITI"
#: buttons.c:427
#: buttons.c:425
msgid "Extra"
msgstr "Papildoma"
msgstr "Kita"
#: buttons.c:435
#: buttons.c:433
msgid "Help"
msgstr "Žinynas"
#. Headline "Month"
#: calendar.c:298
#: calendar.c:273
msgid "Month"
msgstr "Mėnuo"
#. Headline "Year"
#: calendar.c:318
#: calendar.c:293
msgid "Year"
msgstr "Metai"
#: dialog.c:756
#: dialog.c:741
msgid "Rename"
msgstr "Pervadinti"
#: fselect.c:571
#: fselect.c:550
msgid "Directories"
msgstr "Aplankai"
#: fselect.c:572
#: fselect.c:551
msgid "Files"
msgstr "Failai"
#: mixedgauge.c:58
msgid "Succeeded"
msgstr "Sėkminga"
msgstr "Pavyko"
#: mixedgauge.c:61
msgid "Failed"
msgstr "Nesėkminga"
msgstr "Nepavyko"
#: mixedgauge.c:64
msgid "Passed"
@ -81,7 +81,7 @@ msgstr "Praėjo"
#: mixedgauge.c:67
msgid "Completed"
msgstr "Baigta"
msgstr "Užbaigta"
#: mixedgauge.c:70
msgid "Checked"
@ -89,11 +89,11 @@ msgstr "Patikrinta"
#: mixedgauge.c:73
msgid "Done"
msgstr "Baigta"
msgstr "Atlikta"
#: mixedgauge.c:76
msgid "Skipped"
msgstr "Peršokta"
msgstr "Praleista"
#: mixedgauge.c:79
msgid "In Progress"
@ -101,12 +101,12 @@ msgstr "Vykdoma"
#: mixedgauge.c:85
msgid "N/A"
msgstr "N/d"
msgstr "Nepasiekiama"
#: mixedgauge.c:193
msgid "Overall Progress"
msgstr "Bendras progresas"
#: textbox.c:468
#: textbox.c:489
msgid "Search"
msgstr "Ieškoti"

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $Id: inputbox6-utf8,v 1.8 2010/01/13 10:20:03 tom Exp $
# $Id: inputbox6-utf8,v 1.9 2013/09/24 00:06:02 tom Exp $
. ./setup-vars
@ -7,10 +7,11 @@
. ./setup-utf8
TITLE="あいうえお"
$DIALOG \
--title `printf "\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a"` "$@" \
--inputbox `printf "\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a"` \
10 20 ".." 2>$tempfile
--title "$TITLE" "$@" \
--inputbox "$TITLE" 10 20 ".." 2>$tempfile
retval=$?

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $Id: report-tempfile,v 1.4 2012/06/29 09:29:47 tom Exp $
# $Id: report-tempfile,v 1.5 2013/09/02 18:03:13 tom Exp $
# Report results in a temporary-file.
# vile:shmode
@ -9,11 +9,11 @@ case $retval in
$DIALOG_CANCEL)
echo "Cancel pressed.";;
$DIALOG_HELP)
echo "Help pressed.";;
echo "Help pressed: `cat $tempfile`";;
$DIALOG_EXTRA)
echo "Extra button pressed.";;
$DIALOG_ITEM_HELP)
echo "Item-help button pressed.";;
echo "Item-help button pressed: `cat $tempfile`";;
$DIALOG_ESC)
if test -s $tempfile ; then
cat $tempfile

View File

@ -1,5 +1,5 @@
/*
* $Id: treeview.c,v 1.22 2013/05/23 23:35:46 tom Exp $
* $Id: treeview.c,v 1.24 2013/09/02 17:13:33 tom Exp $
*
* treeview.c -- implements the treeview dialog
*
@ -579,6 +579,7 @@ dialog_treeview(const char *title,
int *depths;
bool show_status = FALSE;
int current = 0;
char *help_result;
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_treeview");
@ -617,31 +618,16 @@ dialog_treeview(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
dlg_add_result("HELP ");
show_status = dialog_vars.help_status;
if (USE_ITEM_HELP(listitems[current].help)) {
if (show_status) {
if (dialog_vars.separate_output) {
dlg_add_string(listitems[current].help);
dlg_add_separator();
} else {
dlg_add_quoted(listitems[current].help);
}
dlg_add_help_listitem(&result, &help_result, &listitems[current]);
if ((show_status = dialog_vars.help_status)) {
if (dialog_vars.separate_output) {
dlg_add_string(help_result);
dlg_add_separator();
} else {
dlg_add_string(listitems[current].help);
dlg_add_quoted(help_result);
}
result = DLG_EXIT_ITEM_HELP;
} else {
if (show_status) {
if (dialog_vars.separate_output) {
dlg_add_string(listitems[current].name);
dlg_add_separator();
} else {
dlg_add_quoted(listitems[current].name);
}
} else {
dlg_add_string(listitems[current].name);
}
dlg_add_string(help_result);
}
break;
}

View File

@ -1,5 +1,5 @@
/*
* $Id: util.c,v 1.255 2013/05/23 22:58:28 tom Exp $
* $Id: util.c,v 1.258 2013/09/22 00:41:40 tom Exp $
*
* util.c -- miscellaneous utilities for dialog
*
@ -589,18 +589,21 @@ end_dialog(void)
int
dlg_count_real_columns(const char *text)
{
int result = dlg_count_columns(text);
if (result && dialog_vars.colors) {
int hidden = 0;
while (*text) {
if (dialog_vars.colors && isOurEscape(text)) {
hidden += ESCAPE_LEN;
text += ESCAPE_LEN;
} else {
++text;
int result = 0;
if (*text) {
result = dlg_count_columns(text);
if (result && dialog_vars.colors) {
int hidden = 0;
while (*text) {
if (dialog_vars.colors && isOurEscape(text)) {
hidden += ESCAPE_LEN;
text += ESCAPE_LEN;
} else {
++text;
}
}
result -= hidden;
}
result -= hidden;
}
return result;
}
@ -924,6 +927,7 @@ dlg_print_line(WINDOW *win,
test_ptr++;
if (*test_ptr == '\n')
test_ptr++;
dlg_finish_string(prompt);
return (test_ptr);
}
@ -1989,6 +1993,7 @@ dlg_draw_title(WINDOW *win, const char *title)
wmove(win, 0, x);
dlg_print_text(win, title, getmaxx(win) - x, &attr);
(void) wattrset(win, save);
dlg_finish_string(title);
}
}
@ -2552,6 +2557,32 @@ dlg_add_separator(void)
dlg_add_result(separator);
}
#define HELP_PREFIX "HELP "
void
dlg_add_help_listitem(int *result, char **tag, DIALOG_LISTITEM * item)
{
dlg_add_result(HELP_PREFIX);
if (USE_ITEM_HELP(item->help)) {
*tag = dialog_vars.help_tags ? item->name : item->help;
*result = DLG_EXIT_ITEM_HELP;
} else {
*tag = item->name;
}
}
void
dlg_add_help_formitem(int *result, char **tag, DIALOG_FORMITEM * item)
{
dlg_add_result(HELP_PREFIX);
if (USE_ITEM_HELP(item->help)) {
*tag = dialog_vars.help_tags ? item->name : item->help;
*result = DLG_EXIT_ITEM_HELP;
} else {
*tag = item->name;
}
}
/*
* Some widgets support only one value of a given variable - save/restore the
* global dialog_vars so we can override it consistently.

View File

@ -7,7 +7,7 @@
#define CURSES_WACS_ARRAY _nc_wacs
#define CURSES_WACS_SYMBOLS 1
#define DIALOG_PATCHDATE 20130523
#define DIALOG_PATCHDATE 20130923
#define DIALOG_VERSION "1.2"
#define HAVE_ALLOCA 1
#define HAVE_BTOWC 1