Update dialog to 20120706: includes minor useability enhancements and
fixes for warnings encountered with clang.
This commit is contained in:
commit
2a664c03e5
@ -1,9 +1,172 @@
|
||||
-- $Id: CHANGES,v 1.360 2011/07/07 23:35:10 tom Exp $
|
||||
-- $Id: CHANGES,v 1.419 2012/07/06 18:18:48 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:
|
||||
|
||||
2012/07/06
|
||||
+ modify samples/setup-tempfile to work with Tru64's shell.
|
||||
+ modify inputmenu sample scripts to make them more portable:
|
||||
+ use "id" rather than "$GROUPS", use sed to work with Solaris.
|
||||
+ use sed to split-up the rename results to work with HPUX.
|
||||
+ fix regression in msgbox (ArchLinux #30574)
|
||||
|
||||
2012/07/03
|
||||
+ modify prgbox widget to work with --extra-button, etc.
|
||||
+ add case values to several widgets to allow for mouse-clicks with
|
||||
"--extra-button" and "--help-button" additions.
|
||||
+ correct timebox widget's exit code for "--extra-button" when handing
|
||||
the "enter" key.
|
||||
+ modify msgbox widget to honor "--extra-button".
|
||||
+ corrected processing of "--trace" option, which did not update the
|
||||
index into command-line to point past its value.
|
||||
+ add a check in dialog program for valid characters used in option,
|
||||
e.g., to generate an error if a script attempts to add option value
|
||||
using "=" rather than with whitespace.
|
||||
+ add new command-line option --default-button and library function
|
||||
dlg_default_button() to retrieve the value set by the option
|
||||
to provide a way to set the default button directly rather than
|
||||
by combining --nook, etc. (patch by Zoltan Kelemen).
|
||||
+ amend include of unctrl.h to apply only to the case where curses.h
|
||||
is included, to avoid conflict of ncurses' unctrl.h with a system
|
||||
implementation (report by Martin Roedlach)
|
||||
+ add limit-check to dlg_toupper() in non-wide curses mode to work
|
||||
when non-character values such as arrow-key codes are passed to
|
||||
it (patch by Zoltan Kelemen).
|
||||
+ override timeout value, e.g., as set via --timeout command-line
|
||||
option in pause widget because that interferes with pause's behavior
|
||||
(report by Jan Spitalnik).
|
||||
+ modify samples/inputmenu* to allow ":" in renamed text (report by
|
||||
Andreas Stoewing).
|
||||
+ modify double-quoting to make it more consistent, i.e., checklist
|
||||
output is quoted only when needed. This fixes the case where
|
||||
single-quotes were used whether or not needed, but also modifies
|
||||
older checklist behavior for double-quoting which always added those
|
||||
(Debian #663664).
|
||||
+ correct exit-code used in inputmenu for "rename" button (Debian
|
||||
#673041, forwarded from Ubuntu #333909, patch by Lebedev Vadim).
|
||||
+ update el.po and hr.po from
|
||||
http://translationproject.org/latest/dialog/
|
||||
+ use checkbashisms to clean up sample scripts.
|
||||
|
||||
2012/02/15
|
||||
+ modify menubox.c to use the same improvement as in checklist.c
|
||||
+ improve auto width computation for checklist widget by using
|
||||
dlg_calc_list_width as in the non-auto case (Edho Arief).
|
||||
+ eliminate some bashisms in the sample scripts (Pedro Giffuni).
|
||||
+ makefile fixes from FreeBSD ports (Li-Wen Hsu):
|
||||
+ make --with-package option of configure script work.
|
||||
+ get LIBTOOL_VERSION from configure script, needed by
|
||||
${LIBTOOL_VERSION} in LIBTOOL_CREATE (LIB_CREATE in configure and
|
||||
aclocal.m4)
|
||||
+ update cs.po and sr.po from
|
||||
http://translationproject.org/latest/dialog/
|
||||
+ updated configure script macros, improving CF_XOPEN_SOURCE among
|
||||
other fixes.
|
||||
|
||||
2011/10/20
|
||||
+ fix --analyze warnings for clang versions 2.8, 2.9.
|
||||
+ add configure check for lint program.
|
||||
+ add check in dlg_getc() in case its window is freed as a side effect
|
||||
of removing callbacks.
|
||||
+ fix logic in freeing subwindows (report by xDog Walker).
|
||||
+ fix a regression in logic distinguishing between inputmenu and menu
|
||||
widgets (report by xDog Walker).
|
||||
+ minor fixes to library manpage.
|
||||
|
||||
2011/10/18
|
||||
+ modify header-sh.in to work around limit on sed script length on
|
||||
HPUX.
|
||||
+ add a special case of parameter parsing for "--trace" to the
|
||||
initialization done before calling init_dialog(), to allow users to
|
||||
capture the initial state of the parameter list before any options
|
||||
are processed and removed. This is only done if "--trace" is the
|
||||
first option, otherwise it is handled in the common options as before
|
||||
(report by xDog Walker).
|
||||
+ modify samples/testdata-8bit, discarding $1 from the parameter list
|
||||
if it was used, so that the source'ing scripts can consistently use
|
||||
"$@" to insert parameters before the widget, e.g., as an alternative
|
||||
to using $DIALOGOPTS (report by xDog Walker).
|
||||
+ modify treatment of function pointers in menubox.c, make
|
||||
dlg_renamed_menutext() and dlg_dummy_menutext() visible to library
|
||||
users (request by xDog Walker).
|
||||
+ add dlg_count_real_columns(), use to modify centering for "--hline"
|
||||
text to account for "\Z"s (report by xDog Walker).
|
||||
+ improve check in dlg_draw_arrows2() for conflict between the window
|
||||
title and up-arrow marker to take into account that the given window
|
||||
may not be the top-level window of the widget.
|
||||
+ change width of page up/down mouse areas in fselect panes to use the
|
||||
full width of the panes rather than only the portion from the left
|
||||
margin to the up/down arrow.
|
||||
+ add/use dlg_draw_box2() and dlg_draw_bottom_box2() to use the
|
||||
secondary borders.
|
||||
+ modify rc-file read/write to accept/generate color values that refer
|
||||
to previously-processed items in the color table. This reduces the
|
||||
number of distinct colors that must be specified to set up a color
|
||||
scheme.
|
||||
+ add color table entries for secondary borders, i.e., the ones that
|
||||
are normally drawn with the dialog's text-colors (Debian #641168).
|
||||
+ modify fselect.c to scan the current directory if the input field
|
||||
happens to be empty (Debian #640905).
|
||||
+ repeated the discussion of environment variables that can override
|
||||
the exit-status values in the manpage's return-codes section
|
||||
(Debian #642105).
|
||||
+ add an example to the manpage showing how to override the form
|
||||
widget's keys used for field/button traversal (Debian #642108).
|
||||
+ modify call to dlg_register_window() in formbox.c so that the editing
|
||||
bindings are attached to the form sub-window rather than the
|
||||
top-level dialog window. Also change the name by which the editing
|
||||
bindings are bound for editbox.c, fselect.c and inputbox.c, so that
|
||||
the editing and navigation bindings can be different.
|
||||
+ correct logic in dlg_lookup_key() so that it matches the widget name
|
||||
before using a binding from .dialogrc, allowing the inner/outer
|
||||
windows of form and other editing widgets to have different bindings.
|
||||
+ modify dlg_register_window() to call dlg_dump_window_keys() after
|
||||
its updates, via the --trace output, to supplement the manpage
|
||||
description of key bindings (Debian #642108).
|
||||
+ add DLGK_FORM_PREV and DLGK_FORM_NEXT key-bindings to form.c, to
|
||||
allow binding a single key to traverse both form-fields and buttons
|
||||
(Debian #642108).
|
||||
+ modify dlg_parse_rc() to check for error return from
|
||||
dlg_parse_bindkey().
|
||||
+ add function dlg_dump_window_keys(), to help with debugging widgets.
|
||||
+ add CR, LF, TAB, FF and ESC to table of curses names to help make
|
||||
key bindings more readable.
|
||||
+ update table of dialog key-names so that helpfile and trace are
|
||||
dumped properly.
|
||||
+ correct dlg_dump_keys(), which was showing only the first item in
|
||||
the matched binding table.
|
||||
+ save/restore window current position in dlg_update_mixedgauge().
|
||||
+ pass return-code from pause_for_ok() from dlg_progressbox() when
|
||||
pauseopt is set, rather than only DLG_OK.
|
||||
+ call setlocale() in init_dialog() rather than relying on on-demand
|
||||
use within inputstr.c, since there are paths in textbox widget which
|
||||
do not exercise the latter (report by xDog Walker).
|
||||
+ fix some places where checks for "\Z" were done without also checking
|
||||
dialog_vars.colors (report by Moray Henderson).
|
||||
+ correct logic for DIALOGOPTS parsing so that the parse happens only
|
||||
once unless memory leak checking is enabled (report by xDog Walker).
|
||||
+ remove an incorrect free() call in dlg_free_gauge() (report by xDog
|
||||
Walker).
|
||||
+ modify dlg_trace_win() to log wide-characters (report by xDog Walker).
|
||||
+ make traces shorter by skipping repeated ERR's, but showing the
|
||||
number skipped (report by xDog Walker).
|
||||
+ improve description in manpage to distinguish program box and
|
||||
progress box from tailboxes (adapted from email by xDog Walker).
|
||||
+ modify dlg_trace_win() so that it looks for the topmost window in a
|
||||
dialog. Because subwindows share space with the top window, tracing
|
||||
the latter shows the whole widget (report by xDog Walker).
|
||||
+ expand tracing so that each window is traced before soliciting input,
|
||||
making the ^T feature to print a window on demand partly redundant
|
||||
(suggested by xDog Walker).
|
||||
+ cosmetic change in dialog.h to avoid "*/*" strings from comments next
|
||||
to "*" (report by xDog Walker).
|
||||
+ ensure result from dlg_align_columns() has trailing null on each
|
||||
string. Analysis was hindered by libc6's continuance of libc5's
|
||||
early-1990s misfeature of clearing the result from malloc, noting
|
||||
that libc6's documentation incorrectly claims that it does not do
|
||||
this (report by xDog Walker).
|
||||
|
||||
2011/07/07
|
||||
+ modify util.c to work better with old versions of ncurses:
|
||||
+ suppress use of wchgat() before fix in 20060715 which is needed
|
||||
@ -87,7 +250,7 @@ to it:
|
||||
+ CF_XOPEN_SOURCE, workaround for cygwin to get ncurses' configure
|
||||
script to define _XOPEN_SOURCE_EXTENDED (cygwin's features.h
|
||||
doesn't do anything, so it needs a crutch).
|
||||
+ updated config.guess, config.sub
|
||||
+ update config.guess, config.sub
|
||||
|
||||
2011/03/02
|
||||
+ add --prgbox and --programbox (adapted from patch by David Boyd).
|
||||
@ -155,7 +318,7 @@ to it:
|
||||
CF_ADD_LIBDIR for the curses-directory here, from
|
||||
CF_NCURSES_CPPFLAGS and CF_NCURSES_LDFLAGS, so it will work even
|
||||
with the default checking, e.g., no --with-ncurses, etc.
|
||||
+ updated config.guess, config.sub
|
||||
+ update config.guess, config.sub
|
||||
|
||||
2010/04/28
|
||||
+ several improvements to configure script:
|
||||
@ -250,7 +413,7 @@ to it:
|
||||
libutf8 and libiconv.
|
||||
+ update da.po, ru.po from
|
||||
http://translationproject.org/latest/dialog/
|
||||
+ updated config.guess, config.sub
|
||||
+ update config.guess, config.sub
|
||||
|
||||
2008/08/19
|
||||
+ amend changes to quoting; by default, the checklist widget quotes its
|
||||
@ -333,7 +496,7 @@ to it:
|
||||
ESC to be returned, quitting dialog (report by Reiner Huober).
|
||||
+ add extern "C" declarations to dlg_keys.h so the corresponding
|
||||
function declarations are exported to C++ as C symbols.
|
||||
+ updated config.guess, config.sub
|
||||
+ update config.guess, config.sub
|
||||
|
||||
2007/06/04
|
||||
+ fix a memory leak in editbox.c
|
||||
@ -436,7 +599,7 @@ to it:
|
||||
CF_CURSES_LIBS, CF_INCLUDE_DIRS, CF_LARGEFILE, CF_MAKEFLAGS,
|
||||
CF_PATH_SYNTAX, CF_SUBDIR_PATH, CF_SUBST, CF_WITH_DBMALLOC,
|
||||
CF_WITH_DMALLOC, CF_WITH_LIBTOOL and CF_XOPEN_SOURCE.
|
||||
+ updated config.guess, config.sub
|
||||
+ update config.guess, config.sub
|
||||
> adapted fixes from SuSE package (Werner Fink):
|
||||
+ add some limit-checks in dlg_draw_shadow().
|
||||
+ make shadows resizable, using new dlg_move_window() in msgbox.c
|
||||
|
@ -1 +1 @@
|
||||
10:0:0 1.1 20110707
|
||||
10:4:0 1.1 20120706
|
||||
|
198
contrib/dialog/aclocal.m4
vendored
198
contrib/dialog/aclocal.m4
vendored
@ -1,7 +1,7 @@
|
||||
dnl macros used for DIALOG configure script
|
||||
dnl $Id: aclocal.m4,v 1.82 2011/06/28 22:48:31 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.87 2012/02/16 02:11:26 tom Exp $
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Copyright 1999-2010,2011 -- Thomas E. Dickey
|
||||
dnl Copyright 1999-2011,2012 -- 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
|
||||
@ -592,6 +592,31 @@ changequote([,])dnl
|
||||
AC_SUBST(GENCAT)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_ACVERSION_CHECK version: 2 updated: 2011/05/08 11:22:03
|
||||
dnl ------------------
|
||||
dnl Conditionally generate script according to whether we're using a given autoconf.
|
||||
dnl
|
||||
dnl $1 = version to compare against
|
||||
dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
|
||||
dnl $3 = code to use if AC_ACVERSION is older than $1.
|
||||
define(CF_ACVERSION_CHECK,
|
||||
[
|
||||
ifdef([m4_version_compare],
|
||||
[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
|
||||
[CF_ACVERSION_COMPARE(
|
||||
AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
|
||||
AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_ACVERSION_COMPARE version: 2 updated: 2011/04/14 20:56:50
|
||||
dnl --------------------
|
||||
dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
|
||||
dnl MAJOR2, MINOR2, TERNARY2,
|
||||
dnl PRINTABLE2, not FOUND, FOUND)
|
||||
define(CF_ACVERSION_COMPARE,
|
||||
[ifelse(builtin([eval], [$2 < $5]), 1,
|
||||
[ifelse([$8], , ,[$8])],
|
||||
[ifelse([$9], , ,[$9])])])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56
|
||||
dnl ------------
|
||||
dnl Conditionally generate script according to whether we're using the release
|
||||
@ -1227,7 +1252,7 @@ fi
|
||||
AC_CHECK_HEADERS($cf_cv_ncurses_header)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_CURSES_LIBS version: 34 updated: 2011/04/09 14:51:08
|
||||
dnl CF_CURSES_LIBS version: 35 updated: 2011/08/09 21:06:37
|
||||
dnl --------------
|
||||
dnl Look for the curses libraries. Older curses implementations may require
|
||||
dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first.
|
||||
@ -1307,7 +1332,7 @@ if test ".$ac_cv_func_initscr" != .yes ; then
|
||||
# Check for library containing tgoto. Do this before curses library
|
||||
# because it may be needed to link the test-case for initscr.
|
||||
AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
|
||||
for cf_term_lib in $cf_check_list termcap termlib unknown
|
||||
for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
|
||||
do
|
||||
AC_CHECK_LIB($cf_term_lib,tgoto,[break])
|
||||
done
|
||||
@ -1533,6 +1558,30 @@ fi
|
||||
test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_CURSES_WGETPARENT version: 2 updated: 2011/10/17 20:12:04
|
||||
dnl --------------------
|
||||
dnl Check for curses support for directly determining the parent of a given
|
||||
dnl window. Some implementations make this difficult, so we provide for
|
||||
dnl defining an application-specific function that gives this functionality.
|
||||
dnl
|
||||
dnl $1 = name of function to use if the feature is missing
|
||||
AC_DEFUN([CF_CURSES_WGETPARENT],[
|
||||
CF_CURSES_FUNCS(wgetparent)
|
||||
if test "x$cf_cv_func_wgetparent" != xyes
|
||||
then
|
||||
AC_MSG_CHECKING(if WINDOW has _parent member)
|
||||
AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
|
||||
[WINDOW *p = stdscr->_parent],
|
||||
[cf_window__parent=yes],
|
||||
[cf_window__parent=no])
|
||||
AC_MSG_RESULT($cf_window__parent)
|
||||
if test "$cf_window__parent" = yes
|
||||
then
|
||||
AC_DEFINE(HAVE_WINDOW__PARENT)
|
||||
fi
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
|
||||
dnl ----------
|
||||
dnl "dirname" is not portable, so we fake it with a shell script.
|
||||
@ -2337,7 +2386,7 @@ ifdef([AC_FUNC_FSEEKO],[
|
||||
])
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_LD_RPATH_OPT version: 4 updated: 2011/06/04 20:09:13
|
||||
dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41
|
||||
dnl ---------------
|
||||
dnl For the given system and compiler, find the compiler flags to pass to the
|
||||
dnl loader to use the "rpath" feature.
|
||||
@ -2361,7 +2410,7 @@ linux*|gnu*|k*bsd*-gnu) #(vi
|
||||
openbsd[[2-9]].*|mirbsd*) #(vi
|
||||
LD_RPATH_OPT="-Wl,-rpath,"
|
||||
;;
|
||||
freebsd*) #(vi
|
||||
dragonfly*|freebsd*) #(vi
|
||||
LD_RPATH_OPT="-rpath "
|
||||
;;
|
||||
netbsd*) #(vi
|
||||
@ -2420,11 +2469,11 @@ CF_SUBDIR_PATH($1,$2,lib)
|
||||
$1="$cf_library_path_list [$]$1"
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_LIB_PREFIX version: 8 updated: 2008/09/13 11:34:16
|
||||
dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
|
||||
dnl -------------
|
||||
dnl Compute the library-prefix for the given host system
|
||||
dnl $1 = variable to set
|
||||
AC_DEFUN([CF_LIB_PREFIX],
|
||||
define([CF_LIB_PREFIX],
|
||||
[
|
||||
case $cf_cv_system_name in #(vi
|
||||
OS/2*|os2*) #(vi
|
||||
@ -2645,7 +2694,7 @@ printf("old\n");
|
||||
,[$1=no])
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30
|
||||
dnl CF_NCURSES_CONFIG version: 9 updated: 2011/11/26 15:42:05
|
||||
dnl -----------------
|
||||
dnl Tie together the configure-script macros for ncurses.
|
||||
dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
|
||||
@ -2657,7 +2706,10 @@ AC_DEFUN([CF_NCURSES_CONFIG],
|
||||
cf_ncuconfig_root=ifelse($1,,ncurses,$1)
|
||||
|
||||
echo "Looking for ${cf_ncuconfig_root}-config"
|
||||
AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
|
||||
|
||||
CF_ACVERSION_CHECK(2.52,
|
||||
[AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
|
||||
[AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
|
||||
|
||||
if test "$NCURSES_CONFIG" != none ; then
|
||||
|
||||
@ -3171,6 +3223,14 @@ AC_SUBST(PROG_EXT)
|
||||
test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
|
||||
dnl ------------
|
||||
AC_DEFUN([CF_PROG_LINT],
|
||||
[
|
||||
AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
|
||||
AC_SUBST(LINT_OPTS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
|
||||
dnl ----------------
|
||||
dnl Remove all -U and -D options that refer to the given symbol from a list
|
||||
@ -3418,6 +3478,45 @@ ncursesw/term.h)
|
||||
esac
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
|
||||
dnl -------------------
|
||||
dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
|
||||
dnl can define it successfully.
|
||||
AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
|
||||
AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
],[
|
||||
#ifndef _XOPEN_SOURCE
|
||||
make an error
|
||||
#endif],
|
||||
[cf_cv_xopen_source=no],
|
||||
[cf_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
],[
|
||||
#ifdef _XOPEN_SOURCE
|
||||
make an error
|
||||
#endif],
|
||||
[cf_cv_xopen_source=no],
|
||||
[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
|
||||
CPPFLAGS="$cf_save"
|
||||
])
|
||||
])
|
||||
|
||||
if test "$cf_cv_xopen_source" != no ; then
|
||||
CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
|
||||
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
|
||||
cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
|
||||
CF_ADD_CFLAGS($cf_temp_xopen_source)
|
||||
fi
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44
|
||||
dnl -------------
|
||||
dnl Check to see if the BSD-style union wait is declared. Some platforms may
|
||||
@ -3680,7 +3779,7 @@ if test "$with_dmalloc" = yes ; then
|
||||
fi
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_WITH_LIBTOOL version: 27 updated: 2011/06/28 18:45:38
|
||||
dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32
|
||||
dnl ---------------
|
||||
dnl Provide a configure option to incorporate libtool. Define several useful
|
||||
dnl symbols for the makefile rules.
|
||||
@ -3781,7 +3880,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 #(vi
|
||||
cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
|
||||
cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi
|
||||
LT_UNDEF=-no-undefined
|
||||
;;
|
||||
esac
|
||||
@ -3950,7 +4049,7 @@ AC_TRY_LINK([
|
||||
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
|
||||
dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49
|
||||
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,
|
||||
@ -3966,7 +4065,7 @@ cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
|
||||
cf_xopen_source=
|
||||
|
||||
case $host_os in #(vi
|
||||
aix[[456]]*) #(vi
|
||||
aix[[4-7]]*) #(vi
|
||||
cf_xopen_source="-D_ALL_SOURCE"
|
||||
;;
|
||||
cygwin) #(vi
|
||||
@ -3977,6 +4076,7 @@ darwin[[0-8]].*) #(vi
|
||||
;;
|
||||
darwin*) #(vi
|
||||
cf_xopen_source="-D_DARWIN_C_SOURCE"
|
||||
cf_XOPEN_SOURCE=
|
||||
;;
|
||||
freebsd*|dragonfly*) #(vi
|
||||
# 5.x headers associate
|
||||
@ -3994,15 +4094,23 @@ hpux*) #(vi
|
||||
;;
|
||||
irix[[56]].*) #(vi
|
||||
cf_xopen_source="-D_SGI_SOURCE"
|
||||
cf_XOPEN_SOURCE=
|
||||
;;
|
||||
linux*|gnu*|mint*|k*bsd*-gnu) #(vi
|
||||
CF_GNU_SOURCE
|
||||
;;
|
||||
mirbsd*) #(vi
|
||||
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
|
||||
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
|
||||
cf_XOPEN_SOURCE=
|
||||
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
|
||||
;;
|
||||
netbsd*) #(vi
|
||||
# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
|
||||
cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
|
||||
;;
|
||||
openbsd[[4-9]]*) #(vi
|
||||
# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
|
||||
cf_xopen_source="-D_BSD_SOURCE"
|
||||
cf_XOPEN_SOURCE=600
|
||||
;;
|
||||
openbsd*) #(vi
|
||||
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
|
||||
@ -4016,36 +4124,11 @@ nto-qnx*) #(vi
|
||||
sco*) #(vi
|
||||
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
|
||||
;;
|
||||
solaris2.1[[0-9]]) #(vi
|
||||
cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
|
||||
;;
|
||||
solaris2.[[1-9]]) #(vi
|
||||
solaris2.*) #(vi
|
||||
cf_xopen_source="-D__EXTENSIONS__"
|
||||
;;
|
||||
*)
|
||||
AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],[
|
||||
#ifndef _XOPEN_SOURCE
|
||||
make an error
|
||||
#endif],
|
||||
[cf_cv_xopen_source=no],
|
||||
[cf_save="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],[
|
||||
#ifdef _XOPEN_SOURCE
|
||||
make an error
|
||||
#endif],
|
||||
[cf_cv_xopen_source=no],
|
||||
[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
|
||||
CPPFLAGS="$cf_save"
|
||||
])
|
||||
])
|
||||
if test "$cf_cv_xopen_source" != no ; then
|
||||
CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
|
||||
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
|
||||
cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
|
||||
CF_ADD_CFLAGS($cf_temp_xopen_source)
|
||||
fi
|
||||
CF_TRY_XOPEN_SOURCE
|
||||
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
|
||||
;;
|
||||
esac
|
||||
@ -4053,6 +4136,35 @@ esac
|
||||
if test -n "$cf_xopen_source" ; then
|
||||
CF_ADD_CFLAGS($cf_xopen_source)
|
||||
fi
|
||||
|
||||
dnl In anything but the default case, we may have system-specific setting
|
||||
dnl which is still not guaranteed to provide all of the entrypoints that
|
||||
dnl _XOPEN_SOURCE would yield.
|
||||
if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
|
||||
AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],[
|
||||
#ifndef _XOPEN_SOURCE
|
||||
make an error
|
||||
#endif],
|
||||
[cf_XOPEN_SOURCE_set=yes],
|
||||
[cf_XOPEN_SOURCE_set=no])
|
||||
AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
|
||||
if test $cf_XOPEN_SOURCE_set = yes
|
||||
then
|
||||
AC_TRY_COMPILE([#include <stdlib.h>],[
|
||||
#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
|
||||
make an error
|
||||
#endif],
|
||||
[cf_XOPEN_SOURCE_set_ok=yes],
|
||||
[cf_XOPEN_SOURCE_set_ok=no])
|
||||
if test $cf_XOPEN_SOURCE_set_ok = no
|
||||
then
|
||||
AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
|
||||
fi
|
||||
else
|
||||
CF_TRY_XOPEN_SOURCE
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: arrows.c,v 1.36 2011/06/27 09:13:56 tom Exp $
|
||||
* $Id: arrows.c,v 1.41 2011/10/20 23:37:17 tom Exp $
|
||||
*
|
||||
* arrows.c -- draw arrows to indicate end-of-range for lists
|
||||
*
|
||||
@ -79,9 +79,9 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
|
||||
const int *cols = dlg_index_columns(dialog_vars.help_line);
|
||||
int other = decorations ? (ON_LEFT + ON_RIGHT) : 0;
|
||||
int avail = (getmaxx(win) - other - 2);
|
||||
int limit = dlg_limit_columns(dialog_vars.help_line, avail, 0);
|
||||
int limit = dlg_count_real_columns(dialog_vars.help_line) + 2;
|
||||
|
||||
if (limit > 0) {
|
||||
if (limit < avail) {
|
||||
getyx(win, cur_y, cur_x);
|
||||
other = decorations ? ON_LEFT : 0;
|
||||
(void) wmove(win, bottom, other + (avail - limit) / 2);
|
||||
@ -107,13 +107,14 @@ dlg_draw_arrows2(WINDOW *win,
|
||||
int cur_x, cur_y;
|
||||
int limit_x = getmaxx(win);
|
||||
bool draw_top = TRUE;
|
||||
bool is_toplevel = (wgetparent(win) == stdscr);
|
||||
|
||||
getyx(win, cur_y, cur_x);
|
||||
|
||||
/*
|
||||
* If we're drawing a centered title, do not overwrite with the arrows.
|
||||
*/
|
||||
if (dialog_vars.title) {
|
||||
if (dialog_vars.title && is_toplevel && (top - getbegy(win)) < MARGIN) {
|
||||
int have = (limit_x - dlg_count_columns(dialog_vars.title)) / 2;
|
||||
int need = x + 5;
|
||||
if (need > have)
|
||||
@ -123,11 +124,11 @@ dlg_draw_arrows2(WINDOW *win,
|
||||
if (draw_top) {
|
||||
(void) wmove(win, top, x);
|
||||
if (top_arrow) {
|
||||
wattrset(win, merge_colors(uarrow_attr, attr));
|
||||
(void) wattrset(win, merge_colors(uarrow_attr, attr));
|
||||
(void) add_acs(win, ACS_UARROW);
|
||||
(void) waddstr(win, "(-)");
|
||||
} else {
|
||||
wattrset(win, attr);
|
||||
(void) wattrset(win, attr);
|
||||
(void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT);
|
||||
}
|
||||
}
|
||||
@ -135,11 +136,11 @@ dlg_draw_arrows2(WINDOW *win,
|
||||
|
||||
(void) wmove(win, bottom, x);
|
||||
if (bottom_arrow) {
|
||||
wattrset(win, merge_colors(darrow_attr, attr));
|
||||
(void) wattrset(win, merge_colors(darrow_attr, attr));
|
||||
(void) add_acs(win, ACS_DARROW);
|
||||
(void) waddstr(win, "(+)");
|
||||
} else {
|
||||
wattrset(win, borderattr);
|
||||
(void) wattrset(win, borderattr);
|
||||
(void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT);
|
||||
}
|
||||
mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE);
|
||||
@ -147,7 +148,7 @@ dlg_draw_arrows2(WINDOW *win,
|
||||
(void) wmove(win, cur_y, cur_x);
|
||||
wrefresh(win);
|
||||
|
||||
wattrset(win, save);
|
||||
(void) wattrset(win, save);
|
||||
}
|
||||
|
||||
void
|
||||
@ -166,14 +167,13 @@ dlg_draw_scrollbar(WINDOW *win,
|
||||
char buffer[80];
|
||||
int percent;
|
||||
int len;
|
||||
int oldy, oldx, maxy, maxx;
|
||||
int oldy, oldx;
|
||||
|
||||
chtype save = dlg_get_attrs(win);
|
||||
int top_arrow = (first_data != 0);
|
||||
int bottom_arrow = (next_data < total_data);
|
||||
|
||||
getyx(win, oldy, oldx);
|
||||
getmaxyx(win, maxy, maxx);
|
||||
|
||||
dlg_draw_helpline(win, TRUE);
|
||||
if (bottom_arrow || top_arrow || dialog_state.use_scrollbar) {
|
||||
@ -187,12 +187,12 @@ dlg_draw_scrollbar(WINDOW *win,
|
||||
else if (percent > 100)
|
||||
percent = 100;
|
||||
|
||||
wattrset(win, position_indicator_attr);
|
||||
(void) wattrset(win, position_indicator_attr);
|
||||
(void) sprintf(buffer, "%d%%", percent);
|
||||
(void) wmove(win, bottom, right - 7);
|
||||
(void) waddstr(win, buffer);
|
||||
if ((len = dlg_count_columns(buffer)) < 4) {
|
||||
wattrset(win, border_attr);
|
||||
(void) wattrset(win, border_attr);
|
||||
whline(win, dlg_boxchar(ACS_HLINE), 4 - len);
|
||||
}
|
||||
}
|
||||
@ -212,7 +212,7 @@ dlg_draw_scrollbar(WINDOW *win,
|
||||
if (bar_high < all_high) {
|
||||
wmove(win, top + 1, right);
|
||||
|
||||
wattrset(win, save);
|
||||
(void) wattrset(win, save);
|
||||
wvline(win, ACS_VLINE | A_REVERSE, all_high);
|
||||
|
||||
bar_y = BARSIZE(this_data);
|
||||
@ -221,7 +221,7 @@ dlg_draw_scrollbar(WINDOW *win,
|
||||
|
||||
wmove(win, top + 1 + bar_y, right);
|
||||
|
||||
wattrset(win, position_indicator_attr);
|
||||
(void) wattrset(win, position_indicator_attr);
|
||||
wattron(win, A_REVERSE);
|
||||
wvline(win, ACS_BLOCK, bar_high);
|
||||
}
|
||||
@ -236,7 +236,7 @@ dlg_draw_scrollbar(WINDOW *win,
|
||||
attr,
|
||||
borderattr);
|
||||
|
||||
wattrset(win, save);
|
||||
(void) wattrset(win, save);
|
||||
wmove(win, oldy, oldx);
|
||||
}
|
||||
|
||||
@ -255,6 +255,6 @@ dlg_draw_arrows(WINDOW *win,
|
||||
x,
|
||||
top,
|
||||
bottom,
|
||||
menubox_attr,
|
||||
menubox_border2_attr,
|
||||
menubox_border_attr);
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: buttons.c,v 1.86 2011/06/28 10:46:46 tom Exp $
|
||||
* $Id: buttons.c,v 1.90 2012/07/01 20:42:05 tom Exp $
|
||||
*
|
||||
* buttons.c -- draw buttons, e.g., OK/Cancel
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -104,11 +104,11 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
|
||||
: button_label_inactive_attr);
|
||||
|
||||
(void) wmove(win, y, x);
|
||||
wattrset(win, selected
|
||||
(void) wattrset(win, selected
|
||||
? button_active_attr
|
||||
: button_inactive_attr);
|
||||
(void) waddstr(win, "<");
|
||||
wattrset(win, label_attr);
|
||||
(void) wattrset(win, label_attr);
|
||||
for (i = 0; i < limit; ++i) {
|
||||
int first = indx[i];
|
||||
int last = indx[i + 1];
|
||||
@ -120,14 +120,14 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
|
||||
const char *temp = (label + first);
|
||||
int cmp = string_to_char(&temp);
|
||||
if (dlg_isupper(cmp)) {
|
||||
wattrset(win, key_attr);
|
||||
(void) wattrset(win, key_attr);
|
||||
state = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (dlg_isupper(UCH(label[first]))) {
|
||||
wattrset(win, key_attr);
|
||||
(void) wattrset(win, key_attr);
|
||||
state = 1;
|
||||
}
|
||||
break;
|
||||
@ -138,7 +138,7 @@ print_button(WINDOW *win, char *label, int y, int x, int selected)
|
||||
}
|
||||
waddnstr(win, label + first, last - first);
|
||||
}
|
||||
wattrset(win, selected
|
||||
(void) wattrset(win, selected
|
||||
? button_active_attr
|
||||
: button_inactive_attr);
|
||||
(void) waddstr(win, ">");
|
||||
@ -310,7 +310,7 @@ dlg_draw_buttons(WINDOW *win,
|
||||
(void) wmove(win, final_y, final_x);
|
||||
wrefresh(win);
|
||||
free(buffer);
|
||||
wattrset(win, save);
|
||||
(void) wattrset(win, save);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -488,10 +488,12 @@ dlg_exit_buttoncode(int button)
|
||||
const char **
|
||||
dlg_ok_label(void)
|
||||
{
|
||||
static const char *labels[3];
|
||||
static const char *labels[4];
|
||||
int n = 0;
|
||||
|
||||
labels[n++] = my_ok_label();
|
||||
if (dialog_vars.extra_button)
|
||||
labels[n++] = my_extra_label();
|
||||
if (dialog_vars.help_button)
|
||||
labels[n++] = my_help_label();
|
||||
labels[n] = 0;
|
||||
@ -537,6 +539,7 @@ dlg_ok_buttoncode(int button)
|
||||
} else if (dialog_vars.help_button && (button == n)) {
|
||||
result = DLG_EXIT_HELP;
|
||||
}
|
||||
dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -575,7 +578,7 @@ dlg_prev_ok_buttonindex(int current, int extra)
|
||||
/*
|
||||
* Find the button-index for the "OK" or "Cancel" button, according to
|
||||
* whether --defaultno is given. If --nocancel was given, we always return
|
||||
* the index for "OK".
|
||||
* the index for the first button (usually "OK" unless --nook was used).
|
||||
*/
|
||||
int
|
||||
dlg_defaultno_button(void)
|
||||
@ -586,6 +589,30 @@ dlg_defaultno_button(void)
|
||||
while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL)
|
||||
++result;
|
||||
}
|
||||
dlg_trace_msg("# dlg_defaultno_button() = %d\n", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the button-index for a button named with --default-button. If the
|
||||
* option was not specified, or if the selected button does not exist, return
|
||||
* the index of the first button (usually "OK" unless --nook was used).
|
||||
*/
|
||||
int
|
||||
dlg_default_button(void)
|
||||
{
|
||||
int i, n;
|
||||
int result = 0;
|
||||
|
||||
if (dialog_vars.default_button >= 0) {
|
||||
for (i = 0; (n = dlg_ok_buttoncode(i)) >= 0; i++) {
|
||||
if (n == dialog_vars.default_button) {
|
||||
result = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
dlg_trace_msg("# dlg_default_button() = %d\n", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: calendar.c,v 1.62 2011/06/29 09:47:06 tom Exp $
|
||||
* $Id: calendar.c,v 1.66 2012/07/01 18:13:07 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* calendar.c -- implements the calendar box
|
||||
*
|
||||
* Copyright 2001-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2001-2011,2012 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
|
||||
@ -225,12 +225,14 @@ draw_day(BOX * data, struct tm *current)
|
||||
int prev = days_in_month(current, -1);
|
||||
|
||||
werase(data->window);
|
||||
dlg_draw_box(data->parent,
|
||||
dlg_draw_box2(data->parent,
|
||||
data->y - MARGIN, data->x - MARGIN,
|
||||
data->height + (2 * MARGIN), data->width + (2 * MARGIN),
|
||||
menubox_border_attr, menubox_attr); /* border of daybox */
|
||||
menubox_attr,
|
||||
menubox_border_attr,
|
||||
menubox_border2_attr);
|
||||
|
||||
wattrset(data->window, menubox_attr); /* daynames headline */
|
||||
(void) wattrset(data->window, menubox_attr); /* daynames headline */
|
||||
for (x = 0; x < 7; x++) {
|
||||
mvwprintw(data->window,
|
||||
0, (x + 1) * cell_wide, "%*.*s ",
|
||||
@ -246,7 +248,7 @@ draw_day(BOX * data, struct tm *current)
|
||||
week = (current->tm_yday + 6 + mday - current->tm_mday) / 7;
|
||||
|
||||
for (y = 1; mday < last; y++) {
|
||||
wattrset(data->window, menubox_attr); /* weeknumbers headline */
|
||||
(void) wattrset(data->window, menubox_attr); /* weeknumbers headline */
|
||||
mvwprintw(data->window,
|
||||
y, 0,
|
||||
"%*d ",
|
||||
@ -257,9 +259,9 @@ draw_day(BOX * data, struct tm *current)
|
||||
++mday;
|
||||
if (wmove(data->window, y, this_x) == ERR)
|
||||
continue;
|
||||
wattrset(data->window, item_attr); /* not selected days */
|
||||
(void) wattrset(data->window, item_attr); /* not selected days */
|
||||
if (mday == day) {
|
||||
wattrset(data->window, item_selected_attr); /* selected day */
|
||||
(void) wattrset(data->window, item_selected_attr); /* selected day */
|
||||
save_y = y;
|
||||
save_x = this_x;
|
||||
}
|
||||
@ -294,13 +296,15 @@ draw_month(BOX * data, struct tm *current)
|
||||
|
||||
month = current->tm_mon + 1;
|
||||
|
||||
wattrset(data->parent, dialog_attr); /* Headline "Month" */
|
||||
(void) wattrset(data->parent, dialog_attr); /* Headline "Month" */
|
||||
(void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month"));
|
||||
dlg_draw_box(data->parent,
|
||||
dlg_draw_box2(data->parent,
|
||||
data->y - 1, data->x - 1,
|
||||
data->height + 2, data->width + 2,
|
||||
menubox_border_attr, menubox_attr); /* borders of monthbox */
|
||||
wattrset(data->window, item_attr); /* color the month selection */
|
||||
menubox_attr,
|
||||
menubox_border_attr,
|
||||
menubox_border2_attr);
|
||||
(void) wattrset(data->window, item_attr); /* color the month selection */
|
||||
mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1));
|
||||
wmove(data->window, 0, 0);
|
||||
return 0;
|
||||
@ -314,13 +318,15 @@ draw_year(BOX * data, struct tm *current)
|
||||
{
|
||||
int year = current->tm_year + 1900;
|
||||
|
||||
wattrset(data->parent, dialog_attr); /* Headline "Year" */
|
||||
(void) wattrset(data->parent, dialog_attr); /* Headline "Year" */
|
||||
(void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year"));
|
||||
dlg_draw_box(data->parent,
|
||||
dlg_draw_box2(data->parent,
|
||||
data->y - 1, data->x - 1,
|
||||
data->height + 2, data->width + 2,
|
||||
menubox_border_attr, menubox_attr); /* borders of yearbox */
|
||||
wattrset(data->window, item_attr); /* color the year selection */
|
||||
menubox_attr,
|
||||
menubox_border_attr,
|
||||
menubox_border2_attr);
|
||||
(void) wattrset(data->window, item_attr); /* color the year selection */
|
||||
mvwprintw(data->window, 0, 0, "%4d", year);
|
||||
wmove(data->window, 0, 0);
|
||||
return 0;
|
||||
@ -430,7 +436,7 @@ dialog_calendar(const char *title,
|
||||
WINDOW *dialog;
|
||||
time_t now_time = time((time_t *) 0);
|
||||
struct tm current;
|
||||
int state = dlg_defaultno_button();
|
||||
int state = dlg_default_button();
|
||||
const char **buttons = dlg_ok_labels();
|
||||
char *prompt = dlg_strclone(subtitle);
|
||||
int mincols = MIN_WIDE;
|
||||
@ -491,11 +497,11 @@ dialog_calendar(const char *title,
|
||||
dlg_register_buttons(dialog, "calendar", buttons);
|
||||
|
||||
/* mainbox */
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr); /* text mainbox */
|
||||
(void) wattrset(dialog, dialog_attr); /* text mainbox */
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
|
||||
/* compute positions of day, month and year boxes */
|
||||
@ -539,6 +545,7 @@ dialog_calendar(const char *title,
|
||||
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
|
||||
}
|
||||
|
||||
dlg_trace_win(dialog);
|
||||
while (result == DLG_EXIT_UNKNOWN) {
|
||||
BOX *obj = (state == sDAY ? &dy_box
|
||||
: (state == sMONTH ? &mn_box :
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: checklist.c,v 1.127 2011/06/29 23:04:09 tom Exp $
|
||||
* $Id: checklist.c,v 1.135 2012/07/01 16:30:04 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* checklist.c -- implements the checklist box
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -58,7 +58,7 @@ print_arrows(WINDOW *win,
|
||||
box_x + list_width,
|
||||
box_y,
|
||||
box_y + list_height + 1,
|
||||
menubox_attr,
|
||||
menubox_border2_attr,
|
||||
menubox_border_attr);
|
||||
}
|
||||
|
||||
@ -81,30 +81,30 @@ print_item(WINDOW *win,
|
||||
int limit;
|
||||
|
||||
/* Clear 'residue' of last item */
|
||||
wattrset(win, menubox_attr);
|
||||
(void) wattrset(win, menubox_attr);
|
||||
(void) wmove(win, choice, 0);
|
||||
for (i = 0; i < list_width; i++)
|
||||
(void) waddch(win, ' ');
|
||||
|
||||
(void) wmove(win, choice, check_x);
|
||||
wattrset(win, selected ? check_selected_attr : check_attr);
|
||||
(void) wattrset(win, selected ? check_selected_attr : check_attr);
|
||||
(void) wprintw(win,
|
||||
(checkflag == FLAG_CHECK) ? "[%c]" : "(%c)",
|
||||
states[item->state]);
|
||||
wattrset(win, menubox_attr);
|
||||
(void) wattrset(win, menubox_attr);
|
||||
(void) waddch(win, ' ');
|
||||
|
||||
if (strlen(item->name) != 0) {
|
||||
|
||||
indx = dlg_index_wchars(item->name);
|
||||
|
||||
wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
|
||||
(void) wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
|
||||
(void) waddnstr(win, item->name, indx[1]);
|
||||
|
||||
if ((int) strlen(item->name) > indx[1]) {
|
||||
limit = dlg_limit_columns(item->name, (item_x - check_x - 6), 1);
|
||||
if (limit > 1) {
|
||||
wattrset(win, selected ? tag_selected_attr : tag_attr);
|
||||
(void) wattrset(win, selected ? tag_selected_attr : tag_attr);
|
||||
(void) waddnstr(win,
|
||||
item->name + indx[1],
|
||||
indx[limit] - indx[1]);
|
||||
@ -118,7 +118,7 @@ print_item(WINDOW *win,
|
||||
|
||||
if (limit > 0) {
|
||||
(void) wmove(win, choice, item_x);
|
||||
wattrset(win, selected ? item_selected_attr : item_attr);
|
||||
(void) wattrset(win, selected ? item_selected_attr : item_attr);
|
||||
dlg_print_text(win, item->text, cols[limit], &attr);
|
||||
}
|
||||
}
|
||||
@ -126,7 +126,7 @@ print_item(WINDOW *win,
|
||||
if (selected) {
|
||||
dlg_item_help(item->help);
|
||||
}
|
||||
wattrset(win, save);
|
||||
(void) wattrset(win, save);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -178,7 +178,7 @@ dlg_checklist(const char *title,
|
||||
#endif
|
||||
int i, j, key2, found, x, y, cur_x, cur_y, box_x, box_y;
|
||||
int key = 0, fkey;
|
||||
int button = dialog_state.visit_items ? -1 : dlg_defaultno_button();
|
||||
int button = dialog_state.visit_items ? -1 : dlg_default_button();
|
||||
int choice = dlg_default_listitem(items);
|
||||
int scrollamt = 0;
|
||||
int max_choice;
|
||||
@ -190,6 +190,7 @@ dlg_checklist(const char *title,
|
||||
WINDOW *dialog, *list;
|
||||
char *prompt = dlg_strclone(cprompt);
|
||||
const char **buttons = dlg_ok_labels();
|
||||
const char *widget_name;
|
||||
|
||||
dlg_does_output();
|
||||
dlg_tab_correct_str(prompt);
|
||||
@ -211,19 +212,23 @@ dlg_checklist(const char *title,
|
||||
}
|
||||
}
|
||||
}
|
||||
widget_name = "radiolist";
|
||||
} else {
|
||||
widget_name = "checklist";
|
||||
}
|
||||
#ifdef KEY_RESIZE
|
||||
retry:
|
||||
#endif
|
||||
|
||||
use_height = list_height;
|
||||
if (use_height == 0) {
|
||||
use_width = dlg_calc_list_width(item_no, items) + 10;
|
||||
use_width = MAX(26, use_width);
|
||||
if (use_height == 0) {
|
||||
/* calculate height without items (4) */
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MAX(26, use_width));
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, use_width);
|
||||
dlg_calc_listh(&height, &use_height, item_no);
|
||||
} else {
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, 26);
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, use_width);
|
||||
}
|
||||
dlg_button_layout(buttons, &width);
|
||||
dlg_print_size(height, width);
|
||||
@ -240,16 +245,16 @@ dlg_checklist(const char *title,
|
||||
y = dlg_box_y_ordinate(height);
|
||||
|
||||
dialog = dlg_new_window(height, width, y, x);
|
||||
dlg_register_window(dialog, "checklist", binding);
|
||||
dlg_register_buttons(dialog, "checklist", buttons);
|
||||
dlg_register_window(dialog, widget_name, binding);
|
||||
dlg_register_buttons(dialog, widget_name, buttons);
|
||||
|
||||
dlg_mouse_setbase(x, y);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
|
||||
list_width = width - 6;
|
||||
@ -276,7 +281,7 @@ dlg_checklist(const char *title,
|
||||
dlg_draw_box(dialog, box_y, box_x,
|
||||
use_height + 2 * MARGIN,
|
||||
list_width + 2 * MARGIN,
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
|
||||
text_width = 0;
|
||||
name_width = 0;
|
||||
@ -328,6 +333,7 @@ dlg_checklist(const char *title,
|
||||
|
||||
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
|
||||
|
||||
dlg_trace_win(dialog);
|
||||
while (result == DLG_EXIT_UNKNOWN) {
|
||||
if (button < 0) /* --visit-items */
|
||||
wmove(dialog, box_y + choice + 1, box_x + check_x + 2);
|
||||
@ -720,6 +726,9 @@ dialog_checklist(const char *title,
|
||||
} else {
|
||||
if (dlg_need_separator())
|
||||
dlg_add_separator();
|
||||
if (flag == FLAG_CHECK)
|
||||
dlg_add_quoted(listitems[i].name);
|
||||
else
|
||||
dlg_add_string(listitems[i].name);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: columns.c,v 1.8 2011/06/28 09:26:23 tom Exp $
|
||||
* $Id: columns.c,v 1.10 2011/10/20 20:53:55 tom Exp $
|
||||
*
|
||||
* columns.c -- implements column-alignment
|
||||
*
|
||||
@ -45,7 +45,7 @@ next_row(char **target, int per_row)
|
||||
{
|
||||
char *result = (char *) target;
|
||||
result += per_row;
|
||||
return (char **) result;
|
||||
return (char **) (void *) result;
|
||||
}
|
||||
|
||||
static char *
|
||||
@ -148,6 +148,7 @@ dlg_align_columns(char **target, int per_row, int num_rows)
|
||||
memcpy(text + offset, *value + offsets[n], (size_t) widths[n]);
|
||||
offset += maxwidth[n] + 1;
|
||||
}
|
||||
text[realwidth] = 0;
|
||||
*value = text;
|
||||
}
|
||||
|
||||
|
2987
contrib/dialog/configure
vendored
2987
contrib/dialog/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
dnl $Id: configure.in,v 1.65 2011/06/27 10:42:27 tom Exp $
|
||||
dnl $Id: configure.in,v 1.68 2011/10/20 21:02:43 tom Exp $
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl Copyright 1999-2010,2011 -- Thomas E. Dickey
|
||||
@ -45,6 +45,7 @@ AC_PROG_GCC_TRADITIONAL
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
CF_PROG_LINT
|
||||
|
||||
dnl needed for CF_WITH_LIBTOOL
|
||||
AC_CHECK_TOOL(AR, ar, ar)
|
||||
@ -232,6 +233,7 @@ wget_wch \
|
||||
AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR)])
|
||||
CF_CURSES_CHTYPE
|
||||
CF_CURSES_WACS_SYMBOLS
|
||||
CF_CURSES_WGETPARENT
|
||||
CF_FUNC_WAIT
|
||||
CF_MBSTATE_T
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
'\" t
|
||||
.\" $Id: dialog.1,v 1.133 2011/06/29 09:39:29 tom Exp $
|
||||
.\" Copyright 2005-2010,2011 Thomas E. Dickey
|
||||
.\" $Id: dialog.1,v 1.145 2012/07/03 08:32:33 tom Exp $
|
||||
.\" Copyright 2005-2011,2012 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,16 +27,17 @@
|
||||
.ne 8
|
||||
.IP
|
||||
..
|
||||
.de EX
|
||||
.RS +10
|
||||
.de Ex
|
||||
.RS +7
|
||||
.PP
|
||||
.nf
|
||||
..
|
||||
.de EE
|
||||
.de Ee
|
||||
.fi
|
||||
.RE
|
||||
..
|
||||
.
|
||||
.TH \*D 1 "" "$Date: 2011/06/29 09:39:29 $"
|
||||
.TH \*D 1 "" "$Date: 2012/07/03 08:32:33 $"
|
||||
.SH NAME
|
||||
\*p \- display dialog boxes from shell scripts
|
||||
.SH SYNOPSIS
|
||||
@ -172,39 +173,39 @@ To compare the effects, use these:
|
||||
.
|
||||
.ES
|
||||
All three widgets visible, staircase effect, ordered 1,2,3:
|
||||
.EX
|
||||
\*p \
|
||||
.Ex
|
||||
\*p \\
|
||||
--begin 2 2 --yesno "" 0 0 \\
|
||||
--and-widget --begin 4 4 --yesno "" 0 0 \\
|
||||
--and-widget --begin 6 6 --yesno "" 0 0
|
||||
.EE
|
||||
.Ee
|
||||
.
|
||||
.ES
|
||||
Only the last widget is left visible:
|
||||
.EX
|
||||
\*p \
|
||||
.Ex
|
||||
\*p \\
|
||||
--clear --begin 2 2 --yesno "" 0 0 \\
|
||||
--and-widget --clear --begin 4 4 --yesno "" 0 0 \\
|
||||
--and-widget --begin 6 6 --yesno "" 0 0
|
||||
.EE
|
||||
.Ee
|
||||
.
|
||||
.ES
|
||||
All three widgets visible, staircase effect, ordered 3,2,1:
|
||||
.EX
|
||||
\*p \
|
||||
.Ex
|
||||
\*p \\
|
||||
--keep-window --begin 2 2 --yesno "" 0 0 \\
|
||||
--and-widget --keep-window --begin 4 4 --yesno "" 0 0 \\
|
||||
--and-widget --begin 6 6 --yesno "" 0 0
|
||||
.EE
|
||||
.Ee
|
||||
.
|
||||
.ES
|
||||
First and third widget visible, staircase effect, ordered 3,1:
|
||||
.EX
|
||||
\*p \
|
||||
.Ex
|
||||
\*p \\
|
||||
--keep-window --begin 2 2 --yesno "" 0 0 \\
|
||||
--and-widget --clear --begin 4 4 --yesno "" 0 0 \\
|
||||
--and-widget --begin 6 6 --yesno "" 0 0
|
||||
.EE
|
||||
.Ee
|
||||
.IP
|
||||
Note, if you want to restore original console colors and send your
|
||||
cursor home after the dialog program has exited, use the \fBclear\fR\ (1)
|
||||
@ -237,6 +238,7 @@ occurrences of the given string, and to align the split data into columns.
|
||||
.IP "\fB--cr-wrap"
|
||||
Interpret embedded newlines in the dialog text as a newline on the screen.
|
||||
Otherwise, \fB\*p\fR will only wrap lines where needed to fit inside the text box.
|
||||
.IP
|
||||
Even though you can control line breaks with this,
|
||||
\fB\*L\fR will still wrap any lines that are too long for the width of the box.
|
||||
Without cr-wrap, the layout of your text may be formatted to look nice
|
||||
@ -270,6 +272,25 @@ If "\fB--nocancel\fP" or "\fB--visit-items\fP" are given
|
||||
those options overrides this,
|
||||
making the default button always "Yes" (internally the same as "OK").
|
||||
.
|
||||
.IP "\fB--default-button \fIstring"
|
||||
Set the default (preselected) button in a widget.
|
||||
By preselecting a button,
|
||||
a script makes it possible for the user to simply press \fIEnter\fP
|
||||
to proceed through a dialog with minimum interaction.
|
||||
.IP
|
||||
The option's value is the name of the button:
|
||||
.IR ok ,
|
||||
.IR yes ,
|
||||
.IR cancel ,
|
||||
.IR no ,
|
||||
.IR help "\ or"
|
||||
.IR extra .
|
||||
.IP
|
||||
Normally the first button in each widget is the default.
|
||||
The first button shown is determined by the widget
|
||||
together with the "\fB--nook\fP" and "\fB--nocancel\fP options.
|
||||
If this option is not given, there is no default button assigned.
|
||||
.
|
||||
.IP "\fB--default-item \fIstring"
|
||||
Set the default item in a checklist, form or menu box.
|
||||
Normally the first item in the box is the default.
|
||||
@ -338,7 +359,8 @@ adding a column which is displayed in the bottom line of the
|
||||
screen, for the currently selected item.
|
||||
.
|
||||
.IP "\fB--keep-tite"
|
||||
Normally \fB\*p\fP checks to see if it is running in an \fBxterm\fP,
|
||||
When built with \fBncurses\fP,
|
||||
\fB\*p\fP normally checks to see if it is running in an \fBxterm\fP,
|
||||
and in that case tries to suppress the initialization strings that
|
||||
would make it switch to the alternate screen.
|
||||
Switching between the normal and alternate screens
|
||||
@ -433,6 +455,11 @@ Prints \fB\*p\fR's version to \fB\*p\fP's output.
|
||||
This may be used alone, without other options.
|
||||
It does not cause \fBdialog\fP to exit by itself.
|
||||
.
|
||||
.IP "\fB--quoted"
|
||||
Normally \fB\*p\fP quotes the strings returned by checklist's
|
||||
as well as the item-help text.
|
||||
Use this option to quote all string results.
|
||||
.
|
||||
.IP "\fB--scrollbar"
|
||||
For widgets holding a scrollable set of data,
|
||||
draw a scrollbar on its right-margin.
|
||||
@ -456,8 +483,8 @@ Draw a shadow to the right and bottom of each dialog box.
|
||||
Use single-quoting as needed (and no quotes if unneeded) for the
|
||||
output of checklist's as well as the item-help text.
|
||||
If this option is not set, \fB\*p\fP uses double quotes around each item.
|
||||
That requires occasional use of backslashes to make the output useful in
|
||||
shell scripts.
|
||||
In either case,
|
||||
\fB\*p\fP adds backslashes to make the output useful in shell scripts.
|
||||
.
|
||||
.IP "\fB--size-err"
|
||||
Check the resulting size of a dialog box before trying to use it,
|
||||
@ -501,8 +528,11 @@ The day, month, year values in this case are for the current local time.
|
||||
.IP "\fB--timeout \fIsecs"
|
||||
Timeout (exit with error code)
|
||||
if no user response within the given number of seconds.
|
||||
This is overridden if the background "\fB--tailboxbg\fP is used.
|
||||
A timeout of zero seconds is ignored.
|
||||
.IP
|
||||
This option is ignored by the "\fB--pause\fP" widget.
|
||||
It is also overridden if the background "\fB--tailboxbg\fP" option is used
|
||||
to setup multiple concurrent widgets.
|
||||
.
|
||||
.IP "\fB--title \fItitle"
|
||||
Specifies a
|
||||
@ -510,11 +540,16 @@ Specifies a
|
||||
string to be displayed at the top of the dialog box.
|
||||
.
|
||||
.IP "\fB--trace \fIfilename"
|
||||
logs the command-line parameters and
|
||||
keystrokes to the given file.
|
||||
logs the command-line parameters,
|
||||
keystrokes and other information to the given file.
|
||||
If \fBdialog\fP reads a configure file, it is logged as well.
|
||||
Piped input to the \fIgauge\fP widget is logged.
|
||||
Use control/T to log a picture of the current dialog window.
|
||||
.PP
|
||||
The \fB\*p\fR program handles some command-line parameters specially,
|
||||
and removes them from the parameter list as they are processed.
|
||||
For example, if the first option is \fB--trace\fP,
|
||||
then that is processed (and removed) before \fB\*p\fR initializes the display.
|
||||
.
|
||||
.IP "\fB--trim"
|
||||
eliminate leading blanks,
|
||||
@ -589,8 +624,10 @@ The initial on/off state of each entry is specified by
|
||||
On exit, a list of the \fItag\fP
|
||||
strings of those entries that are turned on
|
||||
will be printed on \fB\*p\fP's output.
|
||||
.IP
|
||||
If the "\fB--separate-output\fP" option is not given,
|
||||
the strings will be quoted to make it simple for scripts to separate them.
|
||||
the strings will be quoted as needed to make it simple for scripts to separate them.
|
||||
By default, this uses double-quotes.
|
||||
See the "\fB--single-quoted\fP" option, which modifies the quoting behavior.
|
||||
.
|
||||
.
|
||||
@ -847,7 +884,7 @@ On exit, no text is written to \fB\*p\fP's output.
|
||||
Only an "OK" button is provided for input,
|
||||
but an ESC exit status may be returned.
|
||||
.
|
||||
.IP "\fB\-\-pause \fItext height width seconds\fR"
|
||||
.IP "\fB--pause \fItext height width seconds\fR"
|
||||
A
|
||||
\fBpause\fP
|
||||
box displays a meter along the bottom of the box.
|
||||
@ -899,7 +936,8 @@ If only two parameters are given, this text is omitted.
|
||||
.IP "\fB--programbox \fIheight width"
|
||||
A \fBprogrambox\fP is very similar to a \fBprogressbox\fP.
|
||||
The only difference between a \fBprogram\fP box and a \fBprogress\fP
|
||||
box is that a \fBprogram\fP box displays an \fBOK\fP button.
|
||||
box is that a \fBprogram\fP box displays an \fBOK\fP button
|
||||
(but only after the command completes).
|
||||
.IP
|
||||
This dialog box is used to display the piped output of a command.
|
||||
After the command completes, the user can press the \fIENTER\fP key so that
|
||||
@ -913,7 +951,16 @@ If only two parameters are given, this text is omitted.
|
||||
.IP "\fB--progressbox \fItext height width"
|
||||
.IP "\fB--progressbox \fIheight width"
|
||||
A \fBprogressbox\fP is similar to an \fBtailbox\fP,
|
||||
except that it will exit when it reaches the end of the file.
|
||||
except that
|
||||
.RS
|
||||
.TP 3
|
||||
a) rather than displaying the contents of a file,
|
||||
it displays the piped output of a command and
|
||||
.TP 3
|
||||
b) it will exit when it reaches the end of the file
|
||||
(there is no "OK" button).
|
||||
.RE
|
||||
.IP
|
||||
If three parameters are given, it displays the text under the title,
|
||||
delineated from the scrolling file's contents.
|
||||
If only two parameters are given, this text is omitted.
|
||||
@ -1094,9 +1141,10 @@ can find, as stated in step 2 above.
|
||||
You can override or add to key bindings in \fB\*p\fP
|
||||
by adding to the configuration file.
|
||||
\fB\*L\fP's \fBbindkey\fP command maps single keys to its internal coding.
|
||||
.EX
|
||||
.Ex
|
||||
bindkey \fIwidget\fP \fIcurses_key\fP \fIdialog_key\fP
|
||||
.EE
|
||||
.Ee
|
||||
.PP
|
||||
The \fIwidget\fP name can be "*" (all widgets), or
|
||||
specific widgets such as \fBtextbox\fP.
|
||||
Specific widget bindings override the "*" bindings.
|
||||
@ -1111,6 +1159,82 @@ Finally, it allows any single character to be escaped with a backslash.
|
||||
\fB\*L\fP's internal keycode names correspond to the
|
||||
\fBDLG_KEYS_ENUM\fP type in
|
||||
\fBdlg_keys.h\fP, e.g., "HELP" from "DLGK_HELP".
|
||||
.SS Widget Names
|
||||
.PP
|
||||
Some widgets (such as the formbox) have an area where fields can be edited.
|
||||
Those are managed in a subwindow of the widget, and
|
||||
may have separate keybindings from the main widget
|
||||
because the subwindows are registered using a different name.
|
||||
.TS
|
||||
center tab(/) ;
|
||||
l l l
|
||||
l l l .
|
||||
\fIWidget\fR/\fIWindow name\fR/\fISubwindow Name\fR
|
||||
calendar/calendar
|
||||
checklist/checklist
|
||||
editbox/editbox/editbox2
|
||||
form/formbox/formfield
|
||||
fselect/fselect/fselect2
|
||||
inputbox/inputbox/inputbox2
|
||||
menu/menubox/menu
|
||||
msgbox/msgbox
|
||||
pause/pause
|
||||
progressbox/progressbox
|
||||
radiolist/radiolist
|
||||
tailbox/tailbox
|
||||
textbox/textbox/searchbox
|
||||
timebox/timebox
|
||||
yesno/yesno
|
||||
.TE
|
||||
.PP
|
||||
Some widgets are actually other widgets,
|
||||
using internal settings to modify the behavior.
|
||||
Those use the same widget name as the actual widget:
|
||||
.TS
|
||||
center tab(/) ;
|
||||
l l
|
||||
l l .
|
||||
\fIWidget\fR/\fIActual Widget\fR
|
||||
dselect/fselect
|
||||
infobox/msgbox
|
||||
inputmenu/menu
|
||||
mixedform/form
|
||||
passwordbox/inputbox
|
||||
passwordform/form
|
||||
prgbox/progressbox
|
||||
programbox/progressbox
|
||||
tailboxbg/tailbox
|
||||
.TE
|
||||
.SS Built-in Bindings
|
||||
This manual page does not list the key bindings for each widget,
|
||||
because that detailed information can be obtained by running \fB\*p\fP.
|
||||
If you have set the \fB--trace\fP option,
|
||||
\fB\*p\fP writes the key-binding information for each widget
|
||||
as it is registered.
|
||||
.SS Example
|
||||
Normally \fB\*p\fP uses different keys for navigating between the buttons
|
||||
and editing part of a dialog versus navigating within the editing part.
|
||||
That is, tab (and back-tab) traverse buttons
|
||||
(or between buttons and the editing part),
|
||||
while arrow keys traverse fields within the editing part.
|
||||
Tabs are also recognized as a special case for traversing between
|
||||
widgets, e.g., when using multiple tailboxbg widgets.
|
||||
.PP
|
||||
Some users may wish to use the same key for traversing within the
|
||||
editing part as for traversing between buttons.
|
||||
The form widget is written to support this sort of redefinition of
|
||||
the keys, by adding a special group in <code>dlgk_keys.h</code>
|
||||
for "form" (left/right/next/prev).
|
||||
Here is an example binding demonstrating how to do this:
|
||||
.Ex
|
||||
bindkey formfield TAB form_NEXT
|
||||
bindkey formbox TAB form_NEXT
|
||||
bindkey formfield BTAB form_prev
|
||||
bindkey formbox BTAB form_prev
|
||||
.Ee
|
||||
.PP
|
||||
That type of redefinition would not be useful in other widgets,
|
||||
e.g., calendar, due to the potentially large number of fields to traverse.
|
||||
.
|
||||
.\" ************************************************************************
|
||||
.SH ENVIRONMENT
|
||||
@ -1149,7 +1273,7 @@ error (-1),
|
||||
ESC (255),
|
||||
Extra (3),
|
||||
Help (2),
|
||||
Help with --item-help (2),
|
||||
Help with \fB--item-help\fP (2),
|
||||
or OK (0).
|
||||
Normally shell scripts cannot distinguish between -1 and 255.
|
||||
.TP 15
|
||||
@ -1167,35 +1291,39 @@ of how to use the different box options and how they look.
|
||||
Just take a look into the directory \fBsamples/\fP of the source.
|
||||
.SH DIAGNOSTICS
|
||||
Exit status is subject to being overridden by environment variables.
|
||||
Normally they are:
|
||||
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.
|
||||
button (DIALOG_OK).
|
||||
.TP 5
|
||||
1
|
||||
if the
|
||||
.BR No " or " Cancel
|
||||
button is pressed.
|
||||
button is pressed (DIALOG_CANCEL).
|
||||
.TP 5
|
||||
2
|
||||
if the
|
||||
.BR Help
|
||||
button is pressed.
|
||||
button is pressed (DIALOG_HELP).
|
||||
.TP 5
|
||||
3
|
||||
if the
|
||||
.BR Extra
|
||||
button is pressed.
|
||||
button is pressed (DIALOG_EXTRA).
|
||||
.TP 5
|
||||
4
|
||||
if the
|
||||
.BR Item Help
|
||||
button is pressed.
|
||||
.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),
|
||||
.TP 5
|
||||
-1
|
||||
if errors occur inside \fB\*p\fP
|
||||
or \fB\*p\fP is exited by pressing the \fIESC\fP key.
|
||||
if errors occur inside \fB\*p\fP (DIALOG_ERROR)
|
||||
or \fB\*p\fP is exited by pressing the \fIESC\fP key (DIALOG_ESC).
|
||||
.
|
||||
.\" ************************************************************************
|
||||
.SH PORTABILITY
|
||||
@ -1270,7 +1398,8 @@ Its documentation claims
|
||||
.sp
|
||||
.nf
|
||||
whiptail(1) is a lightweight replacement for \*p(1),
|
||||
to provide dialog boxes for shell scripts. It is built on the
|
||||
to provide dialog boxes for shell scripts.
|
||||
It is built on the
|
||||
newt windowing library rather than the ncurses library, allowing
|
||||
it to be smaller in embedded enviroments such as installers,
|
||||
rescue disks, etc.
|
||||
@ -1298,7 +1427,7 @@ but oddly cites only \fB\*p\fP versions up to 0.4 (1996) as a source.
|
||||
That is, its manpage refers to features which
|
||||
were borrowed from more recent versions of \fB\*p\fP, e.g.,
|
||||
the \fB--gauge\fP and \fB--password\fP boxes,
|
||||
as well as options such as \fB-separate-output\fP (2008).
|
||||
as well as options such as \fB--separate-output\fP (2008).
|
||||
Somewhat humorously, one may note that the \fBpopt\fP feature
|
||||
(undocumented in its manpage)
|
||||
of using a "--" as an escape was documented in \fB\*p\fP's manpage about
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" $Id: dialog.3,v 1.68 2011/06/29 09:07:36 tom Exp $
|
||||
.\" Copyright 2005-2010,2011 Thomas E. Dickey
|
||||
.\" $Id: dialog.3,v 1.76 2012/07/03 08:22:10 tom Exp $
|
||||
.\" Copyright 2005-2011,2012 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
|
||||
@ -38,7 +38,7 @@
|
||||
.de bP
|
||||
.IP \(bu 4
|
||||
..
|
||||
.TH \*D 3 "" "$Date: 2011/06/29 09:07:36 $"
|
||||
.TH \*D 3 "" "$Date: 2012/07/03 08:22:10 $"
|
||||
.SH NAME
|
||||
\*l \- widgets and utilities for the \*p program
|
||||
.SH SYNOPSIS
|
||||
@ -108,6 +108,11 @@ are designed for use by the calling application
|
||||
while variables beginning with "\fIdlg_\fP"
|
||||
are intended for lower levels, e.g., by the \fB\*l\fP library.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_STATE.all_subwindows
|
||||
This is a linked list of all subwindows created by the library.
|
||||
The \fBdlg_del_window\fP function uses this
|
||||
to free storage for subwindows when deleting a window.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_STATE.all_windows
|
||||
This is a linked list of all windows created by the library.
|
||||
The \fBdlg_del_window\fP function uses this to locate windows which
|
||||
@ -290,6 +295,9 @@ bright red.
|
||||
Restore normal settings with "\\Zn".
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.column_separator
|
||||
This corresponds to the command-line option "\fB--column-separator\fP".
|
||||
\fB\*L\fP splits data for radio/checkboxes and menus on the
|
||||
occurrences of the given string, and aligns the split data into columns.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.cr_wrap
|
||||
This corresponds to the command-line option "\fB--cr-wrap\fP".
|
||||
@ -307,11 +315,16 @@ This corresponds to the command-line option "\fB--date-format\fP \fIstring\fP".
|
||||
If the host provides \fBstrftime\fP, and the value is nonnull,
|
||||
the calendar widget uses this to format its output.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.default_button
|
||||
This is set by the command-line option "\fB--default-button\fP.
|
||||
It is used by \fBdlg_default_button\fP.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.default_item
|
||||
This corresponds to the command-line option "\fB--default-item\fP \fIstring\fP".
|
||||
The given string is used as
|
||||
the default item in a checklist, form or menu box.
|
||||
Normally the first item in the box is the default.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.defaultno
|
||||
This corresponds to the command-line option "\fB--defaultno\fP".
|
||||
If true,
|
||||
@ -477,6 +490,8 @@ Note that \fB\*p\fR will still wrap text, subject to the \fB--cr-wrap\fR
|
||||
option.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.nook
|
||||
This corresponds to the command-line option "\fB--nook\fP.
|
||||
\fB\*L\fP will suppress the "ok" (or "yes") button from the widget.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.ok_label
|
||||
This corresponds to the command-line option "\fB--ok-label\fP \fIstring\fP".
|
||||
@ -488,6 +503,7 @@ If true,
|
||||
each widget prints its size to \fB\*p\fP's output when it is invoked.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.quoted
|
||||
This corresponds to the command-line option "\fB--quoted\fP.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.separate_output
|
||||
This corresponds to the command-line option "\fB--separate-output\fP".
|
||||
@ -501,8 +517,9 @@ If true,
|
||||
Use single-quoting as needed (and no quotes if unneeded) for the
|
||||
output of checklist's as well as the item-help text.
|
||||
If this option is not set, \fB\*p\fP uses double quotes around each item.
|
||||
That requires occasional use of backslashes to make the output useful in
|
||||
The latter requires occasional use of backslashes to make the output useful in
|
||||
shell scripts.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.IP \fIDIALOG_VARS.size_err
|
||||
This corresponds to the command-line option "\fB--size-err\fP".
|
||||
If true,
|
||||
@ -918,7 +935,8 @@ If zero, the height is based on the screen size.
|
||||
.B int \fIwidth
|
||||
is the desired width of the box.
|
||||
If zero, the height is based on the screen size.
|
||||
.IP percent
|
||||
.TP 5
|
||||
.B int \fIpercent
|
||||
is the percentage to show in the progress bar.
|
||||
.TP 5
|
||||
.B int \fIitem_no
|
||||
@ -1193,6 +1211,9 @@ function to call when input ends, e.g., to free caller's additional data.
|
||||
.TP 5
|
||||
.B dlg_add_quoted
|
||||
Add a quoted string to the result buffer (see \fBdlg_add_result\fP).
|
||||
If no quotes are necessary, none are used.
|
||||
If \fBdialog_vars.single_quoted\fR is set, single-quotes are used.
|
||||
Otherwise, double-quotes are used.
|
||||
.RS
|
||||
.TP 5
|
||||
.B char * \fIstring
|
||||
@ -1201,7 +1222,7 @@ is the string to add.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_add_result
|
||||
Add a quoted string to the result buffer \fBdialog_vars.input_result\fP.
|
||||
Add a string to the result buffer \fBdialog_vars.input_result\fP.
|
||||
.RS
|
||||
.TP 5
|
||||
.B char * \fIstring
|
||||
@ -1276,6 +1297,10 @@ is the percentage to show in the progress bar.
|
||||
returns its parameter transformed to the
|
||||
corresponding "+" or "-", etc. for the line-drawing characters used in \fB\*p\fP.
|
||||
If the parameter is not a line-drawing or other special character such as ACS_DARROW, it returns 0.
|
||||
.RS
|
||||
.TP 5
|
||||
.B chtype \fIch
|
||||
is the parameter, usually one of the \fBACS_\fP\fIxxx\fP constants.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
@ -1337,13 +1362,13 @@ is the name of the file.
|
||||
.TP 5
|
||||
.B int * \fIheight
|
||||
is the nominal height.
|
||||
If it is -1, use the screen's height after subtracting \fBdialog_vars.begin_y\fP
|
||||
if \fBdialog_vars.begin_set\fP is true.
|
||||
If it is -1, use the screen's height (after subtracting \fBdialog_vars.begin_y\fP
|
||||
if \fBdialog_vars.begin_set\fP is true).
|
||||
.TP 5
|
||||
.B int \fI*width
|
||||
.B int * \fIwidth
|
||||
is the nominal width.
|
||||
If it is -1, use the screen's width after subtracting \fBdialog_vars.begin_x\fP
|
||||
if \fBdialog_vars.begin_set\fP is true.
|
||||
If it is -1, use the screen's width (after subtracting \fBdialog_vars.begin_x\fP
|
||||
if \fBdialog_vars.begin_set\fP is true).
|
||||
.TP 5
|
||||
.B int \fIboxlines
|
||||
is the number of lines to reserve on the screen for drawing boxes.
|
||||
@ -1360,7 +1385,7 @@ this calls \fBbeep\fP once and sets
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_boxchar
|
||||
returns its parameter transformed as follows:
|
||||
returns its \fBchtype\fP parameter transformed as follows:
|
||||
.RS
|
||||
.TP 3
|
||||
.B -
|
||||
@ -1685,6 +1710,18 @@ is the string to measure.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_count_real_columns
|
||||
Returns the number of columns used for a string,
|
||||
accounting for "\\Z" sequences which can be used for
|
||||
coloring the text if \fBdialog_vars.colors\fP is set.
|
||||
This is not necessarily the number of bytes in a string.
|
||||
.RS
|
||||
.TP 5
|
||||
.B const char * \fIstring
|
||||
is the string to measure.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_count_wchars
|
||||
Returns the number of wide-characters in the string.
|
||||
.RS
|
||||
@ -1719,6 +1756,13 @@ is the window's width
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_default_button
|
||||
If \fBdialog_vars.default_button\fP is positive,
|
||||
return the button-index for that button code,
|
||||
using \fBdlg_ok_buttoncode\fP to test indices starting with zero.
|
||||
Otherwise (or if no match was found for the button code), return zero.
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_default_formitem
|
||||
If \fBdialog_vars.default_item\fP is not null,
|
||||
find that name by matching the \fIname\fP field in the list of form \fIitems\fP.
|
||||
@ -1830,7 +1874,8 @@ is the window's border attribute.
|
||||
Draw a partial box at the bottom of a window,
|
||||
e.g., to surround a row of buttons.
|
||||
It is designed to merge with an existing box around
|
||||
the whole window, so it uses tee-elements rather than corner-elements
|
||||
the whole window (see \fBdlg_draw_box\fP),
|
||||
so it uses tee-elements rather than corner-elements
|
||||
on the top corners of this box.
|
||||
.RS
|
||||
.TP 5
|
||||
@ -1839,6 +1884,27 @@ is the window to update.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_draw_bottom_box2
|
||||
Draw a partial box at the bottom of a window,
|
||||
e.g., to surround a row of buttons.
|
||||
It is designed to merge with an existing box around
|
||||
the whole window (see \fBdlg_draw_box2\fP),
|
||||
so it uses tee-elements rather than corner-elements
|
||||
on the top corners of this box.
|
||||
.RS
|
||||
.TP 5
|
||||
.B WINDOW * \fIwin
|
||||
is the window to update.
|
||||
.B chtype \fIon_left
|
||||
is used to color the upper/left edges of the box, i.e., the tee-element and
|
||||
horizontal line
|
||||
.B chtype \fIon_right
|
||||
is used to color the right edge of the box, i.e., the tee-element
|
||||
.B chtype \fIon_inside
|
||||
is used to fill-color the inside of the box
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_draw_box
|
||||
Draw a rectangular box with line drawing characters.
|
||||
.RS
|
||||
@ -1867,6 +1933,36 @@ is used to color the upper/left edges.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_draw_box2
|
||||
Draw a rectangular box with line drawing characters.
|
||||
.RS
|
||||
.TP 5
|
||||
.B WINDOW * \fIwin
|
||||
is the window to update.
|
||||
.TP 5
|
||||
.B int \fIy
|
||||
is the top row of the box.
|
||||
.TP 5
|
||||
.B int \fIx
|
||||
is the left column of the box.
|
||||
.TP 5
|
||||
.B int \fIheight
|
||||
is the height of the box.
|
||||
.TP 5
|
||||
.B int \fIwidth
|
||||
is the width of the box.
|
||||
.TP 5
|
||||
.B chtype \fIboxchar
|
||||
is used to fill-color for the box contents.
|
||||
.TP 5
|
||||
.B chtype \fIborderchar
|
||||
is used to color the upper/left edges.
|
||||
.TP 5
|
||||
.B chtype \fIborderchar2
|
||||
is used to color the right/lower edges.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_draw_buttons
|
||||
Print a list of buttons at the given position.
|
||||
.RS
|
||||
@ -1992,6 +2088,27 @@ is the title string to display at the top of the widget.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_dummy_menutext
|
||||
This is a utility function which supports the \fB--inputmenu\fP option of
|
||||
the \fB\*p\fP program.
|
||||
If \fBdialog_vars.input_menu\fP is set, \fBdialog_menu\fP passes this
|
||||
pointer to \fBdlg_menu\fP as the \fIrename_menutext\fP parameter.
|
||||
Otherwise, it passes \fBdlg_dummy_menutext\fP.
|
||||
.IP
|
||||
The function should only return \fBDLG_EXIT_ERROR\fP.
|
||||
.RS
|
||||
.TP 5
|
||||
.B DIALOG_LISTITEM * \fIitems
|
||||
is the list of menu items
|
||||
.TP 5
|
||||
.B int \fIcurrent
|
||||
is the index of the currently-selected item
|
||||
.TP 5
|
||||
.B char * \fInewtext
|
||||
is the updated text for the menu item
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_dump_keys
|
||||
Write all user-defined key-bindings to the given stream,
|
||||
e.g., as part of \fBdlg_create_rc\fP.
|
||||
@ -2002,6 +2119,20 @@ is the stream on which to write the bindings.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_dump_window_keys
|
||||
Write all user-defined key-bindings to the given stream,
|
||||
e.g., as part of \fBdlg_create_rc\fP.
|
||||
.RS
|
||||
.TP 5
|
||||
.B FILE * \fIfp
|
||||
is the stream on which to write the bindings.
|
||||
.TP 5
|
||||
.B WINDOW * \fIwin
|
||||
is the window for which bindings should be dumped.
|
||||
If it is null, then only built-in bindings are dumped.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_eat_argv
|
||||
Remove one or more items from an argument vector.
|
||||
.RS
|
||||
@ -2416,6 +2547,10 @@ The widget sets the referenced location to the index of the current display
|
||||
item (cursor) when it returns.
|
||||
.TP 5
|
||||
.B DIALOG_INPUTMENU \fIrename_menutext
|
||||
If this is not \fBdlg_dummy_menutext\fP,
|
||||
the widget acts like an \fIinputmenu\fP widget,
|
||||
providing an extra "Rename" button,
|
||||
which activates an edit feature on the selected menu item.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
@ -2898,11 +3033,35 @@ is the binding table
|
||||
Remove a callback.
|
||||
.RS
|
||||
.TP 5
|
||||
.B DIALOG_CALLBACK \fI* p
|
||||
.B DIALOG_CALLBACK * \fIp
|
||||
contains the callback information.
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_renamed_menutext
|
||||
This is a utility function which supports the \fB--inputmenu\fP option of
|
||||
the \fB\*p\fP program.
|
||||
If \fBdialog_vars.input_menu\fP is set, \fBdialog_menu\fP passes this
|
||||
pointer to \fBdlg_menu\fP as the \fIrename_menutext\fP parameter.
|
||||
Otherwise, it passes \fBdlg_dummy_menutext\fP.
|
||||
.IP
|
||||
The function should add "RENAMED" to \fBdialog_vars.input_result\fP ,
|
||||
followed by the menu item's name and the \fInewtext\fP value
|
||||
(with a space separating the three items),
|
||||
and return \fBDLG_EXIT_EXTRA\fP.
|
||||
.RS
|
||||
.TP 5
|
||||
.B DIALOG_LISTITEM * \fIitems
|
||||
is the list of menu items
|
||||
.TP 5
|
||||
.B int \fIcurrent
|
||||
is the index of the currently-selected item
|
||||
.TP 5
|
||||
.B char * \fInewtext
|
||||
is the updated text for the menu item
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
.TP 5
|
||||
.B dlg_restore_vars
|
||||
Restore \fB\*p\fP's variables from the given variable (see \fBdialog_save_vars\fP).
|
||||
.RS
|
||||
@ -3015,10 +3174,10 @@ is the string to duplicate
|
||||
compare two strings, ignoring case.
|
||||
.RS
|
||||
.TP 5
|
||||
.B const char \fI* a
|
||||
.B const char * \fIa
|
||||
is one string
|
||||
.TP 5
|
||||
.B const char \fI* b
|
||||
.B const char * \fIb
|
||||
is the other string
|
||||
.RE
|
||||
.\" ---------------------------------------------------------------------------
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: dialog.c,v 1.193 2011/06/29 09:10:56 tom Exp $
|
||||
* $Id: dialog.c,v 1.202 2012/07/01 20:20:39 tom Exp $
|
||||
*
|
||||
* cdialog - Display simple dialog boxes from shell scripts
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -57,6 +57,7 @@ typedef enum {
|
||||
,o_cr_wrap
|
||||
,o_create_rc
|
||||
,o_date_format
|
||||
,o_default_button
|
||||
,o_default_item
|
||||
,o_defaultno
|
||||
,o_dselect
|
||||
@ -201,6 +202,7 @@ static const Options options[] = {
|
||||
{ "cr-wrap", o_cr_wrap, 1, "" },
|
||||
{ "create-rc", o_create_rc, 1, NULL },
|
||||
{ "date-format", o_date_format, 1, "<str>" },
|
||||
{ "default-button", o_default_button, 1, "<str>" },
|
||||
{ "default-item", o_default_item, 1, "<str>" },
|
||||
{ "defaultno", o_defaultno, 1, "" },
|
||||
{ "dselect", o_dselect, 2, "<directory> <height> <width>" },
|
||||
@ -431,6 +433,12 @@ unescape_argv(int *argcp, char ***argvp)
|
||||
dialog_argv = (*argvp);
|
||||
}
|
||||
|
||||
#define OptionChars "\
|
||||
0123456789\
|
||||
-\
|
||||
abcdefghijklmnopqrstuvwxyz\
|
||||
"
|
||||
|
||||
/*
|
||||
* Check if the given string from main's argv is an option.
|
||||
*/
|
||||
@ -449,7 +457,11 @@ isOption(const char *arg)
|
||||
}
|
||||
}
|
||||
} else if (!strncmp(arg, "--", (size_t) 2) && isalpha(UCH(arg[2]))) {
|
||||
if (strlen(arg) == strspn(arg, OptionChars)) {
|
||||
result = TRUE;
|
||||
} else {
|
||||
dlg_exiterr("Invalid option \"%s\"", arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@ -459,17 +471,19 @@ static eOptions
|
||||
lookupOption(const char *name, int pass)
|
||||
{
|
||||
unsigned n;
|
||||
eOptions result = o_unknown;
|
||||
|
||||
if (isOption(name)) {
|
||||
name += 2;
|
||||
for (n = 0; n < sizeof(options) / sizeof(options[0]); n++) {
|
||||
if ((pass & options[n].pass) != 0
|
||||
&& !strcmp(name, options[n].name)) {
|
||||
return options[n].code;
|
||||
result = options[n].code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return o_unknown;
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -685,9 +699,7 @@ call_checklist(CALLARGS)
|
||||
{
|
||||
int tags = howmany_tags(av + 5, CHECKBOX_TAGS);
|
||||
int code;
|
||||
bool save_quoted = dialog_vars.quoted;
|
||||
|
||||
dialog_vars.quoted = !dialog_vars.separate_output;
|
||||
*offset_add = 5 + tags * CHECKBOX_TAGS;
|
||||
code = dialog_checklist(t,
|
||||
av[1],
|
||||
@ -695,7 +707,6 @@ call_checklist(CALLARGS)
|
||||
numeric_arg(av, 3),
|
||||
numeric_arg(av, 4),
|
||||
tags, av + 5, FLAG_CHECK);
|
||||
dialog_vars.quoted = save_quoted;
|
||||
return code;
|
||||
}
|
||||
|
||||
@ -1052,6 +1063,43 @@ optionValue(char **argv, int *num)
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Return exit-code for a named button */
|
||||
static int
|
||||
button_code(const char *name)
|
||||
{
|
||||
/* *INDENT-OFF* */
|
||||
static struct {
|
||||
const char *name;
|
||||
int code;
|
||||
} table[] = {
|
||||
{ "ok", DLG_EXIT_OK },
|
||||
{ "yes", DLG_EXIT_OK },
|
||||
{ "cancel", DLG_EXIT_CANCEL },
|
||||
{ "no", DLG_EXIT_CANCEL },
|
||||
{ "help", DLG_EXIT_HELP },
|
||||
{ "extra", DLG_EXIT_EXTRA },
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
int code = DLG_EXIT_ERROR;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < (sizeof(table) / sizeof(table[0])); i++) {
|
||||
if (!dlg_strcmp(name, table[i].name)) {
|
||||
code = table[i].code;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (code == DLG_EXIT_ERROR) {
|
||||
char temp[80];
|
||||
sprintf(temp, "Button name \"%.20s\" unknown", name);
|
||||
Usage(temp);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print parts of a message
|
||||
*/
|
||||
@ -1115,7 +1163,7 @@ Help(void)
|
||||
static const char *const tbl_1[] =
|
||||
{
|
||||
"cdialog (ComeOn Dialog!) version %s",
|
||||
"Copyright 2000-2008,2011 Thomas E. Dickey",
|
||||
"Copyright 2000-2011,2012 Thomas E. Dickey",
|
||||
"This is free software; see the source for copying conditions. There is NO",
|
||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
|
||||
"",
|
||||
@ -1179,6 +1227,29 @@ Help(void)
|
||||
dlg_exit(DLG_EXIT_OK);
|
||||
}
|
||||
|
||||
#ifdef HAVE_DLG_TRACE
|
||||
/*
|
||||
* Only the first call to dlg_trace will open a trace file. But each time
|
||||
* --trace is parsed, we show the whole parameter list as it is at that moment,
|
||||
* counting discarded parameters. The only way to capture the whole parameter
|
||||
* list is if --trace is the first option.
|
||||
*/
|
||||
static void
|
||||
process_trace_option(char **argv, int *offset)
|
||||
{
|
||||
int j;
|
||||
|
||||
if (dialog_state.trace_output == 0)
|
||||
dlg_trace(optionString(argv, offset));
|
||||
|
||||
dlg_trace_msg("# Parameters:\n");
|
||||
for (j = 0; argv[j] != 0; ++j) {
|
||||
dlg_trace_msg("# argv[%d] = %s\n", j, argv[j]);
|
||||
}
|
||||
*offset += 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* "Common" options apply to all widgets more/less. Most of the common options
|
||||
* set values in dialog_vars, a few set dialog_state and a couple write to the
|
||||
@ -1187,12 +1258,12 @@ Help(void)
|
||||
static int
|
||||
process_common_options(int argc, char **argv, int offset, bool output)
|
||||
{
|
||||
#ifdef HAVE_DLG_TRACE
|
||||
int n;
|
||||
#endif
|
||||
bool done = FALSE;
|
||||
|
||||
dlg_trace_msg("# process_common_options, offset %d\n", offset);
|
||||
|
||||
while (offset < argc && !done) { /* Common options */
|
||||
dlg_trace_msg("#\targv[%d] = %s\n", offset, argv[offset]);
|
||||
switch (lookupOption(argv[offset], 1)) {
|
||||
case o_title:
|
||||
dialog_vars.title = optionString(argv, &offset);
|
||||
@ -1250,6 +1321,11 @@ process_common_options(int argc, char **argv, int offset, bool output)
|
||||
break;
|
||||
case o_defaultno:
|
||||
dialog_vars.defaultno = TRUE;
|
||||
dialog_vars.default_button = DLG_EXIT_CANCEL;
|
||||
break;
|
||||
case o_default_button:
|
||||
dialog_vars.default_button = button_code(optionString(argv, &offset));
|
||||
dialog_vars.defaultno = dialog_vars.default_button == DLG_EXIT_CANCEL;
|
||||
break;
|
||||
case o_default_item:
|
||||
dialog_vars.default_item = optionString(argv, &offset);
|
||||
@ -1416,10 +1492,7 @@ process_common_options(int argc, char **argv, int offset, bool output)
|
||||
break;
|
||||
#ifdef HAVE_DLG_TRACE
|
||||
case o_trace:
|
||||
dlg_trace(optionString(argv, &offset));
|
||||
for (n = 0; argv[n] != 0; ++n) {
|
||||
dlg_trace_msg("argv[%d] = %s\n", n, argv[n]);
|
||||
}
|
||||
process_trace_option(argv, &offset);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
@ -1440,12 +1513,16 @@ init_result(char *buffer)
|
||||
static char **special_argv = 0;
|
||||
static int special_argc = 0;
|
||||
|
||||
dlg_trace_msg("# init_result\n");
|
||||
|
||||
/* clear everything we do not save for the next widget */
|
||||
memset(&dialog_vars, 0, sizeof(dialog_vars));
|
||||
|
||||
dialog_vars.input_result = buffer;
|
||||
dialog_vars.input_result[0] = '\0';
|
||||
|
||||
dialog_vars.default_button = -1;
|
||||
|
||||
/*
|
||||
* The first time this is called, check for common options given by an
|
||||
* environment variable.
|
||||
@ -1458,12 +1535,20 @@ init_result(char *buffer)
|
||||
special_argv = dlg_string_to_argv(env);
|
||||
special_argc = dlg_count_argv(special_argv);
|
||||
}
|
||||
first = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are not checking memory leaks, just do the parse of the
|
||||
* environment once.
|
||||
*/
|
||||
if (special_argv != 0) {
|
||||
process_common_options(special_argc, special_argv, 0, FALSE);
|
||||
#ifdef NO_LEAKS
|
||||
free(special_argv[0]);
|
||||
free(special_argv);
|
||||
special_argv = 0;
|
||||
special_argc = 0;
|
||||
first = TRUE;
|
||||
#endif
|
||||
}
|
||||
@ -1539,10 +1624,28 @@ main(int argc, char *argv[])
|
||||
case o_help:
|
||||
Help();
|
||||
break;
|
||||
#ifdef HAVE_DLG_TRACE
|
||||
case o_trace:
|
||||
/*
|
||||
* Process/remove the --trace option if it is the first option.
|
||||
* Otherwise, process it in more/less expected order as a
|
||||
* "common" option.
|
||||
*/
|
||||
if (base == 1) {
|
||||
process_trace_option(argv, &offset);
|
||||
break;
|
||||
} else {
|
||||
++offset;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
++offset;
|
||||
continue;
|
||||
}
|
||||
dlg_trace_msg("# discarding %d parameters starting with argv[%d] (%s)\n",
|
||||
1 + offset - base, base,
|
||||
argv[base]);
|
||||
for (j = base; j < argc; ++j) {
|
||||
dialog_argv[j] = dialog_argv[j + 1 + (offset - base)];
|
||||
if (dialog_opts != 0)
|
||||
@ -1679,6 +1782,7 @@ main(int argc, char *argv[])
|
||||
retval = show_result((*(modePtr->jumper)) (dialog_vars.title,
|
||||
argv + offset,
|
||||
&offset_add));
|
||||
dlg_trace_msg("# widget returns %d\n", retval);
|
||||
offset += offset_add;
|
||||
|
||||
if (dialog_vars.input_result != my_buffer) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: dialog.h,v 1.231 2011/06/29 09:51:00 tom Exp $
|
||||
* $Id: dialog.h,v 1.245 2012/07/01 18:44:03 tom Exp $
|
||||
*
|
||||
* dialog.h -- common declarations for all dialog modules
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -59,11 +59,9 @@
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
/* most curses.h headers include this, some do not */
|
||||
#if defined(HAVE_UNCTRL_H)
|
||||
#include <unctrl.h>
|
||||
#include <unctrl.h> /* most curses.h headers include this, some do not */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Solaris xpg4 renames these */
|
||||
@ -97,6 +95,10 @@
|
||||
#define _(s) s
|
||||
#endif
|
||||
|
||||
#ifndef GCC_PRINTFLIKE
|
||||
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
|
||||
#endif
|
||||
|
||||
#ifndef GCC_NORETURN
|
||||
#define GCC_NORETURN /*nothing*/
|
||||
#endif
|
||||
@ -233,6 +235,11 @@
|
||||
#define getparyx(win,y,x) (y = (win)?(win)->_pary:ERR, x = (win)?(win)->_parx:ERR)
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_WGETPARENT) && defined(HAVE_WINDOW__PARENT)
|
||||
#undef wgetparent
|
||||
#define wgetparent(win) ((win) ? (win)->_parent : 0)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -274,6 +281,12 @@ extern int dlg_getparx(WINDOW * /*win*/);
|
||||
extern int dlg_getpary(WINDOW * /*win*/);
|
||||
#endif
|
||||
|
||||
#if !(defined(HAVE_WGETPARENT) && defined(HAVE_WINDOW__PARENT))
|
||||
#undef wgetparent
|
||||
#define wgetparent(win) dlg_wgetparent(win)
|
||||
extern WINDOW * dlg_wgetparent(WINDOW * /*win*/);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This is a list of "old" names, which should be helpful in updating
|
||||
* applications that use libdialog. Starting with 2003/11/26, all exported
|
||||
@ -357,6 +370,10 @@ extern int dlg_getpary(WINDOW * /*win*/);
|
||||
#define form_text_attr DIALOG_ATR(31)
|
||||
#define form_item_readonly_attr DIALOG_ATR(32)
|
||||
#define gauge_attr DIALOG_ATR(33)
|
||||
#define border2_attr DIALOG_ATR(34)
|
||||
#define inputbox_border2_attr DIALOG_ATR(35)
|
||||
#define searchbox_border2_attr DIALOG_ATR(36)
|
||||
#define menubox_border2_attr DIALOG_ATR(37)
|
||||
|
||||
#define DLGK_max (KEY_MAX + 256)
|
||||
|
||||
@ -396,6 +413,7 @@ typedef struct {
|
||||
DIALOG_CALLBACK *getc_callbacks;
|
||||
DIALOG_CALLBACK *getc_redirect;
|
||||
DIALOG_WINDOWS *all_windows;
|
||||
DIALOG_WINDOWS *all_subwindows;
|
||||
FILE *output; /* option "--output-fd fd" */
|
||||
FILE *pipe_input; /* used for gauge widget */
|
||||
FILE *screen_output; /* newterm(), etc. */
|
||||
@ -485,6 +503,8 @@ typedef struct {
|
||||
char *help_file; /* option "--hfile" */
|
||||
bool in_helpfile; /* flag to prevent recursion in --hfile */
|
||||
bool no_nl_expand; /* option "--no-nl-expand" */
|
||||
/* 1.1-20120701 */
|
||||
int default_button; /* option "--default-button" (exit code) */
|
||||
} DIALOG_VARS;
|
||||
|
||||
#define USE_ITEM_HELP(s) (dialog_vars.item_help && (s) != 0)
|
||||
@ -646,6 +666,10 @@ 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_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 */
|
||||
extern int dlg_dummy_menutext(DIALOG_LISTITEM * /*items*/, int /*current*/, char * /*newtext*/);
|
||||
extern int dlg_renamed_menutext(DIALOG_LISTITEM * /*items*/, int /*current*/, char * /*newtext*/);
|
||||
|
||||
/* rc.c */
|
||||
#ifdef HAVE_RC_FILE
|
||||
extern int dlg_parse_rc(void);
|
||||
@ -679,9 +703,11 @@ extern int dlg_box_y_ordinate(int /*height*/);
|
||||
extern int dlg_calc_list_width(int /*item_no*/, DIALOG_LISTITEM * /*items*/);
|
||||
extern int dlg_calc_listw(int /*item_no*/, char ** /*items*/, int /*group*/);
|
||||
extern int dlg_check_scrolled(int /* key */, int /* last */, int /* page */, bool * /* show */, int * /* offset */);
|
||||
extern int dlg_count_real_columns(const char * /*text*/);
|
||||
extern int dlg_default_item(char ** /*items*/, int /*llen*/);
|
||||
extern int dlg_default_listitem(DIALOG_LISTITEM * /*items*/);
|
||||
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_quoted(char * /*string*/);
|
||||
@ -699,7 +725,9 @@ extern void dlg_ctl_size(int /*height*/, int /*width*/);
|
||||
extern void dlg_del_window(WINDOW * /*win*/);
|
||||
extern void dlg_does_output(void);
|
||||
extern void dlg_draw_bottom_box(WINDOW * /*win*/);
|
||||
extern void dlg_draw_bottom_box2(WINDOW * /*win*/, chtype /*on_left*/, chtype /*on_right*/, chtype /*on_inside*/);
|
||||
extern void dlg_draw_box(WINDOW * /*win*/, int /*y*/, int /*x*/, int /*height*/, int /*width*/, chtype /*boxchar*/, chtype /*borderchar*/);
|
||||
extern void dlg_draw_box2(WINDOW * /*win*/, int /*y*/, int /*x*/, int /*height*/, int /*width*/, chtype /*boxchar*/, chtype /*borderchar*/, chtype /*borderchar2*/);
|
||||
extern void dlg_draw_title(WINDOW *win, const char *title);
|
||||
extern void dlg_exit(int /*code*/) GCC_NORETURN;
|
||||
extern void dlg_item_help(const char * /*txt*/);
|
||||
@ -715,11 +743,7 @@ extern void dlg_trim_string(char * /*src*/);
|
||||
extern void end_dialog(void);
|
||||
extern void init_dialog(FILE * /*input*/, FILE * /*output*/);
|
||||
|
||||
extern void dlg_exiterr(const char *, ...) GCC_NORETURN
|
||||
#if defined(__GNUC__) && !defined(printf)
|
||||
__attribute__((format(printf,1,2)))
|
||||
#endif
|
||||
;
|
||||
extern void dlg_exiterr(const char *, ...) GCC_NORETURN GCC_PRINTFLIKE(1,2);
|
||||
|
||||
#ifdef HAVE_COLOR
|
||||
extern chtype dlg_color_pair(int /*foreground*/, int /*background*/);
|
||||
@ -736,11 +760,7 @@ extern int dlg_strcmp(const char * /*a*/, const char * /*b*/);
|
||||
|
||||
#ifdef HAVE_DLG_TRACE
|
||||
#define DLG_TRACE(params) dlg_trace_msg params
|
||||
extern void dlg_trace_msg(const char *fmt, ...)
|
||||
#ifdef GCC_PRINTF
|
||||
__attribute__((format(printf,1,2)))
|
||||
#endif
|
||||
;
|
||||
extern void dlg_trace_msg(const char *fmt, ...) GCC_PRINTFLIKE(1,2);
|
||||
extern void dlg_trace_win(WINDOW * /*win*/);
|
||||
extern void dlg_trace_chr(int /*ch*/, int /*fkey*/);
|
||||
extern void dlg_trace(const char * /*fname*/);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: dlg_colors.h,v 1.16 2011/01/17 00:20:32 tom Exp $
|
||||
* $Id: dlg_colors.h,v 1.17 2011/10/14 21:19:59 tom Exp $
|
||||
*
|
||||
* colors.h -- color attribute definitions
|
||||
*
|
||||
@ -56,6 +56,10 @@
|
||||
#define DLGC_BG_BORDER COLOR_WHITE
|
||||
#define DLGC_HL_BORDER TRUE
|
||||
|
||||
#define DLGC_FG_BORDER2 DLGC_FG_DIALOG
|
||||
#define DLGC_BG_BORDER2 DLGC_BG_DIALOG
|
||||
#define DLGC_HL_BORDER2 DLGC_HL_DIALOG
|
||||
|
||||
#define DLGC_FG_BUTTON_ACTIVE COLOR_WHITE
|
||||
#define DLGC_BG_BUTTON_ACTIVE COLOR_BLUE
|
||||
#define DLGC_HL_BUTTON_ACTIVE TRUE
|
||||
@ -92,6 +96,10 @@
|
||||
#define DLGC_BG_INPUTBOX_BORDER COLOR_WHITE
|
||||
#define DLGC_HL_INPUTBOX_BORDER FALSE
|
||||
|
||||
#define DLGC_FG_INPUTBOX_BORDER2 DLGC_FG_INPUTBOX
|
||||
#define DLGC_BG_INPUTBOX_BORDER2 DLGC_BG_INPUTBOX
|
||||
#define DLGC_HL_INPUTBOX_BORDER2 DLGC_HL_INPUTBOX
|
||||
|
||||
#define DLGC_FG_SEARCHBOX COLOR_BLACK
|
||||
#define DLGC_BG_SEARCHBOX COLOR_WHITE
|
||||
#define DLGC_HL_SEARCHBOX FALSE
|
||||
@ -104,6 +112,10 @@
|
||||
#define DLGC_BG_SEARCHBOX_BORDER COLOR_WHITE
|
||||
#define DLGC_HL_SEARCHBOX_BORDER TRUE
|
||||
|
||||
#define DLGC_FG_SEARCHBOX_BORDER2 DLGC_FG_SEARCHBOX
|
||||
#define DLGC_BG_SEARCHBOX_BORDER2 DLGC_BG_SEARCHBOX
|
||||
#define DLGC_HL_SEARCHBOX_BORDER2 DLGC_HL_SEARCHBOX
|
||||
|
||||
#define DLGC_FG_POSITION_INDICATOR COLOR_BLUE
|
||||
#define DLGC_BG_POSITION_INDICATOR COLOR_WHITE
|
||||
#define DLGC_HL_POSITION_INDICATOR TRUE
|
||||
@ -116,6 +128,10 @@
|
||||
#define DLGC_BG_MENUBOX_BORDER COLOR_WHITE
|
||||
#define DLGC_HL_MENUBOX_BORDER TRUE
|
||||
|
||||
#define DLGC_FG_MENUBOX_BORDER2 DLGC_FG_MENUBOX
|
||||
#define DLGC_BG_MENUBOX_BORDER2 DLGC_BG_MENUBOX
|
||||
#define DLGC_HL_MENUBOX_BORDER2 DLGC_HL_MENUBOX
|
||||
|
||||
#define DLGC_FG_ITEM COLOR_BLACK
|
||||
#define DLGC_BG_ITEM COLOR_WHITE
|
||||
#define DLGC_HL_ITEM FALSE
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: dlg_keys.c,v 1.26 2009/02/22 16:19:51 tom Exp $
|
||||
* $Id: dlg_keys.c,v 1.34 2011/10/14 00:41:08 tom Exp $
|
||||
*
|
||||
* dlg_keys.c -- runtime binding support for dialog
|
||||
*
|
||||
* Copyright 2006-2007,2009 Thomas E. Dickey
|
||||
* Copyright 2006-2009,2011 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
|
||||
@ -34,6 +34,7 @@ LIST_BINDINGS {
|
||||
DLG_KEYS_BINDING *binding; /* list of bindings */
|
||||
};
|
||||
|
||||
#define WILDNAME "*"
|
||||
static LIST_BINDINGS *all_bindings;
|
||||
static const DLG_KEYS_BINDING end_keys_binding = END_KEYS_BINDING;
|
||||
|
||||
@ -61,6 +62,17 @@ dlg_register_window(WINDOW *win, const char *name, DLG_KEYS_BINDING * binding)
|
||||
else
|
||||
all_bindings = p;
|
||||
}
|
||||
#if defined(HAVE_DLG_TRACE) && defined(HAVE_RC_FILE)
|
||||
/*
|
||||
* Trace the binding information assigned to this window. For most widgets
|
||||
* there is only one binding table. forms have two, so the trace will be
|
||||
* longer. Since compiled-in bindings are only visible when the widget is
|
||||
* registered, there is no other way to see what bindings are available,
|
||||
* than by running dialog and tracing it.
|
||||
*/
|
||||
dlg_trace_msg("# dlg_register_window %s\n", name);
|
||||
dlg_dump_window_keys(dialog_state.trace_output, win);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -189,7 +201,7 @@ int
|
||||
dlg_lookup_key(WINDOW *win, int curses_key, int *fkey)
|
||||
{
|
||||
LIST_BINDINGS *p;
|
||||
int n;
|
||||
DLG_KEYS_BINDING *q;
|
||||
|
||||
/*
|
||||
* Ignore mouse clicks, since they are already encoded properly.
|
||||
@ -208,19 +220,28 @@ dlg_lookup_key(WINDOW *win, int curses_key, int *fkey)
|
||||
} else
|
||||
#endif
|
||||
if (*fkey == 0 || curses_key < KEY_MAX) {
|
||||
const char *name = WILDNAME;
|
||||
if (win != 0) {
|
||||
for (p = all_bindings; p != 0; p = p->link) {
|
||||
if (p->win == win || p->win == 0) {
|
||||
if (p->win == win) {
|
||||
name = p->name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (p = all_bindings; p != 0; p = p->link) {
|
||||
if (p->win == win || (p->win == 0 && !strcmp(p->name, name))) {
|
||||
int function_key = (*fkey != 0);
|
||||
for (n = 0; p->binding[n].is_function_key >= 0; ++n) {
|
||||
for (q = p->binding; q->is_function_key >= 0; ++q) {
|
||||
if (p->buttons
|
||||
&& !function_key
|
||||
&& p->binding[n].curses_key == (int) dlg_toupper(curses_key)) {
|
||||
&& q->curses_key == (int) dlg_toupper(curses_key)) {
|
||||
*fkey = 0;
|
||||
return p->binding[n].dialog_key;
|
||||
return q->dialog_key;
|
||||
}
|
||||
if (p->binding[n].curses_key == curses_key
|
||||
&& p->binding[n].is_function_key == function_key) {
|
||||
*fkey = p->binding[n].dialog_key;
|
||||
if (q->curses_key == curses_key
|
||||
&& q->is_function_key == function_key) {
|
||||
*fkey = q->dialog_key;
|
||||
return *fkey;
|
||||
}
|
||||
}
|
||||
@ -295,10 +316,18 @@ typedef struct {
|
||||
int code;
|
||||
} CODENAME;
|
||||
|
||||
#define ASCII_NAME(name,code) { #name, code }
|
||||
#define CURSES_NAME(upper) { #upper, KEY_ ## upper }
|
||||
#define COUNT_CURSES sizeof(curses_names)/sizeof(curses_names[0])
|
||||
static const CODENAME curses_names[] =
|
||||
{
|
||||
ASCII_NAME(ESC, '\033'),
|
||||
ASCII_NAME(CR, '\r'),
|
||||
ASCII_NAME(LF, '\n'),
|
||||
ASCII_NAME(FF, '\f'),
|
||||
ASCII_NAME(TAB, '\t'),
|
||||
ASCII_NAME(DEL, '\177'),
|
||||
|
||||
CURSES_NAME(DOWN),
|
||||
CURSES_NAME(UP),
|
||||
CURSES_NAME(LEFT),
|
||||
@ -408,6 +437,10 @@ static const CODENAME dialog_names[] =
|
||||
DIALOG_NAME(FIELD_LAST),
|
||||
DIALOG_NAME(FIELD_NEXT),
|
||||
DIALOG_NAME(FIELD_PREV),
|
||||
DIALOG_NAME(FORM_FIRST),
|
||||
DIALOG_NAME(FORM_LAST),
|
||||
DIALOG_NAME(FORM_NEXT),
|
||||
DIALOG_NAME(FORM_PREV),
|
||||
DIALOG_NAME(GRID_UP),
|
||||
DIALOG_NAME(GRID_DOWN),
|
||||
DIALOG_NAME(GRID_LEFT),
|
||||
@ -418,7 +451,9 @@ static const CODENAME dialog_names[] =
|
||||
DIALOG_NAME(ENTER),
|
||||
DIALOG_NAME(BEGIN),
|
||||
DIALOG_NAME(FINAL),
|
||||
DIALOG_NAME(SELECT)
|
||||
DIALOG_NAME(SELECT),
|
||||
DIALOG_NAME(HELPFILE),
|
||||
DIALOG_NAME(TRACE)
|
||||
};
|
||||
|
||||
static char *
|
||||
@ -472,9 +507,9 @@ compare_bindings(LIST_BINDINGS * a, LIST_BINDINGS * b)
|
||||
if (a->win == b->win) {
|
||||
if (!strcmp(a->name, b->name)) {
|
||||
result = a->binding[0].curses_key - b->binding[0].curses_key;
|
||||
} else if (!strcmp(b->name, "*")) {
|
||||
} else if (!strcmp(b->name, WILDNAME)) {
|
||||
result = -1;
|
||||
} else if (!strcmp(a->name, "*")) {
|
||||
} else if (!strcmp(a->name, WILDNAME)) {
|
||||
result = 1;
|
||||
} else {
|
||||
result = dlg_strcmp(a->name, b->name);
|
||||
@ -572,6 +607,7 @@ dlg_parse_bindkey(char *params)
|
||||
p = skip_black(p);
|
||||
if (p != widget && *p != '\0') {
|
||||
*p++ = '\0';
|
||||
p = skip_white(p);
|
||||
q = p;
|
||||
while (*p != '\0' && curses_key < 0) {
|
||||
if (escaped) {
|
||||
@ -613,7 +649,7 @@ dlg_parse_bindkey(char *params)
|
||||
for (xx = 0; xx < COUNT_CURSES; ++xx) {
|
||||
if (!dlg_strcmp(curses_names[xx].name, q)) {
|
||||
curses_key = curses_names[xx].code;
|
||||
is_function = TRUE;
|
||||
is_function = (curses_key >= KEY_MIN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -700,12 +736,43 @@ dump_one_binding(FILE *fp, const char *widget, DLG_KEYS_BINDING * binding)
|
||||
fputc('\n', fp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dump bindings for the given window. If it is a null, then this dumps the
|
||||
* initial bindings which were loaded from the rc-file that are used as
|
||||
* overall defaults.
|
||||
*/
|
||||
void
|
||||
dlg_dump_window_keys(FILE *fp, WINDOW *win)
|
||||
{
|
||||
if (fp != 0) {
|
||||
LIST_BINDINGS *p;
|
||||
DLG_KEYS_BINDING *q;
|
||||
const char *last = "";
|
||||
|
||||
for (p = all_bindings; p != 0; p = p->link) {
|
||||
if (p->win == win) {
|
||||
if (dlg_strcmp(last, p->name)) {
|
||||
fprintf(fp, "\n# key bindings for %s widgets\n",
|
||||
!strcmp(p->name, WILDNAME) ? "all" : p->name);
|
||||
last = p->name;
|
||||
}
|
||||
for (q = p->binding; q->is_function_key >= 0; ++q) {
|
||||
dump_one_binding(fp, p->name, q);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Dump all of the bindings which are not specific to a given widget, i.e.,
|
||||
* the "win" member is null.
|
||||
*/
|
||||
void
|
||||
dlg_dump_keys(FILE *fp)
|
||||
{
|
||||
if (fp != 0) {
|
||||
LIST_BINDINGS *p;
|
||||
const char *last = "";
|
||||
unsigned n;
|
||||
unsigned count = 0;
|
||||
|
||||
for (p = all_bindings; p != 0; p = p->link) {
|
||||
@ -714,15 +781,7 @@ dlg_dump_keys(FILE *fp)
|
||||
}
|
||||
}
|
||||
if (count != 0) {
|
||||
for (p = all_bindings, n = 0; p != 0; p = p->link) {
|
||||
if (p->win == 0) {
|
||||
if (dlg_strcmp(last, p->name)) {
|
||||
fprintf(fp, "\n# key bindings for %s widgets\n",
|
||||
!strcmp(p->name, "*") ? "all" : p->name);
|
||||
last = p->name;
|
||||
}
|
||||
dump_one_binding(fp, p->name, p->binding);
|
||||
}
|
||||
dlg_dump_window_keys(fp, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: dlg_keys.h,v 1.26 2011/06/21 22:09:22 tom Exp $
|
||||
* $Id: dlg_keys.h,v 1.31 2012/07/02 23:57:52 tom Exp $
|
||||
*
|
||||
* dlg_keys.h -- runtime binding support for dialog
|
||||
*
|
||||
* Copyright 2005-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2005-2011,2012 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
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
#ifndef DLG_KEYS_H_included
|
||||
#define DLG_KEYS_H_included 1
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
#include <dialog.h>
|
||||
|
||||
@ -31,7 +32,7 @@
|
||||
#define dlg_toupper(ch) towupper((wint_t)ch)
|
||||
#define dlg_isupper(ch) iswupper((wint_t)ch)
|
||||
#else
|
||||
#define dlg_toupper(ch) toupper(ch)
|
||||
#define dlg_toupper(ch) (((ch) > 0 && (ch) <= 255) ? toupper(ch) : (ch))
|
||||
#define dlg_isupper(ch) (isalpha(ch) && isupper(ch))
|
||||
#endif
|
||||
|
||||
@ -45,7 +46,7 @@ typedef struct {
|
||||
int dialog_key;
|
||||
} DLG_KEYS_BINDING;
|
||||
|
||||
#define DLG_KEYS_DATA(dialog, curses) { curses >= KEY_MIN, curses, dialog }
|
||||
#define DLG_KEYS_DATA(dialog, curses) { (curses) >= KEY_MIN, curses, dialog }
|
||||
|
||||
#define END_KEYS_BINDING { -1, 0, 0 }
|
||||
|
||||
@ -75,6 +76,11 @@ typedef enum {
|
||||
DLGK_FIELD_LAST,
|
||||
DLGK_FIELD_NEXT,
|
||||
DLGK_FIELD_PREV,
|
||||
/* moving from form-field to form-field (or buttons) */
|
||||
DLGK_FORM_FIRST,
|
||||
DLGK_FORM_LAST,
|
||||
DLGK_FORM_NEXT,
|
||||
DLGK_FORM_PREV,
|
||||
/* moving within a grid */
|
||||
DLGK_GRID_UP,
|
||||
DLGK_GRID_DOWN,
|
||||
@ -136,6 +142,15 @@ typedef enum {
|
||||
DLG_KEYS_DATA( DLGK_PAGE_PREV, 'b' ), \
|
||||
DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE )
|
||||
|
||||
#define TRAVERSE_BINDINGS \
|
||||
DLG_KEYS_DATA( DLGK_ENTER, ' ' ), \
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ), \
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ), \
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ), \
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ), \
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT )
|
||||
|
||||
extern int dlg_lookup_key(WINDOW * /*win*/, int /*curses_key*/, int * /*dialog_key*/);
|
||||
extern int dlg_result_key(int /*dialog_key*/, int /*fkey*/, int * /*resultp*/);
|
||||
extern void dlg_register_buttons(WINDOW * /*win*/, const char * /*name*/, const char ** /*buttons*/);
|
||||
@ -145,10 +160,12 @@ extern void dlg_unregister_window(WINDOW * /*win*/);
|
||||
#ifdef HAVE_RC_FILE
|
||||
extern int dlg_parse_bindkey(char * /*params*/);
|
||||
extern void dlg_dump_keys(FILE * /*fp*/);
|
||||
extern void dlg_dump_window_keys(FILE * /*fp*/, WINDOW * /*win*/);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
||||
#endif /* DLG_KEYS_H_included */
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: editbox.c,v 1.55 2011/06/21 00:10:46 tom Exp $
|
||||
* $Id: editbox.c,v 1.61 2012/07/01 18:13:32 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* editbox.c -- implements the edit box
|
||||
*
|
||||
* Copyright 2007-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2007-2011,2012 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
|
||||
@ -43,12 +43,13 @@ grow_list(char ***list, int *have, int want)
|
||||
(*list) = dlg_realloc(char *, need, *list);
|
||||
if ((*list) == 0) {
|
||||
fail_list();
|
||||
}
|
||||
} else {
|
||||
while (++last < need) {
|
||||
(*list)[last] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
load_list(const char *file, char ***list, int *rows)
|
||||
@ -68,8 +69,9 @@ load_list(const char *file, char ***list, int *rows)
|
||||
dlg_exiterr("Not a file: %s", file);
|
||||
|
||||
size = (size_t) sb.st_size;
|
||||
if ((blob = dlg_malloc(char, size + 1)) == 0)
|
||||
if ((blob = dlg_malloc(char, size + 1)) == 0) {
|
||||
fail_list();
|
||||
} else {
|
||||
blob[size] = '\0';
|
||||
|
||||
if ((fp = fopen(file, "r")) == 0)
|
||||
@ -108,6 +110,7 @@ load_list(const char *file, char ***list, int *rows)
|
||||
}
|
||||
free(blob);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
free_list(char ***list, int *rows)
|
||||
@ -344,6 +347,7 @@ dlg_editbox(const char *title,
|
||||
size_t max_len = (size_t) dlg_max_input(widest_line(*list));
|
||||
char *input, *buffer;
|
||||
bool show_all, show_one, was_mouse;
|
||||
bool first_trace = TRUE;
|
||||
WINDOW *dialog;
|
||||
WINDOW *editing;
|
||||
DIALOG_VARS save_vars;
|
||||
@ -364,8 +368,8 @@ dlg_editbox(const char *title,
|
||||
retry:
|
||||
#endif
|
||||
show_buttons = TRUE;
|
||||
state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
|
||||
key = fkey = 0;
|
||||
state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT;
|
||||
fkey = 0;
|
||||
|
||||
dlg_button_layout(buttons, &mincols);
|
||||
dlg_auto_size(title, "", &height, &width, 3 * LINES / 4, mincols);
|
||||
@ -381,11 +385,11 @@ dlg_editbox(const char *title,
|
||||
|
||||
dlg_mouse_setbase(x, y);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
|
||||
/* Draw the editing field in a box */
|
||||
box_y = MARGIN + 0;
|
||||
@ -398,7 +402,7 @@ dlg_editbox(const char *title,
|
||||
box_x,
|
||||
box_height,
|
||||
box_width,
|
||||
border_attr, dialog_attr);
|
||||
border_attr, border2_attr);
|
||||
dlg_mouse_mkbigregion(box_y + MARGIN,
|
||||
box_x + MARGIN,
|
||||
box_height - (2 * MARGIN),
|
||||
@ -409,7 +413,7 @@ dlg_editbox(const char *title,
|
||||
box_width - (2 * MARGIN),
|
||||
getbegy(dialog) + box_y + 1,
|
||||
getbegx(dialog) + box_x + 1);
|
||||
dlg_register_window(editing, "editbox", binding2);
|
||||
dlg_register_window(editing, "editbox2", binding2);
|
||||
|
||||
show_all = TRUE;
|
||||
show_one = FALSE;
|
||||
@ -444,7 +448,7 @@ dlg_editbox(const char *title,
|
||||
box_x + getmaxx(editing),
|
||||
box_y + 0,
|
||||
box_y + getmaxy(editing) + 1,
|
||||
dialog_attr,
|
||||
border2_attr,
|
||||
border_attr);
|
||||
wmove(editing, y, x);
|
||||
show_one = FALSE;
|
||||
@ -476,6 +480,11 @@ dlg_editbox(const char *title,
|
||||
}
|
||||
}
|
||||
|
||||
if (first_trace) {
|
||||
first_trace = FALSE;
|
||||
dlg_trace_win(dialog);
|
||||
}
|
||||
|
||||
key = dlg_mouse_wgetch((state == sTEXT) ? editing : dialog, &fkey);
|
||||
if (key == ERR) {
|
||||
result = DLG_EXIT_ERROR;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: formbox.c,v 1.73 2011/06/29 09:48:08 tom Exp $
|
||||
* $Id: formbox.c,v 1.81 2012/07/01 18:13:51 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* formbox.c -- implements the form (i.e, some pairs label/editbox)
|
||||
*
|
||||
* Copyright 2003-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2003-2011,2012 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
|
||||
@ -188,6 +188,34 @@ form_limit(DIALOG_FORMITEM item[])
|
||||
return limit;
|
||||
}
|
||||
|
||||
static int
|
||||
is_first_field(DIALOG_FORMITEM item[], int choice)
|
||||
{
|
||||
int count = 0;
|
||||
while (choice >= 0) {
|
||||
if (item[choice].text_flen > 0) {
|
||||
++count;
|
||||
}
|
||||
--choice;
|
||||
}
|
||||
|
||||
return (count == 1);
|
||||
}
|
||||
|
||||
static int
|
||||
is_last_field(DIALOG_FORMITEM item[], int choice, int item_no)
|
||||
{
|
||||
int count = 0;
|
||||
while (choice < item_no) {
|
||||
if (item[choice].text_flen > 0) {
|
||||
++count;
|
||||
}
|
||||
++choice;
|
||||
}
|
||||
|
||||
return (count == 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tab to the next field.
|
||||
*/
|
||||
@ -454,8 +482,9 @@ dlg_form(const char *title,
|
||||
|
||||
int form_width;
|
||||
int first = TRUE;
|
||||
int first_trace = TRUE;
|
||||
int chr_offset = 0;
|
||||
int state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
|
||||
int state = dialog_vars.default_button >=0 ? dlg_default_button() : sTEXT;
|
||||
int x, y, cur_x, cur_y, box_x, box_y;
|
||||
int code;
|
||||
int key = 0;
|
||||
@ -510,30 +539,31 @@ dlg_form(const char *title,
|
||||
|
||||
dialog = dlg_new_window(height, width, y, x);
|
||||
dlg_register_window(dialog, "formbox", binding);
|
||||
dlg_register_window(dialog, "formfield", binding2);
|
||||
dlg_register_buttons(dialog, "formbox", buttons);
|
||||
|
||||
dlg_mouse_setbase(x, y);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
|
||||
form_width = width - 6;
|
||||
getyx(dialog, cur_y, cur_x);
|
||||
(void) cur_x;
|
||||
box_y = cur_y + 1;
|
||||
box_x = (width - form_width) / 2 - 1;
|
||||
|
||||
/* create new window for the form */
|
||||
form = dlg_sub_window(dialog, form_height, form_width, y + box_y + 1,
|
||||
x + box_x + 1);
|
||||
dlg_register_window(form, "formfield", binding2);
|
||||
|
||||
/* draw a box around the form items */
|
||||
dlg_draw_box(dialog, box_y, box_x, form_height + 2, form_width + 2,
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
|
||||
/* register the new window, along with its borders */
|
||||
dlg_mouse_mkbigregion(getbegy(form) - getbegy(dialog),
|
||||
@ -564,7 +594,7 @@ dlg_form(const char *title,
|
||||
box_x + form_width,
|
||||
box_y,
|
||||
box_y + form_height + 1,
|
||||
menubox_attr,
|
||||
menubox_border2_attr,
|
||||
menubox_border_attr);
|
||||
scroll_changed = FALSE;
|
||||
}
|
||||
@ -579,6 +609,11 @@ dlg_form(const char *title,
|
||||
show_buttons = FALSE;
|
||||
}
|
||||
|
||||
if (first_trace) {
|
||||
first_trace = FALSE;
|
||||
dlg_trace_win(dialog);
|
||||
}
|
||||
|
||||
if (field_changed || state == sTEXT) {
|
||||
if (field_changed)
|
||||
chr_offset = 0;
|
||||
@ -594,7 +629,7 @@ dlg_form(const char *title,
|
||||
field_changed = FALSE;
|
||||
}
|
||||
|
||||
key = dlg_mouse_wgetch(dialog, &fkey);
|
||||
key = dlg_mouse_wgetch((state == sTEXT) ? form : dialog, &fkey);
|
||||
if (dlg_result_key(key, fkey, &result))
|
||||
break;
|
||||
|
||||
@ -653,6 +688,25 @@ dlg_form(const char *title,
|
||||
continue;
|
||||
}
|
||||
|
||||
case DLGK_FORM_PREV:
|
||||
if (state == sTEXT && !is_first_field(items, choice)) {
|
||||
do_tab = TRUE;
|
||||
move_by = -1;
|
||||
break;
|
||||
} else {
|
||||
int old_state = state;
|
||||
state = prev_valid_buttonindex(state, sTEXT, non_editable);
|
||||
show_buttons = TRUE;
|
||||
if (old_state >= 0 && state == sTEXT) {
|
||||
new_choice = item_no - 1;
|
||||
if (choice != new_choice) {
|
||||
print_item(form, items + choice, scrollamt, FALSE);
|
||||
choice = new_choice;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
case DLGK_FIELD_PREV:
|
||||
state = prev_valid_buttonindex(state, sTEXT, non_editable);
|
||||
show_buttons = TRUE;
|
||||
@ -679,6 +733,21 @@ dlg_form(const char *title,
|
||||
continue;
|
||||
}
|
||||
|
||||
case DLGK_FORM_NEXT:
|
||||
if (state == sTEXT && !is_last_field(items, choice, item_no)) {
|
||||
do_tab = TRUE;
|
||||
move_by = 1;
|
||||
break;
|
||||
} else {
|
||||
state = next_valid_buttonindex(state, sTEXT, non_editable);
|
||||
show_buttons = TRUE;
|
||||
if (state == sTEXT && choice) {
|
||||
print_item(form, items + choice, scrollamt, FALSE);
|
||||
choice = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
#ifdef KEY_RESIZE
|
||||
case KEY_RESIZE:
|
||||
/* reset data */
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: fselect.c,v 1.78 2011/06/29 09:48:21 tom Exp $
|
||||
* $Id: fselect.c,v 1.87 2012/07/01 18:14:09 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* fselect.c -- implements the file-selector box
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -230,11 +230,11 @@ display_list(LIST * list)
|
||||
break;
|
||||
(void) wmove(list->win, y, 0);
|
||||
if (n == list->choice)
|
||||
wattrset(list->win, item_selected_attr);
|
||||
(void) wattrset(list->win, item_selected_attr);
|
||||
(void) waddstr(list->win, list->data[n]);
|
||||
wattrset(list->win, item_attr);
|
||||
(void) wattrset(list->win, item_attr);
|
||||
}
|
||||
wattrset(list->win, item_attr);
|
||||
(void) wattrset(list->win, item_attr);
|
||||
|
||||
getparyx(list->win, y, x);
|
||||
|
||||
@ -249,7 +249,7 @@ display_list(LIST * list)
|
||||
x + getmaxx(list->win),
|
||||
top,
|
||||
bottom,
|
||||
menubox_attr,
|
||||
menubox_border2_attr,
|
||||
menubox_border_attr);
|
||||
|
||||
(void) wmove(list->win, list->choice - list->offset, 0);
|
||||
@ -270,18 +270,20 @@ fix_arrows(LIST * list)
|
||||
int x;
|
||||
int y;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
|
||||
if (list->win != 0) {
|
||||
getparyx(list->win, y, x);
|
||||
top = y - 1;
|
||||
right = getmaxx(list->win);
|
||||
bottom = y + getmaxy(list->win);
|
||||
|
||||
mouse_mkbutton(top, x, 6,
|
||||
mouse_mkbutton(top, x, right,
|
||||
((list->mousex == MOUSE_D)
|
||||
? KEY_PREVIOUS
|
||||
: KEY_PPAGE));
|
||||
mouse_mkbutton(bottom, x, 6,
|
||||
mouse_mkbutton(bottom, x, right,
|
||||
((list->mousex == MOUSE_D)
|
||||
? KEY_NEXT
|
||||
: KEY_NPAGE));
|
||||
@ -429,6 +431,8 @@ complete(char *name, LIST * d_list, LIST * f_list, char **buff_ptr)
|
||||
static bool
|
||||
fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
|
||||
{
|
||||
bool result = TRUE;
|
||||
bool rescan = FALSE;
|
||||
DIR *dp;
|
||||
DIRENT *de;
|
||||
struct stat sb;
|
||||
@ -441,13 +445,19 @@ fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
|
||||
if (current[n] != input[n])
|
||||
break;
|
||||
}
|
||||
if (current[n] == input[n])
|
||||
return FALSE;
|
||||
if (strchr(current + n, '/') == 0
|
||||
|
||||
if (current[n] == input[n]) {
|
||||
result = FALSE;
|
||||
rescan = (n == 0 && d_list->length == 0);
|
||||
} else if (strchr(current + n, '/') == 0
|
||||
&& strchr(input + n, '/') == 0) {
|
||||
return show_both_lists(input, d_list, f_list, keep);
|
||||
result = show_both_lists(input, d_list, f_list, keep);
|
||||
} else {
|
||||
rescan = TRUE;
|
||||
}
|
||||
|
||||
if (rescan) {
|
||||
|
||||
strcpy(current, input);
|
||||
|
||||
/* refill the lists */
|
||||
@ -460,6 +470,7 @@ fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
|
||||
strcpy(path, "./");
|
||||
leaf = path + strlen(path);
|
||||
}
|
||||
dlg_trace_msg("opendir '%s'\n", path);
|
||||
if ((dp = opendir(path)) != 0) {
|
||||
while ((de = readdir(dp)) != 0) {
|
||||
strncpy(leaf, de->d_name, NAMLEN(de))[NAMLEN(de)] = 0;
|
||||
@ -485,7 +496,9 @@ fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
|
||||
(void) show_both_lists(input, d_list, f_list, FALSE);
|
||||
d_list->offset = d_list->choice;
|
||||
f_list->offset = f_list->choice;
|
||||
return TRUE;
|
||||
result = TRUE;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -560,9 +573,10 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
|
||||
int fkey = FALSE;
|
||||
int code;
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
int state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
|
||||
int button = state;
|
||||
int state = dialog_vars.default_button >=0 ? dlg_default_button() : sTEXT;
|
||||
int button;
|
||||
int first = (state == sTEXT);
|
||||
int first_trace = TRUE;
|
||||
char *input;
|
||||
char *completed;
|
||||
char current[MAX_LEN + 1];
|
||||
@ -604,11 +618,11 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
|
||||
|
||||
dlg_mouse_setbase(0, 0);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
|
||||
/* Draw the input field box */
|
||||
tbox_height = 1;
|
||||
@ -623,14 +637,14 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
|
||||
(void) keypad(w_text, TRUE);
|
||||
dlg_draw_box(dialog, tbox_y - MARGIN, tbox_x - MARGIN,
|
||||
(2 * MARGIN + 1), tbox_width + (MARGIN + EXT_WIDE),
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
dlg_mouse_mkbigregion(getbegy(dialog) + tbox_y - MARGIN,
|
||||
getbegx(dialog) + tbox_x - MARGIN,
|
||||
1 + (2 * MARGIN),
|
||||
tbox_width + (MARGIN + EXT_WIDE),
|
||||
MOUSE_T, 1, 1, 3 /* doesn't matter */ );
|
||||
|
||||
dlg_register_window(w_text, "fselect", binding2);
|
||||
dlg_register_window(w_text, "fselect2", binding2);
|
||||
|
||||
/* Draw the directory listing box */
|
||||
if (dselect)
|
||||
@ -646,11 +660,11 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
|
||||
return DLG_EXIT_ERROR;
|
||||
|
||||
(void) keypad(w_work, TRUE);
|
||||
(void) mvwprintw(dialog, dbox_y - (MARGIN + 1), dbox_x - MARGIN, d_label);
|
||||
(void) mvwaddstr(dialog, dbox_y - (MARGIN + 1), dbox_x - MARGIN, d_label);
|
||||
dlg_draw_box(dialog,
|
||||
dbox_y - MARGIN, dbox_x - MARGIN,
|
||||
dbox_height + (MARGIN + 1), dbox_width + (MARGIN + 1),
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
init_list(&d_list, dialog, w_work, MOUSE_D);
|
||||
|
||||
if (!dselect) {
|
||||
@ -665,11 +679,11 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
|
||||
return DLG_EXIT_ERROR;
|
||||
|
||||
(void) keypad(w_work, TRUE);
|
||||
(void) mvwprintw(dialog, fbox_y - (MARGIN + 1), fbox_x - MARGIN, f_label);
|
||||
(void) mvwaddstr(dialog, fbox_y - (MARGIN + 1), fbox_x - MARGIN, f_label);
|
||||
dlg_draw_box(dialog,
|
||||
fbox_y - MARGIN, fbox_x - MARGIN,
|
||||
fbox_height + (MARGIN + 1), fbox_width + (MARGIN + 1),
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
init_list(&f_list, dialog, w_work, MOUSE_F);
|
||||
} else {
|
||||
memset(&f_list, 0, sizeof(f_list));
|
||||
@ -696,6 +710,12 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
|
||||
button = (state < 0) ? 0 : state;
|
||||
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
|
||||
}
|
||||
|
||||
if (first_trace) {
|
||||
first_trace = FALSE;
|
||||
dlg_trace_win(dialog);
|
||||
}
|
||||
|
||||
if (state < 0) {
|
||||
switch (state) {
|
||||
case sTEXT:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: guage.c,v 1.60 2011/06/27 00:52:28 tom Exp $
|
||||
* $Id: guage.c,v 1.64 2011/10/20 23:34:35 tom Exp $
|
||||
*
|
||||
* guage.c -- implements the gauge dialog
|
||||
*
|
||||
@ -122,27 +122,29 @@ repaint_text(MY_OBJ * obj)
|
||||
|
||||
if (dialog != 0 && obj->obj.input != 0) {
|
||||
(void) werase(dialog);
|
||||
dlg_draw_box(dialog, 0, 0, obj->height, obj->width, dialog_attr, border_attr);
|
||||
dlg_draw_box2(dialog, 0, 0, obj->height, obj->width, dialog_attr,
|
||||
border_attr, border2_attr);
|
||||
|
||||
dlg_draw_title(dialog, obj->title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
dlg_print_autowrap(dialog, obj->prompt, obj->height, obj->width);
|
||||
|
||||
dlg_draw_box(dialog,
|
||||
dlg_draw_box2(dialog,
|
||||
obj->height - 4, 2 + MARGIN,
|
||||
2 + MARGIN, obj->width - 2 * (2 + MARGIN),
|
||||
dialog_attr,
|
||||
border_attr);
|
||||
border_attr,
|
||||
border2_attr);
|
||||
|
||||
/*
|
||||
* Clear the area for the progress bar by filling it with spaces
|
||||
* in the title-attribute, and write the percentage with that
|
||||
* in the gauge-attribute, and write the percentage with that
|
||||
* attribute.
|
||||
*/
|
||||
(void) wmove(dialog, obj->height - 3, 4);
|
||||
wattrset(dialog, gauge_attr);
|
||||
(void) wattrset(dialog, gauge_attr);
|
||||
|
||||
for (i = 0; i < (obj->width - 2 * (3 + MARGIN)); i++)
|
||||
(void) waddch(dialog, ' ');
|
||||
@ -156,15 +158,15 @@ repaint_text(MY_OBJ * obj)
|
||||
* but requires some tweaks to reverse it.
|
||||
*/
|
||||
x = (obj->percent * (obj->width - 2 * (3 + MARGIN))) / 100;
|
||||
if ((title_attr & A_REVERSE) != 0) {
|
||||
if ((gauge_attr & A_REVERSE) != 0) {
|
||||
wattroff(dialog, A_REVERSE);
|
||||
} else {
|
||||
wattrset(dialog, A_REVERSE);
|
||||
(void) wattrset(dialog, A_REVERSE);
|
||||
}
|
||||
(void) wmove(dialog, obj->height - 3, 4);
|
||||
for (i = 0; i < x; i++) {
|
||||
chtype ch2 = winch(dialog);
|
||||
if (title_attr & A_REVERSE) {
|
||||
if (gauge_attr & A_REVERSE) {
|
||||
ch2 &= ~A_REVERSE;
|
||||
}
|
||||
(void) waddch(dialog, ch2);
|
||||
@ -335,7 +337,6 @@ dlg_free_gauge(void *objptr)
|
||||
delink(obj);
|
||||
obj->obj.keep_win = FALSE;
|
||||
dlg_remove_callback(&(obj->obj));
|
||||
free(obj);
|
||||
}
|
||||
}
|
||||
|
||||
@ -362,6 +363,7 @@ dialog_gauge(const char *title,
|
||||
dlg_add_callback_ref((DIALOG_CALLBACK **) & obj, my_cleanup);
|
||||
dlg_update_gauge(obj, percent);
|
||||
|
||||
dlg_trace_win(obj->obj.win);
|
||||
do {
|
||||
ch = dlg_getc(obj->obj.win, &fkey);
|
||||
#ifdef KEY_RESIZE
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Id: headers-sh.in,v 1.9 2011/01/06 09:38:25 tom Exp $
|
||||
# $Id: headers-sh.in,v 1.11 2011/10/18 23:49:13 tom Exp $
|
||||
##############################################################################
|
||||
# Copyright (c) 2004-2007,2011 Thomas E. Dickey #
|
||||
# #
|
||||
@ -45,6 +45,8 @@ PKGNAME=@PACKAGE_PREFIX@
|
||||
CONFIGH=@PACKAGE_CONFIG@
|
||||
SUB_INC=@SUB_INC@
|
||||
|
||||
: ${TMPDIR:=/tmp}
|
||||
|
||||
TMPSED=headers.sed
|
||||
|
||||
DIGIT=0123456789
|
||||
@ -98,9 +100,9 @@ s/ $//
|
||||
:done
|
||||
EOF
|
||||
# pick up autoconf-style symbols used in the application's headers
|
||||
for i in $REF/*.h
|
||||
for name in $REF/*.h
|
||||
do
|
||||
sed -e 's/^[ ][ ]*#[ ][ ]*/#/' $i \
|
||||
sed -e 's/^[ ][ ]*#[ ][ ]*/#/' $name \
|
||||
| egrep '^#(if|ifdef|ifndef|elif)' \
|
||||
| sed -f headers.tmp \
|
||||
| sort -u \
|
||||
@ -116,8 +118,7 @@ EOF
|
||||
-e 's/^#define[ ][ ]*//' \
|
||||
-e 's/[ ].*//' \
|
||||
| egrep -v "^${PACKAGE}_" \
|
||||
| sort -u \
|
||||
| egrep -v "^${PKGNAME}_"`
|
||||
| sort -u`
|
||||
do
|
||||
echo "s/\\<$name\\>/${PKGNAME}_$name/g" >>$TMPSED
|
||||
done
|
||||
@ -127,6 +128,8 @@ EOF
|
||||
echo "s,#include <${pkgname}_,#include <${PACKAGE}/${pkgname}_," >>$TMPSED
|
||||
fi
|
||||
|
||||
echo '/_FILE_OFFSET_BITS/d' >>$TMPSED
|
||||
|
||||
# reduce the count if possible, since some old sed's limit is 100 lines
|
||||
sort -u $TMPSED >headers.tmp
|
||||
mv headers.tmp $TMPSED
|
||||
@ -142,13 +145,32 @@ else
|
||||
SRC=$3
|
||||
|
||||
SHOW=`basename $SRC`
|
||||
TMPSRC=${TMPDIR-/tmp}/${SHOW}$$
|
||||
TMPSRC=$TMPDIR/${SHOW}-text$$
|
||||
TMPEDT=$TMPDIR/${SHOW}-edit$$
|
||||
TMPTMP=$TMPDIR/${SHOW}-temp$$
|
||||
|
||||
echo " ... $SHOW"
|
||||
test -f $REF/$SRC && SRC="$REF/$SRC"
|
||||
|
||||
rm -f $TMPSRC
|
||||
sed -f $TMPSED $SRC > $TMPSRC
|
||||
cat $SRC >$TMPSRC
|
||||
|
||||
tmp1=1
|
||||
while true
|
||||
do
|
||||
tmp2=`expr $tmp1 + 49`
|
||||
if test $tmp1 = 1
|
||||
then
|
||||
sed "${tmp2}q" $TMPSED >$TMPEDT
|
||||
else
|
||||
sed "1,${tmp1}d; ${tmp2}q" $TMPSED >$TMPEDT
|
||||
fi
|
||||
test -s $TMPEDT || break
|
||||
sed -f $TMPEDT $TMPSRC > $TMPTMP
|
||||
mv $TMPTMP $TMPSRC
|
||||
tmp1=$tmp2
|
||||
done
|
||||
|
||||
NAME=`basename $SRC`
|
||||
|
||||
# Just in case someone gzip'd manpages, remove the conflicting copy.
|
||||
@ -172,6 +194,6 @@ else
|
||||
fi
|
||||
|
||||
eval $PRG $TMPSRC $DST/$NAME
|
||||
rm -f $TMPSRC
|
||||
rm -f $TMPEDT $TMPTMP $TMPSRC
|
||||
fi
|
||||
# vile:ts=4 sw=4
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: inputbox.c,v 1.67 2011/06/29 09:48:34 tom Exp $
|
||||
* $Id: inputbox.c,v 1.74 2012/07/01 18:13:40 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* inputbox.c -- implements the input box
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -90,7 +90,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
|
||||
retry:
|
||||
#endif
|
||||
show_buttons = TRUE;
|
||||
state = dialog_vars.defaultno ? dlg_defaultno_button() : sTEXT;
|
||||
state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT;
|
||||
first = (state == sTEXT);
|
||||
key = fkey = 0;
|
||||
|
||||
@ -116,27 +116,29 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
|
||||
|
||||
dlg_mouse_setbase(xorg, yorg);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
|
||||
/* Draw the input field box */
|
||||
box_width = width - 6;
|
||||
getyx(dialog, y, x);
|
||||
(void) x;
|
||||
box_y = y + 2;
|
||||
box_x = (width - box_width) / 2;
|
||||
dlg_mouse_mkregion(y + 1, box_x - 1, 3, box_width + 2, 'i');
|
||||
dlg_draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2,
|
||||
border_attr, dialog_attr);
|
||||
border_attr, border2_attr);
|
||||
|
||||
/* Make a window for the input-field, to associate bindings */
|
||||
editor = dlg_sub_window(dialog, 1, box_width, yorg + box_y, xorg + box_x);
|
||||
dlg_register_window(editor, "inputbox", binding2);
|
||||
dlg_register_window(editor, "inputbox2", binding2);
|
||||
|
||||
dlg_trace_win(dialog);
|
||||
while (result == DLG_EXIT_UNKNOWN) {
|
||||
int edit = 0;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: inputstr.c,v 1.69 2011/01/16 21:52:35 tom Exp $
|
||||
* $Id: inputstr.c,v 1.70 2011/10/20 23:42:49 tom Exp $
|
||||
*
|
||||
* inputstr.c -- functions for input/display of a string
|
||||
*
|
||||
@ -261,7 +261,6 @@ dlg_count_wcbytes(const char *string, size_t len)
|
||||
load_cache(&cache, string);
|
||||
if (!same_cache1(&cache, string, len)) {
|
||||
while (len != 0) {
|
||||
int part = 0;
|
||||
size_t code = 0;
|
||||
const char *src = cache.string;
|
||||
mbstate_t state;
|
||||
@ -274,7 +273,6 @@ dlg_count_wcbytes(const char *string, size_t len)
|
||||
if ((int) code >= 0) {
|
||||
break;
|
||||
}
|
||||
++part;
|
||||
--len;
|
||||
}
|
||||
cache.i_len = len;
|
||||
@ -700,7 +698,7 @@ dlg_show_string(WINDOW *win,
|
||||
|
||||
compute_edit_offset(string, chr_offset, x_last, &input_x, &scrollamt);
|
||||
|
||||
wattrset(win, attr);
|
||||
(void) wattrset(win, attr);
|
||||
(void) wmove(win, y_base, x_base);
|
||||
for (i = scrollamt, k = 0; i < limit && k < x_last; ++i) {
|
||||
int check = cols[i + 1] - cols[scrollamt];
|
||||
|
@ -1,7 +1,7 @@
|
||||
# $Id: makefile.in,v 1.79 2011/06/25 00:27:56 tom Exp $
|
||||
# $Id: makefile.in,v 1.82 2012/02/16 00:35:37 Li-Wen.Hsu Exp $
|
||||
# template makefile for DIALOG
|
||||
##############################################################################
|
||||
# Copyright (c) 1999-2010,2011 Thomas E. Dickey #
|
||||
# Copyright (c) 1999-2011,2012 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"), #
|
||||
@ -71,7 +71,8 @@ LIBS = @LIBS@ @INTLLIBS@
|
||||
RANLIB = @LIB_PREP@
|
||||
|
||||
RM = rm -f
|
||||
LINT = lint
|
||||
LINT = @LINT@
|
||||
LINT_OPTS = @LINT_OPTS@
|
||||
|
||||
CTAGS = @CTAGS@
|
||||
ETAGS = @ETAGS@
|
||||
@ -84,6 +85,7 @@ LIBTOOL_CREATE = @LIB_CREATE@
|
||||
LIBTOOL_LINK = @LIB_LINK@
|
||||
LIBTOOL_INSTALL = @LIB_INSTALL@
|
||||
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
|
||||
LIBTOOL_VERSION = @LIBTOOL_VERSION@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = $(LIBTOOL_INSTALL) @INSTALL_PROGRAM@
|
||||
@ -101,7 +103,7 @@ LIB_CONFIG = @PACKAGE@-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
|
||||
PROG = dialog$x
|
||||
PROG = @PACKAGE@$x
|
||||
#
|
||||
# Standard .c to .o compile line.
|
||||
#
|
||||
@ -179,7 +181,7 @@ $(LIB) : $(LIB_OBJECT)
|
||||
$(LIBTOOL_CREATE) $(LIB) $(LIB_OBJECT)
|
||||
$(RANLIB) $@
|
||||
|
||||
dialog$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
|
||||
$(PROG)$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
|
||||
$(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS) $(LIBS)
|
||||
|
||||
clean \
|
||||
@ -249,20 +251,20 @@ install-lib :: $(LIB_DIRS) $(LIB) headers.sed
|
||||
@ echo "** installing library in $(LIBDIR)"
|
||||
@ $(LIBTOOL_INSTALL) $(INSTALL_DATA) $(LIB) $(LIBDIR)
|
||||
@ echo "** installing headers in $(INCLUDEDIR)"
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dialog.h
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_colors.h
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_keys.h
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(INSTALL_DATA) $(INCLUDEDIR) . dlg_config.h
|
||||
@ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dialog.h
|
||||
@ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_colors.h
|
||||
@ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) $(srcdir) dlg_keys.h
|
||||
@ $(SHELL) headers-sh $(INSTALL_DATA) $(INCLUDEDIR) . dlg_config.h
|
||||
|
||||
uninstall-lib :: $(BINDIR)
|
||||
$(RM) $(BINDIR)/$(LIB_CONFIG)
|
||||
|
||||
uninstall-lib :: $(LIB_DIRS)
|
||||
- $(LIBTOOL_UNINSTALL) $(RM) $(LIBDIR)/$(LIB)
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dialog.h
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_colors.h
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_keys.h
|
||||
@ $(SHELL) $(srcdir)/headers-sh $(RM) $(INCLUDEDIR) . dlg_config.h
|
||||
@ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dialog.h
|
||||
@ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_colors.h
|
||||
@ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) $(srcdir) dlg_keys.h
|
||||
@ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) . dlg_config.h
|
||||
|
||||
install-lib :: $(MAN3DIR)
|
||||
@ echo "** installing @PACKAGE@.3"
|
||||
@ -276,8 +278,8 @@ install-lib :: $(MAN3DIR)
|
||||
uninstall-lib ::
|
||||
$(RM) $(MAN3DIR)/@PACKAGE@.3
|
||||
|
||||
headers.sed : $(srcdir)/headers-sh
|
||||
$(SHELL) $(srcdir)/headers-sh $(INCLUDEDIR) $(srcdir)
|
||||
headers.sed : headers-sh
|
||||
$(SHELL) headers-sh $(INCLUDEDIR) $(srcdir)
|
||||
|
||||
################################################################################
|
||||
TOP_DOCS = \
|
||||
@ -328,4 +330,4 @@ update-po:
|
||||
test -f $(PO_DIR)/makefile && cd $(PO_DIR) && $(MAKE) $@
|
||||
|
||||
lint:
|
||||
$(LINT) $(CPPFLAGS) *.c
|
||||
$(LINT) $(LINT_OPTS) $(CPPFLAGS) *.c
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: menubox.c,v 1.122 2011/06/29 09:48:46 tom Exp $
|
||||
* $Id: menubox.c,v 1.132 2012/07/01 16:30:04 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* menubox.c -- implements the menu box
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -66,7 +66,7 @@ print_arrows(WINDOW *win,
|
||||
box_x + menu_width,
|
||||
box_y,
|
||||
box_y + menu_height + 1,
|
||||
menubox_attr,
|
||||
menubox_border2_attr,
|
||||
menubox_border_attr);
|
||||
}
|
||||
|
||||
@ -83,14 +83,11 @@ print_tag(WINDOW *win,
|
||||
int my_x = item_x;
|
||||
int my_y = ItemToRow(choice);
|
||||
int tag_width = (my_x - tag_x - GUTTER);
|
||||
const int *cols;
|
||||
const int *indx;
|
||||
int limit;
|
||||
int prefix;
|
||||
|
||||
cols = dlg_index_columns(item->name);
|
||||
indx = dlg_index_wchars(item->name);
|
||||
limit = dlg_count_wchars(item->name);
|
||||
prefix = (indx[1] - indx[0]);
|
||||
|
||||
/* highlight first char of the tag to be special */
|
||||
@ -252,7 +249,7 @@ handle_button(int code, DIALOG_LISTITEM * items, int choice)
|
||||
return code;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
dlg_renamed_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
|
||||
{
|
||||
if (dialog_vars.input_result)
|
||||
@ -264,7 +261,7 @@ dlg_renamed_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
|
||||
return DLG_EXIT_EXTRA;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
dlg_dummy_menutext(DIALOG_LISTITEM * items, int current, char *newtext)
|
||||
{
|
||||
(void) items;
|
||||
@ -325,17 +322,18 @@ dlg_menu(const char *title,
|
||||
#endif
|
||||
int i, j, x, y, cur_x, cur_y, box_x, box_y;
|
||||
int key = 0, fkey;
|
||||
int button = dialog_state.visit_items ? -1 : dlg_defaultno_button();
|
||||
int button = dialog_state.visit_items ? -1 : dlg_default_button();
|
||||
int choice = dlg_default_listitem(items);
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
int scrollamt = 0;
|
||||
int max_choice, min_width;
|
||||
int max_choice;
|
||||
int found;
|
||||
int use_height, use_width, name_width, text_width;
|
||||
WINDOW *dialog, *menu;
|
||||
char *prompt = dlg_strclone(cprompt);
|
||||
const char **buttons = dlg_ok_labels();
|
||||
bool is_inputmenu = (rename_menutext == dlg_renamed_menutext);
|
||||
bool is_inputmenu = ((rename_menutext != 0)
|
||||
&& (rename_menutext != dlg_dummy_menutext));
|
||||
|
||||
dlg_does_output();
|
||||
dlg_tab_correct_str(prompt);
|
||||
@ -345,13 +343,14 @@ dlg_menu(const char *title,
|
||||
#endif
|
||||
|
||||
use_height = menu_height;
|
||||
use_width = dlg_calc_list_width(item_no, items) + 10;
|
||||
use_width = MAX(26, use_width);
|
||||
if (use_height == 0) {
|
||||
min_width = dlg_calc_list_width(item_no, items) + 10;
|
||||
/* calculate height without items (4) */
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MAX(26, min_width));
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, use_width);
|
||||
dlg_calc_listh(&height, &use_height, item_no);
|
||||
} else {
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, 26);
|
||||
dlg_auto_size(title, prompt, &height, &width, MIN_HIGH + use_height, use_width);
|
||||
}
|
||||
dlg_button_layout(buttons, &width);
|
||||
dlg_print_size(height, width);
|
||||
@ -366,8 +365,8 @@ dlg_menu(const char *title,
|
||||
|
||||
dlg_mouse_setbase(x, y);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
@ -402,7 +401,7 @@ dlg_menu(const char *title,
|
||||
|
||||
/* draw a box around the menu items */
|
||||
dlg_draw_box(dialog, box_y, box_x, use_height + 2, menu_width + 2,
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
|
||||
name_width = 0;
|
||||
text_width = 0;
|
||||
@ -461,6 +460,7 @@ dlg_menu(const char *title,
|
||||
|
||||
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
|
||||
|
||||
dlg_trace_win(dialog);
|
||||
while (result == DLG_EXIT_UNKNOWN) {
|
||||
if (button < 0) /* --visit-items */
|
||||
wmove(dialog, box_y + ItemToRow(choice) + 1, box_x + tag_x + 1);
|
||||
@ -687,17 +687,14 @@ dlg_menu(const char *title,
|
||||
FALSE, width);
|
||||
break;
|
||||
case DLGK_ENTER:
|
||||
if (is_inputmenu)
|
||||
result = dlg_ok_buttoncode(button);
|
||||
else
|
||||
result = dlg_enter_buttoncode(button);
|
||||
|
||||
/*
|
||||
* If dlg_menu() is called from dialog_menu(), we want to
|
||||
* capture the results into dialog_vars.input_result, but not
|
||||
* if dlg_menu() is called directly from an application. We
|
||||
* can check this by testing if rename_menutext is the function
|
||||
* pointer owned by dialog_menu(). It would be nicer to have
|
||||
* this logic inside dialog_menu(), but that cannot be done
|
||||
* since we would lose compatibility for the results reported
|
||||
* after input_menu_edit().
|
||||
* capture the results into dialog_vars.input_result.
|
||||
*/
|
||||
if (result == DLG_EXIT_ERROR) {
|
||||
result = DLG_EXIT_UNKNOWN;
|
||||
@ -812,7 +809,9 @@ dialog_menu(const char *title,
|
||||
item_no,
|
||||
listitems,
|
||||
&choice,
|
||||
dialog_vars.input_menu ? dlg_renamed_menutext : dlg_dummy_menutext);
|
||||
(dialog_vars.input_menu
|
||||
? dlg_renamed_menutext
|
||||
: dlg_dummy_menutext));
|
||||
|
||||
dlg_free_columns(&listitems[0].text, sizeof(DIALOG_LISTITEM), item_no);
|
||||
free(listitems);
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: mixedform.c,v 1.8 2010/04/28 20:54:11 tom Exp $
|
||||
* $Id: mixedform.c,v 1.9 2011/10/10 00:49:43 tom Exp $
|
||||
*
|
||||
* formbox.c -- implements the form (i.e, some pairs label/editbox)
|
||||
* mixedform.c -- implements the mixed form (i.e, typed pairs label/editbox)
|
||||
*
|
||||
* Copyright 2007-2008,2010 Thomas E. Dickey
|
||||
* Copyright 2007-2010,2011 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: mixedgauge.c,v 1.24 2011/06/27 08:16:38 tom Exp $
|
||||
* $Id: mixedgauge.c,v 1.29 2011/10/20 23:35:31 tom Exp $
|
||||
*
|
||||
* mixedgauge.c -- implements the mixedgauge dialog
|
||||
*
|
||||
@ -113,7 +113,6 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
|
||||
int y = MARGIN;
|
||||
int item;
|
||||
int cells = dlg->len_text - 2;
|
||||
int rm = limit_x; /* right margin */
|
||||
int lm = limit_x - dlg->len_text - 1;
|
||||
int bm = limit_y; /* bottom margin */
|
||||
int last_y = 0, last_x = 0;
|
||||
@ -123,7 +122,6 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
|
||||
char *freeMe = 0;
|
||||
|
||||
if (win) {
|
||||
rm -= (2 * MARGIN);
|
||||
bm -= (2 * MARGIN);
|
||||
}
|
||||
if (win != 0)
|
||||
@ -147,7 +145,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
|
||||
(void) wmove(win, y, lm + (cells - (int) strlen(status)) / 2);
|
||||
if (freeMe) {
|
||||
(void) wmove(win, y, lm + 1);
|
||||
wattrset(win, title_attr);
|
||||
(void) wattrset(win, title_attr);
|
||||
for (j = 0; j < cells; j++)
|
||||
(void) waddch(win, ' ');
|
||||
|
||||
@ -157,7 +155,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
|
||||
if ((title_attr & A_REVERSE) != 0) {
|
||||
wattroff(win, A_REVERSE);
|
||||
} else {
|
||||
wattrset(win, A_REVERSE);
|
||||
(void) wattrset(win, A_REVERSE);
|
||||
}
|
||||
(void) wmove(win, y, lm + 1);
|
||||
|
||||
@ -181,6 +179,8 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
|
||||
(void) waddch(win, ']');
|
||||
(void) wnoutrefresh(win);
|
||||
}
|
||||
if (win != 0)
|
||||
wmove(win, last_y, last_x);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -192,10 +192,10 @@ mydraw_mixed_box(WINDOW *win, int y, int x, int height, int width,
|
||||
chtype attr = A_NORMAL;
|
||||
const char *message = _("Overall Progress");
|
||||
chtype save2 = dlg_get_attrs(win);
|
||||
wattrset(win, title_attr);
|
||||
(void) wattrset(win, title_attr);
|
||||
(void) wmove(win, y, x + 2);
|
||||
dlg_print_text(win, message, width, &attr);
|
||||
wattrset(win, save2);
|
||||
(void) wattrset(win, save2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
|
||||
* attribute.
|
||||
*/
|
||||
(void) wmove(dlg->dialog, dlg->height - 3, 4);
|
||||
wattrset(dlg->dialog, gauge_attr);
|
||||
(void) wattrset(dlg->dialog, gauge_attr);
|
||||
|
||||
for (i = 0; i < (dlg->width - 2 * (3 + MARGIN)); i++)
|
||||
(void) waddch(dlg->dialog, ' ');
|
||||
@ -240,7 +240,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
|
||||
if ((title_attr & A_REVERSE) != 0) {
|
||||
wattroff(dlg->dialog, A_REVERSE);
|
||||
} else {
|
||||
wattrset(dlg->dialog, A_REVERSE);
|
||||
(void) wattrset(dlg->dialog, A_REVERSE);
|
||||
}
|
||||
(void) wmove(dlg->dialog, dlg->height - 3, 4);
|
||||
for (i = 0; i < x; i++) {
|
||||
@ -251,6 +251,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
|
||||
(void) waddch(dlg->dialog, ch);
|
||||
}
|
||||
myprint_status(dlg);
|
||||
dlg_trace_win(dlg->dialog);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -324,11 +325,11 @@ dlg_begin_mixedgauge(DIALOG_MIXEDGAUGE * dlg,
|
||||
dlg->dialog = dlg_new_window(dlg->height, dlg->width, y, x);
|
||||
|
||||
(void) werase(dlg->dialog);
|
||||
dlg_draw_box(dlg->dialog,
|
||||
dlg_draw_box2(dlg->dialog,
|
||||
0, 0,
|
||||
dlg->height,
|
||||
dlg->width,
|
||||
dialog_attr, border_attr);
|
||||
dialog_attr, border_attr, border2_attr);
|
||||
|
||||
dlg_draw_title(dlg->dialog, dlg->title);
|
||||
dlg_draw_helpline(dlg->dialog, FALSE);
|
||||
@ -340,7 +341,7 @@ dlg_begin_mixedgauge(DIALOG_MIXEDGAUGE * dlg,
|
||||
dlg->width,
|
||||
y + dlg->item_no + (2 * MARGIN),
|
||||
x);
|
||||
wattrset(dlg->caption, dialog_attr);
|
||||
(void) wattrset(dlg->caption, dialog_attr);
|
||||
dlg_print_autowrap(dlg->caption, dlg->prompt, dlg->height, dlg->width);
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: msgbox.c,v 1.66 2011/06/27 08:36:28 tom Exp $
|
||||
* $Id: msgbox.c,v 1.74 2012/07/06 16:53:53 tom Exp $
|
||||
*
|
||||
* msgbox.c -- implements the message box and info box
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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,20 +39,14 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
static DLG_KEYS_BINDING binding[] = {
|
||||
HELPKEY_BINDINGS,
|
||||
ENTERKEY_BINDINGS,
|
||||
DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
|
||||
TRAVERSE_BINDINGS,
|
||||
SCROLLKEY_BINDINGS,
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
|
||||
END_KEYS_BINDING
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
int x, y, last = 0, page;
|
||||
int button = 0;
|
||||
int button;
|
||||
int key = 0, fkey;
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
WINDOW *dialog = 0;
|
||||
@ -62,10 +56,18 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
int check;
|
||||
bool show = TRUE;
|
||||
int min_width = (pauseopt == 1 ? 12 : 0);
|
||||
int save_nocancel = dialog_vars.nocancel;
|
||||
#ifdef KEY_RESIZE
|
||||
int req_high;
|
||||
int req_wide;
|
||||
#endif
|
||||
|
||||
dialog_vars.nocancel = TRUE;
|
||||
button = dlg_default_button();
|
||||
|
||||
#ifdef KEY_RESIZE
|
||||
int req_high = height;
|
||||
int req_wide = width;
|
||||
req_high = height;
|
||||
req_wide = width;
|
||||
restart:
|
||||
#endif
|
||||
|
||||
@ -95,13 +97,13 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
|
||||
dlg_mouse_setbase(x, y);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
|
||||
if (pauseopt) {
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
|
||||
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
@ -110,6 +112,7 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
if (show) {
|
||||
last = dlg_print_scrolled(dialog, prompt, offset,
|
||||
page, width, pauseopt);
|
||||
dlg_trace_win(dialog);
|
||||
show = FALSE;
|
||||
}
|
||||
key = dlg_mouse_wgetch(dialog, &fkey);
|
||||
@ -117,7 +120,7 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
break;
|
||||
|
||||
if (!fkey && (check = dlg_char_to_button(key, buttons)) >= 0) {
|
||||
result = check ? DLG_EXIT_HELP : DLG_EXIT_OK;
|
||||
result = dlg_ok_buttoncode(check);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -150,22 +153,21 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
FALSE, width);
|
||||
break;
|
||||
case DLGK_ENTER:
|
||||
result = button ? DLG_EXIT_HELP : DLG_EXIT_OK;
|
||||
break;
|
||||
case DLGK_MOUSE(0):
|
||||
result = DLG_EXIT_OK;
|
||||
break;
|
||||
case DLGK_MOUSE(1):
|
||||
result = DLG_EXIT_HELP;
|
||||
result = dlg_ok_buttoncode(button);
|
||||
break;
|
||||
default:
|
||||
if (dlg_check_scrolled(key,
|
||||
if (is_DLGK_MOUSE(key)) {
|
||||
result = dlg_ok_buttoncode(key - M_EVENT);
|
||||
if (result < 0)
|
||||
result = DLG_EXIT_OK;
|
||||
} else if (dlg_check_scrolled(key,
|
||||
last,
|
||||
page,
|
||||
&show,
|
||||
&offset) == 0)
|
||||
break;
|
||||
&offset) == 0) {
|
||||
} else {
|
||||
beep();
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@ -176,11 +178,15 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
|
||||
dlg_print_scrolled(dialog, prompt, offset, page, width, pauseopt);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
wrefresh(dialog);
|
||||
dlg_trace_win(dialog);
|
||||
result = DLG_EXIT_OK;
|
||||
}
|
||||
|
||||
dlg_del_window(dialog);
|
||||
dlg_mouse_free_regions();
|
||||
free(prompt);
|
||||
|
||||
dialog_vars.nocancel = save_nocancel;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -1,3 +1,38 @@
|
||||
cdialog (20120706) unstable; urgency=high
|
||||
|
||||
* fix regression in msgbox (ArchLinux #30574)
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 06 Jul 2012 12:52:46 -0400
|
||||
|
||||
cdialog (20120703) unstable; urgency=low
|
||||
|
||||
* minor fixes
|
||||
* add --default-button
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Sat, 30 Jun 2012 10:41:05 -0400
|
||||
|
||||
cdialog (20120215) unstable; urgency=low
|
||||
|
||||
* minor fixes
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 15 Feb 2012 19:40:32 -0500
|
||||
|
||||
cdialog (20111020) unstable; urgency=high
|
||||
|
||||
* fix regression in menubox.c logic for inputmenu vs menu.
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 19 Oct 2011 19:17:40 -0400
|
||||
|
||||
cdialog (20111018) unstable; urgency=high
|
||||
|
||||
* improve color configurability
|
||||
* misc bug-fixes.
|
||||
* various improvements to tracing.
|
||||
* remove an incorrect free() call in dlg_free_gauge()
|
||||
* fix missing trailing null from dlg_align_columns
|
||||
|
||||
-- Thomas E. Dickey <dickey@invisible-island.net> Wed, 07 Sep 2011 20:04:04 -0400
|
||||
|
||||
cdialog (20110707) unstable; urgency=high
|
||||
|
||||
* fix a regression in dlg_getc() from 20110630 changes.
|
||||
|
@ -1,9 +1,9 @@
|
||||
Summary: dialog - display dialog boxes from shell scripts
|
||||
%define AppProgram dialog
|
||||
%define AppVersion 1.1
|
||||
%define AppRelease 20110707
|
||||
%define AppRelease 20120706
|
||||
%define ActualProg c%{AppProgram}
|
||||
# $XTermId: dialog.spec,v 1.24 2011/07/07 22:10:02 tom Exp $
|
||||
# $XTermId: dialog.spec,v 1.38 2012/07/06 16:51:44 tom Exp $
|
||||
Name: %{ActualProg}
|
||||
Version: %{AppVersion}
|
||||
Release: %{AppRelease}
|
||||
@ -53,8 +53,11 @@ make
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make install-full DESTDIR=$RPM_BUILD_ROOT
|
||||
libtool --finish %{_libdir}
|
||||
|
||||
strip $RPM_BUILD_ROOT%{_bindir}/%{ActualProg}
|
||||
chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.so.*.*.*
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.la
|
||||
|
||||
%clean
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||
@ -75,5 +78,8 @@ strip $RPM_BUILD_ROOT%{_bindir}/%{ActualProg}
|
||||
%changelog
|
||||
# each patch should add its ChangeLog entries here
|
||||
|
||||
* Tue Oct 18 2011 Thomas Dickey
|
||||
- add executable permissions for shared libraries, discard ".la" file.
|
||||
|
||||
* Thu Dec 30 2010 Thomas Dickey
|
||||
- initial version
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: pause.c,v 1.29 2011/06/29 09:48:53 tom Exp $
|
||||
* $Id: pause.c,v 1.36 2012/07/03 00:01:59 tom Exp $
|
||||
*
|
||||
* pause.c -- implements the pause dialog
|
||||
*
|
||||
* Copyright 2004-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2004-2011,2012 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
|
||||
@ -55,13 +55,7 @@ dialog_pause(const char *title,
|
||||
static DLG_KEYS_BINDING binding[] = {
|
||||
HELPKEY_BINDINGS,
|
||||
ENTERKEY_BINDINGS,
|
||||
DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
|
||||
TRAVERSE_BINDINGS,
|
||||
END_KEYS_BINDING
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
@ -72,21 +66,24 @@ dialog_pause(const char *title,
|
||||
#endif
|
||||
|
||||
int i, x, y, step;
|
||||
int button = 0;
|
||||
int button = dlg_default_button();
|
||||
int seconds_orig;
|
||||
WINDOW *dialog;
|
||||
const char **buttons = dlg_ok_labels();
|
||||
bool have_buttons = (dlg_button_count(buttons) != 0);
|
||||
bool first;
|
||||
int key = 0, fkey;
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
int button_high = (have_buttons ? BTN_HIGH : MARGIN);
|
||||
int gauge_y;
|
||||
char *prompt = dlg_strclone(cprompt);
|
||||
int save_timeout = dialog_vars.timeout_secs;
|
||||
|
||||
curs_set(0);
|
||||
|
||||
dlg_tab_correct_str(prompt);
|
||||
|
||||
dialog_vars.timeout_secs = 0;
|
||||
seconds_orig = (seconds > 0) ? seconds : 1;
|
||||
|
||||
#ifdef KEY_RESIZE
|
||||
@ -120,21 +117,23 @@ dialog_pause(const char *title,
|
||||
dlg_mouse_setbase(x, y);
|
||||
nodelay(dialog, TRUE);
|
||||
|
||||
first = TRUE;
|
||||
do {
|
||||
(void) werase(dialog);
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
|
||||
dlg_draw_title(dialog, title);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
|
||||
dlg_draw_box(dialog,
|
||||
dlg_draw_box2(dialog,
|
||||
gauge_y, 2 + MARGIN,
|
||||
2 + MARGIN, width - 2 * (2 + MARGIN),
|
||||
dialog_attr,
|
||||
border_attr);
|
||||
border_attr,
|
||||
border2_attr);
|
||||
|
||||
/*
|
||||
* Clear the area for the progress bar by filling it with spaces
|
||||
@ -142,7 +141,7 @@ dialog_pause(const char *title,
|
||||
* attribute.
|
||||
*/
|
||||
(void) wmove(dialog, gauge_y + MARGIN, 4);
|
||||
wattrset(dialog, title_attr);
|
||||
(void) wattrset(dialog, title_attr);
|
||||
|
||||
for (i = 0; i < (width - 2 * (3 + MARGIN)); i++)
|
||||
(void) waddch(dialog, ' ');
|
||||
@ -159,7 +158,7 @@ dialog_pause(const char *title,
|
||||
if ((title_attr & A_REVERSE) != 0) {
|
||||
wattroff(dialog, A_REVERSE);
|
||||
} else {
|
||||
wattrset(dialog, A_REVERSE);
|
||||
(void) wattrset(dialog, A_REVERSE);
|
||||
}
|
||||
(void) wmove(dialog, gauge_y + MARGIN, 4);
|
||||
for (i = 0; i < x; i++) {
|
||||
@ -172,10 +171,14 @@ dialog_pause(const char *title,
|
||||
|
||||
mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
|
||||
if (have_buttons) {
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
|
||||
}
|
||||
if (first) {
|
||||
(void) wrefresh(dialog);
|
||||
dlg_trace_win(dialog);
|
||||
first = FALSE;
|
||||
}
|
||||
|
||||
for (step = 0;
|
||||
(result == DLG_EXIT_UNKNOWN) && (step < 1000);
|
||||
@ -219,24 +222,25 @@ dialog_pause(const char *title,
|
||||
case DLGK_ENTER:
|
||||
result = dlg_enter_buttoncode(button);
|
||||
break;
|
||||
case DLGK_MOUSE(0):
|
||||
result = DLG_EXIT_OK;
|
||||
break;
|
||||
case DLGK_MOUSE(1):
|
||||
result = DLG_EXIT_CANCEL;
|
||||
break;
|
||||
case ERR:
|
||||
break;
|
||||
default:
|
||||
if (is_DLGK_MOUSE(key)) {
|
||||
result = dlg_ok_buttoncode(key - M_EVENT);
|
||||
if (result < 0)
|
||||
result = DLG_EXIT_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while ((result == DLG_EXIT_UNKNOWN) && (seconds-- > 0));
|
||||
|
||||
nodelay(dialog, FALSE);
|
||||
curs_set(1);
|
||||
dlg_mouse_free_regions();
|
||||
dlg_del_window(dialog);
|
||||
free(prompt);
|
||||
|
||||
dialog_vars.timeout_secs = save_timeout;
|
||||
|
||||
return ((result == DLG_EXIT_UNKNOWN) ? DLG_EXIT_OK : result);
|
||||
}
|
||||
|
@ -1,15 +1,23 @@
|
||||
# From: Martin Povolny <martin@solnet.cz>
|
||||
# Czech translations for dialog package.
|
||||
# Copyright (C) 2011 THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the dialog package.
|
||||
#
|
||||
# Martin Povolny <martin@solnet.cz>
|
||||
# Marek Černocký <marek@manet.cz>, 2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: dialog 0.9a-20010527\n"
|
||||
"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: 2004-12-19 20:14-0500\n"
|
||||
"Last-Translator: Martin Povolny <martin@solnet.cz>\n"
|
||||
"Language-Team:\n"
|
||||
"PO-Revision-Date: 2011-11-25 13:18+0100\n"
|
||||
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
|
||||
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
|
||||
"Language: cs\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
|
||||
|
||||
#: buttons.c:385
|
||||
msgid "Yes"
|
||||
@ -21,7 +29,7 @@ msgstr "Ne"
|
||||
|
||||
#: buttons.c:401
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
msgstr "Budiž"
|
||||
|
||||
#: buttons.c:409
|
||||
msgid "Cancel"
|
||||
@ -33,11 +41,11 @@ msgstr "Konec"
|
||||
|
||||
#: buttons.c:425
|
||||
msgid "Extra"
|
||||
msgstr ""
|
||||
msgstr "Další"
|
||||
|
||||
#: buttons.c:433
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
msgstr "Nápověda"
|
||||
|
||||
#. Headline "Month"
|
||||
#: calendar.c:273
|
||||
@ -51,11 +59,11 @@ msgstr "Rok"
|
||||
|
||||
#: dialog.c:741
|
||||
msgid "Rename"
|
||||
msgstr ""
|
||||
msgstr "Přejmenovat"
|
||||
|
||||
#: fselect.c:550
|
||||
msgid "Directories"
|
||||
msgstr "Adresáře"
|
||||
msgstr "Složky"
|
||||
|
||||
#: fselect.c:551
|
||||
msgid "Files"
|
||||
@ -63,46 +71,44 @@ msgstr "Soubory"
|
||||
|
||||
#: mixedgauge.c:58
|
||||
msgid "Succeeded"
|
||||
msgstr ""
|
||||
msgstr "Úspěšné"
|
||||
|
||||
#: mixedgauge.c:61
|
||||
#, fuzzy
|
||||
msgid "Failed"
|
||||
msgstr "Soubory"
|
||||
msgstr "Selhalo"
|
||||
|
||||
#: mixedgauge.c:64
|
||||
msgid "Passed"
|
||||
msgstr ""
|
||||
msgstr "Pozastaveno"
|
||||
|
||||
#: mixedgauge.c:67
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
msgstr "Dokončeno"
|
||||
|
||||
#: mixedgauge.c:70
|
||||
msgid "Checked"
|
||||
msgstr ""
|
||||
msgstr "Zkontrolováno"
|
||||
|
||||
#: mixedgauge.c:73
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Hotovo"
|
||||
|
||||
#: mixedgauge.c:76
|
||||
msgid "Skipped"
|
||||
msgstr ""
|
||||
msgstr "Přeskočeno"
|
||||
|
||||
#: mixedgauge.c:79
|
||||
msgid "In Progress"
|
||||
msgstr ""
|
||||
msgstr "Probíhá"
|
||||
|
||||
#: mixedgauge.c:85
|
||||
msgid "N/A"
|
||||
msgstr ""
|
||||
msgstr "Není známo"
|
||||
|
||||
#: mixedgauge.c:193
|
||||
msgid "Overall Progress"
|
||||
msgstr ""
|
||||
msgstr "Celkový průběh"
|
||||
|
||||
#: textbox.c:489
|
||||
#, fuzzy
|
||||
msgid "Search"
|
||||
msgstr "Search"
|
||||
msgstr "Hledat"
|
||||
|
@ -1,14 +1,20 @@
|
||||
# Greek translation for dialog.
|
||||
# This file is distributed under the same license as the dialog package.
|
||||
# Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
# Savvas Radevic <vicedar@gmail.com>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Dialog\n"
|
||||
"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: 2002-06-05 10:00GMT+2\n"
|
||||
"Last-Translator: kromJx <kromJx@crosswinds.net>\n"
|
||||
"Language-Team: <i18ngr@hellug.gr>\n"
|
||||
"PO-Revision-Date: 2012-03-18 00:54+0100\n"
|
||||
"Last-Translator: Savvas Radevic <vicedar@gmail.com>\n"
|
||||
"Language-Team: Greek <team@lists.gnome.gr>\n"
|
||||
"Language: el\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8-bit\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: buttons.c:385
|
||||
msgid "Yes"
|
||||
@ -20,7 +26,7 @@ msgstr "Όχι"
|
||||
|
||||
#: buttons.c:401
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
msgstr "Εντάξει"
|
||||
|
||||
#: buttons.c:409
|
||||
msgid "Cancel"
|
||||
@ -32,7 +38,7 @@ msgstr "Έξοδος"
|
||||
|
||||
#: buttons.c:425
|
||||
msgid "Extra"
|
||||
msgstr ""
|
||||
msgstr "Πρόσθετα"
|
||||
|
||||
#: buttons.c:433
|
||||
msgid "Help"
|
||||
@ -50,7 +56,7 @@ msgstr "Έτος"
|
||||
|
||||
#: dialog.c:741
|
||||
msgid "Rename"
|
||||
msgstr ""
|
||||
msgstr "Μετονομασία"
|
||||
|
||||
#: fselect.c:550
|
||||
msgid "Directories"
|
||||
@ -62,46 +68,44 @@ msgstr "Αρχεία"
|
||||
|
||||
#: mixedgauge.c:58
|
||||
msgid "Succeeded"
|
||||
msgstr ""
|
||||
msgstr "Επιτυχία"
|
||||
|
||||
#: mixedgauge.c:61
|
||||
#, fuzzy
|
||||
msgid "Failed"
|
||||
msgstr "Αρχεία"
|
||||
msgstr "Αποτυχία"
|
||||
|
||||
#: mixedgauge.c:64
|
||||
msgid "Passed"
|
||||
msgstr ""
|
||||
msgstr "Πέρασε"
|
||||
|
||||
#: mixedgauge.c:67
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
msgstr "Ολοκλήρωση"
|
||||
|
||||
#: mixedgauge.c:70
|
||||
msgid "Checked"
|
||||
msgstr ""
|
||||
msgstr "Έλεγχος"
|
||||
|
||||
#: mixedgauge.c:73
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Τέλος"
|
||||
|
||||
#: mixedgauge.c:76
|
||||
msgid "Skipped"
|
||||
msgstr ""
|
||||
msgstr "Παράλειψη"
|
||||
|
||||
#: mixedgauge.c:79
|
||||
msgid "In Progress"
|
||||
msgstr ""
|
||||
msgstr "Σε εξέλιξη"
|
||||
|
||||
#: mixedgauge.c:85
|
||||
msgid "N/A"
|
||||
msgstr ""
|
||||
msgstr "Μη Διαθέσιμο"
|
||||
|
||||
#: mixedgauge.c:193
|
||||
msgid "Overall Progress"
|
||||
msgstr ""
|
||||
msgstr "Συνολική πρόοδος"
|
||||
|
||||
#: textbox.c:489
|
||||
#, fuzzy
|
||||
msgid "Search"
|
||||
msgstr "Search"
|
||||
msgstr "Αναζήτηση"
|
||||
|
@ -1,110 +1,112 @@
|
||||
# Croatian translation of Dialog.
|
||||
# Dialog
|
||||
# Copyright 2003-2007,2008 # Thomas Dickey
|
||||
# This file is distributed under the same license as the dialog package.
|
||||
# Copyright (C) 2005 Thomas Dickey.
|
||||
# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Dialog 1.0-20050116\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: 2004-07-25 14:52+0200\n"
|
||||
"Last-Translator: Krunoslav Gernhard <kruno@linux.hr>\n"
|
||||
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
|
||||
"PO-Revision-Date: 2012-03-31 00:10+0200\n"
|
||||
"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
|
||||
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
|
||||
"Language: hr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
|
||||
#: buttons.c:387
|
||||
#: buttons.c:385
|
||||
msgid "Yes"
|
||||
msgstr "Da"
|
||||
|
||||
#: buttons.c:395
|
||||
#: buttons.c:393
|
||||
msgid "No"
|
||||
msgstr "Ne"
|
||||
|
||||
#: buttons.c:403
|
||||
#: buttons.c:401
|
||||
msgid "OK"
|
||||
msgstr "U redu"
|
||||
|
||||
#: buttons.c:411
|
||||
#: buttons.c:409
|
||||
msgid "Cancel"
|
||||
msgstr "Otkaži"
|
||||
|
||||
#: buttons.c:419
|
||||
#: buttons.c:417
|
||||
msgid "EXIT"
|
||||
msgstr ""
|
||||
msgstr "IZLAZ"
|
||||
|
||||
#: buttons.c:427
|
||||
#: buttons.c:425
|
||||
msgid "Extra"
|
||||
msgstr ""
|
||||
msgstr "Dodatno"
|
||||
|
||||
#: buttons.c:435
|
||||
#: buttons.c:433
|
||||
msgid "Help"
|
||||
msgstr ""
|
||||
msgstr "Pomoć"
|
||||
|
||||
#. Headline "Month"
|
||||
#: calendar.c:298
|
||||
#: calendar.c:273
|
||||
msgid "Month"
|
||||
msgstr ""
|
||||
msgstr "Mjesec"
|
||||
|
||||
#. Headline "Year"
|
||||
#: calendar.c:318
|
||||
#: calendar.c:293
|
||||
msgid "Year"
|
||||
msgstr ""
|
||||
msgstr "Godina"
|
||||
|
||||
#: dialog.c:756
|
||||
#: dialog.c:741
|
||||
msgid "Rename"
|
||||
msgstr ""
|
||||
msgstr "Preimenuj"
|
||||
|
||||
#: fselect.c:571
|
||||
#: fselect.c:550
|
||||
msgid "Directories"
|
||||
msgstr ""
|
||||
msgstr "Direktoriji"
|
||||
|
||||
#: fselect.c:572
|
||||
#: fselect.c:551
|
||||
msgid "Files"
|
||||
msgstr ""
|
||||
msgstr "Datoteke"
|
||||
|
||||
#: mixedgauge.c:58
|
||||
msgid "Succeeded"
|
||||
msgstr ""
|
||||
msgstr "Uspjeh"
|
||||
|
||||
#: mixedgauge.c:61
|
||||
msgid "Failed"
|
||||
msgstr ""
|
||||
msgstr "Neuspjeh"
|
||||
|
||||
#: mixedgauge.c:64
|
||||
msgid "Passed"
|
||||
msgstr ""
|
||||
msgstr "Prošlo"
|
||||
|
||||
#: mixedgauge.c:67
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
msgstr "Dovršeno"
|
||||
|
||||
#: mixedgauge.c:70
|
||||
msgid "Checked"
|
||||
msgstr ""
|
||||
msgstr "Provjereno"
|
||||
|
||||
#: mixedgauge.c:73
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Gotovo"
|
||||
|
||||
#: mixedgauge.c:76
|
||||
msgid "Skipped"
|
||||
msgstr ""
|
||||
msgstr "Preskočeno"
|
||||
|
||||
#: mixedgauge.c:79
|
||||
msgid "In Progress"
|
||||
msgstr ""
|
||||
msgstr "U tijeku"
|
||||
|
||||
#: mixedgauge.c:85
|
||||
msgid "N/A"
|
||||
msgstr ""
|
||||
msgstr "Nedostupno"
|
||||
|
||||
#: mixedgauge.c:193
|
||||
msgid "Overall Progress"
|
||||
msgstr ""
|
||||
msgstr "Ukupni napredak"
|
||||
|
||||
#: textbox.c:468
|
||||
#: textbox.c:489
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
msgstr "Pretraga"
|
||||
|
@ -1,18 +1,21 @@
|
||||
# Serbian translation of `dialog'.
|
||||
# Serbian translation of dialog.
|
||||
# Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
# This file is distributed under the same license as the `dialog' package.
|
||||
# This file is distributed under the same license as the dialog package.
|
||||
# Aleksandar Jelenak <jelenak@verizon.net>, 2005.
|
||||
# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: dialog 1.0-rel20041222\n"
|
||||
"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: 2005-08-21 12:53-0400\n"
|
||||
"Last-Translator: Aleksandar Jelenak <jelenak@verizon.net>\n"
|
||||
"PO-Revision-Date: 2011-12-24 21:29+0200\n"
|
||||
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
|
||||
"Language-Team: Serbian <gnu@prevod.org>\n"
|
||||
"Language: sr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
#: buttons.c:385
|
||||
msgid "Yes"
|
||||
@ -66,44 +69,43 @@ msgstr "Датотеке"
|
||||
|
||||
#: mixedgauge.c:58
|
||||
msgid "Succeeded"
|
||||
msgstr ""
|
||||
msgstr "Успешно"
|
||||
|
||||
#: mixedgauge.c:61
|
||||
#, fuzzy
|
||||
msgid "Failed"
|
||||
msgstr "Датотеке"
|
||||
msgstr "Неуспешно"
|
||||
|
||||
#: mixedgauge.c:64
|
||||
msgid "Passed"
|
||||
msgstr ""
|
||||
msgstr "Прошло"
|
||||
|
||||
#: mixedgauge.c:67
|
||||
msgid "Completed"
|
||||
msgstr ""
|
||||
msgstr "Завршено"
|
||||
|
||||
#: mixedgauge.c:70
|
||||
msgid "Checked"
|
||||
msgstr ""
|
||||
msgstr "Проверено"
|
||||
|
||||
#: mixedgauge.c:73
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Урађено"
|
||||
|
||||
#: mixedgauge.c:76
|
||||
msgid "Skipped"
|
||||
msgstr ""
|
||||
msgstr "Прескочено"
|
||||
|
||||
#: mixedgauge.c:79
|
||||
msgid "In Progress"
|
||||
msgstr ""
|
||||
msgstr "У току"
|
||||
|
||||
#: mixedgauge.c:85
|
||||
msgid "N/A"
|
||||
msgstr ""
|
||||
msgstr "Н/Д"
|
||||
|
||||
#: mixedgauge.c:193
|
||||
msgid "Overall Progress"
|
||||
msgstr ""
|
||||
msgstr "Укупно напредовање"
|
||||
|
||||
#: textbox.c:489
|
||||
msgid "Search"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: prgbox.c,v 1.7 2011/06/30 20:44:13 tom Exp $
|
||||
* $Id: prgbox.c,v 1.8 2011/10/20 23:42:32 tom Exp $
|
||||
*
|
||||
* prgbox.c -- implements the prg box
|
||||
*
|
||||
@ -31,11 +31,10 @@ dlg_popen(const char *command, const char *type)
|
||||
{
|
||||
FILE *result = 0;
|
||||
int fd[2];
|
||||
int pid;
|
||||
const char *argv[4];
|
||||
|
||||
if ((*type == 'r' || *type != 'w') && pipe(fd) == 0) {
|
||||
switch (pid = fork()) {
|
||||
switch (fork()) {
|
||||
case -1: /* Error. */
|
||||
(void) close(fd[0]);
|
||||
(void) close(fd[1]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: progressbox.c,v 1.13 2011/06/27 08:18:20 tom Exp $
|
||||
* $Id: progressbox.c,v 1.21 2012/07/03 00:12:52 tom Exp $
|
||||
*
|
||||
* progressbox.c -- implements the progress box
|
||||
*
|
||||
@ -99,6 +99,7 @@ print_line(MY_OBJ * obj, WINDOW *win, int row, int width)
|
||||
#endif
|
||||
|
||||
getyx(win, y, x);
|
||||
(void) y;
|
||||
/* Clear 'residue' of previous line */
|
||||
for (i = 0; i < width - x; i++)
|
||||
(void) waddch(win, ' ');
|
||||
@ -111,54 +112,79 @@ pause_for_ok(WINDOW *dialog, int height, int width)
|
||||
static DLG_KEYS_BINDING binding[] = {
|
||||
HELPKEY_BINDINGS,
|
||||
ENTERKEY_BINDINGS,
|
||||
DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
|
||||
TRAVERSE_BINDINGS,
|
||||
END_KEYS_BINDING
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
int button = 0;
|
||||
int button;
|
||||
int key = 0, fkey;
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
const char **buttons = dlg_ok_label();
|
||||
int check;
|
||||
int save_nocancel = dialog_vars.nocancel;
|
||||
bool redraw = TRUE;
|
||||
|
||||
dialog_vars.nocancel = TRUE;
|
||||
button = dlg_default_button();
|
||||
|
||||
dlg_register_window(dialog, "progressbox", binding);
|
||||
dlg_register_buttons(dialog, "progressbox", buttons);
|
||||
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
|
||||
dlg_draw_buttons(dialog, height - 2, 0, buttons, button, FALSE, width);
|
||||
|
||||
while (result == DLG_EXIT_UNKNOWN) {
|
||||
if (redraw) {
|
||||
redraw = FALSE;
|
||||
if (button < 0)
|
||||
button = 0;
|
||||
dlg_draw_buttons(dialog,
|
||||
height - 2, 0,
|
||||
buttons, button,
|
||||
FALSE, width);
|
||||
}
|
||||
|
||||
key = dlg_mouse_wgetch(dialog, &fkey);
|
||||
if (dlg_result_key(key, fkey, &result))
|
||||
break;
|
||||
|
||||
if (!fkey && (check = dlg_char_to_button(key, buttons)) >= 0) {
|
||||
result = check ? DLG_EXIT_HELP : DLG_EXIT_OK;
|
||||
result = dlg_ok_buttoncode(check);
|
||||
break;
|
||||
}
|
||||
|
||||
if (fkey) {
|
||||
switch (key) {
|
||||
case DLGK_FIELD_NEXT:
|
||||
button = dlg_next_button(buttons, button);
|
||||
redraw = TRUE;
|
||||
break;
|
||||
case DLGK_FIELD_PREV:
|
||||
button = dlg_prev_button(buttons, button);
|
||||
redraw = TRUE;
|
||||
break;
|
||||
case DLGK_ENTER:
|
||||
result = button ? DLG_EXIT_HELP : DLG_EXIT_OK;
|
||||
break;
|
||||
case DLGK_MOUSE(0):
|
||||
result = DLG_EXIT_OK;
|
||||
break;
|
||||
case DLGK_MOUSE(1):
|
||||
result = DLG_EXIT_HELP;
|
||||
result = dlg_ok_buttoncode(button);
|
||||
break;
|
||||
default:
|
||||
if (is_DLGK_MOUSE(key)) {
|
||||
result = dlg_ok_buttoncode(key - M_EVENT);
|
||||
if (result < 0)
|
||||
result = DLG_EXIT_OK;
|
||||
} else {
|
||||
beep();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
} else {
|
||||
beep();
|
||||
}
|
||||
}
|
||||
dlg_unregister_window(dialog);
|
||||
|
||||
dialog_vars.nocancel = save_nocancel;
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -188,16 +214,17 @@ dlg_progressbox(const char *title,
|
||||
|
||||
dialog = dlg_new_window(height, width, y, x);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
|
||||
if (*prompt != '\0') {
|
||||
int y2, x2;
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
getyx(dialog, y2, x2);
|
||||
(void) x2;
|
||||
++y2;
|
||||
wmove(dialog, y2, MARGIN);
|
||||
for (i = 0; i < getmaxx(dialog) - 2 * MARGIN; i++)
|
||||
@ -236,6 +263,7 @@ dlg_progressbox(const char *title,
|
||||
print_line(obj, text, thigh - 1, width - (2 * MARGIN));
|
||||
}
|
||||
(void) wrefresh(text);
|
||||
dlg_trace_win(dialog);
|
||||
if (obj->is_eof)
|
||||
break;
|
||||
}
|
||||
@ -254,7 +282,7 @@ dlg_progressbox(const char *title,
|
||||
free(prompt);
|
||||
free(obj);
|
||||
|
||||
return DLG_EXIT_OK;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: rc.c,v 1.47 2011/06/20 22:30:04 tom Exp $
|
||||
* $Id: rc.c,v 1.49 2011/10/15 00:56:44 tom Exp $
|
||||
*
|
||||
* rc.c -- routines for processing the configuration file
|
||||
*
|
||||
@ -203,9 +203,10 @@ attr_to_str(char *str, int fg, int bg, int hl)
|
||||
|
||||
/*
|
||||
* Extract the foreground, background and highlight values from an attribute
|
||||
* represented as a string in this form:
|
||||
* represented as a string in one of two forms:
|
||||
*
|
||||
* "(foreground,background,highlight)"
|
||||
" "xxxx_color"
|
||||
*/
|
||||
static int
|
||||
str_to_attr(char *str, int *fg, int *bg, int *hl)
|
||||
@ -214,8 +215,15 @@ str_to_attr(char *str, int *fg, int *bg, int *hl)
|
||||
unsigned j;
|
||||
char tempstr[MAX_LEN + 1], *part;
|
||||
|
||||
if (str[0] != '(' || lastch(str) != ')')
|
||||
if (str[0] != '(' || lastch(str) != ')') {
|
||||
if ((i = find_color(str)) >= 0) {
|
||||
*fg = dlg_color_table[i].fg;
|
||||
*bg = dlg_color_table[i].bg;
|
||||
*hl = dlg_color_table[i].hilite;
|
||||
return 0;
|
||||
}
|
||||
return -1; /* invalid representation */
|
||||
}
|
||||
|
||||
/* remove the parenthesis */
|
||||
strcpy(tempstr, str + 1);
|
||||
@ -424,14 +432,30 @@ dlg_create_rc(const char *filename)
|
||||
#ifdef HAVE_COLOR
|
||||
for (i = 0; i < (unsigned) dlg_color_count(); ++i) {
|
||||
char buffer[MAX_LEN + 1];
|
||||
unsigned j;
|
||||
bool repeat = FALSE;
|
||||
|
||||
fprintf(rc_file, "\n# %s\n", dlg_color_table[i].comment);
|
||||
for (j = 0; j != i; ++j) {
|
||||
if (dlg_color_table[i].fg == dlg_color_table[j].fg
|
||||
&& dlg_color_table[i].bg == dlg_color_table[j].bg
|
||||
&& dlg_color_table[i].hilite == dlg_color_table[j].hilite) {
|
||||
fprintf(rc_file, "%s = %s\n",
|
||||
dlg_color_table[i].name,
|
||||
dlg_color_table[j].name);
|
||||
repeat = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!repeat) {
|
||||
fprintf(rc_file, "%s = %s\n", dlg_color_table[i].name,
|
||||
attr_to_str(buffer,
|
||||
dlg_color_table[i].fg,
|
||||
dlg_color_table[i].bg,
|
||||
dlg_color_table[i].hilite));
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_COLOR */
|
||||
dlg_dump_keys(rc_file);
|
||||
|
||||
@ -507,7 +531,10 @@ dlg_parse_rc(void)
|
||||
|
||||
lastch(str) = '\0';
|
||||
if (begins_with(str, "bindkey", ¶ms)) {
|
||||
dlg_parse_bindkey(params);
|
||||
if (!dlg_parse_bindkey(params)) {
|
||||
fprintf(stderr, "\nParse error: line %d of configuration\n", l);
|
||||
result = -1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
parse = parse_line(str, &var, &value); /* parse current line */
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# $Id: admin.funcs,v 1.2 2001/01/15 22:20:11 tom Exp $
|
||||
#!/usr/bin/env bash
|
||||
# $Id: admin.funcs,v 1.3 2012/02/16 01:29:39 tom Exp $
|
||||
#
|
||||
# ComeOn Point Functions! v0.9.2
|
||||
# - usate da vari altri moduli ComeOn Point...
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# $Id: common.funcs,v 1.2 2012/06/29 22:33:42 tom Exp $
|
||||
#
|
||||
# ComeOn Point Functions! v0.9.2
|
||||
# - usate da vari altri moduli ComeOn Point...
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# $Id: copi.funcs,v 1.3 2001/01/15 22:24:26 tom Exp $
|
||||
#!/usr/bin/env bash
|
||||
# $Id: copi.funcs,v 1.4 2012/02/16 01:29:39 tom Exp $
|
||||
# ComeOn Point Functions! v0.9.2
|
||||
# - usate da vari altri moduli ComeOn Point...
|
||||
#
|
||||
@ -244,7 +244,7 @@ create_innconf_newsfeeds_distrib() {
|
||||
save $INNCONF
|
||||
|
||||
cat <<EOF >$INNCONF
|
||||
## $Revision: 1.3 $
|
||||
## $Revision: 1.4 $
|
||||
## inn.conf -- inn configuration data
|
||||
## Format:
|
||||
## <parameter>:<whitespace><value>
|
||||
@ -350,7 +350,7 @@ create_nnrpaccess() {
|
||||
save $NNRPACCESS
|
||||
|
||||
cat <<EOF >$NNRPACCESS
|
||||
## $Revision: 1.3 $
|
||||
## $Revision: 1.4 $
|
||||
## nnrp.access - access file for on-campus NNTP sites
|
||||
## Format:
|
||||
## <host>:<perm>:<user>:<pass>:<groups>
|
||||
@ -386,7 +386,7 @@ create_hostsnntp() {
|
||||
save $HOSTSNNTP
|
||||
|
||||
cat <<EOF >$HOSTSNNTP
|
||||
## $Revision: 1.3 $
|
||||
## $Revision: 1.4 $
|
||||
## hosts.nntp - names and addresses that feed us news
|
||||
## Format
|
||||
## <host>:
|
||||
|
@ -1,3 +1,6 @@
|
||||
# vile:perlmode
|
||||
# $Id: copi.ifman2,v 1.2 2012/06/29 22:33:42 tom Exp $
|
||||
|
||||
if ( getpwuid($<) ne $ifowner ) { print "You must be owner of ifmail\n"; exit 1; }
|
||||
|
||||
if ( (@ARGV < 3) || $ARGV[0] eq "-?" || $ARGV[0] eq "-h" ) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# $Id: copi.ifpoll2,v 1.2 2012/06/29 22:33:42 tom Exp $
|
||||
|
||||
# Packets backup directory - You have to CREATE this directory
|
||||
BAK=/var/spool/ifmail/BAK
|
||||
|
@ -1,3 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
# $Id: copi.ifreq2,v 1.2 2012/06/29 22:33:42 tom Exp $
|
||||
#
|
||||
# this is the base directory, where the req-files are stored and the
|
||||
# default outbound
|
||||
$flo_path = "/var/spool/ifmail";
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
## $Revision: 1.1 $
|
||||
#!/usr/bin/env bash
|
||||
# $Id: copi.sendifm1,v 1.2 2012/06/29 22:33:42 tom Exp $
|
||||
## SH script to send UUCP batches out.
|
||||
|
||||
## =()<. @<_PATH_SHELLVARS>@>()=
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# $Id: copi.wheel,v 1.2 2001/01/15 22:26:33 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: copi.wheel,v 1.4 2012/06/29 10:53:52 tom Exp $
|
||||
|
||||
mkstemp size
|
||||
dialog --print-maxsize 2>$tmp_size
|
||||
@ -9,10 +9,10 @@ rm $tmp_size
|
||||
|
||||
# Takes an integer, multiplies it for COLS, divides for 132
|
||||
scalex() {
|
||||
echo $[$1*$COLS/132]
|
||||
expr $1 \* $COLS / 132
|
||||
}
|
||||
scaley() {
|
||||
echo $[$1*$ROWS/60]
|
||||
expr $1 \* $ROWS / 60
|
||||
}
|
||||
|
||||
dialog --backtitle "$TITLE" --no-shadow \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# $Id: copismall,v 1.8 2010/01/13 10:26:52 tom Exp $
|
||||
#!/usr/bin/env bash
|
||||
# $Id: copismall,v 1.9 2012/02/16 01:29:39 Pedro.Giffuni Exp $
|
||||
#
|
||||
# ComeOn Point Installer! v0.9a.small (small version for cdialog v0.9a)
|
||||
# - installa il point in modo visuale e auto-detecting. Versione light.
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: debian.rc,v 1.5 2011/01/17 00:14:53 tom Exp $
|
||||
# $Id: debian.rc,v 1.7 2011/10/15 01:00:09 tom Exp $
|
||||
# vile:confmode
|
||||
# Run-time configuration file for dialog, matches Debian color scheme.
|
||||
# (these are the default values for dialog)
|
||||
@ -47,10 +47,10 @@ border_color = (WHITE,WHITE,ON)
|
||||
button_active_color = (WHITE,BLUE,ON)
|
||||
|
||||
# Inactive button color
|
||||
button_inactive_color = (BLACK,WHITE,OFF)
|
||||
button_inactive_color = dialog_color
|
||||
|
||||
# Active button key color
|
||||
button_key_active_color = (WHITE,BLUE,ON)
|
||||
button_key_active_color = button_active_color
|
||||
|
||||
# Inactive button key color
|
||||
button_key_inactive_color = (RED,WHITE,OFF)
|
||||
@ -62,64 +62,64 @@ button_label_active_color = (YELLOW,BLUE,ON)
|
||||
button_label_inactive_color = (BLACK,WHITE,ON)
|
||||
|
||||
# Input box color
|
||||
inputbox_color = (BLACK,WHITE,OFF)
|
||||
inputbox_color = dialog_color
|
||||
|
||||
# Input box border color
|
||||
inputbox_border_color = (BLACK,WHITE,OFF)
|
||||
inputbox_border_color = dialog_color
|
||||
|
||||
# Search box color
|
||||
searchbox_color = (BLACK,WHITE,OFF)
|
||||
searchbox_color = dialog_color
|
||||
|
||||
# Search box title color
|
||||
searchbox_title_color = (BLUE,WHITE,ON)
|
||||
searchbox_title_color = title_color
|
||||
|
||||
# Search box border color
|
||||
searchbox_border_color = (WHITE,WHITE,ON)
|
||||
searchbox_border_color = border_color
|
||||
|
||||
# File position indicator color
|
||||
position_indicator_color = (BLUE,WHITE,ON)
|
||||
position_indicator_color = title_color
|
||||
|
||||
# Menu box color
|
||||
menubox_color = (BLACK,WHITE,OFF)
|
||||
menubox_color = dialog_color
|
||||
|
||||
# Menu box border color
|
||||
menubox_border_color = (WHITE,WHITE,ON)
|
||||
menubox_border_color = border_color
|
||||
|
||||
# Item color
|
||||
item_color = (BLACK,WHITE,OFF)
|
||||
item_color = dialog_color
|
||||
|
||||
# Selected item color
|
||||
item_selected_color = (WHITE,BLUE,ON)
|
||||
item_selected_color = button_active_color
|
||||
|
||||
# Tag color
|
||||
tag_color = (BLUE,WHITE,ON)
|
||||
tag_color = title_color
|
||||
|
||||
# Selected tag color
|
||||
tag_selected_color = (YELLOW,BLUE,ON)
|
||||
tag_selected_color = button_label_active_color
|
||||
|
||||
# Tag key color
|
||||
tag_key_color = (RED,WHITE,OFF)
|
||||
tag_key_color = button_key_inactive_color
|
||||
|
||||
# Selected tag key color
|
||||
tag_key_selected_color = (RED,BLUE,ON)
|
||||
|
||||
# Check box color
|
||||
check_color = (BLACK,WHITE,OFF)
|
||||
check_color = dialog_color
|
||||
|
||||
# Selected check box color
|
||||
check_selected_color = (WHITE,BLUE,ON)
|
||||
check_selected_color = button_active_color
|
||||
|
||||
# Up arrow color
|
||||
uarrow_color = (GREEN,WHITE,ON)
|
||||
|
||||
# Down arrow color
|
||||
darrow_color = (GREEN,WHITE,ON)
|
||||
darrow_color = uarrow_color
|
||||
|
||||
# Item help-text color
|
||||
itemhelp_color = (WHITE,BLACK,OFF)
|
||||
|
||||
# Active form text color
|
||||
form_active_text_color = (WHITE,BLUE,ON)
|
||||
form_active_text_color = button_active_color
|
||||
|
||||
# Form text color
|
||||
form_text_color = (WHITE,CYAN,ON)
|
||||
@ -128,4 +128,16 @@ form_text_color = (WHITE,CYAN,ON)
|
||||
form_item_readonly_color = (CYAN,WHITE,ON)
|
||||
|
||||
# Dialog box gauge color
|
||||
gauge_color = (BLUE,WHITE,ON)
|
||||
gauge_color = title_color
|
||||
|
||||
# Dialog box border2 color
|
||||
border2_color = dialog_color
|
||||
|
||||
# Input box border2 color
|
||||
inputbox_border2_color = dialog_color
|
||||
|
||||
# Search box border2 color
|
||||
searchbox_border2_color = dialog_color
|
||||
|
||||
# Menu box border2 color
|
||||
menubox_border2_color = dialog_color
|
||||
|
3
contrib/dialog/samples/dft-cancel
Executable file
3
contrib/dialog/samples/dft-cancel
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# $Id: dft-cancel,v 1.2 2012/07/03 09:44:02 tom Exp $
|
||||
DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --default-button cancel" "$@"
|
3
contrib/dialog/samples/dft-extra
Executable file
3
contrib/dialog/samples/dft-extra
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# $Id: dft-extra,v 1.2 2012/07/03 09:44:02 tom Exp $
|
||||
DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --default-button extra" "$@"
|
3
contrib/dialog/samples/dft-help
Executable file
3
contrib/dialog/samples/dft-help
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# $Id: dft-help,v 1.2 2012/07/03 09:44:02 tom Exp $
|
||||
DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --default-button help" "$@"
|
3
contrib/dialog/samples/dft-no
Executable file
3
contrib/dialog/samples/dft-no
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# $Id: dft-no,v 1.2 2012/07/03 09:44:02 tom Exp $
|
||||
DIALOGOPTS="$DIALOGOPTS --extra-button --help-button --defaultno" "$@"
|
@ -1,4 +1,5 @@
|
||||
# $Id: dialog.py,v 1.3 2004/09/21 00:52:15 tom Exp $
|
||||
#!/usr/bin/python
|
||||
# $Id: dialog.py,v 1.4 2012/06/29 09:33:18 tom Exp $
|
||||
# Module: dialog.py
|
||||
# Copyright (c) 2000 Robb Shecter <robb@acm.org>
|
||||
# All rights reserved.
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $Id: dselect,v 1.6 2010/01/13 10:20:03 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
exec 3>&1
|
||||
RESULT=`$DIALOG --title "Please choose a directory" "$@" --dselect $HOME/ 14 48 2>&1 1>&3`
|
||||
retval=$?
|
||||
exec 3>&-
|
||||
|
||||
. ./report-string
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Id: form1,v 1.14 2010/01/13 10:53:11 tom Exp $
|
||||
# $Id: form1,v 1.15 2011/10/04 23:36:53 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
@ -63,8 +63,8 @@ $show" 10 40
|
||||
echo "Button 3 (Extra) pressed."
|
||||
exit
|
||||
;;
|
||||
$DIALOG_ERR)
|
||||
echo "ERROR!"
|
||||
$DIALOG_ERROR)
|
||||
echo "ERROR!$value"
|
||||
exit
|
||||
;;
|
||||
$DIALOG_ESC)
|
||||
|
11
contrib/dialog/samples/fselect0
Executable file
11
contrib/dialog/samples/fselect0
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# $Id: fselect0,v 1.1 2011/10/14 08:32:48 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
exec 3>&1
|
||||
RESULT=`$DIALOG --title "Please choose a file" "$@" --fselect '' 14 48 2>&1 1>&3`
|
||||
retval=$?
|
||||
exec 3>&-
|
||||
|
||||
. ./report-string
|
@ -1,15 +1,18 @@
|
||||
#! /bin/bash
|
||||
# $Id: inputmenu,v 1.10 2010/01/13 10:29:22 tom Exp $
|
||||
#! /bin/sh
|
||||
# $Id: inputmenu,v 1.15 2012/07/06 18:11:21 tom Exp $
|
||||
# 2002 - written by Tobias Rittweiler <tobrit@freebits.de>
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
user="$USER" ; uid="$UID" ;
|
||||
gid="$GROUPS" ; home="$HOME" ;
|
||||
user="$USER"
|
||||
uid=`id|sed -e 's/^uid=//' -e 's/(.*//'`
|
||||
gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'`
|
||||
home="$HOME"
|
||||
|
||||
while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do
|
||||
exec 3>&1
|
||||
value=$("$DIALOG" --clear --ok-label "Create" \
|
||||
value=`$DIALOG \
|
||||
--clear --ok-label "Create" \
|
||||
--backtitle "An Example for the use of --inputmenu:" "$@" \
|
||||
--inputmenu "Originally I designed --inputmenu for a \
|
||||
configuration purpose. Here is a possible piece of a configuration program. \
|
||||
@ -18,12 +21,13 @@ configuration purpose. Here is a possible piece of a configuration program. \
|
||||
"UID:" "$uid" \
|
||||
"GID:" "$gid" \
|
||||
"HOME:" "$home" \
|
||||
2>&1 1>&3 )
|
||||
2>&1 1>&3 `
|
||||
returncode=$?
|
||||
exec 3>&-
|
||||
case $returncode in
|
||||
$DIALOG_CANCEL)
|
||||
"$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
"$DIALOG" \
|
||||
--clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
--yesno "Really quit?" 10 30
|
||||
case $? in
|
||||
$DIALOG_OK) break;;
|
||||
@ -31,7 +35,8 @@ configuration purpose. Here is a possible piece of a configuration program. \
|
||||
esac
|
||||
;;
|
||||
$DIALOG_OK)
|
||||
"$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
"$DIALOG" \
|
||||
--clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
--msgbox "useradd \n\
|
||||
-d $home \n\
|
||||
-u $uid \n\
|
||||
@ -39,9 +44,9 @@ configuration purpose. Here is a possible piece of a configuration program. \
|
||||
$user" 10 40
|
||||
;;
|
||||
$DIALOG_EXTRA)
|
||||
value="${value:8:${#value}}"
|
||||
tag="${value%:*}"
|
||||
item="${value#*: }"
|
||||
value=`echo "$value" | sed -e 's/^RENAMED //'`
|
||||
tag=`echo "$value" | sed -e 's/:.*//'`
|
||||
item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'`
|
||||
|
||||
case "$tag" in
|
||||
Username) user="$item" ;;
|
||||
|
@ -1,22 +1,31 @@
|
||||
#! /bin/bash
|
||||
# $Id: inputmenu-stdout,v 1.8 2010/01/13 10:30:14 tom Exp $
|
||||
#! /bin/sh
|
||||
# $Id: inputmenu-stdout,v 1.13 2012/07/06 18:11:12 tom Exp $
|
||||
# 2002 - written by Tobias Rittweiler <tobrit@freebits.de>
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
user="$USER" ; uid="$UID" ;
|
||||
gid="$GROUPS" ; home="$HOME" ;
|
||||
user="$USER"
|
||||
uid=`id|sed -e 's/^uid=//' -e 's/(.*//'`
|
||||
gid=`id|sed -e 's/^.*gid=//' -e 's/(.*//'`
|
||||
home="$HOME"
|
||||
|
||||
while [ ${returncode:-99} -ne 1 -a ${returncode:-99} -ne 250 ]; do
|
||||
value="$("$DIALOG" --stdout --clear --ok-label "Create" \
|
||||
value=`$DIALOG \
|
||||
--stdout --clear --ok-label "Create" \
|
||||
--backtitle "An Example for the use of --inputmenu:" "$@" \
|
||||
--inputmenu "Originally I designed --inputmenu for a \
|
||||
configuration purpose. Here is a possible piece of a configuration program.
|
||||
" 20 50 10 "Username:" "$user" "UID:" "$uid" "GID:" "$gid" "HOME:" "$home")"
|
||||
configuration purpose. Here is a possible piece of a configuration program. \
|
||||
" 20 50 10 \
|
||||
"Username:" "$user" \
|
||||
"UID:" "$uid" \
|
||||
"GID:" "$gid" \
|
||||
"HOME:" "$home" \
|
||||
`
|
||||
returncode=$?
|
||||
case $returncode in
|
||||
$DIALOG_CANCEL)
|
||||
"$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
"$DIALOG" \
|
||||
--clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
--yesno "Really quit?" 10 30
|
||||
case $? in
|
||||
$DIALOG_OK) break;;
|
||||
@ -24,7 +33,8 @@ configuration purpose. Here is a possible piece of a configuration program.
|
||||
esac
|
||||
;;
|
||||
$DIALOG_OK)
|
||||
"$DIALOG" --clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
"$DIALOG" \
|
||||
--clear --backtitle "An Example for the use of --inputmenu:" \
|
||||
--msgbox "useradd \n\
|
||||
-d $home \n\
|
||||
-u $uid \n\
|
||||
@ -32,9 +42,9 @@ configuration purpose. Here is a possible piece of a configuration program.
|
||||
$user" 10 40
|
||||
;;
|
||||
$DIALOG_EXTRA)
|
||||
value="${value:8:${#value}}"
|
||||
tag="${value%:*}"
|
||||
item="${value#*: }"
|
||||
value=`echo "$value" | sed -e 's/^RENAMED //'`
|
||||
tag=`echo "$value" | sed -e 's/:.*//'`
|
||||
item=`echo "$value" | sed -e 's/^[^:]*:[ ][ ]*//'`
|
||||
|
||||
case "$tag" in
|
||||
Username) user="$item" ;;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Id: inputmenu1,v 1.8 2010/01/13 10:31:02 tom Exp $
|
||||
# $Id: inputmenu1,v 1.9 2012/07/01 00:59:54 tom Exp $
|
||||
#
|
||||
# "inputmenu" rewritten into Bourne shell.
|
||||
|
||||
@ -58,7 +58,7 @@ exec 3>&-
|
||||
;;
|
||||
$DIALOG_EXTRA)
|
||||
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*//'`
|
||||
item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
|
||||
item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
|
||||
|
||||
case "$tag" in
|
||||
Username)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Id: inputmenu2,v 1.8 2010/01/13 10:32:04 tom Exp $
|
||||
# $Id: inputmenu2,v 1.9 2012/07/01 01:00:34 tom Exp $
|
||||
#
|
||||
# "inputmenu1" with defaultitem, help-button.
|
||||
|
||||
@ -66,7 +66,7 @@ exec 3>&-
|
||||
;;
|
||||
$DIALOG_EXTRA)
|
||||
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
|
||||
item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
|
||||
item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
|
||||
|
||||
case "$tag" in
|
||||
Username:)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Id: inputmenu3,v 1.10 2010/01/13 10:32:51 tom Exp $
|
||||
# $Id: inputmenu3,v 1.11 2012/07/01 01:00:34 tom Exp $
|
||||
#
|
||||
# "inputmenu1" with defaultitem, help-button and item-help.
|
||||
|
||||
@ -75,7 +75,7 @@ exec 3>&-
|
||||
;;
|
||||
$DIALOG_EXTRA)
|
||||
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
|
||||
item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
|
||||
item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
|
||||
|
||||
case "$tag" in
|
||||
Username:)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $Id: inputmenu4,v 1.8 2010/01/13 10:33:35 tom Exp $
|
||||
# $Id: inputmenu4,v 1.9 2012/07/01 01:00:34 tom Exp $
|
||||
#
|
||||
# "inputmenu1" with a different label for the extra-button
|
||||
|
||||
@ -59,7 +59,7 @@ exec 3>&-
|
||||
;;
|
||||
$DIALOG_EXTRA)
|
||||
tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*//'`
|
||||
item=`echo "$value" |sed -e 's/^.*:[ ]*//' -e 's/[ ]*$//'`
|
||||
item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
|
||||
|
||||
case "$tag" in
|
||||
Username)
|
||||
|
@ -1,13 +1,16 @@
|
||||
#! /bin/sh
|
||||
# $Id: killall,v 1.2 2004/09/17 19:56:18 tom Exp $
|
||||
# $Id: killall,v 1.3 2012/06/29 09:39:19 tom Exp $
|
||||
# Linux has a program that does this correctly.
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
for prog in $*
|
||||
do
|
||||
pid=`ps -a |fgrep $prog |fgrep -v fgrep|sed -e 's/^[ ]*//' -e 's/ .*//' `
|
||||
if test -n "$pid" ; then
|
||||
echo killing pid=$pid, $prog
|
||||
kill -1 $pid || \
|
||||
kill -15 $pid || \
|
||||
kill -9 $pid
|
||||
kill -$SIG_HUP $pid || \
|
||||
kill -$SIG_TERM $pid || \
|
||||
kill -$SIG_KILL $pid
|
||||
fi
|
||||
done
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $Id: prgbox,v 1.1 2011/03/02 00:10:54 tom Exp $
|
||||
# $Id: prgbox,v 1.2 2012/07/02 09:46:24 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist" 20 70
|
||||
|
||||
retval=$?
|
||||
. ./report-button
|
||||
|
@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
# $Id: prgbox2,v 1.1 2011/03/02 01:25:54 tom Exp $
|
||||
# $Id: prgbox2,v 1.2 2012/07/02 09:46:24 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
$DIALOG --title "PRGBOX" "$@" --prgbox "./shortlist 3" 20 70
|
||||
|
||||
retval=$?
|
||||
. ./report-button
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: report-button,v 1.2 2010/01/13 09:59:14 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: report-button,v 1.3 2012/06/29 09:29:36 tom Exp $
|
||||
# Report button-only, no $RESULT
|
||||
# vile:shmode
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: report-edit,v 1.3 2010/01/13 09:59:43 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: report-edit,v 1.4 2012/06/29 09:29:41 tom Exp $
|
||||
# Report results from editing.
|
||||
# vile:shmode
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: report-string,v 1.2 2010/01/13 10:00:11 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: report-string,v 1.3 2012/06/29 09:32:17 tom Exp $
|
||||
# Report result passed in a string $RESULT
|
||||
# vile:shmode
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: report-tempfile,v 1.3 2010/01/13 09:59:05 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: report-tempfile,v 1.4 2012/06/29 09:29:47 tom Exp $
|
||||
# Report results in a temporary-file.
|
||||
# vile:shmode
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: report-yesno,v 1.1 2010/01/13 10:40:14 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: report-yesno,v 1.2 2012/06/29 09:32:12 tom Exp $
|
||||
# Report button-only, no $RESULT
|
||||
# vile:shmode
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
# $Id: setup-edit,v 1.1 2010/01/13 01:56:07 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: setup-edit,v 1.2 2012/06/29 09:31:49 tom Exp $
|
||||
# vile:shmode
|
||||
|
||||
input=`tempfile 2>/dev/null` || input=/tmp/input$$
|
||||
output=`tempfile 2>/dev/null` || output=/tmp/test$$
|
||||
trap "rm -f $input $output" 0 1 2 5 15
|
||||
trap "rm -f $input $output" $SIG_NONE $SIG_HUP $SIG_INT $SIG_TRAP $SIG_TERM
|
||||
|
@ -1,5 +1,6 @@
|
||||
# $Id: setup-tempfile,v 1.1 2010/01/13 01:41:02 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: setup-tempfile,v 1.3 2012/07/06 17:51:56 tom Exp $
|
||||
# vile:shmode
|
||||
|
||||
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
|
||||
trap "rm -f $tempfile" 0 1 2 5 15
|
||||
tempfile=`(tempfile) 2>/dev/null` || tempfile=/tmp/test$$
|
||||
trap "rm -f $tempfile" 0 $SIG_NONE $SIG_HUP $SIG_INT $SIG_TRAP $SIG_TERM
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: setup-utf8,v 1.1 2010/01/13 01:51:44 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: setup-utf8,v 1.2 2012/06/29 09:50:32 tom Exp $
|
||||
# vile:shmode
|
||||
|
||||
case none"$LANG$LC_ALL$LC_CTYPE" in
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $Id: setup-vars,v 1.2 2011/01/04 00:21:43 tom Exp $
|
||||
#!/bin/sh
|
||||
# $Id: setup-vars,v 1.3 2012/06/29 09:52:26 tom Exp $
|
||||
# vile:shmode
|
||||
|
||||
# These symbols are defined to use in the sample shell scripts to make them
|
||||
@ -13,3 +14,10 @@
|
||||
: ${DIALOG_EXTRA=3}
|
||||
: ${DIALOG_ITEM_HELP=4}
|
||||
: ${DIALOG_ESC=255}
|
||||
|
||||
: ${SIG_NONE=0}
|
||||
: ${SIG_HUP=1}
|
||||
: ${SIG_INT=2}
|
||||
: ${SIG_QUIT=3}
|
||||
: ${SIG_KILL=9}
|
||||
: ${SIG_TERM=15}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: slackware.rc,v 1.7 2011/01/17 00:14:41 tom Exp $
|
||||
# $Id: slackware.rc,v 1.9 2011/10/15 01:00:25 tom Exp $
|
||||
# vile:confmode
|
||||
# Run-time configuration file for dialog, matches Slackware color scheme.
|
||||
#
|
||||
@ -46,16 +46,16 @@ border_color = (CYAN,CYAN,ON)
|
||||
button_active_color = (WHITE,BLUE,ON)
|
||||
|
||||
# Inactive button color
|
||||
button_inactive_color = (BLACK,CYAN,OFF)
|
||||
button_inactive_color = dialog_color
|
||||
|
||||
# Active button key color
|
||||
button_key_active_color = (WHITE,BLUE,ON)
|
||||
button_key_active_color = button_active_color
|
||||
|
||||
# Inactive button key color
|
||||
button_key_inactive_color = (RED,CYAN,OFF)
|
||||
|
||||
# Active button label color
|
||||
button_label_active_color = (WHITE,BLUE,ON)
|
||||
button_label_active_color = button_active_color
|
||||
|
||||
# Inactive button label color
|
||||
button_label_inactive_color = (BLACK,CYAN,ON)
|
||||
@ -64,47 +64,46 @@ button_label_inactive_color = (BLACK,CYAN,ON)
|
||||
inputbox_color = (BLUE,WHITE,OFF)
|
||||
|
||||
# Input box border color
|
||||
inputbox_border_color = (CYAN,CYAN,ON)
|
||||
inputbox_border_color = border_color
|
||||
|
||||
# Search box color
|
||||
searchbox_color = (YELLOW,WHITE,ON)
|
||||
|
||||
# Search box title color
|
||||
# FIXME
|
||||
searchbox_title_color = (WHITE,WHITE,ON)
|
||||
|
||||
# Search box border color
|
||||
searchbox_border_color = (RED,WHITE,OFF)
|
||||
|
||||
# File position indicator color
|
||||
position_indicator_color = (RED,CYAN,OFF)
|
||||
position_indicator_color = button_key_inactive_color
|
||||
|
||||
# Menu box color
|
||||
menubox_color = (BLACK,CYAN,OFF)
|
||||
menubox_color = dialog_color
|
||||
|
||||
# Menu box border color
|
||||
menubox_border_color = (CYAN,CYAN,ON)
|
||||
menubox_border_color = border_color
|
||||
|
||||
# Item color
|
||||
item_color = (BLACK,CYAN,OFF)
|
||||
item_color = dialog_color
|
||||
|
||||
# Selected item color
|
||||
item_selected_color = (WHITE,BLUE,OFF)
|
||||
item_selected_color = screen_color
|
||||
|
||||
# Tag color
|
||||
tag_color = (YELLOW,CYAN,ON)
|
||||
tag_color = title_color
|
||||
|
||||
# Selected tag color
|
||||
tag_selected_color = (WHITE,BLUE,OFF)
|
||||
tag_selected_color = screen_color
|
||||
|
||||
# Tag key color
|
||||
tag_key_color = (RED,CYAN,OFF)
|
||||
tag_key_color = button_key_inactive_color
|
||||
|
||||
# Selected tag key color
|
||||
tag_key_selected_color = (RED,BLUE,ON)
|
||||
|
||||
# Check box color
|
||||
check_color = (BLACK,CYAN,OFF)
|
||||
check_color = dialog_color
|
||||
|
||||
# Selected check box color
|
||||
check_selected_color = (WHITE,CYAN,ON)
|
||||
@ -113,13 +112,13 @@ check_selected_color = (WHITE,CYAN,ON)
|
||||
uarrow_color = (GREEN,CYAN,ON)
|
||||
|
||||
# Down arrow color
|
||||
darrow_color = (GREEN,CYAN,ON)
|
||||
darrow_color = uarrow_color
|
||||
|
||||
# Item help-text color
|
||||
itemhelp_color = (WHITE,BLACK,OFF)
|
||||
itemhelp_color = shadow_color
|
||||
|
||||
# Active form text color
|
||||
form_active_text_color = (BLUE,WHITE,OFF)
|
||||
form_active_text_color = inputbox_color
|
||||
|
||||
# Form text color
|
||||
form_text_color = (CYAN,BLUE,ON)
|
||||
@ -129,3 +128,15 @@ form_item_readonly_color = (CYAN,WHITE,ON)
|
||||
|
||||
# Dialog box gauge color
|
||||
gauge_color = (BLUE,WHITE,ON)
|
||||
|
||||
# Dialog box border2 color
|
||||
border2_color = (BLACK,WHITE,OFF)
|
||||
|
||||
# Input box border2 color
|
||||
inputbox_border2_color = border2_color
|
||||
|
||||
# Search box border2 color
|
||||
searchbox_border2_color = border2_color
|
||||
|
||||
# Menu box border2 color
|
||||
menubox_border2_color = border2_color
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: sourcemage.rc,v 1.4 2011/01/17 00:14:25 tom Exp $
|
||||
# $Id: sourcemage.rc,v 1.6 2011/10/15 01:00:41 tom Exp $
|
||||
# vile:confmode
|
||||
# Run-time configuration file for dialog, matches SourceMage color scheme.
|
||||
#
|
||||
@ -46,10 +46,10 @@ border_color = (WHITE,WHITE,ON)
|
||||
button_active_color = (WHITE,RED,ON)
|
||||
|
||||
# Inactive button color
|
||||
button_inactive_color = (BLACK,WHITE,OFF)
|
||||
button_inactive_color = dialog_color
|
||||
|
||||
# Active button key color
|
||||
button_key_active_color = (WHITE,RED,ON)
|
||||
button_key_active_color = button_active_color
|
||||
|
||||
# Inactive button key color
|
||||
button_key_inactive_color = (RED,WHITE,OFF)
|
||||
@ -61,70 +61,82 @@ button_label_active_color = (RED,RED,ON)
|
||||
button_label_inactive_color = (BLACK,WHITE,ON)
|
||||
|
||||
# Input box color
|
||||
inputbox_color = (BLACK,WHITE,OFF)
|
||||
inputbox_color = dialog_color
|
||||
|
||||
# Input box border color
|
||||
inputbox_border_color = (BLACK,WHITE,OFF)
|
||||
inputbox_border_color = dialog_color
|
||||
|
||||
# Search box color
|
||||
searchbox_color = (BLACK,WHITE,OFF)
|
||||
searchbox_color = dialog_color
|
||||
|
||||
# Search box title color
|
||||
searchbox_title_color = (RED,WHITE,ON)
|
||||
searchbox_title_color = title_color
|
||||
|
||||
# Search box border color
|
||||
searchbox_border_color = (WHITE,WHITE,ON)
|
||||
searchbox_border_color = border_color
|
||||
|
||||
# File position indicator color
|
||||
position_indicator_color = (RED,WHITE,ON)
|
||||
position_indicator_color = title_color
|
||||
|
||||
# Menu box color
|
||||
menubox_color = (BLACK,WHITE,OFF)
|
||||
menubox_color = dialog_color
|
||||
|
||||
# Menu box border color
|
||||
menubox_border_color = (WHITE,WHITE,ON)
|
||||
menubox_border_color = border_color
|
||||
|
||||
# Item color
|
||||
item_color = (BLACK,WHITE,OFF)
|
||||
item_color = dialog_color
|
||||
|
||||
# Selected item color
|
||||
item_selected_color = (WHITE,RED,ON)
|
||||
item_selected_color = button_active_color
|
||||
|
||||
# Tag color
|
||||
tag_color = (RED,WHITE,ON)
|
||||
tag_color = title_color
|
||||
|
||||
# Selected tag color
|
||||
tag_selected_color = (RED,RED,ON)
|
||||
tag_selected_color = button_label_active_color
|
||||
|
||||
# Tag key color
|
||||
tag_key_color = (RED,WHITE,ON)
|
||||
tag_key_color = title_color
|
||||
|
||||
# Selected tag key color
|
||||
tag_key_selected_color = (WHITE,RED,ON)
|
||||
tag_key_selected_color = button_active_color
|
||||
|
||||
# Check box color
|
||||
check_color = (BLACK,WHITE,OFF)
|
||||
check_color = dialog_color
|
||||
|
||||
# Selected check box color
|
||||
check_selected_color = (WHITE,RED,ON)
|
||||
check_selected_color = button_active_color
|
||||
|
||||
# Up arrow color
|
||||
uarrow_color = (RED,WHITE,ON)
|
||||
uarrow_color = title_color
|
||||
|
||||
# Down arrow color
|
||||
darrow_color = (RED,WHITE,ON)
|
||||
darrow_color = title_color
|
||||
|
||||
# Item help-text color
|
||||
itemhelp_color = (WHITE,BLACK,OFF)
|
||||
|
||||
# Active form text color
|
||||
form_active_text_color = (BLACK,WHITE,OFF)
|
||||
form_active_text_color = dialog_color
|
||||
|
||||
# Form text color
|
||||
form_text_color = (RED,BLACK,ON)
|
||||
form_text_color = screen_color
|
||||
|
||||
# Readonly form item color
|
||||
form_item_readonly_color = (CYAN,WHITE,ON)
|
||||
|
||||
# Dialog box gauge color
|
||||
gauge_color = (BLUE,WHITE,ON)
|
||||
|
||||
# Dialog box border2 color
|
||||
border2_color = dialog_color
|
||||
|
||||
# Input box border2 color
|
||||
inputbox_border2_color = dialog_color
|
||||
|
||||
# Search box border2 color
|
||||
searchbox_border2_color = dialog_color
|
||||
|
||||
# Menu box border2 color
|
||||
menubox_border2_color = dialog_color
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: suse.rc,v 1.3 2011/01/17 00:15:27 tom Exp $
|
||||
# $Id: suse.rc,v 1.5 2011/10/15 01:01:00 tom Exp $
|
||||
# vile:confmode
|
||||
# Run-time configuration file for dialog, matches SuSE color scheme.
|
||||
#
|
||||
@ -46,10 +46,10 @@ border_color = (WHITE,WHITE,ON)
|
||||
button_active_color = (WHITE,BLUE,ON)
|
||||
|
||||
# Inactive button color
|
||||
button_inactive_color = (BLACK,WHITE,OFF)
|
||||
button_inactive_color = dialog_color
|
||||
|
||||
# Active button key color
|
||||
button_key_active_color = (WHITE,BLUE,ON)
|
||||
button_key_active_color = button_active_color
|
||||
|
||||
# Inactive button key color
|
||||
button_key_inactive_color = (RED,WHITE,OFF)
|
||||
@ -61,64 +61,64 @@ button_label_active_color = (YELLOW,BLUE,ON)
|
||||
button_label_inactive_color = (BLACK,WHITE,ON)
|
||||
|
||||
# Input box color
|
||||
inputbox_color = (BLACK,WHITE,OFF)
|
||||
inputbox_color = dialog_color
|
||||
|
||||
# Input box border color
|
||||
inputbox_border_color = (BLACK,WHITE,OFF)
|
||||
inputbox_border_color = dialog_color
|
||||
|
||||
# Search box color
|
||||
searchbox_color = (BLACK,WHITE,OFF)
|
||||
searchbox_color = dialog_color
|
||||
|
||||
# Search box title color
|
||||
searchbox_title_color = (YELLOW,WHITE,ON)
|
||||
searchbox_title_color = title_color
|
||||
|
||||
# Search box border color
|
||||
searchbox_border_color = (WHITE,WHITE,ON)
|
||||
searchbox_border_color = border_color
|
||||
|
||||
# File position indicator color
|
||||
position_indicator_color = (YELLOW,WHITE,ON)
|
||||
position_indicator_color = title_color
|
||||
|
||||
# Menu box color
|
||||
menubox_color = (BLACK,WHITE,OFF)
|
||||
menubox_color = dialog_color
|
||||
|
||||
# Menu box border color
|
||||
menubox_border_color = (WHITE,WHITE,ON)
|
||||
menubox_border_color = border_color
|
||||
|
||||
# Item color
|
||||
item_color = (BLACK,WHITE,OFF)
|
||||
item_color = dialog_color
|
||||
|
||||
# Selected item color
|
||||
item_selected_color = (WHITE,BLUE,ON)
|
||||
item_selected_color = button_active_color
|
||||
|
||||
# Tag color
|
||||
tag_color = (YELLOW,WHITE,ON)
|
||||
tag_color = title_color
|
||||
|
||||
# Selected tag color
|
||||
tag_selected_color = (YELLOW,BLUE,ON)
|
||||
tag_selected_color = button_label_active_color
|
||||
|
||||
# Tag key color
|
||||
tag_key_color = (RED,WHITE,OFF)
|
||||
tag_key_color = button_key_inactive_color
|
||||
|
||||
# Selected tag key color
|
||||
tag_key_selected_color = (RED,BLUE,ON)
|
||||
|
||||
# Check box color
|
||||
check_color = (BLACK,WHITE,OFF)
|
||||
check_color = dialog_color
|
||||
|
||||
# Selected check box color
|
||||
check_selected_color = (WHITE,BLUE,ON)
|
||||
check_selected_color = button_active_color
|
||||
|
||||
# Up arrow color
|
||||
uarrow_color = (GREEN,WHITE,ON)
|
||||
|
||||
# Down arrow color
|
||||
darrow_color = (GREEN,WHITE,ON)
|
||||
darrow_color = uarrow_color
|
||||
|
||||
# Item help-text color
|
||||
itemhelp_color = (WHITE,BLACK,OFF)
|
||||
|
||||
# Active form text color
|
||||
form_active_text_color = (WHITE,BLUE,ON)
|
||||
form_active_text_color = button_active_color
|
||||
|
||||
# Form text color
|
||||
form_text_color = (WHITE,CYAN,ON)
|
||||
@ -128,3 +128,15 @@ form_item_readonly_color = (CYAN,WHITE,ON)
|
||||
|
||||
# Dialog box gauge color
|
||||
gauge_color = (BLUE,WHITE,ON)
|
||||
|
||||
# Dialog box border2 color
|
||||
border2_color = dialog_color
|
||||
|
||||
# Input box border2 color
|
||||
inputbox_border2_color = dialog_color
|
||||
|
||||
# Search box border2 color
|
||||
searchbox_border2_color = dialog_color
|
||||
|
||||
# Menu box border2 color
|
||||
menubox_border2_color = dialog_color
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: tailboxbg,v 1.9 2010/01/13 10:20:03 tom Exp $
|
||||
# $Id: tailboxbg,v 1.10 2012/06/29 09:48:28 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
@ -16,7 +16,7 @@ $DIALOG --title "TAIL BOX" \
|
||||
sleep 10
|
||||
|
||||
# now kill it
|
||||
kill -3 `cat $tempfile` 2>&1 >/dev/null 2>/dev/null
|
||||
kill -$SIG_QUIT `cat $tempfile` 2>&1 >/dev/null 2>/dev/null
|
||||
|
||||
# ...and the process that is making the listing
|
||||
./killall listing
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: tailboxbg1,v 1.9 2010/01/13 10:20:03 tom Exp $
|
||||
# $Id: tailboxbg1,v 1.10 2012/06/29 09:51:46 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
@ -24,7 +24,7 @@ if test -n "$pid" ; then
|
||||
sleep 10
|
||||
|
||||
# now kill it
|
||||
kill -3 $pid 2>&1 >/dev/null 2>/dev/null
|
||||
kill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null
|
||||
echo "killed [$pid]"
|
||||
fi
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: tailboxbg2,v 1.9 2010/01/13 10:20:03 tom Exp $
|
||||
# $Id: tailboxbg2,v 1.10 2012/06/29 09:51:11 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
@ -25,7 +25,7 @@ if test -n "$pid" ; then
|
||||
sleep 10
|
||||
|
||||
# now kill it
|
||||
kill -3 $pid 2>&1 >/dev/null 2>/dev/null
|
||||
kill -$SIG_QUIT $pid 2>&1 >/dev/null 2>/dev/null
|
||||
echo "killed [$pid]"
|
||||
fi
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: testdata-8bit,v 1.1 2004/12/19 16:19:12 tom Exp $
|
||||
# $Id: testdata-8bit,v 1.2 2011/10/16 23:26:32 tom Exp $
|
||||
|
||||
# Select one of the "SAMPLE=" lines, to test handling of characters which
|
||||
# are nonprinting in a POSIX locale:
|
||||
@ -37,3 +37,12 @@ case .$1 in
|
||||
SAMPLE=""
|
||||
;;
|
||||
esac
|
||||
|
||||
# This script is source'd from other scripts, and uses the parameter list from
|
||||
# those explicitly. But they may use the parameter list later, to set options
|
||||
# specially for dialog. Work around the conflicting uses by removing the
|
||||
# parameter which we just used to select a set of data.
|
||||
if test $# != 0
|
||||
then
|
||||
shift 1
|
||||
fi
|
||||
|
@ -1,847 +0,0 @@
|
||||
==23273== Memcheck, a memory error detector.
|
||||
==23273== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
|
||||
==23273== Using LibVEX rev 1854, a library for dynamic binary translation.
|
||||
==23273== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
|
||||
==23273== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
|
||||
==23273== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
|
||||
==23273==
|
||||
--23273-- Command line
|
||||
--23273-- /usr/build/dialog/dialog-1.1-20110707/dialog
|
||||
--23273-- --title
|
||||
--23273-- YES/NO BOX
|
||||
--23273-- --clear
|
||||
--23273-- --yesno
|
||||
--23273-- Hi, this is a yes/no dialog box. You can use this to ask questions that have an answer of either yes or no. BTW, do you notice that long lines will be automatically wrapped around so that they can fit in the box? You can also control line breaking explicitly by inserting 'backslash n' at any place you like, but in this case, auto wrap around will be disabled and you will have to control line breaking yourself.
|
||||
--23273-- 15
|
||||
--23273-- 61
|
||||
--23273-- Startup, with flags:
|
||||
--23273-- --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
|
||||
--23273-- -v
|
||||
--23273-- --num-callers=10
|
||||
--23273-- --error-limit=no
|
||||
--23273-- --show-reachable=yes
|
||||
--23273-- --leak-resolution=high
|
||||
--23273-- --leak-check=yes
|
||||
--23273-- --show-reachable=yes
|
||||
--23273-- --log-fd=2
|
||||
--23273-- Contents of /proc/version:
|
||||
--23273-- Linux version 2.6.26-2-686 (Debian 2.6.26-26lenny3) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Sat Jun 11 14:54:10 UTC 2011
|
||||
--23273-- Arch and hwcaps: X86, x86-sse1-sse2
|
||||
--23273-- Page sizes: currently 4096, max supported 4096
|
||||
--23273-- Valgrind library directory: /usr/lib/valgrind
|
||||
--23273-- Reading syms from /lib/ld-2.7.so (0x4000000)
|
||||
--23273-- Reading debug info from /lib/ld-2.7.so...
|
||||
--23273-- ... CRC mismatch (computed 0f4d8d49 wanted a869dbba)
|
||||
--23273-- Reading debug info from /usr/lib/debug/lib/ld-2.7.so...
|
||||
--23273-- Reading syms from /usr/build/dialog/dialog-1.1-20110707/dialog (0x8048000)
|
||||
--23273-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
|
||||
--23273-- object doesn't have a dynamic symbol table
|
||||
--23273-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp
|
||||
--23273-- Reading suppressions file: /usr/lib/valgrind/default.supp
|
||||
--23273-- REDIR: 0x4015500 (index) redirected to 0x3802cf43 (vgPlain_x86_linux_REDIR_FOR_index)
|
||||
--23273-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x401E000)
|
||||
--23273-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4020000)
|
||||
==23273== WARNING: new redirection conflicts with existing -- ignoring it
|
||||
--23273-- new: 0x04015500 (index ) R-> 0x040241e0 index
|
||||
--23273-- REDIR: 0x40156f0 (strlen) redirected to 0x4024490 (strlen)
|
||||
--23273-- Reading syms from /usr/lib/debug/libm-2.7.so (0x4027000)
|
||||
--23273-- Reading syms from /usr/lib/debug/libc-2.7.so (0x404D000)
|
||||
--23273-- REDIR: 0x40beaf0 (rindex) redirected to 0x40240c0 (rindex)
|
||||
--23273-- REDIR: 0x40bf760 (memset) redirected to 0x4025380 (memset)
|
||||
--23273-- REDIR: 0x40be160 (strcmp) redirected to 0x4024770 (strcmp)
|
||||
--23273-- REDIR: 0x40be700 (strlen) redirected to 0x4024470 (strlen)
|
||||
--23273-- REDIR: 0x40be910 (strncmp) redirected to 0x40246e0 (strncmp)
|
||||
--23273-- REDIR: 0x40bdff0 (index) redirected to 0x40241b0 (index)
|
||||
--23273-- REDIR: 0x40b9740 (free) redirected to 0x4022ad0 (free)
|
||||
--23273-- REDIR: 0x40bb2c0 (calloc) redirected to 0x4021d60 (calloc)
|
||||
--23273-- REDIR: 0x40c07e0 (strchrnul) redirected to 0x4025450 (strchrnul)
|
||||
--23273-- REDIR: 0x40bb5e0 (malloc) redirected to 0x4023cb0 (malloc)
|
||||
--23273-- REDIR: 0x40bfc80 (memcpy) redirected to 0x40248e0 (memcpy)
|
||||
--23273-- REDIR: 0x40be7b0 (strnlen) redirected to 0x4024430 (strnlen)
|
||||
--23273-- REDIR: 0x40bf7c0 (mempcpy) redirected to 0x40254b0 (mempcpy)
|
||||
--23273-- REDIR: 0x40be1f0 (strcpy) redirected to 0x40244d0 (strcpy)
|
||||
--23273-- REDIR: 0x40bba60 (realloc) redirected to 0x4023dc0 (realloc)
|
||||
--23273-- REDIR: 0x40bea20 (strncpy) redirected to 0x40245a0 (strncpy)
|
||||
--23273-- REDIR: 0x40bf690 (bcmp) redirected to 0x4025070 (bcmp)
|
||||
--23273-- REDIR: 0x40bde40 (strcat) redirected to 0x4024240 (strcat)
|
||||
==23273==
|
||||
==23273== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 14 from 1)
|
||||
--23273--
|
||||
--23273-- supp: 14 dl-hack3-cond-1
|
||||
==23273== malloc/free: in use at exit: 72,482 bytes in 382 blocks.
|
||||
==23273== malloc/free: 419 allocs, 37 frees, 79,695 bytes allocated.
|
||||
==23273==
|
||||
==23273== searching for pointers to 382 not-freed blocks.
|
||||
==23273== checked 149,580 bytes.
|
||||
==23273==
|
||||
==23273== 6 bytes in 1 blocks are still reachable in loss record 1 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
|
||||
==23273== by 0x8059BBE: print_button (buttons.c:97)
|
||||
==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 6 bytes in 1 blocks are still reachable in loss record 2 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 7 bytes in 2 blocks are still reachable in loss record 3 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
|
||||
==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
|
||||
==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
|
||||
==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 11 bytes in 1 blocks are still reachable in loss record 4 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8067711: real_auto_size (util.c:1101)
|
||||
==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
|
||||
==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 12 bytes in 1 blocks are still reachable in loss record 5 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x807F18F: _nc_add_to_try (add_tries.c:90)
|
||||
==23273== by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
|
||||
==23273== by 0x80807F4: _nc_keypad (lib_options.c:262)
|
||||
==23273== by 0x808035F: keypad (lib_options.c:129)
|
||||
==23273== by 0x8066340: init_dialog (util.c:330)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 16 bytes in 1 blocks are still reachable in loss record 6 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 16 bytes in 1 blocks are still reachable in loss record 7 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
|
||||
==23273== by 0x8059BBE: print_button (buttons.c:97)
|
||||
==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 16 bytes in 1 blocks are still reachable in loss record 8 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 16 bytes in 1 blocks are still reachable in loss record 9 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8067711: real_auto_size (util.c:1101)
|
||||
==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
|
||||
==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 16 bytes in 1 blocks are still reachable in loss record 10 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x807F2D5: _nc_doalloc (doalloc.c:55)
|
||||
==23273== by 0x8086167: _nc_trace_alloc (trace_buf.c:55)
|
||||
==23273== by 0x8086261: _nc_trace_buf (trace_buf.c:90)
|
||||
==23273== by 0x80864A7: _nc_visbuf2n (visbuf.c:94)
|
||||
==23273== by 0x8086538: _nc_visbuf2 (visbuf.c:114)
|
||||
==23273== by 0x8086553: _nc_visbuf (visbuf.c:120)
|
||||
==23273== by 0x8088693: recur_tries (trace_tries.c:55)
|
||||
==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
|
||||
==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 21 bytes in 1 blocks are still reachable in loss record 11 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x40BE45F: strdup (strdup.c:43)
|
||||
==23273== by 0x8081EE0: setupterm (lib_setup.c:471)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 23 bytes in 1 blocks are still reachable in loss record 12 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8088526: _nc_home_terminfo (home_terminfo.c:57)
|
||||
==23273== by 0x8085E1B: _nc_read_entry (read_entry.c:492)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 24 bytes in 1 blocks are still reachable in loss record 13 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
|
||||
==23273== by 0x8059BBE: print_button (buttons.c:97)
|
||||
==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 24 bytes in 1 blocks are still reachable in loss record 14 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 28 bytes in 1 blocks are still reachable in loss record 15 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 28 bytes in 1 blocks are still reachable in loss record 16 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
|
||||
==23273== by 0x8059BBE: print_button (buttons.c:97)
|
||||
==23273== by 0x805A265: dlg_draw_buttons (buttons.c:297)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 28 bytes in 1 blocks are still reachable in loss record 17 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
|
||||
==23273== by 0x806A2D0: dialog_yesno (yesno.c:98)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 28 bytes in 1 blocks are still reachable in loss record 18 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8067711: real_auto_size (util.c:1101)
|
||||
==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
|
||||
==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 28 bytes in 2 blocks are still reachable in loss record 19 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
|
||||
==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
|
||||
==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
|
||||
==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 32 bytes in 2 blocks are still reachable in loss record 20 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
|
||||
==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
|
||||
==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
|
||||
==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 33 bytes in 1 blocks are still reachable in loss record 21 of 62
|
||||
==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
|
||||
==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
|
||||
==23273== by 0x808620A: _nc_trace_alloc (trace_buf.c:63)
|
||||
==23273== by 0x8086261: _nc_trace_buf (trace_buf.c:90)
|
||||
==23273== by 0x80864A7: _nc_visbuf2n (visbuf.c:94)
|
||||
==23273== by 0x8086538: _nc_visbuf2 (visbuf.c:114)
|
||||
==23273== by 0x8086553: _nc_visbuf (visbuf.c:120)
|
||||
==23273== by 0x8088693: recur_tries (trace_tries.c:55)
|
||||
==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
|
||||
==23273== by 0x80886D7: recur_tries (trace_tries.c:59)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 44 bytes in 1 blocks are still reachable in loss record 22 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8067711: real_auto_size (util.c:1101)
|
||||
==23273== by 0x8067A1F: dlg_auto_size (util.c:1167)
|
||||
==23273== by 0x806A14E: dialog_yesno (yesno.c:72)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 47 bytes in 1 blocks are still reachable in loss record 23 of 62
|
||||
==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
|
||||
==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
|
||||
==23273== by 0x8085368: read_termtype (read_entry.c:283)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 55 bytes in 1 blocks are still reachable in loss record 24 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8084EC3: read_termtype (read_entry.c:207)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 56 bytes in 2 blocks are still reachable in loss record 25 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8059E3A: dlg_button_sizes (buttons.c:179)
|
||||
==23273== by 0x8059F04: dlg_button_x_step (buttons.c:209)
|
||||
==23273== by 0x805A02F: dlg_button_layout (buttons.c:234)
|
||||
==23273== by 0x806A11F: dialog_yesno (yesno.c:71)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 66 bytes in 1 blocks are still reachable in loss record 26 of 62
|
||||
==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
|
||||
==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
|
||||
==23273== by 0x808238C: get_space (lib_tparm.c:155)
|
||||
==23273== by 0x8082443: save_number (lib_tparm.c:180)
|
||||
==23273== by 0x8082D8B: tparam_internal (lib_tparm.c:564)
|
||||
==23273== by 0x80833C4: tparm (lib_tparm.c:788)
|
||||
==23273== by 0x80704CF: _nc_mvcur_init (lib_mvcur.c:358)
|
||||
==23273== by 0x8072684: newterm (lib_newterm.c:191)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 80 bytes in 1 blocks are still reachable in loss record 27 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8072E08: _nc_makenew (lib_newwin.c:218)
|
||||
==23273== by 0x807299B: newwin (lib_newwin.c:126)
|
||||
==23273== by 0x8074F9A: _nc_setupscreen (lib_set_term.c:459)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 80 bytes in 1 blocks are still reachable in loss record 28 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8072E08: _nc_makenew (lib_newwin.c:218)
|
||||
==23273== by 0x807299B: newwin (lib_newwin.c:126)
|
||||
==23273== by 0x8074CB3: _nc_setupscreen (lib_set_term.c:414)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 80 bytes in 1 blocks are still reachable in loss record 29 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8072E08: _nc_makenew (lib_newwin.c:218)
|
||||
==23273== by 0x807299B: newwin (lib_newwin.c:126)
|
||||
==23273== by 0x8074C55: _nc_setupscreen (lib_set_term.c:410)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 80 bytes in 1 blocks are still reachable in loss record 30 of 62
|
||||
==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
|
||||
==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
|
||||
==23273== by 0x808538F: read_termtype (read_entry.c:284)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 112 bytes in 7 blocks are still reachable in loss record 31 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8066A0A: dlg_print_line (util.c:668)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 118 bytes in 1 blocks are still reachable in loss record 32 of 62
|
||||
==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
|
||||
==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
|
||||
==23273== by 0x8082957: _nc_tparm_analyze (lib_tparm.c:374)
|
||||
==23273== by 0x8082B5E: tparam_internal (lib_tparm.c:502)
|
||||
==23273== by 0x80833C4: tparm (lib_tparm.c:788)
|
||||
==23273== by 0x80782E6: vidputs (lib_vidattr.c:187)
|
||||
==23273== by 0x8078B59: vidattr (lib_vidattr.c:270)
|
||||
==23273== by 0x807ACE8: ClrToEOS (tty_update.c:957)
|
||||
==23273== by 0x807AF54: ClrBottom (tty_update.c:1006)
|
||||
==23273== by 0x807AB1C: ClrUpdate (tty_update.c:897)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 128 bytes in 8 blocks are still reachable in loss record 33 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x41165D0: tsearch (tsearch.c:281)
|
||||
==23273== by 0x805FC92: make_cache (inputstr.c:149)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
|
||||
==23273== by 0x8066A18: dlg_print_line (util.c:669)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 128 bytes in 1 blocks are still reachable in loss record 34 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x806BDE0: start_color (lib_color.c:238)
|
||||
==23273== by 0x80663B1: dlg_color_setup (util.c:360)
|
||||
==23273== by 0x806638E: init_dialog (util.c:342)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 128 bytes in 1 blocks are still reachable in loss record 35 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x806BDA7: start_color (lib_color.c:236)
|
||||
==23273== by 0x80663B1: dlg_color_setup (util.c:360)
|
||||
==23273== by 0x806638E: init_dialog (util.c:342)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 160 bytes in 1 blocks are still reachable in loss record 36 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8087176: _nc_hash_map (hashmap.c:299)
|
||||
==23273== by 0x80865F4: _nc_scroll_optimize (hardscroll.c:199)
|
||||
==23273== by 0x807A762: doupdate (tty_update.c:778)
|
||||
==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
|
||||
==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
|
||||
==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
|
||||
==23273== by 0x80654FC: really_getch (ui_getc.c:352)
|
||||
==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
|
||||
==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 160 bytes in 1 blocks are still reachable in loss record 37 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8087141: _nc_hash_map (hashmap.c:297)
|
||||
==23273== by 0x80865F4: _nc_scroll_optimize (hardscroll.c:199)
|
||||
==23273== by 0x807A762: doupdate (tty_update.c:778)
|
||||
==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
|
||||
==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
|
||||
==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
|
||||
==23273== by 0x80654FC: really_getch (ui_getc.c:352)
|
||||
==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
|
||||
==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 160 bytes in 1 blocks are still reachable in loss record 38 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x807F2D5: _nc_doalloc (doalloc.c:55)
|
||||
==23273== by 0x80865CB: _nc_scroll_optimize (hardscroll.c:192)
|
||||
==23273== by 0x807A762: doupdate (tty_update.c:778)
|
||||
==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
|
||||
==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
|
||||
==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
|
||||
==23273== by 0x80654FC: really_getch (ui_getc.c:352)
|
||||
==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
|
||||
==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 172 bytes in 1 blocks are still reachable in loss record 39 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8081CD7: setupterm (lib_setup.c:431)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 196 bytes in 7 blocks are still reachable in loss record 40 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FFB4: dlg_index_columns (inputstr.c:396)
|
||||
==23273== by 0x8066A0A: dlg_print_line (util.c:668)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 224 bytes in 8 blocks are still reachable in loss record 41 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x805FC0F: make_cache (inputstr.c:139)
|
||||
==23273== by 0x805FCF7: load_cache (inputstr.c:161)
|
||||
==23273== by 0x805FECD: dlg_index_wchars (inputstr.c:341)
|
||||
==23273== by 0x8066A18: dlg_print_line (util.c:669)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 252 bytes in 1 blocks are still reachable in loss record 42 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x80858B3: read_termtype (read_entry.c:345)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 421 bytes in 1 blocks are still reachable in loss record 43 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 480 bytes in 1 blocks are still reachable in loss record 44 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8072E36: _nc_makenew (lib_newwin.c:223)
|
||||
==23273== by 0x807299B: newwin (lib_newwin.c:126)
|
||||
==23273== by 0x8074F9A: _nc_setupscreen (lib_set_term.c:459)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 480 bytes in 1 blocks are still reachable in loss record 45 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8072E36: _nc_makenew (lib_newwin.c:223)
|
||||
==23273== by 0x807299B: newwin (lib_newwin.c:126)
|
||||
==23273== by 0x8074CB3: _nc_setupscreen (lib_set_term.c:414)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 480 bytes in 1 blocks are still reachable in loss record 46 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x8072E36: _nc_makenew (lib_newwin.c:223)
|
||||
==23273== by 0x807299B: newwin (lib_newwin.c:126)
|
||||
==23273== by 0x8074C55: _nc_setupscreen (lib_set_term.c:410)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 689 bytes in 1 blocks are still reachable in loss record 47 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8085659: read_termtype (read_entry.c:318)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 780 bytes in 65 blocks are still reachable in loss record 48 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x807F1FF: _nc_add_to_try (add_tries.c:104)
|
||||
==23273== by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
|
||||
==23273== by 0x80807F4: _nc_keypad (lib_options.c:262)
|
||||
==23273== by 0x808035F: keypad (lib_options.c:129)
|
||||
==23273== by 0x8066340: init_dialog (util.c:330)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,008 bytes in 84 blocks are still reachable in loss record 49 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x807F119: _nc_add_to_try (add_tries.c:77)
|
||||
==23273== by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
|
||||
==23273== by 0x80807F4: _nc_keypad (lib_options.c:262)
|
||||
==23273== by 0x808035F: keypad (lib_options.c:129)
|
||||
==23273== by 0x8066340: init_dialog (util.c:330)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,338 bytes in 1 blocks are still reachable in loss record 50 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8084DF7: read_termtype (read_entry.c:193)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,382 bytes in 7 blocks are still reachable in loss record 51 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8066A0A: dlg_print_line (util.c:668)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,520 bytes in 1 blocks are still reachable in loss record 52 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x80747CF: _nc_setupscreen (lib_set_term.c:221)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,640 bytes in 1 blocks are still reachable in loss record 53 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8087007: _nc_hash_map (hashmap.c:277)
|
||||
==23273== by 0x80865F4: _nc_scroll_optimize (hardscroll.c:199)
|
||||
==23273== by 0x807A762: doupdate (tty_update.c:778)
|
||||
==23273== by 0x8073C0A: wrefresh (lib_refresh.c:58)
|
||||
==23273== by 0x806D95D: _nc_wgetch (lib_getch.c:295)
|
||||
==23273== by 0x806DD0D: wgetch (lib_getch.c:467)
|
||||
==23273== by 0x80654FC: really_getch (ui_getc.c:352)
|
||||
==23273== by 0x806566B: dlg_getc (ui_getc.c:423)
|
||||
==23273== by 0x80627C4: mouse_wgetch (mousewget.c:35)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,684 bytes in 1 blocks are still reachable in loss record 54 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8060166: dlg_count_columns (inputstr.c:473)
|
||||
==23273== by 0x8066FD3: dlg_print_scrolled (util.c:886)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,803 bytes in 8 blocks are still reachable in loss record 55 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8068E64: dlg_strclone (util.c:1740)
|
||||
==23273== by 0x805FE72: same_cache2 (inputstr.c:212)
|
||||
==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
|
||||
==23273== by 0x8066A18: dlg_print_line (util.c:669)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 1,892 bytes in 1 blocks are still reachable in loss record 56 of 62
|
||||
==23273== at 0x4023E8C: realloc (vg_replace_malloc.c:429)
|
||||
==23273== by 0x807F2A9: _nc_doalloc (doalloc.c:50)
|
||||
==23273== by 0x80853BA: read_termtype (read_entry.c:285)
|
||||
==23273== by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
|
||||
==23273== by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
|
||||
==23273== by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
|
||||
==23273== by 0x8085E90: _nc_read_entry (read_entry.c:500)
|
||||
==23273== by 0x8081834: grab_entry (lib_setup.c:255)
|
||||
==23273== by 0x8081D46: setupterm (lib_setup.c:438)
|
||||
==23273== by 0x8072292: newterm (lib_newterm.c:115)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 2,800 bytes in 1 blocks are still reachable in loss record 57 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x8085F59: _nc_set_buffer (setbuf.c:119)
|
||||
==23273== by 0x807481F: _nc_setupscreen (lib_set_term.c:232)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 5,528 bytes in 7 blocks are still reachable in loss record 58 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FFCE: dlg_index_columns (inputstr.c:397)
|
||||
==23273== by 0x8066A0A: dlg_print_line (util.c:668)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 7,212 bytes in 8 blocks are still reachable in loss record 59 of 62
|
||||
==23273== at 0x4023D6E: malloc (vg_replace_malloc.c:207)
|
||||
==23273== by 0x805FDE1: same_cache2 (inputstr.c:201)
|
||||
==23273== by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
|
||||
==23273== by 0x8066A18: dlg_print_line (util.c:669)
|
||||
==23273== by 0x8066E40: justify_text (util.c:813)
|
||||
==23273== by 0x8066F5E: dlg_print_autowrap (util.c:843)
|
||||
==23273== by 0x806703E: dlg_print_scrolled (util.c:892)
|
||||
==23273== by 0x806A30C: dialog_yesno (yesno.c:104)
|
||||
==23273== by 0x804A728: call_yesno (dialog.c:600)
|
||||
==23273== by 0x804CC56: main (dialog.c:1679)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 12,800 bytes in 40 blocks are still reachable in loss record 60 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x80729EC: newwin (lib_newwin.c:130)
|
||||
==23273== by 0x8074F9A: _nc_setupscreen (lib_set_term.c:459)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 12,800 bytes in 40 blocks are still reachable in loss record 61 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x80729EC: newwin (lib_newwin.c:130)
|
||||
==23273== by 0x8074CB3: _nc_setupscreen (lib_set_term.c:414)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273==
|
||||
==23273== 12,800 bytes in 40 blocks are still reachable in loss record 62 of 62
|
||||
==23273== at 0x4021E22: calloc (vg_replace_malloc.c:397)
|
||||
==23273== by 0x80729EC: newwin (lib_newwin.c:130)
|
||||
==23273== by 0x8074C55: _nc_setupscreen (lib_set_term.c:410)
|
||||
==23273== by 0x80723F1: newterm (lib_newterm.c:146)
|
||||
==23273== by 0x806E82C: initscr (lib_initscr.c:83)
|
||||
==23273== by 0x8066211: init_dialog (util.c:292)
|
||||
==23273== by 0x804C880: main (dialog.c:1604)
|
||||
==23273==
|
||||
==23273== LEAK SUMMARY:
|
||||
==23273== definitely lost: 0 bytes in 0 blocks.
|
||||
==23273== possibly lost: 0 bytes in 0 blocks.
|
||||
==23273== still reachable: 72,482 bytes in 382 blocks.
|
||||
==23273== suppressed: 0 bytes in 0 blocks.
|
||||
--23273-- memcheck: sanity checks: 8 cheap, 2 expensive
|
||||
--23273-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
|
||||
--23273-- memcheck: auxmaps_L1: 0 searches, 0 cmps, ratio 0:10
|
||||
--23273-- memcheck: auxmaps_L2: 0 searches, 0 nodes
|
||||
--23273-- memcheck: SMs: n_issued = 11 (176k, 0M)
|
||||
--23273-- memcheck: SMs: n_deissued = 0 (0k, 0M)
|
||||
--23273-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M)
|
||||
--23273-- memcheck: SMs: max_undefined = 0 (0k, 0M)
|
||||
--23273-- memcheck: SMs: max_defined = 25 (400k, 0M)
|
||||
--23273-- memcheck: SMs: max_non_DSM = 11 (176k, 0M)
|
||||
--23273-- memcheck: max sec V bit nodes: 21 (1k, 0M)
|
||||
--23273-- memcheck: set_sec_vbits8 calls: 130 (new: 21, updates: 109)
|
||||
--23273-- memcheck: max shadow mem size: 481k, 0M
|
||||
--23273-- translate: fast SP updates identified: 4,767 ( 83.0%)
|
||||
--23273-- translate: generic_known SP updates identified: 612 ( 10.6%)
|
||||
--23273-- translate: generic_unknown SP updates identified: 358 ( 6.2%)
|
||||
--23273-- tt/tc: 11,509 tt lookups requiring 11,938 probes
|
||||
--23273-- tt/tc: 11,509 fast-cache updates, 3 flushes
|
||||
--23273-- transtab: new 5,099 (117,852 -> 1,563,594; ratio 132:10) [0 scs]
|
||||
--23273-- transtab: dumped 0 (0 -> ??)
|
||||
--23273-- transtab: discarded 9 (222 -> ??)
|
||||
--23273-- scheduler: 864,676 jumps (bb entries).
|
||||
--23273-- scheduler: 8/7,086 major/minor sched events.
|
||||
--23273-- sanity: 9 cheap, 2 expensive checks.
|
||||
--23273-- exectx: 769 lists, 102 contexts (avg 0 per list)
|
||||
--23273-- exectx: 470 searches, 372 full compares (791 per 1000)
|
||||
--23273-- exectx: 0 cmp2, 36 cmp4, 2,470 cmpAll
|
||||
--23273-- errormgr: 69 supplist searches, 5,672 comparisons during search
|
||||
--23273-- errormgr: 14 errlist searches, 36 comparisons during search
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $Id: wheel,v 1.7 2010/01/13 01:44:12 tom Exp $
|
||||
# $Id: wheel,v 1.8 2012/06/29 09:59:40 tom Exp $
|
||||
|
||||
. ./setup-vars
|
||||
|
||||
@ -17,10 +17,10 @@ COLS=`expr $COLS - 30`
|
||||
|
||||
# Takes an integer, multiplies it for COLS, divides for 132
|
||||
scalex() {
|
||||
echo $[$1*$COLS/132]
|
||||
expr $1 \* $COLS / 132
|
||||
}
|
||||
scaley() {
|
||||
echo $[$1*$ROWS/60]
|
||||
expr $1 \* $ROWS / 60
|
||||
}
|
||||
|
||||
$DIALOG --backtitle "$TITLE" --no-shadow \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $Id: whiptail.rc,v 1.3 2011/01/17 00:15:54 tom Exp $
|
||||
# $Id: whiptail.rc,v 1.5 2011/10/15 01:01:16 tom Exp $
|
||||
# vile:confmode
|
||||
# Run-time configuration file for dialog, matches whiptail's color scheme.
|
||||
#
|
||||
@ -46,79 +46,79 @@ border_color = (WHITE,WHITE,ON)
|
||||
button_active_color = (WHITE,RED,ON)
|
||||
|
||||
# Inactive button color
|
||||
button_inactive_color = (BLACK,WHITE,OFF)
|
||||
button_inactive_color = dialog_color
|
||||
|
||||
# Active button key color
|
||||
button_key_active_color = (WHITE,RED,ON)
|
||||
button_key_active_color = button_active_color
|
||||
|
||||
# Inactive button key color
|
||||
button_key_inactive_color = (BLACK,WHITE,OFF)
|
||||
button_key_inactive_color = dialog_color
|
||||
|
||||
# Active button label color
|
||||
button_label_active_color = (WHITE,RED,ON)
|
||||
button_label_active_color = button_active_color
|
||||
|
||||
# Inactive button label color
|
||||
button_label_inactive_color = (BLACK,WHITE,ON)
|
||||
|
||||
# Input box color
|
||||
inputbox_color = (BLACK,WHITE,OFF)
|
||||
inputbox_color = dialog_color
|
||||
|
||||
# Input box border color
|
||||
inputbox_border_color = (BLACK,WHITE,OFF)
|
||||
inputbox_border_color = dialog_color
|
||||
|
||||
# Search box color
|
||||
searchbox_color = (BLACK,WHITE,OFF)
|
||||
searchbox_color = dialog_color
|
||||
|
||||
# Search box title color
|
||||
searchbox_title_color = (RED,WHITE,ON)
|
||||
searchbox_title_color = title_color
|
||||
|
||||
# Search box border color
|
||||
searchbox_border_color = (WHITE,WHITE,ON)
|
||||
searchbox_border_color = border_color
|
||||
|
||||
# File position indicator color
|
||||
position_indicator_color = (RED,WHITE,ON)
|
||||
position_indicator_color = title_color
|
||||
|
||||
# Menu box color
|
||||
menubox_color = (YELLOW,BLUE,OFF)
|
||||
|
||||
# Menu box border color
|
||||
menubox_border_color = (YELLOW,BLUE,ON)
|
||||
menubox_border_color = screen_color
|
||||
|
||||
# Item color
|
||||
item_color = (YELLOW,BLUE,OFF)
|
||||
item_color = menubox_color
|
||||
|
||||
# Selected item color
|
||||
item_selected_color = (YELLOW,BLUE,ON)
|
||||
item_selected_color = screen_color
|
||||
|
||||
# Tag color
|
||||
tag_color = (YELLOW,BLUE,ON)
|
||||
tag_color = screen_color
|
||||
|
||||
# Selected tag color
|
||||
tag_selected_color = (YELLOW,BLUE,ON)
|
||||
tag_selected_color = screen_color
|
||||
|
||||
# Tag key color
|
||||
tag_key_color = (YELLOW,BLUE,OFF)
|
||||
tag_key_color = menubox_color
|
||||
|
||||
# Selected tag key color
|
||||
tag_key_selected_color = (WHITE,BLUE,ON)
|
||||
|
||||
# Check box color
|
||||
check_color = (YELLOW,BLUE,OFF)
|
||||
check_color = menubox_color
|
||||
|
||||
# Selected check box color
|
||||
check_selected_color = (YELLOW,BLUE,ON)
|
||||
check_selected_color = screen_color
|
||||
|
||||
# Up arrow color
|
||||
uarrow_color = (YELLOW,BLUE,ON)
|
||||
uarrow_color = screen_color
|
||||
|
||||
# Down arrow color
|
||||
darrow_color = (YELLOW,BLUE,ON)
|
||||
darrow_color = screen_color
|
||||
|
||||
# Item help-text color
|
||||
itemhelp_color = (WHITE,BLACK,OFF)
|
||||
|
||||
# Active form text color
|
||||
form_active_text_color = (WHITE,BLUE,ON)
|
||||
form_active_text_color = tag_key_selected_color
|
||||
|
||||
# Form text color
|
||||
form_text_color = (WHITE,CYAN,ON)
|
||||
@ -128,3 +128,15 @@ form_item_readonly_color = (CYAN,WHITE,ON)
|
||||
|
||||
# Dialog box gauge color
|
||||
gauge_color = (BLUE,WHITE,ON)
|
||||
|
||||
# Dialog box border2 color
|
||||
border2_color = dialog_color
|
||||
|
||||
# Input box border2 color
|
||||
inputbox_border2_color = dialog_color
|
||||
|
||||
# Search box border2 color
|
||||
searchbox_border2_color = dialog_color
|
||||
|
||||
# Menu box border2 color
|
||||
menubox_border2_color = dialog_color
|
||||
|
3
contrib/dialog/samples/with-dquotes
Executable file
3
contrib/dialog/samples/with-dquotes
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# $Id: with-dquotes,v 1.1 2012/07/03 09:40:19 tom Exp $
|
||||
DIALOGOPTS="$DIALOGOPTS --quoted" "$@"
|
3
contrib/dialog/samples/with-squotes
Executable file
3
contrib/dialog/samples/with-squotes
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
# $Id: with-squotes,v 1.1 2012/07/03 09:40:29 tom Exp $
|
||||
DIALOGOPTS="$DIALOGOPTS --single-quoted" "$@"
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: tailbox.c,v 1.63 2011/06/27 08:19:43 tom Exp $
|
||||
* $Id: tailbox.c,v 1.67 2011/10/15 12:43:07 tom Exp $
|
||||
*
|
||||
* tailbox.c -- implements the tail box
|
||||
*
|
||||
@ -96,6 +96,7 @@ print_line(MY_OBJ * obj, WINDOW *win, int row, int width)
|
||||
#endif
|
||||
|
||||
getyx(win, y, x);
|
||||
(void) y;
|
||||
/* Clear 'residue' of previous line */
|
||||
for (i = 0; i < width - x; i++)
|
||||
(void) waddch(win, ' ');
|
||||
@ -336,8 +337,8 @@ dialog_tailbox(const char *title, const char *file, int height, int width, int b
|
||||
y + MARGIN,
|
||||
x + MARGIN);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
|
||||
@ -371,6 +372,7 @@ dialog_tailbox(const char *title, const char *file, int height, int width, int b
|
||||
dlg_attr_clear(text, thigh, getmaxx(text), dialog_attr);
|
||||
repaint_text(obj);
|
||||
|
||||
dlg_trace_win(dialog);
|
||||
if (bg_task) {
|
||||
result = DLG_EXIT_OK;
|
||||
} else {
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: textbox.c,v 1.101 2011/06/29 09:53:03 tom Exp $
|
||||
* $Id: textbox.c,v 1.107 2012/07/01 18:13:24 Zoltan.Kelemen Exp $
|
||||
*
|
||||
* textbox.c -- implements the text box
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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
|
||||
@ -414,6 +414,7 @@ print_page(MY_OBJ * obj, int height, int width)
|
||||
passed_end = 1;
|
||||
}
|
||||
(void) wnoutrefresh(obj->text);
|
||||
dlg_trace_win(obj->text);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -488,9 +489,10 @@ get_search_term(WINDOW *dialog, char *input, int height, int width)
|
||||
keypad(widget, TRUE);
|
||||
dlg_register_window(widget, "searchbox", binding);
|
||||
|
||||
dlg_draw_box(widget, 0, 0, box_height, box_width,
|
||||
dlg_draw_box2(widget, 0, 0, box_height, box_width,
|
||||
searchbox_attr,
|
||||
searchbox_border_attr);
|
||||
searchbox_border_attr,
|
||||
searchbox_border2_attr);
|
||||
wattrset(widget, searchbox_title_attr);
|
||||
(void) wmove(widget, 0, (box_width - len_caption) / 2);
|
||||
|
||||
@ -498,8 +500,6 @@ get_search_term(WINDOW *dialog, char *input, int height, int width)
|
||||
limit = dlg_limit_columns(caption, len_caption, 0);
|
||||
(void) waddnstr(widget, caption + indx[0], indx[limit] - indx[0]);
|
||||
|
||||
box_y++;
|
||||
box_x++;
|
||||
box_width -= 2;
|
||||
offset = dlg_count_columns(input);
|
||||
|
||||
@ -581,7 +581,6 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
|
||||
back_lines(obj, (dir
|
||||
? obj->page_length - 1
|
||||
: obj->page_length + 1));
|
||||
found = FALSE;
|
||||
if (dir) { /* Forward search */
|
||||
while ((found = match_string(obj, search_term)) == FALSE) {
|
||||
if (obj->end_reached)
|
||||
@ -675,7 +674,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
|
||||
WINDOW *dialog;
|
||||
bool moved;
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
int button = dialog_vars.extra_button ? dlg_defaultno_button() : 0;
|
||||
int button = dlg_default_button();
|
||||
int min_width = 12;
|
||||
|
||||
search_term[0] = '\0'; /* no search term entered yet */
|
||||
@ -725,8 +724,8 @@ dialog_textbox(const char *title, const char *file, int height, int width)
|
||||
|
||||
/* register the new window, along with its borders */
|
||||
dlg_mouse_mkbigregion(0, 0, PAGE_LENGTH + 2, width, KEY_MAX, 1, 1, 1 /* lines */ );
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
|
||||
dlg_draw_buttons(dialog, PAGE_LENGTH + 2, 0, obj.buttons, button, FALSE, width);
|
||||
@ -915,7 +914,6 @@ dialog_textbox(const char *title, const char *file, int height, int width)
|
||||
height = old_height;
|
||||
width = old_width;
|
||||
back_lines(&obj, obj.page_length);
|
||||
moved = TRUE;
|
||||
/* repaint */
|
||||
dlg_clear();
|
||||
dlg_del_window(dialog);
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: timebox.c,v 1.45 2011/06/27 08:20:22 tom Exp $
|
||||
* $Id: timebox.c,v 1.52 2012/07/02 09:34:04 tom Exp $
|
||||
*
|
||||
* timebox.c -- implements the timebox dialog
|
||||
*
|
||||
* Copyright 2001-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2001-2011,2012 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
|
||||
@ -82,9 +82,9 @@ draw_cell(BOX * data)
|
||||
dlg_draw_box(data->parent,
|
||||
data->y - MARGIN, data->x - MARGIN,
|
||||
data->height + (2 * MARGIN), data->width + (2 * MARGIN),
|
||||
menubox_border_attr, menubox_attr);
|
||||
menubox_border_attr, menubox_border2_attr);
|
||||
|
||||
wattrset(data->window, item_attr);
|
||||
(void) wattrset(data->window, item_attr);
|
||||
wprintw(data->window, "%02d", data->value);
|
||||
return 0;
|
||||
}
|
||||
@ -184,7 +184,7 @@ dialog_timebox(const char *title,
|
||||
WINDOW *dialog;
|
||||
time_t now_time = time((time_t *) 0);
|
||||
struct tm current;
|
||||
int state = dlg_defaultno_button();
|
||||
int state = dlg_default_button();
|
||||
const char **buttons = dlg_ok_labels();
|
||||
char *prompt = dlg_strclone(subtitle);
|
||||
char buffer[MAX_LEN];
|
||||
@ -221,12 +221,12 @@ dialog_timebox(const char *title,
|
||||
dlg_register_window(dialog, "timebox", binding);
|
||||
dlg_register_buttons(dialog, "timebox", buttons);
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
|
||||
wattrset(dialog, dialog_attr);
|
||||
(void) wattrset(dialog, dialog_attr);
|
||||
dlg_print_autowrap(dialog, prompt, height, width);
|
||||
|
||||
/* compute positions of hour, month and year boxes */
|
||||
@ -275,6 +275,7 @@ dialog_timebox(const char *title,
|
||||
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
|
||||
}
|
||||
|
||||
dlg_trace_win(dialog);
|
||||
while (result == DLG_EXIT_UNKNOWN) {
|
||||
BOX *obj = (state == sHR ? &hr_box
|
||||
: (state == sMN ? &mn_box :
|
||||
@ -295,12 +296,6 @@ dialog_timebox(const char *title,
|
||||
/* handle function-keys */
|
||||
if (fkey) {
|
||||
switch (key) {
|
||||
case DLGK_MOUSE(0):
|
||||
result = DLG_EXIT_OK;
|
||||
break;
|
||||
case DLGK_MOUSE(1):
|
||||
result = DLG_EXIT_CANCEL;
|
||||
break;
|
||||
case DLGK_MOUSE('H'):
|
||||
state = sHR;
|
||||
break;
|
||||
@ -311,7 +306,7 @@ dialog_timebox(const char *title,
|
||||
state = sSC;
|
||||
break;
|
||||
case DLGK_ENTER:
|
||||
result = button;
|
||||
result = dlg_ok_buttoncode(button);
|
||||
break;
|
||||
case DLGK_FIELD_PREV:
|
||||
state = dlg_prev_ok_buttonindex(state, sHR);
|
||||
@ -361,7 +356,11 @@ dialog_timebox(const char *title,
|
||||
goto retry;
|
||||
#endif
|
||||
default:
|
||||
if (obj != 0) {
|
||||
if (is_DLGK_MOUSE(key)) {
|
||||
result = dlg_ok_buttoncode(key - M_EVENT);
|
||||
if (result < 0)
|
||||
result = DLG_EXIT_OK;
|
||||
} else if (obj != 0) {
|
||||
int step = next_or_previous(key);
|
||||
if (step != 0) {
|
||||
obj->value += step;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: trace.c,v 1.14 2011/06/21 21:12:56 tom Exp $
|
||||
* $Id: trace.c,v 1.20 2011/10/18 10:47:26 tom Exp $
|
||||
*
|
||||
* trace.c -- implements screen-dump and keystroke-logging
|
||||
*
|
||||
@ -24,6 +24,10 @@
|
||||
|
||||
#ifdef HAVE_DLG_TRACE
|
||||
|
||||
#ifdef NEED_WCHAR_H
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
#include <dlg_keys.h>
|
||||
#include <time.h>
|
||||
|
||||
@ -54,6 +58,14 @@ dlg_trace_win(WINDOW *win)
|
||||
if (myFP != 0) {
|
||||
int y, x;
|
||||
int j, k;
|
||||
WINDOW *top = wgetparent(win);
|
||||
|
||||
while (top != 0 && top != stdscr) {
|
||||
win = top;
|
||||
top = wgetparent(win);
|
||||
}
|
||||
|
||||
if (win != 0) {
|
||||
int rc = getmaxy(win);
|
||||
int cc = getmaxx(win);
|
||||
chtype ch, c2;
|
||||
@ -65,6 +77,38 @@ dlg_trace_win(WINDOW *win)
|
||||
for (j = 0; j < rc; ++j) {
|
||||
fprintf(myFP, "%3d:", j);
|
||||
for (k = 0; k < cc; ++k) {
|
||||
#ifdef USE_WIDE_CURSES
|
||||
char buffer[80];
|
||||
|
||||
ch = mvwinch(win, j, k) & (A_CHARTEXT | A_ALTCHARSET);
|
||||
if (ch & A_ALTCHARSET) {
|
||||
c2 = dlg_asciibox(ch);
|
||||
if (c2 != 0) {
|
||||
ch = c2;
|
||||
}
|
||||
buffer[0] = (char) ch;
|
||||
buffer[1] = '\0';
|
||||
} else {
|
||||
cchar_t cch;
|
||||
wchar_t *uc;
|
||||
|
||||
if (win_wch(win, &cch) == ERR
|
||||
|| (uc = wunctrl(&cch)) == 0
|
||||
|| uc[1] != 0
|
||||
|| wcwidth(uc[0]) <= 0) {
|
||||
buffer[0] = '.';
|
||||
buffer[1] = '\0';
|
||||
} else {
|
||||
mbstate_t state;
|
||||
const wchar_t *ucp = uc;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
wcsrtombs(buffer, &ucp, sizeof(buffer), &state);
|
||||
k += wcwidth(uc[0]) - 1;
|
||||
}
|
||||
}
|
||||
fputs(buffer, myFP);
|
||||
#else
|
||||
ch = mvwinch(win, j, k) & (A_CHARTEXT | A_ALTCHARSET);
|
||||
c2 = dlg_asciibox(ch);
|
||||
if (c2 != 0) {
|
||||
@ -73,6 +117,7 @@ dlg_trace_win(WINDOW *win)
|
||||
ch = '.';
|
||||
}
|
||||
fputc((int) (ch & 0xff), myFP);
|
||||
#endif
|
||||
}
|
||||
fputc('\n', myFP);
|
||||
}
|
||||
@ -80,12 +125,27 @@ dlg_trace_win(WINDOW *win)
|
||||
fflush(myFP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dlg_trace_chr(int ch, int fkey)
|
||||
{
|
||||
if (myFP != 0) {
|
||||
static int last_err = 0;
|
||||
|
||||
/*
|
||||
* Do not bother to trace ERR's indefinitely, since those are usually due
|
||||
* to relatively short polling timeouts.
|
||||
*/
|
||||
if (last_err && !fkey && ch == ERR) {
|
||||
++last_err;
|
||||
} else if (myFP != 0) {
|
||||
const char *fkey_name = "?";
|
||||
|
||||
if (last_err) {
|
||||
fprintf(myFP, "skipped %d ERR's\n", last_err);
|
||||
last_err = 0;
|
||||
}
|
||||
|
||||
if (fkey) {
|
||||
if (fkey > KEY_MAX || (fkey_name = keyname(fkey)) == 0) {
|
||||
#define CASE(name) case name: fkey_name = #name; break
|
||||
@ -108,6 +168,10 @@ dlg_trace_chr(int ch, int fkey)
|
||||
CASE(DLGK_FIELD_LAST);
|
||||
CASE(DLGK_FIELD_NEXT);
|
||||
CASE(DLGK_FIELD_PREV);
|
||||
CASE(DLGK_FORM_FIRST);
|
||||
CASE(DLGK_FORM_LAST);
|
||||
CASE(DLGK_FORM_NEXT);
|
||||
CASE(DLGK_FORM_PREV);
|
||||
CASE(DLGK_GRID_UP);
|
||||
CASE(DLGK_GRID_DOWN);
|
||||
CASE(DLGK_GRID_LEFT);
|
||||
@ -125,6 +189,7 @@ dlg_trace_chr(int ch, int fkey)
|
||||
}
|
||||
} else if (ch == ERR) {
|
||||
fkey_name = "ERR";
|
||||
last_err = 1;
|
||||
} else {
|
||||
fkey_name = unctrl((chtype) ch);
|
||||
if (fkey_name == 0)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: ui_getc.c,v 1.63 2011/07/07 22:05:58 tom Exp $
|
||||
* $Id: ui_getc.c,v 1.65 2011/10/20 23:45:48 tom Exp $
|
||||
*
|
||||
* ui_getc.c - user interface glue for getc()
|
||||
*
|
||||
@ -294,8 +294,7 @@ valid_file(FILE *fp)
|
||||
int fd = fileno(fp);
|
||||
|
||||
if (fd >= 0) {
|
||||
long result = 0;
|
||||
if ((result = fcntl(fd, F_GETFL, 0)) >= 0) {
|
||||
if (fcntl(fd, F_GETFL, 0) >= 0) {
|
||||
code = TRUE;
|
||||
}
|
||||
}
|
||||
@ -530,6 +529,7 @@ dlg_getc(WINDOW *win, int *fkey)
|
||||
if (handle_others) {
|
||||
if ((p = dialog_state.getc_redirect) != 0) {
|
||||
if (!(p->handle_getc(p, ch, *fkey, &result))) {
|
||||
done = (p->win == save_win) && (!p->keep_win);
|
||||
dlg_remove_callback(p);
|
||||
dialog_state.getc_redirect = 0;
|
||||
win = save_win;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: util.c,v 1.227 2011/07/07 23:42:30 tom Exp $
|
||||
* $Id: util.c,v 1.243 2012/06/30 12:58:04 tom Exp $
|
||||
*
|
||||
* util.c -- miscellaneous utilities for dialog
|
||||
*
|
||||
* Copyright 2000-2010,2011 Thomas E. Dickey
|
||||
* Copyright 2000-2011,2012 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,6 +27,14 @@
|
||||
#include <dialog.h>
|
||||
#include <dlg_keys.h>
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef NEED_WCHAR_H
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifdef NCURSES_VERSION
|
||||
#if defined(HAVE_NCURSESW_TERM_H)
|
||||
#include <ncursesw/term.h>
|
||||
@ -55,6 +63,12 @@
|
||||
DIALOG_STATE dialog_state;
|
||||
DIALOG_VARS dialog_vars;
|
||||
|
||||
#if !(defined(HAVE_WGETPARENT) && defined(HAVE_WINDOW__PARENT))
|
||||
#define NEED_WGETPARENT 1
|
||||
#else
|
||||
#undef NEED_WGETPARENT
|
||||
#endif
|
||||
|
||||
#define concat(a,b) a##b
|
||||
|
||||
#ifdef HAVE_RC_FILE
|
||||
@ -79,6 +93,7 @@ DIALOG_VARS dialog_vars;
|
||||
|
||||
/*
|
||||
* Table of color and attribute values, default is for mono display.
|
||||
* The order matches the DIALOG_ATR() values.
|
||||
*/
|
||||
/* *INDENT-OFF* */
|
||||
DIALOG_COLORS dlg_color_table[] =
|
||||
@ -116,10 +131,56 @@ DIALOG_COLORS dlg_color_table[] =
|
||||
DATA(A_BOLD, FORM_ACTIVE_TEXT, form_active_text, "Active form text"),
|
||||
DATA(A_REVERSE, FORM_TEXT, form_text, "Form text"),
|
||||
DATA(A_NORMAL, FORM_ITEM_READONLY, form_item_readonly, "Readonly form item"),
|
||||
DATA(A_REVERSE, GAUGE, gauge, "Dialog box gauge")
|
||||
DATA(A_REVERSE, GAUGE, gauge, "Dialog box gauge"),
|
||||
DATA(A_REVERSE, BORDER2, border2, "Dialog box border2"),
|
||||
DATA(A_REVERSE, INPUTBOX_BORDER2, inputbox_border2, "Input box border2"),
|
||||
DATA(A_REVERSE, SEARCHBOX_BORDER2, searchbox_border2, "Search box border2"),
|
||||
DATA(A_REVERSE, MENUBOX_BORDER2, menubox_border2, "Menu box border2")
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/*
|
||||
* Maintain a list of subwindows so that we can delete them to cleanup.
|
||||
* More important, this provides a fallback when wgetparent() is not available.
|
||||
*/
|
||||
static void
|
||||
add_subwindow(WINDOW *parent, WINDOW *child)
|
||||
{
|
||||
DIALOG_WINDOWS *p = dlg_calloc(DIALOG_WINDOWS, 1);
|
||||
|
||||
if (p != 0) {
|
||||
p->normal = parent;
|
||||
p->shadow = child;
|
||||
p->next = dialog_state.all_subwindows;
|
||||
dialog_state.all_subwindows = p;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
del_subwindows(WINDOW *parent)
|
||||
{
|
||||
DIALOG_WINDOWS *p = dialog_state.all_subwindows;
|
||||
DIALOG_WINDOWS *q = 0;
|
||||
DIALOG_WINDOWS *r;
|
||||
|
||||
while (p != 0) {
|
||||
if (p->normal == parent) {
|
||||
delwin(p->shadow);
|
||||
r = p->next;
|
||||
if (q == 0) {
|
||||
dialog_state.all_subwindows = r;
|
||||
} else {
|
||||
q->next = r;
|
||||
}
|
||||
free(p);
|
||||
p = r;
|
||||
} else {
|
||||
q = p;
|
||||
p = p->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Display background title if it exists ...
|
||||
*/
|
||||
@ -226,6 +287,8 @@ init_dialog(FILE *input, FILE *output)
|
||||
int fd1, fd2;
|
||||
char *device = 0;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
dialog_state.output = output;
|
||||
dialog_state.tab_len = TAB_LEN;
|
||||
dialog_state.aspect_ratio = DEFAULT_ASPECT_RATIO;
|
||||
@ -252,7 +315,7 @@ init_dialog(FILE *input, FILE *output)
|
||||
*/
|
||||
dialog_state.pipe_input = stdin;
|
||||
if (fileno(input) != fileno(stdin)) {
|
||||
if ((fd1 = dup(fileno(input))) >= 0
|
||||
if (dup(fileno(input)) >= 0
|
||||
&& (fd2 = dup(fileno(stdin))) >= 0) {
|
||||
(void) dup2(fileno(input), fileno(stdin));
|
||||
dialog_state.pipe_input = fdopen(fd2, "r");
|
||||
@ -261,7 +324,7 @@ init_dialog(FILE *input, FILE *output)
|
||||
} else
|
||||
dlg_exiterr("cannot open tty-input");
|
||||
} else if (!isatty(fileno(stdin))) {
|
||||
if ((fd1 = open_terminal(&device, O_RDONLY)) >= 0
|
||||
if (open_terminal(&device, O_RDONLY) >= 0
|
||||
&& (fd2 = dup(fileno(stdin))) >= 0) {
|
||||
dialog_state.pipe_input = fdopen(fd2, "r");
|
||||
if (freopen(device, "r", stdin) == 0)
|
||||
@ -506,22 +569,32 @@ end_dialog(void)
|
||||
#define ESCAPE_LEN 3
|
||||
#define isOurEscape(p) (((p)[0] == '\\') && ((p)[1] == 'Z') && ((p)[2] != 0))
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
result -= hidden;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
centered(int width, const char *string)
|
||||
{
|
||||
int len = dlg_count_columns(string);
|
||||
int need = dlg_count_real_columns(string);
|
||||
int left;
|
||||
int hide = 0;
|
||||
int n;
|
||||
|
||||
if (dialog_vars.colors) {
|
||||
for (n = 0; n < len; ++n) {
|
||||
if (isOurEscape(string + n)) {
|
||||
hide += ESCAPE_LEN;
|
||||
}
|
||||
}
|
||||
}
|
||||
left = (width - (len - hide)) / 2 - 1;
|
||||
left = (width - need) / 2 - 1;
|
||||
if (left < 0)
|
||||
left = 0;
|
||||
return left;
|
||||
@ -647,8 +720,10 @@ dlg_print_text(WINDOW *win, const char *txt, int cols, chtype *attr)
|
||||
* more blanks.
|
||||
*/
|
||||
thisTab = (CharOf(*txt) == TAB);
|
||||
if (thisTab)
|
||||
if (thisTab) {
|
||||
getyx(win, y_before, x_before);
|
||||
(void) y_before;
|
||||
}
|
||||
(void) waddch(win, CharOf(*txt++) | useattr);
|
||||
getyx(win, y_after, x_after);
|
||||
if (thisTab && (y_after == y_origin))
|
||||
@ -704,7 +779,7 @@ dlg_print_line(WINDOW *win,
|
||||
} else if (*test_ptr == ' ' && n != 0 && prompt[indx[n - 1]] != ' ') {
|
||||
wrap_inx = n;
|
||||
*x = cur_x;
|
||||
} else if (isOurEscape(test_ptr)) {
|
||||
} else if (dialog_vars.colors && isOurEscape(test_ptr)) {
|
||||
hide_ptr = test_ptr;
|
||||
hidden += ESCAPE_LEN;
|
||||
n += (ESCAPE_LEN - 1);
|
||||
@ -751,7 +826,7 @@ dlg_print_line(WINDOW *win,
|
||||
hidden -= ESCAPE_LEN;
|
||||
test_ptr = wrap_ptr;
|
||||
while (test_ptr < wrap_ptr) {
|
||||
if (isOurEscape(test_ptr)) {
|
||||
if (dialog_vars.colors && isOurEscape(test_ptr)) {
|
||||
hidden -= ESCAPE_LEN;
|
||||
test_ptr += ESCAPE_LEN;
|
||||
} else {
|
||||
@ -911,6 +986,7 @@ dlg_print_scrolled(WINDOW *win,
|
||||
werase(dummy);
|
||||
dlg_print_autowrap(dummy, prompt, high, width);
|
||||
getyx(dummy, y, x);
|
||||
(void) x;
|
||||
|
||||
copywin(dummy, /* srcwin */
|
||||
win, /* dstwin */
|
||||
@ -1081,25 +1157,6 @@ longest_word(const char *string)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int
|
||||
count_real_columns(const char *text)
|
||||
{
|
||||
int result = dlg_count_columns(text);
|
||||
if (result && dialog_vars.colors) {
|
||||
int hidden = 0;
|
||||
while (*text) {
|
||||
if (isOurEscape(text)) {
|
||||
hidden += ESCAPE_LEN;
|
||||
text += ESCAPE_LEN;
|
||||
} else {
|
||||
++text;
|
||||
}
|
||||
}
|
||||
result -= hidden;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* if (height or width == -1) Maximize()
|
||||
* if (height or width == 0), justify and return actual limits.
|
||||
@ -1132,12 +1189,12 @@ real_auto_size(const char *title,
|
||||
high = SLINES - y;
|
||||
}
|
||||
|
||||
if (*width > 0) {
|
||||
wide = *width;
|
||||
} else if (prompt != 0) {
|
||||
if (*width <= 0) {
|
||||
if (prompt != 0) {
|
||||
wide = MAX(title_length, mincols);
|
||||
if (strchr(prompt, '\n') == 0) {
|
||||
double val = dialog_state.aspect_ratio * count_real_columns(prompt);
|
||||
double val = (dialog_state.aspect_ratio *
|
||||
dlg_count_real_columns(prompt));
|
||||
double xxx = sqrt(val);
|
||||
int tmp = (int) xxx;
|
||||
wide = MAX(wide, tmp);
|
||||
@ -1150,6 +1207,7 @@ real_auto_size(const char *title,
|
||||
wide = SCOLS - x;
|
||||
justify_text((WINDOW *) 0, prompt, high, wide, height, width);
|
||||
}
|
||||
}
|
||||
|
||||
if (*width < title_length) {
|
||||
justify_text((WINDOW *) 0, prompt, high, title_length, height, width);
|
||||
@ -1291,8 +1349,8 @@ dlg_get_cell_attrs(WINDOW *win)
|
||||
* reverse this choice.
|
||||
*/
|
||||
void
|
||||
dlg_draw_box(WINDOW *win, int y, int x, int height, int width,
|
||||
chtype boxchar, chtype borderchar)
|
||||
dlg_draw_box2(WINDOW *win, int y, int x, int height, int width,
|
||||
chtype boxchar, chtype borderchar, chtype borderchar2)
|
||||
{
|
||||
int i, j;
|
||||
chtype save = dlg_get_attrs(win);
|
||||
@ -1306,23 +1364,30 @@ dlg_draw_box(WINDOW *win, int y, int x, int height, int width,
|
||||
else if (i == height - 1 && !j)
|
||||
(void) waddch(win, borderchar | dlg_boxchar(ACS_LLCORNER));
|
||||
else if (!i && j == width - 1)
|
||||
(void) waddch(win, boxchar | dlg_boxchar(ACS_URCORNER));
|
||||
(void) waddch(win, borderchar2 | dlg_boxchar(ACS_URCORNER));
|
||||
else if (i == height - 1 && j == width - 1)
|
||||
(void) waddch(win, boxchar | dlg_boxchar(ACS_LRCORNER));
|
||||
(void) waddch(win, borderchar2 | dlg_boxchar(ACS_LRCORNER));
|
||||
else if (!i)
|
||||
(void) waddch(win, borderchar | dlg_boxchar(ACS_HLINE));
|
||||
else if (i == height - 1)
|
||||
(void) waddch(win, boxchar | dlg_boxchar(ACS_HLINE));
|
||||
(void) waddch(win, borderchar2 | dlg_boxchar(ACS_HLINE));
|
||||
else if (!j)
|
||||
(void) waddch(win, borderchar | dlg_boxchar(ACS_VLINE));
|
||||
else if (j == width - 1)
|
||||
(void) waddch(win, boxchar | dlg_boxchar(ACS_VLINE));
|
||||
(void) waddch(win, borderchar2 | dlg_boxchar(ACS_VLINE));
|
||||
else
|
||||
(void) waddch(win, boxchar | ' ');
|
||||
}
|
||||
wattrset(win, save);
|
||||
}
|
||||
|
||||
void
|
||||
dlg_draw_box(WINDOW *win, int y, int x, int height, int width,
|
||||
chtype boxchar, chtype borderchar)
|
||||
{
|
||||
dlg_draw_box2(win, y, x, height, width, boxchar, borderchar, boxchar);
|
||||
}
|
||||
|
||||
static DIALOG_WINDOWS *
|
||||
find_window(WINDOW *win)
|
||||
{
|
||||
@ -1454,7 +1519,7 @@ repaint_cell(DIALOG_WINDOWS * dw, bool draw, int y, int x)
|
||||
#if USE_WCHGAT
|
||||
wchgat(cellwin, 1,
|
||||
the_attr & (chtype) (~A_COLOR),
|
||||
PAIR_NUMBER(the_attr),
|
||||
(short) PAIR_NUMBER(the_attr),
|
||||
NULL);
|
||||
#else
|
||||
{
|
||||
@ -1844,24 +1909,31 @@ dlg_draw_title(WINDOW *win, const char *title)
|
||||
}
|
||||
|
||||
void
|
||||
dlg_draw_bottom_box(WINDOW *win)
|
||||
dlg_draw_bottom_box2(WINDOW *win, chtype on_left, chtype on_right, chtype on_inside)
|
||||
{
|
||||
int width = getmaxx(win);
|
||||
int height = getmaxy(win);
|
||||
int i;
|
||||
|
||||
wattrset(win, border_attr);
|
||||
wattrset(win, on_left);
|
||||
(void) wmove(win, height - 3, 0);
|
||||
(void) waddch(win, dlg_boxchar(ACS_LTEE));
|
||||
for (i = 0; i < width - 2; i++)
|
||||
(void) waddch(win, dlg_boxchar(ACS_HLINE));
|
||||
wattrset(win, dialog_attr);
|
||||
wattrset(win, on_right);
|
||||
(void) waddch(win, dlg_boxchar(ACS_RTEE));
|
||||
wattrset(win, on_inside);
|
||||
(void) wmove(win, height - 2, 1);
|
||||
for (i = 0; i < width - 2; i++)
|
||||
(void) waddch(win, ' ');
|
||||
}
|
||||
|
||||
void
|
||||
dlg_draw_bottom_box(WINDOW *win)
|
||||
{
|
||||
dlg_draw_bottom_box2(win, border_attr, dialog_attr, dialog_attr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove a window, repainting everything else. This would be simpler if we
|
||||
* used the panel library, but that is not _always_ available.
|
||||
@ -1907,6 +1979,7 @@ dlg_del_window(WINDOW *win)
|
||||
if (q) {
|
||||
if (dialog_state.all_windows != 0)
|
||||
erase_childs_shadow(q);
|
||||
del_subwindows(q->normal);
|
||||
delwin(q->normal);
|
||||
dlg_unregister_window(q->normal);
|
||||
free(q);
|
||||
@ -1996,6 +2069,7 @@ dlg_sub_window(WINDOW *parent, int height, int width, int y, int x)
|
||||
y, x, height, width);
|
||||
}
|
||||
|
||||
add_subwindow(parent, win);
|
||||
(void) keypad(win, TRUE);
|
||||
return win;
|
||||
}
|
||||
@ -2057,6 +2131,7 @@ dlg_item_help(const char *txt)
|
||||
if (itemhelp_attr & A_COLOR) {
|
||||
/* fill the remainder of the line with the window's attributes */
|
||||
getyx(stdscr, y, x);
|
||||
(void) y;
|
||||
while (x < COLS) {
|
||||
(void) addch(' ');
|
||||
++x;
|
||||
@ -2340,7 +2415,7 @@ dlg_add_quoted(char *string)
|
||||
? FIX_SINGLE
|
||||
: FIX_DOUBLE);
|
||||
|
||||
if (dialog_vars.quoted || must_quote(string)) {
|
||||
if (must_quote(string)) {
|
||||
temp[1] = '\0';
|
||||
dlg_add_result(my_quote);
|
||||
while (*string != '\0') {
|
||||
@ -2432,14 +2507,14 @@ dlg_does_output(void)
|
||||
*/
|
||||
#if !(defined(HAVE_GETBEGX) && defined(HAVE_GETBEGY))
|
||||
int
|
||||
getbegx(WINDOW *win)
|
||||
dlg_getbegx(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getbegyx(win, y, x);
|
||||
return x;
|
||||
}
|
||||
int
|
||||
getbegy(WINDOW *win)
|
||||
dlg_getbegy(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getbegyx(win, y, x);
|
||||
@ -2449,14 +2524,14 @@ getbegy(WINDOW *win)
|
||||
|
||||
#if !(defined(HAVE_GETCURX) && defined(HAVE_GETCURY))
|
||||
int
|
||||
getcurx(WINDOW *win)
|
||||
dlg_getcurx(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getyx(win, y, x);
|
||||
return x;
|
||||
}
|
||||
int
|
||||
getcury(WINDOW *win)
|
||||
dlg_getcury(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getyx(win, y, x);
|
||||
@ -2466,14 +2541,14 @@ getcury(WINDOW *win)
|
||||
|
||||
#if !(defined(HAVE_GETMAXX) && defined(HAVE_GETMAXY))
|
||||
int
|
||||
getmaxx(WINDOW *win)
|
||||
dlg_getmaxx(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getmaxyx(win, y, x);
|
||||
return x;
|
||||
}
|
||||
int
|
||||
getmaxy(WINDOW *win)
|
||||
dlg_getmaxy(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getmaxyx(win, y, x);
|
||||
@ -2483,17 +2558,35 @@ getmaxy(WINDOW *win)
|
||||
|
||||
#if !(defined(HAVE_GETPARX) && defined(HAVE_GETPARY))
|
||||
int
|
||||
getparx(WINDOW *win)
|
||||
dlg_getparx(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getparyx(win, y, x);
|
||||
return x;
|
||||
}
|
||||
int
|
||||
getpary(WINDOW *win)
|
||||
dlg_getpary(WINDOW *win)
|
||||
{
|
||||
int y, x;
|
||||
getparyx(win, y, x);
|
||||
return y;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NEED_WGETPARENT
|
||||
WINDOW *
|
||||
dlg_wgetparent(WINDOW *win)
|
||||
{
|
||||
#undef wgetparent
|
||||
WINDOW *result = 0;
|
||||
DIALOG_WINDOWS *p;
|
||||
|
||||
for (p = dialog_state.all_subwindows; p != 0; p = p->next) {
|
||||
if (p->shadow == win) {
|
||||
result = p->normal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* $Id: yesno.c,v 1.51 2011/06/27 08:20:57 tom Exp $
|
||||
* $Id: yesno.c,v 1.56 2012/07/02 23:58:08 tom Exp $
|
||||
*
|
||||
* yesno.c -- implements the yes/no box
|
||||
*
|
||||
* Copyright 1999-2010,2011 Thomas E. Dickey
|
||||
* Copyright 1999-2011,2012 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
|
||||
@ -37,13 +37,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
|
||||
static DLG_KEYS_BINDING binding[] = {
|
||||
HELPKEY_BINDINGS,
|
||||
ENTERKEY_BINDINGS,
|
||||
DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_UP ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
|
||||
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT ),
|
||||
TRAVERSE_BINDINGS,
|
||||
SCROLLKEY_BINDINGS,
|
||||
END_KEYS_BINDING
|
||||
};
|
||||
@ -52,7 +46,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
|
||||
int x, y;
|
||||
int key = 0, fkey;
|
||||
int code;
|
||||
int button = dlg_defaultno_button();
|
||||
int button = dlg_default_button();
|
||||
WINDOW *dialog = 0;
|
||||
int result = DLG_EXIT_UNKNOWN;
|
||||
char *prompt = dlg_strclone(cprompt);
|
||||
@ -87,8 +81,8 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
|
||||
dlg_register_buttons(dialog, "yesno", buttons);
|
||||
}
|
||||
|
||||
dlg_draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
|
||||
dlg_draw_bottom_box(dialog);
|
||||
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
|
||||
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
|
||||
dlg_draw_title(dialog, title);
|
||||
dlg_draw_helpline(dialog, FALSE);
|
||||
|
||||
@ -103,6 +97,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
|
||||
if (show) {
|
||||
last = dlg_print_scrolled(dialog, prompt, offset,
|
||||
page, width, TRUE);
|
||||
dlg_trace_win(dialog);
|
||||
show = FALSE;
|
||||
}
|
||||
key = dlg_mouse_wgetch(dialog, &fkey);
|
||||
|
@ -5,9 +5,11 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#define DIALOG_PATCHDATE 20100428
|
||||
#define CURSES_WACS_ARRAY _nc_wacs
|
||||
#define DIALOG_PATCHDATE 20120706
|
||||
#define DIALOG_VERSION "1.1"
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_BTOWC 1
|
||||
#define HAVE_COLOR 1
|
||||
#define HAVE_DIRENT_H 1
|
||||
#define HAVE_DLG_FORMBOX 1
|
||||
@ -18,6 +20,7 @@
|
||||
#define HAVE_FEOF_UNLOCKED 1
|
||||
#define HAVE_FLUSHINP 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_GETATTRS 1
|
||||
#define HAVE_GETBEGX 1
|
||||
#define HAVE_GETBEGY 1
|
||||
#define HAVE_GETBEGYX 1
|
||||
@ -39,14 +42,18 @@
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LANGINFO_CODESET 1
|
||||
#define HAVE_LC_MESSAGES 1
|
||||
#define HAVE_LIBNCURSESW 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_LOCALE_H 1
|
||||
#define HAVE_MBLEN 1
|
||||
#define HAVE_MBRLEN 1
|
||||
#define HAVE_MBRTOWC 1
|
||||
#define HAVE_MBSTATE_T 1
|
||||
#define HAVE_MBTOWC 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MIXEDGAUGE 1
|
||||
#define HAVE_MMAP 1
|
||||
#define HAVE_MUNMAP 1
|
||||
#define HAVE_NCURSES_H 1
|
||||
#define HAVE_NL_TYPES_H 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_RC_FILE 1
|
||||
@ -75,7 +82,12 @@
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_USE_DEFAULT_COLORS 1
|
||||
#define HAVE_WAITPID 1
|
||||
#define HAVE_WGET_WCH 1
|
||||
#define HAVE_WCHGAT 1
|
||||
#define HAVE_WCSRTOMBS 1
|
||||
#define HAVE_WCSTOMBS 1
|
||||
#define HAVE_WCTOB 1
|
||||
#define HAVE_WCTOMB 1
|
||||
#define HAVE_WGETPARENT 1
|
||||
#define HAVE_XDIALOG 1
|
||||
#define HAVE__NC_FREE_AND_EXIT 1
|
||||
#define ICONV_CONST const
|
||||
@ -85,7 +97,6 @@
|
||||
#define PACKAGE "dialog"
|
||||
#define RETSIGTYPE void
|
||||
#define STDC_HEADERS 1
|
||||
#define SYSTEM_NAME "freebsd9.0"
|
||||
#define SYSTEM_NAME "freebsd10.0"
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
#define TYPE_CHTYPE_IS_SCALAR 1
|
||||
#define USE_WIDE_CURSES 1
|
||||
|
Loading…
Reference in New Issue
Block a user